@storm-software/unbuild 0.27.1 → 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 -14
- package/bin/unbuild.js +30 -15
- package/dist/build.cjs +2 -2
- package/dist/build.js +1 -1
- package/dist/{chunk-SN3G5SIP.cjs → chunk-QBOQBJ36.cjs} +29 -14
- package/dist/{chunk-DORAESSZ.js → chunk-ZE7ZBVLJ.js} +30 -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,16 +2989,23 @@ async function resolveOptions(options, config) {
|
|
|
2989
2989
|
tsconfig,
|
|
2990
2990
|
clean: false,
|
|
2991
2991
|
entries: entries.reduce((ret, entry) => {
|
|
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
|
+
}
|
|
2992
2999
|
ret.push({
|
|
2993
3000
|
builder: "mkdist",
|
|
2994
|
-
input:
|
|
3001
|
+
input: `./${entryPath}`,
|
|
2995
3002
|
outDir: joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2996
3003
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2997
3004
|
format: "esm"
|
|
2998
3005
|
});
|
|
2999
3006
|
ret.push({
|
|
3000
3007
|
builder: "mkdist",
|
|
3001
|
-
input:
|
|
3008
|
+
input: `./${entryPath}`,
|
|
3002
3009
|
outDir: joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
3003
3010
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
3004
3011
|
format: "cjs",
|
|
@@ -3130,18 +3137,26 @@ async function generatePackageJson(options) {
|
|
|
3130
3137
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3131
3138
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3132
3139
|
packageJson.exports ??= {};
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
const
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
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
|
+
}));
|
|
3145
3160
|
packageJson.main ??= "./dist/index.cjs";
|
|
3146
3161
|
packageJson.module ??= "./dist/index.mjs";
|
|
3147
3162
|
packageJson.types ??= "./dist/index.d.ts";
|
package/bin/unbuild.js
CHANGED
|
@@ -1319,7 +1319,7 @@ import defu4 from "defu";
|
|
|
1319
1319
|
import { Glob as Glob2 } from "glob";
|
|
1320
1320
|
import { existsSync as existsSync6 } from "node:fs";
|
|
1321
1321
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
1322
|
-
import { relative as relative4 } from "node:path";
|
|
1322
|
+
import { dirname as dirname3, relative as relative4 } from "node:path";
|
|
1323
1323
|
import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
|
|
1324
1324
|
|
|
1325
1325
|
// ../../node_modules/.pnpm/unbuild@3.3.1_sass@1.83.4_typescript@5.7.3/node_modules/unbuild/dist/shared/unbuild.B2_7OVir.mjs
|
|
@@ -2964,16 +2964,23 @@ async function resolveOptions(options, config) {
|
|
|
2964
2964
|
tsconfig,
|
|
2965
2965
|
clean: false,
|
|
2966
2966
|
entries: entries.reduce((ret, entry) => {
|
|
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
|
+
}
|
|
2967
2974
|
ret.push({
|
|
2968
2975
|
builder: "mkdist",
|
|
2969
|
-
input:
|
|
2976
|
+
input: `./${entryPath}`,
|
|
2970
2977
|
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2971
2978
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2972
2979
|
format: "esm"
|
|
2973
2980
|
});
|
|
2974
2981
|
ret.push({
|
|
2975
2982
|
builder: "mkdist",
|
|
2976
|
-
input:
|
|
2983
|
+
input: `./${entryPath}`,
|
|
2977
2984
|
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2978
2985
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2979
2986
|
format: "cjs",
|
|
@@ -3105,18 +3112,26 @@ async function generatePackageJson(options) {
|
|
|
3105
3112
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3106
3113
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3107
3114
|
packageJson.exports ??= {};
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
const
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
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
|
+
}));
|
|
3120
3135
|
packageJson.main ??= "./dist/index.cjs";
|
|
3121
3136
|
packageJson.module ??= "./dist/index.mjs";
|
|
3122
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,16 +2222,23 @@ async function resolveOptions(options, config) {
|
|
|
2222
2222
|
tsconfig,
|
|
2223
2223
|
clean: false,
|
|
2224
2224
|
entries: entries.reduce((ret, entry) => {
|
|
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
|
+
}
|
|
2225
2232
|
ret.push({
|
|
2226
2233
|
builder: "mkdist",
|
|
2227
|
-
input:
|
|
2234
|
+
input: `./${entryPath}`,
|
|
2228
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"),
|
|
2229
2236
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2230
2237
|
format: "esm"
|
|
2231
2238
|
});
|
|
2232
2239
|
ret.push({
|
|
2233
2240
|
builder: "mkdist",
|
|
2234
|
-
input:
|
|
2241
|
+
input: `./${entryPath}`,
|
|
2235
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"),
|
|
2236
2243
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2237
2244
|
format: "cjs",
|
|
@@ -2363,18 +2370,26 @@ async function generatePackageJson(options) {
|
|
|
2363
2370
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2364
2371
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2365
2372
|
packageJson.exports ??= {};
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
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
|
+
}));
|
|
2378
2393
|
packageJson.main ??= "./dist/index.cjs";
|
|
2379
2394
|
packageJson.module ??= "./dist/index.mjs";
|
|
2380
2395
|
packageJson.types ??= "./dist/index.d.ts";
|
|
@@ -729,7 +729,7 @@ import defu4 from "defu";
|
|
|
729
729
|
import { Glob as Glob2 } from "glob";
|
|
730
730
|
import { existsSync as existsSync4 } from "node:fs";
|
|
731
731
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
732
|
-
import { relative as relative3 } from "node:path";
|
|
732
|
+
import { dirname as dirname2, relative as relative3 } from "node:path";
|
|
733
733
|
import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
|
|
734
734
|
|
|
735
735
|
// ../../node_modules/.pnpm/unbuild@3.3.1_sass@1.83.4_typescript@5.7.3/node_modules/unbuild/dist/shared/unbuild.B2_7OVir.mjs
|
|
@@ -2221,16 +2221,23 @@ async function resolveOptions(options, config) {
|
|
|
2221
2221
|
tsconfig,
|
|
2222
2222
|
clean: false,
|
|
2223
2223
|
entries: entries.reduce((ret, entry) => {
|
|
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
|
+
}
|
|
2224
2231
|
ret.push({
|
|
2225
2232
|
builder: "mkdist",
|
|
2226
|
-
input:
|
|
2233
|
+
input: `./${entryPath}`,
|
|
2227
2234
|
outDir: joinPaths(relative3(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2228
2235
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2229
2236
|
format: "esm"
|
|
2230
2237
|
});
|
|
2231
2238
|
ret.push({
|
|
2232
2239
|
builder: "mkdist",
|
|
2233
|
-
input:
|
|
2240
|
+
input: `./${entryPath}`,
|
|
2234
2241
|
outDir: joinPaths(relative3(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
|
|
2235
2242
|
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2236
2243
|
format: "cjs",
|
|
@@ -2362,18 +2369,26 @@ async function generatePackageJson(options) {
|
|
|
2362
2369
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2363
2370
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2364
2371
|
packageJson.exports ??= {};
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
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
|
+
}));
|
|
2377
2392
|
packageJson.main ??= "./dist/index.cjs";
|
|
2378
2393
|
packageJson.module ??= "./dist/index.mjs";
|
|
2379
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.
|
|
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.
|
|
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",
|