@ng-atomic/schematics 20.67.0 → 20.69.4

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.
@@ -411137,7 +411137,7 @@ ${fromBody}`;
411137
411137
  exports22.parseString = parseString;
411138
411138
  }
411139
411139
  });
411140
- var require_package4 = __commonJS22({
411140
+ var require_package3 = __commonJS22({
411141
411141
  "node_modules/editorconfig/package.json"(exports22, module22) {
411142
411142
  module22.exports = {
411143
411143
  name: "editorconfig",
@@ -411339,7 +411339,7 @@ ${fromBody}`;
411339
411339
  var fnmatch_1 = __importDefault22(require_fnmatch());
411340
411340
  var ini_1 = require_ini();
411341
411341
  exports22.parseString = ini_1.parseString;
411342
- var package_json_1 = __importDefault22(require_package4());
411342
+ var package_json_1 = __importDefault22(require_package3());
411343
411343
  var knownProps = {
411344
411344
  end_of_line: true,
411345
411345
  indent_style: true,
@@ -430776,22 +430776,26 @@ var require_format_files = __commonJS({
430776
430776
  "use strict";
430777
430777
  Object.defineProperty(exports2, "__esModule", { value: true });
430778
430778
  exports2.formatFiles = formatFiles;
430779
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
430779
430780
  var devkit_exports_1 = require("nx/src/devkit-exports");
430780
430781
  var devkit_internals_1 = require("nx/src/devkit-internals");
430781
- var path = require("path");
430782
+ var path = tslib_1.__importStar(require("path"));
430782
430783
  async function formatFiles(tree, options = {}) {
430784
+ options.sortRootTsconfigPaths ??= process.env.NX_FORMAT_SORT_TSCONFIG_PATHS === "true";
430785
+ if (options.sortRootTsconfigPaths) {
430786
+ sortTsConfig(tree);
430787
+ }
430788
+ if (process.env.NX_SKIP_FORMAT === "true") {
430789
+ return;
430790
+ }
430783
430791
  let prettier;
430784
430792
  try {
430785
- prettier = await Promise.resolve().then(() => require_prettier());
430793
+ prettier = await Promise.resolve().then(() => tslib_1.__importStar(require_prettier()));
430786
430794
  if (!(0, devkit_internals_1.isUsingPrettierInTree)(tree)) {
430787
430795
  return;
430788
430796
  }
430789
430797
  } catch {
430790
430798
  }
430791
- options.sortRootTsconfigPaths ??= process.env.NX_FORMAT_SORT_TSCONFIG_PATHS === "true";
430792
- if (options.sortRootTsconfigPaths) {
430793
- sortTsConfig(tree);
430794
- }
430795
430799
  if (!prettier)
430796
430800
  return;
430797
430801
  const files = new Set(tree.listChanges().filter((file) => file.type !== "DELETE"));
@@ -431147,16 +431151,18 @@ var require_binary_extensions = __commonJS({
431147
431151
  }
431148
431152
  });
431149
431153
 
431150
- // node_modules/ejs/lib/utils.js
431154
+ // node_modules/ejs/lib/cjs/utils.js
431151
431155
  var require_utils = __commonJS({
431152
- "node_modules/ejs/lib/utils.js"(exports2) {
431156
+ "node_modules/ejs/lib/cjs/utils.js"(exports2, module2) {
431153
431157
  "use strict";
431158
+ Object.defineProperty(exports2, "__esModule", { value: true });
431159
+ var utils = {};
431154
431160
  var regExpChars = /[|\\{}()[\]^$+*?.]/g;
431155
431161
  var hasOwnProperty = Object.prototype.hasOwnProperty;
431156
431162
  var hasOwn = function(obj, key) {
431157
431163
  return hasOwnProperty.apply(obj, [key]);
431158
431164
  };
431159
- exports2.escapeRegExpChars = function(string) {
431165
+ utils.escapeRegExpChars = function(string) {
431160
431166
  if (!string) {
431161
431167
  return "";
431162
431168
  }
@@ -431185,7 +431191,7 @@ function encode_char(c) {
431185
431191
  return _ENCODE_HTML_RULES[c] || c;
431186
431192
  };
431187
431193
  `;
431188
- exports2.escapeXML = function(markup) {
431194
+ utils.escapeXML = function(markup) {
431189
431195
  return markup == void 0 ? "" : String(markup).replace(_MATCH_HTML, encode_char);
431190
431196
  };
431191
431197
  function escapeXMLToString() {
@@ -431193,14 +431199,14 @@ function encode_char(c) {
431193
431199
  }
431194
431200
  try {
431195
431201
  if (typeof Object.defineProperty === "function") {
431196
- Object.defineProperty(exports2.escapeXML, "toString", { value: escapeXMLToString });
431202
+ Object.defineProperty(utils.escapeXML, "toString", { value: escapeXMLToString });
431197
431203
  } else {
431198
- exports2.escapeXML.toString = escapeXMLToString;
431204
+ utils.escapeXML.toString = escapeXMLToString;
431199
431205
  }
431200
431206
  } catch (err) {
431201
431207
  console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
431202
431208
  }
431203
- exports2.shallowCopy = function(to, from) {
431209
+ utils.shallowCopy = function(to, from) {
431204
431210
  from = from || {};
431205
431211
  if (to !== null && to !== void 0) {
431206
431212
  for (var p in from) {
@@ -431215,7 +431221,7 @@ function encode_char(c) {
431215
431221
  }
431216
431222
  return to;
431217
431223
  };
431218
- exports2.shallowCopyFromList = function(to, from, list) {
431224
+ utils.shallowCopyFromList = function(to, from, list) {
431219
431225
  list = list || [];
431220
431226
  from = from || {};
431221
431227
  if (to !== null && to !== void 0) {
@@ -431234,7 +431240,7 @@ function encode_char(c) {
431234
431240
  }
431235
431241
  return to;
431236
431242
  };
431237
- exports2.cache = {
431243
+ utils.cache = {
431238
431244
  _data: {},
431239
431245
  set: function(key, val) {
431240
431246
  this._data[key] = val;
@@ -431249,12 +431255,12 @@ function encode_char(c) {
431249
431255
  this._data = {};
431250
431256
  }
431251
431257
  };
431252
- exports2.hyphenToCamel = function(str) {
431258
+ utils.hyphenToCamel = function(str) {
431253
431259
  return str.replace(/-[a-z]/g, function(match) {
431254
431260
  return match[1].toUpperCase();
431255
431261
  });
431256
431262
  };
431257
- exports2.createNullProtoObjWherePossible = (function() {
431263
+ utils.createNullProtoObjWherePossible = (function() {
431258
431264
  if (typeof Object.create == "function") {
431259
431265
  return function() {
431260
431266
  return /* @__PURE__ */ Object.create(null);
@@ -431269,8 +431275,8 @@ function encode_char(c) {
431269
431275
  return {};
431270
431276
  };
431271
431277
  })();
431272
- exports2.hasOwnOnlyObject = function(obj) {
431273
- var o = exports2.createNullProtoObjWherePossible();
431278
+ utils.hasOwnOnlyObject = function(obj) {
431279
+ var o = utils.createNullProtoObjWherePossible();
431274
431280
  for (var p in obj) {
431275
431281
  if (hasOwn(obj, p)) {
431276
431282
  o[p] = obj[p];
@@ -431278,71 +431284,30 @@ function encode_char(c) {
431278
431284
  }
431279
431285
  return o;
431280
431286
  };
431287
+ if (typeof exports2 != "undefined") {
431288
+ module2.exports = utils;
431289
+ }
431290
+ exports2.default = utils;
431281
431291
  }
431282
431292
  });
431283
431293
 
431284
- // node_modules/ejs/package.json
431285
- var require_package2 = __commonJS({
431286
- "node_modules/ejs/package.json"(exports2, module2) {
431287
- module2.exports = {
431288
- name: "ejs",
431289
- description: "Embedded JavaScript templates",
431290
- keywords: [
431291
- "template",
431292
- "engine",
431293
- "ejs"
431294
- ],
431295
- version: "3.1.10",
431296
- author: "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
431297
- license: "Apache-2.0",
431298
- bin: {
431299
- ejs: "./bin/cli.js"
431300
- },
431301
- main: "./lib/ejs.js",
431302
- jsdelivr: "ejs.min.js",
431303
- unpkg: "ejs.min.js",
431304
- repository: {
431305
- type: "git",
431306
- url: "git://github.com/mde/ejs.git"
431307
- },
431308
- bugs: "https://github.com/mde/ejs/issues",
431309
- homepage: "https://github.com/mde/ejs",
431310
- dependencies: {
431311
- jake: "^10.8.5"
431312
- },
431313
- devDependencies: {
431314
- browserify: "^16.5.1",
431315
- eslint: "^6.8.0",
431316
- "git-directory-deploy": "^1.5.1",
431317
- jsdoc: "^4.0.2",
431318
- "lru-cache": "^4.0.1",
431319
- mocha: "^10.2.0",
431320
- "uglify-js": "^3.3.16"
431321
- },
431322
- engines: {
431323
- node: ">=0.10.0"
431324
- },
431325
- scripts: {
431326
- test: "npx jake test"
431327
- }
431328
- };
431329
- }
431330
- });
431331
-
431332
- // node_modules/ejs/lib/ejs.js
431294
+ // node_modules/ejs/lib/cjs/ejs.js
431333
431295
  var require_ejs = __commonJS({
431334
- "node_modules/ejs/lib/ejs.js"(exports2) {
431296
+ "node_modules/ejs/lib/cjs/ejs.js"(exports2, module2) {
431335
431297
  "use strict";
431336
- var fs = require("fs");
431337
- var path = require("path");
431338
- var utils = require_utils();
431339
- var scopeOptionWarned = false;
431340
- var _VERSION_STRING = require_package2().version;
431298
+ var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
431299
+ return mod && mod.__esModule ? mod : { "default": mod };
431300
+ };
431301
+ Object.defineProperty(exports2, "__esModule", { value: true });
431302
+ var fs_1 = __importDefault2(require("fs"));
431303
+ var path_1 = __importDefault2(require("path"));
431304
+ var utils_js_1 = __importDefault2(require_utils());
431305
+ var DECLARATION_KEYWORD = "var";
431306
+ var ejs = {};
431341
431307
  var _DEFAULT_OPEN_DELIMITER = "<";
431342
431308
  var _DEFAULT_CLOSE_DELIMITER = ">";
431343
431309
  var _DEFAULT_DELIMITER = "%";
431344
431310
  var _DEFAULT_LOCALS_NAME = "locals";
431345
- var _NAME = "ejs";
431346
431311
  var _REGEX_STRING = "(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)";
431347
431312
  var _OPTS_PASSABLE_WITH_DATA = [
431348
431313
  "delimiter",
@@ -431350,7 +431315,6 @@ var require_ejs = __commonJS({
431350
431315
  "context",
431351
431316
  "debug",
431352
431317
  "compileDebug",
431353
- "client",
431354
431318
  "_with",
431355
431319
  "rmWhitespace",
431356
431320
  "strict",
@@ -431360,14 +431324,14 @@ var require_ejs = __commonJS({
431360
431324
  var _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat("cache");
431361
431325
  var _BOM = /^\uFEFF/;
431362
431326
  var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
431363
- exports2.cache = utils.cache;
431364
- exports2.fileLoader = fs.readFileSync;
431365
- exports2.localsName = _DEFAULT_LOCALS_NAME;
431366
- exports2.promiseImpl = new Function("return this;")().Promise;
431367
- exports2.resolveInclude = function(name, filename, isDir) {
431368
- var dirname = path.dirname;
431369
- var extname = path.extname;
431370
- var resolve = path.resolve;
431327
+ ejs.cache = utils_js_1.default.cache;
431328
+ ejs.fileLoader = fs_1.default.readFileSync;
431329
+ ejs.localsName = _DEFAULT_LOCALS_NAME;
431330
+ ejs.promiseImpl = new Function("return this;")().Promise;
431331
+ ejs.resolveInclude = function(name, filename, isDir) {
431332
+ var dirname = path_1.default.dirname;
431333
+ var extname = path_1.default.extname;
431334
+ var resolve = path_1.default.resolve;
431371
431335
  var includePath = resolve(isDir ? filename : dirname(filename), name);
431372
431336
  var ext = extname(name);
431373
431337
  if (!ext) {
@@ -431378,36 +431342,36 @@ var require_ejs = __commonJS({
431378
431342
  function resolvePaths(name, paths) {
431379
431343
  var filePath;
431380
431344
  if (paths.some(function(v) {
431381
- filePath = exports2.resolveInclude(name, v, true);
431382
- return fs.existsSync(filePath);
431345
+ filePath = ejs.resolveInclude(name, v, true);
431346
+ return fs_1.default.existsSync(filePath);
431383
431347
  })) {
431384
431348
  return filePath;
431385
431349
  }
431386
431350
  }
431387
- function getIncludePath(path2, options) {
431351
+ function getIncludePath(path, options) {
431388
431352
  var includePath;
431389
431353
  var filePath;
431390
431354
  var views = options.views;
431391
- var match = /^[A-Za-z]+:\\|^\//.exec(path2);
431355
+ var match = /^[A-Za-z]+:\\|^\//.exec(path);
431392
431356
  if (match && match.length) {
431393
- path2 = path2.replace(/^\/*/, "");
431357
+ path = path.replace(/^\/*/, "");
431394
431358
  if (Array.isArray(options.root)) {
431395
- includePath = resolvePaths(path2, options.root);
431359
+ includePath = resolvePaths(path, options.root);
431396
431360
  } else {
431397
- includePath = exports2.resolveInclude(path2, options.root || "/", true);
431361
+ includePath = ejs.resolveInclude(path, options.root || "/", true);
431398
431362
  }
431399
431363
  } else {
431400
431364
  if (options.filename) {
431401
- filePath = exports2.resolveInclude(path2, options.filename);
431402
- if (fs.existsSync(filePath)) {
431365
+ filePath = ejs.resolveInclude(path, options.filename);
431366
+ if (fs_1.default.existsSync(filePath)) {
431403
431367
  includePath = filePath;
431404
431368
  }
431405
431369
  }
431406
431370
  if (!includePath && Array.isArray(views)) {
431407
- includePath = resolvePaths(path2, views);
431371
+ includePath = resolvePaths(path, views);
431408
431372
  }
431409
431373
  if (!includePath && typeof options.includer !== "function") {
431410
- throw new Error('Could not find the include file "' + options.escapeFunction(path2) + '"');
431374
+ throw new Error('Could not find the include file "' + options.escapeFunction(path) + '"');
431411
431375
  }
431412
431376
  }
431413
431377
  return includePath;
@@ -431420,7 +431384,7 @@ var require_ejs = __commonJS({
431420
431384
  if (!filename) {
431421
431385
  throw new Error("cache option requires a filename");
431422
431386
  }
431423
- func = exports2.cache.get(filename);
431387
+ func = ejs.cache.get(filename);
431424
431388
  if (func) {
431425
431389
  return func;
431426
431390
  }
@@ -431433,17 +431397,17 @@ var require_ejs = __commonJS({
431433
431397
  }
431434
431398
  template = fileLoader(filename).toString().replace(_BOM, "");
431435
431399
  }
431436
- func = exports2.compile(template, options);
431400
+ func = ejs.compile(template, options);
431437
431401
  if (options.cache) {
431438
- exports2.cache.set(filename, func);
431402
+ ejs.cache.set(filename, func);
431439
431403
  }
431440
431404
  return func;
431441
431405
  }
431442
431406
  function tryHandleCache(options, data, cb) {
431443
431407
  var result;
431444
431408
  if (!cb) {
431445
- if (typeof exports2.promiseImpl == "function") {
431446
- return new exports2.promiseImpl(function(resolve, reject) {
431409
+ if (typeof ejs.promiseImpl == "function") {
431410
+ return new ejs.promiseImpl(function(resolve, reject) {
431447
431411
  try {
431448
431412
  result = handleCache(options)(data);
431449
431413
  resolve(result);
@@ -431464,13 +431428,13 @@ var require_ejs = __commonJS({
431464
431428
  }
431465
431429
  }
431466
431430
  function fileLoader(filePath) {
431467
- return exports2.fileLoader(filePath);
431431
+ return ejs.fileLoader(filePath);
431468
431432
  }
431469
- function includeFile(path2, options) {
431470
- var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
431471
- opts.filename = getIncludePath(path2, opts);
431433
+ function includeFile(path, options) {
431434
+ var opts = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), options);
431435
+ opts.filename = getIncludePath(path, opts);
431472
431436
  if (typeof options.includer === "function") {
431473
- var includerResult = options.includer(path2, opts.filename);
431437
+ var includerResult = options.includer(path, opts.filename);
431474
431438
  if (includerResult) {
431475
431439
  if (includerResult.filename) {
431476
431440
  opts.filename = includerResult.filename;
@@ -431498,13 +431462,10 @@ var require_ejs = __commonJS({
431498
431462
  function stripSemi(str) {
431499
431463
  return str.replace(/;(\s*$)/, "$1");
431500
431464
  }
431501
- exports2.compile = function compile(template, opts) {
431465
+ ejs.compile = function compile(template, opts) {
431502
431466
  var templ;
431503
431467
  if (opts && opts.scope) {
431504
- if (!scopeOptionWarned) {
431505
- console.warn("`scope` option is deprecated and will be removed in EJS 3");
431506
- scopeOptionWarned = true;
431507
- }
431468
+ console.warn("`scope` option is deprecated and will be removed in future EJS");
431508
431469
  if (!opts.context) {
431509
431470
  opts.context = opts.scope;
431510
431471
  }
@@ -431513,15 +431474,15 @@ var require_ejs = __commonJS({
431513
431474
  templ = new Template(template, opts);
431514
431475
  return templ.compile();
431515
431476
  };
431516
- exports2.render = function(template, d, o) {
431517
- var data = d || utils.createNullProtoObjWherePossible();
431518
- var opts = o || utils.createNullProtoObjWherePossible();
431477
+ ejs.render = function(template, d, o) {
431478
+ var data = d || utils_js_1.default.createNullProtoObjWherePossible();
431479
+ var opts = o || utils_js_1.default.createNullProtoObjWherePossible();
431519
431480
  if (arguments.length == 2) {
431520
- utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
431481
+ utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
431521
431482
  }
431522
431483
  return handleCache(opts, template)(data);
431523
431484
  };
431524
- exports2.renderFile = function() {
431485
+ ejs.renderFile = function() {
431525
431486
  var args = Array.prototype.slice.call(arguments);
431526
431487
  var filename = args.shift();
431527
431488
  var cb;
@@ -431534,7 +431495,7 @@ var require_ejs = __commonJS({
431534
431495
  if (args.length) {
431535
431496
  data = args.shift();
431536
431497
  if (args.length) {
431537
- utils.shallowCopy(opts, args.pop());
431498
+ utils_js_1.default.shallowCopy(opts, args.pop());
431538
431499
  } else {
431539
431500
  if (data.settings) {
431540
431501
  if (data.settings.views) {
@@ -431545,37 +431506,36 @@ var require_ejs = __commonJS({
431545
431506
  }
431546
431507
  viewOpts = data.settings["view options"];
431547
431508
  if (viewOpts) {
431548
- utils.shallowCopy(opts, viewOpts);
431509
+ utils_js_1.default.shallowCopy(opts, viewOpts);
431549
431510
  }
431550
431511
  }
431551
- utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);
431512
+ utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);
431552
431513
  }
431553
431514
  opts.filename = filename;
431554
431515
  } else {
431555
- data = utils.createNullProtoObjWherePossible();
431516
+ data = utils_js_1.default.createNullProtoObjWherePossible();
431556
431517
  }
431557
431518
  return tryHandleCache(opts, data, cb);
431558
431519
  };
431559
- exports2.Template = Template;
431560
- exports2.clearCache = function() {
431561
- exports2.cache.reset();
431520
+ ejs.Template = Template;
431521
+ ejs.clearCache = function() {
431522
+ ejs.cache.reset();
431562
431523
  };
431563
431524
  function Template(text, optsParam) {
431564
- var opts = utils.hasOwnOnlyObject(optsParam);
431565
- var options = utils.createNullProtoObjWherePossible();
431525
+ var opts = utils_js_1.default.hasOwnOnlyObject(optsParam);
431526
+ var options = utils_js_1.default.createNullProtoObjWherePossible();
431566
431527
  this.templateText = text;
431567
431528
  this.mode = null;
431568
431529
  this.truncate = false;
431569
431530
  this.currentLine = 1;
431570
431531
  this.source = "";
431571
- options.client = opts.client || false;
431572
- options.escapeFunction = opts.escape || opts.escapeFunction || utils.escapeXML;
431532
+ options.escapeFunction = opts.escape || opts.escapeFunction || utils_js_1.default.escapeXML;
431573
431533
  options.compileDebug = opts.compileDebug !== false;
431574
431534
  options.debug = !!opts.debug;
431575
431535
  options.filename = opts.filename;
431576
- options.openDelimiter = opts.openDelimiter || exports2.openDelimiter || _DEFAULT_OPEN_DELIMITER;
431577
- options.closeDelimiter = opts.closeDelimiter || exports2.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;
431578
- options.delimiter = opts.delimiter || exports2.delimiter || _DEFAULT_DELIMITER;
431536
+ options.openDelimiter = opts.openDelimiter || ejs.openDelimiter || _DEFAULT_OPEN_DELIMITER;
431537
+ options.closeDelimiter = opts.closeDelimiter || ejs.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;
431538
+ options.delimiter = opts.delimiter || ejs.delimiter || _DEFAULT_DELIMITER;
431579
431539
  options.strict = opts.strict || false;
431580
431540
  options.context = opts.context;
431581
431541
  options.cache = opts.cache || false;
@@ -431583,7 +431543,7 @@ var require_ejs = __commonJS({
431583
431543
  options.root = opts.root;
431584
431544
  options.includer = opts.includer;
431585
431545
  options.outputFunctionName = opts.outputFunctionName;
431586
- options.localsName = opts.localsName || exports2.localsName || _DEFAULT_LOCALS_NAME;
431546
+ options.localsName = opts.localsName || ejs.localsName || _DEFAULT_LOCALS_NAME;
431587
431547
  options.views = opts.views;
431588
431548
  options.async = opts.async;
431589
431549
  options.destructuredLocals = opts.destructuredLocals;
@@ -431606,9 +431566,9 @@ var require_ejs = __commonJS({
431606
431566
  Template.prototype = {
431607
431567
  createRegex: function() {
431608
431568
  var str = _REGEX_STRING;
431609
- var delim = utils.escapeRegExpChars(this.opts.delimiter);
431610
- var open = utils.escapeRegExpChars(this.opts.openDelimiter);
431611
- var close = utils.escapeRegExpChars(this.opts.closeDelimiter);
431569
+ var delim = utils_js_1.default.escapeRegExpChars(this.opts.delimiter);
431570
+ var open = utils_js_1.default.escapeRegExpChars(this.opts.openDelimiter);
431571
+ var close = utils_js_1.default.escapeRegExpChars(this.opts.closeDelimiter);
431612
431572
  str = str.replace(/%/g, delim).replace(/</g, open).replace(/>/g, close);
431613
431573
  return new RegExp(str);
431614
431574
  },
@@ -431623,27 +431583,27 @@ var require_ejs = __commonJS({
431623
431583
  var sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : "undefined";
431624
431584
  if (!this.source) {
431625
431585
  this.generateSource();
431626
- prepended += ' var __output = "";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n';
431586
+ prepended += " ".concat(DECLARATION_KEYWORD, ' __output = "";\n') + " function __append(s) { if (s !== undefined && s !== null) __output += s }\n";
431627
431587
  if (opts.outputFunctionName) {
431628
431588
  if (!_JS_IDENTIFIER.test(opts.outputFunctionName)) {
431629
431589
  throw new Error("outputFunctionName is not a valid JS identifier.");
431630
431590
  }
431631
- prepended += " var " + opts.outputFunctionName + " = __append;\n";
431591
+ prepended += " ".concat(DECLARATION_KEYWORD, " ") + opts.outputFunctionName + " = __append;\n";
431632
431592
  }
431633
431593
  if (opts.localsName && !_JS_IDENTIFIER.test(opts.localsName)) {
431634
431594
  throw new Error("localsName is not a valid JS identifier.");
431635
431595
  }
431636
431596
  if (opts.destructuredLocals && opts.destructuredLocals.length) {
431637
- var destructuring = " var __locals = (" + opts.localsName + " || {}),\n";
431597
+ var destructuring = " ".concat(DECLARATION_KEYWORD, " __locals = (") + opts.localsName + " || {}),\n";
431638
431598
  for (var i = 0; i < opts.destructuredLocals.length; i++) {
431639
- var name = opts.destructuredLocals[i];
431640
- if (!_JS_IDENTIFIER.test(name)) {
431599
+ var name_1 = opts.destructuredLocals[i];
431600
+ if (!_JS_IDENTIFIER.test(name_1)) {
431641
431601
  throw new Error("destructuredLocals[" + i + "] is not a valid JS identifier.");
431642
431602
  }
431643
431603
  if (i > 0) {
431644
431604
  destructuring += ",\n ";
431645
431605
  }
431646
- destructuring += name + " = __locals." + name;
431606
+ destructuring += name_1 + " = __locals." + name_1;
431647
431607
  }
431648
431608
  prepended += destructuring + ";\n";
431649
431609
  }
@@ -431655,16 +431615,10 @@ var require_ejs = __commonJS({
431655
431615
  this.source = prepended + this.source + appended;
431656
431616
  }
431657
431617
  if (opts.compileDebug) {
431658
- src = "var __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";
431618
+ 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";
431659
431619
  } else {
431660
431620
  src = this.source;
431661
431621
  }
431662
- if (opts.client) {
431663
- src = "escapeFn = escapeFn || " + escapeFn.toString() + ";\n" + src;
431664
- if (opts.compileDebug) {
431665
- src = "rethrow = rethrow || " + rethrow.toString() + ";\n" + src;
431666
- }
431667
- }
431668
431622
  if (opts.strict) {
431669
431623
  src = '"use strict";\n' + src;
431670
431624
  }
@@ -431704,22 +431658,19 @@ var require_ejs = __commonJS({
431704
431658
  }
431705
431659
  throw e;
431706
431660
  }
431707
- var returnedFn = opts.client ? fn : function anonymous(data) {
431708
- var include = function(path2, includeData) {
431709
- var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
431661
+ var returnedFn = function anonymous(data) {
431662
+ var include = function(path, includeData) {
431663
+ var d = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), data);
431710
431664
  if (includeData) {
431711
- d = utils.shallowCopy(d, includeData);
431665
+ d = utils_js_1.default.shallowCopy(d, includeData);
431712
431666
  }
431713
- return includeFile(path2, opts)(d);
431667
+ return includeFile(path, opts)(d);
431714
431668
  };
431715
- return fn.apply(
431716
- opts.context,
431717
- [data || utils.createNullProtoObjWherePossible(), escapeFn, include, rethrow]
431718
- );
431669
+ return fn.apply(opts.context, [data || utils_js_1.default.createNullProtoObjWherePossible(), escapeFn, include, rethrow]);
431719
431670
  };
431720
431671
  if (opts.filename && typeof Object.defineProperty === "function") {
431721
431672
  var filename = opts.filename;
431722
- var basename = path.basename(filename, path.extname(filename));
431673
+ var basename = path_1.default.basename(filename, path_1.default.extname(filename));
431723
431674
  try {
431724
431675
  Object.defineProperty(returnedFn, "name", {
431725
431676
  value: basename,
@@ -431737,12 +431688,16 @@ var require_ejs = __commonJS({
431737
431688
  if (opts.rmWhitespace) {
431738
431689
  this.templateText = this.templateText.replace(/[\r\n]+/g, "\n").replace(/^\s+|\s+$/gm, "");
431739
431690
  }
431740
- this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
431741
431691
  var self2 = this;
431742
- var matches = this.parseTemplateText();
431743
431692
  var d = this.opts.delimiter;
431744
431693
  var o = this.opts.openDelimiter;
431745
431694
  var c = this.opts.closeDelimiter;
431695
+ var openWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars(o + d + "_");
431696
+ var closeWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars("_" + d + c);
431697
+ var openWhitespaceSlurpReplacement = o + d + "_";
431698
+ var closeWhitespaceSlurpReplacement = "_" + d + c;
431699
+ this.templateText = this.templateText.replace(new RegExp("[ \\t]*" + openWhitespaceSlurpTag, "gm"), openWhitespaceSlurpReplacement).replace(new RegExp(closeWhitespaceSlurpTag + "[ \\t]*", "gm"), closeWhitespaceSlurpReplacement);
431700
+ var matches = this.parseTemplateText();
431746
431701
  if (matches && matches.length) {
431747
431702
  matches.forEach(function(line, index) {
431748
431703
  var closing;
@@ -431869,13 +431824,15 @@ var require_ejs = __commonJS({
431869
431824
  }
431870
431825
  }
431871
431826
  };
431872
- exports2.escapeXML = utils.escapeXML;
431873
- exports2.__express = exports2.renderFile;
431874
- exports2.VERSION = _VERSION_STRING;
431875
- exports2.name = _NAME;
431827
+ ejs.escapeXML = utils_js_1.default.escapeXML;
431828
+ ejs.__express = ejs.renderFile;
431876
431829
  if (typeof window != "undefined") {
431877
- window.ejs = exports2;
431830
+ window.ejs = ejs;
431831
+ }
431832
+ if (typeof module2 != "undefined") {
431833
+ module2.exports = ejs;
431878
431834
  }
431835
+ exports2.default = ejs;
431879
431836
  }
431880
431837
  });
431881
431838
 
@@ -431886,8 +431843,9 @@ var require_generate_files = __commonJS({
431886
431843
  Object.defineProperty(exports2, "__esModule", { value: true });
431887
431844
  exports2.OverwriteStrategy = void 0;
431888
431845
  exports2.generateFiles = generateFiles;
431846
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
431889
431847
  var fs_1 = require("fs");
431890
- var path = require("path");
431848
+ var path = tslib_1.__importStar(require("path"));
431891
431849
  var binary_extensions_1 = require_binary_extensions();
431892
431850
  var devkit_exports_1 = require("nx/src/devkit-exports");
431893
431851
  var OverwriteStrategy;
@@ -432159,6 +432117,18 @@ var require_semver = __commonJS({
432159
432117
  var { safeRe: re, t } = require_re();
432160
432118
  var parseOptions = require_parse_options();
432161
432119
  var { compareIdentifiers } = require_identifiers();
432120
+ var isPrereleaseIdentifier = (prerelease, identifier) => {
432121
+ const identifiers = identifier.split(".");
432122
+ if (identifiers.length > prerelease.length) {
432123
+ return false;
432124
+ }
432125
+ for (let i = 0; i < identifiers.length; i++) {
432126
+ if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
432127
+ return false;
432128
+ }
432129
+ }
432130
+ return true;
432131
+ };
432162
432132
  var SemVer = class _SemVer {
432163
432133
  constructor(version, options) {
432164
432134
  options = parseOptions(options);
@@ -432405,8 +432375,9 @@ var require_semver = __commonJS({
432405
432375
  if (identifierBase === false) {
432406
432376
  prerelease = [identifier];
432407
432377
  }
432408
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
432409
- if (isNaN(this.prerelease[1])) {
432378
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
432379
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
432380
+ if (isNaN(prereleaseBase)) {
432410
432381
  this.prerelease = prerelease;
432411
432382
  }
432412
432383
  } else {
@@ -432808,6 +432779,47 @@ var require_coerce = __commonJS({
432808
432779
  }
432809
432780
  });
432810
432781
 
432782
+ // node_modules/@nx/devkit/node_modules/semver/functions/truncate.js
432783
+ var require_truncate = __commonJS({
432784
+ "node_modules/@nx/devkit/node_modules/semver/functions/truncate.js"(exports2, module2) {
432785
+ "use strict";
432786
+ var parse2 = require_parse();
432787
+ var constants = require_constants();
432788
+ var SemVer = require_semver();
432789
+ var truncate = (version, truncation, options) => {
432790
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
432791
+ return null;
432792
+ }
432793
+ const clonedVersion = cloneInputVersion(version, options);
432794
+ return clonedVersion && doTruncation(clonedVersion, truncation);
432795
+ };
432796
+ var cloneInputVersion = (version, options) => {
432797
+ const versionStringToParse = version instanceof SemVer ? version.version : version;
432798
+ return parse2(versionStringToParse, options);
432799
+ };
432800
+ var doTruncation = (version, truncation) => {
432801
+ if (isPrerelease(truncation)) {
432802
+ return version.version;
432803
+ }
432804
+ version.prerelease = [];
432805
+ switch (truncation) {
432806
+ case "major":
432807
+ version.minor = 0;
432808
+ version.patch = 0;
432809
+ break;
432810
+ case "minor":
432811
+ version.patch = 0;
432812
+ break;
432813
+ }
432814
+ return version.format();
432815
+ };
432816
+ var isPrerelease = (type) => {
432817
+ return type.startsWith("pre");
432818
+ };
432819
+ module2.exports = truncate;
432820
+ }
432821
+ });
432822
+
432811
432823
  // node_modules/@nx/devkit/node_modules/semver/internal/lrucache.js
432812
432824
  var require_lrucache = __commonJS({
432813
432825
  "node_modules/@nx/devkit/node_modules/semver/internal/lrucache.js"(exports2, module2) {
@@ -432916,6 +432928,7 @@ var require_range = __commonJS({
432916
432928
  return this.range;
432917
432929
  }
432918
432930
  parseRange(range) {
432931
+ range = range.replace(BUILDSTRIPRE, "");
432919
432932
  const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
432920
432933
  const memoKey = memoOpts + ":" + range;
432921
432934
  const cached = cache.get(memoKey);
@@ -432998,12 +433011,14 @@ var require_range = __commonJS({
432998
433011
  var SemVer = require_semver();
432999
433012
  var {
433000
433013
  safeRe: re,
433014
+ src,
433001
433015
  t,
433002
433016
  comparatorTrimReplace,
433003
433017
  tildeTrimReplace,
433004
433018
  caretTrimReplace
433005
433019
  } = require_re();
433006
433020
  var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
433021
+ var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
433007
433022
  var isNullSet = (c) => c.value === "<0.0.0-0";
433008
433023
  var isAny = (c) => c.value === "";
433009
433024
  var isSatisfiable = (comparators, options) => {
@@ -433032,20 +433047,22 @@ var require_range = __commonJS({
433032
433047
  return comp;
433033
433048
  };
433034
433049
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
433050
+ var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
433035
433051
  var replaceTildes = (comp, options) => {
433036
433052
  return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
433037
433053
  };
433038
433054
  var replaceTilde = (comp, options) => {
433039
433055
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
433056
+ const z = options.includePrerelease ? "-0" : "";
433040
433057
  return comp.replace(r, (_, M, m, p, pr) => {
433041
433058
  debug("tilde", comp, _, M, m, p, pr);
433042
433059
  let ret;
433043
433060
  if (isX(M)) {
433044
433061
  ret = "";
433045
433062
  } else if (isX(m)) {
433046
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
433063
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
433047
433064
  } else if (isX(p)) {
433048
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
433065
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
433049
433066
  } else if (pr) {
433050
433067
  debug("replaceTilde pr", pr);
433051
433068
  ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
@@ -433091,9 +433108,9 @@ var require_range = __commonJS({
433091
433108
  debug("no pr");
433092
433109
  if (M === "0") {
433093
433110
  if (m === "0") {
433094
- ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
433111
+ ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
433095
433112
  } else {
433096
- ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
433113
+ ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
433097
433114
  }
433098
433115
  } else {
433099
433116
  ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
@@ -433112,6 +433129,9 @@ var require_range = __commonJS({
433112
433129
  const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
433113
433130
  return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
433114
433131
  debug("xRange", comp, ret, gtlt, M, m, p, pr);
433132
+ if (invalidXRangeOrder(M, m, p)) {
433133
+ return comp;
433134
+ }
433115
433135
  const xM = isX(M);
433116
433136
  const xm = xM || isX(m);
433117
433137
  const xp = xm || isX(p);
@@ -433759,7 +433779,7 @@ var require_subset = __commonJS({
433759
433779
  if (higher === c && higher !== gt) {
433760
433780
  return false;
433761
433781
  }
433762
- } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
433782
+ } else if (gt.operator === ">=" && !c.test(gt.semver)) {
433763
433783
  return false;
433764
433784
  }
433765
433785
  }
@@ -433774,7 +433794,7 @@ var require_subset = __commonJS({
433774
433794
  if (lower === c && lower !== lt) {
433775
433795
  return false;
433776
433796
  }
433777
- } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
433797
+ } else if (lt.operator === "<=" && !c.test(lt.semver)) {
433778
433798
  return false;
433779
433799
  }
433780
433800
  }
@@ -433842,6 +433862,7 @@ var require_semver2 = __commonJS({
433842
433862
  var lte = require_lte();
433843
433863
  var cmp = require_cmp();
433844
433864
  var coerce = require_coerce();
433865
+ var truncate = require_truncate();
433845
433866
  var Comparator = require_comparator();
433846
433867
  var Range = require_range();
433847
433868
  var satisfies = require_satisfies();
@@ -433880,6 +433901,7 @@ var require_semver2 = __commonJS({
433880
433901
  lte,
433881
433902
  cmp,
433882
433903
  coerce,
433904
+ truncate,
433883
433905
  Comparator,
433884
433906
  Range,
433885
433907
  satisfies,
@@ -433915,19 +433937,23 @@ var require_install_packages_task = __commonJS({
433915
433937
  var child_process_1 = require("child_process");
433916
433938
  var path_1 = require("path");
433917
433939
  var devkit_exports_1 = require("nx/src/devkit-exports");
433918
- function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = (0, devkit_exports_1.detectPackageManager)((0, path_1.join)(tree.root, cwd))) {
433919
- if (!tree.listChanges().find((f) => f.path === (0, devkit_exports_1.joinPathFragments)(cwd, "package.json")) && !alwaysRun) {
433940
+ function installPackagesTask(tree, ensureInstall = false, cwd = "", packageManager = (0, devkit_exports_1.detectPackageManager)((0, path_1.join)(tree.root, cwd))) {
433941
+ const packageJsonPath = (0, devkit_exports_1.joinPathFragments)(cwd, "package.json");
433942
+ const packageJsonChanged = tree.listChanges().some((f) => f.path === packageJsonPath);
433943
+ if (!packageJsonChanged && !ensureInstall) {
433920
433944
  return;
433921
433945
  }
433922
- const packageJsonValue = tree.read((0, devkit_exports_1.joinPathFragments)(cwd, "package.json"), "utf-8");
433923
- let storedPackageJsonValue = global["__packageJsonInstallCache__"];
433924
- if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
433946
+ const packageJsonValue = tree.read(packageJsonPath, "utf-8");
433947
+ const storedPackageJsonValue = global["__packageJsonInstallCache__"];
433948
+ const installAlreadyRan = storedPackageJsonValue != null;
433949
+ const packageJsonDiffers = storedPackageJsonValue != packageJsonValue;
433950
+ if (packageJsonDiffers || ensureInstall && !installAlreadyRan) {
433925
433951
  global["__packageJsonInstallCache__"] = packageJsonValue;
433926
433952
  const pmc = (0, devkit_exports_1.getPackageManagerCommand)(packageManager);
433927
433953
  const execSyncOptions = {
433928
433954
  cwd: (0, path_1.join)(tree.root, cwd),
433929
433955
  stdio: process.env.NX_GENERATE_QUIET === "true" ? "ignore" : "inherit",
433930
- windowsHide: false
433956
+ windowsHide: true
433931
433957
  };
433932
433958
  if (process.env.npm_config_registry && process.env.npm_config_registry.match(/^https:\/\/registry\.(npmjs\.org|yarnpkg\.com)/)) {
433933
433959
  delete process.env.npm_config_registry;
@@ -436726,6 +436752,26 @@ var require_js_yaml = __commonJS({
436726
436752
  }
436727
436753
  });
436728
436754
 
436755
+ // node_modules/@nx/devkit/src/utils/catalog/manager.js
436756
+ var require_manager = __commonJS({
436757
+ "node_modules/@nx/devkit/src/utils/catalog/manager.js"(exports2) {
436758
+ "use strict";
436759
+ Object.defineProperty(exports2, "__esModule", { value: true });
436760
+ exports2.formatCatalogError = formatCatalogError;
436761
+ function formatCatalogError(error2, suggestions) {
436762
+ let message = error2;
436763
+ if (suggestions.length > 0) {
436764
+ message += "\n\nSuggestions:";
436765
+ suggestions.forEach((suggestion) => {
436766
+ message += `
436767
+ \u2022 ${suggestion}`;
436768
+ });
436769
+ }
436770
+ return message;
436771
+ }
436772
+ }
436773
+ });
436774
+
436729
436775
  // node_modules/@nx/devkit/src/utils/catalog/pnpm-manager.js
436730
436776
  var require_pnpm_manager = __commonJS({
436731
436777
  "node_modules/@nx/devkit/src/utils/catalog/pnpm-manager.js"(exports2) {
@@ -436737,6 +436783,8 @@ var require_pnpm_manager = __commonJS({
436737
436783
  var node_path_1 = require("node:path");
436738
436784
  var devkit_exports_1 = require("nx/src/devkit-exports");
436739
436785
  var devkit_internals_1 = require("nx/src/devkit-internals");
436786
+ var manager_1 = require_manager();
436787
+ var PNPM_WORKSPACE_FILENAME = "pnpm-workspace.yaml";
436740
436788
  var PnpmCatalogManager = class {
436741
436789
  constructor() {
436742
436790
  this.name = "pnpm";
@@ -436756,18 +436804,21 @@ var require_pnpm_manager = __commonJS({
436756
436804
  isDefaultCatalog: isDefault
436757
436805
  };
436758
436806
  }
436807
+ getCatalogDefinitionFilePaths() {
436808
+ return [PNPM_WORKSPACE_FILENAME];
436809
+ }
436759
436810
  getCatalogDefinitions(treeOrRoot) {
436760
436811
  if (typeof treeOrRoot === "string") {
436761
- const pnpmWorkspacePath = (0, node_path_1.join)(treeOrRoot, "pnpm-workspace.yaml");
436762
- if (!(0, node_fs_1.existsSync)(pnpmWorkspacePath)) {
436812
+ const configPath = (0, node_path_1.join)(treeOrRoot, PNPM_WORKSPACE_FILENAME);
436813
+ if (!(0, node_fs_1.existsSync)(configPath)) {
436763
436814
  return null;
436764
436815
  }
436765
- return readYamlFileFromFs(pnpmWorkspacePath);
436816
+ return readConfigFromFs(configPath);
436766
436817
  } else {
436767
- if (!treeOrRoot.exists("pnpm-workspace.yaml")) {
436818
+ if (!treeOrRoot.exists(PNPM_WORKSPACE_FILENAME)) {
436768
436819
  return null;
436769
436820
  }
436770
- return readYamlFileFromTree(treeOrRoot, "pnpm-workspace.yaml");
436821
+ return readConfigFromTree(treeOrRoot, PNPM_WORKSPACE_FILENAME);
436771
436822
  }
436772
436823
  }
436773
436824
  resolveCatalogReference(treeOrRoot, packageName, version) {
@@ -436775,15 +436826,15 @@ var require_pnpm_manager = __commonJS({
436775
436826
  if (!catalogRef) {
436776
436827
  return null;
436777
436828
  }
436778
- const workspaceConfig = this.getCatalogDefinitions(treeOrRoot);
436779
- if (!workspaceConfig) {
436829
+ const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
436830
+ if (!catalogDefs) {
436780
436831
  return null;
436781
436832
  }
436782
436833
  let catalogToUse;
436783
436834
  if (catalogRef.isDefaultCatalog) {
436784
- catalogToUse = workspaceConfig.catalog ?? workspaceConfig.catalogs?.default;
436835
+ catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
436785
436836
  } else if (catalogRef.catalogName) {
436786
- catalogToUse = workspaceConfig.catalogs?.[catalogRef.catalogName];
436837
+ catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
436787
436838
  }
436788
436839
  return catalogToUse?.[packageName] || null;
436789
436840
  }
@@ -436792,35 +436843,35 @@ var require_pnpm_manager = __commonJS({
436792
436843
  if (!catalogRef) {
436793
436844
  throw new Error(`Invalid catalog reference syntax: "${version}". Expected format: "catalog:" or "catalog:name"`);
436794
436845
  }
436795
- const workspaceConfig = this.getCatalogDefinitions(treeOrRoot);
436796
- if (!workspaceConfig) {
436797
- throw new Error(formatCatalogError("Cannot get Pnpm Catalog definitions. No pnpm-workspace.yaml found in workspace root.", ["Create a pnpm-workspace.yaml file in your workspace root"]));
436846
+ const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
436847
+ if (!catalogDefs) {
436848
+ 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`]));
436798
436849
  }
436799
436850
  let catalogToUse;
436800
436851
  if (catalogRef.isDefaultCatalog) {
436801
- const hasCatalog = !!workspaceConfig.catalog;
436802
- const hasCatalogsDefault = !!workspaceConfig.catalogs?.default;
436852
+ const hasCatalog = !!catalogDefs.catalog;
436853
+ const hasCatalogsDefault = !!catalogDefs.catalogs?.default;
436803
436854
  if (hasCatalog && hasCatalogsDefault) {
436804
436855
  throw new Error("The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
436805
436856
  }
436806
- catalogToUse = workspaceConfig.catalog ?? workspaceConfig.catalogs?.default;
436857
+ catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
436807
436858
  if (!catalogToUse) {
436808
- const availableCatalogs = Object.keys(workspaceConfig.catalogs || {});
436859
+ const availableCatalogs = Object.keys(catalogDefs.catalogs || {});
436809
436860
  const suggestions = [
436810
- 'Define a default catalog in pnpm-workspace.yaml under the "catalog" key'
436861
+ `Define a default catalog in ${PNPM_WORKSPACE_FILENAME} under the "catalog" key`
436811
436862
  ];
436812
436863
  if (availableCatalogs.length > 0) {
436813
436864
  suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
436814
436865
  }
436815
- throw new Error(formatCatalogError("No default catalog defined in pnpm-workspace.yaml", suggestions));
436866
+ throw new Error((0, manager_1.formatCatalogError)(`No default catalog defined in ${PNPM_WORKSPACE_FILENAME}`, suggestions));
436816
436867
  }
436817
436868
  } else if (catalogRef.catalogName) {
436818
- catalogToUse = workspaceConfig.catalogs?.[catalogRef.catalogName];
436869
+ catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
436819
436870
  if (!catalogToUse) {
436820
- const availableCatalogs = Object.keys(workspaceConfig.catalogs || {}).filter((c) => c !== "default");
436821
- const defaultCatalog = !!workspaceConfig.catalog ? "catalog" : !workspaceConfig.catalogs?.default ? "catalogs.default" : null;
436871
+ const availableCatalogs = Object.keys(catalogDefs.catalogs || {}).filter((c) => c !== "default");
436872
+ const defaultCatalog = !!catalogDefs.catalog ? "catalog" : !catalogDefs.catalogs?.default ? "catalogs.default" : null;
436822
436873
  const suggestions = [
436823
- 'Define the catalog in pnpm-workspace.yaml under the "catalogs" key'
436874
+ `Define the catalog in ${PNPM_WORKSPACE_FILENAME} under the "catalogs" key`
436824
436875
  ];
436825
436876
  if (availableCatalogs.length > 0) {
436826
436877
  suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
@@ -436828,25 +436879,25 @@ var require_pnpm_manager = __commonJS({
436828
436879
  if (defaultCatalog) {
436829
436880
  suggestions.push(`Or use the default catalog ("${defaultCatalog}")`);
436830
436881
  }
436831
- throw new Error(formatCatalogError(`Catalog "${catalogRef.catalogName}" not found in pnpm-workspace.yaml`, suggestions));
436882
+ throw new Error((0, manager_1.formatCatalogError)(`Catalog "${catalogRef.catalogName}" not found in ${PNPM_WORKSPACE_FILENAME}`, suggestions));
436832
436883
  }
436833
436884
  }
436834
436885
  if (!catalogToUse[packageName]) {
436835
436886
  let catalogName;
436836
436887
  if (catalogRef.isDefaultCatalog) {
436837
- const hasCatalog = !!workspaceConfig.catalog;
436888
+ const hasCatalog = !!catalogDefs.catalog;
436838
436889
  catalogName = hasCatalog ? 'default catalog ("catalog")' : 'default catalog ("catalogs.default")';
436839
436890
  } else {
436840
436891
  catalogName = `catalog '${catalogRef.catalogName}'`;
436841
436892
  }
436842
436893
  const availablePackages = Object.keys(catalogToUse);
436843
436894
  const suggestions = [
436844
- `Add "${packageName}" to ${catalogName} in pnpm-workspace.yaml`
436895
+ `Add "${packageName}" to ${catalogName} in ${PNPM_WORKSPACE_FILENAME}`
436845
436896
  ];
436846
436897
  if (availablePackages.length > 0) {
436847
436898
  suggestions.push(`Or select from the available packages in ${catalogName}: ${availablePackages.map((p) => `"${p}"`).join(", ")}`);
436848
436899
  }
436849
- throw new Error(formatCatalogError(`Package "${packageName}" not found in ${catalogName}`, suggestions));
436900
+ throw new Error((0, manager_1.formatCatalogError)(`Package "${packageName}" not found in ${catalogName}`, suggestions));
436850
436901
  }
436851
436902
  }
436852
436903
  updateCatalogVersions(treeOrRoot, updates) {
@@ -436854,46 +436905,46 @@ var require_pnpm_manager = __commonJS({
436854
436905
  let readYaml;
436855
436906
  let writeYaml;
436856
436907
  if (typeof treeOrRoot === "string") {
436857
- const workspaceYamlPath = (0, node_path_1.join)(treeOrRoot, "pnpm-workspace.yaml");
436858
- checkExists = () => (0, node_fs_1.existsSync)(workspaceYamlPath);
436859
- readYaml = () => (0, node_fs_1.readFileSync)(workspaceYamlPath, "utf-8");
436860
- writeYaml = (content) => (0, node_fs_1.writeFileSync)(workspaceYamlPath, content, "utf-8");
436908
+ const configPath = (0, node_path_1.join)(treeOrRoot, PNPM_WORKSPACE_FILENAME);
436909
+ checkExists = () => (0, node_fs_1.existsSync)(configPath);
436910
+ readYaml = () => (0, node_fs_1.readFileSync)(configPath, "utf-8");
436911
+ writeYaml = (content) => (0, node_fs_1.writeFileSync)(configPath, content, "utf-8");
436861
436912
  } else {
436862
- checkExists = () => treeOrRoot.exists("pnpm-workspace.yaml");
436863
- readYaml = () => treeOrRoot.read("pnpm-workspace.yaml", "utf-8");
436864
- writeYaml = (content) => treeOrRoot.write("pnpm-workspace.yaml", content);
436913
+ checkExists = () => treeOrRoot.exists(PNPM_WORKSPACE_FILENAME);
436914
+ readYaml = () => treeOrRoot.read(PNPM_WORKSPACE_FILENAME, "utf-8");
436915
+ writeYaml = (content) => treeOrRoot.write(PNPM_WORKSPACE_FILENAME, content);
436865
436916
  }
436866
436917
  if (!checkExists()) {
436867
436918
  devkit_exports_1.output.warn({
436868
- title: "No pnpm-workspace.yaml found",
436919
+ title: `No ${PNPM_WORKSPACE_FILENAME} found`,
436869
436920
  bodyLines: [
436870
- "Cannot update catalog versions without a pnpm-workspace.yaml file.",
436871
- "Create a pnpm-workspace.yaml file to use catalogs."
436921
+ `Cannot update catalog versions without a ${PNPM_WORKSPACE_FILENAME} file.`,
436922
+ `Create a ${PNPM_WORKSPACE_FILENAME} file to use catalogs.`
436872
436923
  ]
436873
436924
  });
436874
436925
  return;
436875
436926
  }
436876
436927
  try {
436877
- const workspaceContent = readYaml();
436878
- const workspaceData = (0, js_yaml_1.load)(workspaceContent) || {};
436928
+ const configContent = readYaml();
436929
+ const configData = (0, js_yaml_1.load)(configContent) || {};
436879
436930
  let hasChanges = false;
436880
436931
  for (const update of updates) {
436881
436932
  const { packageName, version, catalogName } = update;
436882
436933
  const normalizedCatalogName = catalogName === "default" ? void 0 : catalogName;
436883
436934
  let targetCatalog;
436884
436935
  if (!normalizedCatalogName) {
436885
- if (workspaceData.catalog) {
436886
- targetCatalog = workspaceData.catalog;
436887
- } else if (workspaceData.catalogs?.default) {
436888
- targetCatalog = workspaceData.catalogs.default;
436936
+ if (configData.catalog) {
436937
+ targetCatalog = configData.catalog;
436938
+ } else if (configData.catalogs?.default) {
436939
+ targetCatalog = configData.catalogs.default;
436889
436940
  } else {
436890
- workspaceData.catalog ??= {};
436891
- targetCatalog = workspaceData.catalog;
436941
+ configData.catalog ??= {};
436942
+ targetCatalog = configData.catalog;
436892
436943
  }
436893
436944
  } else {
436894
- workspaceData.catalogs ??= {};
436895
- workspaceData.catalogs[normalizedCatalogName] ??= {};
436896
- targetCatalog = workspaceData.catalogs[normalizedCatalogName];
436945
+ configData.catalogs ??= {};
436946
+ configData.catalogs[normalizedCatalogName] ??= {};
436947
+ targetCatalog = configData.catalogs[normalizedCatalogName];
436897
436948
  }
436898
436949
  if (targetCatalog[packageName] !== version) {
436899
436950
  targetCatalog[packageName] = version;
@@ -436901,7 +436952,7 @@ var require_pnpm_manager = __commonJS({
436901
436952
  }
436902
436953
  }
436903
436954
  if (hasChanges) {
436904
- writeYaml((0, js_yaml_1.dump)(workspaceData, {
436955
+ writeYaml((0, js_yaml_1.dump)(configData, {
436905
436956
  indent: 2,
436906
436957
  quotingType: '"',
436907
436958
  forceQuotes: true
@@ -436917,40 +436968,250 @@ var require_pnpm_manager = __commonJS({
436917
436968
  }
436918
436969
  };
436919
436970
  exports2.PnpmCatalogManager = PnpmCatalogManager;
436920
- function readYamlFileFromFs(path) {
436971
+ function readConfigFromFs(path) {
436921
436972
  try {
436922
436973
  return (0, devkit_internals_1.readYamlFile)(path);
436923
436974
  } catch (error2) {
436924
436975
  devkit_exports_1.output.warn({
436925
- title: "Unable to parse pnpm-workspace.yaml",
436976
+ title: `Unable to parse ${PNPM_WORKSPACE_FILENAME}`,
436926
436977
  bodyLines: [error2.toString()]
436927
436978
  });
436928
436979
  return null;
436929
436980
  }
436930
436981
  }
436931
- function readYamlFileFromTree(tree, path) {
436982
+ function readConfigFromTree(tree, path) {
436932
436983
  const content = tree.read(path, "utf-8");
436933
- const { load: load2 } = require_js_yaml();
436934
436984
  try {
436935
- return load2(content, { filename: path });
436985
+ return (0, js_yaml_1.load)(content, { filename: path });
436936
436986
  } catch (error2) {
436937
436987
  devkit_exports_1.output.warn({
436938
- title: "Unable to parse pnpm-workspace.yaml",
436988
+ title: `Unable to parse ${PNPM_WORKSPACE_FILENAME}`,
436939
436989
  bodyLines: [error2.toString()]
436940
436990
  });
436941
436991
  return null;
436942
436992
  }
436943
436993
  }
436944
- function formatCatalogError(error2, suggestions) {
436945
- let message = error2;
436946
- if (suggestions && suggestions.length > 0) {
436947
- message += "\n\nSuggestions:";
436948
- suggestions.forEach((suggestion) => {
436949
- message += `
436950
- \u2022 ${suggestion}`;
436994
+ }
436995
+ });
436996
+
436997
+ // node_modules/@nx/devkit/src/utils/catalog/yarn-manager.js
436998
+ var require_yarn_manager = __commonJS({
436999
+ "node_modules/@nx/devkit/src/utils/catalog/yarn-manager.js"(exports2) {
437000
+ "use strict";
437001
+ Object.defineProperty(exports2, "__esModule", { value: true });
437002
+ exports2.YarnCatalogManager = void 0;
437003
+ var js_yaml_1 = require_js_yaml();
437004
+ var node_fs_1 = require("node:fs");
437005
+ var node_path_1 = require("node:path");
437006
+ var devkit_exports_1 = require("nx/src/devkit-exports");
437007
+ var devkit_internals_1 = require("nx/src/devkit-internals");
437008
+ var manager_1 = require_manager();
437009
+ var YARNRC_FILENAME = ".yarnrc.yml";
437010
+ var YarnCatalogManager = class {
437011
+ constructor() {
437012
+ this.name = "yarn";
437013
+ this.catalogProtocol = "catalog:";
437014
+ }
437015
+ isCatalogReference(version) {
437016
+ return version.startsWith(this.catalogProtocol);
437017
+ }
437018
+ parseCatalogReference(version) {
437019
+ if (!this.isCatalogReference(version)) {
437020
+ return null;
437021
+ }
437022
+ const catalogName = version.substring(this.catalogProtocol.length);
437023
+ const isDefault = !catalogName || catalogName === "default";
437024
+ return {
437025
+ catalogName: isDefault ? void 0 : catalogName,
437026
+ isDefaultCatalog: isDefault
437027
+ };
437028
+ }
437029
+ getCatalogDefinitionFilePaths() {
437030
+ return [YARNRC_FILENAME];
437031
+ }
437032
+ getCatalogDefinitions(treeOrRoot) {
437033
+ if (typeof treeOrRoot === "string") {
437034
+ const configPath = (0, node_path_1.join)(treeOrRoot, YARNRC_FILENAME);
437035
+ if (!(0, node_fs_1.existsSync)(configPath)) {
437036
+ return null;
437037
+ }
437038
+ return readConfigFromFs(configPath);
437039
+ } else {
437040
+ if (!treeOrRoot.exists(YARNRC_FILENAME)) {
437041
+ return null;
437042
+ }
437043
+ return readConfigFromTree(treeOrRoot, YARNRC_FILENAME);
437044
+ }
437045
+ }
437046
+ resolveCatalogReference(treeOrRoot, packageName, version) {
437047
+ const catalogRef = this.parseCatalogReference(version);
437048
+ if (!catalogRef) {
437049
+ return null;
437050
+ }
437051
+ const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
437052
+ if (!catalogDefs) {
437053
+ return null;
437054
+ }
437055
+ let catalogToUse;
437056
+ if (catalogRef.isDefaultCatalog) {
437057
+ catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
437058
+ } else if (catalogRef.catalogName) {
437059
+ catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
437060
+ }
437061
+ return catalogToUse?.[packageName] || null;
437062
+ }
437063
+ validateCatalogReference(treeOrRoot, packageName, version) {
437064
+ const catalogRef = this.parseCatalogReference(version);
437065
+ if (!catalogRef) {
437066
+ throw new Error(`Invalid catalog reference syntax: "${version}". Expected format: "catalog:" or "catalog:name"`);
437067
+ }
437068
+ const catalogDefs = this.getCatalogDefinitions(treeOrRoot);
437069
+ if (!catalogDefs) {
437070
+ 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`]));
437071
+ }
437072
+ let catalogToUse;
437073
+ if (catalogRef.isDefaultCatalog) {
437074
+ const hasCatalog = !!catalogDefs.catalog;
437075
+ const hasCatalogsDefault = !!catalogDefs.catalogs?.default;
437076
+ if (hasCatalog && hasCatalogsDefault) {
437077
+ throw new Error("The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
437078
+ }
437079
+ catalogToUse = catalogDefs.catalog ?? catalogDefs.catalogs?.default;
437080
+ if (!catalogToUse) {
437081
+ const availableCatalogs = Object.keys(catalogDefs.catalogs || {});
437082
+ const suggestions = [
437083
+ `Define a default catalog in ${YARNRC_FILENAME} under the "catalog" key`
437084
+ ];
437085
+ if (availableCatalogs.length > 0) {
437086
+ suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
437087
+ }
437088
+ throw new Error((0, manager_1.formatCatalogError)(`No default catalog defined in ${YARNRC_FILENAME}`, suggestions));
437089
+ }
437090
+ } else if (catalogRef.catalogName) {
437091
+ catalogToUse = catalogDefs.catalogs?.[catalogRef.catalogName];
437092
+ if (!catalogToUse) {
437093
+ const availableCatalogs = Object.keys(catalogDefs.catalogs || {}).filter((c) => c !== "default");
437094
+ const defaultCatalog = !!catalogDefs.catalog ? "catalog" : !catalogDefs.catalogs?.default ? "catalogs.default" : null;
437095
+ const suggestions = [
437096
+ `Define the catalog in ${YARNRC_FILENAME} under the "catalogs" key`
437097
+ ];
437098
+ if (availableCatalogs.length > 0) {
437099
+ suggestions.push(`Or select from the available named catalogs: ${availableCatalogs.map((c) => `"catalog:${c}"`).join(", ")}`);
437100
+ }
437101
+ if (defaultCatalog) {
437102
+ suggestions.push(`Or use the default catalog ("${defaultCatalog}")`);
437103
+ }
437104
+ throw new Error((0, manager_1.formatCatalogError)(`Catalog "${catalogRef.catalogName}" not found in ${YARNRC_FILENAME}`, suggestions));
437105
+ }
437106
+ }
437107
+ if (!catalogToUse[packageName]) {
437108
+ let catalogName;
437109
+ if (catalogRef.isDefaultCatalog) {
437110
+ const hasCatalog = !!catalogDefs.catalog;
437111
+ catalogName = hasCatalog ? 'default catalog ("catalog")' : 'default catalog ("catalogs.default")';
437112
+ } else {
437113
+ catalogName = `catalog '${catalogRef.catalogName}'`;
437114
+ }
437115
+ const availablePackages = Object.keys(catalogToUse);
437116
+ const suggestions = [
437117
+ `Add "${packageName}" to ${catalogName} in ${YARNRC_FILENAME}`
437118
+ ];
437119
+ if (availablePackages.length > 0) {
437120
+ suggestions.push(`Or select from the available packages in ${catalogName}: ${availablePackages.map((p) => `"${p}"`).join(", ")}`);
437121
+ }
437122
+ throw new Error((0, manager_1.formatCatalogError)(`Package "${packageName}" not found in ${catalogName}`, suggestions));
437123
+ }
437124
+ }
437125
+ updateCatalogVersions(treeOrRoot, updates) {
437126
+ let checkExists;
437127
+ let readYaml;
437128
+ let writeYaml;
437129
+ if (typeof treeOrRoot === "string") {
437130
+ const configPath = (0, node_path_1.join)(treeOrRoot, YARNRC_FILENAME);
437131
+ checkExists = () => (0, node_fs_1.existsSync)(configPath);
437132
+ readYaml = () => (0, node_fs_1.readFileSync)(configPath, "utf-8");
437133
+ writeYaml = (content) => (0, node_fs_1.writeFileSync)(configPath, content, "utf-8");
437134
+ } else {
437135
+ checkExists = () => treeOrRoot.exists(YARNRC_FILENAME);
437136
+ readYaml = () => treeOrRoot.read(YARNRC_FILENAME, "utf-8");
437137
+ writeYaml = (content) => treeOrRoot.write(YARNRC_FILENAME, content);
437138
+ }
437139
+ if (!checkExists()) {
437140
+ devkit_exports_1.output.warn({
437141
+ title: `No ${YARNRC_FILENAME} found`,
437142
+ bodyLines: [
437143
+ `Cannot update catalog versions without a ${YARNRC_FILENAME} file.`,
437144
+ `Create a ${YARNRC_FILENAME} file to use catalogs.`
437145
+ ]
437146
+ });
437147
+ return;
437148
+ }
437149
+ try {
437150
+ const configContent = readYaml();
437151
+ const configData = (0, js_yaml_1.load)(configContent) || {};
437152
+ let hasChanges = false;
437153
+ for (const update of updates) {
437154
+ const { packageName, version, catalogName } = update;
437155
+ const normalizedCatalogName = catalogName === "default" ? void 0 : catalogName;
437156
+ let targetCatalog;
437157
+ if (!normalizedCatalogName) {
437158
+ if (configData.catalog) {
437159
+ targetCatalog = configData.catalog;
437160
+ } else if (configData.catalogs?.default) {
437161
+ targetCatalog = configData.catalogs.default;
437162
+ } else {
437163
+ configData.catalog ??= {};
437164
+ targetCatalog = configData.catalog;
437165
+ }
437166
+ } else {
437167
+ configData.catalogs ??= {};
437168
+ configData.catalogs[normalizedCatalogName] ??= {};
437169
+ targetCatalog = configData.catalogs[normalizedCatalogName];
437170
+ }
437171
+ if (targetCatalog[packageName] !== version) {
437172
+ targetCatalog[packageName] = version;
437173
+ hasChanges = true;
437174
+ }
437175
+ }
437176
+ if (hasChanges) {
437177
+ writeYaml((0, js_yaml_1.dump)(configData, {
437178
+ indent: 2,
437179
+ quotingType: '"',
437180
+ forceQuotes: true
437181
+ }));
437182
+ }
437183
+ } catch (error2) {
437184
+ devkit_exports_1.output.error({
437185
+ title: "Failed to update catalog versions",
437186
+ bodyLines: [error2 instanceof Error ? error2.message : String(error2)]
437187
+ });
437188
+ throw error2;
437189
+ }
437190
+ }
437191
+ };
437192
+ exports2.YarnCatalogManager = YarnCatalogManager;
437193
+ function readConfigFromFs(path) {
437194
+ try {
437195
+ return (0, devkit_internals_1.readYamlFile)(path);
437196
+ } catch (error2) {
437197
+ devkit_exports_1.output.warn({
437198
+ title: `Unable to parse ${YARNRC_FILENAME}`,
437199
+ bodyLines: [error2.toString()]
436951
437200
  });
437201
+ return null;
437202
+ }
437203
+ }
437204
+ function readConfigFromTree(tree, path) {
437205
+ const content = tree.read(path, "utf-8");
437206
+ try {
437207
+ return (0, js_yaml_1.load)(content, { filename: path });
437208
+ } catch (error2) {
437209
+ devkit_exports_1.output.warn({
437210
+ title: `Unable to parse ${YARNRC_FILENAME}`,
437211
+ bodyLines: [error2.toString()]
437212
+ });
437213
+ return null;
436952
437214
  }
436953
- return message;
436954
437215
  }
436955
437216
  }
436956
437217
  });
@@ -436963,11 +437224,14 @@ var require_manager_factory = __commonJS({
436963
437224
  exports2.getCatalogManager = getCatalogManager;
436964
437225
  var devkit_exports_1 = require("nx/src/devkit-exports");
436965
437226
  var pnpm_manager_1 = require_pnpm_manager();
437227
+ var yarn_manager_1 = require_yarn_manager();
436966
437228
  function getCatalogManager(workspaceRoot) {
436967
437229
  const packageManager = (0, devkit_exports_1.detectPackageManager)(workspaceRoot);
436968
437230
  switch (packageManager) {
436969
437231
  case "pnpm":
436970
437232
  return new pnpm_manager_1.PnpmCatalogManager();
437233
+ case "yarn":
437234
+ return new yarn_manager_1.YarnCatalogManager();
436971
437235
  default:
436972
437236
  return null;
436973
437237
  }
@@ -437385,7 +437649,7 @@ var require_package_json = __commonJS({
437385
437649
  if (process.env.NX_DRY_RUN && process.env.NX_DRY_RUN !== "false") {
437386
437650
  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');
437387
437651
  }
437388
- const { tempDir } = (0, devkit_internals_1.installPackageToTmp)(pkg, requiredVersion);
437652
+ const { tempDir } = (0, devkit_internals_1.installPackageToTmp)(pkg, requiredVersion, (0, devkit_exports_1.detectPackageManager)(devkit_exports_1.workspaceRoot));
437389
437653
  addToNodePath((0, path_1.join)(devkit_exports_1.workspaceRoot, "node_modules"));
437390
437654
  addToNodePath((0, path_1.join)(tempDir, "node_modules"));
437391
437655
  module_1.Module._initPaths();
@@ -437565,7 +437829,8 @@ var require_parse_target_string = __commonJS({
437565
437829
  if (!projectGraph.nodes[maybeProject] && projectGraphOrCtx && "projectName" in projectGraphOrCtx && maybeProject !== projectGraphOrCtx.projectName) {
437566
437830
  targetString = `${projectGraphOrCtx.projectName}:${targetString}`;
437567
437831
  }
437568
- const [project, target, configuration] = (0, devkit_internals_1.splitTarget)(targetString, projectGraph);
437832
+ const currentProject = projectGraphOrCtx && "projectName" in projectGraphOrCtx ? projectGraphOrCtx.projectName : void 0;
437833
+ const [project, target, configuration] = (0, devkit_internals_1.splitTarget)(targetString, projectGraph, { currentProject });
437569
437834
  if (!project || !target) {
437570
437835
  throw new Error(`Invalid Target String: ${targetString}`);
437571
437836
  }
@@ -447357,6 +447622,7 @@ var require_delegate = __commonJS({
447357
447622
  _other;
447358
447623
  constructor(_other) {
447359
447624
  this._other = _other;
447625
+ this[interface_1.TreeSymbol] = () => this;
447360
447626
  }
447361
447627
  branch() {
447362
447628
  return this._other.branch();
@@ -447415,9 +447681,6 @@ var require_delegate = __commonJS({
447415
447681
  get actions() {
447416
447682
  return this._other.actions;
447417
447683
  }
447418
- [interface_1.TreeSymbol]() {
447419
- return this;
447420
- }
447421
447684
  };
447422
447685
  exports2.DelegateTree = DelegateTree;
447423
447686
  }
@@ -449306,6 +449569,7 @@ var require_scoped = __commonJS({
449306
449569
  _root;
449307
449570
  constructor(_base, scope) {
449308
449571
  this._base = _base;
449572
+ this[interface_1.TreeSymbol] = () => this;
449309
449573
  const normalizedScope = (0, core_1.normalize)("/" + scope);
449310
449574
  this._root = new ScopedDirEntry(this._base.getDir(normalizedScope), normalizedScope);
449311
449575
  }
@@ -449392,9 +449656,6 @@ var require_scoped = __commonJS({
449392
449656
  }
449393
449657
  return scopedActions;
449394
449658
  }
449395
- [interface_1.TreeSymbol]() {
449396
- return this;
449397
- }
449398
449659
  _fullPath(path) {
449399
449660
  return (0, core_1.join)(this._root.scope, (0, core_1.normalize)("/" + path));
449400
449661
  }
@@ -449481,9 +449742,6 @@ var require_host_tree = __commonJS({
449481
449742
  _recordSync;
449482
449743
  _ancestry = /* @__PURE__ */ new Set();
449483
449744
  _dirCache = /* @__PURE__ */ new Map();
449484
- [interface_1.TreeSymbol]() {
449485
- return this;
449486
- }
449487
449745
  static isHostTree(tree) {
449488
449746
  if (tree instanceof _HostTree) {
449489
449747
  return true;
@@ -449495,6 +449753,7 @@ var require_host_tree = __commonJS({
449495
449753
  }
449496
449754
  constructor(_backend = new core_1.virtualFs.Empty()) {
449497
449755
  this._backend = _backend;
449756
+ this[interface_1.TreeSymbol] = () => this;
449498
449757
  this._record = new core_1.virtualFs.CordHost(new core_1.virtualFs.SafeReadonlyHost(_backend));
449499
449758
  this._recordSync = new core_1.virtualFs.SyncDelegateHost(this._record);
449500
449759
  }
@@ -449902,8 +450161,8 @@ var require_null2 = __commonJS({
449902
450161
  };
449903
450162
  exports2.NullTreeDirEntry = NullTreeDirEntry;
449904
450163
  var NullTree = class _NullTree {
449905
- [interface_1.TreeSymbol]() {
449906
- return this;
450164
+ constructor() {
450165
+ this[interface_1.TreeSymbol] = () => this;
449907
450166
  }
449908
450167
  branch() {
449909
450168
  return new _NullTree();
@@ -454241,7 +454500,7 @@ var init_yoctocolors = __esm({
454241
454500
  }
454242
454501
  });
454243
454502
 
454244
- // node_modules/is-unicode-supported/index.js
454503
+ // node_modules/ora/node_modules/is-unicode-supported/index.js
454245
454504
  function isUnicodeSupported() {
454246
454505
  const { env: env2 } = import_node_process4.default;
454247
454506
  const { TERM, TERM_PROGRAM } = env2;
@@ -454252,7 +454511,7 @@ function isUnicodeSupported() {
454252
454511
  }
454253
454512
  var import_node_process4;
454254
454513
  var init_is_unicode_supported = __esm({
454255
- "node_modules/is-unicode-supported/index.js"() {
454514
+ "node_modules/ora/node_modules/is-unicode-supported/index.js"() {
454256
454515
  "use strict";
454257
454516
  import_node_process4 = __toESM(require("node:process"), 1);
454258
454517
  }
@@ -454288,7 +454547,7 @@ var init_log_symbols = __esm({
454288
454547
  }
454289
454548
  });
454290
454549
 
454291
- // node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
454550
+ // node_modules/ora/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
454292
454551
  function ansiRegex({ onlyFirst = false } = {}) {
454293
454552
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
454294
454553
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
@@ -454297,12 +454556,12 @@ function ansiRegex({ onlyFirst = false } = {}) {
454297
454556
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
454298
454557
  }
454299
454558
  var init_ansi_regex = __esm({
454300
- "node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
454559
+ "node_modules/ora/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
454301
454560
  "use strict";
454302
454561
  }
454303
454562
  });
454304
454563
 
454305
- // node_modules/ora/node_modules/strip-ansi/index.js
454564
+ // node_modules/ora/node_modules/string-width/node_modules/strip-ansi/index.js
454306
454565
  function stripAnsi(string) {
454307
454566
  if (typeof string !== "string") {
454308
454567
  throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
@@ -454311,7 +454570,7 @@ function stripAnsi(string) {
454311
454570
  }
454312
454571
  var regex;
454313
454572
  var init_strip_ansi = __esm({
454314
- "node_modules/ora/node_modules/strip-ansi/index.js"() {
454573
+ "node_modules/ora/node_modules/string-width/node_modules/strip-ansi/index.js"() {
454315
454574
  "use strict";
454316
454575
  init_ansi_regex();
454317
454576
  regex = ansiRegex();
@@ -454514,14 +454773,14 @@ var init_string_width = __esm({
454514
454773
  }
454515
454774
  });
454516
454775
 
454517
- // node_modules/is-interactive/index.js
454776
+ // node_modules/ora/node_modules/is-interactive/index.js
454518
454777
  function isInteractive({ stream = process.stdout } = {}) {
454519
454778
  return Boolean(
454520
454779
  stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
454521
454780
  );
454522
454781
  }
454523
454782
  var init_is_interactive = __esm({
454524
- "node_modules/is-interactive/index.js"() {
454783
+ "node_modules/ora/node_modules/is-interactive/index.js"() {
454525
454784
  "use strict";
454526
454785
  }
454527
454786
  });
@@ -454535,6 +454794,18 @@ var init_stdin_discarder = __esm({
454535
454794
  ASCII_ETX_CODE = 3;
454536
454795
  StdinDiscarder = class {
454537
454796
  #activeCount = 0;
454797
+ #stdin;
454798
+ #stdinWasPaused = false;
454799
+ #stdinWasRaw = false;
454800
+ #handleInputBound = (chunk) => {
454801
+ if (!chunk?.length) {
454802
+ return;
454803
+ }
454804
+ const code = typeof chunk === "string" ? chunk.codePointAt(0) : chunk[0];
454805
+ if (code === ASCII_ETX_CODE) {
454806
+ import_node_process5.default.kill(import_node_process5.default.pid, "SIGINT");
454807
+ }
454808
+ };
454538
454809
  start() {
454539
454810
  this.#activeCount++;
454540
454811
  if (this.#activeCount === 1) {
@@ -454542,38 +454813,47 @@ var init_stdin_discarder = __esm({
454542
454813
  }
454543
454814
  }
454544
454815
  stop() {
454545
- if (this.#activeCount <= 0) {
454546
- throw new Error("`stop` called more times than `start`");
454547
- }
454548
- this.#activeCount--;
454549
454816
  if (this.#activeCount === 0) {
454817
+ return;
454818
+ }
454819
+ if (--this.#activeCount === 0) {
454550
454820
  this.#realStop();
454551
454821
  }
454552
454822
  }
454553
454823
  #realStart() {
454554
- if (import_node_process5.default.platform === "win32" || !import_node_process5.default.stdin.isTTY) {
454824
+ const { stdin } = import_node_process5.default;
454825
+ if (import_node_process5.default.platform === "win32" || !stdin?.isTTY || typeof stdin.setRawMode !== "function") {
454826
+ this.#stdin = void 0;
454555
454827
  return;
454556
454828
  }
454557
- import_node_process5.default.stdin.setRawMode(true);
454558
- import_node_process5.default.stdin.on("data", this.#handleInput);
454559
- import_node_process5.default.stdin.resume();
454829
+ this.#stdin = stdin;
454830
+ this.#stdinWasPaused = stdin.isPaused();
454831
+ this.#stdinWasRaw = Boolean(stdin.isRaw);
454832
+ stdin.setRawMode(true);
454833
+ stdin.prependListener("data", this.#handleInputBound);
454834
+ if (this.#stdinWasPaused) {
454835
+ stdin.resume();
454836
+ }
454560
454837
  }
454561
454838
  #realStop() {
454562
- if (!import_node_process5.default.stdin.isTTY) {
454839
+ if (!this.#stdin) {
454563
454840
  return;
454564
454841
  }
454565
- import_node_process5.default.stdin.off("data", this.#handleInput);
454566
- import_node_process5.default.stdin.pause();
454567
- import_node_process5.default.stdin.setRawMode(false);
454568
- }
454569
- #handleInput(chunk) {
454570
- if (chunk[0] === ASCII_ETX_CODE) {
454571
- import_node_process5.default.emit("SIGINT");
454842
+ const stdin = this.#stdin;
454843
+ stdin.off("data", this.#handleInputBound);
454844
+ if (stdin.isTTY) {
454845
+ stdin.setRawMode?.(this.#stdinWasRaw);
454572
454846
  }
454847
+ if (this.#stdinWasPaused) {
454848
+ stdin.pause();
454849
+ }
454850
+ this.#stdin = void 0;
454851
+ this.#stdinWasPaused = false;
454852
+ this.#stdinWasRaw = false;
454573
454853
  }
454574
454854
  };
454575
454855
  stdinDiscarder = new StdinDiscarder();
454576
- stdin_discarder_default = stdinDiscarder;
454856
+ stdin_discarder_default = Object.freeze(stdinDiscarder);
454577
454857
  }
454578
454858
  });
454579
454859
 
@@ -454605,40 +454885,102 @@ async function oraPromise(action, options) {
454605
454885
  throw error2;
454606
454886
  }
454607
454887
  }
454608
- var import_node_process6, Ora;
454888
+ var import_node_process6, import_node_util, RENDER_DEFERRAL_TIMEOUT, SYNCHRONIZED_OUTPUT_ENABLE, SYNCHRONIZED_OUTPUT_DISABLE, activeHooksPerStream, Ora;
454609
454889
  var init_ora = __esm({
454610
454890
  "node_modules/ora/index.js"() {
454611
454891
  "use strict";
454612
454892
  import_node_process6 = __toESM(require("node:process"), 1);
454893
+ import_node_util = require("node:util");
454613
454894
  init_source();
454614
454895
  init_cli_cursor();
454615
454896
  init_cli_spinners();
454616
454897
  init_log_symbols();
454617
- init_strip_ansi();
454618
454898
  init_string_width();
454619
454899
  init_is_interactive();
454620
454900
  init_is_unicode_supported();
454621
454901
  init_stdin_discarder();
454622
454902
  init_cli_spinners();
454903
+ RENDER_DEFERRAL_TIMEOUT = 200;
454904
+ SYNCHRONIZED_OUTPUT_ENABLE = "\x1B[?2026h";
454905
+ SYNCHRONIZED_OUTPUT_DISABLE = "\x1B[?2026l";
454906
+ activeHooksPerStream = /* @__PURE__ */ new Map();
454623
454907
  Ora = class {
454624
454908
  #linesToClear = 0;
454625
- #isDiscardingStdin = false;
454626
- #lineCount = 0;
454627
454909
  #frameIndex = -1;
454628
- #lastSpinnerFrameTime = 0;
454629
- #lastIndent = 0;
454910
+ #lastFrameTime = 0;
454630
454911
  #options;
454631
454912
  #spinner;
454632
454913
  #stream;
454633
454914
  #id;
454634
- #initialInterval;
454635
- #isEnabled;
454636
- #isSilent;
454637
- #indent;
454638
- #text;
454639
- #prefixText;
454640
- #suffixText;
454915
+ #hookedStreams = /* @__PURE__ */ new Map();
454916
+ #isInternalWrite = false;
454917
+ #drainHandler;
454918
+ #deferRenderTimer;
454919
+ #isDiscardingStdin = false;
454641
454920
  color;
454921
+ // Helper to execute writes while preventing hook recursion
454922
+ #internalWrite(fn) {
454923
+ this.#isInternalWrite = true;
454924
+ try {
454925
+ return fn();
454926
+ } finally {
454927
+ this.#isInternalWrite = false;
454928
+ }
454929
+ }
454930
+ // Helper to render if still spinning
454931
+ #tryRender() {
454932
+ if (this.isSpinning) {
454933
+ this.render();
454934
+ }
454935
+ }
454936
+ #stringifyChunk(chunk, encoding) {
454937
+ if (chunk === void 0 || chunk === null) {
454938
+ return "";
454939
+ }
454940
+ if (typeof chunk === "string") {
454941
+ return chunk;
454942
+ }
454943
+ if (Buffer.isBuffer(chunk) || ArrayBuffer.isView(chunk)) {
454944
+ const normalizedEncoding = typeof encoding === "string" && encoding && encoding !== "buffer" ? encoding : "utf8";
454945
+ return Buffer.from(chunk).toString(normalizedEncoding);
454946
+ }
454947
+ return String(chunk);
454948
+ }
454949
+ #chunkTerminatesLine(chunkString) {
454950
+ if (!chunkString) {
454951
+ return false;
454952
+ }
454953
+ const lastCharacter = chunkString.at(-1);
454954
+ return lastCharacter === "\n" || lastCharacter === "\r";
454955
+ }
454956
+ #scheduleRenderDeferral() {
454957
+ if (this.#deferRenderTimer) {
454958
+ return;
454959
+ }
454960
+ this.#deferRenderTimer = setTimeout(() => {
454961
+ this.#deferRenderTimer = void 0;
454962
+ if (this.isSpinning) {
454963
+ this.#tryRender();
454964
+ }
454965
+ }, RENDER_DEFERRAL_TIMEOUT);
454966
+ if (typeof this.#deferRenderTimer?.unref === "function") {
454967
+ this.#deferRenderTimer.unref();
454968
+ }
454969
+ }
454970
+ #clearRenderDeferral() {
454971
+ if (this.#deferRenderTimer) {
454972
+ clearTimeout(this.#deferRenderTimer);
454973
+ this.#deferRenderTimer = void 0;
454974
+ }
454975
+ }
454976
+ // Helper to build complete line with symbol, text, prefix, and suffix
454977
+ #buildOutputLine(symbol, text, prefixText, suffixText) {
454978
+ const fullPrefixText = this.#getFullPrefixText(prefixText, " ");
454979
+ const separatorText = symbol ? " " : "";
454980
+ const fullText = typeof text === "string" ? separatorText + text : "";
454981
+ const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
454982
+ return fullPrefixText + symbol + fullText + fullSuffixText;
454983
+ }
454642
454984
  constructor(options) {
454643
454985
  if (typeof options === "string") {
454644
454986
  options = {
@@ -454653,18 +454995,23 @@ var init_ora = __esm({
454653
454995
  ...options
454654
454996
  };
454655
454997
  this.color = this.#options.color;
454656
- this.spinner = this.#options.spinner;
454657
- this.#initialInterval = this.#options.interval;
454658
454998
  this.#stream = this.#options.stream;
454659
- this.#isEnabled = typeof this.#options.isEnabled === "boolean" ? this.#options.isEnabled : isInteractive({ stream: this.#stream });
454660
- this.#isSilent = typeof this.#options.isSilent === "boolean" ? this.#options.isSilent : false;
454999
+ if (typeof this.#options.isEnabled !== "boolean") {
455000
+ this.#options.isEnabled = isInteractive({ stream: this.#stream });
455001
+ }
455002
+ if (typeof this.#options.isSilent !== "boolean") {
455003
+ this.#options.isSilent = false;
455004
+ }
455005
+ const userInterval = this.#options.interval;
455006
+ this.spinner = this.#options.spinner;
455007
+ this.#options.interval = userInterval;
454661
455008
  this.text = this.#options.text;
454662
455009
  this.prefixText = this.#options.prefixText;
454663
455010
  this.suffixText = this.#options.suffixText;
454664
455011
  this.indent = this.#options.indent;
454665
455012
  if (import_node_process6.default.env.NODE_ENV === "test") {
454666
455013
  this._stream = this.#stream;
454667
- this._isEnabled = this.#isEnabled;
455014
+ this._isEnabled = this.#options.isEnabled;
454668
455015
  Object.defineProperty(this, "_linesToClear", {
454669
455016
  get() {
454670
455017
  return this.#linesToClear;
@@ -454680,30 +455027,36 @@ var init_ora = __esm({
454680
455027
  });
454681
455028
  Object.defineProperty(this, "_lineCount", {
454682
455029
  get() {
454683
- return this.#lineCount;
455030
+ const columns = this.#stream.columns ?? 80;
455031
+ const prefixText = typeof this.#options.prefixText === "function" ? "" : this.#options.prefixText;
455032
+ const suffixText = typeof this.#options.suffixText === "function" ? "" : this.#options.suffixText;
455033
+ const fullPrefixText = typeof prefixText === "string" && prefixText !== "" ? prefixText + " " : "";
455034
+ const fullSuffixText = typeof suffixText === "string" && suffixText !== "" ? " " + suffixText : "";
455035
+ const spinnerChar = "-";
455036
+ const fullText = " ".repeat(this.#options.indent) + fullPrefixText + spinnerChar + (typeof this.#options.text === "string" ? " " + this.#options.text : "") + fullSuffixText;
455037
+ return this.#computeLineCountFrom(fullText, columns);
454684
455038
  }
454685
455039
  });
454686
455040
  }
454687
455041
  }
454688
455042
  get indent() {
454689
- return this.#indent;
455043
+ return this.#options.indent;
454690
455044
  }
454691
455045
  set indent(indent = 0) {
454692
455046
  if (!(indent >= 0 && Number.isInteger(indent))) {
454693
455047
  throw new Error("The `indent` option must be an integer from 0 and up");
454694
455048
  }
454695
- this.#indent = indent;
454696
- this.#updateLineCount();
455049
+ this.#options.indent = indent;
454697
455050
  }
454698
455051
  get interval() {
454699
- return this.#initialInterval ?? this.#spinner.interval ?? 100;
455052
+ return this.#options.interval ?? this.#spinner.interval ?? 100;
454700
455053
  }
454701
455054
  get spinner() {
454702
455055
  return this.#spinner;
454703
455056
  }
454704
455057
  set spinner(spinner) {
454705
455058
  this.#frameIndex = -1;
454706
- this.#initialInterval = void 0;
455059
+ this.#options.interval = void 0;
454707
455060
  if (typeof spinner === "object") {
454708
455061
  if (!Array.isArray(spinner.frames) || spinner.frames.length === 0 || spinner.frames.some((frame) => typeof frame !== "string")) {
454709
455062
  throw new Error("The given spinner must have a non-empty `frames` array of strings");
@@ -454723,25 +455076,22 @@ var init_ora = __esm({
454723
455076
  }
454724
455077
  }
454725
455078
  get text() {
454726
- return this.#text;
455079
+ return this.#options.text;
454727
455080
  }
454728
455081
  set text(value = "") {
454729
- this.#text = value;
454730
- this.#updateLineCount();
455082
+ this.#options.text = value;
454731
455083
  }
454732
455084
  get prefixText() {
454733
- return this.#prefixText;
455085
+ return this.#options.prefixText;
454734
455086
  }
454735
455087
  set prefixText(value = "") {
454736
- this.#prefixText = value;
454737
- this.#updateLineCount();
455088
+ this.#options.prefixText = value;
454738
455089
  }
454739
455090
  get suffixText() {
454740
- return this.#suffixText;
455091
+ return this.#options.suffixText;
454741
455092
  }
454742
455093
  set suffixText(value = "") {
454743
- this.#suffixText = value;
454744
- this.#updateLineCount();
455094
+ this.#options.suffixText = value;
454745
455095
  }
454746
455096
  get isSpinning() {
454747
455097
  return this.#id !== void 0;
@@ -454753,110 +455103,179 @@ var init_ora = __esm({
454753
455103
  }
454754
455104
  return "";
454755
455105
  }
454756
- #getFullPrefixText(prefixText = this.#prefixText, postfix = " ") {
455106
+ #getFullPrefixText(prefixText = this.#options.prefixText, postfix = " ") {
454757
455107
  return this.#formatAffix(prefixText, postfix, false);
454758
455108
  }
454759
- #getFullSuffixText(suffixText = this.#suffixText, prefix = " ") {
455109
+ #getFullSuffixText(suffixText = this.#options.suffixText, prefix = " ") {
454760
455110
  return this.#formatAffix(suffixText, prefix, true);
454761
455111
  }
454762
455112
  #computeLineCountFrom(text, columns) {
454763
455113
  let count = 0;
454764
- for (const line of stripAnsi(text).split("\n")) {
455114
+ for (const line of (0, import_node_util.stripVTControlCharacters)(text).split("\n")) {
454765
455115
  count += Math.max(1, Math.ceil(stringWidth(line) / columns));
454766
455116
  }
454767
455117
  return count;
454768
455118
  }
454769
- #updateLineCount() {
454770
- const columns = this.#stream.columns ?? 80;
454771
- const prefixText = typeof this.#prefixText === "function" ? "" : this.#prefixText;
454772
- const suffixText = typeof this.#suffixText === "function" ? "" : this.#suffixText;
454773
- const fullPrefixText = typeof prefixText === "string" && prefixText !== "" ? prefixText + " " : "";
454774
- const fullSuffixText = typeof suffixText === "string" && suffixText !== "" ? " " + suffixText : "";
454775
- const spinnerChar = "-";
454776
- const fullText = " ".repeat(this.#indent) + fullPrefixText + spinnerChar + (typeof this.#text === "string" ? " " + this.#text : "") + fullSuffixText;
454777
- this.#lineCount = this.#computeLineCountFrom(fullText, columns);
454778
- }
454779
455119
  get isEnabled() {
454780
- return this.#isEnabled && !this.#isSilent;
455120
+ return this.#options.isEnabled && !this.#options.isSilent;
454781
455121
  }
454782
455122
  set isEnabled(value) {
454783
455123
  if (typeof value !== "boolean") {
454784
455124
  throw new TypeError("The `isEnabled` option must be a boolean");
454785
455125
  }
454786
- this.#isEnabled = value;
455126
+ this.#options.isEnabled = value;
454787
455127
  }
454788
455128
  get isSilent() {
454789
- return this.#isSilent;
455129
+ return this.#options.isSilent;
454790
455130
  }
454791
455131
  set isSilent(value) {
454792
455132
  if (typeof value !== "boolean") {
454793
455133
  throw new TypeError("The `isSilent` option must be a boolean");
454794
455134
  }
454795
- this.#isSilent = value;
455135
+ this.#options.isSilent = value;
454796
455136
  }
454797
455137
  frame() {
454798
455138
  const now = Date.now();
454799
- if (this.#frameIndex === -1 || now - this.#lastSpinnerFrameTime >= this.interval) {
454800
- this.#frameIndex = ++this.#frameIndex % this.#spinner.frames.length;
454801
- this.#lastSpinnerFrameTime = now;
455139
+ if (this.#frameIndex === -1 || now - this.#lastFrameTime >= this.interval) {
455140
+ this.#frameIndex = (this.#frameIndex + 1) % this.#spinner.frames.length;
455141
+ this.#lastFrameTime = now;
454802
455142
  }
454803
455143
  const { frames } = this.#spinner;
454804
455144
  let frame = frames[this.#frameIndex];
454805
455145
  if (this.color) {
454806
455146
  frame = source_default[this.color](frame);
454807
455147
  }
454808
- const fullPrefixText = this.#getFullPrefixText(this.#prefixText, " ");
455148
+ const fullPrefixText = this.#getFullPrefixText(this.#options.prefixText, " ");
454809
455149
  const fullText = typeof this.text === "string" ? " " + this.text : "";
454810
- const fullSuffixText = this.#getFullSuffixText(this.#suffixText, " ");
455150
+ const fullSuffixText = this.#getFullSuffixText(this.#options.suffixText, " ");
454811
455151
  return fullPrefixText + frame + fullText + fullSuffixText;
454812
455152
  }
454813
455153
  clear() {
454814
- if (!this.#isEnabled || !this.#stream.isTTY) {
455154
+ if (!this.isEnabled || !this.#stream.isTTY) {
454815
455155
  return this;
454816
455156
  }
454817
- this.#stream.cursorTo(0);
454818
- for (let index = 0; index < this.#linesToClear; index++) {
454819
- if (index > 0) {
454820
- this.#stream.moveCursor(0, -1);
455157
+ this.#internalWrite(() => {
455158
+ this.#stream.cursorTo(0);
455159
+ for (let index = 0; index < this.#linesToClear; index++) {
455160
+ if (index > 0) {
455161
+ this.#stream.moveCursor(0, -1);
455162
+ }
455163
+ this.#stream.clearLine(1);
454821
455164
  }
454822
- this.#stream.clearLine(1);
454823
- }
454824
- if (this.#indent || this.#lastIndent !== this.#indent) {
454825
- this.#stream.cursorTo(this.#indent);
454826
- }
454827
- this.#lastIndent = this.#indent;
455165
+ if (this.#options.indent) {
455166
+ this.#stream.cursorTo(this.#options.indent);
455167
+ }
455168
+ });
454828
455169
  this.#linesToClear = 0;
454829
455170
  return this;
454830
455171
  }
455172
+ // Helper to hook a single stream
455173
+ #hookStream(stream) {
455174
+ if (!stream || this.#hookedStreams.has(stream) || !stream.isTTY || typeof stream.write !== "function") {
455175
+ return;
455176
+ }
455177
+ if (activeHooksPerStream.has(stream)) {
455178
+ console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");
455179
+ }
455180
+ const originalWrite = stream.write;
455181
+ this.#hookedStreams.set(stream, originalWrite);
455182
+ activeHooksPerStream.set(stream, this);
455183
+ stream.write = (chunk, encoding, callback) => this.#hookedWrite(stream, originalWrite, chunk, encoding, callback);
455184
+ }
455185
+ /**
455186
+ Intercept stream writes while spinner is active to handle external writes cleanly without visual corruption.
455187
+ Hooks process stdio streams and the active spinner stream so console.log(), console.error(), and direct writes stay tidy.
455188
+ */
455189
+ #installHook() {
455190
+ if (!this.isEnabled || this.#hookedStreams.size > 0) {
455191
+ return;
455192
+ }
455193
+ const streamsToHook = /* @__PURE__ */ new Set([this.#stream, import_node_process6.default.stdout, import_node_process6.default.stderr]);
455194
+ for (const stream of streamsToHook) {
455195
+ this.#hookStream(stream);
455196
+ }
455197
+ }
455198
+ #uninstallHook() {
455199
+ for (const [stream, originalWrite] of this.#hookedStreams) {
455200
+ stream.write = originalWrite;
455201
+ if (activeHooksPerStream.get(stream) === this) {
455202
+ activeHooksPerStream.delete(stream);
455203
+ }
455204
+ }
455205
+ this.#hookedStreams.clear();
455206
+ }
455207
+ // eslint-disable-next-line max-params -- Need stream and originalWrite for multi-stream support
455208
+ #hookedWrite(stream, originalWrite, chunk, encoding, callback) {
455209
+ if (typeof encoding === "function") {
455210
+ callback = encoding;
455211
+ encoding = void 0;
455212
+ }
455213
+ if (this.#isInternalWrite) {
455214
+ return originalWrite.call(stream, chunk, encoding, callback);
455215
+ }
455216
+ this.clear();
455217
+ const chunkString = this.#stringifyChunk(chunk, encoding);
455218
+ const chunkTerminatesLine = this.#chunkTerminatesLine(chunkString);
455219
+ const writeResult = originalWrite.call(stream, chunk, encoding, callback);
455220
+ if (chunkTerminatesLine) {
455221
+ this.#clearRenderDeferral();
455222
+ } else if (chunkString.length > 0) {
455223
+ this.#scheduleRenderDeferral();
455224
+ }
455225
+ if (this.isSpinning && !this.#deferRenderTimer) {
455226
+ this.render();
455227
+ }
455228
+ return writeResult;
455229
+ }
454831
455230
  render() {
454832
- if (!this.#isEnabled || this.#isSilent) {
455231
+ if (!this.isEnabled || this.#drainHandler || this.#deferRenderTimer) {
454833
455232
  return this;
454834
455233
  }
454835
- this.clear();
454836
- let frameContent = this.frame();
454837
- const columns = this.#stream.columns ?? 80;
454838
- const actualLineCount = this.#computeLineCountFrom(frameContent, columns);
454839
- const consoleHeight = this.#stream.rows;
454840
- if (consoleHeight && consoleHeight > 1 && actualLineCount > consoleHeight) {
454841
- const lines = frameContent.split("\n");
454842
- const maxLines = consoleHeight - 1;
454843
- frameContent = [...lines.slice(0, maxLines), "... (content truncated to fit terminal)"].join("\n");
454844
- }
454845
- this.#stream.write(frameContent);
454846
- this.#linesToClear = this.#computeLineCountFrom(frameContent, columns);
455234
+ const useSynchronizedOutput = this.#stream.isTTY;
455235
+ let shouldDisableSynchronizedOutput = false;
455236
+ try {
455237
+ if (useSynchronizedOutput) {
455238
+ this.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_ENABLE));
455239
+ shouldDisableSynchronizedOutput = true;
455240
+ }
455241
+ this.clear();
455242
+ let frameContent = this.frame();
455243
+ const columns = this.#stream.columns ?? 80;
455244
+ const actualLineCount = this.#computeLineCountFrom(frameContent, columns);
455245
+ const consoleHeight = this.#stream.rows;
455246
+ if (consoleHeight && consoleHeight > 1 && actualLineCount > consoleHeight) {
455247
+ const lines = frameContent.split("\n");
455248
+ const maxLines = consoleHeight - 1;
455249
+ frameContent = [...lines.slice(0, maxLines), "... (content truncated to fit terminal)"].join("\n");
455250
+ }
455251
+ const canContinue = this.#internalWrite(() => this.#stream.write(frameContent));
455252
+ if (canContinue === false && this.#stream.isTTY) {
455253
+ this.#drainHandler = () => {
455254
+ this.#drainHandler = void 0;
455255
+ this.#tryRender();
455256
+ };
455257
+ this.#stream.once("drain", this.#drainHandler);
455258
+ }
455259
+ this.#linesToClear = this.#computeLineCountFrom(frameContent, columns);
455260
+ } finally {
455261
+ if (shouldDisableSynchronizedOutput) {
455262
+ this.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_DISABLE));
455263
+ }
455264
+ }
454847
455265
  return this;
454848
455266
  }
454849
455267
  start(text) {
454850
455268
  if (text) {
454851
455269
  this.text = text;
454852
455270
  }
454853
- if (this.#isSilent) {
455271
+ if (this.isSilent) {
454854
455272
  return this;
454855
455273
  }
454856
- if (!this.#isEnabled) {
454857
- const line = " ".repeat(this.#indent) + this.#getFullPrefixText(this.#prefixText, " ") + (this.text ? `- ${this.text}` : "") + this.#getFullSuffixText(this.#suffixText, " ");
455274
+ if (!this.isEnabled) {
455275
+ const symbol = this.text ? "-" : "";
455276
+ const line = " ".repeat(this.#options.indent) + this.#buildOutputLine(symbol, this.text, this.#options.prefixText, this.#options.suffixText);
454858
455277
  if (line.trim() !== "") {
454859
- this.#stream.write(line + "\n");
455278
+ this.#internalWrite(() => this.#stream.write(line + "\n"));
454860
455279
  }
454861
455280
  return this;
454862
455281
  }
@@ -454867,9 +455286,10 @@ var init_ora = __esm({
454867
455286
  cli_cursor_default.hide(this.#stream);
454868
455287
  }
454869
455288
  if (this.#options.discardStdin && import_node_process6.default.stdin.isTTY) {
454870
- this.#isDiscardingStdin = true;
454871
455289
  stdin_discarder_default.start();
455290
+ this.#isDiscardingStdin = true;
454872
455291
  }
455292
+ this.#installHook();
454873
455293
  this.render();
454874
455294
  this.#id = setInterval(this.render.bind(this), this.interval);
454875
455295
  return this;
@@ -454877,16 +455297,23 @@ var init_ora = __esm({
454877
455297
  stop() {
454878
455298
  clearInterval(this.#id);
454879
455299
  this.#id = void 0;
454880
- this.#frameIndex = 0;
454881
- if (this.#isEnabled) {
455300
+ this.#frameIndex = -1;
455301
+ this.#lastFrameTime = 0;
455302
+ this.#clearRenderDeferral();
455303
+ this.#uninstallHook();
455304
+ if (this.#drainHandler) {
455305
+ this.#stream.removeListener("drain", this.#drainHandler);
455306
+ this.#drainHandler = void 0;
455307
+ }
455308
+ if (this.isEnabled) {
454882
455309
  this.clear();
454883
455310
  if (this.#options.hideCursor) {
454884
455311
  cli_cursor_default.show(this.#stream);
454885
455312
  }
454886
455313
  }
454887
- if (this.#options.discardStdin && import_node_process6.default.stdin.isTTY && this.#isDiscardingStdin) {
454888
- stdin_discarder_default.stop();
455314
+ if (this.#isDiscardingStdin) {
454889
455315
  this.#isDiscardingStdin = false;
455316
+ stdin_discarder_default.stop();
454890
455317
  }
454891
455318
  return this;
454892
455319
  }
@@ -454903,20 +455330,16 @@ var init_ora = __esm({
454903
455330
  return this.stopAndPersist({ symbol: symbols_exports.info, text });
454904
455331
  }
454905
455332
  stopAndPersist(options = {}) {
454906
- if (this.#isSilent) {
455333
+ if (this.isSilent) {
454907
455334
  return this;
454908
455335
  }
454909
- const prefixText = options.prefixText ?? this.#prefixText;
454910
- const fullPrefixText = this.#getFullPrefixText(prefixText, " ");
454911
- const symbolText = options.symbol ?? " ";
455336
+ const symbol = options.symbol ?? " ";
454912
455337
  const text = options.text ?? this.text;
454913
- const separatorText = symbolText ? " " : "";
454914
- const fullText = typeof text === "string" ? separatorText + text : "";
454915
- const suffixText = options.suffixText ?? this.#suffixText;
454916
- const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
454917
- const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + "\n";
455338
+ const prefixText = options.prefixText ?? this.#options.prefixText;
455339
+ const suffixText = options.suffixText ?? this.#options.suffixText;
455340
+ const textToWrite = this.#buildOutputLine(symbol, text, prefixText, suffixText) + "\n";
454918
455341
  this.stop();
454919
- this.#stream.write(textToWrite);
455342
+ this.#internalWrite(() => this.#stream.write(textToWrite));
454920
455343
  return this;
454921
455344
  }
454922
455345
  };
@@ -455147,7 +455570,6 @@ var require_executor2 = __commonJS({
455147
455570
  const errorStream = ignoreErrorStream ? "ignore" : process.stderr;
455148
455571
  const spawnOptions = {
455149
455572
  stdio: [process.stdin, outputStream, errorStream],
455150
- shell: true,
455151
455573
  cwd: path.join(rootDirectory, options.workingDirectory || ""),
455152
455574
  env: {
455153
455575
  ...process.env,
@@ -455156,7 +455578,7 @@ var require_executor2 = __commonJS({
455156
455578
  }
455157
455579
  };
455158
455580
  return new Promise((resolve, reject) => {
455159
- (0, node_child_process_1.spawn)(`git ${args.join(" ")}`, spawnOptions).on("close", (code) => {
455581
+ (0, node_child_process_1.spawn)("git", args, spawnOptions).on("close", (code) => {
455160
455582
  if (code === 0) {
455161
455583
  resolve();
455162
455584
  } else {
@@ -455182,7 +455604,7 @@ var require_executor2 = __commonJS({
455182
455604
  await execute(["add", "."]);
455183
455605
  if (options.commit) {
455184
455606
  const message = options.message || "initial commit";
455185
- await execute(["commit", `-m "${message}"`]);
455607
+ await execute(["commit", "-m", message]);
455186
455608
  }
455187
455609
  context.logger.info("Successfully initialized git.");
455188
455610
  } catch {
@@ -458128,20 +458550,20 @@ var require_internal = __commonJS({
458128
458550
  });
458129
458551
 
458130
458552
  // node_modules/@angular-devkit/architect/package.json
458131
- var require_package3 = __commonJS({
458553
+ var require_package2 = __commonJS({
458132
458554
  "node_modules/@angular-devkit/architect/package.json"(exports2, module2) {
458133
458555
  module2.exports = {
458134
458556
  name: "@angular-devkit/architect",
458135
- version: "0.2101.5",
458557
+ version: "0.2102.28",
458136
458558
  description: "Angular Build Facade",
458137
458559
  experimental: true,
458138
458560
  bin: {
458139
- architect: "./bin/cli.js"
458561
+ architect: "bin/cli.js"
458140
458562
  },
458141
458563
  main: "src/index.js",
458142
458564
  typings: "src/index.d.ts",
458143
458565
  dependencies: {
458144
- "@angular-devkit/core": "21.1.5",
458566
+ "@angular-devkit/core": "21.2.28",
458145
458567
  rxjs: "7.8.2"
458146
458568
  },
458147
458569
  builders: "./builders/builders.json",
@@ -458154,9 +458576,9 @@ var require_package3 = __commonJS({
458154
458576
  ],
458155
458577
  repository: {
458156
458578
  type: "git",
458157
- url: "https://github.com/angular/angular-cli.git"
458579
+ url: "git+https://github.com/angular/angular-cli.git"
458158
458580
  },
458159
- packageManager: "pnpm@10.29.3",
458581
+ packageManager: "pnpm@10.33.2",
458160
458582
  engines: {
458161
458583
  node: "^20.19.0 || ^22.12.0 || >=24.0.0",
458162
458584
  npm: "^6.11.0 || ^7.5.6 || >=8.0.0",
@@ -458328,7 +458750,7 @@ var require_create_builder = __commonJS({
458328
458750
  return {
458329
458751
  handler,
458330
458752
  [internal_1.BuilderSymbol]: true,
458331
- [internal_1.BuilderVersionSymbol]: require_package3().version,
458753
+ [internal_1.BuilderVersionSymbol]: require_package2().version,
458332
458754
  // Only needed for type safety around `Builder` types.
458333
458755
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
458334
458756
  __OptionT: null
@@ -458950,11 +459372,10 @@ lodash/lodash.js:
458950
459372
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
458951
459373
  *)
458952
459374
 
458953
- ejs/lib/ejs.js:
459375
+ ejs/lib/cjs/ejs.js:
458954
459376
  (**
458955
459377
  * @file Embedded JavaScript templating engine. {@link http://ejs.co}
458956
459378
  * @author Matthew Eernisse <mde@fleegix.org>
458957
- * @author Tiancheng "Timothy" Gu <timothygu99@gmail.com>
458958
459379
  * @project EJS
458959
459380
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
458960
459381
  *)