@storm-software/workspace-tools 1.31.16 → 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.
@@ -61483,6 +61483,195 @@ var LogLevelLabel = {
61483
61483
  TRACE: "trace"
61484
61484
  };
61485
61485
 
61486
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
61487
+ var import_node_process = __toESM(require("node:process"), 1);
61488
+ var import_node_path = __toESM(require("node:path"), 1);
61489
+ var import_node_fs = __toESM(require("node:fs"), 1);
61490
+ var import_node_url = require("node:url");
61491
+
61492
+ // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
61493
+ var Node = class {
61494
+ value;
61495
+ next;
61496
+ constructor(value2) {
61497
+ this.value = value2;
61498
+ }
61499
+ };
61500
+ var Queue = class {
61501
+ #head;
61502
+ #tail;
61503
+ #size;
61504
+ constructor() {
61505
+ this.clear();
61506
+ }
61507
+ enqueue(value2) {
61508
+ const node = new Node(value2);
61509
+ if (this.#head) {
61510
+ this.#tail.next = node;
61511
+ this.#tail = node;
61512
+ } else {
61513
+ this.#head = node;
61514
+ this.#tail = node;
61515
+ }
61516
+ this.#size++;
61517
+ }
61518
+ dequeue() {
61519
+ const current = this.#head;
61520
+ if (!current) {
61521
+ return;
61522
+ }
61523
+ this.#head = this.#head.next;
61524
+ this.#size--;
61525
+ return current.value;
61526
+ }
61527
+ clear() {
61528
+ this.#head = void 0;
61529
+ this.#tail = void 0;
61530
+ this.#size = 0;
61531
+ }
61532
+ get size() {
61533
+ return this.#size;
61534
+ }
61535
+ *[Symbol.iterator]() {
61536
+ let current = this.#head;
61537
+ while (current) {
61538
+ yield current.value;
61539
+ current = current.next;
61540
+ }
61541
+ }
61542
+ };
61543
+
61544
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
61545
+ var typeMappings = {
61546
+ directory: "isDirectory",
61547
+ file: "isFile"
61548
+ };
61549
+ function checkType(type) {
61550
+ if (Object.hasOwnProperty.call(typeMappings, type)) {
61551
+ return;
61552
+ }
61553
+ throw new Error(`Invalid type specified: ${type}`);
61554
+ }
61555
+ var matchType = (type, stat) => stat[typeMappings[type]]();
61556
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
61557
+ function locatePathSync(paths, {
61558
+ cwd = import_node_process.default.cwd(),
61559
+ type = "file",
61560
+ allowSymlinks = true
61561
+ } = {}) {
61562
+ checkType(type);
61563
+ cwd = toPath(cwd);
61564
+ const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
61565
+ for (const path_ of paths) {
61566
+ try {
61567
+ const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
61568
+ throwIfNoEntry: false
61569
+ });
61570
+ if (!stat) {
61571
+ continue;
61572
+ }
61573
+ if (matchType(type, stat)) {
61574
+ return path_;
61575
+ }
61576
+ } catch {
61577
+ }
61578
+ }
61579
+ }
61580
+
61581
+ // packages/config-tools/src/utilities/find-up.ts
61582
+ var path2 = __toESM(require("path"), 1);
61583
+ var import_url = require("url");
61584
+ var findUpStop = Symbol("findUpStop");
61585
+ function toPath2(urlOrPath) {
61586
+ return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
61587
+ }
61588
+ function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
61589
+ let directory = path2.resolve(toPath2(options.cwd) ?? "");
61590
+ const { root } = path2.parse(directory);
61591
+ const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
61592
+ const limit = options.limit ?? Number.POSITIVE_INFINITY;
61593
+ if (typeof names === "function") {
61594
+ const foundPath = names(options.cwd);
61595
+ return locatePathSync([foundPath], options);
61596
+ }
61597
+ const runNameMatcher = (name) => {
61598
+ const paths = [name].flat();
61599
+ const runMatcher = (locateOptions) => {
61600
+ if (typeof name !== "function") {
61601
+ return locatePathSync(paths, locateOptions);
61602
+ }
61603
+ const foundPath = name(locateOptions.cwd);
61604
+ if (typeof foundPath === "string") {
61605
+ return locatePathSync([foundPath], locateOptions);
61606
+ }
61607
+ return foundPath;
61608
+ };
61609
+ const matches = [];
61610
+ while (true) {
61611
+ const foundPath = runMatcher({ ...options, cwd: directory });
61612
+ if (foundPath) {
61613
+ matches.push(path2.resolve(directory, foundPath));
61614
+ }
61615
+ if (directory === stopAt || matches.length >= limit) {
61616
+ break;
61617
+ }
61618
+ directory = path2.dirname(directory);
61619
+ }
61620
+ return matches;
61621
+ };
61622
+ return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
61623
+ }
61624
+ function findUpSync(names, options = { limit: 1, type: "file" }) {
61625
+ const matches = findUpMultipleSync(names, options);
61626
+ return matches[0];
61627
+ }
61628
+
61629
+ // packages/config-tools/src/utilities/find-workspace-root.ts
61630
+ var rootFiles = [
61631
+ "lerna.json",
61632
+ "nx.json",
61633
+ "turbo.json",
61634
+ "npm-workspace.json",
61635
+ "yarn-workspace.json",
61636
+ "pnpm-workspace.json",
61637
+ "npm-workspace.yaml",
61638
+ "yarn-workspace.yaml",
61639
+ "pnpm-workspace.yaml",
61640
+ "npm-workspace.yml",
61641
+ "yarn-workspace.yml",
61642
+ "pnpm-workspace.yml",
61643
+ "npm-lock.json",
61644
+ "yarn-lock.json",
61645
+ "pnpm-lock.json",
61646
+ "npm-lock.yaml",
61647
+ "yarn-lock.yaml",
61648
+ "pnpm-lock.yaml",
61649
+ "npm-lock.yml",
61650
+ "yarn-lock.yml",
61651
+ "pnpm-lock.yml",
61652
+ "bun.lockb"
61653
+ ];
61654
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
61655
+ 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, {
61656
+ cwd: pathInsideMonorepo ?? process.cwd(),
61657
+ type: "file",
61658
+ limit: 1
61659
+ });
61660
+ }
61661
+ function findWorkspaceRoot(pathInsideMonorepo) {
61662
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
61663
+ if (!result) {
61664
+ throw new Error(
61665
+ `Cannot find workspace root upwards from known path. Files search list includes:
61666
+ ${rootFiles.join(
61667
+ "\n"
61668
+ )}
61669
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
61670
+ );
61671
+ }
61672
+ return result;
61673
+ }
61674
+
61486
61675
  // packages/config-tools/src/utilities/get-default-config.ts
61487
61676
  var import_fs = require("fs");
61488
61677
  var import_path = require("path");
@@ -65119,192 +65308,6 @@ var StormConfigSchema = objectType({
65119
65308
  "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."
65120
65309
  );
65121
65310
 
65122
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
65123
- var import_node_process = __toESM(require("node:process"), 1);
65124
- var import_node_path = __toESM(require("node:path"), 1);
65125
- var import_node_fs = __toESM(require("node:fs"), 1);
65126
- var import_node_url = require("node:url");
65127
-
65128
- // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
65129
- var Node = class {
65130
- value;
65131
- next;
65132
- constructor(value2) {
65133
- this.value = value2;
65134
- }
65135
- };
65136
- var Queue = class {
65137
- #head;
65138
- #tail;
65139
- #size;
65140
- constructor() {
65141
- this.clear();
65142
- }
65143
- enqueue(value2) {
65144
- const node = new Node(value2);
65145
- if (this.#head) {
65146
- this.#tail.next = node;
65147
- this.#tail = node;
65148
- } else {
65149
- this.#head = node;
65150
- this.#tail = node;
65151
- }
65152
- this.#size++;
65153
- }
65154
- dequeue() {
65155
- const current = this.#head;
65156
- if (!current) {
65157
- return;
65158
- }
65159
- this.#head = this.#head.next;
65160
- this.#size--;
65161
- return current.value;
65162
- }
65163
- clear() {
65164
- this.#head = void 0;
65165
- this.#tail = void 0;
65166
- this.#size = 0;
65167
- }
65168
- get size() {
65169
- return this.#size;
65170
- }
65171
- *[Symbol.iterator]() {
65172
- let current = this.#head;
65173
- while (current) {
65174
- yield current.value;
65175
- current = current.next;
65176
- }
65177
- }
65178
- };
65179
-
65180
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
65181
- var typeMappings = {
65182
- directory: "isDirectory",
65183
- file: "isFile"
65184
- };
65185
- function checkType(type) {
65186
- if (Object.hasOwnProperty.call(typeMappings, type)) {
65187
- return;
65188
- }
65189
- throw new Error(`Invalid type specified: ${type}`);
65190
- }
65191
- var matchType = (type, stat) => stat[typeMappings[type]]();
65192
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
65193
- function locatePathSync(paths, {
65194
- cwd = import_node_process.default.cwd(),
65195
- type = "file",
65196
- allowSymlinks = true
65197
- } = {}) {
65198
- checkType(type);
65199
- cwd = toPath(cwd);
65200
- const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
65201
- for (const path_ of paths) {
65202
- try {
65203
- const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
65204
- throwIfNoEntry: false
65205
- });
65206
- if (!stat) {
65207
- continue;
65208
- }
65209
- if (matchType(type, stat)) {
65210
- return path_;
65211
- }
65212
- } catch {
65213
- }
65214
- }
65215
- }
65216
-
65217
- // packages/config-tools/src/utilities/find-up.ts
65218
- var path2 = __toESM(require("path"), 1);
65219
- var import_url = require("url");
65220
- var findUpStop = Symbol("findUpStop");
65221
- function toPath2(urlOrPath) {
65222
- return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
65223
- }
65224
- function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
65225
- let directory = path2.resolve(toPath2(options.cwd) ?? "");
65226
- const { root } = path2.parse(directory);
65227
- const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
65228
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
65229
- if (typeof names === "function") {
65230
- const foundPath = names(options.cwd);
65231
- return locatePathSync([foundPath], options);
65232
- }
65233
- const runNameMatcher = (name) => {
65234
- const paths = [name].flat();
65235
- const runMatcher = (locateOptions) => {
65236
- if (typeof name !== "function") {
65237
- return locatePathSync(paths, locateOptions);
65238
- }
65239
- const foundPath = name(locateOptions.cwd);
65240
- if (typeof foundPath === "string") {
65241
- return locatePathSync([foundPath], locateOptions);
65242
- }
65243
- return foundPath;
65244
- };
65245
- const matches = [];
65246
- while (true) {
65247
- const foundPath = runMatcher({ ...options, cwd: directory });
65248
- if (foundPath) {
65249
- matches.push(path2.resolve(directory, foundPath));
65250
- }
65251
- if (directory === stopAt || matches.length >= limit) {
65252
- break;
65253
- }
65254
- directory = path2.dirname(directory);
65255
- }
65256
- return matches;
65257
- };
65258
- return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
65259
- }
65260
- function findUpSync(names, options = { limit: 1, type: "file" }) {
65261
- const matches = findUpMultipleSync(names, options);
65262
- return matches[0];
65263
- }
65264
-
65265
- // packages/config-tools/src/utilities/find-workspace-root.ts
65266
- var rootFiles = [
65267
- "lerna.json",
65268
- "nx.json",
65269
- "turbo.json",
65270
- "npm-workspace.json",
65271
- "yarn-workspace.json",
65272
- "pnpm-workspace.json",
65273
- "npm-workspace.yaml",
65274
- "yarn-workspace.yaml",
65275
- "pnpm-workspace.yaml",
65276
- "npm-workspace.yml",
65277
- "yarn-workspace.yml",
65278
- "pnpm-workspace.yml",
65279
- "npm-lock.json",
65280
- "yarn-lock.json",
65281
- "pnpm-lock.json",
65282
- "npm-lock.yaml",
65283
- "yarn-lock.yaml",
65284
- "pnpm-lock.yaml",
65285
- "npm-lock.yml",
65286
- "yarn-lock.yml",
65287
- "pnpm-lock.yml",
65288
- "bun.lockb"
65289
- ];
65290
- function findWorkspaceRoot(pathInsideMonorepo) {
65291
- 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, {
65292
- cwd: pathInsideMonorepo ?? process.cwd(),
65293
- type: "file",
65294
- limit: 1
65295
- });
65296
- if (!result) {
65297
- throw new Error(
65298
- `Cannot find workspace root upwards from known path. Files search list includes:
65299
- ${rootFiles.join(
65300
- "\n"
65301
- )}
65302
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
65303
- );
65304
- }
65305
- return result;
65306
- }
65307
-
65308
65311
  // packages/config-tools/src/utilities/get-default-config.ts
65309
65312
  var DefaultColorConfig = {
65310
65313
  primary: "#1fb2a6",