@rushstack/package-extractor 0.8.0 → 0.9.0

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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.8"
8
+ "packageVersion": "7.47.9"
9
9
  }
10
10
  ]
11
11
  }
@@ -0,0 +1,50 @@
1
+ /// <reference types="node" />
2
+ import { type FileSystemStats } from '@rushstack/node-core-library';
3
+ import type { IExtractorOptions } from './PackageExtractor';
4
+ import type { SymlinkAnalyzer } from './SymlinkAnalyzer';
5
+ export interface IIncludeAssetOptions {
6
+ sourceFilePath?: string;
7
+ sourceFileStats?: FileSystemStats;
8
+ sourceFileContent?: string | Buffer;
9
+ targetFilePath: string;
10
+ ignoreIfExisting?: boolean;
11
+ }
12
+ export interface IIncludeAssetPathOptions extends IIncludeAssetOptions {
13
+ sourceFilePath: string;
14
+ sourceFileContent?: never;
15
+ }
16
+ export interface IIncludeExistingAssetPathOptions extends IIncludeAssetOptions {
17
+ sourceFilePath?: never;
18
+ sourceFileContent?: never;
19
+ }
20
+ export interface IIncludeAssetContentOptions extends IIncludeAssetOptions {
21
+ sourceFileContent: string | Buffer;
22
+ sourceFilePath?: never;
23
+ sourceFileStats?: never;
24
+ }
25
+ export interface IAssetHandlerOptions extends IExtractorOptions {
26
+ symlinkAnalyzer: SymlinkAnalyzer;
27
+ }
28
+ export declare class AssetHandler {
29
+ private readonly _terminal;
30
+ private readonly _sourceRootFolder;
31
+ private readonly _targetRootFolder;
32
+ private readonly _createArchiveOnly;
33
+ private readonly _symlinkAnalyzer;
34
+ private readonly _archiveManager;
35
+ private readonly _archiveFilePath;
36
+ private readonly _linkCreationMode;
37
+ private readonly _includedAssetPaths;
38
+ private _isFinalized;
39
+ constructor(options: IAssetHandlerOptions);
40
+ includeAssetAsync(options: IIncludeAssetPathOptions): Promise<void>;
41
+ includeAssetAsync(options: IIncludeExistingAssetPathOptions): Promise<void>;
42
+ includeAssetAsync(options: IIncludeAssetContentOptions): Promise<void>;
43
+ get assetPaths(): string[];
44
+ finalizeAsync(): Promise<void>;
45
+ /**
46
+ * Create a symlink as described by the ILinkInfo object.
47
+ */
48
+ private _extractSymlinkAsync;
49
+ }
50
+ //# sourceMappingURL=AssetHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetHandler.d.ts","sourceRoot":"","sources":["../src/AssetHandler.ts"],"names":[],"mappings":";AAKA,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG7F,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpE,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B;AAED,MAAM,WAAW,gCAAiC,SAAQ,oBAAoB;IAC5E,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAU;IAC7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6B;IAC7D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IACtD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IACrD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAkC;IACtE,OAAO,CAAC,YAAY,CAAkB;gBAEnB,OAAO,EAAE,oBAAoB;IA4BnC,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IACnE,iBAAiB,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3E,iBAAiB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IAgEnF,IAAW,UAAU,IAAI,MAAM,EAAE,CAEhC;IAEY,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3C;;OAEG;YACW,oBAAoB;CAiDnC"}
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
+ // See LICENSE in the project root for license information.
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AssetHandler = void 0;
9
+ const node_path_1 = __importDefault(require("node:path"));
10
+ const node_fs_1 = __importDefault(require("node:fs"));
11
+ const node_core_library_1 = require("@rushstack/node-core-library");
12
+ const ArchiveManager_1 = require("./ArchiveManager");
13
+ const Utils_1 = require("./Utils");
14
+ class AssetHandler {
15
+ constructor(options) {
16
+ this._includedAssetPaths = new Set();
17
+ this._isFinalized = false;
18
+ const { terminal, sourceRootFolder, targetRootFolder, linkCreation, symlinkAnalyzer, createArchiveFilePath, createArchiveOnly = false } = options;
19
+ this._terminal = terminal;
20
+ this._sourceRootFolder = sourceRootFolder;
21
+ this._targetRootFolder = targetRootFolder;
22
+ this._symlinkAnalyzer = symlinkAnalyzer;
23
+ if (createArchiveFilePath) {
24
+ if (node_path_1.default.extname(createArchiveFilePath) !== '.zip') {
25
+ throw new Error('Only archives with the .zip file extension are currently supported.');
26
+ }
27
+ this._archiveFilePath = node_path_1.default.resolve(targetRootFolder, createArchiveFilePath);
28
+ this._archiveManager = new ArchiveManager_1.ArchiveManager();
29
+ }
30
+ if (createArchiveOnly && !this._archiveManager) {
31
+ throw new Error('createArchiveOnly cannot be true if createArchiveFilePath is not provided');
32
+ }
33
+ this._createArchiveOnly = createArchiveOnly;
34
+ this._linkCreationMode = linkCreation || 'default';
35
+ }
36
+ async includeAssetAsync(options) {
37
+ const { sourceFileContent, targetFilePath, ignoreIfExisting = false } = options;
38
+ let { sourceFilePath } = options;
39
+ if (this._isFinalized) {
40
+ throw new Error('includeAssetAsync() cannot be called after finalizeAsync()');
41
+ }
42
+ if (!sourceFilePath && !sourceFileContent) {
43
+ if (!node_core_library_1.Path.isUnder(targetFilePath, this._targetRootFolder)) {
44
+ throw new Error('The existing asset path must be under the target root folder');
45
+ }
46
+ sourceFilePath = targetFilePath;
47
+ }
48
+ if (sourceFilePath && sourceFileContent) {
49
+ throw new Error('Either sourceFilePath or sourceFileContent must be provided, but not both');
50
+ }
51
+ if (this._includedAssetPaths.has(targetFilePath)) {
52
+ if (ignoreIfExisting) {
53
+ return;
54
+ }
55
+ throw new Error(`The asset at path "${targetFilePath}" has already been included`);
56
+ }
57
+ if (!this._createArchiveOnly) {
58
+ // Ignore when the source file is the same as the target file, as it's a no-op
59
+ if (sourceFilePath && sourceFilePath !== targetFilePath) {
60
+ // Use the fs.copyFile API instead of FileSystem.copyFileAsync() since copyFileAsync performs
61
+ // a needless stat() call to determine if it's a file or folder, and we already know it's a file.
62
+ try {
63
+ await node_fs_1.default.promises.copyFile(sourceFilePath, targetFilePath, node_fs_1.default.constants.COPYFILE_EXCL);
64
+ }
65
+ catch (e) {
66
+ if (!node_core_library_1.FileSystem.isNotExistError(e)) {
67
+ throw e;
68
+ }
69
+ // The parent folder may not exist, so ensure it exists before trying to copy again
70
+ await node_core_library_1.FileSystem.ensureFolderAsync(node_path_1.default.dirname(targetFilePath));
71
+ await node_fs_1.default.promises.copyFile(sourceFilePath, targetFilePath, node_fs_1.default.constants.COPYFILE_EXCL);
72
+ }
73
+ }
74
+ else if (sourceFileContent) {
75
+ await node_core_library_1.FileSystem.writeFileAsync(targetFilePath, sourceFileContent, {
76
+ ensureFolderExists: true
77
+ });
78
+ }
79
+ }
80
+ if (this._archiveManager) {
81
+ const targetRelativeFilePath = node_path_1.default.relative(this._targetRootFolder, targetFilePath);
82
+ if (sourceFilePath) {
83
+ await this._archiveManager.addToArchiveAsync({
84
+ filePath: sourceFilePath,
85
+ archivePath: targetRelativeFilePath
86
+ });
87
+ }
88
+ else if (sourceFileContent) {
89
+ await this._archiveManager.addToArchiveAsync({
90
+ fileData: sourceFileContent,
91
+ archivePath: targetRelativeFilePath
92
+ });
93
+ }
94
+ }
95
+ this._includedAssetPaths.add(targetFilePath);
96
+ }
97
+ get assetPaths() {
98
+ return [...this._includedAssetPaths];
99
+ }
100
+ async finalizeAsync() {
101
+ if (this._isFinalized) {
102
+ throw new Error('finalizeAsync() has already been called');
103
+ }
104
+ if (this._linkCreationMode === 'default') {
105
+ this._terminal.writeLine('Creating symlinks');
106
+ const linksToCopy = this._symlinkAnalyzer.reportSymlinks();
107
+ await node_core_library_1.Async.forEachAsync(linksToCopy, async (linkToCopy) => {
108
+ await this._extractSymlinkAsync(linkToCopy);
109
+ });
110
+ }
111
+ if (this._archiveManager && this._archiveFilePath) {
112
+ this._terminal.writeLine(`Creating archive at "${this._archiveFilePath}"`);
113
+ await this._archiveManager.createArchiveAsync(this._archiveFilePath);
114
+ }
115
+ this._isFinalized = true;
116
+ }
117
+ /**
118
+ * Create a symlink as described by the ILinkInfo object.
119
+ */
120
+ async _extractSymlinkAsync(linkInfo) {
121
+ const { kind, linkPath, targetPath } = Object.assign(Object.assign({}, linkInfo), { linkPath: (0, Utils_1.remapSourcePathForTargetFolder)({
122
+ sourceRootFolder: this._sourceRootFolder,
123
+ targetRootFolder: this._targetRootFolder,
124
+ sourcePath: linkInfo.linkPath
125
+ }), targetPath: (0, Utils_1.remapSourcePathForTargetFolder)({
126
+ sourceRootFolder: this._sourceRootFolder,
127
+ targetRootFolder: this._targetRootFolder,
128
+ sourcePath: linkInfo.targetPath
129
+ }) });
130
+ const newLinkFolder = node_path_1.default.dirname(linkPath);
131
+ await node_core_library_1.FileSystem.ensureFolderAsync(newLinkFolder);
132
+ // Link to the relative path for symlinks
133
+ const relativeTargetPath = node_path_1.default.relative(newLinkFolder, targetPath);
134
+ // NOTE: This logic is based on NpmLinkManager._createSymlink()
135
+ if (kind === 'fileLink') {
136
+ // For files, we use a Windows "hard link", because creating a symbolic link requires
137
+ // administrator permission. However hard links seem to cause build failures on Mac,
138
+ // so for all other operating systems we use symbolic links for this case.
139
+ if (process.platform === 'win32') {
140
+ await node_core_library_1.FileSystem.createHardLinkAsync({
141
+ linkTargetPath: relativeTargetPath,
142
+ newLinkPath: linkPath
143
+ });
144
+ }
145
+ else {
146
+ await node_core_library_1.FileSystem.createSymbolicLinkFileAsync({
147
+ linkTargetPath: relativeTargetPath,
148
+ newLinkPath: linkPath
149
+ });
150
+ }
151
+ }
152
+ else {
153
+ // Junctions are only supported on Windows. This will create a symbolic link on other platforms.
154
+ await node_core_library_1.FileSystem.createSymbolicLinkJunctionAsync({
155
+ linkTargetPath: relativeTargetPath,
156
+ newLinkPath: linkPath
157
+ });
158
+ }
159
+ // Since the created symlinks have the required relative paths, they can be added directly to
160
+ // the archive.
161
+ await this.includeAssetAsync({ targetFilePath: linkPath });
162
+ }
163
+ }
164
+ exports.AssetHandler = AssetHandler;
165
+ //# sourceMappingURL=AssetHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetHandler.js","sourceRoot":"","sources":["../src/AssetHandler.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,0DAA6B;AAC7B,sDAAyB;AACzB,oEAA6F;AAE7F,qDAAkD;AAGlD,mCAAyD;AA8BzD,MAAa,YAAY;IAYvB,YAAmB,OAA6B;QAH/B,wBAAmB,GAAgB,IAAI,GAAG,EAAU,CAAC;QAC9D,iBAAY,GAAY,KAAK,CAAC;QAGpC,MAAM,EACJ,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,iBAAiB,GAAG,KAAK,EAC1B,GAAG,OAAO,CAAC;QACZ,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAC1C,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAC1C,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QACxC,IAAI,qBAAqB,EAAE,CAAC;YAC1B,IAAI,mBAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,MAAM,EAAE,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;YACzF,CAAC;YACD,IAAI,CAAC,gBAAgB,GAAG,mBAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;YAC9E,IAAI,CAAC,eAAe,GAAG,IAAI,+BAAc,EAAE,CAAC;QAC9C,CAAC;QACD,IAAI,iBAAiB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,IA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ACxC,UAAU,EAAE,QAAQ,CAAC,UAAU;aAChC,CAAC,GACH,CAAC;QAEF,MAAM,aAAa,GAAW,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,8BAAU,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAElD,yCAAyC;QACzC,MAAM,kBAAkB,GAAW,mBAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAE5E,+DAA+D;QAC/D,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YACxB,qFAAqF;YACrF,oFAAoF;YACpF,0EAA0E;YAC1E,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;gBACjC,MAAM,8BAAU,CAAC,mBAAmB,CAAC;oBACnC,cAAc,EAAE,kBAAkB;oBAClC,WAAW,EAAE,QAAQ;iBACtB,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,MAAM,8BAAU,CAAC,2BAA2B,CAAC;oBAC3C,cAAc,EAAE,kBAAkB;oBAClC,WAAW,EAAE,QAAQ;iBACtB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;aAAM,CAAC;YACN,gGAAgG;YAChG,MAAM,8BAAU,CAAC,+BAA+B,CAAC;gBAC/C,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,QAAQ;aACtB,CAAC,CAAC;QACL,CAAC;QAED,6FAA6F;QAC7F,eAAe;QACf,MAAM,IAAI,CAAC,iBAAiB,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AAvLD,oCAuLC","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 fs from 'node:fs';\nimport { Async, FileSystem, Path, type FileSystemStats } from '@rushstack/node-core-library';\nimport type { ITerminal } from '@rushstack/terminal';\nimport { ArchiveManager } from './ArchiveManager';\nimport type { IExtractorOptions, LinkCreationMode } from './PackageExtractor';\nimport type { ILinkInfo, SymlinkAnalyzer } from './SymlinkAnalyzer';\nimport { remapSourcePathForTargetFolder } from './Utils';\n\nexport interface IIncludeAssetOptions {\n sourceFilePath?: string;\n sourceFileStats?: FileSystemStats;\n sourceFileContent?: string | Buffer;\n targetFilePath: string;\n ignoreIfExisting?: boolean;\n}\n\nexport interface IIncludeAssetPathOptions extends IIncludeAssetOptions {\n sourceFilePath: string;\n sourceFileContent?: never;\n}\n\nexport interface IIncludeExistingAssetPathOptions extends IIncludeAssetOptions {\n sourceFilePath?: never;\n sourceFileContent?: never;\n}\n\nexport interface IIncludeAssetContentOptions extends IIncludeAssetOptions {\n sourceFileContent: string | Buffer;\n sourceFilePath?: never;\n sourceFileStats?: never;\n}\n\nexport interface IAssetHandlerOptions extends IExtractorOptions {\n symlinkAnalyzer: SymlinkAnalyzer;\n}\n\nexport class AssetHandler {\n private readonly _terminal: ITerminal;\n private readonly _sourceRootFolder: string;\n private readonly _targetRootFolder: string;\n private readonly _createArchiveOnly: boolean;\n private readonly _symlinkAnalyzer: SymlinkAnalyzer;\n private readonly _archiveManager: ArchiveManager | undefined;\n private readonly _archiveFilePath: string | undefined;\n private readonly _linkCreationMode: LinkCreationMode;\n private readonly _includedAssetPaths: Set<string> = new Set<string>();\n private _isFinalized: boolean = false;\n\n public constructor(options: IAssetHandlerOptions) {\n const {\n terminal,\n sourceRootFolder,\n targetRootFolder,\n linkCreation,\n symlinkAnalyzer,\n createArchiveFilePath,\n createArchiveOnly = false\n } = options;\n this._terminal = terminal;\n this._sourceRootFolder = sourceRootFolder;\n this._targetRootFolder = targetRootFolder;\n this._symlinkAnalyzer = symlinkAnalyzer;\n if (createArchiveFilePath) {\n if (path.extname(createArchiveFilePath) !== '.zip') {\n throw new Error('Only archives with the .zip file extension are currently supported.');\n }\n this._archiveFilePath = path.resolve(targetRootFolder, createArchiveFilePath);\n this._archiveManager = new ArchiveManager();\n }\n if (createArchiveOnly && !this._archiveManager) {\n throw new Error('createArchiveOnly cannot be true if createArchiveFilePath is not provided');\n }\n this._createArchiveOnly = createArchiveOnly;\n this._linkCreationMode = linkCreation || 'default';\n }\n\n public async includeAssetAsync(options: IIncludeAssetPathOptions): Promise<void>;\n public async includeAssetAsync(options: IIncludeExistingAssetPathOptions): Promise<void>;\n public async includeAssetAsync(options: IIncludeAssetContentOptions): Promise<void>;\n public async includeAssetAsync(options: IIncludeAssetOptions): Promise<void> {\n const { sourceFileContent, targetFilePath, ignoreIfExisting = false } = options;\n let { sourceFilePath } = options;\n\n if (this._isFinalized) {\n throw new Error('includeAssetAsync() cannot be called after finalizeAsync()');\n }\n if (!sourceFilePath && !sourceFileContent) {\n if (!Path.isUnder(targetFilePath, this._targetRootFolder)) {\n throw new Error('The existing asset path must be under the target root folder');\n }\n sourceFilePath = targetFilePath;\n }\n if (sourceFilePath && sourceFileContent) {\n throw new Error('Either sourceFilePath or sourceFileContent must be provided, but not both');\n }\n if (this._includedAssetPaths.has(targetFilePath)) {\n if (ignoreIfExisting) {\n return;\n }\n throw new Error(`The asset at path \"${targetFilePath}\" has already been included`);\n }\n\n if (!this._createArchiveOnly) {\n // Ignore when the source file is the same as the target file, as it's a no-op\n if (sourceFilePath && sourceFilePath !== targetFilePath) {\n // Use the fs.copyFile API instead of FileSystem.copyFileAsync() since copyFileAsync performs\n // a needless stat() call to determine if it's a file or folder, and we already know it's a file.\n try {\n await fs.promises.copyFile(sourceFilePath, targetFilePath, fs.constants.COPYFILE_EXCL);\n } catch (e: unknown) {\n if (!FileSystem.isNotExistError(e as Error)) {\n throw e;\n }\n // The parent folder may not exist, so ensure it exists before trying to copy again\n await FileSystem.ensureFolderAsync(path.dirname(targetFilePath));\n await fs.promises.copyFile(sourceFilePath, targetFilePath, fs.constants.COPYFILE_EXCL);\n }\n } else if (sourceFileContent) {\n await FileSystem.writeFileAsync(targetFilePath, sourceFileContent, {\n ensureFolderExists: true\n });\n }\n }\n\n if (this._archiveManager) {\n const targetRelativeFilePath: string = path.relative(this._targetRootFolder, targetFilePath);\n if (sourceFilePath) {\n await this._archiveManager.addToArchiveAsync({\n filePath: sourceFilePath,\n archivePath: targetRelativeFilePath\n });\n } else if (sourceFileContent) {\n await this._archiveManager.addToArchiveAsync({\n fileData: sourceFileContent,\n archivePath: targetRelativeFilePath\n });\n }\n }\n\n this._includedAssetPaths.add(targetFilePath);\n }\n\n public get assetPaths(): string[] {\n return [...this._includedAssetPaths];\n }\n\n public async finalizeAsync(): Promise<void> {\n if (this._isFinalized) {\n throw new Error('finalizeAsync() has already been called');\n }\n\n if (this._linkCreationMode === 'default') {\n this._terminal.writeLine('Creating symlinks');\n const linksToCopy: ILinkInfo[] = this._symlinkAnalyzer.reportSymlinks();\n await Async.forEachAsync(linksToCopy, async (linkToCopy: ILinkInfo) => {\n await this._extractSymlinkAsync(linkToCopy);\n });\n }\n\n if (this._archiveManager && this._archiveFilePath) {\n this._terminal.writeLine(`Creating archive at \"${this._archiveFilePath}\"`);\n await this._archiveManager.createArchiveAsync(this._archiveFilePath);\n }\n\n this._isFinalized = true;\n }\n\n /**\n * Create a symlink as described by the ILinkInfo object.\n */\n private async _extractSymlinkAsync(linkInfo: ILinkInfo): Promise<void> {\n const { kind, linkPath, targetPath } = {\n ...linkInfo,\n linkPath: remapSourcePathForTargetFolder({\n sourceRootFolder: this._sourceRootFolder,\n targetRootFolder: this._targetRootFolder,\n sourcePath: linkInfo.linkPath\n }),\n targetPath: remapSourcePathForTargetFolder({\n sourceRootFolder: this._sourceRootFolder,\n targetRootFolder: this._targetRootFolder,\n sourcePath: linkInfo.targetPath\n })\n };\n\n const newLinkFolder: string = path.dirname(linkPath);\n await FileSystem.ensureFolderAsync(newLinkFolder);\n\n // Link to the relative path for symlinks\n const relativeTargetPath: string = path.relative(newLinkFolder, targetPath);\n\n // NOTE: This logic is based on NpmLinkManager._createSymlink()\n if (kind === 'fileLink') {\n // For files, we use a Windows \"hard link\", because creating a symbolic link requires\n // administrator permission. However hard links seem to cause build failures on Mac,\n // so for all other operating systems we use symbolic links for this case.\n if (process.platform === 'win32') {\n await FileSystem.createHardLinkAsync({\n linkTargetPath: relativeTargetPath,\n newLinkPath: linkPath\n });\n } else {\n await FileSystem.createSymbolicLinkFileAsync({\n linkTargetPath: relativeTargetPath,\n newLinkPath: linkPath\n });\n }\n } else {\n // Junctions are only supported on Windows. This will create a symbolic link on other platforms.\n await FileSystem.createSymbolicLinkJunctionAsync({\n linkTargetPath: relativeTargetPath,\n newLinkPath: linkPath\n });\n }\n\n // Since the created symlinks have the required relative paths, they can be added directly to\n // the archive.\n await this.includeAssetAsync({ targetFilePath: linkPath });\n }\n}\n"]}
@@ -46,6 +46,10 @@ export interface IExtractorMetadataJson {
46
46
  * A list of all links that are part of the extracted project.
47
47
  */
48
48
  links: ILinkInfo[];
49
+ /**
50
+ * A list of all files that are part of the extracted project.
51
+ */
52
+ files: string[];
49
53
  }
50
54
  /**
51
55
  * The extractor subspace configurations
@@ -134,6 +138,12 @@ export interface IExtractorDependencyConfiguration {
134
138
  */
135
139
  patternsToInclude?: string[];
136
140
  }
141
+ /**
142
+ * The mode to use for link creation.
143
+ *
144
+ * @public
145
+ */
146
+ export type LinkCreationMode = 'default' | 'script' | 'none';
137
147
  /**
138
148
  * Options that can be provided to the extractor.
139
149
  *
@@ -205,7 +215,7 @@ export interface IExtractorOptions {
205
215
  * to create links on the server machine, after the files have been uploaded.
206
216
  * "none": Do nothing; some other tool may create the links later, based on the extractor-metadata.json file.
207
217
  */
208
- linkCreation?: 'default' | 'script' | 'none';
218
+ linkCreation?: LinkCreationMode;
209
219
  /**
210
220
  * The path to the generated link creation script. This is only used when {@link IExtractorOptions.linkCreation}
211
221
  * is 'script'.
@@ -256,32 +266,15 @@ export declare class PackageExtractor {
256
266
  */
257
267
  private _collectFoldersAsync;
258
268
  private _applyDependencyFilters;
259
- /**
260
- * Maps a file path from IExtractorOptions.sourceRootFolder to IExtractorOptions.targetRootFolder
261
- *
262
- * Example input: "C:\\MyRepo\\libraries\\my-lib"
263
- * Example output: "C:\\MyRepo\\common\\deploy\\libraries\\my-lib"
264
- */
265
- private _remapPathForExtractorFolder;
266
- /**
267
- * Maps a file path from IExtractorOptions.sourceRootFolder to relative path
268
- *
269
- * Example input: "C:\\MyRepo\\libraries\\my-lib"
270
- * Example output: "libraries/my-lib"
271
- */
272
- private _remapPathForExtractorMetadata;
273
269
  /**
274
270
  * Copy one package folder to the extractor target folder.
275
271
  */
276
272
  private _extractFolderAsync;
277
- /**
278
- * Create a symlink as described by the ILinkInfo object.
279
- */
280
- private _extractSymlinkAsync;
281
273
  /**
282
274
  * Write the common/deploy/deploy-metadata.json file.
283
275
  */
284
276
  private _writeExtractorMetadataAsync;
285
277
  private _makeBinLinksAsync;
278
+ private _writeCreateLinksScriptAsync;
286
279
  }
287
280
  //# sourceMappingURL=PackageExtractor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PackageExtractor.d.ts","sourceRoot":"","sources":["../src/PackageExtractor.ts"],"names":[],"mappings":"AAUA,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EAAmB,KAAK,SAAS,EAAiB,MAAM,mBAAmB,CAAC;AAKnF,OAAO,QAAQ,cAAc,CAAC;IAC5B,MAAa,MAAM;QACjB,SAAgB,MAAM,EAAE,MAAM,EAAE,CAAC;oBACd,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;QAClC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,MAAM;QAC/D,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,MAAM;QAC5D,KAAK,IAAI,IAAI;KACrB;CACF;AAED,eAAO,MAAM,gDAAgD,EA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