@powerlines/plugin-rollup 0.7.36 → 0.7.38
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/helpers/index.d.cts +4 -1
- package/dist/helpers/index.d.ts +4 -1
- package/dist/helpers/unplugin.d.cts +4 -1
- package/dist/helpers/unplugin.d.ts +4 -1
- package/dist/{index-DCbh8Ejq.d.cts → index-B8_17TWj.d.cts} +118 -39
- package/dist/{index-DCbh8Ejq.d.ts → index-B8_17TWj.d.ts} +118 -39
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/types/index.d.cts +4 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/plugin.d.cts +4 -1
- package/dist/types/plugin.d.ts +4 -1
- package/package.json +10 -10
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export { createRollupPlugin } from './unplugin.cjs';
|
|
2
2
|
import 'esbuild';
|
|
3
|
-
import '../index-
|
|
3
|
+
import '../index-B8_17TWj.cjs';
|
|
4
4
|
import 'rollup';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/base';
|
|
7
7
|
import '@stryke/types/package-json';
|
|
8
8
|
import 'jiti';
|
|
9
|
+
import 'magic-string';
|
|
9
10
|
import 'semver';
|
|
11
|
+
import 'ts-morph';
|
|
10
12
|
import 'unplugin';
|
|
11
13
|
import '@storm-software/build-tools/types';
|
|
12
14
|
import '@storm-software/config-tools/types';
|
|
@@ -14,6 +16,7 @@ import '@storm-software/config/types';
|
|
|
14
16
|
import '@stryke/types/configuration';
|
|
15
17
|
import '@stryke/types/file';
|
|
16
18
|
import 'vite';
|
|
19
|
+
import '@stryke/fs/resolve';
|
|
17
20
|
import 'node:fs';
|
|
18
21
|
import '@stryke/types/array';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export { createRollupPlugin } from './unplugin.js';
|
|
2
2
|
import 'esbuild';
|
|
3
|
-
import '../index-
|
|
3
|
+
import '../index-B8_17TWj.js';
|
|
4
4
|
import 'rollup';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/base';
|
|
7
7
|
import '@stryke/types/package-json';
|
|
8
8
|
import 'jiti';
|
|
9
|
+
import 'magic-string';
|
|
9
10
|
import 'semver';
|
|
11
|
+
import 'ts-morph';
|
|
10
12
|
import 'unplugin';
|
|
11
13
|
import '@storm-software/build-tools/types';
|
|
12
14
|
import '@storm-software/config-tools/types';
|
|
@@ -14,6 +16,7 @@ import '@storm-software/config/types';
|
|
|
14
16
|
import '@stryke/types/configuration';
|
|
15
17
|
import '@stryke/types/file';
|
|
16
18
|
import 'vite';
|
|
19
|
+
import '@stryke/fs/resolve';
|
|
17
20
|
import 'node:fs';
|
|
18
21
|
import '@stryke/types/array';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
|
-
import { R as RollupPluginContext } from '../index-
|
|
2
|
+
import { R as RollupPluginContext } from '../index-B8_17TWj.cjs';
|
|
3
3
|
import 'rollup';
|
|
4
4
|
import '@stryke/env/get-env-paths';
|
|
5
5
|
import '@stryke/types/base';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
|
+
import 'magic-string';
|
|
8
9
|
import 'semver';
|
|
10
|
+
import 'ts-morph';
|
|
9
11
|
import 'unplugin';
|
|
10
12
|
import '@storm-software/build-tools/types';
|
|
11
13
|
import '@storm-software/config-tools/types';
|
|
@@ -13,6 +15,7 @@ import '@storm-software/config/types';
|
|
|
13
15
|
import '@stryke/types/configuration';
|
|
14
16
|
import '@stryke/types/file';
|
|
15
17
|
import 'vite';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/array';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
|
-
import { R as RollupPluginContext } from '../index-
|
|
2
|
+
import { R as RollupPluginContext } from '../index-B8_17TWj.js';
|
|
3
3
|
import 'rollup';
|
|
4
4
|
import '@stryke/env/get-env-paths';
|
|
5
5
|
import '@stryke/types/base';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
|
+
import 'magic-string';
|
|
8
9
|
import 'semver';
|
|
10
|
+
import 'ts-morph';
|
|
9
11
|
import 'unplugin';
|
|
10
12
|
import '@storm-software/build-tools/types';
|
|
11
13
|
import '@storm-software/config-tools/types';
|
|
@@ -13,6 +15,7 @@ import '@storm-software/config/types';
|
|
|
13
15
|
import '@stryke/types/configuration';
|
|
14
16
|
import '@stryke/types/file';
|
|
15
17
|
import 'vite';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/array';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
|
@@ -3,15 +3,18 @@ import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
|
3
3
|
import { MaybePromise, NonUndefined, FunctionLike } from '@stryke/types/base';
|
|
4
4
|
import { PackageJson } from '@stryke/types/package-json';
|
|
5
5
|
import { Jiti } from 'jiti';
|
|
6
|
+
import { SourceMap } from 'magic-string';
|
|
6
7
|
import { Range } from 'semver';
|
|
7
|
-
import {
|
|
8
|
+
import { Project } from 'ts-morph';
|
|
9
|
+
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
8
10
|
import { Format } from '@storm-software/build-tools/types';
|
|
9
11
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
10
12
|
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
11
13
|
import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configuration';
|
|
12
14
|
import { AssetGlob } from '@stryke/types/file';
|
|
13
15
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
14
|
-
import {
|
|
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';
|
|
15
18
|
import { ArrayValues } from '@stryke/types/array';
|
|
16
19
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
17
20
|
import ts from 'typescript';
|
|
@@ -244,21 +247,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
|
244
247
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
245
248
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
246
249
|
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
247
|
-
interface
|
|
250
|
+
interface ResolveOptions extends ResolveOptions$1 {
|
|
248
251
|
/**
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
* If true, the module is being resolved as an entry point.
|
|
253
|
+
*/
|
|
254
|
+
isEntry?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* If true, the resolver will skip using the cache when resolving modules.
|
|
257
|
+
*/
|
|
258
|
+
skipCache?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* An array of external modules or patterns to exclude from resolution.
|
|
252
261
|
*/
|
|
253
|
-
|
|
262
|
+
external?: (string | RegExp)[];
|
|
254
263
|
/**
|
|
255
|
-
*
|
|
264
|
+
* An array of modules or patterns to include in the resolution, even if they are marked as external.
|
|
256
265
|
*/
|
|
257
|
-
|
|
266
|
+
noExternal?: (string | RegExp)[];
|
|
258
267
|
/**
|
|
259
|
-
*
|
|
268
|
+
* An array of patterns to match when resolving modules.
|
|
260
269
|
*/
|
|
261
|
-
|
|
270
|
+
skipNodeModulesBundle?: boolean;
|
|
262
271
|
}
|
|
263
272
|
interface VirtualFileSystemInterface {
|
|
264
273
|
/**
|
|
@@ -272,27 +281,33 @@ interface VirtualFileSystemInterface {
|
|
|
272
281
|
/**
|
|
273
282
|
* The underlying file metadata.
|
|
274
283
|
*/
|
|
275
|
-
metadata: Record<string, VirtualFileMetadata
|
|
284
|
+
metadata: Readonly<Record<string, VirtualFileMetadata>>;
|
|
285
|
+
/**
|
|
286
|
+
* A map of file paths to their module ids.
|
|
287
|
+
*/
|
|
288
|
+
ids: Readonly<Record<string, string>>;
|
|
276
289
|
/**
|
|
277
290
|
* A map of module ids to their file paths.
|
|
278
291
|
*/
|
|
279
|
-
|
|
292
|
+
paths: Readonly<Record<string, string>>;
|
|
280
293
|
/**
|
|
281
294
|
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
282
295
|
*
|
|
283
296
|
* @param pathOrId - The path or id to check.
|
|
297
|
+
* @param importer - The importer path, if any.
|
|
284
298
|
* @param options - Optional parameters for resolving the path.
|
|
285
299
|
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
286
300
|
*/
|
|
287
|
-
isVirtual: (pathOrId: string, options?:
|
|
301
|
+
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
288
302
|
/**
|
|
289
303
|
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
290
304
|
*
|
|
291
305
|
* @param pathOrId - The path or id to check.
|
|
306
|
+
* @param importer - The importer path, if any.
|
|
292
307
|
* @param options - Optional parameters for resolving the path.
|
|
293
308
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
294
309
|
*/
|
|
295
|
-
isPhysical: (pathOrId: string, options?:
|
|
310
|
+
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
296
311
|
/**
|
|
297
312
|
* Checks if a file exists in the virtual file system (VFS).
|
|
298
313
|
*
|
|
@@ -320,7 +335,7 @@ interface VirtualFileSystemInterface {
|
|
|
320
335
|
* @param pathOrId - The path or id of the file.
|
|
321
336
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
322
337
|
*/
|
|
323
|
-
getMetadata: (pathOrId:
|
|
338
|
+
getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
|
|
324
339
|
/**
|
|
325
340
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
326
341
|
*
|
|
@@ -393,7 +408,7 @@ interface VirtualFileSystemInterface {
|
|
|
393
408
|
* @param path - The path to the file to remove.
|
|
394
409
|
* @returns A promise that resolves when the file is removed.
|
|
395
410
|
*/
|
|
396
|
-
unlinkSync: (path:
|
|
411
|
+
unlinkSync: (path: string, options?: ResolveFSOptions) => void;
|
|
397
412
|
/**
|
|
398
413
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
399
414
|
*
|
|
@@ -407,7 +422,7 @@ interface VirtualFileSystemInterface {
|
|
|
407
422
|
* @param path - The path to create the directory at.
|
|
408
423
|
* @param options - Options for creating the directory.
|
|
409
424
|
*/
|
|
410
|
-
rmdirSync: (path:
|
|
425
|
+
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
411
426
|
/**
|
|
412
427
|
* Removes a directory in the virtual file system (VFS).
|
|
413
428
|
*
|
|
@@ -415,7 +430,7 @@ interface VirtualFileSystemInterface {
|
|
|
415
430
|
* @param options - Options for creating the directory.
|
|
416
431
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
417
432
|
*/
|
|
418
|
-
rmdir: (path:
|
|
433
|
+
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
419
434
|
/**
|
|
420
435
|
* Removes a file or directory in the virtual file system (VFS).
|
|
421
436
|
*
|
|
@@ -423,14 +438,14 @@ interface VirtualFileSystemInterface {
|
|
|
423
438
|
* @param options - Options for removing the file or directory.
|
|
424
439
|
* @returns A promise that resolves when the file or directory is removed.
|
|
425
440
|
*/
|
|
426
|
-
rm: (path:
|
|
441
|
+
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
427
442
|
/**
|
|
428
443
|
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
429
444
|
*
|
|
430
445
|
* @param path - The path to the file or directory to remove.
|
|
431
446
|
* @param options - Options for removing the file or directory.
|
|
432
447
|
*/
|
|
433
|
-
rmSync: (path:
|
|
448
|
+
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
434
449
|
/**
|
|
435
450
|
* Creates a directory in the virtual file system (VFS).
|
|
436
451
|
*
|
|
@@ -438,7 +453,7 @@ interface VirtualFileSystemInterface {
|
|
|
438
453
|
* @param options - Options for creating the directory.
|
|
439
454
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
440
455
|
*/
|
|
441
|
-
mkdirSync: (path:
|
|
456
|
+
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
442
457
|
/**
|
|
443
458
|
* Creates a directory in the virtual file system (VFS).
|
|
444
459
|
*
|
|
@@ -446,7 +461,7 @@ interface VirtualFileSystemInterface {
|
|
|
446
461
|
* @param options - Options for creating the directory.
|
|
447
462
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
448
463
|
*/
|
|
449
|
-
mkdir: (path:
|
|
464
|
+
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
450
465
|
/**
|
|
451
466
|
* Reads a file from the virtual file system (VFS).
|
|
452
467
|
*
|
|
@@ -468,7 +483,7 @@ interface VirtualFileSystemInterface {
|
|
|
468
483
|
* @param options - Optional parameters for writing the file.
|
|
469
484
|
* @returns A promise that resolves when the file is written.
|
|
470
485
|
*/
|
|
471
|
-
writeFile: (path:
|
|
486
|
+
writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
|
|
472
487
|
/**
|
|
473
488
|
* Writes a file to the virtual file system (VFS).
|
|
474
489
|
*
|
|
@@ -476,7 +491,7 @@ interface VirtualFileSystemInterface {
|
|
|
476
491
|
* @param data - The contents of the file.
|
|
477
492
|
* @param options - Optional parameters for writing the file.
|
|
478
493
|
*/
|
|
479
|
-
writeFileSync: (path:
|
|
494
|
+
writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
|
|
480
495
|
/**
|
|
481
496
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
482
497
|
*
|
|
@@ -523,24 +538,43 @@ interface VirtualFileSystemInterface {
|
|
|
523
538
|
* Resolves a path or id to a file path in the virtual file system.
|
|
524
539
|
*
|
|
525
540
|
* @param pathOrId - The path or id of the file to resolve.
|
|
526
|
-
* @param options - Optional parameters for resolving the path.
|
|
527
541
|
* @returns The resolved path of the file if it exists, otherwise false.
|
|
528
542
|
*/
|
|
529
|
-
|
|
543
|
+
realpathSync: (pathOrId: string) => string;
|
|
530
544
|
/**
|
|
531
|
-
*
|
|
545
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
532
546
|
*
|
|
533
|
-
* @
|
|
534
|
-
*
|
|
547
|
+
* @remarks
|
|
548
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* ```ts
|
|
552
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
553
|
+
* ```
|
|
554
|
+
*
|
|
555
|
+
* @param id - The module to resolve.
|
|
556
|
+
* @param importer - An optional path to the importer module.
|
|
557
|
+
* @param options - Additional resolution options.
|
|
558
|
+
* @returns A promise that resolves to the resolved module path.
|
|
535
559
|
*/
|
|
536
|
-
|
|
560
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
|
|
537
561
|
/**
|
|
538
|
-
*
|
|
562
|
+
* A synchronous helper function to resolve modules using the Jiti resolver
|
|
539
563
|
*
|
|
540
|
-
* @
|
|
541
|
-
*
|
|
564
|
+
* @remarks
|
|
565
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* ```ts
|
|
569
|
+
* const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
|
|
570
|
+
* ```
|
|
571
|
+
*
|
|
572
|
+
* @param id - The module to resolve.
|
|
573
|
+
* @param importer - An optional path to the importer module.
|
|
574
|
+
* @param options - Additional resolution options.
|
|
575
|
+
* @returns The resolved module path.
|
|
542
576
|
*/
|
|
543
|
-
|
|
577
|
+
resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
|
|
544
578
|
/**
|
|
545
579
|
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
546
580
|
*/
|
|
@@ -1014,6 +1048,10 @@ interface MetaInfo {
|
|
|
1014
1048
|
interface Resolver extends Jiti {
|
|
1015
1049
|
plugin: Jiti;
|
|
1016
1050
|
}
|
|
1051
|
+
interface TransformResult {
|
|
1052
|
+
code: string;
|
|
1053
|
+
map: SourceMap | null;
|
|
1054
|
+
}
|
|
1017
1055
|
interface InitContextOptions {
|
|
1018
1056
|
/**
|
|
1019
1057
|
* If false, the plugin will be loaded after all other plugins.
|
|
@@ -1148,6 +1186,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1148
1186
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
1149
1187
|
*/
|
|
1150
1188
|
builtins: string[];
|
|
1189
|
+
/**
|
|
1190
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
1191
|
+
*
|
|
1192
|
+
* @see https://ts-morph.com/
|
|
1193
|
+
*
|
|
1194
|
+
* @remarks
|
|
1195
|
+
* This instance is created lazily on first access.
|
|
1196
|
+
*/
|
|
1197
|
+
program: Project;
|
|
1198
|
+
/**
|
|
1199
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
1200
|
+
*
|
|
1201
|
+
* @remarks
|
|
1202
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
1203
|
+
*
|
|
1204
|
+
* @example
|
|
1205
|
+
* ```ts
|
|
1206
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
1207
|
+
* ```
|
|
1208
|
+
*
|
|
1209
|
+
* @param id - The module to resolve.
|
|
1210
|
+
* @param importer - An optional path to the importer module.
|
|
1211
|
+
* @param options - Additional resolution options.
|
|
1212
|
+
* @returns A promise that resolves to the resolved module path.
|
|
1213
|
+
*/
|
|
1214
|
+
resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1215
|
+
/**
|
|
1216
|
+
* A helper function to load modules using the Jiti resolver
|
|
1217
|
+
*
|
|
1218
|
+
* @remarks
|
|
1219
|
+
* This function can be used to load modules relative to the project root directory.
|
|
1220
|
+
*
|
|
1221
|
+
* @example
|
|
1222
|
+
* ```ts
|
|
1223
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
1224
|
+
* ```
|
|
1225
|
+
*
|
|
1226
|
+
* @param id - The module to load.
|
|
1227
|
+
* @returns A promise that resolves to the loaded module.
|
|
1228
|
+
*/
|
|
1229
|
+
load: (id: string) => Promise<TransformResult | undefined>;
|
|
1151
1230
|
/**
|
|
1152
1231
|
* The Powerlines builtin virtual files
|
|
1153
1232
|
*/
|
|
@@ -1317,7 +1396,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1317
1396
|
* @param id - The identifier of the source code.
|
|
1318
1397
|
* @returns A promise that resolves when the hook is complete.
|
|
1319
1398
|
*/
|
|
1320
|
-
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
|
|
1399
|
+
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
|
|
1321
1400
|
/**
|
|
1322
1401
|
* A hook that is called to load the source code.
|
|
1323
1402
|
*
|
|
@@ -1325,7 +1404,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1325
1404
|
* @param id - The identifier of the source code.
|
|
1326
1405
|
* @returns A promise that resolves when the hook is complete.
|
|
1327
1406
|
*/
|
|
1328
|
-
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
|
|
1407
|
+
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
|
|
1329
1408
|
/**
|
|
1330
1409
|
* A hook that is called to resolve the identifier of the source code.
|
|
1331
1410
|
*
|
|
@@ -1375,7 +1454,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1375
1454
|
* @param id - The identifier of the source code.
|
|
1376
1455
|
* @returns A promise that resolves when the hook is complete.
|
|
1377
1456
|
*/
|
|
1378
|
-
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
|
|
1457
|
+
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
|
|
1379
1458
|
/**
|
|
1380
1459
|
* A hook that is called to load the source code.
|
|
1381
1460
|
*
|
|
@@ -1383,7 +1462,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1383
1462
|
* @param id - The identifier of the source code.
|
|
1384
1463
|
* @returns A promise that resolves when the hook is complete.
|
|
1385
1464
|
*/
|
|
1386
|
-
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
|
|
1465
|
+
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
|
|
1387
1466
|
/**
|
|
1388
1467
|
* A hook that is called to resolve the identifier of the source code.
|
|
1389
1468
|
*
|
|
@@ -3,15 +3,18 @@ import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
|
3
3
|
import { MaybePromise, NonUndefined, FunctionLike } from '@stryke/types/base';
|
|
4
4
|
import { PackageJson } from '@stryke/types/package-json';
|
|
5
5
|
import { Jiti } from 'jiti';
|
|
6
|
+
import { SourceMap } from 'magic-string';
|
|
6
7
|
import { Range } from 'semver';
|
|
7
|
-
import {
|
|
8
|
+
import { Project } from 'ts-morph';
|
|
9
|
+
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
8
10
|
import { Format } from '@storm-software/build-tools/types';
|
|
9
11
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
10
12
|
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
11
13
|
import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configuration';
|
|
12
14
|
import { AssetGlob } from '@stryke/types/file';
|
|
13
15
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
14
|
-
import {
|
|
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';
|
|
15
18
|
import { ArrayValues } from '@stryke/types/array';
|
|
16
19
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
17
20
|
import ts from 'typescript';
|
|
@@ -244,21 +247,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
|
244
247
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
245
248
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
246
249
|
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
247
|
-
interface
|
|
250
|
+
interface ResolveOptions extends ResolveOptions$1 {
|
|
248
251
|
/**
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
* If true, the module is being resolved as an entry point.
|
|
253
|
+
*/
|
|
254
|
+
isEntry?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* If true, the resolver will skip using the cache when resolving modules.
|
|
257
|
+
*/
|
|
258
|
+
skipCache?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* An array of external modules or patterns to exclude from resolution.
|
|
252
261
|
*/
|
|
253
|
-
|
|
262
|
+
external?: (string | RegExp)[];
|
|
254
263
|
/**
|
|
255
|
-
*
|
|
264
|
+
* An array of modules or patterns to include in the resolution, even if they are marked as external.
|
|
256
265
|
*/
|
|
257
|
-
|
|
266
|
+
noExternal?: (string | RegExp)[];
|
|
258
267
|
/**
|
|
259
|
-
*
|
|
268
|
+
* An array of patterns to match when resolving modules.
|
|
260
269
|
*/
|
|
261
|
-
|
|
270
|
+
skipNodeModulesBundle?: boolean;
|
|
262
271
|
}
|
|
263
272
|
interface VirtualFileSystemInterface {
|
|
264
273
|
/**
|
|
@@ -272,27 +281,33 @@ interface VirtualFileSystemInterface {
|
|
|
272
281
|
/**
|
|
273
282
|
* The underlying file metadata.
|
|
274
283
|
*/
|
|
275
|
-
metadata: Record<string, VirtualFileMetadata
|
|
284
|
+
metadata: Readonly<Record<string, VirtualFileMetadata>>;
|
|
285
|
+
/**
|
|
286
|
+
* A map of file paths to their module ids.
|
|
287
|
+
*/
|
|
288
|
+
ids: Readonly<Record<string, string>>;
|
|
276
289
|
/**
|
|
277
290
|
* A map of module ids to their file paths.
|
|
278
291
|
*/
|
|
279
|
-
|
|
292
|
+
paths: Readonly<Record<string, string>>;
|
|
280
293
|
/**
|
|
281
294
|
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
282
295
|
*
|
|
283
296
|
* @param pathOrId - The path or id to check.
|
|
297
|
+
* @param importer - The importer path, if any.
|
|
284
298
|
* @param options - Optional parameters for resolving the path.
|
|
285
299
|
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
286
300
|
*/
|
|
287
|
-
isVirtual: (pathOrId: string, options?:
|
|
301
|
+
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
288
302
|
/**
|
|
289
303
|
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
290
304
|
*
|
|
291
305
|
* @param pathOrId - The path or id to check.
|
|
306
|
+
* @param importer - The importer path, if any.
|
|
292
307
|
* @param options - Optional parameters for resolving the path.
|
|
293
308
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
294
309
|
*/
|
|
295
|
-
isPhysical: (pathOrId: string, options?:
|
|
310
|
+
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
296
311
|
/**
|
|
297
312
|
* Checks if a file exists in the virtual file system (VFS).
|
|
298
313
|
*
|
|
@@ -320,7 +335,7 @@ interface VirtualFileSystemInterface {
|
|
|
320
335
|
* @param pathOrId - The path or id of the file.
|
|
321
336
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
322
337
|
*/
|
|
323
|
-
getMetadata: (pathOrId:
|
|
338
|
+
getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
|
|
324
339
|
/**
|
|
325
340
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
326
341
|
*
|
|
@@ -393,7 +408,7 @@ interface VirtualFileSystemInterface {
|
|
|
393
408
|
* @param path - The path to the file to remove.
|
|
394
409
|
* @returns A promise that resolves when the file is removed.
|
|
395
410
|
*/
|
|
396
|
-
unlinkSync: (path:
|
|
411
|
+
unlinkSync: (path: string, options?: ResolveFSOptions) => void;
|
|
397
412
|
/**
|
|
398
413
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
399
414
|
*
|
|
@@ -407,7 +422,7 @@ interface VirtualFileSystemInterface {
|
|
|
407
422
|
* @param path - The path to create the directory at.
|
|
408
423
|
* @param options - Options for creating the directory.
|
|
409
424
|
*/
|
|
410
|
-
rmdirSync: (path:
|
|
425
|
+
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
411
426
|
/**
|
|
412
427
|
* Removes a directory in the virtual file system (VFS).
|
|
413
428
|
*
|
|
@@ -415,7 +430,7 @@ interface VirtualFileSystemInterface {
|
|
|
415
430
|
* @param options - Options for creating the directory.
|
|
416
431
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
417
432
|
*/
|
|
418
|
-
rmdir: (path:
|
|
433
|
+
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
419
434
|
/**
|
|
420
435
|
* Removes a file or directory in the virtual file system (VFS).
|
|
421
436
|
*
|
|
@@ -423,14 +438,14 @@ interface VirtualFileSystemInterface {
|
|
|
423
438
|
* @param options - Options for removing the file or directory.
|
|
424
439
|
* @returns A promise that resolves when the file or directory is removed.
|
|
425
440
|
*/
|
|
426
|
-
rm: (path:
|
|
441
|
+
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
427
442
|
/**
|
|
428
443
|
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
429
444
|
*
|
|
430
445
|
* @param path - The path to the file or directory to remove.
|
|
431
446
|
* @param options - Options for removing the file or directory.
|
|
432
447
|
*/
|
|
433
|
-
rmSync: (path:
|
|
448
|
+
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
434
449
|
/**
|
|
435
450
|
* Creates a directory in the virtual file system (VFS).
|
|
436
451
|
*
|
|
@@ -438,7 +453,7 @@ interface VirtualFileSystemInterface {
|
|
|
438
453
|
* @param options - Options for creating the directory.
|
|
439
454
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
440
455
|
*/
|
|
441
|
-
mkdirSync: (path:
|
|
456
|
+
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
442
457
|
/**
|
|
443
458
|
* Creates a directory in the virtual file system (VFS).
|
|
444
459
|
*
|
|
@@ -446,7 +461,7 @@ interface VirtualFileSystemInterface {
|
|
|
446
461
|
* @param options - Options for creating the directory.
|
|
447
462
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
448
463
|
*/
|
|
449
|
-
mkdir: (path:
|
|
464
|
+
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
450
465
|
/**
|
|
451
466
|
* Reads a file from the virtual file system (VFS).
|
|
452
467
|
*
|
|
@@ -468,7 +483,7 @@ interface VirtualFileSystemInterface {
|
|
|
468
483
|
* @param options - Optional parameters for writing the file.
|
|
469
484
|
* @returns A promise that resolves when the file is written.
|
|
470
485
|
*/
|
|
471
|
-
writeFile: (path:
|
|
486
|
+
writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
|
|
472
487
|
/**
|
|
473
488
|
* Writes a file to the virtual file system (VFS).
|
|
474
489
|
*
|
|
@@ -476,7 +491,7 @@ interface VirtualFileSystemInterface {
|
|
|
476
491
|
* @param data - The contents of the file.
|
|
477
492
|
* @param options - Optional parameters for writing the file.
|
|
478
493
|
*/
|
|
479
|
-
writeFileSync: (path:
|
|
494
|
+
writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
|
|
480
495
|
/**
|
|
481
496
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
482
497
|
*
|
|
@@ -523,24 +538,43 @@ interface VirtualFileSystemInterface {
|
|
|
523
538
|
* Resolves a path or id to a file path in the virtual file system.
|
|
524
539
|
*
|
|
525
540
|
* @param pathOrId - The path or id of the file to resolve.
|
|
526
|
-
* @param options - Optional parameters for resolving the path.
|
|
527
541
|
* @returns The resolved path of the file if it exists, otherwise false.
|
|
528
542
|
*/
|
|
529
|
-
|
|
543
|
+
realpathSync: (pathOrId: string) => string;
|
|
530
544
|
/**
|
|
531
|
-
*
|
|
545
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
532
546
|
*
|
|
533
|
-
* @
|
|
534
|
-
*
|
|
547
|
+
* @remarks
|
|
548
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* ```ts
|
|
552
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
553
|
+
* ```
|
|
554
|
+
*
|
|
555
|
+
* @param id - The module to resolve.
|
|
556
|
+
* @param importer - An optional path to the importer module.
|
|
557
|
+
* @param options - Additional resolution options.
|
|
558
|
+
* @returns A promise that resolves to the resolved module path.
|
|
535
559
|
*/
|
|
536
|
-
|
|
560
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
|
|
537
561
|
/**
|
|
538
|
-
*
|
|
562
|
+
* A synchronous helper function to resolve modules using the Jiti resolver
|
|
539
563
|
*
|
|
540
|
-
* @
|
|
541
|
-
*
|
|
564
|
+
* @remarks
|
|
565
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* ```ts
|
|
569
|
+
* const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
|
|
570
|
+
* ```
|
|
571
|
+
*
|
|
572
|
+
* @param id - The module to resolve.
|
|
573
|
+
* @param importer - An optional path to the importer module.
|
|
574
|
+
* @param options - Additional resolution options.
|
|
575
|
+
* @returns The resolved module path.
|
|
542
576
|
*/
|
|
543
|
-
|
|
577
|
+
resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
|
|
544
578
|
/**
|
|
545
579
|
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
546
580
|
*/
|
|
@@ -1014,6 +1048,10 @@ interface MetaInfo {
|
|
|
1014
1048
|
interface Resolver extends Jiti {
|
|
1015
1049
|
plugin: Jiti;
|
|
1016
1050
|
}
|
|
1051
|
+
interface TransformResult {
|
|
1052
|
+
code: string;
|
|
1053
|
+
map: SourceMap | null;
|
|
1054
|
+
}
|
|
1017
1055
|
interface InitContextOptions {
|
|
1018
1056
|
/**
|
|
1019
1057
|
* If false, the plugin will be loaded after all other plugins.
|
|
@@ -1148,6 +1186,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1148
1186
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
1149
1187
|
*/
|
|
1150
1188
|
builtins: string[];
|
|
1189
|
+
/**
|
|
1190
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
1191
|
+
*
|
|
1192
|
+
* @see https://ts-morph.com/
|
|
1193
|
+
*
|
|
1194
|
+
* @remarks
|
|
1195
|
+
* This instance is created lazily on first access.
|
|
1196
|
+
*/
|
|
1197
|
+
program: Project;
|
|
1198
|
+
/**
|
|
1199
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
1200
|
+
*
|
|
1201
|
+
* @remarks
|
|
1202
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
1203
|
+
*
|
|
1204
|
+
* @example
|
|
1205
|
+
* ```ts
|
|
1206
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
1207
|
+
* ```
|
|
1208
|
+
*
|
|
1209
|
+
* @param id - The module to resolve.
|
|
1210
|
+
* @param importer - An optional path to the importer module.
|
|
1211
|
+
* @param options - Additional resolution options.
|
|
1212
|
+
* @returns A promise that resolves to the resolved module path.
|
|
1213
|
+
*/
|
|
1214
|
+
resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1215
|
+
/**
|
|
1216
|
+
* A helper function to load modules using the Jiti resolver
|
|
1217
|
+
*
|
|
1218
|
+
* @remarks
|
|
1219
|
+
* This function can be used to load modules relative to the project root directory.
|
|
1220
|
+
*
|
|
1221
|
+
* @example
|
|
1222
|
+
* ```ts
|
|
1223
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
1224
|
+
* ```
|
|
1225
|
+
*
|
|
1226
|
+
* @param id - The module to load.
|
|
1227
|
+
* @returns A promise that resolves to the loaded module.
|
|
1228
|
+
*/
|
|
1229
|
+
load: (id: string) => Promise<TransformResult | undefined>;
|
|
1151
1230
|
/**
|
|
1152
1231
|
* The Powerlines builtin virtual files
|
|
1153
1232
|
*/
|
|
@@ -1317,7 +1396,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1317
1396
|
* @param id - The identifier of the source code.
|
|
1318
1397
|
* @returns A promise that resolves when the hook is complete.
|
|
1319
1398
|
*/
|
|
1320
|
-
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
|
|
1399
|
+
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
|
|
1321
1400
|
/**
|
|
1322
1401
|
* A hook that is called to load the source code.
|
|
1323
1402
|
*
|
|
@@ -1325,7 +1404,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1325
1404
|
* @param id - The identifier of the source code.
|
|
1326
1405
|
* @returns A promise that resolves when the hook is complete.
|
|
1327
1406
|
*/
|
|
1328
|
-
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
|
|
1407
|
+
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
|
|
1329
1408
|
/**
|
|
1330
1409
|
* A hook that is called to resolve the identifier of the source code.
|
|
1331
1410
|
*
|
|
@@ -1375,7 +1454,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1375
1454
|
* @param id - The identifier of the source code.
|
|
1376
1455
|
* @returns A promise that resolves when the hook is complete.
|
|
1377
1456
|
*/
|
|
1378
|
-
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
|
|
1457
|
+
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
|
|
1379
1458
|
/**
|
|
1380
1459
|
* A hook that is called to load the source code.
|
|
1381
1460
|
*
|
|
@@ -1383,7 +1462,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1383
1462
|
* @param id - The identifier of the source code.
|
|
1384
1463
|
* @returns A promise that resolves when the hook is complete.
|
|
1385
1464
|
*/
|
|
1386
|
-
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
|
|
1465
|
+
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
|
|
1387
1466
|
/**
|
|
1388
1467
|
* A hook that is called to resolve the identifier of the source code.
|
|
1389
1468
|
*
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-
|
|
2
|
-
export { b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from './index-
|
|
1
|
+
import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-B8_17TWj.cjs';
|
|
2
|
+
export { b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from './index-B8_17TWj.cjs';
|
|
3
3
|
export { createRollupPlugin } from './helpers/unplugin.cjs';
|
|
4
4
|
import 'rollup';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/base';
|
|
7
7
|
import '@stryke/types/package-json';
|
|
8
8
|
import 'jiti';
|
|
9
|
+
import 'magic-string';
|
|
9
10
|
import 'semver';
|
|
11
|
+
import 'ts-morph';
|
|
10
12
|
import 'unplugin';
|
|
11
13
|
import '@storm-software/build-tools/types';
|
|
12
14
|
import '@storm-software/config-tools/types';
|
|
@@ -14,6 +16,7 @@ import '@storm-software/config/types';
|
|
|
14
16
|
import '@stryke/types/configuration';
|
|
15
17
|
import '@stryke/types/file';
|
|
16
18
|
import 'vite';
|
|
19
|
+
import '@stryke/fs/resolve';
|
|
17
20
|
import 'node:fs';
|
|
18
21
|
import '@stryke/types/array';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-
|
|
2
|
-
export { b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from './index-
|
|
1
|
+
import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-B8_17TWj.js';
|
|
2
|
+
export { b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from './index-B8_17TWj.js';
|
|
3
3
|
export { createRollupPlugin } from './helpers/unplugin.js';
|
|
4
4
|
import 'rollup';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/base';
|
|
7
7
|
import '@stryke/types/package-json';
|
|
8
8
|
import 'jiti';
|
|
9
|
+
import 'magic-string';
|
|
9
10
|
import 'semver';
|
|
11
|
+
import 'ts-morph';
|
|
10
12
|
import 'unplugin';
|
|
11
13
|
import '@storm-software/build-tools/types';
|
|
12
14
|
import '@storm-software/config-tools/types';
|
|
@@ -14,6 +16,7 @@ import '@storm-software/config/types';
|
|
|
14
16
|
import '@stryke/types/configuration';
|
|
15
17
|
import '@stryke/types/file';
|
|
16
18
|
import 'vite';
|
|
19
|
+
import '@stryke/fs/resolve';
|
|
17
20
|
import 'node:fs';
|
|
18
21
|
import '@stryke/types/array';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-
|
|
1
|
+
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-B8_17TWj.cjs';
|
|
2
2
|
import 'rollup';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/package-json';
|
|
6
6
|
import 'jiti';
|
|
7
|
+
import 'magic-string';
|
|
7
8
|
import 'semver';
|
|
9
|
+
import 'ts-morph';
|
|
8
10
|
import 'unplugin';
|
|
9
11
|
import '@storm-software/build-tools/types';
|
|
10
12
|
import '@storm-software/config-tools/types';
|
|
@@ -12,6 +14,7 @@ import '@storm-software/config/types';
|
|
|
12
14
|
import '@stryke/types/configuration';
|
|
13
15
|
import '@stryke/types/file';
|
|
14
16
|
import 'vite';
|
|
17
|
+
import '@stryke/fs/resolve';
|
|
15
18
|
import 'node:fs';
|
|
16
19
|
import '@stryke/types/array';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-
|
|
1
|
+
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-B8_17TWj.js';
|
|
2
2
|
import 'rollup';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/package-json';
|
|
6
6
|
import 'jiti';
|
|
7
|
+
import 'magic-string';
|
|
7
8
|
import 'semver';
|
|
9
|
+
import 'ts-morph';
|
|
8
10
|
import 'unplugin';
|
|
9
11
|
import '@storm-software/build-tools/types';
|
|
10
12
|
import '@storm-software/config-tools/types';
|
|
@@ -12,6 +14,7 @@ import '@storm-software/config/types';
|
|
|
12
14
|
import '@stryke/types/configuration';
|
|
13
15
|
import '@stryke/types/file';
|
|
14
16
|
import 'vite';
|
|
17
|
+
import '@stryke/fs/resolve';
|
|
15
18
|
import 'node:fs';
|
|
16
19
|
import '@stryke/types/array';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-
|
|
1
|
+
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-B8_17TWj.cjs';
|
|
2
2
|
import 'rollup';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/package-json';
|
|
6
6
|
import 'jiti';
|
|
7
|
+
import 'magic-string';
|
|
7
8
|
import 'semver';
|
|
9
|
+
import 'ts-morph';
|
|
8
10
|
import 'unplugin';
|
|
9
11
|
import '@storm-software/build-tools/types';
|
|
10
12
|
import '@storm-software/config-tools/types';
|
|
@@ -12,6 +14,7 @@ import '@storm-software/config/types';
|
|
|
12
14
|
import '@stryke/types/configuration';
|
|
13
15
|
import '@stryke/types/file';
|
|
14
16
|
import 'vite';
|
|
17
|
+
import '@stryke/fs/resolve';
|
|
15
18
|
import 'node:fs';
|
|
16
19
|
import '@stryke/types/array';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-
|
|
1
|
+
export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig, d as __ΩRollupPluginContext, _ as __ΩRollupPluginOptions, c as __ΩRollupPluginResolvedConfig } from '../index-B8_17TWj.js';
|
|
2
2
|
import 'rollup';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/package-json';
|
|
6
6
|
import 'jiti';
|
|
7
|
+
import 'magic-string';
|
|
7
8
|
import 'semver';
|
|
9
|
+
import 'ts-morph';
|
|
8
10
|
import 'unplugin';
|
|
9
11
|
import '@storm-software/build-tools/types';
|
|
10
12
|
import '@storm-software/config-tools/types';
|
|
@@ -12,6 +14,7 @@ import '@storm-software/config/types';
|
|
|
12
14
|
import '@stryke/types/configuration';
|
|
13
15
|
import '@stryke/types/file';
|
|
14
16
|
import 'vite';
|
|
17
|
+
import '@stryke/fs/resolve';
|
|
15
18
|
import 'node:fs';
|
|
16
19
|
import '@stryke/types/array';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-rollup",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -127,22 +127,22 @@
|
|
|
127
127
|
"files": ["dist/**/*"],
|
|
128
128
|
"keywords": ["rollup", "powerlines", "storm-software", "powerlines-plugin"],
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@stryke/convert": "^0.6.
|
|
131
|
-
"@stryke/fs": "^0.
|
|
132
|
-
"@stryke/path": "^0.
|
|
133
|
-
"@stryke/type-checks": "^0.3.
|
|
134
|
-
"@stryke/types": "^0.10.
|
|
130
|
+
"@stryke/convert": "^0.6.5",
|
|
131
|
+
"@stryke/fs": "^0.33.0",
|
|
132
|
+
"@stryke/path": "^0.20.0",
|
|
133
|
+
"@stryke/type-checks": "^0.3.15",
|
|
134
|
+
"@stryke/types": "^0.10.5",
|
|
135
135
|
"defu": "^6.1.4",
|
|
136
136
|
"jiti": "^2.6.1",
|
|
137
|
-
"powerlines": "^0.
|
|
137
|
+
"powerlines": "^0.24.1",
|
|
138
138
|
"rollup": "^4.53.3",
|
|
139
139
|
"unplugin": "^2.3.10"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@powerlines/nx": "^0.10.
|
|
143
|
-
"@powerlines/plugin-plugin": "^0.11.
|
|
142
|
+
"@powerlines/nx": "^0.10.29",
|
|
143
|
+
"@powerlines/plugin-plugin": "^0.11.37",
|
|
144
144
|
"@types/node": "^24.10.1"
|
|
145
145
|
},
|
|
146
146
|
"publishConfig": { "access": "public" },
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "424d900c34fbbdf943895648419a6467d8eb4a8d"
|
|
148
148
|
}
|