@storm-software/workspace-tools 1.43.7 → 1.43.9
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 +15 -0
- package/index.js +61 -115
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +13 -68
- package/src/executors/design-tokens/executor.js +26 -81
- package/src/executors/tsup/executor.js +40 -94
- package/src/executors/tsup-browser/executor.js +40 -94
- package/src/executors/tsup-neutral/executor.js +40 -94
- package/src/executors/tsup-node/executor.js +40 -94
- package/src/generators/browser-library/generator.js +13 -68
- package/src/generators/config-schema/generator.js +11 -66
- package/src/generators/neutral-library/generator.js +13 -68
- package/src/generators/node-library/generator.js +13 -68
- package/src/generators/preset/generator.js +11 -66
package/package.json
CHANGED
package/src/base/index.js
CHANGED
|
@@ -34308,7 +34308,7 @@ var require_jsonfile = __commonJS({
|
|
|
34308
34308
|
return obj;
|
|
34309
34309
|
}
|
|
34310
34310
|
var readFile = universalify.fromPromise(_readFile);
|
|
34311
|
-
function
|
|
34311
|
+
function readFileSync(file, options = {}) {
|
|
34312
34312
|
if (typeof options === "string") {
|
|
34313
34313
|
options = { encoding: options };
|
|
34314
34314
|
}
|
|
@@ -34340,7 +34340,7 @@ var require_jsonfile = __commonJS({
|
|
|
34340
34340
|
}
|
|
34341
34341
|
var jsonfile = {
|
|
34342
34342
|
readFile,
|
|
34343
|
-
readFileSync
|
|
34343
|
+
readFileSync,
|
|
34344
34344
|
writeFile,
|
|
34345
34345
|
writeFileSync
|
|
34346
34346
|
};
|
|
@@ -43613,10 +43613,6 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
43613
43613
|
return result;
|
|
43614
43614
|
}
|
|
43615
43615
|
|
|
43616
|
-
// packages/config-tools/src/utilities/get-default-config.ts
|
|
43617
|
-
var import_node_fs2 = require("node:fs");
|
|
43618
|
-
var import_node_path2 = require("node:path");
|
|
43619
|
-
|
|
43620
43616
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
43621
43617
|
var util;
|
|
43622
43618
|
(function(util2) {
|
|
@@ -47277,51 +47273,6 @@ var DefaultStormConfig = {
|
|
|
47277
47273
|
colors: { ...DefaultColorConfig },
|
|
47278
47274
|
extensions: {}
|
|
47279
47275
|
};
|
|
47280
|
-
var getDefaultConfig = (config = {}, root) => {
|
|
47281
|
-
let name = "storm-workspace";
|
|
47282
|
-
let namespace = "storm-software";
|
|
47283
|
-
let repository = "https://github.com/storm-software/storm-ops";
|
|
47284
|
-
let license = DefaultStormConfig.license;
|
|
47285
|
-
let homepage = DefaultStormConfig.homepage;
|
|
47286
|
-
const workspaceRoot = findWorkspaceRoot(root);
|
|
47287
|
-
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
47288
|
-
const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
|
|
47289
|
-
encoding: "utf-8"
|
|
47290
|
-
});
|
|
47291
|
-
if (file) {
|
|
47292
|
-
const packageJson = JSON.parse(file);
|
|
47293
|
-
if (packageJson.name) {
|
|
47294
|
-
name = packageJson.name;
|
|
47295
|
-
}
|
|
47296
|
-
if (packageJson.namespace) {
|
|
47297
|
-
namespace = packageJson.namespace;
|
|
47298
|
-
}
|
|
47299
|
-
if (packageJson.repository?.url) {
|
|
47300
|
-
repository = packageJson.repository?.url;
|
|
47301
|
-
}
|
|
47302
|
-
if (packageJson.license) {
|
|
47303
|
-
license = packageJson.license;
|
|
47304
|
-
}
|
|
47305
|
-
if (packageJson.homepage) {
|
|
47306
|
-
homepage = packageJson.homepage;
|
|
47307
|
-
}
|
|
47308
|
-
}
|
|
47309
|
-
}
|
|
47310
|
-
return StormConfigSchema.parse({
|
|
47311
|
-
...DefaultStormConfig,
|
|
47312
|
-
...config,
|
|
47313
|
-
colors: { ...DefaultColorConfig, ...config.colors },
|
|
47314
|
-
workspaceRoot,
|
|
47315
|
-
name,
|
|
47316
|
-
namespace,
|
|
47317
|
-
repository,
|
|
47318
|
-
license: license ?? DefaultStormConfig.license,
|
|
47319
|
-
homepage: homepage ?? DefaultStormConfig.homepage,
|
|
47320
|
-
extensions: {
|
|
47321
|
-
...config.extensions
|
|
47322
|
-
}
|
|
47323
|
-
});
|
|
47324
|
-
};
|
|
47325
47276
|
|
|
47326
47277
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
47327
47278
|
var getLogLevel = (label) => {
|
|
@@ -47501,7 +47452,6 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47501
47452
|
};
|
|
47502
47453
|
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
47503
47454
|
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
47504
|
-
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
47505
47455
|
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
47506
47456
|
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
47507
47457
|
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
@@ -47723,27 +47673,22 @@ var getConfigEnv = () => {
|
|
|
47723
47673
|
|
|
47724
47674
|
// packages/config-tools/src/create-storm-config.ts
|
|
47725
47675
|
var loadStormConfig = async (workspaceRoot) => {
|
|
47726
|
-
let config = {};
|
|
47727
47676
|
let _workspaceRoot = workspaceRoot;
|
|
47728
47677
|
if (!_workspaceRoot) {
|
|
47729
47678
|
_workspaceRoot = findWorkspaceRoot();
|
|
47730
47679
|
}
|
|
47731
|
-
const configFile =
|
|
47732
|
-
|
|
47733
|
-
|
|
47734
|
-
|
|
47735
|
-
|
|
47736
|
-
_workspaceRoot
|
|
47737
|
-
);
|
|
47738
|
-
if (configFile) {
|
|
47739
|
-
config = StormConfigSchema.parse(configFile);
|
|
47740
|
-
} else {
|
|
47741
|
-
writeWarning(
|
|
47742
|
-
config,
|
|
47743
|
-
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
47744
|
-
);
|
|
47745
|
-
}
|
|
47680
|
+
const configFile = {
|
|
47681
|
+
...await getConfigFile(_workspaceRoot),
|
|
47682
|
+
...getConfigEnv()
|
|
47683
|
+
};
|
|
47684
|
+
const config = StormConfigSchema.parse(configFile);
|
|
47746
47685
|
setConfigEnv(config);
|
|
47686
|
+
console.debug("\n\n");
|
|
47687
|
+
console.debug(`Loaded Storm config from ${config.configFile}`);
|
|
47688
|
+
for (const key of Object.keys(configFile)) {
|
|
47689
|
+
console.debug(configFile[key]);
|
|
47690
|
+
}
|
|
47691
|
+
console.debug("\n\n");
|
|
47747
47692
|
return config;
|
|
47748
47693
|
};
|
|
47749
47694
|
|
|
@@ -28048,7 +28048,7 @@ var require_jsonfile = __commonJS({
|
|
|
28048
28048
|
return obj;
|
|
28049
28049
|
}
|
|
28050
28050
|
var readFile = universalify.fromPromise(_readFile);
|
|
28051
|
-
function
|
|
28051
|
+
function readFileSync(file, options = {}) {
|
|
28052
28052
|
if (typeof options === "string") {
|
|
28053
28053
|
options = { encoding: options };
|
|
28054
28054
|
}
|
|
@@ -28080,7 +28080,7 @@ var require_jsonfile = __commonJS({
|
|
|
28080
28080
|
}
|
|
28081
28081
|
var jsonfile = {
|
|
28082
28082
|
readFile,
|
|
28083
|
-
readFileSync
|
|
28083
|
+
readFileSync,
|
|
28084
28084
|
writeFile,
|
|
28085
28085
|
writeFileSync
|
|
28086
28086
|
};
|
|
@@ -47936,7 +47936,7 @@ var require_base = __commonJS({
|
|
|
47936
47936
|
},
|
|
47937
47937
|
/*istanbul ignore start*/
|
|
47938
47938
|
/*istanbul ignore end*/
|
|
47939
|
-
join: function
|
|
47939
|
+
join: function join2(chars) {
|
|
47940
47940
|
return chars.join("");
|
|
47941
47941
|
}
|
|
47942
47942
|
};
|
|
@@ -53921,19 +53921,19 @@ var require_tsconfig_loader = __commonJS({
|
|
|
53921
53921
|
return walkForTsConfig(parentDirectory, readdirSync);
|
|
53922
53922
|
}
|
|
53923
53923
|
exports.walkForTsConfig = walkForTsConfig;
|
|
53924
|
-
function loadTsconfig(configFilePath,
|
|
53925
|
-
if (
|
|
53926
|
-
|
|
53924
|
+
function loadTsconfig(configFilePath, existsSync2, readFileSync) {
|
|
53925
|
+
if (existsSync2 === void 0) {
|
|
53926
|
+
existsSync2 = fs.existsSync;
|
|
53927
53927
|
}
|
|
53928
|
-
if (
|
|
53929
|
-
|
|
53928
|
+
if (readFileSync === void 0) {
|
|
53929
|
+
readFileSync = function(filename) {
|
|
53930
53930
|
return fs.readFileSync(filename, "utf8");
|
|
53931
53931
|
};
|
|
53932
53932
|
}
|
|
53933
|
-
if (!
|
|
53933
|
+
if (!existsSync2(configFilePath)) {
|
|
53934
53934
|
return void 0;
|
|
53935
53935
|
}
|
|
53936
|
-
var configString =
|
|
53936
|
+
var configString = readFileSync(configFilePath);
|
|
53937
53937
|
var cleanedJson = StripBom(configString);
|
|
53938
53938
|
var config;
|
|
53939
53939
|
try {
|
|
@@ -53946,27 +53946,27 @@ var require_tsconfig_loader = __commonJS({
|
|
|
53946
53946
|
var base = void 0;
|
|
53947
53947
|
if (Array.isArray(extendedConfig)) {
|
|
53948
53948
|
base = extendedConfig.reduce(function(currBase, extendedConfigElement) {
|
|
53949
|
-
return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement,
|
|
53949
|
+
return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement, existsSync2, readFileSync));
|
|
53950
53950
|
}, {});
|
|
53951
53951
|
} else {
|
|
53952
|
-
base = loadTsconfigFromExtends(configFilePath, extendedConfig,
|
|
53952
|
+
base = loadTsconfigFromExtends(configFilePath, extendedConfig, existsSync2, readFileSync);
|
|
53953
53953
|
}
|
|
53954
53954
|
return mergeTsconfigs(base, config);
|
|
53955
53955
|
}
|
|
53956
53956
|
return config;
|
|
53957
53957
|
}
|
|
53958
53958
|
exports.loadTsconfig = loadTsconfig;
|
|
53959
|
-
function loadTsconfigFromExtends(configFilePath, extendedConfigValue,
|
|
53959
|
+
function loadTsconfigFromExtends(configFilePath, extendedConfigValue, existsSync2, readFileSync) {
|
|
53960
53960
|
var _a;
|
|
53961
53961
|
if (typeof extendedConfigValue === "string" && extendedConfigValue.indexOf(".json") === -1) {
|
|
53962
53962
|
extendedConfigValue += ".json";
|
|
53963
53963
|
}
|
|
53964
53964
|
var currentDir = path.dirname(configFilePath);
|
|
53965
53965
|
var extendedConfigPath = path.join(currentDir, extendedConfigValue);
|
|
53966
|
-
if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !
|
|
53966
|
+
if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !existsSync2(extendedConfigPath)) {
|
|
53967
53967
|
extendedConfigPath = path.join(currentDir, "node_modules", extendedConfigValue);
|
|
53968
53968
|
}
|
|
53969
|
-
var config = loadTsconfig(extendedConfigPath,
|
|
53969
|
+
var config = loadTsconfig(extendedConfigPath, existsSync2, readFileSync) || {};
|
|
53970
53970
|
if ((_a = config.compilerOptions) === null || _a === void 0 ? void 0 : _a.baseUrl) {
|
|
53971
53971
|
var extendsDir = path.dirname(extendedConfigValue);
|
|
53972
53972
|
config.compilerOptions.baseUrl = path.join(extendsDir, config.compilerOptions.baseUrl);
|
|
@@ -61529,10 +61529,6 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
61529
61529
|
return result;
|
|
61530
61530
|
}
|
|
61531
61531
|
|
|
61532
|
-
// packages/config-tools/src/utilities/get-default-config.ts
|
|
61533
|
-
var import_node_fs2 = require("node:fs");
|
|
61534
|
-
var import_node_path2 = require("node:path");
|
|
61535
|
-
|
|
61536
61532
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
61537
61533
|
var util;
|
|
61538
61534
|
(function(util2) {
|
|
@@ -65193,51 +65189,6 @@ var DefaultStormConfig = {
|
|
|
65193
65189
|
colors: { ...DefaultColorConfig },
|
|
65194
65190
|
extensions: {}
|
|
65195
65191
|
};
|
|
65196
|
-
var getDefaultConfig = (config = {}, root) => {
|
|
65197
|
-
let name = "storm-workspace";
|
|
65198
|
-
let namespace = "storm-software";
|
|
65199
|
-
let repository = "https://github.com/storm-software/storm-ops";
|
|
65200
|
-
let license = DefaultStormConfig.license;
|
|
65201
|
-
let homepage = DefaultStormConfig.homepage;
|
|
65202
|
-
const workspaceRoot = findWorkspaceRoot(root);
|
|
65203
|
-
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
65204
|
-
const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
|
|
65205
|
-
encoding: "utf-8"
|
|
65206
|
-
});
|
|
65207
|
-
if (file) {
|
|
65208
|
-
const packageJson = JSON.parse(file);
|
|
65209
|
-
if (packageJson.name) {
|
|
65210
|
-
name = packageJson.name;
|
|
65211
|
-
}
|
|
65212
|
-
if (packageJson.namespace) {
|
|
65213
|
-
namespace = packageJson.namespace;
|
|
65214
|
-
}
|
|
65215
|
-
if (packageJson.repository?.url) {
|
|
65216
|
-
repository = packageJson.repository?.url;
|
|
65217
|
-
}
|
|
65218
|
-
if (packageJson.license) {
|
|
65219
|
-
license = packageJson.license;
|
|
65220
|
-
}
|
|
65221
|
-
if (packageJson.homepage) {
|
|
65222
|
-
homepage = packageJson.homepage;
|
|
65223
|
-
}
|
|
65224
|
-
}
|
|
65225
|
-
}
|
|
65226
|
-
return StormConfigSchema.parse({
|
|
65227
|
-
...DefaultStormConfig,
|
|
65228
|
-
...config,
|
|
65229
|
-
colors: { ...DefaultColorConfig, ...config.colors },
|
|
65230
|
-
workspaceRoot,
|
|
65231
|
-
name,
|
|
65232
|
-
namespace,
|
|
65233
|
-
repository,
|
|
65234
|
-
license: license ?? DefaultStormConfig.license,
|
|
65235
|
-
homepage: homepage ?? DefaultStormConfig.homepage,
|
|
65236
|
-
extensions: {
|
|
65237
|
-
...config.extensions
|
|
65238
|
-
}
|
|
65239
|
-
});
|
|
65240
|
-
};
|
|
65241
65192
|
|
|
65242
65193
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
65243
65194
|
var getLogLevel = (label) => {
|
|
@@ -65417,7 +65368,6 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65417
65368
|
};
|
|
65418
65369
|
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
65419
65370
|
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
65420
|
-
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
65421
65371
|
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
65422
65372
|
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
65423
65373
|
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
@@ -65639,27 +65589,22 @@ var getConfigEnv = () => {
|
|
|
65639
65589
|
|
|
65640
65590
|
// packages/config-tools/src/create-storm-config.ts
|
|
65641
65591
|
var loadStormConfig = async (workspaceRoot) => {
|
|
65642
|
-
let config = {};
|
|
65643
65592
|
let _workspaceRoot = workspaceRoot;
|
|
65644
65593
|
if (!_workspaceRoot) {
|
|
65645
65594
|
_workspaceRoot = findWorkspaceRoot();
|
|
65646
65595
|
}
|
|
65647
|
-
const configFile =
|
|
65648
|
-
|
|
65649
|
-
|
|
65650
|
-
|
|
65651
|
-
|
|
65652
|
-
_workspaceRoot
|
|
65653
|
-
);
|
|
65654
|
-
if (configFile) {
|
|
65655
|
-
config = StormConfigSchema.parse(configFile);
|
|
65656
|
-
} else {
|
|
65657
|
-
writeWarning(
|
|
65658
|
-
config,
|
|
65659
|
-
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
65660
|
-
);
|
|
65661
|
-
}
|
|
65596
|
+
const configFile = {
|
|
65597
|
+
...await getConfigFile(_workspaceRoot),
|
|
65598
|
+
...getConfigEnv()
|
|
65599
|
+
};
|
|
65600
|
+
const config = StormConfigSchema.parse(configFile);
|
|
65662
65601
|
setConfigEnv(config);
|
|
65602
|
+
console.debug("\n\n");
|
|
65603
|
+
console.debug(`Loaded Storm config from ${config.configFile}`);
|
|
65604
|
+
for (const key of Object.keys(configFile)) {
|
|
65605
|
+
console.debug(configFile[key]);
|
|
65606
|
+
}
|
|
65607
|
+
console.debug("\n\n");
|
|
65663
65608
|
return config;
|
|
65664
65609
|
};
|
|
65665
65610
|
|
|
@@ -23339,7 +23339,7 @@ var require_jsonfile = __commonJS({
|
|
|
23339
23339
|
return obj;
|
|
23340
23340
|
}
|
|
23341
23341
|
var readFile = universalify.fromPromise(_readFile);
|
|
23342
|
-
function
|
|
23342
|
+
function readFileSync2(file, options = {}) {
|
|
23343
23343
|
if (typeof options === "string") {
|
|
23344
23344
|
options = { encoding: options };
|
|
23345
23345
|
}
|
|
@@ -23371,7 +23371,7 @@ var require_jsonfile = __commonJS({
|
|
|
23371
23371
|
}
|
|
23372
23372
|
var jsonfile = {
|
|
23373
23373
|
readFile,
|
|
23374
|
-
readFileSync:
|
|
23374
|
+
readFileSync: readFileSync2,
|
|
23375
23375
|
writeFile: writeFile2,
|
|
23376
23376
|
writeFileSync: writeFileSync2
|
|
23377
23377
|
};
|
|
@@ -46989,7 +46989,7 @@ var require_lib6 = __commonJS({
|
|
|
46989
46989
|
function _interopRequireDefault(obj) {
|
|
46990
46990
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
46991
46991
|
}
|
|
46992
|
-
var
|
|
46992
|
+
var readFileSync2 = (fp) => {
|
|
46993
46993
|
return _fs.default.readFileSync(fp, "utf8");
|
|
46994
46994
|
};
|
|
46995
46995
|
var pathExists = (fp) => new Promise((resolve) => {
|
|
@@ -47113,7 +47113,7 @@ var require_lib6 = __commonJS({
|
|
|
47113
47113
|
if (this.packageJsonCache.has(filepath2)) {
|
|
47114
47114
|
return this.packageJsonCache.get(filepath2)[options.packageKey];
|
|
47115
47115
|
}
|
|
47116
|
-
const data2 = this.options.parseJSON(
|
|
47116
|
+
const data2 = this.options.parseJSON(readFileSync2(filepath2));
|
|
47117
47117
|
return data2;
|
|
47118
47118
|
}
|
|
47119
47119
|
};
|
|
@@ -47147,7 +47147,7 @@ var require_lib6 = __commonJS({
|
|
|
47147
47147
|
if (this.packageJsonCache.has(filepath2)) {
|
|
47148
47148
|
return this.packageJsonCache.get(filepath2)[options.packageKey];
|
|
47149
47149
|
}
|
|
47150
|
-
const data2 = this.options.parseJSON(
|
|
47150
|
+
const data2 = this.options.parseJSON(readFileSync2(filepath2));
|
|
47151
47151
|
return data2;
|
|
47152
47152
|
}
|
|
47153
47153
|
};
|
|
@@ -73213,7 +73213,7 @@ var require_util5 = __commonJS({
|
|
|
73213
73213
|
var normalize2 = createSafeHandler((url) => {
|
|
73214
73214
|
});
|
|
73215
73215
|
exports.normalize = normalize2;
|
|
73216
|
-
function
|
|
73216
|
+
function join3(aRoot, aPath) {
|
|
73217
73217
|
const pathType = getURLType(aPath);
|
|
73218
73218
|
const rootType = getURLType(aRoot);
|
|
73219
73219
|
aRoot = ensureDirectory(aRoot);
|
|
@@ -73239,7 +73239,7 @@ var require_util5 = __commonJS({
|
|
|
73239
73239
|
const newPath = withBase(aPath, withBase(aRoot, base));
|
|
73240
73240
|
return computeRelativeURL(base, newPath);
|
|
73241
73241
|
}
|
|
73242
|
-
exports.join =
|
|
73242
|
+
exports.join = join3;
|
|
73243
73243
|
function relative(rootURL, targetURL) {
|
|
73244
73244
|
const result = relativeIfPossible(rootURL, targetURL);
|
|
73245
73245
|
return typeof result === "string" ? result : normalize2(targetURL);
|
|
@@ -73269,9 +73269,9 @@ var require_util5 = __commonJS({
|
|
|
73269
73269
|
}
|
|
73270
73270
|
let url = normalize2(sourceURL || "");
|
|
73271
73271
|
if (sourceRoot)
|
|
73272
|
-
url =
|
|
73272
|
+
url = join3(sourceRoot, url);
|
|
73273
73273
|
if (sourceMapURL)
|
|
73274
|
-
url =
|
|
73274
|
+
url = join3(trimFilename(sourceMapURL), url);
|
|
73275
73275
|
return url;
|
|
73276
73276
|
}
|
|
73277
73277
|
exports.computeSourceURL = computeSourceURL;
|
|
@@ -75036,8 +75036,8 @@ var require_source_map = __commonJS({
|
|
|
75036
75036
|
// node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js
|
|
75037
75037
|
var require_native = __commonJS({
|
|
75038
75038
|
"node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js"(exports, module2) {
|
|
75039
|
-
var { existsSync:
|
|
75040
|
-
var { join:
|
|
75039
|
+
var { existsSync: existsSync2 } = require("node:fs");
|
|
75040
|
+
var { join: join3 } = require("node:path");
|
|
75041
75041
|
var { platform, arch, report } = require("node:process");
|
|
75042
75042
|
var isMusl = () => !report.getReport().header.glibcVersionRuntime;
|
|
75043
75043
|
var bindingsByPlatformAndArch = {
|
|
@@ -75087,7 +75087,7 @@ If this is important to you, please consider supporting Rollup to make a native
|
|
|
75087
75087
|
return imported.base;
|
|
75088
75088
|
}
|
|
75089
75089
|
var localName = `./rollup.${packageBase}.node`;
|
|
75090
|
-
var { parse, parseAsync, xxhashBase64Url } =
|
|
75090
|
+
var { parse, parseAsync, xxhashBase64Url } = existsSync2(join3(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
|
|
75091
75091
|
module2.exports.parse = parse;
|
|
75092
75092
|
module2.exports.parseAsync = parseAsync;
|
|
75093
75093
|
module2.exports.xxhashBase64Url = xxhashBase64Url;
|
|
@@ -111220,7 +111220,7 @@ var require_TransformerError = __commonJS({
|
|
|
111220
111220
|
TransformerError2.from = function(method) {
|
|
111221
111221
|
return function(errors) {
|
|
111222
111222
|
var body = errors.map(function(e) {
|
|
111223
|
-
var subject = e.explore.object === null ? "" :
|
|
111223
|
+
var subject = e.explore.object === null ? "" : join3(e.explore.object)(e.explore.property);
|
|
111224
111224
|
var type = "".concat(subject.length ? "".concat(subject, ": ") : "").concat(e.name);
|
|
111225
111225
|
return "- ".concat(type, "\n").concat(e.messages.map(function(msg) {
|
|
111226
111226
|
return " - ".concat(msg);
|
|
@@ -111232,7 +111232,7 @@ var require_TransformerError = __commonJS({
|
|
|
111232
111232
|
});
|
|
111233
111233
|
};
|
|
111234
111234
|
};
|
|
111235
|
-
var
|
|
111235
|
+
var join3 = function(object) {
|
|
111236
111236
|
return function(key) {
|
|
111237
111237
|
if (key === null)
|
|
111238
111238
|
return object.name;
|
|
@@ -117312,13 +117312,13 @@ var require_application_object = __commonJS({
|
|
|
117312
117312
|
return __assign2(__assign2({ type: "object", properties, nullable: options.purpose === "swagger" ? nullable : void 0, required: required.length ? required : void 0, description: obj.description }, options.surplus ? { "x-typia-jsDocTags": obj.jsDocTags } : {}), options.purpose === "ajv" ? extraProps : options.surplus ? {
|
|
117313
117313
|
"x-typia-additionalProperties": extraProps.additionalProperties,
|
|
117314
117314
|
"x-typia-patternProperties": extraProps.patternProperties,
|
|
117315
|
-
additionalProperties:
|
|
117315
|
+
additionalProperties: join3(options)(components)(extraMeta)
|
|
117316
117316
|
} : {});
|
|
117317
117317
|
};
|
|
117318
117318
|
};
|
|
117319
117319
|
};
|
|
117320
117320
|
};
|
|
117321
|
-
var
|
|
117321
|
+
var join3 = function(options) {
|
|
117322
117322
|
return function(components) {
|
|
117323
117323
|
return function(extra) {
|
|
117324
117324
|
var _a;
|
|
@@ -126329,9 +126329,9 @@ __export(executor_exports, {
|
|
|
126329
126329
|
tsupExecutorFn: () => tsupExecutorFn
|
|
126330
126330
|
});
|
|
126331
126331
|
module.exports = __toCommonJS(executor_exports);
|
|
126332
|
-
var
|
|
126332
|
+
var import_node_fs2 = require("node:fs");
|
|
126333
126333
|
var import_promises2 = require("node:fs/promises");
|
|
126334
|
-
var
|
|
126334
|
+
var import_node_path2 = require("node:path");
|
|
126335
126335
|
var import_esbuild_decorators = __toESM(require_src());
|
|
126336
126336
|
var import_devkit2 = __toESM(require_devkit());
|
|
126337
126337
|
var import_js = __toESM(require_src2());
|
|
@@ -126469,10 +126469,6 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
126469
126469
|
return result;
|
|
126470
126470
|
}
|
|
126471
126471
|
|
|
126472
|
-
// packages/config-tools/src/utilities/get-default-config.ts
|
|
126473
|
-
var import_node_fs2 = require("node:fs");
|
|
126474
|
-
var import_node_path2 = require("node:path");
|
|
126475
|
-
|
|
126476
126472
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
126477
126473
|
var util;
|
|
126478
126474
|
(function(util2) {
|
|
@@ -130133,51 +130129,6 @@ var DefaultStormConfig = {
|
|
|
130133
130129
|
colors: { ...DefaultColorConfig },
|
|
130134
130130
|
extensions: {}
|
|
130135
130131
|
};
|
|
130136
|
-
var getDefaultConfig = (config = {}, root) => {
|
|
130137
|
-
let name = "storm-workspace";
|
|
130138
|
-
let namespace = "storm-software";
|
|
130139
|
-
let repository = "https://github.com/storm-software/storm-ops";
|
|
130140
|
-
let license = DefaultStormConfig.license;
|
|
130141
|
-
let homepage = DefaultStormConfig.homepage;
|
|
130142
|
-
const workspaceRoot = findWorkspaceRoot(root);
|
|
130143
|
-
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
130144
|
-
const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
|
|
130145
|
-
encoding: "utf-8"
|
|
130146
|
-
});
|
|
130147
|
-
if (file) {
|
|
130148
|
-
const packageJson = JSON.parse(file);
|
|
130149
|
-
if (packageJson.name) {
|
|
130150
|
-
name = packageJson.name;
|
|
130151
|
-
}
|
|
130152
|
-
if (packageJson.namespace) {
|
|
130153
|
-
namespace = packageJson.namespace;
|
|
130154
|
-
}
|
|
130155
|
-
if (packageJson.repository?.url) {
|
|
130156
|
-
repository = packageJson.repository?.url;
|
|
130157
|
-
}
|
|
130158
|
-
if (packageJson.license) {
|
|
130159
|
-
license = packageJson.license;
|
|
130160
|
-
}
|
|
130161
|
-
if (packageJson.homepage) {
|
|
130162
|
-
homepage = packageJson.homepage;
|
|
130163
|
-
}
|
|
130164
|
-
}
|
|
130165
|
-
}
|
|
130166
|
-
return StormConfigSchema.parse({
|
|
130167
|
-
...DefaultStormConfig,
|
|
130168
|
-
...config,
|
|
130169
|
-
colors: { ...DefaultColorConfig, ...config.colors },
|
|
130170
|
-
workspaceRoot,
|
|
130171
|
-
name,
|
|
130172
|
-
namespace,
|
|
130173
|
-
repository,
|
|
130174
|
-
license: license ?? DefaultStormConfig.license,
|
|
130175
|
-
homepage: homepage ?? DefaultStormConfig.homepage,
|
|
130176
|
-
extensions: {
|
|
130177
|
-
...config.extensions
|
|
130178
|
-
}
|
|
130179
|
-
});
|
|
130180
|
-
};
|
|
130181
130132
|
|
|
130182
130133
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
130183
130134
|
var getLogLevel = (label) => {
|
|
@@ -130579,27 +130530,22 @@ var getConfigEnv = () => {
|
|
|
130579
130530
|
|
|
130580
130531
|
// packages/config-tools/src/create-storm-config.ts
|
|
130581
130532
|
var loadStormConfig = async (workspaceRoot) => {
|
|
130582
|
-
let config = {};
|
|
130583
130533
|
let _workspaceRoot = workspaceRoot;
|
|
130584
130534
|
if (!_workspaceRoot) {
|
|
130585
130535
|
_workspaceRoot = findWorkspaceRoot();
|
|
130586
130536
|
}
|
|
130587
|
-
const configFile =
|
|
130588
|
-
|
|
130589
|
-
|
|
130590
|
-
|
|
130591
|
-
|
|
130592
|
-
_workspaceRoot
|
|
130593
|
-
);
|
|
130594
|
-
if (configFile) {
|
|
130595
|
-
config = StormConfigSchema.parse(configFile);
|
|
130596
|
-
} else {
|
|
130597
|
-
writeWarning(
|
|
130598
|
-
config,
|
|
130599
|
-
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
130600
|
-
);
|
|
130601
|
-
}
|
|
130537
|
+
const configFile = {
|
|
130538
|
+
...await getConfigFile(_workspaceRoot),
|
|
130539
|
+
...getConfigEnv()
|
|
130540
|
+
};
|
|
130541
|
+
const config = StormConfigSchema.parse(configFile);
|
|
130602
130542
|
setConfigEnv(config);
|
|
130543
|
+
console.debug("\n\n");
|
|
130544
|
+
console.debug(`Loaded Storm config from ${config.configFile}`);
|
|
130545
|
+
for (const key of Object.keys(configFile)) {
|
|
130546
|
+
console.debug(configFile[key]);
|
|
130547
|
+
}
|
|
130548
|
+
console.debug("\n\n");
|
|
130603
130549
|
return config;
|
|
130604
130550
|
};
|
|
130605
130551
|
|
|
@@ -137198,9 +137144,9 @@ ${Object.keys(options).map(
|
|
|
137198
137144
|
if (!result.success) {
|
|
137199
137145
|
throw new Error("The Build process failed trying to copy assets");
|
|
137200
137146
|
}
|
|
137201
|
-
const pathToPackageJson = (0,
|
|
137147
|
+
const pathToPackageJson = (0, import_node_path2.join)(context.root, projectRoot, "package.json");
|
|
137202
137148
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
137203
|
-
const workspacePackageJson = (0, import_devkit2.readJsonFile)((0,
|
|
137149
|
+
const workspacePackageJson = (0, import_devkit2.readJsonFile)((0, import_node_path2.join)(workspaceRoot, "package.json"));
|
|
137204
137150
|
options.external = options.external || [];
|
|
137205
137151
|
if (workspacePackageJson?.dependencies) {
|
|
137206
137152
|
options.external = Object.keys(workspacePackageJson?.dependencies).reduce(
|
|
@@ -137359,11 +137305,11 @@ ${externalDependencies.map((dep) => {
|
|
|
137359
137305
|
},
|
|
137360
137306
|
...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
|
|
137361
137307
|
[removeExtension(entryPoint).replace(sourceRoot, "")]: {
|
|
137362
|
-
types: (0,
|
|
137308
|
+
types: (0, import_node_path2.join)(
|
|
137363
137309
|
`./${distPaths[0]}`,
|
|
137364
137310
|
`${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
|
|
137365
137311
|
),
|
|
137366
|
-
default: (0,
|
|
137312
|
+
default: (0, import_node_path2.join)(
|
|
137367
137313
|
`./${distPaths[0]}`,
|
|
137368
137314
|
`${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
|
|
137369
137315
|
)
|
|
@@ -137409,7 +137355,7 @@ ${externalDependencies.map((dep) => {
|
|
|
137409
137355
|
if (distSrc.startsWith("/")) {
|
|
137410
137356
|
distSrc = distSrc.substring(1);
|
|
137411
137357
|
}
|
|
137412
|
-
packageJson.source ??= `${(0,
|
|
137358
|
+
packageJson.source ??= `${(0, import_node_path2.join)(distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
137413
137359
|
}
|
|
137414
137360
|
packageJson.sideEffects ??= false;
|
|
137415
137361
|
packageJson.files ??= ["dist/**/*"];
|
|
@@ -137427,10 +137373,10 @@ ${externalDependencies.map((dep) => {
|
|
|
137427
137373
|
packageJson.license ??= workspacePackageJson.license;
|
|
137428
137374
|
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
137429
137375
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
137430
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot : (0,
|
|
137431
|
-
const packageJsonPath = (0,
|
|
137376
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_node_path2.join)("packages", context.projectName);
|
|
137377
|
+
const packageJsonPath = (0, import_node_path2.join)(context.root, options.outputPath, "package.json");
|
|
137432
137378
|
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
137433
|
-
(0,
|
|
137379
|
+
(0, import_node_fs2.writeFileSync)(
|
|
137434
137380
|
packageJsonPath,
|
|
137435
137381
|
await (0, import_prettier.format)(JSON.stringify(packageJson), {
|
|
137436
137382
|
...prettierOptions,
|
|
@@ -137454,7 +137400,7 @@ ${externalDependencies.map((dep) => {
|
|
|
137454
137400
|
await (0, import_prettier.format)(
|
|
137455
137401
|
`${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
|
|
137456
137402
|
|
|
137457
|
-
${(0,
|
|
137403
|
+
${(0, import_node_fs2.readFileSync)(file, "utf-8")}`,
|
|
137458
137404
|
{
|
|
137459
137405
|
...prettierOptions,
|
|
137460
137406
|
parser: "typescript"
|
|
@@ -137559,11 +137505,11 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
|
137559
137505
|
emitDeclarationOnly: true,
|
|
137560
137506
|
declaration: true,
|
|
137561
137507
|
declarationMap: true,
|
|
137562
|
-
declarationDir: (0,
|
|
137508
|
+
declarationDir: (0, import_node_path2.join)(workspaceRoot, "tmp", ".tsup", "declaration")
|
|
137563
137509
|
}
|
|
137564
137510
|
},
|
|
137565
137511
|
ts.sys,
|
|
137566
|
-
(0,
|
|
137512
|
+
(0, import_node_path2.dirname)(options.tsConfig)
|
|
137567
137513
|
);
|
|
137568
137514
|
tsConfig.options.pathsBasePath = workspaceRoot;
|
|
137569
137515
|
if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
|