@powerlines/plugin-id 0.9.54 → 0.9.55
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 +4 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/nanoid.d.cts +4 -1
- package/dist/components/nanoid.d.ts +4 -1
- package/dist/{index-50fDVT85.d.cts → index-BOQhbVDi.d.cts} +75 -5
- package/dist/{index-50fDVT85.d.ts → index-BOQhbVDi.d.ts} +75 -5
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/types/index.d.cts +4 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/plugin.d.cts +4 -1
- package/dist/types/plugin.d.ts +4 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { nanoidModule } from './nanoid.cjs';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-BOQhbVDi.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { nanoidModule } from './nanoid.js';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-BOQhbVDi.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IdPluginContext } from '../index-
|
|
1
|
+
import { a as IdPluginContext } from '../index-BOQhbVDi.cjs';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -7,11 +7,14 @@ import '@stryke/types/configuration';
|
|
|
7
7
|
import '@stryke/types/file';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/http/fetch';
|
|
10
11
|
import '@stryke/types/package-json';
|
|
11
12
|
import 'jiti';
|
|
12
13
|
import 'magic-string';
|
|
14
|
+
import 'oxc-parser';
|
|
13
15
|
import 'semver';
|
|
14
16
|
import 'ts-morph';
|
|
17
|
+
import 'undici';
|
|
15
18
|
import 'unplugin';
|
|
16
19
|
import '@stryke/fs/resolve';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IdPluginContext } from '../index-
|
|
1
|
+
import { a as IdPluginContext } from '../index-BOQhbVDi.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -7,11 +7,14 @@ import '@stryke/types/configuration';
|
|
|
7
7
|
import '@stryke/types/file';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/http/fetch';
|
|
10
11
|
import '@stryke/types/package-json';
|
|
11
12
|
import 'jiti';
|
|
12
13
|
import 'magic-string';
|
|
14
|
+
import 'oxc-parser';
|
|
13
15
|
import 'semver';
|
|
14
16
|
import 'ts-morph';
|
|
17
|
+
import 'undici';
|
|
15
18
|
import 'unplugin';
|
|
16
19
|
import '@stryke/fs/resolve';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
|
@@ -6,11 +6,14 @@ import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configura
|
|
|
6
6
|
import { AssetGlob } from '@stryke/types/file';
|
|
7
7
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
8
8
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
9
|
+
import { FetchRequestOptions } from '@stryke/http/fetch';
|
|
9
10
|
import { PackageJson } from '@stryke/types/package-json';
|
|
10
11
|
import { Jiti } from 'jiti';
|
|
11
12
|
import { SourceMap } from 'magic-string';
|
|
13
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
12
14
|
import { Range } from 'semver';
|
|
13
15
|
import { Project } from 'ts-morph';
|
|
16
|
+
import { RequestInfo, Response } from 'undici';
|
|
14
17
|
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
15
18
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
16
19
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
@@ -616,6 +619,22 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
|
|
|
616
619
|
*/
|
|
617
620
|
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
618
621
|
type ProjectType = "application" | "library";
|
|
622
|
+
interface DeployConfig {
|
|
623
|
+
/**
|
|
624
|
+
* The deployment variant being used by the Powerlines engine.
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* ```ts
|
|
628
|
+
* export default defineConfig({
|
|
629
|
+
* deploy: {
|
|
630
|
+
* variant: "cloudflare"
|
|
631
|
+
* }
|
|
632
|
+
* });
|
|
633
|
+
*
|
|
634
|
+
* ```
|
|
635
|
+
*/
|
|
636
|
+
variant?: string;
|
|
637
|
+
}
|
|
619
638
|
interface OutputConfig {
|
|
620
639
|
/**
|
|
621
640
|
* The path to output the final compiled files to
|
|
@@ -738,7 +757,7 @@ interface BaseConfig {
|
|
|
738
757
|
* @remarks
|
|
739
758
|
* If set to `false`, the deployment will be disabled.
|
|
740
759
|
*/
|
|
741
|
-
deploy?:
|
|
760
|
+
deploy?: DeployConfig | false;
|
|
742
761
|
/**
|
|
743
762
|
* The path to the tsconfig file to be used by the compiler
|
|
744
763
|
*
|
|
@@ -865,7 +884,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
865
884
|
*/
|
|
866
885
|
framework?: string;
|
|
867
886
|
}
|
|
868
|
-
|
|
887
|
+
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
869
888
|
/**
|
|
870
889
|
* Configuration provided to build processes
|
|
871
890
|
*
|
|
@@ -885,7 +904,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
|
|
|
885
904
|
*/
|
|
886
905
|
override?: Partial<TBuildResolvedConfig>;
|
|
887
906
|
};
|
|
888
|
-
}
|
|
907
|
+
}
|
|
889
908
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
890
909
|
/**
|
|
891
910
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -924,7 +943,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
|
|
|
924
943
|
/**
|
|
925
944
|
* The resolved options for the Powerlines project configuration.
|
|
926
945
|
*/
|
|
927
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
|
|
946
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
|
|
928
947
|
/**
|
|
929
948
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
930
949
|
*/
|
|
@@ -1011,6 +1030,18 @@ interface InitContextOptions {
|
|
|
1011
1030
|
*/
|
|
1012
1031
|
isHighPriority: boolean;
|
|
1013
1032
|
}
|
|
1033
|
+
interface FetchOptions extends FetchRequestOptions {
|
|
1034
|
+
/**
|
|
1035
|
+
* An indicator specifying that the request should bypass any caching
|
|
1036
|
+
*/
|
|
1037
|
+
skipCache?: boolean;
|
|
1038
|
+
}
|
|
1039
|
+
interface ParseOptions extends ParserOptions {
|
|
1040
|
+
/**
|
|
1041
|
+
* When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
|
|
1042
|
+
*/
|
|
1043
|
+
allowReturnOutsideFunction?: boolean;
|
|
1044
|
+
}
|
|
1014
1045
|
/**
|
|
1015
1046
|
* The unresolved Powerlines context.
|
|
1016
1047
|
*
|
|
@@ -1027,6 +1058,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1027
1058
|
*/
|
|
1028
1059
|
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1029
1060
|
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1061
|
+
sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
|
|
1030
1062
|
output: TResolvedConfig["output"];
|
|
1031
1063
|
};
|
|
1032
1064
|
/**
|
|
@@ -1146,6 +1178,44 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1146
1178
|
* This instance is created lazily on first access.
|
|
1147
1179
|
*/
|
|
1148
1180
|
program: Project;
|
|
1181
|
+
/**
|
|
1182
|
+
* A function to perform HTTP fetch requests
|
|
1183
|
+
*
|
|
1184
|
+
* @remarks
|
|
1185
|
+
* This function uses a caching layer to avoid duplicate requests during the Powerlines process.
|
|
1186
|
+
*
|
|
1187
|
+
* @example
|
|
1188
|
+
* ```ts
|
|
1189
|
+
* const response = await context.fetch("https://api.example.com/data");
|
|
1190
|
+
* const data = await response.json();
|
|
1191
|
+
* ```
|
|
1192
|
+
*
|
|
1193
|
+
* @see https://github.com/nodejs/undici
|
|
1194
|
+
*
|
|
1195
|
+
* @param input - The URL to fetch.
|
|
1196
|
+
* @param options - The fetch request options.
|
|
1197
|
+
* @returns A promise that resolves to a response returned by the fetch.
|
|
1198
|
+
*/
|
|
1199
|
+
fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1202
|
+
*
|
|
1203
|
+
* @remarks
|
|
1204
|
+
* This function can be used to parse TypeScript code into an AST for further analysis or transformation.
|
|
1205
|
+
*
|
|
1206
|
+
* @example
|
|
1207
|
+
* ```ts
|
|
1208
|
+
* const ast = context.parse("const x: number = 42;");
|
|
1209
|
+
* ```
|
|
1210
|
+
*
|
|
1211
|
+
* @see https://rollupjs.org/plugin-development/#this-parse
|
|
1212
|
+
* @see https://github.com/oxc/oxc
|
|
1213
|
+
*
|
|
1214
|
+
* @param code - The source code to parse.
|
|
1215
|
+
* @param options - The options to pass to the parser.
|
|
1216
|
+
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1217
|
+
*/
|
|
1218
|
+
parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
|
|
1149
1219
|
/**
|
|
1150
1220
|
* A helper function to resolve modules using the Jiti resolver
|
|
1151
1221
|
*
|
|
@@ -1245,7 +1315,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1245
1315
|
*/
|
|
1246
1316
|
logger: LogFn;
|
|
1247
1317
|
}
|
|
1248
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =
|
|
1318
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
1249
1319
|
|
|
1250
1320
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1251
1321
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
@@ -6,11 +6,14 @@ import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configura
|
|
|
6
6
|
import { AssetGlob } from '@stryke/types/file';
|
|
7
7
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
8
8
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
9
|
+
import { FetchRequestOptions } from '@stryke/http/fetch';
|
|
9
10
|
import { PackageJson } from '@stryke/types/package-json';
|
|
10
11
|
import { Jiti } from 'jiti';
|
|
11
12
|
import { SourceMap } from 'magic-string';
|
|
13
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
12
14
|
import { Range } from 'semver';
|
|
13
15
|
import { Project } from 'ts-morph';
|
|
16
|
+
import { RequestInfo, Response } from 'undici';
|
|
14
17
|
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
15
18
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
16
19
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
@@ -616,6 +619,22 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
|
|
|
616
619
|
*/
|
|
617
620
|
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
618
621
|
type ProjectType = "application" | "library";
|
|
622
|
+
interface DeployConfig {
|
|
623
|
+
/**
|
|
624
|
+
* The deployment variant being used by the Powerlines engine.
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* ```ts
|
|
628
|
+
* export default defineConfig({
|
|
629
|
+
* deploy: {
|
|
630
|
+
* variant: "cloudflare"
|
|
631
|
+
* }
|
|
632
|
+
* });
|
|
633
|
+
*
|
|
634
|
+
* ```
|
|
635
|
+
*/
|
|
636
|
+
variant?: string;
|
|
637
|
+
}
|
|
619
638
|
interface OutputConfig {
|
|
620
639
|
/**
|
|
621
640
|
* The path to output the final compiled files to
|
|
@@ -738,7 +757,7 @@ interface BaseConfig {
|
|
|
738
757
|
* @remarks
|
|
739
758
|
* If set to `false`, the deployment will be disabled.
|
|
740
759
|
*/
|
|
741
|
-
deploy?:
|
|
760
|
+
deploy?: DeployConfig | false;
|
|
742
761
|
/**
|
|
743
762
|
* The path to the tsconfig file to be used by the compiler
|
|
744
763
|
*
|
|
@@ -865,7 +884,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
865
884
|
*/
|
|
866
885
|
framework?: string;
|
|
867
886
|
}
|
|
868
|
-
|
|
887
|
+
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
869
888
|
/**
|
|
870
889
|
* Configuration provided to build processes
|
|
871
890
|
*
|
|
@@ -885,7 +904,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
|
|
|
885
904
|
*/
|
|
886
905
|
override?: Partial<TBuildResolvedConfig>;
|
|
887
906
|
};
|
|
888
|
-
}
|
|
907
|
+
}
|
|
889
908
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
890
909
|
/**
|
|
891
910
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -924,7 +943,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
|
|
|
924
943
|
/**
|
|
925
944
|
* The resolved options for the Powerlines project configuration.
|
|
926
945
|
*/
|
|
927
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
|
|
946
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
|
|
928
947
|
/**
|
|
929
948
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
930
949
|
*/
|
|
@@ -1011,6 +1030,18 @@ interface InitContextOptions {
|
|
|
1011
1030
|
*/
|
|
1012
1031
|
isHighPriority: boolean;
|
|
1013
1032
|
}
|
|
1033
|
+
interface FetchOptions extends FetchRequestOptions {
|
|
1034
|
+
/**
|
|
1035
|
+
* An indicator specifying that the request should bypass any caching
|
|
1036
|
+
*/
|
|
1037
|
+
skipCache?: boolean;
|
|
1038
|
+
}
|
|
1039
|
+
interface ParseOptions extends ParserOptions {
|
|
1040
|
+
/**
|
|
1041
|
+
* When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
|
|
1042
|
+
*/
|
|
1043
|
+
allowReturnOutsideFunction?: boolean;
|
|
1044
|
+
}
|
|
1014
1045
|
/**
|
|
1015
1046
|
* The unresolved Powerlines context.
|
|
1016
1047
|
*
|
|
@@ -1027,6 +1058,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1027
1058
|
*/
|
|
1028
1059
|
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1029
1060
|
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1061
|
+
sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
|
|
1030
1062
|
output: TResolvedConfig["output"];
|
|
1031
1063
|
};
|
|
1032
1064
|
/**
|
|
@@ -1146,6 +1178,44 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1146
1178
|
* This instance is created lazily on first access.
|
|
1147
1179
|
*/
|
|
1148
1180
|
program: Project;
|
|
1181
|
+
/**
|
|
1182
|
+
* A function to perform HTTP fetch requests
|
|
1183
|
+
*
|
|
1184
|
+
* @remarks
|
|
1185
|
+
* This function uses a caching layer to avoid duplicate requests during the Powerlines process.
|
|
1186
|
+
*
|
|
1187
|
+
* @example
|
|
1188
|
+
* ```ts
|
|
1189
|
+
* const response = await context.fetch("https://api.example.com/data");
|
|
1190
|
+
* const data = await response.json();
|
|
1191
|
+
* ```
|
|
1192
|
+
*
|
|
1193
|
+
* @see https://github.com/nodejs/undici
|
|
1194
|
+
*
|
|
1195
|
+
* @param input - The URL to fetch.
|
|
1196
|
+
* @param options - The fetch request options.
|
|
1197
|
+
* @returns A promise that resolves to a response returned by the fetch.
|
|
1198
|
+
*/
|
|
1199
|
+
fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1202
|
+
*
|
|
1203
|
+
* @remarks
|
|
1204
|
+
* This function can be used to parse TypeScript code into an AST for further analysis or transformation.
|
|
1205
|
+
*
|
|
1206
|
+
* @example
|
|
1207
|
+
* ```ts
|
|
1208
|
+
* const ast = context.parse("const x: number = 42;");
|
|
1209
|
+
* ```
|
|
1210
|
+
*
|
|
1211
|
+
* @see https://rollupjs.org/plugin-development/#this-parse
|
|
1212
|
+
* @see https://github.com/oxc/oxc
|
|
1213
|
+
*
|
|
1214
|
+
* @param code - The source code to parse.
|
|
1215
|
+
* @param options - The options to pass to the parser.
|
|
1216
|
+
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1217
|
+
*/
|
|
1218
|
+
parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
|
|
1149
1219
|
/**
|
|
1150
1220
|
* A helper function to resolve modules using the Jiti resolver
|
|
1151
1221
|
*
|
|
@@ -1245,7 +1315,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1245
1315
|
*/
|
|
1246
1316
|
logger: LogFn;
|
|
1247
1317
|
}
|
|
1248
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =
|
|
1318
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
1249
1319
|
|
|
1250
1320
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1251
1321
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
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-BOQhbVDi.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-BOQhbVDi.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';
|
|
@@ -9,11 +9,14 @@ import '@stryke/types/configuration';
|
|
|
9
9
|
import '@stryke/types/file';
|
|
10
10
|
import 'vite';
|
|
11
11
|
import '@stryke/env/get-env-paths';
|
|
12
|
+
import '@stryke/http/fetch';
|
|
12
13
|
import '@stryke/types/package-json';
|
|
13
14
|
import 'jiti';
|
|
14
15
|
import 'magic-string';
|
|
16
|
+
import 'oxc-parser';
|
|
15
17
|
import 'semver';
|
|
16
18
|
import 'ts-morph';
|
|
19
|
+
import 'undici';
|
|
17
20
|
import 'unplugin';
|
|
18
21
|
import '@stryke/fs/resolve';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
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-BOQhbVDi.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-BOQhbVDi.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';
|
|
@@ -9,11 +9,14 @@ import '@stryke/types/configuration';
|
|
|
9
9
|
import '@stryke/types/file';
|
|
10
10
|
import 'vite';
|
|
11
11
|
import '@stryke/env/get-env-paths';
|
|
12
|
+
import '@stryke/http/fetch';
|
|
12
13
|
import '@stryke/types/package-json';
|
|
13
14
|
import 'jiti';
|
|
14
15
|
import 'magic-string';
|
|
16
|
+
import 'oxc-parser';
|
|
15
17
|
import 'semver';
|
|
16
18
|
import 'ts-morph';
|
|
19
|
+
import 'undici';
|
|
17
20
|
import 'unplugin';
|
|
18
21
|
import '@stryke/fs/resolve';
|
|
19
22
|
import '@stryke/types/tsconfig';
|
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-BOQhbVDi.cjs';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -7,11 +7,14 @@ import '@stryke/types/configuration';
|
|
|
7
7
|
import '@stryke/types/file';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/http/fetch';
|
|
10
11
|
import '@stryke/types/package-json';
|
|
11
12
|
import 'jiti';
|
|
12
13
|
import 'magic-string';
|
|
14
|
+
import 'oxc-parser';
|
|
13
15
|
import 'semver';
|
|
14
16
|
import 'ts-morph';
|
|
17
|
+
import 'undici';
|
|
15
18
|
import 'unplugin';
|
|
16
19
|
import '@stryke/fs/resolve';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
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-BOQhbVDi.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -7,11 +7,14 @@ import '@stryke/types/configuration';
|
|
|
7
7
|
import '@stryke/types/file';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/http/fetch';
|
|
10
11
|
import '@stryke/types/package-json';
|
|
11
12
|
import 'jiti';
|
|
12
13
|
import 'magic-string';
|
|
14
|
+
import 'oxc-parser';
|
|
13
15
|
import 'semver';
|
|
14
16
|
import 'ts-morph';
|
|
17
|
+
import 'undici';
|
|
15
18
|
import 'unplugin';
|
|
16
19
|
import '@stryke/fs/resolve';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
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-BOQhbVDi.cjs';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -7,11 +7,14 @@ import '@stryke/types/configuration';
|
|
|
7
7
|
import '@stryke/types/file';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/http/fetch';
|
|
10
11
|
import '@stryke/types/package-json';
|
|
11
12
|
import 'jiti';
|
|
12
13
|
import 'magic-string';
|
|
14
|
+
import 'oxc-parser';
|
|
13
15
|
import 'semver';
|
|
14
16
|
import 'ts-morph';
|
|
17
|
+
import 'undici';
|
|
15
18
|
import 'unplugin';
|
|
16
19
|
import '@stryke/fs/resolve';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
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-BOQhbVDi.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
|
@@ -7,11 +7,14 @@ import '@stryke/types/configuration';
|
|
|
7
7
|
import '@stryke/types/file';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/http/fetch';
|
|
10
11
|
import '@stryke/types/package-json';
|
|
11
12
|
import 'jiti';
|
|
12
13
|
import 'magic-string';
|
|
14
|
+
import 'oxc-parser';
|
|
13
15
|
import 'semver';
|
|
14
16
|
import 'ts-morph';
|
|
17
|
+
import 'undici';
|
|
15
18
|
import 'unplugin';
|
|
16
19
|
import '@stryke/fs/resolve';
|
|
17
20
|
import '@stryke/types/tsconfig';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-id",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.55",
|
|
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": {
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"@storm-software/config-tools": "^1.188.50",
|
|
120
|
-
"@stryke/path": "^0.21.
|
|
120
|
+
"@stryke/path": "^0.21.6",
|
|
121
121
|
"defu": "^6.1.4",
|
|
122
|
-
"powerlines": "^0.
|
|
122
|
+
"powerlines": "^0.28.0"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@powerlines/nx": "^0.10.
|
|
125
|
+
"@powerlines/nx": "^0.10.47",
|
|
126
126
|
"@storm-software/tsup": "^0.2.48",
|
|
127
127
|
"@types/node": "^24.10.1"
|
|
128
128
|
},
|
|
129
129
|
"publishConfig": { "access": "public" },
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "3feaa815e117c46d827eee84c3521e54670abb9b"
|
|
131
131
|
}
|