@powerlines/plugin-prisma 0.1.26 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  export { getSchema } from './get-schema.cjs';
2
- export { P as PrismaSchemaCreator } from '../index-C0Ndn8Ag.cjs';
2
+ export { P as PrismaSchemaCreator } from '../index-D5F7v29h.cjs';
3
3
  import '../types/prisma.cjs';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -11,8 +11,11 @@ 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';
15
17
  import 'unplugin';
18
+ import '@stryke/fs/resolve';
16
19
  import 'node:fs';
17
20
  import '@stryke/types/tsconfig';
18
21
  import 'typescript';
@@ -1,5 +1,5 @@
1
1
  export { getSchema } from './get-schema.js';
2
- export { P as PrismaSchemaCreator } from '../index-sdzIvtL8.js';
2
+ export { P as PrismaSchemaCreator } from '../index-YNWxvfOp.js';
3
3
  import '../types/prisma.js';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -11,8 +11,11 @@ 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';
15
17
  import 'unplugin';
18
+ import '@stryke/fs/resolve';
16
19
  import 'node:fs';
17
20
  import '@stryke/types/tsconfig';
18
21
  import 'typescript';
@@ -1,5 +1,5 @@
1
1
  import 'prisma-util/schema-creator';
2
- export { P as PrismaSchemaCreator } from '../index-C0Ndn8Ag.cjs';
2
+ export { P as PrismaSchemaCreator } from '../index-D5F7v29h.cjs';
3
3
  import '../types/prisma.cjs';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -11,8 +11,11 @@ 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';
15
17
  import 'unplugin';
18
+ import '@stryke/fs/resolve';
16
19
  import 'node:fs';
17
20
  import '@stryke/types/tsconfig';
18
21
  import 'typescript';
@@ -1,5 +1,5 @@
1
1
  import 'prisma-util/schema-creator';
2
- export { P as PrismaSchemaCreator } from '../index-sdzIvtL8.js';
2
+ export { P as PrismaSchemaCreator } from '../index-YNWxvfOp.js';
3
3
  import '../types/prisma.js';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -11,8 +11,11 @@ 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';
15
17
  import 'unplugin';
18
+ import '@stryke/fs/resolve';
16
19
  import 'node:fs';
17
20
  import '@stryke/types/tsconfig';
18
21
  import 'typescript';
@@ -8,9 +8,12 @@ import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
8
8
  import { EnvPaths } from '@stryke/env/get-env-paths';
9
9
  import { PackageJson } from '@stryke/types/package-json';
10
10
  import { Jiti } from 'jiti';
11
+ import { SourceMap } from 'magic-string';
11
12
  import { Range } from 'semver';
12
- import { UnpluginMessage, UnpluginContext, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
13
- import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
13
+ import { Project } from 'ts-morph';
14
+ import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
15
+ import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
16
+ import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
14
17
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
15
18
  import ts from 'typescript';
16
19
  import { ArrayValues } from '@stryke/types/array';
@@ -240,21 +243,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
240
243
  type NodeWriteFileOptions = WriteFileOptions$1;
241
244
  type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
242
245
  type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
243
- interface ResolvePathOptions extends ResolveFSOptions {
246
+ interface ResolveOptions extends ResolveOptions$1 {
244
247
  /**
245
- * Should the resolved path include the file extension?
246
- *
247
- * @defaultValue true
248
+ * If true, the module is being resolved as an entry point.
249
+ */
250
+ isEntry?: boolean;
251
+ /**
252
+ * If true, the resolver will skip using the cache when resolving modules.
253
+ */
254
+ skipCache?: boolean;
255
+ /**
256
+ * An array of external modules or patterns to exclude from resolution.
248
257
  */
249
- withExtension?: boolean;
258
+ external?: (string | RegExp)[];
250
259
  /**
251
- * The paths to search for the file.
260
+ * An array of modules or patterns to include in the resolution, even if they are marked as external.
252
261
  */
253
- paths?: string[];
262
+ noExternal?: (string | RegExp)[];
254
263
  /**
255
- * The type of the path to resolve.
264
+ * An array of patterns to match when resolving modules.
256
265
  */
257
- pathType?: "file" | "directory";
266
+ skipNodeModulesBundle?: boolean;
258
267
  }
259
268
  interface VirtualFileSystemInterface {
260
269
  /**
@@ -268,27 +277,33 @@ interface VirtualFileSystemInterface {
268
277
  /**
269
278
  * The underlying file metadata.
270
279
  */
271
- metadata: Record<string, VirtualFileMetadata | undefined>;
280
+ metadata: Readonly<Record<string, VirtualFileMetadata>>;
281
+ /**
282
+ * A map of file paths to their module ids.
283
+ */
284
+ ids: Readonly<Record<string, string>>;
272
285
  /**
273
286
  * A map of module ids to their file paths.
274
287
  */
275
- ids: Record<string, string>;
288
+ paths: Readonly<Record<string, string>>;
276
289
  /**
277
290
  * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
278
291
  *
279
292
  * @param pathOrId - The path or id to check.
293
+ * @param importer - The importer path, if any.
280
294
  * @param options - Optional parameters for resolving the path.
281
295
  * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
282
296
  */
283
- isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
297
+ isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
284
298
  /**
285
299
  * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
286
300
  *
287
301
  * @param pathOrId - The path or id to check.
302
+ * @param importer - The importer path, if any.
288
303
  * @param options - Optional parameters for resolving the path.
289
304
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
290
305
  */
291
- isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
306
+ isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
292
307
  /**
293
308
  * Checks if a file exists in the virtual file system (VFS).
294
309
  *
@@ -316,7 +331,7 @@ interface VirtualFileSystemInterface {
316
331
  * @param pathOrId - The path or id of the file.
317
332
  * @returns The metadata of the file if it exists, otherwise undefined.
318
333
  */
319
- getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
334
+ getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
320
335
  /**
321
336
  * Gets the stats of a file in the virtual file system (VFS).
322
337
  *
@@ -389,7 +404,7 @@ interface VirtualFileSystemInterface {
389
404
  * @param path - The path to the file to remove.
390
405
  * @returns A promise that resolves when the file is removed.
391
406
  */
392
- unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
407
+ unlinkSync: (path: string, options?: ResolveFSOptions) => void;
393
408
  /**
394
409
  * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
395
410
  *
@@ -403,7 +418,7 @@ interface VirtualFileSystemInterface {
403
418
  * @param path - The path to create the directory at.
404
419
  * @param options - Options for creating the directory.
405
420
  */
406
- rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
421
+ rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
407
422
  /**
408
423
  * Removes a directory in the virtual file system (VFS).
409
424
  *
@@ -411,7 +426,7 @@ interface VirtualFileSystemInterface {
411
426
  * @param options - Options for creating the directory.
412
427
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
413
428
  */
414
- rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
429
+ rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
415
430
  /**
416
431
  * Removes a file or directory in the virtual file system (VFS).
417
432
  *
@@ -419,14 +434,14 @@ interface VirtualFileSystemInterface {
419
434
  * @param options - Options for removing the file or directory.
420
435
  * @returns A promise that resolves when the file or directory is removed.
421
436
  */
422
- rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
437
+ rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
423
438
  /**
424
439
  * Synchronously removes a file or directory in the virtual file system (VFS).
425
440
  *
426
441
  * @param path - The path to the file or directory to remove.
427
442
  * @param options - Options for removing the file or directory.
428
443
  */
429
- rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;
444
+ rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
430
445
  /**
431
446
  * Creates a directory in the virtual file system (VFS).
432
447
  *
@@ -434,7 +449,7 @@ interface VirtualFileSystemInterface {
434
449
  * @param options - Options for creating the directory.
435
450
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
436
451
  */
437
- mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
452
+ mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
438
453
  /**
439
454
  * Creates a directory in the virtual file system (VFS).
440
455
  *
@@ -442,7 +457,7 @@ interface VirtualFileSystemInterface {
442
457
  * @param options - Options for creating the directory.
443
458
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
444
459
  */
445
- mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
460
+ mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
446
461
  /**
447
462
  * Reads a file from the virtual file system (VFS).
448
463
  *
@@ -464,7 +479,7 @@ interface VirtualFileSystemInterface {
464
479
  * @param options - Optional parameters for writing the file.
465
480
  * @returns A promise that resolves when the file is written.
466
481
  */
467
- writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
482
+ writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
468
483
  /**
469
484
  * Writes a file to the virtual file system (VFS).
470
485
  *
@@ -472,7 +487,7 @@ interface VirtualFileSystemInterface {
472
487
  * @param data - The contents of the file.
473
488
  * @param options - Optional parameters for writing the file.
474
489
  */
475
- writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
490
+ writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
476
491
  /**
477
492
  * Moves a file from one path to another in the virtual file system (VFS).
478
493
  *
@@ -519,24 +534,43 @@ interface VirtualFileSystemInterface {
519
534
  * Resolves a path or id to a file path in the virtual file system.
520
535
  *
521
536
  * @param pathOrId - The path or id of the file to resolve.
522
- * @param options - Optional parameters for resolving the path.
523
537
  * @returns The resolved path of the file if it exists, otherwise false.
524
538
  */
525
- resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
539
+ realpathSync: (pathOrId: string) => string;
526
540
  /**
527
- * Formats a path to match the virtual file system (VFS) structure.
541
+ * A helper function to resolve modules using the Jiti resolver
528
542
  *
529
- * @param path - The path to format.
530
- * @returns The formatted path.
543
+ * @remarks
544
+ * This function can be used to resolve modules relative to the project root directory.
545
+ *
546
+ * @example
547
+ * ```ts
548
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
549
+ * ```
550
+ *
551
+ * @param id - The module to resolve.
552
+ * @param importer - An optional path to the importer module.
553
+ * @param options - Additional resolution options.
554
+ * @returns A promise that resolves to the resolved module path.
531
555
  */
532
- formatPath: (path: string) => string;
556
+ resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
533
557
  /**
534
- * Resolves a path or id to a file path in the virtual file system.
558
+ * A synchronous helper function to resolve modules using the Jiti resolver
535
559
  *
536
- * @param pathOrId - The path or id of the file to resolve.
537
- * @returns The resolved path of the file if it exists, otherwise false.
560
+ * @remarks
561
+ * This function can be used to resolve modules relative to the project root directory.
562
+ *
563
+ * @example
564
+ * ```ts
565
+ * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
566
+ * ```
567
+ *
568
+ * @param id - The module to resolve.
569
+ * @param importer - An optional path to the importer module.
570
+ * @param options - Additional resolution options.
571
+ * @returns The resolved module path.
538
572
  */
539
- realpathSync: (pathOrId: string) => string;
573
+ resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
540
574
  /**
541
575
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
542
576
  */
@@ -1008,6 +1042,10 @@ interface MetaInfo {
1008
1042
  interface Resolver extends Jiti {
1009
1043
  plugin: Jiti;
1010
1044
  }
1045
+ interface TransformResult {
1046
+ code: string;
1047
+ map: SourceMap | null;
1048
+ }
1011
1049
  interface InitContextOptions {
1012
1050
  /**
1013
1051
  * If false, the plugin will be loaded after all other plugins.
@@ -1142,6 +1180,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1142
1180
  * The builtin module id that exist in the Powerlines virtual file system
1143
1181
  */
1144
1182
  builtins: string[];
1183
+ /**
1184
+ * The {@link Project} instance used for type reflection and module manipulation
1185
+ *
1186
+ * @see https://ts-morph.com/
1187
+ *
1188
+ * @remarks
1189
+ * This instance is created lazily on first access.
1190
+ */
1191
+ program: Project;
1192
+ /**
1193
+ * A helper function to resolve modules using the Jiti resolver
1194
+ *
1195
+ * @remarks
1196
+ * This function can be used to resolve modules relative to the project root directory.
1197
+ *
1198
+ * @example
1199
+ * ```ts
1200
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1201
+ * ```
1202
+ *
1203
+ * @param id - The module to resolve.
1204
+ * @param importer - An optional path to the importer module.
1205
+ * @param options - Additional resolution options.
1206
+ * @returns A promise that resolves to the resolved module path.
1207
+ */
1208
+ resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
1209
+ /**
1210
+ * A helper function to load modules using the Jiti resolver
1211
+ *
1212
+ * @remarks
1213
+ * This function can be used to load modules relative to the project root directory.
1214
+ *
1215
+ * @example
1216
+ * ```ts
1217
+ * const module = await context.load("some-module", "/path/to/importer");
1218
+ * ```
1219
+ *
1220
+ * @param id - The module to load.
1221
+ * @returns A promise that resolves to the loaded module.
1222
+ */
1223
+ load: (id: string) => Promise<TransformResult | undefined>;
1145
1224
  /**
1146
1225
  * The Powerlines builtin virtual files
1147
1226
  */
@@ -1311,7 +1390,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
1311
1390
  * @param id - The identifier of the source code.
1312
1391
  * @returns A promise that resolves when the hook is complete.
1313
1392
  */
1314
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
1393
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
1315
1394
  /**
1316
1395
  * A hook that is called to load the source code.
1317
1396
  *
@@ -1319,7 +1398,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
1319
1398
  * @param id - The identifier of the source code.
1320
1399
  * @returns A promise that resolves when the hook is complete.
1321
1400
  */
1322
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
1401
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
1323
1402
  /**
1324
1403
  * A hook that is called to resolve the identifier of the source code.
1325
1404
  *
@@ -1369,7 +1448,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1369
1448
  * @param id - The identifier of the source code.
1370
1449
  * @returns A promise that resolves when the hook is complete.
1371
1450
  */
1372
- transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
1451
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
1373
1452
  /**
1374
1453
  * A hook that is called to load the source code.
1375
1454
  *
@@ -1377,7 +1456,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1377
1456
  * @param id - The identifier of the source code.
1378
1457
  * @returns A promise that resolves when the hook is complete.
1379
1458
  */
1380
- load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
1459
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
1381
1460
  /**
1382
1461
  * A hook that is called to resolve the identifier of the source code.
1383
1462
  *
@@ -8,9 +8,12 @@ import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
8
8
  import { EnvPaths } from '@stryke/env/get-env-paths';
9
9
  import { PackageJson } from '@stryke/types/package-json';
10
10
  import { Jiti } from 'jiti';
11
+ import { SourceMap } from 'magic-string';
11
12
  import { Range } from 'semver';
12
- import { UnpluginMessage, UnpluginContext, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
13
- import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
13
+ import { Project } from 'ts-morph';
14
+ import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
15
+ import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
16
+ import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
14
17
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
15
18
  import ts from 'typescript';
16
19
  import { ArrayValues } from '@stryke/types/array';
@@ -240,21 +243,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
240
243
  type NodeWriteFileOptions = WriteFileOptions$1;
241
244
  type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
242
245
  type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
243
- interface ResolvePathOptions extends ResolveFSOptions {
246
+ interface ResolveOptions extends ResolveOptions$1 {
244
247
  /**
245
- * Should the resolved path include the file extension?
246
- *
247
- * @defaultValue true
248
+ * If true, the module is being resolved as an entry point.
249
+ */
250
+ isEntry?: boolean;
251
+ /**
252
+ * If true, the resolver will skip using the cache when resolving modules.
253
+ */
254
+ skipCache?: boolean;
255
+ /**
256
+ * An array of external modules or patterns to exclude from resolution.
248
257
  */
249
- withExtension?: boolean;
258
+ external?: (string | RegExp)[];
250
259
  /**
251
- * The paths to search for the file.
260
+ * An array of modules or patterns to include in the resolution, even if they are marked as external.
252
261
  */
253
- paths?: string[];
262
+ noExternal?: (string | RegExp)[];
254
263
  /**
255
- * The type of the path to resolve.
264
+ * An array of patterns to match when resolving modules.
256
265
  */
257
- pathType?: "file" | "directory";
266
+ skipNodeModulesBundle?: boolean;
258
267
  }
259
268
  interface VirtualFileSystemInterface {
260
269
  /**
@@ -268,27 +277,33 @@ interface VirtualFileSystemInterface {
268
277
  /**
269
278
  * The underlying file metadata.
270
279
  */
271
- metadata: Record<string, VirtualFileMetadata | undefined>;
280
+ metadata: Readonly<Record<string, VirtualFileMetadata>>;
281
+ /**
282
+ * A map of file paths to their module ids.
283
+ */
284
+ ids: Readonly<Record<string, string>>;
272
285
  /**
273
286
  * A map of module ids to their file paths.
274
287
  */
275
- ids: Record<string, string>;
288
+ paths: Readonly<Record<string, string>>;
276
289
  /**
277
290
  * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
278
291
  *
279
292
  * @param pathOrId - The path or id to check.
293
+ * @param importer - The importer path, if any.
280
294
  * @param options - Optional parameters for resolving the path.
281
295
  * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
282
296
  */
283
- isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
297
+ isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
284
298
  /**
285
299
  * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
286
300
  *
287
301
  * @param pathOrId - The path or id to check.
302
+ * @param importer - The importer path, if any.
288
303
  * @param options - Optional parameters for resolving the path.
289
304
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
290
305
  */
291
- isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
306
+ isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
292
307
  /**
293
308
  * Checks if a file exists in the virtual file system (VFS).
294
309
  *
@@ -316,7 +331,7 @@ interface VirtualFileSystemInterface {
316
331
  * @param pathOrId - The path or id of the file.
317
332
  * @returns The metadata of the file if it exists, otherwise undefined.
318
333
  */
319
- getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
334
+ getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
320
335
  /**
321
336
  * Gets the stats of a file in the virtual file system (VFS).
322
337
  *
@@ -389,7 +404,7 @@ interface VirtualFileSystemInterface {
389
404
  * @param path - The path to the file to remove.
390
405
  * @returns A promise that resolves when the file is removed.
391
406
  */
392
- unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
407
+ unlinkSync: (path: string, options?: ResolveFSOptions) => void;
393
408
  /**
394
409
  * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
395
410
  *
@@ -403,7 +418,7 @@ interface VirtualFileSystemInterface {
403
418
  * @param path - The path to create the directory at.
404
419
  * @param options - Options for creating the directory.
405
420
  */
406
- rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
421
+ rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
407
422
  /**
408
423
  * Removes a directory in the virtual file system (VFS).
409
424
  *
@@ -411,7 +426,7 @@ interface VirtualFileSystemInterface {
411
426
  * @param options - Options for creating the directory.
412
427
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
413
428
  */
414
- rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
429
+ rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
415
430
  /**
416
431
  * Removes a file or directory in the virtual file system (VFS).
417
432
  *
@@ -419,14 +434,14 @@ interface VirtualFileSystemInterface {
419
434
  * @param options - Options for removing the file or directory.
420
435
  * @returns A promise that resolves when the file or directory is removed.
421
436
  */
422
- rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
437
+ rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
423
438
  /**
424
439
  * Synchronously removes a file or directory in the virtual file system (VFS).
425
440
  *
426
441
  * @param path - The path to the file or directory to remove.
427
442
  * @param options - Options for removing the file or directory.
428
443
  */
429
- rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;
444
+ rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
430
445
  /**
431
446
  * Creates a directory in the virtual file system (VFS).
432
447
  *
@@ -434,7 +449,7 @@ interface VirtualFileSystemInterface {
434
449
  * @param options - Options for creating the directory.
435
450
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
436
451
  */
437
- mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
452
+ mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
438
453
  /**
439
454
  * Creates a directory in the virtual file system (VFS).
440
455
  *
@@ -442,7 +457,7 @@ interface VirtualFileSystemInterface {
442
457
  * @param options - Options for creating the directory.
443
458
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
444
459
  */
445
- mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
460
+ mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
446
461
  /**
447
462
  * Reads a file from the virtual file system (VFS).
448
463
  *
@@ -464,7 +479,7 @@ interface VirtualFileSystemInterface {
464
479
  * @param options - Optional parameters for writing the file.
465
480
  * @returns A promise that resolves when the file is written.
466
481
  */
467
- writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
482
+ writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
468
483
  /**
469
484
  * Writes a file to the virtual file system (VFS).
470
485
  *
@@ -472,7 +487,7 @@ interface VirtualFileSystemInterface {
472
487
  * @param data - The contents of the file.
473
488
  * @param options - Optional parameters for writing the file.
474
489
  */
475
- writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
490
+ writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
476
491
  /**
477
492
  * Moves a file from one path to another in the virtual file system (VFS).
478
493
  *
@@ -519,24 +534,43 @@ interface VirtualFileSystemInterface {
519
534
  * Resolves a path or id to a file path in the virtual file system.
520
535
  *
521
536
  * @param pathOrId - The path or id of the file to resolve.
522
- * @param options - Optional parameters for resolving the path.
523
537
  * @returns The resolved path of the file if it exists, otherwise false.
524
538
  */
525
- resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
539
+ realpathSync: (pathOrId: string) => string;
526
540
  /**
527
- * Formats a path to match the virtual file system (VFS) structure.
541
+ * A helper function to resolve modules using the Jiti resolver
528
542
  *
529
- * @param path - The path to format.
530
- * @returns The formatted path.
543
+ * @remarks
544
+ * This function can be used to resolve modules relative to the project root directory.
545
+ *
546
+ * @example
547
+ * ```ts
548
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
549
+ * ```
550
+ *
551
+ * @param id - The module to resolve.
552
+ * @param importer - An optional path to the importer module.
553
+ * @param options - Additional resolution options.
554
+ * @returns A promise that resolves to the resolved module path.
531
555
  */
532
- formatPath: (path: string) => string;
556
+ resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
533
557
  /**
534
- * Resolves a path or id to a file path in the virtual file system.
558
+ * A synchronous helper function to resolve modules using the Jiti resolver
535
559
  *
536
- * @param pathOrId - The path or id of the file to resolve.
537
- * @returns The resolved path of the file if it exists, otherwise false.
560
+ * @remarks
561
+ * This function can be used to resolve modules relative to the project root directory.
562
+ *
563
+ * @example
564
+ * ```ts
565
+ * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
566
+ * ```
567
+ *
568
+ * @param id - The module to resolve.
569
+ * @param importer - An optional path to the importer module.
570
+ * @param options - Additional resolution options.
571
+ * @returns The resolved module path.
538
572
  */
539
- realpathSync: (pathOrId: string) => string;
573
+ resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
540
574
  /**
541
575
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
542
576
  */
@@ -1008,6 +1042,10 @@ interface MetaInfo {
1008
1042
  interface Resolver extends Jiti {
1009
1043
  plugin: Jiti;
1010
1044
  }
1045
+ interface TransformResult {
1046
+ code: string;
1047
+ map: SourceMap | null;
1048
+ }
1011
1049
  interface InitContextOptions {
1012
1050
  /**
1013
1051
  * If false, the plugin will be loaded after all other plugins.
@@ -1142,6 +1180,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1142
1180
  * The builtin module id that exist in the Powerlines virtual file system
1143
1181
  */
1144
1182
  builtins: string[];
1183
+ /**
1184
+ * The {@link Project} instance used for type reflection and module manipulation
1185
+ *
1186
+ * @see https://ts-morph.com/
1187
+ *
1188
+ * @remarks
1189
+ * This instance is created lazily on first access.
1190
+ */
1191
+ program: Project;
1192
+ /**
1193
+ * A helper function to resolve modules using the Jiti resolver
1194
+ *
1195
+ * @remarks
1196
+ * This function can be used to resolve modules relative to the project root directory.
1197
+ *
1198
+ * @example
1199
+ * ```ts
1200
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1201
+ * ```
1202
+ *
1203
+ * @param id - The module to resolve.
1204
+ * @param importer - An optional path to the importer module.
1205
+ * @param options - Additional resolution options.
1206
+ * @returns A promise that resolves to the resolved module path.
1207
+ */
1208
+ resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
1209
+ /**
1210
+ * A helper function to load modules using the Jiti resolver
1211
+ *
1212
+ * @remarks
1213
+ * This function can be used to load modules relative to the project root directory.
1214
+ *
1215
+ * @example
1216
+ * ```ts
1217
+ * const module = await context.load("some-module", "/path/to/importer");
1218
+ * ```
1219
+ *
1220
+ * @param id - The module to load.
1221
+ * @returns A promise that resolves to the loaded module.
1222
+ */
1223
+ load: (id: string) => Promise<TransformResult | undefined>;
1145
1224
  /**
1146
1225
  * The Powerlines builtin virtual files
1147
1226
  */
@@ -1311,7 +1390,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
1311
1390
  * @param id - The identifier of the source code.
1312
1391
  * @returns A promise that resolves when the hook is complete.
1313
1392
  */
1314
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
1393
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
1315
1394
  /**
1316
1395
  * A hook that is called to load the source code.
1317
1396
  *
@@ -1319,7 +1398,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
1319
1398
  * @param id - The identifier of the source code.
1320
1399
  * @returns A promise that resolves when the hook is complete.
1321
1400
  */
1322
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
1401
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
1323
1402
  /**
1324
1403
  * A hook that is called to resolve the identifier of the source code.
1325
1404
  *
@@ -1369,7 +1448,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1369
1448
  * @param id - The identifier of the source code.
1370
1449
  * @returns A promise that resolves when the hook is complete.
1371
1450
  */
1372
- transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
1451
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
1373
1452
  /**
1374
1453
  * A hook that is called to load the source code.
1375
1454
  *
@@ -1377,7 +1456,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1377
1456
  * @param id - The identifier of the source code.
1378
1457
  * @returns A promise that resolves when the hook is complete.
1379
1458
  */
1380
- load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
1459
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
1381
1460
  /**
1382
1461
  * A hook that is called to resolve the identifier of the source code.
1383
1462
  *
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as PrismaPluginContext, b as PrismaPluginOptions, c as Plugin } from './index-C0Ndn8Ag.cjs';
2
- export { e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from './index-C0Ndn8Ag.cjs';
1
+ import { a as PrismaPluginContext, b as PrismaPluginOptions, c as Plugin } from './index-D5F7v29h.cjs';
2
+ export { e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from './index-D5F7v29h.cjs';
3
3
  export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from './types/prisma.cjs';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -11,8 +11,11 @@ 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';
15
17
  import 'unplugin';
18
+ import '@stryke/fs/resolve';
16
19
  import 'node:fs';
17
20
  import '@stryke/types/tsconfig';
18
21
  import 'typescript';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as PrismaPluginContext, b as PrismaPluginOptions, c as Plugin } from './index-sdzIvtL8.js';
2
- export { e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from './index-sdzIvtL8.js';
1
+ import { a as PrismaPluginContext, b as PrismaPluginOptions, c as Plugin } from './index-YNWxvfOp.js';
2
+ export { e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from './index-YNWxvfOp.js';
3
3
  export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from './types/prisma.js';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -11,8 +11,11 @@ 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';
15
17
  import 'unplugin';
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
- export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-C0Ndn8Ag.cjs';
1
+ export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-D5F7v29h.cjs';
2
2
  export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from './prisma.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -10,8 +10,11 @@ import 'vite';
10
10
  import '@stryke/env/get-env-paths';
11
11
  import '@stryke/types/package-json';
12
12
  import 'jiti';
13
+ import 'magic-string';
13
14
  import 'semver';
15
+ import 'ts-morph';
14
16
  import 'unplugin';
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
- export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-sdzIvtL8.js';
1
+ export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-YNWxvfOp.js';
2
2
  export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from './prisma.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -10,8 +10,11 @@ import 'vite';
10
10
  import '@stryke/env/get-env-paths';
11
11
  import '@stryke/types/package-json';
12
12
  import 'jiti';
13
+ import 'magic-string';
13
14
  import 'semver';
15
+ import 'ts-morph';
14
16
  import 'unplugin';
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
- export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-C0Ndn8Ag.cjs';
1
+ export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-D5F7v29h.cjs';
2
2
  import './prisma.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -10,8 +10,11 @@ import 'vite';
10
10
  import '@stryke/env/get-env-paths';
11
11
  import '@stryke/types/package-json';
12
12
  import 'jiti';
13
+ import 'magic-string';
13
14
  import 'semver';
15
+ import 'ts-morph';
14
16
  import 'unplugin';
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
- export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-sdzIvtL8.js';
1
+ export { a as PrismaPluginContext, b as PrismaPluginOptions, e as PrismaPluginResolvedConfig, d as PrismaPluginUserConfig, h as __ΩPrismaPluginContext, _ as __ΩPrismaPluginOptions, g as __ΩPrismaPluginResolvedConfig, f as __ΩPrismaPluginUserConfig } from '../index-YNWxvfOp.js';
2
2
  import './prisma.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -10,8 +10,11 @@ import 'vite';
10
10
  import '@stryke/env/get-env-paths';
11
11
  import '@stryke/types/package-json';
12
12
  import 'jiti';
13
+ import 'magic-string';
13
14
  import 'semver';
15
+ import 'ts-morph';
14
16
  import 'unplugin';
17
+ import '@stryke/fs/resolve';
15
18
  import 'node:fs';
16
19
  import '@stryke/types/tsconfig';
17
20
  import 'typescript';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-prisma",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code and a Prisma client from a Prisma schema (PSL).",
6
6
  "repository": {
@@ -127,14 +127,14 @@
127
127
  "files": ["dist/**/*"],
128
128
  "keywords": ["prisma", "powerlines", "storm-software", "powerlines-plugin"],
129
129
  "dependencies": {
130
- "@stryke/path": "^0.19.2",
131
- "@stryke/fs": "^0.32.13",
132
- "@stryke/type-checks": "^0.3.12",
133
- "@stryke/types": "^0.10.2",
134
- "@stryke/cli": "^0.12.7",
130
+ "@stryke/path": "^0.20.0",
131
+ "@stryke/fs": "^0.33.0",
132
+ "@stryke/type-checks": "^0.3.15",
133
+ "@stryke/types": "^0.10.5",
134
+ "@stryke/cli": "^0.12.10",
135
135
  "defu": "^6.1.4",
136
136
  "jiti": "^2.6.1",
137
- "powerlines": "^0.23.9",
137
+ "powerlines": "^0.24.0",
138
138
  "ts-pattern": "^5.9.0",
139
139
  "prisma-util": "^2.1.1",
140
140
  "@prisma/get-platform": "^6.19.0",
@@ -142,10 +142,10 @@
142
142
  "fp-ts": "^2.16.11"
143
143
  },
144
144
  "devDependencies": {
145
- "@powerlines/nx": "^0.10.26",
146
- "@powerlines/plugin-plugin": "^0.11.34",
145
+ "@powerlines/nx": "^0.10.28",
146
+ "@powerlines/plugin-plugin": "^0.11.36",
147
147
  "@types/node": "^24.10.1"
148
148
  },
149
149
  "publishConfig": { "access": "public" },
150
- "gitHead": "d217b583335e4615b4e28fba7325f51fbd78a3f6"
150
+ "gitHead": "73acce2067b9d81822a59cb03a4b1e7fa8873bf9"
151
151
  }