@powerlines/plugin-oxc-transform 0.5.310 → 0.5.312
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.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ import "./types/index.cjs";
|
|
|
3
3
|
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
declare module "powerlines" {
|
|
7
|
-
interface
|
|
6
|
+
declare module "@powerlines/core" {
|
|
7
|
+
interface BaseConfig {
|
|
8
8
|
oxcTransform?: OxcTransformPluginOptions;
|
|
9
9
|
}
|
|
10
10
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ import "./types/index.mjs";
|
|
|
3
3
|
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
declare module "powerlines" {
|
|
7
|
-
interface
|
|
6
|
+
declare module "@powerlines/core" {
|
|
7
|
+
interface BaseConfig {
|
|
8
8
|
oxcTransform?: OxcTransformPluginOptions;
|
|
9
9
|
}
|
|
10
10
|
}
|
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 { findFileExtension, findFileExtensionSafe } from \"@stryke/path/find\";\nimport defu from \"defu\";\nimport { transform } from \"oxc-transform\";\nimport { Plugin } from \"powerlines\";\nimport {\n OxcTransformPluginContext,\n OxcTransformPluginOptions,\n OxcTransformPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n
|
|
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\";\nimport {\n OxcTransformPluginContext,\n OxcTransformPluginOptions,\n OxcTransformPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n oxcTransform?: OxcTransformPluginOptions;\n }\n}\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 oxcTransform: defu(options, {\n sourceType: \"module\",\n cwd: this.config.root,\n envName: this.config.mode,\n outputPath: this.config.output.buildPath,\n sourcemap: this.config.mode === \"development\"\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.oxcTransform\n });\n\n return { id, code: result.code, map: result.map };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AA0CA,MAAa,UAGX,UAAqC,EAAE,KAClB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,cAAc,KAAK,SAAS;IAC1B,YAAY;IACZ,KAAK,KAAK,OAAO;IACjB,SAAS,KAAK,OAAO;IACrB,YAAY,KAAK,OAAO,OAAO;IAC/B,WAAW,KAAK,OAAO,SAAS;IACjC,CAAC,EACH;;EAEH,MAAM,UAAU,MAAM,IAAI;GACxB,MAAM,SAAS,MAAM,UAAU,IAAI,MAAM;IACvC,MAAO;KAAC;KAAQ;KAAS;KAAQ,CAAC,SAAS,sBAAsB,GAAG,CAAC,GACjE,QACA,kBAAkB,GAAG;IACzB,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,UAAO;IAAE;IAAI,MAAM,OAAO;IAAM,KAAK,OAAO;IAAK;;EAEpD;;AAGH,kBAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-oxc-transform",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.312",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to transform project code with Oxc Transformer.",
|
|
6
6
|
"repository": {
|
|
@@ -97,13 +97,13 @@
|
|
|
97
97
|
"@stryke/path": "^0.26.6",
|
|
98
98
|
"defu": "^6.1.4",
|
|
99
99
|
"oxc-transform": "^0.99.0",
|
|
100
|
-
"powerlines": "^0.39.
|
|
100
|
+
"powerlines": "^0.39.11"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
103
|
+
"@powerlines/plugin-plugin": "^0.12.254",
|
|
104
104
|
"@types/node": "^25.3.3"
|
|
105
105
|
},
|
|
106
106
|
"publishConfig": { "access": "public" },
|
|
107
107
|
"types": "./dist/index.d.cts",
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "e63eb5a0ecd0e5ee3e030388ad1c534b3ecb2136"
|
|
109
109
|
}
|