@powerlines/plugin-env 0.13.84 → 0.13.86
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface } from "./fs.cjs";
|
|
1
|
+
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.cjs";
|
|
2
2
|
import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.cjs";
|
|
3
3
|
import { ParsedTypeScriptConfig } from "./tsconfig.cjs";
|
|
4
4
|
import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.cjs";
|
|
5
5
|
import { NonUndefined } from "@stryke/types/base";
|
|
6
|
+
import { TypeDefinition } from "@stryke/types/configuration";
|
|
6
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
7
8
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
8
9
|
import { PackageJson } from "@stryke/types/package-json";
|
|
@@ -80,6 +81,15 @@ interface ParseOptions extends ParserOptions {
|
|
|
80
81
|
*/
|
|
81
82
|
allowReturnOutsideFunction?: boolean;
|
|
82
83
|
}
|
|
84
|
+
interface EmitEntryOptions extends WriteOptions {
|
|
85
|
+
/**
|
|
86
|
+
* The export name of the type definition in the file being emitted
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* If no value is provided, we will attempt to infer the type definition from the module's `default` export.
|
|
90
|
+
*/
|
|
91
|
+
name?: TypeDefinition["name"];
|
|
92
|
+
}
|
|
83
93
|
/**
|
|
84
94
|
* The unresolved Powerlines context.
|
|
85
95
|
*
|
|
@@ -296,15 +306,17 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
296
306
|
* @param code - The source code of the builtin file
|
|
297
307
|
* @param id - The unique identifier of the builtin file
|
|
298
308
|
* @param path - An optional path to write the builtin file to
|
|
309
|
+
* @param options - Additional options for writing the builtin file
|
|
299
310
|
*/
|
|
300
|
-
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
311
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
|
|
301
312
|
/**
|
|
302
313
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
303
314
|
*
|
|
304
315
|
* @param code - The source code of the entry file
|
|
305
316
|
* @param path - An optional path to write the entry file to
|
|
317
|
+
* @param options - Additional options for writing the entry file
|
|
306
318
|
*/
|
|
307
|
-
emitEntry: (code: string, path: string) => Promise<void>;
|
|
319
|
+
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
308
320
|
/**
|
|
309
321
|
* A function to update the context fields using a new user configuration options
|
|
310
322
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface } from "./fs.mjs";
|
|
1
|
+
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
2
|
import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.mjs";
|
|
3
3
|
import "./plugin.mjs";
|
|
4
4
|
import "./hooks.mjs";
|
|
5
5
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
6
6
|
import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.mjs";
|
|
7
7
|
import { NonUndefined } from "@stryke/types/base";
|
|
8
|
+
import { TypeDefinition } from "@stryke/types/configuration";
|
|
8
9
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
9
10
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
10
11
|
import { PackageJson } from "@stryke/types/package-json";
|
|
@@ -82,6 +83,15 @@ interface ParseOptions extends ParserOptions {
|
|
|
82
83
|
*/
|
|
83
84
|
allowReturnOutsideFunction?: boolean;
|
|
84
85
|
}
|
|
86
|
+
interface EmitEntryOptions extends WriteOptions {
|
|
87
|
+
/**
|
|
88
|
+
* The export name of the type definition in the file being emitted
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* If no value is provided, we will attempt to infer the type definition from the module's `default` export.
|
|
92
|
+
*/
|
|
93
|
+
name?: TypeDefinition["name"];
|
|
94
|
+
}
|
|
85
95
|
/**
|
|
86
96
|
* The unresolved Powerlines context.
|
|
87
97
|
*
|
|
@@ -298,15 +308,17 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
298
308
|
* @param code - The source code of the builtin file
|
|
299
309
|
* @param id - The unique identifier of the builtin file
|
|
300
310
|
* @param path - An optional path to write the builtin file to
|
|
311
|
+
* @param options - Additional options for writing the builtin file
|
|
301
312
|
*/
|
|
302
|
-
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
313
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
|
|
303
314
|
/**
|
|
304
315
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
305
316
|
*
|
|
306
317
|
* @param code - The source code of the entry file
|
|
307
318
|
* @param path - An optional path to write the entry file to
|
|
319
|
+
* @param options - Additional options for writing the entry file
|
|
308
320
|
*/
|
|
309
|
-
emitEntry: (code: string, path: string) => Promise<void>;
|
|
321
|
+
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
310
322
|
/**
|
|
311
323
|
* A function to update the context fields using a new user configuration options
|
|
312
324
|
*/
|
|
@@ -357,4 +369,4 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
357
369
|
}
|
|
358
370
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
359
371
|
//#endregion
|
|
360
|
-
export { BuildPluginContext, Context, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult$1 as TransformResult, UnresolvedContext };
|
|
372
|
+
export { BuildPluginContext, Context, EmitEntryOptions, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult$1 as TransformResult, UnresolvedContext };
|
|
@@ -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 };
|
|
@@ -5,7 +5,7 @@ import { BabelResolvedConfig, EnvironmentResolvedConfig, OutputResolvedConfig, R
|
|
|
5
5
|
import { BasePluginHookFunctions, BuildPlugin, ConfigResult, Plugin, PluginBuildPlugins, PluginHook, PluginHookObject, PluginHooks, TypesResult } from "./plugin.mjs";
|
|
6
6
|
import "./hooks.mjs";
|
|
7
7
|
import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig } from "./tsconfig.mjs";
|
|
8
|
-
import { BuildPluginContext, Context, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult, UnresolvedContext } from "./context.mjs";
|
|
8
|
+
import { BuildPluginContext, Context, EmitEntryOptions, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult, UnresolvedContext } from "./context.mjs";
|
|
9
9
|
import { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, DeclareBabelTransformPluginReturn } from "./babel.mjs";
|
|
10
10
|
import { BabelUserConfig, BaseConfig, CommonUserConfig, DeployConfig, EnvironmentConfig, InlineConfig, LogFn, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, ProjectType, UserConfig, WorkspaceConfig } from "./config.mjs";
|
|
11
11
|
import "./api.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.86",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
|
|
6
6
|
"repository": {
|
|
@@ -192,9 +192,9 @@
|
|
|
192
192
|
"@alloy-js/markdown": "^0.21.0",
|
|
193
193
|
"@babel/core": "^7.28.5",
|
|
194
194
|
"@babel/types": "^7.28.5",
|
|
195
|
-
"@powerlines/alloy": "^0.11.
|
|
196
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
197
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
195
|
+
"@powerlines/alloy": "^0.11.89",
|
|
196
|
+
"@powerlines/plugin-babel": "^0.12.89",
|
|
197
|
+
"@powerlines/plugin-plugin": "^0.12.32",
|
|
198
198
|
"@storm-software/config-tools": "^1.188.73",
|
|
199
199
|
"@stryke/capnp": "^0.12.50",
|
|
200
200
|
"@stryke/env": "^0.20.42",
|
|
@@ -203,16 +203,16 @@
|
|
|
203
203
|
"@stryke/string-format": "^0.12.28",
|
|
204
204
|
"@stryke/type-checks": "^0.5.13",
|
|
205
205
|
"@stryke/types": "^0.10.27",
|
|
206
|
-
"powerlines": "^0.
|
|
206
|
+
"powerlines": "^0.33.1"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
209
|
"@alloy-js/babel-preset": "^0.2.1",
|
|
210
210
|
"@babel/preset-typescript": "^7.28.5",
|
|
211
|
-
"@powerlines/nx": "^0.11.
|
|
211
|
+
"@powerlines/nx": "^0.11.11",
|
|
212
212
|
"@types/node": "^24.10.4",
|
|
213
213
|
"typescript": "^5.9.3",
|
|
214
214
|
"vite": "8.0.0-beta.2"
|
|
215
215
|
},
|
|
216
216
|
"publishConfig": { "access": "public" },
|
|
217
|
-
"gitHead": "
|
|
217
|
+
"gitHead": "62d69003529024ae533a5885904fa16dce400a57"
|
|
218
218
|
}
|