@storm-software/unbuild 0.20.0 → 0.21.0
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 +13665 -263
- package/bin/unbuild.mjs +13673 -271
- package/dist/build.js +9 -10
- package/dist/build.mjs +8 -9
- package/dist/{chunk-XI6ZXBUG.js → chunk-3KCZOJ2Q.js} +119 -135
- package/dist/{chunk-ZUXO7HQP.js → chunk-3OJD7CO4.js} +8 -5
- package/dist/chunk-AICX43E6.mjs +13496 -0
- package/dist/{chunk-I24R5RY2.mjs → chunk-AYFS4N2Z.mjs} +46 -62
- 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-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,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 _chunk3KCZOJ2Qjs = require('./chunk-3KCZOJ2Q.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 = _chunk3KCZOJ2Qjs.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-AYFS4N2Z.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.
|
|
1
|
+
{"name":"@storm-software/unbuild","version":"0.21.0","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":"workspace:*","@storm-software/config":"workspace:*","@storm-software/config-tools":"workspace:*","@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;
|
package/dist/chunk-ITLNJJHL.mjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
writeTrace
|
|
3
|
-
} from "./chunk-5SOSUWM3.mjs";
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-LPEX4YW6.mjs";
|
|
7
|
-
|
|
8
|
-
// src/plugins/tsc.ts
|
|
9
|
-
import { createProjectGraphAsync } from "@nx/devkit";
|
|
10
|
-
import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
|
|
11
|
-
import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
|
|
12
|
-
import ts2Plugin from "rollup-plugin-typescript2";
|
|
13
|
-
|
|
14
|
-
// src/utilities/helpers.ts
|
|
15
|
-
import { joinPathFragments } from "@nx/devkit";
|
|
16
|
-
import { computeCompilerOptionsPaths } from "@nx/js/src/utils/buildable-libs-utils";
|
|
17
|
-
import { dirname, extname } from "node:path";
|
|
18
|
-
import { pathToFileURL } from "node:url";
|
|
19
|
-
import ts from "typescript";
|
|
20
|
-
async function loadConfig(configPath) {
|
|
21
|
-
if (!/\.(js|mjs)$/.test(extname(configPath))) {
|
|
22
|
-
throw new Error("Unsupported config file format");
|
|
23
|
-
}
|
|
24
|
-
return import(pathToFileURL(configPath).toString()).then((config) => config.default);
|
|
25
|
-
}
|
|
26
|
-
__name(loadConfig, "loadConfig");
|
|
27
|
-
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
28
|
-
const tsConfigFile = ts.readConfigFile(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath), ts.sys.readFile);
|
|
29
|
-
const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, dirname(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
30
|
-
const compilerOptions = {
|
|
31
|
-
rootDir: projectRoot,
|
|
32
|
-
declaration: true,
|
|
33
|
-
paths: computeCompilerOptionsPaths(tsConfig, dependencies ?? [])
|
|
34
|
-
};
|
|
35
|
-
writeTrace(compilerOptions, config);
|
|
36
|
-
return compilerOptions;
|
|
37
|
-
}
|
|
38
|
-
__name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
39
|
-
|
|
40
|
-
// src/plugins/tsc.ts
|
|
41
|
-
var tscPlugin = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
|
|
42
|
-
const projectGraph = await createProjectGraphAsync({
|
|
43
|
-
exitOnError: true
|
|
44
|
-
});
|
|
45
|
-
const result = calculateProjectBuildableDependencies(void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
46
|
-
let dependencies = result.dependencies;
|
|
47
|
-
const tsLibDependency = getHelperDependency(HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
|
|
48
|
-
if (tsLibDependency) {
|
|
49
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
50
|
-
dependencies.push(tsLibDependency);
|
|
51
|
-
}
|
|
52
|
-
return ts2Plugin({
|
|
53
|
-
check: options.emitTypes !== false,
|
|
54
|
-
tsconfig: resolvedOptions.tsconfig,
|
|
55
|
-
tsconfigOverride: {
|
|
56
|
-
compilerOptions: await createTsCompilerOptions(resolvedOptions.config, resolvedOptions.tsconfig, resolvedOptions.projectRoot, dependencies)
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}, "tscPlugin");
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
loadConfig,
|
|
63
|
-
createTsCompilerOptions,
|
|
64
|
-
tscPlugin
|
|
65
|
-
};
|
package/dist/chunk-KTRDC23G.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name,
|
|
3
|
-
__require
|
|
4
|
-
} from "./chunk-LPEX4YW6.mjs";
|
|
5
|
-
|
|
6
|
-
// src/plugins/swc.ts
|
|
7
|
-
var swcPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
8
|
-
const { transform } = __require("@swc/core");
|
|
9
|
-
return {
|
|
10
|
-
name: "storm:swc",
|
|
11
|
-
transform(code, filename) {
|
|
12
|
-
return transform(code, {
|
|
13
|
-
filename,
|
|
14
|
-
jsc: {
|
|
15
|
-
transform: {
|
|
16
|
-
react: {
|
|
17
|
-
runtime: "automatic"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}, "swcPlugin");
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
swcPlugin
|
|
28
|
-
};
|
package/dist/chunk-L73LP5QX.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkYNOD6WE4js = require('./chunk-YNOD6WE4.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunk4REDJQMUjs = require('./chunk-4REDJQMU.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkJOAJEBTWjs = require('./chunk-JOAJEBTW.js');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkQUQ5VOD7js = require('./chunk-QUQ5VOD7.js');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunkV2LF4EEMjs = require('./chunk-V2LF4EEM.js');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
19
|
-
|
|
20
|
-
// src/config.ts
|
|
21
|
-
var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
|
|
22
|
-
_chunkJOAJEBTWjs.analyzePlugin.call(void 0, options, resolvedOptions),
|
|
23
|
-
_chunkV2LF4EEMjs.swcPlugin.call(void 0, options, resolvedOptions),
|
|
24
|
-
_chunk4REDJQMUjs.typeDefinitions.call(void 0, options, resolvedOptions),
|
|
25
|
-
_chunkYNOD6WE4js.tscPlugin.call(void 0, options, resolvedOptions),
|
|
26
|
-
_chunkQUQ5VOD7js.onErrorPlugin.call(void 0, options, resolvedOptions)
|
|
27
|
-
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.getDefaultBuildPlugins = getDefaultBuildPlugins;
|
package/dist/chunk-TYJGNL6P.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
-
|
|
5
|
-
// src/plugins/type-definitions.ts
|
|
6
|
-
import { relative } from "node:path";
|
|
7
|
-
var typeDefinitions = /* @__PURE__ */ __name((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 = relative(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
|
-
export {
|
|
34
|
-
typeDefinitions
|
|
35
|
-
};
|
package/dist/chunk-V2LF4EEM.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
5
|
-
|
|
6
|
-
// src/plugins/swc.ts
|
|
7
|
-
var swcPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
8
|
-
const { transform } = _chunk3GQAWCBQjs.__require.call(void 0, "@swc/core");
|
|
9
|
-
return {
|
|
10
|
-
name: "storm:swc",
|
|
11
|
-
transform(code, filename) {
|
|
12
|
-
return transform(code, {
|
|
13
|
-
filename,
|
|
14
|
-
jsc: {
|
|
15
|
-
transform: {
|
|
16
|
-
react: {
|
|
17
|
-
runtime: "automatic"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}, "swcPlugin");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.swcPlugin = swcPlugin;
|