@ms-cloudpack/cli 0.72.49 → 0.72.51
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 +3 -7
- 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 +1 -2
- package/lib/commands/bundle/index.js.map +1 -1
- package/lib/commands/bundle/types/BundleOptions.d.ts +1 -8
- package/lib/commands/bundle/types/BundleOptions.d.ts.map +1 -1
- package/lib/commands/bundle/types/BundleOptions.js.map +1 -1
- package/lib/commands/cache/clean.d.ts.map +1 -1
- package/lib/commands/cache/clean.js +1 -2
- package/lib/commands/cache/clean.js.map +1 -1
- package/lib/commands/config/delete.d.ts.map +1 -1
- package/lib/commands/config/delete.js +1 -2
- package/lib/commands/config/delete.js.map +1 -1
- package/lib/commands/config/get.d.ts.map +1 -1
- package/lib/commands/config/get.js +1 -2
- package/lib/commands/config/get.js.map +1 -1
- package/lib/commands/config/list.d.ts.map +1 -1
- package/lib/commands/config/list.js +1 -3
- package/lib/commands/config/list.js.map +1 -1
- package/lib/commands/config/set.d.ts.map +1 -1
- package/lib/commands/config/set.js +1 -2
- package/lib/commands/config/set.js.map +1 -1
- package/lib/commands/info/lockFile/execute.d.ts.map +1 -1
- package/lib/commands/info/lockFile/execute.js +1 -2
- package/lib/commands/info/lockFile/execute.js.map +1 -1
- package/lib/commands/info/nonSemverDeps/execute.js +2 -2
- package/lib/commands/info/nonSemverDeps/execute.js.map +1 -1
- package/lib/commands/init/execute.d.ts.map +1 -1
- package/lib/commands/init/execute.js +1 -10
- package/lib/commands/init/execute.js.map +1 -1
- package/lib/commands/init/index.d.ts.map +1 -1
- package/lib/commands/init/index.js +3 -0
- package/lib/commands/init/index.js.map +1 -1
- package/lib/commands/init/init.d.ts.map +1 -1
- package/lib/commands/init/init.js +149 -148
- package/lib/commands/init/init.js.map +1 -1
- package/lib/commands/init/types/InitOptions.d.ts +1 -1
- package/lib/commands/init/types/InitOptions.d.ts.map +1 -1
- package/lib/commands/init/types/InitOptions.js.map +1 -1
- package/lib/commands/link/execute.d.ts.map +1 -1
- package/lib/commands/link/execute.js +2 -2
- package/lib/commands/link/execute.js.map +1 -1
- package/lib/commands/setup/execute.d.ts.map +1 -1
- package/lib/commands/setup/execute.js +1 -2
- package/lib/commands/setup/execute.js.map +1 -1
- package/lib/commands/start/execute.d.ts.map +1 -1
- package/lib/commands/start/execute.js +3 -10
- package/lib/commands/start/execute.js.map +1 -1
- package/lib/commands/start/index.js +5 -2
- package/lib/commands/start/index.js.map +1 -1
- package/lib/commands/start/types/StartOptions.d.ts +1 -3
- package/lib/commands/start/types/StartOptions.d.ts.map +1 -1
- package/lib/commands/start/types/StartOptions.js.map +1 -1
- package/lib/commands/sync/execute.d.ts.map +1 -1
- package/lib/commands/sync/execute.js +2 -2
- package/lib/commands/sync/execute.js.map +1 -1
- package/lib/commands/unlink/execute.js +2 -2
- package/lib/commands/unlink/execute.js.map +1 -1
- package/lib/types/AppPathDiscoveryMode.d.ts +14 -0
- package/lib/types/AppPathDiscoveryMode.d.ts.map +1 -0
- package/lib/types/AppPathDiscoveryMode.js +2 -0
- package/lib/types/AppPathDiscoveryMode.js.map +1 -0
- package/lib/types/CommandAction.d.ts +5 -25
- package/lib/types/CommandAction.d.ts.map +1 -1
- package/lib/types/CommandAction.js.map +1 -1
- package/lib/types/ReusedOptions.d.ts +9 -0
- package/lib/types/ReusedOptions.d.ts.map +1 -1
- package/lib/types/ReusedOptions.js.map +1 -1
- package/lib/types/SharedOptions.d.ts +2 -2
- package/lib/types/SharedOptions.d.ts.map +1 -1
- package/lib/types/SharedOptions.js.map +1 -1
- package/lib/utilities/CloudpackCommand.d.ts +3 -1
- package/lib/utilities/CloudpackCommand.d.ts.map +1 -1
- package/lib/utilities/CloudpackCommand.js +4 -1
- package/lib/utilities/CloudpackCommand.js.map +1 -1
- package/lib/utilities/CommandExecutor.d.ts +19 -7
- package/lib/utilities/CommandExecutor.d.ts.map +1 -1
- package/lib/utilities/CommandExecutor.js +48 -26
- package/lib/utilities/CommandExecutor.js.map +1 -1
- package/lib/utilities/discoverAppPaths.d.ts +28 -0
- package/lib/utilities/discoverAppPaths.d.ts.map +1 -0
- package/lib/utilities/discoverAppPaths.js +80 -0
- package/lib/utilities/discoverAppPaths.js.map +1 -0
- package/lib/utilities/parseFeature.d.ts +6 -0
- package/lib/utilities/parseFeature.d.ts.map +1 -0
- package/lib/utilities/parseFeature.js +42 -0
- package/lib/utilities/parseFeature.js.map +1 -0
- package/lib/utilities/reusedOptions.d.ts +8 -0
- package/lib/utilities/reusedOptions.d.ts.map +1 -1
- package/lib/utilities/reusedOptions.js +8 -0
- package/lib/utilities/reusedOptions.js.map +1 -1
- package/package.json +6 -6
- package/lib/commands/start/getStartingAppPath.d.ts +0 -12
- package/lib/commands/start/getStartingAppPath.d.ts.map +0 -1
- package/lib/commands/start/getStartingAppPath.js +0 -60
- package/lib/commands/start/getStartingAppPath.js.map +0 -1
- package/lib/utilities/checkFeatures.d.ts +0 -12
- package/lib/utilities/checkFeatures.d.ts.map +0 -1
- package/lib/utilities/checkFeatures.js +0 -24
- package/lib/utilities/checkFeatures.js.map +0 -1
- package/lib/utilities/findCloudpackAppPaths.d.ts +0 -7
- package/lib/utilities/findCloudpackAppPaths.d.ts.map +0 -1
- package/lib/utilities/findCloudpackAppPaths.js +0 -12
- package/lib/utilities/findCloudpackAppPaths.js.map +0 -1
- package/lib/utilities/getConfigOptionsFromCliOptions.d.ts +0 -8
- package/lib/utilities/getConfigOptionsFromCliOptions.d.ts.map +0 -1
- package/lib/utilities/getConfigOptionsFromCliOptions.js +0 -14
- package/lib/utilities/getConfigOptionsFromCliOptions.js.map +0 -1
- package/lib/utilities/mergeFeatures.d.ts +0 -8
- package/lib/utilities/mergeFeatures.d.ts.map +0 -1
- package/lib/utilities/mergeFeatures.js +0 -16
- package/lib/utilities/mergeFeatures.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getStartingAppPath.js","sourceRoot":"","sources":["../../../src/commands/start/getStartingAppPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAwB,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAG3C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,GAAW,EAAE,UAAmB;IACvE,MAAM,iBAAiB,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC3E,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACrD,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAE1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO;YACL,KAAK,EAAE,GAAG,CAAC,IAAI;YACf,WAAW,EAAE,GAAG,EAAE,WAAW,IAAI,0EAA0E;YAC3G,KAAK,EAAE,GAAG;SACX,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAE3D,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QACnF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,KAAe,CAAC;QACzC,CAAC;QACD,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC;QAC9E,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,UAAU,CAAC,KAAe,CAAC;QACpC,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAgB;QAC5C,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,kCAAkC;QAC3C,OAAO;KACR,CAAC,CAAC;IAEH,wDAAwD;IACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAClB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,QAAQ,CAAC,GAAa,CAAC;AAChC,CAAC","sourcesContent":["import { PackageDefinitions } from '@ms-cloudpack/package-utilities';\nimport fs from 'fs';\nimport path from 'path';\nimport prompts, { type Choice } from 'prompts';\nimport { findCloudpackAppPaths } from '../../utilities/findCloudpackAppPaths.js';\nimport type { CommandExitParams } from '../../types/CommandAction.js';\nimport { appConfigFileName } from '@ms-cloudpack/config';\n\nexport const appPromptQuestionName = 'app';\ntype AppPromptKeys = typeof appPromptQuestionName;\n\n/**\n * Gets the appPath from which Cloudpack will start. If the CWD is a Cloudpack-enabled app,\n * we'll start there; otherwise, we'll scan for Cloudpack-enabled app and present the user\n * with a menu. If no app are found, Cloudpack will just try to start the CWD anyway.\n * @param cwd - The current working directory to start in when finding the starting app path\n * @param desiredApp - The app that should be started as specified via --app arg\n * @returns The app path of the app that Cloudpack should start, or an exit options object if the user cancels\n */\nexport async function getStartingAppPath(cwd: string, desiredApp?: string): Promise<string | CommandExitParams> {\n const cwdIsCloudpackApp = fs.existsSync(path.join(cwd, appConfigFileName));\n if (cwdIsCloudpackApp) {\n return cwd;\n }\n\n const cloudpackAppPaths = findCloudpackAppPaths(cwd);\n if (cloudpackAppPaths.length === 0) {\n return cwd;\n }\n if (cloudpackAppPaths.length === 1) {\n return cloudpackAppPaths[0];\n }\n\n const packages = new PackageDefinitions();\n\n const choices = await Promise.all<Choice>(\n cloudpackAppPaths.map(async (dir) => {\n const pkg = await packages.get(dir);\n return {\n title: pkg.name,\n description: pkg?.description ?? 'An awesome app that would be even more awesome with a proper description',\n value: dir,\n };\n }),\n );\n choices.sort((c1, c2) => c1.title.localeCompare(c2.title));\n\n if (desiredApp) {\n const matchingApps = choices.filter((choice) => choice.title.includes(desiredApp));\n if (matchingApps.length === 1) {\n return matchingApps[0].value as string;\n }\n const exactMatch = matchingApps.find((choice) => choice.title === desiredApp);\n if (exactMatch) {\n return exactMatch.value as string;\n }\n }\n\n const response = await prompts<AppPromptKeys>({\n type: 'select',\n name: appPromptQuestionName,\n message: 'Select the app you want to start',\n choices,\n });\n\n // This will be undefined if the user cancels the prompt\n if (!response.app) {\n return { isInterrupted: true, message: '' };\n }\n\n return response.app as string;\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { allFeatures } from '@ms-cloudpack/common-types';
|
|
2
|
-
/**
|
|
3
|
-
* Check that the features in the config are valid.
|
|
4
|
-
* @returns An array of errors.
|
|
5
|
-
*/
|
|
6
|
-
export declare function checkFeatures<TFeatureSet extends Record<string, unknown> = typeof allFeatures>({ configFeatures, featureSet, }: {
|
|
7
|
-
/** The features from the config. */
|
|
8
|
-
configFeatures?: Record<string, boolean>;
|
|
9
|
-
/** The set of valid features. */
|
|
10
|
-
featureSet?: TFeatureSet;
|
|
11
|
-
}): string[];
|
|
12
|
-
//# sourceMappingURL=checkFeatures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkFeatures.d.ts","sourceRoot":"","sources":["../../src/utilities/checkFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAGzD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,WAAW,EAAE,EAC9F,cAAc,EACd,UAAkD,GACnD,EAAE;IACD,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,iCAAiC;IACjC,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B,GAAG,MAAM,EAAE,CAmBX"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { allFeatures } from '@ms-cloudpack/common-types';
|
|
2
|
-
import didyoumean from 'didyoumean';
|
|
3
|
-
/**
|
|
4
|
-
* Check that the features in the config are valid.
|
|
5
|
-
* @returns An array of errors.
|
|
6
|
-
*/
|
|
7
|
-
export function checkFeatures({ configFeatures, featureSet = allFeatures, }) {
|
|
8
|
-
if (!configFeatures) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
const featureList = Object.keys(featureSet);
|
|
12
|
-
const features = Object.keys(configFeatures);
|
|
13
|
-
const errors = [];
|
|
14
|
-
features.forEach((featureName) => {
|
|
15
|
-
// Require an exact match.
|
|
16
|
-
if (!(featureName in featureSet)) {
|
|
17
|
-
// If there is no exact match, suggest the closest match.
|
|
18
|
-
const suggestion = didyoumean(featureName, featureList);
|
|
19
|
-
errors.push(`Unknown feature "${featureName}".${suggestion ? ` Did you mean "${suggestion}"?` : ''}`);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return errors;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=checkFeatures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkFeatures.js","sourceRoot":"","sources":["../../src/utilities/checkFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAmE,EAC9F,cAAc,EACd,UAAU,GAAG,WAAqC,GAMnD;IACC,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,QAAQ,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QAC/B,0BAA0B;QAC1B,IAAI,CAAC,CAAC,WAAW,IAAI,UAAU,CAAC,EAAE,CAAC;YACjC,yDAAyD;YACzD,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC,oBAAoB,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,kBAAkB,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxG,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { allFeatures } from '@ms-cloudpack/common-types';\nimport didyoumean from 'didyoumean';\n\n/**\n * Check that the features in the config are valid.\n * @returns An array of errors.\n */\nexport function checkFeatures<TFeatureSet extends Record<string, unknown> = typeof allFeatures>({\n configFeatures,\n featureSet = allFeatures as unknown as TFeatureSet,\n}: {\n /** The features from the config. */\n configFeatures?: Record<string, boolean>;\n /** The set of valid features. */\n featureSet?: TFeatureSet;\n}): string[] {\n if (!configFeatures) {\n return [];\n }\n\n const featureList = Object.keys(featureSet);\n const features = Object.keys(configFeatures);\n const errors: string[] = [];\n\n features.forEach((featureName) => {\n // Require an exact match.\n if (!(featureName in featureSet)) {\n // If there is no exact match, suggest the closest match.\n const suggestion = didyoumean(featureName, featureList);\n errors.push(`Unknown feature \"${featureName}\".${suggestion ? ` Did you mean \"${suggestion}\"?` : ''}`);\n }\n });\n\n return errors;\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Find folders in the repo containing a `cloudpack.config.json` file.
|
|
3
|
-
* @param startingPath The path to start searching from when finding Cloudpack apps
|
|
4
|
-
* @returns An array of app paths corresponding to all discovered Cloudpack apps
|
|
5
|
-
*/
|
|
6
|
-
export declare function findCloudpackAppPaths(startingPath: string): string[];
|
|
7
|
-
//# sourceMappingURL=findCloudpackAppPaths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findCloudpackAppPaths.d.ts","sourceRoot":"","sources":["../../src/utilities/findCloudpackAppPaths.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAIpE"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { appConfigFileName } from '@ms-cloudpack/config';
|
|
2
|
-
import glob from 'fast-glob';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
/**
|
|
5
|
-
* Find folders in the repo containing a `cloudpack.config.json` file.
|
|
6
|
-
* @param startingPath The path to start searching from when finding Cloudpack apps
|
|
7
|
-
* @returns An array of app paths corresponding to all discovered Cloudpack apps
|
|
8
|
-
*/
|
|
9
|
-
export function findCloudpackAppPaths(startingPath) {
|
|
10
|
-
return (glob.sync([`**/${appConfigFileName}`], { cwd: startingPath, ignore: ['**/node_modules/**'] }) ?? []).map((file) => path.join(startingPath, path.dirname(file)));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=findCloudpackAppPaths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findCloudpackAppPaths.js","sourceRoot":"","sources":["../../src/utilities/findCloudpackAppPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAAoB;IACxD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,iBAAiB,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAC9G,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CACtD,CAAC;AACJ,CAAC","sourcesContent":["import { appConfigFileName } from '@ms-cloudpack/config';\nimport glob from 'fast-glob';\nimport path from 'path';\n\n/**\n * Find folders in the repo containing a `cloudpack.config.json` file.\n * @param startingPath The path to start searching from when finding Cloudpack apps\n * @returns An array of app paths corresponding to all discovered Cloudpack apps\n */\nexport function findCloudpackAppPaths(startingPath: string): string[] {\n return (glob.sync([`**/${appConfigFileName}`], { cwd: startingPath, ignore: ['**/node_modules/**'] }) ?? []).map(\n (file) => path.join(startingPath, path.dirname(file)),\n );\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ReadConfigOptions } from '@ms-cloudpack/config';
|
|
2
|
-
import type { BundleOptions } from '../commands/bundle/types/BundleOptions.js';
|
|
3
|
-
/**
|
|
4
|
-
* Translate CLI options into `readConfig` options. (This currently uses partial `BundleOptions` as
|
|
5
|
-
* the type, but it works for anything with at least one of the listed properties.)
|
|
6
|
-
*/
|
|
7
|
-
export declare function getConfigOptionsFromCliOptions(options: Partial<Pick<BundleOptions, 'mode' | 'bundler' | 'logBundleInfo'>>): ReadConfigOptions;
|
|
8
|
-
//# sourceMappingURL=getConfigOptionsFromCliOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getConfigOptionsFromCliOptions.d.ts","sourceRoot":"","sources":["../../src/utilities/getConfigOptionsFromCliOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,CAAC,CAAC,GAC1E,iBAAiB,CAQnB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Translate CLI options into `readConfig` options. (This currently uses partial `BundleOptions` as
|
|
3
|
-
* the type, but it works for anything with at least one of the listed properties.)
|
|
4
|
-
*/
|
|
5
|
-
export function getConfigOptionsFromCliOptions(options) {
|
|
6
|
-
return {
|
|
7
|
-
mode: options.mode,
|
|
8
|
-
logBundleInfo: options.logBundleInfo,
|
|
9
|
-
// Handle --bundler by passing it as a universal package override, which will be appended
|
|
10
|
-
// to any user-provided packageSettings so that it takes precedence.
|
|
11
|
-
extraPackageSettings: options.bundler ? [{ match: '*', bundler: options.bundler }] : undefined,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=getConfigOptionsFromCliOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getConfigOptionsFromCliOptions.js","sourceRoot":"","sources":["../../src/utilities/getConfigOptionsFromCliOptions.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAA2E;IAE3E,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,yFAAyF;QACzF,oEAAoE;QACpE,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;KAC/F,CAAC;AACJ,CAAC","sourcesContent":["import type { ReadConfigOptions } from '@ms-cloudpack/config';\nimport type { BundleOptions } from '../commands/bundle/types/BundleOptions.js';\n\n/**\n * Translate CLI options into `readConfig` options. (This currently uses partial `BundleOptions` as\n * the type, but it works for anything with at least one of the listed properties.)\n */\nexport function getConfigOptionsFromCliOptions(\n options: Partial<Pick<BundleOptions, 'mode' | 'bundler' | 'logBundleInfo'>>,\n): ReadConfigOptions {\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"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Features } from '@ms-cloudpack/common-types';
|
|
2
|
-
export declare function mergeFeatures<TFeatures extends Partial<Record<string, boolean>> = Features>(params: {
|
|
3
|
-
configFeatures?: TFeatures;
|
|
4
|
-
remoteFeatureFlags?: TFeatures;
|
|
5
|
-
commandLineFeatures?: string[];
|
|
6
|
-
featureSet?: Record<keyof TFeatures, unknown>;
|
|
7
|
-
}): TFeatures;
|
|
8
|
-
//# sourceMappingURL=mergeFeatures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeFeatures.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAExE,wBAAgB,aAAa,CAAC,SAAS,SAAS,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE;IACnG,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,SAAS,EAAE,OAAO,CAAC,CAAC;CAC/C,GAAG,SAAS,CAkBZ"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { allFeatures } from '@ms-cloudpack/common-types';
|
|
2
|
-
export function mergeFeatures(params) {
|
|
3
|
-
const { configFeatures, commandLineFeatures, remoteFeatureFlags, featureSet = allFeatures } = params;
|
|
4
|
-
const featureList = Object.keys(featureSet);
|
|
5
|
-
const features = { ...remoteFeatureFlags, ...configFeatures };
|
|
6
|
-
commandLineFeatures?.forEach((partialFeatureName) => {
|
|
7
|
-
// Prefer an exact match, but fall back to partial match.
|
|
8
|
-
const matchedFeatureName = (featureList.find((f) => f.toLowerCase() === partialFeatureName.toLowerCase()) ||
|
|
9
|
-
featureList.find((f) => f.toLowerCase().indexOf(partialFeatureName.toLowerCase()) > -1));
|
|
10
|
-
if (matchedFeatureName) {
|
|
11
|
-
features[matchedFeatureName] = true;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
return features;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=mergeFeatures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeFeatures.js","sourceRoot":"","sources":["../../src/utilities/mergeFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,4BAA4B,CAAC;AAExE,MAAM,UAAU,aAAa,CAAgE,MAK5F;IACC,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,GAAG,WAAW,EAAE,GAAG,MAAM,CAAC;IACrG,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,QAAqB,CAAC;AAC/B,CAAC","sourcesContent":["import { allFeatures, type Features } from '@ms-cloudpack/common-types';\n\nexport function mergeFeatures<TFeatures extends Partial<Record<string, boolean>> = Features>(params: {\n configFeatures?: TFeatures;\n remoteFeatureFlags?: TFeatures;\n commandLineFeatures?: string[];\n featureSet?: Record<keyof TFeatures, unknown>;\n}): TFeatures {\n const { configFeatures, commandLineFeatures, remoteFeatureFlags, featureSet = allFeatures } = params;\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 TFeatures;\n}\n"]}
|