@powerlines/plugin-env 0.15.122 → 0.15.124

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 (219) hide show
  1. package/dist/babel/plugin.cjs +11 -11
  2. package/dist/babel/plugin.d.cts +2 -2
  3. package/dist/babel/plugin.d.mts +2 -3
  4. package/dist/babel/plugin.mjs +5 -5
  5. package/dist/components/docs.cjs +6 -6
  6. package/dist/components/docs.d.cts +1 -1
  7. package/dist/components/docs.d.mts +1 -1
  8. package/dist/components/docs.mjs +3 -3
  9. package/dist/components/env.cjs +40 -40
  10. package/dist/components/env.d.cts +2 -2
  11. package/dist/components/env.d.mts +2 -2
  12. package/dist/components/env.mjs +11 -11
  13. package/dist/helpers/automd-generator.cjs +2 -2
  14. package/dist/helpers/automd-generator.d.cts +1 -1
  15. package/dist/helpers/automd-generator.d.mts +1 -1
  16. package/dist/helpers/automd-generator.mjs +1 -1
  17. package/dist/helpers/load.cjs +7 -7
  18. package/dist/helpers/load.mjs +8 -8
  19. package/dist/helpers/persistence.cjs +23 -23
  20. package/dist/helpers/persistence.d.cts +1 -1
  21. package/dist/helpers/persistence.d.mts +1 -1
  22. package/dist/helpers/persistence.mjs +5 -5
  23. package/dist/helpers/reflect.cjs +5 -5
  24. package/dist/helpers/reflect.mjs +1 -1
  25. package/dist/helpers/source-file-env.cjs +1 -1
  26. package/dist/helpers/source-file-env.mjs +1 -1
  27. package/dist/index.cjs +13 -10
  28. package/dist/index.d.cts +1 -1
  29. package/dist/index.d.mts +1 -1
  30. package/dist/index.mjs +12 -12
  31. package/dist/types/plugin.cjs +19 -18
  32. package/dist/types/plugin.d.cts +5 -6
  33. package/dist/types/plugin.d.mts +4 -6
  34. package/dist/types/plugin.mjs +4 -4
  35. package/package.json +7 -7
  36. package/dist/deepkit/schemas/reflection.cjs +0 -5426
  37. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  38. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  39. package/dist/deepkit/schemas/reflection.mjs +0 -5423
  40. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  41. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  42. package/dist/deepkit/src/capnp.cjs +0 -1692
  43. package/dist/deepkit/src/capnp.mjs +0 -1690
  44. package/dist/deepkit/src/esbuild-plugin.cjs +0 -99
  45. package/dist/deepkit/src/esbuild-plugin.mjs +0 -98
  46. package/dist/deepkit/src/reflect-type.cjs +0 -40
  47. package/dist/deepkit/src/reflect-type.mjs +0 -38
  48. package/dist/deepkit/src/resolve-reflections.cjs +0 -23
  49. package/dist/deepkit/src/resolve-reflections.mjs +0 -22
  50. package/dist/deepkit/src/transformer.cjs +0 -92
  51. package/dist/deepkit/src/transformer.mjs +0 -89
  52. package/dist/deepkit/src/transpile.cjs +0 -39
  53. package/dist/deepkit/src/transpile.mjs +0 -37
  54. package/dist/deepkit/src/types.cjs +0 -22
  55. package/dist/deepkit/src/types.d.cts +0 -10
  56. package/dist/deepkit/src/types.d.mts +0 -10
  57. package/dist/deepkit/src/types.mjs +0 -21
  58. package/dist/deepkit/src/utilities.cjs +0 -184
  59. package/dist/deepkit/src/utilities.mjs +0 -183
  60. package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
  61. package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
  62. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  63. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  64. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  65. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  66. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  67. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  68. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -134
  69. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -126
  70. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  71. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  72. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -110
  73. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -101
  74. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -23
  75. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -22
  76. package/dist/plugin-alloy/src/index.cjs +0 -105
  77. package/dist/plugin-alloy/src/index.mjs +0 -103
  78. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  79. package/dist/plugin-alloy/src/markdown/components/markdown-file.d.cts +0 -8
  80. package/dist/plugin-alloy/src/markdown/components/markdown-file.d.mts +0 -8
  81. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  82. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  83. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  84. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -72
  85. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -71
  86. package/dist/plugin-alloy/src/types/components.cjs +0 -22
  87. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  88. package/dist/plugin-alloy/src/types/components.d.mts +0 -21
  89. package/dist/plugin-alloy/src/types/components.mjs +0 -21
  90. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  91. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  92. package/dist/plugin-alloy/src/types/plugin.cjs +0 -53
  93. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  94. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  95. package/dist/plugin-alloy/src/types/plugin.mjs +0 -50
  96. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
  97. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  98. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  99. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
  100. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
  101. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
  102. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
  103. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  104. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  105. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
  106. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
  107. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  108. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  109. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
  110. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
  111. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -12
  112. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -12
  113. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -71
  114. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  115. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  116. package/dist/plugin-automd/src/index.cjs +0 -127
  117. package/dist/plugin-automd/src/index.mjs +0 -124
  118. package/dist/plugin-automd/src/types/plugin.cjs +0 -47
  119. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  120. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  121. package/dist/plugin-automd/src/types/plugin.mjs +0 -47
  122. package/dist/plugin-automd/src/types/toc.cjs +0 -26
  123. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  124. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  125. package/dist/plugin-automd/src/types/toc.mjs +0 -25
  126. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -74
  127. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -70
  128. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -71
  129. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -69
  130. package/dist/plugin-babel/src/helpers/filters.cjs +0 -158
  131. package/dist/plugin-babel/src/helpers/filters.mjs +0 -154
  132. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  133. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  134. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -200
  135. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -192
  136. package/dist/plugin-babel/src/helpers/options.cjs +0 -73
  137. package/dist/plugin-babel/src/helpers/options.mjs +0 -70
  138. package/dist/plugin-babel/src/index.cjs +0 -125
  139. package/dist/plugin-babel/src/index.mjs +0 -123
  140. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  141. package/dist/plugin-babel/src/types/plugin.cjs +0 -42
  142. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  143. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  144. package/dist/plugin-babel/src/types/plugin.mjs +0 -39
  145. package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -136
  146. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  147. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  148. package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -134
  149. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -142
  150. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -140
  151. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  152. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  153. package/dist/powerlines/src/lib/entry.cjs +0 -195
  154. package/dist/powerlines/src/lib/entry.mjs +0 -194
  155. package/dist/powerlines/src/lib/logger.cjs +0 -108
  156. package/dist/powerlines/src/lib/logger.mjs +0 -106
  157. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -41
  158. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -40
  159. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -98
  160. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -97
  161. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -139
  162. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -138
  163. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -74
  164. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -72
  165. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -69
  166. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -68
  167. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -68
  168. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -66
  169. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -46
  170. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -45
  171. package/dist/powerlines/src/types/api.cjs +0 -62
  172. package/dist/powerlines/src/types/api.d.cts +0 -104
  173. package/dist/powerlines/src/types/api.d.mts +0 -104
  174. package/dist/powerlines/src/types/api.mjs +0 -62
  175. package/dist/powerlines/src/types/babel.cjs +0 -156
  176. package/dist/powerlines/src/types/babel.d.cts +0 -23
  177. package/dist/powerlines/src/types/babel.d.mts +0 -23
  178. package/dist/powerlines/src/types/babel.mjs +0 -147
  179. package/dist/powerlines/src/types/build.cjs +0 -127
  180. package/dist/powerlines/src/types/build.d.cts +0 -185
  181. package/dist/powerlines/src/types/build.d.mts +0 -185
  182. package/dist/powerlines/src/types/build.mjs +0 -121
  183. package/dist/powerlines/src/types/commands.cjs +0 -16
  184. package/dist/powerlines/src/types/commands.d.cts +0 -8
  185. package/dist/powerlines/src/types/commands.d.mts +0 -9
  186. package/dist/powerlines/src/types/commands.mjs +0 -15
  187. package/dist/powerlines/src/types/config.cjs +0 -420
  188. package/dist/powerlines/src/types/config.d.cts +0 -435
  189. package/dist/powerlines/src/types/config.d.mts +0 -436
  190. package/dist/powerlines/src/types/config.mjs +0 -397
  191. package/dist/powerlines/src/types/context.cjs +0 -388
  192. package/dist/powerlines/src/types/context.d.cts +0 -514
  193. package/dist/powerlines/src/types/context.d.mts +0 -514
  194. package/dist/powerlines/src/types/context.mjs +0 -371
  195. package/dist/powerlines/src/types/fs.cjs +0 -78
  196. package/dist/powerlines/src/types/fs.d.cts +0 -486
  197. package/dist/powerlines/src/types/fs.d.mts +0 -486
  198. package/dist/powerlines/src/types/fs.mjs +0 -75
  199. package/dist/powerlines/src/types/hooks.cjs +0 -71
  200. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  201. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  202. package/dist/powerlines/src/types/hooks.mjs +0 -68
  203. package/dist/powerlines/src/types/index.cjs +0 -11
  204. package/dist/powerlines/src/types/index.d.mts +0 -12
  205. package/dist/powerlines/src/types/index.mjs +0 -13
  206. package/dist/powerlines/src/types/plugin.cjs +0 -184
  207. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  208. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  209. package/dist/powerlines/src/types/plugin.mjs +0 -178
  210. package/dist/powerlines/src/types/resolved.cjs +0 -149
  211. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  212. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  213. package/dist/powerlines/src/types/resolved.mjs +0 -144
  214. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  215. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  216. package/dist/powerlines/src/types/unplugin.cjs +0 -64
  217. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  218. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
  219. package/dist/powerlines/src/types/unplugin.mjs +0 -62
@@ -1,105 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_index = require('../../plugin-babel/src/index.cjs');
3
- const require_output = require('./core/components/output.cjs');
4
- let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
5
- let __alloy_js_core = require("@alloy-js/core");
6
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
- let __stryke_json_storm_json = require("@stryke/json/storm-json");
8
- let __alloy_js_babel_preset = require("@alloy-js/babel-preset");
9
- __alloy_js_babel_preset = require_rolldown_runtime.__toESM(__alloy_js_babel_preset);
10
-
11
- //#region ../plugin-alloy/src/index.tsx
12
- /**
13
- * Alloy-js plugin for Powerlines.
14
- *
15
- * @param options - The Alloy-js plugin user configuration options.
16
- * @returns A Powerlines plugin that integrates Alloy-js transformations.
17
- */
18
- const plugin = (options = {}) => {
19
- return [
20
- require_index.default(),
21
- {
22
- name: "alloy:config",
23
- config() {
24
- this.debug("Updating configuration options to support Alloy-js builds.");
25
- return {
26
- alloy: {
27
- typescript: true,
28
- ...options
29
- },
30
- transform: { babel: { presets: [[
31
- (0, __alloy_js_babel_preset.default)({ addSourceInfo: this.config.mode === "development" }),
32
- {},
33
- (_, id) => /^(?:m|c)?tsx?$/.test((0, __stryke_path_file_path_fns.findFileExtensionSafe)(id, { fullExtension: true }))
34
- ]] } },
35
- build: {
36
- inputOptions: { transform: { jsx: "preserve" } },
37
- external: [
38
- "@alloy-js/core",
39
- "@alloy-js/typescript",
40
- "@alloy-js/json",
41
- "@alloy-js/markdown"
42
- ]
43
- }
44
- };
45
- },
46
- async configResolved() {
47
- this.debug("Ensuring TypeScript configuration is set up for Alloy-js.");
48
- if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
49
- this.tsconfig.tsconfigJson.compilerOptions ??= {};
50
- if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
51
- if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
52
- await this.fs.write(this.tsconfig.tsconfigFilePath, __stryke_json_storm_json.StormJSON.stringify(this.tsconfig.tsconfigJson));
53
- }
54
- }
55
- },
56
- {
57
- name: "alloy:create-render",
58
- configResolved: {
59
- order: "pre",
60
- async handler() {
61
- this.debug("Attaching the `render` method to the context object.");
62
- this.render = async (children) => {
63
- const _self$ = this;
64
- const meta = {};
65
- await (0, __alloy_js_core.traverseOutput)(await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(require_output.Output, {
66
- context: _self$,
67
- meta,
68
- get basePath() {
69
- return _self$.workspaceConfig.workspaceRoot;
70
- },
71
- children
72
- })), {
73
- visitDirectory: (directory) => {
74
- if (this.fs.existsSync(directory.path)) return;
75
- this.fs.mkdirSync(directory.path);
76
- },
77
- visitFile: (file) => {
78
- if ("contents" in file) {
79
- const metadata = meta[file.path] ?? {};
80
- if (metadata.kind === "builtin") {
81
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
82
- this.emitBuiltinSync(file.contents, metadata.id, {
83
- skipFormat: metadata.skipFormat,
84
- storage: metadata.storage,
85
- extension: (0, __stryke_path_file_path_fns.findFileExtension)(file.path)
86
- });
87
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
88
- skipFormat: metadata.skipFormat,
89
- storage: metadata.storage,
90
- ...metadata.typeDefinition ?? {}
91
- });
92
- else this.emitSync(file.contents, file.path, metadata);
93
- } else this.fs.copySync(file.sourcePath, file.path);
94
- }
95
- });
96
- };
97
- }
98
- }
99
- }
100
- ];
101
- };
102
- var src_default$1 = plugin;
103
-
104
- //#endregion
105
- exports.default = src_default$1;
@@ -1,103 +0,0 @@
1
- import src_default from "../../plugin-babel/src/index.mjs";
2
- import { Output as Output$1 } from "./core/components/output.mjs";
3
- import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
4
- import { renderAsync, traverseOutput } from "@alloy-js/core";
5
- import { createComponent } from "@alloy-js/core/jsx-runtime";
6
- import { StormJSON } from "@stryke/json/storm-json";
7
- import alloyPreset from "@alloy-js/babel-preset";
8
-
9
- //#region ../plugin-alloy/src/index.tsx
10
- /**
11
- * Alloy-js plugin for Powerlines.
12
- *
13
- * @param options - The Alloy-js plugin user configuration options.
14
- * @returns A Powerlines plugin that integrates Alloy-js transformations.
15
- */
16
- const plugin = (options = {}) => {
17
- return [
18
- src_default(),
19
- {
20
- name: "alloy:config",
21
- config() {
22
- this.debug("Updating configuration options to support Alloy-js builds.");
23
- return {
24
- alloy: {
25
- typescript: true,
26
- ...options
27
- },
28
- transform: { babel: { presets: [[
29
- alloyPreset({ addSourceInfo: this.config.mode === "development" }),
30
- {},
31
- (_, id) => /^(?:m|c)?tsx?$/.test(findFileExtensionSafe(id, { fullExtension: true }))
32
- ]] } },
33
- build: {
34
- inputOptions: { transform: { jsx: "preserve" } },
35
- external: [
36
- "@alloy-js/core",
37
- "@alloy-js/typescript",
38
- "@alloy-js/json",
39
- "@alloy-js/markdown"
40
- ]
41
- }
42
- };
43
- },
44
- async configResolved() {
45
- this.debug("Ensuring TypeScript configuration is set up for Alloy-js.");
46
- if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
47
- this.tsconfig.tsconfigJson.compilerOptions ??= {};
48
- if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
49
- if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
50
- await this.fs.write(this.tsconfig.tsconfigFilePath, StormJSON.stringify(this.tsconfig.tsconfigJson));
51
- }
52
- }
53
- },
54
- {
55
- name: "alloy:create-render",
56
- configResolved: {
57
- order: "pre",
58
- async handler() {
59
- this.debug("Attaching the `render` method to the context object.");
60
- this.render = async (children) => {
61
- const _self$ = this;
62
- const meta = {};
63
- await traverseOutput(await renderAsync(createComponent(Output$1, {
64
- context: _self$,
65
- meta,
66
- get basePath() {
67
- return _self$.workspaceConfig.workspaceRoot;
68
- },
69
- children
70
- })), {
71
- visitDirectory: (directory) => {
72
- if (this.fs.existsSync(directory.path)) return;
73
- this.fs.mkdirSync(directory.path);
74
- },
75
- visitFile: (file) => {
76
- if ("contents" in file) {
77
- const metadata = meta[file.path] ?? {};
78
- if (metadata.kind === "builtin") {
79
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
80
- this.emitBuiltinSync(file.contents, metadata.id, {
81
- skipFormat: metadata.skipFormat,
82
- storage: metadata.storage,
83
- extension: findFileExtension(file.path)
84
- });
85
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
86
- skipFormat: metadata.skipFormat,
87
- storage: metadata.storage,
88
- ...metadata.typeDefinition ?? {}
89
- });
90
- else this.emitSync(file.contents, file.path, metadata);
91
- } else this.fs.copySync(file.sourcePath, file.path);
92
- }
93
- });
94
- };
95
- }
96
- }
97
- }
98
- ];
99
- };
100
- var src_default$1 = plugin;
101
-
102
- //#endregion
103
- export { src_default$1 as default };
@@ -1,115 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../../core/contexts/context.cjs');
3
- const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
4
- const require_source_file = require('../../core/components/source-file.cjs');
5
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
6
- let __alloy_js_core = require("@alloy-js/core");
7
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
8
- let __alloy_js_markdown = require("@alloy-js/markdown");
9
-
10
- //#region ../plugin-alloy/src/markdown/components/markdown-file.tsx
11
- /**
12
- * A base component representing a Powerlines generated markdown source file.
13
- *
14
- * @param props - The properties for the source file.
15
- * @returns The rendered source file component.
16
- */
17
- function MarkdownFile(props) {
18
- const [{ children, storage }, rest] = (0, __alloy_js_core.splitProps)(props, ["children", "storage"]);
19
- return (0, __alloy_js_core_jsx_runtime.createComponent)(require_source_file.SourceFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({ get header() {
20
- return (0, __alloy_js_core_jsx_runtime.createComponent)(MarkdownFileHeader, {});
21
- } }, rest, {
22
- filetype: "md",
23
- reference: __alloy_js_markdown.Link,
24
- storage,
25
- get children() {
26
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
27
- get when() {
28
- return Boolean(children);
29
- },
30
- children
31
- });
32
- }
33
- }));
34
- }
35
- /**
36
- * Renders the header for a Powerlines Typescript source file.
37
- *
38
- * @param props - The properties for the source file header.
39
- * @returns The rendered source file header.
40
- */
41
- function MarkdownFileHeader(props) {
42
- const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = (0, __alloy_js_core.splitProps)(props, [
43
- "children",
44
- "disableEslint",
45
- "disableBiome",
46
- "disablePrettier"
47
- ]);
48
- const context = require_context.usePowerlinesSafe();
49
- return [
50
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
51
- get when() {
52
- return Boolean(disableEslint);
53
- },
54
- get children() {
55
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
56
- variant: "markdown",
57
- children: "eslint-disable"
58
- }), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
59
- }
60
- }),
61
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
62
- get when() {
63
- return Boolean(disablePrettier);
64
- },
65
- get children() {
66
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
67
- variant: "markdown",
68
- children: "prettier-ignore"
69
- }), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
70
- }
71
- }),
72
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
73
- get when() {
74
- return Boolean(disableBiome);
75
- },
76
- get children() {
77
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
78
- variant: "markdown",
79
- children: "biome-ignore lint: disable"
80
- }), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
81
- }
82
- }),
83
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
84
- get when() {
85
- return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
86
- },
87
- get children() {
88
- return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
89
- }
90
- }),
91
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
92
- get when() {
93
- return Boolean(children);
94
- },
95
- get children() {
96
- return [children, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
97
- }
98
- }),
99
- (0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
100
- variant: "markdown",
101
- get children() {
102
- return `Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}`;
103
- }
104
- }),
105
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
106
- (0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
107
- variant: "markdown",
108
- children: __alloy_js_core.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
109
- }),
110
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
111
- ];
112
- }
113
-
114
- //#endregion
115
- exports.MarkdownFile = MarkdownFile;
@@ -1,8 +0,0 @@
1
- import { ComponentProps } from "../../types/components.cjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
3
- import "@alloy-js/core";
4
-
5
- //#region ../plugin-alloy/src/markdown/components/markdown-file.d.ts
6
- type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
7
- //#endregion
8
- export { MarkdownFileProps };
@@ -1,8 +0,0 @@
1
- import { ComponentProps } from "../../types/components.mjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
3
- import "@alloy-js/core";
4
-
5
- //#region ../plugin-alloy/src/markdown/components/markdown-file.d.ts
6
- type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
7
- //#endregion
8
- export { MarkdownFileProps };
@@ -1,114 +0,0 @@
1
- import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
2
- import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
3
- import { SourceFile } from "../../core/components/source-file.mjs";
4
- import { titleCase } from "@stryke/string-format/title-case";
5
- import { Show, code, splitProps } from "@alloy-js/core";
6
- import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
7
- import { Link } from "@alloy-js/markdown";
8
-
9
- //#region ../plugin-alloy/src/markdown/components/markdown-file.tsx
10
- /**
11
- * A base component representing a Powerlines generated markdown source file.
12
- *
13
- * @param props - The properties for the source file.
14
- * @returns The rendered source file component.
15
- */
16
- function MarkdownFile(props) {
17
- const [{ children, storage }, rest] = splitProps(props, ["children", "storage"]);
18
- return createComponent(SourceFile, mergeProps({ get header() {
19
- return createComponent(MarkdownFileHeader, {});
20
- } }, rest, {
21
- filetype: "md",
22
- reference: Link,
23
- storage,
24
- get children() {
25
- return createComponent(Show, {
26
- get when() {
27
- return Boolean(children);
28
- },
29
- children
30
- });
31
- }
32
- }));
33
- }
34
- /**
35
- * Renders the header for a Powerlines Typescript source file.
36
- *
37
- * @param props - The properties for the source file header.
38
- * @returns The rendered source file header.
39
- */
40
- function MarkdownFileHeader(props) {
41
- const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = splitProps(props, [
42
- "children",
43
- "disableEslint",
44
- "disableBiome",
45
- "disablePrettier"
46
- ]);
47
- const context = usePowerlinesSafe();
48
- return [
49
- createComponent(Show, {
50
- get when() {
51
- return Boolean(disableEslint);
52
- },
53
- get children() {
54
- return [createComponent(SingleLineComment, {
55
- variant: "markdown",
56
- children: "eslint-disable"
57
- }), createIntrinsic("hbr", {})];
58
- }
59
- }),
60
- createComponent(Show, {
61
- get when() {
62
- return Boolean(disablePrettier);
63
- },
64
- get children() {
65
- return [createComponent(SingleLineComment, {
66
- variant: "markdown",
67
- children: "prettier-ignore"
68
- }), createIntrinsic("hbr", {})];
69
- }
70
- }),
71
- createComponent(Show, {
72
- get when() {
73
- return Boolean(disableBiome);
74
- },
75
- get children() {
76
- return [createComponent(SingleLineComment, {
77
- variant: "markdown",
78
- children: "biome-ignore lint: disable"
79
- }), createIntrinsic("hbr", {})];
80
- }
81
- }),
82
- createComponent(Show, {
83
- get when() {
84
- return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
85
- },
86
- get children() {
87
- return createIntrinsic("hbr", {});
88
- }
89
- }),
90
- createComponent(Show, {
91
- get when() {
92
- return Boolean(children);
93
- },
94
- get children() {
95
- return [children, createIntrinsic("hbr", {})];
96
- }
97
- }),
98
- createComponent(SingleLineComment, {
99
- variant: "markdown",
100
- get children() {
101
- return `Generated by ${titleCase(context?.config?.framework) || "Powerlines"}`;
102
- }
103
- }),
104
- createIntrinsic("hbr", {}),
105
- createComponent(SingleLineComment, {
106
- variant: "markdown",
107
- children: code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
108
- }),
109
- createIntrinsic("hbr", {})
110
- ];
111
- }
112
-
113
- //#endregion
114
- export { MarkdownFile };
@@ -1,39 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_markdown_table = require('../contexts/markdown-table.cjs');
3
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
7
-
8
- //#region ../plugin-alloy/src/markdown/components/markdown-table.tsx
9
- /**
10
- * Component that provides a context for rendering markdown tables.
11
- */
12
- function MarkdownTable(props) {
13
- const [{ children, data }] = (0, __alloy_js_core.splitProps)(props, ["children", "data"]);
14
- const columns = (0, __alloy_js_core.computed)(() => Object.keys(data).map((name, index) => ({
15
- index,
16
- name,
17
- align: "left",
18
- width: 20
19
- })));
20
- return (0, __alloy_js_core_jsx_runtime.createComponent)(require_markdown_table.MarkdownTableContext.Provider, {
21
- get value() {
22
- return {
23
- columns: columns.value,
24
- data
25
- };
26
- },
27
- get children() {
28
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
29
- get when() {
30
- return Boolean(children);
31
- },
32
- children
33
- });
34
- }
35
- });
36
- }
37
-
38
- //#endregion
39
- exports.MarkdownTable = MarkdownTable;
@@ -1,38 +0,0 @@
1
- import { MarkdownTableContext } from "../contexts/markdown-table.mjs";
2
- import { titleCase } from "@stryke/string-format/title-case";
3
- import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
4
- import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
5
- import { isUndefined } from "@stryke/type-checks/is-undefined";
6
-
7
- //#region ../plugin-alloy/src/markdown/components/markdown-table.tsx
8
- /**
9
- * Component that provides a context for rendering markdown tables.
10
- */
11
- function MarkdownTable(props) {
12
- const [{ children, data }] = splitProps(props, ["children", "data"]);
13
- const columns = computed(() => Object.keys(data).map((name, index) => ({
14
- index,
15
- name,
16
- align: "left",
17
- width: 20
18
- })));
19
- return createComponent(MarkdownTableContext.Provider, {
20
- get value() {
21
- return {
22
- columns: columns.value,
23
- data
24
- };
25
- },
26
- get children() {
27
- return createComponent(Show, {
28
- get when() {
29
- return Boolean(children);
30
- },
31
- children
32
- });
33
- }
34
- });
35
- }
36
-
37
- //#endregion
38
- export { MarkdownTable };
@@ -1,72 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- let __alloy_js_core = require("@alloy-js/core");
3
-
4
- //#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
5
- const __ΩRecord = [
6
- "K",
7
- "T",
8
- "Record",
9
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
10
- ];
11
- const __ΩMarkdownTableColumnContextInterface = [
12
- () => __ΩRecord,
13
- "T",
14
- "index",
15
- "name",
16
- "left",
17
- "right",
18
- "center",
19
- "align",
20
- "width",
21
- "MarkdownTableColumnContextInterface",
22
- "&\"o!#c\"P'4#e\"!g4$P.%.&.'J4('4)Mw*y"
23
- ];
24
- /**
25
- * The Powerlines context used in template rendering.
26
- */
27
- const MarkdownTableColumnContext = (__alloy_js_core.createNamedContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], (0, __alloy_js_core.createNamedContext)("markdown-table-column", {}));
28
- /**
29
- * Hook to access the Powerlines Context.
30
- *
31
- * @returns The Context.
32
- */
33
- function useMarkdownTableColumn() {
34
- return __alloy_js_core.useContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], (0, __alloy_js_core.useContext)(MarkdownTableColumnContext);
35
- }
36
- useMarkdownTableColumn.__type = [
37
- "useMarkdownTableColumn",
38
- "Hook to access the Powerlines Context.",
39
- "P\"/!?\""
40
- ];
41
- const __ΩMarkdownTableContextInterface = [
42
- () => __ΩRecord,
43
- "T",
44
- () => __ΩMarkdownTableColumnContextInterface,
45
- "columns",
46
- "data",
47
- "MarkdownTableContextInterface",
48
- "&\"o!#c\"Pe\"!o#\"F4$e\"!F4%Mw&y"
49
- ];
50
- /**
51
- * The Powerlines context used in template rendering.
52
- */
53
- const MarkdownTableContext = (__alloy_js_core.createContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], (0, __alloy_js_core.createContext)({
54
- columns: [],
55
- data: []
56
- }));
57
- /**
58
- * Hook to access the Powerlines Context.
59
- *
60
- * @returns The Context.
61
- */
62
- function useMarkdownTable() {
63
- return __alloy_js_core.useContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], (0, __alloy_js_core.useContext)(MarkdownTableContext);
64
- }
65
- useMarkdownTable.__type = [
66
- "useMarkdownTable",
67
- "Hook to access the Powerlines Context.",
68
- "P\"/!?\""
69
- ];
70
-
71
- //#endregion
72
- exports.MarkdownTableContext = MarkdownTableContext;
@@ -1,71 +0,0 @@
1
- import { createContext, createNamedContext, useContext } from "@alloy-js/core";
2
-
3
- //#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
4
- const __ΩRecord = [
5
- "K",
6
- "T",
7
- "Record",
8
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
9
- ];
10
- const __ΩMarkdownTableColumnContextInterface = [
11
- () => __ΩRecord,
12
- "T",
13
- "index",
14
- "name",
15
- "left",
16
- "right",
17
- "center",
18
- "align",
19
- "width",
20
- "MarkdownTableColumnContextInterface",
21
- "&\"o!#c\"P'4#e\"!g4$P.%.&.'J4('4)Mw*y"
22
- ];
23
- /**
24
- * The Powerlines context used in template rendering.
25
- */
26
- const MarkdownTableColumnContext = (createNamedContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], createNamedContext("markdown-table-column", {}));
27
- /**
28
- * Hook to access the Powerlines Context.
29
- *
30
- * @returns The Context.
31
- */
32
- function useMarkdownTableColumn() {
33
- return useContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], useContext(MarkdownTableColumnContext);
34
- }
35
- useMarkdownTableColumn.__type = [
36
- "useMarkdownTableColumn",
37
- "Hook to access the Powerlines Context.",
38
- "P\"/!?\""
39
- ];
40
- const __ΩMarkdownTableContextInterface = [
41
- () => __ΩRecord,
42
- "T",
43
- () => __ΩMarkdownTableColumnContextInterface,
44
- "columns",
45
- "data",
46
- "MarkdownTableContextInterface",
47
- "&\"o!#c\"Pe\"!o#\"F4$e\"!F4%Mw&y"
48
- ];
49
- /**
50
- * The Powerlines context used in template rendering.
51
- */
52
- const MarkdownTableContext = (createContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], createContext({
53
- columns: [],
54
- data: []
55
- }));
56
- /**
57
- * Hook to access the Powerlines Context.
58
- *
59
- * @returns The Context.
60
- */
61
- function useMarkdownTable() {
62
- return useContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], useContext(MarkdownTableContext);
63
- }
64
- useMarkdownTable.__type = [
65
- "useMarkdownTable",
66
- "Hook to access the Powerlines Context.",
67
- "P\"/!?\""
68
- ];
69
-
70
- //#endregion
71
- export { MarkdownTableContext };