@ms-cloudpack/cli 0.59.3 → 0.59.4

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":"verifyExports.d.ts","sourceRoot":"","sources":["../../../src/commands/init/verifyExports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAQ1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAItE;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACjD,OAAO,EAAE;IACP,QAAQ,EAAE,uBAAuB,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAgK9B"}
1
+ {"version":3,"file":"verifyExports.d.ts","sourceRoot":"","sources":["../../../src/commands/init/verifyExports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAQ1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAKtE;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACjD,OAAO,EAAE;IACP,QAAQ,EAAE,uBAAuB,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAuK9B"}
@@ -1,6 +1,7 @@
1
1
  import { findResolveMapEntry, getDependencies, getUnusedDependencies, getSourceEntry, } from '@ms-cloudpack/package-utilities';
2
2
  import path from 'path';
3
3
  import { bulletedList, formatPackageName } from '@ms-cloudpack/task-reporter';
4
+ import { getPackageSettings } from '@ms-cloudpack/config';
4
5
  import semver from 'semver';
5
6
  /**
6
7
  * Checks that the imports/exports of packages match.
@@ -19,6 +20,12 @@ export async function verifyExports(packageResults, context) {
19
20
  if (!parentResult?.info || !parentResult.outputPath || parentResult.errors?.length) {
20
21
  continue;
21
22
  }
23
+ // Skip packages with `ignoreMissingExports` set to true.
24
+ const { name, version } = parentResult;
25
+ const { userPackageSettings } = getPackageSettings({ name, version, config });
26
+ if (userPackageSettings?.ignoreMissingExports) {
27
+ continue;
28
+ }
22
29
  const parentDefinition = await packages.get(parentPath);
23
30
  if (!parentDefinition) {
24
31
  throw new Error(`Definition not found for package at path ${parentPath}`);
@@ -1 +1 @@
1
- {"version":3,"file":"verifyExports.js","sourceRoot":"","sources":["../../../src/commands/init/verifyExports.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAmB,MAAM,6BAA6B,CAAC;AAC/F,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,cAAiD,EACjD,OAGC;IAED,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACtC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IACvC,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAE1D,+BAA+B;IAC/B,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QACxE,6CAA6C;QAC7C,IAAI,CAAC,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AAmG;gBACnG,gFAAgF;aACjF,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC3B,SAAS,CAAC,IAAI,CAAC;gBACb,IAAI,EAAE,YAAY,CAAC,IAAI;gBACvB,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,IAAI,EAAE,UAAU;gBAChB,MAAM;aACP,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { Session } from '@ms-cloudpack/api-server';\nimport type { PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport {\n findResolveMapEntry,\n getDependencies,\n getUnusedDependencies,\n getSourceEntry,\n} from '@ms-cloudpack/package-utilities';\nimport path from 'path';\nimport type { InitPackageResult } from './types/InitPackageResult.js';\nimport { bulletedList, formatPackageName, type BulletList } from '@ms-cloudpack/task-reporter';\nimport semver from 'semver';\n\n/**\n * Checks that the imports/exports of packages match.\n * To be called before `summarize`.\n * @param packageResults - The package results to check.\n * @param context - The context to use.\n */\nexport async function verifyExports(\n packageResults: Record<string, InitPackageResult>,\n context: {\n packages: PackageDefinitionsCache;\n session: Session;\n },\n): Promise<InitPackageResult[]> {\n const { packages, session } = context;\n const { config, resolveMap } = session;\n const allErrors: InitPackageResult[] = [];\n const packageResultsArray = Object.values(packageResults);\n\n // Iterate through each package\n for (const [parentPath, parentResult] of Object.entries(packageResults)) {\n // Skip packages with build errors or no info\n if (!parentResult?.info || !parentResult.outputPath || parentResult.errors?.length) {\n continue;\n }\n\n const parentDefinition = await packages.get(parentPath);\n if (!parentDefinition) {\n throw new Error(`Definition not found for package at path ${parentPath}`);\n }\n\n /**\n * Mapping from imported dependency package ID (`name@version`) to import path\n * to an object with export names missing from that file, the importString, and bundledFile.\n */\n const depsMissingExports: Record<\n string,\n Record<\n string,\n {\n missingNames: Set<string>;\n importName: string;\n importPath: string;\n importVersion: string;\n bundledFile: string;\n }\n >\n > = {};\n const invalidSemver: Record<string, string> = {};\n\n // Find the main entry point for the parent package to list as the importing bundle.\n const importingBundle = path.join(parentResult.outputPath, parentResult.info?.['.']?.bundlePath || '');\n\n // Find the main entry point for the parent package to list as the importing source.\n const sourceMainEntry = await getSourceEntry({ entry: '.', inputPath: parentPath }, { packages, config });\n const importingSource = path.join(parentPath, sourceMainEntry || '.');\n\n // Iterate through each entry path from the parent package\n for (const { consumes } of Object.values(parentResult.info)) {\n // Skip entries with no imports\n if (!consumes?.length) {\n continue;\n }\n\n // Iterate through each imported package\n for (const { packageName: depName, importPath: depImportPath, names: consumedNames } of consumes) {\n const depResolveMapEntry = findResolveMapEntry({ packageName: depName, definition: parentResult, resolveMap });\n const depResult =\n depResolveMapEntry &&\n packageResultsArray.find(\n (r) => r.name === depResolveMapEntry.name && r.version === depResolveMapEntry.version,\n );\n\n const depEntries = depResult?.info;\n const depOutputPath = depResult?.outputPath;\n\n // Skip if we can't find the imported package in the resolve map, or there's no info about\n // its entries/exports.\n if (!depResolveMapEntry || !depEntries) {\n continue;\n }\n\n const importProduces = depEntries[depImportPath]?.produces;\n if (!importProduces || importProduces.includes('*')) {\n // Skip if the imported package has no entry for the import path, or if the import\n // produces `*` (everything) since we can't check that. (If the path is missing,\n // evaluateImportsForOverrides has already run and tried to fix it or reported an error.)\n continue;\n }\n\n // Find any missing names.\n const missing = consumedNames.filter(\n (namedImport) => namedImport !== '*' && !importProduces.includes(namedImport),\n );\n if (!missing.length) {\n continue;\n }\n\n // Figure out which actual file the exports appear to be missing from.\n const relativePath =\n (await getSourceEntry({ entry: depImportPath, inputPath: depResolveMapEntry.path }, { packages, config })) ||\n // If the package is missing an exports map, assume the import path is the real path.\n depImportPath;\n const filePath = path.join(depResolveMapEntry.path, relativePath);\n\n // Save the missing names for this path within the package.\n const depKey = `${depResolveMapEntry.name}@${depResolveMapEntry.version}`;\n depsMissingExports[depKey] ??= {};\n depsMissingExports[depKey][filePath] ??= {\n missingNames: new Set(),\n importName: depName,\n importPath: depImportPath,\n importVersion: depResolveMapEntry.version,\n bundledFile: path.join(depOutputPath ?? '', depEntries[depImportPath]?.bundlePath),\n };\n missing.forEach((m) => depsMissingExports[depKey][filePath].missingNames.add(m));\n\n // Check if the package satisfies the parent semver requirement.\n const requiredVersion =\n !invalidSemver[depKey] &&\n (getDependencies(parentDefinition)[depName] || getUnusedDependencies(parentDefinition)[depName]);\n if (requiredVersion && !semver.satisfies(depResolveMapEntry.version, requiredVersion)) {\n invalidSemver[depKey] = requiredVersion;\n }\n }\n }\n\n const depErrors = Object.entries(depsMissingExports).map(([packageId, missing]) => {\n // We want a single error for each package, with a bulleted list of files with missing exports.\n const missingExportsForFiles = Object.entries(missing).map(([sourceFile, errorInfo]) => {\n const { missingNames, importName, importPath, importVersion, bundledFile } = errorInfo;\n const error: BulletList = [\n `Importing bundle: ${importingBundle}`,\n `Importing source: ${importingSource}`,\n `Exporting package: ${formatPackageName({ name: importName, version: importVersion })}${importPath === '.' ? '' : ` (imported path: \"${importPath}\")`}`,\n `Exporting bundle: ${bundledFile}`,\n `Exporting source: ${sourceFile}`,\n `Missing export(s): { ${Array.from(missingNames).join(', ')} }`,\n ];\n\n if (!invalidSemver[packageId]) {\n return error;\n }\n\n // If we have an invalid semver, add a note about that after exporting package.\n const errorIndex = 3;\n return [\n ...error.slice(0, errorIndex),\n `Incompatible version: ${formatPackageName({ name: importName, version: importVersion })} does not satisfy importer requirement \"${invalidSemver[packageId]}\"`,\n ['If this was unexpected, make sure you installed dependencies after pulling the latest changes.'],\n ...error.slice(errorIndex),\n ];\n });\n\n return missingExportsForFiles.map((error) => ({\n text: `A bundle imported names from another bundle which were not exported:\\n${bulletedList(error)}\\n`,\n source: 'verify exports',\n // Don't include a whole-message location here because that doesn't make sense for this error type,\n // and we already put full paths to individual problem files within the message.\n }));\n });\n\n depErrors.forEach((errors) => {\n allErrors.push({\n name: parentResult.name,\n version: parentResult.version,\n path: parentPath,\n errors,\n });\n });\n }\n\n return allErrors;\n}\n"]}
1
+ {"version":3,"file":"verifyExports.js","sourceRoot":"","sources":["../../../src/commands/init/verifyExports.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAmB,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,cAAiD,EACjD,OAGC;IAED,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACtC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IACvC,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAE1D,+BAA+B;IAC/B,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QACxE,6CAA6C;QAC7C,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;YACnF,SAAS;QACX,CAAC;QAED,yDAAyD;QACzD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC;QACvC,MAAM,EAAE,mBAAmB,EAAE,GAAG,kBAAkB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9E,IAAI,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;YAC9C,SAAS;QACX,CAAC;QA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;YAC3B,SAAS,CAAC,IAAI,CAAC;gBACb,IAAI,EAAE,YAAY,CAAC,IAAI;gBACvB,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,IAAI,EAAE,UAAU;gBAChB,MAAM;aACP,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { Session } from '@ms-cloudpack/api-server';\nimport type { PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport {\n findResolveMapEntry,\n getDependencies,\n getUnusedDependencies,\n getSourceEntry,\n} from '@ms-cloudpack/package-utilities';\nimport path from 'path';\nimport type { InitPackageResult } from './types/InitPackageResult.js';\nimport { bulletedList, formatPackageName, type BulletList } from '@ms-cloudpack/task-reporter';\nimport { getPackageSettings } from '@ms-cloudpack/config';\nimport semver from 'semver';\n\n/**\n * Checks that the imports/exports of packages match.\n * To be called before `summarize`.\n * @param packageResults - The package results to check.\n * @param context - The context to use.\n */\nexport async function verifyExports(\n packageResults: Record<string, InitPackageResult>,\n context: {\n packages: PackageDefinitionsCache;\n session: Session;\n },\n): Promise<InitPackageResult[]> {\n const { packages, session } = context;\n const { config, resolveMap } = session;\n const allErrors: InitPackageResult[] = [];\n const packageResultsArray = Object.values(packageResults);\n\n // Iterate through each package\n for (const [parentPath, parentResult] of Object.entries(packageResults)) {\n // Skip packages with build errors or no info\n if (!parentResult?.info || !parentResult.outputPath || parentResult.errors?.length) {\n continue;\n }\n\n // Skip packages with `ignoreMissingExports` set to true.\n const { name, version } = parentResult;\n const { userPackageSettings } = getPackageSettings({ name, version, config });\n if (userPackageSettings?.ignoreMissingExports) {\n continue;\n }\n\n const parentDefinition = await packages.get(parentPath);\n if (!parentDefinition) {\n throw new Error(`Definition not found for package at path ${parentPath}`);\n }\n\n /**\n * Mapping from imported dependency package ID (`name@version`) to import path\n * to an object with export names missing from that file, the importString, and bundledFile.\n */\n const depsMissingExports: Record<\n string,\n Record<\n string,\n {\n missingNames: Set<string>;\n importName: string;\n importPath: string;\n importVersion: string;\n bundledFile: string;\n }\n >\n > = {};\n const invalidSemver: Record<string, string> = {};\n\n // Find the main entry point for the parent package to list as the importing bundle.\n const importingBundle = path.join(parentResult.outputPath, parentResult.info?.['.']?.bundlePath || '');\n\n // Find the main entry point for the parent package to list as the importing source.\n const sourceMainEntry = await getSourceEntry({ entry: '.', inputPath: parentPath }, { packages, config });\n const importingSource = path.join(parentPath, sourceMainEntry || '.');\n\n // Iterate through each entry path from the parent package\n for (const { consumes } of Object.values(parentResult.info)) {\n // Skip entries with no imports\n if (!consumes?.length) {\n continue;\n }\n\n // Iterate through each imported package\n for (const { packageName: depName, importPath: depImportPath, names: consumedNames } of consumes) {\n const depResolveMapEntry = findResolveMapEntry({ packageName: depName, definition: parentResult, resolveMap });\n const depResult =\n depResolveMapEntry &&\n packageResultsArray.find(\n (r) => r.name === depResolveMapEntry.name && r.version === depResolveMapEntry.version,\n );\n\n const depEntries = depResult?.info;\n const depOutputPath = depResult?.outputPath;\n\n // Skip if we can't find the imported package in the resolve map, or there's no info about\n // its entries/exports.\n if (!depResolveMapEntry || !depEntries) {\n continue;\n }\n\n const importProduces = depEntries[depImportPath]?.produces;\n if (!importProduces || importProduces.includes('*')) {\n // Skip if the imported package has no entry for the import path, or if the import\n // produces `*` (everything) since we can't check that. (If the path is missing,\n // evaluateImportsForOverrides has already run and tried to fix it or reported an error.)\n continue;\n }\n\n // Find any missing names.\n const missing = consumedNames.filter(\n (namedImport) => namedImport !== '*' && !importProduces.includes(namedImport),\n );\n if (!missing.length) {\n continue;\n }\n\n // Figure out which actual file the exports appear to be missing from.\n const relativePath =\n (await getSourceEntry({ entry: depImportPath, inputPath: depResolveMapEntry.path }, { packages, config })) ||\n // If the package is missing an exports map, assume the import path is the real path.\n depImportPath;\n const filePath = path.join(depResolveMapEntry.path, relativePath);\n\n // Save the missing names for this path within the package.\n const depKey = `${depResolveMapEntry.name}@${depResolveMapEntry.version}`;\n depsMissingExports[depKey] ??= {};\n depsMissingExports[depKey][filePath] ??= {\n missingNames: new Set(),\n importName: depName,\n importPath: depImportPath,\n importVersion: depResolveMapEntry.version,\n bundledFile: path.join(depOutputPath ?? '', depEntries[depImportPath]?.bundlePath),\n };\n missing.forEach((m) => depsMissingExports[depKey][filePath].missingNames.add(m));\n\n // Check if the package satisfies the parent semver requirement.\n const requiredVersion =\n !invalidSemver[depKey] &&\n (getDependencies(parentDefinition)[depName] || getUnusedDependencies(parentDefinition)[depName]);\n if (requiredVersion && !semver.satisfies(depResolveMapEntry.version, requiredVersion)) {\n invalidSemver[depKey] = requiredVersion;\n }\n }\n }\n\n const depErrors = Object.entries(depsMissingExports).map(([packageId, missing]) => {\n // We want a single error for each package, with a bulleted list of files with missing exports.\n const missingExportsForFiles = Object.entries(missing).map(([sourceFile, errorInfo]) => {\n const { missingNames, importName, importPath, importVersion, bundledFile } = errorInfo;\n const error: BulletList = [\n `Importing bundle: ${importingBundle}`,\n `Importing source: ${importingSource}`,\n `Exporting package: ${formatPackageName({ name: importName, version: importVersion })}${importPath === '.' ? '' : ` (imported path: \"${importPath}\")`}`,\n `Exporting bundle: ${bundledFile}`,\n `Exporting source: ${sourceFile}`,\n `Missing export(s): { ${Array.from(missingNames).join(', ')} }`,\n ];\n\n if (!invalidSemver[packageId]) {\n return error;\n }\n\n // If we have an invalid semver, add a note about that after exporting package.\n const errorIndex = 3;\n return [\n ...error.slice(0, errorIndex),\n `Incompatible version: ${formatPackageName({ name: importName, version: importVersion })} does not satisfy importer requirement \"${invalidSemver[packageId]}\"`,\n ['If this was unexpected, make sure you installed dependencies after pulling the latest changes.'],\n ...error.slice(errorIndex),\n ];\n });\n\n return missingExportsForFiles.map((error) => ({\n text: `A bundle imported names from another bundle which were not exported:\\n${bulletedList(error)}\\n`,\n source: 'verify exports',\n // Don't include a whole-message location here because that doesn't make sense for this error type,\n // and we already put full paths to individual problem files within the message.\n }));\n });\n\n depErrors.forEach((errors) => {\n allErrors.push({\n name: parentResult.name,\n version: parentResult.version,\n path: parentPath,\n errors,\n });\n });\n }\n\n return allErrors;\n}\n"]}
@@ -141,10 +141,9 @@ export class CommandExecutor {
141
141
  // Merge in any additional features from the command line and remote feature flags.
142
142
  config.features = await getMergedFeatureFlags({ config, actionOptions, appPath, appName: definition.name });
143
143
  const featureErrors = checkFeatures({ configFeatures: config.features });
144
- // If there are any invalid features, exit with an error.
144
+ // If there are any invalid features, warn the user and continue.
145
145
  if (featureErrors.length) {
146
- featureErrors.forEach((error) => console.error(error));
147
- process.exit(1);
146
+ featureErrors.forEach((warning) => console.warn(warning));
148
147
  }
149
148
  const enabledFeatureNames = Object.entries(config.features)
150
149
  .filter(([, value]) => value)
@@ -1 +1 @@
1
- {"version":3,"file":"CommandExecutor.js","sourceRoot":"","sources":["../../src/utilities/CommandExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,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,qBAAqB,EAAwB,MAAM,yBAAyB,CAAC;AACtF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAI9F,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D;;GA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,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAC7G,eAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,OAAO,IAAI,WAAW,CAAC,CAAC;QAE1E,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,YAAY,GAAG;gBACnB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;gBAClC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;gBAC7C,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;gBACrC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,gCAAgC;aAC5D,CAAC;YAEF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;gBACxD,IAAI,KAAK,EAAE,CAAC;oBACV,eAAe,CAAC,sBAAsB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBACrD,CAAC;YACH,CAAC;QACH,CAAC;QAED,qFAAqF;QACrF,4BAA4B,CAAC,eAAe,CAAC,CAAC;QAE9C,OAAO,eAAe,CAAC;IACzB,CAAC;CA2BF","sourcesContent":["import { readConfig } 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 { createTelemetryClient, type TelemetryClient } from '@ms-cloudpack/telemetry';\nimport path from 'path';\nimport { registerPerformanceObservers } from '../performance/registerPerformanceObservers.js';\nimport type { CommandAction, CommandExitParams, AppCommandContext } from '../types/CommandAction.js';\nimport type { ProgramOptions } from '../types/ProgramOptions.js';\nimport type { SharedOptions } from '../types/SharedOptions.js';\nimport { isCIBuild } from '../utilities/isCIBuild.js';\nimport { AutoDisposableList } from './AutoDisposableList.js';\nimport { checkFeatures } from './checkFeatures.js';\nimport { getMergedFeatureFlags } from './getMergedFeatureFlags.js';\nimport { isCodespaces } from '../utilities/isCodespaces.js';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\n\n/**\n * This class manages orchestration and shared state while executing a command.\n */\nexport class CommandExecutor<TOptions extends SharedOptions> {\n private _options: TOptions;\n private _execute: CommandAction<TOptions>;\n private _programOptions: ProgramOptions;\n private _verb: string;\n private _reporter: TaskReporter;\n private _autoDisposableList: AutoDisposableList;\n private _abortController: AbortController;\n private _hasCalledExit = false;\n private _args: string[];\n private _getMessageOnInterrupt = () => `Interrupted by user`;\n\n constructor(params: {\n /** Command-specific arguments */\n args: string[];\n /** Command-specific and shared options. */\n options: TOptions;\n /** Function to execute the command. */\n execute: CommandAction<TOptions>;\n /** Shared program-level configuration. */\n programOptions: ProgramOptions;\n /** Verb being run, e.g. `bundle` or `cache clean`. */\n verb: string;\n }) {\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._reporter = new TaskReporter();\n this._abortController = new AbortController();\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() {\n try {\n // Setup cleanup and close things on completion.\n let sigintCount = 0;\n\n // Handle SIGINT (Ctrl+C) gracefully.\n process.on('SIGINT', () => {\n sigintCount++;\n if (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 process.exit(1);\n }\n\n // We are trying to exit gracefully.\n void this._exit({ message: this._getMessageOnInterrupt() });\n });\n\n // Call the execute function which is the real command logic\n // (ie: real init command logic, real start command logic, etc.)\n await this._execute({\n args: this._args,\n options: this._options,\n cwd: this._programOptions.cwd,\n reporter: this._reporter,\n initialize: this._initialize.bind(this),\n abortSignal: this._abortController.signal,\n autoDispose: (disposable) => this._autoDisposableList.add(disposable),\n exit: this._exit,\n setInterruptMessageHandler: (getMessage) => {\n this._getMessageOnInterrupt = getMessage;\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 instanceof Error ? error.stack || error.message : String(error),\n });\n }\n }\n\n /**\n * This is the `initialize` function passed to the command's execute function.\n * This function uses `this` to references several class members, which is why\n * the `execute` method must use `.bind(this)`.\n * (An arrow function isn't possible here due to the overloaded method signature).\n */\n private async _initialize(initializeParams: {\n appPath: string;\n overrideOptions?: Partial<SharedOptions>;\n }): Promise<AppCommandContext>;\n private async _initialize(initializeParams: {\n appPaths: string[];\n overrideOptions?: Partial<SharedOptions>;\n }): Promise<AppCommandContext[]>;\n private async _initialize(initializeParams: {\n appPath?: string;\n appPaths?: string[];\n overrideOptions?: Partial<SharedOptions>;\n }): Promise<AppCommandContext | AppCommandContext[]> {\n const { appPath: singleAppPath } = initializeParams;\n let { appPaths } = initializeParams;\n\n if (singleAppPath && appPaths) {\n throw Error('appPath and appPaths cannot both be specified at the same time');\n }\n if (!singleAppPath && !appPaths) {\n throw Error('one of appPath or appPaths must be specified');\n }\n\n if (!appPaths || appPaths.length === 0) {\n appPaths = singleAppPath ? [singleAppPath] : [];\n }\n\n const contexts: AppCommandContext[] = [];\n\n const actionOptions: SharedOptions = {\n ...this._options,\n ...initializeParams.overrideOptions,\n };\n\n const helpMessages = new Set<string>();\n\n const configs = new Map<string, CloudpackConfig>();\n for (const appPath of appPaths) {\n const config = await readConfig(appPath);\n if (config.helpMessage) {\n helpMessages.add(config.helpMessage);\n }\n configs.set(appPath, config);\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: !actionOptions.color,\n ...(actionOptions.debug\n ? debugLoggingConfig\n : actionOptions.verbose\n ? verboseLoggingConfig\n : actionOptions.quiet\n ? noLoggingConfig\n : defaultLoggingConfig),\n });\n\n for (const appPath of appPaths) {\n const config = configs.get(appPath) as CloudpackConfig;\n const definition = (await readJson(path.join(appPath, 'package.json'))) as PackageJson;\n\n const telemetryClient = await this._initTelemetry(definition.name, config);\n // Dispose the telemetry client when the app is closing\n this._autoDisposableList.add({\n dispose: () => telemetryClient.shutdown(),\n });\n\n // Merge in any additional features from the command line and remote feature flags.\n config.features = await getMergedFeatureFlags({ config, actionOptions, appPath, appName: definition.name });\n\n const featureErrors = checkFeatures({ configFeatures: config.features });\n // If there are any invalid features, exit with an error.\n if (featureErrors.length) {\n featureErrors.forEach((error) => console.error(error));\n process.exit(1);\n }\n\n const enabledFeatureNames = Object.entries(config.features)\n .filter(([, value]) => value)\n .map(([key]) => key);\n\n if (enabledFeatureNames.length) {\n telemetryClient.setSharedSpanAttribute('features', enabledFeatureNames);\n console.log(`Enabled features: ${enabledFeatureNames.map((f) => yellow(f)).join(', ')}`);\n }\n\n contexts.push({\n appPath: appPath,\n telemetryClient,\n config,\n });\n }\n\n return singleAppPath ? contexts[0] : contexts;\n }\n\n private async _initTelemetry(appName: string | undefined, config: CloudpackConfig): Promise<TelemetryClient> {\n const programOptions = this._programOptions;\n const options = this._options;\n\n const connectionString = programOptions.disableTelemetry\n ? undefined\n : config.telemetry?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;\n\n const logLevel = options.verbose ? 'VERBOSE' : options.debug ? 'DEBUG' : undefined;\n if (!options.debug) {\n this._reporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n connectionString,\n logLevel,\n serviceNamespace: 'cloudpack',\n serviceName: 'cli',\n rootSpanName: 'CLI',\n });\n\n const isCI = isCIBuild();\n\n telemetryClient.setSharedSpanAttribute('verb', this._verb);\n telemetryClient.setSharedSpanAttribute('arguments', programOptions.argv.slice(3).join(' '));\n telemetryClient.setSharedSpanAttribute('environment', isCI ? 'ci' : isCodespaces() ? 'codespaces' : 'local');\n telemetryClient.setSharedSpanAttribute('appName', appName || '<unknown>');\n\n if (isCI) {\n const ciAttributes = {\n buildId: process.env.BUILD_BUILDID,\n definitionId: process.env.SYSTEM_DEFINITIONID,\n buildReason: process.env.BUILD_REASON,\n pullRequestId: process.env.SYSTEM_PULLREQUEST_PULLREQUESTID,\n };\n\n for (const [key, value] of Object.entries(ciAttributes)) {\n if (value) {\n telemetryClient.setSharedSpanAttribute(key, value);\n }\n }\n }\n\n // Register performance observers to track performance metrics as events of CLI span.\n registerPerformanceObservers(telemetryClient);\n\n return telemetryClient;\n }\n\n /**\n * This is the `exit` function passed to the command's execute function.\n * (It must be an arrow function to ensure the correct `this` context.)\n */\n private _exit = async (params: CommandExitParams) => {\n const { message, hasErrors = this._reporter.hasErrors(), exitCode = hasErrors ? 1 : 0 } = params;\n\n if (this._hasCalledExit) {\n // Skip most of the operations if exit() was called multiple times.\n console.warn(\"exit() was called multiple times. This call's options:\", params);\n } else {\n this._hasCalledExit = true;\n\n // Let the execute function know that we are exiting.\n this._abortController.abort();\n\n // Dispose all registered disposables.\n await this._autoDisposableList.dispose();\n\n // Show the summary message (this will throw if called twice).\n this._reporter.complete(hasErrors ? red(message) : message);\n }\n\n process.exit(exitCode);\n };\n}\n"]}
1
+ {"version":3,"file":"CommandExecutor.js","sourceRoot":"","sources":["../../src/utilities/CommandExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,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,qBAAqB,EAAwB,MAAM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Json } 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 { createTelemetryClient, type TelemetryClient } from '@ms-cloudpack/telemetry';\nimport path from 'path';\nimport { registerPerformanceObservers } from '../performance/registerPerformanceObservers.js';\nimport type { CommandAction, CommandExitParams, AppCommandContext } from '../types/CommandAction.js';\nimport type { ProgramOptions } from '../types/ProgramOptions.js';\nimport type { SharedOptions } from '../types/SharedOptions.js';\nimport { isCIBuild } from '../utilities/isCIBuild.js';\nimport { AutoDisposableList } from './AutoDisposableList.js';\nimport { checkFeatures } from './checkFeatures.js';\nimport { getMergedFeatureFlags } from './getMergedFeatureFlags.js';\nimport { isCodespaces } from '../utilities/isCodespaces.js';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\n\n/**\n * This class manages orchestration and shared state while executing a command.\n */\nexport class CommandExecutor<TOptions extends SharedOptions> {\n private _options: TOptions;\n private _execute: CommandAction<TOptions>;\n private _programOptions: ProgramOptions;\n private _verb: string;\n private _reporter: TaskReporter;\n private _autoDisposableList: AutoDisposableList;\n private _abortController: AbortController;\n private _hasCalledExit = false;\n private _args: string[];\n private _getMessageOnInterrupt = () => `Interrupted by user`;\n\n constructor(params: {\n /** Command-specific arguments */\n args: string[];\n /** Command-specific and shared options. */\n options: TOptions;\n /** Function to execute the command. */\n execute: CommandAction<TOptions>;\n /** Shared program-level configuration. */\n programOptions: ProgramOptions;\n /** Verb being run, e.g. `bundle` or `cache clean`. */\n verb: string;\n }) {\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._reporter = new TaskReporter();\n this._abortController = new AbortController();\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() {\n try {\n // Setup cleanup and close things on completion.\n let sigintCount = 0;\n\n // Handle SIGINT (Ctrl+C) gracefully.\n process.on('SIGINT', () => {\n sigintCount++;\n if (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 process.exit(1);\n }\n\n // We are trying to exit gracefully.\n void this._exit({ message: this._getMessageOnInterrupt() });\n });\n\n // Call the execute function which is the real command logic\n // (ie: real init command logic, real start command logic, etc.)\n await this._execute({\n args: this._args,\n options: this._options,\n cwd: this._programOptions.cwd,\n reporter: this._reporter,\n initialize: this._initialize.bind(this),\n abortSignal: this._abortController.signal,\n autoDispose: (disposable) => this._autoDisposableList.add(disposable),\n exit: this._exit,\n setInterruptMessageHandler: (getMessage) => {\n this._getMessageOnInterrupt = getMessage;\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 instanceof Error ? error.stack || error.message : String(error),\n });\n }\n }\n\n /**\n * This is the `initialize` function passed to the command's execute function.\n * This function uses `this` to references several class members, which is why\n * the `execute` method must use `.bind(this)`.\n * (An arrow function isn't possible here due to the overloaded method signature).\n */\n private async _initialize(initializeParams: {\n appPath: string;\n overrideOptions?: Partial<SharedOptions>;\n }): Promise<AppCommandContext>;\n private async _initialize(initializeParams: {\n appPaths: string[];\n overrideOptions?: Partial<SharedOptions>;\n }): Promise<AppCommandContext[]>;\n private async _initialize(initializeParams: {\n appPath?: string;\n appPaths?: string[];\n overrideOptions?: Partial<SharedOptions>;\n }): Promise<AppCommandContext | AppCommandContext[]> {\n const { appPath: singleAppPath } = initializeParams;\n let { appPaths } = initializeParams;\n\n if (singleAppPath && appPaths) {\n throw Error('appPath and appPaths cannot both be specified at the same time');\n }\n if (!singleAppPath && !appPaths) {\n throw Error('one of appPath or appPaths must be specified');\n }\n\n if (!appPaths || appPaths.length === 0) {\n appPaths = singleAppPath ? [singleAppPath] : [];\n }\n\n const contexts: AppCommandContext[] = [];\n\n const actionOptions: SharedOptions = {\n ...this._options,\n ...initializeParams.overrideOptions,\n };\n\n const helpMessages = new Set<string>();\n\n const configs = new Map<string, CloudpackConfig>();\n for (const appPath of appPaths) {\n const config = await readConfig(appPath);\n if (config.helpMessage) {\n helpMessages.add(config.helpMessage);\n }\n configs.set(appPath, config);\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: !actionOptions.color,\n ...(actionOptions.debug\n ? debugLoggingConfig\n : actionOptions.verbose\n ? verboseLoggingConfig\n : actionOptions.quiet\n ? noLoggingConfig\n : defaultLoggingConfig),\n });\n\n for (const appPath of appPaths) {\n const config = configs.get(appPath) as CloudpackConfig;\n const definition = (await readJson(path.join(appPath, 'package.json'))) as PackageJson;\n\n const telemetryClient = await this._initTelemetry(definition.name, config);\n // Dispose the telemetry client when the app is closing\n this._autoDisposableList.add({\n dispose: () => telemetryClient.shutdown(),\n });\n\n // Merge in any additional features from the command line and remote feature flags.\n config.features = await getMergedFeatureFlags({ config, actionOptions, appPath, appName: definition.name });\n\n const featureErrors = checkFeatures({ configFeatures: config.features });\n\n // If there are any invalid features, warn the user and continue.\n if (featureErrors.length) {\n featureErrors.forEach((warning) => console.warn(warning));\n }\n\n const enabledFeatureNames = Object.entries(config.features)\n .filter(([, value]) => value)\n .map(([key]) => key);\n\n if (enabledFeatureNames.length) {\n telemetryClient.setSharedSpanAttribute('features', enabledFeatureNames);\n console.log(`Enabled features: ${enabledFeatureNames.map((f) => yellow(f)).join(', ')}`);\n }\n\n contexts.push({\n appPath: appPath,\n telemetryClient,\n config,\n });\n }\n\n return singleAppPath ? contexts[0] : contexts;\n }\n\n private async _initTelemetry(appName: string | undefined, config: CloudpackConfig): Promise<TelemetryClient> {\n const programOptions = this._programOptions;\n const options = this._options;\n\n const connectionString = programOptions.disableTelemetry\n ? undefined\n : config.telemetry?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;\n\n const logLevel = options.verbose ? 'VERBOSE' : options.debug ? 'DEBUG' : undefined;\n if (!options.debug) {\n this._reporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n connectionString,\n logLevel,\n serviceNamespace: 'cloudpack',\n serviceName: 'cli',\n rootSpanName: 'CLI',\n });\n\n const isCI = isCIBuild();\n\n telemetryClient.setSharedSpanAttribute('verb', this._verb);\n telemetryClient.setSharedSpanAttribute('arguments', programOptions.argv.slice(3).join(' '));\n telemetryClient.setSharedSpanAttribute('environment', isCI ? 'ci' : isCodespaces() ? 'codespaces' : 'local');\n telemetryClient.setSharedSpanAttribute('appName', appName || '<unknown>');\n\n if (isCI) {\n const ciAttributes = {\n buildId: process.env.BUILD_BUILDID,\n definitionId: process.env.SYSTEM_DEFINITIONID,\n buildReason: process.env.BUILD_REASON,\n pullRequestId: process.env.SYSTEM_PULLREQUEST_PULLREQUESTID,\n };\n\n for (const [key, value] of Object.entries(ciAttributes)) {\n if (value) {\n telemetryClient.setSharedSpanAttribute(key, value);\n }\n }\n }\n\n // Register performance observers to track performance metrics as events of CLI span.\n registerPerformanceObservers(telemetryClient);\n\n return telemetryClient;\n }\n\n /**\n * This is the `exit` function passed to the command's execute function.\n * (It must be an arrow function to ensure the correct `this` context.)\n */\n private _exit = async (params: CommandExitParams) => {\n const { message, hasErrors = this._reporter.hasErrors(), exitCode = hasErrors ? 1 : 0 } = params;\n\n if (this._hasCalledExit) {\n // Skip most of the operations if exit() was called multiple times.\n console.warn(\"exit() was called multiple times. This call's options:\", params);\n } else {\n this._hasCalledExit = true;\n\n // Let the execute function know that we are exiting.\n this._abortController.abort();\n\n // Dispose all registered disposables.\n await this._autoDisposableList.dispose();\n\n // Show the summary message (this will throw if called twice).\n this._reporter.complete(hasErrors ? red(message) : message);\n }\n\n process.exit(exitCode);\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/cli",
3
- "version": "0.59.3",
3
+ "version": "0.59.4",
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,16 @@
10
10
  "cloudpack": "./bin/cloudpack.js"
11
11
  },
12
12
  "dependencies": {
13
- "@ms-cloudpack/api-server": "^0.37.2",
14
- "@ms-cloudpack/app-server": "^0.3.10",
15
- "@ms-cloudpack/bundle-server": "^0.2.54",
16
- "@ms-cloudpack/common-types": "^0.2.3",
17
- "@ms-cloudpack/config": "^0.19.3",
13
+ "@ms-cloudpack/api-server": "^0.37.3",
14
+ "@ms-cloudpack/app-server": "^0.3.11",
15
+ "@ms-cloudpack/bundle-server": "^0.2.55",
16
+ "@ms-cloudpack/common-types": "^0.2.4",
17
+ "@ms-cloudpack/config": "^0.19.4",
18
18
  "@ms-cloudpack/feature-flags": "^0.1.1",
19
19
  "@ms-cloudpack/json-utilities": "^0.1.4",
20
- "@ms-cloudpack/overlay": "^0.16.103",
21
- "@ms-cloudpack/package-utilities": "^7.1.5",
22
- "@ms-cloudpack/path-utilities": "^2.7.1",
20
+ "@ms-cloudpack/overlay": "^0.16.104",
21
+ "@ms-cloudpack/package-utilities": "^7.1.6",
22
+ "@ms-cloudpack/path-utilities": "^2.7.2",
23
23
  "@ms-cloudpack/remote-cache": "^0.6.5",
24
24
  "@ms-cloudpack/task-reporter": "^0.13.1",
25
25
  "@ms-cloudpack/telemetry": "^0.5.1",
@@ -34,7 +34,7 @@
34
34
  "workspace-tools": "^0.36.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@ms-cloudpack/common-types": "^0.2.3",
37
+ "@ms-cloudpack/common-types": "^0.2.4",
38
38
  "@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
39
39
  "@ms-cloudpack/scripts": "^0.0.1",
40
40
  "@ms-cloudpack/test-utilities": "^0.5.0",