@powerlines/plugin-tsup 0.12.351 → 0.12.352
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/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/helpers/index.cjs +4 -4
- package/dist/helpers/index.d.cts +2 -2
- package/dist/helpers/index.d.mts +2 -2
- package/dist/helpers/resolve-options.cjs +84 -4
- package/dist/helpers/resolve-options.d.cts +25 -2
- package/dist/helpers/resolve-options.d.cts.map +1 -0
- package/dist/helpers/resolve-options.d.mts +25 -2
- package/dist/helpers/resolve-options.d.mts.map +1 -0
- package/dist/helpers/unplugin.cjs +1 -1
- package/dist/helpers/unplugin.d.cts +8 -2
- package/dist/helpers/unplugin.d.cts.map +1 -0
- package/dist/helpers/unplugin.d.mts +8 -2
- package/dist/helpers/unplugin.d.mts.map +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/build.d.cts +8 -2
- package/dist/types/build.d.cts.map +1 -0
- package/dist/types/build.d.mts +8 -2
- package/dist/types/build.d.mts.map +1 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/plugin.d.cts +19 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +19 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/package.json +5 -6
- package/dist/build-D4pj3EFA.d.mts +0 -8
- package/dist/build-D4pj3EFA.d.mts.map +0 -1
- package/dist/build-MBkBmIxx.d.cts +0 -8
- package/dist/build-MBkBmIxx.d.cts.map +0 -1
- package/dist/index-BtBZHVmz.d.cts +0 -1
- package/dist/index-DXRuzH8z.d.mts +0 -1
- package/dist/plugin-BIuRBrWM.d.mts +0 -19
- package/dist/plugin-BIuRBrWM.d.mts.map +0 -1
- package/dist/plugin-DzOlv8wK.d.cts +0 -19
- package/dist/plugin-DzOlv8wK.d.cts.map +0 -1
- package/dist/resolve-options-Di8petwJ.cjs +0 -132
- package/dist/resolve-options-NvMOPAjJ.d.mts +0 -25
- package/dist/resolve-options-NvMOPAjJ.d.mts.map +0 -1
- package/dist/resolve-options-xL3h8JXO.d.cts +0 -25
- package/dist/resolve-options-xL3h8JXO.d.cts.map +0 -1
- package/dist/unplugin-BH9mbtdJ.d.cts +0 -8
- package/dist/unplugin-BH9mbtdJ.d.cts.map +0 -1
- package/dist/unplugin-DcUEt0nN.d.mts +0 -8
- package/dist/unplugin-DcUEt0nN.d.mts.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_helpers_resolve_options = require('./resolve-options.cjs');
|
|
3
3
|
const require_helpers_unplugin = require('./unplugin.cjs');
|
|
4
4
|
|
|
5
|
-
exports.DEFAULT_TSUP_CONFIG =
|
|
5
|
+
exports.DEFAULT_TSUP_CONFIG = require_helpers_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
6
6
|
exports.createTsupPlugin = require_helpers_unplugin.createTsupPlugin;
|
|
7
|
-
exports.resolveEntry =
|
|
8
|
-
exports.resolveOptions =
|
|
7
|
+
exports.resolveEntry = require_helpers_resolve_options.resolveEntry;
|
|
8
|
+
exports.resolveOptions = require_helpers_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./resolve-options.cjs";
|
|
2
|
+
import { createTsupPlugin } from "./unplugin.cjs";
|
|
3
3
|
export { DEFAULT_TSUP_CONFIG, createTsupPlugin, resolveEntry, resolveOptions };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./resolve-options.mjs";
|
|
2
|
+
import { createTsupPlugin } from "./unplugin.mjs";
|
|
3
3
|
export { DEFAULT_TSUP_CONFIG, createTsupPlugin, resolveEntry, resolveOptions };
|
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let defu = require("defu");
|
|
4
|
+
defu = require_runtime.__toESM(defu);
|
|
5
|
+
let _powerlines_plugin_esbuild_helpers_resolve_options = require("@powerlines/plugin-esbuild/helpers/resolve-options");
|
|
6
|
+
let _storm_software_tsup_constants = require("@storm-software/tsup/constants");
|
|
7
|
+
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
8
|
+
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
9
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
//#region src/helpers/resolve-options.ts
|
|
12
|
+
const DEFAULT_TSUP_CONFIG = {
|
|
13
|
+
..._storm_software_tsup_constants.DEFAULT_BUILD_OPTIONS,
|
|
14
|
+
target: "esnext",
|
|
15
|
+
config: false,
|
|
16
|
+
minify: true,
|
|
17
|
+
sourcemap: false,
|
|
18
|
+
cjsInterop: true,
|
|
19
|
+
bundle: true,
|
|
20
|
+
dts: true,
|
|
21
|
+
shims: true,
|
|
22
|
+
silent: true,
|
|
23
|
+
treeshake: true,
|
|
24
|
+
keepNames: true,
|
|
25
|
+
splitting: true,
|
|
26
|
+
banner: {}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
30
|
+
*
|
|
31
|
+
* @param context - The build context.
|
|
32
|
+
* @param entryPoints - The entry points to resolve.
|
|
33
|
+
* @returns The resolved entry options.
|
|
34
|
+
*/
|
|
35
|
+
function resolveEntry(context, entryPoints) {
|
|
36
|
+
return (0, _powerlines_plugin_esbuild_helpers_resolve_options.resolveEntry)(context, entryPoints);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
40
|
+
*
|
|
41
|
+
* @param context - The build context.
|
|
42
|
+
* @returns The resolved options.
|
|
43
|
+
*/
|
|
44
|
+
function resolveOptions(context) {
|
|
45
|
+
const result = (0, defu.default)({
|
|
46
|
+
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, (0, _stryke_path_append.appendPath)(value, context.config.root)])),
|
|
47
|
+
esbuildOptions: ((options, ctx) => {
|
|
48
|
+
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
49
|
+
options.alias = {
|
|
50
|
+
...context.alias,
|
|
51
|
+
...context.builtins.reduce((ret, id) => {
|
|
52
|
+
const path = context.fs.paths[id];
|
|
53
|
+
if (path) ret[id] = path;
|
|
54
|
+
return ret;
|
|
55
|
+
}, {}),
|
|
56
|
+
...options.alias
|
|
57
|
+
};
|
|
58
|
+
}),
|
|
59
|
+
noExternal: context.builtins
|
|
60
|
+
}, context.config.tsup ? context.config.tsup : {}, {
|
|
61
|
+
name: context.config.name,
|
|
62
|
+
root: context.config.root,
|
|
63
|
+
projectRoot: context.config.root,
|
|
64
|
+
assets: context.config.output.assets,
|
|
65
|
+
resolveExtensions: context.config.resolve.extensions,
|
|
66
|
+
outputPath: context.config.output.buildPath,
|
|
67
|
+
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
68
|
+
dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
|
|
69
|
+
format: context.config.output.format,
|
|
70
|
+
mode: context.config.mode,
|
|
71
|
+
treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
|
|
72
|
+
minify: context.config.mode !== "development",
|
|
73
|
+
metafile: context.config.mode === "development",
|
|
74
|
+
sourcemap: context.config.mode === "development",
|
|
75
|
+
silent: context.config.logLevel === null || context.config.mode === "production",
|
|
76
|
+
verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
|
|
77
|
+
workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }
|
|
78
|
+
}, DEFAULT_TSUP_CONFIG);
|
|
79
|
+
result.format = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(result.format));
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
exports.DEFAULT_TSUP_CONFIG = DEFAULT_TSUP_CONFIG;
|
|
85
|
+
exports.resolveEntry = resolveEntry;
|
|
86
|
+
exports.resolveOptions = resolveOptions;
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TsupOptions } from "../types/build.cjs";
|
|
2
|
+
import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
|
|
3
|
+
import { Entry } from "@storm-software/build-tools/types";
|
|
4
|
+
import { resolveOptions as resolveOptions$1 } from "@storm-software/tsup";
|
|
5
|
+
|
|
6
|
+
//#region src/helpers/resolve-options.d.ts
|
|
7
|
+
declare const DEFAULT_TSUP_CONFIG: Partial<TsupOptions>;
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
10
|
+
*
|
|
11
|
+
* @param context - The build context.
|
|
12
|
+
* @param entryPoints - The entry points to resolve.
|
|
13
|
+
* @returns The resolved entry options.
|
|
14
|
+
*/
|
|
15
|
+
declare function resolveEntry(context: Context, entryPoints: ResolvedEntryTypeDefinition[] | string[]): Entry;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
18
|
+
*
|
|
19
|
+
* @param context - The build context.
|
|
20
|
+
* @returns The resolved options.
|
|
21
|
+
*/
|
|
22
|
+
declare function resolveOptions(context: Context): Parameters<typeof resolveOptions$1>[0];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions };
|
|
25
|
+
//# sourceMappingURL=resolve-options.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options.d.cts","names":[],"sources":["../../src/helpers/resolve-options.ts"],"mappings":";;;;;;cA8Ba,mBAAA,EAAqB,OAAA,CAAQ,WAAA;;;AAA1C;;;;;iBAwBgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,EAAa,2BAAA,gBACZ,KAAA;;;;;;;iBAsBa,cAAA,CACd,OAAA,EAAS,OAAA,GACR,UAAA,QAAkB,gBAAA"}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TsupOptions } from "../types/build.mjs";
|
|
2
|
+
import { resolveOptions as resolveOptions$1 } from "@storm-software/tsup";
|
|
3
|
+
import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
|
|
4
|
+
import { Entry } from "@storm-software/build-tools/types";
|
|
5
|
+
|
|
6
|
+
//#region src/helpers/resolve-options.d.ts
|
|
7
|
+
declare const DEFAULT_TSUP_CONFIG: Partial<TsupOptions>;
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
10
|
+
*
|
|
11
|
+
* @param context - The build context.
|
|
12
|
+
* @param entryPoints - The entry points to resolve.
|
|
13
|
+
* @returns The resolved entry options.
|
|
14
|
+
*/
|
|
15
|
+
declare function resolveEntry(context: Context, entryPoints: ResolvedEntryTypeDefinition[] | string[]): Entry;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
18
|
+
*
|
|
19
|
+
* @param context - The build context.
|
|
20
|
+
* @returns The resolved options.
|
|
21
|
+
*/
|
|
22
|
+
declare function resolveOptions(context: Context): Parameters<typeof resolveOptions$1>[0];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions };
|
|
25
|
+
//# sourceMappingURL=resolve-options.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options.d.mts","names":[],"sources":["../../src/helpers/resolve-options.ts"],"mappings":";;;;;;cA8Ba,mBAAA,EAAqB,OAAA,CAAQ,WAAA;;;AAA1C;;;;;iBAwBgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,EAAa,2BAAA,gBACZ,KAAA;;;;;;;iBAsBa,cAAA,CACd,OAAA,EAAS,OAAA,GACR,UAAA,QAAkB,gBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
4
4
|
let unplugin = require("unplugin");
|
|
5
5
|
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TsupPluginContext } from "../types/plugin.cjs";
|
|
2
|
+
import * as esbuild from "esbuild";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/unplugin.d.ts
|
|
5
|
+
declare function createTsupPlugin(context: TsupPluginContext): esbuild.Plugin;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createTsupPlugin };
|
|
8
|
+
//# sourceMappingURL=unplugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAiB,OAAA,CAAA,MAAA"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TsupPluginContext } from "../types/plugin.mjs";
|
|
2
|
+
import * as esbuild from "esbuild";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/unplugin.d.ts
|
|
5
|
+
declare function createTsupPlugin(context: TsupPluginContext): esbuild.Plugin;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createTsupPlugin };
|
|
8
|
+
//# sourceMappingURL=unplugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAiB,OAAA,CAAA,MAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_helpers_resolve_options = require('./helpers/resolve-options.cjs');
|
|
3
4
|
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
4
5
|
require('./helpers/index.cjs');
|
|
5
|
-
require('./types/index.cjs');
|
|
6
6
|
let _storm_software_tsup = require("@storm-software/tsup");
|
|
7
7
|
let defu = require("defu");
|
|
8
|
-
defu =
|
|
8
|
+
defu = require_runtime.__toESM(defu);
|
|
9
9
|
|
|
10
10
|
//#region src/index.ts
|
|
11
11
|
/**
|
|
@@ -22,15 +22,15 @@ const plugin = (options = {}) => {
|
|
|
22
22
|
};
|
|
23
23
|
},
|
|
24
24
|
async build() {
|
|
25
|
-
return (0, _storm_software_tsup.build)(await (0, _storm_software_tsup.resolveOptions)((0, defu.default)(
|
|
25
|
+
return (0, _storm_software_tsup.build)(await (0, _storm_software_tsup.resolveOptions)((0, defu.default)(require_helpers_resolve_options.resolveOptions(this), { esbuildPlugins: [require_helpers_unplugin.createTsupPlugin(this)] })));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
//#endregion
|
|
31
|
-
exports.DEFAULT_TSUP_CONFIG =
|
|
31
|
+
exports.DEFAULT_TSUP_CONFIG = require_helpers_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
32
32
|
exports.createTsupPlugin = require_helpers_unplugin.createTsupPlugin;
|
|
33
33
|
exports.default = plugin;
|
|
34
34
|
exports.plugin = plugin;
|
|
35
|
-
exports.resolveEntry =
|
|
36
|
-
exports.resolveOptions =
|
|
35
|
+
exports.resolveEntry = require_helpers_resolve_options.resolveEntry;
|
|
36
|
+
exports.resolveOptions = require_helpers_resolve_options.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { TsupOptions, __ΩTsupOptions } from "./types/build.cjs";
|
|
2
|
+
import { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig } from "./types/plugin.cjs";
|
|
3
|
+
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.cjs";
|
|
4
|
+
import { createTsupPlugin } from "./helpers/unplugin.cjs";
|
|
5
5
|
import { Plugin } from "@powerlines/core";
|
|
6
6
|
|
|
7
7
|
//#region src/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { TsupOptions, __ΩTsupOptions } from "./types/build.mjs";
|
|
2
|
+
import { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig } from "./types/plugin.mjs";
|
|
3
|
+
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.mjs";
|
|
4
|
+
import { createTsupPlugin } from "./helpers/unplugin.mjs";
|
|
5
5
|
import { Plugin } from "@powerlines/core";
|
|
6
6
|
|
|
7
7
|
//#region src/index.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
2
|
import { createTsupPlugin } from "./helpers/unplugin.mjs";
|
|
3
3
|
import "./helpers/index.mjs";
|
|
4
|
-
import "./types/index.mjs";
|
|
5
4
|
import { build, resolveOptions as resolveOptions$1 } from "@storm-software/tsup";
|
|
6
5
|
import defu from "defu";
|
|
7
6
|
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["resolveOptionsBase"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Plugin } from \"@powerlines/core\";\nimport {\n build,\n resolveOptions as resolveOptionsBase\n} from \"@storm-software/tsup\";\nimport defu from \"defu\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createTsupPlugin } from \"./helpers/unplugin\";\nimport {\n TsupPluginContext,\n TsupPluginOptions,\n TsupPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n tsup?: TsupPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to use Tsup to build the project.\n */\nexport const plugin = <TContext extends TsupPluginContext = TsupPluginContext>(\n options: TsupPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"tsup\",\n config() {\n this.debug(\n \"Providing default configuration for the Powerlines `tsup` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n tsup: {\n ...options\n }\n } as Partial<TsupPluginResolvedConfig>;\n },\n async build() {\n return build(\n await resolveOptionsBase(\n defu(resolveOptions(this), {\n esbuildPlugins: [createTsupPlugin(this)]\n })\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["resolveOptionsBase"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Plugin } from \"@powerlines/core\";\nimport {\n build,\n resolveOptions as resolveOptionsBase\n} from \"@storm-software/tsup\";\nimport defu from \"defu\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createTsupPlugin } from \"./helpers/unplugin\";\nimport {\n TsupPluginContext,\n TsupPluginOptions,\n TsupPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n tsup?: TsupPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to use Tsup to build the project.\n */\nexport const plugin = <TContext extends TsupPluginContext = TsupPluginContext>(\n options: TsupPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"tsup\",\n config() {\n this.debug(\n \"Providing default configuration for the Powerlines `tsup` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n tsup: {\n ...options\n }\n } as Partial<TsupPluginResolvedConfig>;\n },\n async build() {\n return build(\n await resolveOptionsBase(\n defu(resolveOptions(this), {\n esbuildPlugins: [createTsupPlugin(this)]\n })\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AA4CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,0EACD;AAED,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,MAAM,EACJ,GAAG,SACJ;IACF;;EAEH,MAAM,QAAQ;AACZ,UAAO,MACL,MAAMA,iBACJ,KAAK,eAAe,KAAK,EAAE,EACzB,gBAAgB,CAAC,iBAAiB,KAAK,CAAC,EACzC,CAAC,CACH,CACF;;EAEJ"}
|
package/dist/types/build.d.cts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BuildOptions } from "@storm-software/tsup/types";
|
|
2
|
+
|
|
3
|
+
//#region src/types/build.d.ts
|
|
4
|
+
type TsupOptions = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">>;
|
|
5
|
+
declare type __ΩTsupOptions = any[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TsupOptions, __ΩTsupOptions };
|
|
8
|
+
//# sourceMappingURL=build.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.cts","names":[],"sources":["../../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
package/dist/types/build.d.mts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BuildOptions } from "@storm-software/tsup/types";
|
|
2
|
+
|
|
3
|
+
//#region src/types/build.d.ts
|
|
4
|
+
type TsupOptions = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">>;
|
|
5
|
+
declare type __ΩTsupOptions = any[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TsupOptions, __ΩTsupOptions };
|
|
8
|
+
//# sourceMappingURL=build.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.mts","names":[],"sources":["../../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TsupOptions, __ΩTsupOptions } from "./build.cjs";
|
|
2
|
+
import { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig } from "./plugin.cjs";
|
|
3
3
|
export { TsupOptions, TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupOptions, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TsupOptions, __ΩTsupOptions } from "./build.mjs";
|
|
2
|
+
import { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig } from "./plugin.mjs";
|
|
3
3
|
export { TsupOptions, TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupOptions, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TsupOptions } from "./build.cjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type TsupPluginOptions = Partial<TsupOptions>;
|
|
6
|
+
interface TsupPluginUserConfig extends UserConfig {
|
|
7
|
+
tsup?: TsupPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
interface TsupPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
tsup: TsupOptions;
|
|
11
|
+
}
|
|
12
|
+
type TsupPluginContext<TResolvedConfig extends TsupPluginResolvedConfig = TsupPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩTsupPluginOptions = any[];
|
|
14
|
+
declare type __ΩTsupPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩTsupPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩTsupPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
|
19
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,OAAA,CAAQ,WAAA;AAAA,UAEvB,oBAAA,SAA6B,UAAA;EAC5C,IAAA,GAAO,iBAAA;AAAA;AAAA,UAGQ,wBAAA,SAAiC,cAAA;EAChD,IAAA,EAAM,WAAA;AAAA;AAAA,KAGI,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TsupOptions } from "./build.mjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type TsupPluginOptions = Partial<TsupOptions>;
|
|
6
|
+
interface TsupPluginUserConfig extends UserConfig {
|
|
7
|
+
tsup?: TsupPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
interface TsupPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
tsup: TsupOptions;
|
|
11
|
+
}
|
|
12
|
+
type TsupPluginContext<TResolvedConfig extends TsupPluginResolvedConfig = TsupPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩTsupPluginOptions = any[];
|
|
14
|
+
declare type __ΩTsupPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩTsupPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩTsupPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
|
19
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,OAAA,CAAQ,WAAA;AAAA,UAEvB,oBAAA,SAA6B,UAAA;EAC5C,IAAA,GAAO,iBAAA;AAAA;AAAA,UAGQ,wBAAA,SAAiC,cAAA;EAChD,IAAA,EAAM,WAAA;AAAA;AAAA,KAGI,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsup",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.352",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"keywords": ["tsup", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"import": "./dist/helpers/unplugin.mjs",
|
|
54
54
|
"require": "./dist/helpers/unplugin.cjs"
|
|
55
55
|
},
|
|
56
|
-
"./resolve-options-Di8petwJ": "./dist/resolve-options-Di8petwJ.cjs",
|
|
57
56
|
"./types": {
|
|
58
57
|
"import": "./dist/types/index.mjs",
|
|
59
58
|
"require": "./dist/types/index.cjs"
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
"import": "./dist/types/plugin.mjs",
|
|
67
66
|
"require": "./dist/types/plugin.cjs"
|
|
68
67
|
},
|
|
69
|
-
"
|
|
68
|
+
"./package.json": "./package.json"
|
|
70
69
|
},
|
|
71
70
|
"main": "./dist/index.cjs",
|
|
72
71
|
"module": "./dist/index.mjs",
|
|
@@ -74,8 +73,8 @@
|
|
|
74
73
|
"typings": "dist/index.d.mts",
|
|
75
74
|
"files": ["dist/**/*"],
|
|
76
75
|
"dependencies": {
|
|
77
|
-
"@powerlines/core": "^0.3.
|
|
78
|
-
"@powerlines/plugin-esbuild": "^0.13.
|
|
76
|
+
"@powerlines/core": "^0.3.4",
|
|
77
|
+
"@powerlines/plugin-esbuild": "^0.13.351",
|
|
79
78
|
"@storm-software/build-tools": "^0.158.109",
|
|
80
79
|
"@stryke/convert": "^0.6.53",
|
|
81
80
|
"@stryke/helpers": "^0.10.3",
|
|
@@ -96,5 +95,5 @@
|
|
|
96
95
|
"tsup": { "optional": false }
|
|
97
96
|
},
|
|
98
97
|
"publishConfig": { "access": "public" },
|
|
99
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "84f84362520b3532ac14ac03d6f634066e966127"
|
|
100
99
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BuildOptions } from "@storm-software/tsup/types";
|
|
2
|
-
|
|
3
|
-
//#region src/types/build.d.ts
|
|
4
|
-
type TsupOptions = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">>;
|
|
5
|
-
declare type __ΩTsupOptions = any[];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { __ΩTsupOptions as n, TsupOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-D4pj3EFA.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-D4pj3EFA.d.mts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BuildOptions } from "@storm-software/tsup/types";
|
|
2
|
-
|
|
3
|
-
//#region src/types/build.d.ts
|
|
4
|
-
type TsupOptions = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">>;
|
|
5
|
-
declare type __ΩTsupOptions = any[];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { __ΩTsupOptions as n, TsupOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-MBkBmIxx.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-MBkBmIxx.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-D4pj3EFA.mjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type TsupPluginOptions = Partial<TsupOptions>;
|
|
6
|
-
interface TsupPluginUserConfig extends UserConfig {
|
|
7
|
-
tsup?: TsupPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
interface TsupPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
-
tsup: TsupOptions;
|
|
11
|
-
}
|
|
12
|
-
type TsupPluginContext<TResolvedConfig extends TsupPluginResolvedConfig = TsupPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
-
declare type __ΩTsupPluginOptions = any[];
|
|
14
|
-
declare type __ΩTsupPluginUserConfig = any[];
|
|
15
|
-
declare type __ΩTsupPluginResolvedConfig = any[];
|
|
16
|
-
declare type __ΩTsupPluginContext = any[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { __ΩTsupPluginContext as a, __ΩTsupPluginUserConfig as c, TsupPluginUserConfig as i, TsupPluginOptions as n, __ΩTsupPluginOptions as o, TsupPluginResolvedConfig as r, __ΩTsupPluginResolvedConfig as s, TsupPluginContext as t };
|
|
19
|
-
//# sourceMappingURL=plugin-BIuRBrWM.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-BIuRBrWM.d.mts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,OAAA,CAAQ,WAAA;AAAA,UAEvB,oBAAA,SAA6B,UAAA;EAC5C,IAAA,GAAO,iBAAA;AAAA;AAAA,UAGQ,wBAAA,SAAiC,cAAA;EAChD,IAAA,EAAM,WAAA;AAAA;AAAA,KAGI,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-MBkBmIxx.cjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type TsupPluginOptions = Partial<TsupOptions>;
|
|
6
|
-
interface TsupPluginUserConfig extends UserConfig {
|
|
7
|
-
tsup?: TsupPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
interface TsupPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
-
tsup: TsupOptions;
|
|
11
|
-
}
|
|
12
|
-
type TsupPluginContext<TResolvedConfig extends TsupPluginResolvedConfig = TsupPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
-
declare type __ΩTsupPluginOptions = any[];
|
|
14
|
-
declare type __ΩTsupPluginUserConfig = any[];
|
|
15
|
-
declare type __ΩTsupPluginResolvedConfig = any[];
|
|
16
|
-
declare type __ΩTsupPluginContext = any[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { __ΩTsupPluginContext as a, __ΩTsupPluginUserConfig as c, TsupPluginUserConfig as i, TsupPluginOptions as n, __ΩTsupPluginOptions as o, TsupPluginResolvedConfig as r, __ΩTsupPluginResolvedConfig as s, TsupPluginContext as t };
|
|
19
|
-
//# sourceMappingURL=plugin-DzOlv8wK.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-DzOlv8wK.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,OAAA,CAAQ,WAAA;AAAA,UAEvB,oBAAA,SAA6B,UAAA;EAC5C,IAAA,GAAO,iBAAA;AAAA;AAAA,UAGQ,wBAAA,SAAiC,cAAA;EAChD,IAAA,EAAM,WAAA;AAAA;AAAA,KAGI,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
let defu = require("defu");
|
|
29
|
-
defu = __toESM(defu);
|
|
30
|
-
let _powerlines_plugin_esbuild_helpers_resolve_options = require("@powerlines/plugin-esbuild/helpers/resolve-options");
|
|
31
|
-
let _storm_software_tsup_constants = require("@storm-software/tsup/constants");
|
|
32
|
-
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
33
|
-
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
34
|
-
let _stryke_path_append = require("@stryke/path/append");
|
|
35
|
-
|
|
36
|
-
//#region src/helpers/resolve-options.ts
|
|
37
|
-
const DEFAULT_TSUP_CONFIG = {
|
|
38
|
-
..._storm_software_tsup_constants.DEFAULT_BUILD_OPTIONS,
|
|
39
|
-
target: "esnext",
|
|
40
|
-
config: false,
|
|
41
|
-
minify: true,
|
|
42
|
-
sourcemap: false,
|
|
43
|
-
cjsInterop: true,
|
|
44
|
-
bundle: true,
|
|
45
|
-
dts: true,
|
|
46
|
-
shims: true,
|
|
47
|
-
silent: true,
|
|
48
|
-
treeshake: true,
|
|
49
|
-
keepNames: true,
|
|
50
|
-
splitting: true,
|
|
51
|
-
banner: {}
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
55
|
-
*
|
|
56
|
-
* @param context - The build context.
|
|
57
|
-
* @param entryPoints - The entry points to resolve.
|
|
58
|
-
* @returns The resolved entry options.
|
|
59
|
-
*/
|
|
60
|
-
function resolveEntry(context, entryPoints) {
|
|
61
|
-
return (0, _powerlines_plugin_esbuild_helpers_resolve_options.resolveEntry)(context, entryPoints);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
65
|
-
*
|
|
66
|
-
* @param context - The build context.
|
|
67
|
-
* @returns The resolved options.
|
|
68
|
-
*/
|
|
69
|
-
function resolveOptions(context) {
|
|
70
|
-
const result = (0, defu.default)({
|
|
71
|
-
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, (0, _stryke_path_append.appendPath)(value, context.config.root)])),
|
|
72
|
-
esbuildOptions: ((options, ctx) => {
|
|
73
|
-
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
74
|
-
options.alias = {
|
|
75
|
-
...context.alias,
|
|
76
|
-
...context.builtins.reduce((ret, id) => {
|
|
77
|
-
const path = context.fs.paths[id];
|
|
78
|
-
if (path) ret[id] = path;
|
|
79
|
-
return ret;
|
|
80
|
-
}, {}),
|
|
81
|
-
...options.alias
|
|
82
|
-
};
|
|
83
|
-
}),
|
|
84
|
-
noExternal: context.builtins
|
|
85
|
-
}, context.config.tsup ? context.config.tsup : {}, {
|
|
86
|
-
name: context.config.name,
|
|
87
|
-
root: context.config.root,
|
|
88
|
-
projectRoot: context.config.root,
|
|
89
|
-
assets: context.config.output.assets,
|
|
90
|
-
resolveExtensions: context.config.resolve.extensions,
|
|
91
|
-
outputPath: context.config.output.buildPath,
|
|
92
|
-
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
93
|
-
dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
|
|
94
|
-
format: context.config.output.format,
|
|
95
|
-
mode: context.config.mode,
|
|
96
|
-
treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
|
|
97
|
-
minify: context.config.mode !== "development",
|
|
98
|
-
metafile: context.config.mode === "development",
|
|
99
|
-
sourcemap: context.config.mode === "development",
|
|
100
|
-
silent: context.config.logLevel === null || context.config.mode === "production",
|
|
101
|
-
verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
|
|
102
|
-
workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }
|
|
103
|
-
}, DEFAULT_TSUP_CONFIG);
|
|
104
|
-
result.format = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(result.format));
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
//#endregion
|
|
109
|
-
Object.defineProperty(exports, 'DEFAULT_TSUP_CONFIG', {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return DEFAULT_TSUP_CONFIG;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
Object.defineProperty(exports, '__toESM', {
|
|
116
|
-
enumerable: true,
|
|
117
|
-
get: function () {
|
|
118
|
-
return __toESM;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
Object.defineProperty(exports, 'resolveEntry', {
|
|
122
|
-
enumerable: true,
|
|
123
|
-
get: function () {
|
|
124
|
-
return resolveEntry;
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(exports, 'resolveOptions', {
|
|
128
|
-
enumerable: true,
|
|
129
|
-
get: function () {
|
|
130
|
-
return resolveOptions;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-D4pj3EFA.mjs";
|
|
2
|
-
import { resolveOptions } from "@storm-software/tsup";
|
|
3
|
-
import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
|
|
4
|
-
import { Entry } from "@storm-software/build-tools/types";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/resolve-options.d.ts
|
|
7
|
-
declare const DEFAULT_TSUP_CONFIG: Partial<TsupOptions>;
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
10
|
-
*
|
|
11
|
-
* @param context - The build context.
|
|
12
|
-
* @param entryPoints - The entry points to resolve.
|
|
13
|
-
* @returns The resolved entry options.
|
|
14
|
-
*/
|
|
15
|
-
declare function resolveEntry(context: Context, entryPoints: ResolvedEntryTypeDefinition[] | string[]): Entry;
|
|
16
|
-
/**
|
|
17
|
-
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
18
|
-
*
|
|
19
|
-
* @param context - The build context.
|
|
20
|
-
* @returns The resolved options.
|
|
21
|
-
*/
|
|
22
|
-
declare function resolveOptions$1(context: Context): Parameters<typeof resolveOptions>[0];
|
|
23
|
-
//#endregion
|
|
24
|
-
export { resolveEntry as n, resolveOptions$1 as r, DEFAULT_TSUP_CONFIG as t };
|
|
25
|
-
//# sourceMappingURL=resolve-options-NvMOPAjJ.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-NvMOPAjJ.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;cA8Ba,mBAAA,EAAqB,OAAA,CAAQ,WAAA;;AAA1C;;;;;AAwBA;iBAAgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,EAAa,2BAAA,gBACZ,KAAA;;;;;;;iBAsBa,gBAAA,CACd,OAAA,EAAS,OAAA,GACR,UAAA,QAAkB,cAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-MBkBmIxx.cjs";
|
|
2
|
-
import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
|
|
3
|
-
import { Entry } from "@storm-software/build-tools/types";
|
|
4
|
-
import { resolveOptions } from "@storm-software/tsup";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/resolve-options.d.ts
|
|
7
|
-
declare const DEFAULT_TSUP_CONFIG: Partial<TsupOptions>;
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
10
|
-
*
|
|
11
|
-
* @param context - The build context.
|
|
12
|
-
* @param entryPoints - The entry points to resolve.
|
|
13
|
-
* @returns The resolved entry options.
|
|
14
|
-
*/
|
|
15
|
-
declare function resolveEntry(context: Context, entryPoints: ResolvedEntryTypeDefinition[] | string[]): Entry;
|
|
16
|
-
/**
|
|
17
|
-
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
18
|
-
*
|
|
19
|
-
* @param context - The build context.
|
|
20
|
-
* @returns The resolved options.
|
|
21
|
-
*/
|
|
22
|
-
declare function resolveOptions$1(context: Context): Parameters<typeof resolveOptions>[0];
|
|
23
|
-
//#endregion
|
|
24
|
-
export { resolveEntry as n, resolveOptions$1 as r, DEFAULT_TSUP_CONFIG as t };
|
|
25
|
-
//# sourceMappingURL=resolve-options-xL3h8JXO.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-xL3h8JXO.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;cA8Ba,mBAAA,EAAqB,OAAA,CAAQ,WAAA;;AAA1C;;;;;AAwBA;iBAAgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,EAAa,2BAAA,gBACZ,KAAA;;;;;;;iBAsBa,gBAAA,CACd,OAAA,EAAS,OAAA,GACR,UAAA,QAAkB,cAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as TsupPluginContext } from "./plugin-DzOlv8wK.cjs";
|
|
2
|
-
import * as esbuild from "esbuild";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createTsupPlugin(context: TsupPluginContext): esbuild.Plugin;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createTsupPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-BH9mbtdJ.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-BH9mbtdJ.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAiB,OAAA,CAAA,MAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as TsupPluginContext } from "./plugin-BIuRBrWM.mjs";
|
|
2
|
-
import * as esbuild from "esbuild";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createTsupPlugin(context: TsupPluginContext): esbuild.Plugin;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createTsupPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-DcUEt0nN.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-DcUEt0nN.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAiB,OAAA,CAAA,MAAA"}
|