@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.
@@ -26318,6 +26318,195 @@ var LogLevelLabel = {
26318
26318
  TRACE: "trace"
26319
26319
  };
26320
26320
 
26321
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
26322
+ var import_node_process = __toESM(require("node:process"), 1);
26323
+ var import_node_path = __toESM(require("node:path"), 1);
26324
+ var import_node_fs = __toESM(require("node:fs"), 1);
26325
+ var import_node_url = require("node:url");
26326
+
26327
+ // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
26328
+ var Node = class {
26329
+ value;
26330
+ next;
26331
+ constructor(value) {
26332
+ this.value = value;
26333
+ }
26334
+ };
26335
+ var Queue = class {
26336
+ #head;
26337
+ #tail;
26338
+ #size;
26339
+ constructor() {
26340
+ this.clear();
26341
+ }
26342
+ enqueue(value) {
26343
+ const node = new Node(value);
26344
+ if (this.#head) {
26345
+ this.#tail.next = node;
26346
+ this.#tail = node;
26347
+ } else {
26348
+ this.#head = node;
26349
+ this.#tail = node;
26350
+ }
26351
+ this.#size++;
26352
+ }
26353
+ dequeue() {
26354
+ const current = this.#head;
26355
+ if (!current) {
26356
+ return;
26357
+ }
26358
+ this.#head = this.#head.next;
26359
+ this.#size--;
26360
+ return current.value;
26361
+ }
26362
+ clear() {
26363
+ this.#head = void 0;
26364
+ this.#tail = void 0;
26365
+ this.#size = 0;
26366
+ }
26367
+ get size() {
26368
+ return this.#size;
26369
+ }
26370
+ *[Symbol.iterator]() {
26371
+ let current = this.#head;
26372
+ while (current) {
26373
+ yield current.value;
26374
+ current = current.next;
26375
+ }
26376
+ }
26377
+ };
26378
+
26379
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
26380
+ var typeMappings = {
26381
+ directory: "isDirectory",
26382
+ file: "isFile"
26383
+ };
26384
+ function checkType(type) {
26385
+ if (Object.hasOwnProperty.call(typeMappings, type)) {
26386
+ return;
26387
+ }
26388
+ throw new Error(`Invalid type specified: ${type}`);
26389
+ }
26390
+ var matchType = (type, stat) => stat[typeMappings[type]]();
26391
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
26392
+ function locatePathSync(paths, {
26393
+ cwd = import_node_process.default.cwd(),
26394
+ type = "file",
26395
+ allowSymlinks = true
26396
+ } = {}) {
26397
+ checkType(type);
26398
+ cwd = toPath(cwd);
26399
+ const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
26400
+ for (const path_ of paths) {
26401
+ try {
26402
+ const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
26403
+ throwIfNoEntry: false
26404
+ });
26405
+ if (!stat) {
26406
+ continue;
26407
+ }
26408
+ if (matchType(type, stat)) {
26409
+ return path_;
26410
+ }
26411
+ } catch {
26412
+ }
26413
+ }
26414
+ }
26415
+
26416
+ // packages/config-tools/src/utilities/find-up.ts
26417
+ var path2 = __toESM(require("path"), 1);
26418
+ var import_url = require("url");
26419
+ var findUpStop = Symbol("findUpStop");
26420
+ function toPath2(urlOrPath) {
26421
+ return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
26422
+ }
26423
+ function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
26424
+ let directory = path2.resolve(toPath2(options.cwd) ?? "");
26425
+ const { root } = path2.parse(directory);
26426
+ const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
26427
+ const limit = options.limit ?? Number.POSITIVE_INFINITY;
26428
+ if (typeof names === "function") {
26429
+ const foundPath = names(options.cwd);
26430
+ return locatePathSync([foundPath], options);
26431
+ }
26432
+ const runNameMatcher = (name) => {
26433
+ const paths = [name].flat();
26434
+ const runMatcher = (locateOptions) => {
26435
+ if (typeof name !== "function") {
26436
+ return locatePathSync(paths, locateOptions);
26437
+ }
26438
+ const foundPath = name(locateOptions.cwd);
26439
+ if (typeof foundPath === "string") {
26440
+ return locatePathSync([foundPath], locateOptions);
26441
+ }
26442
+ return foundPath;
26443
+ };
26444
+ const matches = [];
26445
+ while (true) {
26446
+ const foundPath = runMatcher({ ...options, cwd: directory });
26447
+ if (foundPath) {
26448
+ matches.push(path2.resolve(directory, foundPath));
26449
+ }
26450
+ if (directory === stopAt || matches.length >= limit) {
26451
+ break;
26452
+ }
26453
+ directory = path2.dirname(directory);
26454
+ }
26455
+ return matches;
26456
+ };
26457
+ return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
26458
+ }
26459
+ function findUpSync(names, options = { limit: 1, type: "file" }) {
26460
+ const matches = findUpMultipleSync(names, options);
26461
+ return matches[0];
26462
+ }
26463
+
26464
+ // packages/config-tools/src/utilities/find-workspace-root.ts
26465
+ var rootFiles = [
26466
+ "lerna.json",
26467
+ "nx.json",
26468
+ "turbo.json",
26469
+ "npm-workspace.json",
26470
+ "yarn-workspace.json",
26471
+ "pnpm-workspace.json",
26472
+ "npm-workspace.yaml",
26473
+ "yarn-workspace.yaml",
26474
+ "pnpm-workspace.yaml",
26475
+ "npm-workspace.yml",
26476
+ "yarn-workspace.yml",
26477
+ "pnpm-workspace.yml",
26478
+ "npm-lock.json",
26479
+ "yarn-lock.json",
26480
+ "pnpm-lock.json",
26481
+ "npm-lock.yaml",
26482
+ "yarn-lock.yaml",
26483
+ "pnpm-lock.yaml",
26484
+ "npm-lock.yml",
26485
+ "yarn-lock.yml",
26486
+ "pnpm-lock.yml",
26487
+ "bun.lockb"
26488
+ ];
26489
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
26490
+ 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, {
26491
+ cwd: pathInsideMonorepo ?? process.cwd(),
26492
+ type: "file",
26493
+ limit: 1
26494
+ });
26495
+ }
26496
+ function findWorkspaceRoot(pathInsideMonorepo) {
26497
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
26498
+ if (!result) {
26499
+ throw new Error(
26500
+ `Cannot find workspace root upwards from known path. Files search list includes:
26501
+ ${rootFiles.join(
26502
+ "\n"
26503
+ )}
26504
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
26505
+ );
26506
+ }
26507
+ return result;
26508
+ }
26509
+
26321
26510
  // packages/config-tools/src/utilities/get-default-config.ts
26322
26511
  var import_fs = require("fs");
26323
26512
  var import_path = require("path");
@@ -29954,192 +30143,6 @@ var StormConfigSchema = objectType({
29954
30143
  "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."
29955
30144
  );
29956
30145
 
29957
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
29958
- var import_node_process = __toESM(require("node:process"), 1);
29959
- var import_node_path = __toESM(require("node:path"), 1);
29960
- var import_node_fs = __toESM(require("node:fs"), 1);
29961
- var import_node_url = require("node:url");
29962
-
29963
- // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
29964
- var Node = class {
29965
- value;
29966
- next;
29967
- constructor(value) {
29968
- this.value = value;
29969
- }
29970
- };
29971
- var Queue = class {
29972
- #head;
29973
- #tail;
29974
- #size;
29975
- constructor() {
29976
- this.clear();
29977
- }
29978
- enqueue(value) {
29979
- const node = new Node(value);
29980
- if (this.#head) {
29981
- this.#tail.next = node;
29982
- this.#tail = node;
29983
- } else {
29984
- this.#head = node;
29985
- this.#tail = node;
29986
- }
29987
- this.#size++;
29988
- }
29989
- dequeue() {
29990
- const current = this.#head;
29991
- if (!current) {
29992
- return;
29993
- }
29994
- this.#head = this.#head.next;
29995
- this.#size--;
29996
- return current.value;
29997
- }
29998
- clear() {
29999
- this.#head = void 0;
30000
- this.#tail = void 0;
30001
- this.#size = 0;
30002
- }
30003
- get size() {
30004
- return this.#size;
30005
- }
30006
- *[Symbol.iterator]() {
30007
- let current = this.#head;
30008
- while (current) {
30009
- yield current.value;
30010
- current = current.next;
30011
- }
30012
- }
30013
- };
30014
-
30015
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
30016
- var typeMappings = {
30017
- directory: "isDirectory",
30018
- file: "isFile"
30019
- };
30020
- function checkType(type) {
30021
- if (Object.hasOwnProperty.call(typeMappings, type)) {
30022
- return;
30023
- }
30024
- throw new Error(`Invalid type specified: ${type}`);
30025
- }
30026
- var matchType = (type, stat) => stat[typeMappings[type]]();
30027
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
30028
- function locatePathSync(paths, {
30029
- cwd = import_node_process.default.cwd(),
30030
- type = "file",
30031
- allowSymlinks = true
30032
- } = {}) {
30033
- checkType(type);
30034
- cwd = toPath(cwd);
30035
- const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
30036
- for (const path_ of paths) {
30037
- try {
30038
- const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
30039
- throwIfNoEntry: false
30040
- });
30041
- if (!stat) {
30042
- continue;
30043
- }
30044
- if (matchType(type, stat)) {
30045
- return path_;
30046
- }
30047
- } catch {
30048
- }
30049
- }
30050
- }
30051
-
30052
- // packages/config-tools/src/utilities/find-up.ts
30053
- var path2 = __toESM(require("path"), 1);
30054
- var import_url = require("url");
30055
- var findUpStop = Symbol("findUpStop");
30056
- function toPath2(urlOrPath) {
30057
- return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
30058
- }
30059
- function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
30060
- let directory = path2.resolve(toPath2(options.cwd) ?? "");
30061
- const { root } = path2.parse(directory);
30062
- const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
30063
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
30064
- if (typeof names === "function") {
30065
- const foundPath = names(options.cwd);
30066
- return locatePathSync([foundPath], options);
30067
- }
30068
- const runNameMatcher = (name) => {
30069
- const paths = [name].flat();
30070
- const runMatcher = (locateOptions) => {
30071
- if (typeof name !== "function") {
30072
- return locatePathSync(paths, locateOptions);
30073
- }
30074
- const foundPath = name(locateOptions.cwd);
30075
- if (typeof foundPath === "string") {
30076
- return locatePathSync([foundPath], locateOptions);
30077
- }
30078
- return foundPath;
30079
- };
30080
- const matches = [];
30081
- while (true) {
30082
- const foundPath = runMatcher({ ...options, cwd: directory });
30083
- if (foundPath) {
30084
- matches.push(path2.resolve(directory, foundPath));
30085
- }
30086
- if (directory === stopAt || matches.length >= limit) {
30087
- break;
30088
- }
30089
- directory = path2.dirname(directory);
30090
- }
30091
- return matches;
30092
- };
30093
- return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
30094
- }
30095
- function findUpSync(names, options = { limit: 1, type: "file" }) {
30096
- const matches = findUpMultipleSync(names, options);
30097
- return matches[0];
30098
- }
30099
-
30100
- // packages/config-tools/src/utilities/find-workspace-root.ts
30101
- var rootFiles = [
30102
- "lerna.json",
30103
- "nx.json",
30104
- "turbo.json",
30105
- "npm-workspace.json",
30106
- "yarn-workspace.json",
30107
- "pnpm-workspace.json",
30108
- "npm-workspace.yaml",
30109
- "yarn-workspace.yaml",
30110
- "pnpm-workspace.yaml",
30111
- "npm-workspace.yml",
30112
- "yarn-workspace.yml",
30113
- "pnpm-workspace.yml",
30114
- "npm-lock.json",
30115
- "yarn-lock.json",
30116
- "pnpm-lock.json",
30117
- "npm-lock.yaml",
30118
- "yarn-lock.yaml",
30119
- "pnpm-lock.yaml",
30120
- "npm-lock.yml",
30121
- "yarn-lock.yml",
30122
- "pnpm-lock.yml",
30123
- "bun.lockb"
30124
- ];
30125
- function findWorkspaceRoot(pathInsideMonorepo) {
30126
- 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, {
30127
- cwd: pathInsideMonorepo ?? process.cwd(),
30128
- type: "file",
30129
- limit: 1
30130
- });
30131
- if (!result) {
30132
- throw new Error(
30133
- `Cannot find workspace root upwards from known path. Files search list includes:
30134
- ${rootFiles.join(
30135
- "\n"
30136
- )}
30137
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
30138
- );
30139
- }
30140
- return result;
30141
- }
30142
-
30143
30146
  // packages/config-tools/src/utilities/get-default-config.ts
30144
30147
  var DefaultColorConfig = {
30145
30148
  primary: "#1fb2a6",