@jordond/kit 0.0.0-stage → 0.2.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.
- package/README.md +139 -2
- package/bin/kit +39 -0
- package/dist/_verb-28xmg3d3.js +116 -0
- package/dist/android-fs3sesnn.js +60 -0
- package/dist/build-ak20h5cd.js +42 -0
- package/dist/builtins-bj2yypm6.js +10 -0
- package/dist/bump-hsfmz2rn.js +124 -0
- package/dist/certs-w5v0877b.js +76 -0
- package/dist/check-771pracn.js +33 -0
- package/dist/check-jf1apke7.js +54 -0
- package/dist/cleanup-hrcvxmh2.js +18 -0
- package/dist/cli/builtins.d.ts +13 -0
- package/dist/cli/command.d.ts +106 -0
- package/dist/cli/discover.d.ts +10 -0
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/plugin.d.ts +7 -0
- package/dist/cli/usage.d.ts +3 -0
- package/dist/cli-19me2qqg.js +1056 -0
- package/dist/cli-1htjx51v.js +80 -0
- package/dist/cli-51ha0t4k.js +70 -0
- package/dist/cli-540nme4e.js +46 -0
- package/dist/cli-5d61x8vg.js +675 -0
- package/dist/cli-5wasc5mr.js +76 -0
- package/dist/cli-699g070n.js +104 -0
- package/dist/cli-7wvrehng.js +23 -0
- package/dist/cli-cc13vv98.js +2023 -0
- package/dist/cli-dht27t4r.js +41 -0
- package/dist/cli-fqfan92n.js +135 -0
- package/dist/cli-fqxtcj42.js +75 -0
- package/dist/cli-g519ev8e.js +89 -0
- package/dist/cli-gqy1xp9t.js +97 -0
- package/dist/cli-qhs8ww91.js +51 -0
- package/dist/cli-qq1ktr8q.js +234 -0
- package/dist/cli-r6g14qrk.js +195 -0
- package/dist/cli-re3ntm60.js +48 -0
- package/dist/cli-sx073w8p.js +191 -0
- package/dist/cli-vt6582gp.js +122 -0
- package/dist/cli-xax5grx1.js +108 -0
- package/dist/cli-xjpjdc2c.js +70 -0
- package/dist/cli-y3mjprpv.js +31 -0
- package/dist/cli-zf47bkgh.js +227 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +35 -0
- package/dist/cloudflare-xf7e2dn3.js +43 -0
- package/dist/command-j1etpmj6.js +21 -0
- package/dist/commands/_verb.d.ts +15 -0
- package/dist/commands/build.d.ts +11 -0
- package/dist/commands/check.d.ts +8 -0
- package/dist/commands/completion.d.ts +15 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/db/create.d.ts +7 -0
- package/dist/commands/db/exec.d.ts +16 -0
- package/dist/commands/db/list.d.ts +11 -0
- package/dist/commands/db/migrate.d.ts +11 -0
- package/dist/commands/deploy.d.ts +18 -0
- package/dist/commands/deps.d.ts +72 -0
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/doctor.d.ts +63 -0
- package/dist/commands/env/check.d.ts +7 -0
- package/dist/commands/env/init.d.ts +2 -0
- package/dist/commands/env/push.d.ts +16 -0
- package/dist/commands/env/sync.d.ts +2 -0
- package/dist/commands/fastlane.d.ts +2 -0
- package/dist/commands/format.d.ts +11 -0
- package/dist/commands/gradle.d.ts +2 -0
- package/dist/commands/init.d.ts +70 -0
- package/dist/commands/lint.d.ts +12 -0
- package/dist/commands/release/android.d.ts +30 -0
- package/dist/commands/release/certs.d.ts +7 -0
- package/dist/commands/release/ios.d.ts +22 -0
- package/dist/commands/release/service.d.ts +6 -0
- package/dist/commands/test.d.ts +2 -0
- package/dist/commands/typecheck.d.ts +2 -0
- package/dist/commands/version/bump.d.ts +17 -0
- package/dist/commands/version/show.d.ts +2 -0
- package/dist/commands/wrangler.d.ts +2 -0
- package/dist/commands/xcode.d.ts +10 -0
- package/dist/completion-m051yvzk.js +38 -0
- package/dist/concurrent-zdz69ye5.js +96 -0
- package/dist/config/load.d.ts +6 -0
- package/dist/config/schema.d.ts +139 -0
- package/dist/config-c8yh5m9j.js +22 -0
- package/dist/create-j7ve677k.js +38 -0
- package/dist/creds-rhxhmpe6.js +22 -0
- package/dist/deploy-af2v2jhj.js +152 -0
- package/dist/deps-1apnsrre.js +334 -0
- package/dist/dev-6dv5xbv2.js +114 -0
- package/dist/doctor-cr3hcfvt.js +377 -0
- package/dist/errors-1fjbr7ee.js +10 -0
- package/dist/exec-wa94sqwn.js +53 -0
- package/dist/fastlane-2kjyfqjg.js +26 -0
- package/dist/fastlane-qsjmbxtj.js +38 -0
- package/dist/format-rehf6c8g.js +39 -0
- package/dist/git-3gyyfk0x.js +24 -0
- package/dist/gradle-wv77a2f1.js +39 -0
- package/dist/index-cx34x4np.js +874 -0
- package/dist/index-erv82p4z.js +1528 -0
- package/dist/index-jqfz6hfy.js +2659 -0
- package/dist/index-mm4ht8yh.js +9 -0
- package/dist/index-s3ehw02w.js +1610 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +55 -0
- package/dist/init-gtkmx54a.js +76 -0
- package/dist/init-kck1p6gj.js +250 -0
- package/dist/init-n38980zv.js +78 -0
- package/dist/ios-f6pwcqqt.js +50 -0
- package/dist/lib/cleanup.d.ts +21 -0
- package/dist/lib/cloudflare.d.ts +97 -0
- package/dist/lib/concurrent.d.ts +21 -0
- package/dist/lib/env/init.d.ts +22 -0
- package/dist/lib/env/load.d.ts +12 -0
- package/dist/lib/env/push.d.ts +54 -0
- package/dist/lib/env/render.d.ts +52 -0
- package/dist/lib/env/schema.d.ts +49 -0
- package/dist/lib/errors.d.ts +14 -0
- package/dist/lib/fastlane.d.ts +36 -0
- package/dist/lib/git.d.ts +36 -0
- package/dist/lib/log.d.ts +17 -0
- package/dist/lib/pm.d.ts +8 -0
- package/dist/lib/proc.d.ts +73 -0
- package/dist/lib/prompt.d.ts +32 -0
- package/dist/lib/release/creds.d.ts +26 -0
- package/dist/lib/release/mobile.d.ts +41 -0
- package/dist/lib/release/notes.d.ts +15 -0
- package/dist/lib/release/preflight.d.ts +30 -0
- package/dist/lib/release/version.d.ts +25 -0
- package/dist/lib/secrets.d.ts +32 -0
- package/dist/lib/steps.d.ts +38 -0
- package/dist/lib/targets.d.ts +46 -0
- package/dist/lib/toml.d.ts +15 -0
- package/dist/lint-e0j22mab.js +39 -0
- package/dist/list-fzwqsfsk.js +34 -0
- package/dist/load-dxhacsn4.js +137 -0
- package/dist/log-g1ebh60s.js +15 -0
- package/dist/main-jrcgdccz.js +1965 -0
- package/dist/migrate-4ncx9tqj.js +38 -0
- package/dist/mobile-9n86ytzx.js +384 -0
- package/dist/notes-1zsa7qac.js +21 -0
- package/dist/picocolors-0dxagz5d.js +6 -0
- package/dist/pm-5q5vz6w3.js +14 -0
- package/dist/proc-jv4bcyyx.js +33 -0
- package/dist/prompt-3wwegvqc.js +15 -0
- package/dist/push-acejr9gj.js +124 -0
- package/dist/push-fq5syn8c.js +117 -0
- package/dist/render-vn40fp54.js +22 -0
- package/dist/service-xekpd27p.js +102 -0
- package/dist/show-jw5bx55h.js +50 -0
- package/dist/steps-9knqpszw.js +16 -0
- package/dist/sync-9z8n875s.js +53 -0
- package/dist/targets-bywmzbtj.js +22 -0
- package/dist/test-8jws3x98.js +26 -0
- package/dist/toml-3fxsdkhr.js +14 -0
- package/dist/typecheck-1hn3hgz9.js +24 -0
- package/dist/version-4tz72w42.js +26 -0
- package/dist/wrangler-412fadcz.js +46 -0
- package/dist/xcode-qzyee632.js +75 -0
- package/fastlane/Fastfile +413 -0
- package/fastlane/Gemfile +21 -0
- package/fastlane/Gemfile.lock +275 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.2.0/io.github.jordond.kit.android.application.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.2.0/io.github.jordond.kit.android.application.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.2.0/io.github.jordond.kit.android.application.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.2.0/io.github.jordond.kit.android.application.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.2.0/io.github.jordond.kit.android.application.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.2.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.2.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.2.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.2.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.2.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.2.0/io.github.jordond.kit.compose.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.2.0/io.github.jordond.kit.compose.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.2.0/io.github.jordond.kit.compose.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.2.0/io.github.jordond.kit.compose.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.2.0/io.github.jordond.kit.compose.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.2.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.2.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.2.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.2.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.2.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.jar +0 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.jar.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.jar.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.jar.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.jar.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.module +64 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.module.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.module.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.module.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.module.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.pom +12 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.2.0/kit-plugins-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.jar +0 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.jar.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.jar.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.jar.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.jar.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.module +64 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.module.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.module.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.module.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.module.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.pom +12 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.2.0/kit-settings-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.2.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.2.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.2.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.2.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.2.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.2.0/io.github.jordond.kit.lint.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.2.0/io.github.jordond.kit.lint.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.2.0/io.github.jordond.kit.lint.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.2.0/io.github.jordond.kit.lint.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.2.0/io.github.jordond.kit.lint.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.2.0/io.github.jordond.kit.release.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.2.0/io.github.jordond.kit.release.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.2.0/io.github.jordond.kit.release.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.2.0/io.github.jordond.kit.release.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.2.0/io.github.jordond.kit.release.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.2.0/io.github.jordond.kit.settings.gradle.plugin-0.2.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.2.0/io.github.jordond.kit.settings.gradle.plugin-0.2.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.2.0/io.github.jordond.kit.settings.gradle.plugin-0.2.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.2.0/io.github.jordond.kit.settings.gradle.plugin-0.2.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.2.0/io.github.jordond.kit.settings.gradle.plugin-0.2.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml +13 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha512 +1 -0
- package/package.json +58 -4
- package/templates/lefthook.yml +6 -0
- package/templates/mise.toml +6 -0
- package/templates/new/.env.example +20 -0
- package/templates/new/.github/workflows/ci.yml +45 -0
- package/templates/new/apps/client/fastlane/Fastfile +1 -0
- package/templates/new/apps/client/gradle/libs.versions.toml +25 -0
- package/templates/new/apps/client/settings.gradle.kts +25 -0
- package/templates/new/kit.config.ts +15 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
redact
|
|
4
|
+
} from "./cli-51ha0t4k.js";
|
|
5
|
+
import {
|
|
6
|
+
ExitCode,
|
|
7
|
+
KitError
|
|
8
|
+
} from "./cli-7wvrehng.js";
|
|
9
|
+
import {
|
|
10
|
+
runLines,
|
|
11
|
+
runPiped
|
|
12
|
+
} from "./cli-fqfan92n.js";
|
|
13
|
+
import {
|
|
14
|
+
onCleanup
|
|
15
|
+
} from "./cli-fqxtcj42.js";
|
|
16
|
+
|
|
17
|
+
// src/lib/fastlane.ts
|
|
18
|
+
import { existsSync, mkdtempSync, rmSync } from "fs";
|
|
19
|
+
import { homedir, tmpdir } from "os";
|
|
20
|
+
import { dirname, join } from "path";
|
|
21
|
+
function kitDir() {
|
|
22
|
+
let dir = import.meta.dir;
|
|
23
|
+
while (true) {
|
|
24
|
+
if (existsSync(join(dir, "fastlane", "Fastfile")) && existsSync(join(dir, "package.json")))
|
|
25
|
+
return dir;
|
|
26
|
+
const parent = dirname(dir);
|
|
27
|
+
if (parent === dir)
|
|
28
|
+
throw new Error("kit: cannot find its own fastlane/ directory");
|
|
29
|
+
dir = parent;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function appFastlaneDir(root, config) {
|
|
33
|
+
const candidates = config.release?.fastlaneDir ? [config.release.fastlaneDir] : [...config.gradle ? [config.gradle.root] : [], "."];
|
|
34
|
+
for (const c of candidates) {
|
|
35
|
+
const dir = join(root, c);
|
|
36
|
+
if (existsSync(join(dir, "fastlane", "Fastfile")))
|
|
37
|
+
return dir;
|
|
38
|
+
}
|
|
39
|
+
const where = config.release?.fastlaneDir ?? config.gradle?.root ?? ".";
|
|
40
|
+
throw new KitError(`No fastlane/Fastfile in ${where}`, `Create ${join(where, "fastlane/Fastfile")} with: import(ENV.fetch("KIT_FASTFILE") { UI.user_error!("Run fastlane via \`kit fastlane ...\` or \`kit release ...\`") })`, ExitCode.config);
|
|
41
|
+
}
|
|
42
|
+
function bundlePath() {
|
|
43
|
+
if (process.env.KIT_BUNDLE_PATH)
|
|
44
|
+
return process.env.KIT_BUNDLE_PATH;
|
|
45
|
+
if (process.env.CI && process.env.RUNNER_TEMP)
|
|
46
|
+
return join(process.env.RUNNER_TEMP, "kit-bundle");
|
|
47
|
+
const cache = process.env.XDG_CACHE_HOME || join(homedir(), ".cache");
|
|
48
|
+
return join(cache, "kit", "bundle");
|
|
49
|
+
}
|
|
50
|
+
var reportDir;
|
|
51
|
+
function runReportDir() {
|
|
52
|
+
if (reportDir)
|
|
53
|
+
return reportDir;
|
|
54
|
+
const dir = mkdtempSync(join(tmpdir(), "kit-fastlane-"));
|
|
55
|
+
reportDir = dir;
|
|
56
|
+
onCleanup(() => rmSync(dir, { recursive: true, force: true }));
|
|
57
|
+
return dir;
|
|
58
|
+
}
|
|
59
|
+
function bundleEnv() {
|
|
60
|
+
return {
|
|
61
|
+
BUNDLE_GEMFILE: join(kitDir(), "fastlane", "Gemfile"),
|
|
62
|
+
BUNDLE_FROZEN: "true",
|
|
63
|
+
BUNDLE_PATH: bundlePath(),
|
|
64
|
+
BUNDLE_APP_CONFIG: join(dirname(bundlePath()), "bundle-config")
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function fastlaneEnv(appRoot) {
|
|
68
|
+
const kit = kitDir();
|
|
69
|
+
return {
|
|
70
|
+
...bundleEnv(),
|
|
71
|
+
KIT_FASTFILE: join(kit, "fastlane", "Fastfile"),
|
|
72
|
+
KIT_APP_ROOT: appRoot,
|
|
73
|
+
FASTLANE_SKIP_DOCS: "1",
|
|
74
|
+
FL_REPORT_PATH: runReportDir(),
|
|
75
|
+
FASTLANE_SKIP_UPDATE_CHECK: "1",
|
|
76
|
+
FASTLANE_OPT_OUT_USAGE: "1",
|
|
77
|
+
FASTLANE_HIDE_CHANGELOG: "1"
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
var bundleReady = false;
|
|
81
|
+
async function ensureBundle(appRoot, onLine) {
|
|
82
|
+
if (bundleReady)
|
|
83
|
+
return;
|
|
84
|
+
const env = fastlaneEnv(appRoot);
|
|
85
|
+
if ((await runPiped(["bundle", "check"], { cwd: appRoot, env })).code === 0) {
|
|
86
|
+
bundleReady = true;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const { code, output } = await runLines(["bundle", "install"], { cwd: appRoot, env, onLine });
|
|
90
|
+
if (code !== 0) {
|
|
91
|
+
throw new KitError(`bundle install failed (exit ${code})`, `Check Ruby and Bundler (kit's Gemfile.lock pins Bundler); output:
|
|
92
|
+
${output.split(`
|
|
93
|
+
`).slice(-15).join(`
|
|
94
|
+
`)}`);
|
|
95
|
+
}
|
|
96
|
+
bundleReady = true;
|
|
97
|
+
}
|
|
98
|
+
function resetBundle() {
|
|
99
|
+
bundleReady = false;
|
|
100
|
+
}
|
|
101
|
+
var OUTPUT_LINE = /^(?:\[[^\]]*\]: )?KIT_([A-Z0-9_]+)=(.*)$/;
|
|
102
|
+
function parseOutputs(output) {
|
|
103
|
+
const out = {};
|
|
104
|
+
for (const line of output.split(/\r?\n/)) {
|
|
105
|
+
const m = Bun.stripANSI(line).trim().match(OUTPUT_LINE);
|
|
106
|
+
if (m)
|
|
107
|
+
out[m[1]] = m[2].trim();
|
|
108
|
+
}
|
|
109
|
+
return out;
|
|
110
|
+
}
|
|
111
|
+
async function runLane(appRoot, platform, lane, opts = {}) {
|
|
112
|
+
await ensureBundle(appRoot, opts.onLine);
|
|
113
|
+
const { code, output } = await runLines(["bundle", "exec", "fastlane", platform, lane], {
|
|
114
|
+
cwd: appRoot,
|
|
115
|
+
env: { ...fastlaneEnv(appRoot), ...opts.env },
|
|
116
|
+
onLine: opts.onLine ? (l) => opts.onLine(redact(l)) : undefined
|
|
117
|
+
});
|
|
118
|
+
const clean = redact(output);
|
|
119
|
+
return { code, output: clean, outputs: parseOutputs(clean) };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { kitDir, appFastlaneDir, bundleEnv, fastlaneEnv, ensureBundle, resetBundle, parseOutputs, runLane };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
decodeSecretFile,
|
|
4
|
+
registerSecret
|
|
5
|
+
} from "./cli-51ha0t4k.js";
|
|
6
|
+
import {
|
|
7
|
+
ExitCode,
|
|
8
|
+
KitError
|
|
9
|
+
} from "./cli-7wvrehng.js";
|
|
10
|
+
|
|
11
|
+
// src/lib/release/creds.ts
|
|
12
|
+
import { readFileSync } from "fs";
|
|
13
|
+
var LEGACY = {
|
|
14
|
+
APPLE_ASC_KEY_ID: "ASC_KEY_ID",
|
|
15
|
+
APPLE_ASC_ISSUER_ID: "ASC_ISSUER_ID",
|
|
16
|
+
APPLE_ASC_KEY_P8_BASE64: "ASC_KEY_P8_BASE64",
|
|
17
|
+
APPLE_MATCH_PASSWORD: "MATCH_PASSWORD",
|
|
18
|
+
APPLE_MATCH_GIT_URL: "MATCH_GIT_URL",
|
|
19
|
+
APPLE_MATCH_GIT_BASIC_AUTHORIZATION: "MATCH_GIT_BASIC_AUTHORIZATION",
|
|
20
|
+
KEY_ALIAS: "ANDROID_KEYSTORE_ALIAS",
|
|
21
|
+
KEY_PASSWORD: "ANDROID_KEYSTORE_PASSWORD"
|
|
22
|
+
};
|
|
23
|
+
function need(names) {
|
|
24
|
+
const missing = names.filter((n) => !process.env[n]?.trim());
|
|
25
|
+
if (missing.length) {
|
|
26
|
+
const renames = Object.entries(LEGACY).filter(([old, canon]) => missing.includes(canon) && process.env[old]).map(([old, canon]) => `${old} \u2192 ${canon}`);
|
|
27
|
+
throw new KitError(`Missing release secrets: ${missing.join(", ")}`, renames.length ? `Rename in .env (PLAN \xA79.5): ${renames.join(", ")}; then \`kit env push --github\`` : "Add them to .env (or the CI job env)", ExitCode.config);
|
|
28
|
+
}
|
|
29
|
+
const out = {};
|
|
30
|
+
for (const n of names) {
|
|
31
|
+
out[n] = process.env[n].trim();
|
|
32
|
+
registerSecret(out[n]);
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
var onGitHubActions = () => process.env.GITHUB_ACTIONS === "true";
|
|
37
|
+
function registerAmbientSecrets() {
|
|
38
|
+
for (const n of [
|
|
39
|
+
"SENTRY_AUTH_TOKEN",
|
|
40
|
+
"MATCH_GIT_URL",
|
|
41
|
+
"MATCH_PASSWORD",
|
|
42
|
+
"MATCH_GIT_BASIC_AUTHORIZATION",
|
|
43
|
+
"ASC_KEY_ID",
|
|
44
|
+
"ASC_ISSUER_ID",
|
|
45
|
+
"ANDROID_KEYSTORE_PASSWORD"
|
|
46
|
+
]) {
|
|
47
|
+
registerSecret(process.env[n]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function appleCreds(opts) {
|
|
51
|
+
registerAmbientSecrets();
|
|
52
|
+
const names = ["ASC_KEY_ID", "ASC_ISSUER_ID", "ASC_KEY_P8_BASE64"];
|
|
53
|
+
if (opts.match)
|
|
54
|
+
names.push("MATCH_PASSWORD", "MATCH_GIT_URL");
|
|
55
|
+
if (opts.match && opts.ci)
|
|
56
|
+
names.push("MATCH_GIT_BASIC_AUTHORIZATION");
|
|
57
|
+
const v = need(names);
|
|
58
|
+
const ascKeyPath = decodeSecretFile("asc-key.p8", v.ASC_KEY_P8_BASE64);
|
|
59
|
+
if (!readFileSync(ascKeyPath, "utf8").includes("-----BEGIN PRIVATE KEY-----")) {
|
|
60
|
+
throw new KitError("ASC_KEY_P8_BASE64 does not decode to a .p8 private key", undefined, ExitCode.config);
|
|
61
|
+
}
|
|
62
|
+
const env = {
|
|
63
|
+
ASC_KEY_ID: v.ASC_KEY_ID,
|
|
64
|
+
ASC_ISSUER_ID: v.ASC_ISSUER_ID,
|
|
65
|
+
KIT_ASC_KEY_PATH: ascKeyPath
|
|
66
|
+
};
|
|
67
|
+
if (opts.match) {
|
|
68
|
+
env.MATCH_PASSWORD = v.MATCH_PASSWORD;
|
|
69
|
+
env.MATCH_GIT_URL = v.MATCH_GIT_URL;
|
|
70
|
+
const basic = process.env.MATCH_GIT_BASIC_AUTHORIZATION?.trim();
|
|
71
|
+
if (basic) {
|
|
72
|
+
registerSecret(basic);
|
|
73
|
+
env.MATCH_GIT_BASIC_AUTHORIZATION = basic;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return { env, ascKeyPath };
|
|
77
|
+
}
|
|
78
|
+
function playCreds() {
|
|
79
|
+
registerAmbientSecrets();
|
|
80
|
+
const v = need(["PLAY_SERVICE_ACCOUNT_BASE64"]);
|
|
81
|
+
const path = decodeSecretFile("play.json", v.PLAY_SERVICE_ACCOUNT_BASE64);
|
|
82
|
+
if (!/"type"\s*:\s*"service_account"/.test(readFileSync(path, "utf8"))) {
|
|
83
|
+
throw new KitError("PLAY_SERVICE_ACCOUNT_BASE64 does not decode to a Google service-account JSON", undefined, ExitCode.config);
|
|
84
|
+
}
|
|
85
|
+
return { KIT_PLAY_JSON_KEY: path };
|
|
86
|
+
}
|
|
87
|
+
function keystoreCreds() {
|
|
88
|
+
const v = need(["ANDROID_KEYSTORE_BASE64", "ANDROID_KEYSTORE_PASSWORD"]);
|
|
89
|
+
if (!process.env.ANDROID_KEYSTORE_ALIAS?.trim()) {
|
|
90
|
+
throw new KitError("Missing release secrets: ANDROID_KEYSTORE_ALIAS", "Add it to .env (or the CI job env)", ExitCode.config);
|
|
91
|
+
}
|
|
92
|
+
return { KIT_ANDROID_KEYSTORE_FILE: decodeSecretFile("release.keystore", v.ANDROID_KEYSTORE_BASE64) };
|
|
93
|
+
}
|
|
94
|
+
function optionalLaneCreds() {
|
|
95
|
+
const env = {};
|
|
96
|
+
registerAmbientSecrets();
|
|
97
|
+
if (process.env.ASC_KEY_P8_BASE64?.trim()) {
|
|
98
|
+
registerSecret(process.env.ASC_KEY_P8_BASE64);
|
|
99
|
+
env.KIT_ASC_KEY_PATH = decodeSecretFile("asc-key.p8", process.env.ASC_KEY_P8_BASE64);
|
|
100
|
+
}
|
|
101
|
+
if (process.env.PLAY_SERVICE_ACCOUNT_BASE64?.trim()) {
|
|
102
|
+
registerSecret(process.env.PLAY_SERVICE_ACCOUNT_BASE64);
|
|
103
|
+
env.KIT_PLAY_JSON_KEY = decodeSecretFile("play.json", process.env.PLAY_SERVICE_ACCOUNT_BASE64);
|
|
104
|
+
}
|
|
105
|
+
return env;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { onGitHubActions, registerAmbientSecrets, appleCreds, playCreds, keystoreCreds, optionalLaneCreds };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ProcError,
|
|
4
|
+
runCapture,
|
|
5
|
+
runPiped
|
|
6
|
+
} from "./cli-fqfan92n.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/git.ts
|
|
9
|
+
async function stagedFiles(cwd = ".") {
|
|
10
|
+
const { code, stdout } = await runCapture(["git", "diff", "--cached", "--name-only", "-z", "--diff-filter=ACMR"], { cwd });
|
|
11
|
+
if (code !== 0)
|
|
12
|
+
throw new Error("git diff --cached failed");
|
|
13
|
+
return stdout.split("\x00").filter(Boolean);
|
|
14
|
+
}
|
|
15
|
+
async function read(args, cwd) {
|
|
16
|
+
const cmd = ["git", ...args];
|
|
17
|
+
const { code, stdout, stderr } = await runPiped(cmd, { cwd });
|
|
18
|
+
if (code !== 0)
|
|
19
|
+
throw new ProcError(cmd, code, `${stdout}${stderr}`);
|
|
20
|
+
return stdout;
|
|
21
|
+
}
|
|
22
|
+
async function dirtyFiles(cwd = ".") {
|
|
23
|
+
const { code, stdout } = await runCapture(["git", "status", "--porcelain"], { cwd });
|
|
24
|
+
if (code !== 0)
|
|
25
|
+
throw new Error("git status failed");
|
|
26
|
+
return stdout.split(`
|
|
27
|
+
`).filter(Boolean);
|
|
28
|
+
}
|
|
29
|
+
async function isClean(cwd = ".") {
|
|
30
|
+
return (await dirtyFiles(cwd)).length === 0;
|
|
31
|
+
}
|
|
32
|
+
async function currentBranch(cwd = ".") {
|
|
33
|
+
return (await read(["rev-parse", "--abbrev-ref", "HEAD"], cwd)).trim();
|
|
34
|
+
}
|
|
35
|
+
async function describe(match, opts = {}) {
|
|
36
|
+
const cmd = ["git", "describe", "--tags", "--match", match];
|
|
37
|
+
if (opts.exact !== false)
|
|
38
|
+
cmd.push("--abbrev=0");
|
|
39
|
+
if (opts.ref)
|
|
40
|
+
cmd.push(opts.ref);
|
|
41
|
+
const { code, stdout, stderr } = await runPiped(cmd, { cwd: opts.cwd ?? "." });
|
|
42
|
+
if (code === 0)
|
|
43
|
+
return stdout.trim();
|
|
44
|
+
if (/No names found|No tags can describe|cannot describe/i.test(stderr))
|
|
45
|
+
return;
|
|
46
|
+
throw new ProcError(cmd, code, `${stdout}${stderr}`);
|
|
47
|
+
}
|
|
48
|
+
async function logSince(since, opts = {}) {
|
|
49
|
+
const range = since ? `${since}..HEAD` : "HEAD";
|
|
50
|
+
const args = ["log", "--format=%H%x09%s", range];
|
|
51
|
+
if (opts.paths?.length)
|
|
52
|
+
args.push("--", ...opts.paths);
|
|
53
|
+
const out = await read(args, opts.cwd ?? ".");
|
|
54
|
+
return out.split(`
|
|
55
|
+
`).filter(Boolean).map((line) => {
|
|
56
|
+
const tab = line.indexOf("\t");
|
|
57
|
+
return { sha: line.slice(0, tab), subject: line.slice(tab + 1) };
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async function tag(name, opts = {}) {
|
|
61
|
+
const args = opts.message ? ["tag", "-a", name, "-m", opts.message] : ["tag", name];
|
|
62
|
+
if (opts.ref)
|
|
63
|
+
args.push(opts.ref);
|
|
64
|
+
await read(args, opts.cwd ?? ".");
|
|
65
|
+
}
|
|
66
|
+
async function push(refs, opts = {}) {
|
|
67
|
+
await read(["push", opts.remote ?? "origin", ...refs], opts.cwd ?? ".");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { stagedFiles, dirtyFiles, isClean, currentBranch, describe, logSince, tag, push };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ExitCode,
|
|
4
|
+
KitError
|
|
5
|
+
} from "./cli-7wvrehng.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/release/preflight.ts
|
|
8
|
+
import { join } from "path";
|
|
9
|
+
import { pathToFileURL } from "url";
|
|
10
|
+
function definePreflight(p) {
|
|
11
|
+
return p;
|
|
12
|
+
}
|
|
13
|
+
async function loadPreflights(root, config) {
|
|
14
|
+
const out = [];
|
|
15
|
+
for (const path of config.release?.preflight ?? []) {
|
|
16
|
+
let mod;
|
|
17
|
+
try {
|
|
18
|
+
mod = await import(pathToFileURL(join(root, path)).href);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw new KitError(`Cannot load preflight ${path}: ${e instanceof Error ? e.message : String(e)}`, "Check release.preflight in kit.config.ts", ExitCode.config);
|
|
21
|
+
}
|
|
22
|
+
const p = mod.default;
|
|
23
|
+
if (!p || typeof p.check !== "function" || !p.title) {
|
|
24
|
+
throw new KitError(`${path} does not default-export definePreflight({ title, check })`, undefined, ExitCode.config);
|
|
25
|
+
}
|
|
26
|
+
out.push(p);
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { definePreflight, loadPreflights };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
pipeSecret
|
|
4
|
+
} from "./cli-51ha0t4k.js";
|
|
5
|
+
import {
|
|
6
|
+
detectPackageManager,
|
|
7
|
+
pmExec
|
|
8
|
+
} from "./cli-qhs8ww91.js";
|
|
9
|
+
import {
|
|
10
|
+
ExitCode,
|
|
11
|
+
KitError
|
|
12
|
+
} from "./cli-7wvrehng.js";
|
|
13
|
+
import {
|
|
14
|
+
addChildEnv
|
|
15
|
+
} from "./cli-fqfan92n.js";
|
|
16
|
+
import {
|
|
17
|
+
__require
|
|
18
|
+
} from "./cli-re3ntm60.js";
|
|
19
|
+
|
|
20
|
+
// src/lib/cloudflare.ts
|
|
21
|
+
import { existsSync, readFileSync } from "fs";
|
|
22
|
+
import { join, relative, resolve } from "path";
|
|
23
|
+
var WRANGLER_FILES = ["wrangler.jsonc", "wrangler.json", "wrangler.toml"];
|
|
24
|
+
var ACCOUNT_ID = /^[0-9a-f]{32}$/;
|
|
25
|
+
var TOML_ACCOUNT_ID = /^\s*account_id\s*=\s*["']([0-9a-f]{32})["']/m;
|
|
26
|
+
function stripJsonc(text) {
|
|
27
|
+
let out = "";
|
|
28
|
+
let i = 0;
|
|
29
|
+
while (i < text.length) {
|
|
30
|
+
const c = text[i];
|
|
31
|
+
if (c === '"') {
|
|
32
|
+
let j = i + 1;
|
|
33
|
+
while (j < text.length && text[j] !== '"')
|
|
34
|
+
j += text[j] === "\\" ? 2 : 1;
|
|
35
|
+
out += text.slice(i, j + 1);
|
|
36
|
+
i = j + 1;
|
|
37
|
+
} else if (c === "/" && text[i + 1] === "/") {
|
|
38
|
+
while (i < text.length && text[i] !== `
|
|
39
|
+
`)
|
|
40
|
+
i++;
|
|
41
|
+
} else if (c === "/" && text[i + 1] === "*") {
|
|
42
|
+
const end = text.indexOf("*/", i + 2);
|
|
43
|
+
i = end === -1 ? text.length : end + 2;
|
|
44
|
+
} else {
|
|
45
|
+
out += c;
|
|
46
|
+
i++;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return out.replace(/("(?:[^"\\]|\\.)*")|,(\s*[}\]])/g, (_m, str, close) => str ?? close);
|
|
50
|
+
}
|
|
51
|
+
function jsonAccountId(text) {
|
|
52
|
+
try {
|
|
53
|
+
const parsed = JSON.parse(stripJsonc(text));
|
|
54
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
55
|
+
return;
|
|
56
|
+
const id = parsed.account_id;
|
|
57
|
+
return typeof id === "string" && ACCOUNT_ID.test(id) ? id : undefined;
|
|
58
|
+
} catch {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function tomlAccountId(text) {
|
|
63
|
+
const header = /^\s*\[/m.exec(text);
|
|
64
|
+
const top = header ? text.slice(0, header.index) : text;
|
|
65
|
+
return TOML_ACCOUNT_ID.exec(top)?.[1];
|
|
66
|
+
}
|
|
67
|
+
function readAccountId(dir) {
|
|
68
|
+
for (const name of WRANGLER_FILES) {
|
|
69
|
+
const file = join(dir, name);
|
|
70
|
+
if (!existsSync(file))
|
|
71
|
+
continue;
|
|
72
|
+
const text = readFileSync(file, "utf8");
|
|
73
|
+
return { id: name.endsWith(".toml") ? tomlAccountId(text) : jsonAccountId(text), file };
|
|
74
|
+
}
|
|
75
|
+
return {};
|
|
76
|
+
}
|
|
77
|
+
function accountTarget(config) {
|
|
78
|
+
const d1 = Object.values(config.cloudflare?.d1 ?? {})[0];
|
|
79
|
+
if (d1)
|
|
80
|
+
return d1.target;
|
|
81
|
+
return Object.entries(config.targets).find(([, t]) => t.kind === "worker")?.[0];
|
|
82
|
+
}
|
|
83
|
+
function resolveAccountId(root, config) {
|
|
84
|
+
const configured = config.cloudflare?.accountId;
|
|
85
|
+
if (!configured)
|
|
86
|
+
return;
|
|
87
|
+
if (configured !== "from-wrangler")
|
|
88
|
+
return configured;
|
|
89
|
+
const name = accountTarget(config);
|
|
90
|
+
const target = name ? config.targets[name] : undefined;
|
|
91
|
+
if (!name || !target) {
|
|
92
|
+
throw new KitError("cloudflare.accountId is 'from-wrangler' but there is no worker target to read it from", "Add a cloudflare.d1 entry or a worker target, or set the id literally", ExitCode.config);
|
|
93
|
+
}
|
|
94
|
+
const dir = resolve(root, target.dir);
|
|
95
|
+
const { id, file } = readAccountId(dir);
|
|
96
|
+
if (!id) {
|
|
97
|
+
const where = file ? relative(root, file) : `${target.dir}/wrangler.jsonc`;
|
|
98
|
+
throw new KitError(`No account_id in ${where}`, `Add "account_id" to ${where}, or set cloudflare.accountId in kit.config.ts`, ExitCode.config);
|
|
99
|
+
}
|
|
100
|
+
return id;
|
|
101
|
+
}
|
|
102
|
+
function pinCloudflareAccount(root, config) {
|
|
103
|
+
const id = resolveAccountId(root, config);
|
|
104
|
+
if (id)
|
|
105
|
+
addChildEnv({ CLOUDFLARE_ACCOUNT_ID: id });
|
|
106
|
+
return id;
|
|
107
|
+
}
|
|
108
|
+
function wrangler(root, config, target, ...args) {
|
|
109
|
+
const t = config.targets[target];
|
|
110
|
+
if (!t) {
|
|
111
|
+
throw new KitError(`Unknown target "${target}"`, `Targets: ${Object.keys(config.targets).join(", ")}`, ExitCode.config);
|
|
112
|
+
}
|
|
113
|
+
const cwd = resolve(root, t.dir);
|
|
114
|
+
return { cmd: pmExec(detectPackageManager(cwd, root), "wrangler", ...args), cwd };
|
|
115
|
+
}
|
|
116
|
+
function wranglerSecretPut(w, value) {
|
|
117
|
+
return pipeSecret(w.cmd, `${value}
|
|
118
|
+
`, { cwd: w.cwd });
|
|
119
|
+
}
|
|
120
|
+
function parseSecretNames(stdout) {
|
|
121
|
+
try {
|
|
122
|
+
const parsed = JSON.parse(stdout);
|
|
123
|
+
if (!Array.isArray(parsed))
|
|
124
|
+
return [];
|
|
125
|
+
const names = [];
|
|
126
|
+
for (const entry of parsed) {
|
|
127
|
+
if (typeof entry === "object" && entry !== null && "name" in entry) {
|
|
128
|
+
const { name } = entry;
|
|
129
|
+
if (typeof name === "string" && name.length > 0)
|
|
130
|
+
names.push(name);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return names;
|
|
134
|
+
} catch {
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function resolveD1(config, db) {
|
|
139
|
+
const all = Object.entries(config.cloudflare?.d1 ?? {}).map(([key, d]) => ({ key, ...d }));
|
|
140
|
+
if (!all.length) {
|
|
141
|
+
throw new KitError("No D1 databases configured", "Add cloudflare.d1 in kit.config.ts, e.g. { db: { name: 'my-db', target: 'api' } }", ExitCode.config);
|
|
142
|
+
}
|
|
143
|
+
const names = all.map((d) => d.key === d.name ? d.key : `${d.key} (${d.name})`).join(", ");
|
|
144
|
+
if (db === undefined || db === "") {
|
|
145
|
+
if (all.length === 1)
|
|
146
|
+
return all[0];
|
|
147
|
+
const fallback = all.find((d) => d.default);
|
|
148
|
+
if (fallback)
|
|
149
|
+
return fallback;
|
|
150
|
+
throw new KitError(`Several D1 databases; pick one with --db`, `Databases: ${names}`, ExitCode.usage);
|
|
151
|
+
}
|
|
152
|
+
const found = all.find((d) => d.key === db) ?? all.find((d) => d.name === db);
|
|
153
|
+
if (!found)
|
|
154
|
+
throw new KitError(`Unknown D1 database "${db}"`, `Databases: ${names}`, ExitCode.usage);
|
|
155
|
+
return found;
|
|
156
|
+
}
|
|
157
|
+
var locality = (remote) => remote ? "--remote" : "--local";
|
|
158
|
+
function d1Args(db, action) {
|
|
159
|
+
switch (action.kind) {
|
|
160
|
+
case "migrate":
|
|
161
|
+
return ["d1", "migrations", "apply", db.name, locality(action.remote)];
|
|
162
|
+
case "list":
|
|
163
|
+
return ["d1", "migrations", "list", db.name, locality(action.remote)];
|
|
164
|
+
case "create":
|
|
165
|
+
return ["d1", "migrations", "create", db.name, action.migration];
|
|
166
|
+
case "exec": {
|
|
167
|
+
const source = action.file ? ["--file", action.file] : ["--command", action.sql ?? ""];
|
|
168
|
+
return [
|
|
169
|
+
"d1",
|
|
170
|
+
"execute",
|
|
171
|
+
db.name,
|
|
172
|
+
locality(action.remote),
|
|
173
|
+
...source,
|
|
174
|
+
...action.json ? ["--json"] : []
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
var dbArgs = {
|
|
180
|
+
db: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "cloudflare.d1 key or database name (default: the only one, or the default: true one)"
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
var remoteArg = {
|
|
186
|
+
remote: { type: "boolean", description: "Deployed D1 (default: local)" }
|
|
187
|
+
};
|
|
188
|
+
async function runD1(ctx, action, opts) {
|
|
189
|
+
const { requireProject } = await import("./command-j1etpmj6.js");
|
|
190
|
+
const { confirm } = await import("./prompt-3wwegvqc.js");
|
|
191
|
+
const { emitJson } = await import("./log-g1ebh60s.js");
|
|
192
|
+
const { run, runQuiet } = await import("./proc-jv4bcyyx.js");
|
|
193
|
+
const { root, config } = requireProject(ctx);
|
|
194
|
+
const db = resolveD1(config, ctx.args.db);
|
|
195
|
+
const remote = "remote" in action && action.remote;
|
|
196
|
+
const passJson = action.kind === "exec" && ctx.flags.json;
|
|
197
|
+
const w = wrangler(root, config, db.target, ...d1Args(db, passJson ? { ...action, json: true } : action));
|
|
198
|
+
const shown = `${relative(root, w.cwd) || "."} $ ${w.cmd.join(" ")}`;
|
|
199
|
+
if (ctx.flags.dryRun && opts.mutates) {
|
|
200
|
+
if (ctx.flags.json)
|
|
201
|
+
emitJson({ dryRun: true, db: db.name, remote, cmd: w.cmd, cwd: relative(root, w.cwd) });
|
|
202
|
+
else
|
|
203
|
+
ctx.log.step(shown);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
pinCloudflareAccount(root, config);
|
|
207
|
+
if (opts.mutates && remote && !await confirm(ctx.flags, `Run against remote ${db.name}?`)) {
|
|
208
|
+
throw new KitError("Cancelled", undefined, ExitCode.interrupted);
|
|
209
|
+
}
|
|
210
|
+
if (!ctx.flags.json)
|
|
211
|
+
ctx.log.dim(shown);
|
|
212
|
+
if (ctx.flags.json && !passJson) {
|
|
213
|
+
const { code: code2, output } = await runQuiet(w.cmd, { cwd: w.cwd });
|
|
214
|
+
emitJson({ db: db.name, remote, ok: code2 === 0, output });
|
|
215
|
+
if (code2 !== 0)
|
|
216
|
+
process.exitCode = ExitCode.failed;
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const code = await run(w.cmd, { cwd: w.cwd });
|
|
220
|
+
if (code !== 0)
|
|
221
|
+
process.exitCode = ExitCode.failed;
|
|
222
|
+
}
|
|
223
|
+
function sqlString(value) {
|
|
224
|
+
return `'${value.replace(/'/g, "''")}'`;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export { WRANGLER_FILES, stripJsonc, readAccountId, accountTarget, resolveAccountId, pinCloudflareAccount, wrangler, wranglerSecretPut, parseSecretNames, resolveD1, locality, d1Args, dbArgs, remoteArg, runD1, sqlString };
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__require
|
|
4
|
+
} from "./cli-re3ntm60.js";
|
|
5
|
+
|
|
6
|
+
// src/cli.ts
|
|
7
|
+
var argv = process.argv;
|
|
8
|
+
var stop = argv.indexOf("--");
|
|
9
|
+
var take = (flag, withValue = false) => {
|
|
10
|
+
for (let i = 2;i < (stop < 0 ? argv.length : stop); i++) {
|
|
11
|
+
const a = argv[i];
|
|
12
|
+
if (a === flag) {
|
|
13
|
+
const value = withValue ? argv[i + 1] : undefined;
|
|
14
|
+
argv.splice(i, withValue ? 2 : 1);
|
|
15
|
+
return withValue ? value : true;
|
|
16
|
+
}
|
|
17
|
+
if (withValue && a.startsWith(`${flag}=`)) {
|
|
18
|
+
argv.splice(i, 1);
|
|
19
|
+
return a.slice(flag.length + 1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return;
|
|
23
|
+
};
|
|
24
|
+
var noColor = take("--no-color");
|
|
25
|
+
if (!process.env.FORCE_COLOR && (noColor || !process.stderr.isTTY || process.env.TERM === "dumb")) {
|
|
26
|
+
process.env.NO_COLOR = "1";
|
|
27
|
+
}
|
|
28
|
+
if (take("--no-input"))
|
|
29
|
+
process.env.KIT_NO_INPUT = "1";
|
|
30
|
+
var cwd = take("--cwd", true);
|
|
31
|
+
if (typeof cwd === "string") {
|
|
32
|
+
process.chdir(cwd);
|
|
33
|
+
delete process.env.KIT_ROOT;
|
|
34
|
+
}
|
|
35
|
+
await import("./main-jrcgdccz.js");
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
WRANGLER_FILES,
|
|
4
|
+
accountTarget,
|
|
5
|
+
d1Args,
|
|
6
|
+
dbArgs,
|
|
7
|
+
locality,
|
|
8
|
+
parseSecretNames,
|
|
9
|
+
pinCloudflareAccount,
|
|
10
|
+
readAccountId,
|
|
11
|
+
remoteArg,
|
|
12
|
+
resolveAccountId,
|
|
13
|
+
resolveD1,
|
|
14
|
+
runD1,
|
|
15
|
+
sqlString,
|
|
16
|
+
stripJsonc,
|
|
17
|
+
wrangler,
|
|
18
|
+
wranglerSecretPut
|
|
19
|
+
} from "./cli-zf47bkgh.js";
|
|
20
|
+
import"./cli-51ha0t4k.js";
|
|
21
|
+
import"./cli-qhs8ww91.js";
|
|
22
|
+
import"./cli-7wvrehng.js";
|
|
23
|
+
import"./cli-fqfan92n.js";
|
|
24
|
+
import"./cli-fqxtcj42.js";
|
|
25
|
+
import"./cli-re3ntm60.js";
|
|
26
|
+
export {
|
|
27
|
+
wranglerSecretPut,
|
|
28
|
+
wrangler,
|
|
29
|
+
stripJsonc,
|
|
30
|
+
sqlString,
|
|
31
|
+
runD1,
|
|
32
|
+
resolveD1,
|
|
33
|
+
resolveAccountId,
|
|
34
|
+
remoteArg,
|
|
35
|
+
readAccountId,
|
|
36
|
+
pinCloudflareAccount,
|
|
37
|
+
parseSecretNames,
|
|
38
|
+
locality,
|
|
39
|
+
dbArgs,
|
|
40
|
+
d1Args,
|
|
41
|
+
accountTarget,
|
|
42
|
+
WRANGLER_FILES
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
computeFlags,
|
|
4
|
+
defineCommand,
|
|
5
|
+
globalArgs,
|
|
6
|
+
requireProject,
|
|
7
|
+
toGunshi,
|
|
8
|
+
withBuiltin
|
|
9
|
+
} from "./cli-gqy1xp9t.js";
|
|
10
|
+
import"./cli-7wvrehng.js";
|
|
11
|
+
import"./cli-540nme4e.js";
|
|
12
|
+
import"./cli-5wasc5mr.js";
|
|
13
|
+
import"./cli-re3ntm60.js";
|
|
14
|
+
export {
|
|
15
|
+
withBuiltin,
|
|
16
|
+
toGunshi,
|
|
17
|
+
requireProject,
|
|
18
|
+
globalArgs,
|
|
19
|
+
defineCommand,
|
|
20
|
+
computeFlags
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type KitContext } from '../cli/command';
|
|
2
|
+
import type { Verb } from '../config/schema';
|
|
3
|
+
import { type PlanOptions } from '../lib/targets';
|
|
4
|
+
export interface VerbRun {
|
|
5
|
+
/** Name shown in the summary (`check`, `lint --fix`). */
|
|
6
|
+
name: string;
|
|
7
|
+
verbs: Verb[];
|
|
8
|
+
plan?: Omit<PlanOptions, 'targets' | 'extra'>;
|
|
9
|
+
/** Shown under a failure. */
|
|
10
|
+
hint?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Shared body of lint/format/typecheck/check/test/build: plan, run as a tree, summarize, exit code. */
|
|
13
|
+
export declare function runVerb(ctx: KitContext, v: VerbRun): Promise<void>;
|
|
14
|
+
/** One target for `dev` and `deploy`. */
|
|
15
|
+
export declare function singleTarget(ctx: KitContext, verb: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("..").KitCommand<{
|
|
2
|
+
readonly release: {
|
|
3
|
+
readonly type: "boolean";
|
|
4
|
+
readonly description: "Gradle: the signed release bundle (AAB)";
|
|
5
|
+
};
|
|
6
|
+
readonly apk: {
|
|
7
|
+
readonly type: "boolean";
|
|
8
|
+
readonly description: "Gradle: the signed release APK";
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|