├── Screenshots
├── Editor.png
├── Types_1.png
├── Types_2.png
└── Code Editor (TS).png
├── src
└── FlowScript
│ ├── libs
│ ├── v8-x64.dll
│ └── v8-x86.dll
│ ├── wwwroot
│ ├── views
│ │ ├── Forum.html
│ │ └── NewProjectForm.html
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ ├── glyphicons-halflings-regular.woff2
│ │ └── readme.txt
│ ├── tests
│ │ ├── simple
│ │ │ ├── Tests.d.ts
│ │ │ └── index.html
│ │ └── tsconfig.json
│ ├── swagger-ui
│ │ ├── swagger-custom.css
│ │ └── index.html
│ ├── js
│ │ ├── flowscriptrt.tsbuildinfo
│ │ └── flowscript.tsbuildinfo
│ ├── editor.html
│ └── css
│ │ ├── site.css
│ │ └── editor.css
│ ├── TypeScript
│ ├── System
│ │ ├── Google Chrome.lnk
│ │ ├── globals.server.ts
│ │ ├── Runtime
│ │ │ └── tsconfig.json
│ │ ├── Thread.ts
│ │ ├── tsconfig.json
│ │ ├── bootup.ts
│ │ ├── _references.ts.txt
│ │ ├── Event.ts
│ │ ├── components
│ │ │ ├── Core.HTTPRequest.ts
│ │ │ ├── Core.Binary.ts
│ │ │ ├── Core.ControlFlow.ts
│ │ │ └── Core.Math.ts
│ │ ├── Table.ts
│ │ ├── User.ts
│ │ ├── Security.ts
│ │ ├── Solution.ts
│ │ ├── Statement.ts
│ │ ├── Message.ts
│ │ └── NamedReference.ts
│ ├── Client
│ │ ├── environments
│ │ │ ├── serverlib.d.ts.fs
│ │ │ └── empty.ts.fs
│ │ ├── app_forum.ts
│ │ ├── old
│ │ │ ├── System
│ │ │ │ ├── bootup.ts.txt
│ │ │ │ ├── bootup.js
│ │ │ │ ├── Thread.js
│ │ │ │ ├── Thread.ts.txt
│ │ │ │ ├── TypeDefinition.ts.txt
│ │ │ │ ├── Event.ts.txt
│ │ │ │ ├── Event.js
│ │ │ │ ├── TypeDefinition.js
│ │ │ │ ├── Definitions
│ │ │ │ │ ├── Core.HTTPRequest.ts.txt
│ │ │ │ │ ├── Core.Binary.ts.txt
│ │ │ │ │ ├── Core.ControlFlow.ts.txt
│ │ │ │ │ └── Core.Math.ts.txt
│ │ │ │ ├── Table.ts.txt
│ │ │ │ ├── Enum.js
│ │ │ │ ├── Table.js
│ │ │ │ ├── Projects.js
│ │ │ │ ├── Message.ts.txt
│ │ │ │ ├── Projects.ts.txt
│ │ │ │ └── Message.js
│ │ │ └── _references.ts.txt
│ │ ├── tsconfig.json
│ │ ├── TextEditor.ts
│ │ ├── tests
│ │ │ └── tests.ts
│ │ ├── ProjectUI.ts
│ │ ├── Client.ts
│ │ └── TreeView.ts
│ ├── Server
│ │ ├── Server.ts
│ │ └── tsconfig.json
│ └── Shared.ts
│ ├── appsettings.json
│ ├── appsettings.Development.json
│ ├── Models
│ ├── Project.cs
│ ├── ProjectInfo.cs
│ └── Response.cs
│ ├── .JSServer
│ ├── IJSServer.cs
│ ├── IJSContext.cs
│ └── Integrations
│ │ ├── VroomIntegration.cs
│ │ ├── V8DotNetIntegration.cs
│ │ └── ChakraIntegration.cs
│ ├── package.json
│ ├── tsconfig-base.json
│ ├── Dockerfile
│ ├── Properties
│ └── launchSettings.json
│ ├── Program.cs
│ ├── API
│ ├── TemplateController.cs
│ ├── ProjectsController.cs
│ └── FileController.cs
│ ├── package-lock.json
│ ├── ServerScriptManager.cs
│ └── FlowScript.xml
├── .dockerignore
├── readme.txt
├── docker-compose.override.yml
├── .github
└── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── docker-compose.dcproj
├── docker-compose.yml
├── LICENSE
├── .gitattributes
├── FlowScript.sln
└── .gitignore
/Screenshots/Editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/Screenshots/Editor.png
--------------------------------------------------------------------------------
/Screenshots/Types_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/Screenshots/Types_1.png
--------------------------------------------------------------------------------
/Screenshots/Types_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/Screenshots/Types_2.png
--------------------------------------------------------------------------------
/src/FlowScript/libs/v8-x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/libs/v8-x64.dll
--------------------------------------------------------------------------------
/src/FlowScript/libs/v8-x86.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/libs/v8-x86.dll
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .dockerignore
2 | .env
3 | .git
4 | .gitignore
5 | .vs
6 | .vscode
7 | */bin
8 | */obj
9 | **/.toolstarget
--------------------------------------------------------------------------------
/Screenshots/Code Editor (TS).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/Screenshots/Code Editor (TS).png
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/views/Forum.html:
--------------------------------------------------------------------------------
1 |
2 | @{
3 | ViewBag.Title = "Forum";
4 | }
5 |
6 |
Forum goes here. ;)
7 |
8 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/Google Chrome.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/TypeScript/System/Google Chrome.lnk
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/globals.server.ts:
--------------------------------------------------------------------------------
1 | var location: Location;
2 | var navigator: Navigator;
3 | var window: Window;
4 | var document: Document;
--------------------------------------------------------------------------------
/src/FlowScript/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Warning"
5 | }
6 | },
7 | "AllowedHosts": "*"
8 | }
9 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/environments/serverlib.d.ts.fs:
--------------------------------------------------------------------------------
1 | /**
2 | * Back-end server variable - just an idea (testing).
3 | */
4 | declare var server: { name: string };
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjamesnw/FlowScript/HEAD/src/FlowScript/wwwroot/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/fonts/readme.txt:
--------------------------------------------------------------------------------
1 | These fonts are only relevant if `bootstrap.css` (3.0) is loaded from the `wwwroot/css` directory. Boot
2 | If loaded via CDN, then these fonts are ignored.
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Server/Server.ts:
--------------------------------------------------------------------------------
1 | namespace FlowScript {
2 | export class FlowScriptServer extends FlowScriptBase {
3 | y2 = 1;
4 |
5 | main() {
6 |
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/FlowScript/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/tests/simple/Tests.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace FlowScript.Tests {
2 | class Dist2DTest extends Component {
3 | constructor(parent?: NamespaceObject);
4 | onInit(): void;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/environments/empty.ts.fs:
--------------------------------------------------------------------------------
1 | /*
2 | * Enter your TypeScript code here.
3 | *
4 | * Description:
5 | * Create On:
6 | * Created BY:
7 | * Last Updated On:
8 | * Last Updated By:
9 | */
10 |
11 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Shared.ts:
--------------------------------------------------------------------------------
1 | /** The root namespace for the FlowScript system. */
2 | namespace FlowScript {
3 | /** The shared base class for both client and server side scripts. */
4 | export class FlowScriptBase {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/views/NewProjectForm.html:
--------------------------------------------------------------------------------
1 | Project Title:
2 | Project Description:
3 |
4 |
--------------------------------------------------------------------------------
/src/FlowScript/Models/Project.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Mvc;
3 |
4 | namespace FlowScript.API
5 | {
6 | public class Project : APIResponseBase
7 | {
8 | public ProjectInfo Info;
9 |
10 | public string Script;
11 | }
12 | }
--------------------------------------------------------------------------------
/src/FlowScript/.JSServer/IJSServer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace FlowScript
7 | {
8 | public interface IJSServer
9 | {
10 | string Name { get; set; }
11 | IJSContext CreateContext(string name);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/FlowScript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0",
3 | "name": "FlowScript",
4 | "private": true,
5 | "devDependencies": {},
6 | "dependencies": {
7 | "@types/jquery": "^3.3.29",
8 | "@types/requirejs": "^2.1.31",
9 | "monaco-editor": "^0.15.6",
10 | "requirejs": "^2.3.6",
11 | "typescript": "^3.3.3333"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/FlowScript/.JSServer/IJSContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace FlowScript
7 | {
8 | public interface IJSContext
9 | {
10 | string Name { get; }
11 | object Execute(string js, string scriptName = null);
12 | object RunFile(string filename);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/app_forum.ts:
--------------------------------------------------------------------------------
1 | /** this is called when the user selects to view the forum. */
2 | function loadForum() {
3 | rootBodyViewContainer.createView("Forum", "/IDE/Forum").onloaded((view, req, ev) => {
4 | view.buildViews(); // (search and parse views, if any)
5 | view.show();
6 | }).onerror((view, request, ev) => { view.contentElement.innerHTML = "Communication error - please try again."; }).send();
7 | }
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | export_vscode_extensions.cmd - Run to export your current extensions to an install script.
2 | install_extensions.cmd - Generated by running 'export_vscode_extensions.cmd' to allow quick setup of new VS Code environments.
3 |
4 | Helpful Tools:
5 | Git Credential Manager: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/
6 |
7 | Pure HTML5/JS Plugins/Widgets:
8 | https://designmodo.com/free-javascript-plugins/
9 | https://robinparisi.github.io/tingle/
10 |
--------------------------------------------------------------------------------
/src/FlowScript/tsconfig-base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": true,
3 | "compilerOptions": {
4 | "noImplicitAny": true,
5 | "noEmitOnError": true,
6 | "removeComments": false,
7 | "sourceMap": true,
8 | "target": "es3",
9 | "rootDir": "TypeScript",
10 | "outDir": "wwwroot/js",
11 | "declaration": true,
12 | "typeRoots": [ "node_modules/@types", "TypeScript/Types" ]
13 | } //,
14 | //"exclude": [
15 | // "node_modules"
16 | //]
17 | }
18 |
--------------------------------------------------------------------------------
/src/FlowScript/Models/ProjectInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Mvc;
3 |
4 | namespace FlowScript.API
5 | {
6 | /// Holds information about a project in the 'Projects' folder.
7 |
8 | public class ProjectInfo : APIResponseBase
9 | {
10 | public string Name;
11 |
12 | /// This is a GUID assigned to the project when it gets created.
13 | public string ID;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/Runtime/tsconfig.json:
--------------------------------------------------------------------------------
1 | // FlowScript Core
2 | {
3 | "extends": "../../../tsconfig-base.json",
4 | "compilerOptions": {
5 | "composite": true,
6 | "target": "es6", // (Makes sure we take advantage of Node's built-in async functionality.)
7 | "outFile": "../../../wwwroot/js/flowscriptrt.js",
8 | "declaration": true
9 | },
10 | "files": [
11 | "FlowScriptRT.ts"
12 | ],
13 | "exclude": [
14 | "node_modules"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig-base.json",
3 | "references": [
4 | { "path": "../../TypeScript/System/Runtime" },
5 | { "path": "../../TypeScript/System" }
6 | ],
7 | "compilerOptions": {
8 | "target": "es6",
9 | "module": "amd",
10 | "rootDir": "",
11 | "outDir": ""
12 | },
13 | "include": [
14 | //"../js/flowscript.d.ts",
15 | "**/*.ts",
16 | "../../API/Response.cs"
17 | ],
18 | "exclude": [ "old" ]
19 | }
20 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig-base.json",
3 | "references": [
4 | { "path": "../System/Runtime" },
5 | { "path": "../System" }
6 | ],
7 | "compilerOptions": {
8 | "target": "es6",
9 | "module": "none",
10 | "outFile": "./server.js"
11 | },
12 | "files": [
13 | "../System/globals.server.ts",
14 | "../Shared.ts",
15 | "Server.ts"
16 | ],
17 | "include": [
18 | "../../node_modules/typescript/lib/tsserverlibrary.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/docker-compose.override.yml:
--------------------------------------------------------------------------------
1 | version: '3.4'
2 |
3 | services:
4 | flowscript:
5 | environment:
6 | - ASPNETCORE_ENVIRONMENT=Development
7 | - ASPNETCORE_URLS=https://+:443;http://+:80
8 | ports:
9 | - "44300:80"
10 | - "44370:443"
11 | volumes:
12 | - ${APPDATA}/ASP.NET/Https:C:\Users\ContainerUser\AppData\Roaming\ASP.NET\Https:ro
13 | - ${APPDATA}/Microsoft/UserSecrets:C:\Users\ContainerUser\AppData\Roaming\Microsoft\UserSecrets:ro
14 | networks:
15 | default:
16 | external:
17 | name: nat
18 |
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/swagger-ui/swagger-custom.css:
--------------------------------------------------------------------------------
1 | .topbar {
2 | background: #222 !important;
3 | }
4 |
5 | #select { /*Select API Dropdown*/
6 | background: #666 !important;
7 | }
8 |
9 | .download-url-wrapper {
10 | display: none !important;
11 | }
12 |
13 | .url {
14 | display: none !important;
15 | }
16 |
17 | #info a {
18 | color: #007bff !important;
19 | text-decoration: none !important;
20 | }
21 |
22 | #api_info a:hover,
23 | #api_info a:focus,
24 | #api_info a:active {
25 | color: #0056b3 !important;
26 | text-decoration: underline !important;
27 | }
28 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 |
5 | ---
6 |
7 | **Is your feature request related to a problem? Please describe.**
8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9 |
10 | **Describe the solution you'd like**
11 | A clear and concise description of what you want to happen.
12 |
13 | **Describe alternatives you've considered**
14 | A clear and concise description of any alternative solutions or features you've considered.
15 |
16 | **Additional context**
17 | Add any other context or screenshots about the feature request here.
18 |
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/tests/simple/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | FlowScript Tests
6 |
11 |
12 |
13 |
14 |
15 |
16 | FlowScript Tests
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/js/flowscriptrt.tsbuildinfo:
--------------------------------------------------------------------------------
1 | {
2 | "bundle": {
3 | "commonSourceDirectory": "C:/Data/Visual Studio/Projects/Inossis/FlowScript/src/FlowScript/TypeScript/",
4 | "sourceFiles": [
5 | "C:/Data/Visual Studio/Projects/Inossis/FlowScript/src/FlowScript/TypeScript/System/Runtime/FlowScriptRT.ts"
6 | ],
7 | "js": {
8 | "sections": [
9 | {
10 | "pos": 0,
11 | "end": 99351,
12 | "kind": "text"
13 | }
14 | ]
15 | },
16 | "dts": {
17 | "sections": [
18 | {
19 | "pos": 0,
20 | "end": 35227,
21 | "kind": "text"
22 | }
23 | ]
24 | }
25 | },
26 | "version": "3.4.1"
27 | }
--------------------------------------------------------------------------------
/docker-compose.dcproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2.1
5 | Windows
6 | 7466f4f0-9a2c-438b-bab7-476373a703d4
7 | LaunchBrowser
8 | {Scheme}://{ServiceIPAddress}{ServicePort}
9 | flowscript
10 |
11 |
12 |
13 | docker-compose.yml
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/bootup.ts.txt:
--------------------------------------------------------------------------------
1 | namespace FlowScript {
2 | // ========================================================================================================================
3 |
4 | NamespaceObject.All = new Core.All();
5 | NamespaceObject.Inferred = new Core.Inferred();
6 |
7 | // ========================================================================================================================
8 |
9 | /** Contains the default core system types expected by the compiler. Since these core types must always exist, a default
10 | * type graph is created here for convenience.
11 | */
12 | export var System = createNew().System;
13 |
14 | // ========================================================================================================================
15 | }
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.4' #Example http://www.andreavallotti.tech/en/2017/10/using-ef-cores-migration-with-docker-and-mysql/
2 |
3 | services:
4 |
5 | #mysql:
6 | # image: mysql:5.7.18
7 | # container_name: flowscript-mysql
8 | # environment:
9 | # MYSQL_ROOT_PASSWORD: "p4ssw0r#"
10 | # MYSQL_DATABASE: "flowscript"
11 | # volumes:
12 | # - ./mysql-data:/var/lib/mysql
13 | # restart: always
14 | # networks:
15 | # - nat
16 |
17 | flowscript:
18 | image: ${DOCKER_REGISTRY-}flowscript
19 | build:
20 | context: .
21 | dockerfile: src\FlowScript\Dockerfile
22 | #depends_on:
23 | # - mysql
24 | #networks:
25 | # - nat
26 |
27 | #volumes:
28 | #mysql-data:
29 |
30 | #network_mode: "bridge"
31 |
32 | #networks:
33 | #nat:
34 | #driver: bridge
--------------------------------------------------------------------------------
/src/FlowScript/Dockerfile:
--------------------------------------------------------------------------------
1 | #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
2 | #For more information, please see https://aka.ms/containercompat
3 |
4 | FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base
5 | WORKDIR /app
6 | EXPOSE 80
7 | EXPOSE 443
8 |
9 | FROM microsoft/dotnet:2.2-sdk-nanoserver-1803 AS build
10 | WORKDIR /src
11 | COPY ["FlowScript/FlowScript.csproj", "FlowScript/"]
12 | RUN dotnet restore "FlowScript/FlowScript.csproj"
13 | COPY . .
14 | WORKDIR "/src/FlowScript"
15 | RUN dotnet build "FlowScript.csproj" -c Release -o /app
16 |
17 | FROM build AS publish
18 | RUN dotnet publish "FlowScript.csproj" -c Release -o /app
19 |
20 | FROM base AS final
21 | WORKDIR /app
22 | COPY --from=publish /app .
23 | ENTRYPOINT ["dotnet", "FlowScript.dll"]
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig-base.json",
3 | "references": [
4 | { "path": "../System/Runtime" },
5 | { "path": "../System" }
6 | ],
7 | "compilerOptions": {
8 | "target": "es6",
9 | "module": "amd",
10 | "outFile": "../../wwwroot/js/client.js",
11 | "types": [
12 | "requirejs",
13 | "jquery",
14 | "bootstrap"
15 | ]
16 | },
17 | "files": [
18 | "../Shared.ts",
19 | "TreeView.ts",
20 | "TypeTreeView.ts",
21 | "ProjectUI.ts",
22 | "Menu.ts",
23 | "ListEditor.ts",
24 | "TextEditor.ts",
25 | "TextEditor.Monaco.ts",
26 | "ScriptEditor.ts",
27 | "tests/tests.ts",
28 | "Client.ts"
29 | ],
30 | "include": [
31 | "../../node_modules/monaco-editor/monaco.d.ts",
32 | "../../node_modules/typescript/lib/typescriptServices.d.ts"
33 | ],
34 | "exclude": [ "old" ]
35 | }
36 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/bootup.js:
--------------------------------------------------------------------------------
1 | var FlowScript;
2 | (function (FlowScript) {
3 | // ========================================================================================================================
4 | FlowScript.Type.All = new FlowScript.Core.All();
5 | FlowScript.Type.Inferred = new FlowScript.Core.Inferred();
6 | // ========================================================================================================================
7 | /** Contains the default core system types expected by the compiler. Since these core types must always exist, a default
8 | * type graph is created here for convenience.
9 | */
10 | FlowScript.System = FlowScript.createNew().System;
11 | // ========================================================================================================================
12 | })(FlowScript || (FlowScript = {}));
13 | //# sourceMappingURL=bootup.js.map
--------------------------------------------------------------------------------
/src/FlowScript/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "https://localhost:44370/",
7 | "sslPort": 44370
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "FlowScript": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "https://localhost:5001;http://localhost:5000"
25 | },
26 | "Docker": {
27 | "commandName": "Docker",
28 | "launchBrowser": true,
29 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}"
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 |
5 | ---
6 |
7 | **Describe the bug**
8 | A clear and concise description of what the bug is.
9 |
10 | **To Reproduce**
11 | Steps to reproduce the behavior:
12 | 1. Go to '...'
13 | 2. Click on '....'
14 | 3. Scroll down to '....'
15 | 4. See error
16 |
17 | **Expected behavior**
18 | A clear and concise description of what you expected to happen.
19 |
20 | **Screenshots**
21 | If applicable, add screenshots to help explain your problem.
22 |
23 | **Desktop (please complete the following information):**
24 | - OS: [e.g. iOS]
25 | - Browser [e.g. chrome, safari]
26 | - Version [e.g. 22]
27 |
28 | **Smartphone (please complete the following information):**
29 | - Device: [e.g. iPhone6]
30 | - OS: [e.g. iOS8.1]
31 | - Browser [e.g. stock browser, safari]
32 | - Version [e.g. 22]
33 |
34 | **Additional context**
35 | Add any other context about the problem here.
36 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/TextEditor.ts:
--------------------------------------------------------------------------------
1 | // A wrapper for the ACE editor for use with editing code on the UI.
2 |
3 | namespace FlowScript.UI {
4 | export class TextEditor {
5 |
6 | /** The view the editor is on, if any. */
7 | view: View;
8 |
9 | /** The target element to render the editor in (usually a DIV block). */
10 | target: HTMLElement;
11 |
12 | constructor(view: View, target: string | HTMLElement) {
13 | this.view = view;
14 |
15 | if (!target)
16 | throw "A target is required for the editor UI.";
17 |
18 | this.target = target instanceof HTMLElement ? target : view.getElementById(target);
19 | }
20 |
21 | /**
22 | * Once the text editor is constructed, call this when ready to initialize the editor for the first time before use.
23 | * In some cases, this may trigger loading of other dependencies for derived types.
24 | */
25 | initialize(ready?: () => void): void { if (ready) ready(); }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/Thread.js:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | var FlowScript;
3 | (function (FlowScript) {
4 | // ========================================================================================================================
5 | /** A thread wraps a single script block.
6 | * One script can have many threads.
7 | */
8 | var Thread = /** @class */ (function () {
9 | // --------------------------------------------------------------------------------------------------------------------
10 | function Thread(parent) {
11 | this._parent = parent;
12 | }
13 | return Thread;
14 | }());
15 | FlowScript.Thread = Thread;
16 | // ========================================================================================================================
17 | })(FlowScript || (FlowScript = {}));
18 | // ############################################################################################################################
19 | //# sourceMappingURL=thread.js.map
--------------------------------------------------------------------------------
/src/FlowScript/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.AspNetCore.Server.Kestrel.Core;
9 | using Microsoft.Extensions.Configuration;
10 | using Microsoft.Extensions.Logging;
11 | using VroomJs;
12 |
13 | namespace FlowScript
14 | {
15 | public class Program
16 | {
17 | public static void Main(string[] args)
18 | {
19 | AssemblyLoader.EnsureLoaded(); // windows only
20 |
21 | CreateWebHostBuilder(args).Build().Run();
22 | }
23 |
24 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
25 | WebHost.CreateDefaultBuilder(args)
26 | //.UseKestrel() // Request Filtering: https://stackoverflow.com/questions/51773340/asp-net-core-api-404-not-found-master
27 | //.UseWebRoot(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"))
28 | //.UseContentRoot(Directory.GetCurrentDirectory())
29 | //.UseApplicationInsights()
30 | .UseStartup();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/tests/tests.ts:
--------------------------------------------------------------------------------
1 | namespace FlowScript.Tests {
2 | export function populateProject(project: FlowScript.UI.ProjectUI) {
3 | var fs = project.script;
4 | var appNS = fs.System.add("Tests");
5 |
6 | fs.Main.defineDefaultReturnVar();
7 |
8 | fs.Main.defineLocalVar("x", [fs.System.Double]),
9 | fs.Main.defineLocalVar("y", [fs.System.Double]);
10 |
11 | var line = fs.Main.block.newLine();
12 | var statement = line.addStatement(fs.System.ControlFlow.Loop, {
13 | 0: new Block(fs.Main).newLine().addStatement(fs.System.Assign, { 0: fs.Main.getProperty("x").createExpression(), 1: new Constant(0) })
14 | .block.newLine().addStatement(fs.System.Assign, { 0: fs.Main.getProperty("y").createExpression(), 1: new Constant(0) }).block.createExpression(),
15 | 1: new ComponentReference(fs.System.Comparison.LessThan, { 0: fs.Main.getProperty("x").createExpression(), 1: new Constant(10) }),
16 | 2: new Block(fs.Main).newLine().addStatement(fs.System.PostDecrement, { 0: fs.Main.getProperty("y").createExpression() }).block.createExpression(),
17 | 3: new Block(fs.Main).newLine().addStatement(fs.System.PreIncrement, { 0: fs.Main.getProperty("x").createExpression() }).block.createExpression(),
18 | });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/Thread.ts:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript {
4 | // ========================================================================================================================
5 |
6 | /** A thread wraps a single script block.
7 | * One script can have many threads.
8 | */
9 | export class Thread {
10 | // --------------------------------------------------------------------------------------------------------------------
11 |
12 | private _parent: IFlowScript;
13 | private _block: Block;
14 |
15 | // --------------------------------------------------------------------------------------------------------------------
16 |
17 | constructor(parent: IFlowScript) {
18 | this._parent = parent;
19 | }
20 |
21 | // --------------------------------------------------------------------------------------------------------------------
22 | }
23 |
24 | // ========================================================================================================================
25 | }
26 |
27 | // ############################################################################################################################
28 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/Thread.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript {
4 | // ========================================================================================================================
5 |
6 | /** A thread wraps a single script block.
7 | * One script can have many threads.
8 | */
9 | export class Thread {
10 | // --------------------------------------------------------------------------------------------------------------------
11 |
12 | private _parent: IFlowScript;
13 | private _block: Block;
14 |
15 | // --------------------------------------------------------------------------------------------------------------------
16 |
17 | constructor(parent: IFlowScript) {
18 | this._parent = parent;
19 | }
20 |
21 | // --------------------------------------------------------------------------------------------------------------------
22 | }
23 |
24 | // ========================================================================================================================
25 | }
26 |
27 | // ############################################################################################################################
28 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/tsconfig.json:
--------------------------------------------------------------------------------
1 | // FlowScript Core
2 | {
3 | "extends": "../../tsconfig-base.json",
4 | "references": [
5 | { "path": "Runtime" }
6 | ],
7 | "compilerOptions": {
8 | "composite": true,
9 | "target": "es6", // (Makes sure we take advantage of Node's built-in async functionality.)
10 | "outFile": "../../wwwroot/js/flowscript.js",
11 | "declaration": true
12 | },
13 | "files": [
14 | "EventDispatcher.ts",
15 | "NamespaceObject.ts",
16 | "NamedReference.ts",
17 | "User.ts",
18 | "Security.ts",
19 | "FileManager.ts",
20 | "FlowScriptMain.ts",
21 | "Expressions.ts",
22 | "Property.ts",
23 | "Component.ts",
24 | "Statement.ts",
25 | "Block.ts",
26 | "Line.ts",
27 | "Enum.ts",
28 | "Event.ts",
29 | "Message.ts",
30 | "Table.ts",
31 | "Thread.ts",
32 | "Components/Core.ts",
33 | "Components/Core.HTTPRequest.ts",
34 | "Components/Core.ControlFlow.ts",
35 | "Components/Core.Math.ts",
36 | "Components/Core.Binary.ts",
37 | "Components/Core.Comparison.ts",
38 | "Components/Core.DOM.ts",
39 | "Components/Core.HTML.ts",
40 | "Compiler.ts",
41 | "Simulator.ts",
42 | "Visualtree.ts",
43 | "Views.ts",
44 | "Project.ts",
45 | "Solution.ts",
46 | "System.ts",
47 | "bootup.ts" // This MUST be LAST.
48 | ],
49 | "exclude": [
50 | "node_modules"
51 | ]
52 | }
53 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/TypeDefinition.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript {
4 | // ========================================================================================================================
5 |
6 | export interface ISavedTypeDefinition extends ISavedComponent { }
7 |
8 | // ========================================================================================================================
9 |
10 | /** Defines a single type within the system. */
11 | export class TypeDefinition extends Component {
12 | /** Instance variables for this component. */
13 | get instanceProperties() { return this._instanceProperties; }
14 | protected _instanceProperties = new PropertyCollection(this); // (holds vars that get rendered as object instance-based properties; these are completely separate from parameters and local vars, which are viewed together as one big list)
15 |
16 | constructor(parent: NamespaceObject, componentType: ComponentTypes, typeName: string, signatureTitle: string, script?: IFlowScript) {
17 | super(parent, componentType, typeName, signatureTitle, script);
18 | }
19 | }
20 |
21 | // ========================================================================================================================
22 | }
23 |
24 | // ############################################################################################################################
25 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/bootup.ts:
--------------------------------------------------------------------------------
1 | namespace FlowScript {
2 | // ========================================================================================================================
3 |
4 | /** The current FlowScript version. */
5 | export var version = "0.0.1";
6 |
7 | NamespaceObject.All = new Core.All();
8 | NamespaceObject.Inferred = new Core.Inferred();
9 |
10 | // ========================================================================================================================
11 |
12 | /** Contains the default core system types expected by the compiler. Since these core types must always exist, a default
13 | * type graph is created here for convenience.
14 | */
15 | export var System = createNew().System;
16 |
17 | // ============================================================================================================================
18 |
19 | if (typeof navigator != 'undefined' && navigator.userAgent)
20 | if (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0 || navigator.userAgent.indexOf("Edge") >= 0)
21 | console.log("-=< FlowScript - v" + FlowScript.version + " >=- ");
22 | else
23 | console.log("%c -=< %cFlowScript - v" + FlowScript.version + " %c>=- ", "background: #000; color: lightblue; font-weight:bold", "background: #000; color: yellow; font-style:italic; font-weight:bold", "background: #000; color: lightblue; font-weight:bold");
24 |
25 | // ========================================================================================================================
26 | }
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/_references.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 | ///
10 | ///
11 | ///
12 | ///
13 | ///
14 | ///
15 | ///
16 | ///
17 | ///
18 | ///
19 | ///
20 | ///
21 | ///
22 | ///
23 | ///
24 | ///
25 | ///
26 | ///
27 | ///
28 | // ############################################################################################################################
29 |
--------------------------------------------------------------------------------
/src/FlowScript/API/TemplateController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Mvc;
3 |
4 | namespace FlowScript.API
5 | {
6 | ///// DO NOT USE THIS. It is here only to be copied from as a convenient template when creating API controllers.
7 | //[Route("api/[controller]")]
8 | //public class Template_Controller_ : ControllerBase // (ControllerBase instead of Controller for APIs only)
9 | //{
10 | // // GET api/values
11 | // [HttpGet]
12 | // public APIResponse Get()
13 | // {
14 | // return "Works!";
15 | // }
16 |
17 | // // GET api/values/5
18 | // [HttpGet("{id}")]
19 | // public APIResponse Get(int id)
20 | // {
21 | // return "Value is " + id;
22 | // }
23 |
24 | // // POST api/values
25 | // [HttpPost]
26 | // public APIResponse Post([FromBody]string value)
27 | // {
28 | // return APIResponse.OK;
29 | // }
30 |
31 | // // PUT api/values/5
32 | // [HttpPut("{id}")]
33 | // public APIResponse Put(int id, [FromBody]string value)
34 | // {
35 | // return APIResponse.OK;
36 | // }
37 |
38 | // // PATCH api/values/5
39 | // [HttpPatch("{id}")]
40 | // public APIResponse Patch(int id, [FromBody]string value)
41 | // {
42 | // return APIResponse.OK;
43 | // }
44 |
45 | // // DELETE api/values/5
46 | // [HttpDelete("{id}")]
47 | // public APIResponse Delete(int id)
48 | // {
49 | // return APIResponse.OK;
50 | // }
51 | //}
52 | }
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/editor.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | FlowScript v0.0.1 - Editor
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/FlowScript/API/ProjectsController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Mvc;
3 |
4 | namespace FlowScript.API
5 | {
6 | /// A controller for handling projects.
7 | ///
8 | [Route("api/[controller]")]
9 | public class ProjectsController : ControllerBase
10 | {
11 | // Returns a list of project names and IDs.
12 | [HttpGet]
13 | public IEnumerable Get() // Read
14 | {
15 | return new[] { new ProjectInfo { Name = "Test 1", ID = "1" }, new ProjectInfo { Name = "Test 2", ID = "2" } };
16 | }
17 |
18 | // GET api/values/5
19 | [HttpGet("{id}")]
20 | public ProjectInfo Get(int id) // Read
21 | {
22 | return new ProjectInfo { Name = "Test " + id, ID = "" + id };
23 | }
24 |
25 | // POST api/values
26 | [HttpPost]
27 | public APIResponse Post([FromBody]string value) // Create
28 | {
29 | return APIResponse.OK;
30 | }
31 |
32 | // PUT api/values/5
33 | [HttpPut("{id}")]
34 | public APIResponse Put(int id, [FromBody]string value) // Update/Replace
35 | {
36 | return APIResponse.OK;
37 | }
38 |
39 | //// PUT api/values/5
40 | //[HttpPatch("{id}")]
41 | //public APIResponse Patch(int id, [FromBody]string value) // Update/Modify
42 | //{
43 | // return APIResponse.OK;
44 | //}
45 |
46 | // DELETE api/values/5
47 | [HttpDelete("{id}")]
48 | public APIResponse Delete(int id) // Delete
49 | {
50 | return APIResponse.OK;
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/_references.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | /////
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 | ///
10 | ///
11 | ///
12 | ///
13 | ///
14 | ///
15 | ///
16 | ///
17 | ///
18 | ///
19 | ///
20 | ///
21 | ///
22 | ///
23 | ///
24 | ///
25 | ///
26 | ///
27 | ///
28 | ///
29 | ///
30 | ///
31 | ///
32 | // ############################################################################################################################
33 | // This MUST be LAST.
34 | ///
35 | // ############################################################################################################################
36 |
--------------------------------------------------------------------------------
/src/FlowScript/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "FlowScript",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@types/jquery": {
8 | "version": "3.3.29",
9 | "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.29.tgz",
10 | "integrity": "sha512-FhJvBninYD36v3k6c+bVk1DSZwh7B5Dpb/Pyk3HKVsiohn0nhbefZZ+3JXbWQhFyt0MxSl2jRDdGQPHeOHFXrQ==",
11 | "requires": {
12 | "@types/sizzle": "*"
13 | }
14 | },
15 | "@types/requirejs": {
16 | "version": "2.1.31",
17 | "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz",
18 | "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw=="
19 | },
20 | "@types/sizzle": {
21 | "version": "2.3.2",
22 | "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz",
23 | "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg=="
24 | },
25 | "monaco-editor": {
26 | "version": "0.15.6",
27 | "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.15.6.tgz",
28 | "integrity": "sha512-JoU9V9k6KqT9R9Tiw1RTU8ohZ+Xnf9DMg6Ktqqw5hILumwmq7xqa/KLXw513uTUsWbhtnHoSJYYR++u3pkyxJg=="
29 | },
30 | "requirejs": {
31 | "version": "2.3.6",
32 | "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
33 | "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg=="
34 | },
35 | "typescript": {
36 | "version": "3.3.3333",
37 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3333.tgz",
38 | "integrity": "sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw=="
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/Event.ts:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript {
4 | // ========================================================================================================================
5 |
6 | export interface ISavedEvent extends ISavedComponent { }
7 |
8 | // ========================================================================================================================
9 |
10 | /** Represents a single component event.
11 | * The premise behind components is that they are built assuming normal code flow; however, things do go wrong at times,
12 | * and when something does go wrong, an event is raised which developers can use to execute a handler block.
13 | */
14 | export class FSEvent extends Component {
15 | // --------------------------------------------------------------------------------------------------------------------
16 |
17 | constructor(parent: Component, name: string) {
18 | super(parent, ComponentTypes.Functional, name, name);
19 | }
20 |
21 | // --------------------------------------------------------------------------------------------------------------------
22 |
23 | save(target?: ISavedEvent): ISavedEvent {
24 | target = target || {};
25 |
26 | super.save(target);
27 |
28 | return target;
29 | }
30 |
31 | // --------------------------------------------------------------------------------------------------------------------
32 | }
33 |
34 | // ========================================================================================================================
35 | }
36 |
37 | // ############################################################################################################################
38 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/Event.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript {
4 | // ========================================================================================================================
5 |
6 | export interface ISavedEvent extends ISavedComponent { }
7 |
8 | // ========================================================================================================================
9 |
10 | /** Represents a single component event.
11 | * The premise behind components is that they are built assuming normal code flow; however, things do go wrong at times,
12 | * and when something does go wrong, an event is raised which developers can use to execute a handler block.
13 | */
14 | export class FSEvent extends Component {
15 | // --------------------------------------------------------------------------------------------------------------------
16 |
17 | constructor(parent: Component, name: string) {
18 | super(parent, ComponentTypes.Functional, name, name);
19 | }
20 |
21 | // --------------------------------------------------------------------------------------------------------------------
22 |
23 | save(target?: ISavedEvent): ISavedEvent {
24 | target = target || {};
25 |
26 | super.save(target);
27 |
28 | return target;
29 | }
30 |
31 | // --------------------------------------------------------------------------------------------------------------------
32 | }
33 |
34 | // ========================================================================================================================
35 | }
36 |
37 | // ############################################################################################################################
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2019 Inossis
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software (aka IDE, or Integrated Development Environment) and associated documentation files (the "Software"), to copy, modify, merge, distribute, the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | 1. This copyright notice and this permission notice shall be included in all copies or substantial portions of the Software, including any derivative works.
6 |
7 | 2. You must not sub-license and/or sell copies of this software.
8 |
9 | 3. If you make changes to the software you must state that you made the changes and make the source code to the derivative works available for download on-line - or optionally as a pull request to help improve the original work.
10 |
11 | 4. While the software is free to use, you understand that the component market place (not available yet) may have subscription costs by various parties (not free). All core components of the IDE itself will be free all the time. The IDE must always provide the ability to replicate any 3rd-party components by oneself without cost.
12 |
13 | 5. Any 3rd-party components must also be compatible with the original software.
14 |
15 | 6. We reserve the right to update this license as needed.
16 |
17 | The final "compiled" product that is published by the software can be for commercial or non-commercial use. This license only covers the software itself and all related files within the repository.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/src/FlowScript/wwwroot/css/site.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Glyphicons Halflings';
3 | src: url('../fonts/glyphicons-halflings-regular.eot');
4 | src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
5 | }
6 |
7 | body {
8 | font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
9 | padding-top: 50px;
10 | padding-bottom: 20px;
11 | background-color: #f8f8f8;
12 | font-size: 13pt;
13 | }
14 |
15 | /* Set padding to keep content from hitting the edges */
16 | .body-content {
17 | padding-left: 15px;
18 | padding-right: 15px;
19 | }
20 |
21 | h1 {
22 | font-size: 20pt;
23 | }
24 |
25 | h2 {
26 | font-size: 20pt;
27 | }
28 |
29 | h3 {
30 | font-size: 20pt;
31 | }
32 |
33 | /* Set width on the form input elements since they're 100% wide by default */
34 | /*input,
35 | select,
36 | textarea {
37 | max-width: 280px;
38 | }*/
39 |
40 | .navbar a:hover {
41 | cursor: pointer;
42 | }
43 |
44 | /*.noselect {
45 | -webkit-touch-callout: none;
46 | -webkit-user-select: none;
47 | -khtml-user-select: none;
48 | -moz-user-select: none;
49 | -ms-user-select: none;
50 | -o-user-select: none;
51 | user-select: none;
52 | cursor: default;
53 | }*/
54 |
55 | /* Some Bootstrap modifications are needed to allow updating of content hidden behind non-visible panels. */
56 |
57 | .tab-content > .tab-pane.active {
58 | position: relative;
59 | pointer-events: auto;
60 | left: auto;
61 | /*left: -9999px;*/
62 | /*-webkit-transition: display 0.15s linear;
63 | transition: display 0.15s linear;
64 | -webkit-transition: display 0.15s linear;
65 | transition: display 0.15s linear;*/
66 | }
67 |
68 | .tab-content > .tab-pane {
69 | display: block;
70 | position: absolute;
71 | pointer-events: none;
72 | left: -9999px;
73 | }
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/Event.js:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | var __extends = (this && this.__extends) || (function () {
3 | var extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return function (d, b) {
7 | extendStatics(d, b);
8 | function __() { this.constructor = d; }
9 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10 | };
11 | })();
12 | var FlowScript;
13 | (function (FlowScript) {
14 | // ========================================================================================================================
15 | // ========================================================================================================================
16 | /** Represents a single component event.
17 | * The premise behind components is that they are built assuming normal code flow; however, things do go wrong at times,
18 | * and when something does go wrong, an event is raised which developers can use to execute a handler block.
19 | */
20 | var FSEvent = /** @class */ (function (_super) {
21 | __extends(FSEvent, _super);
22 | // --------------------------------------------------------------------------------------------------------------------
23 | function FSEvent(parent, name) {
24 | return _super.call(this, parent, FlowScript.ComponentTypes.Functional, name, name) || this;
25 | }
26 | // --------------------------------------------------------------------------------------------------------------------
27 | FSEvent.prototype.save = function (target) {
28 | target = target || {};
29 | _super.prototype.save.call(this, target);
30 | return target;
31 | };
32 | return FSEvent;
33 | }(FlowScript.Component));
34 | FlowScript.FSEvent = FSEvent;
35 | // ========================================================================================================================
36 | })(FlowScript || (FlowScript = {}));
37 | // ############################################################################################################################
38 | //# sourceMappingURL=Event.js.map
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/TypeDefinition.js:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | var __extends = (this && this.__extends) || (function () {
3 | var extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return function (d, b) {
7 | extendStatics(d, b);
8 | function __() { this.constructor = d; }
9 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10 | };
11 | })();
12 | var FlowScript;
13 | (function (FlowScript) {
14 | // ========================================================================================================================
15 | // ========================================================================================================================
16 | /** Represents a single component event.
17 | * The premise behind components is that they are built assuming normal code flow; however, things do go wrong at times,
18 | * and when something does go wrong, an event is raised which developers can use to execute a handler block.
19 | */
20 | var FSEvent = /** @class */ (function (_super) {
21 | __extends(FSEvent, _super);
22 | // --------------------------------------------------------------------------------------------------------------------
23 | function FSEvent(parent, name) {
24 | return _super.call(this, parent, FlowScript.ComponentTypes.Functional, name, name) || this;
25 | }
26 | // --------------------------------------------------------------------------------------------------------------------
27 | FSEvent.prototype.save = function (target) {
28 | target = target || {};
29 | _super.prototype.save.call(this, target);
30 | return target;
31 | };
32 | return FSEvent;
33 | }(FlowScript.Component));
34 | FlowScript.FSEvent = FSEvent;
35 | // ========================================================================================================================
36 | })(FlowScript || (FlowScript = {}));
37 | // ############################################################################################################################
38 | //# sourceMappingURL=Event.js.map
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/components/Core.HTTPRequest.ts:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript.Core.Net.HTTPRequest {
4 | // ========================================================================================================================
5 | // Message ID Constants
6 |
7 | export var MSG_LOADFAILED = "LoadFailed";
8 |
9 | // ========================================================================================================================
10 |
11 | /** A line represents a single execution step in a code component.
12 | */
13 | export class HTTPRequest extends Component {
14 | constructor(parent: NamespaceObject) {
15 | super(parent, ComponentTypes.Functional, "LoadFromURL", "Load from url: $url, using method: $method"); // Note: '$method' will be preset to the value '(default)' to the developer.
16 | }
17 |
18 | onInit() {
19 | var script = this.script;
20 |
21 | // Register some global types:
22 |
23 | var HTTPRequestMethods = new Enum(script.System, "HTTPRequestMethods").setValue("GET", "GET").setValue("POST", "POST");
24 |
25 | // Setup the expected parameters:
26 |
27 | this.defineParameter("url", [script.System.String], "", "^(\w+:\/\/)?((?:\w*):(?:\w*)@)?((?:\w+)(?:\.\w+)*)?((?:\/[-_a-zA-Z0-9.~!$&'()*+,;=:@%]+)*\/?)?(\?\w+=.*)?(#.*)?$");
28 | this.defineLocalVar("method", [HTTPRequestMethods], "GET", undefined, true);
29 | this.defineReturnVar("data", script.System.String);
30 | var evtError = this.registerEvent("error");
31 | var evtAbort = this.registerEvent("abort");
32 | var evtError = this.registerEvent("timeout");
33 |
34 | // Setup some messages
35 |
36 | script.registerMessage("Load failed: $0", MSG_LOADFAILED);
37 |
38 | // Set the component's script:
39 | //?this.addStatement(new CustomJS(this, "Get XHR Object", function HTTPRequest(ctx: RuntimeContext): any {
40 | //?}));
41 |
42 | super.onInit();
43 | }
44 | }
45 |
46 | // ========================================================================================================================
47 | }
48 |
49 | // ############################################################################################################################
50 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/Definitions/Core.HTTPRequest.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 |
3 | namespace FlowScript.Core.Net.HTTPRequest {
4 | // ========================================================================================================================
5 | // Message ID Constants
6 |
7 | export var MSG_LOADFAILED = "LoadFailed";
8 |
9 | // ========================================================================================================================
10 |
11 | /** A line represents a single execution step in a code component.
12 | */
13 | export class HTTPRequest extends Component {
14 | constructor(parent: TypeDefinition) {
15 | super(parent, ComponentTypes.Functional, "LoadFromURL", "Load from url: $url, using method: $method"); // Note: '$method' will be preset to the value '(default)' to the developer.
16 | }
17 |
18 | init() {
19 | var script = this.script;
20 |
21 | // Register some global types:
22 |
23 | var HTTPRequestMethods = new Enum(script.System, "HTTPRequestMethods").setValue("GET", "GET").setValue("POST", "POST");
24 |
25 | // Setup the expected parameters:
26 |
27 | this.defineParameter("url", [script.System.String], "", "^(\w+:\/\/)?((?:\w*):(?:\w*)@)?((?:\w+)(?:\.\w+)*)?((?:\/[-_a-zA-Z0-9.~!$&'()*+,;=:@%]+)*\/?)?(\?\w+=.*)?(#.*)?$");
28 | this.defineLocalVar("method", [HTTPRequestMethods], "GET", undefined, true);
29 | this.defineReturnVar("data", script.System.String);
30 | var evtError = this.registerEvent("error");
31 | var evtAbort = this.registerEvent("abort");
32 | var evtError = this.registerEvent("timeout");
33 |
34 | // Setup some messages
35 |
36 | script.registerMessage("Load failed: $0", MSG_LOADFAILED);
37 |
38 | // Set the component's script:
39 | //?this.addStatement(new CustomJS(this, "Get XHR Object", function HTTPRequest(ctx: RuntimeContext): any {
40 | //?}));
41 |
42 | super.init();
43 | }
44 | }
45 |
46 | // ========================================================================================================================
47 | }
48 |
49 | // ############################################################################################################################
50 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/Table.ts:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | // Data Tables
3 |
4 | namespace FlowScript {
5 | // ========================================================================================================================
6 |
7 | export enum ColumnAccessLevels {
8 | /** The column can be read from, and written to. */
9 | ReadWrite,
10 | /** The column cannot be updated. */
11 | ReadOnly,
12 | /** The column is treated as if it doesn't exist. */
13 | Hidden
14 | }
15 |
16 | export class Column {
17 | get name(): string { return this._name; }
18 | private _name: string;
19 |
20 | get type(): NamespaceObject { return this._type; }
21 | private _type: NamespaceObject;
22 |
23 | get accessLevel(): ColumnAccessLevels { return this._accessLevel; }
24 | private _accessLevel: ColumnAccessLevels = ColumnAccessLevels.ReadWrite;
25 | }
26 |
27 | export class Row {
28 | [index: number]: any;
29 | }
30 |
31 | /** Represents a structure of data, much like a class.
32 | * Tables exist to replace the concept of class instances in many other languages. In most cases, programmers create
33 | * methods/functions to operate on either a data structure (object with properties), or data returned from a database.
34 | * To mimic classes, a table with one row is created, where the columns are the properties. As well, columns can be
35 | * flagged as readonly,
36 | */
37 | export class Table extends NamespaceObject {
38 | // --------------------------------------------------------------------------------------------------------------------
39 |
40 | private _super: Table; // (the "super class" table to this table - allows for inheritance)
41 |
42 | private _columns: Column[] = [];
43 | private _rows: Row[] = [];
44 |
45 | // --------------------------------------------------------------------------------------------------------------------
46 |
47 | constructor(parent: NamespaceObject, tableName: string) {
48 | super(parent, tableName);
49 | }
50 |
51 | // --------------------------------------------------------------------------------------------------------------------
52 | }
53 |
54 | // ========================================================================================================================
55 | }
56 |
57 | // ############################################################################################################################
58 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/Client/old/System/Table.ts.txt:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | // Data Tables
3 |
4 | namespace FlowScript {
5 | // ========================================================================================================================
6 |
7 | export enum ColumnAccessLevels {
8 | /** The column can be read from, and written to. */
9 | ReadWrite,
10 | /** The column cannot be updated. */
11 | ReadOnly,
12 | /** The column is treated as if it doesn't exist. */
13 | Hidden
14 | }
15 |
16 | export class Column {
17 | get name(): string { return this._name; }
18 | private _name: string;
19 |
20 | get type(): NamespaceObject { return this._type; }
21 | private _type: NamespaceObject;
22 |
23 | get accessLevel(): ColumnAccessLevels { return this._accessLevel; }
24 | private _accessLevel: ColumnAccessLevels = ColumnAccessLevels.ReadWrite;
25 | }
26 |
27 | export class Row {
28 | [index: number]: any;
29 | }
30 |
31 | /** Represents a structure of data, much like a class.
32 | * Tables exist to replace the concept of class instances in many other languages. In most cases, programmers create
33 | * methods/functions to operate on either a data structure (object with properties), or data returned from a database.
34 | * To mimic classes, a table with one row is created, where the columns are the properties. As well, columns can be
35 | * flagged as readonly,
36 | */
37 | export class Table extends NamespaceObject {
38 | // --------------------------------------------------------------------------------------------------------------------
39 |
40 | private _super: Table; // (the "super class" table to this table - allows for inheritance)
41 |
42 | private _columns: Column[] = [];
43 | private _rows: Row[] = [];
44 |
45 | // --------------------------------------------------------------------------------------------------------------------
46 |
47 | constructor(parent: NamespaceObject, tableName: string) {
48 | super(parent, tableName);
49 | }
50 |
51 | // --------------------------------------------------------------------------------------------------------------------
52 | }
53 |
54 | // ========================================================================================================================
55 | }
56 |
57 | // ############################################################################################################################
58 |
--------------------------------------------------------------------------------
/src/FlowScript/TypeScript/System/User.ts:
--------------------------------------------------------------------------------
1 | // ############################################################################################################################
2 | // Data Tables
3 |
4 | namespace FlowScript {
5 | // ========================================================================================================================
6 |
7 | /** The current user of the FlowScript system.
8 | * The user 'id' (a GUID) is used as the root directory for projects.
9 | */
10 | export class User extends TrackableObject {
11 |
12 | /** Returns the current user object. */
13 | static get current() { return _currentUser; }
14 |
15 | /** Triggered when the current user is about to change. If any handler returns false then the request is cancelled (such as if the current project is not saved yet). */
16 | static readonly onCurrentUserChanging = new EventDispatcher boolean>(User);
17 |
18 | /** Triggered when the current user has changed. This event cannot be cancelled - use the 'onCurrentUserChanging' event for that. */
19 | static readonly onCurrentUserChanged = new EventDispatcher void>(User, false, false);
20 |
21 | /** Starts the process of changing the current user. */
22 | static async changeCurrentUser(user: User) {
23 | return new Promise((resolve, reject) => {
24 | this.onCurrentUserChanging.triggerAsync(_currentUser, user)
25 | .then(() => this.onCurrentUserChanged.triggerAsync(_currentUser, user), reject) // (any exception in the previous promise will trigger 'reject')
26 | .then(resolve, reject); // (any exception in the previous 'then' will trigger 'reject')
27 | });
28 | }
29 |
30 | /** Holds a mapping of this user ID to global roles associated with the user. */
31 | readonly _security = new UserAccess();
32 |
33 | /** Scripts owned by this user. */
34 | scripts: IFlowScript[] = [];
35 |
36 | constructor(
37 | public email: string,
38 | public firstname?: string,
39 | public lastname?: string
40 | ) { super(); }
41 | }
42 |
43 | // ========================================================================================================================
44 |
45 | var _currentUser = new User("");
46 |
47 | // ========================================================================================================================
48 | }
49 |
50 | // ############################################################################################################################
51 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/src/FlowScript/Models/Response.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Mvc;
3 |
4 | namespace FlowScript.API
5 | {
6 | // ########################################################################################################################
7 |
8 | public interface IAPIResponseBase
9 | {
10 | string Type { get; }
11 | bool Success { get; set; }
12 | }
13 |
14 | /// A based class for all responses.
15 | public abstract class APIResponseBase : IAPIResponseBase
16 | {
17 | public string Type { get; set; }
18 | public bool Success { get; set; }
19 |
20 | public APIResponseBase(bool success = true) { Type = GetType().Name; Success = success; }
21 | }
22 |
23 | // ########################################################################################################################
24 |
25 | public interface IAPIResponse : IAPIResponseBase
26 | {
27 | string Message { get; set; }
28 | }
29 |
30 | public class APIResponse : APIResponseBase, IAPIResponse
31 | {
32 | public static APIResponse OK = new APIResponse();
33 |
34 | /// A message, usually when there's an error.
35 | public string Message { get; set; }
36 |
37 | public APIResponse(string message = null, bool success = true) : base(success) { Message = message; }
38 |
39 | public static implicit operator APIResponse(string s) => new APIResponse(s);
40 | }
41 |
42 | // ########################################################################################################################
43 |
44 | public interface IDataResponse : IAPIResponse
45 | {
46 | object Data { get; set; }
47 | }
48 |
49 | public class DataResponse : APIResponse, IDataResponse
50 | {
51 | public T Data;
52 |
53 | object IDataResponse.Data { get => Data; set => Data = (T)value; }
54 |
55 | public DataResponse(T data = default(T), bool success = true, string message = null) : base(message, success) { Data = data; }
56 | public DataResponse(string errorMessage) : base(errorMessage, false) { Success = false; }
57 |
58 | public static implicit operator DataResponse(T d) => new DataResponse(d);
59 | }
60 |
61 | // ########################################################################################################################
62 |
63 | public static class ResponseExtensions
64 | {
65 | public static DataResponse AsResponse(this T v) => new DataResponse(v);
66 | public static DataResponse