@ryanatkn/gro 0.190.1 → 0.192.0

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 (323) hide show
  1. package/README.md +4 -278
  2. package/package.json +5 -142
  3. package/LICENSE +0 -21
  4. package/dist/args.d.ts +0 -37
  5. package/dist/args.d.ts.map +0 -1
  6. package/dist/args.js +0 -102
  7. package/dist/build.task.d.ts +0 -20
  8. package/dist/build.task.d.ts.map +0 -1
  9. package/dist/build.task.js +0 -119
  10. package/dist/build_cache.d.ts +0 -100
  11. package/dist/build_cache.d.ts.map +0 -1
  12. package/dist/build_cache.js +0 -299
  13. package/dist/changelog.d.ts +0 -11
  14. package/dist/changelog.d.ts.map +0 -1
  15. package/dist/changelog.js +0 -47
  16. package/dist/changeset.task.d.ts +0 -35
  17. package/dist/changeset.task.d.ts.map +0 -1
  18. package/dist/changeset.task.js +0 -151
  19. package/dist/changeset_helpers.d.ts +0 -17
  20. package/dist/changeset_helpers.d.ts.map +0 -1
  21. package/dist/changeset_helpers.js +0 -7
  22. package/dist/check.task.d.ts +0 -28
  23. package/dist/check.task.d.ts.map +0 -1
  24. package/dist/check.task.js +0 -95
  25. package/dist/child_process_logging.d.ts +0 -10
  26. package/dist/child_process_logging.d.ts.map +0 -1
  27. package/dist/child_process_logging.js +0 -26
  28. package/dist/clean.task.d.ts +0 -15
  29. package/dist/clean.task.d.ts.map +0 -1
  30. package/dist/clean.task.js +0 -40
  31. package/dist/clean_fs.d.ts +0 -9
  32. package/dist/clean_fs.d.ts.map +0 -1
  33. package/dist/clean_fs.js +0 -28
  34. package/dist/cli.d.ts +0 -34
  35. package/dist/cli.d.ts.map +0 -1
  36. package/dist/cli.js +0 -61
  37. package/dist/commit.task.d.ts +0 -11
  38. package/dist/commit.task.d.ts.map +0 -1
  39. package/dist/commit.task.js +0 -24
  40. package/dist/constants.d.ts +0 -46
  41. package/dist/constants.d.ts.map +0 -1
  42. package/dist/constants.js +0 -52
  43. package/dist/deploy.task.d.ts +0 -29
  44. package/dist/deploy.task.d.ts.map +0 -1
  45. package/dist/deploy.task.js +0 -217
  46. package/dist/dev.task.d.ts +0 -16
  47. package/dist/dev.task.d.ts.map +0 -1
  48. package/dist/dev.task.js +0 -44
  49. package/dist/disknode.d.ts +0 -23
  50. package/dist/disknode.d.ts.map +0 -1
  51. package/dist/disknode.js +0 -1
  52. package/dist/env.d.ts +0 -11
  53. package/dist/env.d.ts.map +0 -1
  54. package/dist/env.js +0 -49
  55. package/dist/esbuild_helpers.d.ts +0 -16
  56. package/dist/esbuild_helpers.d.ts.map +0 -1
  57. package/dist/esbuild_helpers.js +0 -36
  58. package/dist/esbuild_plugin_external_worker.d.ts +0 -23
  59. package/dist/esbuild_plugin_external_worker.d.ts.map +0 -1
  60. package/dist/esbuild_plugin_external_worker.js +0 -55
  61. package/dist/esbuild_plugin_svelte.d.ts +0 -15
  62. package/dist/esbuild_plugin_svelte.d.ts.map +0 -1
  63. package/dist/esbuild_plugin_svelte.js +0 -83
  64. package/dist/esbuild_plugin_sveltekit_local_imports.d.ts +0 -8
  65. package/dist/esbuild_plugin_sveltekit_local_imports.d.ts.map +0 -1
  66. package/dist/esbuild_plugin_sveltekit_local_imports.js +0 -30
  67. package/dist/esbuild_plugin_sveltekit_shim_alias.d.ts +0 -7
  68. package/dist/esbuild_plugin_sveltekit_shim_alias.d.ts.map +0 -1
  69. package/dist/esbuild_plugin_sveltekit_shim_alias.js +0 -18
  70. package/dist/esbuild_plugin_sveltekit_shim_app.d.ts +0 -9
  71. package/dist/esbuild_plugin_sveltekit_shim_app.d.ts.map +0 -1
  72. package/dist/esbuild_plugin_sveltekit_shim_app.js +0 -22
  73. package/dist/esbuild_plugin_sveltekit_shim_env.d.ts +0 -11
  74. package/dist/esbuild_plugin_sveltekit_shim_env.d.ts.map +0 -1
  75. package/dist/esbuild_plugin_sveltekit_shim_env.js +0 -18
  76. package/dist/filer.d.ts +0 -33
  77. package/dist/filer.d.ts.map +0 -1
  78. package/dist/filer.js +0 -385
  79. package/dist/format.task.d.ts +0 -11
  80. package/dist/format.task.d.ts.map +0 -1
  81. package/dist/format.task.js +0 -27
  82. package/dist/format_directory.d.ts +0 -13
  83. package/dist/format_directory.d.ts.map +0 -1
  84. package/dist/format_directory.js +0 -40
  85. package/dist/format_file.d.ts +0 -9
  86. package/dist/format_file.d.ts.map +0 -1
  87. package/dist/format_file.js +0 -42
  88. package/dist/gen.d.ts +0 -142
  89. package/dist/gen.d.ts.map +0 -1
  90. package/dist/gen.js +0 -199
  91. package/dist/gen.task.d.ts +0 -12
  92. package/dist/gen.task.d.ts.map +0 -1
  93. package/dist/gen.task.js +0 -149
  94. package/dist/gen_helpers.d.ts +0 -11
  95. package/dist/gen_helpers.d.ts.map +0 -1
  96. package/dist/gen_helpers.js +0 -76
  97. package/dist/github.d.ts +0 -19
  98. package/dist/github.d.ts.map +0 -1
  99. package/dist/github.js +0 -33
  100. package/dist/gro.config.default.d.ts +0 -13
  101. package/dist/gro.config.default.d.ts.map +0 -1
  102. package/dist/gro.config.default.js +0 -33
  103. package/dist/gro.d.ts +0 -3
  104. package/dist/gro.d.ts.map +0 -1
  105. package/dist/gro.js +0 -21
  106. package/dist/gro_config.d.ts +0 -115
  107. package/dist/gro_config.d.ts.map +0 -1
  108. package/dist/gro_config.js +0 -114
  109. package/dist/gro_helpers.d.ts +0 -49
  110. package/dist/gro_helpers.d.ts.map +0 -1
  111. package/dist/gro_helpers.js +0 -97
  112. package/dist/gro_plugin_gen.d.ts +0 -12
  113. package/dist/gro_plugin_gen.d.ts.map +0 -1
  114. package/dist/gro_plugin_gen.js +0 -101
  115. package/dist/gro_plugin_server.d.ts +0 -80
  116. package/dist/gro_plugin_server.d.ts.map +0 -1
  117. package/dist/gro_plugin_server.js +0 -167
  118. package/dist/gro_plugin_sveltekit_app.d.ts +0 -9
  119. package/dist/gro_plugin_sveltekit_app.d.ts.map +0 -1
  120. package/dist/gro_plugin_sveltekit_app.js +0 -42
  121. package/dist/gro_plugin_sveltekit_library.d.ts +0 -16
  122. package/dist/gro_plugin_sveltekit_library.d.ts.map +0 -1
  123. package/dist/gro_plugin_sveltekit_library.js +0 -34
  124. package/dist/index.d.ts +0 -9
  125. package/dist/index.d.ts.map +0 -1
  126. package/dist/index.js +0 -4
  127. package/dist/input_path.d.ts +0 -64
  128. package/dist/input_path.d.ts.map +0 -1
  129. package/dist/input_path.js +0 -199
  130. package/dist/invoke.d.ts +0 -2
  131. package/dist/invoke.d.ts.map +0 -1
  132. package/dist/invoke.js +0 -28
  133. package/dist/invoke_task.d.ts +0 -30
  134. package/dist/invoke_task.d.ts.map +0 -1
  135. package/dist/invoke_task.js +0 -104
  136. package/dist/lint.task.d.ts +0 -11
  137. package/dist/lint.task.d.ts.map +0 -1
  138. package/dist/lint.task.js +0 -32
  139. package/dist/loader.d.ts +0 -6
  140. package/dist/loader.d.ts.map +0 -1
  141. package/dist/loader.js +0 -192
  142. package/dist/module.d.ts +0 -4
  143. package/dist/module.d.ts.map +0 -1
  144. package/dist/module.js +0 -6
  145. package/dist/modules.d.ts +0 -36
  146. package/dist/modules.d.ts.map +0 -1
  147. package/dist/modules.js +0 -71
  148. package/dist/package_json.d.ts +0 -32
  149. package/dist/package_json.d.ts.map +0 -1
  150. package/dist/package_json.js +0 -178
  151. package/dist/parse_exports.d.ts +0 -20
  152. package/dist/parse_exports.d.ts.map +0 -1
  153. package/dist/parse_exports.js +0 -65
  154. package/dist/parse_exports_context.d.ts +0 -21
  155. package/dist/parse_exports_context.d.ts.map +0 -1
  156. package/dist/parse_exports_context.js +0 -332
  157. package/dist/parse_imports.d.ts +0 -5
  158. package/dist/parse_imports.d.ts.map +0 -1
  159. package/dist/parse_imports.js +0 -140
  160. package/dist/paths.d.ts +0 -41
  161. package/dist/paths.d.ts.map +0 -1
  162. package/dist/paths.js +0 -69
  163. package/dist/plugin.d.ts +0 -36
  164. package/dist/plugin.d.ts.map +0 -1
  165. package/dist/plugin.js +0 -78
  166. package/dist/publish.task.d.ts +0 -26
  167. package/dist/publish.task.d.ts.map +0 -1
  168. package/dist/publish.task.js +0 -176
  169. package/dist/register.d.ts +0 -2
  170. package/dist/register.d.ts.map +0 -1
  171. package/dist/register.js +0 -2
  172. package/dist/reinstall.task.d.ts +0 -8
  173. package/dist/reinstall.task.d.ts.map +0 -1
  174. package/dist/reinstall.task.js +0 -35
  175. package/dist/release.task.d.ts +0 -8
  176. package/dist/release.task.d.ts.map +0 -1
  177. package/dist/release.task.js +0 -20
  178. package/dist/resolve.task.d.ts +0 -11
  179. package/dist/resolve.task.d.ts.map +0 -1
  180. package/dist/resolve.task.js +0 -38
  181. package/dist/resolve_specifier.d.ts +0 -22
  182. package/dist/resolve_specifier.d.ts.map +0 -1
  183. package/dist/resolve_specifier.js +0 -57
  184. package/dist/run.task.d.ts +0 -16
  185. package/dist/run.task.d.ts.map +0 -1
  186. package/dist/run.task.js +0 -52
  187. package/dist/run_gen.d.ts +0 -10
  188. package/dist/run_gen.d.ts.map +0 -1
  189. package/dist/run_gen.js +0 -73
  190. package/dist/run_task.d.ts +0 -17
  191. package/dist/run_task.d.ts.map +0 -1
  192. package/dist/run_task.js +0 -45
  193. package/dist/source_json.d.ts +0 -7
  194. package/dist/source_json.d.ts.map +0 -1
  195. package/dist/source_json.js +0 -145
  196. package/dist/svelte_config.d.ts +0 -57
  197. package/dist/svelte_config.d.ts.map +0 -1
  198. package/dist/svelte_config.js +0 -81
  199. package/dist/sveltekit_helpers.d.ts +0 -75
  200. package/dist/sveltekit_helpers.d.ts.map +0 -1
  201. package/dist/sveltekit_helpers.js +0 -94
  202. package/dist/sveltekit_shim_app.d.ts +0 -11
  203. package/dist/sveltekit_shim_app.d.ts.map +0 -1
  204. package/dist/sveltekit_shim_app.js +0 -31
  205. package/dist/sveltekit_shim_app_environment.d.ts +0 -13
  206. package/dist/sveltekit_shim_app_environment.d.ts.map +0 -1
  207. package/dist/sveltekit_shim_app_environment.js +0 -14
  208. package/dist/sveltekit_shim_app_forms.d.ts +0 -5
  209. package/dist/sveltekit_shim_app_forms.d.ts.map +0 -1
  210. package/dist/sveltekit_shim_app_forms.js +0 -6
  211. package/dist/sveltekit_shim_app_navigation.d.ts +0 -10
  212. package/dist/sveltekit_shim_app_navigation.d.ts.map +0 -1
  213. package/dist/sveltekit_shim_app_navigation.js +0 -11
  214. package/dist/sveltekit_shim_app_paths.d.ts +0 -17
  215. package/dist/sveltekit_shim_app_paths.d.ts.map +0 -1
  216. package/dist/sveltekit_shim_app_paths.js +0 -10
  217. package/dist/sveltekit_shim_app_state.d.ts +0 -5
  218. package/dist/sveltekit_shim_app_state.d.ts.map +0 -1
  219. package/dist/sveltekit_shim_app_state.js +0 -26
  220. package/dist/sveltekit_shim_env.d.ts +0 -5
  221. package/dist/sveltekit_shim_env.d.ts.map +0 -1
  222. package/dist/sveltekit_shim_env.js +0 -23
  223. package/dist/sync.task.d.ts +0 -16
  224. package/dist/sync.task.d.ts.map +0 -1
  225. package/dist/sync.task.js +0 -39
  226. package/dist/task.d.ts +0 -98
  227. package/dist/task.d.ts.map +0 -1
  228. package/dist/task.js +0 -109
  229. package/dist/task_logging.d.ts +0 -6
  230. package/dist/task_logging.d.ts.map +0 -1
  231. package/dist/task_logging.js +0 -201
  232. package/dist/test.task.d.ts +0 -13
  233. package/dist/test.task.d.ts.map +0 -1
  234. package/dist/test.task.js +0 -53
  235. package/dist/typecheck.task.d.ts +0 -13
  236. package/dist/typecheck.task.d.ts.map +0 -1
  237. package/dist/typecheck.task.js +0 -68
  238. package/dist/upgrade.task.d.ts +0 -20
  239. package/dist/upgrade.task.d.ts.map +0 -1
  240. package/dist/upgrade.task.js +0 -111
  241. package/dist/watch_dir.d.ts +0 -36
  242. package/dist/watch_dir.d.ts.map +0 -1
  243. package/dist/watch_dir.js +0 -69
  244. package/src/lib/args.ts +0 -115
  245. package/src/lib/build.task.ts +0 -151
  246. package/src/lib/build_cache.ts +0 -378
  247. package/src/lib/changelog.ts +0 -69
  248. package/src/lib/changeset.task.ts +0 -228
  249. package/src/lib/changeset_helpers.ts +0 -14
  250. package/src/lib/check.task.ts +0 -120
  251. package/src/lib/child_process_logging.ts +0 -38
  252. package/src/lib/clean.task.ts +0 -48
  253. package/src/lib/clean_fs.ts +0 -54
  254. package/src/lib/cli.ts +0 -98
  255. package/src/lib/commit.task.ts +0 -34
  256. package/src/lib/constants.ts +0 -56
  257. package/src/lib/deploy.task.ts +0 -287
  258. package/src/lib/dev.task.ts +0 -52
  259. package/src/lib/disknode.ts +0 -26
  260. package/src/lib/env.ts +0 -78
  261. package/src/lib/esbuild_helpers.ts +0 -49
  262. package/src/lib/esbuild_plugin_external_worker.ts +0 -94
  263. package/src/lib/esbuild_plugin_svelte.ts +0 -134
  264. package/src/lib/esbuild_plugin_sveltekit_local_imports.ts +0 -38
  265. package/src/lib/esbuild_plugin_sveltekit_shim_alias.ts +0 -27
  266. package/src/lib/esbuild_plugin_sveltekit_shim_app.ts +0 -42
  267. package/src/lib/esbuild_plugin_sveltekit_shim_env.ts +0 -47
  268. package/src/lib/filer.ts +0 -458
  269. package/src/lib/format.task.ts +0 -44
  270. package/src/lib/format_directory.ts +0 -65
  271. package/src/lib/format_file.ts +0 -49
  272. package/src/lib/gen.task.ts +0 -206
  273. package/src/lib/gen.ts +0 -406
  274. package/src/lib/gen_helpers.ts +0 -131
  275. package/src/lib/github.ts +0 -46
  276. package/src/lib/gro.config.default.ts +0 -42
  277. package/src/lib/gro.ts +0 -29
  278. package/src/lib/gro_config.ts +0 -254
  279. package/src/lib/gro_helpers.ts +0 -108
  280. package/src/lib/gro_plugin_gen.ts +0 -149
  281. package/src/lib/gro_plugin_server.ts +0 -288
  282. package/src/lib/gro_plugin_sveltekit_app.ts +0 -58
  283. package/src/lib/gro_plugin_sveltekit_library.ts +0 -63
  284. package/src/lib/index.ts +0 -8
  285. package/src/lib/input_path.ts +0 -254
  286. package/src/lib/invoke.ts +0 -34
  287. package/src/lib/invoke_task.ts +0 -139
  288. package/src/lib/lint.task.ts +0 -39
  289. package/src/lib/loader.ts +0 -229
  290. package/src/lib/module.ts +0 -13
  291. package/src/lib/modules.ts +0 -117
  292. package/src/lib/package_json.ts +0 -255
  293. package/src/lib/parse_exports.ts +0 -100
  294. package/src/lib/parse_exports_context.ts +0 -395
  295. package/src/lib/parse_imports.ts +0 -180
  296. package/src/lib/paths.ts +0 -111
  297. package/src/lib/plugin.ts +0 -106
  298. package/src/lib/publish.task.ts +0 -228
  299. package/src/lib/register.ts +0 -3
  300. package/src/lib/reinstall.task.ts +0 -45
  301. package/src/lib/release.task.ts +0 -26
  302. package/src/lib/resolve.task.ts +0 -43
  303. package/src/lib/resolve_specifier.ts +0 -81
  304. package/src/lib/run.task.ts +0 -65
  305. package/src/lib/run_gen.ts +0 -110
  306. package/src/lib/run_task.ts +0 -82
  307. package/src/lib/source_json.ts +0 -183
  308. package/src/lib/svelte_config.ts +0 -140
  309. package/src/lib/sveltekit_helpers.ts +0 -193
  310. package/src/lib/sveltekit_shim_app.ts +0 -41
  311. package/src/lib/sveltekit_shim_app_environment.ts +0 -16
  312. package/src/lib/sveltekit_shim_app_forms.ts +0 -13
  313. package/src/lib/sveltekit_shim_app_navigation.ts +0 -23
  314. package/src/lib/sveltekit_shim_app_paths.ts +0 -26
  315. package/src/lib/sveltekit_shim_app_state.ts +0 -35
  316. package/src/lib/sveltekit_shim_env.ts +0 -45
  317. package/src/lib/sync.task.ts +0 -47
  318. package/src/lib/task.ts +0 -245
  319. package/src/lib/task_logging.ts +0 -255
  320. package/src/lib/test.task.ts +0 -63
  321. package/src/lib/typecheck.task.ts +0 -81
  322. package/src/lib/upgrade.task.ts +0 -148
  323. package/src/lib/watch_dir.ts +0 -115
@@ -1,332 +0,0 @@
1
- import ts from 'typescript';
2
- /**
3
- * A class to track export context and determine export kinds.
4
- */
5
- export class ParseExportsContext {
6
- #checker;
7
- // Map of source file paths to their symbols
8
- #file_symbols = new Map();
9
- // Cache for resolved symbols to avoid repeated resolution
10
- #symbol_kind_cache = new Map();
11
- log;
12
- debug = process.env.DEBUG_EXPORTS === 'true';
13
- constructor(program, log) {
14
- this.log = log;
15
- this.#checker = program.getTypeChecker();
16
- }
17
- /**
18
- * Log a debug message if debug mode is enabled.
19
- */
20
- #log(...args) {
21
- if (this.debug && this.log) {
22
- this.log.info(...args);
23
- }
24
- }
25
- /**
26
- * Analyze a source file to prepare for export processing.
27
- */
28
- analyze_source_file(source_file) {
29
- const file_path = source_file.fileName;
30
- // Skip if we've already analyzed this file
31
- if (this.#file_symbols.has(file_path)) {
32
- return;
33
- }
34
- // Get the source file symbol and cache it
35
- const symbol = this.#checker.getSymbolAtLocation(source_file);
36
- if (symbol) {
37
- this.#file_symbols.set(file_path, symbol);
38
- }
39
- }
40
- /**
41
- * Process a list of exported symbols and identify their kinds.
42
- */
43
- process_exports(source_file, exports, declarations = []) {
44
- for (const export_symbol of exports) {
45
- const name = export_symbol.name;
46
- this.#log(`Determining kind for export: ${name}`);
47
- const kind = this.#determine_export_kind(source_file, export_symbol);
48
- declarations.push({
49
- name,
50
- kind,
51
- });
52
- }
53
- return declarations;
54
- }
55
- /**
56
- * Determine the kind of an export based on its symbol.
57
- */
58
- #determine_export_kind(source_file, symbol) {
59
- // Check if this is a type-only export (no value export)
60
- if (this.#is_type_only_export(source_file, symbol)) {
61
- return 'type';
62
- }
63
- // Get the true symbol by resolving aliases
64
- const resolved_symbol = this.#resolve_symbol(symbol);
65
- // Check if we've already determined this symbol's kind
66
- if (this.#symbol_kind_cache.has(resolved_symbol)) {
67
- return this.#symbol_kind_cache.get(resolved_symbol);
68
- }
69
- // Determine the kind based on declaration and type information
70
- const kind = this.#infer_declaration_kind(resolved_symbol);
71
- // Cache the result for future lookups
72
- this.#symbol_kind_cache.set(resolved_symbol, kind);
73
- return kind;
74
- }
75
- /**
76
- * Resolve a symbol through aliases to its original declaration.
77
- */
78
- #resolve_symbol(symbol) {
79
- try {
80
- if (symbol.flags & ts.SymbolFlags.Alias) {
81
- return this.#checker.getAliasedSymbol(symbol);
82
- }
83
- }
84
- catch {
85
- // If resolution fails, return the original symbol
86
- }
87
- return symbol;
88
- }
89
- /**
90
- * Infer the declaration kind from a symbol's declaration and type information.
91
- */
92
- #infer_declaration_kind(symbol) {
93
- // Check symbol flags first for direct type matching
94
- if (this.#is_class_symbol(symbol)) {
95
- return 'class';
96
- }
97
- if (this.#is_function_symbol(symbol)) {
98
- return 'function';
99
- }
100
- // If no direct match from flags, look at declarations
101
- if (symbol.declarations && symbol.declarations.length > 0) {
102
- const decl = symbol.declarations[0];
103
- const kind_from_decl = this.#infer_kind_from_declaration(decl);
104
- if (kind_from_decl) {
105
- return kind_from_decl;
106
- }
107
- }
108
- // Check for callable type as a fallback for functions
109
- if (this.#is_callable(symbol)) {
110
- return 'function';
111
- }
112
- // Default to variable if no other type can be determined
113
- return 'variable';
114
- }
115
- /**
116
- * Check if a symbol represents a callable type (function-like).
117
- */
118
- #is_callable(symbol) {
119
- try {
120
- // Try to get valid declaration node
121
- const declaration = this.#get_valid_declaration(symbol);
122
- if (!declaration) {
123
- return false;
124
- }
125
- // Get the type at the declaration location
126
- const type = this.#checker.getTypeOfSymbolAtLocation(symbol, declaration);
127
- // Check if the type has call signatures (making it function-like)
128
- return type.getCallSignatures().length > 0;
129
- }
130
- catch {
131
- return false;
132
- }
133
- }
134
- /**
135
- * Get a valid declaration for a symbol, preferring valueDeclaration.
136
- */
137
- #get_valid_declaration(symbol) {
138
- if (symbol.valueDeclaration) {
139
- return symbol.valueDeclaration;
140
- }
141
- if (symbol.declarations && symbol.declarations.length > 0) {
142
- return symbol.declarations[0];
143
- }
144
- return undefined;
145
- }
146
- /**
147
- * Infer the declaration kind from a specific declaration node.
148
- */
149
- #infer_kind_from_declaration(decl) {
150
- if (ts.isFunctionDeclaration(decl)) {
151
- return 'function';
152
- }
153
- if (ts.isClassDeclaration(decl)) {
154
- return 'class';
155
- }
156
- if (ts.isInterfaceDeclaration(decl) || ts.isTypeAliasDeclaration(decl)) {
157
- return 'type';
158
- }
159
- if (ts.isVariableDeclaration(decl)) {
160
- // Handle initializers for variable declarations
161
- if (decl.initializer) {
162
- if (ts.isFunctionExpression(decl.initializer) || ts.isArrowFunction(decl.initializer)) {
163
- return 'function';
164
- }
165
- if (ts.isClassExpression(decl.initializer)) {
166
- return 'class';
167
- }
168
- // Handle identifiers pointing to other declarations
169
- if (ts.isIdentifier(decl.initializer)) {
170
- try {
171
- const referred_symbol = this.#checker.getSymbolAtLocation(decl.initializer);
172
- if (referred_symbol) {
173
- // Avoid infinite recursion by not resolving symbols here
174
- if (this.#is_function_symbol(referred_symbol)) {
175
- return 'function';
176
- }
177
- if (this.#is_class_symbol(referred_symbol)) {
178
- return 'class';
179
- }
180
- }
181
- }
182
- catch {
183
- // Ignore failures to resolve identifiers
184
- }
185
- }
186
- }
187
- // As a fallback, check if the variable's type is callable
188
- try {
189
- const symbol = this.#checker.getSymbolAtLocation(decl.name);
190
- if (symbol && this.#is_callable(symbol)) {
191
- return 'function';
192
- }
193
- }
194
- catch {
195
- // Ignore errors in type checking
196
- }
197
- }
198
- return null;
199
- }
200
- /**
201
- * Check if a symbol is exported as a type-only export.
202
- * A type-only export means it's ONLY exported as a type with no value export.
203
- */
204
- #is_type_only_export(source_file, symbol) {
205
- // First, check if the symbol has an explicit type-only export
206
- let has_type_only_export = false;
207
- // Check if it has a corresponding value export
208
- const has_value_export = this.#has_value_export(source_file, symbol);
209
- // If it has both type and value exports (dual purpose), it's not type-only
210
- if (has_value_export) {
211
- return false;
212
- }
213
- // Check export declarations for explicit type-only exports
214
- ts.forEachChild(source_file, (node) => {
215
- if (ts.isExportDeclaration(node) &&
216
- node.exportClause &&
217
- ts.isNamedExports(node.exportClause)) {
218
- // Check if it's a type-only export declaration (export type {...})
219
- if (node.isTypeOnly) {
220
- for (const specifier of node.exportClause.elements) {
221
- if (specifier.name.text === symbol.name) {
222
- has_type_only_export = true;
223
- }
224
- }
225
- }
226
- else {
227
- // Check if it's a specific type export (export {type X})
228
- for (const specifier of node.exportClause.elements) {
229
- if (specifier.name.text === symbol.name && specifier.isTypeOnly) {
230
- has_type_only_export = true;
231
- }
232
- }
233
- }
234
- }
235
- });
236
- // If explicitly marked as a type-only export, use that
237
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
238
- if (has_type_only_export) {
239
- return true;
240
- }
241
- // If not explicitly marked as type-only, check if the symbol itself is a type
242
- // AND there's no value export for it
243
- const resolved_symbol = this.#resolve_symbol(symbol);
244
- return this.#is_type_symbol(resolved_symbol) && !has_value_export;
245
- }
246
- /**
247
- * Check if a symbol has a value export in the source file.
248
- */
249
- #has_value_export(source_file, symbol) {
250
- let has_value_export = false;
251
- // Check export declarations
252
- ts.forEachChild(source_file, (node) => {
253
- if (ts.isExportDeclaration(node) &&
254
- node.exportClause &&
255
- ts.isNamedExports(node.exportClause)) {
256
- // Skip type-only exports
257
- if (node.isTypeOnly)
258
- return;
259
- // Check if it's a regular export (not type-only)
260
- for (const specifier of node.exportClause.elements) {
261
- if (specifier.name.text === symbol.name && !specifier.isTypeOnly) {
262
- has_value_export = true;
263
- }
264
- }
265
- }
266
- // Check for default export
267
- else if (ts.isExportAssignment(node) && symbol.name === 'default') {
268
- has_value_export = true;
269
- }
270
- // Check for direct exports (export const x = ...)
271
- else if (this.#is_direct_export(node) && this.#get_export_name(node) === symbol.name) {
272
- has_value_export = true;
273
- }
274
- });
275
- return has_value_export;
276
- }
277
- /**
278
- * Check if a node is a direct export (export const/function/class).
279
- */
280
- #is_direct_export(node) {
281
- return ((ts.isVariableStatement(node) ||
282
- ts.isFunctionDeclaration(node) ||
283
- ts.isClassDeclaration(node)) &&
284
- this.#has_export_modifier(node));
285
- }
286
- /**
287
- * Get the export name from a direct export node.
288
- */
289
- #get_export_name(node) {
290
- if (ts.isVariableStatement(node) && node.declarationList.declarations.length > 0) {
291
- const decl = node.declarationList.declarations[0];
292
- if (ts.isIdentifier(decl.name)) {
293
- return decl.name.text;
294
- }
295
- }
296
- else if (ts.isFunctionDeclaration(node) && node.name) {
297
- return node.name.text;
298
- }
299
- else if (ts.isClassDeclaration(node) && node.name) {
300
- return node.name.text;
301
- }
302
- return undefined;
303
- }
304
- /**
305
- * Check if a node has an export modifier.
306
- */
307
- #has_export_modifier(node) {
308
- return ((ts.canHaveModifiers(node) &&
309
- ts.getModifiers(node)?.some((mod) => mod.kind === ts.SyntaxKind.ExportKeyword)) ||
310
- false);
311
- }
312
- /**
313
- * Check if a symbol is a function symbol.
314
- */
315
- #is_function_symbol(symbol) {
316
- return !!(symbol.flags & ts.SymbolFlags.Function || symbol.flags & ts.SymbolFlags.Method);
317
- }
318
- /**
319
- * Check if a symbol is a class symbol.
320
- */
321
- #is_class_symbol(symbol) {
322
- return !!(symbol.flags & ts.SymbolFlags.Class);
323
- }
324
- /**
325
- * Check if a symbol is a type-only symbol (interface, type alias, etc.).
326
- */
327
- #is_type_symbol(symbol) {
328
- return !!(symbol.flags & ts.SymbolFlags.Interface ||
329
- symbol.flags & ts.SymbolFlags.TypeAlias ||
330
- symbol.flags & ts.SymbolFlags.TypeParameter);
331
- }
332
- }
@@ -1,5 +0,0 @@
1
- import type { Flavored } from '@fuzdev/fuz_util/types.js';
2
- import type { PathId } from '@fuzdev/fuz_util/path.js';
3
- export type ImportSpecifier = Flavored<string, 'ImportSpecifier'>;
4
- export declare const parse_imports: (id: PathId, contents: string, ignore_types?: boolean) => Array<ImportSpecifier>;
5
- //# sourceMappingURL=parse_imports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse_imports.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/parse_imports.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAExD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAIrD,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAyBlE,eAAO,MAAM,aAAa,GACzB,IAAI,MAAM,EACV,UAAU,MAAM,EAChB,sBAAmB,KACjB,KAAK,CAAC,eAAe,CA+IvB,CAAC"}
@@ -1,140 +0,0 @@
1
- import { parseSync } from 'oxc-parser';
2
- import { UnreachableError } from '@fuzdev/fuz_util/error.js';
3
- import { JS_MATCHER, TS_MATCHER, SVELTE_MATCHER, SVELTE_SCRIPT_MATCHER } from "./constants.js";
4
- // TODO this is probably way more complicated that it should be, maybe report the issues upstream unless I made a mistake here
5
- /**
6
- * Extracts the string value from a module request, handling different quote styles.
7
- * Returns null if the value is not a valid string literal.
8
- */
9
- const extract_string_literal = (content, start, end) => {
10
- const value = content.substring(start, end);
11
- // Check if it's a string literal (starts and ends with quotes)
12
- if ((value.startsWith("'") && value.endsWith("'")) ||
13
- (value.startsWith('"') && value.endsWith('"')) ||
14
- (value.startsWith('`') && value.endsWith('`'))) {
15
- // Remove the quotes
16
- return value.slice(1, -1);
17
- }
18
- // Not a valid string literal
19
- return null;
20
- };
21
- export const parse_imports = (id, contents, ignore_types = true) => {
22
- const specifiers = [];
23
- const is_svelte = SVELTE_MATCHER.test(id);
24
- const parse_from = (s) => {
25
- const parsed = parseSync(is_svelte ? id + '.ts' : id, s, {});
26
- // Process static imports
27
- for (const static_import of parsed.module.staticImports) {
28
- // Get the module source node
29
- const import_decl = parsed.program.body.find((node) => node.type === 'ImportDeclaration' && node.start === static_import.start);
30
- if (!import_decl?.source)
31
- continue;
32
- // Extract the module request string value
33
- const value = extract_string_literal(s, import_decl.source.start, import_decl.source.end);
34
- if (!value)
35
- continue;
36
- // Skip type-only imports if ignore_types is true
37
- if (ignore_types) {
38
- // Handle import type {...} (type-only imports)
39
- if (import_decl.importKind === 'type') {
40
- continue;
41
- }
42
- // Handle inline type imports ({type foo})
43
- if (static_import.entries.length > 0) {
44
- // If all imports are type imports, skip this import
45
- const has_non_type_specifier = static_import.entries.some((entry) => !entry.isType);
46
- if (!has_non_type_specifier) {
47
- continue;
48
- }
49
- }
50
- }
51
- specifiers.push(value);
52
- }
53
- // Process dynamic imports
54
- for (const dynamic_import of parsed.module.dynamicImports) {
55
- // Find the corresponding AST node
56
- let found = false;
57
- for (const node of parsed.program.body) {
58
- if (node.type === 'ExpressionStatement' &&
59
- node.expression.type === 'AwaitExpression' &&
60
- node.expression.argument.type === 'ImportExpression') {
61
- const import_expr = node.expression.argument;
62
- if (import_expr.start === dynamic_import.start) {
63
- // Only process string literals (not expressions or variables)
64
- if (import_expr.source.type === 'Literal') {
65
- const value = String(import_expr.source.value);
66
- if (value) {
67
- specifiers.push(value);
68
- }
69
- }
70
- found = true;
71
- break;
72
- }
73
- }
74
- }
75
- // If we didn't find a match through AST, fall back to the original approach
76
- // but only for simple string literals
77
- if (!found) {
78
- const value = extract_string_literal(s, dynamic_import.moduleRequest.start, dynamic_import.moduleRequest.end);
79
- if (value) {
80
- specifiers.push(value);
81
- }
82
- }
83
- }
84
- // Process re-exports
85
- for (const node of parsed.program.body) {
86
- if (node.type === 'ExportNamedDeclaration' && node.source) {
87
- // Skip type-only exports if ignore_types is true
88
- if (ignore_types && node.exportKind === 'type') {
89
- continue;
90
- }
91
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
92
- if (node.source.type === 'Literal') {
93
- const value = node.source.value;
94
- if (value) {
95
- specifiers.push(value);
96
- }
97
- }
98
- else {
99
- throw new UnreachableError(node.source.type);
100
- }
101
- }
102
- }
103
- };
104
- if (is_svelte) {
105
- // Reset the regexp state between calls
106
- SVELTE_SCRIPT_MATCHER.lastIndex = 0;
107
- // Capture script tags at the top level (not nested in HTML)
108
- let last_index = 0;
109
- const script_blocks = [];
110
- // First collect all script blocks
111
- let match;
112
- while ((match = SVELTE_SCRIPT_MATCHER.exec(contents)) !== null) {
113
- // Save position of the script tag
114
- const start = match.index;
115
- const end = SVELTE_SCRIPT_MATCHER.lastIndex;
116
- // Only process top-level script tags (skip nested ones)
117
- // A nested script would be inside another HTML tag between lastIndex and start
118
- const text_between = contents.substring(last_index, start);
119
- const contains_opening_tag = /<[a-z][^>]*>/i.test(text_between);
120
- const contains_closing_tag = /<\/[a-z][^>]*>/i.test(text_between);
121
- // If we're not nested (no HTML tag nesting), process this script
122
- if (!(contains_opening_tag && !contains_closing_tag)) {
123
- script_blocks.push({
124
- content: match[1],
125
- start,
126
- end,
127
- });
128
- }
129
- last_index = end;
130
- }
131
- // Process all the collected script blocks
132
- for (const script_block of script_blocks) {
133
- parse_from(script_block.content);
134
- }
135
- }
136
- else if (TS_MATCHER.test(id) || JS_MATCHER.test(id)) {
137
- parse_from(contents);
138
- }
139
- return specifiers;
140
- };
package/dist/paths.d.ts DELETED
@@ -1,41 +0,0 @@
1
- import type { PathId } from '@fuzdev/fuz_util/path.js';
2
- export declare const LIB_DIRNAME: string;
3
- export declare const LIB_PATH: string;
4
- /** @trailing_slash */
5
- export declare const LIB_DIR: string;
6
- export declare const ROUTES_DIRNAME: string;
7
- export interface Paths {
8
- /** @trailing_slash */
9
- root: string;
10
- /** @trailing_slash */
11
- source: string;
12
- /** @trailing_slash */
13
- lib: string;
14
- /** @trailing_slash */
15
- build: string;
16
- /** @trailing_slash */
17
- build_dev: string;
18
- config: string;
19
- }
20
- export declare const create_paths: (root_dir: string) => Paths;
21
- export declare const infer_paths: (id: PathId) => Paths;
22
- export declare const is_gro_id: (id: PathId) => boolean;
23
- export declare const to_root_path: (id: PathId, p?: Paths) => string;
24
- export declare const path_id_to_base_path: (path_id: PathId, p?: Paths) => string;
25
- export declare const base_path_to_path_id: (base_path: string, p?: Paths) => PathId;
26
- export declare const print_path: (path: string, p?: Paths) => string;
27
- export declare const replace_extension: (path: string, new_extension: string) => string;
28
- /**
29
- * Paths for the user repo.
30
- */
31
- export declare const paths: Paths;
32
- /** @trailing_slash */
33
- export declare const GRO_PACKAGE_DIR = "gro/";
34
- export declare const IS_THIS_GRO: boolean;
35
- /**
36
- * Paths for the Gro package being used by the user repo.
37
- */
38
- export declare const gro_paths: Paths;
39
- /** @trailing_slash */
40
- export declare const GRO_DIST_DIR: string;
41
- //# sourceMappingURL=paths.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/paths.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAkBrD,eAAO,MAAM,WAAW,QAA2C,CAAC;AACpE,eAAO,MAAM,QAAQ,QAA2B,CAAC;AACjD,sBAAsB;AACtB,eAAO,MAAM,OAAO,QAAiB,CAAC;AACtC,eAAO,MAAM,cAAc,QAA8C,CAAC;AAE1E,MAAM,WAAW,KAAK;IACrB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,KAAG,KAW/C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,IAAI,MAAM,KAAG,KAA4C,CAAC;AAEtF,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,KAAG,OACiC,CAAC;AAGzE,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,EAAE,SAAmB,KAAG,MAClC,CAAC;AAG9B,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,EAAE,SAAwB,KAAG,MACrD,CAAC;AAI7B,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,EAAE,SAA0B,KAAG,MAC3D,CAAC;AAE3B,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,SAAqB,KAAG,MAMhE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,eAAe,MAAM,KAAG,MAGvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,OAA8B,CAAC;AAEjD,sBAAsB;AACtB,eAAO,MAAM,eAAe,SAAS,CAAC;AAYtC,eAAO,MAAM,WAAW,SAAsC,CAAC;AAC/D;;GAEG;AACH,eAAO,MAAM,SAAS,OAA2D,CAAC;AAClF,sBAAsB;AACtB,eAAO,MAAM,YAAY,QAAgD,CAAC"}
package/dist/paths.js DELETED
@@ -1,69 +0,0 @@
1
- import { join, extname, relative, basename } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
- import { ensure_end, strip_end } from '@fuzdev/fuz_util/string.js';
4
- import { styleText as st } from 'node:util';
5
- import { GRO_CONFIG_FILENAME, GRO_DEV_DIR, GRO_DIR, SOURCE_DIR, SVELTEKIT_DIST_DIRNAME, } from "./constants.js";
6
- import { default_svelte_config } from "./svelte_config.js";
7
- /*
8
-
9
- A path `id` is an absolute path to the source/.gro/dist directory.
10
- It's the same name that Rollup uses.
11
-
12
- */
13
- export const LIB_DIRNAME = basename(default_svelte_config.lib_path);
14
- export const LIB_PATH = SOURCE_DIR + LIB_DIRNAME;
15
- /** @trailing_slash */
16
- export const LIB_DIR = LIB_PATH + '/';
17
- export const ROUTES_DIRNAME = basename(default_svelte_config.routes_path);
18
- export const create_paths = (root_dir) => {
19
- // TODO remove reliance on trailing slash towards windows support
20
- const root = ensure_end(root_dir, '/');
21
- return {
22
- root,
23
- source: root + SOURCE_DIR,
24
- lib: root + LIB_DIR,
25
- build: root + GRO_DIR,
26
- build_dev: root + GRO_DEV_DIR,
27
- config: root + GRO_CONFIG_FILENAME,
28
- };
29
- };
30
- export const infer_paths = (id) => (is_gro_id(id) ? gro_paths : paths);
31
- export const is_gro_id = (id) => id.startsWith(gro_paths.root) || gro_paths.root === ensure_end(id, '/');
32
- // '/home/me/app/src/foo/bar/baz.ts' → 'src/foo/bar/baz.ts'
33
- export const to_root_path = (id, p = infer_paths(id)) => relative(p.root, id) || './';
34
- // '/home/me/app/src/foo/bar/baz.ts' → 'foo/bar/baz.ts'
35
- export const path_id_to_base_path = (path_id, p = infer_paths(path_id)) => relative(p.source, path_id);
36
- // TODO base_path is an obsolete concept, it was a remnant from forcing `src/`
37
- // 'foo/bar/baz.ts' → '/home/me/app/src/foo/bar/baz.ts'
38
- export const base_path_to_path_id = (base_path, p = infer_paths(base_path)) => join(p.source, base_path);
39
- export const print_path = (path, p = infer_paths(path)) => {
40
- let final_path = strip_end(path, '/') === strip_end(GRO_DIST_DIR, '/') ? 'gro' : to_root_path(path, p);
41
- final_path =
42
- final_path === 'gro' ? final_path : final_path[0] === '.' ? final_path : './' + final_path;
43
- return st('gray', final_path);
44
- };
45
- export const replace_extension = (path, new_extension) => {
46
- const { length } = extname(path);
47
- return (length === 0 ? path : path.substring(0, path.length - length)) + new_extension;
48
- };
49
- /**
50
- * Paths for the user repo.
51
- */
52
- export const paths = create_paths(process.cwd());
53
- /** @trailing_slash */
54
- export const GRO_PACKAGE_DIR = 'gro/';
55
- // TODO document these conditions with comments
56
- // TODO there's probably a more robust way to do this
57
- const filename = fileURLToPath(import.meta.url);
58
- const gro_package_dir_path = join(filename, filename.includes('/gro/src/lib/')
59
- ? '../../../'
60
- : filename.includes('/gro/dist/')
61
- ? '../../'
62
- : '../');
63
- export const IS_THIS_GRO = gro_package_dir_path === paths.root;
64
- /**
65
- * Paths for the Gro package being used by the user repo.
66
- */
67
- export const gro_paths = IS_THIS_GRO ? paths : create_paths(gro_package_dir_path);
68
- /** @trailing_slash */
69
- export const GRO_DIST_DIR = gro_paths.root + SVELTEKIT_DIST_DIRNAME + '/';
package/dist/plugin.d.ts DELETED
@@ -1,36 +0,0 @@
1
- import type { TaskContext } from './task.ts';
2
- /**
3
- * Gro `Plugin`s enable custom behavior during `gro dev` and `gro build`.
4
- * In contrast, `Adapter`s use the results of `gro build` to produce final artifacts.
5
- */
6
- export interface Plugin<TPluginContext extends PluginContext = PluginContext> {
7
- name: string;
8
- setup?: (ctx: TPluginContext) => void | Promise<void>;
9
- adapt?: (ctx: TPluginContext) => void | Promise<void>;
10
- teardown?: (ctx: TPluginContext) => void | Promise<void>;
11
- }
12
- export type PluginsCreateConfig<TPluginContext extends PluginContext = PluginContext> = (ctx: TPluginContext) => Array<Plugin<TPluginContext>> | Promise<Array<Plugin<TPluginContext>>>;
13
- export interface PluginContext<TArgs = object> extends TaskContext<TArgs> {
14
- dev: boolean;
15
- watch: boolean;
16
- }
17
- /** See `Plugins.create` for a usage example. */
18
- export declare class Plugins<TPluginContext extends PluginContext> {
19
- readonly ctx: TPluginContext;
20
- readonly instances: Array<Plugin<TPluginContext>>;
21
- constructor(ctx: TPluginContext, instances: Array<Plugin>);
22
- static create<TPluginContext extends PluginContext>(ctx: TPluginContext): Promise<Plugins<TPluginContext>>;
23
- setup(): Promise<void>;
24
- adapt(): Promise<void>;
25
- teardown(): Promise<void>;
26
- }
27
- /**
28
- * Replaces a plugin by name in `plugins` without mutating the param.
29
- * Throws if the plugin name cannot be found.
30
- * @param plugins - accepts the same types as the return value of `PluginsCreateConfig`
31
- * @param new_plugin
32
- * @param name - @default new_plugin.name
33
- * @returns `plugins` with `new_plugin` at the index of the plugin with `name`
34
- */
35
- export declare const plugin_replace: (plugins: Array<Plugin>, new_plugin: Plugin, name?: string) => Array<Plugin>;
36
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,MAAM,CAAC,cAAc,SAAS,aAAa,GAAG,aAAa;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,mBAAmB,CAAC,cAAc,SAAS,aAAa,GAAG,aAAa,IAAI,CACvF,GAAG,EAAE,cAAc,KACf,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAE5E,MAAM,WAAW,aAAa,CAAC,KAAK,GAAG,MAAM,CAAE,SAAQ,WAAW,CAAC,KAAK,CAAC;IACxE,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CACf;AAED,gDAAgD;AAChD,qBAAa,OAAO,CAAC,cAAc,SAAS,aAAa;IACxD,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;gBAEtC,GAAG,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;WAK5C,MAAM,CAAC,cAAc,SAAS,aAAa,EACvD,GAAG,EAAE,cAAc,GACjB,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAS7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAatB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAc/B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAC1B,SAAS,KAAK,CAAC,MAAM,CAAC,EACtB,YAAY,MAAM,EAClB,aAAsB,KACpB,KAAK,CAAC,MAAM,CAMd,CAAC"}