@rushstack/package-extractor 0.10.15 → 0.10.17

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/Utils.js CHANGED
@@ -5,7 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
6
  };
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.makeBinLinksAsync = exports.remapPathForExtractorMetadata = exports.remapSourcePathForTargetFolder = exports.matchesWithStar = void 0;
8
+ exports.matchesWithStar = matchesWithStar;
9
+ exports.remapSourcePathForTargetFolder = remapSourcePathForTargetFolder;
10
+ exports.remapPathForExtractorMetadata = remapPathForExtractorMetadata;
11
+ exports.makeBinLinksAsync = makeBinLinksAsync;
9
12
  const node_path_1 = __importDefault(require("node:path"));
10
13
  const link_bins_1 = __importDefault(require("@pnpm/link-bins"));
11
14
  const node_core_library_1 = require("@rushstack/node-core-library");
@@ -23,7 +26,6 @@ function matchesWithStar(patternWithStar, input) {
23
26
  const regExp = new RegExp(pattern);
24
27
  return regExp.test(input);
25
28
  }
26
- exports.matchesWithStar = matchesWithStar;
27
29
  /**
28
30
  * Maps a file path under the provided {@link IRemapPathForTargetFolder.sourceRootFolder} to the provided
29
31
  * {@link IExtractorOptions.targetRootFolder}.
@@ -40,7 +42,6 @@ function remapSourcePathForTargetFolder(options) {
40
42
  const absolutePathInTargetFolder = node_path_1.default.join(targetRootFolder, relativePath);
41
43
  return absolutePathInTargetFolder;
42
44
  }
43
- exports.remapSourcePathForTargetFolder = remapSourcePathForTargetFolder;
44
45
  /**
45
46
  * Maps a file path under the provided folder path to the expected path format for the extractor metadata.
46
47
  *
@@ -54,7 +55,6 @@ function remapPathForExtractorMetadata(folderPath, filePath) {
54
55
  }
55
56
  return node_core_library_1.Path.convertToSlashes(relativePath);
56
57
  }
57
- exports.remapPathForExtractorMetadata = remapPathForExtractorMetadata;
58
58
  /**
59
59
  * Creates the .bin files for the extracted projects and returns the paths to the created .bin files.
60
60
  *
@@ -82,5 +82,4 @@ async function makeBinLinksAsync(terminal, extractedProjectFolderPaths) {
82
82
  });
83
83
  return binFilePaths;
84
84
  }
85
- exports.makeBinLinksAsync = makeBinLinksAsync;
86
85
  //# sourceMappingURL=Utils.js.map
package/lib/Utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,0DAA6B;AAC7B,gEAA2C;AAC3C,oEAA6E;AAC7E,kDAA+D;AAC/D,yEAA4E;AAE5E,SAAgB,eAAe,CAAC,eAAuB,EAAE,KAAa;IACpE,qCAAqC;IACrC,MAAM,OAAO,GACX,GAAG;QACH,eAAe;aACZ,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,wBAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;aAChC,IAAI,CAAC,IAAI,CAAC;QACb,GAAG,CAAC;IACN,gEAAgE;IAChE,MAAM,MAAM,GAAW,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAZD,0CAYC;AAQD;;;;;;GAMG;AACH,SAAgB,8BAA8B,CAAC,OAAkC;IAC/E,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACnE,MAAM,YAAY,GAAW,mBAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IACzE,IAAI,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,gBAAgB,UAAU,mBAAmB,gBAAgB,GAAG,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,0BAA0B,GAAW,mBAAI,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QAAQ,CAAC,gBAAgB,CAAC,sBAAsB,WAAW,EAAE,CAAC,CAAC;gBAC/D,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,EACD;QACE,WAAW,EAAE,2BAAe;KAC7B,CACF,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AApCD,8CAoCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport path from 'node:path';\nimport pnpmLinkBins from '@pnpm/link-bins';\nimport { Async, FileSystem, Path, Text } from '@rushstack/node-core-library';\nimport { Colorize, type ITerminal } from '@rushstack/terminal';\nimport { MAX_CONCURRENCY } from './scripts/createLinks/utilities/constants';\n\nexport function matchesWithStar(patternWithStar: string, input: string): boolean {\n // Map \"@types/*\" --> \"^\\@types\\/.*$\"\n const pattern: string =\n '^' +\n patternWithStar\n .split('*')\n .map((x) => Text.escapeRegExp(x))\n .join('.*') +\n '$';\n // eslint-disable-next-line @rushstack/security/no-unsafe-regexp\n const regExp: RegExp = new RegExp(pattern);\n return regExp.test(input);\n}\n\nexport interface IRemapPathForTargetFolder {\n sourcePath: string;\n sourceRootFolder: string;\n targetRootFolder: string;\n}\n\n/**\n * Maps a file path under the provided {@link IRemapPathForTargetFolder.sourceRootFolder} to the provided\n * {@link IExtractorOptions.targetRootFolder}.\n *\n * Example input: \"C:\\\\MyRepo\\\\libraries\\\\my-lib\"\n * Example output: \"C:\\\\MyRepo\\\\common\\\\deploy\\\\libraries\\\\my-lib\"\n */\nexport function remapSourcePathForTargetFolder(options: IRemapPathForTargetFolder): string {\n const { sourcePath, sourceRootFolder, targetRootFolder } = options;\n const relativePath: string = path.relative(sourceRootFolder, sourcePath);\n if (relativePath.startsWith('..')) {\n throw new Error(`Source path \"${sourcePath}\" is not under \"${sourceRootFolder}\"`);\n }\n const absolutePathInTargetFolder: string = path.join(targetRootFolder, relativePath);\n return absolutePathInTargetFolder;\n}\n\n/**\n * Maps a file path under the provided folder path to the expected path format for the extractor metadata.\n *\n * Example input: \"C:\\\\MyRepo\\\\libraries\\\\my-lib\"\n * Example output: \"common/deploy/libraries/my-lib\"\n */\nexport function remapPathForExtractorMetadata(folderPath: string, filePath: string): string {\n const relativePath: string = path.relative(folderPath, filePath);\n if (relativePath.startsWith('..')) {\n throw new Error(`Path \"${filePath}\" is not under \"${folderPath}\"`);\n }\n return Path.convertToSlashes(relativePath);\n}\n\n/**\n * Creates the .bin files for the extracted projects and returns the paths to the created .bin files.\n *\n * @param terminal - The terminal to write to\n * @param extractedProjectFolderPaths - The paths to the extracted projects\n */\nexport async function makeBinLinksAsync(\n terminal: ITerminal,\n extractedProjectFolderPaths: string[]\n): Promise<string[]> {\n const binFilePaths: string[] = [];\n await Async.forEachAsync(\n extractedProjectFolderPaths,\n async (extractedProjectFolderPath: string) => {\n const extractedProjectNodeModulesFolderPath: string = `${extractedProjectFolderPath}/node_modules`;\n const extractedProjectBinFolderPath: string = `${extractedProjectNodeModulesFolderPath}/.bin`;\n\n const linkedBinPackageNames: string[] = await pnpmLinkBins(\n extractedProjectNodeModulesFolderPath,\n extractedProjectBinFolderPath,\n {\n warn: (msg: string) => terminal.writeLine(Colorize.yellow(msg))\n }\n );\n\n if (linkedBinPackageNames.length) {\n const binFolderItems: string[] = await FileSystem.readFolderItemNamesAsync(\n extractedProjectBinFolderPath\n );\n for (const binFolderItem of binFolderItems) {\n const binFilePath: string = `${extractedProjectBinFolderPath}/${binFolderItem}`;\n terminal.writeVerboseLine(`Created .bin file: ${binFilePath}`);\n binFilePaths.push(binFilePath);\n }\n }\n },\n {\n concurrency: MAX_CONCURRENCY\n }\n );\n\n return binFilePaths;\n}\n"]}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAQ3D,0CAYC;AAeD,wEAQC;AAQD,sEAMC;AAQD,8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AmB,UAAU,GAAG,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,wBAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CACrC,QAAmB,EACnB,2BAAqC;IAErC,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,MAAM,yBAAK,CAAC,YAAY,CACtB,2BAA2B,EAC3B,KAAK,EAAE,0BAAkC,EAAE,EAAE;QAC3C,MAAM,qCAAqC,GAAW,GAAG,0BAA0B,eAAe,CAAC;QACnG,MAAM,6BAA6B,GAAW,GAAG,qCAAqC,OAAO,CAAC;QAE9F,MAAM,qBAAqB,GAAa,MAAM,IAAA,mBAAY,EACxD,qCAAqC,EACrC,6BAA6B,EAC7B;YACE,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,mBAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAChE,CACF,CAAC;QAEF,IAAI,qBAAqB,CAAC,MAAM,EAAE,CAAC;YACjC,MAAM,cAAc,GAAa,MAAM,8BAAU,CAAC,wBAAwB,CACxE,6BAA6B,CAC9B,CAAC;YACF,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;gBAC3C,MAAM,WAAW,GAAW,GAAG,6BAA6B,IAAI,aAAa,EAAE,CAAC;gBAChF,QAAQ,CAAC,gBAAgB,CAAC,sBAAsB,WAAW,EAAE,CAAC,CAAC;gBAC/D,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,EACD;QACE,WAAW,EAAE,2BAAe;KAC7B,CACF,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport path from 'node:path';\nimport pnpmLinkBins from '@pnpm/link-bins';\nimport { Async, FileSystem, Path, Text } from '@rushstack/node-core-library';\nimport { Colorize, type ITerminal } from '@rushstack/terminal';\nimport { MAX_CONCURRENCY } from './scripts/createLinks/utilities/constants';\n\nexport function matchesWithStar(patternWithStar: string, input: string): boolean {\n // Map \"@types/*\" --> \"^\\@types\\/.*$\"\n const pattern: string =\n '^' +\n patternWithStar\n .split('*')\n .map((x) => Text.escapeRegExp(x))\n .join('.*') +\n '$';\n // eslint-disable-next-line @rushstack/security/no-unsafe-regexp\n const regExp: RegExp = new RegExp(pattern);\n return regExp.test(input);\n}\n\nexport interface IRemapPathForTargetFolder {\n sourcePath: string;\n sourceRootFolder: string;\n targetRootFolder: string;\n}\n\n/**\n * Maps a file path under the provided {@link IRemapPathForTargetFolder.sourceRootFolder} to the provided\n * {@link IExtractorOptions.targetRootFolder}.\n *\n * Example input: \"C:\\\\MyRepo\\\\libraries\\\\my-lib\"\n * Example output: \"C:\\\\MyRepo\\\\common\\\\deploy\\\\libraries\\\\my-lib\"\n */\nexport function remapSourcePathForTargetFolder(options: IRemapPathForTargetFolder): string {\n const { sourcePath, sourceRootFolder, targetRootFolder } = options;\n const relativePath: string = path.relative(sourceRootFolder, sourcePath);\n if (relativePath.startsWith('..')) {\n throw new Error(`Source path \"${sourcePath}\" is not under \"${sourceRootFolder}\"`);\n }\n const absolutePathInTargetFolder: string = path.join(targetRootFolder, relativePath);\n return absolutePathInTargetFolder;\n}\n\n/**\n * Maps a file path under the provided folder path to the expected path format for the extractor metadata.\n *\n * Example input: \"C:\\\\MyRepo\\\\libraries\\\\my-lib\"\n * Example output: \"common/deploy/libraries/my-lib\"\n */\nexport function remapPathForExtractorMetadata(folderPath: string, filePath: string): string {\n const relativePath: string = path.relative(folderPath, filePath);\n if (relativePath.startsWith('..')) {\n throw new Error(`Path \"${filePath}\" is not under \"${folderPath}\"`);\n }\n return Path.convertToSlashes(relativePath);\n}\n\n/**\n * Creates the .bin files for the extracted projects and returns the paths to the created .bin files.\n *\n * @param terminal - The terminal to write to\n * @param extractedProjectFolderPaths - The paths to the extracted projects\n */\nexport async function makeBinLinksAsync(\n terminal: ITerminal,\n extractedProjectFolderPaths: string[]\n): Promise<string[]> {\n const binFilePaths: string[] = [];\n await Async.forEachAsync(\n extractedProjectFolderPaths,\n async (extractedProjectFolderPath: string) => {\n const extractedProjectNodeModulesFolderPath: string = `${extractedProjectFolderPath}/node_modules`;\n const extractedProjectBinFolderPath: string = `${extractedProjectNodeModulesFolderPath}/.bin`;\n\n const linkedBinPackageNames: string[] = await pnpmLinkBins(\n extractedProjectNodeModulesFolderPath,\n extractedProjectBinFolderPath,\n {\n warn: (msg: string) => terminal.writeLine(Colorize.yellow(msg))\n }\n );\n\n if (linkedBinPackageNames.length) {\n const binFolderItems: string[] = await FileSystem.readFolderItemNamesAsync(\n extractedProjectBinFolderPath\n );\n for (const binFolderItem of binFolderItems) {\n const binFilePath: string = `${extractedProjectBinFolderPath}/${binFolderItem}`;\n terminal.writeVerboseLine(`Created .bin file: ${binFilePath}`);\n binFilePaths.push(binFilePath);\n }\n }\n },\n {\n concurrency: MAX_CONCURRENCY\n }\n );\n\n return binFilePaths;\n}\n"]}
@@ -5,7 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
6
  };
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.RemoveLinksAction = exports.removeLinksAsync = void 0;
8
+ exports.RemoveLinksAction = void 0;
9
+ exports.removeLinksAsync = removeLinksAsync;
9
10
  const node_path_1 = __importDefault(require("node:path"));
10
11
  const node_core_library_1 = require("@rushstack/node-core-library");
11
12
  const ts_command_line_1 = require("@rushstack/ts-command-line");
@@ -18,7 +19,6 @@ async function removeLinksAsync(terminal, targetRootFolder, extractorMetadataObj
18
19
  await node_core_library_1.FileSystem.deleteFileAsync(newLinkPath, { throwIfNotExists: false });
19
20
  }, { concurrency: constants_1.MAX_CONCURRENCY });
20
21
  }
21
- exports.removeLinksAsync = removeLinksAsync;
22
22
  class RemoveLinksAction extends ts_command_line_1.CommandLineAction {
23
23
  constructor(terminal) {
24
24
  super({
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveLinksAction.js","sourceRoot":"","sources":["../../../../../src/scripts/createLinks/cli/actions/RemoveLinksAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,0DAA6B;AAC7B,oEAAiE;AAEjE,gEAA+D;AAE/D,+EAAiF;AACjF,yDAAgF;AAEzE,KAAK,UAAU,gBAAgB,CACpC,QAAmB,EACnB,gBAAwB,EACxB,uBAA+C;IAE/C,MAAM,yBAAK,CAAC,YAAY,CACtB,uBAAuB,CAAC,KAAK,EAC7B,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrB,MAAM,WAAW,GAAW,mBAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAClE,QAAQ,CAAC,gBAAgB,CAAC,0BAA0B,WAAW,GAAG,CAAC,CAAC;QACpE,MAAM,8BAAU,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC,EACD,EAAE,WAAW,EAAE,2BAAe,EAAE,CACjC,CAAC;AACJ,CAAC;AAdD,4CAcC;AAED,MAAa,iBAAkB,SAAQ,mCAAiB;IAGtD,YAAmB,QAAmB;QACpC,KAAK,CAAC;YACJ,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,gDAAgD;YACzD,aAAa,EAAE,kEAAkE;SAClF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAES,KAAK,CAAC,SAAS;QACvB,MAAM,uBAAuB,GAA2B,MAAM,IAAA,gDAAyB,GAAE,CAAC;QAE1F,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,0CAA0C,8BAAkB,GAAG,CAAC,CAAC;QAC1F,MAAM,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,8BAAkB,EAAE,uBAAuB,CAAC,CAAC;IACtF,CAAC;CACF;AAnBD,8CAmBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport path from 'node:path';\nimport { Async, FileSystem } from '@rushstack/node-core-library';\nimport type { ITerminal } from '@rushstack/terminal';\nimport { CommandLineAction } from '@rushstack/ts-command-line';\nimport type { IExtractorMetadataJson } from '../../../../PackageExtractor';\nimport { getExtractorMetadataAsync } from '../../utilities/CreateLinksUtilities';\nimport { TARGET_ROOT_FOLDER, MAX_CONCURRENCY } from '../../utilities/constants';\n\nexport async function removeLinksAsync(\n terminal: ITerminal,\n targetRootFolder: string,\n extractorMetadataObject: IExtractorMetadataJson\n): Promise<void> {\n await Async.forEachAsync(\n extractorMetadataObject.links,\n async ({ linkPath }) => {\n const newLinkPath: string = path.join(targetRootFolder, linkPath);\n terminal.writeVerboseLine(`Removing link at path \"${newLinkPath}\"`);\n await FileSystem.deleteFileAsync(newLinkPath, { throwIfNotExists: false });\n },\n { concurrency: MAX_CONCURRENCY }\n );\n}\n\nexport class RemoveLinksAction extends CommandLineAction {\n private _terminal: ITerminal;\n\n public constructor(terminal: ITerminal) {\n super({\n actionName: 'remove',\n summary: 'Remove symlinks created by the \"create\" action',\n documentation: 'This action removes the symlinks created by the \"create\" action.'\n });\n\n this._terminal = terminal;\n }\n\n protected async onExecute(): Promise<void> {\n const extractorMetadataObject: IExtractorMetadataJson = await getExtractorMetadataAsync();\n\n this._terminal.writeLine(`Removing links for extraction at path \"${TARGET_ROOT_FOLDER}\"`);\n await removeLinksAsync(this._terminal, TARGET_ROOT_FOLDER, extractorMetadataObject);\n }\n}\n"]}
1
+ {"version":3,"file":"RemoveLinksAction.js","sourceRoot":"","sources":["../../../../../src/scripts/createLinks/cli/actions/RemoveLinksAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAU3D,4CAcC;AAtBD,0DAA6B;AAC7B,oEAAiE;AAEjE,gEAA+D;AAE/D,+EAAiF;AACjF,yDAAgF;AAEzE,KAAK,UAAU,gBAAgB,CACpC,QAAmB,EACnB,gBAAwB,EACxB,uBAA+C;IAE/C,MAAM,yBAAK,CAAC,YAAY,CACtB,uBAAuB,CAAC,KAAK,EAC7B,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrB,MAAM,WAAW,GAAW,mBAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAClE,QAAQ,CAAC,gBAAgB,CAAC,0BAA0B,WAAW,GAAG,CAAC,CAAC;QACpE,MAAM,8BAAU,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC,EACD,EAAE,WAAW,EAAE,2BAAe,EAAE,CACjC,CAAC;AACJ,CAAC;AAED,MAAa,iBAAkB,SAAQ,mCAAiB;IAGtD,YAAmB,QAAmB;QACpC,KAAK,CAAC;YACJ,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,gDAAgD;YACzD,aAAa,EAAE,kEAAkE;SAClF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAES,KAAK,CAAC,SAAS;QACvB,MAAM,uBAAuB,GAA2B,MAAM,IAAA,gDAAyB,GAAE,CAAC;QAE1F,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,0CAA0C,8BAAkB,GAAG,CAAC,CAAC;QAC1F,MAAM,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,8BAAkB,EAAE,uBAAuB,CAAC,CAAC;IACtF,CAAC;CACF;AAnBD,8CAmBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport path from 'node:path';\nimport { Async, FileSystem } from '@rushstack/node-core-library';\nimport type { ITerminal } from '@rushstack/terminal';\nimport { CommandLineAction } from '@rushstack/ts-command-line';\nimport type { IExtractorMetadataJson } from '../../../../PackageExtractor';\nimport { getExtractorMetadataAsync } from '../../utilities/CreateLinksUtilities';\nimport { TARGET_ROOT_FOLDER, MAX_CONCURRENCY } from '../../utilities/constants';\n\nexport async function removeLinksAsync(\n terminal: ITerminal,\n targetRootFolder: string,\n extractorMetadataObject: IExtractorMetadataJson\n): Promise<void> {\n await Async.forEachAsync(\n extractorMetadataObject.links,\n async ({ linkPath }) => {\n const newLinkPath: string = path.join(targetRootFolder, linkPath);\n terminal.writeVerboseLine(`Removing link at path \"${newLinkPath}\"`);\n await FileSystem.deleteFileAsync(newLinkPath, { throwIfNotExists: false });\n },\n { concurrency: MAX_CONCURRENCY }\n );\n}\n\nexport class RemoveLinksAction extends CommandLineAction {\n private _terminal: ITerminal;\n\n public constructor(terminal: ITerminal) {\n super({\n actionName: 'remove',\n summary: 'Remove symlinks created by the \"create\" action',\n documentation: 'This action removes the symlinks created by the \"create\" action.'\n });\n\n this._terminal = terminal;\n }\n\n protected async onExecute(): Promise<void> {\n const extractorMetadataObject: IExtractorMetadataJson = await getExtractorMetadataAsync();\n\n this._terminal.writeLine(`Removing links for extraction at path \"${TARGET_ROOT_FOLDER}\"`);\n await removeLinksAsync(this._terminal, TARGET_ROOT_FOLDER, extractorMetadataObject);\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getExtractorMetadataAsync = void 0;
5
+ exports.getExtractorMetadataAsync = getExtractorMetadataAsync;
6
6
  const node_core_library_1 = require("@rushstack/node-core-library");
7
7
  const PathConstants_1 = require("../../../PathConstants");
8
8
  async function getExtractorMetadataAsync() {
@@ -11,5 +11,4 @@ async function getExtractorMetadataAsync() {
11
11
  const extractorMetadataObject = JSON.parse(extractorMetadataJson);
12
12
  return extractorMetadataObject;
13
13
  }
14
- exports.getExtractorMetadataAsync = getExtractorMetadataAsync;
15
14
  //# sourceMappingURL=CreateLinksUtilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateLinksUtilities.js","sourceRoot":"","sources":["../../../../src/scripts/createLinks/utilities/CreateLinksUtilities.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,oEAA0D;AAE1D,0DAAqE;AAE9D,KAAK,UAAU,yBAAyB;IAC7C,MAAM,qBAAqB,GAAW,GAAG,SAAS,IAAI,2CAA2B,EAAE,CAAC;IACpF,MAAM,qBAAqB,GAAW,MAAM,8BAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC5F,MAAM,uBAAuB,GAA2B,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC1F,OAAO,uBAAuB,CAAC;AACjC,CAAC;AALD,8DAKC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { FileSystem } from '@rushstack/node-core-library';\nimport type { IExtractorMetadataJson } from '../../../PackageExtractor';\nimport { EXTRACTOR_METADATA_FILENAME } from '../../../PathConstants';\n\nexport async function getExtractorMetadataAsync(): Promise<IExtractorMetadataJson> {\n const extractorMetadataPath: string = `${__dirname}/${EXTRACTOR_METADATA_FILENAME}`;\n const extractorMetadataJson: string = await FileSystem.readFileAsync(extractorMetadataPath);\n const extractorMetadataObject: IExtractorMetadataJson = JSON.parse(extractorMetadataJson);\n return extractorMetadataObject;\n}\n"]}
1
+ {"version":3,"file":"CreateLinksUtilities.js","sourceRoot":"","sources":["../../../../src/scripts/createLinks/utilities/CreateLinksUtilities.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAM3D,8DAKC;AATD,oEAA0D;AAE1D,0DAAqE;AAE9D,KAAK,UAAU,yBAAyB;IAC7C,MAAM,qBAAqB,GAAW,GAAG,SAAS,IAAI,2CAA2B,EAAE,CAAC;IACpF,MAAM,qBAAqB,GAAW,MAAM,8BAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC5F,MAAM,uBAAuB,GAA2B,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC1F,OAAO,uBAAuB,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { FileSystem } from '@rushstack/node-core-library';\nimport type { IExtractorMetadataJson } from '../../../PackageExtractor';\nimport { EXTRACTOR_METADATA_FILENAME } from '../../../PathConstants';\n\nexport async function getExtractorMetadataAsync(): Promise<IExtractorMetadataJson> {\n const extractorMetadataPath: string = `${__dirname}/${EXTRACTOR_METADATA_FILENAME}`;\n const extractorMetadataJson: string = await FileSystem.readFileAsync(extractorMetadataPath);\n const extractorMetadataObject: IExtractorMetadataJson = JSON.parse(extractorMetadataJson);\n return extractorMetadataObject;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/package-extractor",
3
- "version": "0.10.15",
3
+ "version": "0.10.17",
4
4
  "description": "A library for bundling selected files and dependencies into a deployable package.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "dist/package-extractor.d.ts",
@@ -17,21 +17,21 @@
17
17
  "minimatch": "~3.0.3",
18
18
  "npm-packlist": "~2.1.2",
19
19
  "semver": "~7.5.4",
20
- "@rushstack/node-core-library": "5.11.0",
21
- "@rushstack/terminal": "0.15.0",
22
- "@rushstack/ts-command-line": "4.23.5"
20
+ "@rushstack/node-core-library": "5.12.0",
21
+ "@rushstack/ts-command-line": "4.23.6",
22
+ "@rushstack/terminal": "0.15.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/glob": "7.1.1",
26
26
  "@types/minimatch": "3.0.5",
27
27
  "@types/npm-packlist": "~1.1.1",
28
28
  "eslint": "~8.57.0",
29
- "webpack": "~5.95.0",
29
+ "webpack": "~5.98.0",
30
30
  "@types/semver": "7.5.0",
31
- "@rushstack/heft-webpack5-plugin": "0.11.19",
32
31
  "local-node-rig": "1.0.0",
33
- "@rushstack/heft": "0.69.2",
34
- "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.88"
32
+ "@rushstack/heft": "0.70.0",
33
+ "@rushstack/heft-webpack5-plugin": "0.11.21",
34
+ "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.90"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "heft build --clean",