@powerlines/plugin-oxc-transform 0.5.86 → 0.5.88
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/powerlines/src/types/config.d.cts +1 -1
- package/dist/powerlines/src/types/config.d.mts +1 -1
- package/dist/powerlines/src/types/context.d.cts +15 -3
- package/dist/powerlines/src/types/context.d.mts +15 -3
- package/dist/powerlines/src/types/fs.d.cts +2 -2
- package/dist/powerlines/src/types/fs.d.mts +2 -2
- package/package.json +6 -6
|
@@ -5,10 +5,10 @@ import { PluginContext } from "./context.cjs";
|
|
|
5
5
|
import { Plugin } from "./plugin.cjs";
|
|
6
6
|
import { MaybePromise } from "@stryke/types/base";
|
|
7
7
|
import { PreviewOptions } from "vite";
|
|
8
|
+
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
8
9
|
import { Format } from "@storm-software/build-tools/types";
|
|
9
10
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
10
11
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
11
|
-
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
12
12
|
import { AssetGlob } from "@stryke/types/file";
|
|
13
13
|
|
|
14
14
|
//#region ../powerlines/src/types/config.d.ts
|
|
@@ -5,10 +5,10 @@ import { PluginContext } from "./context.mjs";
|
|
|
5
5
|
import { Plugin } from "./plugin.mjs";
|
|
6
6
|
import { MaybePromise } from "@stryke/types/base";
|
|
7
7
|
import { PreviewOptions } from "vite";
|
|
8
|
+
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
8
9
|
import { Format } from "@storm-software/build-tools/types";
|
|
9
10
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
10
11
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
11
|
-
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
12
12
|
import { AssetGlob } from "@stryke/types/file";
|
|
13
13
|
|
|
14
14
|
//#region ../powerlines/src/types/config.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface } from "./fs.cjs";
|
|
1
|
+
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.cjs";
|
|
2
2
|
import { ParsedTypeScriptConfig } from "./tsconfig.cjs";
|
|
3
3
|
import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.cjs";
|
|
4
4
|
import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.cjs";
|
|
@@ -6,6 +6,7 @@ import { NonUndefined } from "@stryke/types/base";
|
|
|
6
6
|
import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
|
|
7
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
8
8
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
9
|
+
import { TypeDefinition } from "@stryke/types/configuration";
|
|
9
10
|
import { PackageJson } from "@stryke/types/package-json";
|
|
10
11
|
import { Jiti } from "jiti";
|
|
11
12
|
import { SourceMap } from "magic-string";
|
|
@@ -69,6 +70,15 @@ interface ParseOptions extends ParserOptions {
|
|
|
69
70
|
*/
|
|
70
71
|
allowReturnOutsideFunction?: boolean;
|
|
71
72
|
}
|
|
73
|
+
interface EmitEntryOptions extends WriteOptions {
|
|
74
|
+
/**
|
|
75
|
+
* The export name of the type definition in the file being emitted
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* If no value is provided, we will attempt to infer the type definition from the module's `default` export.
|
|
79
|
+
*/
|
|
80
|
+
name?: TypeDefinition["name"];
|
|
81
|
+
}
|
|
72
82
|
/**
|
|
73
83
|
* The unresolved Powerlines context.
|
|
74
84
|
*
|
|
@@ -285,15 +295,17 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
285
295
|
* @param code - The source code of the builtin file
|
|
286
296
|
* @param id - The unique identifier of the builtin file
|
|
287
297
|
* @param path - An optional path to write the builtin file to
|
|
298
|
+
* @param options - Additional options for writing the builtin file
|
|
288
299
|
*/
|
|
289
|
-
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
300
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
|
|
290
301
|
/**
|
|
291
302
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
292
303
|
*
|
|
293
304
|
* @param code - The source code of the entry file
|
|
294
305
|
* @param path - An optional path to write the entry file to
|
|
306
|
+
* @param options - Additional options for writing the entry file
|
|
295
307
|
*/
|
|
296
|
-
emitEntry: (code: string, path: string) => Promise<void>;
|
|
308
|
+
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
297
309
|
/**
|
|
298
310
|
* A function to update the context fields using a new user configuration options
|
|
299
311
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface } from "./fs.mjs";
|
|
1
|
+
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
2
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
3
3
|
import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.mjs";
|
|
4
4
|
import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.mjs";
|
|
@@ -6,6 +6,7 @@ import { NonUndefined } from "@stryke/types/base";
|
|
|
6
6
|
import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
|
|
7
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
8
8
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
9
|
+
import { TypeDefinition } from "@stryke/types/configuration";
|
|
9
10
|
import { PackageJson } from "@stryke/types/package-json";
|
|
10
11
|
import { Jiti } from "jiti";
|
|
11
12
|
import { SourceMap } from "magic-string";
|
|
@@ -69,6 +70,15 @@ interface ParseOptions extends ParserOptions {
|
|
|
69
70
|
*/
|
|
70
71
|
allowReturnOutsideFunction?: boolean;
|
|
71
72
|
}
|
|
73
|
+
interface EmitEntryOptions extends WriteOptions {
|
|
74
|
+
/**
|
|
75
|
+
* The export name of the type definition in the file being emitted
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* If no value is provided, we will attempt to infer the type definition from the module's `default` export.
|
|
79
|
+
*/
|
|
80
|
+
name?: TypeDefinition["name"];
|
|
81
|
+
}
|
|
72
82
|
/**
|
|
73
83
|
* The unresolved Powerlines context.
|
|
74
84
|
*
|
|
@@ -285,15 +295,17 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
285
295
|
* @param code - The source code of the builtin file
|
|
286
296
|
* @param id - The unique identifier of the builtin file
|
|
287
297
|
* @param path - An optional path to write the builtin file to
|
|
298
|
+
* @param options - Additional options for writing the builtin file
|
|
288
299
|
*/
|
|
289
|
-
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
300
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
|
|
290
301
|
/**
|
|
291
302
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
292
303
|
*
|
|
293
304
|
* @param code - The source code of the entry file
|
|
294
305
|
* @param path - An optional path to write the entry file to
|
|
306
|
+
* @param options - Additional options for writing the entry file
|
|
295
307
|
*/
|
|
296
|
-
emitEntry: (code: string, path: string) => Promise<void>;
|
|
308
|
+
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
297
309
|
/**
|
|
298
310
|
* A function to update the context fields using a new user configuration options
|
|
299
311
|
*/
|
|
@@ -210,7 +210,7 @@ interface WriteOptions {
|
|
|
210
210
|
/**
|
|
211
211
|
* Additional metadata for the file.
|
|
212
212
|
*/
|
|
213
|
-
meta?: VirtualFileMetadata
|
|
213
|
+
meta?: Partial<VirtualFileMetadata>;
|
|
214
214
|
}
|
|
215
215
|
interface ResolveOptions$1 extends ResolveOptions {
|
|
216
216
|
/**
|
|
@@ -455,4 +455,4 @@ interface VirtualFileSystemInterface {
|
|
|
455
455
|
dispose: () => Promise<void>;
|
|
456
456
|
}
|
|
457
457
|
//#endregion
|
|
458
|
-
export { ResolveOptions$1 as ResolveOptions, StoragePort, StoragePreset, VirtualFile, VirtualFileSystemInterface };
|
|
458
|
+
export { ResolveOptions$1 as ResolveOptions, StoragePort, StoragePreset, VirtualFile, VirtualFileSystemInterface, WriteOptions };
|
|
@@ -210,7 +210,7 @@ interface WriteOptions {
|
|
|
210
210
|
/**
|
|
211
211
|
* Additional metadata for the file.
|
|
212
212
|
*/
|
|
213
|
-
meta?: VirtualFileMetadata
|
|
213
|
+
meta?: Partial<VirtualFileMetadata>;
|
|
214
214
|
}
|
|
215
215
|
interface ResolveOptions$1 extends ResolveOptions {
|
|
216
216
|
/**
|
|
@@ -455,4 +455,4 @@ interface VirtualFileSystemInterface {
|
|
|
455
455
|
dispose: () => Promise<void>;
|
|
456
456
|
}
|
|
457
457
|
//#endregion
|
|
458
|
-
export { ResolveOptions$1 as ResolveOptions, StoragePort, StoragePreset, VirtualFile, VirtualFileSystemInterface };
|
|
458
|
+
export { ResolveOptions$1 as ResolveOptions, StoragePort, StoragePreset, VirtualFile, VirtualFileSystemInterface, WriteOptions };
|
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.88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to transform project code with Oxc Transformer.",
|
|
6
6
|
"repository": {
|
|
@@ -122,16 +122,16 @@
|
|
|
122
122
|
"powerlines-plugin"
|
|
123
123
|
],
|
|
124
124
|
"dependencies": {
|
|
125
|
-
"@stryke/path": "^0.23.
|
|
125
|
+
"@stryke/path": "^0.23.2",
|
|
126
126
|
"defu": "^6.1.4",
|
|
127
127
|
"oxc-transform": "^0.99.0",
|
|
128
|
-
"powerlines": "^0.
|
|
128
|
+
"powerlines": "^0.33.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@powerlines/nx": "^0.11.
|
|
132
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
131
|
+
"@powerlines/nx": "^0.11.10",
|
|
132
|
+
"@powerlines/plugin-plugin": "^0.12.31",
|
|
133
133
|
"@types/node": "^24.10.4"
|
|
134
134
|
},
|
|
135
135
|
"publishConfig": { "access": "public" },
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "bff4c5f6ffeb46bd4a985858b841ab1fde64c28f"
|
|
137
137
|
}
|