@storm-software/build-tools 0.151.7 → 0.151.8
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/{chunk-MKL5Y27F.mjs → chunk-3Z3XGHR2.mjs} +12 -1
- package/dist/{chunk-UIODWJMU.js → chunk-77VWOMEL.js} +10 -10
- package/dist/{chunk-J6WEWRXQ.js → chunk-BGIPYCLA.js} +12 -1
- package/dist/{chunk-2JOIQLII.js → chunk-CMTNPFIF.js} +77 -45
- package/dist/{chunk-YKHCDDKA.mjs → chunk-G473ISDX.mjs} +1 -1
- package/dist/{chunk-TN2GANQN.js → chunk-HDBGACMY.js} +8 -8
- package/dist/{chunk-SEERZ2JR.mjs → chunk-HXOL4XNP.mjs} +1 -1
- package/dist/{chunk-SK2HHQ74.js → chunk-LXDS235I.js} +8 -8
- package/dist/{chunk-6Y3B4IWQ.js → chunk-NTFTBMMV.js} +2 -2
- package/dist/{chunk-NS4C45JM.mjs → chunk-PW2E4KBD.mjs} +1 -1
- package/dist/{chunk-APEVCDWC.mjs → chunk-WHADZWHO.mjs} +35 -3
- package/dist/{chunk-EYW3TTNG.mjs → chunk-ZDJWHRO7.mjs} +1 -1
- package/dist/{chunk-JAKX4BFP.mjs → chunk-ZPVBBSRY.mjs} +1 -1
- package/dist/{chunk-UHSZT2UP.js → chunk-ZQA63YFS.js} +9 -9
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/plugins/analyze.js +3 -3
- package/dist/plugins/analyze.mjs +2 -2
- package/dist/plugins/index.js +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/plugins/ts-resolve.js +3 -3
- package/dist/plugins/ts-resolve.mjs +2 -2
- package/dist/{types-BUGkxiRi.d.mts → types-BTxn49UW.d.mts} +33 -3
- package/dist/{types-BUGkxiRi.d.ts → types-BTxn49UW.d.ts} +33 -3
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utilities/copy-assets.d.mts +1 -1
- package/dist/utilities/copy-assets.d.ts +1 -1
- package/dist/utilities/copy-assets.js +3 -3
- package/dist/utilities/copy-assets.mjs +2 -2
- package/dist/utilities/generate-package-json.d.mts +1 -1
- package/dist/utilities/generate-package-json.d.ts +1 -1
- package/dist/utilities/generate-package-json.js +3 -3
- package/dist/utilities/generate-package-json.mjs +2 -2
- package/dist/utilities/get-entry-points.d.mts +1 -1
- package/dist/utilities/get-entry-points.d.ts +1 -1
- package/dist/utilities/get-entry-points.js +3 -3
- package/dist/utilities/get-entry-points.mjs +2 -2
- package/dist/utilities/get-env.d.mts +1 -1
- package/dist/utilities/get-env.d.ts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +6 -6
- package/dist/utilities/index.mjs +5 -5
- package/dist/utilities/read-nx-config.js +3 -3
- package/dist/utilities/read-nx-config.mjs +2 -2
- package/package.json +1 -1
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 -->
|
|
@@ -406,6 +406,15 @@ var errorConfigSchema = z.object({
|
|
|
406
406
|
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
407
407
|
)
|
|
408
408
|
}).describe("The workspace's error config used during the error process");
|
|
409
|
+
var organizationConfigSchema = z.object({
|
|
410
|
+
name: z.string().trim().describe("The name of the organization"),
|
|
411
|
+
description: z.string().trim().optional().describe("A description of the organization"),
|
|
412
|
+
logo: z.string().trim().url().optional().describe("A URL to the organization's logo image"),
|
|
413
|
+
icon: z.string().trim().url().optional().describe("A URL to the organization's icon image"),
|
|
414
|
+
url: z.string().trim().url().optional().describe(
|
|
415
|
+
"A URL to a page that provides more information about the organization"
|
|
416
|
+
)
|
|
417
|
+
}).describe("The workspace's organization details");
|
|
409
418
|
var stormWorkspaceConfigSchema = z.object({
|
|
410
419
|
$schema: z.string().trim().default(
|
|
411
420
|
"https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
|
|
@@ -417,7 +426,9 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
417
426
|
"The name of the service/package/scope using this configuration"
|
|
418
427
|
),
|
|
419
428
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
420
|
-
organization: z.string().trim().
|
|
429
|
+
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
430
|
+
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
431
|
+
),
|
|
421
432
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
422
433
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
423
434
|
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBGIPYCLAjs = require('./chunk-BGIPYCLA.js');
|
|
6
6
|
|
|
7
7
|
// src/utilities/generate-package-json.ts
|
|
8
8
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
@@ -42,7 +42,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
42
42
|
)) {
|
|
43
43
|
const projectNode = project.node;
|
|
44
44
|
if (projectNode.data.root) {
|
|
45
|
-
const projectPackageJsonPath =
|
|
45
|
+
const projectPackageJsonPath = _chunkBGIPYCLAjs.joinPaths.call(void 0,
|
|
46
46
|
workspaceRoot,
|
|
47
47
|
projectNode.data.root,
|
|
48
48
|
"package.json"
|
|
@@ -60,11 +60,11 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
if (localPackages.length > 0) {
|
|
63
|
-
|
|
63
|
+
_chunkBGIPYCLAjs.writeTrace.call(void 0,
|
|
64
64
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
65
65
|
);
|
|
66
66
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
67
|
-
|
|
67
|
+
_chunkBGIPYCLAjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
68
68
|
"utf8"
|
|
69
69
|
);
|
|
70
70
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -77,7 +77,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
77
77
|
}
|
|
78
78
|
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) => {
|
|
79
79
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
80
|
-
const depPackageJsonPath =
|
|
80
|
+
const depPackageJsonPath = _chunkBGIPYCLAjs.joinPaths.call(void 0,
|
|
81
81
|
workspaceRoot,
|
|
82
82
|
projectConfigurations.projects[dep].root,
|
|
83
83
|
"package.json"
|
|
@@ -108,14 +108,14 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
108
108
|
return ret;
|
|
109
109
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
110
110
|
} else {
|
|
111
|
-
|
|
111
|
+
_chunkBGIPYCLAjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
112
112
|
}
|
|
113
113
|
return packageJson;
|
|
114
114
|
};
|
|
115
115
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
116
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
116
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkBGIPYCLAjs.findWorkspaceRoot.call(void 0, );
|
|
117
117
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
118
|
-
|
|
118
|
+
_chunkBGIPYCLAjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
119
119
|
"utf8"
|
|
120
120
|
);
|
|
121
121
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -126,7 +126,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
126
126
|
if (distSrc.startsWith("/")) {
|
|
127
127
|
distSrc = distSrc.substring(1);
|
|
128
128
|
}
|
|
129
|
-
packageJson.source ??= `${
|
|
129
|
+
packageJson.source ??= `${_chunkBGIPYCLAjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
130
130
|
}
|
|
131
131
|
packageJson.files ??= ["dist/**/*"];
|
|
132
132
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -151,7 +151,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
151
151
|
packageJson.contributors = [packageJson.author];
|
|
152
152
|
}
|
|
153
153
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
154
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
154
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkBGIPYCLAjs.joinPaths.call(void 0, "packages", projectName);
|
|
155
155
|
return packageJson;
|
|
156
156
|
};
|
|
157
157
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -406,6 +406,15 @@ var errorConfigSchema = _zod2.default.object({
|
|
|
406
406
|
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
407
407
|
)
|
|
408
408
|
}).describe("The workspace's error config used during the error process");
|
|
409
|
+
var organizationConfigSchema = _zod2.default.object({
|
|
410
|
+
name: _zod2.default.string().trim().describe("The name of the organization"),
|
|
411
|
+
description: _zod2.default.string().trim().optional().describe("A description of the organization"),
|
|
412
|
+
logo: _zod2.default.string().trim().url().optional().describe("A URL to the organization's logo image"),
|
|
413
|
+
icon: _zod2.default.string().trim().url().optional().describe("A URL to the organization's icon image"),
|
|
414
|
+
url: _zod2.default.string().trim().url().optional().describe(
|
|
415
|
+
"A URL to a page that provides more information about the organization"
|
|
416
|
+
)
|
|
417
|
+
}).describe("The workspace's organization details");
|
|
409
418
|
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
410
419
|
$schema: _zod2.default.string().trim().default(
|
|
411
420
|
"https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
|
|
@@ -417,7 +426,9 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
417
426
|
"The name of the service/package/scope using this configuration"
|
|
418
427
|
),
|
|
419
428
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
420
|
-
organization: _zod2.default.string().trim().
|
|
429
|
+
organization: organizationConfigSchema.or(_zod2.default.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
430
|
+
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
431
|
+
),
|
|
421
432
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
422
433
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
423
434
|
homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkBGIPYCLAjs = require('./chunk-BGIPYCLA.js');
|
|
19
19
|
|
|
20
20
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
21
21
|
var _c12 = require('c12');
|
|
22
22
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
23
23
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
24
|
-
const workspacePath = filePath ||
|
|
24
|
+
const workspacePath = filePath || _chunkBGIPYCLAjs.findWorkspaceRoot.call(void 0, filePath);
|
|
25
25
|
const configs = await Promise.all([
|
|
26
26
|
_c12.loadConfig.call(void 0, {
|
|
27
27
|
cwd: workspacePath,
|
|
@@ -30,7 +30,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
30
30
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
31
31
|
jitiOptions: {
|
|
32
32
|
debug: false,
|
|
33
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
33
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkBGIPYCLAjs.joinPaths.call(void 0,
|
|
34
34
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
35
35
|
"jiti"
|
|
36
36
|
)
|
|
@@ -44,7 +44,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
44
44
|
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
45
45
|
jitiOptions: {
|
|
46
46
|
debug: false,
|
|
47
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
47
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkBGIPYCLAjs.joinPaths.call(void 0,
|
|
48
48
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
49
49
|
"jiti"
|
|
50
50
|
)
|
|
@@ -56,12 +56,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
56
56
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
57
57
|
};
|
|
58
58
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
59
|
-
const workspacePath = filePath ? filePath :
|
|
59
|
+
const workspacePath = filePath ? filePath : _chunkBGIPYCLAjs.findWorkspaceRoot.call(void 0, filePath);
|
|
60
60
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
61
61
|
let config = result.config;
|
|
62
62
|
const configFile = result.configFile;
|
|
63
63
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
64
|
-
|
|
64
|
+
_chunkBGIPYCLAjs.writeTrace.call(void 0,
|
|
65
65
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
66
66
|
{
|
|
67
67
|
logLevel: "all"
|
|
@@ -77,7 +77,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
77
77
|
for (const result2 of results) {
|
|
78
78
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
79
79
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
80
|
-
|
|
80
|
+
_chunkBGIPYCLAjs.writeTrace.call(void 0,
|
|
81
81
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
82
82
|
{
|
|
83
83
|
logLevel: "all"
|
|
@@ -139,7 +139,13 @@ var getConfigEnv = () => {
|
|
|
139
139
|
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
140
140
|
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
141
141
|
},
|
|
142
|
-
organization: process.env[`${prefix}ORGANIZATION`] ||
|
|
142
|
+
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`] ? {
|
|
143
|
+
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
144
|
+
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
145
|
+
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
146
|
+
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
147
|
+
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
148
|
+
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
143
149
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
144
150
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
145
151
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
@@ -150,15 +156,15 @@ var getConfigEnv = () => {
|
|
|
150
156
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
151
157
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
152
158
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
153
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
154
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
159
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
160
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
155
161
|
directories: {
|
|
156
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
157
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
158
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
159
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
160
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
161
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
162
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
163
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
164
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
165
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
166
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
167
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkBGIPYCLAjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
162
168
|
},
|
|
163
169
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
164
170
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -183,13 +189,13 @@ var getConfigEnv = () => {
|
|
|
183
189
|
},
|
|
184
190
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
185
191
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
186
|
-
) ?
|
|
192
|
+
) ? _chunkBGIPYCLAjs.getLogLevelLabel.call(void 0,
|
|
187
193
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
188
194
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
189
195
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
190
196
|
};
|
|
191
197
|
const themeNames = Object.keys(process.env).filter(
|
|
192
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
198
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkBGIPYCLAjs.COLOR_KEYS.every(
|
|
193
199
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
194
200
|
)
|
|
195
201
|
);
|
|
@@ -200,16 +206,16 @@ var getConfigEnv = () => {
|
|
|
200
206
|
},
|
|
201
207
|
{}
|
|
202
208
|
) : getThemeColorConfigEnv(prefix);
|
|
203
|
-
if (config.docs ===
|
|
204
|
-
if (config.homepage ===
|
|
205
|
-
config.docs = `${
|
|
209
|
+
if (config.docs === _chunkBGIPYCLAjs.STORM_DEFAULT_DOCS) {
|
|
210
|
+
if (config.homepage === _chunkBGIPYCLAjs.STORM_DEFAULT_HOMEPAGE) {
|
|
211
|
+
config.docs = `${_chunkBGIPYCLAjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
206
212
|
} else {
|
|
207
213
|
config.docs = `${config.homepage}/docs`;
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
|
-
if (config.licensing ===
|
|
211
|
-
if (config.homepage ===
|
|
212
|
-
config.licensing = `${
|
|
216
|
+
if (config.licensing === _chunkBGIPYCLAjs.STORM_DEFAULT_LICENSING) {
|
|
217
|
+
if (config.homepage === _chunkBGIPYCLAjs.STORM_DEFAULT_HOMEPAGE) {
|
|
218
|
+
config.licensing = `${_chunkBGIPYCLAjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
213
219
|
} else {
|
|
214
220
|
config.licensing = `${config.homepage}/docs`;
|
|
215
221
|
}
|
|
@@ -346,7 +352,33 @@ var setConfigEnv = (config) => {
|
|
|
346
352
|
}
|
|
347
353
|
}
|
|
348
354
|
if (config.organization) {
|
|
349
|
-
|
|
355
|
+
if (typeof config.organization === "string") {
|
|
356
|
+
process.env[`${prefix}ORG`] = config.organization;
|
|
357
|
+
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
358
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
359
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
360
|
+
} else {
|
|
361
|
+
process.env[`${prefix}ORG`] = config.organization.name;
|
|
362
|
+
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
363
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
364
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
365
|
+
if (config.organization.url) {
|
|
366
|
+
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
367
|
+
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
368
|
+
}
|
|
369
|
+
if (config.organization.description) {
|
|
370
|
+
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
371
|
+
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
372
|
+
}
|
|
373
|
+
if (config.organization.logo) {
|
|
374
|
+
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
375
|
+
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
376
|
+
}
|
|
377
|
+
if (config.organization.icon) {
|
|
378
|
+
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
379
|
+
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
350
382
|
}
|
|
351
383
|
if (config.packageManager) {
|
|
352
384
|
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
@@ -384,40 +416,40 @@ var setConfigEnv = (config) => {
|
|
|
384
416
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
385
417
|
}
|
|
386
418
|
if (config.configFile) {
|
|
387
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
419
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.configFile);
|
|
388
420
|
}
|
|
389
421
|
if (config.workspaceRoot) {
|
|
390
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
391
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
392
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
422
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
423
|
+
process.env.NX_WORKSPACE_ROOT = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
424
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
393
425
|
}
|
|
394
426
|
if (config.directories) {
|
|
395
427
|
if (!config.skipCache && config.directories.cache) {
|
|
396
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
428
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkBGIPYCLAjs.correctPaths.call(void 0,
|
|
397
429
|
config.directories.cache
|
|
398
430
|
);
|
|
399
431
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
400
432
|
}
|
|
401
433
|
if (config.directories.data) {
|
|
402
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
434
|
+
process.env[`${prefix}DATA_DIR`] = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.directories.data);
|
|
403
435
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
404
436
|
}
|
|
405
437
|
if (config.directories.config) {
|
|
406
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
438
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkBGIPYCLAjs.correctPaths.call(void 0,
|
|
407
439
|
config.directories.config
|
|
408
440
|
);
|
|
409
441
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
410
442
|
}
|
|
411
443
|
if (config.directories.temp) {
|
|
412
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
444
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.directories.temp);
|
|
413
445
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
414
446
|
}
|
|
415
447
|
if (config.directories.log) {
|
|
416
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
448
|
+
process.env[`${prefix}LOG_DIR`] = _chunkBGIPYCLAjs.correctPaths.call(void 0, config.directories.log);
|
|
417
449
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
418
450
|
}
|
|
419
451
|
if (config.directories.build) {
|
|
420
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
452
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkBGIPYCLAjs.correctPaths.call(void 0,
|
|
421
453
|
config.directories.build
|
|
422
454
|
);
|
|
423
455
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -484,9 +516,9 @@ var setConfigEnv = (config) => {
|
|
|
484
516
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
485
517
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
486
518
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
487
|
-
|
|
519
|
+
_chunkBGIPYCLAjs.getLogLevel.call(void 0, config.logLevel) >= _chunkBGIPYCLAjs.LogLevel.DEBUG ? true : false
|
|
488
520
|
);
|
|
489
|
-
process.env.RUST_BACKTRACE =
|
|
521
|
+
process.env.RUST_BACKTRACE = _chunkBGIPYCLAjs.getLogLevel.call(void 0, config.logLevel) >= _chunkBGIPYCLAjs.LogLevel.DEBUG ? "full" : "none";
|
|
490
522
|
}
|
|
491
523
|
if (config.skipConfigLogging !== void 0) {
|
|
492
524
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -606,13 +638,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
606
638
|
if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
607
639
|
let _workspaceRoot = workspaceRoot;
|
|
608
640
|
if (!_workspaceRoot) {
|
|
609
|
-
_workspaceRoot =
|
|
641
|
+
_workspaceRoot = _chunkBGIPYCLAjs.findWorkspaceRoot.call(void 0, );
|
|
610
642
|
}
|
|
611
643
|
const configEnv = getConfigEnv();
|
|
612
644
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
613
645
|
if (!configFile) {
|
|
614
646
|
if (!skipLogs) {
|
|
615
|
-
|
|
647
|
+
_chunkBGIPYCLAjs.writeWarning.call(void 0,
|
|
616
648
|
"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",
|
|
617
649
|
{ logLevel: "all" }
|
|
618
650
|
);
|
|
@@ -621,9 +653,9 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
621
653
|
return void 0;
|
|
622
654
|
}
|
|
623
655
|
}
|
|
624
|
-
const defaultConfig = await
|
|
625
|
-
result =
|
|
626
|
-
await
|
|
656
|
+
const defaultConfig = await _chunkBGIPYCLAjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
657
|
+
result = _chunkBGIPYCLAjs.applyDefaultConfig.call(void 0,
|
|
658
|
+
await _chunkBGIPYCLAjs.stormWorkspaceConfigSchema.parseAsync(
|
|
627
659
|
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
628
660
|
)
|
|
629
661
|
);
|
|
@@ -665,9 +697,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
665
697
|
);
|
|
666
698
|
setConfigEnv(config);
|
|
667
699
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
668
|
-
|
|
700
|
+
_chunkBGIPYCLAjs.writeTrace.call(void 0,
|
|
669
701
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
670
|
-
${
|
|
702
|
+
${_chunkBGIPYCLAjs.formatLogMessage.call(void 0, config)}`,
|
|
671
703
|
config
|
|
672
704
|
);
|
|
673
705
|
}
|
|
@@ -688,7 +720,7 @@ var readNxConfig = async (workspaceRoot) => {
|
|
|
688
720
|
const config = await getConfig();
|
|
689
721
|
rootDir = config.workspaceRoot;
|
|
690
722
|
}
|
|
691
|
-
const nxJsonPath =
|
|
723
|
+
const nxJsonPath = _chunkBGIPYCLAjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
692
724
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
693
725
|
throw new Error("Cannot find project.json configuration");
|
|
694
726
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBGIPYCLAjs = require('./chunk-BGIPYCLA.js');
|
|
7
7
|
|
|
8
8
|
// src/utilities/get-entry-points.ts
|
|
9
9
|
var _glob = require('glob');
|
|
10
10
|
var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
11
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
11
|
+
const workspaceRoot = config.workspaceRoot || _chunkBGIPYCLAjs.findWorkspaceRoot.call(void 0, );
|
|
12
12
|
const entryPoints = [];
|
|
13
13
|
if (entry) {
|
|
14
14
|
if (typeof entry === "string") {
|
|
@@ -21,7 +21,7 @@ var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll =
|
|
|
21
21
|
}
|
|
22
22
|
if (emitOnAll) {
|
|
23
23
|
entryPoints.push(
|
|
24
|
-
|
|
24
|
+
_chunkBGIPYCLAjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}")
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
const results = await Promise.all(
|
|
@@ -34,12 +34,12 @@ var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll =
|
|
|
34
34
|
});
|
|
35
35
|
paths.push(
|
|
36
36
|
...files.reduce((ret, filePath) => {
|
|
37
|
-
const result =
|
|
38
|
-
|
|
37
|
+
const result = _chunkBGIPYCLAjs.correctPaths.call(void 0,
|
|
38
|
+
_chunkBGIPYCLAjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkBGIPYCLAjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkBGIPYCLAjs.correctPaths.call(void 0, projectRoot), "")
|
|
39
39
|
);
|
|
40
40
|
if (result) {
|
|
41
|
-
|
|
42
|
-
`Trying to add entry point ${result} at "${
|
|
41
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0,
|
|
42
|
+
`Trying to add entry point ${result} at "${_chunkBGIPYCLAjs.joinPaths.call(void 0,
|
|
43
43
|
filePath.path,
|
|
44
44
|
filePath.name
|
|
45
45
|
)}"`,
|
|
@@ -53,7 +53,7 @@ var getEntryPoints = async (config, projectRoot, sourceRoot, entry, emitOnAll =
|
|
|
53
53
|
}, [])
|
|
54
54
|
);
|
|
55
55
|
} else {
|
|
56
|
-
|
|
56
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
57
57
|
if (!paths.includes(entryPoint)) {
|
|
58
58
|
paths.push(entryPoint);
|
|
59
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBGIPYCLAjs = require('./chunk-BGIPYCLA.js');
|
|
4
4
|
|
|
5
5
|
// src/plugins/ts-resolve.ts
|
|
6
6
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -26,8 +26,8 @@ var tsResolvePlugin = ({
|
|
|
26
26
|
return {
|
|
27
27
|
name: `storm:ts-resolve`,
|
|
28
28
|
async resolveId(source, importer) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
|
|
30
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
|
|
31
31
|
if (!importer) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
@@ -38,7 +38,7 @@ var tsResolvePlugin = ({
|
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
40
|
if (ignore && ignore(source, importer)) {
|
|
41
|
-
|
|
41
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
if (resolveOnly) {
|
|
@@ -47,12 +47,12 @@ var tsResolvePlugin = ({
|
|
|
47
47
|
return v.test(source);
|
|
48
48
|
});
|
|
49
49
|
if (!shouldResolve) {
|
|
50
|
-
|
|
50
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
if (_path2.default.isAbsolute(source)) {
|
|
55
|
-
|
|
55
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
const basedir = importer ? await _fs2.default.promises.realpath(_path2.default.dirname(importer)) : process.cwd();
|
|
@@ -81,10 +81,10 @@ var tsResolvePlugin = ({
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
if (id) {
|
|
84
|
-
|
|
84
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
|
|
85
85
|
return id;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
_chunkBGIPYCLAjs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
|
|
88
88
|
return false;
|
|
89
89
|
}
|
|
90
90
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBGIPYCLAjs = require('./chunk-BGIPYCLA.js');
|
|
4
4
|
|
|
5
5
|
// src/plugins/analyze.ts
|
|
6
6
|
var formatBytes = (bytes) => {
|
|
@@ -22,7 +22,7 @@ function analyze() {
|
|
|
22
22
|
renderChunk(source, chunk) {
|
|
23
23
|
const sourceBytes = formatBytes(source.length);
|
|
24
24
|
const fileName = chunk.fileName;
|
|
25
|
-
|
|
25
|
+
_chunkBGIPYCLAjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|