@powerlines/plugin-tsup 0.12.346 → 0.12.347
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 +14 -16
- package/dist/{build-C-zKo4UO.d.cts → build-D4pj3EFA.d.mts} +1 -1
- package/dist/build-D4pj3EFA.d.mts.map +1 -0
- package/dist/{build-JuFnEmOI.d.mts → build-MBkBmIxx.d.cts} +1 -1
- package/dist/build-MBkBmIxx.d.cts.map +1 -0
- package/dist/helpers/index.cjs +4 -4
- package/dist/helpers/index.d.cts +2 -5
- package/dist/helpers/index.d.mts +2 -5
- package/dist/helpers/index.mjs +2 -3
- package/dist/helpers/resolve-options.cjs +2 -1
- package/dist/helpers/resolve-options.d.cts +1 -3
- package/dist/helpers/resolve-options.d.mts +1 -3
- package/dist/helpers/resolve-options.mjs +81 -2
- package/dist/helpers/resolve-options.mjs.map +1 -0
- package/dist/helpers/unplugin.cjs +11 -2
- package/dist/helpers/unplugin.d.cts +1 -2
- package/dist/helpers/unplugin.d.mts +1 -2
- package/dist/helpers/unplugin.mjs +10 -2
- package/dist/helpers/unplugin.mjs.map +1 -0
- package/dist/index.cjs +8 -9
- package/dist/index.d.cts +4 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{plugin-C6Asuy6i.d.cts → plugin-BIuRBrWM.d.mts} +2 -2
- package/dist/plugin-BIuRBrWM.d.mts.map +1 -0
- package/dist/{plugin-Cq-FOsJ2.d.mts → plugin-DzOlv8wK.d.cts} +2 -2
- package/dist/plugin-DzOlv8wK.d.cts.map +1 -0
- package/dist/{resolve-options-DPfS2t2w.cjs → resolve-options-Di8petwJ.cjs} +10 -10
- package/dist/{resolve-options-BR8kC4Vx.d.cts → resolve-options-NvMOPAjJ.d.mts} +3 -3
- package/dist/resolve-options-NvMOPAjJ.d.mts.map +1 -0
- package/dist/{resolve-options-ClXl-NAO.d.mts → resolve-options-xL3h8JXO.d.cts} +3 -3
- package/dist/resolve-options-xL3h8JXO.d.cts.map +1 -0
- package/dist/types/build.d.cts +1 -1
- package/dist/types/build.d.mts +1 -1
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.mts +1 -1
- package/dist/unplugin-BH9mbtdJ.d.cts +8 -0
- package/dist/unplugin-BH9mbtdJ.d.cts.map +1 -0
- package/dist/unplugin-DcUEt0nN.d.mts +8 -0
- package/dist/unplugin-DcUEt0nN.d.mts.map +1 -0
- package/package.json +18 -17
- package/dist/build-C-zKo4UO.d.cts.map +0 -1
- package/dist/build-DJTI0ZMx.cjs +0 -0
- package/dist/build-JuFnEmOI.d.mts.map +0 -1
- package/dist/build-XTM4L3VY.mjs +0 -1
- package/dist/helpers-C9XSjwSZ.mjs +0 -1
- package/dist/helpers-yB1XkvQI.cjs +0 -0
- package/dist/index-CW2WHUXP.d.mts +0 -1
- package/dist/index-D4ELpJXS.d.cts +0 -1
- package/dist/plugin-C6Asuy6i.d.cts.map +0 -1
- package/dist/plugin-Cq-FOsJ2.d.mts.map +0 -1
- package/dist/plugin-D3B5E_Hg.mjs +0 -1
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/resolve-options-BR8kC4Vx.d.cts.map +0 -1
- package/dist/resolve-options-ClXl-NAO.d.mts.map +0 -1
- package/dist/resolve-options-DvCBX8Wl.mjs +0 -82
- package/dist/resolve-options-DvCBX8Wl.mjs.map +0 -1
- package/dist/unplugin-BojCyphB.d.cts +0 -8
- package/dist/unplugin-BojCyphB.d.cts.map +0 -1
- package/dist/unplugin-C0RKBWXe.cjs +0 -16
- package/dist/unplugin-D-dKnxUW.mjs +0 -11
- package/dist/unplugin-D-dKnxUW.mjs.map +0 -1
- package/dist/unplugin-ySXmbQ7v.d.mts +0 -8
- package/dist/unplugin-ySXmbQ7v.d.mts.map +0 -1
- /package/dist/{index-B_e8BwCm.d.cts → index-BtBZHVmz.d.cts} +0 -0
- /package/dist/{index-CUbWeWHc.d.mts → index-DXRuzH8z.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A package containing a Powerlines plugin to assist in running Tsup builds on Pow
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
|
@@ -5,4 +5,4 @@ type TsupOptions = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsco
|
|
|
5
5
|
declare type __ΩTsupOptions = any[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { __ΩTsupOptions as n, TsupOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-
|
|
8
|
+
//# sourceMappingURL=build-D4pj3EFA.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-D4pj3EFA.d.mts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
|
@@ -5,4 +5,4 @@ type TsupOptions = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsco
|
|
|
5
5
|
declare type __ΩTsupOptions = any[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { __ΩTsupOptions as n, TsupOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-
|
|
8
|
+
//# sourceMappingURL=build-MBkBmIxx.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-MBkBmIxx.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
require('
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-Di8petwJ.cjs');
|
|
3
|
+
const require_helpers_unplugin = require('./unplugin.cjs');
|
|
4
4
|
|
|
5
5
|
exports.DEFAULT_TSUP_CONFIG = require_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
6
|
-
exports.createTsupPlugin =
|
|
6
|
+
exports.createTsupPlugin = require_helpers_unplugin.createTsupPlugin;
|
|
7
7
|
exports.resolveEntry = require_resolve_options.resolveEntry;
|
|
8
8
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-BR8kC4Vx.cjs";
|
|
4
|
-
import { t as createTsupPlugin } from "../unplugin-BojCyphB.cjs";
|
|
5
|
-
import "../index-B_e8BwCm.cjs";
|
|
1
|
+
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-xL3h8JXO.cjs";
|
|
2
|
+
import { t as createTsupPlugin } from "../unplugin-BH9mbtdJ.cjs";
|
|
6
3
|
export { DEFAULT_TSUP_CONFIG, createTsupPlugin, resolveEntry, resolveOptions };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-ClXl-NAO.mjs";
|
|
4
|
-
import { t as createTsupPlugin } from "../unplugin-ySXmbQ7v.mjs";
|
|
5
|
-
import "../index-CW2WHUXP.mjs";
|
|
1
|
+
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-NvMOPAjJ.mjs";
|
|
2
|
+
import { t as createTsupPlugin } from "../unplugin-DcUEt0nN.mjs";
|
|
6
3
|
export { DEFAULT_TSUP_CONFIG, createTsupPlugin, resolveEntry, resolveOptions };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../helpers-C9XSjwSZ.mjs";
|
|
1
|
+
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./resolve-options.mjs";
|
|
2
|
+
import { createTsupPlugin } from "./unplugin.mjs";
|
|
4
3
|
|
|
5
4
|
export { DEFAULT_TSUP_CONFIG, createTsupPlugin, resolveEntry, resolveOptions };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-Di8petwJ.cjs');
|
|
2
3
|
|
|
3
4
|
exports.DEFAULT_TSUP_CONFIG = require_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
4
5
|
exports.resolveEntry = require_resolve_options.resolveEntry;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../index-D4ELpJXS.cjs";
|
|
3
|
-
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-BR8kC4Vx.cjs";
|
|
1
|
+
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-xL3h8JXO.cjs";
|
|
4
2
|
export { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../index-CUbWeWHc.mjs";
|
|
3
|
-
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-ClXl-NAO.mjs";
|
|
1
|
+
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "../resolve-options-NvMOPAjJ.mjs";
|
|
4
2
|
export { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions };
|
|
@@ -1,3 +1,82 @@
|
|
|
1
|
-
import
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { resolveEntry as resolveEntry$1 } from "@powerlines/plugin-esbuild/helpers/resolve-options";
|
|
3
|
+
import { DEFAULT_BUILD_OPTIONS } from "@storm-software/tsup/constants";
|
|
4
|
+
import { toArray } from "@stryke/convert/to-array";
|
|
5
|
+
import { getUnique } from "@stryke/helpers/get-unique";
|
|
6
|
+
import { appendPath } from "@stryke/path/append";
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
//#region src/helpers/resolve-options.ts
|
|
9
|
+
const DEFAULT_TSUP_CONFIG = {
|
|
10
|
+
...DEFAULT_BUILD_OPTIONS,
|
|
11
|
+
target: "esnext",
|
|
12
|
+
config: false,
|
|
13
|
+
minify: true,
|
|
14
|
+
sourcemap: false,
|
|
15
|
+
cjsInterop: true,
|
|
16
|
+
bundle: true,
|
|
17
|
+
dts: true,
|
|
18
|
+
shims: true,
|
|
19
|
+
silent: true,
|
|
20
|
+
treeshake: true,
|
|
21
|
+
keepNames: true,
|
|
22
|
+
splitting: true,
|
|
23
|
+
banner: {}
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
27
|
+
*
|
|
28
|
+
* @param context - The build context.
|
|
29
|
+
* @param entryPoints - The entry points to resolve.
|
|
30
|
+
* @returns The resolved entry options.
|
|
31
|
+
*/
|
|
32
|
+
function resolveEntry(context, entryPoints) {
|
|
33
|
+
return resolveEntry$1(context, entryPoints);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
37
|
+
*
|
|
38
|
+
* @param context - The build context.
|
|
39
|
+
* @returns The resolved options.
|
|
40
|
+
*/
|
|
41
|
+
function resolveOptions(context) {
|
|
42
|
+
const result = defu({
|
|
43
|
+
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, appendPath(value, context.config.root)])),
|
|
44
|
+
esbuildOptions: ((options, ctx) => {
|
|
45
|
+
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
46
|
+
options.alias = {
|
|
47
|
+
...context.alias,
|
|
48
|
+
...context.builtins.reduce((ret, id) => {
|
|
49
|
+
const path = context.fs.paths[id];
|
|
50
|
+
if (path) ret[id] = path;
|
|
51
|
+
return ret;
|
|
52
|
+
}, {}),
|
|
53
|
+
...options.alias
|
|
54
|
+
};
|
|
55
|
+
}),
|
|
56
|
+
noExternal: context.builtins
|
|
57
|
+
}, context.config.tsup ? context.config.tsup : {}, {
|
|
58
|
+
name: context.config.name,
|
|
59
|
+
root: context.config.root,
|
|
60
|
+
projectRoot: context.config.root,
|
|
61
|
+
assets: context.config.output.assets,
|
|
62
|
+
resolveExtensions: context.config.resolve.extensions,
|
|
63
|
+
outputPath: context.config.output.buildPath,
|
|
64
|
+
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
65
|
+
dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
|
|
66
|
+
format: context.config.output.format,
|
|
67
|
+
mode: context.config.mode,
|
|
68
|
+
treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
|
|
69
|
+
minify: context.config.mode !== "development",
|
|
70
|
+
metafile: context.config.mode === "development",
|
|
71
|
+
sourcemap: context.config.mode === "development",
|
|
72
|
+
silent: context.config.logLevel === null || context.config.mode === "production",
|
|
73
|
+
verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
|
|
74
|
+
workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }
|
|
75
|
+
}, DEFAULT_TSUP_CONFIG);
|
|
76
|
+
result.format = getUnique(toArray(result.format));
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
export { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions };
|
|
82
|
+
//# sourceMappingURL=resolve-options.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options.mjs","names":["resolveEsbuildEntry"],"sources":["../../src/helpers/resolve-options.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 { Context, ResolvedEntryTypeDefinition } from \"@powerlines/core\";\nimport { resolveEntry as resolveEsbuildEntry } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { AssetGlob, Entry } from \"@storm-software/build-tools/types\";\nimport { resolveOptions as resolveOptionsBase } from \"@storm-software/tsup\";\nimport { DEFAULT_BUILD_OPTIONS } from \"@storm-software/tsup/constants\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport defu from \"defu\";\nimport { Options } from \"tsup\";\nimport { TsupOptions, TsupPluginResolvedConfig } from \"../types\";\n\nexport const DEFAULT_TSUP_CONFIG: Partial<TsupOptions> = {\n ...DEFAULT_BUILD_OPTIONS,\n target: \"esnext\",\n config: false,\n minify: true,\n sourcemap: false,\n cjsInterop: true,\n bundle: true,\n dts: true,\n shims: true,\n silent: true,\n treeshake: true,\n keepNames: true,\n splitting: true,\n banner: {}\n};\n\n/**\n * Resolves the entry options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @param entryPoints - The entry points to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveEntry(\n context: Context,\n entryPoints: ResolvedEntryTypeDefinition[] | string[]\n): Entry {\n return resolveEsbuildEntry(context, entryPoints) as Entry;\n}\n\ntype TsupEsbuildOptionsHandler = NonNullable<Options[\"esbuildOptions\"]>;\ntype TsupEsbuildOptionsArgs = Parameters<TsupEsbuildOptionsHandler>;\ntype TsupEsbuildOptions = TsupEsbuildOptionsArgs[0];\ntype TsupEsbuildContext = TsupEsbuildOptionsArgs[1];\n\ninterface TsupResolvedBuildConfig extends Options {\n esbuildOptions?: TsupEsbuildOptionsHandler;\n workspaceConfig?: {\n workspaceRoot: string;\n };\n}\n\n/**\n * Resolves the options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(\n context: Context\n): Parameters<typeof resolveOptionsBase>[0] {\n const result = defu(\n {\n entry: Object.fromEntries(\n Object.entries(resolveEntry(context, context.entry)).map(\n ([key, value]) => [key, appendPath(value, context.config.root)]\n )\n ),\n esbuildOptions: ((\n options: TsupEsbuildOptions,\n ctx: TsupEsbuildContext\n ) => {\n if ((context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions) {\n (context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions?.(\n options,\n ctx\n );\n }\n\n options.alias = {\n ...context.alias,\n ...context.builtins.reduce(\n (ret, id) => {\n const path = context.fs.paths[id];\n if (path) {\n ret[id] = path;\n }\n\n return ret;\n },\n {} as Record<string, string>\n ),\n ...options.alias\n };\n }) as TsupResolvedBuildConfig[\"esbuildOptions\"],\n noExternal: context.builtins\n },\n (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup\n : {},\n {\n name: context.config.name,\n root: context.config.root,\n projectRoot: context.config.root,\n assets: context.config.output.assets as (string | AssetGlob)[],\n resolveExtensions: context.config.resolve.extensions,\n outputPath: context.config.output.buildPath,\n tsconfig: context.tsconfig.tsconfigFilePath,\n dts:\n (context.config as TsupPluginResolvedConfig).tsup &&\n !(context.config as TsupPluginResolvedConfig).tsup?.experimentalDts\n ? {\n compilerOptions: context.tsconfig.tsconfigJson.compilerOptions\n }\n : undefined,\n format: context.config.output.format,\n mode: context.config.mode,\n treeshake: (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup?.treeshake\n : undefined,\n minify: context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\",\n silent:\n context.config.logLevel === null ||\n context.config.mode === \"production\",\n verbose:\n context.config.logLevel === null ||\n context.config.logLevel === \"trace\" ||\n context.config.mode === \"development\",\n workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result;\n}\n"],"mappings":";;;;;;;;AA8BA,MAAa,sBAA4C;CACvD,GAAG;CACH,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,KAAK;CACL,OAAO;CACP,QAAQ;CACR,WAAW;CACX,WAAW;CACX,WAAW;CACX,QAAQ,EAAE;CACX;;;;;;;;AASD,SAAgB,aACd,SACA,aACO;AACP,QAAOA,eAAoB,SAAS,YAAY;;;;;;;;AAqBlD,SAAgB,eACd,SAC0C;CAC1C,MAAM,SAAS,KACb;EACE,OAAO,OAAO,YACZ,OAAO,QAAQ,aAAa,SAAS,QAAQ,MAAM,CAAC,CAAC,KAClD,CAAC,KAAK,WAAW,CAAC,KAAK,WAAW,OAAO,QAAQ,OAAO,KAAK,CAAC,CAChE,CACF;EACD,kBACE,SACA,QACG;AACH,OAAK,QAAQ,OAAoC,MAAM,eACrD,CAAC,QAAQ,OAAoC,MAAM,iBACjD,SACA,IACD;AAGH,WAAQ,QAAQ;IACd,GAAG,QAAQ;IACX,GAAG,QAAQ,SAAS,QACjB,KAAK,OAAO;KACX,MAAM,OAAO,QAAQ,GAAG,MAAM;AAC9B,SAAI,KACF,KAAI,MAAM;AAGZ,YAAO;OAET,EAAE,CACH;IACD,GAAG,QAAQ;IACZ;;EAEH,YAAY,QAAQ;EACrB,EACA,QAAQ,OAAoC,OACxC,QAAQ,OAAoC,OAC7C,EAAE,EACN;EACE,MAAM,QAAQ,OAAO;EACrB,MAAM,QAAQ,OAAO;EACrB,aAAa,QAAQ,OAAO;EAC5B,QAAQ,QAAQ,OAAO,OAAO;EAC9B,mBAAmB,QAAQ,OAAO,QAAQ;EAC1C,YAAY,QAAQ,OAAO,OAAO;EAClC,UAAU,QAAQ,SAAS;EAC3B,KACG,QAAQ,OAAoC,QAC7C,CAAE,QAAQ,OAAoC,MAAM,kBAChD,EACE,iBAAiB,QAAQ,SAAS,aAAa,iBAChD,GACD;EACN,QAAQ,QAAQ,OAAO,OAAO;EAC9B,MAAM,QAAQ,OAAO;EACrB,WAAY,QAAQ,OAAoC,OACnD,QAAQ,OAAoC,MAAM,YACnD;EACJ,QAAQ,QAAQ,OAAO,SAAS;EAChC,UAAU,QAAQ,OAAO,SAAS;EAClC,WAAW,QAAQ,OAAO,SAAS;EACnC,QACE,QAAQ,OAAO,aAAa,QAC5B,QAAQ,OAAO,SAAS;EAC1B,SACE,QAAQ,OAAO,aAAa,QAC5B,QAAQ,OAAO,aAAa,WAC5B,QAAQ,OAAO,SAAS;EAC1B,iBAAiB,EAAE,eAAe,QAAQ,gBAAgB,eAAe;EAC1E,EACD,oBACD;AAED,QAAO,SAAS,UAAU,QAAQ,OAAO,OAAO,CAAC;AACjD,QAAO"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-Di8petwJ.cjs');
|
|
3
|
+
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
4
|
+
let unplugin = require("unplugin");
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
//#region src/helpers/unplugin.ts
|
|
7
|
+
function createTsupPlugin(context) {
|
|
8
|
+
return (0, unplugin.createEsbuildPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context))({});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.createTsupPlugin = createTsupPlugin;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
+
import { createEsbuildPlugin } from "unplugin";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
//#region src/helpers/unplugin.ts
|
|
5
|
+
function createTsupPlugin(context) {
|
|
6
|
+
return createEsbuildPlugin(createUnplugin(context))({});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { createTsupPlugin };
|
|
11
|
+
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.mjs","names":[],"sources":["../../src/helpers/unplugin.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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { TsupPluginContext } from \"../types/plugin\";\n\nexport function createTsupPlugin(context: TsupPluginContext) {\n return createEsbuildPlugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAO,oBAAoB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_resolve_options = require('./resolve-options-
|
|
3
|
-
const
|
|
4
|
-
require('./helpers
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_resolve_options = require('./resolve-options-Di8petwJ.cjs');
|
|
3
|
+
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
4
|
+
require('./helpers/index.cjs');
|
|
5
5
|
require('./types/index.cjs');
|
|
6
|
-
let
|
|
6
|
+
let _storm_software_tsup = require("@storm-software/tsup");
|
|
7
7
|
let defu = require("defu");
|
|
8
8
|
defu = require_resolve_options.__toESM(defu);
|
|
9
9
|
|
|
@@ -22,16 +22,15 @@ const plugin = (options = {}) => {
|
|
|
22
22
|
};
|
|
23
23
|
},
|
|
24
24
|
async build() {
|
|
25
|
-
return (0,
|
|
25
|
+
return (0, _storm_software_tsup.build)(await (0, _storm_software_tsup.resolveOptions)((0, defu.default)(require_resolve_options.resolveOptions(this), { esbuildPlugins: [require_helpers_unplugin.createTsupPlugin(this)] })));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
var src_default = plugin;
|
|
30
29
|
|
|
31
30
|
//#endregion
|
|
32
31
|
exports.DEFAULT_TSUP_CONFIG = require_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
33
|
-
exports.createTsupPlugin =
|
|
34
|
-
exports.default =
|
|
32
|
+
exports.createTsupPlugin = require_helpers_unplugin.createTsupPlugin;
|
|
33
|
+
exports.default = plugin;
|
|
35
34
|
exports.plugin = plugin;
|
|
36
35
|
exports.resolveEntry = require_resolve_options.resolveEntry;
|
|
37
36
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as __ΩTsupOptions, t as TsupOptions } from "./build-
|
|
2
|
-
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "./plugin-
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import { t as createTsupPlugin } from "./unplugin-BojCyphB.cjs";
|
|
6
|
-
import "./index-B_e8BwCm.cjs";
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "./build-MBkBmIxx.cjs";
|
|
2
|
+
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "./plugin-DzOlv8wK.cjs";
|
|
3
|
+
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "./resolve-options-xL3h8JXO.cjs";
|
|
4
|
+
import { t as createTsupPlugin } from "./unplugin-BH9mbtdJ.cjs";
|
|
7
5
|
import { Plugin } from "@powerlines/core";
|
|
8
6
|
|
|
9
7
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAoCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;AAJa;;;AAAA,cAWX,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as __ΩTsupOptions, t as TsupOptions } from "./build-
|
|
2
|
-
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "./plugin-
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import { t as createTsupPlugin } from "./unplugin-ySXmbQ7v.mjs";
|
|
6
|
-
import "./index-CW2WHUXP.mjs";
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "./build-D4pj3EFA.mjs";
|
|
2
|
+
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "./plugin-BIuRBrWM.mjs";
|
|
3
|
+
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_TSUP_CONFIG } from "./resolve-options-NvMOPAjJ.mjs";
|
|
4
|
+
import { t as createTsupPlugin } from "./unplugin-DcUEt0nN.mjs";
|
|
7
5
|
import { Plugin } from "@powerlines/core";
|
|
8
6
|
|
|
9
7
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAoCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;AAJa;;;AAAA,cAWX,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./helpers
|
|
1
|
+
import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
|
+
import { createTsupPlugin } from "./helpers/unplugin.mjs";
|
|
3
|
+
import "./helpers/index.mjs";
|
|
4
4
|
import "./types/index.mjs";
|
|
5
5
|
import { build, resolveOptions as resolveOptions$1 } from "@storm-software/tsup";
|
|
6
6
|
import defu from "defu";
|
|
@@ -24,8 +24,7 @@ const plugin = (options = {}) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
var src_default = plugin;
|
|
28
27
|
|
|
29
28
|
//#endregion
|
|
30
|
-
export { DEFAULT_TSUP_CONFIG, createTsupPlugin,
|
|
29
|
+
export { DEFAULT_TSUP_CONFIG, createTsupPlugin, plugin as default, plugin, resolveEntry, resolveOptions };
|
|
31
30
|
//# sourceMappingURL=index.mjs.map
|
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":";;;;;;;;;;;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
|
|
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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-
|
|
1
|
+
import { t as TsupOptions } from "./build-D4pj3EFA.mjs";
|
|
2
2
|
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
@@ -16,4 +16,4 @@ declare type __ΩTsupPluginResolvedConfig = any[];
|
|
|
16
16
|
declare type __ΩTsupPluginContext = any[];
|
|
17
17
|
//#endregion
|
|
18
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-
|
|
19
|
+
//# sourceMappingURL=plugin-BIuRBrWM.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-
|
|
1
|
+
import { t as TsupOptions } from "./build-MBkBmIxx.cjs";
|
|
2
2
|
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
@@ -16,4 +16,4 @@ declare type __ΩTsupPluginResolvedConfig = any[];
|
|
|
16
16
|
declare type __ΩTsupPluginContext = any[];
|
|
17
17
|
//#endregion
|
|
18
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-
|
|
19
|
+
//# sourceMappingURL=plugin-DzOlv8wK.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -27,15 +27,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
//#endregion
|
|
28
28
|
let defu = require("defu");
|
|
29
29
|
defu = __toESM(defu);
|
|
30
|
-
let
|
|
31
|
-
let
|
|
32
|
-
let
|
|
33
|
-
let
|
|
34
|
-
let
|
|
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
35
|
|
|
36
36
|
//#region src/helpers/resolve-options.ts
|
|
37
37
|
const DEFAULT_TSUP_CONFIG = {
|
|
38
|
-
...
|
|
38
|
+
..._storm_software_tsup_constants.DEFAULT_BUILD_OPTIONS,
|
|
39
39
|
target: "esnext",
|
|
40
40
|
config: false,
|
|
41
41
|
minify: true,
|
|
@@ -58,7 +58,7 @@ const DEFAULT_TSUP_CONFIG = {
|
|
|
58
58
|
* @returns The resolved entry options.
|
|
59
59
|
*/
|
|
60
60
|
function resolveEntry(context, entryPoints) {
|
|
61
|
-
return (0,
|
|
61
|
+
return (0, _powerlines_plugin_esbuild_helpers_resolve_options.resolveEntry)(context, entryPoints);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
@@ -68,7 +68,7 @@ function resolveEntry(context, entryPoints) {
|
|
|
68
68
|
*/
|
|
69
69
|
function resolveOptions(context) {
|
|
70
70
|
const result = (0, defu.default)({
|
|
71
|
-
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, (0,
|
|
71
|
+
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, (0, _stryke_path_append.appendPath)(value, context.config.root)])),
|
|
72
72
|
esbuildOptions: ((options, ctx) => {
|
|
73
73
|
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
74
74
|
options.alias = {
|
|
@@ -101,7 +101,7 @@ function resolveOptions(context) {
|
|
|
101
101
|
verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
|
|
102
102
|
workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }
|
|
103
103
|
}, DEFAULT_TSUP_CONFIG);
|
|
104
|
-
result.format = (0,
|
|
104
|
+
result.format = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(result.format));
|
|
105
105
|
return result;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-
|
|
1
|
+
import { t as TsupOptions } from "./build-D4pj3EFA.mjs";
|
|
2
|
+
import { resolveOptions } from "@storm-software/tsup";
|
|
2
3
|
import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
|
|
3
4
|
import { Entry } from "@storm-software/build-tools/types";
|
|
4
|
-
import { resolveOptions } from "@storm-software/tsup";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/resolve-options.d.ts
|
|
7
7
|
declare const DEFAULT_TSUP_CONFIG: Partial<TsupOptions>;
|
|
@@ -22,4 +22,4 @@ declare function resolveEntry(context: Context, entryPoints: ResolvedEntryTypeDe
|
|
|
22
22
|
declare function resolveOptions$1(context: Context): Parameters<typeof resolveOptions>[0];
|
|
23
23
|
//#endregion
|
|
24
24
|
export { resolveEntry as n, resolveOptions$1 as r, DEFAULT_TSUP_CONFIG as t };
|
|
25
|
-
//# sourceMappingURL=resolve-options-
|
|
25
|
+
//# sourceMappingURL=resolve-options-NvMOPAjJ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { t as TsupOptions } from "./build-
|
|
2
|
-
import { resolveOptions } from "@storm-software/tsup";
|
|
1
|
+
import { t as TsupOptions } from "./build-MBkBmIxx.cjs";
|
|
3
2
|
import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
|
|
4
3
|
import { Entry } from "@storm-software/build-tools/types";
|
|
4
|
+
import { resolveOptions } from "@storm-software/tsup";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/resolve-options.d.ts
|
|
7
7
|
declare const DEFAULT_TSUP_CONFIG: Partial<TsupOptions>;
|
|
@@ -22,4 +22,4 @@ declare function resolveEntry(context: Context, entryPoints: ResolvedEntryTypeDe
|
|
|
22
22
|
declare function resolveOptions$1(context: Context): Parameters<typeof resolveOptions>[0];
|
|
23
23
|
//#endregion
|
|
24
24
|
export { resolveEntry as n, resolveOptions$1 as r, DEFAULT_TSUP_CONFIG as t };
|
|
25
|
-
//# sourceMappingURL=resolve-options-
|
|
25
|
+
//# sourceMappingURL=resolve-options-xL3h8JXO.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/types/build.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-MBkBmIxx.cjs";
|
|
2
2
|
export { TsupOptions, __ΩTsupOptions };
|
package/dist/types/build.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-D4pj3EFA.mjs";
|
|
2
2
|
export { TsupOptions, __ΩTsupOptions };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-
|
|
2
|
-
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-
|
|
3
|
-
import "../index-D4ELpJXS.cjs";
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-MBkBmIxx.cjs";
|
|
2
|
+
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-DzOlv8wK.cjs";
|
|
4
3
|
export { TsupOptions, TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupOptions, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-
|
|
2
|
-
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-
|
|
3
|
-
import "../index-CUbWeWHc.mjs";
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-D4pj3EFA.mjs";
|
|
2
|
+
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-BIuRBrWM.mjs";
|
|
4
3
|
export { TsupOptions, TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupOptions, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-
|
|
1
|
+
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-DzOlv8wK.cjs";
|
|
2
2
|
export { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-
|
|
1
|
+
import { a as __ΩTsupPluginContext, c as __ΩTsupPluginUserConfig, i as TsupPluginUserConfig, n as TsupPluginOptions, o as __ΩTsupPluginOptions, r as TsupPluginResolvedConfig, s as __ΩTsupPluginResolvedConfig, t as TsupPluginContext } from "../plugin-BIuRBrWM.mjs";
|
|
2
2
|
export { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig };
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsup",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.347",
|
|
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"],
|
|
@@ -40,30 +40,31 @@
|
|
|
40
40
|
],
|
|
41
41
|
"type": "module",
|
|
42
42
|
"exports": {
|
|
43
|
-
".": { "
|
|
43
|
+
".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
|
|
44
44
|
"./helpers": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"import": "./dist/helpers/index.mjs",
|
|
46
|
+
"require": "./dist/helpers/index.cjs"
|
|
47
47
|
},
|
|
48
48
|
"./helpers/resolve-options": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"import": "./dist/helpers/resolve-options.mjs",
|
|
50
|
+
"require": "./dist/helpers/resolve-options.cjs"
|
|
51
51
|
},
|
|
52
52
|
"./helpers/unplugin": {
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"import": "./dist/helpers/unplugin.mjs",
|
|
54
|
+
"require": "./dist/helpers/unplugin.cjs"
|
|
55
55
|
},
|
|
56
|
+
"./resolve-options-Di8petwJ": "./dist/resolve-options-Di8petwJ.cjs",
|
|
56
57
|
"./types": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
58
|
+
"import": "./dist/types/index.mjs",
|
|
59
|
+
"require": "./dist/types/index.cjs"
|
|
59
60
|
},
|
|
60
61
|
"./types/build": {
|
|
61
|
-
"
|
|
62
|
-
"
|
|
62
|
+
"import": "./dist/types/build.mjs",
|
|
63
|
+
"require": "./dist/types/build.cjs"
|
|
63
64
|
},
|
|
64
65
|
"./types/plugin": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
66
|
+
"import": "./dist/types/plugin.mjs",
|
|
67
|
+
"require": "./dist/types/plugin.cjs"
|
|
67
68
|
},
|
|
68
69
|
"./*": "./*"
|
|
69
70
|
},
|
|
@@ -73,8 +74,8 @@
|
|
|
73
74
|
"typings": "dist/index.d.mts",
|
|
74
75
|
"files": ["dist/**/*"],
|
|
75
76
|
"dependencies": {
|
|
76
|
-
"@powerlines/core": "^0.2.
|
|
77
|
-
"@powerlines/plugin-esbuild": "^0.13.
|
|
77
|
+
"@powerlines/core": "^0.2.23",
|
|
78
|
+
"@powerlines/plugin-esbuild": "^0.13.346",
|
|
78
79
|
"@storm-software/build-tools": "^0.158.109",
|
|
79
80
|
"@stryke/convert": "^0.6.53",
|
|
80
81
|
"@stryke/helpers": "^0.10.3",
|
|
@@ -95,5 +96,5 @@
|
|
|
95
96
|
"tsup": { "optional": false }
|
|
96
97
|
},
|
|
97
98
|
"publishConfig": { "access": "public" },
|
|
98
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
|
|
99
100
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-C-zKo4UO.d.cts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,WAAA,GAAc,QACxB,KACE"}
|
package/dist/build-DJTI0ZMx.cjs
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-JuFnEmOI.d.mts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,WAAA,GAAc,QACxB,KACE"}
|
package/dist/build-XTM4L3VY.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-C6Asuy6i.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,iBAAA,GAAoB,QAAQ;UAEvB,oBAAA,SAA6B;EAFlC,IAAA,CAAA,EAGH,iBAHoB;AAE7B;AAIiB,UAAA,wBAAA,SAAiC,cAAA,CAAA;EAItC,IAAA,EAHJ,WAGI;;AACyC,KADzC,iBACyC,CAAA,wBAA3B,wBAA2B,GAAA,wBAAA,CAAA,GACjD,aADiD,CACnC,eADmC,CAAA;AACnC,oCAAA,GAAA,EAAA;AAAd,uCAAA,GAAA,EAAA;AAAa,2CAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-Cq-FOsJ2.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,iBAAA,GAAoB,QAAQ;UAEvB,oBAAA,SAA6B;EAFlC,IAAA,CAAA,EAGH,iBAHoB;AAE7B;AAIiB,UAAA,wBAAA,SAAiC,cAAA,CAAA;EAItC,IAAA,EAHJ,WAGI;;AACyC,KADzC,iBACyC,CAAA,wBAA3B,wBAA2B,GAAA,wBAAA,CAAA,GACjD,aADiD,CACnC,eADmC,CAAA;AACnC,oCAAA,GAAA,EAAA;AAAd,uCAAA,GAAA,EAAA;AAAa,2CAAA,GAAA,EAAA"}
|
package/dist/plugin-D3B5E_Hg.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-D5qyQPqC.cjs
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-BR8kC4Vx.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;cA8Ba,qBAAqB,QAAQ;;AAA1C;AAwBA;;;;;AAyBgB,iBAzBA,YAAA,CAyBc,OAAA,EAxBnB,OAwBmB,EAAA,WAAA,EAvBf,2BAuBe,EAAA,GAAA,MAAA,EAAA,CAAA,EAtB3B,KAsB2B;;;;;;;iBAAd,gBAAA,UACL,UACR,kBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-ClXl-NAO.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;cA8Ba,qBAAqB,QAAQ;;AAA1C;AAwBA;;;;;AAyBgB,iBAzBA,YAAA,CAyBc,OAAA,EAxBnB,OAwBmB,EAAA,WAAA,EAvBf,2BAuBe,EAAA,GAAA,MAAA,EAAA,CAAA,EAtB3B,KAsB2B;;;;;;;iBAAd,gBAAA,UACL,UACR,kBAAkB"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import defu from "defu";
|
|
2
|
-
import { resolveEntry } from "@powerlines/plugin-esbuild/helpers/resolve-options";
|
|
3
|
-
import { DEFAULT_BUILD_OPTIONS } from "@storm-software/tsup/constants";
|
|
4
|
-
import { toArray } from "@stryke/convert/to-array";
|
|
5
|
-
import { getUnique } from "@stryke/helpers/get-unique";
|
|
6
|
-
import { appendPath } from "@stryke/path/append";
|
|
7
|
-
|
|
8
|
-
//#region src/helpers/resolve-options.ts
|
|
9
|
-
const DEFAULT_TSUP_CONFIG = {
|
|
10
|
-
...DEFAULT_BUILD_OPTIONS,
|
|
11
|
-
target: "esnext",
|
|
12
|
-
config: false,
|
|
13
|
-
minify: true,
|
|
14
|
-
sourcemap: false,
|
|
15
|
-
cjsInterop: true,
|
|
16
|
-
bundle: true,
|
|
17
|
-
dts: true,
|
|
18
|
-
shims: true,
|
|
19
|
-
silent: true,
|
|
20
|
-
treeshake: true,
|
|
21
|
-
keepNames: true,
|
|
22
|
-
splitting: true,
|
|
23
|
-
banner: {}
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
27
|
-
*
|
|
28
|
-
* @param context - The build context.
|
|
29
|
-
* @param entryPoints - The entry points to resolve.
|
|
30
|
-
* @returns The resolved entry options.
|
|
31
|
-
*/
|
|
32
|
-
function resolveEntry$1(context, entryPoints) {
|
|
33
|
-
return resolveEntry(context, entryPoints);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
37
|
-
*
|
|
38
|
-
* @param context - The build context.
|
|
39
|
-
* @returns The resolved options.
|
|
40
|
-
*/
|
|
41
|
-
function resolveOptions(context) {
|
|
42
|
-
const result = defu({
|
|
43
|
-
entry: Object.fromEntries(Object.entries(resolveEntry$1(context, context.entry)).map(([key, value]) => [key, appendPath(value, context.config.root)])),
|
|
44
|
-
esbuildOptions: ((options, ctx) => {
|
|
45
|
-
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
46
|
-
options.alias = {
|
|
47
|
-
...context.alias,
|
|
48
|
-
...context.builtins.reduce((ret, id) => {
|
|
49
|
-
const path = context.fs.paths[id];
|
|
50
|
-
if (path) ret[id] = path;
|
|
51
|
-
return ret;
|
|
52
|
-
}, {}),
|
|
53
|
-
...options.alias
|
|
54
|
-
};
|
|
55
|
-
}),
|
|
56
|
-
noExternal: context.builtins
|
|
57
|
-
}, context.config.tsup ? context.config.tsup : {}, {
|
|
58
|
-
name: context.config.name,
|
|
59
|
-
root: context.config.root,
|
|
60
|
-
projectRoot: context.config.root,
|
|
61
|
-
assets: context.config.output.assets,
|
|
62
|
-
resolveExtensions: context.config.resolve.extensions,
|
|
63
|
-
outputPath: context.config.output.buildPath,
|
|
64
|
-
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
65
|
-
dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
|
|
66
|
-
format: context.config.output.format,
|
|
67
|
-
mode: context.config.mode,
|
|
68
|
-
treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
|
|
69
|
-
minify: context.config.mode !== "development",
|
|
70
|
-
metafile: context.config.mode === "development",
|
|
71
|
-
sourcemap: context.config.mode === "development",
|
|
72
|
-
silent: context.config.logLevel === null || context.config.mode === "production",
|
|
73
|
-
verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
|
|
74
|
-
workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }
|
|
75
|
-
}, DEFAULT_TSUP_CONFIG);
|
|
76
|
-
result.format = getUnique(toArray(result.format));
|
|
77
|
-
return result;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//#endregion
|
|
81
|
-
export { resolveEntry$1 as n, resolveOptions as r, DEFAULT_TSUP_CONFIG as t };
|
|
82
|
-
//# sourceMappingURL=resolve-options-DvCBX8Wl.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-DvCBX8Wl.mjs","names":["DEFAULT_TSUP_CONFIG: Partial<TsupOptions>","resolveEntry","resolveEsbuildEntry"],"sources":["../src/helpers/resolve-options.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 { Context, ResolvedEntryTypeDefinition } from \"@powerlines/core\";\nimport { resolveEntry as resolveEsbuildEntry } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { AssetGlob, Entry } from \"@storm-software/build-tools/types\";\nimport { resolveOptions as resolveOptionsBase } from \"@storm-software/tsup\";\nimport { DEFAULT_BUILD_OPTIONS } from \"@storm-software/tsup/constants\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport defu from \"defu\";\nimport { Options } from \"tsup\";\nimport { TsupOptions, TsupPluginResolvedConfig } from \"../types\";\n\nexport const DEFAULT_TSUP_CONFIG: Partial<TsupOptions> = {\n ...DEFAULT_BUILD_OPTIONS,\n target: \"esnext\",\n config: false,\n minify: true,\n sourcemap: false,\n cjsInterop: true,\n bundle: true,\n dts: true,\n shims: true,\n silent: true,\n treeshake: true,\n keepNames: true,\n splitting: true,\n banner: {}\n};\n\n/**\n * Resolves the entry options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @param entryPoints - The entry points to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveEntry(\n context: Context,\n entryPoints: ResolvedEntryTypeDefinition[] | string[]\n): Entry {\n return resolveEsbuildEntry(context, entryPoints) as Entry;\n}\n\ntype TsupEsbuildOptionsHandler = NonNullable<Options[\"esbuildOptions\"]>;\ntype TsupEsbuildOptionsArgs = Parameters<TsupEsbuildOptionsHandler>;\ntype TsupEsbuildOptions = TsupEsbuildOptionsArgs[0];\ntype TsupEsbuildContext = TsupEsbuildOptionsArgs[1];\n\ninterface TsupResolvedBuildConfig extends Options {\n esbuildOptions?: TsupEsbuildOptionsHandler;\n workspaceConfig?: {\n workspaceRoot: string;\n };\n}\n\n/**\n * Resolves the options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(\n context: Context\n): Parameters<typeof resolveOptionsBase>[0] {\n const result = defu(\n {\n entry: Object.fromEntries(\n Object.entries(resolveEntry(context, context.entry)).map(\n ([key, value]) => [key, appendPath(value, context.config.root)]\n )\n ),\n esbuildOptions: ((\n options: TsupEsbuildOptions,\n ctx: TsupEsbuildContext\n ) => {\n if ((context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions) {\n (context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions?.(\n options,\n ctx\n );\n }\n\n options.alias = {\n ...context.alias,\n ...context.builtins.reduce(\n (ret, id) => {\n const path = context.fs.paths[id];\n if (path) {\n ret[id] = path;\n }\n\n return ret;\n },\n {} as Record<string, string>\n ),\n ...options.alias\n };\n }) as TsupResolvedBuildConfig[\"esbuildOptions\"],\n noExternal: context.builtins\n },\n (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup\n : {},\n {\n name: context.config.name,\n root: context.config.root,\n projectRoot: context.config.root,\n assets: context.config.output.assets as (string | AssetGlob)[],\n resolveExtensions: context.config.resolve.extensions,\n outputPath: context.config.output.buildPath,\n tsconfig: context.tsconfig.tsconfigFilePath,\n dts:\n (context.config as TsupPluginResolvedConfig).tsup &&\n !(context.config as TsupPluginResolvedConfig).tsup?.experimentalDts\n ? {\n compilerOptions: context.tsconfig.tsconfigJson.compilerOptions\n }\n : undefined,\n format: context.config.output.format,\n mode: context.config.mode,\n treeshake: (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup?.treeshake\n : undefined,\n minify: context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\",\n silent:\n context.config.logLevel === null ||\n context.config.mode === \"production\",\n verbose:\n context.config.logLevel === null ||\n context.config.logLevel === \"trace\" ||\n context.config.mode === \"development\",\n workspaceConfig: { workspaceRoot: context.workspaceConfig.workspaceRoot }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result;\n}\n"],"mappings":";;;;;;;;AA8BA,MAAaA,sBAA4C;CACvD,GAAG;CACH,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,KAAK;CACL,OAAO;CACP,QAAQ;CACR,WAAW;CACX,WAAW;CACX,WAAW;CACX,QAAQ,EAAE;CACX;;;;;;;;AASD,SAAgBC,eACd,SACA,aACO;AACP,QAAOC,aAAoB,SAAS,YAAY;;;;;;;;AAqBlD,SAAgB,eACd,SAC0C;CAC1C,MAAM,SAAS,KACb;EACE,OAAO,OAAO,YACZ,OAAO,QAAQD,eAAa,SAAS,QAAQ,MAAM,CAAC,CAAC,KAClD,CAAC,KAAK,WAAW,CAAC,KAAK,WAAW,OAAO,QAAQ,OAAO,KAAK,CAAC,CAChE,CACF;EACD,kBACE,SACA,QACG;AACH,OAAK,QAAQ,OAAoC,MAAM,eACrD,CAAC,QAAQ,OAAoC,MAAM,iBACjD,SACA,IACD;AAGH,WAAQ,QAAQ;IACd,GAAG,QAAQ;IACX,GAAG,QAAQ,SAAS,QACjB,KAAK,OAAO;KACX,MAAM,OAAO,QAAQ,GAAG,MAAM;AAC9B,SAAI,KACF,KAAI,MAAM;AAGZ,YAAO;OAET,EAAE,CACH;IACD,GAAG,QAAQ;IACZ;;EAEH,YAAY,QAAQ;EACrB,EACA,QAAQ,OAAoC,OACxC,QAAQ,OAAoC,OAC7C,EAAE,EACN;EACE,MAAM,QAAQ,OAAO;EACrB,MAAM,QAAQ,OAAO;EACrB,aAAa,QAAQ,OAAO;EAC5B,QAAQ,QAAQ,OAAO,OAAO;EAC9B,mBAAmB,QAAQ,OAAO,QAAQ;EAC1C,YAAY,QAAQ,OAAO,OAAO;EAClC,UAAU,QAAQ,SAAS;EAC3B,KACG,QAAQ,OAAoC,QAC7C,CAAE,QAAQ,OAAoC,MAAM,kBAChD,EACE,iBAAiB,QAAQ,SAAS,aAAa,iBAChD,GACD;EACN,QAAQ,QAAQ,OAAO,OAAO;EAC9B,MAAM,QAAQ,OAAO;EACrB,WAAY,QAAQ,OAAoC,OACnD,QAAQ,OAAoC,MAAM,YACnD;EACJ,QAAQ,QAAQ,OAAO,SAAS;EAChC,UAAU,QAAQ,OAAO,SAAS;EAClC,WAAW,QAAQ,OAAO,SAAS;EACnC,QACE,QAAQ,OAAO,aAAa,QAC5B,QAAQ,OAAO,SAAS;EAC1B,SACE,QAAQ,OAAO,aAAa,QAC5B,QAAQ,OAAO,aAAa,WAC5B,QAAQ,OAAO,SAAS;EAC1B,iBAAiB,EAAE,eAAe,QAAQ,gBAAgB,eAAe;EAC1E,EACD,oBACD;AAED,QAAO,SAAS,UAAU,QAAQ,OAAO,OAAO,CAAC;AACjD,QAAO"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as TsupPluginContext } from "./plugin-C6Asuy6i.cjs";
|
|
2
|
-
import * as esbuild0 from "esbuild";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createTsupPlugin(context: TsupPluginContext): esbuild0.Plugin;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createTsupPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-BojCyphB.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-BojCyphB.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,gBAAA,UAA0B,oBAAiB,QAAA,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_resolve_options = require('./resolve-options-DPfS2t2w.cjs');
|
|
2
|
-
let __powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
3
|
-
let unplugin = require("unplugin");
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/unplugin.ts
|
|
6
|
-
function createTsupPlugin(context) {
|
|
7
|
-
return (0, unplugin.createEsbuildPlugin)((0, __powerlines_core_lib_unplugin.createUnplugin)(context))({});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
Object.defineProperty(exports, 'createTsupPlugin', {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () {
|
|
14
|
-
return createTsupPlugin;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
-
import { createEsbuildPlugin } from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.ts
|
|
5
|
-
function createTsupPlugin(context) {
|
|
6
|
-
return createEsbuildPlugin(createUnplugin(context))({});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { createTsupPlugin as t };
|
|
11
|
-
//# sourceMappingURL=unplugin-D-dKnxUW.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-D-dKnxUW.mjs","names":[],"sources":["../src/helpers/unplugin.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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { TsupPluginContext } from \"../types/plugin\";\n\nexport function createTsupPlugin(context: TsupPluginContext) {\n return createEsbuildPlugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAO,oBAAoB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as TsupPluginContext } from "./plugin-Cq-FOsJ2.mjs";
|
|
2
|
-
import * as esbuild0 from "esbuild";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createTsupPlugin(context: TsupPluginContext): esbuild0.Plugin;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createTsupPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-ySXmbQ7v.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-ySXmbQ7v.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,gBAAA,UAA0B,oBAAiB,QAAA,CAAA"}
|
|
File without changes
|
|
File without changes
|