@storm-software/workspace-tools 1.31.13 → 1.31.15
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 +14 -0
- package/index.js +1459 -1462
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +52 -55
- package/src/executors/design-tokens/executor.js +627 -630
- package/src/executors/tsup/executor.js +1453 -1456
- package/src/executors/tsup-browser/executor.js +1455 -1458
- package/src/executors/tsup-neutral/executor.js +1455 -1458
- package/src/executors/tsup-node/executor.js +1455 -1458
- package/src/generators/browser-library/generator.js +353 -356
- package/src/generators/config-schema/generator.js +153 -156
- package/src/generators/neutral-library/generator.js +353 -356
- package/src/generators/node-library/generator.js +353 -356
- package/src/generators/preset/generator.js +155 -158
package/package.json
CHANGED
package/src/base/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
33
33
|
var require_resolve_from = __commonJS({
|
|
34
34
|
"node_modules/.pnpm/resolve-from@4.0.0/node_modules/resolve-from/index.js"(exports, module2) {
|
|
35
35
|
"use strict";
|
|
36
|
-
var
|
|
36
|
+
var path3 = require("path");
|
|
37
37
|
var Module = require("module");
|
|
38
38
|
var fs2 = require("fs");
|
|
39
39
|
var resolveFrom = (fromDir, moduleId, silent) => {
|
|
@@ -47,14 +47,14 @@ var require_resolve_from = __commonJS({
|
|
|
47
47
|
fromDir = fs2.realpathSync(fromDir);
|
|
48
48
|
} catch (err) {
|
|
49
49
|
if (err.code === "ENOENT") {
|
|
50
|
-
fromDir =
|
|
50
|
+
fromDir = path3.resolve(fromDir);
|
|
51
51
|
} else if (silent) {
|
|
52
52
|
return null;
|
|
53
53
|
} else {
|
|
54
54
|
throw err;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
const fromFile =
|
|
57
|
+
const fromFile = path3.join(fromDir, "noop.js");
|
|
58
58
|
const resolveFileName = () => Module._resolveFilename(moduleId, {
|
|
59
59
|
id: fromFile,
|
|
60
60
|
filename: fromFile,
|
|
@@ -126,7 +126,7 @@ var require_parent_module = __commonJS({
|
|
|
126
126
|
var require_import_fresh = __commonJS({
|
|
127
127
|
"node_modules/.pnpm/import-fresh@3.3.0/node_modules/import-fresh/index.js"(exports, module2) {
|
|
128
128
|
"use strict";
|
|
129
|
-
var
|
|
129
|
+
var path3 = require("path");
|
|
130
130
|
var resolveFrom = require_resolve_from();
|
|
131
131
|
var parentModule = require_parent_module();
|
|
132
132
|
module2.exports = (moduleId) => {
|
|
@@ -134,7 +134,7 @@ var require_import_fresh = __commonJS({
|
|
|
134
134
|
throw new TypeError("Expected a string");
|
|
135
135
|
}
|
|
136
136
|
const parentPath = parentModule(__filename);
|
|
137
|
-
const cwd = parentPath ?
|
|
137
|
+
const cwd = parentPath ? path3.dirname(parentPath) : __dirname;
|
|
138
138
|
const filePath = resolveFrom(cwd, moduleId);
|
|
139
139
|
const oldModule = require.cache[filePath];
|
|
140
140
|
if (oldModule && oldModule.parent) {
|
|
@@ -1576,15 +1576,15 @@ var require_route = __commonJS({
|
|
|
1576
1576
|
};
|
|
1577
1577
|
}
|
|
1578
1578
|
function wrapConversion(toModel, graph) {
|
|
1579
|
-
var
|
|
1579
|
+
var path3 = [graph[toModel].parent, toModel];
|
|
1580
1580
|
var fn = conversions[graph[toModel].parent][toModel];
|
|
1581
1581
|
var cur = graph[toModel].parent;
|
|
1582
1582
|
while (graph[cur].parent) {
|
|
1583
|
-
|
|
1583
|
+
path3.unshift(graph[cur].parent);
|
|
1584
1584
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
1585
1585
|
cur = graph[cur].parent;
|
|
1586
1586
|
}
|
|
1587
|
-
fn.conversion =
|
|
1587
|
+
fn.conversion = path3;
|
|
1588
1588
|
return fn;
|
|
1589
1589
|
}
|
|
1590
1590
|
module2.exports = function(fromModel) {
|
|
@@ -5580,7 +5580,7 @@ ${error.message}`;
|
|
|
5580
5580
|
return typescript.sys.fileExists(fileName);
|
|
5581
5581
|
});
|
|
5582
5582
|
if (filePath !== void 0) {
|
|
5583
|
-
const { config, error } = typescript.readConfigFile(filePath, (
|
|
5583
|
+
const { config, error } = typescript.readConfigFile(filePath, (path3) => typescript.sys.readFile(path3));
|
|
5584
5584
|
if (error) {
|
|
5585
5585
|
throw new Error(`Error in ${filePath}: ${error.messageText.toString()}`);
|
|
5586
5586
|
}
|
|
@@ -5703,42 +5703,42 @@ var require_defaults = __commonJS({
|
|
|
5703
5703
|
var require_env_paths = __commonJS({
|
|
5704
5704
|
"node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports, module2) {
|
|
5705
5705
|
"use strict";
|
|
5706
|
-
var
|
|
5706
|
+
var path3 = require("path");
|
|
5707
5707
|
var os = require("os");
|
|
5708
5708
|
var homedir = os.homedir();
|
|
5709
5709
|
var tmpdir = os.tmpdir();
|
|
5710
5710
|
var { env } = process;
|
|
5711
5711
|
var macos = (name) => {
|
|
5712
|
-
const library =
|
|
5712
|
+
const library = path3.join(homedir, "Library");
|
|
5713
5713
|
return {
|
|
5714
|
-
data:
|
|
5715
|
-
config:
|
|
5716
|
-
cache:
|
|
5717
|
-
log:
|
|
5718
|
-
temp:
|
|
5714
|
+
data: path3.join(library, "Application Support", name),
|
|
5715
|
+
config: path3.join(library, "Preferences", name),
|
|
5716
|
+
cache: path3.join(library, "Caches", name),
|
|
5717
|
+
log: path3.join(library, "Logs", name),
|
|
5718
|
+
temp: path3.join(tmpdir, name)
|
|
5719
5719
|
};
|
|
5720
5720
|
};
|
|
5721
5721
|
var windows = (name) => {
|
|
5722
|
-
const appData = env.APPDATA ||
|
|
5723
|
-
const localAppData = env.LOCALAPPDATA ||
|
|
5722
|
+
const appData = env.APPDATA || path3.join(homedir, "AppData", "Roaming");
|
|
5723
|
+
const localAppData = env.LOCALAPPDATA || path3.join(homedir, "AppData", "Local");
|
|
5724
5724
|
return {
|
|
5725
5725
|
// Data/config/cache/log are invented by me as Windows isn't opinionated about this
|
|
5726
|
-
data:
|
|
5727
|
-
config:
|
|
5728
|
-
cache:
|
|
5729
|
-
log:
|
|
5730
|
-
temp:
|
|
5726
|
+
data: path3.join(localAppData, name, "Data"),
|
|
5727
|
+
config: path3.join(appData, name, "Config"),
|
|
5728
|
+
cache: path3.join(localAppData, name, "Cache"),
|
|
5729
|
+
log: path3.join(localAppData, name, "Log"),
|
|
5730
|
+
temp: path3.join(tmpdir, name)
|
|
5731
5731
|
};
|
|
5732
5732
|
};
|
|
5733
5733
|
var linux = (name) => {
|
|
5734
|
-
const username =
|
|
5734
|
+
const username = path3.basename(homedir);
|
|
5735
5735
|
return {
|
|
5736
|
-
data:
|
|
5737
|
-
config:
|
|
5738
|
-
cache:
|
|
5736
|
+
data: path3.join(env.XDG_DATA_HOME || path3.join(homedir, ".local", "share"), name),
|
|
5737
|
+
config: path3.join(env.XDG_CONFIG_HOME || path3.join(homedir, ".config"), name),
|
|
5738
|
+
cache: path3.join(env.XDG_CACHE_HOME || path3.join(homedir, ".cache"), name),
|
|
5739
5739
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
5740
|
-
log:
|
|
5741
|
-
temp:
|
|
5740
|
+
log: path3.join(env.XDG_STATE_HOME || path3.join(homedir, ".local", "state"), name),
|
|
5741
|
+
temp: path3.join(tmpdir, username, name)
|
|
5742
5742
|
};
|
|
5743
5743
|
};
|
|
5744
5744
|
var envPaths = (name, options) => {
|
|
@@ -5811,11 +5811,11 @@ var require_util = __commonJS({
|
|
|
5811
5811
|
return result;
|
|
5812
5812
|
}
|
|
5813
5813
|
exports.emplace = emplace;
|
|
5814
|
-
function getPropertyByPath(source,
|
|
5815
|
-
if (typeof
|
|
5816
|
-
return source[
|
|
5814
|
+
function getPropertyByPath(source, path3) {
|
|
5815
|
+
if (typeof path3 === "string" && Object.prototype.hasOwnProperty.call(source, path3)) {
|
|
5816
|
+
return source[path3];
|
|
5817
5817
|
}
|
|
5818
|
-
const parsedPath = typeof
|
|
5818
|
+
const parsedPath = typeof path3 === "string" ? path3.split(".") : path3;
|
|
5819
5819
|
return parsedPath.reduce((previous, key) => {
|
|
5820
5820
|
if (previous === void 0) {
|
|
5821
5821
|
return previous;
|
|
@@ -5828,9 +5828,9 @@ var require_util = __commonJS({
|
|
|
5828
5828
|
return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== void 0));
|
|
5829
5829
|
}
|
|
5830
5830
|
exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
|
|
5831
|
-
async function isDirectory(
|
|
5831
|
+
async function isDirectory(path3) {
|
|
5832
5832
|
try {
|
|
5833
|
-
const stat = await fs_1.promises.stat(
|
|
5833
|
+
const stat = await fs_1.promises.stat(path3);
|
|
5834
5834
|
return stat.isDirectory();
|
|
5835
5835
|
} catch (e) {
|
|
5836
5836
|
if (e.code === "ENOENT") {
|
|
@@ -5840,9 +5840,9 @@ var require_util = __commonJS({
|
|
|
5840
5840
|
}
|
|
5841
5841
|
}
|
|
5842
5842
|
exports.isDirectory = isDirectory;
|
|
5843
|
-
function isDirectorySync(
|
|
5843
|
+
function isDirectorySync(path3) {
|
|
5844
5844
|
try {
|
|
5845
|
-
const stat = fs_1.default.statSync(
|
|
5845
|
+
const stat = fs_1.default.statSync(path3);
|
|
5846
5846
|
return stat.isDirectory();
|
|
5847
5847
|
} catch (e) {
|
|
5848
5848
|
if (e.code === "ENOENT") {
|
|
@@ -5940,7 +5940,7 @@ var require_ExplorerBase = __commonJS({
|
|
|
5940
5940
|
const idx = importStack.indexOf(fullPath);
|
|
5941
5941
|
if (idx !== -1) {
|
|
5942
5942
|
throw new Error(`Circular import detected:
|
|
5943
|
-
${[...importStack, fullPath].map((
|
|
5943
|
+
${[...importStack, fullPath].map((path3, i) => `${i + 1}. ${path3}`).join("\n")} (same as ${idx + 1}.)`);
|
|
5944
5944
|
}
|
|
5945
5945
|
}
|
|
5946
5946
|
}
|
|
@@ -6125,9 +6125,9 @@ var require_Explorer = __commonJS({
|
|
|
6125
6125
|
throw error;
|
|
6126
6126
|
}
|
|
6127
6127
|
}
|
|
6128
|
-
async #fileExists(
|
|
6128
|
+
async #fileExists(path3) {
|
|
6129
6129
|
try {
|
|
6130
|
-
await promises_1.default.stat(
|
|
6130
|
+
await promises_1.default.stat(path3);
|
|
6131
6131
|
return true;
|
|
6132
6132
|
} catch (e) {
|
|
6133
6133
|
return false;
|
|
@@ -6283,9 +6283,9 @@ var require_ExplorerSync = __commonJS({
|
|
|
6283
6283
|
throw error;
|
|
6284
6284
|
}
|
|
6285
6285
|
}
|
|
6286
|
-
#fileExists(
|
|
6286
|
+
#fileExists(path3) {
|
|
6287
6287
|
try {
|
|
6288
|
-
fs_1.default.statSync(
|
|
6288
|
+
fs_1.default.statSync(path3);
|
|
6289
6289
|
return true;
|
|
6290
6290
|
} catch (e) {
|
|
6291
6291
|
return false;
|
|
@@ -6405,7 +6405,7 @@ var require_dist = __commonJS({
|
|
|
6405
6405
|
};
|
|
6406
6406
|
}
|
|
6407
6407
|
function getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions) {
|
|
6408
|
-
const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((
|
|
6408
|
+
const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((path3) => path3.replace("{name}", moduleName));
|
|
6409
6409
|
if (userConfiguredOptions.mergeSearchPlaces) {
|
|
6410
6410
|
return [...userConfiguredSearchPlaces ?? [], ...toolDefinedSearchPlaces];
|
|
6411
6411
|
}
|
|
@@ -7372,15 +7372,15 @@ var require_route2 = __commonJS({
|
|
|
7372
7372
|
};
|
|
7373
7373
|
}
|
|
7374
7374
|
function wrapConversion(toModel, graph) {
|
|
7375
|
-
const
|
|
7375
|
+
const path3 = [graph[toModel].parent, toModel];
|
|
7376
7376
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
7377
7377
|
let cur = graph[toModel].parent;
|
|
7378
7378
|
while (graph[cur].parent) {
|
|
7379
|
-
|
|
7379
|
+
path3.unshift(graph[cur].parent);
|
|
7380
7380
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
7381
7381
|
cur = graph[cur].parent;
|
|
7382
7382
|
}
|
|
7383
|
-
fn.conversion =
|
|
7383
|
+
fn.conversion = path3;
|
|
7384
7384
|
return fn;
|
|
7385
7385
|
}
|
|
7386
7386
|
module2.exports = function(fromModel) {
|
|
@@ -8459,8 +8459,8 @@ function getErrorMap() {
|
|
|
8459
8459
|
return overrideErrorMap;
|
|
8460
8460
|
}
|
|
8461
8461
|
var makeIssue = (params) => {
|
|
8462
|
-
const { data, path:
|
|
8463
|
-
const fullPath = [...
|
|
8462
|
+
const { data, path: path3, errorMaps, issueData } = params;
|
|
8463
|
+
const fullPath = [...path3, ...issueData.path || []];
|
|
8464
8464
|
const fullIssue = {
|
|
8465
8465
|
...issueData,
|
|
8466
8466
|
path: fullPath
|
|
@@ -8558,11 +8558,11 @@ var errorUtil;
|
|
|
8558
8558
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
|
8559
8559
|
})(errorUtil || (errorUtil = {}));
|
|
8560
8560
|
var ParseInputLazyPath = class {
|
|
8561
|
-
constructor(parent, value,
|
|
8561
|
+
constructor(parent, value, path3, key) {
|
|
8562
8562
|
this._cachedPath = [];
|
|
8563
8563
|
this.parent = parent;
|
|
8564
8564
|
this.data = value;
|
|
8565
|
-
this._path =
|
|
8565
|
+
this._path = path3;
|
|
8566
8566
|
this._key = key;
|
|
8567
8567
|
}
|
|
8568
8568
|
get path() {
|
|
@@ -11750,9 +11750,6 @@ var StormConfigSchema = objectType({
|
|
|
11750
11750
|
"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
11751
|
);
|
|
11752
11752
|
|
|
11753
|
-
// packages/config-tools/src/utilities/find-workspace-root.ts
|
|
11754
|
-
var path3 = __toESM(require("path"), 1);
|
|
11755
|
-
|
|
11756
11753
|
// node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
11757
11754
|
var import_node_process = __toESM(require("node:process"), 1);
|
|
11758
11755
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
@@ -11933,7 +11930,7 @@ function findWorkspaceRoot(pathInsideMonorepo) {
|
|
|
11933
11930
|
${rootFiles.join(
|
|
11934
11931
|
"\n"
|
|
11935
11932
|
)}
|
|
11936
|
-
Path: ${
|
|
11933
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
11937
11934
|
);
|
|
11938
11935
|
}
|
|
11939
11936
|
return result;
|
|
@@ -11974,7 +11971,7 @@ var getDefaultConfig = (config = {}) => {
|
|
|
11974
11971
|
let repository = "https://github.com/storm-software/storm-stack";
|
|
11975
11972
|
let license = DefaultStormConfig.license;
|
|
11976
11973
|
let homepage = DefaultStormConfig.homepage;
|
|
11977
|
-
const workspaceRoot = findWorkspaceRoot(
|
|
11974
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
11978
11975
|
if ((0, import_fs.existsSync)((0, import_path.join)(workspaceRoot, "package.json"))) {
|
|
11979
11976
|
const file = (0, import_fs.readFileSync)((0, import_path.join)(workspaceRoot, "package.json"), {
|
|
11980
11977
|
encoding: "utf-8"
|