@storm-software/esbuild 0.45.33 → 0.45.35
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/assets.cjs +4 -4
- package/dist/assets.js +3 -3
- package/dist/build.cjs +11 -11
- package/dist/build.js +10 -10
- package/dist/{chunk-GD76CWEA.js → chunk-2AWVC6X5.js} +2 -2
- package/dist/{chunk-GXQJB55J.js → chunk-4FXR6W7A.js} +1 -1
- package/dist/{chunk-XJWGSNJT.cjs → chunk-4NRTYAXV.cjs} +10 -10
- package/dist/{chunk-OFR366KG.js → chunk-743OULVJ.js} +3 -3
- package/dist/{chunk-37AHB5O4.js → chunk-BHTSZ3OC.js} +15 -14
- package/dist/{chunk-AY3HKJHF.cjs → chunk-EUNN7CTQ.cjs} +3 -3
- package/dist/{chunk-ZCPQOG5F.cjs → chunk-GEBGKMNA.cjs} +3 -3
- package/dist/{chunk-ILOWHFBJ.cjs → chunk-I25COYDM.cjs} +5 -5
- package/dist/{chunk-G4GM4MVC.js → chunk-IHYQAKT7.js} +1 -1
- package/dist/{chunk-TQSJDD34.cjs → chunk-JVGDWPWJ.cjs} +30 -30
- package/dist/{chunk-DSYWIV63.js → chunk-LGJYDWSE.js} +1 -1
- package/dist/{chunk-AG65ZUF3.cjs → chunk-MYPKJND6.cjs} +22 -22
- package/dist/{chunk-WHHFV6RT.js → chunk-NCEGAKDE.js} +1 -1
- package/dist/{chunk-A4AI2XWS.js → chunk-NNGDKSC6.js} +1 -1
- package/dist/{chunk-JI6XIWB6.cjs → chunk-PG4QLVGR.cjs} +6 -6
- package/dist/{chunk-U5CERGWL.cjs → chunk-T267QVFT.cjs} +3 -3
- package/dist/{chunk-KF7YYFOX.cjs → chunk-UUNKOIQ6.cjs} +15 -14
- package/dist/{chunk-SSJELIR6.js → chunk-WSFMEQU5.js} +7 -7
- package/dist/{chunk-XEBZEDDJ.js → chunk-ZBQJCJM4.js} +2 -2
- package/dist/{chunk-5ZQGVLPO.cjs → chunk-ZRBA3CSO.cjs} +3 -3
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/config.cjs +4 -4
- package/dist/config.js +3 -3
- package/dist/context.cjs +5 -5
- package/dist/context.js +4 -4
- package/dist/index.cjs +11 -11
- package/dist/index.js +10 -10
- package/dist/package-json.cjs +4 -4
- package/dist/package-json.js +3 -3
- package/dist/plugins/deps-check.cjs +3 -3
- package/dist/plugins/deps-check.js +2 -2
- package/dist/tsup.cjs +3 -3
- package/dist/tsup.js +2 -2
- package/dist/watch.cjs +3 -3
- package/dist/watch.js +1 -1
- package/package.json +5 -5
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/assets.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkI25COYDMcjs = require('./chunk-I25COYDM.cjs');
|
|
4
|
+
require('./chunk-JVGDWPWJ.cjs');
|
|
5
|
+
require('./chunk-UUNKOIQ6.cjs');
|
|
6
6
|
require('./chunk-REAX6FSO.cjs');
|
|
7
7
|
require('./chunk-4ICWACJM.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.copyBuildAssets =
|
|
10
|
+
exports.copyBuildAssets = _chunkI25COYDMcjs.copyBuildAssets;
|
package/dist/assets.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyBuildAssets
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2AWVC6X5.js";
|
|
4
|
+
import "./chunk-IHYQAKT7.js";
|
|
5
|
+
import "./chunk-BHTSZ3OC.js";
|
|
6
6
|
import "./chunk-A7I6K5HC.js";
|
|
7
7
|
import "./chunk-GL7N7ANS.js";
|
|
8
8
|
export {
|
package/dist/build.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
3
|
+
var _chunkMYPKJND6cjs = require('./chunk-MYPKJND6.cjs');
|
|
4
|
+
require('./chunk-EUNN7CTQ.cjs');
|
|
5
|
+
require('./chunk-I25COYDM.cjs');
|
|
6
|
+
require('./chunk-GEBGKMNA.cjs');
|
|
7
|
+
require('./chunk-4NRTYAXV.cjs');
|
|
8
|
+
require('./chunk-ZRBA3CSO.cjs');
|
|
9
|
+
require('./chunk-PG4QLVGR.cjs');
|
|
10
|
+
require('./chunk-JVGDWPWJ.cjs');
|
|
11
|
+
require('./chunk-T267QVFT.cjs');
|
|
12
|
+
require('./chunk-UUNKOIQ6.cjs');
|
|
13
13
|
require('./chunk-REAX6FSO.cjs');
|
|
14
14
|
require('./chunk-4ICWACJM.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.build =
|
|
17
|
+
exports.build = _chunkMYPKJND6cjs.build;
|
package/dist/build.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WSFMEQU5.js";
|
|
4
|
+
import "./chunk-LGJYDWSE.js";
|
|
5
|
+
import "./chunk-2AWVC6X5.js";
|
|
6
|
+
import "./chunk-4FXR6W7A.js";
|
|
7
|
+
import "./chunk-743OULVJ.js";
|
|
8
|
+
import "./chunk-NCEGAKDE.js";
|
|
9
|
+
import "./chunk-ZBQJCJM4.js";
|
|
10
|
+
import "./chunk-IHYQAKT7.js";
|
|
11
|
+
import "./chunk-NNGDKSC6.js";
|
|
12
|
+
import "./chunk-BHTSZ3OC.js";
|
|
13
13
|
import "./chunk-A7I6K5HC.js";
|
|
14
14
|
import "./chunk-GL7N7ANS.js";
|
|
15
15
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZRBA3CSOcjs = require('./chunk-ZRBA3CSO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkJVGDWPWJcjs = require('./chunk-JVGDWPWJ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkUUNKOIQ6cjs = require('./chunk-UUNKOIQ6.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkREAX6FSOcjs = require('./chunk-REAX6FSO.cjs');
|
|
@@ -33,11 +33,11 @@ async function resolveContext(userOptions) {
|
|
|
33
33
|
if (!workspaceRoot) {
|
|
34
34
|
throw new Error("Cannot find Nx workspace root");
|
|
35
35
|
}
|
|
36
|
-
const workspaceConfig = await
|
|
36
|
+
const workspaceConfig = await _chunkJVGDWPWJcjs.getWorkspaceConfig.call(void 0, true, {
|
|
37
37
|
workspaceRoot: workspaceRoot.dir
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
39
|
+
_chunkUUNKOIQ6cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
40
|
+
const stopwatch = _chunkUUNKOIQ6cjs.getStopwatch.call(void 0, "Build options resolution");
|
|
41
41
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
42
42
|
exitOnError: true
|
|
43
43
|
});
|
|
@@ -58,7 +58,7 @@ async function resolveContext(userOptions) {
|
|
|
58
58
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
61
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkZRBA3CSOcjs.DEFAULT_BUILD_OPTIONS);
|
|
62
62
|
options.name ??= projectName;
|
|
63
63
|
const packageJsonPath = _chunkREAX6FSOcjs.joinPaths.call(void 0,
|
|
64
64
|
workspaceRoot.dir,
|
|
@@ -68,7 +68,7 @@ async function resolveContext(userOptions) {
|
|
|
68
68
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
69
69
|
throw new Error("Cannot find package.json configuration");
|
|
70
70
|
}
|
|
71
|
-
const env =
|
|
71
|
+
const env = _chunkJVGDWPWJcjs.getEnv.call(void 0, "esbuild", options);
|
|
72
72
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
73
73
|
const resolvedOptions = {
|
|
74
74
|
...options,
|
|
@@ -107,10 +107,10 @@ async function resolveContext(userOptions) {
|
|
|
107
107
|
};
|
|
108
108
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
109
109
|
if (context.options.verbose) {
|
|
110
|
-
|
|
110
|
+
_chunkUUNKOIQ6cjs.writeDebug.call(void 0,
|
|
111
111
|
` \u2699\uFE0F Build options resolved:
|
|
112
112
|
|
|
113
|
-
${
|
|
113
|
+
${_chunkUUNKOIQ6cjs.formatLogMessage.call(void 0, context.options)}`,
|
|
114
114
|
workspaceConfig
|
|
115
115
|
);
|
|
116
116
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BUILD_OPTIONS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NCEGAKDE.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnv,
|
|
6
6
|
getWorkspaceConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IHYQAKT7.js";
|
|
8
8
|
import {
|
|
9
9
|
formatLogMessage,
|
|
10
10
|
getStopwatch,
|
|
11
11
|
writeDebug
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BHTSZ3OC.js";
|
|
13
13
|
import {
|
|
14
14
|
joinPaths
|
|
15
15
|
} from "./chunk-A7I6K5HC.js";
|
|
@@ -67,7 +67,7 @@ init_esm_shims();
|
|
|
67
67
|
|
|
68
68
|
// ../config/src/schema.ts
|
|
69
69
|
init_esm_shims();
|
|
70
|
-
import * as z from "zod
|
|
70
|
+
import * as z from "zod";
|
|
71
71
|
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");
|
|
72
72
|
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");
|
|
73
73
|
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");
|
|
@@ -134,7 +134,7 @@ var SingleThemeColorConfigSchema = z.object({
|
|
|
134
134
|
positive: PositiveColorSchema,
|
|
135
135
|
negative: NegativeColorSchema
|
|
136
136
|
});
|
|
137
|
-
var RegistryUrlConfigSchema = z.
|
|
137
|
+
var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
138
138
|
var RegistryConfigSchema = z.object({
|
|
139
139
|
github: RegistryUrlConfigSchema,
|
|
140
140
|
npm: RegistryUrlConfigSchema,
|
|
@@ -161,7 +161,7 @@ var WorkspaceBotConfigSchema = z.object({
|
|
|
161
161
|
name: z.string().trim().default("stormie-bot").describe(
|
|
162
162
|
"The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
163
163
|
),
|
|
164
|
-
email: z.
|
|
164
|
+
email: z.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
165
165
|
}).describe(
|
|
166
166
|
"The workspace's bot user's config used to automated various operations tasks"
|
|
167
167
|
);
|
|
@@ -204,19 +204,20 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
204
204
|
);
|
|
205
205
|
var errorConfigSchema = z.object({
|
|
206
206
|
codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
|
|
207
|
-
url: z.
|
|
207
|
+
url: z.url().optional().describe(
|
|
208
208
|
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
209
209
|
)
|
|
210
210
|
}).describe("The workspace's error config used during the error process");
|
|
211
211
|
var organizationConfigSchema = z.object({
|
|
212
212
|
name: z.string().trim().describe("The name of the organization"),
|
|
213
213
|
description: z.string().trim().optional().describe("A description of the organization"),
|
|
214
|
-
logo: z.
|
|
215
|
-
icon: z.
|
|
216
|
-
url: z.
|
|
214
|
+
logo: z.url().optional().describe("A URL to the organization's logo image"),
|
|
215
|
+
icon: z.url().optional().describe("A URL to the organization's icon image"),
|
|
216
|
+
url: z.url().optional().describe(
|
|
217
217
|
"A URL to a page that provides more information about the organization"
|
|
218
218
|
)
|
|
219
219
|
}).describe("The workspace's organization details");
|
|
220
|
+
var MODE_OPTIONS = ["development", "staging", "production"];
|
|
220
221
|
var stormWorkspaceConfigSchema = z.object({
|
|
221
222
|
$schema: z.string().trim().default(
|
|
222
223
|
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
@@ -233,12 +234,12 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
233
234
|
),
|
|
234
235
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
235
236
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
236
|
-
homepage: z.
|
|
237
|
-
docs: z.
|
|
238
|
-
portal: z.
|
|
239
|
-
licensing: z.
|
|
240
|
-
contact: z.
|
|
241
|
-
support: z.
|
|
237
|
+
homepage: z.url().optional().describe("The homepage of the workspace"),
|
|
238
|
+
docs: z.url().optional().describe("The documentation site for the workspace"),
|
|
239
|
+
portal: z.url().optional().describe("The development portal site for the workspace"),
|
|
240
|
+
licensing: z.url().optional().describe("The licensing site for the workspace"),
|
|
241
|
+
contact: z.url().optional().describe("The contact site for the workspace"),
|
|
242
|
+
support: z.url().optional().describe(
|
|
242
243
|
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
243
244
|
),
|
|
244
245
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
@@ -248,7 +249,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
248
249
|
release: WorkspaceReleaseConfigSchema,
|
|
249
250
|
socials: WorkspaceSocialsConfigSchema,
|
|
250
251
|
error: errorConfigSchema,
|
|
251
|
-
mode: z.enum(
|
|
252
|
+
mode: z.enum(MODE_OPTIONS).prefault("production").describe("The current runtime environment mode for the package"),
|
|
252
253
|
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
253
254
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
254
255
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUUNKOIQ6cjs = require('./chunk-UUNKOIQ6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -75,10 +75,10 @@ var depsCheckPlugin = (bundle) => ({
|
|
|
75
75
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
76
76
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
77
77
|
});
|
|
78
|
-
|
|
78
|
+
_chunkUUNKOIQ6cjs.writeWarning.call(void 0,
|
|
79
79
|
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
80
80
|
);
|
|
81
|
-
|
|
81
|
+
_chunkUUNKOIQ6cjs.writeError.call(void 0,
|
|
82
82
|
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
83
83
|
);
|
|
84
84
|
if (filteredMissingDeps.length > 0) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUUNKOIQ6cjs = require('./chunk-UUNKOIQ6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk4ICWACJMcjs = require('./chunk-4ICWACJM.cjs');
|
|
@@ -10,8 +10,8 @@ var _chunk4ICWACJMcjs = require('./chunk-4ICWACJM.cjs');
|
|
|
10
10
|
_chunk4ICWACJMcjs.init_cjs_shims.call(void 0, );
|
|
11
11
|
var _promises = require('fs/promises');
|
|
12
12
|
async function clean(name = "ESBuild", directory, config) {
|
|
13
|
-
|
|
14
|
-
const stopwatch =
|
|
13
|
+
_chunkUUNKOIQ6cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
14
|
+
const stopwatch = _chunkUUNKOIQ6cjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
15
15
|
await cleanDirectories(directory);
|
|
16
16
|
stopwatch();
|
|
17
17
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJVGDWPWJcjs = require('./chunk-JVGDWPWJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkUUNKOIQ6cjs = require('./chunk-UUNKOIQ6.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk4ICWACJMcjs = require('./chunk-4ICWACJM.cjs');
|
|
@@ -13,12 +13,12 @@ var _chunk4ICWACJMcjs = require('./chunk-4ICWACJM.cjs');
|
|
|
13
13
|
_chunk4ICWACJMcjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
async function copyBuildAssets(context) {
|
|
15
15
|
if (!_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) && _optionalChain([context, 'access', _4 => _4.options, 'access', _5 => _5.assets, 'optionalAccess', _6 => _6.length])) {
|
|
16
|
-
|
|
16
|
+
_chunkUUNKOIQ6cjs.writeDebug.call(void 0,
|
|
17
17
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
18
18
|
context.workspaceConfig
|
|
19
19
|
);
|
|
20
|
-
const stopwatch =
|
|
21
|
-
await
|
|
20
|
+
const stopwatch = _chunkUUNKOIQ6cjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
21
|
+
await _chunkJVGDWPWJcjs.copyAssets.call(void 0,
|
|
22
22
|
context.workspaceConfig,
|
|
23
23
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
24
24
|
context.outputPath,
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkUUNKOIQ6cjs = require('./chunk-UUNKOIQ6.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -65,7 +65,7 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
65
65
|
output: "src/"
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0,
|
|
69
69
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
70
70
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkREAX6FSOcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
71
71
|
config
|
|
@@ -77,9 +77,9 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
77
77
|
assets: pendingAssets
|
|
78
78
|
});
|
|
79
79
|
await assetHandler.processAllAssetsOnce();
|
|
80
|
-
|
|
80
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
81
81
|
if (includeSrc === true) {
|
|
82
|
-
|
|
82
|
+
_chunkUUNKOIQ6cjs.writeDebug.call(void 0,
|
|
83
83
|
`\u{1F4DD} Adding banner and writing source files: ${_chunkREAX6FSOcjs.joinPaths.call(void 0,
|
|
84
84
|
outputPath,
|
|
85
85
|
"src"
|
|
@@ -164,7 +164,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
if (localPackages.length > 0) {
|
|
167
|
-
|
|
167
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0,
|
|
168
168
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
169
169
|
);
|
|
170
170
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
@@ -212,12 +212,12 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
212
212
|
return ret;
|
|
213
213
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
214
214
|
} else {
|
|
215
|
-
|
|
215
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
216
216
|
}
|
|
217
217
|
return packageJson;
|
|
218
218
|
};
|
|
219
219
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
220
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
220
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkUUNKOIQ6cjs.findWorkspaceRoot.call(void 0, );
|
|
221
221
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
222
222
|
_chunkREAX6FSOcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
223
223
|
"utf8"
|
|
@@ -271,7 +271,7 @@ _chunk4ICWACJMcjs.init_cjs_shims.call(void 0, );
|
|
|
271
271
|
var _c12 = require('c12');
|
|
272
272
|
|
|
273
273
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
274
|
-
const workspacePath = filePath ||
|
|
274
|
+
const workspacePath = filePath || _chunkUUNKOIQ6cjs.findWorkspaceRoot.call(void 0, filePath);
|
|
275
275
|
const configs = await Promise.all([
|
|
276
276
|
_c12.loadConfig.call(void 0, {
|
|
277
277
|
cwd: workspacePath,
|
|
@@ -306,12 +306,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
306
306
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
307
307
|
};
|
|
308
308
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
309
|
-
const workspacePath = filePath ? filePath :
|
|
309
|
+
const workspacePath = filePath ? filePath : _chunkUUNKOIQ6cjs.findWorkspaceRoot.call(void 0, filePath);
|
|
310
310
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
311
311
|
let config = result.config;
|
|
312
312
|
const configFile = result.configFile;
|
|
313
313
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
314
|
-
|
|
314
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0,
|
|
315
315
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
316
316
|
{
|
|
317
317
|
logLevel: "all"
|
|
@@ -327,7 +327,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
327
327
|
for (const result2 of results) {
|
|
328
328
|
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
329
329
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
330
|
-
|
|
330
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0,
|
|
331
331
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
332
332
|
{
|
|
333
333
|
logLevel: "all"
|
|
@@ -436,13 +436,13 @@ var getConfigEnv = () => {
|
|
|
436
436
|
},
|
|
437
437
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
438
438
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
439
|
-
) ?
|
|
439
|
+
) ? _chunkUUNKOIQ6cjs.getLogLevelLabel.call(void 0,
|
|
440
440
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
441
441
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
442
442
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
443
443
|
};
|
|
444
444
|
const themeNames = Object.keys(process.env).filter(
|
|
445
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
445
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkUUNKOIQ6cjs.COLOR_KEYS.every(
|
|
446
446
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
447
447
|
)
|
|
448
448
|
);
|
|
@@ -453,16 +453,16 @@ var getConfigEnv = () => {
|
|
|
453
453
|
},
|
|
454
454
|
{}
|
|
455
455
|
) : getThemeColorConfigEnv(prefix);
|
|
456
|
-
if (config.docs ===
|
|
457
|
-
if (config.homepage ===
|
|
458
|
-
config.docs = `${
|
|
456
|
+
if (config.docs === _chunkUUNKOIQ6cjs.STORM_DEFAULT_DOCS) {
|
|
457
|
+
if (config.homepage === _chunkUUNKOIQ6cjs.STORM_DEFAULT_HOMEPAGE) {
|
|
458
|
+
config.docs = `${_chunkUUNKOIQ6cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
459
459
|
} else {
|
|
460
460
|
config.docs = `${config.homepage}/docs`;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
if (config.licensing ===
|
|
464
|
-
if (config.homepage ===
|
|
465
|
-
config.licensing = `${
|
|
463
|
+
if (config.licensing === _chunkUUNKOIQ6cjs.STORM_DEFAULT_LICENSING) {
|
|
464
|
+
if (config.homepage === _chunkUUNKOIQ6cjs.STORM_DEFAULT_HOMEPAGE) {
|
|
465
|
+
config.licensing = `${_chunkUUNKOIQ6cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
466
466
|
} else {
|
|
467
467
|
config.licensing = `${config.homepage}/docs`;
|
|
468
468
|
}
|
|
@@ -759,9 +759,9 @@ var setConfigEnv = (config) => {
|
|
|
759
759
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
760
760
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
761
761
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
762
|
-
|
|
762
|
+
_chunkUUNKOIQ6cjs.getLogLevel.call(void 0, config.logLevel) >= _chunkUUNKOIQ6cjs.LogLevel.DEBUG ? true : false
|
|
763
763
|
);
|
|
764
|
-
process.env.RUST_BACKTRACE =
|
|
764
|
+
process.env.RUST_BACKTRACE = _chunkUUNKOIQ6cjs.getLogLevel.call(void 0, config.logLevel) >= _chunkUUNKOIQ6cjs.LogLevel.DEBUG ? "full" : "none";
|
|
765
765
|
}
|
|
766
766
|
if (config.skipConfigLogging !== void 0) {
|
|
767
767
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -881,13 +881,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
881
881
|
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
882
882
|
let _workspaceRoot = workspaceRoot;
|
|
883
883
|
if (!_workspaceRoot) {
|
|
884
|
-
_workspaceRoot =
|
|
884
|
+
_workspaceRoot = _chunkUUNKOIQ6cjs.findWorkspaceRoot.call(void 0, );
|
|
885
885
|
}
|
|
886
886
|
const configEnv = getConfigEnv();
|
|
887
887
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
888
888
|
if (!configFile) {
|
|
889
889
|
if (!skipLogs) {
|
|
890
|
-
|
|
890
|
+
_chunkUUNKOIQ6cjs.writeWarning.call(void 0,
|
|
891
891
|
"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",
|
|
892
892
|
{ logLevel: "all" }
|
|
893
893
|
);
|
|
@@ -896,22 +896,22 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
896
896
|
return void 0;
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
const defaultConfig = await
|
|
899
|
+
const defaultConfig = await _chunkUUNKOIQ6cjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
900
900
|
const configInput = _defu2.default.call(void 0,
|
|
901
901
|
configEnv,
|
|
902
902
|
configFile,
|
|
903
903
|
defaultConfig
|
|
904
904
|
);
|
|
905
905
|
try {
|
|
906
|
-
result =
|
|
907
|
-
await
|
|
906
|
+
result = _chunkUUNKOIQ6cjs.applyDefaultConfig.call(void 0,
|
|
907
|
+
await _chunkUUNKOIQ6cjs.stormWorkspaceConfigSchema.parseAsync(configInput)
|
|
908
908
|
);
|
|
909
909
|
result.workspaceRoot ??= _workspaceRoot;
|
|
910
910
|
} catch (error) {
|
|
911
911
|
throw new Error(
|
|
912
912
|
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _54 => _54.message]) ? `: ${error.message}` : ""}
|
|
913
913
|
|
|
914
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
914
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkUUNKOIQ6cjs.formatLogMessage.call(void 0,
|
|
915
915
|
configInput
|
|
916
916
|
)}`,
|
|
917
917
|
{
|
|
@@ -956,9 +956,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
956
956
|
);
|
|
957
957
|
setConfigEnv(config);
|
|
958
958
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
959
|
-
|
|
959
|
+
_chunkUUNKOIQ6cjs.writeTrace.call(void 0,
|
|
960
960
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
961
|
-
${
|
|
961
|
+
${_chunkUUNKOIQ6cjs.formatLogMessage.call(void 0, config)}`,
|
|
962
962
|
config
|
|
963
963
|
);
|
|
964
964
|
}
|
|
@@ -972,7 +972,7 @@ var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
|
972
972
|
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
973
973
|
let workspaceRoot = options.workspaceRoot;
|
|
974
974
|
if (!workspaceRoot) {
|
|
975
|
-
workspaceRoot =
|
|
975
|
+
workspaceRoot = _chunkUUNKOIQ6cjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
976
976
|
}
|
|
977
977
|
return getConfig(workspaceRoot, skipLogs);
|
|
978
978
|
};
|