@ms-cloudpack/cli 0.54.26 → 0.54.28

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":"readYarnLock.d.ts","sourceRoot":"","sources":["../../../../src/commands/info/lockFile/readYarnLock.ts"],"names":[],"mappings":"AAKA,OAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC,CAmBhF"}
1
+ {"version":3,"file":"readYarnLock.d.ts","sourceRoot":"","sources":["../../../../src/commands/info/lockFile/readYarnLock.ts"],"names":[],"mappings":"AAKA,OAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC,CAuBhF"}
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import fsPromises from 'fs/promises';
3
3
  import path from 'path';
4
- import { findProjectRoot } from 'workspace-tools';
4
+ import { findProjectRoot } from '@ms-cloudpack/package-utilities';
5
5
  // This module doesn't actually provide named exports for functions (types are wrong)
6
6
  import yarnLock, {} from '@yarnpkg/lockfile';
7
7
  /**
@@ -12,6 +12,9 @@ import yarnLock, {} from '@yarnpkg/lockfile';
12
12
  */
13
13
  export async function readYarnLock(cwd) {
14
14
  const projectRoot = findProjectRoot(cwd);
15
+ if (!projectRoot) {
16
+ return `Project or package root not found relative to ${cwd}`;
17
+ }
15
18
  const yarnLockPath = path.join(projectRoot, 'yarn.lock');
16
19
  if (!fs.existsSync(yarnLockPath)) {
17
20
  return `${yarnLockPath} not found (this command only works with Yarn 1)`;
@@ -1 +1 @@
1
- {"version":3,"file":"readYarnLock.js","sourceRoot":"","sources":["../../../../src/commands/info/lockFile/readYarnLock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,qFAAqF;AACrF,OAAO,QAAQ,EAAE,EAAuB,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW;IAC5C,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,GAAG,YAAY,kDAAkD,CAAC;IAC3E,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACrE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACjD,OAAO,qCAAqC,CAAC;IAC/C,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC9C,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,2BAA2B,QAAQ,CAAC,IAAI,GAAG,CAAC;AACrD,CAAC","sourcesContent":["import fs from 'fs';\nimport fsPromises from 'fs/promises';\nimport path from 'path';\nimport { findProjectRoot } from 'workspace-tools';\n// This module doesn't actually provide named exports for functions (types are wrong)\nimport yarnLock, { type LockFileObject } from '@yarnpkg/lockfile';\n\n/**\n * Read and parse the yarn v1 lock file at the project root (usually git root), if it exists.\n * @param cwd Find the project root from here.\n * @returns Parsed lock file contents if repo uses yarn v1 and parsing was successful,\n * or an error message otherwise.\n */\nexport async function readYarnLock(cwd: string): Promise<string | LockFileObject> {\n const projectRoot = findProjectRoot(cwd);\n\n const yarnLockPath = path.join(projectRoot, 'yarn.lock');\n if (!fs.existsSync(yarnLockPath)) {\n return `${yarnLockPath} not found (this command only works with Yarn 1)`;\n }\n\n const lockContents = await fsPromises.readFile(yarnLockPath, 'utf8');\n if (!lockContents.includes('# yarn lockfile v1')) {\n return 'This command only works with Yarn 1';\n }\n\n const lockfile = yarnLock.parse(lockContents);\n if (lockfile.type === 'success') {\n return lockfile.object;\n }\n\n return `Error parsing lockfile (${lockfile.type})`;\n}\n"]}
1
+ {"version":3,"file":"readYarnLock.js","sourceRoot":"","sources":["../../../../src/commands/info/lockFile/readYarnLock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,qFAAqF;AACrF,OAAO,QAAQ,EAAE,EAAuB,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW;IAC5C,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAEzC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,iDAAiD,GAAG,EAAE,CAAC;IAChE,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,GAAG,YAAY,kDAAkD,CAAC;IAC3E,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACrE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACjD,OAAO,qCAAqC,CAAC;IAC/C,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC9C,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,2BAA2B,QAAQ,CAAC,IAAI,GAAG,CAAC;AACrD,CAAC","sourcesContent":["import fs from 'fs';\nimport fsPromises from 'fs/promises';\nimport path from 'path';\nimport { findProjectRoot } from '@ms-cloudpack/package-utilities';\n// This module doesn't actually provide named exports for functions (types are wrong)\nimport yarnLock, { type LockFileObject } from '@yarnpkg/lockfile';\n\n/**\n * Read and parse the yarn v1 lock file at the project root (usually git root), if it exists.\n * @param cwd Find the project root from here.\n * @returns Parsed lock file contents if repo uses yarn v1 and parsing was successful,\n * or an error message otherwise.\n */\nexport async function readYarnLock(cwd: string): Promise<string | LockFileObject> {\n const projectRoot = findProjectRoot(cwd);\n\n if (!projectRoot) {\n return `Project or package root not found relative to ${cwd}`;\n }\n\n const yarnLockPath = path.join(projectRoot, 'yarn.lock');\n if (!fs.existsSync(yarnLockPath)) {\n return `${yarnLockPath} not found (this command only works with Yarn 1)`;\n }\n\n const lockContents = await fsPromises.readFile(yarnLockPath, 'utf8');\n if (!lockContents.includes('# yarn lockfile v1')) {\n return 'This command only works with Yarn 1';\n }\n\n const lockfile = yarnLock.parse(lockContents);\n if (lockfile.type === 'success') {\n return lockfile.object;\n }\n\n return `Error parsing lockfile (${lockfile.type})`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getNonSemverDeps.d.ts","sourceRoot":"","sources":["../../../../src/commands/info/nonSemverDeps/getNonSemverDeps.ts"],"names":[],"mappings":"AAyBA;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDlB"}
1
+ {"version":3,"file":"getNonSemverDeps.d.ts","sourceRoot":"","sources":["../../../../src/commands/info/nonSemverDeps/getNonSemverDeps.ts"],"names":[],"mappings":"AA0BA;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDlB"}
@@ -1,8 +1,9 @@
1
1
  import { readJson } from '@ms-cloudpack/json-utilities';
2
+ import { findProjectRoot } from '@ms-cloudpack/package-utilities';
2
3
  import { table } from '@ms-cloudpack/task-reporter';
3
4
  import path from 'path';
4
5
  import semver from 'semver';
5
- import { findProjectRoot, getPackageInfos } from 'workspace-tools';
6
+ import { getPackageInfos } from 'workspace-tools';
6
7
  // resolutions might apply to prod or dev dependencies, so include it just in case
7
8
  const prodDeps = ['dependencies', 'peerDependencies', 'resolutions'];
8
9
  const allDeps = [...prodDeps, 'devDependencies'];
@@ -18,7 +19,7 @@ const depTypeNames = {
18
19
  */
19
20
  export async function getNonSemverDeps(params) {
20
21
  const { cwd, prod, overrideProjectRoot } = params;
21
- const projectRoot = overrideProjectRoot || findProjectRoot(cwd);
22
+ const projectRoot = overrideProjectRoot || findProjectRoot(cwd) || cwd;
22
23
  const packages = getPackageInfos(projectRoot);
23
24
  // add the root package.json to the package infos
24
25
  const rootPkgJsonPath = path.join(projectRoot, 'package.json');
@@ -1 +1 @@
1
- {"version":3,"file":"getNonSemverDeps.js","sourceRoot":"","sources":["../../../../src/commands/info/nonSemverDeps/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,CAAC","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/config-types';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport { table } from '@ms-cloudpack/task-reporter';\nimport path from 'path';\nimport semver from 'semver';\nimport { findProjectRoot, getPackageInfos, type PackageInfo } from 'workspace-tools';\n\ninterface NonSemverDep {\n parent: string | undefined;\n depName: string;\n type: string;\n version: string | undefined;\n}\n\n// resolutions might apply to prod or dev dependencies, so include it just in case\nconst prodDeps = ['dependencies', 'peerDependencies', 'resolutions'] as const;\nconst allDeps = [...prodDeps, 'devDependencies'] as const;\n\nconst depTypeNames = {\n dependencies: 'prod',\n peerDependencies: 'peer',\n devDependencies: 'dev',\n resolutions: 'resolution',\n};\n\n/**\n * Check the local packages in the monorepo for non-semver deps.\n * Returns either a table of those deps or a message saying there are none.\n */\nexport async function getNonSemverDeps(params: {\n cwd: string;\n /** Only include production dependencies */\n prod?: boolean;\n /** Use this directoy as the root instead of calling `findProjectRoot` (for testing) */\n overrideProjectRoot?: string;\n}): Promise<string> {\n const { cwd, prod, overrideProjectRoot } = params;\n\n const projectRoot = overrideProjectRoot || findProjectRoot(cwd);\n const packages = getPackageInfos(projectRoot);\n\n // add the root package.json to the package infos\n const rootPkgJsonPath = path.join(projectRoot, 'package.json');\n const rootPkg = await readJson<PackageJson>(rootPkgJsonPath);\n if (!rootPkg) {\n throw new Error(`${rootPkgJsonPath} does not exist`);\n }\n if (!rootPkg.name || !rootPkg.version) {\n throw new Error(`${rootPkgJsonPath} is missing a name and/or version`);\n }\n packages[rootPkg.name] = rootPkg as PackageInfo;\n\n const depTypes = prod ? prodDeps : allDeps;\n\n const nonSemverDeps = Object.values(packages)\n .map((pkg: PackageJson) =>\n depTypes\n // get dependencies, peerDependencies, etc from the package\n .map((dt) => Object.entries(pkg[dt] || {}).map(([name, version]) => ({ name, version, type: dt })))\n .flat(1)\n // get non-semver versions\n .filter(({ version }) => !semver.validRange(version))\n .map(\n ({ name, version, type }): NonSemverDep => ({\n parent: pkg.name,\n depName: name,\n type: depTypeNames[type],\n version,\n }),\n ),\n )\n .flat();\n\n if (!nonSemverDeps.length) {\n return 'No non-semver dependencies found';\n }\n\n return (\n table(nonSemverDeps, {\n parent: 'Parent package',\n depName: 'Dependency',\n type: 'Dep type',\n version: 'Version',\n }) + '\\n'\n );\n}\n"]}
1
+ {"version":3,"file":"getNonSemverDeps.js","sourceRoot":"","sources":["../../../../src/commands/info/nonSemverDeps/getNonSemverDeps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAoB,MAAM,iBAAiB,CAAC;AASpE,kFAAkF;AAClF,MAAM,QAAQ,GAAG,CAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,CAAU,CAAC;AAC9E,MAAM,OAAO,GAAG,CAAC,GAAG,QAAQ,EAAE,iBAAiB,CAAU,CAAC;AAE1D,MAAM,YAAY,GAAG;IACnB,YAAY,EAAE,MAAM;IACpB,gBAAgB,EAAE,MAAM;IACxB,eAAe,EAAE,KAAK;IACtB,WAAW,EAAE,YAAY;CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAMtC;IACC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,MAAM,CAAC;IAElD,MAAM,WAAW,GAAG,mBAAmB,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;IACvE,MAAM,QAAQ,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAE9C,iDAAiD;IACjD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAA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CAAC;QACxB,OAAO;KACR,CAAC,CACH,CACJ;SACA,IAAI,EAAE,CAAC;IAEV,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,kCAAkC,CAAC;IAC5C,CAAC;IAED,OAAO,CACL,KAAK,CAAC,aAAa,EAAE;QACnB,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,SAAS;KACnB,CAAC,GAAG,IAAI,CACV,CAAC;AACJ,CAAC","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/config-types';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport { findProjectRoot } from '@ms-cloudpack/package-utilities';\nimport { table } from '@ms-cloudpack/task-reporter';\nimport path from 'path';\nimport semver from 'semver';\nimport { getPackageInfos, type PackageInfo } from 'workspace-tools';\n\ninterface NonSemverDep {\n parent: string | undefined;\n depName: string;\n type: string;\n version: string | undefined;\n}\n\n// resolutions might apply to prod or dev dependencies, so include it just in case\nconst prodDeps = ['dependencies', 'peerDependencies', 'resolutions'] as const;\nconst allDeps = [...prodDeps, 'devDependencies'] as const;\n\nconst depTypeNames = {\n dependencies: 'prod',\n peerDependencies: 'peer',\n devDependencies: 'dev',\n resolutions: 'resolution',\n};\n\n/**\n * Check the local packages in the monorepo for non-semver deps.\n * Returns either a table of those deps or a message saying there are none.\n */\nexport async function getNonSemverDeps(params: {\n cwd: string;\n /** Only include production dependencies */\n prod?: boolean;\n /** Use this directoy as the root instead of calling `findProjectRoot` (for testing) */\n overrideProjectRoot?: string;\n}): Promise<string> {\n const { cwd, prod, overrideProjectRoot } = params;\n\n const projectRoot = overrideProjectRoot || findProjectRoot(cwd) || cwd;\n const packages = getPackageInfos(projectRoot);\n\n // add the root package.json to the package infos\n const rootPkgJsonPath = path.join(projectRoot, 'package.json');\n const rootPkg = await readJson<PackageJson>(rootPkgJsonPath);\n if (!rootPkg) {\n throw new Error(`${rootPkgJsonPath} does not exist`);\n }\n if (!rootPkg.name || !rootPkg.version) {\n throw new Error(`${rootPkgJsonPath} is missing a name and/or version`);\n }\n packages[rootPkg.name] = rootPkg as PackageInfo;\n\n const depTypes = prod ? prodDeps : allDeps;\n\n const nonSemverDeps = Object.values(packages)\n .map((pkg: PackageJson) =>\n depTypes\n // get dependencies, peerDependencies, etc from the package\n .map((dt) => Object.entries(pkg[dt] || {}).map(([name, version]) => ({ name, version, type: dt })))\n .flat(1)\n // get non-semver versions\n .filter(({ version }) => !semver.validRange(version))\n .map(\n ({ name, version, type }): NonSemverDep => ({\n parent: pkg.name,\n depName: name,\n type: depTypeNames[type],\n version,\n }),\n ),\n )\n .flat();\n\n if (!nonSemverDeps.length) {\n return 'No non-semver dependencies found';\n }\n\n return (\n table(nonSemverDeps, {\n parent: 'Parent package',\n depName: 'Dependency',\n type: 'Dep type',\n version: 'Version',\n }) + '\\n'\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC;;;GAGG;AACH,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAM,EAAiB,EAAE,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,iBA+BvG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC;;;GAGG;AACH,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAM,EAAiB,EAAE,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,iBA+BvG"}
package/lib/index.js CHANGED
@@ -1,16 +1,10 @@
1
1
  import { getVersion } from '@ms-cloudpack/package-utilities';
2
- import glob from 'fast-glob';
3
2
  import path from 'path';
4
3
  import { fileURLToPath, pathToFileURL } from 'url';
5
4
  import { PerfMarkerCliEntry } from './performance/markers.js';
6
5
  import { createCommand } from './common/createCommand.js';
7
- const currentFilePath = fileURLToPath(import.meta.url);
8
- const currentPath = path.dirname(currentFilePath);
9
- /**
10
- * Correct file extension (`.js` or `.ts`) depending on the context the code is running in:
11
- * compiled (`.js`) or Jest test in this package (`.ts`).
12
- */
13
- const dynamicImportExtension = path.extname(currentFilePath);
6
+ import { globSourceFiles } from '@ms-cloudpack/path-utilities';
7
+ const currentDir = path.dirname(fileURLToPath(import.meta.url));
14
8
  /**
15
9
  * Entry point for the cloudpack CLI.
16
10
  * Resolves all commands defined within the "./commands" folder.
@@ -23,14 +17,14 @@ export async function main(argv = process.argv, preParseOverrides) {
23
17
  const program = createCommand('cloudpack');
24
18
  program.version(version).usage('<command> [options]');
25
19
  // Get all the available commands (with the correct extension for runtime context)
26
- const commands = await glob(`commands/*/index${dynamicImportExtension}`, { cwd: currentPath });
20
+ const commands = await globSourceFiles(import.meta.url, 'commands/*/index');
27
21
  if (!commands.length) {
28
22
  // There was an issue with the glob above not working in tests, so make sure that doesn't happen again
29
- throw new Error(`No commands found under "${currentPath}".`);
23
+ throw new Error(`No commands found under "${currentDir}".`);
30
24
  }
31
25
  for (const commandPath of commands) {
32
- const resolvedPath = pathToFileURL(path.join(currentPath, commandPath)).toString();
33
- const commandModule = (await import(resolvedPath));
26
+ const commandUrl = pathToFileURL(commandPath).toString();
27
+ const commandModule = (await import(commandUrl));
34
28
  commandModule.init(program);
35
29
  }
36
30
  preParseOverrides?.(program);
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,KAAK,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AAC;QAExE,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,iBAAiB,EAAE,CAAC,OAAO,CAAC,CAAC;IAE7B,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import { getVersion } from '@ms-cloudpack/package-utilities';\nimport type { Command } from 'commander';\nimport glob from 'fast-glob';\nimport path from 'path';\nimport { fileURLToPath, pathToFileURL } from 'url';\nimport { PerfMarkerCliEntry } from './performance/markers.js';\nimport type { CommandInitModule } from './types/CommandInitFunction.js';\nimport { createCommand } from './common/createCommand.js';\n\nconst currentFilePath = fileURLToPath(import.meta.url);\nconst currentPath = path.dirname(currentFilePath);\n/**\n * Correct file extension (`.js` or `.ts`) depending on the context the code is running in:\n * compiled (`.js`) or Jest test in this package (`.ts`).\n */\nconst dynamicImportExtension = path.extname(currentFilePath);\n\n/**\n * Entry point for the cloudpack CLI.\n * Resolves all commands defined within the \"./commands\" folder.\n */\nexport async function main(argv: string[] = process.argv, preParseOverrides?: (program: Command) => void) {\n performance.mark(PerfMarkerCliEntry);\n\n const version = getVersion(import.meta.url);\n\n // Create the top-level command and apply common options\n // (avoids \"unknown option\" errors if they're specified without a verb)\n const program = createCommand('cloudpack');\n program.version(version).usage('<command> [options]');\n\n // Get all the available commands (with the correct extension for runtime context)\n const commands = await glob(`commands/*/index${dynamicImportExtension}`, { cwd: currentPath });\n if (!commands.length) {\n // There was an issue with the glob above not working in tests, so make sure that doesn't happen again\n throw new Error(`No commands found under \"${currentPath}\".`);\n }\n\n for (const commandPath of commands) {\n const resolvedPath = pathToFileURL(path.join(currentPath, commandPath)).toString();\n const commandModule = (await import(resolvedPath)) as CommandInitModule;\n\n commandModule.init(program);\n }\n\n preParseOverrides?.(program);\n\n await program.parseAsync(argv);\n\n if (program.args.length === 0) {\n program.help();\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,OAAiB,OAAO,CAAC,IAAI,EAAE,iBAA8C;IACtG,WAAW,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAErC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5C,wDAAwD;IACxD,uEAAuE;IACvE,MAAM,OAAO,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IAC3C,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAEtD,kFAAkF;IAClF,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;IAC5E,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrB,sGAAsG;QACtG,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,MAAM,WAAW,IAAI,QAAQ,EAAE,CAAC;QACnC,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;QACzD,MAAM,aAAa,GAAG,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,CAAsB,CAAC;QAEtE,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,iBAAiB,EAAE,CAAC,OAAO,CAAC,CAAC;IAE7B,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import { getVersion } from '@ms-cloudpack/package-utilities';\nimport type { Command } from 'commander';\nimport path from 'path';\nimport { fileURLToPath, pathToFileURL } from 'url';\nimport { PerfMarkerCliEntry } from './performance/markers.js';\nimport type { CommandInitModule } from './types/CommandInitFunction.js';\nimport { createCommand } from './common/createCommand.js';\nimport { globSourceFiles } from '@ms-cloudpack/path-utilities';\n\nconst currentDir = path.dirname(fileURLToPath(import.meta.url));\n\n/**\n * Entry point for the cloudpack CLI.\n * Resolves all commands defined within the \"./commands\" folder.\n */\nexport async function main(argv: string[] = process.argv, preParseOverrides?: (program: Command) => void) {\n performance.mark(PerfMarkerCliEntry);\n\n const version = getVersion(import.meta.url);\n\n // Create the top-level command and apply common options\n // (avoids \"unknown option\" errors if they're specified without a verb)\n const program = createCommand('cloudpack');\n program.version(version).usage('<command> [options]');\n\n // Get all the available commands (with the correct extension for runtime context)\n const commands = await globSourceFiles(import.meta.url, 'commands/*/index');\n if (!commands.length) {\n // There was an issue with the glob above not working in tests, so make sure that doesn't happen again\n throw new Error(`No commands found under \"${currentDir}\".`);\n }\n\n for (const commandPath of commands) {\n const commandUrl = pathToFileURL(commandPath).toString();\n const commandModule = (await import(commandUrl)) as CommandInitModule;\n\n commandModule.init(program);\n }\n\n preParseOverrides?.(program);\n\n await program.parseAsync(argv);\n\n if (program.args.length === 0) {\n program.help();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getRepositoryName.d.ts","sourceRoot":"","sources":["../../src/utilities/getRepositoryName.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,+BAkBtD"}
1
+ {"version":3,"file":"getRepositoryName.d.ts","sourceRoot":"","sources":["../../src/utilities/getRepositoryName.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,+BAkBtD"}
@@ -1,22 +1,14 @@
1
- import { findGitRoot } from 'workspace-tools';
2
1
  import { readJson } from '@ms-cloudpack/json-utilities';
2
+ import { findProjectRoot } from '@ms-cloudpack/package-utilities';
3
3
  import path from 'path';
4
- function getGitRoot(cwd) {
5
- try {
6
- return findGitRoot(cwd);
7
- }
8
- catch {
9
- return undefined;
10
- }
11
- }
12
4
  /**
13
5
  * Gets the name of the workspace or git repository from the root package.json.
14
6
  * @returns The name of the workspace or repository. If the name is not found, undefined is returned.
15
7
  */
16
8
  export async function getRepositoryName(appPath) {
17
9
  try {
18
- const repoRootPath = getGitRoot(appPath) || appPath;
19
- const rootPackageJsonPath = path.join(repoRootPath, 'package.json');
10
+ const rootPath = findProjectRoot(appPath) || appPath;
11
+ const rootPackageJsonPath = path.join(rootPath, 'package.json');
20
12
  const packageJsonContent = (await readJson(rootPackageJsonPath));
21
13
  if (!packageJsonContent) {
22
14
  console.warn(`Could not read ${rootPackageJsonPath}.`);
@@ -1 +1 @@
1
- {"version":3,"file":"getRepositoryName.js","sourceRoot":"","sources":["../../src/utilities/getRepositoryName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAe;IACrD,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;QACpD,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,kBAAkB,GAAG,CAAC,MAAM,QAAQ,CAAC,mBAAmB,CAAC,CAAsB,CAAC;QACtF,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,kBAAkB,mBAAmB,GAAG,CAAC,CAAC;YACvD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACjC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CACV,0GAA0G,EAC1G,CAAC,CACF,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["import { findGitRoot } from 'workspace-tools';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport path from 'path';\n\nfunction getGitRoot(cwd: string) {\n try {\n return findGitRoot(cwd);\n } catch {\n return undefined;\n }\n}\n\n/**\n * Gets the name of the workspace or git repository from the root package.json.\n * @returns The name of the workspace or repository. If the name is not found, undefined is returned.\n */\nexport async function getRepositoryName(appPath: string) {\n try {\n const repoRootPath = getGitRoot(appPath) || appPath;\n const rootPackageJsonPath = path.join(repoRootPath, 'package.json');\n const packageJsonContent = (await readJson(rootPackageJsonPath)) as { name?: string };\n if (!packageJsonContent) {\n console.warn(`Could not read ${rootPackageJsonPath}.`);\n return undefined;\n }\n\n return packageJsonContent.name;\n } catch (e) {\n console.warn(\n 'An error occurred while getting repository name. This is not a critical error. You man continue to work.',\n e,\n );\n return undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"getRepositoryName.js","sourceRoot":"","sources":["../../src/utilities/getRepositoryName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAe;IACrD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;QACrD,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAChE,MAAM,kBAAkB,GAAG,CAAC,MAAM,QAAQ,CAAC,mBAAmB,CAAC,CAAsB,CAAC;QACtF,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,kBAAkB,mBAAmB,GAAG,CAAC,CAAC;YACvD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACjC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CACV,0GAA0G,EAC1G,CAAC,CACF,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["import { readJson } from '@ms-cloudpack/json-utilities';\nimport { findProjectRoot } from '@ms-cloudpack/package-utilities';\nimport path from 'path';\n\n/**\n * Gets the name of the workspace or git repository from the root package.json.\n * @returns The name of the workspace or repository. If the name is not found, undefined is returned.\n */\nexport async function getRepositoryName(appPath: string) {\n try {\n const rootPath = findProjectRoot(appPath) || appPath;\n const rootPackageJsonPath = path.join(rootPath, 'package.json');\n const packageJsonContent = (await readJson(rootPackageJsonPath)) as { name?: string };\n if (!packageJsonContent) {\n console.warn(`Could not read ${rootPackageJsonPath}.`);\n return undefined;\n }\n\n return packageJsonContent.name;\n } catch (e) {\n console.warn(\n 'An error occurred while getting repository name. This is not a critical error. You man continue to work.',\n e,\n );\n return undefined;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/cli",
3
- "version": "0.54.26",
3
+ "version": "0.54.28",
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,22 +10,22 @@
10
10
  "cloudpack": "./bin/cloudpack.js"
11
11
  },
12
12
  "dependencies": {
13
- "@ms-cloudpack/api-server": "^0.29.17",
14
- "@ms-cloudpack/bundle-server": "^0.2.10",
15
- "@ms-cloudpack/config": "^0.17.17",
16
- "@ms-cloudpack/config-types": "^0.4.2",
13
+ "@ms-cloudpack/api-server": "^0.29.19",
14
+ "@ms-cloudpack/bundle-server": "^0.2.12",
15
+ "@ms-cloudpack/config": "^0.17.18",
16
+ "@ms-cloudpack/config-types": "^0.4.3",
17
17
  "@ms-cloudpack/feature-flags": "^0.0.2",
18
18
  "@ms-cloudpack/json-utilities": "^0.1.3",
19
- "@ms-cloudpack/package-utilities": "^5.7.10",
19
+ "@ms-cloudpack/package-utilities": "^5.8.0",
20
20
  "@ms-cloudpack/path-string-parsing": "^1.1.3",
21
+ "@ms-cloudpack/path-utilities": "^2.5.0",
21
22
  "@ms-cloudpack/remote-cache": "^0.4.7",
22
- "@ms-cloudpack/app-server": "^0.1.13",
23
+ "@ms-cloudpack/app-server": "^0.1.15",
23
24
  "@ms-cloudpack/task-reporter": "^0.11.1",
24
25
  "@ms-cloudpack/telemetry": "^0.4.6",
25
26
  "@yarnpkg/lockfile": "^1.1.0",
26
27
  "commander": "^11.1.0",
27
28
  "cross-spawn": "^7.0.3",
28
- "fast-glob": "^3.2.12",
29
29
  "glob-hasher": "^1.2.1",
30
30
  "open": "^9.0.0",
31
31
  "prompts": "^2.4.2",