@jordond/kit 0.0.0-stage → 0.1.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 (186) hide show
  1. package/bin/kit +39 -0
  2. package/dist/_verb-espppzez.js +115 -0
  3. package/dist/android-g73naxgg.js +31 -0
  4. package/dist/build-88hxf0kc.js +42 -0
  5. package/dist/check-7mndz8g8.js +54 -0
  6. package/dist/check-ngc4kzmj.js +33 -0
  7. package/dist/cleanup-hrcvxmh2.js +18 -0
  8. package/dist/cli/builtins.d.ts +13 -0
  9. package/dist/cli/command.d.ts +86 -0
  10. package/dist/cli/discover.d.ts +10 -0
  11. package/dist/cli/main.d.ts +1 -0
  12. package/dist/cli/plugin.d.ts +7 -0
  13. package/dist/cli/usage.d.ts +3 -0
  14. package/dist/cli-07t28k94.js +30 -0
  15. package/dist/cli-12dww95e.js +195 -0
  16. package/dist/cli-5d61x8vg.js +675 -0
  17. package/dist/cli-5wasc5mr.js +76 -0
  18. package/dist/cli-6dxp4v3m.js +73 -0
  19. package/dist/cli-7wvrehng.js +23 -0
  20. package/dist/cli-bam7dqfd.js +33 -0
  21. package/dist/cli-fqfan92n.js +135 -0
  22. package/dist/cli-fqxtcj42.js +75 -0
  23. package/dist/cli-h974q2wr.js +2019 -0
  24. package/dist/cli-m53122z6.js +221 -0
  25. package/dist/cli-qhs8ww91.js +51 -0
  26. package/dist/cli-qq1ktr8q.js +234 -0
  27. package/dist/cli-rds33bnp.js +101 -0
  28. package/dist/cli-re3ntm60.js +48 -0
  29. package/dist/cli.d.ts +1 -0
  30. package/dist/cli.js +35 -0
  31. package/dist/cloudflare-n5c46k6x.js +43 -0
  32. package/dist/command-gazq4bmt.js +19 -0
  33. package/dist/commands/_verb.d.ts +15 -0
  34. package/dist/commands/build.d.ts +11 -0
  35. package/dist/commands/check.d.ts +8 -0
  36. package/dist/commands/config.d.ts +2 -0
  37. package/dist/commands/db/create.d.ts +7 -0
  38. package/dist/commands/db/exec.d.ts +16 -0
  39. package/dist/commands/db/list.d.ts +11 -0
  40. package/dist/commands/db/migrate.d.ts +11 -0
  41. package/dist/commands/deploy.d.ts +13 -0
  42. package/dist/commands/deps.d.ts +72 -0
  43. package/dist/commands/dev.d.ts +8 -0
  44. package/dist/commands/doctor.d.ts +56 -0
  45. package/dist/commands/env/check.d.ts +7 -0
  46. package/dist/commands/env/init.d.ts +2 -0
  47. package/dist/commands/env/push.d.ts +12 -0
  48. package/dist/commands/env/sync.d.ts +2 -0
  49. package/dist/commands/format.d.ts +11 -0
  50. package/dist/commands/gradle.d.ts +2 -0
  51. package/dist/commands/init.d.ts +53 -0
  52. package/dist/commands/lint.d.ts +12 -0
  53. package/dist/commands/release/android.d.ts +13 -0
  54. package/dist/commands/release/ios.d.ts +13 -0
  55. package/dist/commands/test.d.ts +2 -0
  56. package/dist/commands/typecheck.d.ts +2 -0
  57. package/dist/commands/wrangler.d.ts +4 -0
  58. package/dist/commands/xcode.d.ts +8 -0
  59. package/dist/config/load.d.ts +6 -0
  60. package/dist/config/schema.d.ts +135 -0
  61. package/dist/config-ey5yrrfn.js +22 -0
  62. package/dist/create-7s8h3dja.js +38 -0
  63. package/dist/deploy-8mg1zhpb.js +102 -0
  64. package/dist/deps-97dq4mg8.js +334 -0
  65. package/dist/dev-yc9xmntj.js +62 -0
  66. package/dist/doctor-0wzmfyyh.js +324 -0
  67. package/dist/errors-1fjbr7ee.js +10 -0
  68. package/dist/exec-1k3sqwxz.js +53 -0
  69. package/dist/format-mnqfak22.js +39 -0
  70. package/dist/git-52v5rk51.js +80 -0
  71. package/dist/gradle-gtkf3geq.js +39 -0
  72. package/dist/index-cx34x4np.js +874 -0
  73. package/dist/index-erv82p4z.js +1528 -0
  74. package/dist/index-jqfz6hfy.js +2659 -0
  75. package/dist/index-mm4ht8yh.js +9 -0
  76. package/dist/index-s3ehw02w.js +1610 -0
  77. package/dist/index.d.ts +10 -0
  78. package/dist/index.js +50 -0
  79. package/dist/init-0402av4m.js +78 -0
  80. package/dist/init-dk5sym9w.js +76 -0
  81. package/dist/init-qr7y55ea.js +185 -0
  82. package/dist/ios-msg4bk15.js +31 -0
  83. package/dist/lib/cleanup.d.ts +21 -0
  84. package/dist/lib/cloudflare.d.ts +96 -0
  85. package/dist/lib/env/init.d.ts +22 -0
  86. package/dist/lib/env/load.d.ts +12 -0
  87. package/dist/lib/env/push.d.ts +54 -0
  88. package/dist/lib/env/render.d.ts +49 -0
  89. package/dist/lib/env/schema.d.ts +49 -0
  90. package/dist/lib/errors.d.ts +14 -0
  91. package/dist/lib/git.d.ts +36 -0
  92. package/dist/lib/log.d.ts +11 -0
  93. package/dist/lib/pm.d.ts +8 -0
  94. package/dist/lib/proc.d.ts +73 -0
  95. package/dist/lib/prompt.d.ts +32 -0
  96. package/dist/lib/secrets.d.ts +32 -0
  97. package/dist/lib/steps.d.ts +38 -0
  98. package/dist/lib/targets.d.ts +46 -0
  99. package/dist/lib/toml.d.ts +15 -0
  100. package/dist/lint-280dpn4y.js +39 -0
  101. package/dist/list-jdc3dqk0.js +34 -0
  102. package/dist/load-5qzs1c6b.js +137 -0
  103. package/dist/log-hhspqwjw.js +11 -0
  104. package/dist/main-ywtsjxev.js +2052 -0
  105. package/dist/migrate-emk758k1.js +35 -0
  106. package/dist/picocolors-0dxagz5d.js +6 -0
  107. package/dist/pm-5q5vz6w3.js +14 -0
  108. package/dist/proc-jv4bcyyx.js +33 -0
  109. package/dist/prompt-v510j04z.js +93 -0
  110. package/dist/push-4z70h3d8.js +117 -0
  111. package/dist/push-xzqw218t.js +117 -0
  112. package/dist/render-488tjnsq.js +22 -0
  113. package/dist/sync-wc4jpmkj.js +53 -0
  114. package/dist/targets-hbwxv97d.js +22 -0
  115. package/dist/test-198w46m4.js +26 -0
  116. package/dist/toml-zbhtxjh1.js +1062 -0
  117. package/dist/typecheck-e86e6yg1.js +24 -0
  118. package/dist/wrangler-0ctx1p3w.js +66 -0
  119. package/dist/xcode-g44qh2rc.js +60 -0
  120. package/fastlane/Fastfile +413 -0
  121. package/fastlane/Gemfile +21 -0
  122. package/fastlane/Gemfile.lock +275 -0
  123. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar +0 -0
  124. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.md5 +1 -0
  125. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha1 +1 -0
  126. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha256 +1 -0
  127. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha512 +1 -0
  128. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module +64 -0
  129. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.md5 +1 -0
  130. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha1 +1 -0
  131. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha256 +1 -0
  132. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha512 +1 -0
  133. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom +12 -0
  134. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.md5 +1 -0
  135. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha1 +1 -0
  136. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha256 +1 -0
  137. package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha512 +1 -0
  138. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml +13 -0
  139. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.md5 +1 -0
  140. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha1 +1 -0
  141. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha256 +1 -0
  142. package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha512 +1 -0
  143. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar +0 -0
  144. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.md5 +1 -0
  145. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha1 +1 -0
  146. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha256 +1 -0
  147. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha512 +1 -0
  148. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module +64 -0
  149. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.md5 +1 -0
  150. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha1 +1 -0
  151. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha256 +1 -0
  152. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha512 +1 -0
  153. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom +12 -0
  154. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.md5 +1 -0
  155. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha1 +1 -0
  156. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha256 +1 -0
  157. package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha512 +1 -0
  158. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml +13 -0
  159. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.md5 +1 -0
  160. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha1 +1 -0
  161. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha256 +1 -0
  162. package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha512 +1 -0
  163. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom +15 -0
  164. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.md5 +1 -0
  165. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha1 +1 -0
  166. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha256 +1 -0
  167. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha512 +1 -0
  168. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml +13 -0
  169. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.md5 +1 -0
  170. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha1 +1 -0
  171. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha256 +1 -0
  172. package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha512 +1 -0
  173. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom +15 -0
  174. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.md5 +1 -0
  175. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha1 +1 -0
  176. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha256 +1 -0
  177. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha512 +1 -0
  178. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml +13 -0
  179. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.md5 +1 -0
  180. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha1 +1 -0
  181. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha256 +1 -0
  182. package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha512 +1 -0
  183. package/package.json +58 -4
  184. package/templates/lefthook.yml +6 -0
  185. package/templates/mise.toml +6 -0
  186. package/README.md +0 -3
@@ -0,0 +1,135 @@
1
+ import { z } from 'zod';
2
+ export declare const verbs: readonly ['lint', 'format', 'typecheck', 'test', 'build', 'dev', 'deploy'];
3
+ export type Verb = (typeof verbs)[number];
4
+ export declare const kinds: readonly ['gradle', 'worker', 'vite', 'astro', 'docker', 'custom'];
5
+ export type Kind = (typeof kinds)[number];
6
+ export declare const tracks: readonly ['internal', 'alpha', 'beta', 'prod'];
7
+ export type Track = (typeof tracks)[number];
8
+ /** A command string, or a list run in order. `false` turns a kind's default off. */
9
+ declare const command: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>;
10
+ export type CommandValue = z.infer<typeof command>;
11
+ declare const target: z.ZodObject<{
12
+ kind: z.ZodEnum<{
13
+ astro: "astro";
14
+ custom: "custom";
15
+ docker: "docker";
16
+ gradle: "gradle";
17
+ vite: "vite";
18
+ worker: "worker";
19
+ }>;
20
+ dir: z.ZodString;
21
+ envs: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ deploy: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>, z.ZodObject<{
23
+ run: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
24
+ before: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ }, z.core.$strict>]>>;
26
+ build: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
27
+ dev: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
28
+ format: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
29
+ lint: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
30
+ test: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
31
+ typecheck: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
32
+ }, z.core.$strict>;
33
+ export type TargetConfig = z.output<typeof target>;
34
+ export declare const configSchema: z.ZodObject<{
35
+ name: z.ZodString;
36
+ gradle: z.ZodOptional<z.ZodObject<{
37
+ root: z.ZodString;
38
+ }, z.core.$strict>>;
39
+ versions: z.ZodOptional<z.ZodObject<{
40
+ file: z.ZodString;
41
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
42
+ }, z.core.$strict>>;
43
+ env: z.ZodOptional<z.ZodObject<{
44
+ schema: z.ZodOptional<z.ZodString>;
45
+ outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
46
+ pick: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
+ rename: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
48
+ }, z.core.$strict>>>;
49
+ workerSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
50
+ githubSecrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ }, z.core.$strict>>;
52
+ workspace: z.ZodOptional<z.ZodObject<{
53
+ prepare: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
54
+ build: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
55
+ deploy: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
56
+ dev: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
57
+ format: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
58
+ lint: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
59
+ test: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
60
+ typecheck: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
61
+ }, z.core.$strict>>;
62
+ targets: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
63
+ kind: z.ZodEnum<{
64
+ astro: "astro";
65
+ custom: "custom";
66
+ docker: "docker";
67
+ gradle: "gradle";
68
+ vite: "vite";
69
+ worker: "worker";
70
+ }>;
71
+ dir: z.ZodString;
72
+ envs: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
+ deploy: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>, z.ZodObject<{
74
+ run: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
75
+ before: z.ZodOptional<z.ZodArray<z.ZodString>>;
76
+ }, z.core.$strict>]>>;
77
+ build: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
78
+ dev: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
79
+ format: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
80
+ lint: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
81
+ test: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
82
+ typecheck: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
83
+ }, z.core.$strict>>>;
84
+ cloudflare: z.ZodOptional<z.ZodObject<{
85
+ accountId: z.ZodOptional<z.ZodString>;
86
+ d1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
87
+ name: z.ZodString;
88
+ target: z.ZodString;
89
+ }, z.core.$strict>>>;
90
+ }, z.core.$strict>>;
91
+ release: z.ZodOptional<z.ZodObject<{
92
+ branches: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ notes: z.ZodOptional<z.ZodObject<{
94
+ maxLength: z.ZodOptional<z.ZodNumber>;
95
+ }, z.core.$strict>>;
96
+ preflight: z.ZodOptional<z.ZodArray<z.ZodString>>;
97
+ ios: z.ZodOptional<z.ZodObject<{
98
+ bundleIds: z.ZodArray<z.ZodString>;
99
+ project: z.ZodString;
100
+ scheme: z.ZodString;
101
+ output: z.ZodString;
102
+ teamId: z.ZodOptional<z.ZodString>;
103
+ testflightGroups: z.ZodOptional<z.ZodObject<{
104
+ alpha: z.ZodOptional<z.ZodString>;
105
+ beta: z.ZodOptional<z.ZodString>;
106
+ }, z.core.$strip>>;
107
+ sentry: z.ZodOptional<z.ZodObject<{
108
+ org: z.ZodString;
109
+ project: z.ZodString;
110
+ }, z.core.$strict>>;
111
+ }, z.core.$strict>>;
112
+ android: z.ZodOptional<z.ZodObject<{
113
+ packageName: z.ZodString;
114
+ module: z.ZodString;
115
+ prodRollout: z.ZodOptional<z.ZodNumber>;
116
+ gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ task: z.ZodString;
118
+ tracks: z.ZodArray<z.ZodEnum<{
119
+ alpha: "alpha";
120
+ beta: "beta";
121
+ internal: "internal";
122
+ prod: "prod";
123
+ }>>;
124
+ }, z.core.$strip>>>;
125
+ }, z.core.$strict>>;
126
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
127
+ versionKey: z.ZodString;
128
+ build: z.ZodOptional<z.ZodString>;
129
+ deploy: z.ZodString;
130
+ }, z.core.$strict>>>;
131
+ }, z.core.$strict>>;
132
+ }, z.core.$strict>;
133
+ export type KitConfigInput = z.input<typeof configSchema>;
134
+ export type KitConfig = z.output<typeof configSchema>;
135
+ export {};
@@ -0,0 +1,22 @@
1
+ // @bun
2
+ import {
3
+ defineCommand
4
+ } from "./cli-6dxp4v3m.js";
5
+ import {
6
+ emitJson
7
+ } from "./cli-07t28k94.js";
8
+ import"./cli-5wasc5mr.js";
9
+ import"./cli-7wvrehng.js";
10
+ import"./cli-re3ntm60.js";
11
+
12
+ // src/commands/config.ts
13
+ var config_default = defineCommand({
14
+ description: "Print the resolved kit.config.ts",
15
+ group: "Setup",
16
+ run(ctx) {
17
+ emitJson({ root: ctx.root ?? null, config: ctx.config ?? null });
18
+ }
19
+ });
20
+ export {
21
+ config_default as default
22
+ };
@@ -0,0 +1,38 @@
1
+ // @bun
2
+ import {
3
+ dbArgs
4
+ } from "./cli-m53122z6.js";
5
+ import"./cli-bam7dqfd.js";
6
+ import"./cli-qhs8ww91.js";
7
+ import"./cli-fqfan92n.js";
8
+ import"./cli-fqxtcj42.js";
9
+ import {
10
+ defineCommand
11
+ } from "./cli-6dxp4v3m.js";
12
+ import"./cli-07t28k94.js";
13
+ import"./cli-5wasc5mr.js";
14
+ import"./cli-7wvrehng.js";
15
+ import {
16
+ __require
17
+ } from "./cli-re3ntm60.js";
18
+
19
+ // src/commands/db/create.ts
20
+ var create_default = defineCommand({
21
+ description: "Create a new D1 migration file",
22
+ group: "Infra",
23
+ args: { ...dbArgs },
24
+ examples: `kit db create add_widgets
25
+ kit db create add_events --db analytics`,
26
+ async run(ctx) {
27
+ const { runD1 } = await import("./cloudflare-n5c46k6x.js");
28
+ const { ExitCode, KitError } = await import("./errors-1fjbr7ee.js");
29
+ const migration = ctx.positionals.join("_").trim();
30
+ if (!migration) {
31
+ throw new KitError("kit db create takes a migration name", "kit db create add_widgets", ExitCode.usage);
32
+ }
33
+ await runD1(ctx, { kind: "create", migration }, { mutates: true });
34
+ }
35
+ });
36
+ export {
37
+ create_default as default
38
+ };
@@ -0,0 +1,102 @@
1
+ // @bun
2
+ import {
3
+ defineCommand
4
+ } from "./cli-6dxp4v3m.js";
5
+ import"./cli-07t28k94.js";
6
+ import"./cli-5wasc5mr.js";
7
+ import {
8
+ ExitCode,
9
+ KitError
10
+ } from "./cli-7wvrehng.js";
11
+ import {
12
+ __require
13
+ } from "./cli-re3ntm60.js";
14
+
15
+ // src/commands/deploy.ts
16
+ function checkEnv(config, name, env) {
17
+ const envs = config.targets[name]?.envs;
18
+ if (env && envs && !envs.includes(env)) {
19
+ throw new KitError(`Unknown env "${env}" for ${name}`, `Envs: ${envs.join(", ")}`, ExitCode.usage);
20
+ }
21
+ if (env && !envs) {
22
+ throw new KitError(`Target "${name}" has no envs`, `Add targets.${name}.envs in kit.config.ts`, ExitCode.usage);
23
+ }
24
+ return env;
25
+ }
26
+ function beforeCommands(config, name) {
27
+ const d = config.targets[name]?.deploy;
28
+ const before = d && typeof d === "object" && !Array.isArray(d) ? d.before ?? [] : [];
29
+ return before.map((s) => s.trim().split(/\s+/));
30
+ }
31
+ var deploy_default = defineCommand({
32
+ description: "Deploy a target",
33
+ group: "Develop",
34
+ args: {
35
+ env: { type: "string", short: "e", description: "Environment (when the target has envs)" }
36
+ },
37
+ examples: `kit deploy api
38
+ kit deploy web --env staging
39
+ kit deploy api --dry-run`,
40
+ async run(ctx) {
41
+ const { requireProject } = await import("./command-gazq4bmt.js");
42
+ const { singleTarget } = await import("./_verb-espppzez.js");
43
+ const { targetCommands } = await import("./targets-hbwxv97d.js");
44
+ const { run, runToStderr } = await import("./proc-jv4bcyyx.js");
45
+ const { emitJson } = await import("./log-hhspqwjw.js");
46
+ const { root, config } = requireProject(ctx);
47
+ if (config.cloudflare?.accountId)
48
+ (await import("./cloudflare-n5c46k6x.js")).pinCloudflareAccount(root, config);
49
+ const name = singleTarget(ctx, "deploy");
50
+ const env = checkEnv(config, name, ctx.args.env);
51
+ const cmds = targetCommands(root, config, name, "deploy", { env, extra: ctx.rest });
52
+ if (!cmds) {
53
+ throw new KitError(`Target "${name}" has no deploy command`, `Set targets.${name}.deploy in kit.config.ts`, ExitCode.usage);
54
+ }
55
+ const self = [process.execPath, "--no-env-file", process.argv[1]];
56
+ const before = beforeCommands(config, name).map((args) => ({
57
+ title: `kit ${args.join(" ")}`,
58
+ cmd: [...self, ...args, ...ctx.flags.yes ? ["--yes"] : []]
59
+ }));
60
+ const plan = [...before.map((b) => b.title), ...cmds.map((c) => c.cmd.join(" "))];
61
+ if (ctx.flags.dryRun) {
62
+ if (ctx.flags.json)
63
+ emitJson({ target: name, env, plan });
64
+ else
65
+ for (const p of plan)
66
+ ctx.log.step(p);
67
+ return;
68
+ }
69
+ const exec = ctx.flags.json ? runToStderr : run;
70
+ const steps = [];
71
+ const report = (ok) => {
72
+ if (ctx.flags.json)
73
+ emitJson({ target: name, env, ok, steps });
74
+ };
75
+ for (const b of before) {
76
+ ctx.log.step(b.title);
77
+ const code = await exec(b.cmd, { cwd: root, env: { KIT_ROOT: root } });
78
+ steps.push({ title: b.title, code });
79
+ if (code !== 0) {
80
+ report(false);
81
+ throw new KitError(`${b.title} failed (exit ${code}); not deploying`, undefined, ExitCode.precondition);
82
+ }
83
+ }
84
+ for (const c of cmds) {
85
+ ctx.log.step(c.title);
86
+ const code = await exec(c.cmd, { cwd: c.cwd, env: c.env });
87
+ steps.push({ title: c.title, code });
88
+ if (code !== 0) {
89
+ report(false);
90
+ process.exitCode = ExitCode.failed;
91
+ return;
92
+ }
93
+ }
94
+ report(true);
95
+ ctx.log.success(`deployed ${name}${env ? ` (${env})` : ""}`);
96
+ }
97
+ });
98
+ export {
99
+ deploy_default as default,
100
+ checkEnv,
101
+ beforeCommands
102
+ };
@@ -0,0 +1,334 @@
1
+ // @bun
2
+ import {
3
+ defineCommand
4
+ } from "./cli-6dxp4v3m.js";
5
+ import"./cli-07t28k94.js";
6
+ import"./cli-5wasc5mr.js";
7
+ import"./cli-7wvrehng.js";
8
+ import {
9
+ __require,
10
+ __toESM
11
+ } from "./cli-re3ntm60.js";
12
+
13
+ // src/commands/deps.ts
14
+ import { existsSync, readFileSync, writeFileSync } from "fs";
15
+ import { join, relative } from "path";
16
+ var CATALOG_REF = "catalog:";
17
+ var CATALOG_FIELD = "catalog";
18
+ var DEPENDENCY_FIELDS = [
19
+ "dependencies",
20
+ "devDependencies",
21
+ "peerDependencies",
22
+ "optionalDependencies"
23
+ ];
24
+ function readManifest(path) {
25
+ return JSON.parse(readFileSync(path, "utf8"));
26
+ }
27
+ function writeManifest(path, manifest) {
28
+ writeFileSync(path, `${JSON.stringify(manifest, null, 2)}
29
+ `);
30
+ }
31
+ function catalogOf(manifest) {
32
+ const ws = manifest.workspaces;
33
+ return (ws && !Array.isArray(ws) ? ws.catalog : undefined) ?? manifest.catalog;
34
+ }
35
+ function workspaceGlobs(manifest) {
36
+ const ws = manifest.workspaces;
37
+ if (!ws)
38
+ return [];
39
+ return Array.isArray(ws) ? ws : ws.packages ?? [];
40
+ }
41
+ function catalogRefs(manifest) {
42
+ const refs = [];
43
+ for (const field of DEPENDENCY_FIELDS) {
44
+ for (const [name, range] of Object.entries(manifest[field] ?? {})) {
45
+ if (range === CATALOG_REF)
46
+ refs.push({ field, name });
47
+ }
48
+ }
49
+ return refs;
50
+ }
51
+ function restoreCatalogRefs(manifest, refs) {
52
+ const restored = [];
53
+ for (const { field, name } of refs) {
54
+ const declared = manifest[field];
55
+ if (declared === undefined || declared[name] === undefined || declared[name] === CATALOG_REF)
56
+ continue;
57
+ declared[name] = CATALOG_REF;
58
+ restored.push(name);
59
+ }
60
+ return restored;
61
+ }
62
+ function nextRange(current, latest) {
63
+ if (current.startsWith("~"))
64
+ return `~${latest}`;
65
+ if (/^\d/.test(current))
66
+ return latest;
67
+ return `^${latest}`;
68
+ }
69
+ function setCatalogRange(manifest, name, latest) {
70
+ const catalog = catalogOf(manifest);
71
+ const current = catalog?.[name];
72
+ if (catalog === undefined || current === undefined)
73
+ return;
74
+ const to = nextRange(current, latest);
75
+ catalog[name] = to;
76
+ return { field: CATALOG_FIELD, from: current, to };
77
+ }
78
+ function setDeclaredRange(manifest, name, latest) {
79
+ const changes = [];
80
+ for (const field of DEPENDENCY_FIELDS) {
81
+ const declared = manifest[field];
82
+ const current = declared?.[name];
83
+ if (declared === undefined || current === undefined)
84
+ continue;
85
+ if (current === CATALOG_REF || current.startsWith("workspace:"))
86
+ continue;
87
+ const to = nextRange(current, latest);
88
+ declared[name] = to;
89
+ changes.push({ field, from: current, to });
90
+ }
91
+ return changes;
92
+ }
93
+ function manifestPaths(root) {
94
+ const rootManifest = join(root, "package.json");
95
+ if (!existsSync(rootManifest))
96
+ return [];
97
+ const paths = [rootManifest];
98
+ for (const pattern of workspaceGlobs(readManifest(rootManifest))) {
99
+ const glob = new Bun.Glob(`${pattern.replace(/\/$/, "")}/package.json`);
100
+ for (const file of [...glob.scanSync({ cwd: root, onlyFiles: true })].sort()) {
101
+ if (!file.includes("node_modules"))
102
+ paths.push(join(root, file));
103
+ }
104
+ }
105
+ return paths;
106
+ }
107
+ var OUTDATED_CMD = ["bun", "outdated", "--filter", "*"];
108
+ function inRangeOutdated(table) {
109
+ const names = new Set;
110
+ for (const row of table.split(`
111
+ `)) {
112
+ const [, name, current, update] = row.split("|").map((cell) => cell.trim());
113
+ if (name === undefined || update === undefined || name === "Package")
114
+ continue;
115
+ if (current === update)
116
+ continue;
117
+ names.add(name.replace(/ \(dev\)$/, ""));
118
+ }
119
+ return [...names];
120
+ }
121
+ function outdatedRows(table) {
122
+ let header;
123
+ const rows = [];
124
+ for (const line of table.split(`
125
+ `)) {
126
+ const trimmed = line.trim();
127
+ if (!trimmed.startsWith("|"))
128
+ continue;
129
+ const cells = trimmed.replace(/^\||\|$/g, "").split("|").map((c) => c.trim());
130
+ if (!header) {
131
+ if (cells[0] === "Package")
132
+ header = cells.map((h) => h.toLowerCase());
133
+ continue;
134
+ }
135
+ if (cells.every((c) => /^[-:]*$/.test(c)))
136
+ continue;
137
+ const keys = header;
138
+ rows.push(Object.fromEntries(keys.map((h, i) => [h, cells[i] ?? ""])));
139
+ }
140
+ return rows;
141
+ }
142
+ function planEdits(files, name, latest) {
143
+ return files.flatMap(({ path, manifest }) => {
144
+ const inCatalog = setCatalogRange(manifest, name, latest);
145
+ const changes = [
146
+ ...inCatalog === undefined ? [] : [inCatalog],
147
+ ...setDeclaredRange(manifest, name, latest)
148
+ ];
149
+ return changes.map((change) => ({ path, name, change }));
150
+ });
151
+ }
152
+ async function latestVersion(name) {
153
+ const registry = (process.env.npm_config_registry ?? "https://registry.npmjs.org").replace(/\/$/, "");
154
+ const res = await fetch(`${registry}/${name.replace("/", "%2f")}/latest`);
155
+ if (!res.ok)
156
+ throw new Error(`Registry lookup failed for ${name}: ${res.status} ${res.statusText}`);
157
+ const body = await res.json();
158
+ if (typeof body.version !== "string")
159
+ throw new Error(`Registry returned no version for ${name}`);
160
+ return body.version;
161
+ }
162
+ var deps_default = defineCommand({
163
+ description: "List or update npm dependencies across the workspace (catalog-aware)",
164
+ group: "Setup",
165
+ examples: [
166
+ "kit deps # list everything with a newer version",
167
+ "kit deps update # newest versions the declared ranges allow (bun.lock only)",
168
+ "kit deps latest wrangler # rewrite ranges to latest (catalog entry first), then install"
169
+ ].join(`
170
+ `),
171
+ async run(ctx) {
172
+ const { requireProject } = await import("./command-gazq4bmt.js");
173
+ const { ExitCode, KitError } = await import("./errors-1fjbr7ee.js");
174
+ const { detectPackageManager } = await import("./pm-5q5vz6w3.js");
175
+ const { root } = requireProject(ctx);
176
+ if (detectPackageManager(root, root) !== "bun") {
177
+ throw new KitError("kit deps supports bun workspaces only", undefined, ExitCode.usage);
178
+ }
179
+ const [sub, ...names] = ctx.positionals;
180
+ switch (sub) {
181
+ case undefined:
182
+ return await list(ctx, root);
183
+ case "update":
184
+ if (names.length) {
185
+ throw new KitError("kit deps update takes no package names", "To move a range, use `kit deps latest <pkgs\u2026>`", ExitCode.usage);
186
+ }
187
+ return await update(ctx, root);
188
+ case "latest":
189
+ if (!names.length) {
190
+ throw new KitError("kit deps latest needs package names", "e.g. `kit deps latest wrangler astro`", ExitCode.usage);
191
+ }
192
+ return await latest(ctx, root, names);
193
+ default:
194
+ throw new KitError(`Unknown deps command "${sub}"`, "Use `kit deps`, `update` or `latest`", ExitCode.usage);
195
+ }
196
+ }
197
+ });
198
+ async function list(ctx, root) {
199
+ const { run, runCapture } = await import("./proc-jv4bcyyx.js");
200
+ const { emitJson } = await import("./log-hhspqwjw.js");
201
+ if (ctx.flags.dryRun) {
202
+ if (ctx.flags.json)
203
+ emitJson({ dryRun: true, cmd: OUTDATED_CMD });
204
+ else
205
+ ctx.log.step(OUTDATED_CMD.join(" "));
206
+ return;
207
+ }
208
+ if (ctx.flags.json) {
209
+ const { code, stdout } = await runCapture(OUTDATED_CMD, { cwd: root });
210
+ emitJson({ ok: code === 0, outdated: outdatedRows(stdout) });
211
+ if (code !== 0)
212
+ process.exitCode = code;
213
+ return;
214
+ }
215
+ process.exitCode = await run(OUTDATED_CMD, { cwd: root });
216
+ }
217
+ async function update(ctx, root) {
218
+ const { run, runCapture, runToStderr } = await import("./proc-jv4bcyyx.js");
219
+ const { onCleanup } = await import("./cleanup-hrcvxmh2.js");
220
+ const { emitJson } = await import("./log-hhspqwjw.js");
221
+ const exec = ctx.flags.json ? runToStderr : run;
222
+ const report = (doc) => {
223
+ if (ctx.flags.json)
224
+ emitJson({ dryRun: ctx.flags.dryRun, ...doc });
225
+ };
226
+ const listed = await runCapture(OUTDATED_CMD, { cwd: root });
227
+ if (listed.code !== 0) {
228
+ report({ ok: false, packages: [] });
229
+ process.exitCode = listed.code;
230
+ return;
231
+ }
232
+ const names = inRangeOutdated(listed.stdout);
233
+ if (!names.length) {
234
+ report({ ok: true, packages: [] });
235
+ ctx.log.success("Every declared range already has its newest match installed");
236
+ return;
237
+ }
238
+ ctx.log.dim(`in range: ${names.join(", ")}`);
239
+ const cmds = [
240
+ ["bun", "update"],
241
+ ["bun", "update", ...names],
242
+ ["bun", "install"]
243
+ ];
244
+ if (ctx.flags.dryRun) {
245
+ report({ ok: true, packages: names, cmds });
246
+ if (!ctx.flags.json)
247
+ for (const c of cmds)
248
+ ctx.log.step(c.join(" "));
249
+ return;
250
+ }
251
+ const before = manifestPaths(root).map((path) => ({ path, text: readFileSync(path, "utf8") }));
252
+ const restore = () => {
253
+ for (const { path, text } of before)
254
+ writeFileSync(path, text);
255
+ };
256
+ const off = onCleanup(restore);
257
+ let code = 0;
258
+ try {
259
+ for (const cmd of cmds.slice(0, 2)) {
260
+ code = await exec(cmd, { cwd: root });
261
+ if (code !== 0)
262
+ break;
263
+ }
264
+ } finally {
265
+ off();
266
+ restore();
267
+ }
268
+ if (code === 0)
269
+ code = await exec(cmds[2], { cwd: root });
270
+ report({ ok: code === 0, packages: names });
271
+ if (code !== 0)
272
+ process.exitCode = code;
273
+ }
274
+ async function latest(ctx, root, names) {
275
+ const pc = (await import("./picocolors-0dxagz5d.js").then((m)=>__toESM(m.default,1))).default;
276
+ const { ExitCode, KitError } = await import("./errors-1fjbr7ee.js");
277
+ const { emitJson } = await import("./log-hhspqwjw.js");
278
+ const { run, runToStderr } = await import("./proc-jv4bcyyx.js");
279
+ const rootManifest = join(root, "package.json");
280
+ const files = manifestPaths(root).map((path) => ({ path, manifest: readManifest(path) }));
281
+ const pinned = catalogRefs(readManifest(rootManifest));
282
+ const planned = await Promise.all(names.map(async (name) => ({ name, edits: planEdits(files, name, await latestVersion(name)) })));
283
+ const undeclared = planned.filter((p) => !p.edits.length).map((p) => p.name);
284
+ if (undeclared.length) {
285
+ throw new KitError(`Not a dependency of this workspace: ${undeclared.join(", ")}`, undefined, ExitCode.usage);
286
+ }
287
+ const edits = planned.flatMap((p) => p.edits);
288
+ const shown = edits.map((e) => ({ ...e, path: relative(root, e.path) || "package.json" }));
289
+ if (!ctx.flags.json) {
290
+ for (const { path, name, change } of edits) {
291
+ const where = change.field === CATALOG_FIELD ? "catalog" : `${relative(root, path)} ${change.field}`;
292
+ ctx.log.info(` ${pc.bold(name)} ${change.from} \u2192 ${pc.green(change.to)} ${pc.dim(where)}`);
293
+ }
294
+ }
295
+ if (ctx.flags.dryRun) {
296
+ if (ctx.flags.json)
297
+ emitJson({ dryRun: true, edits: shown });
298
+ return;
299
+ }
300
+ const touched = new Set(edits.map((e) => e.path));
301
+ for (const { path, manifest: manifest2 } of files)
302
+ if (touched.has(path))
303
+ writeManifest(path, manifest2);
304
+ const code = await (ctx.flags.json ? runToStderr : run)(["bun", "install"], { cwd: root });
305
+ const manifest = readManifest(rootManifest);
306
+ const restored = restoreCatalogRefs(manifest, pinned);
307
+ if (restored.length) {
308
+ writeManifest(rootManifest, manifest);
309
+ ctx.log.dim(`re-pinned to the catalog: ${restored.join(", ")}`);
310
+ }
311
+ if (ctx.flags.json)
312
+ emitJson({ dryRun: false, ok: code === 0, edits: shown, restored });
313
+ if (code !== 0)
314
+ process.exitCode = code;
315
+ }
316
+ export {
317
+ writeManifest,
318
+ workspaceGlobs,
319
+ setDeclaredRange,
320
+ setCatalogRange,
321
+ restoreCatalogRefs,
322
+ readManifest,
323
+ planEdits,
324
+ outdatedRows,
325
+ nextRange,
326
+ manifestPaths,
327
+ inRangeOutdated,
328
+ deps_default as default,
329
+ catalogRefs,
330
+ catalogOf,
331
+ DEPENDENCY_FIELDS,
332
+ CATALOG_REF,
333
+ CATALOG_FIELD
334
+ };