@powerlines/plugin-vite 0.14.494 → 0.14.496
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/index.cjs +2 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +6 -5
package/dist/index.cjs
CHANGED
|
@@ -26,12 +26,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
-
require('./types/index.cjs');
|
|
30
29
|
let _powerlines_core = require("@powerlines/core");
|
|
31
|
-
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
32
30
|
let _powerlines_unplugin_vite = require("@powerlines/unplugin/vite");
|
|
33
31
|
let defu = require("defu");
|
|
34
32
|
defu = __toESM(defu, 1);
|
|
33
|
+
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
35
34
|
let unplugin = require("unplugin");
|
|
36
35
|
let vite = require("vite");
|
|
37
36
|
|
|
@@ -68,7 +67,7 @@ const plugin = (options = {}) => {
|
|
|
68
67
|
});
|
|
69
68
|
this.debug({
|
|
70
69
|
meta: { category: "config" },
|
|
71
|
-
message: `Resolved Vite configuration: \n${(0,
|
|
70
|
+
message: `Resolved Vite configuration: \n${(0, powerlines_plugin_utils.formatConfig)(options)}`
|
|
72
71
|
});
|
|
73
72
|
await (0, vite.build)(options);
|
|
74
73
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __ΩViteOptions, t as ViteOptions } from "./build-CksBpNAL.cjs";
|
|
2
2
|
import { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, VitePluginUserConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig, __ΩVitePluginUserConfig } from "./types/plugin.cjs";
|
|
3
|
-
import { Plugin } from "
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
declare module "
|
|
6
|
+
declare module "powerlines" {
|
|
7
7
|
interface Config {
|
|
8
8
|
vite?: VitePluginOptions;
|
|
9
9
|
}
|
|
@@ -13,5 +13,5 @@ declare module "@powerlines/core" {
|
|
|
13
13
|
*/
|
|
14
14
|
declare const plugin: <TContext extends VitePluginContext = VitePluginContext>(options?: VitePluginOptions) => Plugin<TContext>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { ViteOptions, VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, VitePluginUserConfig, __ΩViteOptions, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig, __ΩVitePluginUserConfig, plugin as default, plugin };
|
|
16
|
+
export { type ViteOptions, type VitePluginContext, type VitePluginOptions, type VitePluginResolvedConfig, type VitePluginUserConfig, type __ΩViteOptions, type __ΩVitePluginContext, type __ΩVitePluginOptions, type __ΩVitePluginResolvedConfig, type __ΩVitePluginUserConfig, plugin as default, plugin };
|
|
17
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":";;;;;;YA8BY,MAAA;IACR,IAAA,GAAO,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA8BY,MAAA;IACR,IAAA,GAAO,iBAAiB;EAAA;AAAA;;;;cAOf,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __ΩViteOptions, t as ViteOptions } from "./build-DST9kC_L.mjs";
|
|
2
2
|
import { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, VitePluginUserConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig, __ΩVitePluginUserConfig } from "./types/plugin.mjs";
|
|
3
|
-
import { Plugin } from "
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
declare module "
|
|
6
|
+
declare module "powerlines" {
|
|
7
7
|
interface Config {
|
|
8
8
|
vite?: VitePluginOptions;
|
|
9
9
|
}
|
|
@@ -13,5 +13,5 @@ declare module "@powerlines/core" {
|
|
|
13
13
|
*/
|
|
14
14
|
declare const plugin: <TContext extends VitePluginContext = VitePluginContext>(options?: VitePluginOptions) => Plugin<TContext>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { ViteOptions, VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, VitePluginUserConfig, __ΩViteOptions, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig, __ΩVitePluginUserConfig, plugin as default, plugin };
|
|
16
|
+
export { type ViteOptions, type VitePluginContext, type VitePluginOptions, type VitePluginResolvedConfig, type VitePluginUserConfig, type __ΩViteOptions, type __ΩVitePluginContext, type __ΩVitePluginOptions, type __ΩVitePluginResolvedConfig, type __ΩVitePluginUserConfig, plugin as default, plugin };
|
|
17
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":";;;;;;YA8BY,MAAA;IACR,IAAA,GAAO,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA8BY,MAAA;IACR,IAAA,GAAO,iBAAiB;EAAA;AAAA;;;;cAOf,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import "./types/index.mjs";
|
|
2
1
|
import { createUnplugin } from "@powerlines/core";
|
|
3
|
-
import { formatConfig } from "@powerlines/core/plugin-utils";
|
|
4
2
|
import { resolveOptions } from "@powerlines/unplugin/vite";
|
|
5
3
|
import defu from "defu";
|
|
4
|
+
import { formatConfig } from "powerlines/plugin-utils";
|
|
6
5
|
import { createVitePlugin } from "unplugin";
|
|
7
6
|
import { build } from "vite";
|
|
8
7
|
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"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
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"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 { createUnplugin } from \"@powerlines/core\";\nimport { resolveOptions } from \"@powerlines/unplugin/vite\";\nimport defu from \"defu\";\nimport type { Context, Plugin } from \"powerlines\";\nimport { formatConfig } from \"powerlines/plugin-utils\";\nimport { createVitePlugin } from \"unplugin\";\nimport { build, InlineConfig } from \"vite\";\nimport type { VitePluginContext, VitePluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n vite?: VitePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends VitePluginContext = VitePluginContext>(\n options: VitePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"vite\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `vite` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n vite: {\n ...options\n },\n singleBuild: true\n };\n },\n async build() {\n this.debug(\"Starting Vite build process...\");\n\n const environments = this.environment.unstable_execution.environments;\n if (!environments || Object.keys(environments).length === 0) {\n throw new Error(\n `No environments found in the Powerlines context. At least one environment should have been generated - please report this issue to https://github.com/storm-software/powerlines/issues.`\n );\n }\n\n this.trace(\n `Running Vite for ${Object.keys(environments).length} environments.`\n );\n\n const resolved = resolveOptions(this);\n const options = defu(this.config.vite, {\n ...resolved,\n config: false,\n entry: this.entry,\n environments: Object.fromEntries(\n Object.entries(environments).map(([name, env]) => [\n name,\n defu(this.config.vite, resolveOptions(env as Context))\n ])\n ),\n plugins: [\n createVitePlugin(\n createUnplugin(this, {\n silenceHookLogging: true,\n name: \"vite\"\n })\n )()\n ]\n }) as InlineConfig;\n\n this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Vite configuration: \\n${formatConfig(options)}`\n });\n\n await build(options);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,UACX,UAA6B,CAAC,MACT;CACrB,OAAO;EACL,MAAM;EACN,SAAS;GACP,KAAK,MACH,yEACF;GAEA,OAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,KAAK,EACvB;IACA,MAAM,EACJ,GAAG,QACL;IACA,aAAa;GACf;EACF;EACA,MAAM,QAAQ;GACZ,KAAK,MAAM,gCAAgC;GAE3C,MAAM,eAAe,KAAK,YAAY,mBAAmB;GACzD,IAAI,CAAC,gBAAgB,OAAO,KAAK,YAAY,EAAE,WAAW,GACxD,MAAM,IAAI,MACR,yLACF;GAGF,KAAK,MACH,oBAAoB,OAAO,KAAK,YAAY,EAAE,OAAO,eACvD;GAEA,MAAM,WAAW,eAAe,IAAI;GACpC,MAAM,UAAU,KAAK,KAAK,OAAO,MAAM;IACrC,GAAG;IACH,QAAQ;IACR,OAAO,KAAK;IACZ,cAAc,OAAO,YACnB,OAAO,QAAQ,YAAY,EAAE,KAAK,CAAC,MAAM,SAAS,CAChD,MACA,KAAK,KAAK,OAAO,MAAM,eAAe,GAAc,CAAC,CACvD,CAAC,CACH;IACA,SAAS,CACP,iBACE,eAAe,MAAM;KACnB,oBAAoB;KACpB,MAAM;IACR,CAAC,CACH,EAAE,CACJ;GACF,CAAC;GAED,KAAK,MAAM;IACT,MAAM,EACJ,UAAU,SACZ;IACA,SAAS,kCAAkC,aAAa,OAAO;GACjE,CAAC;GAED,MAAM,MAAM,OAAO;EACrB;CACF;AACF"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ViteOptions } from "../build-CksBpNAL.cjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
5
|
type VitePluginOptions = Partial<ViteOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,OAAO,CAAC,WAAA;AAAA,UAEvB,oBAAA,SAA6B,UAAU;EACtD,IAAA,GAAO,iBAAA;AAAA;AAAA,UAGQ,wBAAA,SAAiC,cAAc;EAC9D,IAAA,EAAM,WAAA;AAAA;AAAA,KAGI,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;EAChB,GAAA;AAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ViteOptions } from "../build-DST9kC_L.mjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
5
|
type VitePluginOptions = Partial<ViteOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,iBAAA,GAAoB,OAAO,CAAC,WAAA;AAAA,UAEvB,oBAAA,SAA6B,UAAU;EACtD,IAAA,GAAO,iBAAA;AAAA;AAAA,UAGQ,wBAAA,SAAiC,cAAc;EAC9D,IAAA,EAAM,WAAA;AAAA;AAAA,KAGI,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;EAChB,GAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-vite",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.496",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"keywords": ["vite", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -77,15 +77,16 @@
|
|
|
77
77
|
"typings": "dist/index.d.mts",
|
|
78
78
|
"files": ["dist"],
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@powerlines/core": "^0.15.
|
|
81
|
-
"@powerlines/unplugin": "^0.0.
|
|
80
|
+
"@powerlines/core": "^0.15.20",
|
|
81
|
+
"@powerlines/unplugin": "^0.0.35",
|
|
82
82
|
"@stryke/helpers": "^0.10.16",
|
|
83
83
|
"defu": "^6.1.7",
|
|
84
|
+
"powerlines": "^0.47.42",
|
|
84
85
|
"unplugin": "^3.0.0"
|
|
85
86
|
},
|
|
86
|
-
"devDependencies": { "@types/node": "^25.
|
|
87
|
+
"devDependencies": { "@types/node": "^25.9.0", "vite": "^8.0.13" },
|
|
87
88
|
"peerDependencies": { "vite": ">=8.0.0" },
|
|
88
89
|
"peerDependenciesMeta": { "vite": { "optional": false } },
|
|
89
90
|
"publishConfig": { "access": "public" },
|
|
90
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "2dbbdb2f6fde8f0f49208757c7c1b18deb96ff97"
|
|
91
92
|
}
|