@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,47 +0,0 @@
1
- import { SelectHooksOptions } from "../../types/context.cjs";
2
- import { MaybePromise } from "@stryke/types/base";
3
-
4
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
5
- type CallHookOptions = SelectHooksOptions & (({
6
- /**
7
- * Whether to call the hooks sequentially or in parallel.
8
- *
9
- * @defaultValue true
10
- */
11
- sequential?: true;
12
- } & ({
13
- /**
14
- * How to handle multiple return values from hooks.
15
- * - "merge": Merge all non-undefined return values (if they are objects).
16
- * - "first": Return the first non-undefined value.
17
- *
18
- * @remarks
19
- * Merging only works if the return values are objects.
20
- *
21
- * @defaultValue "merge"
22
- */
23
- result: "first";
24
- } | {
25
- /**
26
- * How to handle multiple return values from hooks.
27
- * - "merge": Merge all non-undefined return values (if they are objects).
28
- * - "first": Return the first non-undefined value.
29
- *
30
- * @remarks
31
- * Merging only works if the return values are objects.
32
- *
33
- * @defaultValue "merge"
34
- */
35
- result?: "merge" | "last";
36
- /**
37
- * An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
38
- */
39
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
40
- })) | {
41
- /**
42
- * Whether to call the hooks sequentially or in parallel.
43
- */
44
- sequential: false;
45
- });
46
- //#endregion
47
- export { CallHookOptions };
@@ -1,49 +0,0 @@
1
- import "../../types/hooks.mjs";
2
- import "../../types/resolved.mjs";
3
- import { SelectHooksOptions } from "../../types/context.mjs";
4
- import { MaybePromise } from "@stryke/types/base";
5
-
6
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
7
- type CallHookOptions = SelectHooksOptions & (({
8
- /**
9
- * Whether to call the hooks sequentially or in parallel.
10
- *
11
- * @defaultValue true
12
- */
13
- sequential?: true;
14
- } & ({
15
- /**
16
- * How to handle multiple return values from hooks.
17
- * - "merge": Merge all non-undefined return values (if they are objects).
18
- * - "first": Return the first non-undefined value.
19
- *
20
- * @remarks
21
- * Merging only works if the return values are objects.
22
- *
23
- * @defaultValue "merge"
24
- */
25
- result: "first";
26
- } | {
27
- /**
28
- * How to handle multiple return values from hooks.
29
- * - "merge": Merge all non-undefined return values (if they are objects).
30
- * - "first": Return the first non-undefined value.
31
- *
32
- * @remarks
33
- * Merging only works if the return values are objects.
34
- *
35
- * @defaultValue "merge"
36
- */
37
- result?: "merge" | "last";
38
- /**
39
- * An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
40
- */
41
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
42
- })) | {
43
- /**
44
- * Whether to call the hooks sequentially or in parallel.
45
- */
46
- sequential: false;
47
- });
48
- //#endregion
49
- export { CallHookOptions };
@@ -1,93 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- require('../entry.cjs');
3
- let defu = require("defu");
4
- defu = require_rolldown_runtime.__toESM(defu);
5
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
6
- let __stryke_path_replace = require("@stryke/path/replace");
7
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
8
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
9
- let __stryke_helpers_omit = require("@stryke/helpers/omit");
10
-
11
- //#region ../powerlines/src/lib/build/esbuild.ts
12
- const DEFAULT_ESBUILD_CONFIG = {
13
- target: "esnext",
14
- platform: "neutral",
15
- format: "esm",
16
- write: true,
17
- minify: true,
18
- sourcemap: false,
19
- bundle: true,
20
- treeShaking: true,
21
- keepNames: true,
22
- splitting: true,
23
- logLevel: "silent"
24
- };
25
- /**
26
- * Resolves the esbuild options.
27
- *
28
- * @param context - The build context.
29
- * @returns The resolved esbuild options.
30
- */
31
- function extractESBuildConfig(context) {
32
- const inject = context.config.build.override.inject ?? context.config.build.inject;
33
- if (inject && Object.keys(inject).length > 0) context.fs.writeSync((0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(([key, value]) => {
34
- if (value) if (Array.isArray(value)) {
35
- if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) {
36
- if (value.length === 1) return `
37
- import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
38
- export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
39
- else if (value.length > 1) return `
40
- import ${value[1] === "*" ? `* as ${(0, __stryke_string_format_camel_case.camelCase)(key)}` : `{ ${value[1]} as ${(0, __stryke_string_format_camel_case.camelCase)(key)} }`} from "${value[0]}";
41
- export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
42
- } else if (value.length === 1) return `
43
- import ${key} from "${value[0]}";
44
- export { ${key} };`;
45
- else if (value.length > 1) return `
46
- import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
47
- export { ${key} };`;
48
- } else if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) return `
49
- import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
50
- export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
51
- else return `
52
- import ${key} from "${value}";
53
- export { ${key} };`;
54
- return "";
55
- }).join("\n"));
56
- return (0, defu.default)({
57
- alias: context.alias,
58
- inject: inject && Object.keys(inject).length > 0 ? [(0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js")] : void 0
59
- }, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build.override, [
60
- "alias",
61
- "inject",
62
- "external",
63
- "noExternal",
64
- "skipNodeModulesBundle",
65
- "extensions"
66
- ]) : {}, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build, [
67
- "alias",
68
- "inject",
69
- "external",
70
- "noExternal",
71
- "skipNodeModulesBundle",
72
- "extensions",
73
- "variant",
74
- "override"
75
- ]) : {}, {
76
- mainFields: context.config.build.mainFields,
77
- conditions: context.config.build.conditions,
78
- define: context.config.build.define,
79
- resolveExtensions: context.config.build.extensions,
80
- packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
81
- format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
82
- platform: context.config.build.platform,
83
- treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
84
- outdir: context.config.output.buildPath,
85
- tsconfig: context.tsconfig.tsconfigFilePath,
86
- minify: context.config.mode !== "development",
87
- metafile: context.config.mode === "development",
88
- sourcemap: context.config.mode === "development"
89
- }, DEFAULT_ESBUILD_CONFIG);
90
- }
91
-
92
- //#endregion
93
- exports.extractESBuildConfig = extractESBuildConfig;
@@ -1,91 +0,0 @@
1
- import "../entry.mjs";
2
- import defu from "defu";
3
- import { isString } from "@stryke/type-checks/is-string";
4
- import { replaceExtension, replacePath } from "@stryke/path/replace";
5
- import { joinPaths } from "@stryke/path/join-paths";
6
- import { camelCase } from "@stryke/string-format/camel-case";
7
- import { omit } from "@stryke/helpers/omit";
8
-
9
- //#region ../powerlines/src/lib/build/esbuild.ts
10
- const DEFAULT_ESBUILD_CONFIG = {
11
- target: "esnext",
12
- platform: "neutral",
13
- format: "esm",
14
- write: true,
15
- minify: true,
16
- sourcemap: false,
17
- bundle: true,
18
- treeShaking: true,
19
- keepNames: true,
20
- splitting: true,
21
- logLevel: "silent"
22
- };
23
- /**
24
- * Resolves the esbuild options.
25
- *
26
- * @param context - The build context.
27
- * @returns The resolved esbuild options.
28
- */
29
- function extractESBuildConfig(context) {
30
- const inject = context.config.build.override.inject ?? context.config.build.inject;
31
- if (inject && Object.keys(inject).length > 0) context.fs.writeSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(([key, value]) => {
32
- if (value) if (Array.isArray(value)) {
33
- if (camelCase(key) !== key) {
34
- if (value.length === 1) return `
35
- import ${camelCase(key)} from "${value[0]}";
36
- export { ${camelCase(key)} as "${key}" }`;
37
- else if (value.length > 1) return `
38
- import ${value[1] === "*" ? `* as ${camelCase(key)}` : `{ ${value[1]} as ${camelCase(key)} }`} from "${value[0]}";
39
- export { ${camelCase(key)} as "${key}" }`;
40
- } else if (value.length === 1) return `
41
- import ${key} from "${value[0]}";
42
- export { ${key} };`;
43
- else if (value.length > 1) return `
44
- import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
45
- export { ${key} };`;
46
- } else if (camelCase(key) !== key) return `
47
- import ${camelCase(key)} from "${value[0]}";
48
- export { ${camelCase(key)} as "${key}" }`;
49
- else return `
50
- import ${key} from "${value}";
51
- export { ${key} };`;
52
- return "";
53
- }).join("\n"));
54
- return defu({
55
- alias: context.alias,
56
- inject: inject && Object.keys(inject).length > 0 ? [joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js")] : void 0
57
- }, context.config.build.variant === "esbuild" ? omit(context.config.build.override, [
58
- "alias",
59
- "inject",
60
- "external",
61
- "noExternal",
62
- "skipNodeModulesBundle",
63
- "extensions"
64
- ]) : {}, context.config.build.variant === "esbuild" ? omit(context.config.build, [
65
- "alias",
66
- "inject",
67
- "external",
68
- "noExternal",
69
- "skipNodeModulesBundle",
70
- "extensions",
71
- "variant",
72
- "override"
73
- ]) : {}, {
74
- mainFields: context.config.build.mainFields,
75
- conditions: context.config.build.conditions,
76
- define: context.config.build.define,
77
- resolveExtensions: context.config.build.extensions,
78
- packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
79
- format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
80
- platform: context.config.build.platform,
81
- treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
82
- outdir: context.config.output.buildPath,
83
- tsconfig: context.tsconfig.tsconfigFilePath,
84
- minify: context.config.mode !== "development",
85
- metafile: context.config.mode === "development",
86
- sourcemap: context.config.mode === "development"
87
- }, DEFAULT_ESBUILD_CONFIG);
88
- }
89
-
90
- //#endregion
91
- export { extractESBuildConfig };
@@ -1,6 +0,0 @@
1
-
2
- //#region ../powerlines/src/lib/constants/environments.ts
3
- const DEFAULT_ENVIRONMENT = "default";
4
-
5
- //#endregion
6
- exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
@@ -1,5 +0,0 @@
1
- //#region ../powerlines/src/lib/constants/environments.ts
2
- const DEFAULT_ENVIRONMENT = "default";
3
-
4
- //#endregion
5
- export { DEFAULT_ENVIRONMENT };
@@ -1,11 +0,0 @@
1
- require('../plugin-utils/paths.cjs');
2
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
3
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
4
- let __stryke_path_replace = require("@stryke/path/replace");
5
- let __stryke_convert_to_array = require("@stryke/convert/to-array");
6
- let __stryke_path_append = require("@stryke/path/append");
7
- let __stryke_path_is_type = require("@stryke/path/is-type");
8
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
9
- let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
10
- let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
11
- require("@stryke/hash/murmurhash");
@@ -1,13 +0,0 @@
1
- import "../plugin-utils/paths.mjs";
2
- import { isSetString } from "@stryke/type-checks/is-set-string";
3
- import { isString } from "@stryke/type-checks/is-string";
4
- import { replaceExtension, replacePath } from "@stryke/path/replace";
5
- import { toArray } from "@stryke/convert/to-array";
6
- import { appendPath } from "@stryke/path/append";
7
- import { isAbsolutePath } from "@stryke/path/is-type";
8
- import { joinPaths } from "@stryke/path/join-paths";
9
- import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
10
- import { getUniqueBy } from "@stryke/helpers/get-unique";
11
- import "@stryke/hash/murmurhash";
12
-
13
- export { };
@@ -1,41 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- let chalk = require("chalk");
3
- chalk = require_rolldown_runtime.__toESM(chalk);
4
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
5
- require("@storm-software/config-tools/logger");
6
- require("@storm-software/config-tools/utilities/colors");
7
- require("@stryke/helpers/noop");
8
- let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
9
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
10
-
11
- //#region ../powerlines/src/lib/logger.ts
12
- const BADGE_COLORS = [
13
- "#00A0DD",
14
- "#6FCE4E",
15
- "#FBBF24",
16
- "#F43F5E",
17
- "#3B82F6",
18
- "#A855F7",
19
- "#469592",
20
- "#288EDF",
21
- "#D8B4FE",
22
- "#10B981",
23
- "#EF4444",
24
- "#F0EC56",
25
- "#F472B6",
26
- "#22D3EE",
27
- "#EAB308",
28
- "#84CC16",
29
- "#F87171",
30
- "#0EA5E9",
31
- "#D946EF",
32
- "#FACC15",
33
- "#34D399",
34
- "#8B5CF6"
35
- ];
36
- const extendLog = (logFn, name) => {
37
- return (type, ...args) => logFn(type, ` ${chalk.default.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${(0, __stryke_string_format_title_case.titleCase)(name)} `)} ${args.join(" ")} `);
38
- };
39
-
40
- //#endregion
41
- exports.extendLog = extendLog;
@@ -1,39 +0,0 @@
1
- import chalk from "chalk";
2
- import { LogLevelLabel } from "@storm-software/config-tools/types";
3
- import "@storm-software/config-tools/logger";
4
- import "@storm-software/config-tools/utilities/colors";
5
- import "@stryke/helpers/noop";
6
- import { kebabCase } from "@stryke/string-format/kebab-case";
7
- import { titleCase } from "@stryke/string-format/title-case";
8
-
9
- //#region ../powerlines/src/lib/logger.ts
10
- const BADGE_COLORS = [
11
- "#00A0DD",
12
- "#6FCE4E",
13
- "#FBBF24",
14
- "#F43F5E",
15
- "#3B82F6",
16
- "#A855F7",
17
- "#469592",
18
- "#288EDF",
19
- "#D8B4FE",
20
- "#10B981",
21
- "#EF4444",
22
- "#F0EC56",
23
- "#F472B6",
24
- "#22D3EE",
25
- "#EAB308",
26
- "#84CC16",
27
- "#F87171",
28
- "#0EA5E9",
29
- "#D946EF",
30
- "#FACC15",
31
- "#34D399",
32
- "#8B5CF6"
33
- ];
34
- const extendLog = (logFn, name) => {
35
- return (type, ...args) => logFn(type, ` ${chalk.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase(name)} `)} ${args.join(" ")} `);
36
- };
37
-
38
- //#endregion
39
- export { extendLog };
@@ -1,3 +0,0 @@
1
- require('../../types/build.cjs');
2
- let defu = require("defu");
3
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
@@ -1,5 +0,0 @@
1
- import "../../types/build.mjs";
2
- import "defu";
3
- import { isSetString } from "@stryke/type-checks/is-set-string";
4
-
5
- export { };
@@ -1,66 +0,0 @@
1
-
2
- //#region ../powerlines/src/lib/unplugin/module-resolution.ts
3
- /**
4
- * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
5
- *
6
- * @remarks
7
- * This includes the `resolveId` and `load` hooks.
8
- *
9
- * @see https://rollupjs.org/plugin-development/#resolveid
10
- * @see https://rollupjs.org/plugin-development/#load
11
- *
12
- * @param context - The plugin context.
13
- * @returns The module resolution hooks (`resolveId` and `load`).
14
- */
15
- function createUnpluginModuleResolutionFunctions(context) {
16
- const ctx = context;
17
- async function resolveId(id, importer, opts = { isEntry: false }) {
18
- let result = await ctx.$$internal.callHook("resolveId", {
19
- sequential: true,
20
- result: "first",
21
- order: "pre"
22
- }, id, importer, opts);
23
- if (result) return result;
24
- result = await ctx.$$internal.callHook("resolveId", {
25
- sequential: true,
26
- result: "first",
27
- order: "normal"
28
- }, id, importer, opts);
29
- if (result) return result;
30
- result = await ctx.resolve(id, importer, opts);
31
- if (result) return result;
32
- return ctx.$$internal.callHook("resolveId", {
33
- sequential: true,
34
- result: "first",
35
- order: "post"
36
- }, id, importer, opts);
37
- }
38
- async function load(id) {
39
- let result = await ctx.$$internal.callHook("load", {
40
- sequential: true,
41
- result: "first",
42
- order: "pre"
43
- }, id);
44
- if (result) return result;
45
- result = await ctx.$$internal.callHook("load", {
46
- sequential: true,
47
- result: "first",
48
- order: "normal"
49
- }, id);
50
- if (result) return result;
51
- result = await ctx.load(id);
52
- if (result) return result;
53
- return ctx.$$internal.callHook("load", {
54
- sequential: true,
55
- result: "first",
56
- order: "post"
57
- }, id);
58
- }
59
- return {
60
- resolveId,
61
- load
62
- };
63
- }
64
-
65
- //#endregion
66
- exports.createUnpluginModuleResolutionFunctions = createUnpluginModuleResolutionFunctions;
@@ -1,65 +0,0 @@
1
- //#region ../powerlines/src/lib/unplugin/module-resolution.ts
2
- /**
3
- * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
4
- *
5
- * @remarks
6
- * This includes the `resolveId` and `load` hooks.
7
- *
8
- * @see https://rollupjs.org/plugin-development/#resolveid
9
- * @see https://rollupjs.org/plugin-development/#load
10
- *
11
- * @param context - The plugin context.
12
- * @returns The module resolution hooks (`resolveId` and `load`).
13
- */
14
- function createUnpluginModuleResolutionFunctions(context) {
15
- const ctx = context;
16
- async function resolveId(id, importer, opts = { isEntry: false }) {
17
- let result = await ctx.$$internal.callHook("resolveId", {
18
- sequential: true,
19
- result: "first",
20
- order: "pre"
21
- }, id, importer, opts);
22
- if (result) return result;
23
- result = await ctx.$$internal.callHook("resolveId", {
24
- sequential: true,
25
- result: "first",
26
- order: "normal"
27
- }, id, importer, opts);
28
- if (result) return result;
29
- result = await ctx.resolve(id, importer, opts);
30
- if (result) return result;
31
- return ctx.$$internal.callHook("resolveId", {
32
- sequential: true,
33
- result: "first",
34
- order: "post"
35
- }, id, importer, opts);
36
- }
37
- async function load(id) {
38
- let result = await ctx.$$internal.callHook("load", {
39
- sequential: true,
40
- result: "first",
41
- order: "pre"
42
- }, id);
43
- if (result) return result;
44
- result = await ctx.$$internal.callHook("load", {
45
- sequential: true,
46
- result: "first",
47
- order: "normal"
48
- }, id);
49
- if (result) return result;
50
- result = await ctx.load(id);
51
- if (result) return result;
52
- return ctx.$$internal.callHook("load", {
53
- sequential: true,
54
- result: "first",
55
- order: "post"
56
- }, id);
57
- }
58
- return {
59
- resolveId,
60
- load
61
- };
62
- }
63
-
64
- //#endregion
65
- export { createUnpluginModuleResolutionFunctions };
@@ -1,46 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_logger = require('../logger.cjs');
3
- require('../utilities/source-file.cjs');
4
- require('./helpers.cjs');
5
- const require_module_resolution = require('./module-resolution.cjs');
6
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
7
- let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
8
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
- let unplugin = require("unplugin");
10
-
11
- //#region ../powerlines/src/lib/unplugin/plugin.ts
12
- /**
13
- * Creates a Powerlines unplugin instance.
14
- *
15
- * @param context - The plugin context.
16
- * @returns The unplugin instance.
17
- */
18
- function createUnpluginResolver(context, name = "unplugin") {
19
- const ctx = context;
20
- (0, unplugin.setParseImpl)(ctx.parse);
21
- return () => {
22
- const log = require_logger.extendLog(ctx.log, name);
23
- log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${(0, __stryke_string_format_title_case.titleCase)(name)} - Unplugin`} plugin`);
24
- try {
25
- const { resolveId, load } = require_module_resolution.createUnpluginModuleResolutionFunctions(context);
26
- return {
27
- name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${(0, __stryke_string_format_kebab_case.kebabCase)(name)}`,
28
- api: ctx.$$internal.api,
29
- resolveId: {
30
- filter: { id: { include: [/.*/] } },
31
- handler: resolveId
32
- },
33
- load: {
34
- filter: { id: { include: [/.*/] } },
35
- handler: load
36
- }
37
- };
38
- } catch (error) {
39
- log(__storm_software_config_tools_types.LogLevelLabel.FATAL, error?.message);
40
- throw error;
41
- }
42
- };
43
- }
44
-
45
- //#endregion
46
- exports.createUnpluginResolver = createUnpluginResolver;
@@ -1,45 +0,0 @@
1
- import { extendLog } from "../logger.mjs";
2
- import "../utilities/source-file.mjs";
3
- import "./helpers.mjs";
4
- import { createUnpluginModuleResolutionFunctions } from "./module-resolution.mjs";
5
- import { LogLevelLabel } from "@storm-software/config-tools/types";
6
- import { kebabCase } from "@stryke/string-format/kebab-case";
7
- import { titleCase } from "@stryke/string-format/title-case";
8
- import { setParseImpl } from "unplugin";
9
-
10
- //#region ../powerlines/src/lib/unplugin/plugin.ts
11
- /**
12
- * Creates a Powerlines unplugin instance.
13
- *
14
- * @param context - The plugin context.
15
- * @returns The unplugin instance.
16
- */
17
- function createUnpluginResolver(context, name = "unplugin") {
18
- const ctx = context;
19
- setParseImpl(ctx.parse);
20
- return () => {
21
- const log = extendLog(ctx.log, name);
22
- log(LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${titleCase(name)} - Unplugin`} plugin`);
23
- try {
24
- const { resolveId, load } = createUnpluginModuleResolutionFunctions(context);
25
- return {
26
- name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${kebabCase(name)}`,
27
- api: ctx.$$internal.api,
28
- resolveId: {
29
- filter: { id: { include: [/.*/] } },
30
- handler: resolveId
31
- },
32
- load: {
33
- filter: { id: { include: [/.*/] } },
34
- handler: load
35
- }
36
- };
37
- } catch (error) {
38
- log(LogLevelLabel.FATAL, error?.message);
39
- throw error;
40
- }
41
- };
42
- }
43
-
44
- //#endregion
45
- export { createUnpluginResolver };