@ms-cloudpack/cli 0.57.9 → 0.58.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/commands/bundle/execute.d.ts.map +1 -1
- package/lib/commands/bundle/execute.js +14 -5
- package/lib/commands/bundle/execute.js.map +1 -1
- package/lib/commands/bundle/index.d.ts.map +1 -1
- package/lib/commands/bundle/index.js +2 -1
- package/lib/commands/bundle/index.js.map +1 -1
- package/lib/commands/bundle/types/BundleOptions.d.ts +4 -1
- package/lib/commands/bundle/types/BundleOptions.d.ts.map +1 -1
- package/lib/commands/bundle/types/BundleOptions.js.map +1 -1
- package/lib/commands/info/nonSemverDeps/getNonSemverDeps.js.map +1 -1
- package/lib/commands/init/evaluateImportsForOverrides.d.ts +1 -2
- package/lib/commands/init/evaluateImportsForOverrides.d.ts.map +1 -1
- package/lib/commands/init/evaluateImportsForOverrides.js.map +1 -1
- package/lib/commands/init/evaluatePath.d.ts +1 -2
- package/lib/commands/init/evaluatePath.d.ts.map +1 -1
- package/lib/commands/init/evaluatePath.js.map +1 -1
- package/lib/commands/init/execute.d.ts.map +1 -1
- package/lib/commands/init/execute.js +10 -4
- package/lib/commands/init/execute.js.map +1 -1
- package/lib/commands/init/formatInitSummary.d.ts +5 -1
- package/lib/commands/init/formatInitSummary.d.ts.map +1 -1
- package/lib/commands/init/formatInitSummary.js +16 -10
- package/lib/commands/init/formatInitSummary.js.map +1 -1
- package/lib/commands/init/init.d.ts +8 -2
- package/lib/commands/init/init.d.ts.map +1 -1
- package/lib/commands/init/init.js +4 -5
- package/lib/commands/init/init.js.map +1 -1
- package/lib/commands/init/neverExclude.d.ts +1 -1
- package/lib/commands/init/neverExclude.js.map +1 -1
- package/lib/commands/init/optimizeDependencies.d.ts +1 -2
- package/lib/commands/init/optimizeDependencies.d.ts.map +1 -1
- package/lib/commands/init/optimizeDependencies.js.map +1 -1
- package/lib/commands/init/types/InitPackageResult.d.ts +1 -1
- package/lib/commands/init/types/InitPackageResult.d.ts.map +1 -1
- package/lib/commands/init/types/InitPackageResult.js.map +1 -1
- package/lib/commands/init/types/InitPackageResultErrors.d.ts +1 -1
- package/lib/commands/init/types/InitPackageResultErrors.d.ts.map +1 -1
- package/lib/commands/init/types/InitPackageResultErrors.js.map +1 -1
- package/lib/commands/init/types/InitPackageResultWarnings.d.ts +1 -1
- package/lib/commands/init/types/InitPackageResultWarnings.d.ts.map +1 -1
- package/lib/commands/init/types/InitPackageResultWarnings.js.map +1 -1
- package/lib/commands/init/verifyExports.d.ts +1 -1
- package/lib/commands/init/verifyExports.d.ts.map +1 -1
- package/lib/commands/init/verifyExports.js.map +1 -1
- package/lib/commands/sync/execute.d.ts.map +1 -1
- package/lib/commands/sync/execute.js +3 -5
- package/lib/commands/sync/execute.js.map +1 -1
- package/lib/common/CommandExecutor.d.ts +1 -0
- package/lib/common/CommandExecutor.d.ts.map +1 -1
- package/lib/common/CommandExecutor.js +11 -7
- package/lib/common/CommandExecutor.js.map +1 -1
- package/lib/common/checkFeatures.d.ts +1 -1
- package/lib/common/checkFeatures.js +1 -1
- package/lib/common/checkFeatures.js.map +1 -1
- package/lib/common/findPackageOverride.d.ts +1 -1
- package/lib/common/findPackageOverride.js.map +1 -1
- package/lib/common/getMergedFeatureFlags.d.ts +1 -1
- package/lib/common/getMergedFeatureFlags.js +1 -1
- package/lib/common/getMergedFeatureFlags.js.map +1 -1
- package/lib/common/mergeFeatures.d.ts +1 -1
- package/lib/common/mergeFeatures.js +1 -1
- package/lib/common/mergeFeatures.js.map +1 -1
- package/lib/common/runPrerequisites.d.ts +1 -1
- package/lib/common/runPrerequisites.js.map +1 -1
- package/lib/types/CommandAction.d.ts +20 -12
- package/lib/types/CommandAction.d.ts.map +1 -1
- package/lib/types/CommandAction.js.map +1 -1
- package/package.json +9 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMergedFeatureFlags.js","sourceRoot":"","sources":["../../src/common/getMergedFeatureFlags.ts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SharedOptions.js';\nimport { downloadFeatureFlags, getFeatureFlags } from '@ms-cloudpack/feature-flags';\nimport { allFeatures, type CloudpackConfig } from '@ms-cloudpack/
|
|
1
|
+
{"version":3,"file":"getMergedFeatureFlags.js","sourceRoot":"","sources":["../../src/common/getMergedFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,WAAW,EAAwB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAuB,EACvB,aAA4B,EAC5B,OAAe,EACf,OAAgB;IAEhB,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAExD,iGAAiG;IACjG,MAAM,kBAAkB,GACtB,OAAO,IAAI,cAAc;QACvB,CAAC,CAAC,eAAe,CAAC;YACd,eAAe,EAAE,aAAa,OAAO,EAAE;YACvC,cAAc;SACf,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC;IAET,8DAA8D;IAC9D,MAAM,aAAa,GAAG,IAAI,GAAG,CAAS,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAChE,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,0DAA0D;IAC1D,0EAA0E;IAC1E,KAAK,oBAAoB,EAAE,CAAC;IAE5B,0DAA0D;IAC1D,MAAM,cAAc,GAAG,aAAa,CAAC;QACnC,kBAAkB;QAClB,cAAc,EAAE,MAAM,CAAC,QAAQ;QAC/B,mBAAmB,EAAE,aAAa,CAAC,QAAQ;KAC5C,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import { mergeFeatures } from './mergeFeatures.js';\nimport type { SharedOptions } from '../types/SharedOptions.js';\nimport { downloadFeatureFlags, getFeatureFlags } from '@ms-cloudpack/feature-flags';\nimport { allFeatures, type CloudpackConfig } from '@ms-cloudpack/common-types';\nimport { getRepositoryName } from '../utilities/getRepositoryName.js';\n\nexport async function getMergedFeatureFlags(\n config: CloudpackConfig,\n actionOptions: SharedOptions,\n appPath: string,\n appName?: string,\n) {\n const repositoryName = await getRepositoryName(appPath);\n\n // Get the feature flags for the current application. (ie: cloudpack.@ms-cloudpack/onedrive-mock)\n const remoteFeatureFlags =\n appName && repositoryName\n ? getFeatureFlags({\n applicationName: `cloudpack.${appName}`,\n repositoryName,\n })\n : {};\n\n // remove invalid remove feature flags from remoteFeatureFlags\n const validFeatures = new Set<string>(Object.keys(allFeatures));\n Object.keys(remoteFeatureFlags).forEach((key) => {\n if (!validFeatures.has(key)) {\n delete remoteFeatureFlags[key];\n }\n });\n\n // Kick off an async download operation for feature flags.\n // Downloaded feature flags will be used by the cloudpack in the next run.\n void downloadFeatureFlags();\n\n // Merge in any additional features from the command line.\n const mergedFeatures = mergeFeatures({\n remoteFeatureFlags,\n configFeatures: config.features,\n commandLineFeatures: actionOptions.features,\n });\n\n return mergedFeatures;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { allFeatures } from '@ms-cloudpack/
|
|
1
|
+
import { allFeatures } from '@ms-cloudpack/common-types';
|
|
2
2
|
export declare function mergeFeatures<TFeatureSet extends Record<string, unknown> = typeof allFeatures>({ configFeatures, commandLineFeatures, remoteFeatureFlags, featureSet, }: {
|
|
3
3
|
configFeatures?: {
|
|
4
4
|
[key in keyof typeof featureSet]?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { allFeatures } from '@ms-cloudpack/
|
|
1
|
+
import { allFeatures } from '@ms-cloudpack/common-types';
|
|
2
2
|
export function mergeFeatures({ configFeatures, commandLineFeatures, remoteFeatureFlags, featureSet = allFeatures, }) {
|
|
3
3
|
const featureList = Object.keys(featureSet);
|
|
4
4
|
const features = { ...remoteFeatureFlags, ...configFeatures };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeFeatures.js","sourceRoot":"","sources":["../../src/common/mergeFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,UAAU,aAAa,CAAmE,EAC9F,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,GAAG,WAAqC,GAMnD;IACC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,EAAE,GAAG,kBAAkB,EAAE,GAAG,cAAc,EAAE,CAAC;IAE9D,mBAAmB,EAAE,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;QAClD,yDAAyD;QACzD,MAAM,kBAAkB,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,kBAAkB,CAAC,WAAW,EAAE,CAAC;YACvG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAE5E,CAAC;QAEd,IAAI,kBAAkB,EAAE,CAAC;YACvB,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAA0D,CAAC;AACpE,CAAC","sourcesContent":["import { allFeatures } from '@ms-cloudpack/
|
|
1
|
+
{"version":3,"file":"mergeFeatures.js","sourceRoot":"","sources":["../../src/common/mergeFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,UAAU,aAAa,CAAmE,EAC9F,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,GAAG,WAAqC,GAMnD;IACC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,EAAE,GAAG,kBAAkB,EAAE,GAAG,cAAc,EAAE,CAAC;IAE9D,mBAAmB,EAAE,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;QAClD,yDAAyD;QACzD,MAAM,kBAAkB,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,kBAAkB,CAAC,WAAW,EAAE,CAAC;YACvG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAE5E,CAAC;QAEd,IAAI,kBAAkB,EAAE,CAAC;YACvB,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAA0D,CAAC;AACpE,CAAC","sourcesContent":["import { allFeatures } from '@ms-cloudpack/common-types';\n\nexport function mergeFeatures<TFeatureSet extends Record<string, unknown> = typeof allFeatures>({\n configFeatures,\n commandLineFeatures,\n remoteFeatureFlags,\n featureSet = allFeatures as unknown as TFeatureSet,\n}: {\n configFeatures?: { [key in keyof typeof featureSet]?: boolean };\n remoteFeatureFlags?: { [key in keyof typeof featureSet]?: boolean };\n commandLineFeatures?: string[];\n featureSet?: TFeatureSet;\n}) {\n const featureList = Object.keys(featureSet);\n const features = { ...remoteFeatureFlags, ...configFeatures };\n\n commandLineFeatures?.forEach((partialFeatureName) => {\n // Prefer an exact match, but fall back to partial match.\n const matchedFeatureName = (featureList.find((f) => f.toLowerCase() === partialFeatureName.toLowerCase()) ||\n featureList.find((f) => f.toLowerCase().indexOf(partialFeatureName.toLowerCase()) > -1)) as\n | keyof typeof features\n | undefined;\n\n if (matchedFeatureName) {\n features[matchedFeatureName] = true;\n }\n });\n\n return features as { [key in keyof typeof featureSet]?: boolean };\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CloudpackConfig } from '@ms-cloudpack/
|
|
1
|
+
import type { CloudpackConfig } from '@ms-cloudpack/common-types';
|
|
2
2
|
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
3
3
|
/**
|
|
4
4
|
* Runs the pre-requisites specified in the given Cloudpack config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runPrerequisites.js","sourceRoot":"","sources":["../../src/common/runPrerequisites.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAIhC;IACC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IAEjD,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,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { CloudpackConfig } from '@ms-cloudpack/
|
|
1
|
+
{"version":3,"file":"runPrerequisites.js","sourceRoot":"","sources":["../../src/common/runPrerequisites.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAIhC;IACC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IAEjD,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,CAAC,CAAC;YACvD,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 cwd: string;\n telemetryClient: TelemetryClient;\n}) {\n const { config, cwd, 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 });\n }\n }\n });\n}\n"]}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type { TaskReporter } from '@ms-cloudpack/task-reporter';
|
|
3
|
-
import type { CloudpackConfig } from '@ms-cloudpack/
|
|
3
|
+
import type { CloudpackConfig } from '@ms-cloudpack/common-types';
|
|
4
4
|
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
5
5
|
import type { AutoDispose } from './AutoDispose.js';
|
|
6
6
|
import type { SharedOptions } from './SharedOptions.js';
|
|
7
|
-
|
|
7
|
+
/** Context for running a command in a specific app (after initialization). */
|
|
8
|
+
export type AppCommandContext = {
|
|
8
9
|
appPath: string;
|
|
9
10
|
telemetryClient: TelemetryClient;
|
|
10
11
|
config: CloudpackConfig;
|
|
11
12
|
};
|
|
13
|
+
export interface CommandExitParams {
|
|
14
|
+
message: string;
|
|
15
|
+
hasErrors?: boolean;
|
|
16
|
+
exitCode?: number;
|
|
17
|
+
}
|
|
12
18
|
export interface CommandActionParams<TOptions extends object> {
|
|
13
19
|
/**
|
|
14
20
|
* Initial working directory (usually `process.cwd()` except in tests).
|
|
@@ -35,29 +41,31 @@ export interface CommandActionParams<TOptions extends object> {
|
|
|
35
41
|
autoDispose: AutoDispose;
|
|
36
42
|
/**
|
|
37
43
|
* This should be called at or near the beginning of the action to initialize the config,
|
|
38
|
-
* telemetry, and reporting. (See `
|
|
44
|
+
* telemetry, and reporting. (See `CommandExecutor._initialize` for implementation.)
|
|
39
45
|
* `initialize` can be called with either a single string, `appPath` or an a string[], `appPaths`.
|
|
40
|
-
*
|
|
41
|
-
* If it is called with a string
|
|
46
|
+
*
|
|
47
|
+
* If it is called with a single string, it returns `Promise<AppCommandContext>`
|
|
48
|
+
* If it is called with a string[], it returns `Promise<AppCommandContext[]>`
|
|
42
49
|
*/
|
|
43
50
|
initialize: {
|
|
44
51
|
(initializeOptions: {
|
|
45
52
|
appPath: string;
|
|
46
53
|
overrideOptions?: Partial<SharedOptions>;
|
|
47
|
-
}): Promise<
|
|
54
|
+
}): Promise<AppCommandContext>;
|
|
48
55
|
(initializeOptions: {
|
|
49
56
|
appPaths: string[];
|
|
50
57
|
overrideOptions?: Partial<SharedOptions>;
|
|
51
|
-
}): Promise<
|
|
58
|
+
}): Promise<AppCommandContext[]>;
|
|
52
59
|
};
|
|
53
60
|
/**
|
|
54
61
|
* This should be called at the end of the action to dispose resources, log completion,
|
|
55
|
-
* and exit the program. (See `
|
|
62
|
+
* and exit the program. (See `CommandExecutor._exit` for implementation.)
|
|
63
|
+
*/
|
|
64
|
+
exit: (result: CommandExitParams) => Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Set a callback to get the message to display if ctrl+C is pressed.
|
|
56
67
|
*/
|
|
57
|
-
|
|
58
|
-
exitCode: number;
|
|
59
|
-
message?: string;
|
|
60
|
-
}) => Promise<void>;
|
|
68
|
+
setInterruptMessageHandler: (getMessage: () => string) => void;
|
|
61
69
|
}
|
|
62
70
|
/**
|
|
63
71
|
* Command action function. This is the type of the `execute` function which should be exported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandAction.d.ts","sourceRoot":"","sources":["../../src/types/CommandAction.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"CommandAction.d.ts","sourceRoot":"","sources":["../../src/types/CommandAction.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,M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,mBAAmB,CAAC,QAAQ,GAAG,aAAa,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/G,MAAM,MAAM,mBAAmB,CAAC,QAAQ,IAAI;IAC1C,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandAction.js","sourceRoot":"","sources":["../../src/types/CommandAction.ts"],"names":[],"mappings":"","sourcesContent":["import type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { CloudpackConfig } from '@ms-cloudpack/
|
|
1
|
+
{"version":3,"file":"CommandAction.js","sourceRoot":"","sources":["../../src/types/CommandAction.ts"],"names":[],"mappings":"","sourcesContent":["import type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { CloudpackConfig } from '@ms-cloudpack/common-types';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport type { AutoDispose } from './AutoDispose.js';\nimport type { SharedOptions } from './SharedOptions.js';\n\n/** Context for running a command in a specific app (after initialization). */\nexport type AppCommandContext = {\n appPath: string;\n telemetryClient: TelemetryClient;\n config: CloudpackConfig;\n};\n\nexport interface CommandExitParams {\n message: string;\n hasErrors?: boolean;\n exitCode?: number;\n}\n\nexport interface CommandActionParams<TOptions extends object> {\n /**\n * Initial working directory (usually `process.cwd()` except in tests).\n * Note that this may differ from the `appPath` used by individual commands.\n */\n cwd: string;\n\n /**\n * Command-specific options, parsed from `process.argv`.\n * Types are generally defined in each command's `src/commands/<name>/types/<Name>Types.ts` module.\n * The command line options are defined in each command's `src/commands/<name>/index.ts` module.\n */\n options: TOptions;\n\n /**\n * Command-specific arguments. Arguments in commander are positional arguments that are not options.\n * For example, in `echo somestring`, `somestring` is an argument.\n */\n args: string[];\n\n reporter: TaskReporter;\n\n abortSignal: AbortSignal;\n\n /**\n * Function that can be called with any `Disposable`s that should be cleaned up automatically\n * when the program exits. (See `AutoDisposableList.add` for implementation.)\n */\n autoDispose: AutoDispose;\n\n /**\n * This should be called at or near the beginning of the action to initialize the config,\n * telemetry, and reporting. (See `CommandExecutor._initialize` for implementation.)\n * `initialize` can be called with either a single string, `appPath` or an a string[], `appPaths`.\n *\n * If it is called with a single string, it returns `Promise<AppCommandContext>`\n * If it is called with a string[], it returns `Promise<AppCommandContext[]>`\n */\n initialize: {\n (initializeOptions: { appPath: string; overrideOptions?: Partial<SharedOptions> }): Promise<AppCommandContext>;\n (initializeOptions: { appPaths: string[]; overrideOptions?: Partial<SharedOptions> }): Promise<AppCommandContext[]>;\n };\n\n /**\n * This should be called at the end of the action to dispose resources, log completion,\n * and exit the program. (See `CommandExecutor._exit` for implementation.)\n */\n exit: (result: CommandExitParams) => Promise<void>;\n\n /**\n * Set a callback to get the message to display if ctrl+C is pressed.\n */\n setInterruptMessageHandler: (getMessage: () => string) => void;\n}\n\n/**\n * Command action function. This is the type of the `execute` function which should be exported\n * from each command's `src/commands/<name>/execute.ts` module.\n */\nexport type CommandAction<TOptions> = (params: CommandActionParams<TOptions & SharedOptions>) => Promise<void>;\n\nexport type CommandActionModule<TOptions> = {\n execute: CommandAction<TOptions>;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.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,16 +10,15 @@
|
|
|
10
10
|
"cloudpack": "./bin/cloudpack.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@ms-cloudpack/api-server": "^0.
|
|
14
|
-
"@ms-cloudpack/app-server": "^0.
|
|
15
|
-
"@ms-cloudpack/bundle-server": "^0.2.
|
|
16
|
-
"@ms-cloudpack/
|
|
17
|
-
"@ms-cloudpack/config
|
|
13
|
+
"@ms-cloudpack/api-server": "^0.34.0",
|
|
14
|
+
"@ms-cloudpack/app-server": "^0.3.0",
|
|
15
|
+
"@ms-cloudpack/bundle-server": "^0.2.44",
|
|
16
|
+
"@ms-cloudpack/common-types": "^0.1.1",
|
|
17
|
+
"@ms-cloudpack/config": "^0.18.0",
|
|
18
18
|
"@ms-cloudpack/feature-flags": "^0.1.1",
|
|
19
19
|
"@ms-cloudpack/json-utilities": "^0.1.4",
|
|
20
|
-
"@ms-cloudpack/overlay": "^0.16.
|
|
21
|
-
"@ms-cloudpack/package-utilities": "^7.0
|
|
22
|
-
"@ms-cloudpack/path-string-parsing": "^1.2.1",
|
|
20
|
+
"@ms-cloudpack/overlay": "^0.16.93",
|
|
21
|
+
"@ms-cloudpack/package-utilities": "^7.1.0",
|
|
23
22
|
"@ms-cloudpack/path-utilities": "^2.6.1",
|
|
24
23
|
"@ms-cloudpack/remote-cache": "^0.6.2",
|
|
25
24
|
"@ms-cloudpack/task-reporter": "^0.11.3",
|
|
@@ -35,7 +34,7 @@
|
|
|
35
34
|
"workspace-tools": "^0.36.4"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@ms-cloudpack/
|
|
37
|
+
"@ms-cloudpack/common-types": "^0.1.1",
|
|
39
38
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
40
39
|
"@ms-cloudpack/scripts": "^0.0.1",
|
|
41
40
|
"@ms-cloudpack/test-utilities": "^0.5.0",
|