@storm-software/unbuild 0.20.0 → 0.20.1
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/bin/unbuild.js +13554 -141
- package/bin/unbuild.mjs +13561 -148
- package/dist/build.js +9 -10
- package/dist/build.mjs +8 -9
- package/dist/{chunk-XI6ZXBUG.js → chunk-2345XTVS.js} +105 -108
- package/dist/{chunk-ZUXO7HQP.js → chunk-3OJD7CO4.js} +8 -5
- package/dist/chunk-AICX43E6.mjs +13496 -0
- package/dist/chunk-AYRYNROK.js +27 -0
- package/dist/{chunk-5SOSUWM3.mjs → chunk-B5GGHMTB.mjs} +9 -8
- package/dist/chunk-BIZYEBW3.mjs +38 -0
- package/dist/chunk-DFIGNXGY.js +13496 -0
- package/dist/{chunk-34DH32EF.mjs → chunk-FDF3FMZP.mjs} +1 -1
- package/dist/{chunk-AH7CDDC4.mjs → chunk-IIVTCNH5.mjs} +6 -3
- package/dist/{chunk-FP34RJ2B.mjs → chunk-OG2CKJQU.mjs} +1 -1
- package/dist/{chunk-2CDKPC2J.js → chunk-OQPSH7GE.js} +9 -8
- package/dist/chunk-RCEWRXM5.js +38 -0
- package/dist/{chunk-LMAVRNZF.mjs → chunk-T5NKX2EJ.mjs} +5 -9
- package/dist/{chunk-I24R5RY2.mjs → chunk-WGFWMGCJ.mjs} +26 -29
- package/dist/{chunk-QUQ5VOD7.js → chunk-WPOEGALQ.js} +3 -3
- package/dist/{chunk-JOAJEBTW.js → chunk-XEAFTDQ7.js} +2 -2
- package/dist/clean.js +3 -3
- package/dist/clean.mjs +2 -2
- package/dist/config.js +7 -8
- package/dist/config.mjs +6 -7
- package/dist/index.js +9 -10
- package/dist/index.mjs +8 -9
- package/package.json +1 -1
- package/dist/chunk-4REDJQMU.js +0 -35
- package/dist/chunk-ITLNJJHL.mjs +0 -65
- package/dist/chunk-KTRDC23G.mjs +0 -28
- package/dist/chunk-L73LP5QX.js +0 -31
- package/dist/chunk-TYJGNL6P.mjs +0 -35
- package/dist/chunk-V2LF4EEM.js +0 -28
- package/dist/chunk-YNOD6WE4.js +0 -65
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getStopwatch,
|
|
3
3
|
writeDebug
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-B5GGHMTB.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__name
|
|
7
7
|
} from "./chunk-LPEX4YW6.mjs";
|
|
8
8
|
|
|
9
9
|
// src/clean.ts
|
|
10
|
-
import {
|
|
10
|
+
import { rm } from "node:fs/promises";
|
|
11
11
|
async function clean(name = "Unbuild", 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 rm(directory, {
|
|
15
|
+
recursive: true,
|
|
16
|
+
force: true
|
|
17
|
+
});
|
|
15
18
|
stopwatch();
|
|
16
19
|
}
|
|
17
20
|
__name(clean, "clean");
|
|
@@ -468,7 +468,8 @@ var CONSOLE_ICONS = {
|
|
|
468
468
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
469
469
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
470
470
|
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
471
|
-
[LogLevelLabel.TRACE]: useIcon("\
|
|
471
|
+
[LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
|
|
472
|
+
[LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
|
|
472
473
|
};
|
|
473
474
|
|
|
474
475
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
@@ -488,48 +489,48 @@ var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel =
|
|
|
488
489
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
489
490
|
return (message) => {
|
|
490
491
|
console.error(`
|
|
491
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
492
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
492
493
|
`);
|
|
493
494
|
};
|
|
494
495
|
}
|
|
495
496
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
496
497
|
return (message) => {
|
|
497
498
|
console.error(`
|
|
498
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
499
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
499
500
|
`);
|
|
500
501
|
};
|
|
501
502
|
}
|
|
502
503
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
503
504
|
return (message) => {
|
|
504
505
|
console.warn(`
|
|
505
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
506
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
506
507
|
`);
|
|
507
508
|
};
|
|
508
509
|
}
|
|
509
510
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
|
|
510
511
|
return (message) => {
|
|
511
512
|
console.info(`
|
|
512
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
513
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
513
514
|
`);
|
|
514
515
|
};
|
|
515
516
|
}
|
|
516
517
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
517
518
|
return (message) => {
|
|
518
519
|
console.info(`
|
|
519
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
520
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
520
521
|
`);
|
|
521
522
|
};
|
|
522
523
|
}
|
|
523
524
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
524
525
|
return (message) => {
|
|
525
526
|
console.debug(`
|
|
526
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
527
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
527
528
|
`);
|
|
528
529
|
};
|
|
529
530
|
}
|
|
530
531
|
return (message) => {
|
|
531
532
|
console.log(`
|
|
532
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.
|
|
533
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
533
534
|
`);
|
|
534
535
|
};
|
|
535
536
|
}, "getLogFn");
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
4
|
+
|
|
5
|
+
// src/plugins/type-definitions.ts
|
|
6
|
+
var _path = require('path');
|
|
7
|
+
function typeDefinitions(projectRoot) {
|
|
8
|
+
return {
|
|
9
|
+
name: "storm:dts-bundle",
|
|
10
|
+
async generateBundle(_opts, bundle) {
|
|
11
|
+
for (const file of Object.values(bundle)) {
|
|
12
|
+
if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
const hasDefaultExport = file.exports.includes("default");
|
|
16
|
+
const entrySourceFileName = _path.relative.call(void 0, projectRoot, file.facadeModuleId);
|
|
17
|
+
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
18
|
+
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
19
|
+
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
20
|
+
const dtsFileSource = hasDefaultExport ? `
|
|
21
|
+
export * from ${relativeSourceDtsName};
|
|
22
|
+
export { default } from ${relativeSourceDtsName};
|
|
23
|
+
` : `export * from ${relativeSourceDtsName};
|
|
24
|
+
`;
|
|
25
|
+
this.emitFile({
|
|
26
|
+
type: "asset",
|
|
27
|
+
fileName: dtsFileName,
|
|
28
|
+
source: dtsFileSource
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
_chunk3GQAWCBQjs.__name.call(void 0, typeDefinitions, "typeDefinitions");
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
exports.typeDefinitions = typeDefinitions;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tscPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AICX43E6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
typeDefinitions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BIZYEBW3.mjs";
|
|
7
7
|
import {
|
|
8
8
|
analyzePlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FDF3FMZP.mjs";
|
|
10
10
|
import {
|
|
11
11
|
onErrorPlugin
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
swcPlugin
|
|
15
|
-
} from "./chunk-KTRDC23G.mjs";
|
|
12
|
+
} from "./chunk-OG2CKJQU.mjs";
|
|
16
13
|
import {
|
|
17
14
|
__name
|
|
18
15
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -20,8 +17,7 @@ import {
|
|
|
20
17
|
// src/config.ts
|
|
21
18
|
var getDefaultBuildPlugins = /* @__PURE__ */ __name(async (options, resolvedOptions) => Promise.all([
|
|
22
19
|
analyzePlugin(options, resolvedOptions),
|
|
23
|
-
|
|
24
|
-
typeDefinitions(options, resolvedOptions),
|
|
20
|
+
typeDefinitions(resolvedOptions.projectRoot),
|
|
25
21
|
tscPlugin(options, resolvedOptions),
|
|
26
22
|
onErrorPlugin(options, resolvedOptions)
|
|
27
23
|
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clean
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IIVTCNH5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getDefaultBuildPlugins
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T5NKX2EJ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AICX43E6.mjs";
|
|
10
10
|
import {
|
|
11
11
|
COLOR_KEYS,
|
|
12
12
|
LogLevel,
|
|
@@ -29,14 +29,13 @@ import {
|
|
|
29
29
|
writeSystem,
|
|
30
30
|
writeTrace,
|
|
31
31
|
writeWarning
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-B5GGHMTB.mjs";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-LPEX4YW6.mjs";
|
|
36
36
|
|
|
37
37
|
// src/build.ts
|
|
38
|
-
import {
|
|
39
|
-
import { createProjectGraphAsync as createProjectGraphAsync3, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile } from "@nx/devkit";
|
|
38
|
+
import { readCachedProjectGraph, writeJsonFile } from "@nx/devkit";
|
|
40
39
|
import { getHelperDependency, HelperDependency } from "@nx/js";
|
|
41
40
|
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies2 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
42
41
|
|
|
@@ -67,26 +66,26 @@ import { loadConfig as loadConfig2 } from "c12";
|
|
|
67
66
|
import defu from "defu";
|
|
68
67
|
var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
|
|
69
68
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
70
|
-
let config = loadConfig2({
|
|
69
|
+
let config = await loadConfig2({
|
|
71
70
|
cwd: workspacePath,
|
|
72
71
|
packageJson: true,
|
|
73
72
|
name: fileName,
|
|
74
73
|
envName: fileName?.toUpperCase(),
|
|
75
74
|
jitiOptions: {
|
|
76
75
|
debug: false,
|
|
77
|
-
|
|
76
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
|
|
78
77
|
},
|
|
79
78
|
...options
|
|
80
79
|
});
|
|
81
80
|
if (!config || Object.keys(config).length === 0) {
|
|
82
|
-
config = loadConfig2({
|
|
81
|
+
config = await loadConfig2({
|
|
83
82
|
cwd: workspacePath,
|
|
84
83
|
packageJson: true,
|
|
85
84
|
name: fileName,
|
|
86
85
|
envName: fileName?.toUpperCase(),
|
|
87
86
|
jitiOptions: {
|
|
88
87
|
debug: false,
|
|
89
|
-
|
|
88
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
|
|
90
89
|
},
|
|
91
90
|
configFile: fileName,
|
|
92
91
|
...options
|
|
@@ -792,6 +791,8 @@ import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-r
|
|
|
792
791
|
|
|
793
792
|
// src/build.ts
|
|
794
793
|
import defu3 from "defu";
|
|
794
|
+
import { existsSync } from "node:fs";
|
|
795
|
+
import { readFile } from "node:fs/promises";
|
|
795
796
|
import { relative as relative2 } from "node:path";
|
|
796
797
|
import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
|
|
797
798
|
import { build as unbuild } from "unbuild";
|
|
@@ -814,38 +815,34 @@ async function resolveOptions(options) {
|
|
|
814
815
|
options = defu3(options, configFile);
|
|
815
816
|
}
|
|
816
817
|
}
|
|
817
|
-
const projectGraph =
|
|
818
|
-
exitOnError: true
|
|
819
|
-
});
|
|
818
|
+
const projectGraph = readCachedProjectGraph();
|
|
820
819
|
const projectJsonPath = joinPaths(config.workspaceRoot, projectRoot, "project.json");
|
|
821
|
-
if (!
|
|
820
|
+
if (!existsSync(projectJsonPath)) {
|
|
822
821
|
throw new Error("Cannot find project.json configuration");
|
|
823
822
|
}
|
|
824
|
-
const
|
|
823
|
+
const projectJsonContent = await readFile(projectJsonPath, "utf8");
|
|
824
|
+
const projectJson = JSON.parse(projectJsonContent);
|
|
825
825
|
const projectName = projectJson.name;
|
|
826
826
|
const packageJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "package.json");
|
|
827
|
-
if (!
|
|
827
|
+
if (!existsSync(packageJsonPath)) {
|
|
828
828
|
throw new Error("Cannot find package.json configuration");
|
|
829
829
|
}
|
|
830
|
-
const
|
|
830
|
+
const packageJsonContent = await readFile(packageJsonPath, "utf8");
|
|
831
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
831
832
|
let tsconfig = options.tsconfig;
|
|
832
833
|
if (!tsconfig) {
|
|
833
834
|
tsconfig = joinPaths(workspaceRoot.dir, projectRoot, "tsconfig.json");
|
|
834
835
|
}
|
|
835
|
-
if (!
|
|
836
|
+
if (!existsSync(tsconfig)) {
|
|
836
837
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
837
838
|
}
|
|
838
839
|
let sourceRoot = projectJson.sourceRoot;
|
|
839
840
|
if (!sourceRoot) {
|
|
840
841
|
sourceRoot = joinPaths(projectRoot, "src");
|
|
841
842
|
}
|
|
842
|
-
if (!
|
|
843
|
+
if (!existsSync(sourceRoot)) {
|
|
843
844
|
throw new Error("Cannot find sourceRoot directory");
|
|
844
845
|
}
|
|
845
|
-
const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
|
|
846
|
-
if (!projectConfigurations?.projects?.[projectName]) {
|
|
847
|
-
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.");
|
|
848
|
-
}
|
|
849
846
|
const result = calculateProjectBuildableDependencies2(void 0, projectGraph, workspaceRoot.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
850
847
|
let dependencies = result.dependencies;
|
|
851
848
|
const tsLibDependency = getHelperDependency(HelperDependency.tsc, tsconfig, dependencies, projectGraph, true);
|
|
@@ -966,21 +963,21 @@ async function resolveOptions(options) {
|
|
|
966
963
|
}
|
|
967
964
|
__name(resolveOptions, "resolveOptions");
|
|
968
965
|
async function generatePackageJson(options) {
|
|
969
|
-
if (options.generatePackageJson !== false &&
|
|
966
|
+
if (options.generatePackageJson !== false && existsSync(joinPaths(options.projectRoot, "package.json"))) {
|
|
970
967
|
writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
|
|
971
968
|
const stopwatch = getStopwatch("Write package.json file");
|
|
972
969
|
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
973
|
-
if (!
|
|
970
|
+
if (!existsSync(packageJsonPath)) {
|
|
974
971
|
throw new Error("Cannot find package.json configuration");
|
|
975
972
|
}
|
|
976
|
-
let
|
|
977
|
-
if (!
|
|
973
|
+
let packageJsonContent = await readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
974
|
+
if (!packageJsonContent) {
|
|
978
975
|
throw new Error("Cannot find package.json configuration file");
|
|
979
976
|
}
|
|
977
|
+
let packageJson = JSON.parse(packageJsonContent);
|
|
980
978
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
981
979
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
982
|
-
|
|
983
|
-
await writeJsonFile(joinPaths(options.outDir, "package.json"), packageJson);
|
|
980
|
+
await writeJsonFile(joinPaths(options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
|
|
984
981
|
stopwatch();
|
|
985
982
|
}
|
|
986
983
|
return options;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOQPSH7GEjs = require('./chunk-OQPSH7GE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -10,7 +10,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
|
-
|
|
13
|
+
_chunkOQPSH7GEjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
16
|
`, resolvedOptions.config);
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunkOQPSH7GEjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
24
|
`, resolvedOptions.config);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOQPSH7GEjs = require('./chunk-OQPSH7GE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -25,7 +25,7 @@ var analyzePlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
25
25
|
renderChunk(source, chunk) {
|
|
26
26
|
const sourceBytes = formatBytes(source.length);
|
|
27
27
|
const fileName = chunk.fileName;
|
|
28
|
-
|
|
28
|
+
_chunkOQPSH7GEjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}, "analyzePlugin");
|
package/dist/clean.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk3OJD7CO4js = require('./chunk-3OJD7CO4.js');
|
|
4
|
+
require('./chunk-OQPSH7GE.js');
|
|
5
5
|
require('./chunk-3GQAWCBQ.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.clean =
|
|
8
|
+
exports.clean = _chunk3OJD7CO4js.clean;
|
package/dist/clean.mjs
CHANGED
package/dist/config.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
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-V2LF4EEM.js');
|
|
3
|
+
var _chunkAYRYNROKjs = require('./chunk-AYRYNROK.js');
|
|
4
|
+
require('./chunk-DFIGNXGY.js');
|
|
5
|
+
require('./chunk-RCEWRXM5.js');
|
|
6
|
+
require('./chunk-XEAFTDQ7.js');
|
|
7
|
+
require('./chunk-WPOEGALQ.js');
|
|
8
|
+
require('./chunk-OQPSH7GE.js');
|
|
10
9
|
require('./chunk-3GQAWCBQ.js');
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
exports.getDefaultBuildPlugins =
|
|
12
|
+
exports.getDefaultBuildPlugins = _chunkAYRYNROKjs.getDefaultBuildPlugins;
|
package/dist/config.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDefaultBuildPlugins
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-KTRDC23G.mjs";
|
|
3
|
+
} from "./chunk-T5NKX2EJ.mjs";
|
|
4
|
+
import "./chunk-AICX43E6.mjs";
|
|
5
|
+
import "./chunk-BIZYEBW3.mjs";
|
|
6
|
+
import "./chunk-FDF3FMZP.mjs";
|
|
7
|
+
import "./chunk-OG2CKJQU.mjs";
|
|
8
|
+
import "./chunk-B5GGHMTB.mjs";
|
|
10
9
|
import "./chunk-LPEX4YW6.mjs";
|
|
11
10
|
export {
|
|
12
11
|
getDefaultBuildPlugins
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2345XTVSjs = require('./chunk-2345XTVS.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3OJD7CO4js = require('./chunk-3OJD7CO4.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkAYRYNROKjs = require('./chunk-AYRYNROK.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunkDFIGNXGYjs = require('./chunk-DFIGNXGY.js');
|
|
14
|
+
require('./chunk-RCEWRXM5.js');
|
|
15
15
|
require('./chunk-OULCUN6I.js');
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
18
|
-
require('./chunk-
|
|
19
|
-
require('./chunk-V2LF4EEM.js');
|
|
16
|
+
require('./chunk-XEAFTDQ7.js');
|
|
17
|
+
require('./chunk-WPOEGALQ.js');
|
|
18
|
+
require('./chunk-OQPSH7GE.js');
|
|
20
19
|
require('./chunk-3GQAWCBQ.js');
|
|
21
20
|
|
|
22
21
|
|
|
@@ -24,4 +23,4 @@ require('./chunk-3GQAWCBQ.js');
|
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
exports.build =
|
|
26
|
+
exports.build = _chunk2345XTVSjs.build; exports.clean = _chunk3OJD7CO4js.clean; exports.createTsCompilerOptions = _chunkDFIGNXGYjs.createTsCompilerOptions; exports.getDefaultBuildPlugins = _chunkAYRYNROKjs.getDefaultBuildPlugins; exports.loadConfig = _chunkDFIGNXGYjs.loadConfig;
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WGFWMGCJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
clean
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IIVTCNH5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
getDefaultBuildPlugins
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-T5NKX2EJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
createTsCompilerOptions,
|
|
12
12
|
loadConfig
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-AICX43E6.mjs";
|
|
14
|
+
import "./chunk-BIZYEBW3.mjs";
|
|
15
15
|
import "./chunk-ERHVDARL.mjs";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-KTRDC23G.mjs";
|
|
16
|
+
import "./chunk-FDF3FMZP.mjs";
|
|
17
|
+
import "./chunk-OG2CKJQU.mjs";
|
|
18
|
+
import "./chunk-B5GGHMTB.mjs";
|
|
20
19
|
import "./chunk-LPEX4YW6.mjs";
|
|
21
20
|
export {
|
|
22
21
|
build,
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@storm-software/unbuild","version":"0.20.
|
|
1
|
+
{"name":"@storm-software/unbuild","version":"0.20.1","description":"A package containing `unbuild` utilities for building Storm Software libraries and applications","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops.git","directory":"packages/unbuild"},"homepage":"https://stormsoftware.com","bugs":"https://github.com/storm-software/storm-ops/issues","author":{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},"maintainers":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},{"name":"Pat Sullivan","email":"admin@stormsoftware.com","url":"https://patsullivan.org"}],"contributors":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"}],"funding":{"type":"github","url":"https://github.com/sponsors/storm-software"},"license":"Apache-2.0","private":false,"packageManager":"pnpm@9.15.2","engines":{"node":">=22.4.0","pnpm":">=9.15.2"},"bin":{"storm-unbuild":"./bin/unbuild.js","storm-unbuild-cjs":"./bin/unbuild.js","storm-unbuild-esm":"./bin/unbuild.mjs"},"main":"./dist/index.js","module":"./dist/index.mjs","exports":{"./package.json":"./package.json","./types":{"import":{"types":"./dist/types.d.mts","default":"./dist/types.mjs"},"require":{"types":"./dist/types.d.ts","default":"./dist/types.js"},"default":{"types":"./dist/types.d.ts","default":"./dist/types.js"}},"./index":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./config":{"import":{"types":"./dist/config.d.mts","default":"./dist/config.mjs"},"require":{"types":"./dist/config.d.ts","default":"./dist/config.js"},"default":{"types":"./dist/config.d.ts","default":"./dist/config.js"}},"./clean":{"import":{"types":"./dist/clean.d.mts","default":"./dist/clean.mjs"},"require":{"types":"./dist/clean.d.ts","default":"./dist/clean.js"},"default":{"types":"./dist/clean.d.ts","default":"./dist/clean.js"}},"./build":{"import":{"types":"./dist/build/index.d.mts","default":"./dist/build/index.mjs"},"require":{"types":"./dist/build/index.d.ts","default":"./dist/build/index.js"},"default":{"types":"./dist/build/index.d.ts","default":"./dist/build/index.js"}},"./plugins/*":{"import":{"types":"./dist/plugins/*.d.mts","default":"./dist/plugins/*.mjs"},"require":{"types":"./dist/plugins/*.d.ts","default":"./dist/plugins/*.js"},"default":{"types":"./dist/plugins/*.d.ts","default":"./dist/plugins/*.js"}}},"types":"./dist/index.d.ts","files":["dist/**/*"],"keywords":["acidic","cyclone-ui","monorepo","storm","storm-ops","storm-stack","sullivanpj","unbuild"],"peerDependencies":{"@nx/devkit":"^20.3.1","@nx/js":"^20.3.1","@storm-software/build-tools":"workspace:*","@storm-software/config-tools":"workspace:*","@swc/core":"1.7.26","nx":"^20.3.1","rollup":"^4.29.1","typescript":"^5.7.2","unbuild":"^3.2.0"},"peerDependenciesMeta":{"@nx/devkit":{"optional":false},"@nx/js":{"optional":false},"@storm-software/build-tools":{"optional":false},"@storm-software/config-tools":{"optional":false},"@swc/core":{"optional":true},"nx":{"optional":false},"rollup":{"optional":false},"typescript":{"optional":false},"unbuild":{"optional":false}},"dependencies":{"@rollup/plugin-alias":"^5.1.1","@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.0","@rollup/plugin-replace":"^6.0.2","@rollup/pluginutils":"^5.1.4","commander":"^12.1.0","defu":"6.1.4","rollup":"^4.29.1","rollup-plugin-typescript2":"0.36.0"},"devDependencies":{"@nx/devkit":"^20.3.1","@nx/js":"^20.3.1","@storm-software/build-tools":"latest","@storm-software/config":"latest","@storm-software/config-tools":"latest","@swc/core":"1.7.26","@types/node":"^22.10.2","nx":"^20.3.1","tsup":"8.3.5","typescript":"^5.7.2","unbuild":"^3.2.0"},"publishConfig":{"access":"public"},"sideEffects":false}
|
package/dist/chunk-4REDJQMU.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
4
|
-
|
|
5
|
-
// src/plugins/type-definitions.ts
|
|
6
|
-
var _path = require('path');
|
|
7
|
-
var typeDefinitions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
8
|
-
name: "storm:dts-bundle",
|
|
9
|
-
async generateBundle(_opts, bundle) {
|
|
10
|
-
for (const file of Object.values(bundle)) {
|
|
11
|
-
if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
const hasDefaultExport = file.exports.includes("default");
|
|
15
|
-
const entrySourceFileName = _path.relative.call(void 0, options.projectRoot, file.facadeModuleId);
|
|
16
|
-
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
17
|
-
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
18
|
-
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
19
|
-
const dtsFileSource = hasDefaultExport ? `
|
|
20
|
-
export * from ${relativeSourceDtsName};
|
|
21
|
-
export { default } from ${relativeSourceDtsName};
|
|
22
|
-
` : `export * from ${relativeSourceDtsName};
|
|
23
|
-
`;
|
|
24
|
-
this.emitFile({
|
|
25
|
-
type: "asset",
|
|
26
|
-
fileName: dtsFileName,
|
|
27
|
-
source: dtsFileSource
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}), "typeDefinitions");
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.typeDefinitions = typeDefinitions;
|