@ms-cloudpack/cli 0.68.2 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__fixtures__/commandTestSetup.d.ts +18 -0
- package/lib/__fixtures__/commandTestSetup.d.ts.map +1 -0
- package/lib/__fixtures__/commandTestSetup.js +61 -0
- package/lib/__fixtures__/commandTestSetup.js.map +1 -0
- package/lib/__fixtures__/createMockSession.d.ts +5 -2
- package/lib/__fixtures__/createMockSession.d.ts.map +1 -1
- package/lib/__fixtures__/createMockSession.js +2 -2
- package/lib/__fixtures__/createMockSession.js.map +1 -1
- package/lib/__fixtures__/getPortArgsForStart.d.ts +21 -0
- package/lib/__fixtures__/getPortArgsForStart.d.ts.map +1 -0
- package/lib/__fixtures__/getPortArgsForStart.js +36 -0
- package/lib/__fixtures__/getPortArgsForStart.js.map +1 -0
- package/lib/__fixtures__/mainWrapper.d.ts +9 -0
- package/lib/__fixtures__/mainWrapper.d.ts.map +1 -0
- package/lib/__fixtures__/mainWrapper.js +17 -0
- package/lib/__fixtures__/mainWrapper.js.map +1 -0
- package/lib/__fixtures__/mockActiveSessions.d.ts +15 -0
- package/lib/__fixtures__/mockActiveSessions.d.ts.map +1 -0
- package/lib/__fixtures__/mockActiveSessions.js +38 -0
- package/lib/__fixtures__/mockActiveSessions.js.map +1 -0
- package/lib/commands/bundle/execute.d.ts.map +1 -1
- package/lib/commands/bundle/execute.js +2 -5
- package/lib/commands/bundle/execute.js.map +1 -1
- package/lib/commands/cache/clean.d.ts.map +1 -1
- package/lib/commands/cache/clean.js +4 -3
- package/lib/commands/cache/clean.js.map +1 -1
- package/lib/commands/config/delete.d.ts +9 -0
- package/lib/commands/config/delete.d.ts.map +1 -0
- package/lib/commands/config/delete.js +22 -0
- package/lib/commands/config/delete.js.map +1 -0
- package/lib/commands/config/get.d.ts +9 -0
- package/lib/commands/config/get.d.ts.map +1 -0
- package/lib/commands/config/get.js +24 -0
- package/lib/commands/config/get.js.map +1 -0
- package/lib/commands/config/index.d.ts +3 -0
- package/lib/commands/config/index.d.ts.map +1 -0
- package/lib/commands/config/index.js +48 -0
- package/lib/commands/config/index.js.map +1 -0
- package/lib/commands/config/list.d.ts +6 -0
- package/lib/commands/config/list.d.ts.map +1 -0
- package/lib/commands/config/list.js +21 -0
- package/lib/commands/config/list.js.map +1 -0
- package/lib/commands/config/set.d.ts +10 -0
- package/lib/commands/config/set.d.ts.map +1 -0
- package/lib/commands/config/set.js +21 -0
- package/lib/commands/config/set.js.map +1 -0
- package/lib/commands/info/index.d.ts.map +1 -1
- package/lib/commands/info/index.js +3 -0
- package/lib/commands/info/index.js.map +1 -1
- package/lib/commands/init/execute.js +2 -2
- package/lib/commands/init/execute.js.map +1 -1
- package/lib/commands/init/init.d.ts +0 -2
- package/lib/commands/init/init.d.ts.map +1 -1
- package/lib/commands/init/init.js +4 -8
- package/lib/commands/init/init.js.map +1 -1
- package/lib/commands/link/execute.d.ts.map +1 -1
- package/lib/commands/link/execute.js +5 -7
- package/lib/commands/link/execute.js.map +1 -1
- package/lib/commands/link/getActiveSessions.d.ts +4 -1
- package/lib/commands/link/getActiveSessions.d.ts.map +1 -1
- package/lib/commands/link/getActiveSessions.js +3 -2
- package/lib/commands/link/getActiveSessions.js.map +1 -1
- package/lib/commands/link/getSessionToLink.d.ts +2 -0
- package/lib/commands/link/getSessionToLink.d.ts.map +1 -1
- package/lib/commands/link/getSessionToLink.js +3 -1
- package/lib/commands/link/getSessionToLink.js.map +1 -1
- package/lib/commands/setup/index.js +1 -1
- package/lib/commands/setup/index.js.map +1 -1
- package/lib/commands/start/execute.d.ts +0 -2
- package/lib/commands/start/execute.d.ts.map +1 -1
- package/lib/commands/start/execute.js +10 -18
- package/lib/commands/start/execute.js.map +1 -1
- package/lib/commands/start/index.d.ts.map +1 -1
- package/lib/commands/start/index.js +28 -1
- package/lib/commands/start/index.js.map +1 -1
- package/lib/commands/start/trackSession.d.ts.map +1 -1
- package/lib/commands/start/trackSession.js +3 -2
- package/lib/commands/start/trackSession.js.map +1 -1
- package/lib/commands/start/types/StartOptions.d.ts +6 -0
- package/lib/commands/start/types/StartOptions.d.ts.map +1 -1
- package/lib/commands/start/types/StartOptions.js.map +1 -1
- package/lib/commands/sync/execute.js +4 -4
- package/lib/commands/sync/execute.js.map +1 -1
- package/lib/commands/unlink/execute.d.ts.map +1 -1
- package/lib/commands/unlink/execute.js +5 -6
- package/lib/commands/unlink/execute.js.map +1 -1
- package/lib/types/CommandAction.d.ts +7 -8
- package/lib/types/CommandAction.d.ts.map +1 -1
- package/lib/types/CommandAction.js.map +1 -1
- package/lib/types/SharedOptions.d.ts +4 -0
- package/lib/types/SharedOptions.d.ts.map +1 -1
- package/lib/types/SharedOptions.js.map +1 -1
- package/lib/utilities/CloudpackCommand.d.ts +7 -1
- package/lib/utilities/CloudpackCommand.d.ts.map +1 -1
- package/lib/utilities/CloudpackCommand.js +6 -3
- package/lib/utilities/CloudpackCommand.js.map +1 -1
- package/lib/utilities/CommandExecutor.d.ts.map +1 -1
- package/lib/utilities/CommandExecutor.js +7 -2
- package/lib/utilities/CommandExecutor.js.map +1 -1
- package/lib/utilities/runPrerequisites.d.ts +1 -1
- package/lib/utilities/runPrerequisites.d.ts.map +1 -1
- package/lib/utilities/runPrerequisites.js +2 -2
- package/lib/utilities/runPrerequisites.js.map +1 -1
- package/lib/utilities/stopServers.d.ts +13 -0
- package/lib/utilities/stopServers.d.ts.map +1 -0
- package/lib/utilities/stopServers.js +18 -0
- package/lib/utilities/stopServers.js.map +1 -0
- package/package.json +11 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runPrerequisites.d.ts","sourceRoot":"","sources":["../../src/utilities/runPrerequisites.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;IACpC,
|
|
1
|
+
{"version":3,"file":"runPrerequisites.d.ts","sourceRoot":"","sources":["../../src/utilities/runPrerequisites.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,eAAe,CAAC;CAClC,QAWA"}
|
|
@@ -4,12 +4,12 @@ import spawn from 'cross-spawn';
|
|
|
4
4
|
* @param config - The Cloudpack config of containing a list of prerequisites to run
|
|
5
5
|
*/
|
|
6
6
|
export function runPrerequisites(options) {
|
|
7
|
-
const { config,
|
|
7
|
+
const { config, appPath, telemetryClient } = options;
|
|
8
8
|
telemetryClient.performance.track('RUN_PREREQUISITES', () => {
|
|
9
9
|
const dependsOn = config?.dependsOn;
|
|
10
10
|
if (dependsOn) {
|
|
11
11
|
for (const [command, args] of dependsOn) {
|
|
12
|
-
spawn.sync(command, args, { stdio: 'inherit', cwd, shell: true });
|
|
12
|
+
spawn.sync(command, args, { stdio: 'inherit', cwd: appPath, shell: true });
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runPrerequisites.js","sourceRoot":"","sources":["../../src/utilities/runPrerequisites.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAIhC;IACC,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"runPrerequisites.js","sourceRoot":"","sources":["../../src/utilities/runPrerequisites.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAIhC;IACC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IAErD,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC1D,MAAM,SAAS,GAAG,MAAM,EAAE,SAAS,CAAC;QACpC,IAAI,SAAS,EAAE,CAAC;YACd,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC;gBACxC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { CloudpackConfig } from '@ms-cloudpack/common-types';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport spawn from 'cross-spawn';\n\n/**\n * Runs the pre-requisites specified in the given Cloudpack config\n * @param config - The Cloudpack config of containing a list of prerequisites to run\n */\nexport function runPrerequisites(options: {\n config: CloudpackConfig | undefined;\n appPath: string;\n telemetryClient: TelemetryClient;\n}) {\n const { config, appPath, telemetryClient } = options;\n\n telemetryClient.performance.track('RUN_PREREQUISITES', () => {\n const dependsOn = config?.dependsOn;\n if (dependsOn) {\n for (const [command, args] of dependsOn) {\n spawn.sync(command, args, { stdio: 'inherit', cwd: appPath, shell: true });\n }\n }\n });\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommandActionParams } from '../types/CommandAction.ts';
|
|
2
|
+
type ExitFunction = CommandActionParams<object>['exit'];
|
|
3
|
+
/**
|
|
4
|
+
* Set the exit function to be used for `stopServers` (see that function for more details).
|
|
5
|
+
* Called by `start`'s executor.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setStopServersFunction(exit: ExitFunction): void;
|
|
8
|
+
/**
|
|
9
|
+
* Emulate the user pressing ctrl+C for the start command (no-op for other commands).
|
|
10
|
+
*/
|
|
11
|
+
export declare function stopServers(): Promise<void>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=stopServers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stopServers.d.ts","sourceRoot":"","sources":["../../src/utilities/stopServers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIrE,KAAK,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAGxD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,YAAY,QAExD;AAED;;GAEG;AACH,wBAAsB,WAAW,kBAKhC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
let exitFunction;
|
|
2
|
+
/**
|
|
3
|
+
* Set the exit function to be used for `stopServers` (see that function for more details).
|
|
4
|
+
* Called by `start`'s executor.
|
|
5
|
+
*/
|
|
6
|
+
export function setStopServersFunction(exit) {
|
|
7
|
+
exitFunction = exit;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Emulate the user pressing ctrl+C for the start command (no-op for other commands).
|
|
11
|
+
*/
|
|
12
|
+
export async function stopServers() {
|
|
13
|
+
if (exitFunction) {
|
|
14
|
+
await exitFunction({ exitCode: 0, message: 'stopServers called' });
|
|
15
|
+
exitFunction = undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=stopServers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stopServers.js","sourceRoot":"","sources":["../../src/utilities/stopServers.ts"],"names":[],"mappings":"AAKA,IAAI,YAAsC,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAkB;IACvD,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC;QACnE,YAAY,GAAG,SAAS,CAAC;IAC3B,CAAC;AACH,CAAC","sourcesContent":["import type { CommandActionParams } from '../types/CommandAction.ts';\n\n// This is in a separate file so that unrelated tests don't have to import the `start` executor.\n\ntype ExitFunction = CommandActionParams<object>['exit'];\nlet exitFunction: ExitFunction | undefined;\n\n/**\n * Set the exit function to be used for `stopServers` (see that function for more details).\n * Called by `start`'s executor.\n */\nexport function setStopServersFunction(exit: ExitFunction) {\n exitFunction = exit;\n}\n\n/**\n * Emulate the user pressing ctrl+C for the start command (no-op for other commands).\n */\nexport async function stopServers() {\n if (exitFunction) {\n await exitFunction({ exitCode: 0, message: 'stopServers called' });\n exitFunction = undefined;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"description": "The Cloudpack command line interface - a tool for managing fast inner and outer looping in web apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -10,24 +10,25 @@
|
|
|
10
10
|
"cloudpack": "./bin/cloudpack.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@ms-cloudpack/api-server": "^0.
|
|
14
|
-
"@ms-cloudpack/app-server": "^0.15.
|
|
15
|
-
"@ms-cloudpack/common-types": "^0.19.
|
|
16
|
-
"@ms-cloudpack/config": "^0.
|
|
13
|
+
"@ms-cloudpack/api-server": "^0.51.0",
|
|
14
|
+
"@ms-cloudpack/app-server": "^0.15.4",
|
|
15
|
+
"@ms-cloudpack/common-types": "^0.19.1",
|
|
16
|
+
"@ms-cloudpack/config": "^0.28.0",
|
|
17
17
|
"@ms-cloudpack/feature-flags": "^0.1.1",
|
|
18
18
|
"@ms-cloudpack/json-utilities": "^0.1.7",
|
|
19
|
-
"@ms-cloudpack/overlay": "^0.17.
|
|
20
|
-
"@ms-cloudpack/package-utilities": "^10.0.
|
|
19
|
+
"@ms-cloudpack/overlay": "^0.17.57",
|
|
20
|
+
"@ms-cloudpack/package-utilities": "^10.0.1",
|
|
21
21
|
"@ms-cloudpack/path-string-parsing": "^1.2.4",
|
|
22
|
-
"@ms-cloudpack/path-utilities": "^2.7.
|
|
22
|
+
"@ms-cloudpack/path-utilities": "^2.7.38",
|
|
23
23
|
"@ms-cloudpack/remote-cache": "^0.8.6",
|
|
24
|
-
"@ms-cloudpack/setup-utilities": "^0.
|
|
24
|
+
"@ms-cloudpack/setup-utilities": "^0.2.0",
|
|
25
25
|
"@ms-cloudpack/task-reporter": "^0.14.4",
|
|
26
26
|
"@ms-cloudpack/telemetry": "^0.6.1",
|
|
27
27
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
28
28
|
"commander": "^11.1.0",
|
|
29
29
|
"cross-spawn": "^7.0.3",
|
|
30
30
|
"didyoumean": "^1.2.2",
|
|
31
|
+
"get-port": "^7.0.0",
|
|
31
32
|
"glob-hasher": "^1.4.2",
|
|
32
33
|
"open": "^9.0.0",
|
|
33
34
|
"prompts": "^2.4.2",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"workspace-tools": "^0.36.4"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@ms-cloudpack/common-types": "^0.19.
|
|
39
|
+
"@ms-cloudpack/common-types": "^0.19.1",
|
|
39
40
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
40
41
|
"@ms-cloudpack/scripts": "^0.0.1",
|
|
41
42
|
"@ms-cloudpack/test-utilities": "^0.5.0",
|