@powerlines/plugin-swc 0.5.56 → 0.5.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +1 -7
- package/dist/index.d.cts +7 -26
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-0DvTYD6D.d.cts +1659 -0
- package/dist/plugin-0DvTYD6D.d.cts.map +1 -0
- package/dist/plugin-Bvn-he2n.mjs +1 -0
- package/dist/plugin-D_MOT-RB.d.mts +1659 -0
- package/dist/plugin-D_MOT-RB.d.mts.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +3 -23
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +2 -23
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-B7VYa_Pp.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +47 -29
- package/dist/index-BNZRoIES.d.cts +0 -1570
- package/dist/index-BNZRoIES.d.ts +0 -1570
- package/dist/index.d.ts +0 -34
- package/dist/index.js +0 -7
- package/dist/types/index.d.ts +0 -23
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -23
- /package/dist/{types/plugin.js → plugin-DHXHjv16.cjs} +0 -0
package/README.md
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
<!-- markdownlint-disable -->
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div align="center"
|
|
6
|
+
<div align="center">
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light-optimized.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif" width="100%" alt="Powerlines" />
|
|
11
|
+
</picture>
|
|
12
|
+
</div>
|
|
7
13
|
<br />
|
|
8
14
|
|
|
9
15
|
<div align="center">
|
|
@@ -16,7 +22,7 @@
|
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
24
|
<br />
|
|
19
|
-
This package is part of the
|
|
25
|
+
This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
|
|
20
26
|
<br />
|
|
21
27
|
|
|
22
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* ⚡ Built by Storm Software
|
|
4
|
-
*
|
|
5
|
-
*****************************************/
|
|
6
|
-
|
|
7
|
-
var i=Object.defineProperty;var e=(t,o)=>i(t,"name",{value:o,configurable:true});const m=e((t={})=>({name:"swc",config(){return {transform:{swc:f__default.default(t,{outputPath:this.config.output.buildPath,cwd:this.config.projectRoot,envName:this.config.mode,configFile:false})}}},async transform(o,n){const r=await core.transform(o,{...this.config.transform.swc,filename:n});return {id:n,code:r.code,map:r.map}}}),"plugin");var d=m;exports.default=d;exports.plugin=m;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`@swc/core`),l=require(`defu`);l=s(l);const u=(e={})=>({name:`swc`,config(){return{transform:{swc:(0,l.default)(e,{outputPath:this.config.output.buildPath,cwd:this.config.projectRoot,envName:this.config.mode,configFile:!1})}}},async transform(e,t){let n=await(0,c.transform)(e,{...this.config.transform.swc,filename:t});return{id:t,code:n.code,map:n.map}}});var d=u;exports.default=d,exports.plugin=u;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import '@storm-software/config-tools/types';
|
|
6
|
-
import '@storm-software/config/types';
|
|
7
|
-
import '@stryke/types/base';
|
|
8
|
-
import '@stryke/types/configuration';
|
|
9
|
-
import '@stryke/types/file';
|
|
10
|
-
import 'vite';
|
|
11
|
-
import '@stryke/env/get-env-paths';
|
|
12
|
-
import '@stryke/http/fetch';
|
|
13
|
-
import '@stryke/types/package-json';
|
|
14
|
-
import 'jiti';
|
|
15
|
-
import 'magic-string';
|
|
16
|
-
import 'oxc-parser';
|
|
17
|
-
import 'semver';
|
|
18
|
-
import 'ts-morph';
|
|
19
|
-
import 'undici';
|
|
20
|
-
import 'unplugin';
|
|
21
|
-
import '@stryke/fs/resolve';
|
|
22
|
-
import '@stryke/types/tsconfig';
|
|
23
|
-
import 'typescript';
|
|
24
|
-
import '@stryke/types/array';
|
|
1
|
+
import { a as __ΩSwcPluginContext, c as __ΩSwcPluginUserConfig, i as SwcPluginUserConfig, l as Plugin, n as SwcPluginOptions, o as __ΩSwcPluginOptions, r as SwcPluginResolvedConfig, s as __ΩSwcPluginResolvedConfig, t as SwcPluginContext } from "./plugin-0DvTYD6D.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
25
5
|
|
|
26
6
|
/**
|
|
27
7
|
* A Powerlines plugin to integrate SWC for code transformation.
|
|
@@ -30,5 +10,6 @@ import '@stryke/types/array';
|
|
|
30
10
|
* @returns A Powerlines plugin instance.
|
|
31
11
|
*/
|
|
32
12
|
declare const plugin: <TContext extends SwcPluginContext = SwcPluginContext>(options?: SwcPluginOptions) => Plugin<TContext>;
|
|
33
|
-
|
|
34
|
-
export { SwcPluginContext, SwcPluginOptions, plugin as default, plugin };
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA+BA;;;;;AAEG,cAFU,MAEV,EAAA,CAAA,iBAFqC,gBAErC,GAFwD,gBAExD,CAAA,CAAA,OAAA,CAAA,EADQ,gBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { a as __ΩSwcPluginContext, c as __ΩSwcPluginUserConfig, i as SwcPluginUserConfig, l as Plugin, n as SwcPluginOptions, o as __ΩSwcPluginOptions, r as SwcPluginResolvedConfig, s as __ΩSwcPluginResolvedConfig, t as SwcPluginContext } from "./plugin-D_MOT-RB.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Powerlines plugin to integrate SWC for code transformation.
|
|
8
|
+
*
|
|
9
|
+
* @param options - The plugin options.
|
|
10
|
+
* @returns A Powerlines plugin instance.
|
|
11
|
+
*/
|
|
12
|
+
declare const plugin: <TContext extends SwcPluginContext = SwcPluginContext>(options?: SwcPluginOptions) => Plugin<TContext>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SwcPluginContext, SwcPluginOptions, SwcPluginResolvedConfig, SwcPluginUserConfig, __ΩSwcPluginContext, __ΩSwcPluginOptions, __ΩSwcPluginResolvedConfig, __ΩSwcPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA+BA;;;;;AAEG,cAFU,MAEV,EAAA,CAAA,iBAFqC,gBAErC,GAFwD,gBAExD,CAAA,CAAA,OAAA,CAAA,EADQ,gBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";import{transform as e}from"@swc/core";import t from"defu";const n=(n={})=>({name:`swc`,config(){return{transform:{swc:t(n,{outputPath:this.config.output.buildPath,cwd:this.config.projectRoot,envName:this.config.mode,configFile:!1})}}},async transform(t,n){let r=await e(t,{...this.config.transform.swc,filename:n});return{id:n,code:r.code,map:r.map}}});var r=n;export{r as default,n as plugin};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +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 { transform } from \"@swc/core\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { SwcPluginContext, SwcPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\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 transform: {\n swc: defu(options, {\n outputPath: this.config.output.buildPath,\n cwd: this.config.projectRoot,\n envName: this.config.mode,\n configFile: false\n })\n }\n };\n },\n async transform(code, id) {\n const result = await transform(code, {\n ...this.config.transform.swc,\n filename: id\n });\n\n return { id, code: result.code, map: result.map };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"qHA+BA,MAAa,GACX,EAA4B,EAAE,IAEvB,CACL,KAAM,MACN,QAAS,CACP,MAAO,CACL,UAAW,CACT,IAAK,EAAK,EAAS,CACjB,WAAY,KAAK,OAAO,OAAO,UAC/B,IAAK,KAAK,OAAO,YACjB,QAAS,KAAK,OAAO,KACrB,WAAY,GACb,CAAC,CACH,CACF,EAEH,MAAM,UAAU,EAAM,EAAI,CACxB,IAAM,EAAS,MAAM,EAAU,EAAM,CACnC,GAAG,KAAK,OAAO,UAAU,IACzB,SAAU,EACX,CAAC,CAEF,MAAO,CAAE,KAAI,KAAM,EAAO,KAAM,IAAK,EAAO,IAAK,EAEpD,EAGH,IAAA,EAAe"}
|