7 Commits

Author SHA1 Message Date
Eric Tuvesson
94dd3dbf0e chore: bump version (#62) 2024-08-08 21:27:12 +02:00
Eric Tuvesson
c593a134b3 chore: rename project name (#60) 2024-08-08 21:23:23 +02:00
Eric Tuvesson
dc638ea8fc feat: Upgrade Electron (#61) 2024-08-08 21:12:39 +02:00
Eric Tuvesson
759c8a0030 fix(runtime): Column node, hide children on calculation (#59)
This removes the initial visible layout shift
2024-07-24 15:59:10 +02:00
Eric Tuvesson
aea80c6586 feat(runtime): Add capture attribute on Open File Picker node (#57)
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#capture
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture
2024-07-19 15:03:03 +02:00
Eric Tuvesson
46e2efa576 feat(runtime): Add "Switched" signal output on the Switch node (#58) 2024-07-19 15:02:49 +02:00
Eric Tuvesson
c508e15546 chore: clean up user nodes (#53) 2024-07-15 15:21:01 +02:00
14 changed files with 245 additions and 332 deletions

View File

@@ -1,15 +1,15 @@
name: Build noodl-editor
name: Build fluxscape-editor
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow from another workflow
workflow_call:
# release:
# types: [created]
jobs:
build_noodl_editor:
runs-on: ${{ matrix.os }}
@@ -32,11 +32,11 @@ jobs:
platform: linux-x64
steps:
- if: ${{ matrix.platform == 'darwin-arm64' }}
- if: ${{ matrix.platform == 'darwin-arm64' }}
name: Setup
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.11'
- name: Checkout
uses: actions/checkout@v4
@@ -72,6 +72,6 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: noodl-editor-${{ matrix.platform }}-${{ github.head_ref }}-${{ github.sha }}
name: fluxscape-editor-${{ matrix.platform }}-${{ github.head_ref }}-${{ github.sha }}
path: publish
retention-days: "12"
retention-days: '12'

View File

@@ -1,4 +1,4 @@
name: Test noodl-editor
name: Test fluxscape-editor
on:
# Allows you to run this workflow manually from the Actions tab

301
package-lock.json generated
View File

@@ -25220,9 +25220,9 @@
}
},
"node_modules/electron": {
"version": "31.1.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.1.0.tgz",
"integrity": "sha512-TBOwqLxSxnx6+pH6GMri7R3JPH2AkuGJHfWZS0p1HsmN+Qr1T9b0IRJnnehSd/3NZAmAre4ft9Ljec7zjyKFJA==",
"version": "31.3.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.3.1.tgz",
"integrity": "sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA==",
"hasInstallScript": true,
"dependencies": {
"@electron/get": "^2.0.0",
@@ -27211,6 +27211,10 @@
"react": "^15.0.2 || ^16.0.0 || ^17.0.0"
}
},
"node_modules/fluxscape-editor": {
"resolved": "packages/noodl-editor",
"link": true
},
"node_modules/focus-lock": {
"version": "0.8.1",
"dev": true,
@@ -35451,10 +35455,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/noodl-editor": {
"resolved": "packages/noodl-editor",
"link": true
},
"node_modules/nopt": {
"version": "1.0.10",
"license": "MIT",
@@ -48980,7 +48980,8 @@
"dev": true
},
"packages/noodl-editor": {
"version": "1.0.0",
"name": "fluxscape-editor",
"version": "1.1.0",
"dependencies": {
"@electron/remote": "^2.1.2",
"@jaames/iro": "^5.5.2",
@@ -49038,7 +49039,7 @@
"babel-loader": "^8.2.4",
"concurrently": "^7.4.0",
"css-loader": "^6.7.1",
"electron": "^31.1.0",
"electron": "31.3.1",
"electron-builder": "^24.9.1",
"file-loader": "^6.2.0",
"html-loader": "^3.1.0",
@@ -74070,9 +74071,9 @@
}
},
"electron": {
"version": "31.1.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.1.0.tgz",
"integrity": "sha512-TBOwqLxSxnx6+pH6GMri7R3JPH2AkuGJHfWZS0p1HsmN+Qr1T9b0IRJnnehSd/3NZAmAre4ft9Ljec7zjyKFJA==",
"version": "31.3.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.3.1.tgz",
"integrity": "sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA==",
"requires": {
"@electron/get": "^2.0.0",
"@types/node": "^20.9.0",
@@ -75431,6 +75432,144 @@
"fbjs": "^3.0.1"
}
},
"fluxscape-editor": {
"version": "file:packages/noodl-editor",
"requires": {
"@babel/core": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@electron/remote": "^2.1.2",
"@jaames/iro": "^5.5.2",
"@microsoft/fetch-event-source": "^2.0.1",
"@noodl/git": "file:../noodl-git",
"@noodl/noodl-parse-dashboard": "file:../noodl-parse-dashboard",
"@noodl/platform": "file:../noodl-platform",
"@noodl/platform-electron": "file:../noodl-platform-electron",
"@svgr/webpack": "^6.4.0",
"@types/checksum": "^0.1.33",
"@types/jasmine": "^4.3.0",
"@types/jquery": "^3.5.14",
"@types/react": "^17.0.50",
"@types/react-dom": "^18.0.0",
"@types/remarkable": "^2.0.3",
"@types/rimraf": "^3.0.2",
"@types/split2": "^3.2.1",
"@types/string.prototype.matchall": "^4.0.1",
"@types/underscore": "^1.11.4",
"@types/webpack-env": "^1.18.0",
"about-window": "^1.15.2",
"algoliasearch": "^4.14.2",
"archiver": "^5.3.0",
"async": "^3.2.4",
"babel-loader": "^8.2.4",
"classnames": "^2.3.2",
"concurrently": "^7.4.0",
"css-loader": "^6.7.1",
"diff3": "0.0.4",
"dmg-license": "^1.0.11",
"electron": "31.3.1",
"electron-builder": "^24.9.1",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.7",
"express": "^4.17.3",
"file-loader": "^6.2.0",
"highlight.js": "^11.5.1",
"html-loader": "^3.1.0",
"isbinaryfile": "^5.0.0",
"md5": "^2.3.0",
"md5-file": "^5.0.0",
"mixpanel-browser": "^2.45.0",
"mkdirp": "0.5.1",
"mkdirp-sync": "0.0.2",
"monaco-editor": "^0.34.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"ncp": "^2.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.0",
"react-hot-toast": "^2.4.0",
"react-instantsearch-hooks-web": "^6.38.0",
"react-json-view": "^1.21.3",
"react-rnd": "^10.3.7",
"remarkable": "^2.0.1",
"rimraf": "^3.0.2",
"s3": "git+https://github.com/noodlapp/node-s3-client.git",
"sass": "^1.55.0",
"sass-loader": "^12.6.0",
"string.prototype.matchall": "^4.0.7",
"stringify": "^5.2.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.1",
"ts-node": "^10.7.0",
"typescript": "^4.8.3",
"underscore": "^1.13.6",
"url-loader": "^4.1.1",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"webpack-merge": "^5.8.0",
"websocket-stream": "^5.5.2",
"ws": "^8.9.0"
},
"dependencies": {
"@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
"dev": true,
"requires": {}
},
"@webpack-cli/info": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
"integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
"dev": true,
"requires": {
"envinfo": "^7.7.3"
}
},
"@webpack-cli/serve": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
"dev": true,
"requires": {}
},
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true
},
"rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"dev": true,
"requires": {
"resolve": "^1.9.0"
}
},
"webpack-cli": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
"integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
"dev": true,
"requires": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",
"@webpack-cli/info": "^1.5.0",
"@webpack-cli/serve": "^1.7.0",
"colorette": "^2.0.14",
"commander": "^7.0.0",
"cross-spawn": "^7.0.3",
"fastest-levenshtein": "^1.0.12",
"import-local": "^3.0.2",
"interpret": "^2.2.0",
"rechoir": "^0.7.0",
"webpack-merge": "^5.7.3"
}
}
}
},
"focus-lock": {
"version": "0.8.1",
"dev": true,
@@ -81006,144 +81145,6 @@
"version": "2.0.10",
"dev": true
},
"noodl-editor": {
"version": "file:packages/noodl-editor",
"requires": {
"@babel/core": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@electron/remote": "^2.1.2",
"@jaames/iro": "^5.5.2",
"@microsoft/fetch-event-source": "^2.0.1",
"@noodl/git": "file:../noodl-git",
"@noodl/noodl-parse-dashboard": "file:../noodl-parse-dashboard",
"@noodl/platform": "file:../noodl-platform",
"@noodl/platform-electron": "file:../noodl-platform-electron",
"@svgr/webpack": "^6.4.0",
"@types/checksum": "^0.1.33",
"@types/jasmine": "^4.3.0",
"@types/jquery": "^3.5.14",
"@types/react": "^17.0.50",
"@types/react-dom": "^18.0.0",
"@types/remarkable": "^2.0.3",
"@types/rimraf": "^3.0.2",
"@types/split2": "^3.2.1",
"@types/string.prototype.matchall": "^4.0.1",
"@types/underscore": "^1.11.4",
"@types/webpack-env": "^1.18.0",
"about-window": "^1.15.2",
"algoliasearch": "^4.14.2",
"archiver": "^5.3.0",
"async": "^3.2.4",
"babel-loader": "^8.2.4",
"classnames": "^2.3.2",
"concurrently": "^7.4.0",
"css-loader": "^6.7.1",
"diff3": "0.0.4",
"dmg-license": "^1.0.11",
"electron": "^31.1.0",
"electron-builder": "^24.9.1",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.7",
"express": "^4.17.3",
"file-loader": "^6.2.0",
"highlight.js": "^11.5.1",
"html-loader": "^3.1.0",
"isbinaryfile": "^5.0.0",
"md5": "^2.3.0",
"md5-file": "^5.0.0",
"mixpanel-browser": "^2.45.0",
"mkdirp": "0.5.1",
"mkdirp-sync": "0.0.2",
"monaco-editor": "^0.34.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"ncp": "^2.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.0",
"react-hot-toast": "^2.4.0",
"react-instantsearch-hooks-web": "^6.38.0",
"react-json-view": "^1.21.3",
"react-rnd": "^10.3.7",
"remarkable": "^2.0.1",
"rimraf": "^3.0.2",
"s3": "git+https://github.com/noodlapp/node-s3-client.git",
"sass": "^1.55.0",
"sass-loader": "^12.6.0",
"string.prototype.matchall": "^4.0.7",
"stringify": "^5.2.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.1",
"ts-node": "^10.7.0",
"typescript": "^4.8.3",
"underscore": "^1.13.6",
"url-loader": "^4.1.1",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"webpack-merge": "^5.8.0",
"websocket-stream": "^5.5.2",
"ws": "^8.9.0"
},
"dependencies": {
"@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
"dev": true,
"requires": {}
},
"@webpack-cli/info": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
"integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
"dev": true,
"requires": {
"envinfo": "^7.7.3"
}
},
"@webpack-cli/serve": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
"dev": true,
"requires": {}
},
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true
},
"rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"dev": true,
"requires": {
"resolve": "^1.9.0"
}
},
"webpack-cli": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
"integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
"dev": true,
"requires": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",
"@webpack-cli/info": "^1.5.0",
"@webpack-cli/serve": "^1.7.0",
"colorette": "^2.0.14",
"commander": "^7.0.0",
"cross-spawn": "^7.0.3",
"fastest-levenshtein": "^1.0.12",
"import-local": "^3.0.2",
"interpret": "^2.2.0",
"rechoir": "^0.7.0",
"webpack-merge": "^5.7.3"
}
}
}
},
"nopt": {
"version": "1.0.10",
"requires": {

View File

@@ -12,7 +12,7 @@
"graph": "npx nx graph",
"ci:prepare:editor": "ts-node ./scripts/ci-editor-prepare.ts",
"ci:build:viewer": "lerna exec --scope @noodl/noodl-viewer-react -- npm run build",
"ci:build:editor": "lerna exec --scope noodl-editor -- npm run ci:build",
"ci:build:editor": "lerna exec --scope fluxscape-editor -- npm run ci:build",
"build:editor": "ts-node ./scripts/build-editor.ts",
"build:editor:_viewer": "ts-node ./scripts/noodl-editor/build-viewer.ts",
"build:editor:_editor": "ts-node ./scripts/noodl-editor/build-editor.ts",
@@ -20,7 +20,7 @@
"build:cloud-runtime": "lerna run build --scope @noodl/cloud-runtime --stream && lerna run build:pack --scope @noodl/cloud-runtime --stream",
"start:storybook": "lerna exec --scope @noodl/noodl-core-ui -- npm run start",
"start:viewer": "lerna run start --scope @noodl/noodl-viewer-react --stream",
"start:editor": "lerna run start --scope noodl-editor --stream",
"start:editor": "lerna run start --scope fluxscape-editor --stream",
"dev": "ts-node ./scripts/start.ts",
"start": "ts-node ./scripts/start.ts -- --build-viewer",
"test:editor": "ts-node ./scripts/test-editor.ts",
@@ -47,4 +47,4 @@
"npm": ">=6.0.0",
"node": ">=16.0.0 <=18"
}
}
}

View File

@@ -1,10 +1,10 @@
{
"name": "noodl-editor",
"name": "fluxscape-editor",
"productName": "Fluxscape",
"description": "Node-Based App Builder for Scalability & Rapid Development, a fork of Noodl",
"author": "Fluxscape <contact@fluxscape.io>",
"homepage": "https://fluxscape.io",
"version": "1.0.0",
"version": "1.1.0",
"main": "src/main/main.js",
"scripts": {
"build": "npx ts-node -P ./tsconfig.build.json ./scripts/build.ts",
@@ -114,7 +114,7 @@
"babel-loader": "^8.2.4",
"concurrently": "^7.4.0",
"css-loader": "^6.7.1",
"electron": "^31.1.0",
"electron": "31.3.1",
"electron-builder": "^24.9.1",
"file-loader": "^6.2.0",
"html-loader": "^3.1.0",
@@ -141,4 +141,4 @@
"optionalDependencies": {
"dmg-license": "^1.0.11"
}
}
}

View File

@@ -132,6 +132,7 @@ export function Columns(props: ColumnsProps) {
className={['columns-container', props.className].join(' ')}
ref={containerRef}
style={{
visibility: containerWidth === null ? "hidden" : "visible",
marginTop: parseFloat(props.marginY) * -1,
marginLeft: parseFloat(props.marginX) * -1,
display: 'flex',

View File

@@ -43,6 +43,10 @@ const OpenFilePicker = {
input.accept = this._internal.acceptedFileTypes;
if (this._internal.capture) {
input.capture = this._internal.capture;
}
input.onchange = onChange;
input.click();
}
@@ -54,6 +58,14 @@ const OpenFilePicker = {
set(value) {
this._internal.acceptedFileTypes = value;
}
},
capture: {
group: 'General',
type: 'string',
displayName: 'Capture',
set(value) {
this._internal.capture = value;
}
}
},
outputs: {

View File

@@ -4,7 +4,7 @@ const Switch = {
name: 'Switch',
docs: 'https://docs.noodl.net/nodes/logic/switch',
category: 'Logic',
initialize: function () {
initialize() {
this._internal.state = false;
this._internal.initialized = false;
},
@@ -15,7 +15,7 @@ const Switch = {
on: {
displayName: 'On',
group: 'Change State',
valueChangedToTrue: function () {
valueChangedToTrue() {
if (this._internal.state === true) {
return;
}
@@ -27,7 +27,7 @@ const Switch = {
off: {
displayName: 'Off',
group: 'Change State',
valueChangedToTrue: function () {
valueChangedToTrue() {
if (this._internal.state === false) {
return;
}
@@ -39,7 +39,7 @@ const Switch = {
flip: {
displayName: 'Flip',
group: 'Change State',
valueChangedToTrue: function () {
valueChangedToTrue() {
this._internal.state = !this._internal.state;
this.flagOutputDirty('state');
this.emitSignals();
@@ -50,7 +50,7 @@ const Switch = {
displayName: 'State',
group: 'General',
default: false,
set: function (value) {
set(value) {
this._internal.state = !!value;
this.flagOutputDirty('state');
this.emitSignals();
@@ -61,10 +61,15 @@ const Switch = {
state: {
type: 'boolean',
displayName: 'Current State',
getter: function () {
getter() {
return this._internal.state;
}
},
switched: {
displayName: 'Switched',
type: 'signal',
group: 'Signals'
},
switchedToOn: {
displayName: 'Switched To On',
type: 'signal',
@@ -77,12 +82,13 @@ const Switch = {
}
},
prototypeExtensions: {
emitSignals: function () {
emitSignals() {
if (this._internal.state === true) {
this.sendSignalOnOutput('switchedToOn');
} else {
this.sendSignalOnOutput('switchedToOff');
}
this.sendSignalOnOutput('switched');
}
}
};

View File

@@ -1,18 +1,13 @@
'use strict';
const { Node, EdgeTriggeredInput } = require('@noodl/runtime');
const UserService = require('./userservice');
var LoginNodeDefinition = {
const LoginNodeDefinition = {
name: 'net.noodl.user.LogIn',
docs: 'https://docs.noodl.net/nodes/data/user/log-in',
displayNodeName: 'Log In',
category: 'Cloud Services',
color: 'data',
initialize: function () {
var internal = this._internal;
},
getInspectInfo() {},
outputs: {
success: {
type: 'signal',
@@ -28,7 +23,7 @@ var LoginNodeDefinition = {
type: 'string',
displayName: 'Error',
group: 'Error',
getter: function () {
getter() {
return this._internal.error;
}
}
@@ -37,7 +32,7 @@ var LoginNodeDefinition = {
login: {
displayName: 'Do',
group: 'Actions',
valueChangedToTrue: function () {
valueChangedToTrue() {
this.scheduleLogIn();
}
},
@@ -45,7 +40,7 @@ var LoginNodeDefinition = {
displayName: 'Username',
type: 'string',
group: 'General',
set: function (value) {
set(value) {
this._internal.username = value;
}
},
@@ -53,13 +48,13 @@ var LoginNodeDefinition = {
displayName: 'Password',
type: 'string',
group: 'General',
set: function (value) {
set(value) {
this._internal.password = value;
}
}
},
methods: {
setError: function (err) {
setError(err) {
this._internal.error = err;
this.flagOutputDirty('error');
this.sendSignalOnOutput('failure');
@@ -76,9 +71,7 @@ var LoginNodeDefinition = {
this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning');
}
},
scheduleLogIn: function () {
const internal = this._internal;
scheduleLogIn() {
if (this.logInScheduled === true) return;
this.logInScheduled = true;
@@ -100,89 +93,7 @@ var LoginNodeDefinition = {
}
};
/*function updatePorts(nodeId, parameters, editorConnection, dbCollections) {
var ports = [];
ports.push({
name: 'collectionName',
displayName: "Class",
group: "General",
type: { name: 'enum', enums: (dbCollections !== undefined) ? dbCollections.map((c) => { return { value: c.name, label: c.name } }) : [], allowEditOnly: true },
plug: 'input'
})
if (parameters.collectionName && dbCollections) {
// Fetch ports from collection keys
var c = dbCollections.find((c) => c.name === parameters.collectionName);
if (c && c.schema && c.schema.properties) {
var props = c.schema.properties;
for (var key in props) {
var p = props[key];
if (ports.find((_p) => _p.name === key)) continue;
if(p.type === 'Relation') {
}
else { // Other schema type ports
const _typeMap = {
"String":"string",
"Boolean":"boolean",
"Number":"number",
"Date":"date"
}
ports.push({
type: {
name: _typeMap[p.type]?_typeMap[p.type]:'*',
},
plug: 'output',
group: 'Properties',
name: 'prop-' + key,
displayName: key,
})
ports.push({
type: 'signal',
plug: 'output',
group: 'Changed Events',
displayName: key+ ' Changed',
name: 'changed-' + key,
})
}
}
}
}
editorConnection.sendDynamicPorts(nodeId, ports);
}*/
module.exports = {
node: LoginNodeDefinition,
setup: function (context, graphModel) {
/* if (!context.editorConnection || !context.editorConnection.isRunningLocally()) {
return;
}
function _managePortsForNode(node) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('dbCollections'));
node.on("parameterUpdated", function (event) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('dbCollections'));
});
graphModel.on('metadataChanged.dbCollections', function (data) {
updatePorts(node.id, node.parameters, context.editorConnection, data);
})
}
graphModel.on("editorImportComplete", ()=> {
graphModel.on("nodeAdded.DbModel2", function (node) {
_managePortsForNode(node)
})
for(const node of graphModel.getNodesWithType('DbModel2')) {
_managePortsForNode(node)
}
})*/
}
setup(_context, _graphModel) {}
};

View File

@@ -1,18 +1,13 @@
'use strict';
const { Node, EdgeTriggeredInput } = require('@noodl/runtime');
const UserService = require('./userservice');
var LogOutNodeDefinition = {
const LogOutNodeDefinition = {
name: 'net.noodl.user.LogOut',
docs: 'https://docs.noodl.net/nodes/data/user/log-out',
displayNodeName: 'Log Out',
category: 'Cloud Services',
color: 'data',
initialize: function () {
var internal = this._internal;
},
getInspectInfo() {},
outputs: {
success: {
type: 'signal',
@@ -28,7 +23,7 @@ var LogOutNodeDefinition = {
type: 'string',
displayName: 'Error',
group: 'Error',
getter: function () {
getter() {
return this._internal.error;
}
}
@@ -37,13 +32,13 @@ var LogOutNodeDefinition = {
login: {
displayName: 'Do',
group: 'Actions',
valueChangedToTrue: function () {
valueChangedToTrue() {
this.scheduleLogOut();
}
}
},
methods: {
setError: function (err) {
setError(err) {
this._internal.error = err;
this.flagOutputDirty('error');
this.sendSignalOnOutput('failure');
@@ -60,9 +55,7 @@ var LogOutNodeDefinition = {
this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning');
}
},
scheduleLogOut: function () {
const internal = this._internal;
scheduleLogOut() {
if (this.logOutScheduled === true) return;
this.logOutScheduled = true;
@@ -84,5 +77,5 @@ var LogOutNodeDefinition = {
module.exports = {
node: LogOutNodeDefinition,
setup: function (context, graphModel) {}
setup(_context, _graphModel) {}
};

View File

@@ -1,20 +1,17 @@
'use strict';
const { Node, EdgeTriggeredInput } = require('@noodl/runtime');
const UserService = require('./userservice');
var SignUpNodeDefinition = {
const SignUpNodeDefinition = {
name: 'net.noodl.user.SignUp',
docs: 'https://docs.noodl.net/nodes/data/user/sign-up',
displayNodeName: 'Sign Up',
category: 'Cloud Services',
color: 'data',
initialize: function () {
var internal = this._internal;
initialize() {
const internal = this._internal;
internal.userProperties = {};
},
getInspectInfo() {},
outputs: {
success: {
type: 'signal',
@@ -30,7 +27,7 @@ var SignUpNodeDefinition = {
type: 'string',
displayName: 'Error',
group: 'Error',
getter: function () {
getter() {
return this._internal.error;
}
}
@@ -39,7 +36,7 @@ var SignUpNodeDefinition = {
signup: {
displayName: 'Do',
group: 'Actions',
valueChangedToTrue: function () {
valueChangedToTrue() {
this.scheduleSignUp();
}
},
@@ -47,7 +44,7 @@ var SignUpNodeDefinition = {
displayName: 'Username',
type: 'string',
group: 'General',
set: function (value) {
set(value) {
this._internal.username = value;
}
},
@@ -55,7 +52,7 @@ var SignUpNodeDefinition = {
displayName: 'Password',
type: 'string',
group: 'General',
set: function (value) {
set(value) {
this._internal.password = value;
}
},
@@ -63,13 +60,13 @@ var SignUpNodeDefinition = {
displayName: 'Email',
type: 'string',
group: 'General',
set: function (value) {
set(value) {
this._internal.email = value;
}
}
},
methods: {
setError: function (err) {
setError(err) {
this._internal.error = err;
this.flagOutputDirty('error');
this.sendSignalOnOutput('failure');
@@ -86,7 +83,7 @@ var SignUpNodeDefinition = {
this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning');
}
},
scheduleSignUp: function () {
scheduleSignUp() {
const internal = this._internal;
if (this.signUpScheduled === true) return;
@@ -109,23 +106,24 @@ var SignUpNodeDefinition = {
});
});
},
setUserProperty: function (name, value) {
setUserProperty(name, value) {
this._internal.userProperties[name] = value;
},
registerInputIfNeeded: function (name) {
registerInputIfNeeded(name) {
if (this.hasInput(name)) {
return;
}
if (name.startsWith('prop-'))
if (name.startsWith('prop-')) {
return this.registerInput(name, {
set: this.setUserProperty.bind(this, name.substring('prop-'.length))
});
}
}
}
};
function updatePorts(nodeId, parameters, editorConnection, systemCollections) {
function updatePorts(nodeId, _parameters, editorConnection, systemCollections) {
var ports = [];
if (systemCollections) {
@@ -169,7 +167,7 @@ function updatePorts(nodeId, parameters, editorConnection, systemCollections) {
module.exports = {
node: SignUpNodeDefinition,
setup: function (context, graphModel) {
setup(context, graphModel) {
if (!context.editorConnection || !context.editorConnection.isRunningLocally()) {
return;
}
@@ -177,7 +175,7 @@ module.exports = {
function _managePortsForNode(node) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('systemCollections'));
node.on('parameterUpdated', function (event) {
node.on('parameterUpdated', function (_event) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('systemCollections'));
});

View File

@@ -72,18 +72,18 @@ import { getCurrentPlatform } from '../helper';
// NOTE: Getting error "Cannot set properties of null (setting 'dev')" here,
// It basically means that some package is not relative to this path.
console.log("--- Run 'npm install' ...");
if (platform === "darwin") {
if (platform === 'darwin') {
execSync(`npm install electron-notarize`, {
stdio: 'inherit',
env: process.env
})
});
}
execSync(`npm install --arch=${arch} --scope noodl-editor`, {
execSync(`npm install --arch=${arch} --scope fluxscape-editor`, {
stdio: 'inherit',
env: process.env
})
});
console.log("--- 'npm install' done!");
// NOTE: npm install --arch= does this too
@@ -99,13 +99,13 @@ import { getCurrentPlatform } from '../helper';
// Build: Replace "dugite"
// Build: Replace "desktop-trampoline"
console.log("--- Run 'npm run build' ...");
execSync('npx lerna exec --scope noodl-editor -- npm run build', {
execSync('npx lerna exec --scope fluxscape-editor -- npm run build', {
stdio: 'inherit',
env: {
...process.env,
TARGET_PLATFORM,
DISABLE_SIGNING,
CSC_NAME,
CSC_NAME
}
});
console.log("--- 'npm run build' done!");

View File

@@ -74,7 +74,7 @@ const cloudRuntimeProcess = attachStdio(
}
);
const editorProcess = attachStdio(exec('npx lerna exec --scope noodl-editor -- npm run start', processOptions), {
const editorProcess = attachStdio(exec('npx lerna exec --scope fluxscape-editor -- npm run start', processOptions), {
prefix: 'Editor',
color: ConsoleColor.FgCyan
});

View File

@@ -1,36 +1,27 @@
import path from "path";
import { execSync } from "child_process";
import { execSync } from 'child_process';
import path from 'path';
const CWD = path.join(__dirname, "..");
const LOCAL_GIT_DIRECTORY = path.join(
__dirname,
"..",
"node_modules",
"dugite",
"git"
);
const CWD = path.join(__dirname, '..');
const LOCAL_GIT_DIRECTORY = path.join(__dirname, '..', 'node_modules', 'dugite', 'git');
const LOCAL_GIT_TRAMPOLINE_DIRECTORY = path.join(
__dirname,
"..",
"node_modules",
"desktop-trampoline/build/Release/desktop-trampoline"
'..',
'node_modules',
'desktop-trampoline/build/Release/desktop-trampoline'
);
console.log("---");
console.log('---');
console.log(`> CWD: `, CWD);
console.log(`> LOCAL_GIT_DIRECTORY: `, LOCAL_GIT_DIRECTORY);
console.log(
`> LOCAL_GIT_TRAMPOLINE_DIRECTORY: `,
LOCAL_GIT_TRAMPOLINE_DIRECTORY
);
console.log("---");
console.log(`> LOCAL_GIT_TRAMPOLINE_DIRECTORY: `, LOCAL_GIT_TRAMPOLINE_DIRECTORY);
console.log('---');
execSync("npx lerna exec --scope noodl-editor -- npm run test", {
execSync('npx lerna exec --scope fluxscape-editor -- npm run test', {
cwd: CWD,
stdio: "inherit",
stdio: 'inherit',
env: {
...process.env,
LOCAL_GIT_DIRECTORY,
LOCAL_GIT_TRAMPOLINE_DIRECTORY,
},
LOCAL_GIT_TRAMPOLINE_DIRECTORY
}
});