@storm-software/unbuild 0.35.0 → 0.35.2
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 -2
- package/bin/unbuild.cjs +40 -26
- package/bin/unbuild.js +40 -26
- package/dist/build.cjs +6 -7
- package/dist/build.d.cts +2 -0
- package/dist/build.d.ts +2 -0
- package/dist/build.js +5 -6
- package/dist/{chunk-WI52QJ54.js → chunk-3M7GEZDL.js} +7 -8
- package/dist/{chunk-GTRAQVBF.cjs → chunk-44QVHNBQ.cjs} +36 -6
- package/dist/{chunk-TUGA3ADZ.js → chunk-KXDOKQLW.js} +36 -6
- package/dist/{chunk-UELS4AUC.js → chunk-L3WYWYD4.js} +2 -2
- package/dist/{chunk-AGJ2KZ3K.cjs → chunk-N5KR37LU.cjs} +2 -2
- package/dist/{chunk-BDHZY5E7.cjs → chunk-OD3ULBE3.cjs} +4 -4
- package/dist/{chunk-ESRR2FD2.js → chunk-RBYYB7X2.js} +4 -4
- package/dist/{chunk-HHWS7REN.js → chunk-RFEZKCMQ.js} +3 -3
- package/dist/{chunk-SEWO2Q7T.cjs → chunk-Y7PS2HJA.cjs} +3 -3
- package/dist/{chunk-NGL4NRBA.cjs → chunk-ZPWH22ZM.cjs} +7 -8
- package/dist/index.cjs +7 -11
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -10
- package/dist/plugins/analyze.cjs +2 -2
- package/dist/plugins/analyze.d.cts +4 -2
- package/dist/plugins/analyze.d.ts +4 -2
- package/dist/plugins/analyze.js +1 -1
- package/dist/plugins/on-error.cjs +2 -2
- package/dist/plugins/on-error.d.cts +4 -2
- package/dist/plugins/on-error.d.ts +4 -2
- package/dist/plugins/on-error.js +1 -1
- package/dist/plugins/swc.cjs +1 -1
- package/dist/plugins/swc.d.cts +4 -2
- package/dist/plugins/swc.d.ts +4 -2
- package/dist/plugins/swc.js +1 -1
- package/dist/plugins/tsc.cjs +2 -2
- package/dist/plugins/tsc.d.cts +4 -2
- package/dist/plugins/tsc.d.ts +4 -2
- package/dist/plugins/tsc.js +1 -1
- package/dist/plugins/type-definitions.cjs +2 -2
- package/dist/plugins/type-definitions.d.cts +7 -2
- package/dist/plugins/type-definitions.d.ts +7 -2
- package/dist/plugins/type-definitions.js +3 -3
- package/dist/types.d.cts +47 -2
- package/dist/types.d.ts +47 -2
- package/package.json +3 -1
- package/dist/chunk-DL7OBOWN.cjs +0 -27
- package/dist/chunk-UYR662XD.js +0 -27
- package/dist/config.cjs +0 -12
- package/dist/config.d.cts +0 -8
- package/dist/config.d.ts +0 -8
- package/dist/config.js +0 -12
|
@@ -4,7 +4,7 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
4
4
|
|
|
5
5
|
// src/plugins/type-definitions.ts
|
|
6
6
|
var _path = require('path');
|
|
7
|
-
function
|
|
7
|
+
function typeDefinitionsPlugin(options) {
|
|
8
8
|
return {
|
|
9
9
|
name: "storm:dts-bundle",
|
|
10
10
|
async generateBundle(_opts, bundle) {
|
|
@@ -13,7 +13,7 @@ function typeDefinitions(projectRoot) {
|
|
|
13
13
|
continue;
|
|
14
14
|
}
|
|
15
15
|
const hasDefaultExport = file.exports.includes("default");
|
|
16
|
-
const entrySourceFileName = _path.relative.call(void 0, projectRoot, file.facadeModuleId);
|
|
16
|
+
const entrySourceFileName = _path.relative.call(void 0, options.projectRoot, file.facadeModuleId);
|
|
17
17
|
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
18
18
|
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
19
19
|
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
@@ -31,8 +31,8 @@ export { default } from ${relativeSourceDtsName};
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
_chunkBGYQAVKQcjs.__name.call(void 0,
|
|
34
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, typeDefinitionsPlugin, "typeDefinitionsPlugin");
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.
|
|
38
|
+
exports.typeDefinitionsPlugin = typeDefinitionsPlugin;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/plugins/type-definitions.ts
|
|
6
6
|
import { relative } from "node:path";
|
|
7
|
-
function
|
|
7
|
+
function typeDefinitionsPlugin(options) {
|
|
8
8
|
return {
|
|
9
9
|
name: "storm:dts-bundle",
|
|
10
10
|
async generateBundle(_opts, bundle) {
|
|
@@ -13,7 +13,7 @@ function typeDefinitions(projectRoot) {
|
|
|
13
13
|
continue;
|
|
14
14
|
}
|
|
15
15
|
const hasDefaultExport = file.exports.includes("default");
|
|
16
|
-
const entrySourceFileName = relative(projectRoot, file.facadeModuleId);
|
|
16
|
+
const entrySourceFileName = relative(options.projectRoot, file.facadeModuleId);
|
|
17
17
|
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
18
18
|
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
19
19
|
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
@@ -31,8 +31,8 @@ export { default } from ${relativeSourceDtsName};
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
__name(
|
|
34
|
+
__name(typeDefinitionsPlugin, "typeDefinitionsPlugin");
|
|
35
35
|
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
typeDefinitionsPlugin
|
|
38
38
|
};
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-3GQAWCBQ.js";
|
|
7
7
|
|
|
8
8
|
// src/plugins/on-error.ts
|
|
9
|
-
var onErrorPlugin = /* @__PURE__ */ __name((options
|
|
9
|
+
var onErrorPlugin = /* @__PURE__ */ __name((options) => ({
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
13
|
writeError(`The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
|
-
`,
|
|
16
|
+
`, options.config);
|
|
17
17
|
throw new Error("Storm unbuild process failed with errors.");
|
|
18
18
|
}
|
|
19
19
|
},
|
|
@@ -21,7 +21,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
21
21
|
writeError(`The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
|
-
`,
|
|
24
|
+
`, options.config);
|
|
25
25
|
throw new Error("Storm unbuild process failed with errors.");
|
|
26
26
|
}
|
|
27
27
|
}), "onErrorPlugin");
|
|
@@ -6,14 +6,14 @@ var _chunk5FQVMM7Icjs = require('./chunk-5FQVMM7I.cjs');
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
7
7
|
|
|
8
8
|
// src/plugins/on-error.ts
|
|
9
|
-
var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options
|
|
9
|
+
var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options) => ({
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
13
|
_chunk5FQVMM7Icjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
|
-
`,
|
|
16
|
+
`, options.config);
|
|
17
17
|
throw new Error("Storm unbuild process failed with errors.");
|
|
18
18
|
}
|
|
19
19
|
},
|
|
@@ -21,7 +21,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
21
21
|
_chunk5FQVMM7Icjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
|
-
`,
|
|
24
|
+
`, options.config);
|
|
25
25
|
throw new Error("Storm unbuild process failed with errors.");
|
|
26
26
|
}
|
|
27
27
|
}), "onErrorPlugin");
|
|
@@ -38,21 +38,20 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
38
38
|
_chunkBGYQAVKQcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
39
39
|
|
|
40
40
|
// src/plugins/tsc.ts
|
|
41
|
-
var tscPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (options
|
|
41
|
+
var tscPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (options) => {
|
|
42
42
|
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
43
|
-
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph,
|
|
43
|
+
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, options.config.workspaceRoot, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
44
44
|
let dependencies = result.dependencies;
|
|
45
|
-
const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc,
|
|
45
|
+
const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, options.tsconfig, dependencies, projectGraph, true);
|
|
46
46
|
if (tsLibDependency) {
|
|
47
47
|
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
48
48
|
dependencies.push(tsLibDependency);
|
|
49
49
|
}
|
|
50
|
+
const compilerOptions = await createTsCompilerOptions(options.config, options.tsconfig, options.projectRoot, dependencies);
|
|
50
51
|
return _rollupplugintypescript22.default.call(void 0, {
|
|
51
|
-
check: options.
|
|
52
|
-
tsconfig:
|
|
53
|
-
tsconfigOverride:
|
|
54
|
-
compilerOptions: await createTsCompilerOptions(resolvedOptions.config, resolvedOptions.tsconfig, resolvedOptions.projectRoot, dependencies)
|
|
55
|
-
}
|
|
52
|
+
check: options.declaration !== false,
|
|
53
|
+
tsconfig: options.tsconfig,
|
|
54
|
+
tsconfigOverride: compilerOptions
|
|
56
55
|
});
|
|
57
56
|
}, "tscPlugin");
|
|
58
57
|
|
package/dist/index.cjs
CHANGED
|
@@ -5,22 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk44QVHNBQcjs = require('./chunk-44QVHNBQ.cjs');
|
|
9
|
+
require('./chunk-OD3ULBE3.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
var _chunk3HGUCQU6cjs = require('./chunk-3HGUCQU6.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
require('./chunk-ORA4UQMU.cjs');
|
|
15
|
+
require('./chunk-N5KR37LU.cjs');
|
|
16
|
+
require('./chunk-Y7PS2HJA.cjs');
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
var
|
|
20
|
-
require('./chunk-BDHZY5E7.cjs');
|
|
21
|
-
require('./chunk-ORA4UQMU.cjs');
|
|
22
|
-
require('./chunk-AGJ2KZ3K.cjs');
|
|
23
|
-
require('./chunk-SEWO2Q7T.cjs');
|
|
20
|
+
var _chunkZPWH22ZMcjs = require('./chunk-ZPWH22ZM.cjs');
|
|
24
21
|
require('./chunk-5FQVMM7I.cjs');
|
|
25
22
|
require('./chunk-BGYQAVKQ.cjs');
|
|
26
23
|
|
|
@@ -34,5 +31,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
34
31
|
|
|
35
32
|
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
exports.build = _chunkGTRAQVBFcjs.build; exports.clean = _chunk3HGUCQU6cjs.clean; exports.cleanDirectories = _chunk3HGUCQU6cjs.cleanDirectories; exports.cleanOutputPath = _chunkGTRAQVBFcjs.cleanOutputPath; exports.copyBuildAssets = _chunkGTRAQVBFcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkNGL4NRBAcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkGTRAQVBFcjs.executeUnbuild; exports.generatePackageJson = _chunkGTRAQVBFcjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkDL7OBOWNcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkNGL4NRBAcjs.loadConfig; exports.resolveOptions = _chunkGTRAQVBFcjs.resolveOptions;
|
|
34
|
+
exports.build = _chunk44QVHNBQcjs.build; exports.clean = _chunk3HGUCQU6cjs.clean; exports.cleanDirectories = _chunk3HGUCQU6cjs.cleanDirectories; exports.cleanOutputPath = _chunk44QVHNBQcjs.cleanOutputPath; exports.copyBuildAssets = _chunk44QVHNBQcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkZPWH22ZMcjs.createTsCompilerOptions; exports.executeUnbuild = _chunk44QVHNBQcjs.executeUnbuild; exports.generatePackageJson = _chunk44QVHNBQcjs.generatePackageJson; exports.loadConfig = _chunkZPWH22ZMcjs.loadConfig; exports.resolveOptions = _chunk44QVHNBQcjs.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { build, cleanOutputPath, copyBuildAssets, executeUnbuild, generatePackageJson, resolveOptions } from './build.cjs';
|
|
2
2
|
export { clean, cleanDirectories } from './clean.cjs';
|
|
3
|
-
export {
|
|
4
|
-
export { DeepPartial, UnbuildCLIOptions, UnbuildOptions, UnbuildResolvedOptions } from './types.cjs';
|
|
3
|
+
export { DeepPartial, LoadFile, Loader, LoaderContext, LoaderInputFile, LoaderOptions, LoaderOutputFile, LoaderResult, Loaders, UnbuildCLIOptions, UnbuildOptions, UnbuildResolvedOptions } from './types.cjs';
|
|
5
4
|
import { DependentBuildableProjectNode } from '@nx/js/src/utils/buildable-libs-utils';
|
|
6
5
|
import { StormConfig } from '@storm-software/config';
|
|
7
6
|
import ts from 'typescript';
|
|
8
7
|
import { RollupBuildOptions } from 'unbuild';
|
|
9
8
|
import '@storm-software/config/types';
|
|
10
|
-
import 'rollup';
|
|
11
9
|
import '@storm-software/build-tools';
|
|
10
|
+
import 'esbuild';
|
|
11
|
+
import 'mkdist';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Load a rolldown configuration file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { build, cleanOutputPath, copyBuildAssets, executeUnbuild, generatePackageJson, resolveOptions } from './build.js';
|
|
2
2
|
export { clean, cleanDirectories } from './clean.js';
|
|
3
|
-
export {
|
|
4
|
-
export { DeepPartial, UnbuildCLIOptions, UnbuildOptions, UnbuildResolvedOptions } from './types.js';
|
|
3
|
+
export { DeepPartial, LoadFile, Loader, LoaderContext, LoaderInputFile, LoaderOptions, LoaderOutputFile, LoaderResult, Loaders, UnbuildCLIOptions, UnbuildOptions, UnbuildResolvedOptions } from './types.js';
|
|
5
4
|
import { DependentBuildableProjectNode } from '@nx/js/src/utils/buildable-libs-utils';
|
|
6
5
|
import { StormConfig } from '@storm-software/config';
|
|
7
6
|
import ts from 'typescript';
|
|
8
7
|
import { RollupBuildOptions } from 'unbuild';
|
|
9
8
|
import '@storm-software/config/types';
|
|
10
|
-
import 'rollup';
|
|
11
9
|
import '@storm-software/build-tools';
|
|
10
|
+
import 'esbuild';
|
|
11
|
+
import 'mkdist';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Load a rolldown configuration file
|
package/dist/index.js
CHANGED
|
@@ -5,22 +5,19 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KXDOKQLW.js";
|
|
9
|
+
import "./chunk-RBYYB7X2.js";
|
|
9
10
|
import {
|
|
10
11
|
clean,
|
|
11
12
|
cleanDirectories
|
|
12
13
|
} from "./chunk-2E6P5U5P.js";
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
import "./chunk-OULCUN6I.js";
|
|
15
|
+
import "./chunk-L3WYWYD4.js";
|
|
16
|
+
import "./chunk-RFEZKCMQ.js";
|
|
16
17
|
import {
|
|
17
18
|
createTsCompilerOptions,
|
|
18
19
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-ESRR2FD2.js";
|
|
21
|
-
import "./chunk-OULCUN6I.js";
|
|
22
|
-
import "./chunk-UELS4AUC.js";
|
|
23
|
-
import "./chunk-HHWS7REN.js";
|
|
20
|
+
} from "./chunk-3M7GEZDL.js";
|
|
24
21
|
import "./chunk-PLJQK2VX.js";
|
|
25
22
|
import "./chunk-3GQAWCBQ.js";
|
|
26
23
|
export {
|
|
@@ -32,7 +29,6 @@ export {
|
|
|
32
29
|
createTsCompilerOptions,
|
|
33
30
|
executeUnbuild,
|
|
34
31
|
generatePackageJson,
|
|
35
|
-
getDefaultBuildPlugins,
|
|
36
32
|
loadConfig,
|
|
37
33
|
resolveOptions
|
|
38
34
|
};
|
package/dist/plugins/analyze.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkN5KR37LUcjs = require('../chunk-N5KR37LU.cjs');
|
|
4
4
|
require('../chunk-5FQVMM7I.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.analyzePlugin =
|
|
8
|
+
exports.analyzePlugin = _chunkN5KR37LUcjs.analyzePlugin;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.cjs';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
|
-
declare const analyzePlugin: (options:
|
|
8
|
+
declare const analyzePlugin: (options: UnbuildResolvedOptions) => Plugin;
|
|
7
9
|
|
|
8
10
|
export { analyzePlugin };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.js';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
|
-
declare const analyzePlugin: (options:
|
|
8
|
+
declare const analyzePlugin: (options: UnbuildResolvedOptions) => Plugin;
|
|
7
9
|
|
|
8
10
|
export { analyzePlugin };
|
package/dist/plugins/analyze.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkY7PS2HJAcjs = require('../chunk-Y7PS2HJA.cjs');
|
|
4
4
|
require('../chunk-5FQVMM7I.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.onErrorPlugin =
|
|
8
|
+
exports.onErrorPlugin = _chunkY7PS2HJAcjs.onErrorPlugin;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.cjs';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Causes rollup to exit immediately with an error code.
|
|
8
10
|
*/
|
|
9
|
-
declare const onErrorPlugin: (options:
|
|
11
|
+
declare const onErrorPlugin: (options: UnbuildResolvedOptions) => Plugin;
|
|
10
12
|
|
|
11
13
|
export { onErrorPlugin };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.js';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Causes rollup to exit immediately with an error code.
|
|
8
10
|
*/
|
|
9
|
-
declare const onErrorPlugin: (options:
|
|
11
|
+
declare const onErrorPlugin: (options: UnbuildResolvedOptions) => Plugin;
|
|
10
12
|
|
|
11
13
|
export { onErrorPlugin };
|
package/dist/plugins/on-error.js
CHANGED
package/dist/plugins/swc.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkBGYQAVKQcjs = require('../chunk-BGYQAVKQ.cjs');
|
|
5
5
|
|
|
6
6
|
// src/plugins/swc.ts
|
|
7
|
-
var swcPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options
|
|
7
|
+
var swcPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options) => {
|
|
8
8
|
const { transform } = _chunkBGYQAVKQcjs.__require.call(void 0, "@swc/core");
|
|
9
9
|
return {
|
|
10
10
|
name: "storm:swc",
|
package/dist/plugins/swc.d.cts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.cjs';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
|
-
declare const swcPlugin: (options:
|
|
8
|
+
declare const swcPlugin: (options: UnbuildResolvedOptions) => Plugin;
|
|
7
9
|
|
|
8
10
|
export { swcPlugin };
|
package/dist/plugins/swc.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.js';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
|
-
declare const swcPlugin: (options:
|
|
8
|
+
declare const swcPlugin: (options: UnbuildResolvedOptions) => Plugin;
|
|
7
9
|
|
|
8
10
|
export { swcPlugin };
|
package/dist/plugins/swc.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../chunk-3GQAWCBQ.js";
|
|
5
5
|
|
|
6
6
|
// src/plugins/swc.ts
|
|
7
|
-
var swcPlugin = /* @__PURE__ */ __name((options
|
|
7
|
+
var swcPlugin = /* @__PURE__ */ __name((options) => {
|
|
8
8
|
const { transform } = __require("@swc/core");
|
|
9
9
|
return {
|
|
10
10
|
name: "storm:swc",
|
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZPWH22ZMcjs = require('../chunk-ZPWH22ZM.cjs');
|
|
4
4
|
require('../chunk-5FQVMM7I.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkZPWH22ZMcjs.tscPlugin;
|
package/dist/plugins/tsc.d.cts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.cjs';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
|
-
declare const tscPlugin: (options:
|
|
8
|
+
declare const tscPlugin: (options: UnbuildResolvedOptions) => Promise<Plugin<any>>;
|
|
7
9
|
|
|
8
10
|
export { tscPlugin };
|
package/dist/plugins/tsc.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import {
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.js';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
4
6
|
import 'unbuild';
|
|
5
7
|
|
|
6
|
-
declare const tscPlugin: (options:
|
|
8
|
+
declare const tscPlugin: (options: UnbuildResolvedOptions) => Promise<Plugin<any>>;
|
|
7
9
|
|
|
8
10
|
export { tscPlugin };
|
package/dist/plugins/tsc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOD3ULBE3cjs = require('../chunk-OD3ULBE3.cjs');
|
|
4
4
|
require('../chunk-BGYQAVKQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.
|
|
7
|
+
exports.typeDefinitionsPlugin = _chunkOD3ULBE3cjs.typeDefinitionsPlugin;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.cjs';
|
|
3
|
+
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
6
|
+
import 'unbuild';
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* This plugin takes all entry-points from the generated bundle and creates a
|
|
@@ -14,6 +19,6 @@ import { Plugin } from 'rollup';
|
|
|
14
19
|
* @param projectRoot - The root of the project.
|
|
15
20
|
* @returns The Rollup plugin.
|
|
16
21
|
*/
|
|
17
|
-
declare function
|
|
22
|
+
declare function typeDefinitionsPlugin(options: UnbuildResolvedOptions): Plugin;
|
|
18
23
|
|
|
19
|
-
export {
|
|
24
|
+
export { typeDefinitionsPlugin };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
+
import { UnbuildResolvedOptions } from '../types.js';
|
|
3
|
+
import '@storm-software/build-tools';
|
|
4
|
+
import 'esbuild';
|
|
5
|
+
import 'mkdist';
|
|
6
|
+
import 'unbuild';
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* This plugin takes all entry-points from the generated bundle and creates a
|
|
@@ -14,6 +19,6 @@ import { Plugin } from 'rollup';
|
|
|
14
19
|
* @param projectRoot - The root of the project.
|
|
15
20
|
* @returns The Rollup plugin.
|
|
16
21
|
*/
|
|
17
|
-
declare function
|
|
22
|
+
declare function typeDefinitionsPlugin(options: UnbuildResolvedOptions): Plugin;
|
|
18
23
|
|
|
19
|
-
export {
|
|
24
|
+
export { typeDefinitionsPlugin };
|
package/dist/types.d.cts
CHANGED
|
@@ -1,9 +1,45 @@
|
|
|
1
1
|
import { TypeScriptBuildOptions, TypeScriptBuildResolvedOptions, AdditionalCLIOptions } from '@storm-software/build-tools';
|
|
2
|
-
import {
|
|
2
|
+
import { CommonOptions } from 'esbuild';
|
|
3
|
+
import { MkdistOptions } from 'mkdist';
|
|
4
|
+
import { BuildOptions, RollupBuildOptions, BuildContext, MkdistBuildEntry, BuildConfig } from 'unbuild';
|
|
3
5
|
|
|
4
6
|
type DeepPartial<T> = T extends object ? {
|
|
5
7
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
6
8
|
} : T;
|
|
9
|
+
interface LoaderInputFile {
|
|
10
|
+
path: string;
|
|
11
|
+
extension: string;
|
|
12
|
+
srcPath?: string;
|
|
13
|
+
getContents: () => Promise<string> | string;
|
|
14
|
+
}
|
|
15
|
+
interface LoaderOutputFile {
|
|
16
|
+
/**
|
|
17
|
+
* relative to distDir
|
|
18
|
+
*/
|
|
19
|
+
path: string;
|
|
20
|
+
srcPath?: string;
|
|
21
|
+
extension?: string;
|
|
22
|
+
contents?: string;
|
|
23
|
+
declaration?: boolean;
|
|
24
|
+
errors?: Error[];
|
|
25
|
+
raw?: boolean;
|
|
26
|
+
skip?: boolean;
|
|
27
|
+
}
|
|
28
|
+
type LoaderResult = LoaderOutputFile[] | undefined;
|
|
29
|
+
type LoadFile = (input: LoaderInputFile) => LoaderResult | Promise<LoaderResult>;
|
|
30
|
+
interface LoaderOptions {
|
|
31
|
+
ext?: "js" | "mjs" | "cjs" | "ts" | "mts" | "cts";
|
|
32
|
+
format?: "cjs" | "esm";
|
|
33
|
+
declaration?: boolean;
|
|
34
|
+
esbuild?: CommonOptions;
|
|
35
|
+
postcss?: false | Record<string, any>;
|
|
36
|
+
}
|
|
37
|
+
interface LoaderContext {
|
|
38
|
+
loadFile: LoadFile;
|
|
39
|
+
options: LoaderOptions;
|
|
40
|
+
}
|
|
41
|
+
type Loader = (input: LoaderInputFile, context: LoaderContext) => LoaderResult | Promise<LoaderResult>;
|
|
42
|
+
type Loaders = ("js" | "vue" | "sass" | "postcss" | Loader)[];
|
|
7
43
|
type UnbuildOptions = Omit<Partial<BuildOptions>, "entries" | "rootDir" | "externals" | "rollupConfig" | "outDir" | "declaration" | "format" | "parallel"> & Omit<TypeScriptBuildOptions, "entry" | "format"> & {
|
|
8
44
|
/**
|
|
9
45
|
* The directories to run the build process out of
|
|
@@ -19,7 +55,16 @@ type UnbuildOptions = Omit<Partial<BuildOptions>, "entries" | "rootDir" | "exter
|
|
|
19
55
|
* Path to a unbuild configuration file relative to the project root
|
|
20
56
|
*/
|
|
21
57
|
configPath?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Should the build process emit declaration files
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue `true`
|
|
62
|
+
*/
|
|
22
63
|
emitTypes?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Override the loader options used in the build process
|
|
66
|
+
*/
|
|
67
|
+
loaders?: Loaders | ((ctx: BuildContext, entry: MkdistBuildEntry, opts: MkdistOptions) => Loaders | Promise<Loaders>);
|
|
23
68
|
};
|
|
24
69
|
type UnbuildResolvedOptions = Omit<TypeScriptBuildResolvedOptions, "entryPoints" | "external" | "emitTypes"> & BuildConfig & {
|
|
25
70
|
/**
|
|
@@ -33,4 +78,4 @@ type UnbuildResolvedOptions = Omit<TypeScriptBuildResolvedOptions, "entryPoints"
|
|
|
33
78
|
};
|
|
34
79
|
type UnbuildCLIOptions = AdditionalCLIOptions & Pick<UnbuildOptions, "name" | "outputPath" | "platform" | "bundle" | "target" | "watch" | "clean" | "debug" | "banner" | "footer" | "splitting" | "treeShaking" | "generatePackageJson" | "metafile" | "minify" | "includeSrc" | "verbose" | "emitTypes">;
|
|
35
80
|
|
|
36
|
-
export type { DeepPartial, UnbuildCLIOptions, UnbuildOptions, UnbuildResolvedOptions };
|
|
81
|
+
export type { DeepPartial, LoadFile, Loader, LoaderContext, LoaderInputFile, LoaderOptions, LoaderOutputFile, LoaderResult, Loaders, UnbuildCLIOptions, UnbuildOptions, UnbuildResolvedOptions };
|