@powerlines/plugin-oxc-transform 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-Bphc218z.d.cts +1659 -0
- package/dist/plugin-Bphc218z.d.cts.map +1 -0
- package/dist/plugin-Bvn-he2n.mjs +1 -0
- package/dist/plugin-l-OFf-iV.d.mts +1659 -0
- package/dist/plugin-l-OFf-iV.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 +40 -22
- package/dist/index-DzJKaShP.d.cts +0 -1570
- package/dist/index-DzJKaShP.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=(n,t)=>i(n,"name",{value:t,configurable:true});const c=e((n={})=>({name:"oxc-transform",config(){return {transform:{oxc:f__default.default(n,{sourceType:"module",cwd:this.config.projectRoot,envName:this.config.mode,outputPath:this.config.output.buildPath,sourcemap:this.config.mode==="development"})}}},async transform(t,o){const r=await oxcTransform.transform(o,t,{lang:["d.ts","d.cts","d.mts"].includes(find.findFileExtensionSafe(o))?"dts":find.findFileExtension(o),...this.config.transform.oxc});return {id:o,code:r.code,map:r.map}}}),"plugin");var v=c;exports.default=v;exports.plugin=c;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(`@stryke/path/find`),l=require(`defu`);l=s(l);let u=require(`oxc-transform`);const d=(e={})=>({name:`oxc-transform`,config(){return{transform:{oxc:(0,l.default)(e,{sourceType:`module`,cwd:this.config.projectRoot,envName:this.config.mode,outputPath:this.config.output.buildPath,sourcemap:this.config.mode===`development`})}}},async transform(e,t){let n=await(0,u.transform)(t,e,{lang:[`d.ts`,`d.cts`,`d.mts`].includes((0,c.findFileExtensionSafe)(t))?`dts`:(0,c.findFileExtension)(t),...this.config.transform.oxc});return{id:t,code:n.code,map:n.map}}});var f=d;exports.default=f,exports.plugin=d;
|
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 __ΩOxcTransformPluginContext, c as __ΩOxcTransformPluginUserConfig, i as OxcTransformPluginUserConfig, l as Plugin, n as OxcTransformPluginOptions, o as __ΩOxcTransformPluginOptions, r as OxcTransformPluginResolvedConfig, s as __ΩOxcTransformPluginResolvedConfig, t as OxcTransformPluginContext } from "./plugin-Bphc218z.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 oxc-transform 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 OxcTransformPluginContext = OxcTransformPluginContext>(options?: OxcTransformPluginOptions) => Plugin<TContext>;
|
|
33
|
-
|
|
34
|
-
export { OxcTransformPluginContext, OxcTransformPluginOptions, plugin as default, plugin };
|
|
13
|
+
//#endregion
|
|
14
|
+
export { OxcTransformPluginContext, OxcTransformPluginOptions, OxcTransformPluginResolvedConfig, OxcTransformPluginUserConfig, __ΩOxcTransformPluginContext, __ΩOxcTransformPluginOptions, __ΩOxcTransformPluginResolvedConfig, __ΩOxcTransformPluginUserConfig, 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":";;;;;;AAoCA;;;;;AAIG,cAJU,MAIV,EAAA,CAAA,iBAHgB,yBAGhB,GAH4C,yBAG5C,CAAA,CAAA,OAAA,CAAA,EADQ,yBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { a as __ΩOxcTransformPluginContext, c as __ΩOxcTransformPluginUserConfig, i as OxcTransformPluginUserConfig, l as Plugin, n as OxcTransformPluginOptions, o as __ΩOxcTransformPluginOptions, r as OxcTransformPluginResolvedConfig, s as __ΩOxcTransformPluginResolvedConfig, t as OxcTransformPluginContext } from "./plugin-l-OFf-iV.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Powerlines plugin to integrate oxc-transform for code transformation.
|
|
8
|
+
*
|
|
9
|
+
* @param options - The plugin options.
|
|
10
|
+
* @returns A Powerlines plugin instance.
|
|
11
|
+
*/
|
|
12
|
+
declare const plugin: <TContext extends OxcTransformPluginContext = OxcTransformPluginContext>(options?: OxcTransformPluginOptions) => Plugin<TContext>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { OxcTransformPluginContext, OxcTransformPluginOptions, OxcTransformPluginResolvedConfig, OxcTransformPluginUserConfig, __ΩOxcTransformPluginContext, __ΩOxcTransformPluginOptions, __ΩOxcTransformPluginResolvedConfig, __ΩOxcTransformPluginUserConfig, 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":";;;;;;AAoCA;;;;;AAIG,cAJU,MAIV,EAAA,CAAA,iBAHgB,yBAGhB,GAH4C,yBAG5C,CAAA,CAAA,OAAA,CAAA,EADQ,yBACR,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{findFileExtension as e,findFileExtensionSafe as t}from"@stryke/path/find";import n from"defu";import{transform as r}from"oxc-transform";const i=(i={})=>({name:`oxc-transform`,config(){return{transform:{oxc:n(i,{sourceType:`module`,cwd:this.config.projectRoot,envName:this.config.mode,outputPath:this.config.output.buildPath,sourcemap:this.config.mode===`development`})}}},async transform(n,i){let a=await r(i,n,{lang:[`d.ts`,`d.cts`,`d.mts`].includes(t(i))?`dts`:e(i),...this.config.transform.oxc});return{id:i,code:a.code,map:a.map}}});var a=i;export{a as default,i 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 { findFileExtension, findFileExtensionSafe } from \"@stryke/path/find\";\nimport defu from \"defu\";\nimport { transform } from \"oxc-transform\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n OxcTransformPluginContext,\n OxcTransformPluginOptions,\n OxcTransformPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate oxc-transform for code transformation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends OxcTransformPluginContext = OxcTransformPluginContext\n>(\n options: OxcTransformPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"oxc-transform\",\n config() {\n return {\n transform: {\n oxc: defu(options, {\n sourceType: \"module\",\n cwd: this.config.projectRoot,\n envName: this.config.mode,\n outputPath: this.config.output.buildPath,\n sourcemap: this.config.mode === \"development\"\n })\n }\n } as Partial<OxcTransformPluginUserConfig>;\n },\n async transform(code, id) {\n const result = await transform(id, code, {\n lang: ([\"d.ts\", \"d.cts\", \"d.mts\"].includes(findFileExtensionSafe(id))\n ? \"dts\"\n : findFileExtension(id)) as OxcTransformPluginOptions[\"lang\"],\n ...this.config.transform.oxc\n });\n\n return { id, code: result.code, map: result.map };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"0MAoCA,MAAa,GAGX,EAAqC,EAAE,IAEhC,CACL,KAAM,gBACN,QAAS,CACP,MAAO,CACL,UAAW,CACT,IAAK,EAAK,EAAS,CACjB,WAAY,SACZ,IAAK,KAAK,OAAO,YACjB,QAAS,KAAK,OAAO,KACrB,WAAY,KAAK,OAAO,OAAO,UAC/B,UAAW,KAAK,OAAO,OAAS,cACjC,CAAC,CACH,CACF,EAEH,MAAM,UAAU,EAAM,EAAI,CACxB,IAAM,EAAS,MAAM,EAAU,EAAI,EAAM,CACvC,KAAO,CAAC,OAAQ,QAAS,QAAQ,CAAC,SAAS,EAAsB,EAAG,CAAC,CACjE,MACA,EAAkB,EAAG,CACzB,GAAG,KAAK,OAAO,UAAU,IAC1B,CAAC,CAEF,MAAO,CAAE,KAAI,KAAM,EAAO,KAAM,IAAK,EAAO,IAAK,EAEpD,EAGH,IAAA,EAAe"}
|