@storm-software/workspace-tools 1.31.17 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.31.17",
3
+ "version": "1.32.1",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
package/src/base/index.js CHANGED
@@ -8114,6 +8114,195 @@ var LogLevelLabel = {
8114
8114
  TRACE: "trace"
8115
8115
  };
8116
8116
 
8117
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
8118
+ var import_node_process = __toESM(require("node:process"), 1);
8119
+ var import_node_path = __toESM(require("node:path"), 1);
8120
+ var import_node_fs = __toESM(require("node:fs"), 1);
8121
+ var import_node_url = require("node:url");
8122
+
8123
+ // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
8124
+ var Node = class {
8125
+ value;
8126
+ next;
8127
+ constructor(value) {
8128
+ this.value = value;
8129
+ }
8130
+ };
8131
+ var Queue = class {
8132
+ #head;
8133
+ #tail;
8134
+ #size;
8135
+ constructor() {
8136
+ this.clear();
8137
+ }
8138
+ enqueue(value) {
8139
+ const node = new Node(value);
8140
+ if (this.#head) {
8141
+ this.#tail.next = node;
8142
+ this.#tail = node;
8143
+ } else {
8144
+ this.#head = node;
8145
+ this.#tail = node;
8146
+ }
8147
+ this.#size++;
8148
+ }
8149
+ dequeue() {
8150
+ const current = this.#head;
8151
+ if (!current) {
8152
+ return;
8153
+ }
8154
+ this.#head = this.#head.next;
8155
+ this.#size--;
8156
+ return current.value;
8157
+ }
8158
+ clear() {
8159
+ this.#head = void 0;
8160
+ this.#tail = void 0;
8161
+ this.#size = 0;
8162
+ }
8163
+ get size() {
8164
+ return this.#size;
8165
+ }
8166
+ *[Symbol.iterator]() {
8167
+ let current = this.#head;
8168
+ while (current) {
8169
+ yield current.value;
8170
+ current = current.next;
8171
+ }
8172
+ }
8173
+ };
8174
+
8175
+ // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
8176
+ var typeMappings = {
8177
+ directory: "isDirectory",
8178
+ file: "isFile"
8179
+ };
8180
+ function checkType(type) {
8181
+ if (Object.hasOwnProperty.call(typeMappings, type)) {
8182
+ return;
8183
+ }
8184
+ throw new Error(`Invalid type specified: ${type}`);
8185
+ }
8186
+ var matchType = (type, stat) => stat[typeMappings[type]]();
8187
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
8188
+ function locatePathSync(paths, {
8189
+ cwd = import_node_process.default.cwd(),
8190
+ type = "file",
8191
+ allowSymlinks = true
8192
+ } = {}) {
8193
+ checkType(type);
8194
+ cwd = toPath(cwd);
8195
+ const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
8196
+ for (const path_ of paths) {
8197
+ try {
8198
+ const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
8199
+ throwIfNoEntry: false
8200
+ });
8201
+ if (!stat) {
8202
+ continue;
8203
+ }
8204
+ if (matchType(type, stat)) {
8205
+ return path_;
8206
+ }
8207
+ } catch {
8208
+ }
8209
+ }
8210
+ }
8211
+
8212
+ // packages/config-tools/src/utilities/find-up.ts
8213
+ var path2 = __toESM(require("path"), 1);
8214
+ var import_url = require("url");
8215
+ var findUpStop = Symbol("findUpStop");
8216
+ function toPath2(urlOrPath) {
8217
+ return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
8218
+ }
8219
+ function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
8220
+ let directory = path2.resolve(toPath2(options.cwd) ?? "");
8221
+ const { root } = path2.parse(directory);
8222
+ const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
8223
+ const limit = options.limit ?? Number.POSITIVE_INFINITY;
8224
+ if (typeof names === "function") {
8225
+ const foundPath = names(options.cwd);
8226
+ return locatePathSync([foundPath], options);
8227
+ }
8228
+ const runNameMatcher = (name) => {
8229
+ const paths = [name].flat();
8230
+ const runMatcher = (locateOptions) => {
8231
+ if (typeof name !== "function") {
8232
+ return locatePathSync(paths, locateOptions);
8233
+ }
8234
+ const foundPath = name(locateOptions.cwd);
8235
+ if (typeof foundPath === "string") {
8236
+ return locatePathSync([foundPath], locateOptions);
8237
+ }
8238
+ return foundPath;
8239
+ };
8240
+ const matches = [];
8241
+ while (true) {
8242
+ const foundPath = runMatcher({ ...options, cwd: directory });
8243
+ if (foundPath) {
8244
+ matches.push(path2.resolve(directory, foundPath));
8245
+ }
8246
+ if (directory === stopAt || matches.length >= limit) {
8247
+ break;
8248
+ }
8249
+ directory = path2.dirname(directory);
8250
+ }
8251
+ return matches;
8252
+ };
8253
+ return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
8254
+ }
8255
+ function findUpSync(names, options = { limit: 1, type: "file" }) {
8256
+ const matches = findUpMultipleSync(names, options);
8257
+ return matches[0];
8258
+ }
8259
+
8260
+ // packages/config-tools/src/utilities/find-workspace-root.ts
8261
+ var rootFiles = [
8262
+ "lerna.json",
8263
+ "nx.json",
8264
+ "turbo.json",
8265
+ "npm-workspace.json",
8266
+ "yarn-workspace.json",
8267
+ "pnpm-workspace.json",
8268
+ "npm-workspace.yaml",
8269
+ "yarn-workspace.yaml",
8270
+ "pnpm-workspace.yaml",
8271
+ "npm-workspace.yml",
8272
+ "yarn-workspace.yml",
8273
+ "pnpm-workspace.yml",
8274
+ "npm-lock.json",
8275
+ "yarn-lock.json",
8276
+ "pnpm-lock.json",
8277
+ "npm-lock.yaml",
8278
+ "yarn-lock.yaml",
8279
+ "pnpm-lock.yaml",
8280
+ "npm-lock.yml",
8281
+ "yarn-lock.yml",
8282
+ "pnpm-lock.yml",
8283
+ "bun.lockb"
8284
+ ];
8285
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
8286
+ 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, {
8287
+ cwd: pathInsideMonorepo ?? process.cwd(),
8288
+ type: "file",
8289
+ limit: 1
8290
+ });
8291
+ }
8292
+ function findWorkspaceRoot(pathInsideMonorepo) {
8293
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
8294
+ if (!result) {
8295
+ throw new Error(
8296
+ `Cannot find workspace root upwards from known path. Files search list includes:
8297
+ ${rootFiles.join(
8298
+ "\n"
8299
+ )}
8300
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
8301
+ );
8302
+ }
8303
+ return result;
8304
+ }
8305
+
8117
8306
  // packages/config-tools/src/utilities/get-default-config.ts
8118
8307
  var import_fs = require("fs");
8119
8308
  var import_path = require("path");
@@ -11750,192 +11939,6 @@ var StormConfigSchema = objectType({
11750
11939
  "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."
11751
11940
  );
11752
11941
 
11753
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
11754
- var import_node_process = __toESM(require("node:process"), 1);
11755
- var import_node_path = __toESM(require("node:path"), 1);
11756
- var import_node_fs = __toESM(require("node:fs"), 1);
11757
- var import_node_url = require("node:url");
11758
-
11759
- // node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
11760
- var Node = class {
11761
- value;
11762
- next;
11763
- constructor(value) {
11764
- this.value = value;
11765
- }
11766
- };
11767
- var Queue = class {
11768
- #head;
11769
- #tail;
11770
- #size;
11771
- constructor() {
11772
- this.clear();
11773
- }
11774
- enqueue(value) {
11775
- const node = new Node(value);
11776
- if (this.#head) {
11777
- this.#tail.next = node;
11778
- this.#tail = node;
11779
- } else {
11780
- this.#head = node;
11781
- this.#tail = node;
11782
- }
11783
- this.#size++;
11784
- }
11785
- dequeue() {
11786
- const current = this.#head;
11787
- if (!current) {
11788
- return;
11789
- }
11790
- this.#head = this.#head.next;
11791
- this.#size--;
11792
- return current.value;
11793
- }
11794
- clear() {
11795
- this.#head = void 0;
11796
- this.#tail = void 0;
11797
- this.#size = 0;
11798
- }
11799
- get size() {
11800
- return this.#size;
11801
- }
11802
- *[Symbol.iterator]() {
11803
- let current = this.#head;
11804
- while (current) {
11805
- yield current.value;
11806
- current = current.next;
11807
- }
11808
- }
11809
- };
11810
-
11811
- // node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
11812
- var typeMappings = {
11813
- directory: "isDirectory",
11814
- file: "isFile"
11815
- };
11816
- function checkType(type) {
11817
- if (Object.hasOwnProperty.call(typeMappings, type)) {
11818
- return;
11819
- }
11820
- throw new Error(`Invalid type specified: ${type}`);
11821
- }
11822
- var matchType = (type, stat) => stat[typeMappings[type]]();
11823
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
11824
- function locatePathSync(paths, {
11825
- cwd = import_node_process.default.cwd(),
11826
- type = "file",
11827
- allowSymlinks = true
11828
- } = {}) {
11829
- checkType(type);
11830
- cwd = toPath(cwd);
11831
- const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
11832
- for (const path_ of paths) {
11833
- try {
11834
- const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
11835
- throwIfNoEntry: false
11836
- });
11837
- if (!stat) {
11838
- continue;
11839
- }
11840
- if (matchType(type, stat)) {
11841
- return path_;
11842
- }
11843
- } catch {
11844
- }
11845
- }
11846
- }
11847
-
11848
- // packages/config-tools/src/utilities/find-up.ts
11849
- var path2 = __toESM(require("path"), 1);
11850
- var import_url = require("url");
11851
- var findUpStop = Symbol("findUpStop");
11852
- function toPath2(urlOrPath) {
11853
- return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
11854
- }
11855
- function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
11856
- let directory = path2.resolve(toPath2(options.cwd) ?? "");
11857
- const { root } = path2.parse(directory);
11858
- const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
11859
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
11860
- if (typeof names === "function") {
11861
- const foundPath = names(options.cwd);
11862
- return locatePathSync([foundPath], options);
11863
- }
11864
- const runNameMatcher = (name) => {
11865
- const paths = [name].flat();
11866
- const runMatcher = (locateOptions) => {
11867
- if (typeof name !== "function") {
11868
- return locatePathSync(paths, locateOptions);
11869
- }
11870
- const foundPath = name(locateOptions.cwd);
11871
- if (typeof foundPath === "string") {
11872
- return locatePathSync([foundPath], locateOptions);
11873
- }
11874
- return foundPath;
11875
- };
11876
- const matches = [];
11877
- while (true) {
11878
- const foundPath = runMatcher({ ...options, cwd: directory });
11879
- if (foundPath) {
11880
- matches.push(path2.resolve(directory, foundPath));
11881
- }
11882
- if (directory === stopAt || matches.length >= limit) {
11883
- break;
11884
- }
11885
- directory = path2.dirname(directory);
11886
- }
11887
- return matches;
11888
- };
11889
- return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
11890
- }
11891
- function findUpSync(names, options = { limit: 1, type: "file" }) {
11892
- const matches = findUpMultipleSync(names, options);
11893
- return matches[0];
11894
- }
11895
-
11896
- // packages/config-tools/src/utilities/find-workspace-root.ts
11897
- var rootFiles = [
11898
- "lerna.json",
11899
- "nx.json",
11900
- "turbo.json",
11901
- "npm-workspace.json",
11902
- "yarn-workspace.json",
11903
- "pnpm-workspace.json",
11904
- "npm-workspace.yaml",
11905
- "yarn-workspace.yaml",
11906
- "pnpm-workspace.yaml",
11907
- "npm-workspace.yml",
11908
- "yarn-workspace.yml",
11909
- "pnpm-workspace.yml",
11910
- "npm-lock.json",
11911
- "yarn-lock.json",
11912
- "pnpm-lock.json",
11913
- "npm-lock.yaml",
11914
- "yarn-lock.yaml",
11915
- "pnpm-lock.yaml",
11916
- "npm-lock.yml",
11917
- "yarn-lock.yml",
11918
- "pnpm-lock.yml",
11919
- "bun.lockb"
11920
- ];
11921
- function findWorkspaceRoot(pathInsideMonorepo) {
11922
- 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, {
11923
- cwd: pathInsideMonorepo ?? process.cwd(),
11924
- type: "file",
11925
- limit: 1
11926
- });
11927
- if (!result) {
11928
- throw new Error(
11929
- `Cannot find workspace root upwards from known path. Files search list includes:
11930
- ${rootFiles.join(
11931
- "\n"
11932
- )}
11933
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
11934
- );
11935
- }
11936
- return result;
11937
- }
11938
-
11939
11942
  // packages/config-tools/src/utilities/get-default-config.ts
11940
11943
  var DefaultColorConfig = {
11941
11944
  primary: "#1fb2a6",