@ms-cloudpack/cli 0.76.3 → 0.76.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CommandExecutor.d.ts","sourceRoot":"","sources":["../../src/utilities/CommandExecutor.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAqB,MAAM,2BAA2B,CAAC;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAQ7E,MAAM,MAAM,0BAA0B,GAAG,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAEpF,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,0BAA0B,GAAG,0BAA0B;IAC7G,iCAAiC;IACjC,IAAI,EAAE,MAAM,EAAE,CAAC;IAEf,2CAA2C;IAC3C,OAAO,EAAE,QAAQ,CAAC;IAElB,uCAAuC;IACvC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAEjC,0CAA0C;IAC1C,cAAc,EAAE,cAAc,CAAC;IAE/B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CACzC;AAED;;GAEG;AAEH,qBAAa,eAAe,CAAC,QAAQ,SAAS,0BAA0B;IACtE,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,iBAAiB,CAAmC;IAC5D,OAAO,CAAC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Options,
158
158
  extraFeatures: this._options.features,
159
159
  extraDefineFlags: this._options.define,
160
+ enableDefaultFeatures: true,
160
161
  });
161
162
  const helpMessages = new Set(Object.values(configs)
162
163
  .filter((c) => c.helpMessage)
@@ -1 +1 @@
1
- {"version":3,"file":"CommandExecutor.js","sourceRoot":"","sources":["../../src/utilities/CommandExecutor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,GAAG,EACH,oBAAoB,EACpB,MAAM,GACP,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,cAAc,EAA2C,MAAM,yBAAyB,CAAC;AAClG,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA6BvD;;GAEG;AACH,qCAAqC;AACrC,MAAM,OAAO,eAAe;IAClB,QAAQ,CAAW;IACnB,QAAQ,CAA0B;IAClC,eAAe,CAAiB;IAChC,KAAK,CAAS;IACd,iBAAiB,CAAmC;IACpD,SAAS,CAAe;IACxB,mBAAmB,CAAqB;IACxC,cAAc,GAAG,KAAK,CAAC;IACvB,KAAK,CAAW;IAChB,YAA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C,SAAS,CAAC,QAAQ,CAAC;gBAC5B,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;gBAC3C,QAAQ,EAAE,QAAQ,KAAK,CAAC;aACzB,CAAC,CAAC;QACL,CAAC;QAED,eAAe,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAE3C,yEAAyE;QACzE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC","sourcesContent":["import type { ReadConfigOptions } from '@ms-cloudpack/config';\nimport type { CloudpackConfig, PackageJson } from '@ms-cloudpack/common-types';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport {\n TaskReporter,\n bold,\n debugLoggingConfig,\n defaultLoggingConfig,\n noLoggingConfig,\n red,\n verboseLoggingConfig,\n yellow,\n} from '@ms-cloudpack/task-reporter';\nimport { startTelemetry, type TelemetryApi, type TelemetryClient } from '@ms-cloudpack/telemetry';\nimport path from 'path';\nimport type { CommandAction, CommandExitParams, AppCommandContext } from '../types/CommandAction.js';\nimport type { ProgramOptions } from '../types/ProgramOptions.js';\nimport type { SharedOptions } from '../types/SharedOptions.js';\nimport { AutoDisposableList } from './AutoDisposableList.js';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\nimport { environmentInfo } from '@ms-cloudpack/environment';\nimport type { ReusedOptions } from '../types/ReusedOptions.js';\nimport type { AppPathDiscoveryMode } from '../types/AppPathDiscoveryMode.js';\nimport { discoverRemoteAppPaths } from './discoverRemoteAppPaths.js';\nimport { discoverLocalAppPaths } from './discoverLocalAppPaths.js';\nimport { TaskRunner } from '@ms-cloudpack/api-server';\nimport { readLocalConfigs } from './readLocalConfigs.js';\nimport { readRemoteConfigs } from './readRemoteConfigs.js';\nimport { getCliStartTime } from './getCliStartTime.js';\n\nexport type BaseCommandExecutorOptions = SharedOptions & Pick<ReusedOptions, 'app'>;\n\nexport interface CommandExecutorParams<TOptions extends BaseCommandExecutorOptions = BaseCommandExecutorOptions> {\n /** Command-specific arguments */\n args: string[];\n\n /** Command-specific and shared options. */\n options: TOptions;\n\n /** Function to execute the command. */\n execute: CommandAction<TOptions>;\n\n /** Shared program-level configuration. */\n programOptions: ProgramOptions;\n\n /** Verb being run, e.g. `bundle` or `cache clean`. */\n verb: string;\n\n /**\n * By default, the command will run against `cwd` (usually `process.cwd()`).\n * If this option is set, attempt to discover app path(s) instead.\n * (`cwd` will still be preferred if it has a `cloudpack.config.json`.)\n * See {@link AppPathDiscoveryMode} for details.\n */\n discoverAppPaths?: AppPathDiscoveryMode;\n}\n\n/**\n * This class manages orchestration and shared state while executing a command.\n */\n// 'app' is an optional reused option\nexport class CommandExecutor<TOptions extends BaseCommandExecutorOptions> {\n private _options: TOptions;\n private _execute: CommandAction<TOptions>;\n private _programOptions: ProgramOptions;\n private _verb: string;\n private _discoverAppPaths: AppPathDiscoveryMode | undefined;\n private _reporter: TaskReporter;\n private _autoDisposableList: AutoDisposableList;\n private _hasCalledExit = false;\n private _args: string[];\n private _sigintCount = 0;\n private _onInterrupt?: () => void;\n private _getMessageOnInterrupt?: () => string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- options type isn't used\n private static _activeInstances = new Set<CommandExecutor<any>>();\n\n public static async exitAll(params: CommandExitParams): Promise<void> {\n // There should only be one instance at a time, but we assume multiple instances for safety.\n for (const instance of CommandExecutor._activeInstances) {\n await instance._exit(params);\n process.off('SIGINT', instance._sigintHandler);\n }\n CommandExecutor._activeInstances = new Set();\n }\n\n constructor(params: CommandExecutorParams<TOptions>) {\n this._args = params.args;\n this._options = params.options;\n this._execute = params.execute;\n this._programOptions = params.programOptions;\n this._verb = params.verb;\n this._discoverAppPaths = params.discoverAppPaths;\n this._reporter = new TaskReporter();\n this._autoDisposableList = new AutoDisposableList();\n }\n\n /** Run the command. */\n // This has to be a separate method because constructors can't be async.\n public async execute(): Promise<void> {\n CommandExecutor._activeInstances.add(this);\n try {\n // Handle SIGINT (Ctrl+C) gracefully.\n if (!environmentInfo.isJest) {\n process.on('SIGINT', this._sigintHandler);\n }\n\n const contexts = await this._initializeContexts();\n\n if (!Array.isArray(contexts)) {\n await this._exit(contexts);\n return;\n }\n\n const spanName = `${this._verb.toUpperCase().replace(/ /g, '_')}_EXECUTE`;\n const results: CommandExitParams[] = [];\n\n for (const context of contexts) {\n // Call the execute function which is the real command logic\n // (ie: real init command logic, real start command logic, etc.)\n const result = await context.telemetryClient.tracer.startActiveSpan(spanName, async (span) => {\n this._onInterrupt = () => {\n span.setAttribute('isInterrupted', true);\n span.end();\n };\n\n return this._execute({\n ...context,\n span,\n isMultiApp: contexts.length > 1,\n args: this._args,\n options: this._options,\n autoDispose: (disposable) => this._autoDisposableList.add(disposable),\n setInterruptMessageHandler: (getMessage) => {\n this._getMessageOnInterrupt = getMessage;\n },\n });\n });\n if (result?.isInterrupted) {\n return await this._exit(result);\n }\n if (result) {\n results.push(result);\n } else if ((result as unknown) !== null) {\n // If the command returned null, this means it should keep running (e.g. start).\n // We disallow returning undefined to avoid accidents.\n throw new Error('Command executor must return exit options or null');\n }\n this._onInterrupt = undefined;\n }\n\n if (results.length) {\n // If one or more apps returned a result, exit.\n await this._exit({\n message: results.map((r) => r.message).join('\\n'),\n hasErrors: results.some((r) => r.hasErrors),\n // If any app returned a non-zero exit code, use that.\n exitCode: results.find(({ exitCode }) => !!exitCode)?.exitCode,\n });\n }\n } catch (error) {\n // If an error occurs, exit the process with a non-zero exit code.\n await this._exit({\n hasErrors: true,\n message: (error as Error).stack || (error as Error).message || String(error),\n });\n }\n }\n\n /**\n * Determine the app paths and initialize the context for each app.\n * @returns Context(s), or an exit options object if there was an error. (might also throw on error)\n */\n private async _initializeContexts(): Promise<AppCommandContext[] | CommandExitParams> {\n let appPaths: string[];\n\n if (this._discoverAppPaths) {\n // Search for cloudpack configs to determine the app path(s)\n const appPathsResult =\n this._discoverAppPaths === 'remote'\n ? await discoverRemoteAppPaths({\n options: {\n login: (this._options as unknown as Pick<ReusedOptions, 'login'>).login,\n cachePath: this._options.cachePath,\n desiredApp: this._options.app,\n },\n context: {\n reporter: this._reporter,\n },\n })\n : await discoverLocalAppPaths({\n cwd: this._programOptions.cwd,\n discover: this._discoverAppPaths,\n desiredApp: this._options.app,\n });\n if (!Array.isArray(appPathsResult)) {\n // This means there was an error (or the user cancelled) while getting app paths.\n return appPathsResult;\n }\n appPaths = appPathsResult;\n } else {\n // Just use the cwd\n appPaths = [this._programOptions.cwd];\n }\n\n const configOptions = this._getConfigOptionsFromCliOptions();\n\n // The task runner is shared between all apps so that task results can potentially be reused.\n const taskRunner = new TaskRunner();\n\n const readConfig = this._discoverAppPaths === 'remote' ? readRemoteConfigs : readLocalConfigs;\n const configs = await readConfig(appPaths, {\n ...configOptions,\n extraFeatures: this._options.features,\n extraDefineFlags: this._options.define,\n });\n\n const helpMessages = new Set<string>(\n Object.values(configs)\n .filter((c) => c.helpMessage)\n .map((c) => c.helpMessage) as string[],\n );\n\n // Set reporter options and print the product info header\n this._reporter.setOptions({\n productName: 'Cloudpack',\n version: this._programOptions.version,\n description: () => `Running \"${bold(this._programOptions.argv.slice(2).join(' '))}\"`,\n helpMessage: [...helpMessages].join('\\n'),\n plainTextMode: !this._options.color,\n logFile: !!this._options.logFile,\n cwd: this._programOptions.cwd,\n ...(this._options.debug\n ? debugLoggingConfig\n : this._options.verbose\n ? verboseLoggingConfig\n : this._options.quiet\n ? noLoggingConfig\n : defaultLoggingConfig),\n });\n\n const contexts: AppCommandContext[] = [];\n\n const logLevel = this._options.verbose ? 'VERBOSE' : this._options.debug ? 'DEBUG' : undefined;\n if (!this._options.debug) {\n this._reporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryApi = startTelemetry({\n productVersion: getVersion(import.meta.url),\n logLevel,\n serviceName: 'cli',\n });\n\n this._autoDisposableList.add({\n dispose: () => telemetryApi.shutdown(),\n });\n\n for (const appPath of Object.keys(configs)) {\n const config = configs[appPath];\n const definition = await readJson<PackageJson>(path.join(appPath, 'package.json'));\n const { name = path.basename(appPath) } = definition || {};\n\n const telemetryClient = await this._initTelemetry(name, config, telemetryApi);\n\n contexts.push({\n appPath,\n cachePath: this._options.cachePath,\n config,\n reporter: this._reporter,\n telemetryClient,\n taskRunner,\n });\n }\n\n return contexts;\n }\n\n /** Translate certain CLI options into options for `readConfig()`. */\n private _getConfigOptionsFromCliOptions(): ReadConfigOptions {\n // These options don't exist for all commands, but that's fine.\n const options = this._options as Partial<ReusedOptions & SharedOptions>;\n return {\n mode: options.mode,\n logBundleInfo: options.logBundleInfo,\n // Handle --bundler by passing it as a universal package override, which will be appended\n // to any user-provided packageSettings so that it takes precedence.\n extraPackageSettings: options.bundler ? [{ match: '*', bundler: options.bundler }] : undefined,\n };\n }\n\n private async _initTelemetry(\n appName: string | undefined,\n config: CloudpackConfig,\n telemetryApi: TelemetryApi,\n ): Promise<TelemetryClient> {\n // Mark the start time for telemetry.\n const startTime = performance.now();\n\n const programOptions = this._programOptions;\n\n const connectionString =\n this._programOptions.disableTelemetry || environmentInfo.isJest\n ? undefined\n : config.telemetry?.connectionString || environmentInfo.cloudpack.telemetryConnectionString;\n\n const telemetryClient = await telemetryApi.createClient(connectionString);\n\n telemetryClient.tracer.startSpan('CLI_ENTRY', { startTime: getCliStartTime() }).end();\n\n await telemetryClient.tracer.startActiveSpan('INIT_TELEMETRY', { startTime }, (span) => {\n const enabledFeatureNames = Object.entries(config.features || {})\n .filter(([, value]) => value)\n .map(([key]) => key);\n\n if (enabledFeatureNames.length) {\n console.log(`Enabled features: ${enabledFeatureNames.map((f) => yellow(f)).join(', ')}`);\n }\n\n const telemetryAttributes = {\n verb: this._verb,\n arguments: programOptions.argv.slice(3).join(' '),\n environment: environmentInfo.isCI ? 'ci' : environmentInfo.isCodespaces ? 'codespaces' : 'local',\n appName: appName || '<unknown>',\n mode: config.mode,\n features: enabledFeatureNames,\n externalCorrelationId: environmentInfo.cloudpack.telemetryExternalCorrelationId,\n // Azure DevOps build attributes\n ...environmentInfo.ado,\n };\n\n for (const [key, value] of Object.entries(telemetryAttributes)) {\n if (value) {\n span.setAttribute(key, value);\n }\n }\n });\n\n return telemetryClient;\n }\n\n protected _sigintHandler = (): void => {\n this._sigintCount++;\n\n if (this._sigintCount > 1) {\n console.debug('Forcing exit');\n\n // We are forcing the process to exit.\n // No clean-up is needed because user pressed Ctrl+C twice.\n // eslint-disable-next-line no-restricted-properties -- top-level cleanup\n process.exit(1);\n }\n\n this._onInterrupt?.();\n\n // We are trying to exit gracefully.\n void this._exit({ isInterrupted: true, message: '' });\n };\n\n /**\n * Exit function called with the result returned by the command's execute function,\n * or manually via `CommandExecutor.exitAll()` in tests.\n */\n protected async _exit(params: CommandExitParams): Promise<never> {\n const { hasErrors = this._reporter.hasErrors(), exitCode = hasErrors ? 1 : 0 } = params;\n const message = params.isInterrupted ? this._getMessageOnInterrupt?.() || 'Interrupted by user' : params.message;\n\n if (this._hasCalledExit) {\n // Skip most of the operations if exit() was called multiple times.\n // But only use the error message if not in a test, due to the way we're mocking process.exit.\n if (!environmentInfo.isJest) {\n const prettyParams = Object.entries(params)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(', ');\n console.warn(`exit() was called multiple times. This call's options: ${prettyParams}.`);\n }\n } else {\n this._hasCalledExit = true;\n\n // Dispose all registered disposables.\n await this._autoDisposableList.dispose();\n\n // Show the summary message (this will throw if called twice).\n await this._reporter.complete({\n summary: hasErrors ? red(message) : message,\n showHelp: exitCode !== 0,\n });\n }\n\n CommandExecutor._activeInstances.delete(this);\n process.off('SIGINT', this._sigintHandler);\n\n // eslint-disable-next-line no-restricted-properties -- top-level cleanup\n process.exit(exitCode);\n }\n}\n"]}
1
+ {"version":3,"file":"CommandExecutor.js","sourceRoot":"","sources":["../../src/utilities/CommandExecutor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,E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IAAI,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAE3C,yEAAyE;QACzE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC","sourcesContent":["import type { ReadConfigOptions } from '@ms-cloudpack/config';\nimport type { CloudpackConfig, PackageJson } from '@ms-cloudpack/common-types';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport {\n TaskReporter,\n bold,\n debugLoggingConfig,\n defaultLoggingConfig,\n noLoggingConfig,\n red,\n verboseLoggingConfig,\n yellow,\n} from '@ms-cloudpack/task-reporter';\nimport { startTelemetry, type TelemetryApi, type TelemetryClient } from '@ms-cloudpack/telemetry';\nimport path from 'path';\nimport type { CommandAction, CommandExitParams, AppCommandContext } from '../types/CommandAction.js';\nimport type { ProgramOptions } from '../types/ProgramOptions.js';\nimport type { SharedOptions } from '../types/SharedOptions.js';\nimport { AutoDisposableList } from './AutoDisposableList.js';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\nimport { environmentInfo } from '@ms-cloudpack/environment';\nimport type { ReusedOptions } from '../types/ReusedOptions.js';\nimport type { AppPathDiscoveryMode } from '../types/AppPathDiscoveryMode.js';\nimport { discoverRemoteAppPaths } from './discoverRemoteAppPaths.js';\nimport { discoverLocalAppPaths } from './discoverLocalAppPaths.js';\nimport { TaskRunner } from '@ms-cloudpack/api-server';\nimport { readLocalConfigs } from './readLocalConfigs.js';\nimport { readRemoteConfigs } from './readRemoteConfigs.js';\nimport { getCliStartTime } from './getCliStartTime.js';\n\nexport type BaseCommandExecutorOptions = SharedOptions & Pick<ReusedOptions, 'app'>;\n\nexport interface CommandExecutorParams<TOptions extends BaseCommandExecutorOptions = BaseCommandExecutorOptions> {\n /** Command-specific arguments */\n args: string[];\n\n /** Command-specific and shared options. */\n options: TOptions;\n\n /** Function to execute the command. */\n execute: CommandAction<TOptions>;\n\n /** Shared program-level configuration. */\n programOptions: ProgramOptions;\n\n /** Verb being run, e.g. `bundle` or `cache clean`. */\n verb: string;\n\n /**\n * By default, the command will run against `cwd` (usually `process.cwd()`).\n * If this option is set, attempt to discover app path(s) instead.\n * (`cwd` will still be preferred if it has a `cloudpack.config.json`.)\n * See {@link AppPathDiscoveryMode} for details.\n */\n discoverAppPaths?: AppPathDiscoveryMode;\n}\n\n/**\n * This class manages orchestration and shared state while executing a command.\n */\n// 'app' is an optional reused option\nexport class CommandExecutor<TOptions extends BaseCommandExecutorOptions> {\n private _options: TOptions;\n private _execute: CommandAction<TOptions>;\n private _programOptions: ProgramOptions;\n private _verb: string;\n private _discoverAppPaths: AppPathDiscoveryMode | undefined;\n private _reporter: TaskReporter;\n private _autoDisposableList: AutoDisposableList;\n private _hasCalledExit = false;\n private _args: string[];\n private _sigintCount = 0;\n private _onInterrupt?: () => void;\n private _getMessageOnInterrupt?: () => string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- options type isn't used\n private static _activeInstances = new Set<CommandExecutor<any>>();\n\n public static async exitAll(params: CommandExitParams): Promise<void> {\n // There should only be one instance at a time, but we assume multiple instances for safety.\n for (const instance of CommandExecutor._activeInstances) {\n await instance._exit(params);\n process.off('SIGINT', instance._sigintHandler);\n }\n CommandExecutor._activeInstances = new Set();\n }\n\n constructor(params: CommandExecutorParams<TOptions>) {\n this._args = params.args;\n this._options = params.options;\n this._execute = params.execute;\n this._programOptions = params.programOptions;\n this._verb = params.verb;\n this._discoverAppPaths = params.discoverAppPaths;\n this._reporter = new TaskReporter();\n this._autoDisposableList = new AutoDisposableList();\n }\n\n /** Run the command. */\n // This has to be a separate method because constructors can't be async.\n public async execute(): Promise<void> {\n CommandExecutor._activeInstances.add(this);\n try {\n // Handle SIGINT (Ctrl+C) gracefully.\n if (!environmentInfo.isJest) {\n process.on('SIGINT', this._sigintHandler);\n }\n\n const contexts = await this._initializeContexts();\n\n if (!Array.isArray(contexts)) {\n await this._exit(contexts);\n return;\n }\n\n const spanName = `${this._verb.toUpperCase().replace(/ /g, '_')}_EXECUTE`;\n const results: CommandExitParams[] = [];\n\n for (const context of contexts) {\n // Call the execute function which is the real command logic\n // (ie: real init command logic, real start command logic, etc.)\n const result = await context.telemetryClient.tracer.startActiveSpan(spanName, async (span) => {\n this._onInterrupt = () => {\n span.setAttribute('isInterrupted', true);\n span.end();\n };\n\n return this._execute({\n ...context,\n span,\n isMultiApp: contexts.length > 1,\n args: this._args,\n options: this._options,\n autoDispose: (disposable) => this._autoDisposableList.add(disposable),\n setInterruptMessageHandler: (getMessage) => {\n this._getMessageOnInterrupt = getMessage;\n },\n });\n });\n if (result?.isInterrupted) {\n return await this._exit(result);\n }\n if (result) {\n results.push(result);\n } else if ((result as unknown) !== null) {\n // If the command returned null, this means it should keep running (e.g. start).\n // We disallow returning undefined to avoid accidents.\n throw new Error('Command executor must return exit options or null');\n }\n this._onInterrupt = undefined;\n }\n\n if (results.length) {\n // If one or more apps returned a result, exit.\n await this._exit({\n message: results.map((r) => r.message).join('\\n'),\n hasErrors: results.some((r) => r.hasErrors),\n // If any app returned a non-zero exit code, use that.\n exitCode: results.find(({ exitCode }) => !!exitCode)?.exitCode,\n });\n }\n } catch (error) {\n // If an error occurs, exit the process with a non-zero exit code.\n await this._exit({\n hasErrors: true,\n message: (error as Error).stack || (error as Error).message || String(error),\n });\n }\n }\n\n /**\n * Determine the app paths and initialize the context for each app.\n * @returns Context(s), or an exit options object if there was an error. (might also throw on error)\n */\n private async _initializeContexts(): Promise<AppCommandContext[] | CommandExitParams> {\n let appPaths: string[];\n\n if (this._discoverAppPaths) {\n // Search for cloudpack configs to determine the app path(s)\n const appPathsResult =\n this._discoverAppPaths === 'remote'\n ? await discoverRemoteAppPaths({\n options: {\n login: (this._options as unknown as Pick<ReusedOptions, 'login'>).login,\n cachePath: this._options.cachePath,\n desiredApp: this._options.app,\n },\n context: {\n reporter: this._reporter,\n },\n })\n : await discoverLocalAppPaths({\n cwd: this._programOptions.cwd,\n discover: this._discoverAppPaths,\n desiredApp: this._options.app,\n });\n if (!Array.isArray(appPathsResult)) {\n // This means there was an error (or the user cancelled) while getting app paths.\n return appPathsResult;\n }\n appPaths = appPathsResult;\n } else {\n // Just use the cwd\n appPaths = [this._programOptions.cwd];\n }\n\n const configOptions = this._getConfigOptionsFromCliOptions();\n\n // The task runner is shared between all apps so that task results can potentially be reused.\n const taskRunner = new TaskRunner();\n\n const readConfig = this._discoverAppPaths === 'remote' ? readRemoteConfigs : readLocalConfigs;\n const configs = await readConfig(appPaths, {\n ...configOptions,\n extraFeatures: this._options.features,\n extraDefineFlags: this._options.define,\n enableDefaultFeatures: true,\n });\n\n const helpMessages = new Set<string>(\n Object.values(configs)\n .filter((c) => c.helpMessage)\n .map((c) => c.helpMessage) as string[],\n );\n\n // Set reporter options and print the product info header\n this._reporter.setOptions({\n productName: 'Cloudpack',\n version: this._programOptions.version,\n description: () => `Running \"${bold(this._programOptions.argv.slice(2).join(' '))}\"`,\n helpMessage: [...helpMessages].join('\\n'),\n plainTextMode: !this._options.color,\n logFile: !!this._options.logFile,\n cwd: this._programOptions.cwd,\n ...(this._options.debug\n ? debugLoggingConfig\n : this._options.verbose\n ? verboseLoggingConfig\n : this._options.quiet\n ? noLoggingConfig\n : defaultLoggingConfig),\n });\n\n const contexts: AppCommandContext[] = [];\n\n const logLevel = this._options.verbose ? 'VERBOSE' : this._options.debug ? 'DEBUG' : undefined;\n if (!this._options.debug) {\n this._reporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryApi = startTelemetry({\n productVersion: getVersion(import.meta.url),\n logLevel,\n serviceName: 'cli',\n });\n\n this._autoDisposableList.add({\n dispose: () => telemetryApi.shutdown(),\n });\n\n for (const appPath of Object.keys(configs)) {\n const config = configs[appPath];\n const definition = await readJson<PackageJson>(path.join(appPath, 'package.json'));\n const { name = path.basename(appPath) } = definition || {};\n\n const telemetryClient = await this._initTelemetry(name, config, telemetryApi);\n\n contexts.push({\n appPath,\n cachePath: this._options.cachePath,\n config,\n reporter: this._reporter,\n telemetryClient,\n taskRunner,\n });\n }\n\n return contexts;\n }\n\n /** Translate certain CLI options into options for `readConfig()`. */\n private _getConfigOptionsFromCliOptions(): ReadConfigOptions {\n // These options don't exist for all commands, but that's fine.\n const options = this._options as Partial<ReusedOptions & SharedOptions>;\n return {\n mode: options.mode,\n logBundleInfo: options.logBundleInfo,\n // Handle --bundler by passing it as a universal package override, which will be appended\n // to any user-provided packageSettings so that it takes precedence.\n extraPackageSettings: options.bundler ? [{ match: '*', bundler: options.bundler }] : undefined,\n };\n }\n\n private async _initTelemetry(\n appName: string | undefined,\n config: CloudpackConfig,\n telemetryApi: TelemetryApi,\n ): Promise<TelemetryClient> {\n // Mark the start time for telemetry.\n const startTime = performance.now();\n\n const programOptions = this._programOptions;\n\n const connectionString =\n this._programOptions.disableTelemetry || environmentInfo.isJest\n ? undefined\n : config.telemetry?.connectionString || environmentInfo.cloudpack.telemetryConnectionString;\n\n const telemetryClient = await telemetryApi.createClient(connectionString);\n\n telemetryClient.tracer.startSpan('CLI_ENTRY', { startTime: getCliStartTime() }).end();\n\n await telemetryClient.tracer.startActiveSpan('INIT_TELEMETRY', { startTime }, (span) => {\n const enabledFeatureNames = Object.entries(config.features || {})\n .filter(([, value]) => value)\n .map(([key]) => key);\n\n if (enabledFeatureNames.length) {\n console.log(`Enabled features: ${enabledFeatureNames.map((f) => yellow(f)).join(', ')}`);\n }\n\n const telemetryAttributes = {\n verb: this._verb,\n arguments: programOptions.argv.slice(3).join(' '),\n environment: environmentInfo.isCI ? 'ci' : environmentInfo.isCodespaces ? 'codespaces' : 'local',\n appName: appName || '<unknown>',\n mode: config.mode,\n features: enabledFeatureNames,\n externalCorrelationId: environmentInfo.cloudpack.telemetryExternalCorrelationId,\n // Azure DevOps build attributes\n ...environmentInfo.ado,\n };\n\n for (const [key, value] of Object.entries(telemetryAttributes)) {\n if (value) {\n span.setAttribute(key, value);\n }\n }\n });\n\n return telemetryClient;\n }\n\n protected _sigintHandler = (): void => {\n this._sigintCount++;\n\n if (this._sigintCount > 1) {\n console.debug('Forcing exit');\n\n // We are forcing the process to exit.\n // No clean-up is needed because user pressed Ctrl+C twice.\n // eslint-disable-next-line no-restricted-properties -- top-level cleanup\n process.exit(1);\n }\n\n this._onInterrupt?.();\n\n // We are trying to exit gracefully.\n void this._exit({ isInterrupted: true, message: '' });\n };\n\n /**\n * Exit function called with the result returned by the command's execute function,\n * or manually via `CommandExecutor.exitAll()` in tests.\n */\n protected async _exit(params: CommandExitParams): Promise<never> {\n const { hasErrors = this._reporter.hasErrors(), exitCode = hasErrors ? 1 : 0 } = params;\n const message = params.isInterrupted ? this._getMessageOnInterrupt?.() || 'Interrupted by user' : params.message;\n\n if (this._hasCalledExit) {\n // Skip most of the operations if exit() was called multiple times.\n // But only use the error message if not in a test, due to the way we're mocking process.exit.\n if (!environmentInfo.isJest) {\n const prettyParams = Object.entries(params)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(', ');\n console.warn(`exit() was called multiple times. This call's options: ${prettyParams}.`);\n }\n } else {\n this._hasCalledExit = true;\n\n // Dispose all registered disposables.\n await this._autoDisposableList.dispose();\n\n // Show the summary message (this will throw if called twice).\n await this._reporter.complete({\n summary: hasErrors ? red(message) : message,\n showHelp: exitCode !== 0,\n });\n }\n\n CommandExecutor._activeInstances.delete(this);\n process.off('SIGINT', this._sigintHandler);\n\n // eslint-disable-next-line no-restricted-properties -- top-level cleanup\n process.exit(exitCode);\n }\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
- export declare const readLocalConfigs: (appPaths: string[], readConfigOptions: ReadConfigOptions) => Promise<Record<string, CloudpackConfig>>;
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,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAAE,EAClB,mBAAmB,iBAAiB,KACnC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAgBzC,CAAC"}
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
- export const readLocalConfigs = async (appPaths, readConfigOptions) => {
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,MAAM,gBAAgB,GAAG,KAAK,EACnC,QAAkB,EAClB,iBAAoC,EACM,EAAE;IAC5C,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,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\nexport const readLocalConfigs = async (\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
+ {"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
- export declare const readRemoteConfigs: (appPaths: string[], readConfigOptions: ReadConfigOptions) => Promise<Record<string, CloudpackConfig>>;
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,EAA2B,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGvF,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,EAAE,EAClB,mBAAmB,iBAAiB,KACnC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAezC,CAAC"}
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 { addReadAppConfigOptions } from '@ms-cloudpack/config';
2
- import { readJson } from '@ms-cloudpack/json-utilities';
3
- export const readRemoteConfigs = async (appPaths, readConfigOptions) => {
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 readJson(`${appPath}/cloudpack-context.json`);
7
- if (!cloudAppContext) {
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":"AAEA,OAAO,EAAE,uBAAuB,EAA0B,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EACpC,QAAkB,EAClB,iBAAoC,EACM,EAAE;IAC5C,MAAM,OAAO,GAAoC,EAAE,CAAC;IAEpD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAkB,GAAG,OAAO,yBAAyB,CAAC,CAAC;QAC7F,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,4CAA4C,OAAO,mDAAmD,CACvG,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,GAAG,uBAAuB,CAAC,eAAe,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACxF,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import type { CloudAppContext } from '@ms-cloudpack/api-server';\nimport type { CloudpackConfig } from '@ms-cloudpack/common-types';\nimport { addReadAppConfigOptions, type ReadConfigOptions } from '@ms-cloudpack/config';\nimport { readJson } from '@ms-cloudpack/json-utilities';\n\nexport const readRemoteConfigs = async (\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 readJson<CloudAppContext>(`${appPath}/cloudpack-context.json`);\n if (!cloudAppContext) {\n throw new Error(\n `Could not find cloudpack-context.json in ${appPath}. This must be a Cloudpack bug, please report it.`,\n );\n }\n\n configs[appPath] = addReadAppConfigOptions(cloudAppContext.config, readConfigOptions);\n }\n\n return configs;\n};\n"]}
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",
3
+ "version": "0.76.5",
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.3",
22
- "@ms-cloudpack/app-server": "^0.19.0",
23
- "@ms-cloudpack/bundler": "^0.25.17",
24
- "@ms-cloudpack/bundler-capabilities": "^0.2.30",
25
- "@ms-cloudpack/common-types": "^0.26.0",
26
- "@ms-cloudpack/config": "^0.35.14",
27
- "@ms-cloudpack/create-express-app": "^1.10.39",
21
+ "@ms-cloudpack/api-server": "^0.64.5",
22
+ "@ms-cloudpack/app-server": "^0.19.2",
23
+ "@ms-cloudpack/bundler": "^0.25.19",
24
+ "@ms-cloudpack/bundler-capabilities": "^0.2.32",
25
+ "@ms-cloudpack/common-types": "^0.26.2",
26
+ "@ms-cloudpack/config": "^0.36.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.17",
31
- "@ms-cloudpack/overlay": "^0.19.13",
32
- "@ms-cloudpack/package-utilities": "^12.3.16",
30
+ "@ms-cloudpack/link-proxy": "^0.2.19",
31
+ "@ms-cloudpack/overlay": "^0.19.15",
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.10",
35
- "@ms-cloudpack/remote-cache": "^0.11.26",
36
- "@ms-cloudpack/setup-utilities": "^0.5.31",
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.28",
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.0",
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",