@powerlines/plugin-crypto 0.10.96 → 0.10.97
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/_virtual/rolldown_runtime.cjs +37 -1
- package/dist/_virtual/rolldown_runtime.mjs +29 -1
- package/dist/components/crypto.cjs +24 -10
- package/dist/components/crypto.mjs +24 -10
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/deepkit/schemas/reflection.cjs +3998 -1
- package/dist/deepkit/schemas/reflection.mjs +3996 -1
- package/dist/deepkit/schemas/reflection2.cjs +4112 -1
- package/dist/deepkit/schemas/reflection2.mjs +4110 -1
- package/dist/deepkit/src/capnp.cjs +913 -1
- package/dist/deepkit/src/capnp.mjs +911 -1
- package/dist/deepkit/src/esbuild-plugin.cjs +47 -4
- package/dist/deepkit/src/esbuild-plugin.mjs +46 -4
- package/dist/deepkit/src/reflect-type.cjs +22 -1
- package/dist/deepkit/src/reflect-type.mjs +20 -1
- package/dist/deepkit/src/resolve-reflections.cjs +16 -1
- package/dist/deepkit/src/resolve-reflections.mjs +15 -1
- package/dist/deepkit/src/transformer.cjs +52 -1
- package/dist/deepkit/src/transformer.mjs +49 -1
- package/dist/deepkit/src/transpile.cjs +29 -1
- package/dist/deepkit/src/transpile.mjs +27 -1
- package/dist/deepkit/src/utilities.cjs +66 -1
- package/dist/deepkit/src/utilities.mjs +65 -1
- package/dist/deepkit/src/vendor/type-compiler/index.cjs +38 -1
- package/dist/deepkit/src/vendor/type-compiler/index.mjs +19 -1
- package/dist/deepkit/src/vendor/type.cjs +20 -1
- package/dist/deepkit/src/vendor/type.mjs +11 -1
- package/dist/index.cjs +46 -1
- package/dist/index.mjs +41 -1
- package/dist/plugin-alloy/src/core/components/output.cjs +38 -1
- package/dist/plugin-alloy/src/core/components/output.mjs +37 -1
- package/dist/plugin-alloy/src/core/contexts/context.cjs +11 -1
- package/dist/plugin-alloy/src/core/contexts/context.mjs +10 -1
- package/dist/plugin-alloy/src/index.cjs +90 -1
- package/dist/plugin-alloy/src/index.mjs +88 -1
- package/dist/plugin-automd/src/index.cjs +101 -1
- package/dist/plugin-automd/src/index.mjs +98 -1
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +10 -1
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +9 -1
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +41 -1
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +39 -1
- package/dist/plugin-babel/src/helpers/filters.cjs +23 -1
- package/dist/plugin-babel/src/helpers/filters.mjs +21 -1
- package/dist/plugin-babel/src/helpers/index.cjs +5 -1
- package/dist/plugin-babel/src/helpers/index.mjs +7 -1
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +38 -1
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +35 -1
- package/dist/plugin-babel/src/helpers/options.cjs +50 -1
- package/dist/plugin-babel/src/helpers/options.mjs +47 -1
- package/dist/plugin-babel/src/index.cjs +91 -1
- package/dist/plugin-babel/src/index.mjs +89 -1
- package/dist/plugin-env/src/babel/index.cjs +1 -1
- package/dist/plugin-env/src/babel/index.mjs +3 -1
- package/dist/plugin-env/src/babel/plugin.cjs +120 -4
- package/dist/plugin-env/src/babel/plugin.mjs +118 -4
- package/dist/plugin-env/src/components/docs.cjs +9 -1
- package/dist/plugin-env/src/components/docs.mjs +11 -1
- package/dist/plugin-env/src/components/env.cjs +349 -11
- package/dist/plugin-env/src/components/env.mjs +347 -9
- package/dist/plugin-env/src/components/index.cjs +2 -1
- package/dist/plugin-env/src/components/index.mjs +4 -1
- package/dist/plugin-env/src/helpers/automd-generator.cjs +22 -1
- package/dist/plugin-env/src/helpers/automd-generator.mjs +21 -1
- package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +55 -1
- package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +54 -1
- package/dist/plugin-env/src/helpers/index.cjs +6 -1
- package/dist/plugin-env/src/helpers/index.mjs +8 -1
- package/dist/plugin-env/src/helpers/load.cjs +83 -1
- package/dist/plugin-env/src/helpers/load.mjs +80 -1
- package/dist/plugin-env/src/helpers/persistence.cjs +200 -1
- package/dist/plugin-env/src/helpers/persistence.mjs +189 -1
- package/dist/plugin-env/src/helpers/reflect.cjs +125 -1
- package/dist/plugin-env/src/helpers/reflect.mjs +117 -1
- package/dist/plugin-env/src/helpers/source-file-env.cjs +24 -1
- package/dist/plugin-env/src/helpers/source-file-env.mjs +23 -1
- package/dist/plugin-env/src/helpers/template-helpers.cjs +2 -1
- package/dist/plugin-env/src/helpers/template-helpers.mjs +4 -1
- package/dist/plugin-env/src/index.cjs +167 -5
- package/dist/plugin-env/src/index.mjs +165 -5
- package/dist/powerlines/src/lib/build/esbuild.cjs +102 -14
- package/dist/powerlines/src/lib/build/esbuild.mjs +100 -14
- package/dist/powerlines/src/lib/entry.cjs +12 -1
- package/dist/powerlines/src/lib/entry.mjs +14 -1
- package/dist/powerlines/src/lib/logger.cjs +41 -1
- package/dist/powerlines/src/lib/logger.mjs +39 -1
- package/dist/powerlines/src/lib/utilities/bundle.cjs +35 -1
- package/dist/powerlines/src/lib/utilities/bundle.mjs +34 -1
- package/dist/powerlines/src/lib/utilities/file-header.cjs +19 -7
- package/dist/powerlines/src/lib/utilities/file-header.mjs +18 -7
- package/dist/powerlines/src/lib/utilities/resolve.cjs +30 -1
- package/dist/powerlines/src/lib/utilities/resolve.mjs +29 -1
- package/dist/powerlines/src/plugin-utils/paths.cjs +1 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +3 -1
- package/dist/powerlines/src/types/context.d.cts +27 -3
- package/dist/powerlines/src/types/context.d.mts +27 -3
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +6 -6
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/lib/utilities/file-header.ts
|
|
5
|
+
function getBaseFileHeader(context) {
|
|
6
|
+
return `
|
|
7
|
+
// Generated with ${(0, __stryke_string_format_title_case.titleCase)(context.config.framework)}
|
|
3
8
|
// Note: Do not edit this file manually - it will be overwritten automatically
|
|
4
|
-
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
function getFileHeader(context, options = {}) {
|
|
12
|
+
const { directive = null, prettierIgnore = false } = options;
|
|
13
|
+
return `/* eslint-disable */
|
|
5
14
|
// biome-ignore lint: disable
|
|
6
|
-
${
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
|
|
16
|
+
${getBaseFileHeader(context)}
|
|
17
|
+
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
9
20
|
|
|
10
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.getFileHeader = getFileHeader;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import{titleCase
|
|
2
|
-
|
|
1
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
2
|
+
|
|
3
|
+
//#region ../powerlines/src/lib/utilities/file-header.ts
|
|
4
|
+
function getBaseFileHeader(context) {
|
|
5
|
+
return `
|
|
6
|
+
// Generated with ${titleCase(context.config.framework)}
|
|
3
7
|
// Note: Do not edit this file manually - it will be overwritten automatically
|
|
4
|
-
|
|
8
|
+
`;
|
|
9
|
+
}
|
|
10
|
+
function getFileHeader(context, options = {}) {
|
|
11
|
+
const { directive = null, prettierIgnore = false } = options;
|
|
12
|
+
return `/* eslint-disable */
|
|
5
13
|
// biome-ignore lint: disable
|
|
6
|
-
${
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
|
|
15
|
+
${getBaseFileHeader(context)}
|
|
16
|
+
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
//#endregion
|
|
21
|
+
export { getFileHeader };
|
|
@@ -1 +1,30 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_bundle = require('./bundle.cjs');
|
|
3
|
+
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
4
|
+
let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
|
|
5
|
+
|
|
6
|
+
//#region ../powerlines/src/lib/utilities/resolve.ts
|
|
7
|
+
/**
|
|
8
|
+
* Compiles a type definition to a module.
|
|
9
|
+
*
|
|
10
|
+
* @param context - The context object containing the environment paths.
|
|
11
|
+
* @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
|
|
12
|
+
* @param overrides - Optional overrides for the ESBuild configuration.
|
|
13
|
+
* @returns A promise that resolves to the compiled module.
|
|
14
|
+
*/
|
|
15
|
+
async function resolve(context, type, overrides = {}) {
|
|
16
|
+
let typeDefinition;
|
|
17
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(type)) typeDefinition = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(type);
|
|
18
|
+
else typeDefinition = type;
|
|
19
|
+
const result = await require_bundle.bundle(context, typeDefinition.file, overrides);
|
|
20
|
+
const resolved = await context.resolver.evalModule(result.text, {
|
|
21
|
+
filename: result.path,
|
|
22
|
+
forceTranspile: true
|
|
23
|
+
});
|
|
24
|
+
let exportName = typeDefinition.name;
|
|
25
|
+
if (!exportName) exportName = "default";
|
|
26
|
+
return resolved[exportName] ?? resolved[`__Ω${exportName}`];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.resolve = resolve;
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
import{bundle
|
|
1
|
+
import { bundle } from "./bundle.mjs";
|
|
2
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
3
|
+
import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
|
|
4
|
+
|
|
5
|
+
//#region ../powerlines/src/lib/utilities/resolve.ts
|
|
6
|
+
/**
|
|
7
|
+
* Compiles a type definition to a module.
|
|
8
|
+
*
|
|
9
|
+
* @param context - The context object containing the environment paths.
|
|
10
|
+
* @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
|
|
11
|
+
* @param overrides - Optional overrides for the ESBuild configuration.
|
|
12
|
+
* @returns A promise that resolves to the compiled module.
|
|
13
|
+
*/
|
|
14
|
+
async function resolve(context, type, overrides = {}) {
|
|
15
|
+
let typeDefinition;
|
|
16
|
+
if (isSetString(type)) typeDefinition = parseTypeDefinition(type);
|
|
17
|
+
else typeDefinition = type;
|
|
18
|
+
const result = await bundle(context, typeDefinition.file, overrides);
|
|
19
|
+
const resolved = await context.resolver.evalModule(result.text, {
|
|
20
|
+
filename: result.path,
|
|
21
|
+
forceTranspile: true
|
|
22
|
+
});
|
|
23
|
+
let exportName = typeDefinition.name;
|
|
24
|
+
if (!exportName) exportName = "default";
|
|
25
|
+
return resolved[exportName] ?? resolved[`__Ω${exportName}`];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { resolve };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let
|
|
1
|
+
let __stryke_path_replace = require("@stryke/path/replace");
|
|
@@ -89,10 +89,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
89
89
|
*/
|
|
90
90
|
allowReturnOutsideFunction?: boolean;
|
|
91
91
|
}
|
|
92
|
+
interface EmitOptions extends WriteOptions {
|
|
93
|
+
/**
|
|
94
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
95
|
+
*/
|
|
96
|
+
emitWithBundler?: boolean;
|
|
97
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
98
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
99
|
+
}
|
|
92
100
|
/**
|
|
93
101
|
* Options for emitting entry virtual files
|
|
94
102
|
*/
|
|
95
|
-
type EmitEntryOptions =
|
|
103
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
96
104
|
/**
|
|
97
105
|
* The unresolved Powerlines context.
|
|
98
106
|
*
|
|
@@ -303,6 +311,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
303
311
|
* The Powerlines builtin virtual files
|
|
304
312
|
*/
|
|
305
313
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
314
|
+
/**
|
|
315
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
316
|
+
*
|
|
317
|
+
* @param code - The source code of the file
|
|
318
|
+
* @param path - The path to write the file to
|
|
319
|
+
* @param options - Additional options for writing the file
|
|
320
|
+
*/
|
|
321
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
322
|
+
/**
|
|
323
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
324
|
+
*
|
|
325
|
+
* @param code - The source code of the file
|
|
326
|
+
* @param path - The path to write the file to
|
|
327
|
+
* @param options - Additional options for writing the file
|
|
328
|
+
*/
|
|
329
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
306
330
|
/**
|
|
307
331
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
308
332
|
*
|
|
@@ -311,7 +335,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
311
335
|
* @param path - An optional path to write the builtin file to
|
|
312
336
|
* @param options - Additional options for writing the builtin file
|
|
313
337
|
*/
|
|
314
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
338
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
315
339
|
/**
|
|
316
340
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
317
341
|
*
|
|
@@ -320,7 +344,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
320
344
|
* @param path - An optional path to write the builtin file to
|
|
321
345
|
* @param options - Additional options for writing the builtin file
|
|
322
346
|
*/
|
|
323
|
-
emitBuiltinSync: (code: string, id: string, path?: string, options?:
|
|
347
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
324
348
|
/**
|
|
325
349
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
326
350
|
*
|
|
@@ -91,10 +91,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
91
91
|
*/
|
|
92
92
|
allowReturnOutsideFunction?: boolean;
|
|
93
93
|
}
|
|
94
|
+
interface EmitOptions extends WriteOptions {
|
|
95
|
+
/**
|
|
96
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
97
|
+
*/
|
|
98
|
+
emitWithBundler?: boolean;
|
|
99
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
100
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
101
|
+
}
|
|
94
102
|
/**
|
|
95
103
|
* Options for emitting entry virtual files
|
|
96
104
|
*/
|
|
97
|
-
type EmitEntryOptions =
|
|
105
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
98
106
|
/**
|
|
99
107
|
* The unresolved Powerlines context.
|
|
100
108
|
*
|
|
@@ -305,6 +313,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
305
313
|
* The Powerlines builtin virtual files
|
|
306
314
|
*/
|
|
307
315
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
316
|
+
/**
|
|
317
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
318
|
+
*
|
|
319
|
+
* @param code - The source code of the file
|
|
320
|
+
* @param path - The path to write the file to
|
|
321
|
+
* @param options - Additional options for writing the file
|
|
322
|
+
*/
|
|
323
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
324
|
+
/**
|
|
325
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
326
|
+
*
|
|
327
|
+
* @param code - The source code of the file
|
|
328
|
+
* @param path - The path to write the file to
|
|
329
|
+
* @param options - Additional options for writing the file
|
|
330
|
+
*/
|
|
331
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
308
332
|
/**
|
|
309
333
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
310
334
|
*
|
|
@@ -313,7 +337,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
313
337
|
* @param path - An optional path to write the builtin file to
|
|
314
338
|
* @param options - Additional options for writing the builtin file
|
|
315
339
|
*/
|
|
316
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
340
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
317
341
|
/**
|
|
318
342
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
319
343
|
*
|
|
@@ -322,7 +346,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
322
346
|
* @param path - An optional path to write the builtin file to
|
|
323
347
|
* @param options - Additional options for writing the builtin file
|
|
324
348
|
*/
|
|
325
|
-
emitBuiltinSync: (code: string, id: string, path?: string, options?:
|
|
349
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
326
350
|
/**
|
|
327
351
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
328
352
|
*
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-crypto",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.97",
|
|
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": {
|
|
@@ -128,17 +128,17 @@
|
|
|
128
128
|
"files": ["dist/**/*"],
|
|
129
129
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@powerlines/plugin-env": "^0.14.
|
|
131
|
+
"@powerlines/plugin-env": "^0.14.22",
|
|
132
132
|
"@storm-software/config-tools": "^1.188.74",
|
|
133
|
-
"@stryke/path": "^0.24.
|
|
133
|
+
"@stryke/path": "^0.24.1",
|
|
134
134
|
"defu": "^6.1.4",
|
|
135
|
-
"powerlines": "^0.36.
|
|
135
|
+
"powerlines": "^0.36.23",
|
|
136
136
|
"@noble/ciphers": "^2.1.1"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
|
-
"@powerlines/nx": "^0.11.
|
|
139
|
+
"@powerlines/nx": "^0.11.49",
|
|
140
140
|
"@types/node": "^24.10.4"
|
|
141
141
|
},
|
|
142
142
|
"publishConfig": { "access": "public" },
|
|
143
|
-
"gitHead": "
|
|
143
|
+
"gitHead": "be47e546b48b9a82e460b5c5d4f02fb66e821f18"
|
|
144
144
|
}
|