@storm-software/tsdown 0.36.19 → 0.36.21
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/README.md +1 -1
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-PNWEJDFX.js → chunk-KSTZB6IE.js} +35 -3
- package/dist/{chunk-RICV2DYC.js → chunk-Q7MTTNCZ.js} +14 -3
- package/dist/{chunk-H4B2ZHWT.cjs → chunk-U3UZHGC6.cjs} +127 -95
- package/dist/{chunk-MSU3BDDY.cjs → chunk-WW7H6NZJ.cjs} +89 -78
- package/dist/clean.cjs +2 -2
- package/dist/clean.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/dist/build.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkU3UZHGC6cjs = require('./chunk-U3UZHGC6.cjs');
|
|
5
|
+
require('./chunk-WW7H6NZJ.cjs');
|
|
6
6
|
require('./chunk-65E5RX7I.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.build =
|
|
10
|
+
exports.build = _chunkU3UZHGC6cjs.build; exports.cleanOutputPath = _chunkU3UZHGC6cjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
writeSuccess,
|
|
22
22
|
writeTrace,
|
|
23
23
|
writeWarning
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q7MTTNCZ.js";
|
|
25
25
|
import {
|
|
26
26
|
DEFAULT_BUILD_OPTIONS
|
|
27
27
|
} from "./chunk-2YE3GBQH.js";
|
|
@@ -415,7 +415,13 @@ var getConfigEnv = () => {
|
|
|
415
415
|
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
416
416
|
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
417
417
|
},
|
|
418
|
-
organization: process.env[`${prefix}ORGANIZATION`] ||
|
|
418
|
+
organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
|
|
419
|
+
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
420
|
+
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
421
|
+
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
422
|
+
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
423
|
+
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
424
|
+
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
419
425
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
420
426
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
421
427
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
@@ -622,7 +628,33 @@ var setConfigEnv = (config) => {
|
|
|
622
628
|
}
|
|
623
629
|
}
|
|
624
630
|
if (config.organization) {
|
|
625
|
-
|
|
631
|
+
if (typeof config.organization === "string") {
|
|
632
|
+
process.env[`${prefix}ORG`] = config.organization;
|
|
633
|
+
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
634
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
635
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
636
|
+
} else {
|
|
637
|
+
process.env[`${prefix}ORG`] = config.organization.name;
|
|
638
|
+
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
639
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
640
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
641
|
+
if (config.organization.url) {
|
|
642
|
+
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
643
|
+
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
644
|
+
}
|
|
645
|
+
if (config.organization.description) {
|
|
646
|
+
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
647
|
+
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
648
|
+
}
|
|
649
|
+
if (config.organization.logo) {
|
|
650
|
+
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
651
|
+
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
652
|
+
}
|
|
653
|
+
if (config.organization.icon) {
|
|
654
|
+
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
655
|
+
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
626
658
|
}
|
|
627
659
|
if (config.packageManager) {
|
|
628
660
|
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
@@ -45,7 +45,7 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
45
45
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
46
46
|
|
|
47
47
|
// ../config/src/schema.ts
|
|
48
|
-
import z from "zod";
|
|
48
|
+
import * as z from "zod/v4";
|
|
49
49
|
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
50
50
|
var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
51
51
|
var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
|
|
@@ -186,6 +186,15 @@ var errorConfigSchema = z.object({
|
|
|
186
186
|
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
187
187
|
)
|
|
188
188
|
}).describe("The workspace's error config used during the error process");
|
|
189
|
+
var organizationConfigSchema = z.object({
|
|
190
|
+
name: z.string().trim().describe("The name of the organization"),
|
|
191
|
+
description: z.string().trim().optional().describe("A description of the organization"),
|
|
192
|
+
logo: z.string().trim().url().optional().describe("A URL to the organization's logo image"),
|
|
193
|
+
icon: z.string().trim().url().optional().describe("A URL to the organization's icon image"),
|
|
194
|
+
url: z.string().trim().url().optional().describe(
|
|
195
|
+
"A URL to a page that provides more information about the organization"
|
|
196
|
+
)
|
|
197
|
+
}).describe("The workspace's organization details");
|
|
189
198
|
var stormWorkspaceConfigSchema = z.object({
|
|
190
199
|
$schema: z.string().trim().default(
|
|
191
200
|
"https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
|
|
@@ -197,7 +206,9 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
197
206
|
"The name of the service/package/scope using this configuration"
|
|
198
207
|
),
|
|
199
208
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
200
|
-
organization: z.string().trim().
|
|
209
|
+
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
210
|
+
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
211
|
+
),
|
|
201
212
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
202
213
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
203
214
|
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
@@ -250,7 +261,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
250
261
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
251
262
|
"Storm theme config values used for styling various package elements"
|
|
252
263
|
),
|
|
253
|
-
extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
264
|
+
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
254
265
|
}).describe(
|
|
255
266
|
"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."
|
|
256
267
|
);
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkWW7H6NZJcjs = require('./chunk-WW7H6NZJ.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
var _chunk65E5RX7Icjs = require('./chunk-65E5RX7I.cjs');
|
|
@@ -81,9 +81,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
81
81
|
output: "src/"
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
_chunkWW7H6NZJcjs.writeTrace.call(void 0,
|
|
85
85
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
86
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
86
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkWW7H6NZJcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
87
87
|
config
|
|
88
88
|
);
|
|
89
89
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -94,18 +94,18 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
94
94
|
});
|
|
95
95
|
await assetHandler.processAllAssetsOnce();
|
|
96
96
|
if (includeSrc === true) {
|
|
97
|
-
|
|
98
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
97
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0,
|
|
98
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
99
99
|
outputPath,
|
|
100
100
|
"src"
|
|
101
101
|
)}`,
|
|
102
102
|
config
|
|
103
103
|
);
|
|
104
104
|
const files = await _glob.glob.call(void 0, [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
106
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
107
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
108
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
109
109
|
]);
|
|
110
110
|
await Promise.allSettled(
|
|
111
111
|
files.map(
|
|
@@ -160,7 +160,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
160
160
|
)) {
|
|
161
161
|
const projectNode = project.node;
|
|
162
162
|
if (projectNode.data.root) {
|
|
163
|
-
const projectPackageJsonPath =
|
|
163
|
+
const projectPackageJsonPath = _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
164
164
|
workspaceRoot,
|
|
165
165
|
projectNode.data.root,
|
|
166
166
|
"package.json"
|
|
@@ -178,11 +178,11 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
if (localPackages.length > 0) {
|
|
181
|
-
|
|
181
|
+
_chunkWW7H6NZJcjs.writeTrace.call(void 0,
|
|
182
182
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
183
183
|
);
|
|
184
184
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
185
|
-
|
|
185
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
186
186
|
"utf8"
|
|
187
187
|
);
|
|
188
188
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -195,7 +195,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
195
195
|
}
|
|
196
196
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
197
197
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
198
|
-
const depPackageJsonPath =
|
|
198
|
+
const depPackageJsonPath = _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
199
199
|
workspaceRoot,
|
|
200
200
|
projectConfigurations.projects[dep].root,
|
|
201
201
|
"package.json"
|
|
@@ -226,14 +226,14 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
226
226
|
return ret;
|
|
227
227
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
228
228
|
} else {
|
|
229
|
-
|
|
229
|
+
_chunkWW7H6NZJcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
230
230
|
}
|
|
231
231
|
return packageJson;
|
|
232
232
|
};
|
|
233
233
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
234
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
234
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkWW7H6NZJcjs.findWorkspaceRoot.call(void 0, );
|
|
235
235
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
236
|
-
|
|
236
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
237
237
|
"utf8"
|
|
238
238
|
);
|
|
239
239
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -244,7 +244,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
244
244
|
if (distSrc.startsWith("/")) {
|
|
245
245
|
distSrc = distSrc.substring(1);
|
|
246
246
|
}
|
|
247
|
-
packageJson.source ??= `${
|
|
247
|
+
packageJson.source ??= `${_chunkWW7H6NZJcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
248
248
|
}
|
|
249
249
|
packageJson.files ??= ["dist/**/*"];
|
|
250
250
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -269,7 +269,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
269
269
|
packageJson.contributors = [packageJson.author];
|
|
270
270
|
}
|
|
271
271
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
272
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
272
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkWW7H6NZJcjs.joinPaths.call(void 0, "packages", projectName);
|
|
273
273
|
return packageJson;
|
|
274
274
|
};
|
|
275
275
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -297,7 +297,7 @@ var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
|
297
297
|
var _c12 = require('c12');
|
|
298
298
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
299
299
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
300
|
-
const workspacePath = filePath ||
|
|
300
|
+
const workspacePath = filePath || _chunkWW7H6NZJcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
301
301
|
const configs = await Promise.all([
|
|
302
302
|
_c12.loadConfig.call(void 0, {
|
|
303
303
|
cwd: workspacePath,
|
|
@@ -306,7 +306,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
306
306
|
envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
|
|
307
307
|
jitiOptions: {
|
|
308
308
|
debug: false,
|
|
309
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
309
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
310
310
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
311
311
|
"jiti"
|
|
312
312
|
)
|
|
@@ -320,7 +320,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
320
320
|
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
321
321
|
jitiOptions: {
|
|
322
322
|
debug: false,
|
|
323
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
323
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
324
324
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
325
325
|
"jiti"
|
|
326
326
|
)
|
|
@@ -332,12 +332,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
332
332
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
333
333
|
};
|
|
334
334
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
335
|
-
const workspacePath = filePath ? filePath :
|
|
335
|
+
const workspacePath = filePath ? filePath : _chunkWW7H6NZJcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
336
336
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
337
337
|
let config = result.config;
|
|
338
338
|
const configFile = result.configFile;
|
|
339
339
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
340
|
-
|
|
340
|
+
_chunkWW7H6NZJcjs.writeTrace.call(void 0,
|
|
341
341
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
342
342
|
{
|
|
343
343
|
logLevel: "all"
|
|
@@ -353,7 +353,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
353
353
|
for (const result2 of results) {
|
|
354
354
|
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
355
355
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
356
|
-
|
|
356
|
+
_chunkWW7H6NZJcjs.writeTrace.call(void 0,
|
|
357
357
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
358
358
|
{
|
|
359
359
|
logLevel: "all"
|
|
@@ -415,7 +415,13 @@ var getConfigEnv = () => {
|
|
|
415
415
|
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
416
416
|
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
417
417
|
},
|
|
418
|
-
organization: process.env[`${prefix}ORGANIZATION`] ||
|
|
418
|
+
organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
|
|
419
|
+
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
420
|
+
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
421
|
+
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
422
|
+
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
423
|
+
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
424
|
+
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
419
425
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
420
426
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
421
427
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
@@ -426,15 +432,15 @@ var getConfigEnv = () => {
|
|
|
426
432
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
427
433
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
428
434
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
429
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
430
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
435
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
436
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
431
437
|
directories: {
|
|
432
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
433
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
434
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
435
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
436
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
437
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
438
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
439
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
440
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
441
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
442
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
443
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkWW7H6NZJcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
438
444
|
},
|
|
439
445
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
440
446
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -459,13 +465,13 @@ var getConfigEnv = () => {
|
|
|
459
465
|
},
|
|
460
466
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
461
467
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
462
|
-
) ?
|
|
468
|
+
) ? _chunkWW7H6NZJcjs.getLogLevelLabel.call(void 0,
|
|
463
469
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
464
470
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
465
471
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
466
472
|
};
|
|
467
473
|
const themeNames = Object.keys(process.env).filter(
|
|
468
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
474
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkWW7H6NZJcjs.COLOR_KEYS.every(
|
|
469
475
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
470
476
|
)
|
|
471
477
|
);
|
|
@@ -476,16 +482,16 @@ var getConfigEnv = () => {
|
|
|
476
482
|
},
|
|
477
483
|
{}
|
|
478
484
|
) : getThemeColorConfigEnv(prefix);
|
|
479
|
-
if (config.docs ===
|
|
480
|
-
if (config.homepage ===
|
|
481
|
-
config.docs = `${
|
|
485
|
+
if (config.docs === _chunkWW7H6NZJcjs.STORM_DEFAULT_DOCS) {
|
|
486
|
+
if (config.homepage === _chunkWW7H6NZJcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
487
|
+
config.docs = `${_chunkWW7H6NZJcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
482
488
|
} else {
|
|
483
489
|
config.docs = `${config.homepage}/docs`;
|
|
484
490
|
}
|
|
485
491
|
}
|
|
486
|
-
if (config.licensing ===
|
|
487
|
-
if (config.homepage ===
|
|
488
|
-
config.licensing = `${
|
|
492
|
+
if (config.licensing === _chunkWW7H6NZJcjs.STORM_DEFAULT_LICENSING) {
|
|
493
|
+
if (config.homepage === _chunkWW7H6NZJcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
494
|
+
config.licensing = `${_chunkWW7H6NZJcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
489
495
|
} else {
|
|
490
496
|
config.licensing = `${config.homepage}/docs`;
|
|
491
497
|
}
|
|
@@ -622,7 +628,33 @@ var setConfigEnv = (config) => {
|
|
|
622
628
|
}
|
|
623
629
|
}
|
|
624
630
|
if (config.organization) {
|
|
625
|
-
|
|
631
|
+
if (typeof config.organization === "string") {
|
|
632
|
+
process.env[`${prefix}ORG`] = config.organization;
|
|
633
|
+
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
634
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
635
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
636
|
+
} else {
|
|
637
|
+
process.env[`${prefix}ORG`] = config.organization.name;
|
|
638
|
+
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
639
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
640
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
641
|
+
if (config.organization.url) {
|
|
642
|
+
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
643
|
+
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
644
|
+
}
|
|
645
|
+
if (config.organization.description) {
|
|
646
|
+
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
647
|
+
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
648
|
+
}
|
|
649
|
+
if (config.organization.logo) {
|
|
650
|
+
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
651
|
+
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
652
|
+
}
|
|
653
|
+
if (config.organization.icon) {
|
|
654
|
+
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
655
|
+
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
626
658
|
}
|
|
627
659
|
if (config.packageManager) {
|
|
628
660
|
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
@@ -660,40 +692,40 @@ var setConfigEnv = (config) => {
|
|
|
660
692
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
661
693
|
}
|
|
662
694
|
if (config.configFile) {
|
|
663
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
695
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.configFile);
|
|
664
696
|
}
|
|
665
697
|
if (config.workspaceRoot) {
|
|
666
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
667
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
668
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
698
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
699
|
+
process.env.NX_WORKSPACE_ROOT = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
700
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
669
701
|
}
|
|
670
702
|
if (config.directories) {
|
|
671
703
|
if (!config.skipCache && config.directories.cache) {
|
|
672
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
704
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0,
|
|
673
705
|
config.directories.cache
|
|
674
706
|
);
|
|
675
707
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
676
708
|
}
|
|
677
709
|
if (config.directories.data) {
|
|
678
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
710
|
+
process.env[`${prefix}DATA_DIR`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.directories.data);
|
|
679
711
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
680
712
|
}
|
|
681
713
|
if (config.directories.config) {
|
|
682
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
714
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0,
|
|
683
715
|
config.directories.config
|
|
684
716
|
);
|
|
685
717
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
686
718
|
}
|
|
687
719
|
if (config.directories.temp) {
|
|
688
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
720
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.directories.temp);
|
|
689
721
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
690
722
|
}
|
|
691
723
|
if (config.directories.log) {
|
|
692
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
724
|
+
process.env[`${prefix}LOG_DIR`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0, config.directories.log);
|
|
693
725
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
694
726
|
}
|
|
695
727
|
if (config.directories.build) {
|
|
696
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
728
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkWW7H6NZJcjs.correctPaths.call(void 0,
|
|
697
729
|
config.directories.build
|
|
698
730
|
);
|
|
699
731
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -760,9 +792,9 @@ var setConfigEnv = (config) => {
|
|
|
760
792
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
761
793
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
762
794
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
763
|
-
|
|
795
|
+
_chunkWW7H6NZJcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkWW7H6NZJcjs.LogLevel.DEBUG ? true : false
|
|
764
796
|
);
|
|
765
|
-
process.env.RUST_BACKTRACE =
|
|
797
|
+
process.env.RUST_BACKTRACE = _chunkWW7H6NZJcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkWW7H6NZJcjs.LogLevel.DEBUG ? "full" : "none";
|
|
766
798
|
}
|
|
767
799
|
if (config.skipConfigLogging !== void 0) {
|
|
768
800
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -882,13 +914,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
882
914
|
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
883
915
|
let _workspaceRoot = workspaceRoot;
|
|
884
916
|
if (!_workspaceRoot) {
|
|
885
|
-
_workspaceRoot =
|
|
917
|
+
_workspaceRoot = _chunkWW7H6NZJcjs.findWorkspaceRoot.call(void 0, );
|
|
886
918
|
}
|
|
887
919
|
const configEnv = getConfigEnv();
|
|
888
920
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
889
921
|
if (!configFile) {
|
|
890
922
|
if (!skipLogs) {
|
|
891
|
-
|
|
923
|
+
_chunkWW7H6NZJcjs.writeWarning.call(void 0,
|
|
892
924
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
893
925
|
{ logLevel: "all" }
|
|
894
926
|
);
|
|
@@ -897,9 +929,9 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
897
929
|
return void 0;
|
|
898
930
|
}
|
|
899
931
|
}
|
|
900
|
-
const defaultConfig = await
|
|
901
|
-
result =
|
|
902
|
-
await
|
|
932
|
+
const defaultConfig = await _chunkWW7H6NZJcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
933
|
+
result = _chunkWW7H6NZJcjs.applyDefaultConfig.call(void 0,
|
|
934
|
+
await _chunkWW7H6NZJcjs.stormWorkspaceConfigSchema.parseAsync(
|
|
903
935
|
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
904
936
|
)
|
|
905
937
|
);
|
|
@@ -941,9 +973,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
941
973
|
);
|
|
942
974
|
setConfigEnv(config);
|
|
943
975
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
944
|
-
|
|
976
|
+
_chunkWW7H6NZJcjs.writeTrace.call(void 0,
|
|
945
977
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
946
|
-
${
|
|
978
|
+
${_chunkWW7H6NZJcjs.formatLogMessage.call(void 0, config)}`,
|
|
947
979
|
config
|
|
948
980
|
);
|
|
949
981
|
}
|
|
@@ -958,7 +990,7 @@ var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
|
958
990
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
959
991
|
|
|
960
992
|
var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
961
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
993
|
+
const workspaceRoot = config.workspaceRoot || _chunkWW7H6NZJcjs.findWorkspaceRoot.call(void 0, );
|
|
962
994
|
const entryPoints = [];
|
|
963
995
|
if (entry) {
|
|
964
996
|
if (typeof entry === "string") {
|
|
@@ -971,7 +1003,7 @@ var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll =
|
|
|
971
1003
|
}
|
|
972
1004
|
if (emitOnAll) {
|
|
973
1005
|
entryPoints.push(
|
|
974
|
-
|
|
1006
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}")
|
|
975
1007
|
);
|
|
976
1008
|
}
|
|
977
1009
|
const results = await Promise.all(
|
|
@@ -984,12 +1016,12 @@ var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll =
|
|
|
984
1016
|
});
|
|
985
1017
|
paths.push(
|
|
986
1018
|
...files.reduce((ret, filePath) => {
|
|
987
|
-
const result =
|
|
988
|
-
|
|
1019
|
+
const result = _chunkWW7H6NZJcjs.correctPaths.call(void 0,
|
|
1020
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkWW7H6NZJcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkWW7H6NZJcjs.correctPaths.call(void 0, projectRoot), "")
|
|
989
1021
|
);
|
|
990
1022
|
if (result) {
|
|
991
|
-
|
|
992
|
-
`Trying to add entry point ${result} at "${
|
|
1023
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0,
|
|
1024
|
+
`Trying to add entry point ${result} at "${_chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
993
1025
|
filePath.path,
|
|
994
1026
|
filePath.name
|
|
995
1027
|
)}"`,
|
|
@@ -1003,7 +1035,7 @@ var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll =
|
|
|
1003
1035
|
}, [])
|
|
1004
1036
|
);
|
|
1005
1037
|
} else {
|
|
1006
|
-
|
|
1038
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
1007
1039
|
if (!paths.includes(entryPoint)) {
|
|
1008
1040
|
paths.push(entryPoint);
|
|
1009
1041
|
}
|
|
@@ -1058,12 +1090,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
1058
1090
|
throw new Error("Cannot find Nx workspace root");
|
|
1059
1091
|
}
|
|
1060
1092
|
const config = await getConfig(workspaceRoot.dir);
|
|
1061
|
-
|
|
1062
|
-
const stopwatch =
|
|
1093
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1094
|
+
const stopwatch = _chunkWW7H6NZJcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1063
1095
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1064
1096
|
exitOnError: true
|
|
1065
1097
|
});
|
|
1066
|
-
const projectJsonPath =
|
|
1098
|
+
const projectJsonPath = _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
1067
1099
|
workspaceRoot.dir,
|
|
1068
1100
|
projectRoot,
|
|
1069
1101
|
"project.json"
|
|
@@ -1083,7 +1115,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1083
1115
|
const options = _defu2.default.call(void 0, userOptions, _chunk65E5RX7Icjs.DEFAULT_BUILD_OPTIONS);
|
|
1084
1116
|
options.name ??= `${projectName}-${options.format}`;
|
|
1085
1117
|
options.target ??= DEFAULT_TARGET;
|
|
1086
|
-
const packageJsonPath =
|
|
1118
|
+
const packageJsonPath = _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
1087
1119
|
workspaceRoot.dir,
|
|
1088
1120
|
options.projectRoot,
|
|
1089
1121
|
"package.json"
|
|
@@ -1096,7 +1128,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1096
1128
|
...options,
|
|
1097
1129
|
config,
|
|
1098
1130
|
...userOptions,
|
|
1099
|
-
tsconfig:
|
|
1131
|
+
tsconfig: _chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
1100
1132
|
projectRoot,
|
|
1101
1133
|
userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"
|
|
1102
1134
|
),
|
|
@@ -1108,15 +1140,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1108
1140
|
userOptions.entry || ["./src/index.ts"],
|
|
1109
1141
|
userOptions.emitOnAll
|
|
1110
1142
|
),
|
|
1111
|
-
outdir: userOptions.outputPath ||
|
|
1143
|
+
outdir: userOptions.outputPath || _chunkWW7H6NZJcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1112
1144
|
plugins: [],
|
|
1113
1145
|
name: userOptions.name || projectName,
|
|
1114
1146
|
projectConfigurations,
|
|
1115
1147
|
projectName,
|
|
1116
1148
|
projectGraph,
|
|
1117
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1149
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkWW7H6NZJcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1118
1150
|
minify: userOptions.minify || !userOptions.debug,
|
|
1119
|
-
verbose: userOptions.verbose ||
|
|
1151
|
+
verbose: userOptions.verbose || _chunkWW7H6NZJcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1120
1152
|
includeSrc: userOptions.includeSrc === true,
|
|
1121
1153
|
metafile: userOptions.metafile !== false,
|
|
1122
1154
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1148,15 +1180,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1148
1180
|
return result;
|
|
1149
1181
|
};
|
|
1150
1182
|
async function generatePackageJson(options) {
|
|
1151
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1152
|
-
|
|
1153
|
-
const stopwatch =
|
|
1154
|
-
const packageJsonPath =
|
|
1183
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkWW7H6NZJcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1184
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1185
|
+
const stopwatch = _chunkWW7H6NZJcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1186
|
+
const packageJsonPath = _chunkWW7H6NZJcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1155
1187
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1156
1188
|
throw new Error("Cannot find package.json configuration");
|
|
1157
1189
|
}
|
|
1158
1190
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1159
|
-
|
|
1191
|
+
_chunkWW7H6NZJcjs.joinPaths.call(void 0,
|
|
1160
1192
|
options.config.workspaceRoot,
|
|
1161
1193
|
options.projectRoot,
|
|
1162
1194
|
"package.json"
|
|
@@ -1218,14 +1250,14 @@ async function generatePackageJson(options) {
|
|
|
1218
1250
|
},
|
|
1219
1251
|
packageJson.exports
|
|
1220
1252
|
);
|
|
1221
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1253
|
+
await _devkit.writeJsonFile.call(void 0, _chunkWW7H6NZJcjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1222
1254
|
stopwatch();
|
|
1223
1255
|
}
|
|
1224
1256
|
return options;
|
|
1225
1257
|
}
|
|
1226
1258
|
async function executeTSDown(options) {
|
|
1227
|
-
|
|
1228
|
-
const stopwatch =
|
|
1259
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1260
|
+
const stopwatch = _chunkWW7H6NZJcjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1229
1261
|
await _tsdown.build.call(void 0, {
|
|
1230
1262
|
...options,
|
|
1231
1263
|
entry: options.entryPoints,
|
|
@@ -1236,11 +1268,11 @@ async function executeTSDown(options) {
|
|
|
1236
1268
|
return options;
|
|
1237
1269
|
}
|
|
1238
1270
|
async function copyBuildAssets(options) {
|
|
1239
|
-
|
|
1271
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0,
|
|
1240
1272
|
` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`,
|
|
1241
1273
|
options.config
|
|
1242
1274
|
);
|
|
1243
|
-
const stopwatch =
|
|
1275
|
+
const stopwatch = _chunkWW7H6NZJcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1244
1276
|
await copyAssets(
|
|
1245
1277
|
options.config,
|
|
1246
1278
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1254,26 +1286,26 @@ async function copyBuildAssets(options) {
|
|
|
1254
1286
|
return options;
|
|
1255
1287
|
}
|
|
1256
1288
|
async function reportResults(options) {
|
|
1257
|
-
|
|
1289
|
+
_chunkWW7H6NZJcjs.writeSuccess.call(void 0,
|
|
1258
1290
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1259
1291
|
options.config
|
|
1260
1292
|
);
|
|
1261
1293
|
}
|
|
1262
1294
|
async function cleanOutputPath(options) {
|
|
1263
1295
|
if (options.clean !== false && options.outdir) {
|
|
1264
|
-
|
|
1296
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0,
|
|
1265
1297
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`,
|
|
1266
1298
|
options.config
|
|
1267
1299
|
);
|
|
1268
|
-
const stopwatch =
|
|
1269
|
-
await
|
|
1300
|
+
const stopwatch = _chunkWW7H6NZJcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1301
|
+
await _chunkWW7H6NZJcjs.cleanDirectories.call(void 0, options.name, options.outdir, options.config);
|
|
1270
1302
|
stopwatch();
|
|
1271
1303
|
}
|
|
1272
1304
|
return options;
|
|
1273
1305
|
}
|
|
1274
1306
|
async function build(options) {
|
|
1275
|
-
|
|
1276
|
-
const stopwatch =
|
|
1307
|
+
_chunkWW7H6NZJcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1308
|
+
const stopwatch = _chunkWW7H6NZJcjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1277
1309
|
try {
|
|
1278
1310
|
const opts = Array.isArray(options) ? options : [options];
|
|
1279
1311
|
if (opts.length === 0) {
|
|
@@ -1293,13 +1325,13 @@ async function build(options) {
|
|
|
1293
1325
|
})
|
|
1294
1326
|
);
|
|
1295
1327
|
} else {
|
|
1296
|
-
|
|
1328
|
+
_chunkWW7H6NZJcjs.writeWarning.call(void 0,
|
|
1297
1329
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1298
1330
|
);
|
|
1299
1331
|
}
|
|
1300
|
-
|
|
1332
|
+
_chunkWW7H6NZJcjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1301
1333
|
} catch (error) {
|
|
1302
|
-
|
|
1334
|
+
_chunkWW7H6NZJcjs.writeFatal.call(void 0,
|
|
1303
1335
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1304
1336
|
);
|
|
1305
1337
|
throw error;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ../config-tools/src/types.ts
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ../config-tools/src/types.ts
|
|
2
2
|
var LogLevel = {
|
|
3
3
|
SILENT: 0,
|
|
4
4
|
FATAL: 10,
|
|
@@ -45,22 +45,22 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
45
45
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
46
46
|
|
|
47
47
|
// ../config/src/schema.ts
|
|
48
|
-
var
|
|
49
|
-
var DarkColorSchema =
|
|
50
|
-
var LightColorSchema =
|
|
51
|
-
var BrandColorSchema =
|
|
52
|
-
var AlternateColorSchema =
|
|
53
|
-
var AccentColorSchema =
|
|
54
|
-
var LinkColorSchema =
|
|
55
|
-
var HelpColorSchema =
|
|
56
|
-
var SuccessColorSchema =
|
|
57
|
-
var InfoColorSchema =
|
|
58
|
-
var WarningColorSchema =
|
|
59
|
-
var DangerColorSchema =
|
|
60
|
-
var FatalColorSchema =
|
|
61
|
-
var PositiveColorSchema =
|
|
62
|
-
var NegativeColorSchema =
|
|
63
|
-
var DarkThemeColorConfigSchema =
|
|
48
|
+
var _v4 = require('zod/v4'); var z = _interopRequireWildcard(_v4);
|
|
49
|
+
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
50
|
+
var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
51
|
+
var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
|
|
52
|
+
var AlternateColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
|
|
53
|
+
var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
|
|
54
|
+
var LinkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
|
|
55
|
+
var HelpColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
56
|
+
var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
|
|
57
|
+
var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
|
|
58
|
+
var WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
59
|
+
var DangerColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
|
|
60
|
+
var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
|
|
61
|
+
var PositiveColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
|
|
62
|
+
var NegativeColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
|
|
63
|
+
var DarkThemeColorConfigSchema = z.object({
|
|
64
64
|
foreground: LightColorSchema,
|
|
65
65
|
background: DarkColorSchema,
|
|
66
66
|
brand: BrandColorSchema,
|
|
@@ -76,7 +76,7 @@ var DarkThemeColorConfigSchema = _zod2.default.object({
|
|
|
76
76
|
positive: PositiveColorSchema,
|
|
77
77
|
negative: NegativeColorSchema
|
|
78
78
|
});
|
|
79
|
-
var LightThemeColorConfigSchema =
|
|
79
|
+
var LightThemeColorConfigSchema = z.object({
|
|
80
80
|
foreground: DarkColorSchema,
|
|
81
81
|
background: LightColorSchema,
|
|
82
82
|
brand: BrandColorSchema,
|
|
@@ -92,11 +92,11 @@ var LightThemeColorConfigSchema = _zod2.default.object({
|
|
|
92
92
|
positive: PositiveColorSchema,
|
|
93
93
|
negative: NegativeColorSchema
|
|
94
94
|
});
|
|
95
|
-
var MultiThemeColorConfigSchema =
|
|
95
|
+
var MultiThemeColorConfigSchema = z.object({
|
|
96
96
|
dark: DarkThemeColorConfigSchema,
|
|
97
97
|
light: LightThemeColorConfigSchema
|
|
98
98
|
});
|
|
99
|
-
var SingleThemeColorConfigSchema =
|
|
99
|
+
var SingleThemeColorConfigSchema = z.object({
|
|
100
100
|
dark: DarkColorSchema,
|
|
101
101
|
light: LightColorSchema,
|
|
102
102
|
brand: BrandColorSchema,
|
|
@@ -112,8 +112,8 @@ var SingleThemeColorConfigSchema = _zod2.default.object({
|
|
|
112
112
|
positive: PositiveColorSchema,
|
|
113
113
|
negative: NegativeColorSchema
|
|
114
114
|
});
|
|
115
|
-
var RegistryUrlConfigSchema =
|
|
116
|
-
var RegistryConfigSchema =
|
|
115
|
+
var RegistryUrlConfigSchema = z.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
116
|
+
var RegistryConfigSchema = z.object({
|
|
117
117
|
github: RegistryUrlConfigSchema,
|
|
118
118
|
npm: RegistryUrlConfigSchema,
|
|
119
119
|
cargo: RegistryUrlConfigSchema,
|
|
@@ -123,111 +123,122 @@ var RegistryConfigSchema = _zod2.default.object({
|
|
|
123
123
|
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
124
124
|
MultiThemeColorConfigSchema
|
|
125
125
|
).describe("Colors used for various workspace elements");
|
|
126
|
-
var ColorConfigMapSchema =
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
var ColorConfigMapSchema = z.union([
|
|
127
|
+
z.object({ base: ColorConfigSchema }),
|
|
128
|
+
z.record(z.string(), ColorConfigSchema)
|
|
129
129
|
]);
|
|
130
|
-
var ExtendsItemSchema =
|
|
130
|
+
var ExtendsItemSchema = z.string().trim().describe(
|
|
131
131
|
"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
|
|
132
132
|
);
|
|
133
133
|
var ExtendsSchema = ExtendsItemSchema.or(
|
|
134
|
-
|
|
134
|
+
z.array(ExtendsItemSchema)
|
|
135
135
|
).describe(
|
|
136
136
|
"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
|
|
137
137
|
);
|
|
138
|
-
var WorkspaceBotConfigSchema =
|
|
139
|
-
name:
|
|
138
|
+
var WorkspaceBotConfigSchema = z.object({
|
|
139
|
+
name: z.string().trim().default("stormie-bot").describe(
|
|
140
140
|
"The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
141
141
|
),
|
|
142
|
-
email:
|
|
142
|
+
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
143
143
|
}).describe(
|
|
144
144
|
"The workspace's bot user's config used to automated various operations tasks"
|
|
145
145
|
);
|
|
146
|
-
var WorkspaceReleaseConfigSchema =
|
|
147
|
-
banner:
|
|
146
|
+
var WorkspaceReleaseConfigSchema = z.object({
|
|
147
|
+
banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
|
|
148
148
|
"A URL to a banner image used to display the workspace's release"
|
|
149
149
|
),
|
|
150
|
-
header:
|
|
150
|
+
header: z.string().trim().optional().describe(
|
|
151
151
|
"A header message appended to the start of the workspace's release notes"
|
|
152
152
|
),
|
|
153
|
-
footer:
|
|
153
|
+
footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
|
|
154
154
|
"A footer message appended to the end of the workspace's release notes"
|
|
155
155
|
)
|
|
156
156
|
}).describe("The workspace's release config used during the release process");
|
|
157
|
-
var WorkspaceAccountConfigSchema =
|
|
158
|
-
twitter:
|
|
159
|
-
discord:
|
|
160
|
-
telegram:
|
|
161
|
-
slack:
|
|
162
|
-
medium:
|
|
163
|
-
github:
|
|
157
|
+
var WorkspaceAccountConfigSchema = z.object({
|
|
158
|
+
twitter: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
159
|
+
discord: z.string().trim().default(STORM_DEFAULT_ACCOUNT_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
160
|
+
telegram: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
161
|
+
slack: z.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
|
|
162
|
+
medium: z.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
163
|
+
github: z.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
164
164
|
}).describe(
|
|
165
165
|
"The workspace's account config used to store various social media links"
|
|
166
166
|
);
|
|
167
|
-
var WorkspaceDirectoryConfigSchema =
|
|
168
|
-
cache:
|
|
167
|
+
var WorkspaceDirectoryConfigSchema = z.object({
|
|
168
|
+
cache: z.string().trim().optional().describe(
|
|
169
169
|
"The directory used to store the environment's cached file data"
|
|
170
170
|
),
|
|
171
|
-
data:
|
|
172
|
-
config:
|
|
171
|
+
data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
172
|
+
config: z.string().trim().optional().describe(
|
|
173
173
|
"The directory used to store the environment's configuration files"
|
|
174
174
|
),
|
|
175
|
-
temp:
|
|
176
|
-
log:
|
|
177
|
-
build:
|
|
175
|
+
temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
176
|
+
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
177
|
+
build: z.string().trim().default("dist").describe(
|
|
178
178
|
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
179
179
|
)
|
|
180
180
|
}).describe(
|
|
181
181
|
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
182
182
|
);
|
|
183
|
-
var errorConfigSchema =
|
|
184
|
-
codesFile:
|
|
185
|
-
url:
|
|
183
|
+
var errorConfigSchema = z.object({
|
|
184
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
|
|
185
|
+
url: z.string().trim().url().optional().describe(
|
|
186
186
|
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
187
187
|
)
|
|
188
188
|
}).describe("The workspace's error config used during the error process");
|
|
189
|
-
var
|
|
190
|
-
|
|
189
|
+
var organizationConfigSchema = z.object({
|
|
190
|
+
name: z.string().trim().describe("The name of the organization"),
|
|
191
|
+
description: z.string().trim().optional().describe("A description of the organization"),
|
|
192
|
+
logo: z.string().trim().url().optional().describe("A URL to the organization's logo image"),
|
|
193
|
+
icon: z.string().trim().url().optional().describe("A URL to the organization's icon image"),
|
|
194
|
+
url: z.string().trim().url().optional().describe(
|
|
195
|
+
"A URL to a page that provides more information about the organization"
|
|
196
|
+
)
|
|
197
|
+
}).describe("The workspace's organization details");
|
|
198
|
+
var stormWorkspaceConfigSchema = z.object({
|
|
199
|
+
$schema: z.string().trim().default(
|
|
191
200
|
"https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
|
|
192
201
|
).optional().nullish().describe(
|
|
193
202
|
"The URL to the JSON schema file that describes the Storm configuration file"
|
|
194
203
|
),
|
|
195
204
|
extends: ExtendsSchema.optional(),
|
|
196
|
-
name:
|
|
205
|
+
name: z.string().trim().toLowerCase().optional().describe(
|
|
197
206
|
"The name of the service/package/scope using this configuration"
|
|
198
207
|
),
|
|
199
|
-
namespace:
|
|
200
|
-
organization:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
209
|
+
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
210
|
+
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
211
|
+
),
|
|
212
|
+
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
213
|
+
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
214
|
+
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
215
|
+
docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
216
|
+
portal: z.string().trim().url().optional().describe("The development portal site for the workspace"),
|
|
217
|
+
licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
218
|
+
contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
219
|
+
support: z.string().trim().url().optional().describe(
|
|
209
220
|
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
210
221
|
),
|
|
211
|
-
branch:
|
|
212
|
-
preid:
|
|
213
|
-
owner:
|
|
222
|
+
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
223
|
+
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
224
|
+
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
214
225
|
bot: WorkspaceBotConfigSchema,
|
|
215
226
|
release: WorkspaceReleaseConfigSchema,
|
|
216
227
|
account: WorkspaceAccountConfigSchema,
|
|
217
228
|
error: errorConfigSchema,
|
|
218
|
-
mode:
|
|
219
|
-
workspaceRoot:
|
|
220
|
-
externalPackagePatterns:
|
|
229
|
+
mode: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
|
|
230
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
231
|
+
externalPackagePatterns: z.array(z.string()).default([]).describe(
|
|
221
232
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
222
233
|
),
|
|
223
|
-
skipCache:
|
|
234
|
+
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
224
235
|
directories: WorkspaceDirectoryConfigSchema,
|
|
225
|
-
packageManager:
|
|
236
|
+
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
226
237
|
"The JavaScript/TypeScript package manager used by the repository"
|
|
227
238
|
),
|
|
228
|
-
timezone:
|
|
229
|
-
locale:
|
|
230
|
-
logLevel:
|
|
239
|
+
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
240
|
+
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
241
|
+
logLevel: z.enum([
|
|
231
242
|
"silent",
|
|
232
243
|
"fatal",
|
|
233
244
|
"error",
|
|
@@ -240,17 +251,17 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
240
251
|
]).default("info").describe(
|
|
241
252
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
242
253
|
),
|
|
243
|
-
skipConfigLogging:
|
|
254
|
+
skipConfigLogging: z.boolean().optional().describe(
|
|
244
255
|
"Should the logging of the current Storm Workspace configuration be skipped?"
|
|
245
256
|
),
|
|
246
257
|
registry: RegistryConfigSchema,
|
|
247
|
-
configFile:
|
|
258
|
+
configFile: z.string().trim().nullable().default(null).describe(
|
|
248
259
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
249
260
|
),
|
|
250
261
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
251
262
|
"Storm theme config values used for styling various package elements"
|
|
252
263
|
),
|
|
253
|
-
extensions:
|
|
264
|
+
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
254
265
|
}).describe(
|
|
255
266
|
"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."
|
|
256
267
|
);
|
package/dist/clean.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWW7H6NZJcjs = require('./chunk-WW7H6NZJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.clean =
|
|
8
|
+
exports.clean = _chunkWW7H6NZJcjs.clean; exports.cleanDirectories = _chunkWW7H6NZJcjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkU3UZHGC6cjs = require('./chunk-U3UZHGC6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkWW7H6NZJcjs = require('./chunk-WW7H6NZJ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunk65E5RX7Icjs = require('./chunk-65E5RX7I.cjs');
|
|
@@ -16,4 +16,4 @@ require('./chunk-ZBPRDZS4.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.DEFAULT_BUILD_OPTIONS = _chunk65E5RX7Icjs.DEFAULT_BUILD_OPTIONS; exports.build =
|
|
19
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunk65E5RX7Icjs.DEFAULT_BUILD_OPTIONS; exports.build = _chunkU3UZHGC6cjs.build; exports.clean = _chunkWW7H6NZJcjs.clean; exports.cleanDirectories = _chunkWW7H6NZJcjs.cleanDirectories; exports.cleanOutputPath = _chunkU3UZHGC6cjs.cleanOutputPath;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KSTZB6IE.js";
|
|
5
5
|
import {
|
|
6
6
|
clean,
|
|
7
7
|
cleanDirectories
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Q7MTTNCZ.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_BUILD_OPTIONS
|
|
11
11
|
} from "./chunk-2YE3GBQH.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/tsdown",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `tsdown` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -149,9 +149,9 @@
|
|
|
149
149
|
"tsdown": { "optional": false }
|
|
150
150
|
},
|
|
151
151
|
"dependencies": {
|
|
152
|
-
"@storm-software/build-tools": "^0.151.
|
|
153
|
-
"@storm-software/config": "^1.
|
|
154
|
-
"@storm-software/config-tools": "^1.
|
|
152
|
+
"@storm-software/build-tools": "^0.151.9",
|
|
153
|
+
"@storm-software/config": "^1.123.2",
|
|
154
|
+
"@storm-software/config-tools": "^1.174.1",
|
|
155
155
|
"chokidar": "^4.0.3",
|
|
156
156
|
"commander": "^12.1.0",
|
|
157
157
|
"es-toolkit": "^1.39.3",
|