@g3nomaly/core 0.3.0 → 0.3.1

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 (243) hide show
  1. package/LICENSE +95 -0
  2. package/dist/cli/commands/add.d.ts +17 -0
  3. package/dist/cli/commands/add.d.ts.map +1 -0
  4. package/dist/cli/commands/add.js +76 -0
  5. package/dist/cli/commands/add.js.map +1 -0
  6. package/dist/cli/commands/installFromSources.d.ts +49 -0
  7. package/dist/cli/commands/installFromSources.d.ts.map +1 -0
  8. package/dist/cli/commands/installFromSources.js +138 -0
  9. package/dist/cli/commands/installFromSources.js.map +1 -0
  10. package/dist/cli/commands/ls.d.ts +16 -0
  11. package/dist/cli/commands/ls.d.ts.map +1 -0
  12. package/dist/cli/commands/ls.js +65 -0
  13. package/dist/cli/commands/ls.js.map +1 -0
  14. package/dist/cli/commands/remove.d.ts +13 -0
  15. package/dist/cli/commands/remove.d.ts.map +1 -0
  16. package/dist/cli/commands/remove.js +109 -0
  17. package/dist/cli/commands/remove.js.map +1 -0
  18. package/dist/cli/commands/sources.d.ts +45 -0
  19. package/dist/cli/commands/sources.d.ts.map +1 -0
  20. package/dist/cli/commands/sources.js +89 -0
  21. package/dist/cli/commands/sources.js.map +1 -0
  22. package/dist/cli/commands/update.d.ts +10 -0
  23. package/dist/cli/commands/update.d.ts.map +1 -0
  24. package/dist/cli/commands/update.js +92 -0
  25. package/dist/cli/commands/update.js.map +1 -0
  26. package/dist/cli/dialogue.d.ts +74 -0
  27. package/dist/cli/dialogue.d.ts.map +1 -0
  28. package/dist/cli/dialogue.js +117 -0
  29. package/dist/cli/dialogue.js.map +1 -0
  30. package/dist/cli/index.d.ts +19 -0
  31. package/dist/cli/index.d.ts.map +1 -0
  32. package/dist/cli/index.js +16 -0
  33. package/dist/cli/index.js.map +1 -0
  34. package/dist/cli/installDialogues.d.ts +15 -0
  35. package/dist/cli/installDialogues.d.ts.map +1 -0
  36. package/dist/cli/installDialogues.js +72 -0
  37. package/dist/cli/installDialogues.js.map +1 -0
  38. package/dist/cli/pick.d.ts +14 -0
  39. package/dist/cli/pick.d.ts.map +1 -0
  40. package/dist/cli/pick.js +35 -0
  41. package/dist/cli/pick.js.map +1 -0
  42. package/dist/cli/report.d.ts +34 -0
  43. package/dist/cli/report.d.ts.map +1 -0
  44. package/dist/cli/report.js +71 -0
  45. package/dist/cli/report.js.map +1 -0
  46. package/dist/cli/theme.d.ts +23 -0
  47. package/dist/cli/theme.d.ts.map +1 -0
  48. package/dist/cli/theme.js +25 -0
  49. package/dist/cli/theme.js.map +1 -0
  50. package/dist/cli/types.d.ts +45 -0
  51. package/dist/cli/types.d.ts.map +1 -0
  52. package/dist/cli/types.js +2 -0
  53. package/dist/cli/types.js.map +1 -0
  54. package/dist/config/config.d.ts +30 -0
  55. package/dist/config/config.d.ts.map +1 -0
  56. package/dist/config/config.js +77 -0
  57. package/dist/config/config.js.map +1 -0
  58. package/dist/config/index.d.ts +4 -0
  59. package/dist/config/index.d.ts.map +1 -0
  60. package/dist/config/index.js +3 -0
  61. package/dist/config/index.js.map +1 -0
  62. package/dist/config/types.d.ts +124 -0
  63. package/dist/config/types.d.ts.map +1 -0
  64. package/dist/config/types.js +61 -0
  65. package/dist/config/types.js.map +1 -0
  66. package/dist/hash/hash.d.ts +25 -0
  67. package/dist/hash/hash.d.ts.map +1 -0
  68. package/dist/hash/hash.js +44 -0
  69. package/dist/hash/hash.js.map +1 -0
  70. package/dist/hash/index.d.ts +2 -0
  71. package/dist/hash/index.d.ts.map +1 -0
  72. package/dist/hash/index.js +2 -0
  73. package/dist/hash/index.js.map +1 -0
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +2 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/installer/classify.d.ts +7 -0
  79. package/dist/installer/classify.d.ts.map +1 -0
  80. package/dist/installer/classify.js +47 -0
  81. package/dist/installer/classify.js.map +1 -0
  82. package/dist/installer/files.d.ts +15 -0
  83. package/dist/installer/files.d.ts.map +1 -0
  84. package/dist/installer/files.js +22 -0
  85. package/dist/installer/files.js.map +1 -0
  86. package/dist/installer/index.d.ts +19 -0
  87. package/dist/installer/index.d.ts.map +1 -0
  88. package/dist/installer/index.js +14 -0
  89. package/dist/installer/index.js.map +1 -0
  90. package/dist/installer/install.d.ts +13 -0
  91. package/dist/installer/install.d.ts.map +1 -0
  92. package/dist/installer/install.js +61 -0
  93. package/dist/installer/install.js.map +1 -0
  94. package/dist/installer/io.d.ts +4 -0
  95. package/dist/installer/io.d.ts.map +1 -0
  96. package/dist/installer/io.js +18 -0
  97. package/dist/installer/io.js.map +1 -0
  98. package/dist/installer/manifest.d.ts +59 -0
  99. package/dist/installer/manifest.d.ts.map +1 -0
  100. package/dist/installer/manifest.js +60 -0
  101. package/dist/installer/manifest.js.map +1 -0
  102. package/dist/installer/manifestSources.d.ts +21 -0
  103. package/dist/installer/manifestSources.d.ts.map +1 -0
  104. package/dist/installer/manifestSources.js +39 -0
  105. package/dist/installer/manifestSources.js.map +1 -0
  106. package/dist/installer/marketplace.d.ts +34 -0
  107. package/dist/installer/marketplace.d.ts.map +1 -0
  108. package/dist/installer/marketplace.js +64 -0
  109. package/dist/installer/marketplace.js.map +1 -0
  110. package/dist/installer/origin.d.ts +43 -0
  111. package/dist/installer/origin.d.ts.map +1 -0
  112. package/dist/installer/origin.js +22 -0
  113. package/dist/installer/origin.js.map +1 -0
  114. package/dist/installer/remove.d.ts +14 -0
  115. package/dist/installer/remove.d.ts.map +1 -0
  116. package/dist/installer/remove.js +37 -0
  117. package/dist/installer/remove.js.map +1 -0
  118. package/dist/installer/resolve.d.ts +78 -0
  119. package/dist/installer/resolve.d.ts.map +1 -0
  120. package/dist/installer/resolve.js +184 -0
  121. package/dist/installer/resolve.js.map +1 -0
  122. package/dist/installer/sourceRegistry.d.ts +59 -0
  123. package/dist/installer/sourceRegistry.d.ts.map +1 -0
  124. package/dist/installer/sourceRegistry.js +71 -0
  125. package/dist/installer/sourceRegistry.js.map +1 -0
  126. package/dist/installer/types.d.ts +80 -0
  127. package/dist/installer/types.d.ts.map +1 -0
  128. package/dist/installer/types.js +21 -0
  129. package/dist/installer/types.js.map +1 -0
  130. package/dist/registry/index.d.ts +12 -0
  131. package/dist/registry/index.d.ts.map +1 -0
  132. package/dist/registry/index.js +12 -0
  133. package/dist/registry/index.js.map +1 -0
  134. package/dist/registry/registry.handlers.d.ts +9 -0
  135. package/dist/registry/registry.handlers.d.ts.map +1 -0
  136. package/dist/registry/registry.handlers.js +13 -0
  137. package/dist/registry/registry.handlers.js.map +1 -0
  138. package/dist/registry/registry.io.d.ts +22 -0
  139. package/dist/registry/registry.io.d.ts.map +1 -0
  140. package/dist/registry/registry.io.js +78 -0
  141. package/dist/registry/registry.io.js.map +1 -0
  142. package/dist/registry/registry.mutations.d.ts +12 -0
  143. package/dist/registry/registry.mutations.d.ts.map +1 -0
  144. package/dist/registry/registry.mutations.js +22 -0
  145. package/dist/registry/registry.mutations.js.map +1 -0
  146. package/dist/registry/registry.selectors.d.ts +38 -0
  147. package/dist/registry/registry.selectors.d.ts.map +1 -0
  148. package/dist/registry/registry.selectors.js +61 -0
  149. package/dist/registry/registry.selectors.js.map +1 -0
  150. package/dist/registry/registry.store.d.ts +34 -0
  151. package/dist/registry/registry.store.d.ts.map +1 -0
  152. package/dist/registry/registry.store.js +27 -0
  153. package/dist/registry/registry.store.js.map +1 -0
  154. package/dist/registry/registry.template.d.ts +23 -0
  155. package/dist/registry/registry.template.d.ts.map +1 -0
  156. package/dist/registry/registry.template.js +63 -0
  157. package/dist/registry/registry.template.js.map +1 -0
  158. package/dist/registry/types.d.ts +33 -0
  159. package/dist/registry/types.d.ts.map +1 -0
  160. package/dist/registry/types.js +25 -0
  161. package/dist/registry/types.js.map +1 -0
  162. package/dist/security/index.d.ts +2 -0
  163. package/dist/security/index.d.ts.map +1 -0
  164. package/dist/security/index.js +2 -0
  165. package/dist/security/index.js.map +1 -0
  166. package/dist/security/securityParser.d.ts +14 -0
  167. package/dist/security/securityParser.d.ts.map +1 -0
  168. package/dist/security/securityParser.js +89 -0
  169. package/dist/security/securityParser.js.map +1 -0
  170. package/dist/security/securityWorker.d.ts +8 -0
  171. package/dist/security/securityWorker.d.ts.map +1 -0
  172. package/dist/security/securityWorker.js +158 -0
  173. package/dist/security/securityWorker.js.map +1 -0
  174. package/dist/sources/checkout.d.ts +14 -0
  175. package/dist/sources/checkout.d.ts.map +1 -0
  176. package/dist/sources/checkout.js +27 -0
  177. package/dist/sources/checkout.js.map +1 -0
  178. package/dist/sources/git.d.ts +9 -0
  179. package/dist/sources/git.d.ts.map +1 -0
  180. package/dist/sources/git.js +22 -0
  181. package/dist/sources/git.js.map +1 -0
  182. package/dist/sources/index.d.ts +5 -0
  183. package/dist/sources/index.d.ts.map +1 -0
  184. package/dist/sources/index.js +6 -0
  185. package/dist/sources/index.js.map +1 -0
  186. package/dist/sources/local.d.ts +10 -0
  187. package/dist/sources/local.d.ts.map +1 -0
  188. package/dist/sources/local.js +20 -0
  189. package/dist/sources/local.js.map +1 -0
  190. package/dist/sources/npm.d.ts +13 -0
  191. package/dist/sources/npm.d.ts.map +1 -0
  192. package/dist/sources/npm.js +128 -0
  193. package/dist/sources/npm.js.map +1 -0
  194. package/dist/sources/packageJson.d.ts +3 -0
  195. package/dist/sources/packageJson.d.ts.map +1 -0
  196. package/dist/sources/packageJson.js +13 -0
  197. package/dist/sources/packageJson.js.map +1 -0
  198. package/dist/sources/parse.d.ts +34 -0
  199. package/dist/sources/parse.d.ts.map +1 -0
  200. package/dist/sources/parse.js +92 -0
  201. package/dist/sources/parse.js.map +1 -0
  202. package/dist/sources/process.d.ts +18 -0
  203. package/dist/sources/process.d.ts.map +1 -0
  204. package/dist/sources/process.js +43 -0
  205. package/dist/sources/process.js.map +1 -0
  206. package/dist/sources/register.d.ts +16 -0
  207. package/dist/sources/register.d.ts.map +1 -0
  208. package/dist/sources/register.js +37 -0
  209. package/dist/sources/register.js.map +1 -0
  210. package/dist/sources/types.d.ts +73 -0
  211. package/dist/sources/types.d.ts.map +1 -0
  212. package/dist/sources/types.js +36 -0
  213. package/dist/sources/types.js.map +1 -0
  214. package/dist/utils/errors.d.ts +3 -0
  215. package/dist/utils/errors.d.ts.map +1 -0
  216. package/dist/utils/errors.js +6 -0
  217. package/dist/utils/errors.js.map +1 -0
  218. package/dist/utils/index.d.ts +7 -0
  219. package/dist/utils/index.d.ts.map +1 -0
  220. package/dist/utils/index.js +7 -0
  221. package/dist/utils/index.js.map +1 -0
  222. package/dist/utils/merge.d.ts +6 -0
  223. package/dist/utils/merge.d.ts.map +1 -0
  224. package/dist/utils/merge.js +21 -0
  225. package/dist/utils/merge.js.map +1 -0
  226. package/dist/utils/packageMeta.d.ts +12 -0
  227. package/dist/utils/packageMeta.d.ts.map +1 -0
  228. package/dist/utils/packageMeta.js +20 -0
  229. package/dist/utils/packageMeta.js.map +1 -0
  230. package/dist/utils/paths.d.ts +16 -0
  231. package/dist/utils/paths.d.ts.map +1 -0
  232. package/dist/utils/paths.js +40 -0
  233. package/dist/utils/paths.js.map +1 -0
  234. package/dist/utils/prompt.d.ts +3 -0
  235. package/dist/utils/prompt.d.ts.map +1 -0
  236. package/dist/utils/prompt.js +8 -0
  237. package/dist/utils/prompt.js.map +1 -0
  238. package/dist/utils/version.d.ts +9 -0
  239. package/dist/utils/version.d.ts.map +1 -0
  240. package/dist/utils/version.js +103 -0
  241. package/dist/utils/version.js.map +1 -0
  242. package/package.json +64 -3
  243. package/README.md +0 -3
@@ -0,0 +1,72 @@
1
+ // packages/core/src/cli/installDialogues.ts
2
+ import { ConflictDecision } from "../installer/types";
3
+ import { StepKind } from "./dialogue";
4
+ /** Keep or overwrite an entry with local changes, for `add` and `update`; step id `conflict`. */
5
+ export const overwriteDialogue = {
6
+ steps: {
7
+ conflict: {
8
+ kind: StepKind.Select,
9
+ message: "{key} ({target}) has local changes. What would you like to do?",
10
+ choices: [
11
+ { value: ConflictDecision.Keep, label: "Keep my changes: skip modified files" },
12
+ { value: ConflictDecision.Overwrite, label: "Overwrite with the source version" },
13
+ ],
14
+ },
15
+ },
16
+ };
17
+ /** Keep or remove an entry with local changes, for `remove`; step id `conflict`. */
18
+ export const removeChangedDialogue = {
19
+ steps: {
20
+ conflict: {
21
+ kind: StepKind.Select,
22
+ message: "{key} ({target}) has local changes. What would you like to do?",
23
+ choices: [
24
+ { value: ConflictDecision.Keep, label: "Keep it: remove nothing" },
25
+ { value: ConflictDecision.Overwrite, label: "Remove it anyway, including my changes" },
26
+ ],
27
+ },
28
+ },
29
+ };
30
+ /** Whether to remove the installed entries that depend on one being removed; step id `cascade`. */
31
+ export const cascadeDialogue = {
32
+ steps: {
33
+ cascade: {
34
+ kind: StepKind.Confirm,
35
+ message: "Also remove {dependents}?",
36
+ initial: true,
37
+ },
38
+ },
39
+ };
40
+ /** Whether to remove an entry with files already missing on disk; step id `incomplete`. */
41
+ export const incompleteDialogue = {
42
+ steps: {
43
+ incomplete: {
44
+ kind: StepKind.Confirm,
45
+ message: "{key} ({target}) is missing {missing} on disk. Remove the rest and untrack it?",
46
+ initial: true,
47
+ },
48
+ },
49
+ };
50
+ /** Which installed entries to remove when none were named; step id `selectEntries`. */
51
+ export function selectRemovalDialogue(noun) {
52
+ return {
53
+ steps: {
54
+ selectEntries: {
55
+ kind: StepKind.MultiSelect,
56
+ message: `Select ${noun}s to remove:`,
57
+ choices: (input) => input.keyChoices ?? [],
58
+ },
59
+ },
60
+ };
61
+ }
62
+ /** Whether to go on when some names given to `update` are not installed; step id `entryNotFound`. */
63
+ export const notInstalledDialogue = {
64
+ steps: {
65
+ entryNotFound: {
66
+ kind: StepKind.Confirm,
67
+ message: "Not installed: {unknown}. Continue with the remaining selection?",
68
+ initial: false,
69
+ },
70
+ },
71
+ };
72
+ //# sourceMappingURL=installDialogues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installDialogues.js","sourceRoot":"","sources":["../../src/cli/installDialogues.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AAEF,uFAAuF;AACvF,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO;QACL,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,IAAI,EAAK,QAAQ,CAAC,WAAW;gBAC7B,OAAO,EAAE,UAAU,IAAI,cAAc;gBACrC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE;aAC3C;SACF;KACF,CAAC;AACJ,CAAC;AAED,qGAAqG;AACrG,MAAM,CAAC,MAAM,oBAAoB,GAA2B;IAC1D,KAAK,EAAE;QACL,aAAa,EAAE;YACb,IAAI,EAAK,QAAQ,CAAC,OAAO;YACzB,OAAO,EAAE,kEAAkE;YAC3E,OAAO,EAAE,KAAK;SACf;KACF;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { OriginEntry } from "../installer/origin";
2
+ import type { SourceOffer } from "../installer/sourceRegistry";
3
+ import type { Dialogue, DialogueAnswers } from "./dialogue";
4
+ import type { InstallInput } from "./types";
5
+ /** The multi-select `pickOffers` asks through, by step id `selectEntries`, for preset answers. */
6
+ export declare function selectEntriesDialogue(noun: string): Dialogue<InstallInput>;
7
+ /**
8
+ * Asks which offers to install, each as `<key>@<source>`, so two sources
9
+ * offering one key stay apart. Exits when the prompt is cancelled.
10
+ *
11
+ * @returns the picked requests, e.g. `["emphasise@g3n-skills"]`
12
+ */
13
+ export declare function pickOffers<T extends OriginEntry>(available: readonly SourceOffer<T>[], noun: string, answers?: DialogueAnswers): Promise<string[]>;
14
+ //# sourceMappingURL=pick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../src/cli/pick.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK5C,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAU1E;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,SAAS,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAQxJ"}
@@ -0,0 +1,35 @@
1
+ // packages/core/src/cli/pick.ts
2
+ import chalk from "chalk";
3
+ import { z } from "zod";
4
+ import { guardCancel } from "../utils/prompt";
5
+ import { StepKind, runDialogueValue } from "./dialogue";
6
+ import { c } from "./theme";
7
+ const PicksSchema = z.array(z.string());
8
+ /** The multi-select `pickOffers` asks through, by step id `selectEntries`, for preset answers. */
9
+ export function selectEntriesDialogue(noun) {
10
+ return {
11
+ steps: {
12
+ selectEntries: {
13
+ kind: StepKind.MultiSelect,
14
+ message: `Select ${noun}s to install:`,
15
+ choices: (input) => input.keyChoices ?? [],
16
+ },
17
+ },
18
+ };
19
+ }
20
+ /**
21
+ * Asks which offers to install, each as `<key>@<source>`, so two sources
22
+ * offering one key stay apart. Exits when the prompt is cancelled.
23
+ *
24
+ * @returns the picked requests, e.g. `["emphasise@g3n-skills"]`
25
+ */
26
+ export async function pickOffers(available, noun, answers) {
27
+ const keyChoices = [...available]
28
+ .sort((a, b) => a.key.localeCompare(b.key) || a.entry.origin.source.localeCompare(b.entry.origin.source))
29
+ .map(({ key, entry }) => ({
30
+ value: `${key}@${entry.origin.source}`,
31
+ label: `${c.key(key)} ${chalk.dim(`@${entry.origin.source}`)} ${chalk.dim("—")} ${chalk.dim(entry.description ?? entry.name)}`,
32
+ }));
33
+ return PicksSchema.parse(guardCancel(await runDialogueValue(selectEntriesDialogue(noun), { keyChoices }, answers)) ?? []);
34
+ }
35
+ //# sourceMappingURL=pick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick.js","sourceRoot":"","sources":["../../src/cli/pick.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAE5B,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAExC,kGAAkG;AAClG,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO;QACL,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,IAAI,EAAK,QAAQ,CAAC,WAAW;gBAC7B,OAAO,EAAE,UAAU,IAAI,eAAe;gBACtC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE;aAC3C;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAwB,SAAoC,EAAE,IAAY,EAAE,OAAyB;IACnI,MAAM,UAAU,GAAG,CAAC,GAAG,SAAS,CAAC;SAC9B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACxG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QACxB,KAAK,EAAE,GAAG,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;QACtC,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;KACjI,CAAC,CAAC,CAAC;IACN,OAAO,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,gBAAgB,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5H,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { OriginEntry } from "../installer/origin";
2
+ import type { SourceRegistry } from "../installer/sourceRegistry";
3
+ import type { Resolution } from "../installer/resolve";
4
+ import type { Dialogue, DialogueAnswers } from "./dialogue";
5
+ import type { InstallInput } from "./types";
6
+ /** Prints every warning of a source registry and every source it could not read. */
7
+ export declare function reportSourceRegistry<T extends OriginEntry>(registry: SourceRegistry<T>): void;
8
+ /** Runs `read`, and on a throw prints its message and exits with code 1. */
9
+ export declare function orExit<T>(read: () => T): T;
10
+ /** What `reportResolution` names in its messages. */
11
+ export interface ResolutionContext {
12
+ /** Installer binary, e.g. `g3n-skills` */
13
+ bin: string;
14
+ /** What one entry is called, e.g. `skill` */
15
+ noun: string;
16
+ }
17
+ /** The confirm step `reportResolution` asks through, by step id `entryNotFound`, for preset answers. */
18
+ export declare function entryNotFoundDialogue(noun: string): Dialogue<InstallInput>;
19
+ /**
20
+ * Prints what a resolution could not settle and why each unnamed entry is in
21
+ * it. Exits on an ambiguous name; on unknown names, asks whether to go on
22
+ * with the rest and exits when the answer is no or nothing is left.
23
+ */
24
+ export declare function reportResolution<T extends OriginEntry>(resolution: Resolution<T>, context: ResolutionContext, answers?: DialogueAnswers): Promise<void>;
25
+ /**
26
+ * The sources narrowed to `only`, or all of them when it is absent. Exits
27
+ * naming the `source ls` command when no source has that name.
28
+ *
29
+ * @param bin - Installer binary for the hint, e.g. `g3n-skills`
30
+ */
31
+ export declare function narrowSources<S extends {
32
+ name: string;
33
+ }>(sources: readonly S[], only: string | undefined, bin: string): S[];
34
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAG7F;AAED,4EAA4E;AAC5E,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAO1C;AAED,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,GAAG,EAAG,MAAM,CAAC;IACb,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wGAAwG;AACxG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAU1E;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,WAAW,EAC1D,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EACzB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,EAAE,CAQ3H"}
@@ -0,0 +1,71 @@
1
+ import { errorMessage } from "../utils/errors";
2
+ import { StepKind, runDialogueValue } from "./dialogue";
3
+ import { c, lineError, lineInfo, lineWarn } from "./theme";
4
+ /** Prints every warning of a source registry and every source it could not read. */
5
+ export function reportSourceRegistry(registry) {
6
+ for (const warning of registry.warnings)
7
+ console.log(lineWarn(warning));
8
+ for (const failed of registry.failed)
9
+ console.log(lineWarn(`${c.key(failed.name)} could not be read: ${failed.error}`));
10
+ }
11
+ /** Runs `read`, and on a throw prints its message and exits with code 1. */
12
+ export function orExit(read) {
13
+ try {
14
+ return read();
15
+ }
16
+ catch (error) {
17
+ console.error(lineError(errorMessage(error)));
18
+ process.exit(1);
19
+ }
20
+ }
21
+ /** The confirm step `reportResolution` asks through, by step id `entryNotFound`, for preset answers. */
22
+ export function entryNotFoundDialogue(noun) {
23
+ return {
24
+ steps: {
25
+ entryNotFound: {
26
+ kind: StepKind.Confirm,
27
+ message: `Unknown ${noun}(s): {unknown}. Continue with the remaining selection?`,
28
+ initial: false,
29
+ },
30
+ },
31
+ };
32
+ }
33
+ /**
34
+ * Prints what a resolution could not settle and why each unnamed entry is in
35
+ * it. Exits on an ambiguous name; on unknown names, asks whether to go on
36
+ * with the rest and exits when the answer is no or nothing is left.
37
+ */
38
+ export async function reportResolution(resolution, context, answers) {
39
+ if (resolution.ambiguous.length > 0) {
40
+ for (const message of resolution.ambiguous)
41
+ console.error(lineError(message));
42
+ process.exit(1);
43
+ }
44
+ if (resolution.unknown.length > 0) {
45
+ const unknown = resolution.unknown.map((k) => c.key(k)).join(", ");
46
+ console.error(lineError(`Unknown ${context.noun}(s): ${unknown}. Run ${c.cmd(`${context.bin} ls`)} to see what the sources offer.`));
47
+ const proceed = resolution.entries.size > 0
48
+ && (await runDialogueValue(entryNotFoundDialogue(context.noun), { unknown }, answers)) === true;
49
+ if (!proceed)
50
+ process.exit(1);
51
+ }
52
+ for (const [key, why] of Object.entries(resolution.notes))
53
+ console.log(lineInfo(`${c.key(key)}: ${why}`));
54
+ }
55
+ /**
56
+ * The sources narrowed to `only`, or all of them when it is absent. Exits
57
+ * naming the `source ls` command when no source has that name.
58
+ *
59
+ * @param bin - Installer binary for the hint, e.g. `g3n-skills`
60
+ */
61
+ export function narrowSources(sources, only, bin) {
62
+ if (only === undefined)
63
+ return [...sources];
64
+ const narrowed = sources.filter((source) => source.name === only);
65
+ if (narrowed.length === 0) {
66
+ console.error(lineError(`No source named ${c.key(only)} is registered. Run ${c.cmd(`${bin} source ls`)} to see them.`));
67
+ process.exit(1);
68
+ }
69
+ return narrowed;
70
+ }
71
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE3D,oFAAoF;AACpF,MAAM,UAAU,oBAAoB,CAAwB,QAA2B;IACrF,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,QAAQ;QAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,MAAM;Q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AC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,23 @@
1
+ export declare const sym: {
2
+ success: string;
3
+ warn: string;
4
+ info: string;
5
+ error: string;
6
+ search: string;
7
+ };
8
+ export declare const c: {
9
+ bold: import("chalk").ChalkInstance;
10
+ dim: import("chalk").ChalkInstance;
11
+ key: import("chalk").ChalkInstance;
12
+ file: import("chalk").ChalkInstance;
13
+ flag: import("chalk").ChalkInstance;
14
+ cmd: import("chalk").ChalkInstance;
15
+ dir: import("chalk").ChalkInstance;
16
+ target: import("chalk").ChalkInstance;
17
+ header: import("chalk").ChalkInstance;
18
+ };
19
+ export declare function lineSuccess(msg: string): string;
20
+ export declare function lineWarn(msg: string): string;
21
+ export declare function lineInfo(msg: string): string;
22
+ export declare function lineError(msg: string): string;
23
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/cli/theme.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,GAAG;IACd,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,MAAM;CACP,CAAC;AAEF,eAAO,MAAM,CAAC;IACZ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,MAAM;IACN,MAAM;CACP,CAAC;AAEF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAqC;AACrF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAmD;AAChG,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAgD;AAC7F,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAgD"}
@@ -0,0 +1,25 @@
1
+ // packages/core/src/cli/theme.ts
2
+ import chalk from "chalk";
3
+ export const sym = {
4
+ success: chalk.green("✓"),
5
+ warn: chalk.yellow("⚠"),
6
+ info: chalk.dim("i"),
7
+ error: chalk.red("✗"),
8
+ search: chalk.cyan("🔍"),
9
+ };
10
+ export const c = {
11
+ bold: chalk.bold,
12
+ dim: chalk.dim,
13
+ key: chalk.cyan,
14
+ file: chalk.magenta,
15
+ flag: chalk.yellow.bold,
16
+ cmd: chalk.white.bold,
17
+ dir: chalk.blue,
18
+ target: chalk.green,
19
+ header: chalk.bold.underline,
20
+ };
21
+ export function lineSuccess(msg) { return `${sym.success} ${msg}`; }
22
+ export function lineWarn(msg) { return `${sym.warn} ${chalk.yellow(msg)}`; }
23
+ export function lineInfo(msg) { return `${sym.info} ${chalk.dim(msg)}`; }
24
+ export function lineError(msg) { return `${sym.error} ${chalk.red(msg)}`; }
25
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/cli/theme.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;IACzB,IAAI,EAAK,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;IAC1B,IAAI,EAAK,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;IACvB,KAAK,EAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;IACvB,MAAM,EAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,GAAG;IACf,IAAI,EAAI,KAAK,CAAC,IAAI;IAClB,GAAG,EAAK,KAAK,CAAC,GAAG;IACjB,GAAG,EAAK,KAAK,CAAC,IAAI;IAClB,IAAI,EAAI,KAAK,CAAC,OAAO;IACrB,IAAI,EAAI,KAAK,CAAC,MAAM,CAAC,IAAI;IACzB,GAAG,EAAK,KAAK,CAAC,KAAK,CAAC,IAAI;IACxB,GAAG,EAAK,KAAK,CAAC,IAAI;IAClB,MAAM,EAAE,KAAK,CAAC,KAAK;IACnB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS;CAC7B,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,GAAW,IAAY,OAAO,GAAG,GAAG,CAAC,OAAO,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;AACrF,MAAM,UAAU,QAAQ,CAAC,GAAW,IAAe,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAChG,MAAM,UAAU,QAAQ,CAAC,GAAW,IAAe,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7F,MAAM,UAAU,SAAS,CAAC,GAAW,IAAc,OAAO,GAAG,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { BaseRegistryEntry } from "../registry/types";
2
+ import type { RegistryStore } from "../registry/registry.store";
3
+ import type { FileSource } from "../installer/types";
4
+ import type { Dialogue, DialogueAnswers, StepChoice } from "./dialogue";
5
+ /** Options the install-shaped commands (add, update, remove) read. */
6
+ export interface InstallOptions {
7
+ force?: boolean;
8
+ dryRun?: boolean;
9
+ /** Preset dialogue answers by step id; skips the terminal prompt. */
10
+ answers?: DialogueAnswers;
11
+ }
12
+ export interface LSOptions {
13
+ json?: boolean;
14
+ }
15
+ /** One install destination: where files land and the manifest tracking them. */
16
+ export interface InstallTarget {
17
+ label: string;
18
+ installDir: string;
19
+ store: RegistryStore<BaseRegistryEntry>;
20
+ }
21
+ /** Where an entry's file contents come from — disk copy, remote fetch, generated. */
22
+ export type EntrySource = (entry: BaseRegistryEntry) => FileSource | Promise<FileSource>;
23
+ /** Input the install dialogues resolve against: picker choices and `{placeholder}` values. */
24
+ export interface InstallInput {
25
+ keyChoices?: StepChoice<string>[];
26
+ key?: string;
27
+ target?: string;
28
+ dependents?: string;
29
+ missing?: string;
30
+ unknown?: string;
31
+ }
32
+ export interface AddDialogues {
33
+ onNoValue?: Dialogue<InstallInput>;
34
+ onCollision?: Dialogue<InstallInput>;
35
+ }
36
+ export interface UpdateDialogues {
37
+ onCollision?: Dialogue<InstallInput>;
38
+ }
39
+ export interface RemoveDialogues {
40
+ onNoValue?: Dialogue<InstallInput>;
41
+ onCascade?: Dialogue<InstallInput>;
42
+ onCollision?: Dialogue<InstallInput>;
43
+ onIncomplete?: Dialogue<InstallInput>;
44
+ }
45
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cli/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExE,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAG,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAO,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAO,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC9C;AAED,qFAAqF;AACrF,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzF,8FAA8F;AAC9F,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;IAClC,GAAG,CAAC,EAAS,MAAM,CAAC;IACpB,MAAM,CAAC,EAAM,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,OAAO,CAAC,EAAK,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;CACvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/cli/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import { type G3nConfig, type G3nConfigFile, type G3nuiConfig, type G3nerateConfig, type SkillsConfig } from "./types";
2
+ export declare function getConfigPath(projectRoot: string): string;
3
+ /**
4
+ * Directory that owns the project's `.g3n.config.json`: the nearest ancestor
5
+ * of `fromDir` holding the config file, else the root of the git repository
6
+ * containing `fromDir`. Returns null outside a git repository when no config
7
+ * exists on the way up — g3n projects are always anchored to a git repo.
8
+ */
9
+ export declare function resolveProjectRoot(fromDir?: string): string | null;
10
+ /**
11
+ * Loads `.g3n.config.json` from the project root as a fully-defaulted view:
12
+ * sections missing on disk read as their defaults.
13
+ */
14
+ export declare function loadConfig(projectRoot: string): Promise<G3nConfig>;
15
+ /** Every key optional at every depth, so a caller can name one setting alone. */
16
+ type DeepPartial<T> = T extends readonly unknown[] ? T : T extends object ? {
17
+ [K in keyof T]?: DeepPartial<T[K]>;
18
+ } : T;
19
+ /**
20
+ * Deep-merges updates into the existing config file and writes back to disk.
21
+ * Only sections already on disk or named in `updates` are written — a
22
+ * package's init never materializes another package's section.
23
+ */
24
+ export declare function saveConfig(projectRoot: string, updates: DeepPartial<G3nConfigFile>): Promise<G3nConfig>;
25
+ export declare function loadG3nuiConfig(projectRoot: string): Promise<G3nuiConfig>;
26
+ export declare function loadG3nerateConfig(projectRoot: string): Promise<G3nerateConfig>;
27
+ export declare function loadSkillsConfig(projectRoot: string): Promise<SkillsConfig>;
28
+ export declare function configExists(projectRoot: string): Promise<boolean>;
29
+ export {};
30
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAYjB,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CASjF;AAYD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAExE;AAMD,iFAAiF;AACjF,KAAK,WAAW,CAAC,CAAC,IAChB,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG,CAAC,GAC9B,CAAC,SAAS,MAAM,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACzD,CAAC,CAAC;AAEN;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,GAClC,OAAO,CAAC,SAAS,CAAC,CAOpB;AAMD,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAE/E;AAED,wBAAsB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAErF;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAEjF;AAED,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAExE"}
@@ -0,0 +1,77 @@
1
+ // packages/core/src/config/config.ts
2
+ import { existsSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { deepMerge } from "../utils/merge";
5
+ import { G3nConfigFileSchema, G3nConfigSchema, } from "./types";
6
+ if ("window" in globalThis) {
7
+ throw new Error("@g3nomaly/core config utilities are CLI-only");
8
+ }
9
+ // ---------------------------------------------------------------------------
10
+ // Path helper
11
+ // ---------------------------------------------------------------------------
12
+ const CONFIG_FILE = ".g3n.config.json";
13
+ export function getConfigPath(projectRoot) {
14
+ return join(projectRoot, CONFIG_FILE);
15
+ }
16
+ /**
17
+ * Directory that owns the project's `.g3n.config.json`: the nearest ancestor
18
+ * of `fromDir` holding the config file, else the root of the git repository
19
+ * containing `fromDir`. Returns null outside a git repository when no config
20
+ * exists on the way up — g3n projects are always anchored to a git repo.
21
+ */
22
+ export function resolveProjectRoot(fromDir = process.cwd()) {
23
+ let dir = fromDir;
24
+ while (true) {
25
+ if (existsSync(join(dir, CONFIG_FILE)))
26
+ return dir;
27
+ if (existsSync(join(dir, ".git")))
28
+ return dir;
29
+ const parent = dirname(dir);
30
+ if (parent === dir)
31
+ return null;
32
+ dir = parent;
33
+ }
34
+ }
35
+ // ---------------------------------------------------------------------------
36
+ // Read
37
+ // ---------------------------------------------------------------------------
38
+ async function readConfigFile(projectRoot) {
39
+ const file = Bun.file(getConfigPath(projectRoot));
40
+ if (!(await file.exists()))
41
+ return {};
42
+ return G3nConfigFileSchema.parse(await file.json());
43
+ }
44
+ /**
45
+ * Loads `.g3n.config.json` from the project root as a fully-defaulted view:
46
+ * sections missing on disk read as their defaults.
47
+ */
48
+ export async function loadConfig(projectRoot) {
49
+ return G3nConfigSchema.parse(await readConfigFile(projectRoot));
50
+ }
51
+ /**
52
+ * Deep-merges updates into the existing config file and writes back to disk.
53
+ * Only sections already on disk or named in `updates` are written — a
54
+ * package's init never materializes another package's section.
55
+ */
56
+ export async function saveConfig(projectRoot, updates) {
57
+ const existing = await readConfigFile(projectRoot);
58
+ const merged = G3nConfigFileSchema.parse(deepMerge(existing, updates));
59
+ await Bun.write(getConfigPath(projectRoot), JSON.stringify(merged, null, 2));
60
+ return G3nConfigSchema.parse(merged);
61
+ }
62
+ // ---------------------------------------------------------------------------
63
+ // Section accessors
64
+ // ---------------------------------------------------------------------------
65
+ export async function loadG3nuiConfig(projectRoot) {
66
+ return (await loadConfig(projectRoot)).g3nui;
67
+ }
68
+ export async function loadG3nerateConfig(projectRoot) {
69
+ return (await loadConfig(projectRoot)).g3nerate;
70
+ }
71
+ export async function loadSkillsConfig(projectRoot) {
72
+ return (await loadConfig(projectRoot)).skills;
73
+ }
74
+ export async function configExists(projectRoot) {
75
+ return Bun.file(getConfigPath(projectRoot)).exists();
76
+ }
77
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"m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B;IACpD,OAAO,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;AACvD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type { G3nuiSettings, G3nuiConfig, G3nerateSettings, G3nerateConfig, SkillTarget, SkillsInstallDirs, SkillsSettings, SkillsConfig, G3nConfigFile, G3nConfig, } from "./types";
2
+ export { G3nuiSettingsSchema, G3nuiConfigSchema, G3nerateSettingsSchema, G3nerateConfigSchema, SkillTargetSchema, SkillsInstallDirsSchema, SkillsSettingsSchema, SkillsConfigSchema, G3nConfigFileSchema, G3nConfigSchema, } from "./types";
3
+ export { getConfigPath, resolveProjectRoot, loadConfig, saveConfig, loadG3nuiConfig, loadG3nerateConfig, loadSkillsConfig, configExists, } from "./config";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,GACb,MAAM,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { G3nuiSettingsSchema, G3nuiConfigSchema, G3nerateSettingsSchema, G3nerateConfigSchema, SkillTargetSchema, SkillsInstallDirsSchema, SkillsSettingsSchema, SkillsConfigSchema, G3nConfigFileSchema, G3nConfigSchema, } from "./types";
2
+ export { getConfigPath, resolveProjectRoot, loadConfig, saveConfig, loadG3nuiConfig, loadG3nerateConfig, loadSkillsConfig, configExists, } from "./config";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,GACb,MAAM,UAAU,CAAC"}
@@ -0,0 +1,124 @@
1
+ import { z } from "zod";
2
+ export declare const G3nuiSettingsSchema: z.ZodObject<{
3
+ componentsDir: z.ZodDefault<z.ZodString>;
4
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
5
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
6
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
7
+ }, z.core.$strip>;
8
+ export declare const G3nuiConfigSchema: z.ZodObject<{
9
+ settings: z.ZodDefault<z.ZodObject<{
10
+ componentsDir: z.ZodDefault<z.ZodString>;
11
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
12
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
13
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>;
16
+ export declare const G3nerateSettingsSchema: z.ZodObject<{
17
+ outputDir: z.ZodDefault<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export declare const G3nerateConfigSchema: z.ZodObject<{
20
+ settings: z.ZodDefault<z.ZodObject<{
21
+ outputDir: z.ZodDefault<z.ZodString>;
22
+ }, z.core.$strip>>;
23
+ }, z.core.$strip>;
24
+ export declare const SkillTargetSchema: z.ZodEnum<{
25
+ claude: "claude";
26
+ codex: "codex";
27
+ }>;
28
+ export declare const SkillsInstallDirsSchema: z.ZodObject<{
29
+ claude: z.ZodDefault<z.ZodString>;
30
+ codex: z.ZodDefault<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export declare const SkillsSettingsSchema: z.ZodObject<{
33
+ filetreeRoot: z.ZodDefault<z.ZodString>;
34
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
35
+ claude: "claude";
36
+ codex: "codex";
37
+ }>>>;
38
+ installDirs: z.ZodDefault<z.ZodObject<{
39
+ claude: z.ZodDefault<z.ZodString>;
40
+ codex: z.ZodDefault<z.ZodString>;
41
+ }, z.core.$strip>>;
42
+ }, z.core.$strip>;
43
+ export declare const SkillsConfigSchema: z.ZodObject<{
44
+ settings: z.ZodDefault<z.ZodObject<{
45
+ filetreeRoot: z.ZodDefault<z.ZodString>;
46
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
47
+ claude: "claude";
48
+ codex: "codex";
49
+ }>>>;
50
+ installDirs: z.ZodDefault<z.ZodObject<{
51
+ claude: z.ZodDefault<z.ZodString>;
52
+ codex: z.ZodDefault<z.ZodString>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>;
56
+ /** What `.g3n.config.json` holds on disk: only the sections a package's init has written. */
57
+ export declare const G3nConfigFileSchema: z.ZodObject<{
58
+ g3nui: z.ZodOptional<z.ZodObject<{
59
+ settings: z.ZodDefault<z.ZodObject<{
60
+ componentsDir: z.ZodDefault<z.ZodString>;
61
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
62
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
63
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
64
+ }, z.core.$strip>>;
65
+ }, z.core.$strip>>;
66
+ g3nerate: z.ZodOptional<z.ZodObject<{
67
+ settings: z.ZodDefault<z.ZodObject<{
68
+ outputDir: z.ZodDefault<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>>;
71
+ skills: z.ZodOptional<z.ZodObject<{
72
+ settings: z.ZodDefault<z.ZodObject<{
73
+ filetreeRoot: z.ZodDefault<z.ZodString>;
74
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
75
+ claude: "claude";
76
+ codex: "codex";
77
+ }>>>;
78
+ installDirs: z.ZodDefault<z.ZodObject<{
79
+ claude: z.ZodDefault<z.ZodString>;
80
+ codex: z.ZodDefault<z.ZodString>;
81
+ }, z.core.$strip>>;
82
+ }, z.core.$strip>>;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
85
+ /** The fully-defaulted view every consumer reads through `loadConfig`. */
86
+ export declare const G3nConfigSchema: z.ZodObject<{
87
+ g3nui: z.ZodDefault<z.ZodObject<{
88
+ settings: z.ZodDefault<z.ZodObject<{
89
+ componentsDir: z.ZodDefault<z.ZodString>;
90
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
91
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
92
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>>;
95
+ g3nerate: z.ZodDefault<z.ZodObject<{
96
+ settings: z.ZodDefault<z.ZodObject<{
97
+ outputDir: z.ZodDefault<z.ZodString>;
98
+ }, z.core.$strip>>;
99
+ }, z.core.$strip>>;
100
+ skills: z.ZodDefault<z.ZodObject<{
101
+ settings: z.ZodDefault<z.ZodObject<{
102
+ filetreeRoot: z.ZodDefault<z.ZodString>;
103
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
104
+ claude: "claude";
105
+ codex: "codex";
106
+ }>>>;
107
+ installDirs: z.ZodDefault<z.ZodObject<{
108
+ claude: z.ZodDefault<z.ZodString>;
109
+ codex: z.ZodDefault<z.ZodString>;
110
+ }, z.core.$strip>>;
111
+ }, z.core.$strip>>;
112
+ }, z.core.$strip>>;
113
+ }, z.core.$strip>;
114
+ export type G3nuiSettings = z.infer<typeof G3nuiSettingsSchema>;
115
+ export type G3nuiConfig = z.infer<typeof G3nuiConfigSchema>;
116
+ export type G3nerateSettings = z.infer<typeof G3nerateSettingsSchema>;
117
+ export type G3nerateConfig = z.infer<typeof G3nerateConfigSchema>;
118
+ export type SkillTarget = z.infer<typeof SkillTargetSchema>;
119
+ export type SkillsInstallDirs = z.infer<typeof SkillsInstallDirsSchema>;
120
+ export type SkillsSettings = z.infer<typeof SkillsSettingsSchema>;
121
+ export type SkillsConfig = z.infer<typeof SkillsConfigSchema>;
122
+ export type G3nConfigFile = z.infer<typeof G3nConfigFileSchema>;
123
+ export type G3nConfig = z.infer<typeof G3nConfigSchema>;
124
+ //# sourceMappingURL=types.d.ts.map