@storm-software/unbuild 0.28.0 → 0.28.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.cjs +29 -15
- package/bin/unbuild.js +29 -15
- package/dist/build.cjs +2 -2
- package/dist/build.js +1 -1
- package/dist/{chunk-S2WZ2PGW.cjs → chunk-QBOQBJ36.cjs} +29 -15
- package/dist/{chunk-54R2TCTI.js → chunk-ZE7ZBVLJ.js} +29 -15
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +4 -4
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/bin/unbuild.cjs
CHANGED
|
@@ -2989,17 +2989,23 @@ async function resolveOptions(options, config) {
|
|
|
2989
2989
|
tsconfig,
|
|
2990
2990
|
clean: false,
|
|
2991
2991
|
entries: entries.reduce((ret, entry) => {
|
|
2992
|
-
|
|
2992
|
+
let entryPath = (0, import_node_path6.dirname)(entry.replace(options.projectRoot, ""));
|
|
2993
|
+
if (entryPath.startsWith(".")) {
|
|
2994
|
+
entryPath = entryPath.substring(1);
|
|
2995
|
+
}
|
|
2996
|
+
if (entryPath.startsWith("/")) {
|
|
2997
|
+
entryPath = entryPath.substring(1);
|
|
2998
|
+
}
|
|
2993
2999
|
ret.push({
|
|
2994
3000
|
builder: "mkdist",
|
|
2995
|
-
input:
|
|
3001
|
+
input: `./${entryPath}`,
|
|
2996
3002
|
outDir: joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2997
3003
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2998
3004
|
format: "esm"
|
|
2999
3005
|
});
|
|
3000
3006
|
ret.push({
|
|
3001
3007
|
builder: "mkdist",
|
|
3002
|
-
input:
|
|
3008
|
+
input: `./${entryPath}`,
|
|
3003
3009
|
outDir: joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
3004
3010
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
3005
3011
|
format: "cjs",
|
|
@@ -3131,18 +3137,26 @@ async function generatePackageJson(options) {
|
|
|
3131
3137
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3132
3138
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3133
3139
|
packageJson.exports ??= {};
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
const
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3140
|
+
await Promise.all(options.entries.reduce((ret, entry) => {
|
|
3141
|
+
const entryPath = typeof entry === "string" ? entry : entry.input;
|
|
3142
|
+
if (!ret.includes(entryPath)) {
|
|
3143
|
+
ret.push(entryPath);
|
|
3144
|
+
}
|
|
3145
|
+
return ret;
|
|
3146
|
+
}, []).map(async (entryPath) => {
|
|
3147
|
+
const files = await new import_glob4.Glob("**/*.{ts,tsx}", {
|
|
3148
|
+
absolute: false,
|
|
3149
|
+
cwd: entryPath,
|
|
3150
|
+
root: entryPath
|
|
3151
|
+
}).walk();
|
|
3152
|
+
files.forEach((file) => {
|
|
3153
|
+
addPackageJsonExport(file, packageJson.type, options.sourceRoot);
|
|
3154
|
+
const split = file.split(".");
|
|
3155
|
+
split.pop();
|
|
3156
|
+
const entry = split.join(".").replaceAll("\\", "/");
|
|
3157
|
+
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
|
|
3158
|
+
});
|
|
3159
|
+
}));
|
|
3146
3160
|
packageJson.main ??= "./dist/index.cjs";
|
|
3147
3161
|
packageJson.module ??= "./dist/index.mjs";
|
|
3148
3162
|
packageJson.types ??= "./dist/index.d.ts";
|
package/bin/unbuild.js
CHANGED
|
@@ -2964,17 +2964,23 @@ async function resolveOptions(options, config) {
|
|
|
2964
2964
|
tsconfig,
|
|
2965
2965
|
clean: false,
|
|
2966
2966
|
entries: entries.reduce((ret, entry) => {
|
|
2967
|
-
|
|
2967
|
+
let entryPath = dirname3(entry.replace(options.projectRoot, ""));
|
|
2968
|
+
if (entryPath.startsWith(".")) {
|
|
2969
|
+
entryPath = entryPath.substring(1);
|
|
2970
|
+
}
|
|
2971
|
+
if (entryPath.startsWith("/")) {
|
|
2972
|
+
entryPath = entryPath.substring(1);
|
|
2973
|
+
}
|
|
2968
2974
|
ret.push({
|
|
2969
2975
|
builder: "mkdist",
|
|
2970
|
-
input:
|
|
2976
|
+
input: `./${entryPath}`,
|
|
2971
2977
|
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2972
2978
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2973
2979
|
format: "esm"
|
|
2974
2980
|
});
|
|
2975
2981
|
ret.push({
|
|
2976
2982
|
builder: "mkdist",
|
|
2977
|
-
input:
|
|
2983
|
+
input: `./${entryPath}`,
|
|
2978
2984
|
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2979
2985
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2980
2986
|
format: "cjs",
|
|
@@ -3106,18 +3112,26 @@ async function generatePackageJson(options) {
|
|
|
3106
3112
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3107
3113
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3108
3114
|
packageJson.exports ??= {};
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3115
|
+
await Promise.all(options.entries.reduce((ret, entry) => {
|
|
3116
|
+
const entryPath = typeof entry === "string" ? entry : entry.input;
|
|
3117
|
+
if (!ret.includes(entryPath)) {
|
|
3118
|
+
ret.push(entryPath);
|
|
3119
|
+
}
|
|
3120
|
+
return ret;
|
|
3121
|
+
}, []).map(async (entryPath) => {
|
|
3122
|
+
const files = await new Glob2("**/*.{ts,tsx}", {
|
|
3123
|
+
absolute: false,
|
|
3124
|
+
cwd: entryPath,
|
|
3125
|
+
root: entryPath
|
|
3126
|
+
}).walk();
|
|
3127
|
+
files.forEach((file) => {
|
|
3128
|
+
addPackageJsonExport(file, packageJson.type, options.sourceRoot);
|
|
3129
|
+
const split = file.split(".");
|
|
3130
|
+
split.pop();
|
|
3131
|
+
const entry = split.join(".").replaceAll("\\", "/");
|
|
3132
|
+
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
|
|
3133
|
+
});
|
|
3134
|
+
}));
|
|
3121
3135
|
packageJson.main ??= "./dist/index.cjs";
|
|
3122
3136
|
packageJson.module ??= "./dist/index.mjs";
|
|
3123
3137
|
packageJson.types ??= "./dist/index.d.ts";
|
package/dist/build.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkQBOQBJ36cjs = require('./chunk-QBOQBJ36.cjs');
|
|
9
9
|
require('./chunk-5E3NJ26L.cjs');
|
|
10
10
|
require('./chunk-Y2DOCJBE.cjs');
|
|
11
11
|
require('./chunk-V627S7QU.cjs');
|
|
@@ -21,4 +21,4 @@ require('./chunk-YDYGZTJK.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
exports.build =
|
|
24
|
+
exports.build = _chunkQBOQBJ36cjs.build; exports.cleanOutputPath = _chunkQBOQBJ36cjs.cleanOutputPath; exports.copyBuildAssets = _chunkQBOQBJ36cjs.copyBuildAssets; exports.executeUnbuild = _chunkQBOQBJ36cjs.executeUnbuild; exports.generatePackageJson = _chunkQBOQBJ36cjs.generatePackageJson; exports.resolveOptions = _chunkQBOQBJ36cjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -2222,17 +2222,23 @@ async function resolveOptions(options, config) {
|
|
|
2222
2222
|
tsconfig,
|
|
2223
2223
|
clean: false,
|
|
2224
2224
|
entries: entries.reduce((ret, entry) => {
|
|
2225
|
-
|
|
2225
|
+
let entryPath = _path.dirname.call(void 0, entry.replace(options.projectRoot, ""));
|
|
2226
|
+
if (entryPath.startsWith(".")) {
|
|
2227
|
+
entryPath = entryPath.substring(1);
|
|
2228
|
+
}
|
|
2229
|
+
if (entryPath.startsWith("/")) {
|
|
2230
|
+
entryPath = entryPath.substring(1);
|
|
2231
|
+
}
|
|
2226
2232
|
ret.push({
|
|
2227
2233
|
builder: "mkdist",
|
|
2228
|
-
input:
|
|
2234
|
+
input: `./${entryPath}`,
|
|
2229
2235
|
outDir: _chunkFG6XQ26Mcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkFG6XQ26Mcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2230
2236
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2231
2237
|
format: "esm"
|
|
2232
2238
|
});
|
|
2233
2239
|
ret.push({
|
|
2234
2240
|
builder: "mkdist",
|
|
2235
|
-
input:
|
|
2241
|
+
input: `./${entryPath}`,
|
|
2236
2242
|
outDir: _chunkFG6XQ26Mcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkFG6XQ26Mcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2237
2243
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2238
2244
|
format: "cjs",
|
|
@@ -2364,18 +2370,26 @@ async function generatePackageJson(options) {
|
|
|
2364
2370
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2365
2371
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2366
2372
|
packageJson.exports ??= {};
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2373
|
+
await Promise.all(options.entries.reduce((ret, entry) => {
|
|
2374
|
+
const entryPath = typeof entry === "string" ? entry : entry.input;
|
|
2375
|
+
if (!ret.includes(entryPath)) {
|
|
2376
|
+
ret.push(entryPath);
|
|
2377
|
+
}
|
|
2378
|
+
return ret;
|
|
2379
|
+
}, []).map(async (entryPath) => {
|
|
2380
|
+
const files = await new (0, _glob.Glob)("**/*.{ts,tsx}", {
|
|
2381
|
+
absolute: false,
|
|
2382
|
+
cwd: entryPath,
|
|
2383
|
+
root: entryPath
|
|
2384
|
+
}).walk();
|
|
2385
|
+
files.forEach((file) => {
|
|
2386
|
+
addPackageJsonExport(file, packageJson.type, options.sourceRoot);
|
|
2387
|
+
const split = file.split(".");
|
|
2388
|
+
split.pop();
|
|
2389
|
+
const entry = split.join(".").replaceAll("\\", "/");
|
|
2390
|
+
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
|
|
2391
|
+
});
|
|
2392
|
+
}));
|
|
2379
2393
|
packageJson.main ??= "./dist/index.cjs";
|
|
2380
2394
|
packageJson.module ??= "./dist/index.mjs";
|
|
2381
2395
|
packageJson.types ??= "./dist/index.d.ts";
|
|
@@ -2221,17 +2221,23 @@ async function resolveOptions(options, config) {
|
|
|
2221
2221
|
tsconfig,
|
|
2222
2222
|
clean: false,
|
|
2223
2223
|
entries: entries.reduce((ret, entry) => {
|
|
2224
|
-
|
|
2224
|
+
let entryPath = dirname2(entry.replace(options.projectRoot, ""));
|
|
2225
|
+
if (entryPath.startsWith(".")) {
|
|
2226
|
+
entryPath = entryPath.substring(1);
|
|
2227
|
+
}
|
|
2228
|
+
if (entryPath.startsWith("/")) {
|
|
2229
|
+
entryPath = entryPath.substring(1);
|
|
2230
|
+
}
|
|
2225
2231
|
ret.push({
|
|
2226
2232
|
builder: "mkdist",
|
|
2227
|
-
input:
|
|
2233
|
+
input: `./${entryPath}`,
|
|
2228
2234
|
outDir: joinPaths(relative3(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2229
2235
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2230
2236
|
format: "esm"
|
|
2231
2237
|
});
|
|
2232
2238
|
ret.push({
|
|
2233
2239
|
builder: "mkdist",
|
|
2234
|
-
input:
|
|
2240
|
+
input: `./${entryPath}`,
|
|
2235
2241
|
outDir: joinPaths(relative3(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2236
2242
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2237
2243
|
format: "cjs",
|
|
@@ -2363,18 +2369,26 @@ async function generatePackageJson(options) {
|
|
|
2363
2369
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2364
2370
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2365
2371
|
packageJson.exports ??= {};
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2372
|
+
await Promise.all(options.entries.reduce((ret, entry) => {
|
|
2373
|
+
const entryPath = typeof entry === "string" ? entry : entry.input;
|
|
2374
|
+
if (!ret.includes(entryPath)) {
|
|
2375
|
+
ret.push(entryPath);
|
|
2376
|
+
}
|
|
2377
|
+
return ret;
|
|
2378
|
+
}, []).map(async (entryPath) => {
|
|
2379
|
+
const files = await new Glob2("**/*.{ts,tsx}", {
|
|
2380
|
+
absolute: false,
|
|
2381
|
+
cwd: entryPath,
|
|
2382
|
+
root: entryPath
|
|
2383
|
+
}).walk();
|
|
2384
|
+
files.forEach((file) => {
|
|
2385
|
+
addPackageJsonExport(file, packageJson.type, options.sourceRoot);
|
|
2386
|
+
const split = file.split(".");
|
|
2387
|
+
split.pop();
|
|
2388
|
+
const entry = split.join(".").replaceAll("\\", "/");
|
|
2389
|
+
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
|
|
2390
|
+
});
|
|
2391
|
+
}));
|
|
2378
2392
|
packageJson.main ??= "./dist/index.cjs";
|
|
2379
2393
|
packageJson.module ??= "./dist/index.mjs";
|
|
2380
2394
|
packageJson.types ??= "./dist/index.d.ts";
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkQBOQBJ36cjs = require('./chunk-QBOQBJ36.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -35,4 +35,4 @@ require('./chunk-YDYGZTJK.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.build =
|
|
38
|
+
exports.build = _chunkQBOQBJ36cjs.build; exports.clean = _chunk5E3NJ26Lcjs.clean; exports.cleanDirectories = _chunk5E3NJ26Lcjs.cleanDirectories; exports.cleanOutputPath = _chunkQBOQBJ36cjs.cleanOutputPath; exports.copyBuildAssets = _chunkQBOQBJ36cjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkV627S7QUcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkQBOQBJ36cjs.executeUnbuild; exports.generatePackageJson = _chunkQBOQBJ36cjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkY2DOCJBEcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkV627S7QUcjs.loadConfig; exports.resolveOptions = _chunkQBOQBJ36cjs.resolveOptions;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/unbuild",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -171,9 +171,9 @@
|
|
|
171
171
|
"@nx/devkit": "^20.3.1",
|
|
172
172
|
"@nx/js": "^20.3.1",
|
|
173
173
|
"@rollup/pluginutils": "^5.1.4",
|
|
174
|
-
"@storm-software/build-tools": "0.133.
|
|
175
|
-
"@storm-software/config": "1.97.
|
|
176
|
-
"@storm-software/config-tools": "1.140.
|
|
174
|
+
"@storm-software/build-tools": "0.133.1",
|
|
175
|
+
"@storm-software/config": "1.97.5",
|
|
176
|
+
"@storm-software/config-tools": "1.140.1",
|
|
177
177
|
"@swc/core": "1.7.26",
|
|
178
178
|
"@types/node": "^22.10.2",
|
|
179
179
|
"commander": "^12.1.0",
|