diff --git a/Tryouts/Prototypes/Shell/App.xaml b/Tryouts/Prototypes/Shell/App.xaml index 88eb5c98c..ef1f01b07 100644 --- a/Tryouts/Prototypes/Shell/App.xaml +++ b/Tryouts/Prototypes/Shell/App.xaml @@ -8,12 +8,12 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND See the License for the specific language governing permissions and limitations under the License. ******************************************************************************************************** --> - + Startup="Application_Startup" + > diff --git a/Tryouts/Prototypes/Shell/App.xaml.cs b/Tryouts/Prototypes/Shell/App.xaml.cs index 14881fc0e..e30b2c5d4 100644 --- a/Tryouts/Prototypes/Shell/App.xaml.cs +++ b/Tryouts/Prototypes/Shell/App.xaml.cs @@ -28,6 +28,19 @@ namespace Shell /// public partial class App : Application { - + private void Application_Startup(object sender, StartupEventArgs e) + { + if (e.Args.Length != 0) + { + MainWebWindowOptions webWindowOptions = MainWebWindowOptionsParser.Parse(e.Args); + Application.Current.MainWindow = new MainWebWindow(webWindowOptions); + Application.Current.MainWindow.Show(); + } + else + { + Application.Current.MainWindow = new MainWindow(); + Application.Current.MainWindow.Show(); + } + } } } diff --git a/Tryouts/Prototypes/Shell/MainWebWindow.xaml b/Tryouts/Prototypes/Shell/MainWebWindow.xaml new file mode 100644 index 000000000..35408f190 --- /dev/null +++ b/Tryouts/Prototypes/Shell/MainWebWindow.xaml @@ -0,0 +1,17 @@ + + + + + + + diff --git a/Tryouts/Prototypes/Shell/MainWebWindow.xaml.cs b/Tryouts/Prototypes/Shell/MainWebWindow.xaml.cs new file mode 100644 index 000000000..0ec2f798e --- /dev/null +++ b/Tryouts/Prototypes/Shell/MainWebWindow.xaml.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.CommandLine; +using System.IO; +using System.CommandLine.Binding; +using System.Security.Policy; + +namespace Shell +{ + /// + /// Interaction logic for MainWebWindow.xaml + /// + public partial class MainWebWindow : Window + { + public MainWebWindow(MainWebWindowOptions webWindowOptions) + { + InitializeComponent(); + + Title = webWindowOptions.Title ?? MainWebWindowOptions.DefaultTitle; + Width = webWindowOptions.Width ?? MainWebWindowOptions.DefaultWidth; + Height = webWindowOptions.Height ?? MainWebWindowOptions.DefaultHeight; + webView.Source = new Uri(webWindowOptions.Url ?? MainWebWindowOptions.DefaultUrl); + } + } +} \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/MainWebWindowOptions.cs b/Tryouts/Prototypes/Shell/MainWebWindowOptions.cs new file mode 100644 index 000000000..c9d592ba7 --- /dev/null +++ b/Tryouts/Prototypes/Shell/MainWebWindowOptions.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shell +{ + public sealed class MainWebWindowOptions + { + public double? Height { get; set; } + public string? Title { get; set; } + public string? Url { get; set; } + public double? Width { get; set; } + + public const double DefaultHeight = 450d; + public const string? DefaultTitle = "Compose Web Container"; + public const string? DefaultUrl = "about:blank"; + public const double DefaultWidth = 800d; + } +} diff --git a/Tryouts/Prototypes/Shell/MainWebWindowOptionsParser.cs b/Tryouts/Prototypes/Shell/MainWebWindowOptionsParser.cs new file mode 100644 index 000000000..192c52bca --- /dev/null +++ b/Tryouts/Prototypes/Shell/MainWebWindowOptionsParser.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.CommandLine; +using System.CommandLine.Binding; +using System.CommandLine.Parsing; +using System.Linq; +using System.Security.Policy; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Media3D; + +namespace Shell +{ + internal static class MainWebWindowOptionsParser + { + private static Option titleOption = new Option("--title", description: "Set title for window"); + private static Option urlOption = new Option("--url", description: "Set url for webview. default: about:blank"); + private static Option widthOption = new Option("--width", description: "Set width for window"); + private static Option heightOption = new Option("--height", description: "Set height for window"); + private static RootCommand rootCommand = new RootCommand + { + titleOption, + urlOption, + widthOption, + heightOption + }; + + public static MainWebWindowOptions Parse(string[] args) + { + Parser parser = new Parser(rootCommand); + ParseResult parseResult = parser.Parse(args); + + MainWebWindowOptions options = new MainWebWindowOptions + { + Title = parseResult.GetValueForOption(titleOption), + Url = parseResult.GetValueForOption(urlOption), + Width = parseResult.GetValueForOption(widthOption), + Height = parseResult.GetValueForOption(heightOption) + }; + + return options; + } + } +} diff --git a/Tryouts/Prototypes/Shell/MainWindow.xaml.cs b/Tryouts/Prototypes/Shell/MainWindow.xaml.cs index 602d31384..5cdd379af 100644 --- a/Tryouts/Prototypes/Shell/MainWindow.xaml.cs +++ b/Tryouts/Prototypes/Shell/MainWindow.xaml.cs @@ -17,6 +17,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using System.Windows; @@ -44,7 +45,7 @@ public MainWindow() { InitializeComponent(); - config = new ManifestParser().Manifest; + config = ManifestParser.OpenManifestFile("exampleManifest.json"); modules = config.Modules; DataContext = modules; } @@ -64,14 +65,14 @@ private void CreateViews(ModuleModel item) private void WebContent_Closed(object? sender, EventArgs e) { - webContentList.Remove(sender as WebContent); + webContentList.Remove((WebContent)sender); } private void ShowChild_Click(object sender, RoutedEventArgs e) { - var context = (sender as Button).DataContext; + var context = ((Button)sender).DataContext; - this.CreateViews((context as ModuleModel)); + CreateViews((ModuleModel)context); } } } diff --git a/Tryouts/Prototypes/Shell/Manifest/ManifestParser.cs b/Tryouts/Prototypes/Shell/Manifest/ManifestParser.cs index 8e81104c9..90e275ceb 100644 --- a/Tryouts/Prototypes/Shell/Manifest/ManifestParser.cs +++ b/Tryouts/Prototypes/Shell/Manifest/ManifestParser.cs @@ -20,26 +20,28 @@ using System.Text.Json; using System.Windows.Automation; using System.Windows.Controls.Primitives; +using System.Windows.Documents; namespace Manifest { - internal class ManifestParser + internal static class ManifestParser { - internal ManifestModel Manifest { get; set; } + internal static ManifestModel Manifest { get; set; } - public ManifestParser() + public static ManifestModel OpenManifestFile(string fileName) { - OpenManifestFile("./Manifest/exampleManifest.json"); - } + string processPath = Environment.ProcessPath; + string folder = Path.GetDirectoryName(processPath); + string path = Path.Combine(folder, @"Manifest\", fileName); - public async void OpenManifestFile(string manifestFile) - { - using (FileStream stream = File.Open(manifestFile, FileMode.Open)) - { + using (FileStream stream = File.Open(path, FileMode.Open)) + { Manifest = JsonSerializer.Deserialize(stream, ManifestModel.JsonSerializerOptions); stream.Close(); - } + } + + return Manifest; } } } diff --git a/Tryouts/Prototypes/Shell/Node-launcher/.gitignore b/Tryouts/Prototypes/Shell/Node-launcher/.gitignore new file mode 100644 index 000000000..b56eea18a --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +output/ \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Demo/example.js b/Tryouts/Prototypes/Shell/Node-launcher/Demo/example.js new file mode 100644 index 000000000..2b9fe3959 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Demo/example.js @@ -0,0 +1,27 @@ +import { BrowserWindow } from '@morgan-stanley/compose-node-launcher'; + +function windowOpenExample() { + const window = new BrowserWindow( + { + url: "https://github.com/morganstanley/composeui", + title: "My Web App", + width: 1600, + height: 800 + }); + + window.open(); +} + +windowOpenExample(); + +function loadUrlExample() { + const window = new BrowserWindow( + { + width: 1600, + height: 800 + }); + + window.loadUrl("https://github.com/morganstanley/fdc3-dotnet"); +} + +loadUrlExample(); \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Demo/package.json b/Tryouts/Prototypes/Shell/Node-launcher/Demo/package.json new file mode 100644 index 000000000..18fd9ec41 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Demo/package.json @@ -0,0 +1,22 @@ +{ + "name": "@morgan-stanley/compose-node-launcher-example", + "version": "0.1.0", + "description": "", + "main": "example.js", + "module": "example.js", + "type": "module", + "scripts": { + "clean": "rimraf output", + "build": "npm run clean && rollup -c" + }, + "dependencies": { + "@morgan-stanley/compose-node-launcher": "*" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^15.0.1", + "rimraf": "4.1.2", + "rollup": "^2.76.0", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + } +} diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Demo/rollup.config.js b/Tryouts/Prototypes/Shell/Node-launcher/Demo/rollup.config.js new file mode 100644 index 000000000..b866d013b --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Demo/rollup.config.js @@ -0,0 +1,13 @@ +import { nodeResolve } from '@rollup/plugin-node-resolve'; + +export default { + input: 'example.js', + output: { + file: 'output/bundle.js', + format: 'es' + }, + plugins: [ + nodeResolve() + + ] +}; \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/package.json b/Tryouts/Prototypes/Shell/Node-launcher/Lib/package.json new file mode 100644 index 000000000..c51dda605 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/package.json @@ -0,0 +1,21 @@ +{ + "name": "@morgan-stanley/compose-node-launcher", + "version": "0.1.0", + "description": "Package to launch Compose from Node.js", + "main": "output/index.js", + "module": "output/index.js", + "type": "module", + "scripts": { + "clean": "rimraf output", + "build": "npm run clean && tsc && rollup -c" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-typescript": "11.0.0", + "@types/node": "^18.11.18", + "rimraf": "4.1.2", + "rollup": "^2.76.0", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + } +} diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/rollup.config.js b/Tryouts/Prototypes/Shell/Node-launcher/Lib/rollup.config.js new file mode 100644 index 000000000..42cbdbaba --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/rollup.config.js @@ -0,0 +1,12 @@ +import { nodeResolve } from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; + +export default { + input: 'src/index.ts', + output: { + + file: 'output/bundle.mjs', + format: 'es' + }, + plugins: [typescript(), nodeResolve()] +}; \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/BrowserWindow.ts b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/BrowserWindow.ts new file mode 100644 index 000000000..54bc52cf3 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/BrowserWindow.ts @@ -0,0 +1,19 @@ +import { WindowConfig } from './WindowConfig.js'; +import { Launcher } from './Launcher.js'; + +export class BrowserWindow { + private launcher: Launcher; + + constructor(private config: WindowConfig) { + this.launcher = new Launcher(); + } + + public open() { + this.launcher.launch(this.config); + } + + public loadUrl(url: string) { + this.config.url = url + this.launcher.launch(this.config); + } +} \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/Launcher.ts b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/Launcher.ts new file mode 100644 index 000000000..0c5c9f0ee --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/Launcher.ts @@ -0,0 +1,41 @@ +import { execFile } from 'child_process'; +import { WindowConfig } from './WindowConfig'; + +export class Launcher { + private processArgs(config?: WindowConfig) { + let argsArray = []; + if (config) { + if (config?.url) { + argsArray.push(`--url=${config?.url}`); + } + + if (config?.width) { + argsArray.push(`--width=${config?.width}`); + } + + if (config?.height) { + argsArray.push(`--height=${config?.height}`); + } + if (config?.title) { + argsArray.push(`--title=${config?.title}`); + } + } + + return argsArray; + } + + public launch(config?: WindowConfig) { + let argsArray = this.processArgs(config); + + if (argsArray.length === 0) { + throw new Error("Specify at least one argument."); + } else { + const child = execFile("Shell.exe", argsArray, (error, stdout, stderr) => { + console.log(stdout); + if (error) { + throw error; + } + }); + } + } +} \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/WindowConfig.ts b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/WindowConfig.ts new file mode 100644 index 000000000..448ade8e0 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/WindowConfig.ts @@ -0,0 +1,6 @@ +export interface WindowConfig { + title?: string; + url?: string; + width?: number; + height?: number; +} \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/index.ts b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/index.ts new file mode 100644 index 000000000..b8bcf1687 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/index.ts @@ -0,0 +1,3 @@ +export { BrowserWindow } from './BrowserWindow.js'; +export { Launcher } from './Launcher.js'; +export { WindowConfig } from './WindowConfig.js'; \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/tsconfig.json b/Tryouts/Prototypes/Shell/Node-launcher/Lib/tsconfig.json new file mode 100644 index 000000000..e0cb8bbf6 --- /dev/null +++ b/Tryouts/Prototypes/Shell/Node-launcher/Lib/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "types": [ "node" ], + "experimentalDecorators": true, + "module": "es2022", + "esModuleInterop": true, + "target": "es2022", + "declaration": true, + "outDir": "output", + "lib": [ "es2022", "DOM" ], + "strict": true + }, + "files": [ "src/index.ts" ] +} \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Properties/launchSettings.json b/Tryouts/Prototypes/Shell/Properties/launchSettings.json new file mode 100644 index 000000000..92f5a82be --- /dev/null +++ b/Tryouts/Prototypes/Shell/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Shell": { + "commandName": "Project", + "commandLineArgs": "--title=Jane --width=1800 --height=800 --url=http://google.com" + } + } +} \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Shell.csproj b/Tryouts/Prototypes/Shell/Shell.csproj index ac1c43b58..101a349db 100644 --- a/Tryouts/Prototypes/Shell/Shell.csproj +++ b/Tryouts/Prototypes/Shell/Shell.csproj @@ -9,15 +9,20 @@ + + + + MSBuild:Compile + MSBuild:Compile diff --git a/Tryouts/package-lock.json b/Tryouts/package-lock.json index 8e4ea16af..32bab62b6 100644 --- a/Tryouts/package-lock.json +++ b/Tryouts/package-lock.json @@ -7,7 +7,8 @@ "name": "compose-web-modules", "workspaces": [ "Messaging-JS", - "Plugins/ApplicationPlugins/*" + "Plugins/ApplicationPlugins/*", + "Prototypes/Shell/Node-launcher/*" ], "devDependencies": { "lerna": "^6.4.1" @@ -2982,6 +2983,32 @@ "node": ">=0.1.90" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -5393,6 +5420,14 @@ "resolved": "Messaging-JS", "link": true }, + "node_modules/@morgan-stanley/compose-node-launcher": { + "resolved": "Prototypes/Shell/Node-launcher/Lib", + "link": true + }, + "node_modules/@morgan-stanley/compose-node-launcher-example": { + "resolved": "Prototypes/Shell/Node-launcher/Demo", + "link": true + }, "node_modules/@morgan-stanley/compose-process-explorer-frontend": { "resolved": "Plugins/ApplicationPlugins/process explorer", "link": true @@ -6322,6 +6357,32 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, + "node_modules/@rollup/plugin-typescript": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.0.0.tgz", + "integrity": "sha512-goPyCWBiimk1iJgSTgsehFD5OOFHiAknrRJjqFCudcW8JtWiBlK284Xnn4flqMqg6YAjVG/EE+3aVzrL5qNSzQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, "node_modules/@rollup/pluginutils": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", @@ -6411,6 +6472,38 @@ "node": ">= 10" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/@types/babel__core": { "version": "7.20.0", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz", @@ -7425,6 +7518,17 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/add-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", @@ -7651,6 +7755,14 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -9307,6 +9419,14 @@ "node": ">=10" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/critters": { "version": "0.0.16", "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.16.tgz", @@ -19393,6 +19513,65 @@ "node": ">=12" } }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tsconfig-paths": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz", @@ -19938,6 +20117,14 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -20746,6 +20933,17 @@ "node": ">=10" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -20845,7 +21043,7 @@ "jasmine-core": "~4.5.0", "jasmine-spec-reporter": "~7.0.0", "karma": "~6.4.0", - "karma-chrome-launcher": "~3.1.0", + "karma-chrome-launcher": "^3.1.1", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.0.0", @@ -20869,6 +21067,93 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", "dev": true + }, + "Prototypes/Shell/Node-launcher/Demo": { + "name": "@morgan-stanley/compose-node-launcher-example", + "version": "0.1.0", + "dependencies": { + "@morgan-stanley/compose-node-launcher": "*" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^15.0.1", + "rimraf": "4.1.2", + "rollup": "^2.76.0", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + } + }, + "Prototypes/Shell/Node-launcher/Demo/node_modules/rimraf": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "dev": true, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "Prototypes/Shell/Node-launcher/Demo/node_modules/rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "Prototypes/Shell/Node-launcher/Lib": { + "name": "@morgan-stanley/compose-node-launcher", + "version": "0.1.0", + "devDependencies": { + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-typescript": "11.0.0", + "@types/node": "^18.11.18", + "rimraf": "4.1.2", + "rollup": "^2.76.0", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + } + }, + "Prototypes/Shell/Node-launcher/Lib/node_modules/rimraf": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "dev": true, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "Prototypes/Shell/Node-launcher/Lib/node_modules/rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } } }, "dependencies": { @@ -22972,6 +23257,31 @@ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -24822,6 +25132,63 @@ } } }, + "@morgan-stanley/compose-node-launcher": { + "version": "file:Prototypes/Shell/Node-launcher/Lib", + "requires": { + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-typescript": "11.0.0", + "@types/node": "^18.11.18", + "rimraf": "4.1.2", + "rollup": "^2.76.0", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + }, + "dependencies": { + "rimraf": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "dev": true + }, + "rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + } + } + }, + "@morgan-stanley/compose-node-launcher-example": { + "version": "file:Prototypes/Shell/Node-launcher/Demo", + "requires": { + "@morgan-stanley/compose-node-launcher": "*", + "@rollup/plugin-node-resolve": "^15.0.1", + "rimraf": "4.1.2", + "rollup": "^2.76.0", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + }, + "dependencies": { + "rimraf": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "dev": true + }, + "rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + } + } + }, "@morgan-stanley/compose-process-explorer-frontend": { "version": "file:Plugins/ApplicationPlugins/process explorer", "requires": { @@ -24858,7 +25225,7 @@ "jasmine-spec-reporter": "~7.0.0", "jszip": "^3.5.0", "karma": "~6.4.0", - "karma-chrome-launcher": "~3.1.0", + "karma-chrome-launcher": "^3.1.1", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.0.0", @@ -25611,6 +25978,16 @@ } } }, + "@rollup/plugin-typescript": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.0.0.tgz", + "integrity": "sha512-goPyCWBiimk1iJgSTgsehFD5OOFHiAknrRJjqFCudcW8JtWiBlK284Xnn4flqMqg6YAjVG/EE+3aVzrL5qNSzQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^5.0.1", + "resolve": "^1.22.1" + } + }, "@rollup/pluginutils": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", @@ -25683,6 +26060,38 @@ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "optional": true, + "peer": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "optional": true, + "peer": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "optional": true, + "peer": true + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true, + "optional": true, + "peer": true + }, "@types/babel__core": { "version": "7.20.0", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz", @@ -26500,6 +26909,14 @@ "dev": true, "requires": {} }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "optional": true, + "peer": true + }, "add-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", @@ -26664,6 +27081,14 @@ "readable-stream": "^3.6.0" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "optional": true, + "peer": true + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -27945,6 +28370,14 @@ "yaml": "^1.10.0" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "optional": true, + "peer": true + }, "critters": { "version": "0.0.16", "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.16.tgz", @@ -35667,6 +36100,39 @@ } } }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "optional": true, + "peer": true + } + } + }, "tsconfig-paths": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz", @@ -36069,6 +36535,14 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "optional": true, + "peer": true + }, "v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -36670,6 +37144,14 @@ "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "optional": true, + "peer": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/Tryouts/package.json b/Tryouts/package.json index 96c0013ae..a86e62727 100644 --- a/Tryouts/package.json +++ b/Tryouts/package.json @@ -4,7 +4,8 @@ "private": true, "workspaces": [ "Messaging-JS", - "Plugins/ApplicationPlugins/*" + "Plugins/ApplicationPlugins/*", + "Prototypes/Shell/Node-launcher/*" ], "devDependencies": { "lerna": "^6.4.1"