@powerlines/plugin-crypto 0.10.19 → 0.10.21
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/crypto.d.cts +4 -1
- package/dist/components/crypto.d.ts +4 -1
- package/dist/components/index.d.cts +4 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/{index-CANyUkj-.d.cts → index-Kgl47K4p.d.cts} +76 -6
- package/dist/{index-CANyUkj-.d.ts → index-Kgl47K4p.d.ts} +76 -6
- 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 +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CryptoPluginContext } from '../index-
|
|
1
|
+
import { a as CryptoPluginContext } from '../index-Kgl47K4p.cjs';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -12,11 +12,14 @@ import '@stryke/types/file';
|
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@babel/helper-plugin-utils';
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/http/fetch';
|
|
15
16
|
import '@stryke/types/package-json';
|
|
16
17
|
import 'jiti';
|
|
17
18
|
import 'magic-string';
|
|
19
|
+
import 'oxc-parser';
|
|
18
20
|
import 'semver';
|
|
19
21
|
import 'ts-morph';
|
|
22
|
+
import 'undici';
|
|
20
23
|
import 'unplugin';
|
|
21
24
|
import '@stryke/fs/resolve';
|
|
22
25
|
import '@stryke/types/tsconfig';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CryptoPluginContext } from '../index-
|
|
1
|
+
import { a as CryptoPluginContext } from '../index-Kgl47K4p.js';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -12,11 +12,14 @@ import '@stryke/types/file';
|
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@babel/helper-plugin-utils';
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/http/fetch';
|
|
15
16
|
import '@stryke/types/package-json';
|
|
16
17
|
import 'jiti';
|
|
17
18
|
import 'magic-string';
|
|
19
|
+
import 'oxc-parser';
|
|
18
20
|
import 'semver';
|
|
19
21
|
import 'ts-morph';
|
|
22
|
+
import 'undici';
|
|
20
23
|
import 'unplugin';
|
|
21
24
|
import '@stryke/fs/resolve';
|
|
22
25
|
import '@stryke/types/tsconfig';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cryptoModule } from './crypto.cjs';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-Kgl47K4p.cjs';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@deepkit/type';
|
|
5
5
|
import '@stryke/capnp';
|
|
@@ -13,11 +13,14 @@ import '@stryke/types/file';
|
|
|
13
13
|
import 'vite';
|
|
14
14
|
import '@babel/helper-plugin-utils';
|
|
15
15
|
import '@stryke/env/get-env-paths';
|
|
16
|
+
import '@stryke/http/fetch';
|
|
16
17
|
import '@stryke/types/package-json';
|
|
17
18
|
import 'jiti';
|
|
18
19
|
import 'magic-string';
|
|
20
|
+
import 'oxc-parser';
|
|
19
21
|
import 'semver';
|
|
20
22
|
import 'ts-morph';
|
|
23
|
+
import 'undici';
|
|
21
24
|
import 'unplugin';
|
|
22
25
|
import '@stryke/fs/resolve';
|
|
23
26
|
import '@stryke/types/tsconfig';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cryptoModule } from './crypto.js';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-Kgl47K4p.js';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@deepkit/type';
|
|
5
5
|
import '@stryke/capnp';
|
|
@@ -13,11 +13,14 @@ import '@stryke/types/file';
|
|
|
13
13
|
import 'vite';
|
|
14
14
|
import '@babel/helper-plugin-utils';
|
|
15
15
|
import '@stryke/env/get-env-paths';
|
|
16
|
+
import '@stryke/http/fetch';
|
|
16
17
|
import '@stryke/types/package-json';
|
|
17
18
|
import 'jiti';
|
|
18
19
|
import 'magic-string';
|
|
20
|
+
import 'oxc-parser';
|
|
19
21
|
import 'semver';
|
|
20
22
|
import 'ts-morph';
|
|
23
|
+
import 'undici';
|
|
21
24
|
import 'unplugin';
|
|
22
25
|
import '@stryke/fs/resolve';
|
|
23
26
|
import '@stryke/types/tsconfig';
|
|
@@ -11,11 +11,14 @@ import { AssetGlob } from '@stryke/types/file';
|
|
|
11
11
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
12
12
|
import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
13
13
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
14
|
+
import { FetchRequestOptions } from '@stryke/http/fetch';
|
|
14
15
|
import { PackageJson } from '@stryke/types/package-json';
|
|
15
16
|
import { Jiti } from 'jiti';
|
|
16
17
|
import { SourceMap } from 'magic-string';
|
|
18
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
17
19
|
import { Range } from 'semver';
|
|
18
20
|
import { Project } from 'ts-morph';
|
|
21
|
+
import { RequestInfo, Response } from 'undici';
|
|
19
22
|
import { UnpluginContext, UnpluginMessage, ExternalIdResult, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
20
23
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
21
24
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
@@ -650,6 +653,22 @@ type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
|
|
|
650
653
|
*/
|
|
651
654
|
presets?: BabelTransformPluginOptions[];
|
|
652
655
|
};
|
|
656
|
+
interface DeployConfig {
|
|
657
|
+
/**
|
|
658
|
+
* The deployment variant being used by the Powerlines engine.
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```ts
|
|
662
|
+
* export default defineConfig({
|
|
663
|
+
* deploy: {
|
|
664
|
+
* variant: "cloudflare"
|
|
665
|
+
* }
|
|
666
|
+
* });
|
|
667
|
+
*
|
|
668
|
+
* ```
|
|
669
|
+
*/
|
|
670
|
+
variant?: string;
|
|
671
|
+
}
|
|
653
672
|
interface OutputConfig {
|
|
654
673
|
/**
|
|
655
674
|
* The path to output the final compiled files to
|
|
@@ -772,7 +791,7 @@ interface BaseConfig {
|
|
|
772
791
|
* @remarks
|
|
773
792
|
* If set to `false`, the deployment will be disabled.
|
|
774
793
|
*/
|
|
775
|
-
deploy?:
|
|
794
|
+
deploy?: DeployConfig | false;
|
|
776
795
|
/**
|
|
777
796
|
* The path to the tsconfig file to be used by the compiler
|
|
778
797
|
*
|
|
@@ -899,7 +918,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
899
918
|
*/
|
|
900
919
|
framework?: string;
|
|
901
920
|
}
|
|
902
|
-
|
|
921
|
+
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
903
922
|
/**
|
|
904
923
|
* Configuration provided to build processes
|
|
905
924
|
*
|
|
@@ -919,7 +938,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
|
|
|
919
938
|
*/
|
|
920
939
|
override?: Partial<TBuildResolvedConfig>;
|
|
921
940
|
};
|
|
922
|
-
}
|
|
941
|
+
}
|
|
923
942
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
924
943
|
/**
|
|
925
944
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -959,7 +978,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
|
|
|
959
978
|
/**
|
|
960
979
|
* The resolved options for the Powerlines project configuration.
|
|
961
980
|
*/
|
|
962
|
-
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">> & {
|
|
981
|
+
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">> & {
|
|
963
982
|
/**
|
|
964
983
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
965
984
|
*/
|
|
@@ -1057,6 +1076,18 @@ interface InitContextOptions {
|
|
|
1057
1076
|
*/
|
|
1058
1077
|
isHighPriority: boolean;
|
|
1059
1078
|
}
|
|
1079
|
+
interface FetchOptions extends FetchRequestOptions {
|
|
1080
|
+
/**
|
|
1081
|
+
* An indicator specifying that the request should bypass any caching
|
|
1082
|
+
*/
|
|
1083
|
+
skipCache?: boolean;
|
|
1084
|
+
}
|
|
1085
|
+
interface ParseOptions extends ParserOptions {
|
|
1086
|
+
/**
|
|
1087
|
+
* When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
|
|
1088
|
+
*/
|
|
1089
|
+
allowReturnOutsideFunction?: boolean;
|
|
1090
|
+
}
|
|
1060
1091
|
/**
|
|
1061
1092
|
* The unresolved Powerlines context.
|
|
1062
1093
|
*
|
|
@@ -1073,6 +1104,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1073
1104
|
*/
|
|
1074
1105
|
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1075
1106
|
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1107
|
+
sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
|
|
1076
1108
|
output: TResolvedConfig["output"];
|
|
1077
1109
|
};
|
|
1078
1110
|
/**
|
|
@@ -1192,6 +1224,44 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1192
1224
|
* This instance is created lazily on first access.
|
|
1193
1225
|
*/
|
|
1194
1226
|
program: Project;
|
|
1227
|
+
/**
|
|
1228
|
+
* A function to perform HTTP fetch requests
|
|
1229
|
+
*
|
|
1230
|
+
* @remarks
|
|
1231
|
+
* This function uses a caching layer to avoid duplicate requests during the Powerlines process.
|
|
1232
|
+
*
|
|
1233
|
+
* @example
|
|
1234
|
+
* ```ts
|
|
1235
|
+
* const response = await context.fetch("https://api.example.com/data");
|
|
1236
|
+
* const data = await response.json();
|
|
1237
|
+
* ```
|
|
1238
|
+
*
|
|
1239
|
+
* @see https://github.com/nodejs/undici
|
|
1240
|
+
*
|
|
1241
|
+
* @param input - The URL to fetch.
|
|
1242
|
+
* @param options - The fetch request options.
|
|
1243
|
+
* @returns A promise that resolves to a response returned by the fetch.
|
|
1244
|
+
*/
|
|
1245
|
+
fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1248
|
+
*
|
|
1249
|
+
* @remarks
|
|
1250
|
+
* This function can be used to parse TypeScript code into an AST for further analysis or transformation.
|
|
1251
|
+
*
|
|
1252
|
+
* @example
|
|
1253
|
+
* ```ts
|
|
1254
|
+
* const ast = context.parse("const x: number = 42;");
|
|
1255
|
+
* ```
|
|
1256
|
+
*
|
|
1257
|
+
* @see https://rollupjs.org/plugin-development/#this-parse
|
|
1258
|
+
* @see https://github.com/oxc/oxc
|
|
1259
|
+
*
|
|
1260
|
+
* @param code - The source code to parse.
|
|
1261
|
+
* @param options - The options to pass to the parser.
|
|
1262
|
+
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1263
|
+
*/
|
|
1264
|
+
parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
|
|
1195
1265
|
/**
|
|
1196
1266
|
* A helper function to resolve modules using the Jiti resolver
|
|
1197
1267
|
*
|
|
@@ -1208,7 +1278,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1208
1278
|
* @param options - Additional resolution options.
|
|
1209
1279
|
* @returns A promise that resolves to the resolved module path.
|
|
1210
1280
|
*/
|
|
1211
|
-
|
|
1281
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1212
1282
|
/**
|
|
1213
1283
|
* A helper function to load modules using the Jiti resolver
|
|
1214
1284
|
*
|
|
@@ -1291,7 +1361,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1291
1361
|
*/
|
|
1292
1362
|
logger: LogFn;
|
|
1293
1363
|
}
|
|
1294
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =
|
|
1364
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
1295
1365
|
|
|
1296
1366
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1297
1367
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
@@ -11,11 +11,14 @@ import { AssetGlob } from '@stryke/types/file';
|
|
|
11
11
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
12
12
|
import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
13
13
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
14
|
+
import { FetchRequestOptions } from '@stryke/http/fetch';
|
|
14
15
|
import { PackageJson } from '@stryke/types/package-json';
|
|
15
16
|
import { Jiti } from 'jiti';
|
|
16
17
|
import { SourceMap } from 'magic-string';
|
|
18
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
17
19
|
import { Range } from 'semver';
|
|
18
20
|
import { Project } from 'ts-morph';
|
|
21
|
+
import { RequestInfo, Response } from 'undici';
|
|
19
22
|
import { UnpluginContext, UnpluginMessage, ExternalIdResult, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
20
23
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
21
24
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
@@ -650,6 +653,22 @@ type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
|
|
|
650
653
|
*/
|
|
651
654
|
presets?: BabelTransformPluginOptions[];
|
|
652
655
|
};
|
|
656
|
+
interface DeployConfig {
|
|
657
|
+
/**
|
|
658
|
+
* The deployment variant being used by the Powerlines engine.
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```ts
|
|
662
|
+
* export default defineConfig({
|
|
663
|
+
* deploy: {
|
|
664
|
+
* variant: "cloudflare"
|
|
665
|
+
* }
|
|
666
|
+
* });
|
|
667
|
+
*
|
|
668
|
+
* ```
|
|
669
|
+
*/
|
|
670
|
+
variant?: string;
|
|
671
|
+
}
|
|
653
672
|
interface OutputConfig {
|
|
654
673
|
/**
|
|
655
674
|
* The path to output the final compiled files to
|
|
@@ -772,7 +791,7 @@ interface BaseConfig {
|
|
|
772
791
|
* @remarks
|
|
773
792
|
* If set to `false`, the deployment will be disabled.
|
|
774
793
|
*/
|
|
775
|
-
deploy?:
|
|
794
|
+
deploy?: DeployConfig | false;
|
|
776
795
|
/**
|
|
777
796
|
* The path to the tsconfig file to be used by the compiler
|
|
778
797
|
*
|
|
@@ -899,7 +918,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
899
918
|
*/
|
|
900
919
|
framework?: string;
|
|
901
920
|
}
|
|
902
|
-
|
|
921
|
+
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
903
922
|
/**
|
|
904
923
|
* Configuration provided to build processes
|
|
905
924
|
*
|
|
@@ -919,7 +938,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
|
|
|
919
938
|
*/
|
|
920
939
|
override?: Partial<TBuildResolvedConfig>;
|
|
921
940
|
};
|
|
922
|
-
}
|
|
941
|
+
}
|
|
923
942
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
924
943
|
/**
|
|
925
944
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -959,7 +978,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
|
|
|
959
978
|
/**
|
|
960
979
|
* The resolved options for the Powerlines project configuration.
|
|
961
980
|
*/
|
|
962
|
-
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">> & {
|
|
981
|
+
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">> & {
|
|
963
982
|
/**
|
|
964
983
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
965
984
|
*/
|
|
@@ -1057,6 +1076,18 @@ interface InitContextOptions {
|
|
|
1057
1076
|
*/
|
|
1058
1077
|
isHighPriority: boolean;
|
|
1059
1078
|
}
|
|
1079
|
+
interface FetchOptions extends FetchRequestOptions {
|
|
1080
|
+
/**
|
|
1081
|
+
* An indicator specifying that the request should bypass any caching
|
|
1082
|
+
*/
|
|
1083
|
+
skipCache?: boolean;
|
|
1084
|
+
}
|
|
1085
|
+
interface ParseOptions extends ParserOptions {
|
|
1086
|
+
/**
|
|
1087
|
+
* When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
|
|
1088
|
+
*/
|
|
1089
|
+
allowReturnOutsideFunction?: boolean;
|
|
1090
|
+
}
|
|
1060
1091
|
/**
|
|
1061
1092
|
* The unresolved Powerlines context.
|
|
1062
1093
|
*
|
|
@@ -1073,6 +1104,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1073
1104
|
*/
|
|
1074
1105
|
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1075
1106
|
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1107
|
+
sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
|
|
1076
1108
|
output: TResolvedConfig["output"];
|
|
1077
1109
|
};
|
|
1078
1110
|
/**
|
|
@@ -1192,6 +1224,44 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1192
1224
|
* This instance is created lazily on first access.
|
|
1193
1225
|
*/
|
|
1194
1226
|
program: Project;
|
|
1227
|
+
/**
|
|
1228
|
+
* A function to perform HTTP fetch requests
|
|
1229
|
+
*
|
|
1230
|
+
* @remarks
|
|
1231
|
+
* This function uses a caching layer to avoid duplicate requests during the Powerlines process.
|
|
1232
|
+
*
|
|
1233
|
+
* @example
|
|
1234
|
+
* ```ts
|
|
1235
|
+
* const response = await context.fetch("https://api.example.com/data");
|
|
1236
|
+
* const data = await response.json();
|
|
1237
|
+
* ```
|
|
1238
|
+
*
|
|
1239
|
+
* @see https://github.com/nodejs/undici
|
|
1240
|
+
*
|
|
1241
|
+
* @param input - The URL to fetch.
|
|
1242
|
+
* @param options - The fetch request options.
|
|
1243
|
+
* @returns A promise that resolves to a response returned by the fetch.
|
|
1244
|
+
*/
|
|
1245
|
+
fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1248
|
+
*
|
|
1249
|
+
* @remarks
|
|
1250
|
+
* This function can be used to parse TypeScript code into an AST for further analysis or transformation.
|
|
1251
|
+
*
|
|
1252
|
+
* @example
|
|
1253
|
+
* ```ts
|
|
1254
|
+
* const ast = context.parse("const x: number = 42;");
|
|
1255
|
+
* ```
|
|
1256
|
+
*
|
|
1257
|
+
* @see https://rollupjs.org/plugin-development/#this-parse
|
|
1258
|
+
* @see https://github.com/oxc/oxc
|
|
1259
|
+
*
|
|
1260
|
+
* @param code - The source code to parse.
|
|
1261
|
+
* @param options - The options to pass to the parser.
|
|
1262
|
+
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1263
|
+
*/
|
|
1264
|
+
parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
|
|
1195
1265
|
/**
|
|
1196
1266
|
* A helper function to resolve modules using the Jiti resolver
|
|
1197
1267
|
*
|
|
@@ -1208,7 +1278,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1208
1278
|
* @param options - Additional resolution options.
|
|
1209
1279
|
* @returns A promise that resolves to the resolved module path.
|
|
1210
1280
|
*/
|
|
1211
|
-
|
|
1281
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1212
1282
|
/**
|
|
1213
1283
|
* A helper function to load modules using the Jiti resolver
|
|
1214
1284
|
*
|
|
@@ -1291,7 +1361,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1291
1361
|
*/
|
|
1292
1362
|
logger: LogFn;
|
|
1293
1363
|
}
|
|
1294
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =
|
|
1364
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
1295
1365
|
|
|
1296
1366
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1297
1367
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-
|
|
2
|
-
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-
|
|
1
|
+
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-Kgl47K4p.cjs';
|
|
2
|
+
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-Kgl47K4p.cjs';
|
|
3
3
|
export { cryptoModule } from './components/crypto.cjs';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@deepkit/type';
|
|
@@ -14,11 +14,14 @@ import '@stryke/types/file';
|
|
|
14
14
|
import 'vite';
|
|
15
15
|
import '@babel/helper-plugin-utils';
|
|
16
16
|
import '@stryke/env/get-env-paths';
|
|
17
|
+
import '@stryke/http/fetch';
|
|
17
18
|
import '@stryke/types/package-json';
|
|
18
19
|
import 'jiti';
|
|
19
20
|
import 'magic-string';
|
|
21
|
+
import 'oxc-parser';
|
|
20
22
|
import 'semver';
|
|
21
23
|
import 'ts-morph';
|
|
24
|
+
import 'undici';
|
|
22
25
|
import 'unplugin';
|
|
23
26
|
import '@stryke/fs/resolve';
|
|
24
27
|
import '@stryke/types/tsconfig';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-
|
|
2
|
-
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-
|
|
1
|
+
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-Kgl47K4p.js';
|
|
2
|
+
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-Kgl47K4p.js';
|
|
3
3
|
export { cryptoModule } from './components/crypto.js';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@deepkit/type';
|
|
@@ -14,11 +14,14 @@ import '@stryke/types/file';
|
|
|
14
14
|
import 'vite';
|
|
15
15
|
import '@babel/helper-plugin-utils';
|
|
16
16
|
import '@stryke/env/get-env-paths';
|
|
17
|
+
import '@stryke/http/fetch';
|
|
17
18
|
import '@stryke/types/package-json';
|
|
18
19
|
import 'jiti';
|
|
19
20
|
import 'magic-string';
|
|
21
|
+
import 'oxc-parser';
|
|
20
22
|
import 'semver';
|
|
21
23
|
import 'ts-morph';
|
|
24
|
+
import 'undici';
|
|
22
25
|
import 'unplugin';
|
|
23
26
|
import '@stryke/fs/resolve';
|
|
24
27
|
import '@stryke/types/tsconfig';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-Kgl47K4p.cjs';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -12,11 +12,14 @@ import '@stryke/types/file';
|
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@babel/helper-plugin-utils';
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/http/fetch';
|
|
15
16
|
import '@stryke/types/package-json';
|
|
16
17
|
import 'jiti';
|
|
17
18
|
import 'magic-string';
|
|
19
|
+
import 'oxc-parser';
|
|
18
20
|
import 'semver';
|
|
19
21
|
import 'ts-morph';
|
|
22
|
+
import 'undici';
|
|
20
23
|
import 'unplugin';
|
|
21
24
|
import '@stryke/fs/resolve';
|
|
22
25
|
import '@stryke/types/tsconfig';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-Kgl47K4p.js';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -12,11 +12,14 @@ import '@stryke/types/file';
|
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@babel/helper-plugin-utils';
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/http/fetch';
|
|
15
16
|
import '@stryke/types/package-json';
|
|
16
17
|
import 'jiti';
|
|
17
18
|
import 'magic-string';
|
|
19
|
+
import 'oxc-parser';
|
|
18
20
|
import 'semver';
|
|
19
21
|
import 'ts-morph';
|
|
22
|
+
import 'undici';
|
|
20
23
|
import 'unplugin';
|
|
21
24
|
import '@stryke/fs/resolve';
|
|
22
25
|
import '@stryke/types/tsconfig';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-Kgl47K4p.cjs';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -12,11 +12,14 @@ import '@stryke/types/file';
|
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@babel/helper-plugin-utils';
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/http/fetch';
|
|
15
16
|
import '@stryke/types/package-json';
|
|
16
17
|
import 'jiti';
|
|
17
18
|
import 'magic-string';
|
|
19
|
+
import 'oxc-parser';
|
|
18
20
|
import 'semver';
|
|
19
21
|
import 'ts-morph';
|
|
22
|
+
import 'undici';
|
|
20
23
|
import 'unplugin';
|
|
21
24
|
import '@stryke/fs/resolve';
|
|
22
25
|
import '@stryke/types/tsconfig';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-Kgl47K4p.js';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -12,11 +12,14 @@ import '@stryke/types/file';
|
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@babel/helper-plugin-utils';
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/http/fetch';
|
|
15
16
|
import '@stryke/types/package-json';
|
|
16
17
|
import 'jiti';
|
|
17
18
|
import 'magic-string';
|
|
19
|
+
import 'oxc-parser';
|
|
18
20
|
import 'semver';
|
|
19
21
|
import 'ts-morph';
|
|
22
|
+
import 'undici';
|
|
20
23
|
import 'unplugin';
|
|
21
24
|
import '@stryke/fs/resolve';
|
|
22
25
|
import '@stryke/types/tsconfig';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-crypto",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.21",
|
|
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,18 +116,18 @@
|
|
|
116
116
|
"files": ["dist/**/*"],
|
|
117
117
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@powerlines/plugin-env": "^0.13.
|
|
119
|
+
"@powerlines/plugin-env": "^0.13.53",
|
|
120
120
|
"@storm-software/config-tools": "^1.188.50",
|
|
121
|
-
"@stryke/path": "^0.21.
|
|
121
|
+
"@stryke/path": "^0.21.6",
|
|
122
122
|
"defu": "^6.1.4",
|
|
123
|
-
"powerlines": "^0.
|
|
123
|
+
"powerlines": "^0.28.0",
|
|
124
124
|
"@noble/ciphers": "^2.0.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@powerlines/nx": "^0.10.
|
|
127
|
+
"@powerlines/nx": "^0.10.47",
|
|
128
128
|
"@storm-software/tsup": "^0.2.48",
|
|
129
129
|
"@types/node": "^24.10.1"
|
|
130
130
|
},
|
|
131
131
|
"publishConfig": { "access": "public" },
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "3feaa815e117c46d827eee84c3521e54670abb9b"
|
|
133
133
|
}
|