@powerlines/plugin-id 0.9.28 → 0.9.30
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/components/index.d.cts +2 -4
- package/dist/components/index.d.ts +2 -4
- package/dist/components/nanoid.d.cts +2 -4
- package/dist/components/nanoid.d.ts +2 -4
- package/dist/{index-blKFjPDo.d.cts → index-Br82OUwZ.d.cts} +118 -101
- package/dist/{index-blKFjPDo.d.ts → index-Br82OUwZ.d.ts} +118 -101
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +1 -1
- package/dist/types/index.d.cts +2 -4
- package/dist/types/index.d.ts +2 -4
- package/dist/types/plugin.d.cts +2 -4
- package/dist/types/plugin.d.ts +2 -4
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { nanoidModule } from './nanoid.cjs';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-Br82OUwZ.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -10,11 +10,9 @@ import 'vite';
|
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
11
|
import '@stryke/types/package-json';
|
|
12
12
|
import 'jiti';
|
|
13
|
-
import 'oxc-parser';
|
|
14
13
|
import 'semver';
|
|
15
14
|
import 'unplugin';
|
|
15
|
+
import 'node:fs';
|
|
16
16
|
import '@stryke/types/tsconfig';
|
|
17
17
|
import 'typescript';
|
|
18
|
-
import '@stryke/json/types';
|
|
19
|
-
import 'node:fs';
|
|
20
18
|
import '@stryke/types/array';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { nanoidModule } from './nanoid.js';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-Br82OUwZ.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -10,11 +10,9 @@ import 'vite';
|
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
11
|
import '@stryke/types/package-json';
|
|
12
12
|
import 'jiti';
|
|
13
|
-
import 'oxc-parser';
|
|
14
13
|
import 'semver';
|
|
15
14
|
import 'unplugin';
|
|
15
|
+
import 'node:fs';
|
|
16
16
|
import '@stryke/types/tsconfig';
|
|
17
17
|
import 'typescript';
|
|
18
|
-
import '@stryke/json/types';
|
|
19
|
-
import 'node:fs';
|
|
20
18
|
import '@stryke/types/array';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IdPluginContext } from '../index-
|
|
1
|
+
import { a as IdPluginContext } from '../index-Br82OUwZ.cjs';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -9,13 +9,11 @@ import 'vite';
|
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
10
|
import '@stryke/types/package-json';
|
|
11
11
|
import 'jiti';
|
|
12
|
-
import 'oxc-parser';
|
|
13
12
|
import 'semver';
|
|
14
13
|
import 'unplugin';
|
|
14
|
+
import 'node:fs';
|
|
15
15
|
import '@stryke/types/tsconfig';
|
|
16
16
|
import 'typescript';
|
|
17
|
-
import '@stryke/json/types';
|
|
18
|
-
import 'node:fs';
|
|
19
17
|
import '@stryke/types/array';
|
|
20
18
|
|
|
21
19
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IdPluginContext } from '../index-
|
|
1
|
+
import { a as IdPluginContext } from '../index-Br82OUwZ.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -9,13 +9,11 @@ import 'vite';
|
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
10
|
import '@stryke/types/package-json';
|
|
11
11
|
import 'jiti';
|
|
12
|
-
import 'oxc-parser';
|
|
13
12
|
import 'semver';
|
|
14
13
|
import 'unplugin';
|
|
14
|
+
import 'node:fs';
|
|
15
15
|
import '@stryke/types/tsconfig';
|
|
16
16
|
import 'typescript';
|
|
17
|
-
import '@stryke/json/types';
|
|
18
|
-
import 'node:fs';
|
|
19
17
|
import '@stryke/types/array';
|
|
20
18
|
|
|
21
19
|
/**
|
|
@@ -8,13 +8,11 @@ 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 { ParserOptions, ParseResult } from 'oxc-parser';
|
|
12
11
|
import { Range } from 'semver';
|
|
13
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';
|
|
14
14
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
15
15
|
import ts from 'typescript';
|
|
16
|
-
import { PrimitiveJsonValue } from '@stryke/json/types';
|
|
17
|
-
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
18
16
|
import { ArrayValues } from '@stryke/types/array';
|
|
19
17
|
|
|
20
18
|
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
@@ -153,87 +151,20 @@ interface BuildConfig {
|
|
|
153
151
|
}
|
|
154
152
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
155
153
|
|
|
156
|
-
type ReflectionMode = "default" | "explicit" | "never";
|
|
157
|
-
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
158
|
-
/**
|
|
159
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
160
|
-
*
|
|
161
|
-
* @remarks
|
|
162
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
163
|
-
* - `minimal` - Only the essential type information is captured.
|
|
164
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
165
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
166
|
-
*/
|
|
167
|
-
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
168
|
-
interface DeepkitOptions {
|
|
169
|
-
/**
|
|
170
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
171
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
172
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
173
|
-
*/
|
|
174
|
-
reflection?: RawReflectionMode;
|
|
175
|
-
/**
|
|
176
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
177
|
-
*
|
|
178
|
-
* @remarks
|
|
179
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
180
|
-
* - `minimal` - Only the essential type information is captured.
|
|
181
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
182
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
183
|
-
*/
|
|
184
|
-
reflectionLevel?: ReflectionLevel;
|
|
185
|
-
}
|
|
186
|
-
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
187
|
-
/**
|
|
188
|
-
* The TypeScript compiler configuration.
|
|
189
|
-
*
|
|
190
|
-
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
191
|
-
*/
|
|
192
|
-
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
193
|
-
/**
|
|
194
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
195
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
196
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
197
|
-
*/
|
|
198
|
-
reflection?: RawReflectionMode;
|
|
199
|
-
/**
|
|
200
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
204
|
-
* - `minimal` - Only the essential type information is captured.
|
|
205
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
206
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
207
|
-
*/
|
|
208
|
-
reflectionLevel?: ReflectionLevel;
|
|
209
|
-
/**
|
|
210
|
-
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
211
|
-
*/
|
|
212
|
-
compilerOptions?: TSCompilerOptions;
|
|
213
|
-
}
|
|
214
|
-
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
215
|
-
originalTsconfigJson: TsConfigJson;
|
|
216
|
-
tsconfigJson: TSConfig;
|
|
217
|
-
tsconfigFilePath: string;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
154
|
declare const __VFS_PATCH__ = "__VFS_PATCH__";
|
|
221
155
|
declare const __VFS_REVERT__ = "__VFS_REVERT__";
|
|
222
156
|
type OutputModeType = "fs" | "virtual";
|
|
223
|
-
interface
|
|
157
|
+
interface VirtualFileMetadata {
|
|
224
158
|
/**
|
|
225
|
-
* The
|
|
226
|
-
*
|
|
227
|
-
* @remarks
|
|
228
|
-
* If no specific id is provided, it defaults to the file's {@link path}.
|
|
159
|
+
* The identifier for the file data.
|
|
229
160
|
*/
|
|
230
161
|
id: string;
|
|
231
162
|
/**
|
|
232
|
-
*
|
|
163
|
+
* The timestamp of the virtual file.
|
|
233
164
|
*/
|
|
234
|
-
|
|
165
|
+
timestamp: number;
|
|
235
166
|
/**
|
|
236
|
-
* The
|
|
167
|
+
* The type of the file.
|
|
237
168
|
*
|
|
238
169
|
* @remarks
|
|
239
170
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
@@ -241,52 +172,72 @@ interface VirtualFile {
|
|
|
241
172
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
242
173
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
243
174
|
*/
|
|
244
|
-
|
|
175
|
+
type: string;
|
|
245
176
|
/**
|
|
246
177
|
* The output mode of the file.
|
|
247
|
-
*
|
|
248
|
-
* @remarks
|
|
249
|
-
* This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
|
|
250
178
|
*/
|
|
251
|
-
mode:
|
|
252
|
-
/**
|
|
253
|
-
* A virtual (or actual) path to the file in the file system.
|
|
254
|
-
*/
|
|
255
|
-
path: string;
|
|
179
|
+
mode: string;
|
|
256
180
|
/**
|
|
257
|
-
*
|
|
181
|
+
* Additional metadata associated with the file.
|
|
258
182
|
*/
|
|
259
|
-
|
|
183
|
+
properties: Record<string, string>;
|
|
260
184
|
}
|
|
261
|
-
interface
|
|
185
|
+
interface VirtualFileData {
|
|
262
186
|
/**
|
|
263
187
|
* The identifier for the file data.
|
|
264
188
|
*/
|
|
265
|
-
id
|
|
189
|
+
id?: string;
|
|
266
190
|
/**
|
|
267
|
-
* The
|
|
191
|
+
* The contents of the virtual file.
|
|
192
|
+
*/
|
|
193
|
+
code: string;
|
|
194
|
+
/**
|
|
195
|
+
* The type of the file.
|
|
196
|
+
*
|
|
197
|
+
* @remarks
|
|
198
|
+
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
199
|
+
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
200
|
+
* - `entry`: Indicates that the file is an entry point for execution.
|
|
201
|
+
* - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
|
|
202
|
+
* - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
|
|
203
|
+
* - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
|
|
204
|
+
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
268
205
|
*/
|
|
269
|
-
|
|
206
|
+
type?: string;
|
|
270
207
|
/**
|
|
271
208
|
* The output mode of the file.
|
|
272
209
|
*/
|
|
273
|
-
mode
|
|
210
|
+
mode?: string;
|
|
274
211
|
/**
|
|
275
212
|
* Additional metadata associated with the file.
|
|
276
213
|
*/
|
|
277
|
-
properties
|
|
214
|
+
properties?: Record<string, string>;
|
|
215
|
+
}
|
|
216
|
+
interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
|
|
217
|
+
/**
|
|
218
|
+
* An additional name for the file.
|
|
219
|
+
*/
|
|
220
|
+
path: string;
|
|
221
|
+
/**
|
|
222
|
+
* The timestamp of the virtual file.
|
|
223
|
+
*/
|
|
224
|
+
timestamp: number;
|
|
278
225
|
}
|
|
279
226
|
interface ResolveFSOptions {
|
|
280
227
|
mode?: OutputModeType;
|
|
281
228
|
}
|
|
282
229
|
type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
|
|
283
230
|
interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
231
|
+
/**
|
|
232
|
+
* Should the file skip formatting before being written?
|
|
233
|
+
*
|
|
234
|
+
* @defaultValue false
|
|
235
|
+
*/
|
|
284
236
|
skipFormat?: boolean;
|
|
285
237
|
}
|
|
286
238
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
287
239
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
288
|
-
type
|
|
289
|
-
type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
|
|
240
|
+
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
290
241
|
interface ResolvePathOptions extends ResolveFSOptions {
|
|
291
242
|
/**
|
|
292
243
|
* Should the resolved path include the file extension?
|
|
@@ -301,7 +252,7 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
301
252
|
/**
|
|
302
253
|
* The type of the path to resolve.
|
|
303
254
|
*/
|
|
304
|
-
|
|
255
|
+
pathType?: "file" | "directory";
|
|
305
256
|
}
|
|
306
257
|
interface VirtualFileSystemInterface {
|
|
307
258
|
/**
|
|
@@ -590,6 +541,70 @@ interface VirtualFileSystemInterface {
|
|
|
590
541
|
dispose: () => Promise<void>;
|
|
591
542
|
}
|
|
592
543
|
|
|
544
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
545
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
546
|
+
/**
|
|
547
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
548
|
+
*
|
|
549
|
+
* @remarks
|
|
550
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
551
|
+
* - `minimal` - Only the essential type information is captured.
|
|
552
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
553
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
554
|
+
*/
|
|
555
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
556
|
+
interface DeepkitOptions {
|
|
557
|
+
/**
|
|
558
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
559
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
560
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
561
|
+
*/
|
|
562
|
+
reflection?: RawReflectionMode;
|
|
563
|
+
/**
|
|
564
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
565
|
+
*
|
|
566
|
+
* @remarks
|
|
567
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
568
|
+
* - `minimal` - Only the essential type information is captured.
|
|
569
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
570
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
571
|
+
*/
|
|
572
|
+
reflectionLevel?: ReflectionLevel;
|
|
573
|
+
}
|
|
574
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
575
|
+
/**
|
|
576
|
+
* The TypeScript compiler configuration.
|
|
577
|
+
*
|
|
578
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
579
|
+
*/
|
|
580
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
581
|
+
/**
|
|
582
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
583
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
584
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
585
|
+
*/
|
|
586
|
+
reflection?: RawReflectionMode;
|
|
587
|
+
/**
|
|
588
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
592
|
+
* - `minimal` - Only the essential type information is captured.
|
|
593
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
594
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
595
|
+
*/
|
|
596
|
+
reflectionLevel?: ReflectionLevel;
|
|
597
|
+
/**
|
|
598
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
599
|
+
*/
|
|
600
|
+
compilerOptions?: TSCompilerOptions;
|
|
601
|
+
}
|
|
602
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
603
|
+
originalTsconfigJson: TsConfigJson;
|
|
604
|
+
tsconfigJson: TSConfig;
|
|
605
|
+
tsconfigFilePath: string;
|
|
606
|
+
};
|
|
607
|
+
|
|
593
608
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
594
609
|
/**
|
|
595
610
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
@@ -1137,7 +1152,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1137
1152
|
* @param path - An optional path to write the builtin file to
|
|
1138
1153
|
* @param options - Options for writing the file
|
|
1139
1154
|
*/
|
|
1140
|
-
|
|
1155
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1141
1156
|
/**
|
|
1142
1157
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1143
1158
|
*
|
|
@@ -1145,11 +1160,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1145
1160
|
* @param path - An optional path to write the entry file to
|
|
1146
1161
|
* @param options - Options for writing the file
|
|
1147
1162
|
*/
|
|
1148
|
-
|
|
1149
|
-
/**
|
|
1150
|
-
* Parses the source code and returns a {@link ParseResult} object.
|
|
1151
|
-
*/
|
|
1152
|
-
parse: (code: string, id: string, options?: ParserOptions | null) => Promise<ParseResult>;
|
|
1163
|
+
emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1153
1164
|
/**
|
|
1154
1165
|
* A function to update the context fields using a new user configuration options
|
|
1155
1166
|
*/
|
|
@@ -1371,6 +1382,12 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1371
1382
|
resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
|
|
1372
1383
|
isEntry: boolean;
|
|
1373
1384
|
}) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
|
|
1385
|
+
/**
|
|
1386
|
+
* An API object that can be used for inter-plugin communication.
|
|
1387
|
+
*
|
|
1388
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
1389
|
+
*/
|
|
1390
|
+
api?: Record<string, any>;
|
|
1374
1391
|
};
|
|
1375
1392
|
type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
|
|
1376
1393
|
[TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
|
|
@@ -8,13 +8,11 @@ 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 { ParserOptions, ParseResult } from 'oxc-parser';
|
|
12
11
|
import { Range } from 'semver';
|
|
13
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';
|
|
14
14
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
15
15
|
import ts from 'typescript';
|
|
16
|
-
import { PrimitiveJsonValue } from '@stryke/json/types';
|
|
17
|
-
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
18
16
|
import { ArrayValues } from '@stryke/types/array';
|
|
19
17
|
|
|
20
18
|
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
@@ -153,87 +151,20 @@ interface BuildConfig {
|
|
|
153
151
|
}
|
|
154
152
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
155
153
|
|
|
156
|
-
type ReflectionMode = "default" | "explicit" | "never";
|
|
157
|
-
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
158
|
-
/**
|
|
159
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
160
|
-
*
|
|
161
|
-
* @remarks
|
|
162
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
163
|
-
* - `minimal` - Only the essential type information is captured.
|
|
164
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
165
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
166
|
-
*/
|
|
167
|
-
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
168
|
-
interface DeepkitOptions {
|
|
169
|
-
/**
|
|
170
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
171
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
172
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
173
|
-
*/
|
|
174
|
-
reflection?: RawReflectionMode;
|
|
175
|
-
/**
|
|
176
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
177
|
-
*
|
|
178
|
-
* @remarks
|
|
179
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
180
|
-
* - `minimal` - Only the essential type information is captured.
|
|
181
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
182
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
183
|
-
*/
|
|
184
|
-
reflectionLevel?: ReflectionLevel;
|
|
185
|
-
}
|
|
186
|
-
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
187
|
-
/**
|
|
188
|
-
* The TypeScript compiler configuration.
|
|
189
|
-
*
|
|
190
|
-
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
191
|
-
*/
|
|
192
|
-
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
193
|
-
/**
|
|
194
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
195
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
196
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
197
|
-
*/
|
|
198
|
-
reflection?: RawReflectionMode;
|
|
199
|
-
/**
|
|
200
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
204
|
-
* - `minimal` - Only the essential type information is captured.
|
|
205
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
206
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
207
|
-
*/
|
|
208
|
-
reflectionLevel?: ReflectionLevel;
|
|
209
|
-
/**
|
|
210
|
-
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
211
|
-
*/
|
|
212
|
-
compilerOptions?: TSCompilerOptions;
|
|
213
|
-
}
|
|
214
|
-
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
215
|
-
originalTsconfigJson: TsConfigJson;
|
|
216
|
-
tsconfigJson: TSConfig;
|
|
217
|
-
tsconfigFilePath: string;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
154
|
declare const __VFS_PATCH__ = "__VFS_PATCH__";
|
|
221
155
|
declare const __VFS_REVERT__ = "__VFS_REVERT__";
|
|
222
156
|
type OutputModeType = "fs" | "virtual";
|
|
223
|
-
interface
|
|
157
|
+
interface VirtualFileMetadata {
|
|
224
158
|
/**
|
|
225
|
-
* The
|
|
226
|
-
*
|
|
227
|
-
* @remarks
|
|
228
|
-
* If no specific id is provided, it defaults to the file's {@link path}.
|
|
159
|
+
* The identifier for the file data.
|
|
229
160
|
*/
|
|
230
161
|
id: string;
|
|
231
162
|
/**
|
|
232
|
-
*
|
|
163
|
+
* The timestamp of the virtual file.
|
|
233
164
|
*/
|
|
234
|
-
|
|
165
|
+
timestamp: number;
|
|
235
166
|
/**
|
|
236
|
-
* The
|
|
167
|
+
* The type of the file.
|
|
237
168
|
*
|
|
238
169
|
* @remarks
|
|
239
170
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
@@ -241,52 +172,72 @@ interface VirtualFile {
|
|
|
241
172
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
242
173
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
243
174
|
*/
|
|
244
|
-
|
|
175
|
+
type: string;
|
|
245
176
|
/**
|
|
246
177
|
* The output mode of the file.
|
|
247
|
-
*
|
|
248
|
-
* @remarks
|
|
249
|
-
* This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
|
|
250
178
|
*/
|
|
251
|
-
mode:
|
|
252
|
-
/**
|
|
253
|
-
* A virtual (or actual) path to the file in the file system.
|
|
254
|
-
*/
|
|
255
|
-
path: string;
|
|
179
|
+
mode: string;
|
|
256
180
|
/**
|
|
257
|
-
*
|
|
181
|
+
* Additional metadata associated with the file.
|
|
258
182
|
*/
|
|
259
|
-
|
|
183
|
+
properties: Record<string, string>;
|
|
260
184
|
}
|
|
261
|
-
interface
|
|
185
|
+
interface VirtualFileData {
|
|
262
186
|
/**
|
|
263
187
|
* The identifier for the file data.
|
|
264
188
|
*/
|
|
265
|
-
id
|
|
189
|
+
id?: string;
|
|
266
190
|
/**
|
|
267
|
-
* The
|
|
191
|
+
* The contents of the virtual file.
|
|
192
|
+
*/
|
|
193
|
+
code: string;
|
|
194
|
+
/**
|
|
195
|
+
* The type of the file.
|
|
196
|
+
*
|
|
197
|
+
* @remarks
|
|
198
|
+
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
199
|
+
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
200
|
+
* - `entry`: Indicates that the file is an entry point for execution.
|
|
201
|
+
* - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
|
|
202
|
+
* - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
|
|
203
|
+
* - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
|
|
204
|
+
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
268
205
|
*/
|
|
269
|
-
|
|
206
|
+
type?: string;
|
|
270
207
|
/**
|
|
271
208
|
* The output mode of the file.
|
|
272
209
|
*/
|
|
273
|
-
mode
|
|
210
|
+
mode?: string;
|
|
274
211
|
/**
|
|
275
212
|
* Additional metadata associated with the file.
|
|
276
213
|
*/
|
|
277
|
-
properties
|
|
214
|
+
properties?: Record<string, string>;
|
|
215
|
+
}
|
|
216
|
+
interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
|
|
217
|
+
/**
|
|
218
|
+
* An additional name for the file.
|
|
219
|
+
*/
|
|
220
|
+
path: string;
|
|
221
|
+
/**
|
|
222
|
+
* The timestamp of the virtual file.
|
|
223
|
+
*/
|
|
224
|
+
timestamp: number;
|
|
278
225
|
}
|
|
279
226
|
interface ResolveFSOptions {
|
|
280
227
|
mode?: OutputModeType;
|
|
281
228
|
}
|
|
282
229
|
type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
|
|
283
230
|
interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
231
|
+
/**
|
|
232
|
+
* Should the file skip formatting before being written?
|
|
233
|
+
*
|
|
234
|
+
* @defaultValue false
|
|
235
|
+
*/
|
|
284
236
|
skipFormat?: boolean;
|
|
285
237
|
}
|
|
286
238
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
287
239
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
288
|
-
type
|
|
289
|
-
type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
|
|
240
|
+
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
290
241
|
interface ResolvePathOptions extends ResolveFSOptions {
|
|
291
242
|
/**
|
|
292
243
|
* Should the resolved path include the file extension?
|
|
@@ -301,7 +252,7 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
301
252
|
/**
|
|
302
253
|
* The type of the path to resolve.
|
|
303
254
|
*/
|
|
304
|
-
|
|
255
|
+
pathType?: "file" | "directory";
|
|
305
256
|
}
|
|
306
257
|
interface VirtualFileSystemInterface {
|
|
307
258
|
/**
|
|
@@ -590,6 +541,70 @@ interface VirtualFileSystemInterface {
|
|
|
590
541
|
dispose: () => Promise<void>;
|
|
591
542
|
}
|
|
592
543
|
|
|
544
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
545
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
546
|
+
/**
|
|
547
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
548
|
+
*
|
|
549
|
+
* @remarks
|
|
550
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
551
|
+
* - `minimal` - Only the essential type information is captured.
|
|
552
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
553
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
554
|
+
*/
|
|
555
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
556
|
+
interface DeepkitOptions {
|
|
557
|
+
/**
|
|
558
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
559
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
560
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
561
|
+
*/
|
|
562
|
+
reflection?: RawReflectionMode;
|
|
563
|
+
/**
|
|
564
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
565
|
+
*
|
|
566
|
+
* @remarks
|
|
567
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
568
|
+
* - `minimal` - Only the essential type information is captured.
|
|
569
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
570
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
571
|
+
*/
|
|
572
|
+
reflectionLevel?: ReflectionLevel;
|
|
573
|
+
}
|
|
574
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
575
|
+
/**
|
|
576
|
+
* The TypeScript compiler configuration.
|
|
577
|
+
*
|
|
578
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
579
|
+
*/
|
|
580
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
581
|
+
/**
|
|
582
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
583
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
584
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
585
|
+
*/
|
|
586
|
+
reflection?: RawReflectionMode;
|
|
587
|
+
/**
|
|
588
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
592
|
+
* - `minimal` - Only the essential type information is captured.
|
|
593
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
594
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
595
|
+
*/
|
|
596
|
+
reflectionLevel?: ReflectionLevel;
|
|
597
|
+
/**
|
|
598
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
599
|
+
*/
|
|
600
|
+
compilerOptions?: TSCompilerOptions;
|
|
601
|
+
}
|
|
602
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
603
|
+
originalTsconfigJson: TsConfigJson;
|
|
604
|
+
tsconfigJson: TSConfig;
|
|
605
|
+
tsconfigFilePath: string;
|
|
606
|
+
};
|
|
607
|
+
|
|
593
608
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
594
609
|
/**
|
|
595
610
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
@@ -1137,7 +1152,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1137
1152
|
* @param path - An optional path to write the builtin file to
|
|
1138
1153
|
* @param options - Options for writing the file
|
|
1139
1154
|
*/
|
|
1140
|
-
|
|
1155
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1141
1156
|
/**
|
|
1142
1157
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1143
1158
|
*
|
|
@@ -1145,11 +1160,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1145
1160
|
* @param path - An optional path to write the entry file to
|
|
1146
1161
|
* @param options - Options for writing the file
|
|
1147
1162
|
*/
|
|
1148
|
-
|
|
1149
|
-
/**
|
|
1150
|
-
* Parses the source code and returns a {@link ParseResult} object.
|
|
1151
|
-
*/
|
|
1152
|
-
parse: (code: string, id: string, options?: ParserOptions | null) => Promise<ParseResult>;
|
|
1163
|
+
emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1153
1164
|
/**
|
|
1154
1165
|
* A function to update the context fields using a new user configuration options
|
|
1155
1166
|
*/
|
|
@@ -1371,6 +1382,12 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1371
1382
|
resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
|
|
1372
1383
|
isEntry: boolean;
|
|
1373
1384
|
}) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
|
|
1385
|
+
/**
|
|
1386
|
+
* An API object that can be used for inter-plugin communication.
|
|
1387
|
+
*
|
|
1388
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
1389
|
+
*/
|
|
1390
|
+
api?: Record<string, any>;
|
|
1374
1391
|
};
|
|
1375
1392
|
type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
|
|
1376
1393
|
[TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
|
package/dist/index.cjs
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function d(e={}){return {name:"id",async config(){this.log(types$1.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `id` build plugin.");const i={id:o__default.default(e,{type:"nanoid"})};return (!i.id.type||!["nanoid"].includes(i.id.type))&&(i.id.type&&this.log(types$1.LogLevelLabel.WARN,`Invalid ID generation type "${i.id.type}" specified. Defaulting to "nanoid".`),i.id.type="nanoid"),this.log(types$1.LogLevelLabel.DEBUG,`Using ID generation library: ${i.id.type}`),i},async prepare(){this.log(types$1.LogLevelLabel.TRACE,"Preparing the ID runtime artifacts for the Powerlines project.");let i;switch(this.config.id.type){case "nanoid":default:i=nanoid.nanoidModule;break}await this.
|
|
7
|
+
function d(e={}){return {name:"id",async config(){this.log(types$1.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `id` build plugin.");const i={id:o__default.default(e,{type:"nanoid"})};return (!i.id.type||!["nanoid"].includes(i.id.type))&&(i.id.type&&this.log(types$1.LogLevelLabel.WARN,`Invalid ID generation type "${i.id.type}" specified. Defaulting to "nanoid".`),i.id.type="nanoid"),this.log(types$1.LogLevelLabel.DEBUG,`Using ID generation library: ${i.id.type}`),i},async prepare(){this.log(types$1.LogLevelLabel.TRACE,"Preparing the ID runtime artifacts for the Powerlines project.");let i;switch(this.config.id.type){case "nanoid":default:i=nanoid.nanoidModule;break}await this.emitBuiltin(await Promise.resolve(i(this)),"id","id.ts");}}}chunkFBBMZ4NC_cjs.a(d,"plugin");var y=d;exports.default=y;exports.plugin=d;Object.keys(components).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return components[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-
|
|
2
|
-
export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-
|
|
1
|
+
import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-Br82OUwZ.cjs';
|
|
2
|
+
export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-Br82OUwZ.cjs';
|
|
3
3
|
export { nanoidModule } from './components/nanoid.cjs';
|
|
4
4
|
import '@storm-software/build-tools/types';
|
|
5
5
|
import '@storm-software/config-tools/types';
|
|
@@ -11,13 +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 'oxc-parser';
|
|
15
14
|
import 'semver';
|
|
16
15
|
import 'unplugin';
|
|
16
|
+
import 'node:fs';
|
|
17
17
|
import '@stryke/types/tsconfig';
|
|
18
18
|
import 'typescript';
|
|
19
|
-
import '@stryke/json/types';
|
|
20
|
-
import 'node:fs';
|
|
21
19
|
import '@stryke/types/array';
|
|
22
20
|
|
|
23
21
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-
|
|
2
|
-
export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-
|
|
1
|
+
import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-Br82OUwZ.js';
|
|
2
|
+
export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-Br82OUwZ.js';
|
|
3
3
|
export { nanoidModule } from './components/nanoid.js';
|
|
4
4
|
import '@storm-software/build-tools/types';
|
|
5
5
|
import '@storm-software/config-tools/types';
|
|
@@ -11,13 +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 'oxc-parser';
|
|
15
14
|
import 'semver';
|
|
16
15
|
import 'unplugin';
|
|
16
|
+
import 'node:fs';
|
|
17
17
|
import '@stryke/types/tsconfig';
|
|
18
18
|
import 'typescript';
|
|
19
|
-
import '@stryke/json/types';
|
|
20
|
-
import 'node:fs';
|
|
21
19
|
import '@stryke/types/array';
|
|
22
20
|
|
|
23
21
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,4 @@ import {a}from'./chunk-UCUR73HG.js';import {LogLevelLabel}from'@storm-software/c
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function d(e={}){return {name:"id",async config(){this.log(LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `id` build plugin.");const i={id:o(e,{type:"nanoid"})};return (!i.id.type||!["nanoid"].includes(i.id.type))&&(i.id.type&&this.log(LogLevelLabel.WARN,`Invalid ID generation type "${i.id.type}" specified. Defaulting to "nanoid".`),i.id.type="nanoid"),this.log(LogLevelLabel.DEBUG,`Using ID generation library: ${i.id.type}`),i},async prepare(){this.log(LogLevelLabel.TRACE,"Preparing the ID runtime artifacts for the Powerlines project.");let i;switch(this.config.id.type){case "nanoid":default:i=nanoidModule;break}await this.
|
|
7
|
+
function d(e={}){return {name:"id",async config(){this.log(LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `id` build plugin.");const i={id:o(e,{type:"nanoid"})};return (!i.id.type||!["nanoid"].includes(i.id.type))&&(i.id.type&&this.log(LogLevelLabel.WARN,`Invalid ID generation type "${i.id.type}" specified. Defaulting to "nanoid".`),i.id.type="nanoid"),this.log(LogLevelLabel.DEBUG,`Using ID generation library: ${i.id.type}`),i},async prepare(){this.log(LogLevelLabel.TRACE,"Preparing the ID runtime artifacts for the Powerlines project.");let i;switch(this.config.id.type){case "nanoid":default:i=nanoidModule;break}await this.emitBuiltin(await Promise.resolve(i(this)),"id","id.ts");}}}a(d,"plugin");var h=d;export{h as default,d as plugin};
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-
|
|
1
|
+
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-Br82OUwZ.cjs';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -9,11 +9,9 @@ import 'vite';
|
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
10
|
import '@stryke/types/package-json';
|
|
11
11
|
import 'jiti';
|
|
12
|
-
import 'oxc-parser';
|
|
13
12
|
import 'semver';
|
|
14
13
|
import 'unplugin';
|
|
14
|
+
import 'node:fs';
|
|
15
15
|
import '@stryke/types/tsconfig';
|
|
16
16
|
import 'typescript';
|
|
17
|
-
import '@stryke/json/types';
|
|
18
|
-
import 'node:fs';
|
|
19
17
|
import '@stryke/types/array';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-
|
|
1
|
+
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-Br82OUwZ.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -9,11 +9,9 @@ import 'vite';
|
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
10
|
import '@stryke/types/package-json';
|
|
11
11
|
import 'jiti';
|
|
12
|
-
import 'oxc-parser';
|
|
13
12
|
import 'semver';
|
|
14
13
|
import 'unplugin';
|
|
14
|
+
import 'node:fs';
|
|
15
15
|
import '@stryke/types/tsconfig';
|
|
16
16
|
import 'typescript';
|
|
17
|
-
import '@stryke/json/types';
|
|
18
|
-
import 'node:fs';
|
|
19
17
|
import '@stryke/types/array';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-
|
|
1
|
+
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-Br82OUwZ.cjs';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -9,11 +9,9 @@ import 'vite';
|
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
10
|
import '@stryke/types/package-json';
|
|
11
11
|
import 'jiti';
|
|
12
|
-
import 'oxc-parser';
|
|
13
12
|
import 'semver';
|
|
14
13
|
import 'unplugin';
|
|
14
|
+
import 'node:fs';
|
|
15
15
|
import '@stryke/types/tsconfig';
|
|
16
16
|
import 'typescript';
|
|
17
|
-
import '@stryke/json/types';
|
|
18
|
-
import 'node:fs';
|
|
19
17
|
import '@stryke/types/array';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-
|
|
1
|
+
export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-Br82OUwZ.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -9,11 +9,9 @@ import 'vite';
|
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
10
|
import '@stryke/types/package-json';
|
|
11
11
|
import 'jiti';
|
|
12
|
-
import 'oxc-parser';
|
|
13
12
|
import 'semver';
|
|
14
13
|
import 'unplugin';
|
|
14
|
+
import 'node:fs';
|
|
15
15
|
import '@stryke/types/tsconfig';
|
|
16
16
|
import 'typescript';
|
|
17
|
-
import '@stryke/json/types';
|
|
18
|
-
import 'node:fs';
|
|
19
17
|
import '@stryke/types/array';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-id",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
|
|
6
6
|
"repository": {
|
|
@@ -116,16 +116,16 @@
|
|
|
116
116
|
"files": ["dist/**/*"],
|
|
117
117
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@storm-software/config-tools": "^1.188.
|
|
119
|
+
"@storm-software/config-tools": "^1.188.47",
|
|
120
120
|
"@stryke/path": "^0.19.2",
|
|
121
121
|
"defu": "^6.1.4",
|
|
122
|
-
"powerlines": "^0.23.
|
|
122
|
+
"powerlines": "^0.23.5"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@powerlines/nx": "^0.10.
|
|
126
|
-
"@storm-software/tsup": "^0.2.
|
|
125
|
+
"@powerlines/nx": "^0.10.22",
|
|
126
|
+
"@storm-software/tsup": "^0.2.45",
|
|
127
127
|
"@types/node": "^24.10.1"
|
|
128
128
|
},
|
|
129
129
|
"publishConfig": { "access": "public" },
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "50a08b483769a727b5d7c3a2f38e022e21ee915d"
|
|
131
131
|
}
|