@ng-atomic/schematics 20.67.0 → 20.73.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/index.js +812 -391
- package/lib/_utilities/index.js +812 -391
- package/lib/atomic-component/index.js +5 -11
- package/lib/ng-add/index.js +811 -390
- package/lib/page/index.js +811 -390
- package/lib/pages/index.js +5 -11
- package/lib/setup/index.js +812 -391
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -212,6 +212,7 @@ var require_delegate = __commonJS({
|
|
|
212
212
|
_other;
|
|
213
213
|
constructor(_other) {
|
|
214
214
|
this._other = _other;
|
|
215
|
+
this[interface_1.TreeSymbol] = () => this;
|
|
215
216
|
}
|
|
216
217
|
branch() {
|
|
217
218
|
return this._other.branch();
|
|
@@ -270,9 +271,6 @@ var require_delegate = __commonJS({
|
|
|
270
271
|
get actions() {
|
|
271
272
|
return this._other.actions;
|
|
272
273
|
}
|
|
273
|
-
[interface_1.TreeSymbol]() {
|
|
274
|
-
return this;
|
|
275
|
-
}
|
|
276
274
|
};
|
|
277
275
|
exports2.DelegateTree = DelegateTree;
|
|
278
276
|
}
|
|
@@ -2161,6 +2159,7 @@ var require_scoped = __commonJS({
|
|
|
2161
2159
|
_root;
|
|
2162
2160
|
constructor(_base, scope) {
|
|
2163
2161
|
this._base = _base;
|
|
2162
|
+
this[interface_1.TreeSymbol] = () => this;
|
|
2164
2163
|
const normalizedScope = (0, core_1.normalize)("/" + scope);
|
|
2165
2164
|
this._root = new ScopedDirEntry(this._base.getDir(normalizedScope), normalizedScope);
|
|
2166
2165
|
}
|
|
@@ -2247,9 +2246,6 @@ var require_scoped = __commonJS({
|
|
|
2247
2246
|
}
|
|
2248
2247
|
return scopedActions;
|
|
2249
2248
|
}
|
|
2250
|
-
[interface_1.TreeSymbol]() {
|
|
2251
|
-
return this;
|
|
2252
|
-
}
|
|
2253
2249
|
_fullPath(path) {
|
|
2254
2250
|
return (0, core_1.join)(this._root.scope, (0, core_1.normalize)("/" + path));
|
|
2255
2251
|
}
|
|
@@ -2336,9 +2332,6 @@ var require_host_tree = __commonJS({
|
|
|
2336
2332
|
_recordSync;
|
|
2337
2333
|
_ancestry = /* @__PURE__ */ new Set();
|
|
2338
2334
|
_dirCache = /* @__PURE__ */ new Map();
|
|
2339
|
-
[interface_1.TreeSymbol]() {
|
|
2340
|
-
return this;
|
|
2341
|
-
}
|
|
2342
2335
|
static isHostTree(tree) {
|
|
2343
2336
|
if (tree instanceof _HostTree) {
|
|
2344
2337
|
return true;
|
|
@@ -2350,6 +2343,7 @@ var require_host_tree = __commonJS({
|
|
|
2350
2343
|
}
|
|
2351
2344
|
constructor(_backend = new core_1.virtualFs.Empty()) {
|
|
2352
2345
|
this._backend = _backend;
|
|
2346
|
+
this[interface_1.TreeSymbol] = () => this;
|
|
2353
2347
|
this._record = new core_1.virtualFs.CordHost(new core_1.virtualFs.SafeReadonlyHost(_backend));
|
|
2354
2348
|
this._recordSync = new core_1.virtualFs.SyncDelegateHost(this._record);
|
|
2355
2349
|
}
|
|
@@ -12154,8 +12148,8 @@ var require_null = __commonJS({
|
|
|
12154
12148
|
};
|
|
12155
12149
|
exports2.NullTreeDirEntry = NullTreeDirEntry;
|
|
12156
12150
|
var NullTree = class _NullTree {
|
|
12157
|
-
|
|
12158
|
-
|
|
12151
|
+
constructor() {
|
|
12152
|
+
this[interface_1.TreeSymbol] = () => this;
|
|
12159
12153
|
}
|
|
12160
12154
|
branch() {
|
|
12161
12155
|
return new _NullTree();
|
|
@@ -425007,7 +425001,7 @@ ${fromBody}`;
|
|
|
425007
425001
|
exports22.parseString = parseString;
|
|
425008
425002
|
}
|
|
425009
425003
|
});
|
|
425010
|
-
var
|
|
425004
|
+
var require_package3 = __commonJS22({
|
|
425011
425005
|
"node_modules/editorconfig/package.json"(exports22, module22) {
|
|
425012
425006
|
module22.exports = {
|
|
425013
425007
|
name: "editorconfig",
|
|
@@ -425209,7 +425203,7 @@ ${fromBody}`;
|
|
|
425209
425203
|
var fnmatch_1 = __importDefault22(require_fnmatch());
|
|
425210
425204
|
var ini_1 = require_ini();
|
|
425211
425205
|
exports22.parseString = ini_1.parseString;
|
|
425212
|
-
var package_json_1 = __importDefault22(
|
|
425206
|
+
var package_json_1 = __importDefault22(require_package3());
|
|
425213
425207
|
var knownProps = {
|
|
425214
425208
|
end_of_line: true,
|
|
425215
425209
|
indent_style: true,
|
|
@@ -444646,22 +444640,26 @@ var require_format_files = __commonJS({
|
|
|
444646
444640
|
"use strict";
|
|
444647
444641
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
444648
444642
|
exports2.formatFiles = formatFiles;
|
|
444643
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
444649
444644
|
var devkit_exports_1 = require("nx/src/devkit-exports");
|
|
444650
444645
|
var devkit_internals_1 = require("nx/src/devkit-internals");
|
|
444651
|
-
var path = require("path");
|
|
444646
|
+
var path = tslib_1.__importStar(require("path"));
|
|
444652
444647
|
async function formatFiles(tree, options = {}) {
|
|
444648
|
+
options.sortRootTsconfigPaths ??= process.env.NX_FORMAT_SORT_TSCONFIG_PATHS === "true";
|
|
444649
|
+
if (options.sortRootTsconfigPaths) {
|
|
444650
|
+
sortTsConfig(tree);
|
|
444651
|
+
}
|
|
444652
|
+
if (process.env.NX_SKIP_FORMAT === "true") {
|
|
444653
|
+
return;
|
|
444654
|
+
}
|
|
444653
444655
|
let prettier;
|
|
444654
444656
|
try {
|
|
444655
|
-
prettier = await Promise.resolve().then(() => require_prettier());
|
|
444657
|
+
prettier = await Promise.resolve().then(() => tslib_1.__importStar(require_prettier()));
|
|
444656
444658
|
if (!(0, devkit_internals_1.isUsingPrettierInTree)(tree)) {
|
|
444657
444659
|
return;
|
|
444658
444660
|
}
|
|
444659
444661
|
} catch {
|
|
444660
444662
|
}
|
|
444661
|
-
options.sortRootTsconfigPaths ??= process.env.NX_FORMAT_SORT_TSCONFIG_PATHS === "true";
|
|
444662
|
-
if (options.sortRootTsconfigPaths) {
|
|
444663
|
-
sortTsConfig(tree);
|
|
444664
|
-
}
|
|
444665
444663
|
if (!prettier)
|
|
444666
444664
|
return;
|
|
444667
444665
|
const files = new Set(tree.listChanges().filter((file) => file.type !== "DELETE"));
|
|
@@ -445017,16 +445015,18 @@ var require_binary_extensions = __commonJS({
|
|
|
445017
445015
|
}
|
|
445018
445016
|
});
|
|
445019
445017
|
|
|
445020
|
-
// node_modules/ejs/lib/utils.js
|
|
445018
|
+
// node_modules/ejs/lib/cjs/utils.js
|
|
445021
445019
|
var require_utils = __commonJS({
|
|
445022
|
-
"node_modules/ejs/lib/utils.js"(exports2) {
|
|
445020
|
+
"node_modules/ejs/lib/cjs/utils.js"(exports2, module2) {
|
|
445023
445021
|
"use strict";
|
|
445022
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
445023
|
+
var utils = {};
|
|
445024
445024
|
var regExpChars = /[|\\{}()[\]^$+*?.]/g;
|
|
445025
445025
|
var hasOwnProperty6 = Object.prototype.hasOwnProperty;
|
|
445026
445026
|
var hasOwn = function(obj, key) {
|
|
445027
445027
|
return hasOwnProperty6.apply(obj, [key]);
|
|
445028
445028
|
};
|
|
445029
|
-
|
|
445029
|
+
utils.escapeRegExpChars = function(string) {
|
|
445030
445030
|
if (!string) {
|
|
445031
445031
|
return "";
|
|
445032
445032
|
}
|
|
@@ -445055,7 +445055,7 @@ function encode_char(c) {
|
|
|
445055
445055
|
return _ENCODE_HTML_RULES[c] || c;
|
|
445056
445056
|
};
|
|
445057
445057
|
`;
|
|
445058
|
-
|
|
445058
|
+
utils.escapeXML = function(markup) {
|
|
445059
445059
|
return markup == void 0 ? "" : String(markup).replace(_MATCH_HTML, encode_char);
|
|
445060
445060
|
};
|
|
445061
445061
|
function escapeXMLToString() {
|
|
@@ -445063,14 +445063,14 @@ function encode_char(c) {
|
|
|
445063
445063
|
}
|
|
445064
445064
|
try {
|
|
445065
445065
|
if (typeof Object.defineProperty === "function") {
|
|
445066
|
-
Object.defineProperty(
|
|
445066
|
+
Object.defineProperty(utils.escapeXML, "toString", { value: escapeXMLToString });
|
|
445067
445067
|
} else {
|
|
445068
|
-
|
|
445068
|
+
utils.escapeXML.toString = escapeXMLToString;
|
|
445069
445069
|
}
|
|
445070
445070
|
} catch (err) {
|
|
445071
445071
|
console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
|
|
445072
445072
|
}
|
|
445073
|
-
|
|
445073
|
+
utils.shallowCopy = function(to, from) {
|
|
445074
445074
|
from = from || {};
|
|
445075
445075
|
if (to !== null && to !== void 0) {
|
|
445076
445076
|
for (var p in from) {
|
|
@@ -445085,7 +445085,7 @@ function encode_char(c) {
|
|
|
445085
445085
|
}
|
|
445086
445086
|
return to;
|
|
445087
445087
|
};
|
|
445088
|
-
|
|
445088
|
+
utils.shallowCopyFromList = function(to, from, list) {
|
|
445089
445089
|
list = list || [];
|
|
445090
445090
|
from = from || {};
|
|
445091
445091
|
if (to !== null && to !== void 0) {
|
|
@@ -445104,7 +445104,7 @@ function encode_char(c) {
|
|
|
445104
445104
|
}
|
|
445105
445105
|
return to;
|
|
445106
445106
|
};
|
|
445107
|
-
|
|
445107
|
+
utils.cache = {
|
|
445108
445108
|
_data: {},
|
|
445109
445109
|
set: function(key, val) {
|
|
445110
445110
|
this._data[key] = val;
|
|
@@ -445119,12 +445119,12 @@ function encode_char(c) {
|
|
|
445119
445119
|
this._data = {};
|
|
445120
445120
|
}
|
|
445121
445121
|
};
|
|
445122
|
-
|
|
445122
|
+
utils.hyphenToCamel = function(str) {
|
|
445123
445123
|
return str.replace(/-[a-z]/g, function(match) {
|
|
445124
445124
|
return match[1].toUpperCase();
|
|
445125
445125
|
});
|
|
445126
445126
|
};
|
|
445127
|
-
|
|
445127
|
+
utils.createNullProtoObjWherePossible = (function() {
|
|
445128
445128
|
if (typeof Object.create == "function") {
|
|
445129
445129
|
return function() {
|
|
445130
445130
|
return /* @__PURE__ */ Object.create(null);
|
|
@@ -445139,8 +445139,8 @@ function encode_char(c) {
|
|
|
445139
445139
|
return {};
|
|
445140
445140
|
};
|
|
445141
445141
|
})();
|
|
445142
|
-
|
|
445143
|
-
var o =
|
|
445142
|
+
utils.hasOwnOnlyObject = function(obj) {
|
|
445143
|
+
var o = utils.createNullProtoObjWherePossible();
|
|
445144
445144
|
for (var p in obj) {
|
|
445145
445145
|
if (hasOwn(obj, p)) {
|
|
445146
445146
|
o[p] = obj[p];
|
|
@@ -445148,71 +445148,30 @@ function encode_char(c) {
|
|
|
445148
445148
|
}
|
|
445149
445149
|
return o;
|
|
445150
445150
|
};
|
|
445151
|
+
if (typeof exports2 != "undefined") {
|
|
445152
|
+
module2.exports = utils;
|
|
445153
|
+
}
|
|
445154
|
+
exports2.default = utils;
|
|
445151
445155
|
}
|
|
445152
445156
|
});
|
|
445153
445157
|
|
|
445154
|
-
// node_modules/ejs/
|
|
445155
|
-
var require_package2 = __commonJS({
|
|
445156
|
-
"node_modules/ejs/package.json"(exports2, module2) {
|
|
445157
|
-
module2.exports = {
|
|
445158
|
-
name: "ejs",
|
|
445159
|
-
description: "Embedded JavaScript templates",
|
|
445160
|
-
keywords: [
|
|
445161
|
-
"template",
|
|
445162
|
-
"engine",
|
|
445163
|
-
"ejs"
|
|
445164
|
-
],
|
|
445165
|
-
version: "3.1.10",
|
|
445166
|
-
author: "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
|
|
445167
|
-
license: "Apache-2.0",
|
|
445168
|
-
bin: {
|
|
445169
|
-
ejs: "./bin/cli.js"
|
|
445170
|
-
},
|
|
445171
|
-
main: "./lib/ejs.js",
|
|
445172
|
-
jsdelivr: "ejs.min.js",
|
|
445173
|
-
unpkg: "ejs.min.js",
|
|
445174
|
-
repository: {
|
|
445175
|
-
type: "git",
|
|
445176
|
-
url: "git://github.com/mde/ejs.git"
|
|
445177
|
-
},
|
|
445178
|
-
bugs: "https://github.com/mde/ejs/issues",
|
|
445179
|
-
homepage: "https://github.com/mde/ejs",
|
|
445180
|
-
dependencies: {
|
|
445181
|
-
jake: "^10.8.5"
|
|
445182
|
-
},
|
|
445183
|
-
devDependencies: {
|
|
445184
|
-
browserify: "^16.5.1",
|
|
445185
|
-
eslint: "^6.8.0",
|
|
445186
|
-
"git-directory-deploy": "^1.5.1",
|
|
445187
|
-
jsdoc: "^4.0.2",
|
|
445188
|
-
"lru-cache": "^4.0.1",
|
|
445189
|
-
mocha: "^10.2.0",
|
|
445190
|
-
"uglify-js": "^3.3.16"
|
|
445191
|
-
},
|
|
445192
|
-
engines: {
|
|
445193
|
-
node: ">=0.10.0"
|
|
445194
|
-
},
|
|
445195
|
-
scripts: {
|
|
445196
|
-
test: "npx jake test"
|
|
445197
|
-
}
|
|
445198
|
-
};
|
|
445199
|
-
}
|
|
445200
|
-
});
|
|
445201
|
-
|
|
445202
|
-
// node_modules/ejs/lib/ejs.js
|
|
445158
|
+
// node_modules/ejs/lib/cjs/ejs.js
|
|
445203
445159
|
var require_ejs = __commonJS({
|
|
445204
|
-
"node_modules/ejs/lib/ejs.js"(exports2) {
|
|
445160
|
+
"node_modules/ejs/lib/cjs/ejs.js"(exports2, module2) {
|
|
445205
445161
|
"use strict";
|
|
445206
|
-
var
|
|
445207
|
-
|
|
445208
|
-
|
|
445209
|
-
|
|
445210
|
-
var
|
|
445162
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
445163
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
445164
|
+
};
|
|
445165
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
445166
|
+
var fs_1 = __importDefault2(require("fs"));
|
|
445167
|
+
var path_1 = __importDefault2(require("path"));
|
|
445168
|
+
var utils_js_1 = __importDefault2(require_utils());
|
|
445169
|
+
var DECLARATION_KEYWORD = "var";
|
|
445170
|
+
var ejs = {};
|
|
445211
445171
|
var _DEFAULT_OPEN_DELIMITER = "<";
|
|
445212
445172
|
var _DEFAULT_CLOSE_DELIMITER = ">";
|
|
445213
445173
|
var _DEFAULT_DELIMITER = "%";
|
|
445214
445174
|
var _DEFAULT_LOCALS_NAME = "locals";
|
|
445215
|
-
var _NAME = "ejs";
|
|
445216
445175
|
var _REGEX_STRING = "(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)";
|
|
445217
445176
|
var _OPTS_PASSABLE_WITH_DATA = [
|
|
445218
445177
|
"delimiter",
|
|
@@ -445220,7 +445179,6 @@ var require_ejs = __commonJS({
|
|
|
445220
445179
|
"context",
|
|
445221
445180
|
"debug",
|
|
445222
445181
|
"compileDebug",
|
|
445223
|
-
"client",
|
|
445224
445182
|
"_with",
|
|
445225
445183
|
"rmWhitespace",
|
|
445226
445184
|
"strict",
|
|
@@ -445230,14 +445188,14 @@ var require_ejs = __commonJS({
|
|
|
445230
445188
|
var _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat("cache");
|
|
445231
445189
|
var _BOM = /^\uFEFF/;
|
|
445232
445190
|
var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
445233
|
-
|
|
445234
|
-
|
|
445235
|
-
|
|
445236
|
-
|
|
445237
|
-
|
|
445238
|
-
var dirname =
|
|
445239
|
-
var extname =
|
|
445240
|
-
var resolve =
|
|
445191
|
+
ejs.cache = utils_js_1.default.cache;
|
|
445192
|
+
ejs.fileLoader = fs_1.default.readFileSync;
|
|
445193
|
+
ejs.localsName = _DEFAULT_LOCALS_NAME;
|
|
445194
|
+
ejs.promiseImpl = new Function("return this;")().Promise;
|
|
445195
|
+
ejs.resolveInclude = function(name, filename, isDir) {
|
|
445196
|
+
var dirname = path_1.default.dirname;
|
|
445197
|
+
var extname = path_1.default.extname;
|
|
445198
|
+
var resolve = path_1.default.resolve;
|
|
445241
445199
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
|
445242
445200
|
var ext = extname(name);
|
|
445243
445201
|
if (!ext) {
|
|
@@ -445248,36 +445206,36 @@ var require_ejs = __commonJS({
|
|
|
445248
445206
|
function resolvePaths(name, paths) {
|
|
445249
445207
|
var filePath;
|
|
445250
445208
|
if (paths.some(function(v) {
|
|
445251
|
-
filePath =
|
|
445252
|
-
return
|
|
445209
|
+
filePath = ejs.resolveInclude(name, v, true);
|
|
445210
|
+
return fs_1.default.existsSync(filePath);
|
|
445253
445211
|
})) {
|
|
445254
445212
|
return filePath;
|
|
445255
445213
|
}
|
|
445256
445214
|
}
|
|
445257
|
-
function getIncludePath(
|
|
445215
|
+
function getIncludePath(path, options) {
|
|
445258
445216
|
var includePath;
|
|
445259
445217
|
var filePath;
|
|
445260
445218
|
var views = options.views;
|
|
445261
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(
|
|
445219
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path);
|
|
445262
445220
|
if (match && match.length) {
|
|
445263
|
-
|
|
445221
|
+
path = path.replace(/^\/*/, "");
|
|
445264
445222
|
if (Array.isArray(options.root)) {
|
|
445265
|
-
includePath = resolvePaths(
|
|
445223
|
+
includePath = resolvePaths(path, options.root);
|
|
445266
445224
|
} else {
|
|
445267
|
-
includePath =
|
|
445225
|
+
includePath = ejs.resolveInclude(path, options.root || "/", true);
|
|
445268
445226
|
}
|
|
445269
445227
|
} else {
|
|
445270
445228
|
if (options.filename) {
|
|
445271
|
-
filePath =
|
|
445272
|
-
if (
|
|
445229
|
+
filePath = ejs.resolveInclude(path, options.filename);
|
|
445230
|
+
if (fs_1.default.existsSync(filePath)) {
|
|
445273
445231
|
includePath = filePath;
|
|
445274
445232
|
}
|
|
445275
445233
|
}
|
|
445276
445234
|
if (!includePath && Array.isArray(views)) {
|
|
445277
|
-
includePath = resolvePaths(
|
|
445235
|
+
includePath = resolvePaths(path, views);
|
|
445278
445236
|
}
|
|
445279
445237
|
if (!includePath && typeof options.includer !== "function") {
|
|
445280
|
-
throw new Error('Could not find the include file "' + options.escapeFunction(
|
|
445238
|
+
throw new Error('Could not find the include file "' + options.escapeFunction(path) + '"');
|
|
445281
445239
|
}
|
|
445282
445240
|
}
|
|
445283
445241
|
return includePath;
|
|
@@ -445290,7 +445248,7 @@ var require_ejs = __commonJS({
|
|
|
445290
445248
|
if (!filename) {
|
|
445291
445249
|
throw new Error("cache option requires a filename");
|
|
445292
445250
|
}
|
|
445293
|
-
func =
|
|
445251
|
+
func = ejs.cache.get(filename);
|
|
445294
445252
|
if (func) {
|
|
445295
445253
|
return func;
|
|
445296
445254
|
}
|
|
@@ -445303,17 +445261,17 @@ var require_ejs = __commonJS({
|
|
|
445303
445261
|
}
|
|
445304
445262
|
template3 = fileLoader(filename).toString().replace(_BOM, "");
|
|
445305
445263
|
}
|
|
445306
|
-
func =
|
|
445264
|
+
func = ejs.compile(template3, options);
|
|
445307
445265
|
if (options.cache) {
|
|
445308
|
-
|
|
445266
|
+
ejs.cache.set(filename, func);
|
|
445309
445267
|
}
|
|
445310
445268
|
return func;
|
|
445311
445269
|
}
|
|
445312
445270
|
function tryHandleCache(options, data, cb) {
|
|
445313
445271
|
var result;
|
|
445314
445272
|
if (!cb) {
|
|
445315
|
-
if (typeof
|
|
445316
|
-
return new
|
|
445273
|
+
if (typeof ejs.promiseImpl == "function") {
|
|
445274
|
+
return new ejs.promiseImpl(function(resolve, reject) {
|
|
445317
445275
|
try {
|
|
445318
445276
|
result = handleCache(options)(data);
|
|
445319
445277
|
resolve(result);
|
|
@@ -445334,13 +445292,13 @@ var require_ejs = __commonJS({
|
|
|
445334
445292
|
}
|
|
445335
445293
|
}
|
|
445336
445294
|
function fileLoader(filePath) {
|
|
445337
|
-
return
|
|
445295
|
+
return ejs.fileLoader(filePath);
|
|
445338
445296
|
}
|
|
445339
|
-
function includeFile(
|
|
445340
|
-
var opts =
|
|
445341
|
-
opts.filename = getIncludePath(
|
|
445297
|
+
function includeFile(path, options) {
|
|
445298
|
+
var opts = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), options);
|
|
445299
|
+
opts.filename = getIncludePath(path, opts);
|
|
445342
445300
|
if (typeof options.includer === "function") {
|
|
445343
|
-
var includerResult = options.includer(
|
|
445301
|
+
var includerResult = options.includer(path, opts.filename);
|
|
445344
445302
|
if (includerResult) {
|
|
445345
445303
|
if (includerResult.filename) {
|
|
445346
445304
|
opts.filename = includerResult.filename;
|
|
@@ -445368,13 +445326,10 @@ var require_ejs = __commonJS({
|
|
|
445368
445326
|
function stripSemi(str) {
|
|
445369
445327
|
return str.replace(/;(\s*$)/, "$1");
|
|
445370
445328
|
}
|
|
445371
|
-
|
|
445329
|
+
ejs.compile = function compile(template3, opts) {
|
|
445372
445330
|
var templ;
|
|
445373
445331
|
if (opts && opts.scope) {
|
|
445374
|
-
|
|
445375
|
-
console.warn("`scope` option is deprecated and will be removed in EJS 3");
|
|
445376
|
-
scopeOptionWarned = true;
|
|
445377
|
-
}
|
|
445332
|
+
console.warn("`scope` option is deprecated and will be removed in future EJS");
|
|
445378
445333
|
if (!opts.context) {
|
|
445379
445334
|
opts.context = opts.scope;
|
|
445380
445335
|
}
|
|
@@ -445383,15 +445338,15 @@ var require_ejs = __commonJS({
|
|
|
445383
445338
|
templ = new Template(template3, opts);
|
|
445384
445339
|
return templ.compile();
|
|
445385
445340
|
};
|
|
445386
|
-
|
|
445387
|
-
var data = d ||
|
|
445388
|
-
var opts = o ||
|
|
445341
|
+
ejs.render = function(template3, d, o) {
|
|
445342
|
+
var data = d || utils_js_1.default.createNullProtoObjWherePossible();
|
|
445343
|
+
var opts = o || utils_js_1.default.createNullProtoObjWherePossible();
|
|
445389
445344
|
if (arguments.length == 2) {
|
|
445390
|
-
|
|
445345
|
+
utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
|
|
445391
445346
|
}
|
|
445392
445347
|
return handleCache(opts, template3)(data);
|
|
445393
445348
|
};
|
|
445394
|
-
|
|
445349
|
+
ejs.renderFile = function() {
|
|
445395
445350
|
var args = Array.prototype.slice.call(arguments);
|
|
445396
445351
|
var filename = args.shift();
|
|
445397
445352
|
var cb;
|
|
@@ -445404,7 +445359,7 @@ var require_ejs = __commonJS({
|
|
|
445404
445359
|
if (args.length) {
|
|
445405
445360
|
data = args.shift();
|
|
445406
445361
|
if (args.length) {
|
|
445407
|
-
|
|
445362
|
+
utils_js_1.default.shallowCopy(opts, args.pop());
|
|
445408
445363
|
} else {
|
|
445409
445364
|
if (data.settings) {
|
|
445410
445365
|
if (data.settings.views) {
|
|
@@ -445415,37 +445370,36 @@ var require_ejs = __commonJS({
|
|
|
445415
445370
|
}
|
|
445416
445371
|
viewOpts = data.settings["view options"];
|
|
445417
445372
|
if (viewOpts) {
|
|
445418
|
-
|
|
445373
|
+
utils_js_1.default.shallowCopy(opts, viewOpts);
|
|
445419
445374
|
}
|
|
445420
445375
|
}
|
|
445421
|
-
|
|
445376
|
+
utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);
|
|
445422
445377
|
}
|
|
445423
445378
|
opts.filename = filename;
|
|
445424
445379
|
} else {
|
|
445425
|
-
data =
|
|
445380
|
+
data = utils_js_1.default.createNullProtoObjWherePossible();
|
|
445426
445381
|
}
|
|
445427
445382
|
return tryHandleCache(opts, data, cb);
|
|
445428
445383
|
};
|
|
445429
|
-
|
|
445430
|
-
|
|
445431
|
-
|
|
445384
|
+
ejs.Template = Template;
|
|
445385
|
+
ejs.clearCache = function() {
|
|
445386
|
+
ejs.cache.reset();
|
|
445432
445387
|
};
|
|
445433
445388
|
function Template(text, optsParam) {
|
|
445434
|
-
var opts =
|
|
445435
|
-
var options =
|
|
445389
|
+
var opts = utils_js_1.default.hasOwnOnlyObject(optsParam);
|
|
445390
|
+
var options = utils_js_1.default.createNullProtoObjWherePossible();
|
|
445436
445391
|
this.templateText = text;
|
|
445437
445392
|
this.mode = null;
|
|
445438
445393
|
this.truncate = false;
|
|
445439
445394
|
this.currentLine = 1;
|
|
445440
445395
|
this.source = "";
|
|
445441
|
-
options.
|
|
445442
|
-
options.escapeFunction = opts.escape || opts.escapeFunction || utils.escapeXML;
|
|
445396
|
+
options.escapeFunction = opts.escape || opts.escapeFunction || utils_js_1.default.escapeXML;
|
|
445443
445397
|
options.compileDebug = opts.compileDebug !== false;
|
|
445444
445398
|
options.debug = !!opts.debug;
|
|
445445
445399
|
options.filename = opts.filename;
|
|
445446
|
-
options.openDelimiter = opts.openDelimiter ||
|
|
445447
|
-
options.closeDelimiter = opts.closeDelimiter ||
|
|
445448
|
-
options.delimiter = opts.delimiter ||
|
|
445400
|
+
options.openDelimiter = opts.openDelimiter || ejs.openDelimiter || _DEFAULT_OPEN_DELIMITER;
|
|
445401
|
+
options.closeDelimiter = opts.closeDelimiter || ejs.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;
|
|
445402
|
+
options.delimiter = opts.delimiter || ejs.delimiter || _DEFAULT_DELIMITER;
|
|
445449
445403
|
options.strict = opts.strict || false;
|
|
445450
445404
|
options.context = opts.context;
|
|
445451
445405
|
options.cache = opts.cache || false;
|
|
@@ -445453,7 +445407,7 @@ var require_ejs = __commonJS({
|
|
|
445453
445407
|
options.root = opts.root;
|
|
445454
445408
|
options.includer = opts.includer;
|
|
445455
445409
|
options.outputFunctionName = opts.outputFunctionName;
|
|
445456
|
-
options.localsName = opts.localsName ||
|
|
445410
|
+
options.localsName = opts.localsName || ejs.localsName || _DEFAULT_LOCALS_NAME;
|
|
445457
445411
|
options.views = opts.views;
|
|
445458
445412
|
options.async = opts.async;
|
|
445459
445413
|
options.destructuredLocals = opts.destructuredLocals;
|
|
@@ -445476,9 +445430,9 @@ var require_ejs = __commonJS({
|
|
|
445476
445430
|
Template.prototype = {
|
|
445477
445431
|
createRegex: function() {
|
|
445478
445432
|
var str = _REGEX_STRING;
|
|
445479
|
-
var delim =
|
|
445480
|
-
var open =
|
|
445481
|
-
var close =
|
|
445433
|
+
var delim = utils_js_1.default.escapeRegExpChars(this.opts.delimiter);
|
|
445434
|
+
var open = utils_js_1.default.escapeRegExpChars(this.opts.openDelimiter);
|
|
445435
|
+
var close = utils_js_1.default.escapeRegExpChars(this.opts.closeDelimiter);
|
|
445482
445436
|
str = str.replace(/%/g, delim).replace(/</g, open).replace(/>/g, close);
|
|
445483
445437
|
return new RegExp(str);
|
|
445484
445438
|
},
|
|
@@ -445493,27 +445447,27 @@ var require_ejs = __commonJS({
|
|
|
445493
445447
|
var sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : "undefined";
|
|
445494
445448
|
if (!this.source) {
|
|
445495
445449
|
this.generateSource();
|
|
445496
|
-
prepended +=
|
|
445450
|
+
prepended += " ".concat(DECLARATION_KEYWORD, ' __output = "";\n') + " function __append(s) { if (s !== undefined && s !== null) __output += s }\n";
|
|
445497
445451
|
if (opts.outputFunctionName) {
|
|
445498
445452
|
if (!_JS_IDENTIFIER.test(opts.outputFunctionName)) {
|
|
445499
445453
|
throw new Error("outputFunctionName is not a valid JS identifier.");
|
|
445500
445454
|
}
|
|
445501
|
-
prepended += "
|
|
445455
|
+
prepended += " ".concat(DECLARATION_KEYWORD, " ") + opts.outputFunctionName + " = __append;\n";
|
|
445502
445456
|
}
|
|
445503
445457
|
if (opts.localsName && !_JS_IDENTIFIER.test(opts.localsName)) {
|
|
445504
445458
|
throw new Error("localsName is not a valid JS identifier.");
|
|
445505
445459
|
}
|
|
445506
445460
|
if (opts.destructuredLocals && opts.destructuredLocals.length) {
|
|
445507
|
-
var destructuring = "
|
|
445461
|
+
var destructuring = " ".concat(DECLARATION_KEYWORD, " __locals = (") + opts.localsName + " || {}),\n";
|
|
445508
445462
|
for (var i = 0; i < opts.destructuredLocals.length; i++) {
|
|
445509
|
-
var
|
|
445510
|
-
if (!_JS_IDENTIFIER.test(
|
|
445463
|
+
var name_1 = opts.destructuredLocals[i];
|
|
445464
|
+
if (!_JS_IDENTIFIER.test(name_1)) {
|
|
445511
445465
|
throw new Error("destructuredLocals[" + i + "] is not a valid JS identifier.");
|
|
445512
445466
|
}
|
|
445513
445467
|
if (i > 0) {
|
|
445514
445468
|
destructuring += ",\n ";
|
|
445515
445469
|
}
|
|
445516
|
-
destructuring +=
|
|
445470
|
+
destructuring += name_1 + " = __locals." + name_1;
|
|
445517
445471
|
}
|
|
445518
445472
|
prepended += destructuring + ";\n";
|
|
445519
445473
|
}
|
|
@@ -445525,16 +445479,10 @@ var require_ejs = __commonJS({
|
|
|
445525
445479
|
this.source = prepended + this.source + appended;
|
|
445526
445480
|
}
|
|
445527
445481
|
if (opts.compileDebug) {
|
|
445528
|
-
src = "
|
|
445482
|
+
src = "".concat(DECLARATION_KEYWORD, " __line = 1") + "\n , __lines = " + JSON.stringify(this.templateText) + "\n , __filename = " + sanitizedFilename + ";\ntry {\n" + this.source + "} catch (e) {\n rethrow(e, __lines, __filename, __line, escapeFn);\n}\n";
|
|
445529
445483
|
} else {
|
|
445530
445484
|
src = this.source;
|
|
445531
445485
|
}
|
|
445532
|
-
if (opts.client) {
|
|
445533
|
-
src = "escapeFn = escapeFn || " + escapeFn.toString() + ";\n" + src;
|
|
445534
|
-
if (opts.compileDebug) {
|
|
445535
|
-
src = "rethrow = rethrow || " + rethrow.toString() + ";\n" + src;
|
|
445536
|
-
}
|
|
445537
|
-
}
|
|
445538
445486
|
if (opts.strict) {
|
|
445539
445487
|
src = '"use strict";\n' + src;
|
|
445540
445488
|
}
|
|
@@ -445574,22 +445522,19 @@ var require_ejs = __commonJS({
|
|
|
445574
445522
|
}
|
|
445575
445523
|
throw e;
|
|
445576
445524
|
}
|
|
445577
|
-
var returnedFn =
|
|
445578
|
-
var include = function(
|
|
445579
|
-
var d =
|
|
445525
|
+
var returnedFn = function anonymous(data) {
|
|
445526
|
+
var include = function(path, includeData) {
|
|
445527
|
+
var d = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), data);
|
|
445580
445528
|
if (includeData) {
|
|
445581
|
-
d =
|
|
445529
|
+
d = utils_js_1.default.shallowCopy(d, includeData);
|
|
445582
445530
|
}
|
|
445583
|
-
return includeFile(
|
|
445531
|
+
return includeFile(path, opts)(d);
|
|
445584
445532
|
};
|
|
445585
|
-
return fn.apply(
|
|
445586
|
-
opts.context,
|
|
445587
|
-
[data || utils.createNullProtoObjWherePossible(), escapeFn, include, rethrow]
|
|
445588
|
-
);
|
|
445533
|
+
return fn.apply(opts.context, [data || utils_js_1.default.createNullProtoObjWherePossible(), escapeFn, include, rethrow]);
|
|
445589
445534
|
};
|
|
445590
445535
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
445591
445536
|
var filename = opts.filename;
|
|
445592
|
-
var basename =
|
|
445537
|
+
var basename = path_1.default.basename(filename, path_1.default.extname(filename));
|
|
445593
445538
|
try {
|
|
445594
445539
|
Object.defineProperty(returnedFn, "name", {
|
|
445595
445540
|
value: basename,
|
|
@@ -445607,12 +445552,16 @@ var require_ejs = __commonJS({
|
|
|
445607
445552
|
if (opts.rmWhitespace) {
|
|
445608
445553
|
this.templateText = this.templateText.replace(/[\r\n]+/g, "\n").replace(/^\s+|\s+$/gm, "");
|
|
445609
445554
|
}
|
|
445610
|
-
this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
|
|
445611
445555
|
var self2 = this;
|
|
445612
|
-
var matches = this.parseTemplateText();
|
|
445613
445556
|
var d = this.opts.delimiter;
|
|
445614
445557
|
var o = this.opts.openDelimiter;
|
|
445615
445558
|
var c = this.opts.closeDelimiter;
|
|
445559
|
+
var openWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars(o + d + "_");
|
|
445560
|
+
var closeWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars("_" + d + c);
|
|
445561
|
+
var openWhitespaceSlurpReplacement = o + d + "_";
|
|
445562
|
+
var closeWhitespaceSlurpReplacement = "_" + d + c;
|
|
445563
|
+
this.templateText = this.templateText.replace(new RegExp("[ \\t]*" + openWhitespaceSlurpTag, "gm"), openWhitespaceSlurpReplacement).replace(new RegExp(closeWhitespaceSlurpTag + "[ \\t]*", "gm"), closeWhitespaceSlurpReplacement);
|
|
445564
|
+
var matches = this.parseTemplateText();
|
|
445616
445565
|
if (matches && matches.length) {
|
|
445617
445566
|
matches.forEach(function(line, index) {
|
|
445618
445567
|
var closing;
|
|
@@ -445739,13 +445688,15 @@ var require_ejs = __commonJS({
|
|
|
445739
445688
|
}
|
|
445740
445689
|
}
|
|
445741
445690
|
};
|
|
445742
|
-
|
|
445743
|
-
|
|
445744
|
-
exports2.VERSION = _VERSION_STRING;
|
|
445745
|
-
exports2.name = _NAME;
|
|
445691
|
+
ejs.escapeXML = utils_js_1.default.escapeXML;
|
|
445692
|
+
ejs.__express = ejs.renderFile;
|
|
445746
445693
|
if (typeof window != "undefined") {
|
|
445747
|
-
window.ejs =
|
|
445694
|
+
window.ejs = ejs;
|
|
445748
445695
|
}
|
|
445696
|
+
if (typeof module2 != "undefined") {
|
|
445697
|
+
module2.exports = ejs;
|
|
445698
|
+
}
|
|
445699
|
+
exports2.default = ejs;
|
|
445749
445700
|
}
|
|
445750
445701
|
});
|
|
445751
445702
|
|
|
@@ -445756,8 +445707,9 @@ var require_generate_files = __commonJS({
|
|
|
445756
445707
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
445757
445708
|
exports2.OverwriteStrategy = void 0;
|
|
445758
445709
|
exports2.generateFiles = generateFiles;
|
|
445710
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
445759
445711
|
var fs_1 = require("fs");
|
|
445760
|
-
var path = require("path");
|
|
445712
|
+
var path = tslib_1.__importStar(require("path"));
|
|
445761
445713
|
var binary_extensions_1 = require_binary_extensions();
|
|
445762
445714
|
var devkit_exports_1 = require("nx/src/devkit-exports");
|
|
445763
445715
|
var OverwriteStrategy;
|
|
@@ -446029,6 +445981,18 @@ var require_semver = __commonJS({
|
|
|
446029
445981
|
var { safeRe: re, t } = require_re();
|
|
446030
445982
|
var parseOptions = require_parse_options();
|
|
446031
445983
|
var { compareIdentifiers } = require_identifiers();
|
|
445984
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
445985
|
+
const identifiers = identifier.split(".");
|
|
445986
|
+
if (identifiers.length > prerelease.length) {
|
|
445987
|
+
return false;
|
|
445988
|
+
}
|
|
445989
|
+
for (let i = 0; i < identifiers.length; i++) {
|
|
445990
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
445991
|
+
return false;
|
|
445992
|
+
}
|
|
445993
|
+
}
|
|
445994
|
+
return true;
|
|
445995
|
+
};
|
|
446032
445996
|
var SemVer = class _SemVer {
|
|
446033
445997
|
constructor(version, options) {
|
|
446034
445998
|
options = parseOptions(options);
|
|
@@ -446275,8 +446239,9 @@ var require_semver = __commonJS({
|
|
|
446275
446239
|
if (identifierBase === false) {
|
|
446276
446240
|
prerelease = [identifier];
|
|
446277
446241
|
}
|
|
446278
|
-
if (
|
|
446279
|
-
|
|
446242
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
446243
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
446244
|
+
if (isNaN(prereleaseBase)) {
|
|
446280
446245
|
this.prerelease = prerelease;
|
|
446281
446246
|
}
|
|
446282
446247
|
} else {
|
|
@@ -446678,6 +446643,47 @@ var require_coerce = __commonJS({
|
|
|
446678
446643
|
}
|
|
446679
446644
|
});
|
|
446680
446645
|
|
|
446646
|
+
// node_modules/@nx/devkit/node_modules/semver/functions/truncate.js
|
|
446647
|
+
var require_truncate = __commonJS({
|
|
446648
|
+
"node_modules/@nx/devkit/node_modules/semver/functions/truncate.js"(exports2, module2) {
|
|
446649
|
+
"use strict";
|
|
446650
|
+
var parse2 = require_parse();
|
|
446651
|
+
var constants = require_constants();
|
|
446652
|
+
var SemVer = require_semver();
|
|
446653
|
+
var truncate = (version, truncation, options) => {
|
|
446654
|
+
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
|
446655
|
+
return null;
|
|
446656
|
+
}
|
|
446657
|
+
const clonedVersion = cloneInputVersion(version, options);
|
|
446658
|
+
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
446659
|
+
};
|
|
446660
|
+
var cloneInputVersion = (version, options) => {
|
|
446661
|
+
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
446662
|
+
return parse2(versionStringToParse, options);
|
|
446663
|
+
};
|
|
446664
|
+
var doTruncation = (version, truncation) => {
|
|
446665
|
+
if (isPrerelease(truncation)) {
|
|
446666
|
+
return version.version;
|
|
446667
|
+
}
|
|
446668
|
+
version.prerelease = [];
|
|
446669
|
+
switch (truncation) {
|
|
446670
|
+
case "major":
|
|
446671
|
+
version.minor = 0;
|
|
446672
|
+
version.patch = 0;
|
|
446673
|
+
break;
|
|
446674
|
+
case "minor":
|
|
446675
|
+
version.patch = 0;
|
|
446676
|
+
break;
|
|
446677
|
+
}
|
|
446678
|
+
return version.format();
|
|
446679
|
+
};
|
|
446680
|
+
var isPrerelease = (type) => {
|
|
446681
|
+
return type.startsWith("pre");
|
|
446682
|
+
};
|
|
446683
|
+
module2.exports = truncate;
|
|
446684
|
+
}
|
|
446685
|
+
});
|
|
446686
|
+
|
|
446681
446687
|
// node_modules/@nx/devkit/node_modules/semver/internal/lrucache.js
|
|
446682
446688
|
var require_lrucache = __commonJS({
|
|
446683
446689
|
"node_modules/@nx/devkit/node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
@@ -446786,6 +446792,7 @@ var require_range2 = __commonJS({
|
|
|
446786
446792
|
return this.range;
|
|
446787
446793
|
}
|
|
446788
446794
|
parseRange(range) {
|
|
446795
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
446789
446796
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
446790
446797
|
const memoKey = memoOpts + ":" + range;
|
|
446791
446798
|
const cached = cache.get(memoKey);
|
|
@@ -446868,12 +446875,14 @@ var require_range2 = __commonJS({
|
|
|
446868
446875
|
var SemVer = require_semver();
|
|
446869
446876
|
var {
|
|
446870
446877
|
safeRe: re,
|
|
446878
|
+
src,
|
|
446871
446879
|
t,
|
|
446872
446880
|
comparatorTrimReplace,
|
|
446873
446881
|
tildeTrimReplace,
|
|
446874
446882
|
caretTrimReplace
|
|
446875
446883
|
} = require_re();
|
|
446876
446884
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
446885
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
446877
446886
|
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
446878
446887
|
var isAny = (c) => c.value === "";
|
|
446879
446888
|
var isSatisfiable = (comparators, options) => {
|
|
@@ -446902,20 +446911,22 @@ var require_range2 = __commonJS({
|
|
|
446902
446911
|
return comp;
|
|
446903
446912
|
};
|
|
446904
446913
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
446914
|
+
var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
446905
446915
|
var replaceTildes = (comp, options) => {
|
|
446906
446916
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
446907
446917
|
};
|
|
446908
446918
|
var replaceTilde = (comp, options) => {
|
|
446909
446919
|
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
446920
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
446910
446921
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
446911
446922
|
debug("tilde", comp, _, M, m, p, pr);
|
|
446912
446923
|
let ret;
|
|
446913
446924
|
if (isX(M)) {
|
|
446914
446925
|
ret = "";
|
|
446915
446926
|
} else if (isX(m)) {
|
|
446916
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
446927
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
446917
446928
|
} else if (isX(p)) {
|
|
446918
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
446929
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
446919
446930
|
} else if (pr) {
|
|
446920
446931
|
debug("replaceTilde pr", pr);
|
|
446921
446932
|
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
@@ -446961,9 +446972,9 @@ var require_range2 = __commonJS({
|
|
|
446961
446972
|
debug("no pr");
|
|
446962
446973
|
if (M === "0") {
|
|
446963
446974
|
if (m === "0") {
|
|
446964
|
-
ret = `>=${M}.${m}.${p}
|
|
446975
|
+
ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
446965
446976
|
} else {
|
|
446966
|
-
ret = `>=${M}.${m}.${p}
|
|
446977
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
446967
446978
|
}
|
|
446968
446979
|
} else {
|
|
446969
446980
|
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
@@ -446982,6 +446993,9 @@ var require_range2 = __commonJS({
|
|
|
446982
446993
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
446983
446994
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
446984
446995
|
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
446996
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
446997
|
+
return comp;
|
|
446998
|
+
}
|
|
446985
446999
|
const xM = isX(M);
|
|
446986
447000
|
const xm = xM || isX(m);
|
|
446987
447001
|
const xp = xm || isX(p);
|
|
@@ -447629,7 +447643,7 @@ var require_subset = __commonJS({
|
|
|
447629
447643
|
if (higher === c && higher !== gt) {
|
|
447630
447644
|
return false;
|
|
447631
447645
|
}
|
|
447632
|
-
} else if (gt.operator === ">=" && !
|
|
447646
|
+
} else if (gt.operator === ">=" && !c.test(gt.semver)) {
|
|
447633
447647
|
return false;
|
|
447634
447648
|
}
|
|
447635
447649
|
}
|
|
@@ -447644,7 +447658,7 @@ var require_subset = __commonJS({
|
|
|
447644
447658
|
if (lower === c && lower !== lt) {
|
|
447645
447659
|
return false;
|
|
447646
447660
|
}
|
|
447647
|
-
} else if (lt.operator === "<=" && !
|
|
447661
|
+
} else if (lt.operator === "<=" && !c.test(lt.semver)) {
|
|
447648
447662
|
return false;
|
|
447649
447663
|
}
|
|
447650
447664
|
}
|
|
@@ -447712,6 +447726,7 @@ var require_semver2 = __commonJS({
|
|
|
447712
447726
|
var lte = require_lte();
|
|
447713
447727
|
var cmp = require_cmp();
|
|
447714
447728
|
var coerce = require_coerce();
|
|
447729
|
+
var truncate = require_truncate();
|
|
447715
447730
|
var Comparator = require_comparator();
|
|
447716
447731
|
var Range = require_range2();
|
|
447717
447732
|
var satisfies = require_satisfies();
|
|
@@ -447750,6 +447765,7 @@ var require_semver2 = __commonJS({
|
|
|
447750
447765
|
lte,
|
|
447751
447766
|
cmp,
|
|
447752
447767
|
coerce,
|
|
447768
|
+
truncate,
|
|
447753
447769
|
Comparator,
|
|
447754
447770
|
Range,
|
|
447755
447771
|
satisfies,
|
|
@@ -447785,19 +447801,23 @@ var require_install_packages_task = __commonJS({
|
|
|
447785
447801
|
var child_process_1 = require("child_process");
|
|
447786
447802
|
var path_1 = require("path");
|
|
447787
447803
|
var devkit_exports_1 = require("nx/src/devkit-exports");
|
|
447788
|
-
function installPackagesTask(tree,
|
|
447789
|
-
|
|
447804
|
+
function installPackagesTask(tree, ensureInstall = false, cwd = "", packageManager = (0, devkit_exports_1.detectPackageManager)((0, path_1.join)(tree.root, cwd))) {
|
|
447805
|
+
const packageJsonPath = (0, devkit_exports_1.joinPathFragments)(cwd, "package.json");
|
|
447806
|
+
const packageJsonChanged = tree.listChanges().some((f) => f.path === packageJsonPath);
|
|
447807
|
+
if (!packageJsonChanged && !ensureInstall) {
|
|
447790
447808
|
return;
|
|
447791
447809
|
}
|
|
447792
|
-
const packageJsonValue = tree.read(
|
|
447793
|
-
|
|
447794
|
-
|
|
447810
|
+
const packageJsonValue = tree.read(packageJsonPath, "utf-8");
|
|
447811
|
+
const storedPackageJsonValue = global["__packageJsonInstallCache__"];
|
|
447812
|
+
const installAlreadyRan = storedPackageJsonValue != null;
|
|
447813
|
+
const packageJsonDiffers = storedPackageJsonValue != packageJsonValue;
|
|
447814
|
+
if (packageJsonDiffers || ensureInstall && !installAlreadyRan) {
|
|
447795
447815
|
global["__packageJsonInstallCache__"] = packageJsonValue;
|
|
447796
447816
|
const pmc = (0, devkit_exports_1.getPackageManagerCommand)(packageManager);
|
|
447797
447817
|
const execSyncOptions = {
|
|
447798
447818
|
cwd: (0, path_1.join)(tree.root, cwd),
|
|
447799
447819
|
stdio: process.env.NX_GENERATE_QUIET === "true" ? "ignore" : "inherit",
|
|
447800
|
-
windowsHide:
|
|
447820
|
+
windowsHide: true
|
|
447801
447821
|
};
|
|
447802
447822
|
if (process.env.npm_config_registry && process.env.npm_config_registry.match(/^https:\/\/registry\.(npmjs\.org|yarnpkg\.com)/)) {
|
|
447803
447823
|
delete process.env.npm_config_registry;
|
|
@@ -450596,6 +450616,26 @@ var require_js_yaml = __commonJS({
|
|
|
450596
450616
|
}
|
|
450597
450617
|
});
|
|
450598
450618
|
|
|
450619
|
+
// node_modules/@nx/devkit/src/utils/catalog/manager.js
|
|
450620
|
+
var require_manager = __commonJS({
|
|
450621
|
+
"node_modules/@nx/devkit/src/utils/catalog/manager.js"(exports2) {
|
|
450622
|
+
"use strict";
|
|
450623
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
450624
|
+
exports2.formatCatalogError = formatCatalogError;
|
|
450625
|
+
function formatCatalogError(error2, suggestions) {
|
|
450626
|
+
let message = error2;
|
|
450627
|
+
if (suggestions.length > 0) {
|
|
450628
|
+
message += "\n\nSuggestions:";
|
|
450629
|
+
suggestions.forEach((suggestion) => {
|
|
450630
|
+
message += `
|
|
450631
|
+
\u2022 ${suggestion}`;
|
|
450632
|
+
});
|
|
450633
|
+
}
|
|
450634
|
+
return message;
|
|
450635
|
+
}
|
|
450636
|
+
}
|
|
450637
|
+
});
|
|
450638
|
+
|
|
450599
450639
|
// node_modules/@nx/devkit/src/utils/catalog/pnpm-manager.js
|
|
450600
450640
|
var require_pnpm_manager = __commonJS({
|
|
450601
450641
|
"node_modules/@nx/devkit/src/utils/catalog/pnpm-manager.js"(exports2) {
|
|
@@ -450607,6 +450647,8 @@ var require_pnpm_manager = __commonJS({
|
|
|
450607
450647
|
var node_path_1 = require("node:path");
|
|
450608
450648
|
var devkit_exports_1 = require("nx/src/devkit-exports");
|
|
450609
450649
|
var devkit_internals_1 = require("nx/src/devkit-internals");
|
|
450650
|
+
var manager_1 = require_manager();
|
|
450651
|
+
var PNPM_WORKSPACE_FILENAME = "pnpm-workspace.yaml";
|
|
450610
450652
|
var PnpmCatalogManager = class {
|
|
450611
450653
|
constructor() {
|
|
450612
450654
|
this.name = "pnpm";
|
|
@@ -450626,18 +450668,21 @@ var require_pnpm_manager = __commonJS({
|
|
|
450626
450668
|
isDefaultCatalog: isDefault
|
|
450627
450669
|
};
|
|
450628
450670
|
}
|
|
450671
|
+
getCatalogDefinitionFilePaths() {
|
|
450672
|
+
return [PNPM_WORKSPACE_FILENAME];
|
|
450673
|
+
}
|
|
450629
450674
|
getCatalogDefinitions(treeOrRoot) {
|
|
450630
450675
|
if (typeof treeOrRoot === "string") {
|
|
450631
|
-
const
|
|
450632
|
-
if (!(0, node_fs_1.existsSync)(
|
|
450676
|
+
const configPath = (0, node_path_1.join)(treeOrRoot, PNPM_WORKSPACE_FILENAME);
|
|
450677
|
+
if (!(0, node_fs_1.existsSync)(configPath)) {
|
|
450633
450678
|
return null;
|
|
450634
450679
|
}
|
|
450635
|
-
return
|
|
450680
|
+
return readConfigFromFs(configPath);
|
|
450636
450681
|
} else {
|
|
450637
|
-
if (!treeOrRoot.exists(
|
|
450682
|
+
if (!treeOrRoot.exists(PNPM_WORKSPACE_FILENAME)) {
|
|
450638
450683
|
return null;
|
|
450639
450684
|
}
|
|
450640
|
-
return
|
|
450685
|
+
return readConfigFromTree(treeOrRoot, PNPM_WORKSPACE_FILENAME);
|
|
450641
450686
|
}
|
|
450642
450687
|
}
|
|
450643
450688
|
resolveCatalogReference(treeOrRoot, packageName, version) {
|
|
@@ -450645,15 +450690,15 @@ var require_pnpm_manager = __commonJS({
|
|
|
450645
450690
|
if (!catalogRef) {
|
|
450646
450691
|
return null;
|
|
450647
450692
|
}
|
|
450648
|
-
const
|
|
450649
|
-
if (!
|
|
450693
|
+
const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
|
|
450694
|
+
if (!catalogDefs) {
|
|
450650
450695
|
return null;
|
|
450651
450696
|
}
|
|
450652
450697
|
let catalogToUse;
|
|
450653
450698
|
if (catalogRef.isDefaultCatalog) {
|
|
450654
|
-
catalogToUse =
|
|
450699
|
+
catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
|
|
450655
450700
|
} else if (catalogRef.catalogName) {
|
|
450656
|
-
catalogToUse =
|
|
450701
|
+
catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
|
|
450657
450702
|
}
|
|
450658
450703
|
return catalogToUse?.[packageName] || null;
|
|
450659
450704
|
}
|
|
@@ -450662,35 +450707,35 @@ var require_pnpm_manager = __commonJS({
|
|
|
450662
450707
|
if (!catalogRef) {
|
|
450663
450708
|
throw new Error(`Invalid catalog reference syntax: "${version}". Expected format: "catalog:" or "catalog:name"`);
|
|
450664
450709
|
}
|
|
450665
|
-
const
|
|
450666
|
-
if (!
|
|
450667
|
-
throw new Error(formatCatalogError(
|
|
450710
|
+
const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
|
|
450711
|
+
if (!catalogDefs) {
|
|
450712
|
+
throw new Error((0, manager_1.formatCatalogError)(`Cannot get Pnpm catalog definitions. No ${PNPM_WORKSPACE_FILENAME} found in workspace root.`, [`Create a ${PNPM_WORKSPACE_FILENAME} file in your workspace root`]));
|
|
450668
450713
|
}
|
|
450669
450714
|
let catalogToUse;
|
|
450670
450715
|
if (catalogRef.isDefaultCatalog) {
|
|
450671
|
-
const hasCatalog = !!
|
|
450672
|
-
const hasCatalogsDefault = !!
|
|
450716
|
+
const hasCatalog = !!catalogDefs.catalog;
|
|
450717
|
+
const hasCatalogsDefault = !!catalogDefs.catalogs?.default;
|
|
450673
450718
|
if (hasCatalog && hasCatalogsDefault) {
|
|
450674
450719
|
throw new Error("The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
|
|
450675
450720
|
}
|
|
450676
|
-
catalogToUse =
|
|
450721
|
+
catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
|
|
450677
450722
|
if (!catalogToUse) {
|
|
450678
|
-
const availableCatalogs = Object.keys(
|
|
450723
|
+
const availableCatalogs = Object.keys(catalogDefs.catalogs || {});
|
|
450679
450724
|
const suggestions = [
|
|
450680
|
-
|
|
450725
|
+
`Define a default catalog in ${PNPM_WORKSPACE_FILENAME} under the "catalog" key`
|
|
450681
450726
|
];
|
|
450682
450727
|
if (availableCatalogs.length > 0) {
|
|
450683
450728
|
suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
|
|
450684
450729
|
}
|
|
450685
|
-
throw new Error(formatCatalogError(
|
|
450730
|
+
throw new Error((0, manager_1.formatCatalogError)(`No default catalog defined in ${PNPM_WORKSPACE_FILENAME}`, suggestions));
|
|
450686
450731
|
}
|
|
450687
450732
|
} else if (catalogRef.catalogName) {
|
|
450688
|
-
catalogToUse =
|
|
450733
|
+
catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
|
|
450689
450734
|
if (!catalogToUse) {
|
|
450690
|
-
const availableCatalogs = Object.keys(
|
|
450691
|
-
const defaultCatalog = !!
|
|
450735
|
+
const availableCatalogs = Object.keys(catalogDefs.catalogs || {}).filter((c) => c !== "default");
|
|
450736
|
+
const defaultCatalog = !!catalogDefs.catalog ? "catalog" : !catalogDefs.catalogs?.default ? "catalogs.default" : null;
|
|
450692
450737
|
const suggestions = [
|
|
450693
|
-
|
|
450738
|
+
`Define the catalog in ${PNPM_WORKSPACE_FILENAME} under the "catalogs" key`
|
|
450694
450739
|
];
|
|
450695
450740
|
if (availableCatalogs.length > 0) {
|
|
450696
450741
|
suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
|
|
@@ -450698,25 +450743,25 @@ var require_pnpm_manager = __commonJS({
|
|
|
450698
450743
|
if (defaultCatalog) {
|
|
450699
450744
|
suggestions.push(`Or use the default catalog ("${defaultCatalog}")`);
|
|
450700
450745
|
}
|
|
450701
|
-
throw new Error(formatCatalogError(`Catalog "${catalogRef.catalogName}" not found in
|
|
450746
|
+
throw new Error((0, manager_1.formatCatalogError)(`Catalog "${catalogRef.catalogName}" not found in ${PNPM_WORKSPACE_FILENAME}`, suggestions));
|
|
450702
450747
|
}
|
|
450703
450748
|
}
|
|
450704
450749
|
if (!catalogToUse[packageName]) {
|
|
450705
450750
|
let catalogName;
|
|
450706
450751
|
if (catalogRef.isDefaultCatalog) {
|
|
450707
|
-
const hasCatalog = !!
|
|
450752
|
+
const hasCatalog = !!catalogDefs.catalog;
|
|
450708
450753
|
catalogName = hasCatalog ? 'default catalog ("catalog")' : 'default catalog ("catalogs.default")';
|
|
450709
450754
|
} else {
|
|
450710
450755
|
catalogName = `catalog '${catalogRef.catalogName}'`;
|
|
450711
450756
|
}
|
|
450712
450757
|
const availablePackages = Object.keys(catalogToUse);
|
|
450713
450758
|
const suggestions = [
|
|
450714
|
-
`Add "${packageName}" to ${catalogName} in
|
|
450759
|
+
`Add "${packageName}" to ${catalogName} in ${PNPM_WORKSPACE_FILENAME}`
|
|
450715
450760
|
];
|
|
450716
450761
|
if (availablePackages.length > 0) {
|
|
450717
450762
|
suggestions.push(`Or select from the available packages in ${catalogName}: ${availablePackages.map((p) => `"${p}"`).join(", ")}`);
|
|
450718
450763
|
}
|
|
450719
|
-
throw new Error(formatCatalogError(`Package "${packageName}" not found in ${catalogName}`, suggestions));
|
|
450764
|
+
throw new Error((0, manager_1.formatCatalogError)(`Package "${packageName}" not found in ${catalogName}`, suggestions));
|
|
450720
450765
|
}
|
|
450721
450766
|
}
|
|
450722
450767
|
updateCatalogVersions(treeOrRoot, updates) {
|
|
@@ -450724,46 +450769,46 @@ var require_pnpm_manager = __commonJS({
|
|
|
450724
450769
|
let readYaml;
|
|
450725
450770
|
let writeYaml;
|
|
450726
450771
|
if (typeof treeOrRoot === "string") {
|
|
450727
|
-
const
|
|
450728
|
-
checkExists = () => (0, node_fs_1.existsSync)(
|
|
450729
|
-
readYaml = () => (0, node_fs_1.readFileSync)(
|
|
450730
|
-
writeYaml = (content) => (0, node_fs_1.writeFileSync)(
|
|
450772
|
+
const configPath = (0, node_path_1.join)(treeOrRoot, PNPM_WORKSPACE_FILENAME);
|
|
450773
|
+
checkExists = () => (0, node_fs_1.existsSync)(configPath);
|
|
450774
|
+
readYaml = () => (0, node_fs_1.readFileSync)(configPath, "utf-8");
|
|
450775
|
+
writeYaml = (content) => (0, node_fs_1.writeFileSync)(configPath, content, "utf-8");
|
|
450731
450776
|
} else {
|
|
450732
|
-
checkExists = () => treeOrRoot.exists(
|
|
450733
|
-
readYaml = () => treeOrRoot.read(
|
|
450734
|
-
writeYaml = (content) => treeOrRoot.write(
|
|
450777
|
+
checkExists = () => treeOrRoot.exists(PNPM_WORKSPACE_FILENAME);
|
|
450778
|
+
readYaml = () => treeOrRoot.read(PNPM_WORKSPACE_FILENAME, "utf-8");
|
|
450779
|
+
writeYaml = (content) => treeOrRoot.write(PNPM_WORKSPACE_FILENAME, content);
|
|
450735
450780
|
}
|
|
450736
450781
|
if (!checkExists()) {
|
|
450737
450782
|
devkit_exports_1.output.warn({
|
|
450738
|
-
title:
|
|
450783
|
+
title: `No ${PNPM_WORKSPACE_FILENAME} found`,
|
|
450739
450784
|
bodyLines: [
|
|
450740
|
-
|
|
450741
|
-
|
|
450785
|
+
`Cannot update catalog versions without a ${PNPM_WORKSPACE_FILENAME} file.`,
|
|
450786
|
+
`Create a ${PNPM_WORKSPACE_FILENAME} file to use catalogs.`
|
|
450742
450787
|
]
|
|
450743
450788
|
});
|
|
450744
450789
|
return;
|
|
450745
450790
|
}
|
|
450746
450791
|
try {
|
|
450747
|
-
const
|
|
450748
|
-
const
|
|
450792
|
+
const configContent = readYaml();
|
|
450793
|
+
const configData = (0, js_yaml_1.load)(configContent) || {};
|
|
450749
450794
|
let hasChanges = false;
|
|
450750
450795
|
for (const update of updates) {
|
|
450751
450796
|
const { packageName, version, catalogName } = update;
|
|
450752
450797
|
const normalizedCatalogName = catalogName === "default" ? void 0 : catalogName;
|
|
450753
450798
|
let targetCatalog;
|
|
450754
450799
|
if (!normalizedCatalogName) {
|
|
450755
|
-
if (
|
|
450756
|
-
targetCatalog =
|
|
450757
|
-
} else if (
|
|
450758
|
-
targetCatalog =
|
|
450800
|
+
if (configData.catalog) {
|
|
450801
|
+
targetCatalog = configData.catalog;
|
|
450802
|
+
} else if (configData.catalogs?.default) {
|
|
450803
|
+
targetCatalog = configData.catalogs.default;
|
|
450759
450804
|
} else {
|
|
450760
|
-
|
|
450761
|
-
targetCatalog =
|
|
450805
|
+
configData.catalog ??= {};
|
|
450806
|
+
targetCatalog = configData.catalog;
|
|
450762
450807
|
}
|
|
450763
450808
|
} else {
|
|
450764
|
-
|
|
450765
|
-
|
|
450766
|
-
targetCatalog =
|
|
450809
|
+
configData.catalogs ??= {};
|
|
450810
|
+
configData.catalogs[normalizedCatalogName] ??= {};
|
|
450811
|
+
targetCatalog = configData.catalogs[normalizedCatalogName];
|
|
450767
450812
|
}
|
|
450768
450813
|
if (targetCatalog[packageName] !== version) {
|
|
450769
450814
|
targetCatalog[packageName] = version;
|
|
@@ -450771,7 +450816,7 @@ var require_pnpm_manager = __commonJS({
|
|
|
450771
450816
|
}
|
|
450772
450817
|
}
|
|
450773
450818
|
if (hasChanges) {
|
|
450774
|
-
writeYaml((0, js_yaml_1.dump)(
|
|
450819
|
+
writeYaml((0, js_yaml_1.dump)(configData, {
|
|
450775
450820
|
indent: 2,
|
|
450776
450821
|
quotingType: '"',
|
|
450777
450822
|
forceQuotes: true
|
|
@@ -450787,40 +450832,250 @@ var require_pnpm_manager = __commonJS({
|
|
|
450787
450832
|
}
|
|
450788
450833
|
};
|
|
450789
450834
|
exports2.PnpmCatalogManager = PnpmCatalogManager;
|
|
450790
|
-
function
|
|
450835
|
+
function readConfigFromFs(path) {
|
|
450791
450836
|
try {
|
|
450792
450837
|
return (0, devkit_internals_1.readYamlFile)(path);
|
|
450793
450838
|
} catch (error2) {
|
|
450794
450839
|
devkit_exports_1.output.warn({
|
|
450795
|
-
title:
|
|
450840
|
+
title: `Unable to parse ${PNPM_WORKSPACE_FILENAME}`,
|
|
450796
450841
|
bodyLines: [error2.toString()]
|
|
450797
450842
|
});
|
|
450798
450843
|
return null;
|
|
450799
450844
|
}
|
|
450800
450845
|
}
|
|
450801
|
-
function
|
|
450846
|
+
function readConfigFromTree(tree, path) {
|
|
450802
450847
|
const content = tree.read(path, "utf-8");
|
|
450803
|
-
const { load: load2 } = require_js_yaml();
|
|
450804
450848
|
try {
|
|
450805
|
-
return
|
|
450849
|
+
return (0, js_yaml_1.load)(content, { filename: path });
|
|
450806
450850
|
} catch (error2) {
|
|
450807
450851
|
devkit_exports_1.output.warn({
|
|
450808
|
-
title:
|
|
450852
|
+
title: `Unable to parse ${PNPM_WORKSPACE_FILENAME}`,
|
|
450809
450853
|
bodyLines: [error2.toString()]
|
|
450810
450854
|
});
|
|
450811
450855
|
return null;
|
|
450812
450856
|
}
|
|
450813
450857
|
}
|
|
450814
|
-
|
|
450815
|
-
|
|
450816
|
-
|
|
450817
|
-
|
|
450818
|
-
|
|
450819
|
-
|
|
450820
|
-
|
|
450858
|
+
}
|
|
450859
|
+
});
|
|
450860
|
+
|
|
450861
|
+
// node_modules/@nx/devkit/src/utils/catalog/yarn-manager.js
|
|
450862
|
+
var require_yarn_manager = __commonJS({
|
|
450863
|
+
"node_modules/@nx/devkit/src/utils/catalog/yarn-manager.js"(exports2) {
|
|
450864
|
+
"use strict";
|
|
450865
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
450866
|
+
exports2.YarnCatalogManager = void 0;
|
|
450867
|
+
var js_yaml_1 = require_js_yaml();
|
|
450868
|
+
var node_fs_1 = require("node:fs");
|
|
450869
|
+
var node_path_1 = require("node:path");
|
|
450870
|
+
var devkit_exports_1 = require("nx/src/devkit-exports");
|
|
450871
|
+
var devkit_internals_1 = require("nx/src/devkit-internals");
|
|
450872
|
+
var manager_1 = require_manager();
|
|
450873
|
+
var YARNRC_FILENAME = ".yarnrc.yml";
|
|
450874
|
+
var YarnCatalogManager = class {
|
|
450875
|
+
constructor() {
|
|
450876
|
+
this.name = "yarn";
|
|
450877
|
+
this.catalogProtocol = "catalog:";
|
|
450878
|
+
}
|
|
450879
|
+
isCatalogReference(version) {
|
|
450880
|
+
return version.startsWith(this.catalogProtocol);
|
|
450881
|
+
}
|
|
450882
|
+
parseCatalogReference(version) {
|
|
450883
|
+
if (!this.isCatalogReference(version)) {
|
|
450884
|
+
return null;
|
|
450885
|
+
}
|
|
450886
|
+
const catalogName = version.substring(this.catalogProtocol.length);
|
|
450887
|
+
const isDefault = !catalogName || catalogName === "default";
|
|
450888
|
+
return {
|
|
450889
|
+
catalogName: isDefault ? void 0 : catalogName,
|
|
450890
|
+
isDefaultCatalog: isDefault
|
|
450891
|
+
};
|
|
450892
|
+
}
|
|
450893
|
+
getCatalogDefinitionFilePaths() {
|
|
450894
|
+
return [YARNRC_FILENAME];
|
|
450895
|
+
}
|
|
450896
|
+
getCatalogDefinitions(treeOrRoot) {
|
|
450897
|
+
if (typeof treeOrRoot === "string") {
|
|
450898
|
+
const configPath = (0, node_path_1.join)(treeOrRoot, YARNRC_FILENAME);
|
|
450899
|
+
if (!(0, node_fs_1.existsSync)(configPath)) {
|
|
450900
|
+
return null;
|
|
450901
|
+
}
|
|
450902
|
+
return readConfigFromFs(configPath);
|
|
450903
|
+
} else {
|
|
450904
|
+
if (!treeOrRoot.exists(YARNRC_FILENAME)) {
|
|
450905
|
+
return null;
|
|
450906
|
+
}
|
|
450907
|
+
return readConfigFromTree(treeOrRoot, YARNRC_FILENAME);
|
|
450908
|
+
}
|
|
450909
|
+
}
|
|
450910
|
+
resolveCatalogReference(treeOrRoot, packageName, version) {
|
|
450911
|
+
const catalogRef = this.parseCatalogReference(version);
|
|
450912
|
+
if (!catalogRef) {
|
|
450913
|
+
return null;
|
|
450914
|
+
}
|
|
450915
|
+
const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
|
|
450916
|
+
if (!catalogDefs) {
|
|
450917
|
+
return null;
|
|
450918
|
+
}
|
|
450919
|
+
let catalogToUse;
|
|
450920
|
+
if (catalogRef.isDefaultCatalog) {
|
|
450921
|
+
catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
|
|
450922
|
+
} else if (catalogRef.catalogName) {
|
|
450923
|
+
catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
|
|
450924
|
+
}
|
|
450925
|
+
return catalogToUse?.[packageName] || null;
|
|
450926
|
+
}
|
|
450927
|
+
validateCatalogReference(treeOrRoot, packageName, version) {
|
|
450928
|
+
const catalogRef = this.parseCatalogReference(version);
|
|
450929
|
+
if (!catalogRef) {
|
|
450930
|
+
throw new Error(`Invalid catalog reference syntax: "${version}". Expected format: "catalog:" or "catalog:name"`);
|
|
450931
|
+
}
|
|
450932
|
+
const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
|
|
450933
|
+
if (!catalogDefs) {
|
|
450934
|
+
throw new Error((0, manager_1.formatCatalogError)(`Cannot get Yarn catalog definitions. No ${YARNRC_FILENAME} found in workspace root.`, [`Create a ${YARNRC_FILENAME} file in your workspace root`]));
|
|
450935
|
+
}
|
|
450936
|
+
let catalogToUse;
|
|
450937
|
+
if (catalogRef.isDefaultCatalog) {
|
|
450938
|
+
const hasCatalog = !!catalogDefs.catalog;
|
|
450939
|
+
const hasCatalogsDefault = !!catalogDefs.catalogs?.default;
|
|
450940
|
+
if (hasCatalog && hasCatalogsDefault) {
|
|
450941
|
+
throw new Error("The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
|
|
450942
|
+
}
|
|
450943
|
+
catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
|
|
450944
|
+
if (!catalogToUse) {
|
|
450945
|
+
const availableCatalogs = Object.keys(catalogDefs.catalogs || {});
|
|
450946
|
+
const suggestions = [
|
|
450947
|
+
`Define a default catalog in ${YARNRC_FILENAME} under the "catalog" key`
|
|
450948
|
+
];
|
|
450949
|
+
if (availableCatalogs.length > 0) {
|
|
450950
|
+
suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
|
|
450951
|
+
}
|
|
450952
|
+
throw new Error((0, manager_1.formatCatalogError)(`No default catalog defined in ${YARNRC_FILENAME}`, suggestions));
|
|
450953
|
+
}
|
|
450954
|
+
} else if (catalogRef.catalogName) {
|
|
450955
|
+
catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
|
|
450956
|
+
if (!catalogToUse) {
|
|
450957
|
+
const availableCatalogs = Object.keys(catalogDefs.catalogs || {}).filter((c) => c !== "default");
|
|
450958
|
+
const defaultCatalog = !!catalogDefs.catalog ? "catalog" : !catalogDefs.catalogs?.default ? "catalogs.default" : null;
|
|
450959
|
+
const suggestions = [
|
|
450960
|
+
`Define the catalog in ${YARNRC_FILENAME} under the "catalogs" key`
|
|
450961
|
+
];
|
|
450962
|
+
if (availableCatalogs.length > 0) {
|
|
450963
|
+
suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
|
|
450964
|
+
}
|
|
450965
|
+
if (defaultCatalog) {
|
|
450966
|
+
suggestions.push(`Or use the default catalog ("${defaultCatalog}")`);
|
|
450967
|
+
}
|
|
450968
|
+
throw new Error((0, manager_1.formatCatalogError)(`Catalog "${catalogRef.catalogName}" not found in ${YARNRC_FILENAME}`, suggestions));
|
|
450969
|
+
}
|
|
450970
|
+
}
|
|
450971
|
+
if (!catalogToUse[packageName]) {
|
|
450972
|
+
let catalogName;
|
|
450973
|
+
if (catalogRef.isDefaultCatalog) {
|
|
450974
|
+
const hasCatalog = !!catalogDefs.catalog;
|
|
450975
|
+
catalogName = hasCatalog ? 'default catalog ("catalog")' : 'default catalog ("catalogs.default")';
|
|
450976
|
+
} else {
|
|
450977
|
+
catalogName = `catalog '${catalogRef.catalogName}'`;
|
|
450978
|
+
}
|
|
450979
|
+
const availablePackages = Object.keys(catalogToUse);
|
|
450980
|
+
const suggestions = [
|
|
450981
|
+
`Add "${packageName}" to ${catalogName} in ${YARNRC_FILENAME}`
|
|
450982
|
+
];
|
|
450983
|
+
if (availablePackages.length > 0) {
|
|
450984
|
+
suggestions.push(`Or select from the available packages in ${catalogName}: ${availablePackages.map((p) => `"${p}"`).join(", ")}`);
|
|
450985
|
+
}
|
|
450986
|
+
throw new Error((0, manager_1.formatCatalogError)(`Package "${packageName}" not found in ${catalogName}`, suggestions));
|
|
450987
|
+
}
|
|
450988
|
+
}
|
|
450989
|
+
updateCatalogVersions(treeOrRoot, updates) {
|
|
450990
|
+
let checkExists;
|
|
450991
|
+
let readYaml;
|
|
450992
|
+
let writeYaml;
|
|
450993
|
+
if (typeof treeOrRoot === "string") {
|
|
450994
|
+
const configPath = (0, node_path_1.join)(treeOrRoot, YARNRC_FILENAME);
|
|
450995
|
+
checkExists = () => (0, node_fs_1.existsSync)(configPath);
|
|
450996
|
+
readYaml = () => (0, node_fs_1.readFileSync)(configPath, "utf-8");
|
|
450997
|
+
writeYaml = (content) => (0, node_fs_1.writeFileSync)(configPath, content, "utf-8");
|
|
450998
|
+
} else {
|
|
450999
|
+
checkExists = () => treeOrRoot.exists(YARNRC_FILENAME);
|
|
451000
|
+
readYaml = () => treeOrRoot.read(YARNRC_FILENAME, "utf-8");
|
|
451001
|
+
writeYaml = (content) => treeOrRoot.write(YARNRC_FILENAME, content);
|
|
451002
|
+
}
|
|
451003
|
+
if (!checkExists()) {
|
|
451004
|
+
devkit_exports_1.output.warn({
|
|
451005
|
+
title: `No ${YARNRC_FILENAME} found`,
|
|
451006
|
+
bodyLines: [
|
|
451007
|
+
`Cannot update catalog versions without a ${YARNRC_FILENAME} file.`,
|
|
451008
|
+
`Create a ${YARNRC_FILENAME} file to use catalogs.`
|
|
451009
|
+
]
|
|
451010
|
+
});
|
|
451011
|
+
return;
|
|
451012
|
+
}
|
|
451013
|
+
try {
|
|
451014
|
+
const configContent = readYaml();
|
|
451015
|
+
const configData = (0, js_yaml_1.load)(configContent) || {};
|
|
451016
|
+
let hasChanges = false;
|
|
451017
|
+
for (const update of updates) {
|
|
451018
|
+
const { packageName, version, catalogName } = update;
|
|
451019
|
+
const normalizedCatalogName = catalogName === "default" ? void 0 : catalogName;
|
|
451020
|
+
let targetCatalog;
|
|
451021
|
+
if (!normalizedCatalogName) {
|
|
451022
|
+
if (configData.catalog) {
|
|
451023
|
+
targetCatalog = configData.catalog;
|
|
451024
|
+
} else if (configData.catalogs?.default) {
|
|
451025
|
+
targetCatalog = configData.catalogs.default;
|
|
451026
|
+
} else {
|
|
451027
|
+
configData.catalog ??= {};
|
|
451028
|
+
targetCatalog = configData.catalog;
|
|
451029
|
+
}
|
|
451030
|
+
} else {
|
|
451031
|
+
configData.catalogs ??= {};
|
|
451032
|
+
configData.catalogs[normalizedCatalogName] ??= {};
|
|
451033
|
+
targetCatalog = configData.catalogs[normalizedCatalogName];
|
|
451034
|
+
}
|
|
451035
|
+
if (targetCatalog[packageName] !== version) {
|
|
451036
|
+
targetCatalog[packageName] = version;
|
|
451037
|
+
hasChanges = true;
|
|
451038
|
+
}
|
|
451039
|
+
}
|
|
451040
|
+
if (hasChanges) {
|
|
451041
|
+
writeYaml((0, js_yaml_1.dump)(configData, {
|
|
451042
|
+
indent: 2,
|
|
451043
|
+
quotingType: '"',
|
|
451044
|
+
forceQuotes: true
|
|
451045
|
+
}));
|
|
451046
|
+
}
|
|
451047
|
+
} catch (error2) {
|
|
451048
|
+
devkit_exports_1.output.error({
|
|
451049
|
+
title: "Failed to update catalog versions",
|
|
451050
|
+
bodyLines: [error2 instanceof Error ? error2.message : String(error2)]
|
|
451051
|
+
});
|
|
451052
|
+
throw error2;
|
|
451053
|
+
}
|
|
451054
|
+
}
|
|
451055
|
+
};
|
|
451056
|
+
exports2.YarnCatalogManager = YarnCatalogManager;
|
|
451057
|
+
function readConfigFromFs(path) {
|
|
451058
|
+
try {
|
|
451059
|
+
return (0, devkit_internals_1.readYamlFile)(path);
|
|
451060
|
+
} catch (error2) {
|
|
451061
|
+
devkit_exports_1.output.warn({
|
|
451062
|
+
title: `Unable to parse ${YARNRC_FILENAME}`,
|
|
451063
|
+
bodyLines: [error2.toString()]
|
|
450821
451064
|
});
|
|
451065
|
+
return null;
|
|
451066
|
+
}
|
|
451067
|
+
}
|
|
451068
|
+
function readConfigFromTree(tree, path) {
|
|
451069
|
+
const content = tree.read(path, "utf-8");
|
|
451070
|
+
try {
|
|
451071
|
+
return (0, js_yaml_1.load)(content, { filename: path });
|
|
451072
|
+
} catch (error2) {
|
|
451073
|
+
devkit_exports_1.output.warn({
|
|
451074
|
+
title: `Unable to parse ${YARNRC_FILENAME}`,
|
|
451075
|
+
bodyLines: [error2.toString()]
|
|
451076
|
+
});
|
|
451077
|
+
return null;
|
|
450822
451078
|
}
|
|
450823
|
-
return message;
|
|
450824
451079
|
}
|
|
450825
451080
|
}
|
|
450826
451081
|
});
|
|
@@ -450833,11 +451088,14 @@ var require_manager_factory = __commonJS({
|
|
|
450833
451088
|
exports2.getCatalogManager = getCatalogManager;
|
|
450834
451089
|
var devkit_exports_1 = require("nx/src/devkit-exports");
|
|
450835
451090
|
var pnpm_manager_1 = require_pnpm_manager();
|
|
451091
|
+
var yarn_manager_1 = require_yarn_manager();
|
|
450836
451092
|
function getCatalogManager(workspaceRoot) {
|
|
450837
451093
|
const packageManager = (0, devkit_exports_1.detectPackageManager)(workspaceRoot);
|
|
450838
451094
|
switch (packageManager) {
|
|
450839
451095
|
case "pnpm":
|
|
450840
451096
|
return new pnpm_manager_1.PnpmCatalogManager();
|
|
451097
|
+
case "yarn":
|
|
451098
|
+
return new yarn_manager_1.YarnCatalogManager();
|
|
450841
451099
|
default:
|
|
450842
451100
|
return null;
|
|
450843
451101
|
}
|
|
@@ -451255,7 +451513,7 @@ var require_package_json = __commonJS({
|
|
|
451255
451513
|
if (process.env.NX_DRY_RUN && process.env.NX_DRY_RUN !== "false") {
|
|
451256
451514
|
throw new Error('NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the "Generate" button.\n');
|
|
451257
451515
|
}
|
|
451258
|
-
const { tempDir } = (0, devkit_internals_1.installPackageToTmp)(pkg, requiredVersion);
|
|
451516
|
+
const { tempDir } = (0, devkit_internals_1.installPackageToTmp)(pkg, requiredVersion, (0, devkit_exports_1.detectPackageManager)(devkit_exports_1.workspaceRoot));
|
|
451259
451517
|
addToNodePath((0, path_1.join)(devkit_exports_1.workspaceRoot, "node_modules"));
|
|
451260
451518
|
addToNodePath((0, path_1.join)(tempDir, "node_modules"));
|
|
451261
451519
|
module_1.Module._initPaths();
|
|
@@ -451435,7 +451693,8 @@ var require_parse_target_string = __commonJS({
|
|
|
451435
451693
|
if (!projectGraph.nodes[maybeProject] && projectGraphOrCtx && "projectName" in projectGraphOrCtx && maybeProject !== projectGraphOrCtx.projectName) {
|
|
451436
451694
|
targetString = `${projectGraphOrCtx.projectName}:${targetString}`;
|
|
451437
451695
|
}
|
|
451438
|
-
const
|
|
451696
|
+
const currentProject = projectGraphOrCtx && "projectName" in projectGraphOrCtx ? projectGraphOrCtx.projectName : void 0;
|
|
451697
|
+
const [project, target, configuration] = (0, devkit_internals_1.splitTarget)(targetString, projectGraph, { currentProject });
|
|
451439
451698
|
if (!project || !target) {
|
|
451440
451699
|
throw new Error(`Invalid Target String: ${targetString}`);
|
|
451441
451700
|
}
|
|
@@ -454388,7 +454647,7 @@ var init_yoctocolors = __esm({
|
|
|
454388
454647
|
}
|
|
454389
454648
|
});
|
|
454390
454649
|
|
|
454391
|
-
// node_modules/is-unicode-supported/index.js
|
|
454650
|
+
// node_modules/ora/node_modules/is-unicode-supported/index.js
|
|
454392
454651
|
function isUnicodeSupported() {
|
|
454393
454652
|
const { env: env2 } = import_node_process4.default;
|
|
454394
454653
|
const { TERM, TERM_PROGRAM } = env2;
|
|
@@ -454399,7 +454658,7 @@ function isUnicodeSupported() {
|
|
|
454399
454658
|
}
|
|
454400
454659
|
var import_node_process4;
|
|
454401
454660
|
var init_is_unicode_supported = __esm({
|
|
454402
|
-
"node_modules/is-unicode-supported/index.js"() {
|
|
454661
|
+
"node_modules/ora/node_modules/is-unicode-supported/index.js"() {
|
|
454403
454662
|
"use strict";
|
|
454404
454663
|
import_node_process4 = __toESM(require("node:process"), 1);
|
|
454405
454664
|
}
|
|
@@ -454435,7 +454694,7 @@ var init_log_symbols = __esm({
|
|
|
454435
454694
|
}
|
|
454436
454695
|
});
|
|
454437
454696
|
|
|
454438
|
-
// node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
454697
|
+
// node_modules/ora/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
454439
454698
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
454440
454699
|
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
454441
454700
|
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
@@ -454444,12 +454703,12 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
454444
454703
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
454445
454704
|
}
|
|
454446
454705
|
var init_ansi_regex = __esm({
|
|
454447
|
-
"node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
|
|
454706
|
+
"node_modules/ora/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
|
|
454448
454707
|
"use strict";
|
|
454449
454708
|
}
|
|
454450
454709
|
});
|
|
454451
454710
|
|
|
454452
|
-
// node_modules/ora/node_modules/strip-ansi/index.js
|
|
454711
|
+
// node_modules/ora/node_modules/string-width/node_modules/strip-ansi/index.js
|
|
454453
454712
|
function stripAnsi(string) {
|
|
454454
454713
|
if (typeof string !== "string") {
|
|
454455
454714
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
@@ -454458,7 +454717,7 @@ function stripAnsi(string) {
|
|
|
454458
454717
|
}
|
|
454459
454718
|
var regex;
|
|
454460
454719
|
var init_strip_ansi = __esm({
|
|
454461
|
-
"node_modules/ora/node_modules/strip-ansi/index.js"() {
|
|
454720
|
+
"node_modules/ora/node_modules/string-width/node_modules/strip-ansi/index.js"() {
|
|
454462
454721
|
"use strict";
|
|
454463
454722
|
init_ansi_regex();
|
|
454464
454723
|
regex = ansiRegex();
|
|
@@ -454661,14 +454920,14 @@ var init_string_width = __esm({
|
|
|
454661
454920
|
}
|
|
454662
454921
|
});
|
|
454663
454922
|
|
|
454664
|
-
// node_modules/is-interactive/index.js
|
|
454923
|
+
// node_modules/ora/node_modules/is-interactive/index.js
|
|
454665
454924
|
function isInteractive({ stream = process.stdout } = {}) {
|
|
454666
454925
|
return Boolean(
|
|
454667
454926
|
stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
|
|
454668
454927
|
);
|
|
454669
454928
|
}
|
|
454670
454929
|
var init_is_interactive = __esm({
|
|
454671
|
-
"node_modules/is-interactive/index.js"() {
|
|
454930
|
+
"node_modules/ora/node_modules/is-interactive/index.js"() {
|
|
454672
454931
|
"use strict";
|
|
454673
454932
|
}
|
|
454674
454933
|
});
|
|
@@ -454682,6 +454941,18 @@ var init_stdin_discarder = __esm({
|
|
|
454682
454941
|
ASCII_ETX_CODE = 3;
|
|
454683
454942
|
StdinDiscarder = class {
|
|
454684
454943
|
#activeCount = 0;
|
|
454944
|
+
#stdin;
|
|
454945
|
+
#stdinWasPaused = false;
|
|
454946
|
+
#stdinWasRaw = false;
|
|
454947
|
+
#handleInputBound = (chunk) => {
|
|
454948
|
+
if (!chunk?.length) {
|
|
454949
|
+
return;
|
|
454950
|
+
}
|
|
454951
|
+
const code = typeof chunk === "string" ? chunk.codePointAt(0) : chunk[0];
|
|
454952
|
+
if (code === ASCII_ETX_CODE) {
|
|
454953
|
+
import_node_process5.default.kill(import_node_process5.default.pid, "SIGINT");
|
|
454954
|
+
}
|
|
454955
|
+
};
|
|
454685
454956
|
start() {
|
|
454686
454957
|
this.#activeCount++;
|
|
454687
454958
|
if (this.#activeCount === 1) {
|
|
@@ -454689,38 +454960,47 @@ var init_stdin_discarder = __esm({
|
|
|
454689
454960
|
}
|
|
454690
454961
|
}
|
|
454691
454962
|
stop() {
|
|
454692
|
-
if (this.#activeCount <= 0) {
|
|
454693
|
-
throw new Error("`stop` called more times than `start`");
|
|
454694
|
-
}
|
|
454695
|
-
this.#activeCount--;
|
|
454696
454963
|
if (this.#activeCount === 0) {
|
|
454964
|
+
return;
|
|
454965
|
+
}
|
|
454966
|
+
if (--this.#activeCount === 0) {
|
|
454697
454967
|
this.#realStop();
|
|
454698
454968
|
}
|
|
454699
454969
|
}
|
|
454700
454970
|
#realStart() {
|
|
454701
|
-
|
|
454971
|
+
const { stdin } = import_node_process5.default;
|
|
454972
|
+
if (import_node_process5.default.platform === "win32" || !stdin?.isTTY || typeof stdin.setRawMode !== "function") {
|
|
454973
|
+
this.#stdin = void 0;
|
|
454702
454974
|
return;
|
|
454703
454975
|
}
|
|
454704
|
-
|
|
454705
|
-
|
|
454706
|
-
|
|
454976
|
+
this.#stdin = stdin;
|
|
454977
|
+
this.#stdinWasPaused = stdin.isPaused();
|
|
454978
|
+
this.#stdinWasRaw = Boolean(stdin.isRaw);
|
|
454979
|
+
stdin.setRawMode(true);
|
|
454980
|
+
stdin.prependListener("data", this.#handleInputBound);
|
|
454981
|
+
if (this.#stdinWasPaused) {
|
|
454982
|
+
stdin.resume();
|
|
454983
|
+
}
|
|
454707
454984
|
}
|
|
454708
454985
|
#realStop() {
|
|
454709
|
-
if (!
|
|
454986
|
+
if (!this.#stdin) {
|
|
454710
454987
|
return;
|
|
454711
454988
|
}
|
|
454712
|
-
|
|
454713
|
-
|
|
454714
|
-
|
|
454715
|
-
|
|
454716
|
-
#handleInput(chunk) {
|
|
454717
|
-
if (chunk[0] === ASCII_ETX_CODE) {
|
|
454718
|
-
import_node_process5.default.emit("SIGINT");
|
|
454989
|
+
const stdin = this.#stdin;
|
|
454990
|
+
stdin.off("data", this.#handleInputBound);
|
|
454991
|
+
if (stdin.isTTY) {
|
|
454992
|
+
stdin.setRawMode?.(this.#stdinWasRaw);
|
|
454719
454993
|
}
|
|
454994
|
+
if (this.#stdinWasPaused) {
|
|
454995
|
+
stdin.pause();
|
|
454996
|
+
}
|
|
454997
|
+
this.#stdin = void 0;
|
|
454998
|
+
this.#stdinWasPaused = false;
|
|
454999
|
+
this.#stdinWasRaw = false;
|
|
454720
455000
|
}
|
|
454721
455001
|
};
|
|
454722
455002
|
stdinDiscarder = new StdinDiscarder();
|
|
454723
|
-
stdin_discarder_default = stdinDiscarder;
|
|
455003
|
+
stdin_discarder_default = Object.freeze(stdinDiscarder);
|
|
454724
455004
|
}
|
|
454725
455005
|
});
|
|
454726
455006
|
|
|
@@ -454752,40 +455032,102 @@ async function oraPromise(action, options) {
|
|
|
454752
455032
|
throw error2;
|
|
454753
455033
|
}
|
|
454754
455034
|
}
|
|
454755
|
-
var import_node_process6, Ora;
|
|
455035
|
+
var import_node_process6, import_node_util, RENDER_DEFERRAL_TIMEOUT, SYNCHRONIZED_OUTPUT_ENABLE, SYNCHRONIZED_OUTPUT_DISABLE, activeHooksPerStream, Ora;
|
|
454756
455036
|
var init_ora = __esm({
|
|
454757
455037
|
"node_modules/ora/index.js"() {
|
|
454758
455038
|
"use strict";
|
|
454759
455039
|
import_node_process6 = __toESM(require("node:process"), 1);
|
|
455040
|
+
import_node_util = require("node:util");
|
|
454760
455041
|
init_source();
|
|
454761
455042
|
init_cli_cursor();
|
|
454762
455043
|
init_cli_spinners();
|
|
454763
455044
|
init_log_symbols();
|
|
454764
|
-
init_strip_ansi();
|
|
454765
455045
|
init_string_width();
|
|
454766
455046
|
init_is_interactive();
|
|
454767
455047
|
init_is_unicode_supported();
|
|
454768
455048
|
init_stdin_discarder();
|
|
454769
455049
|
init_cli_spinners();
|
|
455050
|
+
RENDER_DEFERRAL_TIMEOUT = 200;
|
|
455051
|
+
SYNCHRONIZED_OUTPUT_ENABLE = "\x1B[?2026h";
|
|
455052
|
+
SYNCHRONIZED_OUTPUT_DISABLE = "\x1B[?2026l";
|
|
455053
|
+
activeHooksPerStream = /* @__PURE__ */ new Map();
|
|
454770
455054
|
Ora = class {
|
|
454771
455055
|
#linesToClear = 0;
|
|
454772
|
-
#isDiscardingStdin = false;
|
|
454773
|
-
#lineCount = 0;
|
|
454774
455056
|
#frameIndex = -1;
|
|
454775
|
-
#
|
|
454776
|
-
#lastIndent = 0;
|
|
455057
|
+
#lastFrameTime = 0;
|
|
454777
455058
|
#options;
|
|
454778
455059
|
#spinner;
|
|
454779
455060
|
#stream;
|
|
454780
455061
|
#id;
|
|
454781
|
-
#
|
|
454782
|
-
#
|
|
454783
|
-
#
|
|
454784
|
-
#
|
|
454785
|
-
#
|
|
454786
|
-
#prefixText;
|
|
454787
|
-
#suffixText;
|
|
455062
|
+
#hookedStreams = /* @__PURE__ */ new Map();
|
|
455063
|
+
#isInternalWrite = false;
|
|
455064
|
+
#drainHandler;
|
|
455065
|
+
#deferRenderTimer;
|
|
455066
|
+
#isDiscardingStdin = false;
|
|
454788
455067
|
color;
|
|
455068
|
+
// Helper to execute writes while preventing hook recursion
|
|
455069
|
+
#internalWrite(fn) {
|
|
455070
|
+
this.#isInternalWrite = true;
|
|
455071
|
+
try {
|
|
455072
|
+
return fn();
|
|
455073
|
+
} finally {
|
|
455074
|
+
this.#isInternalWrite = false;
|
|
455075
|
+
}
|
|
455076
|
+
}
|
|
455077
|
+
// Helper to render if still spinning
|
|
455078
|
+
#tryRender() {
|
|
455079
|
+
if (this.isSpinning) {
|
|
455080
|
+
this.render();
|
|
455081
|
+
}
|
|
455082
|
+
}
|
|
455083
|
+
#stringifyChunk(chunk, encoding) {
|
|
455084
|
+
if (chunk === void 0 || chunk === null) {
|
|
455085
|
+
return "";
|
|
455086
|
+
}
|
|
455087
|
+
if (typeof chunk === "string") {
|
|
455088
|
+
return chunk;
|
|
455089
|
+
}
|
|
455090
|
+
if (Buffer.isBuffer(chunk) || ArrayBuffer.isView(chunk)) {
|
|
455091
|
+
const normalizedEncoding = typeof encoding === "string" && encoding && encoding !== "buffer" ? encoding : "utf8";
|
|
455092
|
+
return Buffer.from(chunk).toString(normalizedEncoding);
|
|
455093
|
+
}
|
|
455094
|
+
return String(chunk);
|
|
455095
|
+
}
|
|
455096
|
+
#chunkTerminatesLine(chunkString) {
|
|
455097
|
+
if (!chunkString) {
|
|
455098
|
+
return false;
|
|
455099
|
+
}
|
|
455100
|
+
const lastCharacter = chunkString.at(-1);
|
|
455101
|
+
return lastCharacter === "\n" || lastCharacter === "\r";
|
|
455102
|
+
}
|
|
455103
|
+
#scheduleRenderDeferral() {
|
|
455104
|
+
if (this.#deferRenderTimer) {
|
|
455105
|
+
return;
|
|
455106
|
+
}
|
|
455107
|
+
this.#deferRenderTimer = setTimeout(() => {
|
|
455108
|
+
this.#deferRenderTimer = void 0;
|
|
455109
|
+
if (this.isSpinning) {
|
|
455110
|
+
this.#tryRender();
|
|
455111
|
+
}
|
|
455112
|
+
}, RENDER_DEFERRAL_TIMEOUT);
|
|
455113
|
+
if (typeof this.#deferRenderTimer?.unref === "function") {
|
|
455114
|
+
this.#deferRenderTimer.unref();
|
|
455115
|
+
}
|
|
455116
|
+
}
|
|
455117
|
+
#clearRenderDeferral() {
|
|
455118
|
+
if (this.#deferRenderTimer) {
|
|
455119
|
+
clearTimeout(this.#deferRenderTimer);
|
|
455120
|
+
this.#deferRenderTimer = void 0;
|
|
455121
|
+
}
|
|
455122
|
+
}
|
|
455123
|
+
// Helper to build complete line with symbol, text, prefix, and suffix
|
|
455124
|
+
#buildOutputLine(symbol, text, prefixText, suffixText) {
|
|
455125
|
+
const fullPrefixText = this.#getFullPrefixText(prefixText, " ");
|
|
455126
|
+
const separatorText = symbol ? " " : "";
|
|
455127
|
+
const fullText = typeof text === "string" ? separatorText + text : "";
|
|
455128
|
+
const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
|
|
455129
|
+
return fullPrefixText + symbol + fullText + fullSuffixText;
|
|
455130
|
+
}
|
|
454789
455131
|
constructor(options) {
|
|
454790
455132
|
if (typeof options === "string") {
|
|
454791
455133
|
options = {
|
|
@@ -454800,18 +455142,23 @@ var init_ora = __esm({
|
|
|
454800
455142
|
...options
|
|
454801
455143
|
};
|
|
454802
455144
|
this.color = this.#options.color;
|
|
454803
|
-
this.spinner = this.#options.spinner;
|
|
454804
|
-
this.#initialInterval = this.#options.interval;
|
|
454805
455145
|
this.#stream = this.#options.stream;
|
|
454806
|
-
|
|
454807
|
-
|
|
455146
|
+
if (typeof this.#options.isEnabled !== "boolean") {
|
|
455147
|
+
this.#options.isEnabled = isInteractive({ stream: this.#stream });
|
|
455148
|
+
}
|
|
455149
|
+
if (typeof this.#options.isSilent !== "boolean") {
|
|
455150
|
+
this.#options.isSilent = false;
|
|
455151
|
+
}
|
|
455152
|
+
const userInterval = this.#options.interval;
|
|
455153
|
+
this.spinner = this.#options.spinner;
|
|
455154
|
+
this.#options.interval = userInterval;
|
|
454808
455155
|
this.text = this.#options.text;
|
|
454809
455156
|
this.prefixText = this.#options.prefixText;
|
|
454810
455157
|
this.suffixText = this.#options.suffixText;
|
|
454811
455158
|
this.indent = this.#options.indent;
|
|
454812
455159
|
if (import_node_process6.default.env.NODE_ENV === "test") {
|
|
454813
455160
|
this._stream = this.#stream;
|
|
454814
|
-
this._isEnabled = this.#isEnabled;
|
|
455161
|
+
this._isEnabled = this.#options.isEnabled;
|
|
454815
455162
|
Object.defineProperty(this, "_linesToClear", {
|
|
454816
455163
|
get() {
|
|
454817
455164
|
return this.#linesToClear;
|
|
@@ -454827,30 +455174,36 @@ var init_ora = __esm({
|
|
|
454827
455174
|
});
|
|
454828
455175
|
Object.defineProperty(this, "_lineCount", {
|
|
454829
455176
|
get() {
|
|
454830
|
-
|
|
455177
|
+
const columns = this.#stream.columns ?? 80;
|
|
455178
|
+
const prefixText = typeof this.#options.prefixText === "function" ? "" : this.#options.prefixText;
|
|
455179
|
+
const suffixText = typeof this.#options.suffixText === "function" ? "" : this.#options.suffixText;
|
|
455180
|
+
const fullPrefixText = typeof prefixText === "string" && prefixText !== "" ? prefixText + " " : "";
|
|
455181
|
+
const fullSuffixText = typeof suffixText === "string" && suffixText !== "" ? " " + suffixText : "";
|
|
455182
|
+
const spinnerChar = "-";
|
|
455183
|
+
const fullText = " ".repeat(this.#options.indent) + fullPrefixText + spinnerChar + (typeof this.#options.text === "string" ? " " + this.#options.text : "") + fullSuffixText;
|
|
455184
|
+
return this.#computeLineCountFrom(fullText, columns);
|
|
454831
455185
|
}
|
|
454832
455186
|
});
|
|
454833
455187
|
}
|
|
454834
455188
|
}
|
|
454835
455189
|
get indent() {
|
|
454836
|
-
return this.#indent;
|
|
455190
|
+
return this.#options.indent;
|
|
454837
455191
|
}
|
|
454838
455192
|
set indent(indent = 0) {
|
|
454839
455193
|
if (!(indent >= 0 && Number.isInteger(indent))) {
|
|
454840
455194
|
throw new Error("The `indent` option must be an integer from 0 and up");
|
|
454841
455195
|
}
|
|
454842
|
-
this.#indent = indent;
|
|
454843
|
-
this.#updateLineCount();
|
|
455196
|
+
this.#options.indent = indent;
|
|
454844
455197
|
}
|
|
454845
455198
|
get interval() {
|
|
454846
|
-
return this.#
|
|
455199
|
+
return this.#options.interval ?? this.#spinner.interval ?? 100;
|
|
454847
455200
|
}
|
|
454848
455201
|
get spinner() {
|
|
454849
455202
|
return this.#spinner;
|
|
454850
455203
|
}
|
|
454851
455204
|
set spinner(spinner) {
|
|
454852
455205
|
this.#frameIndex = -1;
|
|
454853
|
-
this.#
|
|
455206
|
+
this.#options.interval = void 0;
|
|
454854
455207
|
if (typeof spinner === "object") {
|
|
454855
455208
|
if (!Array.isArray(spinner.frames) || spinner.frames.length === 0 || spinner.frames.some((frame2) => typeof frame2 !== "string")) {
|
|
454856
455209
|
throw new Error("The given spinner must have a non-empty `frames` array of strings");
|
|
@@ -454870,25 +455223,22 @@ var init_ora = __esm({
|
|
|
454870
455223
|
}
|
|
454871
455224
|
}
|
|
454872
455225
|
get text() {
|
|
454873
|
-
return this.#text;
|
|
455226
|
+
return this.#options.text;
|
|
454874
455227
|
}
|
|
454875
455228
|
set text(value = "") {
|
|
454876
|
-
this.#text = value;
|
|
454877
|
-
this.#updateLineCount();
|
|
455229
|
+
this.#options.text = value;
|
|
454878
455230
|
}
|
|
454879
455231
|
get prefixText() {
|
|
454880
|
-
return this.#prefixText;
|
|
455232
|
+
return this.#options.prefixText;
|
|
454881
455233
|
}
|
|
454882
455234
|
set prefixText(value = "") {
|
|
454883
|
-
this.#prefixText = value;
|
|
454884
|
-
this.#updateLineCount();
|
|
455235
|
+
this.#options.prefixText = value;
|
|
454885
455236
|
}
|
|
454886
455237
|
get suffixText() {
|
|
454887
|
-
return this.#suffixText;
|
|
455238
|
+
return this.#options.suffixText;
|
|
454888
455239
|
}
|
|
454889
455240
|
set suffixText(value = "") {
|
|
454890
|
-
this.#suffixText = value;
|
|
454891
|
-
this.#updateLineCount();
|
|
455241
|
+
this.#options.suffixText = value;
|
|
454892
455242
|
}
|
|
454893
455243
|
get isSpinning() {
|
|
454894
455244
|
return this.#id !== void 0;
|
|
@@ -454900,110 +455250,179 @@ var init_ora = __esm({
|
|
|
454900
455250
|
}
|
|
454901
455251
|
return "";
|
|
454902
455252
|
}
|
|
454903
|
-
#getFullPrefixText(prefixText = this.#prefixText, postfix = " ") {
|
|
455253
|
+
#getFullPrefixText(prefixText = this.#options.prefixText, postfix = " ") {
|
|
454904
455254
|
return this.#formatAffix(prefixText, postfix, false);
|
|
454905
455255
|
}
|
|
454906
|
-
#getFullSuffixText(suffixText = this.#suffixText, prefix = " ") {
|
|
455256
|
+
#getFullSuffixText(suffixText = this.#options.suffixText, prefix = " ") {
|
|
454907
455257
|
return this.#formatAffix(suffixText, prefix, true);
|
|
454908
455258
|
}
|
|
454909
455259
|
#computeLineCountFrom(text, columns) {
|
|
454910
455260
|
let count = 0;
|
|
454911
|
-
for (const line of
|
|
455261
|
+
for (const line of (0, import_node_util.stripVTControlCharacters)(text).split("\n")) {
|
|
454912
455262
|
count += Math.max(1, Math.ceil(stringWidth(line) / columns));
|
|
454913
455263
|
}
|
|
454914
455264
|
return count;
|
|
454915
455265
|
}
|
|
454916
|
-
#updateLineCount() {
|
|
454917
|
-
const columns = this.#stream.columns ?? 80;
|
|
454918
|
-
const prefixText = typeof this.#prefixText === "function" ? "" : this.#prefixText;
|
|
454919
|
-
const suffixText = typeof this.#suffixText === "function" ? "" : this.#suffixText;
|
|
454920
|
-
const fullPrefixText = typeof prefixText === "string" && prefixText !== "" ? prefixText + " " : "";
|
|
454921
|
-
const fullSuffixText = typeof suffixText === "string" && suffixText !== "" ? " " + suffixText : "";
|
|
454922
|
-
const spinnerChar = "-";
|
|
454923
|
-
const fullText = " ".repeat(this.#indent) + fullPrefixText + spinnerChar + (typeof this.#text === "string" ? " " + this.#text : "") + fullSuffixText;
|
|
454924
|
-
this.#lineCount = this.#computeLineCountFrom(fullText, columns);
|
|
454925
|
-
}
|
|
454926
455266
|
get isEnabled() {
|
|
454927
|
-
return this.#isEnabled && !this.#isSilent;
|
|
455267
|
+
return this.#options.isEnabled && !this.#options.isSilent;
|
|
454928
455268
|
}
|
|
454929
455269
|
set isEnabled(value) {
|
|
454930
455270
|
if (typeof value !== "boolean") {
|
|
454931
455271
|
throw new TypeError("The `isEnabled` option must be a boolean");
|
|
454932
455272
|
}
|
|
454933
|
-
this.#isEnabled = value;
|
|
455273
|
+
this.#options.isEnabled = value;
|
|
454934
455274
|
}
|
|
454935
455275
|
get isSilent() {
|
|
454936
|
-
return this.#isSilent;
|
|
455276
|
+
return this.#options.isSilent;
|
|
454937
455277
|
}
|
|
454938
455278
|
set isSilent(value) {
|
|
454939
455279
|
if (typeof value !== "boolean") {
|
|
454940
455280
|
throw new TypeError("The `isSilent` option must be a boolean");
|
|
454941
455281
|
}
|
|
454942
|
-
this.#isSilent = value;
|
|
455282
|
+
this.#options.isSilent = value;
|
|
454943
455283
|
}
|
|
454944
455284
|
frame() {
|
|
454945
455285
|
const now = Date.now();
|
|
454946
|
-
if (this.#frameIndex === -1 || now - this.#
|
|
454947
|
-
this.#frameIndex =
|
|
454948
|
-
this.#
|
|
455286
|
+
if (this.#frameIndex === -1 || now - this.#lastFrameTime >= this.interval) {
|
|
455287
|
+
this.#frameIndex = (this.#frameIndex + 1) % this.#spinner.frames.length;
|
|
455288
|
+
this.#lastFrameTime = now;
|
|
454949
455289
|
}
|
|
454950
455290
|
const { frames } = this.#spinner;
|
|
454951
455291
|
let frame2 = frames[this.#frameIndex];
|
|
454952
455292
|
if (this.color) {
|
|
454953
455293
|
frame2 = source_default[this.color](frame2);
|
|
454954
455294
|
}
|
|
454955
|
-
const fullPrefixText = this.#getFullPrefixText(this.#prefixText, " ");
|
|
455295
|
+
const fullPrefixText = this.#getFullPrefixText(this.#options.prefixText, " ");
|
|
454956
455296
|
const fullText = typeof this.text === "string" ? " " + this.text : "";
|
|
454957
|
-
const fullSuffixText = this.#getFullSuffixText(this.#suffixText, " ");
|
|
455297
|
+
const fullSuffixText = this.#getFullSuffixText(this.#options.suffixText, " ");
|
|
454958
455298
|
return fullPrefixText + frame2 + fullText + fullSuffixText;
|
|
454959
455299
|
}
|
|
454960
455300
|
clear() {
|
|
454961
|
-
if (!this
|
|
455301
|
+
if (!this.isEnabled || !this.#stream.isTTY) {
|
|
454962
455302
|
return this;
|
|
454963
455303
|
}
|
|
454964
|
-
this.#
|
|
454965
|
-
|
|
454966
|
-
|
|
454967
|
-
|
|
455304
|
+
this.#internalWrite(() => {
|
|
455305
|
+
this.#stream.cursorTo(0);
|
|
455306
|
+
for (let index = 0; index < this.#linesToClear; index++) {
|
|
455307
|
+
if (index > 0) {
|
|
455308
|
+
this.#stream.moveCursor(0, -1);
|
|
455309
|
+
}
|
|
455310
|
+
this.#stream.clearLine(1);
|
|
454968
455311
|
}
|
|
454969
|
-
this.#
|
|
454970
|
-
|
|
454971
|
-
|
|
454972
|
-
|
|
454973
|
-
}
|
|
454974
|
-
this.#lastIndent = this.#indent;
|
|
455312
|
+
if (this.#options.indent) {
|
|
455313
|
+
this.#stream.cursorTo(this.#options.indent);
|
|
455314
|
+
}
|
|
455315
|
+
});
|
|
454975
455316
|
this.#linesToClear = 0;
|
|
454976
455317
|
return this;
|
|
454977
455318
|
}
|
|
455319
|
+
// Helper to hook a single stream
|
|
455320
|
+
#hookStream(stream) {
|
|
455321
|
+
if (!stream || this.#hookedStreams.has(stream) || !stream.isTTY || typeof stream.write !== "function") {
|
|
455322
|
+
return;
|
|
455323
|
+
}
|
|
455324
|
+
if (activeHooksPerStream.has(stream)) {
|
|
455325
|
+
console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");
|
|
455326
|
+
}
|
|
455327
|
+
const originalWrite = stream.write;
|
|
455328
|
+
this.#hookedStreams.set(stream, originalWrite);
|
|
455329
|
+
activeHooksPerStream.set(stream, this);
|
|
455330
|
+
stream.write = (chunk, encoding, callback) => this.#hookedWrite(stream, originalWrite, chunk, encoding, callback);
|
|
455331
|
+
}
|
|
455332
|
+
/**
|
|
455333
|
+
Intercept stream writes while spinner is active to handle external writes cleanly without visual corruption.
|
|
455334
|
+
Hooks process stdio streams and the active spinner stream so console.log(), console.error(), and direct writes stay tidy.
|
|
455335
|
+
*/
|
|
455336
|
+
#installHook() {
|
|
455337
|
+
if (!this.isEnabled || this.#hookedStreams.size > 0) {
|
|
455338
|
+
return;
|
|
455339
|
+
}
|
|
455340
|
+
const streamsToHook = /* @__PURE__ */ new Set([this.#stream, import_node_process6.default.stdout, import_node_process6.default.stderr]);
|
|
455341
|
+
for (const stream of streamsToHook) {
|
|
455342
|
+
this.#hookStream(stream);
|
|
455343
|
+
}
|
|
455344
|
+
}
|
|
455345
|
+
#uninstallHook() {
|
|
455346
|
+
for (const [stream, originalWrite] of this.#hookedStreams) {
|
|
455347
|
+
stream.write = originalWrite;
|
|
455348
|
+
if (activeHooksPerStream.get(stream) === this) {
|
|
455349
|
+
activeHooksPerStream.delete(stream);
|
|
455350
|
+
}
|
|
455351
|
+
}
|
|
455352
|
+
this.#hookedStreams.clear();
|
|
455353
|
+
}
|
|
455354
|
+
// eslint-disable-next-line max-params -- Need stream and originalWrite for multi-stream support
|
|
455355
|
+
#hookedWrite(stream, originalWrite, chunk, encoding, callback) {
|
|
455356
|
+
if (typeof encoding === "function") {
|
|
455357
|
+
callback = encoding;
|
|
455358
|
+
encoding = void 0;
|
|
455359
|
+
}
|
|
455360
|
+
if (this.#isInternalWrite) {
|
|
455361
|
+
return originalWrite.call(stream, chunk, encoding, callback);
|
|
455362
|
+
}
|
|
455363
|
+
this.clear();
|
|
455364
|
+
const chunkString = this.#stringifyChunk(chunk, encoding);
|
|
455365
|
+
const chunkTerminatesLine = this.#chunkTerminatesLine(chunkString);
|
|
455366
|
+
const writeResult = originalWrite.call(stream, chunk, encoding, callback);
|
|
455367
|
+
if (chunkTerminatesLine) {
|
|
455368
|
+
this.#clearRenderDeferral();
|
|
455369
|
+
} else if (chunkString.length > 0) {
|
|
455370
|
+
this.#scheduleRenderDeferral();
|
|
455371
|
+
}
|
|
455372
|
+
if (this.isSpinning && !this.#deferRenderTimer) {
|
|
455373
|
+
this.render();
|
|
455374
|
+
}
|
|
455375
|
+
return writeResult;
|
|
455376
|
+
}
|
|
454978
455377
|
render() {
|
|
454979
|
-
if (!this
|
|
455378
|
+
if (!this.isEnabled || this.#drainHandler || this.#deferRenderTimer) {
|
|
454980
455379
|
return this;
|
|
454981
455380
|
}
|
|
454982
|
-
this.
|
|
454983
|
-
let
|
|
454984
|
-
|
|
454985
|
-
|
|
454986
|
-
|
|
454987
|
-
|
|
454988
|
-
|
|
454989
|
-
|
|
454990
|
-
frameContent =
|
|
454991
|
-
|
|
454992
|
-
|
|
454993
|
-
|
|
455381
|
+
const useSynchronizedOutput = this.#stream.isTTY;
|
|
455382
|
+
let shouldDisableSynchronizedOutput = false;
|
|
455383
|
+
try {
|
|
455384
|
+
if (useSynchronizedOutput) {
|
|
455385
|
+
this.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_ENABLE));
|
|
455386
|
+
shouldDisableSynchronizedOutput = true;
|
|
455387
|
+
}
|
|
455388
|
+
this.clear();
|
|
455389
|
+
let frameContent = this.frame();
|
|
455390
|
+
const columns = this.#stream.columns ?? 80;
|
|
455391
|
+
const actualLineCount = this.#computeLineCountFrom(frameContent, columns);
|
|
455392
|
+
const consoleHeight = this.#stream.rows;
|
|
455393
|
+
if (consoleHeight && consoleHeight > 1 && actualLineCount > consoleHeight) {
|
|
455394
|
+
const lines = frameContent.split("\n");
|
|
455395
|
+
const maxLines = consoleHeight - 1;
|
|
455396
|
+
frameContent = [...lines.slice(0, maxLines), "... (content truncated to fit terminal)"].join("\n");
|
|
455397
|
+
}
|
|
455398
|
+
const canContinue = this.#internalWrite(() => this.#stream.write(frameContent));
|
|
455399
|
+
if (canContinue === false && this.#stream.isTTY) {
|
|
455400
|
+
this.#drainHandler = () => {
|
|
455401
|
+
this.#drainHandler = void 0;
|
|
455402
|
+
this.#tryRender();
|
|
455403
|
+
};
|
|
455404
|
+
this.#stream.once("drain", this.#drainHandler);
|
|
455405
|
+
}
|
|
455406
|
+
this.#linesToClear = this.#computeLineCountFrom(frameContent, columns);
|
|
455407
|
+
} finally {
|
|
455408
|
+
if (shouldDisableSynchronizedOutput) {
|
|
455409
|
+
this.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_DISABLE));
|
|
455410
|
+
}
|
|
455411
|
+
}
|
|
454994
455412
|
return this;
|
|
454995
455413
|
}
|
|
454996
455414
|
start(text) {
|
|
454997
455415
|
if (text) {
|
|
454998
455416
|
this.text = text;
|
|
454999
455417
|
}
|
|
455000
|
-
if (this
|
|
455418
|
+
if (this.isSilent) {
|
|
455001
455419
|
return this;
|
|
455002
455420
|
}
|
|
455003
|
-
if (!this
|
|
455004
|
-
const
|
|
455421
|
+
if (!this.isEnabled) {
|
|
455422
|
+
const symbol = this.text ? "-" : "";
|
|
455423
|
+
const line = " ".repeat(this.#options.indent) + this.#buildOutputLine(symbol, this.text, this.#options.prefixText, this.#options.suffixText);
|
|
455005
455424
|
if (line.trim() !== "") {
|
|
455006
|
-
this.#stream.write(line + "\n");
|
|
455425
|
+
this.#internalWrite(() => this.#stream.write(line + "\n"));
|
|
455007
455426
|
}
|
|
455008
455427
|
return this;
|
|
455009
455428
|
}
|
|
@@ -455014,9 +455433,10 @@ var init_ora = __esm({
|
|
|
455014
455433
|
cli_cursor_default.hide(this.#stream);
|
|
455015
455434
|
}
|
|
455016
455435
|
if (this.#options.discardStdin && import_node_process6.default.stdin.isTTY) {
|
|
455017
|
-
this.#isDiscardingStdin = true;
|
|
455018
455436
|
stdin_discarder_default.start();
|
|
455437
|
+
this.#isDiscardingStdin = true;
|
|
455019
455438
|
}
|
|
455439
|
+
this.#installHook();
|
|
455020
455440
|
this.render();
|
|
455021
455441
|
this.#id = setInterval(this.render.bind(this), this.interval);
|
|
455022
455442
|
return this;
|
|
@@ -455024,16 +455444,23 @@ var init_ora = __esm({
|
|
|
455024
455444
|
stop() {
|
|
455025
455445
|
clearInterval(this.#id);
|
|
455026
455446
|
this.#id = void 0;
|
|
455027
|
-
this.#frameIndex =
|
|
455028
|
-
|
|
455447
|
+
this.#frameIndex = -1;
|
|
455448
|
+
this.#lastFrameTime = 0;
|
|
455449
|
+
this.#clearRenderDeferral();
|
|
455450
|
+
this.#uninstallHook();
|
|
455451
|
+
if (this.#drainHandler) {
|
|
455452
|
+
this.#stream.removeListener("drain", this.#drainHandler);
|
|
455453
|
+
this.#drainHandler = void 0;
|
|
455454
|
+
}
|
|
455455
|
+
if (this.isEnabled) {
|
|
455029
455456
|
this.clear();
|
|
455030
455457
|
if (this.#options.hideCursor) {
|
|
455031
455458
|
cli_cursor_default.show(this.#stream);
|
|
455032
455459
|
}
|
|
455033
455460
|
}
|
|
455034
|
-
if (this.#
|
|
455035
|
-
stdin_discarder_default.stop();
|
|
455461
|
+
if (this.#isDiscardingStdin) {
|
|
455036
455462
|
this.#isDiscardingStdin = false;
|
|
455463
|
+
stdin_discarder_default.stop();
|
|
455037
455464
|
}
|
|
455038
455465
|
return this;
|
|
455039
455466
|
}
|
|
@@ -455050,20 +455477,16 @@ var init_ora = __esm({
|
|
|
455050
455477
|
return this.stopAndPersist({ symbol: symbols_exports.info, text });
|
|
455051
455478
|
}
|
|
455052
455479
|
stopAndPersist(options = {}) {
|
|
455053
|
-
if (this
|
|
455480
|
+
if (this.isSilent) {
|
|
455054
455481
|
return this;
|
|
455055
455482
|
}
|
|
455056
|
-
const
|
|
455057
|
-
const fullPrefixText = this.#getFullPrefixText(prefixText, " ");
|
|
455058
|
-
const symbolText = options.symbol ?? " ";
|
|
455483
|
+
const symbol = options.symbol ?? " ";
|
|
455059
455484
|
const text = options.text ?? this.text;
|
|
455060
|
-
const
|
|
455061
|
-
const
|
|
455062
|
-
const
|
|
455063
|
-
const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
|
|
455064
|
-
const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + "\n";
|
|
455485
|
+
const prefixText = options.prefixText ?? this.#options.prefixText;
|
|
455486
|
+
const suffixText = options.suffixText ?? this.#options.suffixText;
|
|
455487
|
+
const textToWrite = this.#buildOutputLine(symbol, text, prefixText, suffixText) + "\n";
|
|
455065
455488
|
this.stop();
|
|
455066
|
-
this.#stream.write(textToWrite);
|
|
455489
|
+
this.#internalWrite(() => this.#stream.write(textToWrite));
|
|
455067
455490
|
return this;
|
|
455068
455491
|
}
|
|
455069
455492
|
};
|
|
@@ -455294,7 +455717,6 @@ var require_executor2 = __commonJS({
|
|
|
455294
455717
|
const errorStream = ignoreErrorStream ? "ignore" : process.stderr;
|
|
455295
455718
|
const spawnOptions = {
|
|
455296
455719
|
stdio: [process.stdin, outputStream, errorStream],
|
|
455297
|
-
shell: true,
|
|
455298
455720
|
cwd: path.join(rootDirectory, options.workingDirectory || ""),
|
|
455299
455721
|
env: {
|
|
455300
455722
|
...process.env,
|
|
@@ -455303,7 +455725,7 @@ var require_executor2 = __commonJS({
|
|
|
455303
455725
|
}
|
|
455304
455726
|
};
|
|
455305
455727
|
return new Promise((resolve, reject) => {
|
|
455306
|
-
(0, node_child_process_1.spawn)(
|
|
455728
|
+
(0, node_child_process_1.spawn)("git", args, spawnOptions).on("close", (code) => {
|
|
455307
455729
|
if (code === 0) {
|
|
455308
455730
|
resolve();
|
|
455309
455731
|
} else {
|
|
@@ -455329,7 +455751,7 @@ var require_executor2 = __commonJS({
|
|
|
455329
455751
|
await execute(["add", "."]);
|
|
455330
455752
|
if (options.commit) {
|
|
455331
455753
|
const message = options.message || "initial commit";
|
|
455332
|
-
await execute(["commit",
|
|
455754
|
+
await execute(["commit", "-m", message]);
|
|
455333
455755
|
}
|
|
455334
455756
|
context.logger.info("Successfully initialized git.");
|
|
455335
455757
|
} catch {
|
|
@@ -458275,20 +458697,20 @@ var require_internal = __commonJS({
|
|
|
458275
458697
|
});
|
|
458276
458698
|
|
|
458277
458699
|
// node_modules/@angular-devkit/architect/package.json
|
|
458278
|
-
var
|
|
458700
|
+
var require_package2 = __commonJS({
|
|
458279
458701
|
"node_modules/@angular-devkit/architect/package.json"(exports2, module2) {
|
|
458280
458702
|
module2.exports = {
|
|
458281
458703
|
name: "@angular-devkit/architect",
|
|
458282
|
-
version: "0.
|
|
458704
|
+
version: "0.2102.28",
|
|
458283
458705
|
description: "Angular Build Facade",
|
|
458284
458706
|
experimental: true,
|
|
458285
458707
|
bin: {
|
|
458286
|
-
architect: "
|
|
458708
|
+
architect: "bin/cli.js"
|
|
458287
458709
|
},
|
|
458288
458710
|
main: "src/index.js",
|
|
458289
458711
|
typings: "src/index.d.ts",
|
|
458290
458712
|
dependencies: {
|
|
458291
|
-
"@angular-devkit/core": "21.
|
|
458713
|
+
"@angular-devkit/core": "21.2.28",
|
|
458292
458714
|
rxjs: "7.8.2"
|
|
458293
458715
|
},
|
|
458294
458716
|
builders: "./builders/builders.json",
|
|
@@ -458301,9 +458723,9 @@ var require_package3 = __commonJS({
|
|
|
458301
458723
|
],
|
|
458302
458724
|
repository: {
|
|
458303
458725
|
type: "git",
|
|
458304
|
-
url: "https://github.com/angular/angular-cli.git"
|
|
458726
|
+
url: "git+https://github.com/angular/angular-cli.git"
|
|
458305
458727
|
},
|
|
458306
|
-
packageManager: "pnpm@10.
|
|
458728
|
+
packageManager: "pnpm@10.33.2",
|
|
458307
458729
|
engines: {
|
|
458308
458730
|
node: "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
458309
458731
|
npm: "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
@@ -458475,7 +458897,7 @@ var require_create_builder = __commonJS({
|
|
|
458475
458897
|
return {
|
|
458476
458898
|
handler,
|
|
458477
458899
|
[internal_1.BuilderSymbol]: true,
|
|
458478
|
-
[internal_1.BuilderVersionSymbol]:
|
|
458900
|
+
[internal_1.BuilderVersionSymbol]: require_package2().version,
|
|
458479
458901
|
// Only needed for type safety around `Builder` types.
|
|
458480
458902
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
458481
458903
|
__OptionT: null
|
|
@@ -459832,11 +460254,10 @@ typescript/lib/typescript.js:
|
|
|
459832
460254
|
and limitations under the License.
|
|
459833
460255
|
***************************************************************************** *)
|
|
459834
460256
|
|
|
459835
|
-
ejs/lib/ejs.js:
|
|
460257
|
+
ejs/lib/cjs/ejs.js:
|
|
459836
460258
|
(**
|
|
459837
460259
|
* @file Embedded JavaScript templating engine. {@link http://ejs.co}
|
|
459838
460260
|
* @author Matthew Eernisse <mde@fleegix.org>
|
|
459839
|
-
* @author Tiancheng "Timothy" Gu <timothygu99@gmail.com>
|
|
459840
460261
|
* @project EJS
|
|
459841
460262
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
459842
460263
|
*)
|
|
@@ -459845,7 +460266,7 @@ lodash-es/lodash.js:
|
|
|
459845
460266
|
(**
|
|
459846
460267
|
* @license
|
|
459847
460268
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
459848
|
-
* Build: `lodash modularize exports="es" -o ./`
|
|
460269
|
+
* Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./`
|
|
459849
460270
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
459850
460271
|
* Released under MIT license <https://lodash.com/license>
|
|
459851
460272
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|