@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.
- package/CHANGELOG.md +7 -0
- package/index.js +189 -186
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +189 -186
- package/src/executors/design-tokens/executor.js +189 -186
- package/src/executors/tsup/executor.js +189 -186
- package/src/executors/tsup-browser/executor.js +189 -186
- package/src/executors/tsup-neutral/executor.js +189 -186
- package/src/executors/tsup-node/executor.js +189 -186
- package/src/generators/browser-library/generator.js +189 -186
- package/src/generators/config-schema/generator.js +189 -186
- package/src/generators/neutral-library/generator.js +189 -186
- package/src/generators/node-library/generator.js +189 -186
- package/src/generators/preset/generator.js +189 -186
|
@@ -106279,6 +106279,195 @@ var LogLevelLabel = {
|
|
|
106279
106279
|
TRACE: "trace"
|
|
106280
106280
|
};
|
|
106281
106281
|
|
|
106282
|
+
// node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
106283
|
+
var import_node_process = __toESM(require("node:process"), 1);
|
|
106284
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
106285
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
106286
|
+
var import_node_url = require("node:url");
|
|
106287
|
+
|
|
106288
|
+
// node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
|
|
106289
|
+
var Node = class {
|
|
106290
|
+
value;
|
|
106291
|
+
next;
|
|
106292
|
+
constructor(value) {
|
|
106293
|
+
this.value = value;
|
|
106294
|
+
}
|
|
106295
|
+
};
|
|
106296
|
+
var Queue = class {
|
|
106297
|
+
#head;
|
|
106298
|
+
#tail;
|
|
106299
|
+
#size;
|
|
106300
|
+
constructor() {
|
|
106301
|
+
this.clear();
|
|
106302
|
+
}
|
|
106303
|
+
enqueue(value) {
|
|
106304
|
+
const node = new Node(value);
|
|
106305
|
+
if (this.#head) {
|
|
106306
|
+
this.#tail.next = node;
|
|
106307
|
+
this.#tail = node;
|
|
106308
|
+
} else {
|
|
106309
|
+
this.#head = node;
|
|
106310
|
+
this.#tail = node;
|
|
106311
|
+
}
|
|
106312
|
+
this.#size++;
|
|
106313
|
+
}
|
|
106314
|
+
dequeue() {
|
|
106315
|
+
const current = this.#head;
|
|
106316
|
+
if (!current) {
|
|
106317
|
+
return;
|
|
106318
|
+
}
|
|
106319
|
+
this.#head = this.#head.next;
|
|
106320
|
+
this.#size--;
|
|
106321
|
+
return current.value;
|
|
106322
|
+
}
|
|
106323
|
+
clear() {
|
|
106324
|
+
this.#head = void 0;
|
|
106325
|
+
this.#tail = void 0;
|
|
106326
|
+
this.#size = 0;
|
|
106327
|
+
}
|
|
106328
|
+
get size() {
|
|
106329
|
+
return this.#size;
|
|
106330
|
+
}
|
|
106331
|
+
*[Symbol.iterator]() {
|
|
106332
|
+
let current = this.#head;
|
|
106333
|
+
while (current) {
|
|
106334
|
+
yield current.value;
|
|
106335
|
+
current = current.next;
|
|
106336
|
+
}
|
|
106337
|
+
}
|
|
106338
|
+
};
|
|
106339
|
+
|
|
106340
|
+
// node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
106341
|
+
var typeMappings = {
|
|
106342
|
+
directory: "isDirectory",
|
|
106343
|
+
file: "isFile"
|
|
106344
|
+
};
|
|
106345
|
+
function checkType(type) {
|
|
106346
|
+
if (Object.hasOwnProperty.call(typeMappings, type)) {
|
|
106347
|
+
return;
|
|
106348
|
+
}
|
|
106349
|
+
throw new Error(`Invalid type specified: ${type}`);
|
|
106350
|
+
}
|
|
106351
|
+
var matchType = (type, stat) => stat[typeMappings[type]]();
|
|
106352
|
+
var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
106353
|
+
function locatePathSync(paths, {
|
|
106354
|
+
cwd = import_node_process.default.cwd(),
|
|
106355
|
+
type = "file",
|
|
106356
|
+
allowSymlinks = true
|
|
106357
|
+
} = {}) {
|
|
106358
|
+
checkType(type);
|
|
106359
|
+
cwd = toPath(cwd);
|
|
106360
|
+
const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
|
|
106361
|
+
for (const path_ of paths) {
|
|
106362
|
+
try {
|
|
106363
|
+
const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
|
|
106364
|
+
throwIfNoEntry: false
|
|
106365
|
+
});
|
|
106366
|
+
if (!stat) {
|
|
106367
|
+
continue;
|
|
106368
|
+
}
|
|
106369
|
+
if (matchType(type, stat)) {
|
|
106370
|
+
return path_;
|
|
106371
|
+
}
|
|
106372
|
+
} catch {
|
|
106373
|
+
}
|
|
106374
|
+
}
|
|
106375
|
+
}
|
|
106376
|
+
|
|
106377
|
+
// packages/config-tools/src/utilities/find-up.ts
|
|
106378
|
+
var path2 = __toESM(require("path"), 1);
|
|
106379
|
+
var import_url = require("url");
|
|
106380
|
+
var findUpStop = Symbol("findUpStop");
|
|
106381
|
+
function toPath2(urlOrPath) {
|
|
106382
|
+
return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
106383
|
+
}
|
|
106384
|
+
function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
|
|
106385
|
+
let directory = path2.resolve(toPath2(options.cwd) ?? "");
|
|
106386
|
+
const { root } = path2.parse(directory);
|
|
106387
|
+
const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
|
|
106388
|
+
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
106389
|
+
if (typeof names === "function") {
|
|
106390
|
+
const foundPath = names(options.cwd);
|
|
106391
|
+
return locatePathSync([foundPath], options);
|
|
106392
|
+
}
|
|
106393
|
+
const runNameMatcher = (name) => {
|
|
106394
|
+
const paths = [name].flat();
|
|
106395
|
+
const runMatcher = (locateOptions) => {
|
|
106396
|
+
if (typeof name !== "function") {
|
|
106397
|
+
return locatePathSync(paths, locateOptions);
|
|
106398
|
+
}
|
|
106399
|
+
const foundPath = name(locateOptions.cwd);
|
|
106400
|
+
if (typeof foundPath === "string") {
|
|
106401
|
+
return locatePathSync([foundPath], locateOptions);
|
|
106402
|
+
}
|
|
106403
|
+
return foundPath;
|
|
106404
|
+
};
|
|
106405
|
+
const matches = [];
|
|
106406
|
+
while (true) {
|
|
106407
|
+
const foundPath = runMatcher({ ...options, cwd: directory });
|
|
106408
|
+
if (foundPath) {
|
|
106409
|
+
matches.push(path2.resolve(directory, foundPath));
|
|
106410
|
+
}
|
|
106411
|
+
if (directory === stopAt || matches.length >= limit) {
|
|
106412
|
+
break;
|
|
106413
|
+
}
|
|
106414
|
+
directory = path2.dirname(directory);
|
|
106415
|
+
}
|
|
106416
|
+
return matches;
|
|
106417
|
+
};
|
|
106418
|
+
return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
|
|
106419
|
+
}
|
|
106420
|
+
function findUpSync(names, options = { limit: 1, type: "file" }) {
|
|
106421
|
+
const matches = findUpMultipleSync(names, options);
|
|
106422
|
+
return matches[0];
|
|
106423
|
+
}
|
|
106424
|
+
|
|
106425
|
+
// packages/config-tools/src/utilities/find-workspace-root.ts
|
|
106426
|
+
var rootFiles = [
|
|
106427
|
+
"lerna.json",
|
|
106428
|
+
"nx.json",
|
|
106429
|
+
"turbo.json",
|
|
106430
|
+
"npm-workspace.json",
|
|
106431
|
+
"yarn-workspace.json",
|
|
106432
|
+
"pnpm-workspace.json",
|
|
106433
|
+
"npm-workspace.yaml",
|
|
106434
|
+
"yarn-workspace.yaml",
|
|
106435
|
+
"pnpm-workspace.yaml",
|
|
106436
|
+
"npm-workspace.yml",
|
|
106437
|
+
"yarn-workspace.yml",
|
|
106438
|
+
"pnpm-workspace.yml",
|
|
106439
|
+
"npm-lock.json",
|
|
106440
|
+
"yarn-lock.json",
|
|
106441
|
+
"pnpm-lock.json",
|
|
106442
|
+
"npm-lock.yaml",
|
|
106443
|
+
"yarn-lock.yaml",
|
|
106444
|
+
"pnpm-lock.yaml",
|
|
106445
|
+
"npm-lock.yml",
|
|
106446
|
+
"yarn-lock.yml",
|
|
106447
|
+
"pnpm-lock.yml",
|
|
106448
|
+
"bun.lockb"
|
|
106449
|
+
];
|
|
106450
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
106451
|
+
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, {
|
|
106452
|
+
cwd: pathInsideMonorepo ?? process.cwd(),
|
|
106453
|
+
type: "file",
|
|
106454
|
+
limit: 1
|
|
106455
|
+
});
|
|
106456
|
+
}
|
|
106457
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
106458
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
106459
|
+
if (!result) {
|
|
106460
|
+
throw new Error(
|
|
106461
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
106462
|
+
${rootFiles.join(
|
|
106463
|
+
"\n"
|
|
106464
|
+
)}
|
|
106465
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
106466
|
+
);
|
|
106467
|
+
}
|
|
106468
|
+
return result;
|
|
106469
|
+
}
|
|
106470
|
+
|
|
106282
106471
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
106283
106472
|
var import_fs = require("fs");
|
|
106284
106473
|
var import_path = require("path");
|
|
@@ -109915,192 +110104,6 @@ var StormConfigSchema = objectType({
|
|
|
109915
110104
|
"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."
|
|
109916
110105
|
);
|
|
109917
110106
|
|
|
109918
|
-
// node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
109919
|
-
var import_node_process = __toESM(require("node:process"), 1);
|
|
109920
|
-
var import_node_path = __toESM(require("node:path"), 1);
|
|
109921
|
-
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
109922
|
-
var import_node_url = require("node:url");
|
|
109923
|
-
|
|
109924
|
-
// node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
|
|
109925
|
-
var Node = class {
|
|
109926
|
-
value;
|
|
109927
|
-
next;
|
|
109928
|
-
constructor(value) {
|
|
109929
|
-
this.value = value;
|
|
109930
|
-
}
|
|
109931
|
-
};
|
|
109932
|
-
var Queue = class {
|
|
109933
|
-
#head;
|
|
109934
|
-
#tail;
|
|
109935
|
-
#size;
|
|
109936
|
-
constructor() {
|
|
109937
|
-
this.clear();
|
|
109938
|
-
}
|
|
109939
|
-
enqueue(value) {
|
|
109940
|
-
const node = new Node(value);
|
|
109941
|
-
if (this.#head) {
|
|
109942
|
-
this.#tail.next = node;
|
|
109943
|
-
this.#tail = node;
|
|
109944
|
-
} else {
|
|
109945
|
-
this.#head = node;
|
|
109946
|
-
this.#tail = node;
|
|
109947
|
-
}
|
|
109948
|
-
this.#size++;
|
|
109949
|
-
}
|
|
109950
|
-
dequeue() {
|
|
109951
|
-
const current = this.#head;
|
|
109952
|
-
if (!current) {
|
|
109953
|
-
return;
|
|
109954
|
-
}
|
|
109955
|
-
this.#head = this.#head.next;
|
|
109956
|
-
this.#size--;
|
|
109957
|
-
return current.value;
|
|
109958
|
-
}
|
|
109959
|
-
clear() {
|
|
109960
|
-
this.#head = void 0;
|
|
109961
|
-
this.#tail = void 0;
|
|
109962
|
-
this.#size = 0;
|
|
109963
|
-
}
|
|
109964
|
-
get size() {
|
|
109965
|
-
return this.#size;
|
|
109966
|
-
}
|
|
109967
|
-
*[Symbol.iterator]() {
|
|
109968
|
-
let current = this.#head;
|
|
109969
|
-
while (current) {
|
|
109970
|
-
yield current.value;
|
|
109971
|
-
current = current.next;
|
|
109972
|
-
}
|
|
109973
|
-
}
|
|
109974
|
-
};
|
|
109975
|
-
|
|
109976
|
-
// node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
109977
|
-
var typeMappings = {
|
|
109978
|
-
directory: "isDirectory",
|
|
109979
|
-
file: "isFile"
|
|
109980
|
-
};
|
|
109981
|
-
function checkType(type) {
|
|
109982
|
-
if (Object.hasOwnProperty.call(typeMappings, type)) {
|
|
109983
|
-
return;
|
|
109984
|
-
}
|
|
109985
|
-
throw new Error(`Invalid type specified: ${type}`);
|
|
109986
|
-
}
|
|
109987
|
-
var matchType = (type, stat) => stat[typeMappings[type]]();
|
|
109988
|
-
var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
109989
|
-
function locatePathSync(paths, {
|
|
109990
|
-
cwd = import_node_process.default.cwd(),
|
|
109991
|
-
type = "file",
|
|
109992
|
-
allowSymlinks = true
|
|
109993
|
-
} = {}) {
|
|
109994
|
-
checkType(type);
|
|
109995
|
-
cwd = toPath(cwd);
|
|
109996
|
-
const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
|
|
109997
|
-
for (const path_ of paths) {
|
|
109998
|
-
try {
|
|
109999
|
-
const stat = statFunction(import_node_path.default.resolve(cwd, path_), {
|
|
110000
|
-
throwIfNoEntry: false
|
|
110001
|
-
});
|
|
110002
|
-
if (!stat) {
|
|
110003
|
-
continue;
|
|
110004
|
-
}
|
|
110005
|
-
if (matchType(type, stat)) {
|
|
110006
|
-
return path_;
|
|
110007
|
-
}
|
|
110008
|
-
} catch {
|
|
110009
|
-
}
|
|
110010
|
-
}
|
|
110011
|
-
}
|
|
110012
|
-
|
|
110013
|
-
// packages/config-tools/src/utilities/find-up.ts
|
|
110014
|
-
var path2 = __toESM(require("path"), 1);
|
|
110015
|
-
var import_url = require("url");
|
|
110016
|
-
var findUpStop = Symbol("findUpStop");
|
|
110017
|
-
function toPath2(urlOrPath) {
|
|
110018
|
-
return urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
110019
|
-
}
|
|
110020
|
-
function findUpMultipleSync(names, options = { limit: 1, type: "file" }) {
|
|
110021
|
-
let directory = path2.resolve(toPath2(options.cwd) ?? "");
|
|
110022
|
-
const { root } = path2.parse(directory);
|
|
110023
|
-
const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
|
|
110024
|
-
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
110025
|
-
if (typeof names === "function") {
|
|
110026
|
-
const foundPath = names(options.cwd);
|
|
110027
|
-
return locatePathSync([foundPath], options);
|
|
110028
|
-
}
|
|
110029
|
-
const runNameMatcher = (name) => {
|
|
110030
|
-
const paths = [name].flat();
|
|
110031
|
-
const runMatcher = (locateOptions) => {
|
|
110032
|
-
if (typeof name !== "function") {
|
|
110033
|
-
return locatePathSync(paths, locateOptions);
|
|
110034
|
-
}
|
|
110035
|
-
const foundPath = name(locateOptions.cwd);
|
|
110036
|
-
if (typeof foundPath === "string") {
|
|
110037
|
-
return locatePathSync([foundPath], locateOptions);
|
|
110038
|
-
}
|
|
110039
|
-
return foundPath;
|
|
110040
|
-
};
|
|
110041
|
-
const matches = [];
|
|
110042
|
-
while (true) {
|
|
110043
|
-
const foundPath = runMatcher({ ...options, cwd: directory });
|
|
110044
|
-
if (foundPath) {
|
|
110045
|
-
matches.push(path2.resolve(directory, foundPath));
|
|
110046
|
-
}
|
|
110047
|
-
if (directory === stopAt || matches.length >= limit) {
|
|
110048
|
-
break;
|
|
110049
|
-
}
|
|
110050
|
-
directory = path2.dirname(directory);
|
|
110051
|
-
}
|
|
110052
|
-
return matches;
|
|
110053
|
-
};
|
|
110054
|
-
return (names && Array.isArray(names) ? names : [names]).map((name) => runNameMatcher(name)).flat();
|
|
110055
|
-
}
|
|
110056
|
-
function findUpSync(names, options = { limit: 1, type: "file" }) {
|
|
110057
|
-
const matches = findUpMultipleSync(names, options);
|
|
110058
|
-
return matches[0];
|
|
110059
|
-
}
|
|
110060
|
-
|
|
110061
|
-
// packages/config-tools/src/utilities/find-workspace-root.ts
|
|
110062
|
-
var rootFiles = [
|
|
110063
|
-
"lerna.json",
|
|
110064
|
-
"nx.json",
|
|
110065
|
-
"turbo.json",
|
|
110066
|
-
"npm-workspace.json",
|
|
110067
|
-
"yarn-workspace.json",
|
|
110068
|
-
"pnpm-workspace.json",
|
|
110069
|
-
"npm-workspace.yaml",
|
|
110070
|
-
"yarn-workspace.yaml",
|
|
110071
|
-
"pnpm-workspace.yaml",
|
|
110072
|
-
"npm-workspace.yml",
|
|
110073
|
-
"yarn-workspace.yml",
|
|
110074
|
-
"pnpm-workspace.yml",
|
|
110075
|
-
"npm-lock.json",
|
|
110076
|
-
"yarn-lock.json",
|
|
110077
|
-
"pnpm-lock.json",
|
|
110078
|
-
"npm-lock.yaml",
|
|
110079
|
-
"yarn-lock.yaml",
|
|
110080
|
-
"pnpm-lock.yaml",
|
|
110081
|
-
"npm-lock.yml",
|
|
110082
|
-
"yarn-lock.yml",
|
|
110083
|
-
"pnpm-lock.yml",
|
|
110084
|
-
"bun.lockb"
|
|
110085
|
-
];
|
|
110086
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
110087
|
-
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, {
|
|
110088
|
-
cwd: pathInsideMonorepo ?? process.cwd(),
|
|
110089
|
-
type: "file",
|
|
110090
|
-
limit: 1
|
|
110091
|
-
});
|
|
110092
|
-
if (!result) {
|
|
110093
|
-
throw new Error(
|
|
110094
|
-
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
110095
|
-
${rootFiles.join(
|
|
110096
|
-
"\n"
|
|
110097
|
-
)}
|
|
110098
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
110099
|
-
);
|
|
110100
|
-
}
|
|
110101
|
-
return result;
|
|
110102
|
-
}
|
|
110103
|
-
|
|
110104
110107
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
110105
110108
|
var DefaultColorConfig = {
|
|
110106
110109
|
primary: "#1fb2a6",
|