@powerlines/plugin-tsc 0.2.35 → 0.2.37
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/type-check.d.cts +4 -1
- package/dist/helpers/type-check.d.ts +4 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/{plugin-Ds-xu1R1.d.cts → plugin-ya8wkjpy.d.cts} +118 -39
- package/dist/{plugin-Ds-xu1R1.d.ts → plugin-ya8wkjpy.d.ts} +118 -39
- 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 +4 -4
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { typeCheck } from './type-check.cjs';
|
|
2
|
-
import '../plugin-
|
|
2
|
+
import '../plugin-ya8wkjpy.cjs';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import 'unplugin';
|
|
5
5
|
import '@stryke/types/array';
|
|
@@ -12,7 +12,10 @@ import 'vite';
|
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
13
|
import '@stryke/types/package-json';
|
|
14
14
|
import 'jiti';
|
|
15
|
+
import 'magic-string';
|
|
15
16
|
import 'semver';
|
|
17
|
+
import 'ts-morph';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
18
21
|
import 'typescript';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { typeCheck } from './type-check.js';
|
|
2
|
-
import '../plugin-
|
|
2
|
+
import '../plugin-ya8wkjpy.js';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import 'unplugin';
|
|
5
5
|
import '@stryke/types/array';
|
|
@@ -12,7 +12,10 @@ import 'vite';
|
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
13
|
import '@stryke/types/package-json';
|
|
14
14
|
import 'jiti';
|
|
15
|
+
import 'magic-string';
|
|
15
16
|
import 'semver';
|
|
17
|
+
import 'ts-morph';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
18
21
|
import 'typescript';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Context } from '../plugin-
|
|
1
|
+
import { C as Context } from '../plugin-ya8wkjpy.cjs';
|
|
2
2
|
import '@stryke/types/base';
|
|
3
3
|
import 'unplugin';
|
|
4
4
|
import '@stryke/types/array';
|
|
@@ -11,7 +11,10 @@ import 'vite';
|
|
|
11
11
|
import '@stryke/env/get-env-paths';
|
|
12
12
|
import '@stryke/types/package-json';
|
|
13
13
|
import 'jiti';
|
|
14
|
+
import 'magic-string';
|
|
14
15
|
import 'semver';
|
|
16
|
+
import 'ts-morph';
|
|
17
|
+
import '@stryke/fs/resolve';
|
|
15
18
|
import 'node:fs';
|
|
16
19
|
import '@stryke/types/tsconfig';
|
|
17
20
|
import 'typescript';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Context } from '../plugin-
|
|
1
|
+
import { C as Context } from '../plugin-ya8wkjpy.js';
|
|
2
2
|
import '@stryke/types/base';
|
|
3
3
|
import 'unplugin';
|
|
4
4
|
import '@stryke/types/array';
|
|
@@ -11,7 +11,10 @@ import 'vite';
|
|
|
11
11
|
import '@stryke/env/get-env-paths';
|
|
12
12
|
import '@stryke/types/package-json';
|
|
13
13
|
import 'jiti';
|
|
14
|
+
import 'magic-string';
|
|
14
15
|
import 'semver';
|
|
16
|
+
import 'ts-morph';
|
|
17
|
+
import '@stryke/fs/resolve';
|
|
15
18
|
import 'node:fs';
|
|
16
19
|
import '@stryke/types/tsconfig';
|
|
17
20
|
import 'typescript';
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Plugin } from './plugin-
|
|
1
|
+
import { P as Plugin } from './plugin-ya8wkjpy.cjs';
|
|
2
2
|
import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions } from './types/plugin.cjs';
|
|
3
3
|
export { TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from './types/plugin.cjs';
|
|
4
4
|
export { typeCheck } from './helpers/type-check.cjs';
|
|
@@ -14,7 +14,10 @@ import 'vite';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
+
import 'magic-string';
|
|
17
18
|
import 'semver';
|
|
19
|
+
import 'ts-morph';
|
|
20
|
+
import '@stryke/fs/resolve';
|
|
18
21
|
import 'node:fs';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
|
20
23
|
import 'typescript';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Plugin } from './plugin-
|
|
1
|
+
import { P as Plugin } from './plugin-ya8wkjpy.js';
|
|
2
2
|
import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions } from './types/plugin.js';
|
|
3
3
|
export { TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from './types/plugin.js';
|
|
4
4
|
export { typeCheck } from './helpers/type-check.js';
|
|
@@ -14,7 +14,10 @@ import 'vite';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
+
import 'magic-string';
|
|
17
18
|
import 'semver';
|
|
19
|
+
import 'ts-morph';
|
|
20
|
+
import '@stryke/fs/resolve';
|
|
18
21
|
import 'node:fs';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
|
20
23
|
import 'typescript';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MaybePromise, NonUndefined, FunctionLike } from '@stryke/types/base';
|
|
2
|
-
import { UnpluginMessage, UnpluginContext, UnpluginBuildContext, TransformResult
|
|
2
|
+
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
3
3
|
import { ArrayValues } from '@stryke/types/array';
|
|
4
4
|
import { Format } from '@storm-software/build-tools/types';
|
|
5
5
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -10,8 +10,11 @@ import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
|
10
10
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
11
11
|
import { PackageJson } from '@stryke/types/package-json';
|
|
12
12
|
import { Jiti } from 'jiti';
|
|
13
|
+
import { SourceMap } from 'magic-string';
|
|
13
14
|
import { Range } from 'semver';
|
|
14
|
-
import {
|
|
15
|
+
import { Project } from 'ts-morph';
|
|
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 { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
16
19
|
import ts from 'typescript';
|
|
17
20
|
|
|
@@ -238,21 +241,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
|
238
241
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
239
242
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
240
243
|
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
241
|
-
interface
|
|
244
|
+
interface ResolveOptions extends ResolveOptions$1 {
|
|
242
245
|
/**
|
|
243
|
-
*
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
* If true, the module is being resolved as an entry point.
|
|
247
|
+
*/
|
|
248
|
+
isEntry?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* If true, the resolver will skip using the cache when resolving modules.
|
|
251
|
+
*/
|
|
252
|
+
skipCache?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* An array of external modules or patterns to exclude from resolution.
|
|
246
255
|
*/
|
|
247
|
-
|
|
256
|
+
external?: (string | RegExp)[];
|
|
248
257
|
/**
|
|
249
|
-
*
|
|
258
|
+
* An array of modules or patterns to include in the resolution, even if they are marked as external.
|
|
250
259
|
*/
|
|
251
|
-
|
|
260
|
+
noExternal?: (string | RegExp)[];
|
|
252
261
|
/**
|
|
253
|
-
*
|
|
262
|
+
* An array of patterns to match when resolving modules.
|
|
254
263
|
*/
|
|
255
|
-
|
|
264
|
+
skipNodeModulesBundle?: boolean;
|
|
256
265
|
}
|
|
257
266
|
interface VirtualFileSystemInterface {
|
|
258
267
|
/**
|
|
@@ -266,27 +275,33 @@ interface VirtualFileSystemInterface {
|
|
|
266
275
|
/**
|
|
267
276
|
* The underlying file metadata.
|
|
268
277
|
*/
|
|
269
|
-
metadata: Record<string, VirtualFileMetadata
|
|
278
|
+
metadata: Readonly<Record<string, VirtualFileMetadata>>;
|
|
279
|
+
/**
|
|
280
|
+
* A map of file paths to their module ids.
|
|
281
|
+
*/
|
|
282
|
+
ids: Readonly<Record<string, string>>;
|
|
270
283
|
/**
|
|
271
284
|
* A map of module ids to their file paths.
|
|
272
285
|
*/
|
|
273
|
-
|
|
286
|
+
paths: Readonly<Record<string, string>>;
|
|
274
287
|
/**
|
|
275
288
|
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
276
289
|
*
|
|
277
290
|
* @param pathOrId - The path or id to check.
|
|
291
|
+
* @param importer - The importer path, if any.
|
|
278
292
|
* @param options - Optional parameters for resolving the path.
|
|
279
293
|
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
280
294
|
*/
|
|
281
|
-
isVirtual: (pathOrId: string, options?:
|
|
295
|
+
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
282
296
|
/**
|
|
283
297
|
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
284
298
|
*
|
|
285
299
|
* @param pathOrId - The path or id to check.
|
|
300
|
+
* @param importer - The importer path, if any.
|
|
286
301
|
* @param options - Optional parameters for resolving the path.
|
|
287
302
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
288
303
|
*/
|
|
289
|
-
isPhysical: (pathOrId: string, options?:
|
|
304
|
+
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
290
305
|
/**
|
|
291
306
|
* Checks if a file exists in the virtual file system (VFS).
|
|
292
307
|
*
|
|
@@ -314,7 +329,7 @@ interface VirtualFileSystemInterface {
|
|
|
314
329
|
* @param pathOrId - The path or id of the file.
|
|
315
330
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
316
331
|
*/
|
|
317
|
-
getMetadata: (pathOrId:
|
|
332
|
+
getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
|
|
318
333
|
/**
|
|
319
334
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
320
335
|
*
|
|
@@ -387,7 +402,7 @@ interface VirtualFileSystemInterface {
|
|
|
387
402
|
* @param path - The path to the file to remove.
|
|
388
403
|
* @returns A promise that resolves when the file is removed.
|
|
389
404
|
*/
|
|
390
|
-
unlinkSync: (path:
|
|
405
|
+
unlinkSync: (path: string, options?: ResolveFSOptions) => void;
|
|
391
406
|
/**
|
|
392
407
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
393
408
|
*
|
|
@@ -401,7 +416,7 @@ interface VirtualFileSystemInterface {
|
|
|
401
416
|
* @param path - The path to create the directory at.
|
|
402
417
|
* @param options - Options for creating the directory.
|
|
403
418
|
*/
|
|
404
|
-
rmdirSync: (path:
|
|
419
|
+
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
405
420
|
/**
|
|
406
421
|
* Removes a directory in the virtual file system (VFS).
|
|
407
422
|
*
|
|
@@ -409,7 +424,7 @@ interface VirtualFileSystemInterface {
|
|
|
409
424
|
* @param options - Options for creating the directory.
|
|
410
425
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
411
426
|
*/
|
|
412
|
-
rmdir: (path:
|
|
427
|
+
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
413
428
|
/**
|
|
414
429
|
* Removes a file or directory in the virtual file system (VFS).
|
|
415
430
|
*
|
|
@@ -417,14 +432,14 @@ interface VirtualFileSystemInterface {
|
|
|
417
432
|
* @param options - Options for removing the file or directory.
|
|
418
433
|
* @returns A promise that resolves when the file or directory is removed.
|
|
419
434
|
*/
|
|
420
|
-
rm: (path:
|
|
435
|
+
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
421
436
|
/**
|
|
422
437
|
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
423
438
|
*
|
|
424
439
|
* @param path - The path to the file or directory to remove.
|
|
425
440
|
* @param options - Options for removing the file or directory.
|
|
426
441
|
*/
|
|
427
|
-
rmSync: (path:
|
|
442
|
+
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
428
443
|
/**
|
|
429
444
|
* Creates a directory in the virtual file system (VFS).
|
|
430
445
|
*
|
|
@@ -432,7 +447,7 @@ interface VirtualFileSystemInterface {
|
|
|
432
447
|
* @param options - Options for creating the directory.
|
|
433
448
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
434
449
|
*/
|
|
435
|
-
mkdirSync: (path:
|
|
450
|
+
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
436
451
|
/**
|
|
437
452
|
* Creates a directory in the virtual file system (VFS).
|
|
438
453
|
*
|
|
@@ -440,7 +455,7 @@ interface VirtualFileSystemInterface {
|
|
|
440
455
|
* @param options - Options for creating the directory.
|
|
441
456
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
442
457
|
*/
|
|
443
|
-
mkdir: (path:
|
|
458
|
+
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
444
459
|
/**
|
|
445
460
|
* Reads a file from the virtual file system (VFS).
|
|
446
461
|
*
|
|
@@ -462,7 +477,7 @@ interface VirtualFileSystemInterface {
|
|
|
462
477
|
* @param options - Optional parameters for writing the file.
|
|
463
478
|
* @returns A promise that resolves when the file is written.
|
|
464
479
|
*/
|
|
465
|
-
writeFile: (path:
|
|
480
|
+
writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
|
|
466
481
|
/**
|
|
467
482
|
* Writes a file to the virtual file system (VFS).
|
|
468
483
|
*
|
|
@@ -470,7 +485,7 @@ interface VirtualFileSystemInterface {
|
|
|
470
485
|
* @param data - The contents of the file.
|
|
471
486
|
* @param options - Optional parameters for writing the file.
|
|
472
487
|
*/
|
|
473
|
-
writeFileSync: (path:
|
|
488
|
+
writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
|
|
474
489
|
/**
|
|
475
490
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
476
491
|
*
|
|
@@ -517,24 +532,43 @@ interface VirtualFileSystemInterface {
|
|
|
517
532
|
* Resolves a path or id to a file path in the virtual file system.
|
|
518
533
|
*
|
|
519
534
|
* @param pathOrId - The path or id of the file to resolve.
|
|
520
|
-
* @param options - Optional parameters for resolving the path.
|
|
521
535
|
* @returns The resolved path of the file if it exists, otherwise false.
|
|
522
536
|
*/
|
|
523
|
-
|
|
537
|
+
realpathSync: (pathOrId: string) => string;
|
|
524
538
|
/**
|
|
525
|
-
*
|
|
539
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
526
540
|
*
|
|
527
|
-
* @
|
|
528
|
-
*
|
|
541
|
+
* @remarks
|
|
542
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* ```ts
|
|
546
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
547
|
+
* ```
|
|
548
|
+
*
|
|
549
|
+
* @param id - The module to resolve.
|
|
550
|
+
* @param importer - An optional path to the importer module.
|
|
551
|
+
* @param options - Additional resolution options.
|
|
552
|
+
* @returns A promise that resolves to the resolved module path.
|
|
529
553
|
*/
|
|
530
|
-
|
|
554
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
|
|
531
555
|
/**
|
|
532
|
-
*
|
|
556
|
+
* A synchronous helper function to resolve modules using the Jiti resolver
|
|
533
557
|
*
|
|
534
|
-
* @
|
|
535
|
-
*
|
|
558
|
+
* @remarks
|
|
559
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
560
|
+
*
|
|
561
|
+
* @example
|
|
562
|
+
* ```ts
|
|
563
|
+
* const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
|
|
564
|
+
* ```
|
|
565
|
+
*
|
|
566
|
+
* @param id - The module to resolve.
|
|
567
|
+
* @param importer - An optional path to the importer module.
|
|
568
|
+
* @param options - Additional resolution options.
|
|
569
|
+
* @returns The resolved module path.
|
|
536
570
|
*/
|
|
537
|
-
|
|
571
|
+
resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
|
|
538
572
|
/**
|
|
539
573
|
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
540
574
|
*/
|
|
@@ -1006,6 +1040,10 @@ interface MetaInfo {
|
|
|
1006
1040
|
interface Resolver extends Jiti {
|
|
1007
1041
|
plugin: Jiti;
|
|
1008
1042
|
}
|
|
1043
|
+
interface TransformResult {
|
|
1044
|
+
code: string;
|
|
1045
|
+
map: SourceMap | null;
|
|
1046
|
+
}
|
|
1009
1047
|
interface InitContextOptions {
|
|
1010
1048
|
/**
|
|
1011
1049
|
* If false, the plugin will be loaded after all other plugins.
|
|
@@ -1140,6 +1178,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1140
1178
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
1141
1179
|
*/
|
|
1142
1180
|
builtins: string[];
|
|
1181
|
+
/**
|
|
1182
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
1183
|
+
*
|
|
1184
|
+
* @see https://ts-morph.com/
|
|
1185
|
+
*
|
|
1186
|
+
* @remarks
|
|
1187
|
+
* This instance is created lazily on first access.
|
|
1188
|
+
*/
|
|
1189
|
+
program: Project;
|
|
1190
|
+
/**
|
|
1191
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
1192
|
+
*
|
|
1193
|
+
* @remarks
|
|
1194
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
1195
|
+
*
|
|
1196
|
+
* @example
|
|
1197
|
+
* ```ts
|
|
1198
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
1199
|
+
* ```
|
|
1200
|
+
*
|
|
1201
|
+
* @param id - The module to resolve.
|
|
1202
|
+
* @param importer - An optional path to the importer module.
|
|
1203
|
+
* @param options - Additional resolution options.
|
|
1204
|
+
* @returns A promise that resolves to the resolved module path.
|
|
1205
|
+
*/
|
|
1206
|
+
resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1207
|
+
/**
|
|
1208
|
+
* A helper function to load modules using the Jiti resolver
|
|
1209
|
+
*
|
|
1210
|
+
* @remarks
|
|
1211
|
+
* This function can be used to load modules relative to the project root directory.
|
|
1212
|
+
*
|
|
1213
|
+
* @example
|
|
1214
|
+
* ```ts
|
|
1215
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
1216
|
+
* ```
|
|
1217
|
+
*
|
|
1218
|
+
* @param id - The module to load.
|
|
1219
|
+
* @returns A promise that resolves to the loaded module.
|
|
1220
|
+
*/
|
|
1221
|
+
load: (id: string) => Promise<TransformResult | undefined>;
|
|
1143
1222
|
/**
|
|
1144
1223
|
* The Powerlines builtin virtual files
|
|
1145
1224
|
*/
|
|
@@ -1309,7 +1388,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1309
1388
|
* @param id - The identifier of the source code.
|
|
1310
1389
|
* @returns A promise that resolves when the hook is complete.
|
|
1311
1390
|
*/
|
|
1312
|
-
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
|
|
1391
|
+
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
|
|
1313
1392
|
/**
|
|
1314
1393
|
* A hook that is called to load the source code.
|
|
1315
1394
|
*
|
|
@@ -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
|
-
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
|
|
1399
|
+
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
|
|
1321
1400
|
/**
|
|
1322
1401
|
* A hook that is called to resolve the identifier of the source code.
|
|
1323
1402
|
*
|
|
@@ -1367,7 +1446,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1367
1446
|
* @param id - The identifier of the source code.
|
|
1368
1447
|
* @returns A promise that resolves when the hook is complete.
|
|
1369
1448
|
*/
|
|
1370
|
-
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
|
|
1449
|
+
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
|
|
1371
1450
|
/**
|
|
1372
1451
|
* A hook that is called to load the source code.
|
|
1373
1452
|
*
|
|
@@ -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
|
-
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
|
|
1457
|
+
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
|
|
1379
1458
|
/**
|
|
1380
1459
|
* A hook that is called to resolve the identifier of the source code.
|
|
1381
1460
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MaybePromise, NonUndefined, FunctionLike } from '@stryke/types/base';
|
|
2
|
-
import { UnpluginMessage, UnpluginContext, UnpluginBuildContext, TransformResult
|
|
2
|
+
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
3
3
|
import { ArrayValues } from '@stryke/types/array';
|
|
4
4
|
import { Format } from '@storm-software/build-tools/types';
|
|
5
5
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -10,8 +10,11 @@ import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
|
10
10
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
11
11
|
import { PackageJson } from '@stryke/types/package-json';
|
|
12
12
|
import { Jiti } from 'jiti';
|
|
13
|
+
import { SourceMap } from 'magic-string';
|
|
13
14
|
import { Range } from 'semver';
|
|
14
|
-
import {
|
|
15
|
+
import { Project } from 'ts-morph';
|
|
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 { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
16
19
|
import ts from 'typescript';
|
|
17
20
|
|
|
@@ -238,21 +241,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
|
238
241
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
239
242
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
240
243
|
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
241
|
-
interface
|
|
244
|
+
interface ResolveOptions extends ResolveOptions$1 {
|
|
242
245
|
/**
|
|
243
|
-
*
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
* If true, the module is being resolved as an entry point.
|
|
247
|
+
*/
|
|
248
|
+
isEntry?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* If true, the resolver will skip using the cache when resolving modules.
|
|
251
|
+
*/
|
|
252
|
+
skipCache?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* An array of external modules or patterns to exclude from resolution.
|
|
246
255
|
*/
|
|
247
|
-
|
|
256
|
+
external?: (string | RegExp)[];
|
|
248
257
|
/**
|
|
249
|
-
*
|
|
258
|
+
* An array of modules or patterns to include in the resolution, even if they are marked as external.
|
|
250
259
|
*/
|
|
251
|
-
|
|
260
|
+
noExternal?: (string | RegExp)[];
|
|
252
261
|
/**
|
|
253
|
-
*
|
|
262
|
+
* An array of patterns to match when resolving modules.
|
|
254
263
|
*/
|
|
255
|
-
|
|
264
|
+
skipNodeModulesBundle?: boolean;
|
|
256
265
|
}
|
|
257
266
|
interface VirtualFileSystemInterface {
|
|
258
267
|
/**
|
|
@@ -266,27 +275,33 @@ interface VirtualFileSystemInterface {
|
|
|
266
275
|
/**
|
|
267
276
|
* The underlying file metadata.
|
|
268
277
|
*/
|
|
269
|
-
metadata: Record<string, VirtualFileMetadata
|
|
278
|
+
metadata: Readonly<Record<string, VirtualFileMetadata>>;
|
|
279
|
+
/**
|
|
280
|
+
* A map of file paths to their module ids.
|
|
281
|
+
*/
|
|
282
|
+
ids: Readonly<Record<string, string>>;
|
|
270
283
|
/**
|
|
271
284
|
* A map of module ids to their file paths.
|
|
272
285
|
*/
|
|
273
|
-
|
|
286
|
+
paths: Readonly<Record<string, string>>;
|
|
274
287
|
/**
|
|
275
288
|
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
276
289
|
*
|
|
277
290
|
* @param pathOrId - The path or id to check.
|
|
291
|
+
* @param importer - The importer path, if any.
|
|
278
292
|
* @param options - Optional parameters for resolving the path.
|
|
279
293
|
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
280
294
|
*/
|
|
281
|
-
isVirtual: (pathOrId: string, options?:
|
|
295
|
+
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
282
296
|
/**
|
|
283
297
|
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
284
298
|
*
|
|
285
299
|
* @param pathOrId - The path or id to check.
|
|
300
|
+
* @param importer - The importer path, if any.
|
|
286
301
|
* @param options - Optional parameters for resolving the path.
|
|
287
302
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
288
303
|
*/
|
|
289
|
-
isPhysical: (pathOrId: string, options?:
|
|
304
|
+
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
290
305
|
/**
|
|
291
306
|
* Checks if a file exists in the virtual file system (VFS).
|
|
292
307
|
*
|
|
@@ -314,7 +329,7 @@ interface VirtualFileSystemInterface {
|
|
|
314
329
|
* @param pathOrId - The path or id of the file.
|
|
315
330
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
316
331
|
*/
|
|
317
|
-
getMetadata: (pathOrId:
|
|
332
|
+
getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
|
|
318
333
|
/**
|
|
319
334
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
320
335
|
*
|
|
@@ -387,7 +402,7 @@ interface VirtualFileSystemInterface {
|
|
|
387
402
|
* @param path - The path to the file to remove.
|
|
388
403
|
* @returns A promise that resolves when the file is removed.
|
|
389
404
|
*/
|
|
390
|
-
unlinkSync: (path:
|
|
405
|
+
unlinkSync: (path: string, options?: ResolveFSOptions) => void;
|
|
391
406
|
/**
|
|
392
407
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
393
408
|
*
|
|
@@ -401,7 +416,7 @@ interface VirtualFileSystemInterface {
|
|
|
401
416
|
* @param path - The path to create the directory at.
|
|
402
417
|
* @param options - Options for creating the directory.
|
|
403
418
|
*/
|
|
404
|
-
rmdirSync: (path:
|
|
419
|
+
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
405
420
|
/**
|
|
406
421
|
* Removes a directory in the virtual file system (VFS).
|
|
407
422
|
*
|
|
@@ -409,7 +424,7 @@ interface VirtualFileSystemInterface {
|
|
|
409
424
|
* @param options - Options for creating the directory.
|
|
410
425
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
411
426
|
*/
|
|
412
|
-
rmdir: (path:
|
|
427
|
+
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
413
428
|
/**
|
|
414
429
|
* Removes a file or directory in the virtual file system (VFS).
|
|
415
430
|
*
|
|
@@ -417,14 +432,14 @@ interface VirtualFileSystemInterface {
|
|
|
417
432
|
* @param options - Options for removing the file or directory.
|
|
418
433
|
* @returns A promise that resolves when the file or directory is removed.
|
|
419
434
|
*/
|
|
420
|
-
rm: (path:
|
|
435
|
+
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
421
436
|
/**
|
|
422
437
|
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
423
438
|
*
|
|
424
439
|
* @param path - The path to the file or directory to remove.
|
|
425
440
|
* @param options - Options for removing the file or directory.
|
|
426
441
|
*/
|
|
427
|
-
rmSync: (path:
|
|
442
|
+
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
428
443
|
/**
|
|
429
444
|
* Creates a directory in the virtual file system (VFS).
|
|
430
445
|
*
|
|
@@ -432,7 +447,7 @@ interface VirtualFileSystemInterface {
|
|
|
432
447
|
* @param options - Options for creating the directory.
|
|
433
448
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
434
449
|
*/
|
|
435
|
-
mkdirSync: (path:
|
|
450
|
+
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
436
451
|
/**
|
|
437
452
|
* Creates a directory in the virtual file system (VFS).
|
|
438
453
|
*
|
|
@@ -440,7 +455,7 @@ interface VirtualFileSystemInterface {
|
|
|
440
455
|
* @param options - Options for creating the directory.
|
|
441
456
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
442
457
|
*/
|
|
443
|
-
mkdir: (path:
|
|
458
|
+
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
444
459
|
/**
|
|
445
460
|
* Reads a file from the virtual file system (VFS).
|
|
446
461
|
*
|
|
@@ -462,7 +477,7 @@ interface VirtualFileSystemInterface {
|
|
|
462
477
|
* @param options - Optional parameters for writing the file.
|
|
463
478
|
* @returns A promise that resolves when the file is written.
|
|
464
479
|
*/
|
|
465
|
-
writeFile: (path:
|
|
480
|
+
writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
|
|
466
481
|
/**
|
|
467
482
|
* Writes a file to the virtual file system (VFS).
|
|
468
483
|
*
|
|
@@ -470,7 +485,7 @@ interface VirtualFileSystemInterface {
|
|
|
470
485
|
* @param data - The contents of the file.
|
|
471
486
|
* @param options - Optional parameters for writing the file.
|
|
472
487
|
*/
|
|
473
|
-
writeFileSync: (path:
|
|
488
|
+
writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
|
|
474
489
|
/**
|
|
475
490
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
476
491
|
*
|
|
@@ -517,24 +532,43 @@ interface VirtualFileSystemInterface {
|
|
|
517
532
|
* Resolves a path or id to a file path in the virtual file system.
|
|
518
533
|
*
|
|
519
534
|
* @param pathOrId - The path or id of the file to resolve.
|
|
520
|
-
* @param options - Optional parameters for resolving the path.
|
|
521
535
|
* @returns The resolved path of the file if it exists, otherwise false.
|
|
522
536
|
*/
|
|
523
|
-
|
|
537
|
+
realpathSync: (pathOrId: string) => string;
|
|
524
538
|
/**
|
|
525
|
-
*
|
|
539
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
526
540
|
*
|
|
527
|
-
* @
|
|
528
|
-
*
|
|
541
|
+
* @remarks
|
|
542
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* ```ts
|
|
546
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
547
|
+
* ```
|
|
548
|
+
*
|
|
549
|
+
* @param id - The module to resolve.
|
|
550
|
+
* @param importer - An optional path to the importer module.
|
|
551
|
+
* @param options - Additional resolution options.
|
|
552
|
+
* @returns A promise that resolves to the resolved module path.
|
|
529
553
|
*/
|
|
530
|
-
|
|
554
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
|
|
531
555
|
/**
|
|
532
|
-
*
|
|
556
|
+
* A synchronous helper function to resolve modules using the Jiti resolver
|
|
533
557
|
*
|
|
534
|
-
* @
|
|
535
|
-
*
|
|
558
|
+
* @remarks
|
|
559
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
560
|
+
*
|
|
561
|
+
* @example
|
|
562
|
+
* ```ts
|
|
563
|
+
* const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
|
|
564
|
+
* ```
|
|
565
|
+
*
|
|
566
|
+
* @param id - The module to resolve.
|
|
567
|
+
* @param importer - An optional path to the importer module.
|
|
568
|
+
* @param options - Additional resolution options.
|
|
569
|
+
* @returns The resolved module path.
|
|
536
570
|
*/
|
|
537
|
-
|
|
571
|
+
resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
|
|
538
572
|
/**
|
|
539
573
|
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
540
574
|
*/
|
|
@@ -1006,6 +1040,10 @@ interface MetaInfo {
|
|
|
1006
1040
|
interface Resolver extends Jiti {
|
|
1007
1041
|
plugin: Jiti;
|
|
1008
1042
|
}
|
|
1043
|
+
interface TransformResult {
|
|
1044
|
+
code: string;
|
|
1045
|
+
map: SourceMap | null;
|
|
1046
|
+
}
|
|
1009
1047
|
interface InitContextOptions {
|
|
1010
1048
|
/**
|
|
1011
1049
|
* If false, the plugin will be loaded after all other plugins.
|
|
@@ -1140,6 +1178,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1140
1178
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
1141
1179
|
*/
|
|
1142
1180
|
builtins: string[];
|
|
1181
|
+
/**
|
|
1182
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
1183
|
+
*
|
|
1184
|
+
* @see https://ts-morph.com/
|
|
1185
|
+
*
|
|
1186
|
+
* @remarks
|
|
1187
|
+
* This instance is created lazily on first access.
|
|
1188
|
+
*/
|
|
1189
|
+
program: Project;
|
|
1190
|
+
/**
|
|
1191
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
1192
|
+
*
|
|
1193
|
+
* @remarks
|
|
1194
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
1195
|
+
*
|
|
1196
|
+
* @example
|
|
1197
|
+
* ```ts
|
|
1198
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
1199
|
+
* ```
|
|
1200
|
+
*
|
|
1201
|
+
* @param id - The module to resolve.
|
|
1202
|
+
* @param importer - An optional path to the importer module.
|
|
1203
|
+
* @param options - Additional resolution options.
|
|
1204
|
+
* @returns A promise that resolves to the resolved module path.
|
|
1205
|
+
*/
|
|
1206
|
+
resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1207
|
+
/**
|
|
1208
|
+
* A helper function to load modules using the Jiti resolver
|
|
1209
|
+
*
|
|
1210
|
+
* @remarks
|
|
1211
|
+
* This function can be used to load modules relative to the project root directory.
|
|
1212
|
+
*
|
|
1213
|
+
* @example
|
|
1214
|
+
* ```ts
|
|
1215
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
1216
|
+
* ```
|
|
1217
|
+
*
|
|
1218
|
+
* @param id - The module to load.
|
|
1219
|
+
* @returns A promise that resolves to the loaded module.
|
|
1220
|
+
*/
|
|
1221
|
+
load: (id: string) => Promise<TransformResult | undefined>;
|
|
1143
1222
|
/**
|
|
1144
1223
|
* The Powerlines builtin virtual files
|
|
1145
1224
|
*/
|
|
@@ -1309,7 +1388,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1309
1388
|
* @param id - The identifier of the source code.
|
|
1310
1389
|
* @returns A promise that resolves when the hook is complete.
|
|
1311
1390
|
*/
|
|
1312
|
-
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
|
|
1391
|
+
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
|
|
1313
1392
|
/**
|
|
1314
1393
|
* A hook that is called to load the source code.
|
|
1315
1394
|
*
|
|
@@ -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
|
-
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
|
|
1399
|
+
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
|
|
1321
1400
|
/**
|
|
1322
1401
|
* A hook that is called to resolve the identifier of the source code.
|
|
1323
1402
|
*
|
|
@@ -1367,7 +1446,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1367
1446
|
* @param id - The identifier of the source code.
|
|
1368
1447
|
* @returns A promise that resolves when the hook is complete.
|
|
1369
1448
|
*/
|
|
1370
|
-
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
|
|
1449
|
+
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
|
|
1371
1450
|
/**
|
|
1372
1451
|
* A hook that is called to load the source code.
|
|
1373
1452
|
*
|
|
@@ -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
|
-
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
|
|
1457
|
+
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
|
|
1379
1458
|
/**
|
|
1380
1459
|
* A hook that is called to resolve the identifier of the source code.
|
|
1381
1460
|
*
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from './plugin.cjs';
|
|
2
|
-
import '../plugin-
|
|
2
|
+
import '../plugin-ya8wkjpy.cjs';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import 'unplugin';
|
|
5
5
|
import '@stryke/types/array';
|
|
@@ -12,7 +12,10 @@ import 'vite';
|
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
13
|
import '@stryke/types/package-json';
|
|
14
14
|
import 'jiti';
|
|
15
|
+
import 'magic-string';
|
|
15
16
|
import 'semver';
|
|
17
|
+
import 'ts-morph';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
18
21
|
import 'typescript';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from './plugin.js';
|
|
2
|
-
import '../plugin-
|
|
2
|
+
import '../plugin-ya8wkjpy.js';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import 'unplugin';
|
|
5
5
|
import '@stryke/types/array';
|
|
@@ -12,7 +12,10 @@ import 'vite';
|
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
13
|
import '@stryke/types/package-json';
|
|
14
14
|
import 'jiti';
|
|
15
|
+
import 'magic-string';
|
|
15
16
|
import 'semver';
|
|
17
|
+
import 'ts-morph';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
18
21
|
import 'typescript';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvedConfig, a as PluginContext, U as UserConfig } from '../plugin-
|
|
1
|
+
import { R as ResolvedConfig, a as PluginContext, U as UserConfig } from '../plugin-ya8wkjpy.cjs';
|
|
2
2
|
import ts from 'typescript';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import 'unplugin';
|
|
@@ -12,7 +12,10 @@ import 'vite';
|
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
13
|
import '@stryke/types/package-json';
|
|
14
14
|
import 'jiti';
|
|
15
|
+
import 'magic-string';
|
|
15
16
|
import 'semver';
|
|
17
|
+
import 'ts-morph';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
18
21
|
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ResolvedConfig, a as PluginContext, U as UserConfig } from '../plugin-
|
|
1
|
+
import { R as ResolvedConfig, a as PluginContext, U as UserConfig } from '../plugin-ya8wkjpy.js';
|
|
2
2
|
import ts from 'typescript';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import 'unplugin';
|
|
@@ -12,7 +12,10 @@ import 'vite';
|
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
13
|
import '@stryke/types/package-json';
|
|
14
14
|
import 'jiti';
|
|
15
|
+
import 'magic-string';
|
|
15
16
|
import 'semver';
|
|
17
|
+
import 'ts-morph';
|
|
18
|
+
import '@stryke/fs/resolve';
|
|
16
19
|
import 'node:fs';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
18
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing the TypeScript compiler plugin for Powerlines.",
|
|
6
6
|
"repository": {
|
|
@@ -128,13 +128,13 @@
|
|
|
128
128
|
"keywords": ["tsc", "powerlines", "storm-software", "powerlines-plugin"],
|
|
129
129
|
"dependencies": {
|
|
130
130
|
"defu": "^6.1.4",
|
|
131
|
-
"powerlines": "^0.
|
|
131
|
+
"powerlines": "^0.24.1",
|
|
132
132
|
"typescript": "^5.9.3"
|
|
133
133
|
},
|
|
134
134
|
"devDependencies": {
|
|
135
|
-
"@powerlines/nx": "^0.10.
|
|
135
|
+
"@powerlines/nx": "^0.10.29",
|
|
136
136
|
"@types/node": "^24.10.1"
|
|
137
137
|
},
|
|
138
138
|
"publishConfig": { "access": "public" },
|
|
139
|
-
"gitHead": "
|
|
139
|
+
"gitHead": "424d900c34fbbdf943895648419a6467d8eb4a8d"
|
|
140
140
|
}
|