@powerlines/plugin-crypto 0.10.225 → 0.10.227

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.
Files changed (178) hide show
  1. package/dist/components/crypto.cjs +3 -2
  2. package/dist/components/crypto.mjs +1 -1
  3. package/dist/index.cjs +3 -2
  4. package/dist/index.d.cts +1 -1
  5. package/dist/index.d.mts +1 -1
  6. package/dist/index.mjs +2 -2
  7. package/dist/types/plugin.d.cts +1 -1
  8. package/dist/types/plugin.d.mts +1 -1
  9. package/package.json +4 -4
  10. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  11. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  12. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  13. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  14. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  15. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  16. package/dist/deepkit/src/capnp.cjs +0 -913
  17. package/dist/deepkit/src/capnp.mjs +0 -911
  18. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  19. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  20. package/dist/deepkit/src/reflect-type.cjs +0 -22
  21. package/dist/deepkit/src/reflect-type.mjs +0 -20
  22. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  23. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  24. package/dist/deepkit/src/transformer.cjs +0 -52
  25. package/dist/deepkit/src/transformer.mjs +0 -49
  26. package/dist/deepkit/src/transpile.cjs +0 -29
  27. package/dist/deepkit/src/transpile.mjs +0 -27
  28. package/dist/deepkit/src/types.d.cts +0 -10
  29. package/dist/deepkit/src/types.d.mts +0 -10
  30. package/dist/deepkit/src/utilities.cjs +0 -67
  31. package/dist/deepkit/src/utilities.mjs +0 -66
  32. package/dist/plugin-alloy/src/core/components/output.cjs +0 -36
  33. package/dist/plugin-alloy/src/core/components/output.mjs +0 -35
  34. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
  35. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
  36. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
  37. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
  38. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -38
  39. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -34
  40. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  41. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  42. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  43. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  44. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  45. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  46. package/dist/plugin-alloy/src/index.cjs +0 -102
  47. package/dist/plugin-alloy/src/index.mjs +0 -100
  48. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -89
  49. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -88
  50. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -33
  51. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -32
  52. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
  53. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  54. package/dist/plugin-alloy/src/types/components.d.mts +0 -3
  55. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  56. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  57. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  58. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -52
  59. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -51
  60. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -78
  61. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -76
  62. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -364
  63. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -355
  64. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -157
  65. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -154
  66. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -57
  67. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -56
  68. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
  69. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
  70. package/dist/plugin-automd/src/index.cjs +0 -101
  71. package/dist/plugin-automd/src/index.mjs +0 -98
  72. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  73. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  74. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  75. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  76. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  77. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  78. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  79. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  80. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  81. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  82. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  83. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  84. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  85. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  86. package/dist/plugin-babel/src/helpers/options.cjs +0 -49
  87. package/dist/plugin-babel/src/helpers/options.mjs +0 -46
  88. package/dist/plugin-babel/src/index.cjs +0 -85
  89. package/dist/plugin-babel/src/index.mjs +0 -83
  90. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  91. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  92. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  93. package/dist/plugin-env/src/babel/index.cjs +0 -1
  94. package/dist/plugin-env/src/babel/index.mjs +0 -3
  95. package/dist/plugin-env/src/babel/plugin.cjs +0 -70
  96. package/dist/plugin-env/src/babel/plugin.mjs +0 -69
  97. package/dist/plugin-env/src/components/docs.cjs +0 -60
  98. package/dist/plugin-env/src/components/docs.mjs +0 -59
  99. package/dist/plugin-env/src/components/env.cjs +0 -497
  100. package/dist/plugin-env/src/components/env.mjs +0 -494
  101. package/dist/plugin-env/src/components/index.cjs +0 -2
  102. package/dist/plugin-env/src/components/index.mjs +0 -4
  103. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  104. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  105. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  106. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  107. package/dist/plugin-env/src/helpers/docs-helper.cjs +0 -16
  108. package/dist/plugin-env/src/helpers/docs-helper.mjs +0 -15
  109. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  110. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  111. package/dist/plugin-env/src/helpers/load.cjs +0 -84
  112. package/dist/plugin-env/src/helpers/load.mjs +0 -81
  113. package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
  114. package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
  115. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  116. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  117. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  118. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  119. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  120. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  121. package/dist/plugin-env/src/index.cjs +0 -174
  122. package/dist/plugin-env/src/index.mjs +0 -172
  123. package/dist/plugin-env/src/types/plugin.d.cts +0 -148
  124. package/dist/plugin-env/src/types/plugin.d.mts +0 -150
  125. package/dist/plugin-env/src/types/runtime.d.cts +0 -789
  126. package/dist/plugin-env/src/types/runtime.d.mts +0 -789
  127. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  128. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  129. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -93
  130. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -91
  131. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  132. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  133. package/dist/powerlines/src/lib/entry.cjs +0 -11
  134. package/dist/powerlines/src/lib/entry.mjs +0 -13
  135. package/dist/powerlines/src/lib/logger.cjs +0 -41
  136. package/dist/powerlines/src/lib/logger.mjs +0 -39
  137. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -3
  138. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -5
  139. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -66
  140. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -65
  141. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -46
  142. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -45
  143. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -42
  144. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -40
  145. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  146. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  147. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -50
  148. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -49
  149. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -5
  150. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -6
  151. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  152. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  153. package/dist/powerlines/src/types/api.d.cts +0 -104
  154. package/dist/powerlines/src/types/api.d.mts +0 -104
  155. package/dist/powerlines/src/types/babel.d.cts +0 -22
  156. package/dist/powerlines/src/types/babel.d.mts +0 -22
  157. package/dist/powerlines/src/types/build.cjs +0 -21
  158. package/dist/powerlines/src/types/build.d.cts +0 -185
  159. package/dist/powerlines/src/types/build.d.mts +0 -185
  160. package/dist/powerlines/src/types/build.mjs +0 -21
  161. package/dist/powerlines/src/types/commands.d.cts +0 -8
  162. package/dist/powerlines/src/types/commands.d.mts +0 -9
  163. package/dist/powerlines/src/types/config.d.cts +0 -435
  164. package/dist/powerlines/src/types/config.d.mts +0 -436
  165. package/dist/powerlines/src/types/context.d.cts +0 -514
  166. package/dist/powerlines/src/types/context.d.mts +0 -514
  167. package/dist/powerlines/src/types/fs.d.cts +0 -486
  168. package/dist/powerlines/src/types/fs.d.mts +0 -486
  169. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  170. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  171. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  172. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  173. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  174. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  175. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  176. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  177. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  178. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
@@ -1,42 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_esbuild = require('../build/esbuild.cjs');
3
- const require_plugin = require('../unplugin/plugin.cjs');
4
- let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
5
- let defu = require("defu");
6
- defu = require_rolldown_runtime.__toESM(defu);
7
- let esbuild = require("esbuild");
8
- let unplugin = require("unplugin");
9
-
10
- //#region ../powerlines/src/lib/utilities/bundle.ts
11
- /**
12
- * Bundle a type definition to a module.
13
- *
14
- * @param context - The context object containing the environment paths.
15
- * @param file - The file path to bundle.
16
- * @param overrides - Optional overrides for the ESBuild configuration.
17
- * @returns A promise that resolves to the bundled module.
18
- */
19
- async function bundle(context, file, overrides = {}) {
20
- const path = await context.fs.resolve(file);
21
- if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
22
- const result = await (0, esbuild.build)((0, defu.default)({
23
- ...require_esbuild.extractESBuildConfig(context),
24
- entryPoints: [path],
25
- write: false,
26
- sourcemap: false,
27
- splitting: false,
28
- treeShaking: false,
29
- bundle: true,
30
- packages: "bundle",
31
- platform: "node",
32
- logLevel: "silent",
33
- ...overrides
34
- }, { plugins: [(0, unplugin.createEsbuildPlugin)(require_plugin.createUnpluginResolver(context, `${(0, __stryke_path_file_path_fns.findFileName)(file)} Bundler`))({})] }));
35
- if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
36
- if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
37
- if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
38
- return result.outputFiles.filter(Boolean)[0];
39
- }
40
-
41
- //#endregion
42
- exports.bundle = bundle;
@@ -1,40 +0,0 @@
1
- import { extractESBuildConfig } from "../build/esbuild.mjs";
2
- import { createUnpluginResolver } from "../unplugin/plugin.mjs";
3
- import { findFileName } from "@stryke/path/file-path-fns";
4
- import defu from "defu";
5
- import { build } from "esbuild";
6
- import { createEsbuildPlugin } from "unplugin";
7
-
8
- //#region ../powerlines/src/lib/utilities/bundle.ts
9
- /**
10
- * Bundle a type definition to a module.
11
- *
12
- * @param context - The context object containing the environment paths.
13
- * @param file - The file path to bundle.
14
- * @param overrides - Optional overrides for the ESBuild configuration.
15
- * @returns A promise that resolves to the bundled module.
16
- */
17
- async function bundle(context, file, overrides = {}) {
18
- const path = await context.fs.resolve(file);
19
- if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
20
- const result = await build(defu({
21
- ...extractESBuildConfig(context),
22
- entryPoints: [path],
23
- write: false,
24
- sourcemap: false,
25
- splitting: false,
26
- treeShaking: false,
27
- bundle: true,
28
- packages: "bundle",
29
- platform: "node",
30
- logLevel: "silent",
31
- ...overrides
32
- }, { plugins: [createEsbuildPlugin(createUnpluginResolver(context, `${findFileName(file)} Bundler`))({})] }));
33
- if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
34
- if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
35
- if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
36
- return result.outputFiles.filter(Boolean)[0];
37
- }
38
-
39
- //#endregion
40
- export { bundle };
@@ -1,22 +0,0 @@
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)}
8
- // Note: Do not edit this file manually - it will be overwritten automatically
9
- `;
10
- }
11
- function getFileHeader(context, options = {}) {
12
- const { directive = null, prettierIgnore = false } = options;
13
- return `/* eslint-disable */
14
- // biome-ignore lint: disable
15
- ${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
16
- ${getBaseFileHeader(context)}
17
-
18
- `;
19
- }
20
-
21
- //#endregion
22
- exports.getFileHeader = getFileHeader;
@@ -1,21 +0,0 @@
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)}
7
- // Note: Do not edit this file manually - it will be overwritten automatically
8
- `;
9
- }
10
- function getFileHeader(context, options = {}) {
11
- const { directive = null, prettierIgnore = false } = options;
12
- return `/* eslint-disable */
13
- // biome-ignore lint: disable
14
- ${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
15
- ${getBaseFileHeader(context)}
16
-
17
- `;
18
- }
19
-
20
- //#endregion
21
- export { getFileHeader };
@@ -1,50 +0,0 @@
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
- let resolved;
21
- try {
22
- resolved = await context.resolver.evalModule(result.text, {
23
- filename: result.path,
24
- forceTranspile: true
25
- });
26
- } catch (error) {
27
- if ((0, __stryke_type_checks_is_set_string.isSetString)(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
28
- const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
29
- throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
30
-
31
- Bundle output for module:
32
- ${result.text}` : ""}`);
33
- }
34
- throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
35
-
36
- Bundle output for module:
37
- ${result.text}` : ""}`);
38
- }
39
- let exportName = typeDefinition.name;
40
- if (!exportName) exportName = "default";
41
- const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
42
- if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}${context.config.logLevel === "debug" ? `
43
-
44
- Bundle output for module:
45
- ${result.text}` : ""}`);
46
- return resolvedExport;
47
- }
48
-
49
- //#endregion
50
- exports.resolve = resolve;
@@ -1,49 +0,0 @@
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
- let resolved;
20
- try {
21
- resolved = await context.resolver.evalModule(result.text, {
22
- filename: result.path,
23
- forceTranspile: true
24
- });
25
- } catch (error) {
26
- if (isSetString(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
27
- const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
28
- throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
29
-
30
- Bundle output for module:
31
- ${result.text}` : ""}`);
32
- }
33
- throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
34
-
35
- Bundle output for module:
36
- ${result.text}` : ""}`);
37
- }
38
- let exportName = typeDefinition.name;
39
- if (!exportName) exportName = "default";
40
- const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
41
- if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}${context.config.logLevel === "debug" ? `
42
-
43
- Bundle output for module:
44
- ${result.text}` : ""}`);
45
- return resolvedExport;
46
- }
47
-
48
- //#endregion
49
- export { resolve };
@@ -1,5 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
3
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
4
- require("@stryke/fs/read-file");
5
- require("magic-string");
@@ -1,6 +0,0 @@
1
- import { isSetObject } from "@stryke/type-checks/is-set-object";
2
- import { isString } from "@stryke/type-checks/is-string";
3
- import "@stryke/fs/read-file";
4
- import "magic-string";
5
-
6
- export { };
@@ -1 +0,0 @@
1
- let __stryke_path_replace = require("@stryke/path/replace");
@@ -1,3 +0,0 @@
1
- import { replacePath } from "@stryke/path/replace";
2
-
3
- export { };
@@ -1,104 +0,0 @@
1
- import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.cjs";
2
- import { InferHookParameters, InferHookReturnType } from "./hooks.cjs";
3
- import { ResolvedConfig } from "./resolved.cjs";
4
- import { APIContext, EnvironmentContext, PluginContext } from "./context.cjs";
5
- import { CallHookOptions } from "../internal/helpers/hooks.cjs";
6
-
7
- //#region ../powerlines/src/types/api.d.ts
8
-
9
- /**
10
- * Powerlines API Interface
11
- */
12
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
13
- /**
14
- * The Powerlines shared API context
15
- */
16
- context: APIContext<TResolvedConfig>;
17
- /**
18
- * Prepare the Powerlines API
19
- *
20
- * @remarks
21
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
22
- *
23
- * @param inlineConfig - The inline configuration for the prepare command
24
- */
25
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
26
- /**
27
- * Create a new Powerlines project
28
- *
29
- * @remarks
30
- * This method will create a new Powerlines project in the current directory.
31
- *
32
- * @param inlineConfig - The inline configuration for the new command
33
- * @returns A promise that resolves when the project has been created
34
- */
35
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
36
- /**
37
- * Clean any previously prepared artifacts
38
- *
39
- * @remarks
40
- * This method will remove the previous Powerlines artifacts from the project.
41
- *
42
- * @param inlineConfig - The inline configuration for the clean command
43
- * @returns A promise that resolves when the clean command has completed
44
- */
45
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
46
- /**
47
- * Lint the project source code
48
- *
49
- * @param inlineConfig - The inline configuration for the lint command
50
- * @returns A promise that resolves when the lint command has completed
51
- */
52
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
53
- /**
54
- * Build the project
55
- *
56
- * @remarks
57
- * This method will build the Powerlines project, generating the necessary artifacts.
58
- *
59
- * @param inlineConfig - The inline configuration for the build command
60
- * @returns A promise that resolves when the build command has completed
61
- */
62
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
63
- /**
64
- * Prepare the documentation for the project
65
- *
66
- * @param inlineConfig - The inline configuration for the docs command
67
- * @returns A promise that resolves when the documentation generation has completed
68
- */
69
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
70
- /**
71
- * Deploy the project source code
72
- *
73
- * @remarks
74
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
75
- *
76
- * @param inlineConfig - The inline configuration for the deploy command
77
- */
78
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
79
- /**
80
- * Finalization process
81
- *
82
- * @remarks
83
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
84
- *
85
- * @returns A promise that resolves when the finalization process has completed
86
- */
87
- finalize: () => Promise<void>;
88
- /**
89
- * Invokes the configured plugin hooks
90
- *
91
- * @remarks
92
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
93
- *
94
- * @param hook - The hook to call
95
- * @param options - The options to provide to the hook
96
- * @param args - The arguments to pass to the hook
97
- * @returns The result of the hook call
98
- */
99
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
100
- environment?: string | EnvironmentContext<TResolvedConfig>;
101
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
102
- }
103
- //#endregion
104
- export { API };
@@ -1,104 +0,0 @@
1
- import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.mjs";
2
- import { InferHookParameters, InferHookReturnType } from "./hooks.mjs";
3
- import { ResolvedConfig } from "./resolved.mjs";
4
- import { APIContext, EnvironmentContext, PluginContext } from "./context.mjs";
5
- import { CallHookOptions } from "../internal/helpers/hooks.mjs";
6
-
7
- //#region ../powerlines/src/types/api.d.ts
8
-
9
- /**
10
- * Powerlines API Interface
11
- */
12
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
13
- /**
14
- * The Powerlines shared API context
15
- */
16
- context: APIContext<TResolvedConfig>;
17
- /**
18
- * Prepare the Powerlines API
19
- *
20
- * @remarks
21
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
22
- *
23
- * @param inlineConfig - The inline configuration for the prepare command
24
- */
25
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
26
- /**
27
- * Create a new Powerlines project
28
- *
29
- * @remarks
30
- * This method will create a new Powerlines project in the current directory.
31
- *
32
- * @param inlineConfig - The inline configuration for the new command
33
- * @returns A promise that resolves when the project has been created
34
- */
35
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
36
- /**
37
- * Clean any previously prepared artifacts
38
- *
39
- * @remarks
40
- * This method will remove the previous Powerlines artifacts from the project.
41
- *
42
- * @param inlineConfig - The inline configuration for the clean command
43
- * @returns A promise that resolves when the clean command has completed
44
- */
45
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
46
- /**
47
- * Lint the project source code
48
- *
49
- * @param inlineConfig - The inline configuration for the lint command
50
- * @returns A promise that resolves when the lint command has completed
51
- */
52
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
53
- /**
54
- * Build the project
55
- *
56
- * @remarks
57
- * This method will build the Powerlines project, generating the necessary artifacts.
58
- *
59
- * @param inlineConfig - The inline configuration for the build command
60
- * @returns A promise that resolves when the build command has completed
61
- */
62
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
63
- /**
64
- * Prepare the documentation for the project
65
- *
66
- * @param inlineConfig - The inline configuration for the docs command
67
- * @returns A promise that resolves when the documentation generation has completed
68
- */
69
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
70
- /**
71
- * Deploy the project source code
72
- *
73
- * @remarks
74
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
75
- *
76
- * @param inlineConfig - The inline configuration for the deploy command
77
- */
78
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
79
- /**
80
- * Finalization process
81
- *
82
- * @remarks
83
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
84
- *
85
- * @returns A promise that resolves when the finalization process has completed
86
- */
87
- finalize: () => Promise<void>;
88
- /**
89
- * Invokes the configured plugin hooks
90
- *
91
- * @remarks
92
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
93
- *
94
- * @param hook - The hook to call
95
- * @param options - The options to provide to the hook
96
- * @param args - The arguments to pass to the hook
97
- * @returns The result of the hook call
98
- */
99
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
100
- environment?: string | EnvironmentContext<TResolvedConfig>;
101
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
102
- }
103
- //#endregion
104
- export { API };
@@ -1,22 +0,0 @@
1
- import { LogFn } from "./config.cjs";
2
- import { Context } from "./context.cjs";
3
- import { PluginItem, PluginObj, PluginPass } from "@babel/core";
4
- import { BabelAPI } from "@babel/helper-plugin-utils";
5
-
6
- //#region ../powerlines/src/types/babel.d.ts
7
-
8
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
9
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
10
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
11
- name: string;
12
- log: LogFn;
13
- api: BabelAPI;
14
- options: TOptions;
15
- context: TContext;
16
- dirname: string;
17
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
18
- $$name: string;
19
- };
20
- type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
21
- //#endregion
22
- export { BabelTransformPluginOptions };
@@ -1,22 +0,0 @@
1
- import { LogFn } from "./config.mjs";
2
- import { Context } from "./context.mjs";
3
- import { PluginItem, PluginObj, PluginPass } from "@babel/core";
4
- import { BabelAPI } from "@babel/helper-plugin-utils";
5
-
6
- //#region ../powerlines/src/types/babel.d.ts
7
-
8
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
9
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
10
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
11
- name: string;
12
- log: LogFn;
13
- api: BabelAPI;
14
- options: TOptions;
15
- context: TContext;
16
- dirname: string;
17
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
18
- $$name: string;
19
- };
20
- type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
21
- //#endregion
22
- export { BabelTransformPluginOptions };
@@ -1,21 +0,0 @@
1
-
2
- //#region ../powerlines/src/types/build.ts
3
- const UNPLUGIN_BUILDER_VARIANTS = [
4
- "rollup",
5
- "webpack",
6
- "rspack",
7
- "vite",
8
- "esbuild",
9
- "farm",
10
- "unloader",
11
- "rolldown",
12
- "bun"
13
- ];
14
- const BUILDER_VARIANTS = [
15
- ...UNPLUGIN_BUILDER_VARIANTS,
16
- "tsup",
17
- "tsdown",
18
- "unbuild"
19
- ];
20
-
21
- //#endregion