@storm-software/workspace-tools 1.31.17 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43560,6 +43560,195 @@ var LogLevelLabel = {
43560
43560
  TRACE: "trace"
43561
43561
  };
43562
43562
 
43563
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
43564
+ var import_node_process = __toESM(require("node:process"), 1);
43565
+ var import_node_path = __toESM(require("node:path"), 1);
43566
+ var import_node_fs = __toESM(require("node:fs"), 1);
43567
+ var import_node_url = require("node:url");
43568
+
43569
+ // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
43570
+ var Node = class {
43571
+ value;
43572
+ next;
43573
+ constructor(value) {
43574
+ this.value = value;
43575
+ }
43576
+ };
43577
+ var Queue = class {
43578
+ #head;
43579
+ #tail;
43580
+ #size;
43581
+ constructor() {
43582
+ this.clear();
43583
+ }
43584
+ enqueue(value) {
43585
+ const node = new Node(value);
43586
+ if (this.#head) {
43587
+ this.#tail.next = node;
43588
+ this.#tail = node;
43589
+ } else {
43590
+ this.#head = node;
43591
+ this.#tail = node;
43592
+ }
43593
+ this.#size++;
43594
+ }
43595
+ dequeue() {
43596
+ const current = this.#head;
43597
+ if (!current) {
43598
+ return;
43599
+ }
43600
+ this.#head = this.#head.next;
43601
+ this.#size--;
43602
+ return current.value;
43603
+ }
43604
+ clear() {
43605
+ this.#head = void 0;
43606
+ this.#tail = void 0;
43607
+ this.#size = 0;
43608
+ }
43609
+ get size() {
43610
+ return this.#size;
43611
+ }
43612
+ *[Symbol.iterator]() {
43613
+ let current = this.#head;
43614
+ while (current) {
43615
+ yield current.value;
43616
+ current = current.next;
43617
+ }
43618
+ }
43619
+ };
43620
+
43621
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
43622
+ var typeMappings = {
43623
+ directory: "isDirectory",
43624
+ file: "isFile"
43625
+ };
43626
+ function checkType(type) {
43627
+ if (Object.hasOwnProperty.call(typeMappings, type)) {
43628
+ return;
43629
+ }
43630
+ throw new Error(`Invalid type specified: ${type}`);
43631
+ }
43632
+ var matchType = (type, stat) => stat[typeMappings[type]]();
43633
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
43634
+ function locatePathSync(paths, {
43635
+ cwd = import_node_process.default.cwd(),
43636
+ type = "file",
43637
+ allowSymlinks = true
43638
+ } = {}) {
43639
+ checkType(type);
43640
+ cwd = toPath(cwd);
43641
+ const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
43642
+ for (const path_ of paths) {
43643
+ try {
43644
+ const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
43645
+ throwIfNoEntry: false
43646
+ });
43647
+ if (!stat) {
43648
+ continue;
43649
+ }
43650
+ if (matchType(type, stat)) {
43651
+ return path_;
43652
+ }
43653
+ } catch {
43654
+ }
43655
+ }
43656
+ }
43657
+
43658
+ // packages/config-tools/src/utilities/find-up.ts
43659
+ var path2 = __toESM(require("path"), 1);
43660
+ var import_url = require("url");
43661
+ var findUpStop = Symbol("findUpStop");
43662
+ function toPath2(urlOrPath) {
43663
+ return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
43664
+ }
43665
+ function findUpMultipleSync(names3, options = { limit: 1, type: "file" }) {
43666
+ let directory = path2.resolve(toPath2(options.cwd) ?? "");
43667
+ const { root } = path2.parse(directory);
43668
+ const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
43669
+ const limit = options.limit ?? Number.POSITIVE_INFINITY;
43670
+ if (typeof names3 === "function") {
43671
+ const foundPath = names3(options.cwd);
43672
+ return locatePathSync([foundPath], options);
43673
+ }
43674
+ const runNameMatcher = (name) => {
43675
+ const paths = [name].flat();
43676
+ const runMatcher = (locateOptions) => {
43677
+ if (typeof name !== "function") {
43678
+ return locatePathSync(paths, locateOptions);
43679
+ }
43680
+ const foundPath = name(locateOptions.cwd);
43681
+ if (typeof foundPath === "string") {
43682
+ return locatePathSync([foundPath], locateOptions);
43683
+ }
43684
+ return foundPath;
43685
+ };
43686
+ const matches = [];
43687
+ while (true) {
43688
+ const foundPath = runMatcher({ ...options, cwd: directory });
43689
+ if (foundPath) {
43690
+ matches.push(path2.resolve(directory, foundPath));
43691
+ }
43692
+ if (directory === stopAt || matches.length >= limit) {
43693
+ break;
43694
+ }
43695
+ directory = path2.dirname(directory);
43696
+ }
43697
+ return matches;
43698
+ };
43699
+ return (names3 && Array.isArray(names3) ? names3 : [names3]).map((name) => runNameMatcher(name)).flat();
43700
+ }
43701
+ function findUpSync(names3, options = { limit: 1, type: "file" }) {
43702
+ const matches = findUpMultipleSync(names3, options);
43703
+ return matches[0];
43704
+ }
43705
+
43706
+ // packages/config-tools/src/utilities/find-workspace-root.ts
43707
+ var rootFiles = [
43708
+ "lerna.json",
43709
+ "nx.json",
43710
+ "turbo.json",
43711
+ "npm-workspace.json",
43712
+ "yarn-workspace.json",
43713
+ "pnpm-workspace.json",
43714
+ "npm-workspace.yaml",
43715
+ "yarn-workspace.yaml",
43716
+ "pnpm-workspace.yaml",
43717
+ "npm-workspace.yml",
43718
+ "yarn-workspace.yml",
43719
+ "pnpm-workspace.yml",
43720
+ "npm-lock.json",
43721
+ "yarn-lock.json",
43722
+ "pnpm-lock.json",
43723
+ "npm-lock.yaml",
43724
+ "yarn-lock.yaml",
43725
+ "pnpm-lock.yaml",
43726
+ "npm-lock.yml",
43727
+ "yarn-lock.yml",
43728
+ "pnpm-lock.yml",
43729
+ "bun.lockb"
43730
+ ];
43731
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
43732
+ return process.env.STORM_WORKSPACE_ROOT ? process.env.STORM_WORKSPACE_ROOT : process.env.NX_WORKSPACE_ROOT_PATH ? process.env.NX_WORKSPACE_ROOT_PATH : findUpSync(rootFiles, {
43733
+ cwd: pathInsideMonorepo ?? process.cwd(),
43734
+ type: "file",
43735
+ limit: 1
43736
+ });
43737
+ }
43738
+ function findWorkspaceRoot(pathInsideMonorepo) {
43739
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
43740
+ if (!result) {
43741
+ throw new Error(
43742
+ `Cannot find workspace root upwards from known path. Files search list includes:
43743
+ ${rootFiles.join(
43744
+ "\n"
43745
+ )}
43746
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
43747
+ );
43748
+ }
43749
+ return result;
43750
+ }
43751
+
43563
43752
  // packages/config-tools/src/utilities/get-default-config.ts
43564
43753
  var import_fs = require("fs");
43565
43754
  var import_path = require("path");
@@ -47196,192 +47385,6 @@ var StormConfigSchema = objectType({
47196
47385
  "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
47197
47386
  );
47198
47387
 
47199
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
47200
- var import_node_process = __toESM(require("node:process"), 1);
47201
- var import_node_path = __toESM(require("node:path"), 1);
47202
- var import_node_fs = __toESM(require("node:fs"), 1);
47203
- var import_node_url = require("node:url");
47204
-
47205
- // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
47206
- var Node = class {
47207
- value;
47208
- next;
47209
- constructor(value) {
47210
- this.value = value;
47211
- }
47212
- };
47213
- var Queue = class {
47214
- #head;
47215
- #tail;
47216
- #size;
47217
- constructor() {
47218
- this.clear();
47219
- }
47220
- enqueue(value) {
47221
- const node = new Node(value);
47222
- if (this.#head) {
47223
- this.#tail.next = node;
47224
- this.#tail = node;
47225
- } else {
47226
- this.#head = node;
47227
- this.#tail = node;
47228
- }
47229
- this.#size++;
47230
- }
47231
- dequeue() {
47232
- const current = this.#head;
47233
- if (!current) {
47234
- return;
47235
- }
47236
- this.#head = this.#head.next;
47237
- this.#size--;
47238
- return current.value;
47239
- }
47240
- clear() {
47241
- this.#head = void 0;
47242
- this.#tail = void 0;
47243
- this.#size = 0;
47244
- }
47245
- get size() {
47246
- return this.#size;
47247
- }
47248
- *[Symbol.iterator]() {
47249
- let current = this.#head;
47250
- while (current) {
47251
- yield current.value;
47252
- current = current.next;
47253
- }
47254
- }
47255
- };
47256
-
47257
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
47258
- var typeMappings = {
47259
- directory: "isDirectory",
47260
- file: "isFile"
47261
- };
47262
- function checkType(type) {
47263
- if (Object.hasOwnProperty.call(typeMappings, type)) {
47264
- return;
47265
- }
47266
- throw new Error(`Invalid type specified: ${type}`);
47267
- }
47268
- var matchType = (type, stat) => stat[typeMappings[type]]();
47269
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
47270
- function locatePathSync(paths, {
47271
- cwd = import_node_process.default.cwd(),
47272
- type = "file",
47273
- allowSymlinks = true
47274
- } = {}) {
47275
- checkType(type);
47276
- cwd = toPath(cwd);
47277
- const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
47278
- for (const path_ of paths) {
47279
- try {
47280
- const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
47281
- throwIfNoEntry: false
47282
- });
47283
- if (!stat) {
47284
- continue;
47285
- }
47286
- if (matchType(type, stat)) {
47287
- return path_;
47288
- }
47289
- } catch {
47290
- }
47291
- }
47292
- }
47293
-
47294
- // packages/config-tools/src/utilities/find-up.ts
47295
- var path2 = __toESM(require("path"), 1);
47296
- var import_url = require("url");
47297
- var findUpStop = Symbol("findUpStop");
47298
- function toPath2(urlOrPath) {
47299
- return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
47300
- }
47301
- function findUpMultipleSync(names3, options = { limit: 1, type: "file" }) {
47302
- let directory = path2.resolve(toPath2(options.cwd) ?? "");
47303
- const { root } = path2.parse(directory);
47304
- const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
47305
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
47306
- if (typeof names3 === "function") {
47307
- const foundPath = names3(options.cwd);
47308
- return locatePathSync([foundPath], options);
47309
- }
47310
- const runNameMatcher = (name) => {
47311
- const paths = [name].flat();
47312
- const runMatcher = (locateOptions) => {
47313
- if (typeof name !== "function") {
47314
- return locatePathSync(paths, locateOptions);
47315
- }
47316
- const foundPath = name(locateOptions.cwd);
47317
- if (typeof foundPath === "string") {
47318
- return locatePathSync([foundPath], locateOptions);
47319
- }
47320
- return foundPath;
47321
- };
47322
- const matches = [];
47323
- while (true) {
47324
- const foundPath = runMatcher({ ...options, cwd: directory });
47325
- if (foundPath) {
47326
- matches.push(path2.resolve(directory, foundPath));
47327
- }
47328
- if (directory === stopAt || matches.length >= limit) {
47329
- break;
47330
- }
47331
- directory = path2.dirname(directory);
47332
- }
47333
- return matches;
47334
- };
47335
- return (names3 && Array.isArray(names3) ? names3 : [names3]).map((name) => runNameMatcher(name)).flat();
47336
- }
47337
- function findUpSync(names3, options = { limit: 1, type: "file" }) {
47338
- const matches = findUpMultipleSync(names3, options);
47339
- return matches[0];
47340
- }
47341
-
47342
- // packages/config-tools/src/utilities/find-workspace-root.ts
47343
- var rootFiles = [
47344
- "lerna.json",
47345
- "nx.json",
47346
- "turbo.json",
47347
- "npm-workspace.json",
47348
- "yarn-workspace.json",
47349
- "pnpm-workspace.json",
47350
- "npm-workspace.yaml",
47351
- "yarn-workspace.yaml",
47352
- "pnpm-workspace.yaml",
47353
- "npm-workspace.yml",
47354
- "yarn-workspace.yml",
47355
- "pnpm-workspace.yml",
47356
- "npm-lock.json",
47357
- "yarn-lock.json",
47358
- "pnpm-lock.json",
47359
- "npm-lock.yaml",
47360
- "yarn-lock.yaml",
47361
- "pnpm-lock.yaml",
47362
- "npm-lock.yml",
47363
- "yarn-lock.yml",
47364
- "pnpm-lock.yml",
47365
- "bun.lockb"
47366
- ];
47367
- function findWorkspaceRoot(pathInsideMonorepo) {
47368
- const result = process.env.STORM_WORKSPACE_ROOT ? process.env.STORM_WORKSPACE_ROOT : process.env.NX_WORKSPACE_ROOT_PATH ? process.env.NX_WORKSPACE_ROOT_PATH : findUpSync(rootFiles, {
47369
- cwd: pathInsideMonorepo ?? process.cwd(),
47370
- type: "file",
47371
- limit: 1
47372
- });
47373
- if (!result) {
47374
- throw new Error(
47375
- `Cannot find workspace root upwards from known path. Files search list includes:
47376
- ${rootFiles.join(
47377
- "\n"
47378
- )}
47379
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
47380
- );
47381
- }
47382
- return result;
47383
- }
47384
-
47385
47388
  // packages/config-tools/src/utilities/get-default-config.ts
47386
47389
  var DefaultColorConfig = {
47387
47390
  primary: "#1fb2a6",