@cocoon/editor
Advanced tools
Comparing version 0.115.0 to 0.116.0
#!/usr/bin/env node --inspect=9340 | ||
"use strict";var e=require("@cocoon/cocoon"),o=require("@cocoon/util/ipc/createServer"),n=require("@cocoon/util/ipc/requestCocoonUri"),t=require("child_process"),r=require("commander"),c=require("debug"),s=require("open"),i=require("path"),a=require("ws");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(o),p=u(r),d=u(c),h=u(s),f=u(i),w=u(a);const v=require("../package.json"),P=d.default("editor:index"),b={cocoonProcess:null,httpServerProcess:null};async function q(e={}){P("opening browser");const o=function(e,o){const n=Object.keys(o).reduce((e,n)=>{const t=o[n];return t&&e.push(`${n}=${t}`),e},[]).join("&");return`http://127.0.0.1:22242/${e}${n?"?"+n:""}`}("editor.html",{file:e.cocoonFilePath});e.browserPath?t.exec(`"${e.browserPath}" "${o}"`):h.default(o)}p.default.version(v.version||"unknown").description("Runs the Cocoon editor").arguments("[yml]").option("-c, --connect <url>","Connect to an existing Cocoon processing kernel").option("--browser-path <path>","Path to the browser executable").option("--headless","Run the editor headlessly").action(async(o,r)=>{d.default.enable("cocoon:*,editor:*,http:*"),function(){if(b.httpServerProcess)throw new Error("cocoon-editor-http is already running");P("spawning cocoon-editor-http"),b.httpServerProcess=t.spawn("node",["--inspect=9341",f.default.resolve(__dirname,"cocoon-editor-http.js")],{cwd:f.default.resolve(__dirname,".."),detached:!1,stdio:[process.stdin,process.stdout,process.stderr,"ipc"]}),b.httpServerProcess}(),await async function(o={}){const t=l.default.bind(null,w.default,22245,d.default("editor:ipc"));if(o.cocoonUri){const e=await t();P(`using Cocoon instance at "${o.cocoonUri}"`),n.onRequestCocoonUri(e,()=>({uri:o.cocoonUri}))}else{const[o,r]=await Promise.all([e.initialise(),await t()]);P("created local Cocoon instance"),n.onRequestCocoonUri(r,()=>({}))}}({cocoonUri:r.connect}),r.headless||await q({browserPath:r.browser||process.env.COCOON_BROWSER_PATH,cocoonFilePath:o?f.default.resolve(o):o}),process.stdout.write("\n ██████\n ██████████\n ██████████\n ████████████\n ████████████████\n ██████░░░░░░██████\n ██░░░░░░░░██░░░░░░░░██\n ██████████░░░░░░████████\n ██████████████████████████████\n ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓\n ▓▓▓▓ ████ ▓▓ ████ ▓▓▓▓\n ▓▓▓▓ ████ ▓▓ ████ ▓▓▓▓\n ▓▓▓▓▓▓ ░░░░ ▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓ ▓▓▓▓\n ▓▓▓▓ ▓▓▓▓\n ▓▓ ▓▓\n ▓▓ ▓▓\n ▓▓ ▓▓\n ░░ ░░\n ░░░░ ░░░░\n\n ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓\n ▓░ Welcome to Cocoon -- open this URL: ░▓\n ▓░ http://127.0.0.1:22242/editor.html ░▓\n ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓\n ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n\n")}),process.title=__filename,process.env.DEBUG_COLORS=1,process.on("warning",e=>{e.stack&&process.stderr.write(e.stack)}),process.on("exit",(function(){b.httpServerProcess&&(P("killing cocoon-editor-http"),b.httpServerProcess.kill())})),process.on("SIGHUP",()=>process.exit(0)),p.default.parse(process.argv); | ||
"use strict";var e=require("@cocoon/cocoon"),o=require("@cocoon/util/ipc/createServer"),n=require("@cocoon/util/ipc/requestCocoonUri"),t=require("child_process"),r=require("commander"),c=require("debug"),s=require("open"),i=require("path"),a=require("ws");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}})),o.default=e,Object.freeze(o)}var d=l(e),p=u(o),h=u(r),f=u(c),w=u(s),b=u(i),v=u(a);const P=require("../package.json"),g=f.default("editor:index"),q={cocoonProcess:null,httpServerProcess:null};async function O(e={}){g("opening browser");const o=function(e,o){const n=Object.keys(o).reduce((e,n)=>{const t=o[n];return t&&e.push(`${n}=${t}`),e},[]).join("&");return`http://127.0.0.1:22242/${e}${n?"?"+n:""}`}("editor.html",{file:e.cocoonFilePath});e.browserPath?t.exec(`"${e.browserPath}" "${o}"`):w.default(o)}h.default.version(P.version||"unknown").description("Runs the Cocoon editor").arguments("[yml]").option("-c, --connect <url>","Connect to an existing Cocoon processing kernel").option("--browser-path <path>","Path to the browser executable").option("--headless","Run the editor headlessly").action(async(e,o)=>{f.default.enable("cocoon:*,editor:*,http:*"),function(){if(q.httpServerProcess)throw new Error("cocoon-editor-http is already running");g("spawning cocoon-editor-http"),q.httpServerProcess=t.spawn("node",["--inspect=9341",b.default.resolve(__dirname,"cocoon-editor-http.js")],{cwd:b.default.resolve(__dirname,".."),detached:!1,stdio:[process.stdin,process.stdout,process.stderr,"ipc"]}),q.httpServerProcess}(),await async function(e={}){const o=p.default.bind(null,v.default,22245,f.default("editor:ipc"));if(e.cocoonUri){const t=await o();g(`using Cocoon instance at "${e.cocoonUri}"`),n.onRequestCocoonUri(t,()=>({uri:e.cocoonUri}))}else{const[e,t]=await Promise.all([d.initialise(),await o()]);g("created local Cocoon instance"),n.onRequestCocoonUri(t,()=>({}))}}({cocoonUri:o.connect}),o.headless||await O({browserPath:o.browser||process.env.COCOON_BROWSER_PATH,cocoonFilePath:e?b.default.resolve(e):e}),process.stdout.write("\n ██████\n ██████████\n ██████████\n ████████████\n ████████████████\n ██████░░░░░░██████\n ██░░░░░░░░██░░░░░░░░██\n ██████████░░░░░░████████\n ██████████████████████████████\n ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓\n ▓▓▓▓ ████ ▓▓ ████ ▓▓▓▓\n ▓▓▓▓ ████ ▓▓ ████ ▓▓▓▓\n ▓▓▓▓▓▓ ░░░░ ▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓\n ▓▓▓▓ ▓▓▓▓\n ▓▓▓▓ ▓▓▓▓\n ▓▓ ▓▓\n ▓▓ ▓▓\n ▓▓ ▓▓\n ░░ ░░\n ░░░░ ░░░░\n\n ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓\n ▓░ Welcome to Cocoon -- open this URL: ░▓\n ▓░ http://127.0.0.1:22242/editor.html ░▓\n ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓\n ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n\n")}),process.title=__filename,process.env.DEBUG_COLORS=1,process.on("warning",e=>{e.stack&&process.stderr.write(e.stack)}),process.on("exit",(function(){q.httpServerProcess&&(g("killing cocoon-editor-http"),q.httpServerProcess.kill())})),process.on("SIGHUP",()=>process.exit(0)),h.default.parse(process.argv); |
{ | ||
"name": "@cocoon/editor", | ||
"version": "0.115.0", | ||
"version": "0.116.0", | ||
"author": "Lynn Smeria <ae@cephea.de>", | ||
@@ -16,19 +16,19 @@ "license": "GPL-3.0-or-later", | ||
"dependencies": { | ||
"@cocoon/cocoon": "0.115.0", | ||
"@cocoon/monaco": "0.115.0", | ||
"@cocoon/util": "0.115.0", | ||
"commander": "7.1.0", | ||
"@cocoon/cocoon": "0.116.0", | ||
"@cocoon/monaco": "0.116.0", | ||
"@cocoon/util": "0.116.0", | ||
"commander": "7.2.0", | ||
"debug": "4.3.1", | ||
"mime-types": "2.1.29", | ||
"mime-types": "2.1.30", | ||
"open": "7.3.1", | ||
"react-is": "17.0.1", | ||
"tslib": "2.1.0", | ||
"ws": "7.4.3" | ||
"react-is": "17.0.2", | ||
"tslib": "2.2.0", | ||
"ws": "7.4.5" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.12.10", | ||
"@babel/preset-react": "7.12.10", | ||
"@babel/preset-typescript": "7.12.7", | ||
"@cocoon/types": "0.115.0", | ||
"@rollup/plugin-typescript": "8.2.0", | ||
"@babel/core": "7.14.0", | ||
"@babel/preset-react": "7.13.13", | ||
"@babel/preset-typescript": "7.13.0", | ||
"@cocoon/types": "0.116.0", | ||
"@rollup/plugin-typescript": "8.2.1", | ||
"@tippy.js/react": "3.1.1", | ||
@@ -38,11 +38,11 @@ "@types/debug": "4.1.5", | ||
"@types/mime-types": "2.1.0", | ||
"@types/mousetrap": "1.6.5", | ||
"@types/react": "17.0.2", | ||
"@types/react-dom": "17.0.1", | ||
"@types/mousetrap": "1.6.8", | ||
"@types/react": "17.0.4", | ||
"@types/react-dom": "17.0.3", | ||
"@types/react-resize-detector": "5.0.0", | ||
"@types/webpack": "4.41.26", | ||
"@types/ws": "7.4.0", | ||
"@types/ws": "7.4.2", | ||
"ayu": "7.3.1", | ||
"babel-loader": "8.2.2", | ||
"css-loader": "5.1.1", | ||
"css-loader": "5.2.4", | ||
"isomorphic-ws": "4.0.1", | ||
@@ -53,8 +53,8 @@ "lodash": "4.17.21", | ||
"prop-types": "15.7.2", | ||
"react": "17.0.1", | ||
"react-dom": "17.0.1", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-draggable": "4.4.3", | ||
"react-resize-detector": "5.2.0", | ||
"react-resize-detector": "6.7.1", | ||
"react-splitter-layout": "4.0.0", | ||
"rollup": "2.40.0", | ||
"rollup": "2.46.0", | ||
"rollup-plugin-replace": "2.2.0", | ||
@@ -64,4 +64,4 @@ "rollup-plugin-terser": "7.0.2", | ||
"style-loader": "2.0.0", | ||
"styled-jsx": "3.3.2", | ||
"supports-color": "8.1.1", | ||
"styled-jsx": "3.4.4", | ||
"supports-color": "9.0.0", | ||
"tippy.js": "5.2.1", | ||
@@ -74,3 +74,3 @@ "webpack": "4.44.2", | ||
"optionalDependencies": { | ||
"@cocoon/plugin-inspect": "0.115.0" | ||
"@cocoon/plugin-inspect": "0.116.0" | ||
}, | ||
@@ -85,3 +85,3 @@ "scripts": { | ||
}, | ||
"gitHead": "9ff3eda86b88373895d7ad4210a28e272ea66fde" | ||
"gitHead": "c9c721b6fc2d968bd0bf095550e01902354d9b77" | ||
} |
Sorry, the diff of this file is too big to display
510182
1725
+ Added@cocoon/cocoon@0.116.0(transitive)
+ Added@cocoon/monaco@0.116.0(transitive)
+ Added@cocoon/plugin-inspect@0.116.0(transitive)
+ Added@cocoon/types@0.116.0(transitive)
+ Added@cocoon/util@0.116.0(transitive)
+ Added@types/node@15.0.1(transitive)
+ Added@types/react@17.0.4(transitive)
+ Added@types/react-dom@17.0.3(transitive)
+ Added@types/scheduler@0.23.0(transitive)
+ Addedcommander@7.2.0(transitive)
+ Addedhas-flag@5.0.1(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedmime-db@1.47.0(transitive)
+ Addedmime-types@2.1.30(transitive)
+ Addedreact-is@17.0.2(transitive)
+ Addedserialize-error@8.1.0(transitive)
+ Addedsupports-color@9.0.0(transitive)
+ Addedtempy@1.0.1(transitive)
+ Addedtslib@2.2.0(transitive)
+ Addedws@7.4.5(transitive)
- Removed@cocoon/cocoon@0.115.0(transitive)
- Removed@cocoon/monaco@0.115.0(transitive)
- Removed@cocoon/plugin-inspect@0.115.0(transitive)
- Removed@cocoon/types@0.115.0(transitive)
- Removed@cocoon/util@0.115.0(transitive)
- Removed@types/node@14.14.31(transitive)
- Removed@types/react@17.0.2(transitive)
- Removed@types/react-dom@17.0.1(transitive)
- Removedcommander@7.1.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedjs-yaml@4.0.0(transitive)
- Removedmime-db@1.46.0(transitive)
- Removedmime-types@2.1.29(transitive)
- Removedreact-is@17.0.1(transitive)
- Removedserialize-error@8.0.1(transitive)
- Removedsupports-color@8.1.1(transitive)
- Removedtempy@1.0.0(transitive)
- Removedtslib@2.1.0(transitive)
- Removedws@7.4.3(transitive)
Updated@cocoon/cocoon@0.116.0
Updated@cocoon/monaco@0.116.0
Updated@cocoon/util@0.116.0
Updatedcommander@7.2.0
Updatedmime-types@2.1.30
Updatedreact-is@17.0.2
Updatedtslib@2.2.0
Updatedws@7.4.5