powerlines 0.42.30 → 0.42.32
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/api-D6i8MmbC.mjs +6063 -0
- package/dist/api-D6i8MmbC.mjs.map +1 -0
- package/dist/api-DZoRNTY7.cjs +6083 -0
- package/dist/{api-context-AY_byIdN.mjs → api-context-BQi9M07D.mjs} +414 -6
- package/dist/api-context-BQi9M07D.mjs.map +1 -0
- package/dist/{api-context-BTrJUKNX.cjs → api-context-k3dnn5KR.cjs} +425 -9
- package/dist/astro.cjs +4 -5
- package/dist/astro.d.cts +2 -2
- package/dist/astro.d.cts.map +1 -1
- package/dist/astro.d.mts +2 -2
- package/dist/astro.d.mts.map +1 -1
- package/dist/astro.mjs +3 -3
- package/dist/astro.mjs.map +1 -1
- package/dist/base-Bl_AMAlI.d.cts +12 -0
- package/dist/base-Bl_AMAlI.d.cts.map +1 -0
- package/dist/base-hjCHfNY6.d.mts +12 -0
- package/dist/base-hjCHfNY6.d.mts.map +1 -0
- package/dist/{chunk-AIJqnxB6.cjs → chunk-7azAqIA9.cjs} +7 -0
- package/dist/{chunk-CtajNgzt.mjs → chunk-WJdhOJK3.mjs} +10 -1
- package/dist/config.cjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.cts +260 -1
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +260 -1
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/esbuild.cjs +3 -10
- package/dist/esbuild.d.cts +2 -2
- package/dist/esbuild.d.cts.map +1 -1
- package/dist/esbuild.d.mts +2 -2
- package/dist/esbuild.d.mts.map +1 -1
- package/dist/esbuild.mjs +2 -2
- package/dist/esbuild.mjs.map +1 -1
- package/dist/farm.cjs +5 -6
- package/dist/farm.d.cts +2 -2
- package/dist/farm.d.cts.map +1 -1
- package/dist/farm.d.mts +2 -2
- package/dist/farm.d.mts.map +1 -1
- package/dist/farm.mjs +2 -2
- package/dist/farm.mjs.map +1 -1
- package/dist/index.cjs +5 -7
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -4
- package/dist/index.mjs.map +1 -1
- package/dist/next.cjs +5 -6
- package/dist/next.d.cts +2 -2
- package/dist/next.d.cts.map +1 -1
- package/dist/next.d.mts +2 -2
- package/dist/next.d.mts.map +1 -1
- package/dist/next.mjs +4 -4
- package/dist/next.mjs.map +1 -1
- package/dist/nuxt.cjs +8 -9
- package/dist/nuxt.d.cts +2 -2
- package/dist/nuxt.d.cts.map +1 -1
- package/dist/nuxt.d.mts +2 -2
- package/dist/nuxt.d.mts.map +1 -1
- package/dist/nuxt.mjs +7 -7
- package/dist/nuxt.mjs.map +1 -1
- package/dist/plugin-utils.cjs +1 -1
- package/dist/plugin-utils.mjs +1 -1
- package/dist/rolldown.cjs +4 -11
- package/dist/rolldown.d.cts +2 -2
- package/dist/rolldown.d.cts.map +1 -1
- package/dist/rolldown.d.mts +2 -2
- package/dist/rolldown.d.mts.map +1 -1
- package/dist/rolldown.mjs +2 -2
- package/dist/rolldown.mjs.map +1 -1
- package/dist/rollup.cjs +4 -11
- package/dist/rollup.d.cts +2 -2
- package/dist/rollup.d.cts.map +1 -1
- package/dist/rollup.d.mts +2 -2
- package/dist/rollup.d.mts.map +1 -1
- package/dist/rollup.mjs +2 -2
- package/dist/rollup.mjs.map +1 -1
- package/dist/rspack.cjs +4 -11
- package/dist/rspack.d.cts +2 -2
- package/dist/rspack.d.cts.map +1 -1
- package/dist/rspack.d.mts +2 -2
- package/dist/rspack.d.mts.map +1 -1
- package/dist/rspack.mjs +2 -2
- package/dist/rspack.mjs.map +1 -1
- package/dist/storage/index.cjs +1 -1
- package/dist/storage/index.d.cts +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/storage/index.mjs +1 -1
- package/dist/{tsconfig-B0kfe_iM.cjs → tsconfig-BhVGZ2DK.cjs} +2 -2
- package/dist/{tsconfig-B8RooiIp.mjs → tsconfig-CzYPBpDS.mjs} +2 -2
- package/dist/{tsconfig-B8RooiIp.mjs.map → tsconfig-CzYPBpDS.mjs.map} +1 -1
- package/dist/tsdown.cjs +5 -12
- package/dist/tsdown.d.cts +2 -2
- package/dist/tsdown.d.cts.map +1 -1
- package/dist/tsdown.d.mts +2 -2
- package/dist/tsdown.d.mts.map +1 -1
- package/dist/tsdown.mjs +3 -3
- package/dist/tsdown.mjs.map +1 -1
- package/dist/tsup.cjs +5 -12
- package/dist/tsup.d.cts +547 -3
- package/dist/tsup.d.cts.map +1 -1
- package/dist/tsup.d.mts +547 -3
- package/dist/tsup.d.mts.map +1 -1
- package/dist/tsup.mjs +3 -3
- package/dist/tsup.mjs.map +1 -1
- package/dist/typescript/index.cjs +2 -2
- package/dist/typescript/index.d.cts +6 -1
- package/dist/typescript/index.d.cts.map +1 -1
- package/dist/typescript/index.d.mts +6 -1
- package/dist/typescript/index.d.mts.map +1 -1
- package/dist/typescript/index.mjs +1 -1
- package/dist/unloader.cjs +5 -6
- package/dist/unloader.d.cts +2 -2
- package/dist/unloader.d.mts +2 -2
- package/dist/unloader.mjs +2 -2
- package/dist/unloader.mjs.map +1 -1
- package/dist/unplugin.cjs +2 -2
- package/dist/unplugin.mjs +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/{virtual-CJChzKrr.cjs → virtual-BHb4iMd_.cjs} +3 -3
- package/dist/{virtual-DB9ki0Y6.mjs → virtual-OEHgBu0s.mjs} +3 -3
- package/dist/{virtual-DB9ki0Y6.mjs.map → virtual-OEHgBu0s.mjs.map} +1 -1
- package/dist/vite.cjs +4 -11
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.mts +2 -2
- package/dist/vite.mjs +2 -2
- package/dist/vite.mjs.map +1 -1
- package/dist/webpack.cjs +4 -11
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.cts.map +1 -1
- package/dist/webpack.d.mts +2 -2
- package/dist/webpack.d.mts.map +1 -1
- package/dist/webpack.mjs +2 -2
- package/dist/webpack.mjs.map +1 -1
- package/package.json +14 -14
- package/dist/api-BQswQ9mT.mjs +0 -861
- package/dist/api-BQswQ9mT.mjs.map +0 -1
- package/dist/api-D7HzHvkw.cjs +0 -881
- package/dist/api-context-AY_byIdN.mjs.map +0 -1
package/dist/rolldown.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('./chunk-7azAqIA9.cjs');
|
|
3
3
|
const require_unplugin = require('./unplugin.cjs');
|
|
4
4
|
let defu = require("defu");
|
|
5
5
|
let unplugin = require("unplugin");
|
|
@@ -34,18 +34,11 @@ const unplugin$1 = (0, unplugin.createRolldownPlugin)(require_unplugin.createUnp
|
|
|
34
34
|
}));
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
exports.default = unplugin$1;
|
|
38
|
-
exports["module.exports"] = unplugin$1;
|
|
39
|
-
exports.unplugin = unplugin$1;
|
|
40
37
|
Object.defineProperty(exports, 'plugin', {
|
|
41
38
|
enumerable: true,
|
|
42
39
|
get: function () {
|
|
43
40
|
return _powerlines_plugin_rolldown.default;
|
|
44
41
|
}
|
|
45
42
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
get: function () {
|
|
49
|
-
return _powerlines_plugin_rolldown.default;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
43
|
+
exports.rolldown = unplugin$1;
|
|
44
|
+
exports.unplugin = unplugin$1;
|
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _$rolldown from "rolldown";
|
|
2
2
|
import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plugin";
|
|
3
|
-
import plugin
|
|
3
|
+
import plugin from "@powerlines/plugin-rolldown";
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown.d.ts
|
|
6
6
|
/**
|
|
@@ -20,5 +20,5 @@ import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
|
|
|
20
20
|
*/
|
|
21
21
|
declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { plugin, unplugin as rolldown, unplugin };
|
|
24
24
|
//# sourceMappingURL=rolldown.d.cts.map
|
package/dist/rolldown.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolldown.d.cts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rolldown.d.cts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AA6CA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,wBAAA,MAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
|
package/dist/rolldown.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import plugin
|
|
1
|
+
import plugin from "@powerlines/plugin-rolldown";
|
|
2
2
|
import * as _$rolldown from "rolldown";
|
|
3
3
|
import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plugin";
|
|
4
4
|
|
|
@@ -20,5 +20,5 @@ import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plug
|
|
|
20
20
|
*/
|
|
21
21
|
declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { plugin, unplugin as rolldown, unplugin };
|
|
24
24
|
//# sourceMappingURL=rolldown.d.mts.map
|
package/dist/rolldown.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolldown.d.mts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rolldown.d.mts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AA6CA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,wBAAA,MAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
|
package/dist/rolldown.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { createUnpluginFactory } from "./unplugin.mjs";
|
|
|
2
2
|
import { defu } from "defu";
|
|
3
3
|
import { createRolldownPlugin } from "unplugin";
|
|
4
4
|
import { resolveOptions } from "@powerlines/plugin-rolldown/helpers/resolve-options";
|
|
5
|
-
import plugin
|
|
5
|
+
import plugin from "@powerlines/plugin-rolldown";
|
|
6
6
|
|
|
7
7
|
//#region src/rolldown.ts
|
|
8
8
|
/**
|
|
@@ -31,5 +31,5 @@ const unplugin = createRolldownPlugin(createUnpluginFactory("rolldown", (api, pl
|
|
|
31
31
|
}));
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { plugin, unplugin as rolldown, unplugin };
|
|
35
35
|
//# sourceMappingURL=rolldown.mjs.map
|
package/dist/rolldown.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.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 { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginUserConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {
|
|
1
|
+
{"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.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 { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginUserConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin } from \"@powerlines/plugin-rolldown\";\n\n/**\n * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRolldownPlugin<Partial<RolldownPluginUserConfig>>(\n createUnpluginFactory<RolldownPluginContext>(\"rolldown\", (api, plugin) => {\n return {\n ...plugin,\n rolldown: {\n async options(options: InputOptions) {\n const merged = defu(await api.context.getEnvironment(), this);\n\n return defu(\n resolveOptions(merged),\n options,\n api.callHook(\n \"rolldown:options\",\n { environment: merged },\n options\n ) ?? {}\n );\n }\n }\n };\n })\n);\n\nexport { unplugin as rolldown };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAa,WAAW,qBACtB,sBAA6C,aAAa,KAAK,WAAW;AACxE,QAAO;EACL,GAAG;EACH,UAAU,EACR,MAAM,QAAQ,SAAuB;GACnC,MAAM,SAAS,KAAK,MAAM,IAAI,QAAQ,gBAAgB,EAAE,KAAK;AAE7D,UAAO,KACL,eAAe,OAAO,EACtB,SACA,IAAI,SACF,oBACA,EAAE,aAAa,QAAQ,EACvB,QACD,IAAI,EAAE,CACR;KAEJ;EACF;EACD,CACH"}
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('./chunk-7azAqIA9.cjs');
|
|
3
3
|
const require_unplugin = require('./unplugin.cjs');
|
|
4
4
|
let unplugin = require("unplugin");
|
|
5
5
|
let _powerlines_plugin_rollup = require("@powerlines/plugin-rollup");
|
|
@@ -25,18 +25,11 @@ _powerlines_plugin_rollup = require_chunk.__toESM(_powerlines_plugin_rollup);
|
|
|
25
25
|
const unplugin$1 = (0, unplugin.createRollupPlugin)(require_unplugin.createUnpluginFactory("rollup"));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
exports.default = unplugin$1;
|
|
29
|
-
exports["module.exports"] = unplugin$1;
|
|
30
|
-
exports.unplugin = unplugin$1;
|
|
31
28
|
Object.defineProperty(exports, 'plugin', {
|
|
32
29
|
enumerable: true,
|
|
33
30
|
get: function () {
|
|
34
31
|
return _powerlines_plugin_rollup.default;
|
|
35
32
|
}
|
|
36
33
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
get: function () {
|
|
40
|
-
return _powerlines_plugin_rollup.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
34
|
+
exports.rollup = unplugin$1;
|
|
35
|
+
exports.unplugin = unplugin$1;
|
package/dist/rollup.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _$rollup from "rollup";
|
|
2
2
|
import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
|
|
3
|
-
import plugin
|
|
3
|
+
import plugin from "@powerlines/plugin-rollup";
|
|
4
4
|
|
|
5
5
|
//#region src/rollup.d.ts
|
|
6
6
|
/**
|
|
@@ -21,5 +21,5 @@ import plugin, { default as rollup } from "@powerlines/plugin-rollup";
|
|
|
21
21
|
*/
|
|
22
22
|
declare const unplugin: (options: Partial<RollupPluginUserConfig>) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
|
|
23
23
|
//#endregion
|
|
24
|
-
export {
|
|
24
|
+
export { plugin, unplugin as rollup, unplugin };
|
|
25
25
|
//# sourceMappingURL=rollup.d.cts.map
|
package/dist/rollup.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.d.cts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rollup.d.cts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
|
package/dist/rollup.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import plugin
|
|
1
|
+
import plugin from "@powerlines/plugin-rollup";
|
|
2
2
|
import * as _$rollup from "rollup";
|
|
3
3
|
import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
|
|
4
4
|
|
|
@@ -21,5 +21,5 @@ import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
|
|
|
21
21
|
*/
|
|
22
22
|
declare const unplugin: (options: Partial<RollupPluginUserConfig>) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
|
|
23
23
|
//#endregion
|
|
24
|
-
export {
|
|
24
|
+
export { plugin, unplugin as rollup, unplugin };
|
|
25
25
|
//# sourceMappingURL=rollup.d.mts.map
|
package/dist/rollup.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.d.mts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rollup.d.mts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
|
package/dist/rollup.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createUnpluginFactory } from "./unplugin.mjs";
|
|
2
2
|
import { createRollupPlugin } from "unplugin";
|
|
3
|
-
import plugin
|
|
3
|
+
import plugin from "@powerlines/plugin-rollup";
|
|
4
4
|
|
|
5
5
|
//#region src/rollup.ts
|
|
6
6
|
/**
|
|
@@ -22,5 +22,5 @@ import plugin, { default as rollup } from "@powerlines/plugin-rollup";
|
|
|
22
22
|
const unplugin = createRollupPlugin(createUnpluginFactory("rollup"));
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
export {
|
|
25
|
+
export { plugin, unplugin as rollup, unplugin };
|
|
26
26
|
//# sourceMappingURL=rollup.mjs.map
|
package/dist/rollup.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.mjs","names":[],"sources":["../src/rollup.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 { RollupPluginUserConfig } from \"@powerlines/plugin-rollup/types/plugin\";\nimport { createRollupPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {
|
|
1
|
+
{"version":3,"file":"rollup.mjs","names":[],"sources":["../src/rollup.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 { RollupPluginUserConfig } from \"@powerlines/plugin-rollup/types/plugin\";\nimport { createRollupPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin } from \"@powerlines/plugin-rollup\";\n\n/**\n * A Rollup plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n *\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRollupPlugin<Partial<RollupPluginUserConfig>>(\n createUnpluginFactory(\"rollup\")\n);\n\nexport { unplugin as rollup };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('./chunk-7azAqIA9.cjs');
|
|
3
3
|
const require_unplugin = require('./unplugin.cjs');
|
|
4
4
|
let unplugin = require("unplugin");
|
|
5
5
|
let _powerlines_plugin_rspack = require("@powerlines/plugin-rspack");
|
|
@@ -25,18 +25,11 @@ _powerlines_plugin_rspack = require_chunk.__toESM(_powerlines_plugin_rspack);
|
|
|
25
25
|
const unplugin$1 = (0, unplugin.createRspackPlugin)(require_unplugin.createUnpluginFactory("rspack"));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
exports.default = unplugin$1;
|
|
29
|
-
exports["module.exports"] = unplugin$1;
|
|
30
|
-
exports.unplugin = unplugin$1;
|
|
31
28
|
Object.defineProperty(exports, 'plugin', {
|
|
32
29
|
enumerable: true,
|
|
33
30
|
get: function () {
|
|
34
31
|
return _powerlines_plugin_rspack.default;
|
|
35
32
|
}
|
|
36
33
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
get: function () {
|
|
40
|
-
return _powerlines_plugin_rspack.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
34
|
+
exports.rspack = unplugin$1;
|
|
35
|
+
exports.unplugin = unplugin$1;
|
package/dist/rspack.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _$unplugin from "unplugin";
|
|
2
2
|
import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
|
|
3
|
-
import plugin
|
|
3
|
+
import plugin from "@powerlines/plugin-rspack";
|
|
4
4
|
|
|
5
5
|
//#region src/rspack.d.ts
|
|
6
6
|
/**
|
|
@@ -21,5 +21,5 @@ import plugin, { default as rspack } from "@powerlines/plugin-rspack";
|
|
|
21
21
|
*/
|
|
22
22
|
declare const unplugin: (options: Partial<RspackPluginUserConfig>) => _$unplugin.RspackPluginInstance;
|
|
23
23
|
//#endregion
|
|
24
|
-
export {
|
|
24
|
+
export { plugin, unplugin as rspack, unplugin };
|
|
25
25
|
//# sourceMappingURL=rspack.d.cts.map
|
package/dist/rspack.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspack.d.cts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rspack.d.cts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
|
package/dist/rspack.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _$unplugin from "unplugin";
|
|
2
|
-
import plugin
|
|
2
|
+
import plugin from "@powerlines/plugin-rspack";
|
|
3
3
|
import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/rspack.d.ts
|
|
@@ -21,5 +21,5 @@ import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
|
|
|
21
21
|
*/
|
|
22
22
|
declare const unplugin: (options: Partial<RspackPluginUserConfig>) => _$unplugin.RspackPluginInstance;
|
|
23
23
|
//#endregion
|
|
24
|
-
export {
|
|
24
|
+
export { plugin, unplugin as rspack, unplugin };
|
|
25
25
|
//# sourceMappingURL=rspack.d.mts.map
|
package/dist/rspack.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspack.d.mts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rspack.d.mts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
|
package/dist/rspack.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createUnpluginFactory } from "./unplugin.mjs";
|
|
2
2
|
import { createRspackPlugin } from "unplugin";
|
|
3
|
-
import plugin
|
|
3
|
+
import plugin from "@powerlines/plugin-rspack";
|
|
4
4
|
|
|
5
5
|
//#region src/rspack.ts
|
|
6
6
|
/**
|
|
@@ -22,5 +22,5 @@ import plugin, { default as rspack } from "@powerlines/plugin-rspack";
|
|
|
22
22
|
const unplugin = createRspackPlugin(createUnpluginFactory("rspack"));
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
export {
|
|
25
|
+
export { plugin, unplugin as rspack, unplugin };
|
|
26
26
|
//# sourceMappingURL=rspack.mjs.map
|
package/dist/rspack.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspack.mjs","names":[],"sources":["../src/rspack.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 { RspackPluginUserConfig } from \"@powerlines/plugin-rspack/types/plugin\";\nimport { createRspackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {
|
|
1
|
+
{"version":3,"file":"rspack.mjs","names":[],"sources":["../src/rspack.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 { RspackPluginUserConfig } from \"@powerlines/plugin-rspack/types/plugin\";\nimport { createRspackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin } from \"@powerlines/plugin-rspack\";\n\n/**\n * An Rspack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rspack.dev/concepts/plugins\n *\n * @example\n * ```ts\n * // rspack.config.ts\n *\n * import powerlines from \"powerlines/rspack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createRspackPlugin<Partial<RspackPluginUserConfig>>(\n createUnpluginFactory(\"rspack\")\n);\n\nexport { unplugin as rspack };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
|
package/dist/storage/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_virtual = require('../virtual-
|
|
2
|
+
const require_virtual = require('../virtual-BHb4iMd_.cjs');
|
|
3
3
|
|
|
4
4
|
exports.BaseStorageAdapter = require_virtual.BaseStorageAdapter;
|
|
5
5
|
exports.FileSystemStorageAdapter = require_virtual.FileSystemStorageAdapter;
|
package/dist/storage/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as types_d_exports } from "../types-DerAvFjs.cjs";
|
|
2
|
-
import { MaybePromise } from "
|
|
2
|
+
import { t as MaybePromise } from "../base-Bl_AMAlI.cjs";
|
|
3
3
|
import { writeFile, writeFileSync } from "@stryke/fs/write-file";
|
|
4
4
|
|
|
5
5
|
//#region src/storage/base.d.ts
|
package/dist/storage/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as types_d_exports } from "../types-hdziyQIH.mjs";
|
|
2
|
+
import { t as MaybePromise } from "../base-hjCHfNY6.mjs";
|
|
2
3
|
import { writeFile, writeFileSync } from "@stryke/fs/write-file";
|
|
3
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
4
4
|
|
|
5
5
|
//#region src/storage/base.d.ts
|
|
6
6
|
interface StorageAdapterOptions {
|
package/dist/storage/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isFileError, i as ignoreNotfound, n as FileSystemStorageAdapter, o as BaseStorageAdapter, r as ignoreExists, t as VirtualStorageAdapter } from "../virtual-
|
|
1
|
+
import { a as isFileError, i as ignoreNotfound, n as FileSystemStorageAdapter, o as BaseStorageAdapter, r as ignoreExists, t as VirtualStorageAdapter } from "../virtual-OEHgBu0s.mjs";
|
|
2
2
|
|
|
3
3
|
export { BaseStorageAdapter, FileSystemStorageAdapter, VirtualStorageAdapter, ignoreExists, ignoreNotfound, isFileError };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
const require_chunk = require('./chunk-7azAqIA9.cjs');
|
|
2
2
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
3
3
|
let _stryke_path_append = require("@stryke/path/append");
|
|
4
4
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
5
5
|
let defu = require("defu");
|
|
6
6
|
defu = require_chunk.__toESM(defu);
|
|
7
|
-
let _stryke_fs_json = require("@stryke/fs/json");
|
|
8
7
|
let typescript = require("typescript");
|
|
9
8
|
typescript = require_chunk.__toESM(typescript);
|
|
9
|
+
let _stryke_fs_json = require("@stryke/fs/json");
|
|
10
10
|
|
|
11
11
|
//#region src/typescript/tsconfig.ts
|
|
12
12
|
/**
|
|
@@ -2,8 +2,8 @@ import { existsSync } from "@stryke/fs/exists";
|
|
|
2
2
|
import { appendPath } from "@stryke/path/append";
|
|
3
3
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
4
4
|
import defu$1 from "defu";
|
|
5
|
-
import { readJsonFileSync } from "@stryke/fs/json";
|
|
6
5
|
import ts from "typescript";
|
|
6
|
+
import { readJsonFileSync } from "@stryke/fs/json";
|
|
7
7
|
|
|
8
8
|
//#region src/typescript/tsconfig.ts
|
|
9
9
|
/**
|
|
@@ -152,4 +152,4 @@ ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && err
|
|
|
152
152
|
|
|
153
153
|
//#endregion
|
|
154
154
|
export { isIncludeMatchFound as a, getTsconfigFilePath as i, findMatch as n, isMatchFound as o, getParsedTypeScriptConfig as r, tryTsconfigFilePath as s, findIncludeMatch as t };
|
|
155
|
-
//# sourceMappingURL=tsconfig-
|
|
155
|
+
//# sourceMappingURL=tsconfig-CzYPBpDS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-B8RooiIp.mjs","names":["defu"],"sources":["../src/typescript/tsconfig.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 type { ParsedTypeScriptConfig, TSConfig } from \"@powerlines/core\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFileSync } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n } else {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.app.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.lib.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n projectRoot\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, projectRoot);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(\n tsconfig,\n appendPath(projectRoot, workspaceRoot)\n );\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"tsconfig-CzYPBpDS.mjs","names":["defu"],"sources":["../src/typescript/tsconfig.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 type { ParsedTypeScriptConfig, TSConfig } from \"@powerlines/core\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFileSync } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n } else {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.app.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.lib.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n projectRoot\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, projectRoot);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(\n tsconfig,\n appendPath(projectRoot, workspaceRoot)\n );\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":"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"}
|
package/dist/tsdown.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('./chunk-7azAqIA9.cjs');
|
|
3
3
|
const require_rolldown = require('./rolldown.cjs');
|
|
4
4
|
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
5
5
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
@@ -36,7 +36,7 @@ function unplugin(options = {}) {
|
|
|
36
36
|
return {
|
|
37
37
|
...options,
|
|
38
38
|
entry: options.entry,
|
|
39
|
-
plugins: [require_rolldown.
|
|
39
|
+
plugins: [require_rolldown.rolldown({
|
|
40
40
|
name: options.name,
|
|
41
41
|
root: options.cwd ?? process.cwd(),
|
|
42
42
|
output: {
|
|
@@ -81,18 +81,11 @@ function unplugin(options = {}) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
//#endregion
|
|
84
|
-
exports.default = unplugin;
|
|
85
|
-
exports["module.exports"] = unplugin;
|
|
86
|
-
exports.unplugin = unplugin;
|
|
87
84
|
Object.defineProperty(exports, 'plugin', {
|
|
88
85
|
enumerable: true,
|
|
89
86
|
get: function () {
|
|
90
87
|
return _powerlines_plugin_tsdown.default;
|
|
91
88
|
}
|
|
92
89
|
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
get: function () {
|
|
96
|
-
return _powerlines_plugin_tsdown.default;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
90
|
+
exports.tsdown = unplugin;
|
|
91
|
+
exports.unplugin = unplugin;
|
package/dist/tsdown.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserConfig } from "tsdown/config";
|
|
2
|
-
import plugin
|
|
2
|
+
import plugin from "@powerlines/plugin-tsdown";
|
|
3
3
|
|
|
4
4
|
//#region src/tsdown.d.ts
|
|
5
5
|
/**
|
|
@@ -27,5 +27,5 @@ import plugin, { default as tsdown } from "@powerlines/plugin-tsdown";
|
|
|
27
27
|
*/
|
|
28
28
|
declare function unplugin(options?: UserConfig): UserConfig;
|
|
29
29
|
//#endregion
|
|
30
|
-
export {
|
|
30
|
+
export { plugin, unplugin as tsdown, unplugin };
|
|
31
31
|
//# sourceMappingURL=tsdown.d.cts.map
|
package/dist/tsdown.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdown.d.cts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"tsdown.d.cts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}
|
package/dist/tsdown.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import plugin
|
|
1
|
+
import plugin from "@powerlines/plugin-tsdown";
|
|
2
2
|
import { UserConfig } from "tsdown/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tsdown.d.ts
|
|
@@ -27,5 +27,5 @@ import { UserConfig } from "tsdown/config";
|
|
|
27
27
|
*/
|
|
28
28
|
declare function unplugin(options?: UserConfig): UserConfig;
|
|
29
29
|
//#endregion
|
|
30
|
-
export {
|
|
30
|
+
export { plugin, unplugin as tsdown, unplugin };
|
|
31
31
|
//# sourceMappingURL=tsdown.d.mts.map
|
package/dist/tsdown.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdown.d.mts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"tsdown.d.mts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}
|
package/dist/tsdown.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import unplugin$1 from "./rolldown.mjs";
|
|
1
|
+
import { rolldown as unplugin$1 } from "./rolldown.mjs";
|
|
2
2
|
import { toArray } from "@stryke/convert/to-array";
|
|
3
3
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
4
4
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
5
5
|
import { resolveFromFormat } from "@powerlines/plugin-tsdown/helpers/resolve-options";
|
|
6
|
-
import plugin
|
|
6
|
+
import plugin from "@powerlines/plugin-tsdown";
|
|
7
7
|
|
|
8
8
|
//#region src/tsdown.ts
|
|
9
9
|
/**
|
|
@@ -78,5 +78,5 @@ function unplugin(options = {}) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
//#endregion
|
|
81
|
-
export {
|
|
81
|
+
export { plugin, unplugin as tsdown, unplugin };
|
|
82
82
|
//# sourceMappingURL=tsdown.mjs.map
|
package/dist/tsdown.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdown.mjs","names":["rolldown"],"sources":["../src/tsdown.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 { RolldownOptions } from \"@powerlines/plugin-rolldown/types/build\";\nimport { resolveFromFormat } from \"@powerlines/plugin-tsdown/helpers/resolve-options\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { ModuleFormat } from \"rolldown\";\nimport type { UserConfig } from \"tsdown/config\";\nimport rolldown from \"./rolldown\";\nimport { CopyConfig, ResolveConfig } from \"./types\";\n\nexport {
|
|
1
|
+
{"version":3,"file":"tsdown.mjs","names":["rolldown"],"sources":["../src/tsdown.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 { RolldownOptions } from \"@powerlines/plugin-rolldown/types/build\";\nimport { resolveFromFormat } from \"@powerlines/plugin-tsdown/helpers/resolve-options\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { ModuleFormat } from \"rolldown\";\nimport type { UserConfig } from \"tsdown/config\";\nimport { rolldown } from \"./rolldown\";\nimport { CopyConfig, ResolveConfig } from \"./types\";\n\nexport { default as plugin } from \"@powerlines/plugin-tsdown\";\n\n/**\n * A Tsdown configuration function that integrates Powerlines into the build process.\n *\n * @see https://github.com/rolldown/tsdown\n *\n * @example\n * ```ts\n * // tsdown.config.ts\n * import withPowerlines from \"powerlines/tsdown\";\n *\n * export default withPowerlines({\n * entry: [\"src/index.ts\"],\n * format: [\"cjs\", \"esm\"],\n * dts: true,\n * sourcemap: true,\n * clean: true,\n * });\n *\n * ```\n *\n * @param options - The Tsdown options to merge with the Powerlines configuration.\n * @returns The merged Tsdown configuration options.\n */\nexport function unplugin(options: UserConfig = {}): UserConfig {\n return {\n ...options,\n entry: options.entry,\n plugins: [\n rolldown({\n name: options.name,\n root: options.cwd ?? process.cwd(),\n output: {\n path: options.outDir,\n format: resolveFromFormat(\n options.format as ModuleFormat | ModuleFormat[]\n ),\n copy: {\n path: options.outDir!,\n assets: toArray(options.copy)\n .map(copy => {\n if (!copy) {\n return undefined;\n }\n\n if (isSetString(copy)) {\n return copy;\n }\n\n if (isFunction(copy)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based copy options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return {\n input: copy.from,\n output: copy.to\n };\n })\n .filter(Boolean) as CopyConfig[\"assets\"]\n }\n },\n resolve: {\n external: options.external\n ? (toArray(options.external)\n .map(external => {\n if (isFunction(external)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based external options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return external;\n })\n .filter(Boolean) as ResolveConfig[\"external\"])\n : undefined,\n noExternal: options.noExternal\n ? (toArray(options.noExternal)\n .map(noExternal => {\n if (isFunction(noExternal)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based noExternal options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return noExternal;\n })\n .filter(Boolean) as ResolveConfig[\"noExternal\"])\n : undefined\n },\n rolldown: options.inputOptions as RolldownOptions,\n tsconfig: isSetString(options.tsconfig) ? options.tsconfig : undefined\n })\n ]\n };\n}\n\nexport { unplugin as tsdown };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,SAAgB,SAAS,UAAsB,EAAE,EAAc;AAC7D,QAAO;EACL,GAAG;EACH,OAAO,QAAQ;EACf,SAAS,CACPA,WAAS;GACP,MAAM,QAAQ;GACd,MAAM,QAAQ,OAAO,QAAQ,KAAK;GAClC,QAAQ;IACN,MAAM,QAAQ;IACd,QAAQ,kBACN,QAAQ,OACT;IACD,MAAM;KACJ,MAAM,QAAQ;KACd,QAAQ,QAAQ,QAAQ,KAAK,CAC1B,KAAI,SAAQ;AACX,UAAI,CAAC,KACH;AAGF,UAAI,YAAY,KAAK,CACnB,QAAO;AAGT,UAAI,WAAW,KAAK,EAAE;AAEpB,eAAQ,KACN,+DACD;AAED;;AAGF,aAAO;OACL,OAAO,KAAK;OACZ,QAAQ,KAAK;OACd;OACD,CACD,OAAO,QAAQ;KACnB;IACF;GACD,SAAS;IACP,UAAU,QAAQ,WACb,QAAQ,QAAQ,SAAS,CACvB,KAAI,aAAY;AACf,SAAI,WAAW,SAAS,EAAE;AAExB,cAAQ,KACN,mEACD;AAED;;AAGF,YAAO;MACP,CACD,OAAO,QAAQ,GAClB;IACJ,YAAY,QAAQ,aACf,QAAQ,QAAQ,WAAW,CACzB,KAAI,eAAc;AACjB,SAAI,WAAW,WAAW,EAAE;AAE1B,cAAQ,KACN,qEACD;AAED;;AAGF,YAAO;MACP,CACD,OAAO,QAAQ,GAClB;IACL;GACD,UAAU,QAAQ;GAClB,UAAU,YAAY,QAAQ,SAAS,GAAG,QAAQ,WAAW;GAC9D,CAAC,CACH;EACF"}
|
package/dist/tsup.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('./chunk-7azAqIA9.cjs');
|
|
3
3
|
const require_esbuild = require('./esbuild.cjs');
|
|
4
4
|
let _stryke_helpers_omit = require("@stryke/helpers/omit");
|
|
5
5
|
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
@@ -33,7 +33,7 @@ _powerlines_plugin_tsup = require_chunk.__toESM(_powerlines_plugin_tsup);
|
|
|
33
33
|
function unplugin(options = {}) {
|
|
34
34
|
return {
|
|
35
35
|
...options,
|
|
36
|
-
esbuildPlugins: [require_esbuild.
|
|
36
|
+
esbuildPlugins: [require_esbuild.esbuild({
|
|
37
37
|
output: {
|
|
38
38
|
path: options.outDir,
|
|
39
39
|
format: options.format
|
|
@@ -58,18 +58,11 @@ function unplugin(options = {}) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
//#endregion
|
|
61
|
-
exports.default = unplugin;
|
|
62
|
-
exports["module.exports"] = unplugin;
|
|
63
|
-
exports.unplugin = unplugin;
|
|
64
61
|
Object.defineProperty(exports, 'plugin', {
|
|
65
62
|
enumerable: true,
|
|
66
63
|
get: function () {
|
|
67
64
|
return _powerlines_plugin_tsup.default;
|
|
68
65
|
}
|
|
69
66
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
get: function () {
|
|
73
|
-
return _powerlines_plugin_tsup.default;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
67
|
+
exports.tsup = unplugin;
|
|
68
|
+
exports.unplugin = unplugin;
|