@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,41 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
describe,
|
|
4
|
+
logSince
|
|
5
|
+
} from "./cli-xjpjdc2c.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/release/notes.ts
|
|
8
|
+
var FALLBACK_COMMITS = 20;
|
|
9
|
+
var MAX_COMMITS = 100;
|
|
10
|
+
var PLAY_NOTES_MAX = 500;
|
|
11
|
+
function mobileTag(platform, version, build) {
|
|
12
|
+
return `${platform}/v${version}+${build}`;
|
|
13
|
+
}
|
|
14
|
+
function serviceTag(name, version) {
|
|
15
|
+
return `${name}/v${version}`;
|
|
16
|
+
}
|
|
17
|
+
async function releaseNotes(prefix, cwd) {
|
|
18
|
+
const since = await describe(`${prefix}/v*`, { cwd });
|
|
19
|
+
const commits = await logSince(since, { cwd });
|
|
20
|
+
const picked = commits.slice(0, since ? MAX_COMMITS : FALLBACK_COMMITS);
|
|
21
|
+
return { since, notes: picked.map((c) => `- ${c.subject}`).join(`
|
|
22
|
+
`) };
|
|
23
|
+
}
|
|
24
|
+
function clampNotes(notes, max) {
|
|
25
|
+
if (notes.length <= max)
|
|
26
|
+
return notes;
|
|
27
|
+
const kept = [];
|
|
28
|
+
let len = 0;
|
|
29
|
+
for (const line of notes.split(`
|
|
30
|
+
`)) {
|
|
31
|
+
const add = (kept.length ? 1 : 0) + line.length;
|
|
32
|
+
if (len + add > max)
|
|
33
|
+
break;
|
|
34
|
+
kept.push(line);
|
|
35
|
+
len += add;
|
|
36
|
+
}
|
|
37
|
+
return kept.length ? kept.join(`
|
|
38
|
+
`) : `${notes.slice(0, max - 1)}\u2026`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { FALLBACK_COMMITS, PLAY_NOTES_MAX, mobileTag, serviceTag, releaseNotes, clampNotes };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
onCleanup,
|
|
4
|
+
trackChild
|
|
5
|
+
} from "./cli-fqxtcj42.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/proc.ts
|
|
8
|
+
var extraEnv = {};
|
|
9
|
+
function addChildEnv(vars) {
|
|
10
|
+
Object.assign(extraEnv, vars);
|
|
11
|
+
}
|
|
12
|
+
function childEnv(env = {}) {
|
|
13
|
+
return { ...process.env, ...extraEnv, ...env };
|
|
14
|
+
}
|
|
15
|
+
function spawn(cmd, opts, stdio) {
|
|
16
|
+
if (!cmd.length)
|
|
17
|
+
throw new Error("proc: empty command");
|
|
18
|
+
const detached = stdio.stdin !== "inherit" && stdio.stdout === "pipe";
|
|
19
|
+
const proc = Bun.spawn([...cmd], { cwd: opts.cwd ?? ".", env: childEnv(opts.env), ...stdio, detached });
|
|
20
|
+
trackChild(proc, detached);
|
|
21
|
+
return proc;
|
|
22
|
+
}
|
|
23
|
+
async function run(cmd, opts = {}) {
|
|
24
|
+
return await spawn(cmd, opts, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }).exited;
|
|
25
|
+
}
|
|
26
|
+
async function runToStderr(cmd, opts = {}) {
|
|
27
|
+
if (!cmd.length)
|
|
28
|
+
throw new Error("proc: empty command");
|
|
29
|
+
const proc = Bun.spawn([...cmd], {
|
|
30
|
+
cwd: opts.cwd ?? ".",
|
|
31
|
+
env: childEnv(opts.env),
|
|
32
|
+
stdin: "inherit",
|
|
33
|
+
stdout: 2,
|
|
34
|
+
stderr: "inherit"
|
|
35
|
+
});
|
|
36
|
+
trackChild(proc, false);
|
|
37
|
+
return await proc.exited;
|
|
38
|
+
}
|
|
39
|
+
async function runOrThrow(cmd, opts = {}) {
|
|
40
|
+
const code = await run(cmd, opts);
|
|
41
|
+
if (code !== 0)
|
|
42
|
+
throw new ProcError(cmd, code);
|
|
43
|
+
}
|
|
44
|
+
async function runQuiet(cmd, opts = {}) {
|
|
45
|
+
const proc = spawn(cmd, opts, { stdin: "ignore", stdout: "pipe", stderr: "pipe" });
|
|
46
|
+
const [stdout, stderr] = await Promise.all([
|
|
47
|
+
new Response(proc.stdout).text(),
|
|
48
|
+
new Response(proc.stderr).text()
|
|
49
|
+
]);
|
|
50
|
+
return { code: await proc.exited, output: `${stdout}${stderr}` };
|
|
51
|
+
}
|
|
52
|
+
async function runPiped(cmd, opts = {}) {
|
|
53
|
+
const stdin = opts.input === undefined ? "ignore" : new Blob([opts.input]);
|
|
54
|
+
const proc = spawn(cmd, opts, { stdin, stdout: "pipe", stderr: "pipe" });
|
|
55
|
+
const [stdout, stderr] = await Promise.all([
|
|
56
|
+
new Response(proc.stdout).text(),
|
|
57
|
+
new Response(proc.stderr).text()
|
|
58
|
+
]);
|
|
59
|
+
return { code: await proc.exited, stdout, stderr };
|
|
60
|
+
}
|
|
61
|
+
async function runCapture(cmd, opts = {}) {
|
|
62
|
+
const proc = spawn(cmd, opts, { stdin: opts.stdin ?? "ignore", stdout: "pipe", stderr: "inherit" });
|
|
63
|
+
const stdout = await new Response(proc.stdout).text();
|
|
64
|
+
return { code: await proc.exited, stdout };
|
|
65
|
+
}
|
|
66
|
+
async function runLines(cmd, opts = {}) {
|
|
67
|
+
const proc = spawn(cmd, opts, { stdin: "ignore", stdout: "pipe", stderr: "pipe" });
|
|
68
|
+
const out = [];
|
|
69
|
+
const pump = async (stream) => {
|
|
70
|
+
const decoder = new TextDecoder;
|
|
71
|
+
let carry = "";
|
|
72
|
+
const emit = (line) => {
|
|
73
|
+
if (opts.mute?.test(line))
|
|
74
|
+
return;
|
|
75
|
+
out.push(line);
|
|
76
|
+
opts.onLine?.(line);
|
|
77
|
+
};
|
|
78
|
+
for await (const chunk of stream) {
|
|
79
|
+
const lines = (carry + decoder.decode(chunk, { stream: true })).split(/\r?\n/);
|
|
80
|
+
carry = lines.pop() ?? "";
|
|
81
|
+
for (const l of lines)
|
|
82
|
+
emit(l);
|
|
83
|
+
}
|
|
84
|
+
if (carry)
|
|
85
|
+
emit(carry);
|
|
86
|
+
};
|
|
87
|
+
await Promise.all([
|
|
88
|
+
pump(proc.stdout),
|
|
89
|
+
pump(proc.stderr)
|
|
90
|
+
]);
|
|
91
|
+
return { code: await proc.exited, output: out.join(`
|
|
92
|
+
`) };
|
|
93
|
+
}
|
|
94
|
+
async function runInteractive(cmd, opts = {}) {
|
|
95
|
+
const proc = spawn(cmd, opts, { stdin: "inherit", stdout: "inherit", stderr: "inherit" });
|
|
96
|
+
let stopped = false;
|
|
97
|
+
const onInt = () => {
|
|
98
|
+
stopped = true;
|
|
99
|
+
};
|
|
100
|
+
process.on("SIGINT", onInt);
|
|
101
|
+
const off = onCleanup(restoreTty);
|
|
102
|
+
try {
|
|
103
|
+
const code = await proc.exited;
|
|
104
|
+
return stopped ? 0 : code;
|
|
105
|
+
} finally {
|
|
106
|
+
process.off("SIGINT", onInt);
|
|
107
|
+
off();
|
|
108
|
+
restoreTty();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function restoreTty() {
|
|
112
|
+
if (!process.stdin.isTTY)
|
|
113
|
+
return;
|
|
114
|
+
Bun.spawnSync(["stty", "sane"], { stdin: "inherit", stdout: "ignore", stderr: "ignore" });
|
|
115
|
+
if (process.stderr.isTTY)
|
|
116
|
+
process.stderr.write("\x1B[<u\x1B[?25h");
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
class ProcError extends Error {
|
|
120
|
+
cmd;
|
|
121
|
+
code;
|
|
122
|
+
output;
|
|
123
|
+
constructor(cmd, code, output) {
|
|
124
|
+
super(`${cmd.join(" ")} exited with ${code}`);
|
|
125
|
+
this.cmd = cmd;
|
|
126
|
+
this.code = code;
|
|
127
|
+
this.output = output;
|
|
128
|
+
this.name = "ProcError";
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function shell(command, extra = []) {
|
|
132
|
+
return extra.length ? ["sh", "-c", `${command} "$@"`, "sh", ...extra] : ["sh", "-c", command];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { addChildEnv, childEnv, run, runToStderr, runOrThrow, runQuiet, runPiped, runCapture, runLines, runInteractive, restoreTty, ProcError, shell };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/lib/cleanup.ts
|
|
3
|
+
var cleanups = [];
|
|
4
|
+
var children = new Map;
|
|
5
|
+
var interrupts = 0;
|
|
6
|
+
var installed = false;
|
|
7
|
+
function onCleanup(fn) {
|
|
8
|
+
cleanups.push(fn);
|
|
9
|
+
return () => {
|
|
10
|
+
const i = cleanups.indexOf(fn);
|
|
11
|
+
if (i >= 0)
|
|
12
|
+
cleanups.splice(i, 1);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
async function runCleanup() {
|
|
16
|
+
while (cleanups.length) {
|
|
17
|
+
const fn = cleanups.pop();
|
|
18
|
+
try {
|
|
19
|
+
await fn();
|
|
20
|
+
} catch {}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
var interrupted = () => interrupts > 0;
|
|
24
|
+
function trackChild(proc, group = false) {
|
|
25
|
+
children.set(proc, { group });
|
|
26
|
+
proc.exited.finally(() => children.delete(proc));
|
|
27
|
+
}
|
|
28
|
+
function forward(signal, opts = {}) {
|
|
29
|
+
for (const [c, { group }] of children) {
|
|
30
|
+
if (opts.groupsOnly && !group)
|
|
31
|
+
continue;
|
|
32
|
+
try {
|
|
33
|
+
if (group)
|
|
34
|
+
process.kill(-c.pid, signal);
|
|
35
|
+
else
|
|
36
|
+
c.kill(signal);
|
|
37
|
+
} catch {}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async function exitNow(code) {
|
|
41
|
+
await runCleanup();
|
|
42
|
+
process.exit(code);
|
|
43
|
+
}
|
|
44
|
+
function installSignalHandlers() {
|
|
45
|
+
if (installed)
|
|
46
|
+
return;
|
|
47
|
+
installed = true;
|
|
48
|
+
process.on("SIGINT", () => {
|
|
49
|
+
interrupts++;
|
|
50
|
+
if (interrupts > 1) {
|
|
51
|
+
forward("SIGKILL");
|
|
52
|
+
exitNow(130);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
forward("SIGINT", { groupsOnly: !!process.stdin.isTTY });
|
|
56
|
+
if (children.size === 0)
|
|
57
|
+
exitNow(130);
|
|
58
|
+
});
|
|
59
|
+
for (const [signal, code] of [
|
|
60
|
+
["SIGTERM", 143],
|
|
61
|
+
["SIGHUP", 129]
|
|
62
|
+
]) {
|
|
63
|
+
process.on(signal, () => {
|
|
64
|
+
interrupts++;
|
|
65
|
+
forward(signal);
|
|
66
|
+
if (children.size === 0)
|
|
67
|
+
exitNow(code);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function resetInterrupts() {
|
|
72
|
+
interrupts = 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { onCleanup, runCleanup, interrupted, trackChild, installSignalHandlers, resetInterrupts };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ExitCode,
|
|
4
|
+
KitError
|
|
5
|
+
} from "./cli-7wvrehng.js";
|
|
6
|
+
import {
|
|
7
|
+
__require
|
|
8
|
+
} from "./cli-re3ntm60.js";
|
|
9
|
+
|
|
10
|
+
// src/lib/prompt.ts
|
|
11
|
+
var out = { output: process.stderr };
|
|
12
|
+
async function drainTypeahead() {
|
|
13
|
+
const stdin = process.stdin;
|
|
14
|
+
if (!stdin.isTTY)
|
|
15
|
+
return;
|
|
16
|
+
const discard = () => {};
|
|
17
|
+
stdin.setRawMode(true);
|
|
18
|
+
stdin.on("data", discard);
|
|
19
|
+
stdin.resume();
|
|
20
|
+
await Bun.sleep(50);
|
|
21
|
+
stdin.off("data", discard);
|
|
22
|
+
stdin.pause();
|
|
23
|
+
stdin.setRawMode(false);
|
|
24
|
+
}
|
|
25
|
+
function cancelled() {
|
|
26
|
+
throw new KitError("Cancelled", undefined, ExitCode.interrupted);
|
|
27
|
+
}
|
|
28
|
+
function noTty(what, hint) {
|
|
29
|
+
throw new KitError(`Cannot ${what} without a terminal`, hint, ExitCode.usage);
|
|
30
|
+
}
|
|
31
|
+
async function confirm(flags, message, opts = {}) {
|
|
32
|
+
if (flags.yes && !opts.force)
|
|
33
|
+
return true;
|
|
34
|
+
if (!flags.interactive)
|
|
35
|
+
noTty("confirm", opts.force ? "Run it from a terminal" : "Re-run with --yes");
|
|
36
|
+
const clack = await import("./index-jqfz6hfy.js");
|
|
37
|
+
await drainTypeahead();
|
|
38
|
+
const answer = await clack.confirm({ message, initialValue: opts.initial ?? false, ...out });
|
|
39
|
+
if (clack.isCancel(answer))
|
|
40
|
+
cancelled();
|
|
41
|
+
return answer;
|
|
42
|
+
}
|
|
43
|
+
async function text(flags, message, opts = {}) {
|
|
44
|
+
if (!flags.interactive)
|
|
45
|
+
noTty(`ask "${message}"`, opts.hint ?? "Pass the value as a flag");
|
|
46
|
+
const clack = await import("./index-jqfz6hfy.js");
|
|
47
|
+
await drainTypeahead();
|
|
48
|
+
const answer = await clack.text({
|
|
49
|
+
message,
|
|
50
|
+
initialValue: opts.initial,
|
|
51
|
+
placeholder: opts.placeholder,
|
|
52
|
+
validate: opts.validate ? (v) => opts.validate(v ?? "") : undefined,
|
|
53
|
+
...out
|
|
54
|
+
});
|
|
55
|
+
if (clack.isCancel(answer))
|
|
56
|
+
cancelled();
|
|
57
|
+
return answer;
|
|
58
|
+
}
|
|
59
|
+
async function password(flags, message, opts = {}) {
|
|
60
|
+
if (!flags.interactive)
|
|
61
|
+
noTty(`ask for ${message}`, opts.hint ?? "Set it in .env");
|
|
62
|
+
const clack = await import("./index-jqfz6hfy.js");
|
|
63
|
+
await drainTypeahead();
|
|
64
|
+
const answer = await clack.password({
|
|
65
|
+
message,
|
|
66
|
+
validate: opts.validate ? (v) => opts.validate(v ?? "") : undefined,
|
|
67
|
+
...out
|
|
68
|
+
});
|
|
69
|
+
if (clack.isCancel(answer))
|
|
70
|
+
cancelled();
|
|
71
|
+
return answer;
|
|
72
|
+
}
|
|
73
|
+
async function select(flags, message, options, opts = {}) {
|
|
74
|
+
if (!flags.interactive)
|
|
75
|
+
noTty(`ask "${message}"`, opts.hint ?? "Pass the value as a flag");
|
|
76
|
+
const clack = await import("./index-jqfz6hfy.js");
|
|
77
|
+
await drainTypeahead();
|
|
78
|
+
const answer = await clack.select({
|
|
79
|
+
message,
|
|
80
|
+
options,
|
|
81
|
+
initialValue: opts.initial,
|
|
82
|
+
...out
|
|
83
|
+
});
|
|
84
|
+
if (clack.isCancel(answer))
|
|
85
|
+
cancelled();
|
|
86
|
+
return answer;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { confirm, text, password, select };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ExitCode,
|
|
4
|
+
KitError
|
|
5
|
+
} from "./cli-7wvrehng.js";
|
|
6
|
+
import {
|
|
7
|
+
log
|
|
8
|
+
} from "./cli-540nme4e.js";
|
|
9
|
+
import {
|
|
10
|
+
__require
|
|
11
|
+
} from "./cli-re3ntm60.js";
|
|
12
|
+
|
|
13
|
+
// src/cli/command.ts
|
|
14
|
+
var globalArgs = {
|
|
15
|
+
json: { type: "boolean", description: "Write one JSON document to stdout; no prompts or animation" },
|
|
16
|
+
"dry-run": { type: "boolean", short: "n", description: "Plan and run read-only steps; skip mutations" },
|
|
17
|
+
yes: { type: "boolean", short: "y", description: "Accept confirmations (never skips prod)" },
|
|
18
|
+
verbose: { type: "boolean", short: "v", description: "Stream all child output" },
|
|
19
|
+
quiet: { type: "boolean", short: "q", description: "Errors and summary only" },
|
|
20
|
+
bail: { type: "boolean", description: "Stop at the first failure" }
|
|
21
|
+
};
|
|
22
|
+
function defineCommand(command) {
|
|
23
|
+
return command;
|
|
24
|
+
}
|
|
25
|
+
function withBuiltin(base) {
|
|
26
|
+
return {
|
|
27
|
+
...base,
|
|
28
|
+
async builtin(path, options = {}) {
|
|
29
|
+
const want = (typeof path === "string" ? path.split(" ") : path).filter(Boolean);
|
|
30
|
+
const { builtins } = await import("./builtins-bj2yypm6.js");
|
|
31
|
+
const entry = builtins.find((b) => b.path.join(" ") === want.join(" "));
|
|
32
|
+
if (!entry)
|
|
33
|
+
throw new KitError(`No built-in \`kit ${want.join(" ")}\``, "Run `kit --help` to list them");
|
|
34
|
+
const cmd = (await entry.load()).default;
|
|
35
|
+
await cmd.run(withBuiltin({
|
|
36
|
+
...base,
|
|
37
|
+
args: options.args ?? base.args,
|
|
38
|
+
positionals: options.positionals ?? base.positionals,
|
|
39
|
+
rest: options.rest ?? base.rest,
|
|
40
|
+
mute: options.mute ?? base.mute
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function stripPath(positionals, path = []) {
|
|
46
|
+
let i = 0;
|
|
47
|
+
while (i < path.length && positionals[i] === path[i])
|
|
48
|
+
i++;
|
|
49
|
+
return positionals.slice(i);
|
|
50
|
+
}
|
|
51
|
+
function requireProject(ctx) {
|
|
52
|
+
if (!ctx.root || !ctx.config) {
|
|
53
|
+
throw new KitError("No kit.config.ts found here or in any parent directory", "Run `kit init`", ExitCode.config);
|
|
54
|
+
}
|
|
55
|
+
return { root: ctx.root, config: ctx.config };
|
|
56
|
+
}
|
|
57
|
+
function computeFlags(values) {
|
|
58
|
+
const ci = process.env.CI === "true" || process.env.CI === "1";
|
|
59
|
+
const json = values.json === true;
|
|
60
|
+
return {
|
|
61
|
+
json,
|
|
62
|
+
dryRun: values["dry-run"] === true,
|
|
63
|
+
yes: values.yes === true,
|
|
64
|
+
verbose: values.verbose === true,
|
|
65
|
+
quiet: values.quiet === true,
|
|
66
|
+
bail: values.bail === true,
|
|
67
|
+
ci,
|
|
68
|
+
interactive: !json && !ci && !process.env.KIT_NO_INPUT && !!process.stdin.isTTY && !!process.stderr.isTTY
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function toGunshi(name, cmd, rt) {
|
|
72
|
+
return {
|
|
73
|
+
name,
|
|
74
|
+
description: cmd.description,
|
|
75
|
+
examples: cmd.examples,
|
|
76
|
+
args: cmd.passthrough ? {} : { ...globalArgs, ...cmd.args ?? {} },
|
|
77
|
+
group: cmd.group,
|
|
78
|
+
passthrough: cmd.passthrough,
|
|
79
|
+
run: async (ctx) => {
|
|
80
|
+
const missing = (cmd.requiresEnv ?? []).filter((k) => !process.env[k]);
|
|
81
|
+
if (missing.length) {
|
|
82
|
+
throw new KitError(`Missing env: ${missing.join(", ")}`, "Add them to .env or run `kit env init`", ExitCode.config);
|
|
83
|
+
}
|
|
84
|
+
await cmd.run(withBuiltin({
|
|
85
|
+
root: rt.root,
|
|
86
|
+
config: rt.config,
|
|
87
|
+
args: ctx.values,
|
|
88
|
+
positionals: stripPath(ctx.positionals, ctx.commandPath),
|
|
89
|
+
rest: ctx.rest,
|
|
90
|
+
flags: computeFlags(ctx.values),
|
|
91
|
+
log
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { globalArgs, defineCommand, withBuiltin, requireProject, computeFlags, toGunshi };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/lib/pm.ts
|
|
3
|
+
import { existsSync, readFileSync } from "fs";
|
|
4
|
+
import { dirname, join, resolve } from "path";
|
|
5
|
+
var LOCKFILES = [
|
|
6
|
+
["bun.lock", "bun"],
|
|
7
|
+
["bun.lockb", "bun"],
|
|
8
|
+
["pnpm-lock.yaml", "pnpm"],
|
|
9
|
+
["yarn.lock", "yarn"],
|
|
10
|
+
["package-lock.json", "npm"]
|
|
11
|
+
];
|
|
12
|
+
function detectPackageManager(dir, root) {
|
|
13
|
+
let d = resolve(dir);
|
|
14
|
+
const stop = resolve(root);
|
|
15
|
+
while (true) {
|
|
16
|
+
for (const [file, pm] of LOCKFILES)
|
|
17
|
+
if (existsSync(join(d, file)))
|
|
18
|
+
return pm;
|
|
19
|
+
if (d === stop)
|
|
20
|
+
return "bun";
|
|
21
|
+
const parent = dirname(d);
|
|
22
|
+
if (parent === d)
|
|
23
|
+
return "bun";
|
|
24
|
+
d = parent;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
var runScript = (pm, script) => [pm, "run", script];
|
|
28
|
+
function pmExec(pm, bin, ...args) {
|
|
29
|
+
switch (pm) {
|
|
30
|
+
case "bun":
|
|
31
|
+
return ["bun", "x", bin, ...args];
|
|
32
|
+
case "pnpm":
|
|
33
|
+
return ["pnpm", "exec", bin, ...args];
|
|
34
|
+
case "yarn":
|
|
35
|
+
return ["yarn", bin, ...args];
|
|
36
|
+
case "npm":
|
|
37
|
+
return ["npx", "--no-install", bin, ...args];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function packageScripts(dir) {
|
|
41
|
+
const file = join(dir, "package.json");
|
|
42
|
+
if (!existsSync(file))
|
|
43
|
+
return;
|
|
44
|
+
try {
|
|
45
|
+
return JSON.parse(readFileSync(file, "utf8")).scripts ?? {};
|
|
46
|
+
} catch {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { detectPackageManager, runScript, pmExec, packageScripts };
|