@powerlines/plugin-tsup 0.12.462 → 0.12.465
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/build-D4pj3EFA.d.mts +8 -0
- package/dist/build-D4pj3EFA.d.mts.map +1 -0
- package/dist/build-MBkBmIxx.d.cts +8 -0
- package/dist/build-MBkBmIxx.d.cts.map +1 -0
- package/dist/index.cjs +42 -11
- package/dist/index.d.cts +2 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +14 -5
- package/dist/index.mjs.map +1 -1
- package/dist/types/build.d.cts +2 -8
- package/dist/types/build.d.mts +2 -8
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.mts +1 -1
- package/package.json +14 -14
- package/dist/_virtual/_rolldown/runtime.cjs +0 -29
- package/dist/helpers/index.cjs +0 -8
- package/dist/helpers/index.d.cts +0 -3
- package/dist/helpers/index.d.mts +0 -3
- package/dist/helpers/index.mjs +0 -4
- package/dist/helpers/resolve-options.cjs +0 -87
- package/dist/helpers/resolve-options.d.cts +0 -25
- package/dist/helpers/resolve-options.d.cts.map +0 -1
- package/dist/helpers/resolve-options.d.mts +0 -25
- package/dist/helpers/resolve-options.d.mts.map +0 -1
- package/dist/helpers/resolve-options.mjs +0 -83
- package/dist/helpers/resolve-options.mjs.map +0 -1
- package/dist/helpers/unplugin.cjs +0 -18
- package/dist/helpers/unplugin.d.cts +0 -8
- package/dist/helpers/unplugin.d.cts.map +0 -1
- package/dist/helpers/unplugin.d.mts +0 -8
- package/dist/helpers/unplugin.d.mts.map +0 -1
- package/dist/helpers/unplugin.mjs +0 -17
- package/dist/helpers/unplugin.mjs.map +0 -1
- package/dist/types/build.d.cts.map +0 -1
- package/dist/types/build.d.mts.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -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/index.cjs
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
require('./types/index.cjs');
|
|
30
|
+
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
6
31
|
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
32
|
+
let _powerlines_unplugin_tsup = require("@powerlines/unplugin/tsup");
|
|
7
33
|
let _storm_software_tsup = require("@storm-software/tsup");
|
|
8
34
|
let defu = require("defu");
|
|
9
|
-
defu =
|
|
35
|
+
defu = __toESM(defu, 1);
|
|
36
|
+
let unplugin = require("unplugin");
|
|
10
37
|
|
|
11
38
|
//#region src/index.ts
|
|
12
39
|
/**
|
|
@@ -24,7 +51,15 @@ const plugin = (options = {}) => {
|
|
|
24
51
|
},
|
|
25
52
|
async build() {
|
|
26
53
|
this.debug("Starting Tsup build process...");
|
|
27
|
-
const
|
|
54
|
+
const resolved = (0, _powerlines_unplugin_tsup.resolveOptions)(this);
|
|
55
|
+
const options = (0, _storm_software_tsup.resolveOptions)((0, defu.default)(this.config.tsup, {
|
|
56
|
+
...resolved,
|
|
57
|
+
config: false,
|
|
58
|
+
esbuildPlugins: [(0, unplugin.createEsbuildPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(this, {
|
|
59
|
+
silenceHookLogging: true,
|
|
60
|
+
name: "tsup"
|
|
61
|
+
}))()]
|
|
62
|
+
}));
|
|
28
63
|
this.debug({
|
|
29
64
|
meta: { category: "config" },
|
|
30
65
|
message: `Resolved Tsup configuration: \n${(0, _powerlines_core_plugin_utils.formatConfig)(options)}`
|
|
@@ -35,9 +70,5 @@ const plugin = (options = {}) => {
|
|
|
35
70
|
};
|
|
36
71
|
|
|
37
72
|
//#endregion
|
|
38
|
-
exports.DEFAULT_TSUP_CONFIG = require_helpers_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
39
|
-
exports.createTsupPlugin = require_helpers_unplugin.createTsupPlugin;
|
|
40
73
|
exports.default = plugin;
|
|
41
|
-
exports.plugin = plugin;
|
|
42
|
-
exports.resolveEntry = require_helpers_resolve_options.resolveEntry;
|
|
43
|
-
exports.resolveOptions = require_helpers_resolve_options.resolveOptions;
|
|
74
|
+
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "./build-MBkBmIxx.cjs";
|
|
2
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
3
|
import { Plugin } from "@powerlines/core";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
|
@@ -15,5 +13,5 @@ declare module "@powerlines/core" {
|
|
|
15
13
|
*/
|
|
16
14
|
declare const plugin: <TContext extends TsupPluginContext = TsupPluginContext>(options?: TsupPluginOptions) => Plugin<TContext>;
|
|
17
15
|
//#endregion
|
|
18
|
-
export {
|
|
16
|
+
export { TsupOptions, TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupOptions, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig, plugin as default, plugin };
|
|
19
17
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YAmCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;;;;cAOE,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "./build-D4pj3EFA.mjs";
|
|
2
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
3
|
import { Plugin } from "@powerlines/core";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
|
@@ -15,5 +13,5 @@ declare module "@powerlines/core" {
|
|
|
15
13
|
*/
|
|
16
14
|
declare const plugin: <TContext extends TsupPluginContext = TsupPluginContext>(options?: TsupPluginOptions) => Plugin<TContext>;
|
|
17
15
|
//#endregion
|
|
18
|
-
export {
|
|
16
|
+
export { TsupOptions, TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig, __ΩTsupOptions, __ΩTsupPluginContext, __ΩTsupPluginOptions, __ΩTsupPluginResolvedConfig, __ΩTsupPluginUserConfig, plugin as default, plugin };
|
|
19
17
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YAmCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;;;;cAOE,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import "./helpers/index.mjs";
|
|
1
|
+
import "./types/index.mjs";
|
|
2
|
+
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
4
3
|
import { formatConfig } from "@powerlines/core/plugin-utils";
|
|
4
|
+
import { resolveOptions } from "@powerlines/unplugin/tsup";
|
|
5
5
|
import { build, resolveOptions as resolveOptions$1 } from "@storm-software/tsup";
|
|
6
6
|
import defu from "defu";
|
|
7
|
+
import { createEsbuildPlugin } from "unplugin";
|
|
7
8
|
|
|
8
9
|
//#region src/index.ts
|
|
9
10
|
/**
|
|
@@ -21,7 +22,15 @@ const plugin = (options = {}) => {
|
|
|
21
22
|
},
|
|
22
23
|
async build() {
|
|
23
24
|
this.debug("Starting Tsup build process...");
|
|
24
|
-
const
|
|
25
|
+
const resolved = resolveOptions(this);
|
|
26
|
+
const options = resolveOptions$1(defu(this.config.tsup, {
|
|
27
|
+
...resolved,
|
|
28
|
+
config: false,
|
|
29
|
+
esbuildPlugins: [createEsbuildPlugin(createUnplugin(this, {
|
|
30
|
+
silenceHookLogging: true,
|
|
31
|
+
name: "tsup"
|
|
32
|
+
}))()]
|
|
33
|
+
}));
|
|
25
34
|
this.debug({
|
|
26
35
|
meta: { category: "config" },
|
|
27
36
|
message: `Resolved Tsup configuration: \n${formatConfig(options)}`
|
|
@@ -32,5 +41,5 @@ const plugin = (options = {}) => {
|
|
|
32
41
|
};
|
|
33
42
|
|
|
34
43
|
//#endregion
|
|
35
|
-
export {
|
|
44
|
+
export { plugin as default, plugin };
|
|
36
45
|
//# 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 { formatConfig } from \"@powerlines/core/plugin-utils\";\nimport {\n build,\n resolveOptions as resolveOptionsBase\n} from \"@storm-software/tsup\";\nimport defu from \"defu\";\nimport {
|
|
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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { formatConfig } from \"@powerlines/core/plugin-utils\";\nimport { resolveOptions } from \"@powerlines/unplugin/tsup\";\nimport {\n build,\n BuildOptions,\n resolveOptions as resolveOptionsBase\n} from \"@storm-software/tsup\";\nimport defu from \"defu\";\nimport { Options } from \"tsup\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { TsupPluginContext, TsupPluginOptions } from \"./types/plugin\";\n\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 };\n },\n async build() {\n this.debug(\"Starting Tsup build process...\");\n\n const resolved = resolveOptions(this);\n const options = resolveOptionsBase(\n defu(this.config.tsup, {\n ...resolved,\n config: false,\n esbuildPlugins: [\n createEsbuildPlugin(\n createUnplugin(this, {\n silenceHookLogging: true,\n name: \"tsup\"\n })\n )()\n ]\n }) as BuildOptions\n ) as Options;\n\n this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Tsup configuration: \\n${formatConfig(options)}`\n });\n\n return build(options);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;AA2CA,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,QAAK,MAAM,iCAAiC;GAE5C,MAAM,WAAW,eAAe,KAAK;GACrC,MAAM,UAAUA,iBACd,KAAK,KAAK,OAAO,MAAM;IACrB,GAAG;IACH,QAAQ;IACR,gBAAgB,CACd,oBACE,eAAe,MAAM;KACnB,oBAAoB;KACpB,MAAM;KACP,CAAC,CACH,EAAE,CACJ;IACF,CAAC,CACH;AAED,QAAK,MAAM;IACT,MAAM,EACJ,UAAU,UACX;IACD,SAAS,kCAAkC,aAAa,QAAQ;IACjE,CAAC;AAEF,UAAO,MAAM,QAAQ;;EAExB"}
|
package/dist/types/build.d.cts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
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
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-MBkBmIxx.cjs";
|
|
2
|
+
export { TsupOptions, __ΩTsupOptions };
|
package/dist/types/build.d.mts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
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
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-D4pj3EFA.mjs";
|
|
2
|
+
export { TsupOptions, __ΩTsupOptions };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-MBkBmIxx.cjs";
|
|
2
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 {
|
|
1
|
+
import { n as __ΩTsupOptions, t as TsupOptions } from "../build-D4pj3EFA.mjs";
|
|
2
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
package/dist/types/plugin.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsup",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.465",
|
|
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"],
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "github",
|
|
14
14
|
"url": "https://github.com/storm-software/powerlines.git",
|
|
15
|
-
"directory": "packages/plugin-tsup"
|
|
15
|
+
"directory": "packages/plugins/plugin-tsup"
|
|
16
16
|
},
|
|
17
17
|
"funding": {
|
|
18
18
|
"type": "github",
|
|
@@ -71,22 +71,22 @@
|
|
|
71
71
|
"module": "./dist/index.mjs",
|
|
72
72
|
"types": "./dist/index.d.cts",
|
|
73
73
|
"typings": "dist/index.d.mts",
|
|
74
|
-
"files": ["dist
|
|
74
|
+
"files": ["dist"],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@powerlines/core": "^0.
|
|
77
|
-
"@powerlines/
|
|
78
|
-
"@storm-software/build-tools": "^0.158.
|
|
79
|
-
"@stryke/convert": "^0.7.
|
|
80
|
-
"@stryke/helpers": "^0.10.
|
|
81
|
-
"@stryke/path": "^0.
|
|
82
|
-
"@stryke/type-checks": "^0.6.
|
|
83
|
-
"@stryke/types": "^0.12.
|
|
76
|
+
"@powerlines/core": "^0.9.2",
|
|
77
|
+
"@powerlines/unplugin": "^0.0.4",
|
|
78
|
+
"@storm-software/build-tools": "^0.158.162",
|
|
79
|
+
"@stryke/convert": "^0.7.6",
|
|
80
|
+
"@stryke/helpers": "^0.10.15",
|
|
81
|
+
"@stryke/path": "^0.29.2",
|
|
82
|
+
"@stryke/type-checks": "^0.6.8",
|
|
83
|
+
"@stryke/types": "^0.12.3",
|
|
84
84
|
"defu": "^6.1.7",
|
|
85
85
|
"unplugin": "^3.0.0"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@storm-software/tsup": "^0.2.
|
|
89
|
-
"@types/node": "^25.
|
|
88
|
+
"@storm-software/tsup": "^0.2.160",
|
|
89
|
+
"@types/node": "^25.7.0",
|
|
90
90
|
"tsup": "8.4.0"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": { "@storm-software/tsup": ">=0.57.0", "tsup": ">=8.4.0" },
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"tsup": { "optional": false }
|
|
96
96
|
},
|
|
97
97
|
"publishConfig": { "access": "public" },
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "3c5c701e16af74006dd70b965009d41eb22ace2a"
|
|
99
99
|
}
|
|
@@ -1,29 +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
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|
package/dist/helpers/index.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_helpers_resolve_options = require('./resolve-options.cjs');
|
|
3
|
-
const require_helpers_unplugin = require('./unplugin.cjs');
|
|
4
|
-
|
|
5
|
-
exports.DEFAULT_TSUP_CONFIG = require_helpers_resolve_options.DEFAULT_TSUP_CONFIG;
|
|
6
|
-
exports.createTsupPlugin = require_helpers_unplugin.createTsupPlugin;
|
|
7
|
-
exports.resolveEntry = require_helpers_resolve_options.resolveEntry;
|
|
8
|
-
exports.resolveOptions = require_helpers_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
DELETED
package/dist/helpers/index.d.mts
DELETED
package/dist/helpers/index.mjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let defu = require("defu");
|
|
4
|
-
defu = require_runtime.__toESM(defu, 1);
|
|
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");
|
|
10
|
-
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
11
|
-
|
|
12
|
-
//#region src/helpers/resolve-options.ts
|
|
13
|
-
const DEFAULT_TSUP_CONFIG = {
|
|
14
|
-
..._storm_software_tsup_constants.DEFAULT_BUILD_OPTIONS,
|
|
15
|
-
target: "esnext",
|
|
16
|
-
config: false,
|
|
17
|
-
minify: true,
|
|
18
|
-
sourcemap: false,
|
|
19
|
-
cjsInterop: true,
|
|
20
|
-
bundle: true,
|
|
21
|
-
dts: true,
|
|
22
|
-
shims: true,
|
|
23
|
-
silent: true,
|
|
24
|
-
treeshake: true,
|
|
25
|
-
keepNames: true,
|
|
26
|
-
splitting: true,
|
|
27
|
-
banner: {}
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
31
|
-
*
|
|
32
|
-
* @param context - The build context.
|
|
33
|
-
* @param entryPoints - The entry points to resolve.
|
|
34
|
-
* @returns The resolved entry options.
|
|
35
|
-
*/
|
|
36
|
-
function resolveEntry(context, entryPoints) {
|
|
37
|
-
return (0, _powerlines_plugin_esbuild_helpers_resolve_options.resolveEntry)(context, entryPoints);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
41
|
-
*
|
|
42
|
-
* @param context - The build context.
|
|
43
|
-
* @returns The resolved options.
|
|
44
|
-
*/
|
|
45
|
-
function resolveOptions(context) {
|
|
46
|
-
const result = (0, defu.default)({
|
|
47
|
-
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, (0, _stryke_path_append.appendPath)(value, context.config.root)])),
|
|
48
|
-
esbuildOptions: (options, ctx) => {
|
|
49
|
-
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
50
|
-
options.alias = {
|
|
51
|
-
...context.alias,
|
|
52
|
-
...context.builtins.reduce((ret, id) => {
|
|
53
|
-
const path = context.fs.paths[id];
|
|
54
|
-
if (path) ret[id] = path;
|
|
55
|
-
return ret;
|
|
56
|
-
}, {}),
|
|
57
|
-
...options.alias
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
|
-
noExternal: context.builtins
|
|
61
|
-
}, context.config.tsup ? context.config.tsup : {}, {
|
|
62
|
-
name: context.config.name,
|
|
63
|
-
root: context.config.root,
|
|
64
|
-
projectRoot: context.config.root,
|
|
65
|
-
assets: context.config.output.copy ? context.config.output.copy.assets : void 0,
|
|
66
|
-
resolveExtensions: context.config.resolve.extensions,
|
|
67
|
-
outputPath: (0, _stryke_path_file_path_fns.relativePath)((0, _stryke_path_append.appendPath)(context.config.root, context.config.cwd), context.config.output.path),
|
|
68
|
-
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
69
|
-
dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
|
|
70
|
-
format: context.config.output.format,
|
|
71
|
-
mode: context.config.mode,
|
|
72
|
-
treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
|
|
73
|
-
minify: context.config.output.minify,
|
|
74
|
-
metafile: context.config.mode === "development",
|
|
75
|
-
sourcemap: context.config.output.sourceMap,
|
|
76
|
-
silent: context.config.logLevel.general === "silent" || context.config.mode === "production",
|
|
77
|
-
verbose: context.config.logLevel.general === "trace" || context.config.mode === "development",
|
|
78
|
-
workspaceConfig: { workspaceRoot: context.config.cwd }
|
|
79
|
-
}, DEFAULT_TSUP_CONFIG);
|
|
80
|
-
result.format = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(result.format));
|
|
81
|
-
return result;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
//#endregion
|
|
85
|
-
exports.DEFAULT_TSUP_CONFIG = DEFAULT_TSUP_CONFIG;
|
|
86
|
-
exports.resolveEntry = resolveEntry;
|
|
87
|
-
exports.resolveOptions = resolveOptions;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options.d.cts","names":[],"sources":["../../src/helpers/resolve-options.ts"],"mappings":";;;;;;cA+Ba,mBAAA,EAAqB,OAAA,CAAQ,WAAA;;;AAA1C;;;;;iBAwBgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,EAAa,2BAAA,gBACZ,KAAA;;;;;;;iBAea,cAAA,CACd,OAAA,EAAS,OAAA,GACR,UAAA,QAAkB,gBAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options.d.mts","names":[],"sources":["../../src/helpers/resolve-options.ts"],"mappings":";;;;;;cA+Ba,mBAAA,EAAqB,OAAA,CAAQ,WAAA;;;AAA1C;;;;;iBAwBgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,EAAa,2BAAA,gBACZ,KAAA;;;;;;;iBAea,cAAA,CACd,OAAA,EAAS,OAAA,GACR,UAAA,QAAkB,gBAAA"}
|
|
@@ -1,83 +0,0 @@
|
|
|
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";
|
|
7
|
-
import { relativePath } from "@stryke/path/file-path-fns";
|
|
8
|
-
|
|
9
|
-
//#region src/helpers/resolve-options.ts
|
|
10
|
-
const DEFAULT_TSUP_CONFIG = {
|
|
11
|
-
...DEFAULT_BUILD_OPTIONS,
|
|
12
|
-
target: "esnext",
|
|
13
|
-
config: false,
|
|
14
|
-
minify: true,
|
|
15
|
-
sourcemap: false,
|
|
16
|
-
cjsInterop: true,
|
|
17
|
-
bundle: true,
|
|
18
|
-
dts: true,
|
|
19
|
-
shims: true,
|
|
20
|
-
silent: true,
|
|
21
|
-
treeshake: true,
|
|
22
|
-
keepNames: true,
|
|
23
|
-
splitting: true,
|
|
24
|
-
banner: {}
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Resolves the entry options for [tsup](https://github.com/egoist/tsup).
|
|
28
|
-
*
|
|
29
|
-
* @param context - The build context.
|
|
30
|
-
* @param entryPoints - The entry points to resolve.
|
|
31
|
-
* @returns The resolved entry options.
|
|
32
|
-
*/
|
|
33
|
-
function resolveEntry(context, entryPoints) {
|
|
34
|
-
return resolveEntry$1(context, entryPoints);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Resolves the options for [tsup](https://github.com/egoist/tsup).
|
|
38
|
-
*
|
|
39
|
-
* @param context - The build context.
|
|
40
|
-
* @returns The resolved options.
|
|
41
|
-
*/
|
|
42
|
-
function resolveOptions(context) {
|
|
43
|
-
const result = defu({
|
|
44
|
-
entry: Object.fromEntries(Object.entries(resolveEntry(context, context.entry)).map(([key, value]) => [key, appendPath(value, context.config.root)])),
|
|
45
|
-
esbuildOptions: (options, ctx) => {
|
|
46
|
-
if (context.config.tsup?.esbuildOptions) context.config.tsup?.esbuildOptions?.(options, ctx);
|
|
47
|
-
options.alias = {
|
|
48
|
-
...context.alias,
|
|
49
|
-
...context.builtins.reduce((ret, id) => {
|
|
50
|
-
const path = context.fs.paths[id];
|
|
51
|
-
if (path) ret[id] = path;
|
|
52
|
-
return ret;
|
|
53
|
-
}, {}),
|
|
54
|
-
...options.alias
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
noExternal: context.builtins
|
|
58
|
-
}, context.config.tsup ? context.config.tsup : {}, {
|
|
59
|
-
name: context.config.name,
|
|
60
|
-
root: context.config.root,
|
|
61
|
-
projectRoot: context.config.root,
|
|
62
|
-
assets: context.config.output.copy ? context.config.output.copy.assets : void 0,
|
|
63
|
-
resolveExtensions: context.config.resolve.extensions,
|
|
64
|
-
outputPath: relativePath(appendPath(context.config.root, context.config.cwd), context.config.output.path),
|
|
65
|
-
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
66
|
-
dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
|
|
67
|
-
format: context.config.output.format,
|
|
68
|
-
mode: context.config.mode,
|
|
69
|
-
treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
|
|
70
|
-
minify: context.config.output.minify,
|
|
71
|
-
metafile: context.config.mode === "development",
|
|
72
|
-
sourcemap: context.config.output.sourceMap,
|
|
73
|
-
silent: context.config.logLevel.general === "silent" || context.config.mode === "production",
|
|
74
|
-
verbose: context.config.logLevel.general === "trace" || context.config.mode === "development",
|
|
75
|
-
workspaceConfig: { workspaceRoot: context.config.cwd }
|
|
76
|
-
}, DEFAULT_TSUP_CONFIG);
|
|
77
|
-
result.format = getUnique(toArray(result.format));
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
|
-
export { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions };
|
|
83
|
-
//# sourceMappingURL=resolve-options.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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 { relativePath } from \"@stryke/path/file-path-fns\";\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\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 },\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.copy\n ? (context.config.output.copy.assets as (string | AssetGlob)[])\n : undefined,\n resolveExtensions: context.config.resolve.extensions,\n outputPath: relativePath(\n appendPath(context.config.root, context.config.cwd),\n context.config.output.path\n ),\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.output.minify,\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.output.sourceMap,\n silent:\n context.config.logLevel.general === \"silent\" ||\n context.config.mode === \"production\",\n verbose:\n context.config.logLevel.general === \"trace\" ||\n context.config.mode === \"development\",\n workspaceConfig: { workspaceRoot: context.config.cwd }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result as Parameters<typeof resolveOptionsBase>[0];\n}\n"],"mappings":";;;;;;;;;AA+BA,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;;;;;;;;AAclD,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,iBACE,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,OACzB,QAAQ,OAAO,OAAO,KAAK,SAC5B;EACJ,mBAAmB,QAAQ,OAAO,QAAQ;EAC1C,YAAY,aACV,WAAW,QAAQ,OAAO,MAAM,QAAQ,OAAO,IAAI,EACnD,QAAQ,OAAO,OAAO,KACvB;EACD,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,OAAO;EAC9B,UAAU,QAAQ,OAAO,SAAS;EAClC,WAAW,QAAQ,OAAO,OAAO;EACjC,QACE,QAAQ,OAAO,SAAS,YAAY,YACpC,QAAQ,OAAO,SAAS;EAC1B,SACE,QAAQ,OAAO,SAAS,YAAY,WACpC,QAAQ,OAAO,SAAS;EAC1B,iBAAiB,EAAE,eAAe,QAAQ,OAAO,KAAK;EACvD,EACD,oBACD;AAED,QAAO,SAAS,UAAU,QAAQ,OAAO,OAAO,CAAC;AACjD,QAAO"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
4
|
-
let unplugin = require("unplugin");
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/unplugin.ts
|
|
7
|
-
function createTsupPlugin(context) {
|
|
8
|
-
return (0, unplugin.createEsbuildPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context, {
|
|
9
|
-
silenceHookLogging: true,
|
|
10
|
-
name: "tsup"
|
|
11
|
-
}))({
|
|
12
|
-
...context.options,
|
|
13
|
-
...context.config.initialConfig
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
exports.createTsupPlugin = createTsupPlugin;
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAiB,SAAA,CAAA,MAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAiB,SAAA,CAAA,MAAA"}
|
|
@@ -1,17 +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
|
-
silenceHookLogging: true,
|
|
8
|
-
name: "tsup"
|
|
9
|
-
}))({
|
|
10
|
-
...context.options,
|
|
11
|
-
...context.config.initialConfig
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
export { createTsupPlugin };
|
|
17
|
-
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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(\n createUnplugin(context, { silenceHookLogging: true, name: \"tsup\" })\n )({ ...context.options, ...context.config.initialConfig });\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAO,oBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAQ,CAAC,CACpE,CAAC;EAAE,GAAG,QAAQ;EAAS,GAAG,QAAQ,OAAO;EAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.cts","names":[],"sources":["../../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.mts","names":[],"sources":["../../src/types/build.ts"],"mappings":";;;KAoBY,WAAA,GAAc,OAAA,CACxB,IAAA,CACE,YAAA;AAAA"}
|