@rushstack/package-extractor 0.1.2 → 0.2.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.
- package/dist/scripts/create-links.js +227 -0
- package/dist/scripts/create-links.js.map +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/PathConstants.d.ts +0 -1
- package/lib/PathConstants.d.ts.map +1 -1
- package/lib/PathConstants.js +6 -3
- package/lib/PathConstants.js.map +1 -1
- package/lib/Utils.d.ts.map +1 -1
- package/lib/Utils.js +2 -4
- package/lib/Utils.js.map +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ 657147:
|
|
6
|
+
/*!*********************!*\
|
|
7
|
+
!*** external "fs" ***!
|
|
8
|
+
\*********************/
|
|
9
|
+
/***/ ((module) => {
|
|
10
|
+
|
|
11
|
+
module.exports = require("fs");
|
|
12
|
+
|
|
13
|
+
/***/ }),
|
|
14
|
+
|
|
15
|
+
/***/ 371017:
|
|
16
|
+
/*!***********************!*\
|
|
17
|
+
!*** external "path" ***!
|
|
18
|
+
\***********************/
|
|
19
|
+
/***/ ((module) => {
|
|
20
|
+
|
|
21
|
+
module.exports = require("path");
|
|
22
|
+
|
|
23
|
+
/***/ })
|
|
24
|
+
|
|
25
|
+
/******/ });
|
|
26
|
+
/************************************************************************/
|
|
27
|
+
/******/ // The module cache
|
|
28
|
+
/******/ var __webpack_module_cache__ = {};
|
|
29
|
+
/******/
|
|
30
|
+
/******/ // The require function
|
|
31
|
+
/******/ function __webpack_require__(moduleId) {
|
|
32
|
+
/******/ // Check if module is in cache
|
|
33
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
34
|
+
/******/ if (cachedModule !== undefined) {
|
|
35
|
+
/******/ return cachedModule.exports;
|
|
36
|
+
/******/ }
|
|
37
|
+
/******/ // Create a new module (and put it into the cache)
|
|
38
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
39
|
+
/******/ // no module.id needed
|
|
40
|
+
/******/ // no module.loaded needed
|
|
41
|
+
/******/ exports: {}
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // Execute the module function
|
|
45
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
46
|
+
/******/
|
|
47
|
+
/******/ // Return the exports of the module
|
|
48
|
+
/******/ return module.exports;
|
|
49
|
+
/******/ }
|
|
50
|
+
/******/
|
|
51
|
+
/************************************************************************/
|
|
52
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
53
|
+
/******/ (() => {
|
|
54
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
55
|
+
/******/ __webpack_require__.n = (module) => {
|
|
56
|
+
/******/ var getter = module && module.__esModule ?
|
|
57
|
+
/******/ () => (module['default']) :
|
|
58
|
+
/******/ () => (module);
|
|
59
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
60
|
+
/******/ return getter;
|
|
61
|
+
/******/ };
|
|
62
|
+
/******/ })();
|
|
63
|
+
/******/
|
|
64
|
+
/******/ /* webpack/runtime/define property getters */
|
|
65
|
+
/******/ (() => {
|
|
66
|
+
/******/ // define getter functions for harmony exports
|
|
67
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
68
|
+
/******/ for(var key in definition) {
|
|
69
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
70
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
71
|
+
/******/ }
|
|
72
|
+
/******/ }
|
|
73
|
+
/******/ };
|
|
74
|
+
/******/ })();
|
|
75
|
+
/******/
|
|
76
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
77
|
+
/******/ (() => {
|
|
78
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
79
|
+
/******/ })();
|
|
80
|
+
/******/
|
|
81
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
82
|
+
/******/ (() => {
|
|
83
|
+
/******/ // define __esModule on exports
|
|
84
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
85
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
86
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
87
|
+
/******/ }
|
|
88
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
89
|
+
/******/ };
|
|
90
|
+
/******/ })();
|
|
91
|
+
/******/
|
|
92
|
+
/************************************************************************/
|
|
93
|
+
var __webpack_exports__ = {};
|
|
94
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
95
|
+
(() => {
|
|
96
|
+
/*!********************************************!*\
|
|
97
|
+
!*** ./lib-esnext/scripts/create-links.js ***!
|
|
98
|
+
\********************************************/
|
|
99
|
+
__webpack_require__.r(__webpack_exports__);
|
|
100
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 657147);
|
|
101
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
102
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ 371017);
|
|
103
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
104
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
105
|
+
// See the @microsoft/rush package's LICENSE file for license information.
|
|
106
|
+
// THIS SCRIPT IS GENERATED BY THE "rush deploy" COMMAND.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
// API borrowed from @rushstack/node-core-library, since this script avoids using any
|
|
110
|
+
// NPM dependencies.
|
|
111
|
+
class FileSystem {
|
|
112
|
+
static createSymbolicLinkJunction(options) {
|
|
113
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.symlinkSync(options.linkTargetPath, options.newLinkPath, 'junction');
|
|
114
|
+
}
|
|
115
|
+
static createSymbolicLinkFile(options) {
|
|
116
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.symlinkSync(options.linkTargetPath, options.newLinkPath, 'file');
|
|
117
|
+
}
|
|
118
|
+
static createSymbolicLinkFolder(options) {
|
|
119
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.symlinkSync(options.linkTargetPath, options.newLinkPath, 'dir');
|
|
120
|
+
}
|
|
121
|
+
static createHardLink(options) {
|
|
122
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.linkSync(options.linkTargetPath, options.newLinkPath);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function ensureFolder(folderPath) {
|
|
126
|
+
if (!folderPath) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(folderPath)) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const parentPath = path__WEBPACK_IMPORTED_MODULE_1__.dirname(folderPath);
|
|
133
|
+
if (parentPath && parentPath !== folderPath) {
|
|
134
|
+
ensureFolder(parentPath);
|
|
135
|
+
}
|
|
136
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(folderPath);
|
|
137
|
+
}
|
|
138
|
+
function removeLinks(targetRootFolder, extractorMetadataObject) {
|
|
139
|
+
for (const linkInfo of extractorMetadataObject.links) {
|
|
140
|
+
// Link to the relative path for symlinks
|
|
141
|
+
const newLinkPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetRootFolder, linkInfo.linkPath);
|
|
142
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(newLinkPath)) {
|
|
143
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.unlinkSync(newLinkPath);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function createLinks(targetRootFolder, extractorMetadataObject) {
|
|
148
|
+
for (const linkInfo of extractorMetadataObject.links) {
|
|
149
|
+
// Link to the relative path for symlinks
|
|
150
|
+
const newLinkPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetRootFolder, linkInfo.linkPath);
|
|
151
|
+
const linkTargetPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetRootFolder, linkInfo.targetPath);
|
|
152
|
+
// Make sure the containing folder exists
|
|
153
|
+
ensureFolder(path__WEBPACK_IMPORTED_MODULE_1__.dirname(newLinkPath));
|
|
154
|
+
// NOTE: This logic is based on NpmLinkManager._createSymlink()
|
|
155
|
+
if (process.platform === 'win32') {
|
|
156
|
+
if (linkInfo.kind === 'folderLink') {
|
|
157
|
+
// For directories, we use a Windows "junction". On Unix, this produces a regular symlink.
|
|
158
|
+
FileSystem.createSymbolicLinkJunction({ newLinkPath, linkTargetPath });
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
// For files, we use a Windows "hard link", because creating a symbolic link requires
|
|
162
|
+
// administrator permission.
|
|
163
|
+
// NOTE: We cannot use the relative path for hard links
|
|
164
|
+
FileSystem.createHardLink({ newLinkPath, linkTargetPath });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
// However hard links seem to cause build failures on Mac, so for all other operating systems
|
|
169
|
+
// we use symbolic links for this case.
|
|
170
|
+
if (linkInfo.kind === 'folderLink') {
|
|
171
|
+
FileSystem.createSymbolicLinkFolder({ newLinkPath, linkTargetPath });
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
FileSystem.createSymbolicLinkFile({ newLinkPath, linkTargetPath });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function showUsage() {
|
|
180
|
+
console.log('Usage:');
|
|
181
|
+
console.log(' node create-links.js create');
|
|
182
|
+
console.log(' node create-links.js remove');
|
|
183
|
+
console.log('\nCreates or removes the symlinks for the output folder created by "rush deploy".');
|
|
184
|
+
console.log('The link information is read from "extractor-metadata.json" in the same folder.');
|
|
185
|
+
}
|
|
186
|
+
function main() {
|
|
187
|
+
// Example: [ "node.exe", "create-links.js", ""create" ]
|
|
188
|
+
const args = process.argv.slice(2);
|
|
189
|
+
if (args.length !== 1 || (args[0] !== 'create' && args[0] !== 'remove')) {
|
|
190
|
+
showUsage();
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
const targetRootFolder = __dirname;
|
|
194
|
+
const extractorMetadataPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetRootFolder, 'extractor-metadata.json');
|
|
195
|
+
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(extractorMetadataPath)) {
|
|
196
|
+
throw new Error('Input file not found: ' + extractorMetadataPath);
|
|
197
|
+
}
|
|
198
|
+
const extractorMetadataJson = fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(extractorMetadataPath).toString();
|
|
199
|
+
const extractorMetadataObject = JSON.parse(extractorMetadataJson);
|
|
200
|
+
if (args[0] === 'create') {
|
|
201
|
+
console.log(`\nCreating links for extraction at path "${targetRootFolder}"`);
|
|
202
|
+
removeLinks(targetRootFolder, extractorMetadataObject);
|
|
203
|
+
createLinks(targetRootFolder, extractorMetadataObject);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
console.log(`\nRemoving links for extraction at path "${targetRootFolder}"`);
|
|
207
|
+
removeLinks(targetRootFolder, extractorMetadataObject);
|
|
208
|
+
}
|
|
209
|
+
console.log('The operation completed successfully.');
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
try {
|
|
213
|
+
process.exitCode = 1;
|
|
214
|
+
if (main()) {
|
|
215
|
+
process.exitCode = 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
console.log('ERROR: ' + error);
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=create-links.js.map
|
|
222
|
+
})();
|
|
223
|
+
|
|
224
|
+
module.exports = __webpack_exports__;
|
|
225
|
+
/******/ })()
|
|
226
|
+
;
|
|
227
|
+
//# sourceMappingURL=create-links.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-links.js","mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACyB;AACI;AAC7B;AACA;AACA;AACA;AACA,QAAQ,2CAAc;AACtB;AACA;AACA,QAAQ,2CAAc;AACtB;AACA;AACA,QAAQ,2CAAc;AACtB;AACA;AACA,QAAQ,wCAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0CAAa;AACrB;AACA;AACA,uBAAuB,yCAAY;AACnC;AACA;AACA;AACA,IAAI,yCAAY;AAChB;AACA;AACA;AACA;AACA,4BAA4B,sCAAS;AACrC,YAAY,0CAAa;AACzB,YAAY,0CAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sCAAS;AACrC,+BAA+B,sCAAS;AACxC;AACA,qBAAqB,yCAAY;AACjC;AACA;AACA;AACA;AACA,wDAAwD,6BAA6B;AACrF;AACA;AACA;AACA;AACA;AACA,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,6BAA6B;AACnF;AACA;AACA,oDAAoD,6BAA6B;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,sCAAS;AAC3C,SAAS,0CAAa;AACtB;AACA;AACA,kCAAkC,4CAAe;AACjD;AACA;AACA,gEAAgE,iBAAiB;AACjF;AACA;AACA;AACA;AACA,gEAAgE,iBAAiB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wC","sources":["webpack://@rushstack/package-extractor/external node-commonjs \"fs\"","webpack://@rushstack/package-extractor/external node-commonjs \"path\"","webpack://@rushstack/package-extractor/webpack/bootstrap","webpack://@rushstack/package-extractor/webpack/runtime/compat get default export","webpack://@rushstack/package-extractor/webpack/runtime/define property getters","webpack://@rushstack/package-extractor/webpack/runtime/hasOwnProperty shorthand","webpack://@rushstack/package-extractor/webpack/runtime/make namespace object","webpack://@rushstack/package-extractor/./lib-esnext/scripts/create-links.js"],"sourcesContent":["module.exports = require(\"fs\");","module.exports = require(\"path\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See the @microsoft/rush package's LICENSE file for license information.\n// THIS SCRIPT IS GENERATED BY THE \"rush deploy\" COMMAND.\nimport * as fs from 'fs';\nimport * as path from 'path';\n// API borrowed from @rushstack/node-core-library, since this script avoids using any\n// NPM dependencies.\nclass FileSystem {\n static createSymbolicLinkJunction(options) {\n fs.symlinkSync(options.linkTargetPath, options.newLinkPath, 'junction');\n }\n static createSymbolicLinkFile(options) {\n fs.symlinkSync(options.linkTargetPath, options.newLinkPath, 'file');\n }\n static createSymbolicLinkFolder(options) {\n fs.symlinkSync(options.linkTargetPath, options.newLinkPath, 'dir');\n }\n static createHardLink(options) {\n fs.linkSync(options.linkTargetPath, options.newLinkPath);\n }\n}\nfunction ensureFolder(folderPath) {\n if (!folderPath) {\n return;\n }\n if (fs.existsSync(folderPath)) {\n return;\n }\n const parentPath = path.dirname(folderPath);\n if (parentPath && parentPath !== folderPath) {\n ensureFolder(parentPath);\n }\n fs.mkdirSync(folderPath);\n}\nfunction removeLinks(targetRootFolder, extractorMetadataObject) {\n for (const linkInfo of extractorMetadataObject.links) {\n // Link to the relative path for symlinks\n const newLinkPath = path.join(targetRootFolder, linkInfo.linkPath);\n if (fs.existsSync(newLinkPath)) {\n fs.unlinkSync(newLinkPath);\n }\n }\n}\nfunction createLinks(targetRootFolder, extractorMetadataObject) {\n for (const linkInfo of extractorMetadataObject.links) {\n // Link to the relative path for symlinks\n const newLinkPath = path.join(targetRootFolder, linkInfo.linkPath);\n const linkTargetPath = path.join(targetRootFolder, linkInfo.targetPath);\n // Make sure the containing folder exists\n ensureFolder(path.dirname(newLinkPath));\n // NOTE: This logic is based on NpmLinkManager._createSymlink()\n if (process.platform === 'win32') {\n if (linkInfo.kind === 'folderLink') {\n // For directories, we use a Windows \"junction\". On Unix, this produces a regular symlink.\n FileSystem.createSymbolicLinkJunction({ newLinkPath, linkTargetPath });\n }\n else {\n // For files, we use a Windows \"hard link\", because creating a symbolic link requires\n // administrator permission.\n // NOTE: We cannot use the relative path for hard links\n FileSystem.createHardLink({ newLinkPath, linkTargetPath });\n }\n }\n else {\n // However hard links seem to cause build failures on Mac, so for all other operating systems\n // we use symbolic links for this case.\n if (linkInfo.kind === 'folderLink') {\n FileSystem.createSymbolicLinkFolder({ newLinkPath, linkTargetPath });\n }\n else {\n FileSystem.createSymbolicLinkFile({ newLinkPath, linkTargetPath });\n }\n }\n }\n}\nfunction showUsage() {\n console.log('Usage:');\n console.log(' node create-links.js create');\n console.log(' node create-links.js remove');\n console.log('\\nCreates or removes the symlinks for the output folder created by \"rush deploy\".');\n console.log('The link information is read from \"extractor-metadata.json\" in the same folder.');\n}\nfunction main() {\n // Example: [ \"node.exe\", \"create-links.js\", \"\"create\" ]\n const args = process.argv.slice(2);\n if (args.length !== 1 || (args[0] !== 'create' && args[0] !== 'remove')) {\n showUsage();\n return false;\n }\n const targetRootFolder = __dirname;\n const extractorMetadataPath = path.join(targetRootFolder, 'extractor-metadata.json');\n if (!fs.existsSync(extractorMetadataPath)) {\n throw new Error('Input file not found: ' + extractorMetadataPath);\n }\n const extractorMetadataJson = fs.readFileSync(extractorMetadataPath).toString();\n const extractorMetadataObject = JSON.parse(extractorMetadataJson);\n if (args[0] === 'create') {\n console.log(`\\nCreating links for extraction at path \"${targetRootFolder}\"`);\n removeLinks(targetRootFolder, extractorMetadataObject);\n createLinks(targetRootFolder, extractorMetadataObject);\n }\n else {\n console.log(`\\nRemoving links for extraction at path \"${targetRootFolder}\"`);\n removeLinks(targetRootFolder, extractorMetadataObject);\n }\n console.log('The operation completed successfully.');\n return true;\n}\ntry {\n process.exitCode = 1;\n if (main()) {\n process.exitCode = 0;\n }\n}\ncatch (error) {\n console.log('ERROR: ' + error);\n}\n//# sourceMappingURL=create-links.js.map"],"names":[],"sourceRoot":""}
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/PathConstants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathConstants.d.ts","sourceRoot":"","sources":["../src/PathConstants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PathConstants.d.ts","sourceRoot":"","sources":["../src/PathConstants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,yBAAyB,EAAE,iBAAqC,CAAC;AAC9E,eAAO,MAAM,iBAAiB,EAAE,MAAyD,CAAC"}
|
package/lib/PathConstants.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See the @microsoft/rush package's LICENSE file for license information.
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scriptsFolderPath = exports.
|
|
5
|
+
exports.scriptsFolderPath = exports.createLinksScriptFilename = void 0;
|
|
6
|
+
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
7
|
+
const packageExtractorFolderRootPath = node_core_library_1.PackageJsonLookup.instance.tryGetPackageFolderFor(__dirname);
|
|
4
8
|
exports.createLinksScriptFilename = 'create-links.js';
|
|
5
|
-
exports.
|
|
6
|
-
exports.scriptsFolderPath = `${__dirname}/${exports.scriptsFolderName}`;
|
|
9
|
+
exports.scriptsFolderPath = `${packageExtractorFolderRootPath}/dist/scripts`;
|
|
7
10
|
//# sourceMappingURL=PathConstants.js.map
|
package/lib/PathConstants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathConstants.js","sourceRoot":"","sources":["../src/PathConstants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PathConstants.js","sourceRoot":"","sources":["../src/PathConstants.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,0EAA0E;;;AAE1E,oEAAiE;AAEjE,MAAM,8BAA8B,GAAW,qCAAiB,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAE,CAAC;AAChG,QAAA,yBAAyB,GAAsB,iBAAiB,CAAC;AACjE,QAAA,iBAAiB,GAAW,GAAG,8BAA8B,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See the @microsoft/rush package's LICENSE file for license information.\n\nimport { PackageJsonLookup } from '@rushstack/node-core-library';\n\nconst packageExtractorFolderRootPath: string = PackageJsonLookup.instance.tryGetPackageFolderFor(__dirname)!;\nexport const createLinksScriptFilename: 'create-links.js' = 'create-links.js';\nexport const scriptsFolderPath: string = `${packageExtractorFolderRootPath}/dist/scripts`;\n"]}
|
package/lib/Utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAY/E"}
|
package/lib/Utils.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchesWithStar = void 0;
|
|
4
|
-
|
|
5
|
-
return literal.replace(/[^A-Za-z0-9_]/g, '\\$&');
|
|
6
|
-
}
|
|
4
|
+
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
7
5
|
function matchesWithStar(patternWithStar, input) {
|
|
8
6
|
// Map "@types/*" --> "^\@types\/.*$"
|
|
9
7
|
const pattern = '^' +
|
|
10
8
|
patternWithStar
|
|
11
9
|
.split('*')
|
|
12
|
-
.map((x) => escapeRegExp(x))
|
|
10
|
+
.map((x) => node_core_library_1.Text.escapeRegExp(x))
|
|
13
11
|
.join('.*') +
|
|
14
12
|
'$';
|
|
15
13
|
// eslint-disable-next-line @rushstack/security/no-unsafe-regexp
|
package/lib/Utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";;;AAAA,oEAAoD;AAEpD,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","sourcesContent":["import { Text } from '@rushstack/node-core-library';\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/package-extractor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"ignore": "~5.1.6",
|
|
16
16
|
"jszip": "~3.8.0",
|
|
17
17
|
"npm-packlist": "~2.1.2",
|
|
18
|
-
"@rushstack/node-core-library": "3.
|
|
19
|
-
"@rushstack/terminal": "0.5.
|
|
18
|
+
"@rushstack/node-core-library": "3.58.0",
|
|
19
|
+
"@rushstack/terminal": "0.5.7"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/glob": "7.1.1",
|
|
@@ -24,9 +24,12 @@
|
|
|
24
24
|
"@types/node": "14.18.36",
|
|
25
25
|
"@types/npm-packlist": "~1.1.1",
|
|
26
26
|
"eslint": "~8.7.0",
|
|
27
|
+
"webpack": "~5.80.0",
|
|
27
28
|
"@rushstack/eslint-config": "3.2.0",
|
|
28
|
-
"@rushstack/heft-node-rig": "1.12.
|
|
29
|
-
"@rushstack/heft": "0.
|
|
29
|
+
"@rushstack/heft-node-rig": "1.12.9",
|
|
30
|
+
"@rushstack/heft-webpack5-plugin": "0.6.8",
|
|
31
|
+
"@rushstack/heft": "0.50.3",
|
|
32
|
+
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.10.10"
|
|
30
33
|
},
|
|
31
34
|
"scripts": {
|
|
32
35
|
"build": "heft build --clean",
|