@powerlines/plugin-swc 0.5.340 → 0.5.342
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.mjs +1 -2
- package/package.json +5 -5
- package/dist/index.d.cts +0 -20
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -20
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/index.d.cts +0 -2
- package/dist/types/index.d.mts +0 -2
- package/dist/types/plugin.d.cts +0 -19
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -19
- package/dist/types/plugin.d.mts.map +0 -1
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-swc",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.342",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to transform project code with SWC.",
|
|
6
6
|
"repository": {
|
|
@@ -91,13 +91,13 @@
|
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@swc/core": "^1.15.18",
|
|
93
93
|
"defu": "^6.1.4",
|
|
94
|
-
"powerlines": "^0.40.
|
|
94
|
+
"powerlines": "^0.40.20"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
98
|
-
"@types/node": "^25.
|
|
97
|
+
"@powerlines/plugin-plugin": "^0.12.284",
|
|
98
|
+
"@types/node": "^25.4.0"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": { "access": "public" },
|
|
101
101
|
"types": "./dist/index.d.cts",
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "8d772181f794749e0f19f97c732dd921148c31c8"
|
|
103
103
|
}
|
package/dist/index.d.cts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
-
import "./types/index.cjs";
|
|
3
|
-
import { Plugin } from "powerlines";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare module "powerlines" {
|
|
7
|
-
interface Config {
|
|
8
|
-
swc?: SwcPluginOptions;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A Powerlines plugin to integrate SWC for code transformation.
|
|
13
|
-
*
|
|
14
|
-
* @param options - The plugin options.
|
|
15
|
-
* @returns A Powerlines plugin instance.
|
|
16
|
-
*/
|
|
17
|
-
declare const plugin: <TContext extends SwcPluginContext = SwcPluginContext>(options?: SwcPluginOptions) => Plugin<TContext>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig, plugin as default, plugin };
|
|
20
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IAuBwB,GAAA,CAAA,EAId,gBAJc;EAAA;;;;AAcxB;;;;AAEU,cAFG,MAEH,EAAA,CAAA,iBAF8B,gBAE9B,GAFiD,gBAEjD,CAAA,CAAA,OAAA,CAAA,EADC,gBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
-
import "./types/index.mjs";
|
|
3
|
-
import { Plugin } from "powerlines";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare module "powerlines" {
|
|
7
|
-
interface Config {
|
|
8
|
-
swc?: SwcPluginOptions;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A Powerlines plugin to integrate SWC for code transformation.
|
|
13
|
-
*
|
|
14
|
-
* @param options - The plugin options.
|
|
15
|
-
* @returns A Powerlines plugin instance.
|
|
16
|
-
*/
|
|
17
|
-
declare const plugin: <TContext extends SwcPluginContext = SwcPluginContext>(options?: SwcPluginOptions) => Plugin<TContext>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig, plugin as default, plugin };
|
|
20
|
-
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IAuBwB,GAAA,CAAA,EAId,gBAJc;EAAA;;;;AAcxB;;;;AAEU,cAFG,MAEH,EAAA,CAAA,iBAF8B,gBAE9B,GAFiD,gBAEjD,CAAA,CAAA,OAAA,CAAA,EADC,gBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 { transform } from \"@swc/core\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { SwcPluginContext, SwcPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n swc?: SwcPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate SWC for code transformation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <TContext extends SwcPluginContext = SwcPluginContext>(\n options: SwcPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"swc\",\n config() {\n return {\n swc: defu(options, {\n outputPath: this.config.output.buildPath,\n cwd: this.config.root,\n envName: this.config.mode,\n configFile: false\n })\n };\n },\n async transform(code, id) {\n const result = await transform(code, {\n ...this.config.swc,\n filename: id\n });\n\n return { id, code: result.code, map: result.map };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AAqCA,MAAa,UACX,UAA4B,EAAE,KACT;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,KAAK,KAAK,SAAS;IACjB,YAAY,KAAK,OAAO,OAAO;IAC/B,KAAK,KAAK,OAAO;IACjB,SAAS,KAAK,OAAO;IACrB,YAAY;IACb,CAAC,EACH;;EAEH,MAAM,UAAU,MAAM,IAAI;GACxB,MAAM,SAAS,MAAM,UAAU,MAAM;IACnC,GAAG,KAAK,OAAO;IACf,UAAU;IACX,CAAC;AAEF,UAAO;IAAE;IAAI,MAAM,OAAO;IAAM,KAAK,OAAO;IAAK;;EAEpD;;AAGH,kBAAe"}
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig } from "./plugin.cjs";
|
|
2
|
-
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig };
|
package/dist/types/index.d.mts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig } from "./plugin.mjs";
|
|
2
|
-
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig };
|
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
2
|
-
import { Options } from "@swc/core";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type SwcPluginOptions = Partial<Omit<Options, "filename">>;
|
|
6
|
-
interface SwcPluginUserConfig extends UserConfig {
|
|
7
|
-
swc?: SwcPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
interface SwcPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
-
swc?: SwcPluginOptions;
|
|
11
|
-
}
|
|
12
|
-
type SwcPluginContext<TResolvedConfig extends SwcPluginResolvedConfig = SwcPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
-
declare type __ΩSwcPluginOptions = any[];
|
|
14
|
-
declare type __ΩSwcPluginUserConfig = any[];
|
|
15
|
-
declare type __ΩSwcPluginResolvedConfig = any[];
|
|
16
|
-
declare type __ΩSwcPluginContext = any[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig };
|
|
19
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,gBAAA,GAAmB,QAAQ,KAAK;UAE3B,mBAAA,SAA4B;EAFjC,GAAA,CAAA,EAGJ,gBAHoB;;AAAW,UAMtB,uBAAA,SAAgC,cANV,CAAA;EAAR,GAAA,CAAA,EAOvB,gBAPuB;;AAEd,KAQL,gBARyB,CAAA,wBASX,uBAT6B,GASH,uBATG,CAAA,GAUnD,aAVmD,CAUrC,eAVqC,CAAA;AAItC,mCACT,GAAA,EAAA;AAGI,sCAAgB,GAAA,EAAA;AACF,0CAAA,GAAA,EAAA;AAA0B,mCAAA,GAAA,EAAA"}
|
package/dist/types/plugin.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Options } from "@swc/core";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type SwcPluginOptions = Partial<Omit<Options, "filename">>;
|
|
6
|
-
interface SwcPluginUserConfig extends UserConfig {
|
|
7
|
-
swc?: SwcPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
interface SwcPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
-
swc?: SwcPluginOptions;
|
|
11
|
-
}
|
|
12
|
-
type SwcPluginContext<TResolvedConfig extends SwcPluginResolvedConfig = SwcPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
-
declare type __ΩSwcPluginOptions = any[];
|
|
14
|
-
declare type __ΩSwcPluginUserConfig = any[];
|
|
15
|
-
declare type __ΩSwcPluginResolvedConfig = any[];
|
|
16
|
-
declare type __ΩSwcPluginContext = any[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig };
|
|
19
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,gBAAA,GAAmB,QAAQ,KAAK;UAE3B,mBAAA,SAA4B;EAFjC,GAAA,CAAA,EAGJ,gBAHoB;;AAAW,UAMtB,uBAAA,SAAgC,cANV,CAAA;EAAR,GAAA,CAAA,EAOvB,gBAPuB;;AAEd,KAQL,gBARyB,CAAA,wBASX,uBAT6B,GASH,uBATG,CAAA,GAUnD,aAVmD,CAUrC,eAVqC,CAAA;AAItC,mCACT,GAAA,EAAA;AAGI,sCAAgB,GAAA,EAAA;AACF,0CAAA,GAAA,EAAA;AAA0B,mCAAA,GAAA,EAAA"}
|