@powerlines/plugin-pulumi 0.2.16 → 0.2.17
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-CBY94ymB.d.cts → index-DKi9kYZH.d.cts} +186 -229
- package/dist/{index-CBY94ymB.d.ts → index-DKi9kYZH.d.ts} +186 -229
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/types/plugin.d.cts +1 -2
- package/dist/types/plugin.d.ts +1 -2
- package/package.json +10 -10
|
@@ -14,7 +14,6 @@ import { Range } from 'semver';
|
|
|
14
14
|
import { Project } from 'ts-morph';
|
|
15
15
|
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
16
16
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
17
|
-
import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
18
17
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
19
18
|
import ts from 'typescript';
|
|
20
19
|
import { ArrayValues } from '@stryke/types/array';
|
|
@@ -155,9 +154,107 @@ interface BuildConfig {
|
|
|
155
154
|
}
|
|
156
155
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
157
156
|
|
|
158
|
-
declare
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
declare enum StoragePreset {
|
|
158
|
+
VIRTUAL = "virtual",
|
|
159
|
+
FS = "fs"
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Interface defining the methods and properties for a storage adapter.
|
|
163
|
+
*/
|
|
164
|
+
interface StorageAdapter {
|
|
165
|
+
/**
|
|
166
|
+
* A name identifying the storage adapter type.
|
|
167
|
+
*/
|
|
168
|
+
name: string;
|
|
169
|
+
/**
|
|
170
|
+
* Checks if a key exists in the storage.
|
|
171
|
+
*
|
|
172
|
+
* @param key - The key to check for existence.
|
|
173
|
+
* @returns A promise that resolves to `true` if the key exists, otherwise `false`.
|
|
174
|
+
*/
|
|
175
|
+
exists: (key: string) => Promise<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* Synchronously checks if a key exists in the storage.
|
|
178
|
+
*
|
|
179
|
+
* @param key - The key to check for existence.
|
|
180
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
181
|
+
*/
|
|
182
|
+
existsSync: (key: string) => boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Read a value associated with a key from the storage.
|
|
185
|
+
*
|
|
186
|
+
* @param key - The key to read the value for.
|
|
187
|
+
* @returns A promise that resolves to the value if found, otherwise `null`.
|
|
188
|
+
*/
|
|
189
|
+
get: (key: string) => Promise<string | null>;
|
|
190
|
+
/**
|
|
191
|
+
* Synchronously reads the value associated with a key from the storage.
|
|
192
|
+
*
|
|
193
|
+
* @param key - The key to read the value for.
|
|
194
|
+
* @returns The value if found, otherwise `null`.
|
|
195
|
+
*/
|
|
196
|
+
getSync: (key: string) => string | null;
|
|
197
|
+
/**
|
|
198
|
+
* Writes a value to the storage for the given key.
|
|
199
|
+
*
|
|
200
|
+
* @param key - The key to associate the value with.
|
|
201
|
+
* @param value - The value to store.
|
|
202
|
+
*/
|
|
203
|
+
set: (key: string, value: string) => Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Synchronously writes a value to the storage for the given key.
|
|
206
|
+
*
|
|
207
|
+
* @param key - The key to associate the value with.
|
|
208
|
+
* @param value - The value to store.
|
|
209
|
+
*/
|
|
210
|
+
setSync: (key: string, value: string) => void;
|
|
211
|
+
/**
|
|
212
|
+
* Removes a value from the storage.
|
|
213
|
+
*
|
|
214
|
+
* @param key - The key whose value should be removed.
|
|
215
|
+
*/
|
|
216
|
+
remove: (key: string) => Promise<void>;
|
|
217
|
+
/**
|
|
218
|
+
* Synchronously removes a value from the storage.
|
|
219
|
+
*
|
|
220
|
+
* @param key - The key whose value should be removed.
|
|
221
|
+
*/
|
|
222
|
+
removeSync: (key: string) => void;
|
|
223
|
+
/**
|
|
224
|
+
* Remove all entries from the storage that match the provided base path.
|
|
225
|
+
*
|
|
226
|
+
* @param base - The base path or prefix to clear entries from.
|
|
227
|
+
*/
|
|
228
|
+
clear: (base?: string) => Promise<void>;
|
|
229
|
+
/**
|
|
230
|
+
* Synchronously remove all entries from the storage that match the provided base path.
|
|
231
|
+
*
|
|
232
|
+
* @param base - The base path or prefix to clear entries from.
|
|
233
|
+
*/
|
|
234
|
+
clearSync: (base?: string) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Lists all keys under the provided base path.
|
|
237
|
+
*
|
|
238
|
+
* @param base - The base path or prefix to list keys from.
|
|
239
|
+
* @returns A promise resolving to the list of keys.
|
|
240
|
+
*/
|
|
241
|
+
list: (base?: string) => Promise<string[]>;
|
|
242
|
+
/**
|
|
243
|
+
* Synchronously lists all keys under the provided base path.
|
|
244
|
+
*
|
|
245
|
+
* @param base - The base path or prefix to list keys from.
|
|
246
|
+
* @returns The list of keys.
|
|
247
|
+
*/
|
|
248
|
+
listSync: (base?: string) => string[];
|
|
249
|
+
/**
|
|
250
|
+
* Releases any resources held by the storage adapter.
|
|
251
|
+
*/
|
|
252
|
+
dispose: () => MaybePromise<void>;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* A mapping of file paths to storage adapter names and their corresponding {@link StorageAdapter} instances.
|
|
256
|
+
*/
|
|
257
|
+
type StoragePort = Record<string, StorageAdapter>;
|
|
161
258
|
interface VirtualFileMetadata {
|
|
162
259
|
/**
|
|
163
260
|
* The identifier for the file data.
|
|
@@ -177,10 +274,6 @@ interface VirtualFileMetadata {
|
|
|
177
274
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
178
275
|
*/
|
|
179
276
|
type: string;
|
|
180
|
-
/**
|
|
181
|
-
* The output mode of the file.
|
|
182
|
-
*/
|
|
183
|
-
mode: string;
|
|
184
277
|
/**
|
|
185
278
|
* Additional metadata associated with the file.
|
|
186
279
|
*/
|
|
@@ -202,16 +295,9 @@ interface VirtualFileData {
|
|
|
202
295
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
203
296
|
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
204
297
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
205
|
-
* - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
|
|
206
|
-
* - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
|
|
207
|
-
* - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
|
|
208
298
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
209
299
|
*/
|
|
210
300
|
type?: string;
|
|
211
|
-
/**
|
|
212
|
-
* The output mode of the file.
|
|
213
|
-
*/
|
|
214
|
-
mode?: string;
|
|
215
301
|
/**
|
|
216
302
|
* Additional metadata associated with the file.
|
|
217
303
|
*/
|
|
@@ -227,21 +313,18 @@ interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
|
|
|
227
313
|
*/
|
|
228
314
|
timestamp: number;
|
|
229
315
|
}
|
|
230
|
-
interface
|
|
231
|
-
mode?: OutputModeType;
|
|
232
|
-
}
|
|
233
|
-
type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
|
|
234
|
-
interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
316
|
+
interface WriteOptions {
|
|
235
317
|
/**
|
|
236
318
|
* Should the file skip formatting before being written?
|
|
237
319
|
*
|
|
238
320
|
* @defaultValue false
|
|
239
321
|
*/
|
|
240
322
|
skipFormat?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Additional metadata for the file.
|
|
325
|
+
*/
|
|
326
|
+
meta?: VirtualFileMetadata;
|
|
241
327
|
}
|
|
242
|
-
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
243
|
-
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
244
|
-
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
245
328
|
interface ResolveOptions extends ResolveOptions$1 {
|
|
246
329
|
/**
|
|
247
330
|
* If true, the module is being resolved as an entry point.
|
|
@@ -265,14 +348,6 @@ interface ResolveOptions extends ResolveOptions$1 {
|
|
|
265
348
|
skipNodeModulesBundle?: boolean;
|
|
266
349
|
}
|
|
267
350
|
interface VirtualFileSystemInterface {
|
|
268
|
-
/**
|
|
269
|
-
* Patches the File System to include the virtual file system (VFS) contents.
|
|
270
|
-
*/
|
|
271
|
-
[__VFS_PATCH__]: () => void;
|
|
272
|
-
/**
|
|
273
|
-
* Reverts the virtual file system (VFS) to its previous state.
|
|
274
|
-
*/
|
|
275
|
-
[__VFS_REVERT__]: () => void;
|
|
276
351
|
/**
|
|
277
352
|
* The underlying file metadata.
|
|
278
353
|
*/
|
|
@@ -285,208 +360,92 @@ interface VirtualFileSystemInterface {
|
|
|
285
360
|
* A map of module ids to their file paths.
|
|
286
361
|
*/
|
|
287
362
|
paths: Readonly<Record<string, string>>;
|
|
288
|
-
/**
|
|
289
|
-
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
290
|
-
*
|
|
291
|
-
* @param pathOrId - The path or id to check.
|
|
292
|
-
* @param importer - The importer path, if any.
|
|
293
|
-
* @param options - Optional parameters for resolving the path.
|
|
294
|
-
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
295
|
-
*/
|
|
296
|
-
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
297
|
-
/**
|
|
298
|
-
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
299
|
-
*
|
|
300
|
-
* @param pathOrId - The path or id to check.
|
|
301
|
-
* @param importer - The importer path, if any.
|
|
302
|
-
* @param options - Optional parameters for resolving the path.
|
|
303
|
-
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
304
|
-
*/
|
|
305
|
-
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
306
363
|
/**
|
|
307
364
|
* Checks if a file exists in the virtual file system (VFS).
|
|
308
365
|
*
|
|
309
|
-
* @param path - The path of the file
|
|
366
|
+
* @param path - The path or id of the file.
|
|
310
367
|
* @returns `true` if the file exists, otherwise `false`.
|
|
311
368
|
*/
|
|
312
|
-
|
|
369
|
+
exists: (path: string) => Promise<boolean>;
|
|
313
370
|
/**
|
|
314
|
-
* Checks if a
|
|
371
|
+
* Synchronously Checks if a file exists in the virtual file system (VFS).
|
|
315
372
|
*
|
|
316
|
-
* @param path - The path of the
|
|
317
|
-
* @returns `true` if the
|
|
373
|
+
* @param path - The path or id of the file.
|
|
374
|
+
* @returns `true` if the file exists, otherwise `false`.
|
|
318
375
|
*/
|
|
319
|
-
|
|
376
|
+
existsSync: (path: string) => boolean;
|
|
320
377
|
/**
|
|
321
|
-
* Checks if a file
|
|
378
|
+
* Checks if a file is virtual in the virtual file system (VFS).
|
|
322
379
|
*
|
|
323
|
-
* @param
|
|
324
|
-
* @returns `true` if the file
|
|
380
|
+
* @param path - The path or id of the file.
|
|
381
|
+
* @returns `true` if the file is virtual, otherwise `false`.
|
|
325
382
|
*/
|
|
326
|
-
|
|
383
|
+
isVirtual: (path: string) => boolean;
|
|
327
384
|
/**
|
|
328
385
|
* Gets the metadata of a file in the virtual file system (VFS).
|
|
329
386
|
*
|
|
330
|
-
* @param
|
|
387
|
+
* @param path - The path or id of the file.
|
|
331
388
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
332
389
|
*/
|
|
333
|
-
getMetadata: (
|
|
334
|
-
/**
|
|
335
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
336
|
-
*
|
|
337
|
-
* @param pathOrId - The path or id of the file.
|
|
338
|
-
* @param options - Optional parameters for getting the stats.
|
|
339
|
-
* @returns The stats of the file if it exists, otherwise undefined.
|
|
340
|
-
*/
|
|
341
|
-
lstat: (pathOrId: string, options?: StatSyncOptions & {
|
|
342
|
-
bigint?: false | undefined;
|
|
343
|
-
throwIfNoEntry: false;
|
|
344
|
-
}) => Promise<Stats>;
|
|
345
|
-
/**
|
|
346
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
347
|
-
*
|
|
348
|
-
* @param pathOrId - The path or id of the file.
|
|
349
|
-
* @param options - Optional parameters for getting the stats.
|
|
350
|
-
* @returns The stats of the file if it exists, otherwise undefined.
|
|
351
|
-
*/
|
|
352
|
-
lstatSync: (pathOrId: string, options?: StatSyncOptions & {
|
|
353
|
-
bigint?: false | undefined;
|
|
354
|
-
throwIfNoEntry: false;
|
|
355
|
-
}) => Stats | undefined;
|
|
356
|
-
/**
|
|
357
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
358
|
-
*
|
|
359
|
-
* @param pathOrId - The path or id of the file.
|
|
360
|
-
* @returns The stats of the file if it exists, otherwise false.
|
|
361
|
-
*/
|
|
362
|
-
stat: (pathOrId: string, options?: StatSyncOptions & {
|
|
363
|
-
bigint?: false | undefined;
|
|
364
|
-
throwIfNoEntry: false;
|
|
365
|
-
}) => Promise<Stats>;
|
|
366
|
-
/**
|
|
367
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
368
|
-
*
|
|
369
|
-
* @param pathOrId - The path or id of the file.
|
|
370
|
-
* @returns The stats of the file if it exists, otherwise false.
|
|
371
|
-
*/
|
|
372
|
-
statSync: (pathOrId: string, options?: StatSyncOptions & {
|
|
373
|
-
bigint?: false | undefined;
|
|
374
|
-
throwIfNoEntry: false;
|
|
375
|
-
}) => Stats | undefined;
|
|
390
|
+
getMetadata: (path: string) => VirtualFileMetadata | undefined;
|
|
376
391
|
/**
|
|
377
392
|
* Lists files in a given path.
|
|
378
393
|
*
|
|
379
394
|
* @param path - The path to list files from.
|
|
380
|
-
* @param options - Options for listing files, such as encoding and recursion.
|
|
381
395
|
* @returns An array of file names in the specified path.
|
|
382
396
|
*/
|
|
383
|
-
|
|
384
|
-
encoding: BufferEncoding | null;
|
|
385
|
-
withFileTypes?: false | undefined;
|
|
386
|
-
recursive?: boolean | undefined;
|
|
387
|
-
} | BufferEncoding) => string[];
|
|
397
|
+
listSync: (path: string) => string[];
|
|
388
398
|
/**
|
|
389
399
|
* Lists files in a given path.
|
|
390
400
|
*
|
|
391
401
|
* @param path - The path to list files from.
|
|
392
|
-
* @param options - Options for listing files, such as encoding and recursion.
|
|
393
402
|
* @returns An array of file names in the specified path.
|
|
394
403
|
*/
|
|
395
|
-
|
|
396
|
-
encoding: BufferEncoding | null;
|
|
397
|
-
withFileTypes?: false | undefined;
|
|
398
|
-
recursive?: boolean | undefined;
|
|
399
|
-
} | BufferEncoding) => Promise<string[]>;
|
|
404
|
+
list: (path: string) => Promise<string[]>;
|
|
400
405
|
/**
|
|
401
406
|
* Removes a file or symbolic link in the virtual file system (VFS).
|
|
402
407
|
*
|
|
403
408
|
* @param path - The path to the file to remove.
|
|
404
409
|
* @returns A promise that resolves when the file is removed.
|
|
405
410
|
*/
|
|
406
|
-
|
|
411
|
+
removeSync: (path: string) => void;
|
|
407
412
|
/**
|
|
408
413
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
409
414
|
*
|
|
410
415
|
* @param path - The path to the file to remove.
|
|
411
416
|
* @returns A promise that resolves when the file is removed.
|
|
412
417
|
*/
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Removes a directory in the virtual file system (VFS).
|
|
416
|
-
*
|
|
417
|
-
* @param path - The path to create the directory at.
|
|
418
|
-
* @param options - Options for creating the directory.
|
|
419
|
-
*/
|
|
420
|
-
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
421
|
-
/**
|
|
422
|
-
* Removes a directory in the virtual file system (VFS).
|
|
423
|
-
*
|
|
424
|
-
* @param path - The path to create the directory at.
|
|
425
|
-
* @param options - Options for creating the directory.
|
|
426
|
-
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
427
|
-
*/
|
|
428
|
-
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
429
|
-
/**
|
|
430
|
-
* Removes a file or directory in the virtual file system (VFS).
|
|
431
|
-
*
|
|
432
|
-
* @param path - The path to the file or directory to remove.
|
|
433
|
-
* @param options - Options for removing the file or directory.
|
|
434
|
-
* @returns A promise that resolves when the file or directory is removed.
|
|
435
|
-
*/
|
|
436
|
-
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
437
|
-
/**
|
|
438
|
-
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
439
|
-
*
|
|
440
|
-
* @param path - The path to the file or directory to remove.
|
|
441
|
-
* @param options - Options for removing the file or directory.
|
|
442
|
-
*/
|
|
443
|
-
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
444
|
-
/**
|
|
445
|
-
* Creates a directory in the virtual file system (VFS).
|
|
446
|
-
*
|
|
447
|
-
* @param path - The path to create the directory at.
|
|
448
|
-
* @param options - Options for creating the directory.
|
|
449
|
-
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
450
|
-
*/
|
|
451
|
-
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
452
|
-
/**
|
|
453
|
-
* Creates a directory in the virtual file system (VFS).
|
|
454
|
-
*
|
|
455
|
-
* @param path - The path to create the directory at.
|
|
456
|
-
* @param options - Options for creating the directory.
|
|
457
|
-
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
458
|
-
*/
|
|
459
|
-
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
418
|
+
remove: (path: string) => Promise<void>;
|
|
460
419
|
/**
|
|
461
420
|
* Reads a file from the virtual file system (VFS).
|
|
462
421
|
*
|
|
463
|
-
* @param
|
|
422
|
+
* @param path - The path or id of the file.
|
|
464
423
|
* @returns The contents of the file if it exists, otherwise undefined.
|
|
465
424
|
*/
|
|
466
|
-
|
|
425
|
+
read: (path: string) => Promise<string | undefined>;
|
|
467
426
|
/**
|
|
468
427
|
* Reads a file from the virtual file system (VFS).
|
|
469
428
|
*
|
|
470
|
-
* @param
|
|
429
|
+
* @param path - The path or id of the file.
|
|
471
430
|
*/
|
|
472
|
-
|
|
431
|
+
readSync: (path: string) => string | undefined;
|
|
473
432
|
/**
|
|
474
433
|
* Writes a file to the virtual file system (VFS).
|
|
475
434
|
*
|
|
476
435
|
* @param path - The path to the file.
|
|
477
436
|
* @param data - The contents of the file.
|
|
478
|
-
* @param options -
|
|
437
|
+
* @param options - Options for writing the file.
|
|
479
438
|
* @returns A promise that resolves when the file is written.
|
|
480
439
|
*/
|
|
481
|
-
|
|
440
|
+
write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
|
|
482
441
|
/**
|
|
483
442
|
* Writes a file to the virtual file system (VFS).
|
|
484
443
|
*
|
|
485
444
|
* @param path - The path to the file.
|
|
486
445
|
* @param data - The contents of the file.
|
|
487
|
-
* @param options -
|
|
446
|
+
* @param options - Options for writing the file.
|
|
488
447
|
*/
|
|
489
|
-
|
|
448
|
+
writeSync: (path: string, data: string, options?: WriteOptions) => void;
|
|
490
449
|
/**
|
|
491
450
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
492
451
|
*
|
|
@@ -529,13 +488,6 @@ interface VirtualFileSystemInterface {
|
|
|
529
488
|
* @returns An array of file paths matching the provided pattern(s)
|
|
530
489
|
*/
|
|
531
490
|
globSync: (pattern: string | string[]) => string[];
|
|
532
|
-
/**
|
|
533
|
-
* Resolves a path or id to a file path in the virtual file system.
|
|
534
|
-
*
|
|
535
|
-
* @param pathOrId - The path or id of the file to resolve.
|
|
536
|
-
* @returns The resolved path of the file if it exists, otherwise false.
|
|
537
|
-
*/
|
|
538
|
-
realpathSync: (pathOrId: string) => string;
|
|
539
491
|
/**
|
|
540
492
|
* A helper function to resolve modules using the Jiti resolver
|
|
541
493
|
*
|
|
@@ -685,13 +637,16 @@ interface OutputConfig {
|
|
|
685
637
|
*
|
|
686
638
|
* @defaultValue "\{projectRoot\}/dist"
|
|
687
639
|
*/
|
|
688
|
-
|
|
640
|
+
buildPath?: string;
|
|
689
641
|
/**
|
|
690
|
-
* The
|
|
642
|
+
* The folder where the generated runtime artifacts will be located
|
|
691
643
|
*
|
|
692
|
-
* @
|
|
644
|
+
* @remarks
|
|
645
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
646
|
+
*
|
|
647
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
693
648
|
*/
|
|
694
|
-
|
|
649
|
+
artifactsPath?: string;
|
|
695
650
|
/**
|
|
696
651
|
* The path of the generated runtime declaration file relative to the workspace root.
|
|
697
652
|
*
|
|
@@ -707,15 +662,6 @@ interface OutputConfig {
|
|
|
707
662
|
* @defaultValue "powerlines"
|
|
708
663
|
*/
|
|
709
664
|
builtinPrefix?: string;
|
|
710
|
-
/**
|
|
711
|
-
* The folder where the generated runtime artifacts will be located
|
|
712
|
-
*
|
|
713
|
-
* @remarks
|
|
714
|
-
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
715
|
-
*
|
|
716
|
-
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
717
|
-
*/
|
|
718
|
-
artifactsFolder?: string;
|
|
719
665
|
/**
|
|
720
666
|
* The module format of the output files
|
|
721
667
|
*
|
|
@@ -732,42 +678,21 @@ interface OutputConfig {
|
|
|
732
678
|
* The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
|
|
733
679
|
*/
|
|
734
680
|
assets?: Array<string | AssetGlob>;
|
|
735
|
-
}
|
|
736
|
-
interface BaseConfig {
|
|
737
|
-
/**
|
|
738
|
-
* The name of the project
|
|
739
|
-
*/
|
|
740
|
-
name?: string;
|
|
741
|
-
/**
|
|
742
|
-
* The project display title
|
|
743
|
-
*
|
|
744
|
-
* @remarks
|
|
745
|
-
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
746
|
-
*/
|
|
747
|
-
title?: string;
|
|
748
681
|
/**
|
|
749
|
-
* A
|
|
682
|
+
* A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
|
|
750
683
|
*
|
|
751
684
|
* @remarks
|
|
752
|
-
* If
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* The log level to use for the Powerlines processes.
|
|
685
|
+
* If a string preset is provided, it must be one of the following values:
|
|
686
|
+
* - `"virtual"`: Uses the local file system for storage.
|
|
687
|
+
* - `"fs"`: Uses an in-memory virtual file system for storage.
|
|
757
688
|
*
|
|
758
|
-
* @
|
|
759
|
-
*/
|
|
760
|
-
logLevel?: LogLevelLabel | null;
|
|
761
|
-
/**
|
|
762
|
-
* A custom logger function to use for logging messages
|
|
763
|
-
*/
|
|
764
|
-
customLogger?: LogFn;
|
|
765
|
-
/**
|
|
766
|
-
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
689
|
+
* If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
|
|
767
690
|
*
|
|
768
|
-
* @defaultValue "
|
|
691
|
+
* @defaultValue "virtual"
|
|
769
692
|
*/
|
|
770
|
-
|
|
693
|
+
storage?: StoragePort | StoragePreset;
|
|
694
|
+
}
|
|
695
|
+
interface BaseConfig {
|
|
771
696
|
/**
|
|
772
697
|
* The entry point(s) for the application
|
|
773
698
|
*/
|
|
@@ -851,6 +776,40 @@ interface EnvironmentConfig extends BaseConfig {
|
|
|
851
776
|
consumer?: "client" | "server";
|
|
852
777
|
}
|
|
853
778
|
interface CommonUserConfig extends BaseConfig {
|
|
779
|
+
/**
|
|
780
|
+
* The name of the project
|
|
781
|
+
*/
|
|
782
|
+
name?: string;
|
|
783
|
+
/**
|
|
784
|
+
* The project display title
|
|
785
|
+
*
|
|
786
|
+
* @remarks
|
|
787
|
+
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
788
|
+
*/
|
|
789
|
+
title?: string;
|
|
790
|
+
/**
|
|
791
|
+
* A description of the project
|
|
792
|
+
*
|
|
793
|
+
* @remarks
|
|
794
|
+
* If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
|
|
795
|
+
*/
|
|
796
|
+
description?: string;
|
|
797
|
+
/**
|
|
798
|
+
* The log level to use for the Powerlines processes.
|
|
799
|
+
*
|
|
800
|
+
* @defaultValue "info"
|
|
801
|
+
*/
|
|
802
|
+
logLevel?: LogLevelLabel | null;
|
|
803
|
+
/**
|
|
804
|
+
* A custom logger function to use for logging messages
|
|
805
|
+
*/
|
|
806
|
+
customLogger?: LogFn;
|
|
807
|
+
/**
|
|
808
|
+
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
809
|
+
*
|
|
810
|
+
* @defaultValue "production"
|
|
811
|
+
*/
|
|
812
|
+
mode?: "development" | "test" | "production";
|
|
854
813
|
/**
|
|
855
814
|
* The type of project being built
|
|
856
815
|
*
|
|
@@ -901,7 +860,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
901
860
|
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
902
861
|
*
|
|
903
862
|
* @remarks
|
|
904
|
-
* If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.
|
|
863
|
+
* If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
|
|
905
864
|
*
|
|
906
865
|
* @defaultValue "powerlines"
|
|
907
866
|
*/
|
|
@@ -949,7 +908,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
949
908
|
*/
|
|
950
909
|
output?: string;
|
|
951
910
|
}
|
|
952
|
-
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "
|
|
911
|
+
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
|
|
953
912
|
/**
|
|
954
913
|
* The name of the environment
|
|
955
914
|
*/
|
|
@@ -960,9 +919,9 @@ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "
|
|
|
960
919
|
preview?: ResolvedPreviewOptions;
|
|
961
920
|
};
|
|
962
921
|
type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
|
|
963
|
-
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
922
|
+
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
|
|
964
923
|
assets: ResolvedAssetGlob[];
|
|
965
|
-
}>;
|
|
924
|
+
}> & Pick<OutputConfig, "storage">;
|
|
966
925
|
/**
|
|
967
926
|
* The resolved options for the Powerlines project configuration.
|
|
968
927
|
*/
|
|
@@ -1230,17 +1189,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1230
1189
|
* @param code - The source code of the builtin file
|
|
1231
1190
|
* @param id - The unique identifier of the builtin file
|
|
1232
1191
|
* @param path - An optional path to write the builtin file to
|
|
1233
|
-
* @param options - Options for writing the file
|
|
1234
1192
|
*/
|
|
1235
|
-
emitBuiltin: (code: string, id: string, path?: string
|
|
1193
|
+
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
1236
1194
|
/**
|
|
1237
1195
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1238
1196
|
*
|
|
1239
1197
|
* @param code - The source code of the entry file
|
|
1240
1198
|
* @param path - An optional path to write the entry file to
|
|
1241
|
-
* @param options - Options for writing the file
|
|
1242
1199
|
*/
|
|
1243
|
-
emitEntry: (code: string, path: string
|
|
1200
|
+
emitEntry: (code: string, path: string) => Promise<void>;
|
|
1244
1201
|
/**
|
|
1245
1202
|
* A function to update the context fields using a new user configuration options
|
|
1246
1203
|
*/
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PulumiPluginContext, a as PulumiPluginOptions, b as Plugin } from './index-
|
|
2
|
-
export { c as PulumiPluginBaseOptions, f as PulumiPluginCreateStackInlineOptions, g as PulumiPluginCreateStackLocalOptions, e as PulumiPluginCreateStackOptions, d as PulumiPluginExistingStackOptions, j as PulumiPluginResolvedConfig, h as PulumiPluginResolvedOptions, i as PulumiPluginUserConfig, _ as __ΩPulumiPluginBaseOptions, s as __ΩPulumiPluginContext, m as __ΩPulumiPluginCreateStackInlineOptions, n as __ΩPulumiPluginCreateStackLocalOptions, l as __ΩPulumiPluginCreateStackOptions, k as __ΩPulumiPluginExistingStackOptions, o as __ΩPulumiPluginOptions, r as __ΩPulumiPluginResolvedConfig, p as __ΩPulumiPluginResolvedOptions, q as __ΩPulumiPluginUserConfig } from './index-
|
|
1
|
+
import { P as PulumiPluginContext, a as PulumiPluginOptions, b as Plugin } from './index-DKi9kYZH.cjs';
|
|
2
|
+
export { c as PulumiPluginBaseOptions, f as PulumiPluginCreateStackInlineOptions, g as PulumiPluginCreateStackLocalOptions, e as PulumiPluginCreateStackOptions, d as PulumiPluginExistingStackOptions, j as PulumiPluginResolvedConfig, h as PulumiPluginResolvedOptions, i as PulumiPluginUserConfig, _ as __ΩPulumiPluginBaseOptions, s as __ΩPulumiPluginContext, m as __ΩPulumiPluginCreateStackInlineOptions, n as __ΩPulumiPluginCreateStackLocalOptions, l as __ΩPulumiPluginCreateStackOptions, k as __ΩPulumiPluginExistingStackOptions, o as __ΩPulumiPluginOptions, r as __ΩPulumiPluginResolvedConfig, p as __ΩPulumiPluginResolvedOptions, q as __ΩPulumiPluginUserConfig } from './index-DKi9kYZH.cjs';
|
|
3
3
|
import '@pulumi/pulumi/automation';
|
|
4
4
|
import '@storm-software/build-tools/types';
|
|
5
5
|
import '@storm-software/config-tools/types';
|
|
@@ -16,7 +16,6 @@ import 'semver';
|
|
|
16
16
|
import 'ts-morph';
|
|
17
17
|
import 'unplugin';
|
|
18
18
|
import '@stryke/fs/resolve';
|
|
19
|
-
import 'node:fs';
|
|
20
19
|
import '@stryke/types/tsconfig';
|
|
21
20
|
import 'typescript';
|
|
22
21
|
import '@stryke/types/array';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PulumiPluginContext, a as PulumiPluginOptions, b as Plugin } from './index-
|
|
2
|
-
export { c as PulumiPluginBaseOptions, f as PulumiPluginCreateStackInlineOptions, g as PulumiPluginCreateStackLocalOptions, e as PulumiPluginCreateStackOptions, d as PulumiPluginExistingStackOptions, j as PulumiPluginResolvedConfig, h as PulumiPluginResolvedOptions, i as PulumiPluginUserConfig, _ as __ΩPulumiPluginBaseOptions, s as __ΩPulumiPluginContext, m as __ΩPulumiPluginCreateStackInlineOptions, n as __ΩPulumiPluginCreateStackLocalOptions, l as __ΩPulumiPluginCreateStackOptions, k as __ΩPulumiPluginExistingStackOptions, o as __ΩPulumiPluginOptions, r as __ΩPulumiPluginResolvedConfig, p as __ΩPulumiPluginResolvedOptions, q as __ΩPulumiPluginUserConfig } from './index-
|
|
1
|
+
import { P as PulumiPluginContext, a as PulumiPluginOptions, b as Plugin } from './index-DKi9kYZH.js';
|
|
2
|
+
export { c as PulumiPluginBaseOptions, f as PulumiPluginCreateStackInlineOptions, g as PulumiPluginCreateStackLocalOptions, e as PulumiPluginCreateStackOptions, d as PulumiPluginExistingStackOptions, j as PulumiPluginResolvedConfig, h as PulumiPluginResolvedOptions, i as PulumiPluginUserConfig, _ as __ΩPulumiPluginBaseOptions, s as __ΩPulumiPluginContext, m as __ΩPulumiPluginCreateStackInlineOptions, n as __ΩPulumiPluginCreateStackLocalOptions, l as __ΩPulumiPluginCreateStackOptions, k as __ΩPulumiPluginExistingStackOptions, o as __ΩPulumiPluginOptions, r as __ΩPulumiPluginResolvedConfig, p as __ΩPulumiPluginResolvedOptions, q as __ΩPulumiPluginUserConfig } from './index-DKi9kYZH.js';
|
|
3
3
|
import '@pulumi/pulumi/automation';
|
|
4
4
|
import '@storm-software/build-tools/types';
|
|
5
5
|
import '@storm-software/config-tools/types';
|
|
@@ -16,7 +16,6 @@ import 'semver';
|
|
|
16
16
|
import 'ts-morph';
|
|
17
17
|
import 'unplugin';
|
|
18
18
|
import '@stryke/fs/resolve';
|
|
19
|
-
import 'node:fs';
|
|
20
19
|
import '@stryke/types/tsconfig';
|
|
21
20
|
import 'typescript';
|
|
22
21
|
import '@stryke/types/array';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as PulumiPluginBaseOptions, P as PulumiPluginContext, f as PulumiPluginCreateStackInlineOptions, g as PulumiPluginCreateStackLocalOptions, e as PulumiPluginCreateStackOptions, d as PulumiPluginExistingStackOptions, a as PulumiPluginOptions, j as PulumiPluginResolvedConfig, h as PulumiPluginResolvedOptions, i as PulumiPluginUserConfig, _ as __ΩPulumiPluginBaseOptions, s as __ΩPulumiPluginContext, m as __ΩPulumiPluginCreateStackInlineOptions, n as __ΩPulumiPluginCreateStackLocalOptions, l as __ΩPulumiPluginCreateStackOptions, k as __ΩPulumiPluginExistingStackOptions, o as __ΩPulumiPluginOptions, r as __ΩPulumiPluginResolvedConfig, p as __ΩPulumiPluginResolvedOptions, q as __ΩPulumiPluginUserConfig } from '../index-
|
|
1
|
+
export { c as PulumiPluginBaseOptions, P as PulumiPluginContext, f as PulumiPluginCreateStackInlineOptions, g as PulumiPluginCreateStackLocalOptions, e as PulumiPluginCreateStackOptions, d as PulumiPluginExistingStackOptions, a as PulumiPluginOptions, j as PulumiPluginResolvedConfig, h as PulumiPluginResolvedOptions, i as PulumiPluginUserConfig, _ as __ΩPulumiPluginBaseOptions, s as __ΩPulumiPluginContext, m as __ΩPulumiPluginCreateStackInlineOptions, n as __ΩPulumiPluginCreateStackLocalOptions, l as __ΩPulumiPluginCreateStackOptions, k as __ΩPulumiPluginExistingStackOptions, o as __ΩPulumiPluginOptions, r as __ΩPulumiPluginResolvedConfig, p as __ΩPulumiPluginResolvedOptions, q as __ΩPulumiPluginUserConfig } from '../index-DKi9kYZH.cjs';
|
|
2
2
|
import '@pulumi/pulumi/automation';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +15,6 @@ import 'semver';
|
|
|
15
15
|
import 'ts-morph';
|
|
16
16
|
import 'unplugin';
|
|
17
17
|
import '@stryke/fs/resolve';
|
|
18
|
-
import 'node:fs';
|
|
19
18
|
import '@stryke/types/tsconfig';
|
|
20
19
|
import 'typescript';
|
|
21
20
|
import '@stryke/types/array';
|