@storm-software/esbuild 0.22.1 → 0.22.4
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 +7 -5
- package/dist/build.d.cts +8 -2
- package/dist/build.d.ts +8 -2
- package/dist/build.js +8 -6
- package/dist/{chunk-7N4NGXDE.js → chunk-2STSOOUQ.js} +1 -1
- package/dist/{chunk-57U4XU5O.js → chunk-HXF5CHDH.js} +21 -13
- package/dist/{chunk-V7HJ2CJT.js → chunk-JYZKDIZJ.js} +11 -3
- package/dist/{chunk-XCY6RUA6.js → chunk-RIVOXICH.js} +7 -6
- package/dist/{chunk-CJ3YJPNC.cjs → chunk-U2QMMQDA.cjs} +2 -2
- package/dist/{chunk-UEYUN2J6.cjs → chunk-V747733R.cjs} +11 -3
- package/dist/{chunk-W6IC5BU4.cjs → chunk-YHAEJIC5.cjs} +8 -7
- package/dist/{chunk-MSCC7MGM.cjs → chunk-ZQYP5TTV.cjs} +36 -28
- package/dist/clean.cjs +4 -2
- package/dist/clean.d.cts +19 -11
- package/dist/clean.d.ts +19 -11
- package/dist/clean.js +5 -3
- package/dist/config.cjs +3 -3
- package/dist/config.js +2 -2
- package/dist/index.cjs +9 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -5
- package/dist/plugins/tsc.cjs +2 -2
- package/dist/plugins/tsc.js +1 -1
- package/package.json +4 -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/build.cjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
|
|
4
|
+
var _chunkZQYP5TTVcjs = require('./chunk-ZQYP5TTV.cjs');
|
|
5
|
+
require('./chunk-V747733R.cjs');
|
|
6
|
+
require('./chunk-U2QMMQDA.cjs');
|
|
6
7
|
require('./chunk-S6M44SSZ.cjs');
|
|
7
8
|
require('./chunk-WRBUO7H6.cjs');
|
|
8
9
|
require('./chunk-AP5TC7E5.cjs');
|
|
9
10
|
require('./chunk-5UODOOQA.cjs');
|
|
10
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-YHAEJIC5.cjs');
|
|
11
12
|
require('./chunk-CNHHELK6.cjs');
|
|
12
13
|
require('./chunk-MPZUORUA.cjs');
|
|
13
14
|
require('./chunk-GHWCUMOG.cjs');
|
|
@@ -16,4 +17,5 @@ require('./chunk-EZGTDCYM.cjs');
|
|
|
16
17
|
require('./chunk-BGYQAVKQ.cjs');
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
exports.build = _chunkZQYP5TTVcjs.build; exports.cleanOutputPath = _chunkZQYP5TTVcjs.cleanOutputPath;
|
package/dist/build.d.cts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { ESBuildOptions } from './types.cjs';
|
|
1
|
+
import { ESBuildContext, ESBuildOptions } from './types.cjs';
|
|
2
2
|
import '@nx/devkit';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
4
|
import 'esbuild';
|
|
5
5
|
import 'rollup';
|
|
6
6
|
import 'source-map';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Clean the output path
|
|
10
|
+
*
|
|
11
|
+
* @param context - the build context
|
|
12
|
+
*/
|
|
13
|
+
declare function cleanOutputPath(context: ESBuildContext): Promise<ESBuildContext>;
|
|
8
14
|
/**
|
|
9
15
|
* Execution pipeline that applies a set of actions
|
|
10
16
|
*
|
|
@@ -13,4 +19,4 @@ import 'source-map';
|
|
|
13
19
|
*/
|
|
14
20
|
declare function build(options: ESBuildOptions | ESBuildOptions[]): Promise<void>;
|
|
15
21
|
|
|
16
|
-
export { build };
|
|
22
|
+
export { build, cleanOutputPath };
|
package/dist/build.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { ESBuildOptions } from './types.js';
|
|
1
|
+
import { ESBuildContext, ESBuildOptions } from './types.js';
|
|
2
2
|
import '@nx/devkit';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
4
|
import 'esbuild';
|
|
5
5
|
import 'rollup';
|
|
6
6
|
import 'source-map';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Clean the output path
|
|
10
|
+
*
|
|
11
|
+
* @param context - the build context
|
|
12
|
+
*/
|
|
13
|
+
declare function cleanOutputPath(context: ESBuildContext): Promise<ESBuildContext>;
|
|
8
14
|
/**
|
|
9
15
|
* Execution pipeline that applies a set of actions
|
|
10
16
|
*
|
|
@@ -13,4 +19,4 @@ import 'source-map';
|
|
|
13
19
|
*/
|
|
14
20
|
declare function build(options: ESBuildOptions | ESBuildOptions[]): Promise<void>;
|
|
15
21
|
|
|
16
|
-
export { build };
|
|
22
|
+
export { build, cleanOutputPath };
|
package/dist/build.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
build
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "./chunk-
|
|
2
|
+
build,
|
|
3
|
+
cleanOutputPath
|
|
4
|
+
} from "./chunk-HXF5CHDH.js";
|
|
5
|
+
import "./chunk-JYZKDIZJ.js";
|
|
6
|
+
import "./chunk-2STSOOUQ.js";
|
|
6
7
|
import "./chunk-T5272PC2.js";
|
|
7
8
|
import "./chunk-LYDEMC26.js";
|
|
8
9
|
import "./chunk-5A3PLYYB.js";
|
|
9
10
|
import "./chunk-XOY3T2ZQ.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RIVOXICH.js";
|
|
11
12
|
import "./chunk-4Q76YH6E.js";
|
|
12
13
|
import "./chunk-B2PY326H.js";
|
|
13
14
|
import "./chunk-P4V2LVOO.js";
|
|
@@ -15,5 +16,6 @@ import "./chunk-YNQ45EAM.js";
|
|
|
15
16
|
import "./chunk-GWG4HOQ6.js";
|
|
16
17
|
import "./chunk-3GQAWCBQ.js";
|
|
17
18
|
export {
|
|
18
|
-
build
|
|
19
|
+
build,
|
|
20
|
+
cleanOutputPath
|
|
19
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
cleanDirectories
|
|
3
|
+
} from "./chunk-JYZKDIZJ.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_BUILD_OPTIONS,
|
|
6
6
|
DEFAULT_COMPILED_BANNER,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getEntryPoints,
|
|
15
15
|
getEnv,
|
|
16
16
|
getOutputExtensionMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2STSOOUQ.js";
|
|
18
18
|
import {
|
|
19
19
|
depsCheckPlugin
|
|
20
20
|
} from "./chunk-4Q76YH6E.js";
|
|
@@ -36,7 +36,6 @@ import {
|
|
|
36
36
|
} from "./chunk-3GQAWCBQ.js";
|
|
37
37
|
|
|
38
38
|
// src/build.ts
|
|
39
|
-
import { hfs } from "@humanfs/node";
|
|
40
39
|
import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph, writeJsonFile } from "@nx/devkit";
|
|
41
40
|
import { watch as createWatcher } from "chokidar";
|
|
42
41
|
import defu from "defu";
|
|
@@ -44,6 +43,8 @@ import { debounce, flatten } from "es-toolkit";
|
|
|
44
43
|
import { map } from "es-toolkit/compat";
|
|
45
44
|
import * as esbuild from "esbuild";
|
|
46
45
|
import { globbySync } from "globby";
|
|
46
|
+
import { existsSync } from "node:fs";
|
|
47
|
+
import hf from "node:fs/promises";
|
|
47
48
|
import { findWorkspaceRoot } from "nx/src/utils/find-workspace-root";
|
|
48
49
|
|
|
49
50
|
// src/base/renderer-engine.ts
|
|
@@ -284,10 +285,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
284
285
|
exitOnError: true
|
|
285
286
|
});
|
|
286
287
|
const projectJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "project.json");
|
|
287
|
-
if (!
|
|
288
|
+
if (!existsSync(projectJsonPath)) {
|
|
288
289
|
throw new Error("Cannot find project.json configuration");
|
|
289
290
|
}
|
|
290
|
-
const
|
|
291
|
+
const projectJsonFile = await hf.readFile(projectJsonPath, "utf8");
|
|
292
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
291
293
|
const projectName = projectJson.name;
|
|
292
294
|
const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
|
|
293
295
|
if (!projectConfigurations?.projects?.[projectName]) {
|
|
@@ -297,10 +299,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
297
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
298
300
|
options.target ??= DEFAULT_TARGET;
|
|
299
301
|
const packageJsonPath = joinPaths(workspaceRoot.dir, options.projectRoot, "package.json");
|
|
300
|
-
if (!
|
|
302
|
+
if (!existsSync(packageJsonPath)) {
|
|
301
303
|
throw new Error("Cannot find package.json configuration");
|
|
302
304
|
}
|
|
303
|
-
const
|
|
305
|
+
const packageJsonFile = await hf.readFile(packageJsonPath, "utf8");
|
|
306
|
+
const packageJson = JSON.parse(packageJsonFile);
|
|
304
307
|
const outExtension = getOutputExtensionMap(options, packageJson.type);
|
|
305
308
|
const env = getEnv("esbuild", options);
|
|
306
309
|
const result = {
|
|
@@ -379,14 +382,15 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
379
382
|
return result;
|
|
380
383
|
}, "resolveOptions");
|
|
381
384
|
async function generatePackageJson(context2) {
|
|
382
|
-
if (context2.options.generatePackageJson !== false &&
|
|
385
|
+
if (context2.options.generatePackageJson !== false && existsSync(joinPaths(context2.options.projectRoot, "package.json"))) {
|
|
383
386
|
writeDebug(" \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
384
387
|
const stopwatch = getStopwatch("Write package.json file");
|
|
385
388
|
const packageJsonPath = joinPaths(context2.options.projectRoot, "project.json");
|
|
386
|
-
if (!
|
|
389
|
+
if (!existsSync(packageJsonPath)) {
|
|
387
390
|
throw new Error("Cannot find package.json configuration");
|
|
388
391
|
}
|
|
389
|
-
|
|
392
|
+
const packageJsonFile = await hf.readFile(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
393
|
+
let packageJson = JSON.parse(packageJsonFile);
|
|
390
394
|
if (!packageJson) {
|
|
391
395
|
throw new Error("Cannot find package.json configuration file");
|
|
392
396
|
}
|
|
@@ -459,7 +463,7 @@ async function executeEsBuild(context2) {
|
|
|
459
463
|
const result = await esbuild.build(context2.options);
|
|
460
464
|
if (result.metafile) {
|
|
461
465
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
462
|
-
await
|
|
466
|
+
await hf.writeFile(metafilePath, JSON.stringify(result.metafile));
|
|
463
467
|
}
|
|
464
468
|
stopwatch();
|
|
465
469
|
return context2;
|
|
@@ -516,7 +520,10 @@ async function dependencyCheck(options) {
|
|
|
516
520
|
__name(dependencyCheck, "dependencyCheck");
|
|
517
521
|
async function cleanOutputPath(context2) {
|
|
518
522
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
519
|
-
|
|
523
|
+
writeDebug(` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
524
|
+
const stopwatch = getStopwatch(`${context2.options.name} output clean`);
|
|
525
|
+
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
526
|
+
stopwatch();
|
|
520
527
|
}
|
|
521
528
|
return context2;
|
|
522
529
|
}
|
|
@@ -578,5 +585,6 @@ export {
|
|
|
578
585
|
Mapper,
|
|
579
586
|
transduce,
|
|
580
587
|
pipe,
|
|
588
|
+
cleanOutputPath,
|
|
581
589
|
build2 as build
|
|
582
590
|
};
|
|
@@ -7,15 +7,23 @@ import {
|
|
|
7
7
|
} from "./chunk-3GQAWCBQ.js";
|
|
8
8
|
|
|
9
9
|
// src/clean.ts
|
|
10
|
-
import {
|
|
10
|
+
import { rm } from "node:fs/promises";
|
|
11
11
|
async function clean(name = "ESBuild", directory, config) {
|
|
12
12
|
writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
13
|
const stopwatch = getStopwatch(`${name} output clean`);
|
|
14
|
-
await
|
|
14
|
+
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
17
17
|
__name(clean, "clean");
|
|
18
|
+
async function cleanDirectories(name = "ESBuild", directory, config) {
|
|
19
|
+
await rm(directory, {
|
|
20
|
+
recursive: true,
|
|
21
|
+
force: true
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
__name(cleanDirectories, "cleanDirectories");
|
|
18
25
|
|
|
19
26
|
export {
|
|
20
|
-
clean
|
|
27
|
+
clean,
|
|
28
|
+
cleanDirectories
|
|
21
29
|
};
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
} from "./chunk-3GQAWCBQ.js";
|
|
11
11
|
|
|
12
12
|
// src/plugins/tsc.ts
|
|
13
|
-
import { hfs } from "@humanfs/node";
|
|
14
13
|
import { Extractor, ExtractorConfig } from "@microsoft/api-extractor";
|
|
15
14
|
|
|
16
15
|
// ../config-tools/src/utilities/run.ts
|
|
@@ -33,6 +32,8 @@ var run = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ??
|
|
|
33
32
|
}, "run");
|
|
34
33
|
|
|
35
34
|
// src/plugins/tsc.ts
|
|
35
|
+
import { existsSync } from "node:fs";
|
|
36
|
+
import fs from "node:fs/promises";
|
|
36
37
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
37
38
|
const { dependencies, peerDependencies, devDependencies } = __require(joinPaths(options.projectRoot, "package.json"));
|
|
38
39
|
const dependenciesKeys = Object.keys(dependencies ?? {}).flatMap((p) => [
|
|
@@ -105,18 +106,18 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
|
105
106
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
106
107
|
const bundlePath = joinPaths(resolvedOptions.outdir, entryPoint);
|
|
107
108
|
let dtsPath;
|
|
108
|
-
if (
|
|
109
|
+
if (existsSync(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
109
110
|
dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
110
|
-
} else if (
|
|
111
|
+
} else if (existsSync(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
111
112
|
dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
112
113
|
}
|
|
113
114
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
114
115
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
115
116
|
bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
|
|
116
|
-
const dtsContents = await
|
|
117
|
-
await
|
|
117
|
+
const dtsContents = await fs.readFile(`${bundlePath}.d.ts`, "utf8");
|
|
118
|
+
await fs.writeFile(`${bundlePath}.${ext}`, dtsContents);
|
|
118
119
|
} else {
|
|
119
|
-
await
|
|
120
|
+
await fs.writeFile(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
});
|
|
@@ -12,7 +12,7 @@ var _chunkAP5TC7E5cjs = require('./chunk-AP5TC7E5.cjs');
|
|
|
12
12
|
var _chunk5UODOOQAcjs = require('./chunk-5UODOOQA.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkYHAEJIC5cjs = require('./chunk-YHAEJIC5.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -856,7 +856,7 @@ var getDefaultBuildPlugins = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
856
856
|
_chunkEZGTDCYMcjs.fixImportsPlugin.call(void 0, options, resolvedOptions),
|
|
857
857
|
_chunkS6M44SSZcjs.nativeNodeModulesPlugin.call(void 0, options, resolvedOptions),
|
|
858
858
|
_chunkCGFDQ5AJcjs.esmSplitCodeToCjsPlugin.call(void 0, options, resolvedOptions),
|
|
859
|
-
|
|
859
|
+
_chunkYHAEJIC5cjs.tscPlugin.call(void 0, options, resolvedOptions),
|
|
860
860
|
_chunkAP5TC7E5cjs.onErrorPlugin.call(void 0, options, resolvedOptions)
|
|
861
861
|
], "getDefaultBuildPlugins");
|
|
862
862
|
var DEFAULT_BUILD_OPTIONS = {
|
|
@@ -7,15 +7,23 @@ var _chunkMPZUORUAcjs = require('./chunk-MPZUORUA.cjs');
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
8
8
|
|
|
9
9
|
// src/clean.ts
|
|
10
|
-
var
|
|
10
|
+
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "ESBuild", directory, config) {
|
|
12
12
|
_chunkMPZUORUAcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
13
|
const stopwatch = _chunkMPZUORUAcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
|
-
await
|
|
14
|
+
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
17
17
|
_chunkBGYQAVKQcjs.__name.call(void 0, clean, "clean");
|
|
18
|
+
async function cleanDirectories(name = "ESBuild", directory, config) {
|
|
19
|
+
await _promises.rm.call(void 0, directory, {
|
|
20
|
+
recursive: true,
|
|
21
|
+
force: true
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
25
|
+
|
|
18
26
|
|
|
19
27
|
|
|
20
28
|
|
|
21
|
-
exports.clean = clean;
|
|
29
|
+
exports.clean = clean; exports.cleanDirectories = cleanDirectories;
|
|
@@ -1,4 +1,4 @@
|
|
|
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; }
|
|
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
3
|
var _chunkMPZUORUAcjs = require('./chunk-MPZUORUA.cjs');
|
|
4
4
|
|
|
@@ -10,7 +10,6 @@ var _chunkGHWCUMOGcjs = require('./chunk-GHWCUMOG.cjs');
|
|
|
10
10
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
11
11
|
|
|
12
12
|
// src/plugins/tsc.ts
|
|
13
|
-
var _node = require('@humanfs/node');
|
|
14
13
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
15
14
|
|
|
16
15
|
// ../config-tools/src/utilities/run.ts
|
|
@@ -33,6 +32,8 @@ var run = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config, command
|
|
|
33
32
|
}, "run");
|
|
34
33
|
|
|
35
34
|
// src/plugins/tsc.ts
|
|
35
|
+
var _fs = require('fs');
|
|
36
|
+
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
36
37
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
37
38
|
const { dependencies, peerDependencies, devDependencies } = _chunkBGYQAVKQcjs.__require.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
38
39
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
@@ -105,18 +106,18 @@ var tscPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options,
|
|
|
105
106
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
106
107
|
const bundlePath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
107
108
|
let dtsPath;
|
|
108
|
-
if (
|
|
109
|
+
if (_fs.existsSync.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
109
110
|
dtsPath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
110
|
-
} else if (
|
|
111
|
+
} else if (_fs.existsSync.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
111
112
|
dtsPath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
112
113
|
}
|
|
113
114
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
114
115
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
115
116
|
bundleTypeDefinitions(dtsPath, bundlePath, _nullishCoalesce(resolvedOptions.external, () => ( [])), resolvedOptions);
|
|
116
|
-
const dtsContents = await
|
|
117
|
-
await
|
|
117
|
+
const dtsContents = await _promises2.default.readFile(`${bundlePath}.d.ts`, "utf8");
|
|
118
|
+
await _promises2.default.writeFile(`${bundlePath}.${ext}`, dtsContents);
|
|
118
119
|
} else {
|
|
119
|
-
await
|
|
120
|
+
await _promises2.default.writeFile(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkV747733Rcjs = require('./chunk-V747733R.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ var _chunkUEYUN2J6cjs = require('./chunk-UEYUN2J6.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkU2QMMQDAcjs = require('./chunk-U2QMMQDA.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkCNHHELK6cjs = require('./chunk-CNHHELK6.cjs');
|
|
@@ -36,7 +36,6 @@ var _chunkGHWCUMOGcjs = require('./chunk-GHWCUMOG.cjs');
|
|
|
36
36
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
37
37
|
|
|
38
38
|
// src/build.ts
|
|
39
|
-
var _node = require('@humanfs/node');
|
|
40
39
|
var _devkit = require('@nx/devkit');
|
|
41
40
|
var _chokidar = require('chokidar');
|
|
42
41
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
@@ -44,6 +43,8 @@ var _estoolkit = require('es-toolkit');
|
|
|
44
43
|
var _compat = require('es-toolkit/compat');
|
|
45
44
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
46
45
|
var _globby = require('globby');
|
|
46
|
+
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
47
|
+
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
47
48
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
48
49
|
|
|
49
50
|
// src/base/renderer-engine.ts
|
|
@@ -51,7 +52,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
51
52
|
var _sourcemap = require('source-map');
|
|
52
53
|
|
|
53
54
|
// src/utilities/output-file.ts
|
|
54
|
-
|
|
55
|
+
|
|
55
56
|
|
|
56
57
|
var outputFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filepath, data, options) => {
|
|
57
58
|
await _fs2.default.promises.mkdir(_path2.default.dirname(filepath), {
|
|
@@ -277,32 +278,34 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
277
278
|
if (!workspaceRoot) {
|
|
278
279
|
throw new Error("Cannot find Nx workspace root");
|
|
279
280
|
}
|
|
280
|
-
const config = await
|
|
281
|
+
const config = await _chunkU2QMMQDAcjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
281
282
|
_chunkMPZUORUAcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
282
283
|
const stopwatch = _chunkMPZUORUAcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
283
284
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
284
285
|
exitOnError: true
|
|
285
286
|
});
|
|
286
287
|
const projectJsonPath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
287
|
-
if (!
|
|
288
|
+
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
288
289
|
throw new Error("Cannot find project.json configuration");
|
|
289
290
|
}
|
|
290
|
-
const
|
|
291
|
+
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
292
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
291
293
|
const projectName = projectJson.name;
|
|
292
294
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
293
295
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
|
|
294
296
|
throw new Error("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.");
|
|
295
297
|
}
|
|
296
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
298
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkU2QMMQDAcjs.DEFAULT_BUILD_OPTIONS);
|
|
297
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
298
|
-
options.target ??=
|
|
300
|
+
options.target ??= _chunkU2QMMQDAcjs.DEFAULT_TARGET;
|
|
299
301
|
const packageJsonPath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
300
|
-
if (!
|
|
302
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
301
303
|
throw new Error("Cannot find package.json configuration");
|
|
302
304
|
}
|
|
303
|
-
const
|
|
304
|
-
const
|
|
305
|
-
const
|
|
305
|
+
const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
|
|
306
|
+
const packageJson = JSON.parse(packageJsonFile);
|
|
307
|
+
const outExtension = _chunkU2QMMQDAcjs.getOutputExtensionMap.call(void 0, options, packageJson.type);
|
|
308
|
+
const env = _chunkU2QMMQDAcjs.getEnv.call(void 0, "esbuild", options);
|
|
306
309
|
const result = {
|
|
307
310
|
...options,
|
|
308
311
|
config,
|
|
@@ -322,7 +325,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
322
325
|
...userOptions,
|
|
323
326
|
tsconfig: _chunkGHWCUMOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
324
327
|
format: options.format || "cjs",
|
|
325
|
-
entryPoints: await
|
|
328
|
+
entryPoints: await _chunkU2QMMQDAcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
326
329
|
"./src/index.ts"
|
|
327
330
|
], userOptions.emitOnAll),
|
|
328
331
|
outdir: userOptions.outputPath || _chunkGHWCUMOGcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
@@ -347,8 +350,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
347
350
|
outExtension,
|
|
348
351
|
footer: userOptions.footer,
|
|
349
352
|
banner: {
|
|
350
|
-
js: options.banner ||
|
|
351
|
-
css: options.banner ||
|
|
353
|
+
js: options.banner || _chunkU2QMMQDAcjs.DEFAULT_COMPILED_BANNER,
|
|
354
|
+
css: options.banner || _chunkU2QMMQDAcjs.DEFAULT_COMPILED_BANNER
|
|
352
355
|
},
|
|
353
356
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
354
357
|
treeShaking: options.format === "esm",
|
|
@@ -374,27 +377,28 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
374
377
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
375
378
|
].filter(Boolean)
|
|
376
379
|
};
|
|
377
|
-
result.plugins = _nullishCoalesce(userOptions.plugins, () => (
|
|
380
|
+
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkU2QMMQDAcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
|
|
378
381
|
stopwatch();
|
|
379
382
|
return result;
|
|
380
383
|
}, "resolveOptions");
|
|
381
384
|
async function generatePackageJson(context2) {
|
|
382
|
-
if (context2.options.generatePackageJson !== false &&
|
|
385
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
383
386
|
_chunkMPZUORUAcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
384
387
|
const stopwatch = _chunkMPZUORUAcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
385
388
|
const packageJsonPath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
386
|
-
if (!
|
|
389
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
387
390
|
throw new Error("Cannot find package.json configuration");
|
|
388
391
|
}
|
|
389
|
-
|
|
392
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkGHWCUMOGcjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
393
|
+
let packageJson = JSON.parse(packageJsonFile);
|
|
390
394
|
if (!packageJson) {
|
|
391
395
|
throw new Error("Cannot find package.json configuration file");
|
|
392
396
|
}
|
|
393
|
-
packageJson = await
|
|
394
|
-
packageJson = await
|
|
397
|
+
packageJson = await _chunkU2QMMQDAcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
398
|
+
packageJson = await _chunkU2QMMQDAcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
395
399
|
packageJson.exports ??= {};
|
|
396
400
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
397
|
-
packageJson.exports["."] ??=
|
|
401
|
+
packageJson.exports["."] ??= _chunkU2QMMQDAcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
|
|
398
402
|
let entryPoints = [
|
|
399
403
|
{
|
|
400
404
|
in: "./src/index.ts",
|
|
@@ -412,7 +416,7 @@ async function generatePackageJson(context2) {
|
|
|
412
416
|
const split = entryPoint.out.split(".");
|
|
413
417
|
split.pop();
|
|
414
418
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
415
|
-
packageJson.exports[`./${entry}`] ??=
|
|
419
|
+
packageJson.exports[`./${entry}`] ??= _chunkU2QMMQDAcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
|
|
416
420
|
}
|
|
417
421
|
}
|
|
418
422
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -459,7 +463,7 @@ async function executeEsBuild(context2) {
|
|
|
459
463
|
const result = await esbuild.build(context2.options);
|
|
460
464
|
if (result.metafile) {
|
|
461
465
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
462
|
-
await
|
|
466
|
+
await _promises2.default.writeFile(metafilePath, JSON.stringify(result.metafile));
|
|
463
467
|
}
|
|
464
468
|
stopwatch();
|
|
465
469
|
return context2;
|
|
@@ -469,7 +473,7 @@ async function copyBuildAssets(context2) {
|
|
|
469
473
|
if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
|
|
470
474
|
_chunkMPZUORUAcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
471
475
|
const stopwatch = _chunkMPZUORUAcjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
472
|
-
await
|
|
476
|
+
await _chunkU2QMMQDAcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
473
477
|
stopwatch();
|
|
474
478
|
}
|
|
475
479
|
return context2;
|
|
@@ -516,7 +520,10 @@ async function dependencyCheck(options) {
|
|
|
516
520
|
_chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
517
521
|
async function cleanOutputPath(context2) {
|
|
518
522
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
519
|
-
|
|
523
|
+
_chunkMPZUORUAcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
524
|
+
const stopwatch = _chunkMPZUORUAcjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
525
|
+
await _chunkV747733Rcjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
|
|
526
|
+
stopwatch();
|
|
520
527
|
}
|
|
521
528
|
return context2;
|
|
522
529
|
}
|
|
@@ -579,4 +586,5 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
|
|
|
579
586
|
|
|
580
587
|
|
|
581
588
|
|
|
582
|
-
|
|
589
|
+
|
|
590
|
+
exports.handle = handle; exports.skip = skip; exports.Filter = Filter; exports.Mapper = Mapper; exports.transduce = transduce; exports.pipe = pipe; exports.cleanOutputPath = cleanOutputPath; exports.build = build2;
|
package/dist/clean.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
var _chunkV747733Rcjs = require('./chunk-V747733R.cjs');
|
|
4
5
|
require('./chunk-MPZUORUA.cjs');
|
|
5
6
|
require('./chunk-GHWCUMOG.cjs');
|
|
6
7
|
require('./chunk-BGYQAVKQ.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
exports.clean = _chunkV747733Rcjs.clean; exports.cleanDirectories = _chunkV747733Rcjs.cleanDirectories;
|
package/dist/clean.d.cts
CHANGED
|
@@ -40,15 +40,15 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
40
40
|
build: z.ZodDefault<z.ZodString>;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
build: string;
|
|
43
|
-
config?: string | undefined;
|
|
44
43
|
cache?: string | undefined;
|
|
45
44
|
data?: string | undefined;
|
|
45
|
+
config?: string | undefined;
|
|
46
46
|
temp?: string | undefined;
|
|
47
47
|
log?: string | undefined;
|
|
48
48
|
}, {
|
|
49
|
-
config?: string | undefined;
|
|
50
49
|
cache?: string | undefined;
|
|
51
50
|
data?: string | undefined;
|
|
51
|
+
config?: string | undefined;
|
|
52
52
|
temp?: string | undefined;
|
|
53
53
|
log?: string | undefined;
|
|
54
54
|
build?: string | undefined;
|
|
@@ -794,8 +794,6 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
794
794
|
}>]>>]>]>;
|
|
795
795
|
extensions: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
796
796
|
}, "strip", z.ZodTypeAny, {
|
|
797
|
-
logLevel: "debug" | "silent" | "fatal" | "error" | "warn" | "success" | "info" | "trace" | "all";
|
|
798
|
-
env: "development" | "staging" | "production";
|
|
799
797
|
organization: string;
|
|
800
798
|
license: string;
|
|
801
799
|
homepage: string;
|
|
@@ -807,20 +805,22 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
807
805
|
name: string;
|
|
808
806
|
email: string;
|
|
809
807
|
};
|
|
808
|
+
env: "development" | "staging" | "production";
|
|
810
809
|
workspaceRoot: string;
|
|
811
810
|
externalPackagePatterns: string[];
|
|
812
811
|
skipCache: boolean;
|
|
813
812
|
directories: {
|
|
814
813
|
build: string;
|
|
815
|
-
config?: string | undefined;
|
|
816
814
|
cache?: string | undefined;
|
|
817
815
|
data?: string | undefined;
|
|
816
|
+
config?: string | undefined;
|
|
818
817
|
temp?: string | undefined;
|
|
819
818
|
log?: string | undefined;
|
|
820
819
|
};
|
|
821
820
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
822
821
|
timezone: string;
|
|
823
822
|
locale: string;
|
|
823
|
+
logLevel: "silent" | "fatal" | "error" | "warn" | "success" | "info" | "debug" | "trace" | "all";
|
|
824
824
|
registry: {
|
|
825
825
|
npm?: string | undefined;
|
|
826
826
|
github?: string | undefined;
|
|
@@ -977,9 +977,9 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
977
977
|
};
|
|
978
978
|
}>;
|
|
979
979
|
extensions: Record<string, any>;
|
|
980
|
-
name?: string | undefined;
|
|
981
980
|
$schema?: string | null | undefined;
|
|
982
981
|
extends?: string | string[] | undefined;
|
|
982
|
+
name?: string | undefined;
|
|
983
983
|
namespace?: string | undefined;
|
|
984
984
|
repository?: string | undefined;
|
|
985
985
|
preid?: string | undefined;
|
|
@@ -989,9 +989,9 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
989
989
|
email?: string | undefined;
|
|
990
990
|
};
|
|
991
991
|
directories: {
|
|
992
|
-
config?: string | undefined;
|
|
993
992
|
cache?: string | undefined;
|
|
994
993
|
data?: string | undefined;
|
|
994
|
+
config?: string | undefined;
|
|
995
995
|
temp?: string | undefined;
|
|
996
996
|
log?: string | undefined;
|
|
997
997
|
build?: string | undefined;
|
|
@@ -1143,11 +1143,9 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1143
1143
|
background?: string | undefined;
|
|
1144
1144
|
};
|
|
1145
1145
|
}>;
|
|
1146
|
-
logLevel?: "debug" | "silent" | "fatal" | "error" | "warn" | "success" | "info" | "trace" | "all" | undefined;
|
|
1147
|
-
name?: string | undefined;
|
|
1148
|
-
env?: "development" | "staging" | "production" | undefined;
|
|
1149
1146
|
$schema?: string | null | undefined;
|
|
1150
1147
|
extends?: string | string[] | undefined;
|
|
1148
|
+
name?: string | undefined;
|
|
1151
1149
|
namespace?: string | undefined;
|
|
1152
1150
|
organization?: string | undefined;
|
|
1153
1151
|
repository?: string | undefined;
|
|
@@ -1158,12 +1156,14 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1158
1156
|
branch?: string | undefined;
|
|
1159
1157
|
preid?: string | undefined;
|
|
1160
1158
|
owner?: string | undefined;
|
|
1159
|
+
env?: "development" | "staging" | "production" | undefined;
|
|
1161
1160
|
workspaceRoot?: string | undefined;
|
|
1162
1161
|
externalPackagePatterns?: string[] | undefined;
|
|
1163
1162
|
skipCache?: boolean | undefined;
|
|
1164
1163
|
packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
|
|
1165
1164
|
timezone?: string | undefined;
|
|
1166
1165
|
locale?: string | undefined;
|
|
1166
|
+
logLevel?: "silent" | "fatal" | "error" | "warn" | "success" | "info" | "debug" | "trace" | "all" | undefined;
|
|
1167
1167
|
registry?: {
|
|
1168
1168
|
npm?: string | undefined;
|
|
1169
1169
|
github?: string | undefined;
|
|
@@ -1190,5 +1190,13 @@ type StormConfig<TExtensionName extends keyof TStormConfig["extensions"] = keyof
|
|
|
1190
1190
|
* @param config - The StormConfig object
|
|
1191
1191
|
*/
|
|
1192
1192
|
declare function clean(name: string | undefined, directory: string, config?: StormConfig): Promise<void>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Clean the ESBuild output path
|
|
1195
|
+
*
|
|
1196
|
+
* @param name - The name of the executor
|
|
1197
|
+
* @param directory - The directory to clean
|
|
1198
|
+
* @param config - The StormConfig object
|
|
1199
|
+
*/
|
|
1200
|
+
declare function cleanDirectories(name: string | undefined, directory: string, config?: StormConfig): Promise<void>;
|
|
1193
1201
|
|
|
1194
|
-
export { clean };
|
|
1202
|
+
export { clean, cleanDirectories };
|
package/dist/clean.d.ts
CHANGED
|
@@ -40,15 +40,15 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
40
40
|
build: z.ZodDefault<z.ZodString>;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
build: string;
|
|
43
|
-
config?: string | undefined;
|
|
44
43
|
cache?: string | undefined;
|
|
45
44
|
data?: string | undefined;
|
|
45
|
+
config?: string | undefined;
|
|
46
46
|
temp?: string | undefined;
|
|
47
47
|
log?: string | undefined;
|
|
48
48
|
}, {
|
|
49
|
-
config?: string | undefined;
|
|
50
49
|
cache?: string | undefined;
|
|
51
50
|
data?: string | undefined;
|
|
51
|
+
config?: string | undefined;
|
|
52
52
|
temp?: string | undefined;
|
|
53
53
|
log?: string | undefined;
|
|
54
54
|
build?: string | undefined;
|
|
@@ -794,8 +794,6 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
794
794
|
}>]>>]>]>;
|
|
795
795
|
extensions: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
796
796
|
}, "strip", z.ZodTypeAny, {
|
|
797
|
-
logLevel: "debug" | "silent" | "fatal" | "error" | "warn" | "success" | "info" | "trace" | "all";
|
|
798
|
-
env: "development" | "staging" | "production";
|
|
799
797
|
organization: string;
|
|
800
798
|
license: string;
|
|
801
799
|
homepage: string;
|
|
@@ -807,20 +805,22 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
807
805
|
name: string;
|
|
808
806
|
email: string;
|
|
809
807
|
};
|
|
808
|
+
env: "development" | "staging" | "production";
|
|
810
809
|
workspaceRoot: string;
|
|
811
810
|
externalPackagePatterns: string[];
|
|
812
811
|
skipCache: boolean;
|
|
813
812
|
directories: {
|
|
814
813
|
build: string;
|
|
815
|
-
config?: string | undefined;
|
|
816
814
|
cache?: string | undefined;
|
|
817
815
|
data?: string | undefined;
|
|
816
|
+
config?: string | undefined;
|
|
818
817
|
temp?: string | undefined;
|
|
819
818
|
log?: string | undefined;
|
|
820
819
|
};
|
|
821
820
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
822
821
|
timezone: string;
|
|
823
822
|
locale: string;
|
|
823
|
+
logLevel: "silent" | "fatal" | "error" | "warn" | "success" | "info" | "debug" | "trace" | "all";
|
|
824
824
|
registry: {
|
|
825
825
|
npm?: string | undefined;
|
|
826
826
|
github?: string | undefined;
|
|
@@ -977,9 +977,9 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
977
977
|
};
|
|
978
978
|
}>;
|
|
979
979
|
extensions: Record<string, any>;
|
|
980
|
-
name?: string | undefined;
|
|
981
980
|
$schema?: string | null | undefined;
|
|
982
981
|
extends?: string | string[] | undefined;
|
|
982
|
+
name?: string | undefined;
|
|
983
983
|
namespace?: string | undefined;
|
|
984
984
|
repository?: string | undefined;
|
|
985
985
|
preid?: string | undefined;
|
|
@@ -989,9 +989,9 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
989
989
|
email?: string | undefined;
|
|
990
990
|
};
|
|
991
991
|
directories: {
|
|
992
|
-
config?: string | undefined;
|
|
993
992
|
cache?: string | undefined;
|
|
994
993
|
data?: string | undefined;
|
|
994
|
+
config?: string | undefined;
|
|
995
995
|
temp?: string | undefined;
|
|
996
996
|
log?: string | undefined;
|
|
997
997
|
build?: string | undefined;
|
|
@@ -1143,11 +1143,9 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1143
1143
|
background?: string | undefined;
|
|
1144
1144
|
};
|
|
1145
1145
|
}>;
|
|
1146
|
-
logLevel?: "debug" | "silent" | "fatal" | "error" | "warn" | "success" | "info" | "trace" | "all" | undefined;
|
|
1147
|
-
name?: string | undefined;
|
|
1148
|
-
env?: "development" | "staging" | "production" | undefined;
|
|
1149
1146
|
$schema?: string | null | undefined;
|
|
1150
1147
|
extends?: string | string[] | undefined;
|
|
1148
|
+
name?: string | undefined;
|
|
1151
1149
|
namespace?: string | undefined;
|
|
1152
1150
|
organization?: string | undefined;
|
|
1153
1151
|
repository?: string | undefined;
|
|
@@ -1158,12 +1156,14 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1158
1156
|
branch?: string | undefined;
|
|
1159
1157
|
preid?: string | undefined;
|
|
1160
1158
|
owner?: string | undefined;
|
|
1159
|
+
env?: "development" | "staging" | "production" | undefined;
|
|
1161
1160
|
workspaceRoot?: string | undefined;
|
|
1162
1161
|
externalPackagePatterns?: string[] | undefined;
|
|
1163
1162
|
skipCache?: boolean | undefined;
|
|
1164
1163
|
packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
|
|
1165
1164
|
timezone?: string | undefined;
|
|
1166
1165
|
locale?: string | undefined;
|
|
1166
|
+
logLevel?: "silent" | "fatal" | "error" | "warn" | "success" | "info" | "debug" | "trace" | "all" | undefined;
|
|
1167
1167
|
registry?: {
|
|
1168
1168
|
npm?: string | undefined;
|
|
1169
1169
|
github?: string | undefined;
|
|
@@ -1190,5 +1190,13 @@ type StormConfig<TExtensionName extends keyof TStormConfig["extensions"] = keyof
|
|
|
1190
1190
|
* @param config - The StormConfig object
|
|
1191
1191
|
*/
|
|
1192
1192
|
declare function clean(name: string | undefined, directory: string, config?: StormConfig): Promise<void>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Clean the ESBuild output path
|
|
1195
|
+
*
|
|
1196
|
+
* @param name - The name of the executor
|
|
1197
|
+
* @param directory - The directory to clean
|
|
1198
|
+
* @param config - The StormConfig object
|
|
1199
|
+
*/
|
|
1200
|
+
declare function cleanDirectories(name: string | undefined, directory: string, config?: StormConfig): Promise<void>;
|
|
1193
1201
|
|
|
1194
|
-
export { clean };
|
|
1202
|
+
export { clean, cleanDirectories };
|
package/dist/clean.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
clean
|
|
3
|
-
|
|
2
|
+
clean,
|
|
3
|
+
cleanDirectories
|
|
4
|
+
} from "./chunk-JYZKDIZJ.js";
|
|
4
5
|
import "./chunk-B2PY326H.js";
|
|
5
6
|
import "./chunk-P4V2LVOO.js";
|
|
6
7
|
import "./chunk-3GQAWCBQ.js";
|
|
7
8
|
export {
|
|
8
|
-
clean
|
|
9
|
+
clean,
|
|
10
|
+
cleanDirectories
|
|
9
11
|
};
|
package/dist/config.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkU2QMMQDAcjs = require('./chunk-U2QMMQDA.cjs');
|
|
6
6
|
require('./chunk-S6M44SSZ.cjs');
|
|
7
7
|
require('./chunk-WRBUO7H6.cjs');
|
|
8
8
|
require('./chunk-AP5TC7E5.cjs');
|
|
9
9
|
require('./chunk-5UODOOQA.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-YHAEJIC5.cjs');
|
|
11
11
|
require('./chunk-MPZUORUA.cjs');
|
|
12
12
|
require('./chunk-GHWCUMOG.cjs');
|
|
13
13
|
require('./chunk-CGFDQ5AJ.cjs');
|
|
@@ -17,4 +17,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
20
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkU2QMMQDAcjs.DEFAULT_BUILD_OPTIONS; exports.getDefaultBuildPlugins = _chunkU2QMMQDAcjs.getDefaultBuildPlugins; exports.getOutputExtensionMap = _chunkU2QMMQDAcjs.getOutputExtensionMap;
|
package/dist/config.js
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
DEFAULT_BUILD_OPTIONS,
|
|
3
3
|
getDefaultBuildPlugins,
|
|
4
4
|
getOutputExtensionMap
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2STSOOUQ.js";
|
|
6
6
|
import "./chunk-T5272PC2.js";
|
|
7
7
|
import "./chunk-LYDEMC26.js";
|
|
8
8
|
import "./chunk-5A3PLYYB.js";
|
|
9
9
|
import "./chunk-XOY3T2ZQ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-RIVOXICH.js";
|
|
11
11
|
import "./chunk-B2PY326H.js";
|
|
12
12
|
import "./chunk-P4V2LVOO.js";
|
|
13
13
|
import "./chunk-YNQ45EAM.js";
|
package/dist/index.cjs
CHANGED
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var _chunkMSCC7MGMcjs = require('./chunk-MSCC7MGM.cjs');
|
|
10
9
|
|
|
10
|
+
var _chunkZQYP5TTVcjs = require('./chunk-ZQYP5TTV.cjs');
|
|
11
11
|
|
|
12
|
-
var _chunkUEYUN2J6cjs = require('./chunk-UEYUN2J6.cjs');
|
|
13
12
|
|
|
14
13
|
|
|
14
|
+
var _chunkV747733Rcjs = require('./chunk-V747733R.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var _chunkU2QMMQDAcjs = require('./chunk-U2QMMQDA.cjs');
|
|
18
20
|
require('./chunk-S6M44SSZ.cjs');
|
|
19
21
|
require('./chunk-WRBUO7H6.cjs');
|
|
20
22
|
require('./chunk-AP5TC7E5.cjs');
|
|
21
23
|
require('./chunk-5UODOOQA.cjs');
|
|
22
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-YHAEJIC5.cjs');
|
|
23
25
|
require('./chunk-SFZRYJZ2.cjs');
|
|
24
26
|
require('./chunk-CNHHELK6.cjs');
|
|
25
27
|
require('./chunk-MPZUORUA.cjs');
|
|
@@ -39,4 +41,6 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkU2QMMQDAcjs.DEFAULT_BUILD_OPTIONS; exports.Filter = _chunkZQYP5TTVcjs.Filter; exports.Mapper = _chunkZQYP5TTVcjs.Mapper; exports.build = _chunkZQYP5TTVcjs.build; exports.clean = _chunkV747733Rcjs.clean; exports.cleanDirectories = _chunkV747733Rcjs.cleanDirectories; exports.cleanOutputPath = _chunkZQYP5TTVcjs.cleanOutputPath; exports.getDefaultBuildPlugins = _chunkU2QMMQDAcjs.getDefaultBuildPlugins; exports.getOutputExtensionMap = _chunkU2QMMQDAcjs.getOutputExtensionMap; exports.handle = _chunkZQYP5TTVcjs.handle; exports.pipe = _chunkZQYP5TTVcjs.pipe; exports.skip = _chunkZQYP5TTVcjs.skip; exports.transduce = _chunkZQYP5TTVcjs.transduce;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { build } from './build.cjs';
|
|
2
|
-
export { clean } from './clean.cjs';
|
|
1
|
+
export { build, cleanOutputPath } from './build.cjs';
|
|
2
|
+
export { clean, cleanDirectories } from './clean.cjs';
|
|
3
3
|
export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins, getOutputExtensionMap } from './config.cjs';
|
|
4
4
|
export { AssetInfo, BuildEnd, BuildStart, ChunkInfo, ESBuildCLIOptions, ESBuildContext, ESBuildOptions, ESBuildResolvedOptions, ESBuildResult, MaybePromise, ModifyEsbuildOptions, OutExtensionFactory, OutExtensionObject, RenderChunk, Renderer, WrittenFile } from './types.cjs';
|
|
5
5
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { build } from './build.js';
|
|
2
|
-
export { clean } from './clean.js';
|
|
1
|
+
export { build, cleanOutputPath } from './build.js';
|
|
2
|
+
export { clean, cleanDirectories } from './clean.js';
|
|
3
3
|
export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins, getOutputExtensionMap } from './config.js';
|
|
4
4
|
export { AssetInfo, BuildEnd, BuildStart, ChunkInfo, ESBuildCLIOptions, ESBuildContext, ESBuildOptions, ESBuildResolvedOptions, ESBuildResult, MaybePromise, ModifyEsbuildOptions, OutExtensionFactory, OutExtensionObject, RenderChunk, Renderer, WrittenFile } from './types.js';
|
|
5
5
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -2,24 +2,26 @@ import {
|
|
|
2
2
|
Filter,
|
|
3
3
|
Mapper,
|
|
4
4
|
build,
|
|
5
|
+
cleanOutputPath,
|
|
5
6
|
handle,
|
|
6
7
|
pipe,
|
|
7
8
|
skip,
|
|
8
9
|
transduce
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HXF5CHDH.js";
|
|
10
11
|
import {
|
|
11
|
-
clean
|
|
12
|
-
|
|
12
|
+
clean,
|
|
13
|
+
cleanDirectories
|
|
14
|
+
} from "./chunk-JYZKDIZJ.js";
|
|
13
15
|
import {
|
|
14
16
|
DEFAULT_BUILD_OPTIONS,
|
|
15
17
|
getDefaultBuildPlugins,
|
|
16
18
|
getOutputExtensionMap
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2STSOOUQ.js";
|
|
18
20
|
import "./chunk-T5272PC2.js";
|
|
19
21
|
import "./chunk-LYDEMC26.js";
|
|
20
22
|
import "./chunk-5A3PLYYB.js";
|
|
21
23
|
import "./chunk-XOY3T2ZQ.js";
|
|
22
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-RIVOXICH.js";
|
|
23
25
|
import "./chunk-GGNOJ77I.js";
|
|
24
26
|
import "./chunk-4Q76YH6E.js";
|
|
25
27
|
import "./chunk-B2PY326H.js";
|
|
@@ -33,6 +35,8 @@ export {
|
|
|
33
35
|
Mapper,
|
|
34
36
|
build,
|
|
35
37
|
clean,
|
|
38
|
+
cleanDirectories,
|
|
39
|
+
cleanOutputPath,
|
|
36
40
|
getDefaultBuildPlugins,
|
|
37
41
|
getOutputExtensionMap,
|
|
38
42
|
handle,
|
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYHAEJIC5cjs = require('../chunk-YHAEJIC5.cjs');
|
|
4
4
|
require('../chunk-MPZUORUA.cjs');
|
|
5
5
|
require('../chunk-GHWCUMOG.cjs');
|
|
6
6
|
require('../chunk-BGYQAVKQ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.tscPlugin =
|
|
9
|
+
exports.tscPlugin = _chunkYHAEJIC5cjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/esbuild",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `esbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -159,7 +159,6 @@
|
|
|
159
159
|
"spdx-license-ids": { "optional": true }
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
|
-
"@humanfs/node": "^0.16.6",
|
|
163
162
|
"chokidar": "^4.0.3",
|
|
164
163
|
"commander": "^12.1.0",
|
|
165
164
|
"es-toolkit": "^1.30.1",
|
|
@@ -172,9 +171,9 @@
|
|
|
172
171
|
"@microsoft/api-extractor": "^7.48.1",
|
|
173
172
|
"@nx/devkit": "^20.3.1",
|
|
174
173
|
"@nx/js": "^20.3.1",
|
|
175
|
-
"@storm-software/build-tools": "0.137.
|
|
176
|
-
"@storm-software/config": "1.100.
|
|
177
|
-
"@storm-software/config-tools": "1.144.
|
|
174
|
+
"@storm-software/build-tools": "0.137.4",
|
|
175
|
+
"@storm-software/config": "1.100.4",
|
|
176
|
+
"@storm-software/config-tools": "1.144.4",
|
|
178
177
|
"@types/node": "^22.10.2",
|
|
179
178
|
"defu": "6.1.4",
|
|
180
179
|
"esbuild": "^0.24.0",
|