@ms-cloudpack/cli 0.76.4 → 0.76.6
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/utilities/discoverLocalAppPaths.d.ts.map +1 -1
- package/lib/utilities/discoverLocalAppPaths.js +3 -4
- package/lib/utilities/discoverLocalAppPaths.js.map +1 -1
- package/lib/utilities/readLocalConfigs.d.ts +4 -1
- package/lib/utilities/readLocalConfigs.d.ts.map +1 -1
- package/lib/utilities/readLocalConfigs.js +5 -2
- package/lib/utilities/readLocalConfigs.js.map +1 -1
- package/lib/utilities/readRemoteConfigs.d.ts +5 -1
- package/lib/utilities/readRemoteConfigs.d.ts.map +1 -1
- package/lib/utilities/readRemoteConfigs.js +10 -9
- package/lib/utilities/readRemoteConfigs.js.map +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discoverLocalAppPaths.d.ts","sourceRoot":"","sources":["../../src/utilities/discoverLocalAppPaths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discoverLocalAppPaths.d.ts","sourceRoot":"","sources":["../../src/utilities/discoverLocalAppPaths.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAE3C;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;IAEnD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,iBAAiB,CAAC,CAiFxC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { appConfigFileGlob } from '@ms-cloudpack/config';
|
|
2
2
|
import { PackageDefinitions } from '@ms-cloudpack/package-utilities';
|
|
3
3
|
import { globSync } from 'tinyglobby';
|
|
4
|
-
import fs from 'fs';
|
|
5
4
|
import path from 'path';
|
|
6
5
|
import prompts from 'prompts';
|
|
7
6
|
/**
|
|
@@ -15,12 +14,12 @@ import prompts from 'prompts';
|
|
|
15
14
|
export async function discoverLocalAppPaths(params) {
|
|
16
15
|
const { cwd, desiredApp, discover } = params;
|
|
17
16
|
const multiApp = discover === 'multi';
|
|
18
|
-
if (!desiredApp &&
|
|
17
|
+
if (!desiredApp && globSync(`./${appConfigFileGlob}`, { cwd })?.length) {
|
|
19
18
|
// If no specific app was requested, and the cwd is a cloudpack app, just use that.
|
|
20
19
|
return [cwd];
|
|
21
20
|
}
|
|
22
21
|
// Get all cloudpack app paths based on the presence of cloudpack.config.json
|
|
23
|
-
const cloudpackAppPaths = (globSync(
|
|
22
|
+
const cloudpackAppPaths = (globSync(`**/${appConfigFileGlob}`, { cwd, ignore: ['**/node_modules/**'] }) ?? []).map((file) => path.join(cwd, path.dirname(file)));
|
|
24
23
|
if (!cloudpackAppPaths.length) {
|
|
25
24
|
// Include the cwd if there are no configs found, since it's possible to run start or init
|
|
26
25
|
// without a config.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discoverLocalAppPaths.js","sourceRoot":"","sources":["../../src/utilities/discoverLocalAppPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"discoverLocalAppPaths.js","sourceRoot":"","sources":["../../src/utilities/discoverLocalAppPaths.ts"],"names":[],"mappings":"AAA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M,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,kEAAkE;IAClE,0DAA0D;IAC1D,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAyB;QACrD,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,kCAAkC;QAC3C,OAAO,EAAE,UAAU;KACpB,CAAC,CAAC;IAEH,wDAAwD;IACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAClB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,CAAC,QAAQ,CAAC,GAAa,CAAC,CAAC;AAClC,CAAC","sourcesContent":["import { appConfigFileGlob } from '@ms-cloudpack/config';\nimport { PackageDefinitions } from '@ms-cloudpack/package-utilities';\nimport { globSync } from 'tinyglobby';\nimport path from 'path';\nimport prompts from 'prompts';\nimport type { Choice } from 'prompts';\nimport type { AppPathDiscoveryMode } from '../types/AppPathDiscoveryMode.js';\nimport type { CommandExitParams } from '../types/CommandAction.js';\n\nexport type _AppPromptQuestionName = 'app';\n\n/**\n * Gets the appPath from which Cloudpack will run. If the CWD is a Cloudpack-enabled app,\n * we'll use that; otherwise, we'll scan for Cloudpack-enabled app and present the user\n * with a menu. If no apps are found, Cloudpack will just try to run in the CWD anyway.\n *\n * @returns App path(s) (just one unless `discover: 'multi'`), or an exit options object if\n * there was an error.\n */\nexport async function discoverLocalAppPaths(params: {\n /** Working directory to start from. */\n cwd: string;\n\n /**\n * How to determine the app path(s). (`--app` in the docs refers to `desiredApp` here.)\n * @default 'single'\n */\n discover?: Exclude<AppPathDiscoveryMode, 'remote'>;\n\n /**\n * Desired app name or substring, from the `--app` option.\n * - If there's an exact match, only that app will be returned.\n * - If multiple apps match a substring, see `discover` for behavior.\n * - If no match, it's an error.\n */\n desiredApp?: string;\n}): Promise<string[] | CommandExitParams> {\n const { cwd, desiredApp, discover } = params;\n const multiApp = discover === 'multi';\n\n if (!desiredApp && globSync(`./${appConfigFileGlob}`, { cwd })?.length) {\n // If no specific app was requested, and the cwd is a cloudpack app, just use that.\n return [cwd];\n }\n\n // Get all cloudpack app paths based on the presence of cloudpack.config.json\n const cloudpackAppPaths = (globSync(`**/${appConfigFileGlob}`, { cwd, ignore: ['**/node_modules/**'] }) ?? []).map(\n (file) => path.join(cwd, path.dirname(file)),\n );\n\n if (!cloudpackAppPaths.length) {\n // Include the cwd if there are no configs found, since it's possible to run start or init\n // without a config.\n cloudpackAppPaths.push(cwd);\n }\n\n if (!desiredApp && (multiApp || cloudpackAppPaths.length === 1)) {\n // Return all apps found if we're in multi-app mode or only one app was found\n // (and no specific app was requested).\n return cloudpackAppPaths;\n }\n\n // Get each app's name and description, filtered by `desiredApp` if specified.\n // (These use Choice format in case they're later used in a prompt.)\n const packages = new PackageDefinitions();\n const appChoices = (\n await Promise.all<Omit<Choice, 'value'> & { value: string }>(\n cloudpackAppPaths.map(async (dir) => {\n const pkg = await packages.get(dir);\n return {\n title: pkg.name,\n description: pkg?.description ?? 'An awesome app that would be even more awesome with a proper description',\n value: dir,\n };\n }),\n )\n )\n .filter((choice) => !desiredApp || choice.title.includes(desiredApp))\n .sort((c1, c2) => c1.title.localeCompare(c2.title));\n\n // Figure out if there are any matches for `desiredApp`\n if (desiredApp) {\n if (!appChoices.length) {\n return {\n message: `No Cloudpack apps found matching the name \"${desiredApp}\".`,\n hasErrors: true,\n };\n }\n\n // Prefer an exact match\n const exactMatch = appChoices.find((choice) => choice.title === desiredApp);\n if (exactMatch) {\n return [exactMatch.value];\n }\n\n // If there's no exact match, it means at least one substring match was found\n if (multiApp || appChoices.length === 1) {\n // Return them all if we're in multi-app mode or only one match was found\n return appChoices.map((choice) => choice.value);\n }\n }\n\n // There are multiple candidates, so prompt the user to choose one\n // (implicitly, we're in single-app mode if we reach here)\n const response = await prompts<_AppPromptQuestionName>({\n type: 'select',\n name: 'app',\n message: 'Select the app you want to start',\n choices: appChoices,\n });\n\n // This will be undefined if the user cancels the prompt\n if (!response.app) {\n return { isInterrupted: true, message: '' };\n }\n\n return [response.app as string];\n}\n"]}
|
|
@@ -3,5 +3,8 @@ import { type ReadConfigOptions } from '@ms-cloudpack/config';
|
|
|
3
3
|
export declare class InvalidCloudpackConfigError extends Error {
|
|
4
4
|
constructor(message: string);
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Read local cloudpack configs for multiple apps, and augment with the given options.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readLocalConfigs(appPaths: string[], readConfigOptions: ReadConfigOptions): Promise<Record<string, CloudpackConfig>>;
|
|
7
10
|
//# sourceMappingURL=readLocalConfigs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLocalConfigs.d.ts","sourceRoot":"","sources":["../../src/utilities/readLocalConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED,
|
|
1
|
+
{"version":3,"file":"readLocalConfigs.d.ts","sourceRoot":"","sources":["../../src/utilities/readLocalConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAAE,EAClB,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAgB1C"}
|
|
@@ -5,7 +5,10 @@ export class InvalidCloudpackConfigError extends Error {
|
|
|
5
5
|
this.name = 'InvalidCloudpackConfigError';
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Read local cloudpack configs for multiple apps, and augment with the given options.
|
|
10
|
+
*/
|
|
11
|
+
export async function readLocalConfigs(appPaths, readConfigOptions) {
|
|
9
12
|
const configs = {};
|
|
10
13
|
for (const appPath of appPaths) {
|
|
11
14
|
let config;
|
|
@@ -18,5 +21,5 @@ export const readLocalConfigs = async (appPaths, readConfigOptions) => {
|
|
|
18
21
|
configs[appPath] = config;
|
|
19
22
|
}
|
|
20
23
|
return configs;
|
|
21
|
-
}
|
|
24
|
+
}
|
|
22
25
|
//# sourceMappingURL=readLocalConfigs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLocalConfigs.js","sourceRoot":"","sources":["../../src/utilities/readLocalConfigs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA0B,MAAM,sBAAsB,CAAC;AAE1E,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF;AAED,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"readLocalConfigs.js","sourceRoot":"","sources":["../../src/utilities/readLocalConfigs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA0B,MAAM,sBAAsB,CAAC;AAE1E,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,QAAkB,EAClB,iBAAoC;IAEpC,MAAM,OAAO,GAAoC,EAAE,CAAC;IAEpD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,MAAuB,CAAC;QAE5B,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,2BAA2B,CAAC,+BAA+B,OAAO,KAAM,GAAa,CAAC,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC;QACpH,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;IAC5B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import type { CloudpackConfig } from '@ms-cloudpack/common-types';\nimport { readConfig, type ReadConfigOptions } from '@ms-cloudpack/config';\n\nexport class InvalidCloudpackConfigError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidCloudpackConfigError';\n }\n}\n\n/**\n * Read local cloudpack configs for multiple apps, and augment with the given options.\n */\nexport async function readLocalConfigs(\n appPaths: string[],\n readConfigOptions: ReadConfigOptions,\n): Promise<Record<string, CloudpackConfig>> {\n const configs: Record<string, CloudpackConfig> = {};\n\n for (const appPath of appPaths) {\n let config: CloudpackConfig;\n\n try {\n config = await readConfig(appPath, readConfigOptions);\n } catch (err) {\n throw new InvalidCloudpackConfigError(`Invalid cloudpack config in ${appPath}: ${(err as Error).message || err}`);\n }\n\n configs[appPath] = config;\n }\n\n return configs;\n}\n"]}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { CloudpackConfig } from '@ms-cloudpack/common-types';
|
|
2
2
|
import { type ReadConfigOptions } from '@ms-cloudpack/config';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Read remote configs from the `cloudpack-context.json` from multiple paths, and augment with
|
|
5
|
+
* the given options.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readRemoteConfigs(appPaths: string[], readConfigOptions: ReadConfigOptions): Promise<Record<string, CloudpackConfig>>;
|
|
4
8
|
//# sourceMappingURL=readRemoteConfigs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readRemoteConfigs.d.ts","sourceRoot":"","sources":["../../src/utilities/readRemoteConfigs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"readRemoteConfigs.d.ts","sourceRoot":"","sources":["../../src/utilities/readRemoteConfigs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEhF;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAAE,EAClB,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAS1C"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { readSerializedContext } from '@ms-cloudpack/api-server';
|
|
2
|
+
import { augmentAppConfig } from '@ms-cloudpack/config';
|
|
3
|
+
/**
|
|
4
|
+
* Read remote configs from the `cloudpack-context.json` from multiple paths, and augment with
|
|
5
|
+
* the given options.
|
|
6
|
+
*/
|
|
7
|
+
export async function readRemoteConfigs(appPaths, readConfigOptions) {
|
|
4
8
|
const configs = {};
|
|
5
9
|
for (const appPath of appPaths) {
|
|
6
|
-
const cloudAppContext = await
|
|
7
|
-
|
|
8
|
-
throw new Error(`Could not find cloudpack-context.json in ${appPath}. This must be a Cloudpack bug, please report it.`);
|
|
9
|
-
}
|
|
10
|
-
configs[appPath] = addReadAppConfigOptions(cloudAppContext.config, readConfigOptions);
|
|
10
|
+
const cloudAppContext = await readSerializedContext(appPath);
|
|
11
|
+
configs[appPath] = augmentAppConfig(cloudAppContext.config, readConfigOptions);
|
|
11
12
|
}
|
|
12
13
|
return configs;
|
|
13
|
-
}
|
|
14
|
+
}
|
|
14
15
|
//# sourceMappingURL=readRemoteConfigs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readRemoteConfigs.js","sourceRoot":"","sources":["../../src/utilities/readRemoteConfigs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readRemoteConfigs.js","sourceRoot":"","sources":["../../src/utilities/readRemoteConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAA0B,MAAM,sBAAsB,CAAC;AAEhF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,QAAkB,EAClB,iBAAoC;IAEpC,MAAM,OAAO,GAAoC,EAAE,CAAC;IAEpD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,eAAe,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7D,OAAO,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { readSerializedContext } from '@ms-cloudpack/api-server';\nimport type { CloudpackConfig } from '@ms-cloudpack/common-types';\nimport { augmentAppConfig, type ReadConfigOptions } from '@ms-cloudpack/config';\n\n/**\n * Read remote configs from the `cloudpack-context.json` from multiple paths, and augment with\n * the given options.\n */\nexport async function readRemoteConfigs(\n appPaths: string[],\n readConfigOptions: ReadConfigOptions,\n): Promise<Record<string, CloudpackConfig>> {\n const configs: Record<string, CloudpackConfig> = {};\n\n for (const appPath of appPaths) {\n const cloudAppContext = await readSerializedContext(appPath);\n configs[appPath] = augmentAppConfig(cloudAppContext.config, readConfigOptions);\n }\n\n return configs;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/cli",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.6",
|
|
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",
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
"cloudpack": "./bin/cloudpack.js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@ms-cloudpack/api-server": "^0.64.
|
|
22
|
-
"@ms-cloudpack/app-server": "^0.19.
|
|
23
|
-
"@ms-cloudpack/bundler": "^0.25.
|
|
24
|
-
"@ms-cloudpack/bundler-capabilities": "^0.2.
|
|
25
|
-
"@ms-cloudpack/common-types": "^0.26.
|
|
26
|
-
"@ms-cloudpack/config": "^0.
|
|
27
|
-
"@ms-cloudpack/create-express-app": "^1.10.
|
|
21
|
+
"@ms-cloudpack/api-server": "^0.64.6",
|
|
22
|
+
"@ms-cloudpack/app-server": "^0.19.3",
|
|
23
|
+
"@ms-cloudpack/bundler": "^0.25.20",
|
|
24
|
+
"@ms-cloudpack/bundler-capabilities": "^0.2.32",
|
|
25
|
+
"@ms-cloudpack/common-types": "^0.26.2",
|
|
26
|
+
"@ms-cloudpack/config": "^0.37.0",
|
|
27
|
+
"@ms-cloudpack/create-express-app": "^1.10.41",
|
|
28
28
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
29
29
|
"@ms-cloudpack/json-utilities": "^0.1.10",
|
|
30
|
-
"@ms-cloudpack/link-proxy": "^0.2.
|
|
31
|
-
"@ms-cloudpack/overlay": "^0.19.
|
|
32
|
-
"@ms-cloudpack/package-utilities": "^12.3.
|
|
30
|
+
"@ms-cloudpack/link-proxy": "^0.2.20",
|
|
31
|
+
"@ms-cloudpack/overlay": "^0.19.16",
|
|
32
|
+
"@ms-cloudpack/package-utilities": "^12.3.18",
|
|
33
33
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
34
|
-
"@ms-cloudpack/path-utilities": "^3.1.
|
|
35
|
-
"@ms-cloudpack/remote-cache": "^0.11.
|
|
36
|
-
"@ms-cloudpack/setup-utilities": "^0.5.
|
|
34
|
+
"@ms-cloudpack/path-utilities": "^3.1.12",
|
|
35
|
+
"@ms-cloudpack/remote-cache": "^0.11.28",
|
|
36
|
+
"@ms-cloudpack/setup-utilities": "^0.5.33",
|
|
37
37
|
"@ms-cloudpack/task-reporter": "^0.17.2",
|
|
38
|
-
"@ms-cloudpack/telemetry": "^0.11.
|
|
38
|
+
"@ms-cloudpack/telemetry": "^0.11.30",
|
|
39
39
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
40
40
|
"commander": "^14.0.0",
|
|
41
41
|
"cross-spawn": "^7.0.3",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"workspace-tools": "^0.38.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@ms-cloudpack/common-types": "^0.26.
|
|
51
|
+
"@ms-cloudpack/common-types": "^0.26.2",
|
|
52
52
|
"@ms-cloudpack/common-types-browser": "^0.6.2",
|
|
53
53
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
54
54
|
"@ms-cloudpack/scripts": "^0.0.1",
|