@jordond/kit 0.5.0 → 0.6.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 +50 -7
- package/bin/kit +2 -2
- package/dist/{_verb-d8z0az83.js → _verb-cfgwexs5.js} +2 -2
- package/dist/{android-m93y4yam.js → android-f2jqh5f4.js} +2 -2
- package/dist/{build-8vcgsjwr.js → build-15wfykv9.js} +2 -2
- package/dist/{builtins-v7aeynd1.js → builtins-tgrq0nnd.js} +1 -1
- package/dist/{bump-6sw1bwp2.js → bump-xmjn8q5s.js} +2 -2
- package/dist/{certs-3nstba8v.js → certs-5kcftfaz.js} +2 -2
- package/dist/{check-bbcvkd59.js → check-h2qjvrge.js} +2 -2
- package/dist/{check-6p4he09p.js → check-s3xje6km.js} +3 -3
- package/dist/cli-0j3ywy6y.js +64 -0
- package/dist/{cli-vdxz787w.js → cli-1m6cy8wp.js} +1 -1
- package/dist/{cli-tt8q6taw.js → cli-650g3nf7.js} +38 -32
- package/dist/{cli-08ff849s.js → cli-6q43d787.js} +1 -1
- package/dist/{cli-kzmewy2g.js → cli-8mb4ayv9.js} +13 -6
- package/dist/{cli-q4k5hjzg.js → cli-dcq8ydz0.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{cloudflare-d4rm8ndz.js → cloudflare-3p8gj4ae.js} +1 -1
- package/dist/{command-ybq4jdy8.js → command-gtyznw30.js} +1 -1
- package/dist/commands/init.d.ts +29 -1
- package/dist/commands/upgrade.d.ts +9 -0
- package/dist/{completion-hm4rhvpk.js → completion-6yett99s.js} +1 -1
- package/dist/completion-g8bjf46s.js +36 -0
- package/dist/config/load.d.ts +8 -0
- package/dist/{config-3craadxe.js → config-2db8d4tg.js} +1 -1
- package/dist/{create-p7gmz7yv.js → create-te58argb.js} +3 -3
- package/dist/{deploy-4ns94w14.js → deploy-k21ee2wr.js} +3 -3
- package/dist/{deps-e65wk9g0.js → deps-tq3jpjd3.js} +2 -2
- package/dist/{dev-gq83jvk8.js → dev-915svrxw.js} +4 -4
- package/dist/{doctor-rngjjwn8.js → doctor-63ntz70n.js} +3 -3
- package/dist/{exec-p5xfgqgs.js → exec-gwnn34v2.js} +3 -3
- package/dist/{fastlane-yypgpmwr.js → fastlane-86zcf5ys.js} +2 -2
- package/dist/{format-0ynd2amx.js → format-z1jqgbad.js} +2 -2
- package/dist/{github-4q7gxxx5.js → github-xakbbb7p.js} +2 -2
- package/dist/{gradle-526a5wt2.js → gradle-df21cm28.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/init-cbba8t64.js +455 -0
- package/dist/{init-c2zyegvv.js → init-hdebe1s9.js} +2 -2
- package/dist/{ios-hk9xkjak.js → ios-txv190np.js} +2 -2
- package/dist/kitref-9j43993r.js +84 -0
- package/dist/{kotlin-y092s32p.js → kotlin-drt7z6bg.js} +2 -2
- package/dist/lib/completion.d.ts +33 -0
- package/dist/lib/kitref.d.ts +35 -0
- package/dist/lib/scaffold.d.ts +101 -0
- package/dist/{lint-ex675vcp.js → lint-90ernbhx.js} +2 -2
- package/dist/{list-vftxgz96.js → list-vaarpryk.js} +3 -3
- package/dist/{load-75xm9qcy.js → load-x6mekf6y.js} +5 -1
- package/dist/{main-g6ndff3w.js → main-5c6x1pd4.js} +10 -68
- package/dist/{migrate-5bj93aqj.js → migrate-9zvfp57b.js} +3 -3
- package/dist/{push-bhnr14ms.js → push-tn468c4w.js} +2 -2
- package/dist/{push-nx5n43se.js → push-wgbf86c0.js} +4 -4
- package/dist/scaffold-eqbtfksr.js +279 -0
- package/dist/{service-dfkyxsed.js → service-s5mnjq74.js} +2 -2
- package/dist/{show-qdsehk9z.js → show-qhn6x1vn.js} +2 -2
- package/dist/{sync-ngknzh6t.js → sync-34029rh7.js} +2 -2
- package/dist/{test-gdynbr4p.js → test-rpj97zr6.js} +2 -2
- package/dist/{typecheck-9mfcx412.js → typecheck-tbtp9z07.js} +2 -2
- package/dist/upgrade-z5s5wzzj.js +127 -0
- package/dist/{wrangler-vecn5dwg.js → wrangler-zz21zhb0.js} +3 -3
- package/dist/{xcode-33s2hs2d.js → xcode-w8yhedhm.js} +2 -2
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/{0.5.0/io.github.jordond.kit.android.application.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.android.application.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.6.0/io.github.jordond.kit.android.application.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.6.0/io.github.jordond.kit.android.application.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.6.0/io.github.jordond.kit.android.application.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.6.0/io.github.jordond.kit.android.application.gradle.plugin-0.6.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 +4 -4
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/{0.5.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.6.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.6.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.6.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.6.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.6.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 +4 -4
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/{0.5.0/io.github.jordond.kit.compose.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.compose.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.6.0/io.github.jordond.kit.compose.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.6.0/io.github.jordond.kit.compose.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.6.0/io.github.jordond.kit.compose.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.6.0/io.github.jordond.kit.compose.gradle.plugin-0.6.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml +4 -4
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/{0.5.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.6.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.6.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.6.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.6.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.6.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 +4 -4
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.module → 0.6.0/kit-plugins-0.6.0.module} +5 -5
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.module.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.module.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.module.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.module.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.pom → 0.6.0/kit-plugins-0.6.0.pom} +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.6.0/kit-plugins-0.6.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml +4 -4
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.module → 0.6.0/kit-settings-0.6.0.module} +5 -5
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.module.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.module.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.module.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.module.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.pom → 0.6.0/kit-settings-0.6.0.pom} +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.6.0/kit-settings-0.6.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml +4 -4
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/{0.5.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.6.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.6.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.6.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.6.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.6.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 +4 -4
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/{0.5.0/io.github.jordond.kit.lint.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.lint.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.6.0/io.github.jordond.kit.lint.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.6.0/io.github.jordond.kit.lint.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.6.0/io.github.jordond.kit.lint.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.6.0/io.github.jordond.kit.lint.gradle.plugin-0.6.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml +4 -4
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/{0.5.0/io.github.jordond.kit.release.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.release.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.6.0/io.github.jordond.kit.release.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.6.0/io.github.jordond.kit.release.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.6.0/io.github.jordond.kit.release.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.6.0/io.github.jordond.kit.release.gradle.plugin-0.6.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml +4 -4
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/{0.5.0/io.github.jordond.kit.settings.gradle.plugin-0.5.0.pom → 0.6.0/io.github.jordond.kit.settings.gradle.plugin-0.6.0.pom} +2 -2
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.6.0/io.github.jordond.kit.settings.gradle.plugin-0.6.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.6.0/io.github.jordond.kit.settings.gradle.plugin-0.6.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.6.0/io.github.jordond.kit.settings.gradle.plugin-0.6.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.6.0/io.github.jordond.kit.settings.gradle.plugin-0.6.0.pom.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml +4 -4
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.md5 +1 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha1 +1 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha256 +1 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/maven-metadata.xml.sha512 +1 -1
- package/package.json +1 -1
- package/templates/{new → gradle}/.github/workflows/ci.yml +3 -3
- package/templates/lefthook.yml +1 -1
- package/templates/toolchain/.editorconfig +32 -0
- package/templates/toolchain/.env.example +20 -0
- package/templates/toolchain/.github/workflows/ci.yml +44 -0
- package/templates/toolchain/.github/workflows/distribute.yml +41 -0
- package/templates/toolchain/fastlane/Fastfile +1 -0
- package/templates/toolchain/mise.toml +6 -0
- package/dist/init-ndgxaqcj.js +0 -281
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.5.0/io.github.jordond.kit.android.application.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.5.0/io.github.jordond.kit.android.application.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.5.0/io.github.jordond.kit.android.application.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/application/io.github.jordond.kit.android.application.gradle.plugin/0.5.0/io.github.jordond.kit.android.application.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.5.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.5.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.5.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/android/baseline/io.github.jordond.kit.android.baseline.gradle.plugin/0.5.0/io.github.jordond.kit.android.baseline.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.5.0/io.github.jordond.kit.compose.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.5.0/io.github.jordond.kit.compose.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.5.0/io.github.jordond.kit.compose.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/compose/io.github.jordond.kit.compose.gradle.plugin/0.5.0/io.github.jordond.kit.compose.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.5.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.5.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.5.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/jvm/app/io.github.jordond.kit.jvm.app.gradle.plugin/0.5.0/io.github.jordond.kit.jvm.app.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.module.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.module.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.module.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.module.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.5.0/kit-plugins-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.module.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.module.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.module.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.module.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.5.0/kit-settings-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.5.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.5.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.5.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/kmp/library/io.github.jordond.kit.kmp.library.gradle.plugin/0.5.0/io.github.jordond.kit.kmp.library.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.5.0/io.github.jordond.kit.lint.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.5.0/io.github.jordond.kit.lint.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.5.0/io.github.jordond.kit.lint.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/lint/io.github.jordond.kit.lint.gradle.plugin/0.5.0/io.github.jordond.kit.lint.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.5.0/io.github.jordond.kit.release.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.5.0/io.github.jordond.kit.release.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.5.0/io.github.jordond.kit.release.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.5.0/io.github.jordond.kit.release.gradle.plugin-0.5.0.pom.sha512 +0 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.5.0/io.github.jordond.kit.settings.gradle.plugin-0.5.0.pom.md5 +0 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.5.0/io.github.jordond.kit.settings.gradle.plugin-0.5.0.pom.sha1 +0 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.5.0/io.github.jordond.kit.settings.gradle.plugin-0.5.0.pom.sha256 +0 -1
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.5.0/io.github.jordond.kit.settings.gradle.plugin-0.5.0.pom.sha512 +0 -1
- /package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.jar → 0.6.0/kit-plugins-0.6.0.jar} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.jar.md5 → 0.6.0/kit-plugins-0.6.0.jar.md5} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.jar.sha1 → 0.6.0/kit-plugins-0.6.0.jar.sha1} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.jar.sha256 → 0.6.0/kit-plugins-0.6.0.jar.sha256} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-plugins/{0.5.0/kit-plugins-0.5.0.jar.sha512 → 0.6.0/kit-plugins-0.6.0.jar.sha512} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.jar → 0.6.0/kit-settings-0.6.0.jar} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.jar.md5 → 0.6.0/kit-settings-0.6.0.jar.md5} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.jar.sha1 → 0.6.0/kit-settings-0.6.0.jar.sha1} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.jar.sha256 → 0.6.0/kit-settings-0.6.0.jar.sha256} +0 -0
- /package/gradle/maven/io/github/jordond/kit/kit-settings/{0.5.0/kit-settings-0.5.0.jar.sha512 → 0.6.0/kit-settings-0.6.0.jar.sha512} +0 -0
- /package/templates/{new → gradle}/.env.example +0 -0
- /package/templates/{new → gradle}/apps/client/fastlane/Fastfile +0 -0
- /package/templates/{new → gradle}/apps/client/gradle/libs.versions.toml +0 -0
- /package/templates/{new → gradle}/apps/client/settings.gradle.kts +0 -0
- /package/templates/{new → gradle}/kit.config.ts +0 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
package_default
|
|
4
|
+
} from "./cli-0j3ywy6y.js";
|
|
5
|
+
import {
|
|
6
|
+
KIT_DIR
|
|
7
|
+
} from "./cli-8mb4ayv9.js";
|
|
8
|
+
import {
|
|
9
|
+
defineCommand
|
|
10
|
+
} from "./cli-6q43d787.js";
|
|
11
|
+
import"./cli-540nme4e.js";
|
|
12
|
+
import"./cli-5wasc5mr.js";
|
|
13
|
+
import"./cli-7wvrehng.js";
|
|
14
|
+
import {
|
|
15
|
+
__require,
|
|
16
|
+
__toESM
|
|
17
|
+
} from "./cli-re3ntm60.js";
|
|
18
|
+
|
|
19
|
+
// src/commands/init.ts
|
|
20
|
+
import { existsSync, readFileSync } from "fs";
|
|
21
|
+
import { dirname, join } from "path";
|
|
22
|
+
var SCAFFOLDS = {
|
|
23
|
+
mise: { file: "mise.toml", alt: [".mise.toml"], template: "mise.toml" },
|
|
24
|
+
lefthook: { file: "lefthook.yml", alt: ["lefthook.yaml", ".lefthook.yml"], template: "lefthook.yml" }
|
|
25
|
+
};
|
|
26
|
+
function scaffoldTemplate(scaffold, toolchain) {
|
|
27
|
+
const { template } = SCAFFOLDS[scaffold];
|
|
28
|
+
return scaffold === "mise" && toolchain ? join("toolchain", template) : template;
|
|
29
|
+
}
|
|
30
|
+
function hookKit(kitDir) {
|
|
31
|
+
return kitDir === "." ? "kit" : `./${kitDir}/node_modules/.bin/kit`;
|
|
32
|
+
}
|
|
33
|
+
var WRANGLER_CONFIGS = ["wrangler.jsonc", "wrangler.json", "wrangler.toml"];
|
|
34
|
+
function planInit(s) {
|
|
35
|
+
const plan = [];
|
|
36
|
+
if (!s.exists(".env.example"))
|
|
37
|
+
plan.push({ kind: "skip", title: ".env", reason: "no .env.example" });
|
|
38
|
+
else if (s.exists(".env"))
|
|
39
|
+
plan.push({ kind: "skip", title: ".env", reason: "already exists" });
|
|
40
|
+
else
|
|
41
|
+
plan.push({ kind: "env-file", title: ".env from .env.example" });
|
|
42
|
+
if (s.exists("package.json")) {
|
|
43
|
+
plan.push({ kind: "cmd", title: `${s.pm} install`, cmd: [s.pm, "install"], cwd: s.root });
|
|
44
|
+
} else if (!s.exists(join(KIT_DIR, "package.json"))) {
|
|
45
|
+
plan.push({ kind: "skip", title: "install", reason: "no package.json" });
|
|
46
|
+
}
|
|
47
|
+
if (s.exists(join(KIT_DIR, "package.json"))) {
|
|
48
|
+
plan.push({
|
|
49
|
+
kind: "cmd",
|
|
50
|
+
title: `bun install (${KIT_DIR})`,
|
|
51
|
+
cmd: ["bun", "install"],
|
|
52
|
+
cwd: join(s.root, KIT_DIR)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
for (const name of Object.keys(SCAFFOLDS)) {
|
|
56
|
+
const { file, alt } = SCAFFOLDS[name];
|
|
57
|
+
const title = file;
|
|
58
|
+
const present = [file, ...alt].find((f) => s.exists(f));
|
|
59
|
+
if (present)
|
|
60
|
+
plan.push({ kind: "skip", title, reason: `${present} exists` });
|
|
61
|
+
else if (s.accepted.includes(name))
|
|
62
|
+
plan.push({ kind: "scaffold", title, scaffold: name });
|
|
63
|
+
else
|
|
64
|
+
plan.push({ kind: "skip", title, reason: s.declinedReason ?? "declined" });
|
|
65
|
+
}
|
|
66
|
+
if (s.config?.env) {
|
|
67
|
+
plan.push({
|
|
68
|
+
kind: "cmd",
|
|
69
|
+
title: "kit env sync",
|
|
70
|
+
cmd: [...s.self, "env", "sync"],
|
|
71
|
+
cwd: s.root,
|
|
72
|
+
env: { KIT_ROOT: s.root }
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
for (const [name, t] of Object.entries(s.config?.targets ?? {})) {
|
|
76
|
+
if (t.kind !== "worker")
|
|
77
|
+
continue;
|
|
78
|
+
if (!WRANGLER_CONFIGS.some((f) => s.exists(join(t.dir, f))))
|
|
79
|
+
continue;
|
|
80
|
+
const cwd = join(s.root, t.dir);
|
|
81
|
+
plan.push({ kind: "cmd", title: `wrangler types (${name})`, cmd: s.exec(cwd, "wrangler", "types"), cwd });
|
|
82
|
+
}
|
|
83
|
+
plan.push(...planNative(s));
|
|
84
|
+
if (s.completion) {
|
|
85
|
+
const { shell, file, rc, skip } = s.completion;
|
|
86
|
+
const title = `${shell} completion`;
|
|
87
|
+
plan.push(skip ? { kind: "skip", title, reason: skip } : { kind: "completion", title, shell, file, ...rc ? { rc } : {} });
|
|
88
|
+
}
|
|
89
|
+
return plan;
|
|
90
|
+
}
|
|
91
|
+
function planNative(s) {
|
|
92
|
+
const plan = [];
|
|
93
|
+
const which = s.which ?? (() => false);
|
|
94
|
+
const gradle = s.config?.gradle;
|
|
95
|
+
const init = gradle?.init === undefined ? [] : [gradle.init].flat();
|
|
96
|
+
if (gradle && init.length) {
|
|
97
|
+
const title = `gradle ${init.join(" ")}`;
|
|
98
|
+
if (s.jsOnly)
|
|
99
|
+
plan.push({ kind: "skip", title, reason: "--js-only" });
|
|
100
|
+
else if (!which("java"))
|
|
101
|
+
plan.push({ kind: "skip", title, reason: "no java on PATH; install a JDK" });
|
|
102
|
+
else if (s.config?.release?.android && !s.androidSdk) {
|
|
103
|
+
plan.push({
|
|
104
|
+
kind: "skip",
|
|
105
|
+
title,
|
|
106
|
+
reason: `no Android SDK; set ANDROID_HOME, or sdk.dir in ${join(gradle.root, "local.properties")}`
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
const gradlew = s.exists(join(gradle.root, "gradlew")) ? "./gradlew" : "gradle";
|
|
110
|
+
const cmd = [gradlew, "--console=plain", "-q", ...init];
|
|
111
|
+
plan.push({ kind: "cmd", title, cmd, cwd: join(s.root, gradle.root) });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const toolchain = s.config?.toolchain;
|
|
115
|
+
if (toolchain) {
|
|
116
|
+
const runs = toolchain.init === undefined ? ["--version"] : [toolchain.init].flat();
|
|
117
|
+
for (const args of runs) {
|
|
118
|
+
const title = `kotlin ${args}`;
|
|
119
|
+
if (s.jsOnly)
|
|
120
|
+
plan.push({ kind: "skip", title, reason: "--js-only" });
|
|
121
|
+
else if (!s.exists(join(toolchain.root, "kotlin"))) {
|
|
122
|
+
plan.push({
|
|
123
|
+
kind: "skip",
|
|
124
|
+
title,
|
|
125
|
+
reason: `no ${join(toolchain.root, "kotlin")}; check toolchain.root`
|
|
126
|
+
});
|
|
127
|
+
} else {
|
|
128
|
+
const cmd = ["./kotlin", ...args.split(/\s+/).filter(Boolean)];
|
|
129
|
+
plan.push({ kind: "cmd", title, cmd, cwd: join(s.root, toolchain.root) });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const kitBundle = !!(s.config?.release?.ios || s.config?.release?.android);
|
|
134
|
+
const gemDir = kitBundle ? "." : [gradle?.root ?? toolchain?.root, "."].find((d) => d !== undefined && s.exists(join(d, "Gemfile")));
|
|
135
|
+
if (gemDir !== undefined) {
|
|
136
|
+
const title = kitBundle ? "bundle install (kit fastlane)" : `bundle install${gemDir === "." ? "" : ` (${gemDir})`}`;
|
|
137
|
+
if (s.jsOnly)
|
|
138
|
+
plan.push({ kind: "skip", title, reason: "--js-only" });
|
|
139
|
+
else if (!which("bundle"))
|
|
140
|
+
plan.push({ kind: "skip", title, reason: "no bundler on PATH; gem install bundler" });
|
|
141
|
+
else
|
|
142
|
+
plan.push({
|
|
143
|
+
kind: "cmd",
|
|
144
|
+
title,
|
|
145
|
+
cmd: ["bundle", "install"],
|
|
146
|
+
cwd: join(s.root, gemDir),
|
|
147
|
+
...kitBundle ? { env: s.bundleEnv?.() ?? {} } : {}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (s.platform === "darwin" && s.config?.release?.ios && !s.jsOnly && !which("xcodebuild")) {
|
|
151
|
+
plan.push({ kind: "skip", title: "Xcode", reason: "no xcodebuild on PATH; install Xcode for iOS builds" });
|
|
152
|
+
}
|
|
153
|
+
return plan;
|
|
154
|
+
}
|
|
155
|
+
function kitPackageRoot(from = import.meta.dir) {
|
|
156
|
+
let dir = from;
|
|
157
|
+
while (true) {
|
|
158
|
+
const pkg = join(dir, "package.json");
|
|
159
|
+
if (existsSync(pkg) && JSON.parse(readFileSync(pkg, "utf8")).name === "@jordond/kit")
|
|
160
|
+
return dir;
|
|
161
|
+
const parent = dirname(dir);
|
|
162
|
+
if (parent === dir)
|
|
163
|
+
throw new Error("kit package root not found");
|
|
164
|
+
dir = parent;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function hasAndroidSdk(root, config) {
|
|
168
|
+
if (process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT)
|
|
169
|
+
return true;
|
|
170
|
+
const props = join(root, config?.gradle?.root ?? ".", "local.properties");
|
|
171
|
+
return existsSync(props) && /^\s*sdk\.dir\s*=/m.test(readFileSync(props, "utf8"));
|
|
172
|
+
}
|
|
173
|
+
function renderTemplate(text, vars) {
|
|
174
|
+
return text.replace(/\{\{(\w+)\}\}/g, (m, k) => vars[k] ?? m);
|
|
175
|
+
}
|
|
176
|
+
var init_default = defineCommand({
|
|
177
|
+
description: "Set up a fresh clone, or a new repo: .env, install, env sync, wrangler types, native deps",
|
|
178
|
+
group: "Setup",
|
|
179
|
+
args: {
|
|
180
|
+
"js-only": { type: "boolean", description: "Skip the Gradle, Kotlin toolchain and bundler steps" },
|
|
181
|
+
template: {
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "New repo: write the kit files first (toolchain: an existing Kotlin toolchain project; gradle)"
|
|
184
|
+
},
|
|
185
|
+
name: { type: "string", description: "App name for --template (default: the directory name)" }
|
|
186
|
+
},
|
|
187
|
+
examples: [
|
|
188
|
+
"kit init",
|
|
189
|
+
"kit init --dry-run",
|
|
190
|
+
"kit init --yes # also scaffold mise.toml and lefthook.yml",
|
|
191
|
+
"kit init --js-only # JS workspace only: no Gradle, no bundle install",
|
|
192
|
+
"kit init --template toolchain # add kit to a Kotlin toolchain project (kit goes in .kit/)",
|
|
193
|
+
"kit init --template gradle --name MyApp"
|
|
194
|
+
].join(`
|
|
195
|
+
`),
|
|
196
|
+
async run(ctx) {
|
|
197
|
+
const { appendFileSync, chmodSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } = await import("fs");
|
|
198
|
+
const { homedir, tmpdir } = await import("os");
|
|
199
|
+
const { basename, normalize, relative } = await import("path");
|
|
200
|
+
const pc = (await import("./picocolors-0dxagz5d.js").then((m)=>__toESM(m.default,1))).default;
|
|
201
|
+
const { CONFIG_FILE, installDir, loadConfig, loadConfigFile } = await import("./load-x6mekf6y.js");
|
|
202
|
+
const { ExitCode, KitError } = await import("./errors-1fjbr7ee.js");
|
|
203
|
+
const { emitJson } = await import("./log-g1ebh60s.js");
|
|
204
|
+
const { detectPackageManager, pmExec } = await import("./pm-5q5vz6w3.js");
|
|
205
|
+
const { run, runCapture, runQuiet } = await import("./proc-jv4bcyyx.js");
|
|
206
|
+
const { confirm, text } = await import("./prompt-3wwegvqc.js");
|
|
207
|
+
const { isToolchainRepo, planScaffold, TEMPLATES } = await import("./scaffold-eqbtfksr.js");
|
|
208
|
+
const root = ctx.root ?? process.cwd();
|
|
209
|
+
const onDisk = (p) => existsSync(join(root, p));
|
|
210
|
+
const say = !ctx.flags.json;
|
|
211
|
+
const wanted = ctx.args.template;
|
|
212
|
+
if (wanted !== undefined && !TEMPLATES.includes(wanted)) {
|
|
213
|
+
throw new KitError(`Unknown template "${wanted}"`, `Use one of: ${TEMPLATES.join(", ")}`, ExitCode.usage);
|
|
214
|
+
}
|
|
215
|
+
if (wanted !== undefined && ctx.root) {
|
|
216
|
+
throw new KitError(`${relative(process.cwd(), ctx.root) || "."} already has a ${CONFIG_FILE}`, "Run `kit init` without --template to set this clone up", ExitCode.usage);
|
|
217
|
+
}
|
|
218
|
+
let template = wanted;
|
|
219
|
+
const toolchainRepo = isToolchainRepo(onDisk);
|
|
220
|
+
if (template === "toolchain" && !toolchainRepo) {
|
|
221
|
+
throw new KitError("No Kotlin toolchain project here (a `kotlin` wrapper and project.yaml)", "Create one first (https://kotlin-toolchain.org), then re-run in its root", ExitCode.config);
|
|
222
|
+
}
|
|
223
|
+
if (!ctx.root && !template) {
|
|
224
|
+
if (toolchainRepo) {
|
|
225
|
+
const ask = "Kotlin toolchain project without kit. Add kit (.kit/, CI workflows, hooks)?";
|
|
226
|
+
if (ctx.flags.yes || ctx.flags.dryRun)
|
|
227
|
+
template = "toolchain";
|
|
228
|
+
else if (ctx.flags.interactive) {
|
|
229
|
+
if (await confirm(ctx.flags, ask, { initial: true }))
|
|
230
|
+
template = "toolchain";
|
|
231
|
+
} else if (say) {
|
|
232
|
+
ctx.log.warn("Kotlin toolchain project without kit: re-run with `--template toolchain`");
|
|
233
|
+
}
|
|
234
|
+
} else if (say) {
|
|
235
|
+
ctx.log.dim(`no ${CONFIG_FILE} here: \`kit init --template gradle\` scaffolds a new repo`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
let config = ctx.config;
|
|
239
|
+
let scaffold = [];
|
|
240
|
+
if (template) {
|
|
241
|
+
const { tagSha, usesRef } = await import("./kitref-9j43993r.js");
|
|
242
|
+
let name = typeof ctx.args.name === "string" && ctx.args.name ? ctx.args.name : basename(root);
|
|
243
|
+
if (ctx.args.name === undefined && ctx.flags.interactive && !ctx.flags.yes && !ctx.flags.dryRun) {
|
|
244
|
+
name = (await text(ctx.flags, "App name", { initial: name })).trim() || name;
|
|
245
|
+
}
|
|
246
|
+
if (!/^[\w][\w .-]*$/.test(name)) {
|
|
247
|
+
throw new KitError(`"${name}" cannot be the app name`, "Pass --name with letters, digits, spaces, dots, dashes or underscores", ExitCode.usage);
|
|
248
|
+
}
|
|
249
|
+
const sha = await tagSha(package_default.version);
|
|
250
|
+
if (!sha && say) {
|
|
251
|
+
ctx.log.warn(`v${package_default.version} not found on GitHub: workflows pin the tag, not a commit`);
|
|
252
|
+
ctx.log.dim(" \u203A run `kit upgrade` once it is released to pin the SHA");
|
|
253
|
+
}
|
|
254
|
+
const dir = join(kitPackageRoot(), "templates", template);
|
|
255
|
+
const files = {};
|
|
256
|
+
for (const rel of new Bun.Glob("**/*").scanSync({ cwd: dir, onlyFiles: true, dot: true })) {
|
|
257
|
+
if (rel !== SCAFFOLDS.mise.template)
|
|
258
|
+
files[rel] = readFileSync(join(dir, rel), "utf8");
|
|
259
|
+
}
|
|
260
|
+
scaffold = planScaffold({
|
|
261
|
+
template,
|
|
262
|
+
name,
|
|
263
|
+
kitVersion: package_default.version,
|
|
264
|
+
kitRef: usesRef(package_default.version, sha),
|
|
265
|
+
zod: package_default.peerDependencies.zod,
|
|
266
|
+
files,
|
|
267
|
+
read: (p) => onDisk(p) ? readFileSync(join(root, p), "utf8") : undefined,
|
|
268
|
+
list: (d) => onDisk(d) ? [...new Bun.Glob("**/*").scanSync({ cwd: join(root, d), onlyFiles: true })].filter((f) => !/(^|\/)(build|node_modules)\//.test(f)).map((f) => join(d, f)) : []
|
|
269
|
+
});
|
|
270
|
+
const configAction = scaffold.find((a) => basename(a.path) === CONFIG_FILE);
|
|
271
|
+
if (ctx.flags.dryRun && configAction?.kind === "write") {
|
|
272
|
+
const tmp = mkdtempSync(join(tmpdir(), "kit-init-"));
|
|
273
|
+
try {
|
|
274
|
+
writeFileSync(join(tmp, CONFIG_FILE), configAction.content);
|
|
275
|
+
config = await loadConfigFile(join(tmp, CONFIG_FILE), configAction.path);
|
|
276
|
+
} finally {
|
|
277
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
const planned = new Set(scaffold.filter((a) => a.kind !== "skip").map((a) => normalize(a.path)));
|
|
282
|
+
const exists = (p) => planned.has(normalize(p)) || onDisk(p);
|
|
283
|
+
const describe = (a) => a.kind === "write" ? `write ${a.path}` : a.kind === "edit" ? `edit ${a.path} ${pc.dim(a.note)}` : "";
|
|
284
|
+
const results = [];
|
|
285
|
+
if (!ctx.flags.dryRun) {
|
|
286
|
+
for (const a of scaffold) {
|
|
287
|
+
if (a.kind === "skip") {
|
|
288
|
+
if (say)
|
|
289
|
+
ctx.log.dim(`- ${a.path} ${a.reason}`);
|
|
290
|
+
results.push({ title: a.path, ok: true, skipped: a.reason });
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
if (say)
|
|
294
|
+
ctx.log.step(describe(a));
|
|
295
|
+
mkdirSync(join(root, a.path, ".."), { recursive: true });
|
|
296
|
+
writeFileSync(join(root, a.path), a.content);
|
|
297
|
+
results.push({ title: a.path, ok: true });
|
|
298
|
+
}
|
|
299
|
+
if (template)
|
|
300
|
+
config = await loadConfig(root);
|
|
301
|
+
}
|
|
302
|
+
const pm = detectPackageManager(root, root);
|
|
303
|
+
const missing = Object.keys(SCAFFOLDS).filter((n) => [SCAFFOLDS[n].file, ...SCAFFOLDS[n].alt].every((f) => !exists(f)));
|
|
304
|
+
const accepted = [];
|
|
305
|
+
let declinedReason;
|
|
306
|
+
if (ctx.flags.yes || template)
|
|
307
|
+
accepted.push(...missing);
|
|
308
|
+
else if (!ctx.flags.interactive)
|
|
309
|
+
declinedReason = "no terminal; re-run with --yes to add it";
|
|
310
|
+
else if (ctx.flags.dryRun)
|
|
311
|
+
declinedReason = "would ask";
|
|
312
|
+
else {
|
|
313
|
+
for (const n of missing) {
|
|
314
|
+
if (await confirm(ctx.flags, `Add ${SCAFFOLDS[n].file}?`, { initial: true }))
|
|
315
|
+
accepted.push(n);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const { completionInstalled, completionTargets, rcSnippet, shellOf } = await import("./completion-g8bjf46s.js");
|
|
319
|
+
let completion;
|
|
320
|
+
const shell = shellOf(process.env.SHELL);
|
|
321
|
+
if (shell && !ctx.flags.ci) {
|
|
322
|
+
const home = homedir();
|
|
323
|
+
const targets = completionTargets(shell, process.env, home, process.platform);
|
|
324
|
+
const tilde = (f) => f.startsWith(`${home}/`) ? `~/${relative(home, f)}` : f;
|
|
325
|
+
const shown = tilde(targets.rc ?? targets.script);
|
|
326
|
+
const current = targets.rc ? existsSync(targets.rc) ? readFileSync(targets.rc, "utf8") : undefined : existsSync(targets.script) ? "" : undefined;
|
|
327
|
+
let skip;
|
|
328
|
+
if (completionInstalled(current, !!targets.rc))
|
|
329
|
+
skip = `already in ${shown}`;
|
|
330
|
+
else if (!Bun.which("kit"))
|
|
331
|
+
skip = "kit is not on PATH; bun add -g @jordond/kit, then re-run";
|
|
332
|
+
else if (ctx.flags.dryRun && !ctx.flags.yes)
|
|
333
|
+
skip = "would ask";
|
|
334
|
+
else if (!ctx.flags.yes && !ctx.flags.interactive)
|
|
335
|
+
skip = "no terminal; re-run with --yes to install it";
|
|
336
|
+
else if (!await confirm(ctx.flags, `Install kit completion for ${shell} (${shown})?`, { initial: true }))
|
|
337
|
+
skip = "declined";
|
|
338
|
+
completion = { shell, file: targets.script, rc: targets.rc, skip };
|
|
339
|
+
}
|
|
340
|
+
const { bundleEnv } = await import("./fastlane-pj9c09z3.js");
|
|
341
|
+
const self = [process.execPath, "--no-env-file", process.argv[1]];
|
|
342
|
+
const plan = planInit({
|
|
343
|
+
root,
|
|
344
|
+
config,
|
|
345
|
+
exists,
|
|
346
|
+
pm,
|
|
347
|
+
accepted,
|
|
348
|
+
declinedReason,
|
|
349
|
+
self,
|
|
350
|
+
exec: (cwd, bin, ...args) => pmExec(detectPackageManager(cwd, root), bin, ...args),
|
|
351
|
+
which: (bin) => Bun.which(bin) !== null,
|
|
352
|
+
androidSdk: hasAndroidSdk(root, config),
|
|
353
|
+
platform: process.platform,
|
|
354
|
+
bundleEnv,
|
|
355
|
+
jsOnly: ctx.args["js-only"] === true,
|
|
356
|
+
completion
|
|
357
|
+
});
|
|
358
|
+
const where = (cwd) => relative(root, cwd) || ".";
|
|
359
|
+
if (ctx.flags.dryRun) {
|
|
360
|
+
if (ctx.flags.json) {
|
|
361
|
+
emitJson({
|
|
362
|
+
...template ? {
|
|
363
|
+
template,
|
|
364
|
+
files: scaffold.map((a) => a.kind === "skip" ? a : { kind: a.kind, path: a.path, ...a.kind === "edit" ? { note: a.note } : {} })
|
|
365
|
+
} : {},
|
|
366
|
+
plan: plan.map((a) => a.kind === "cmd" ? { kind: a.kind, title: a.title, cmd: a.cmd, cwd: where(a.cwd) } : a)
|
|
367
|
+
});
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
for (const a of scaffold) {
|
|
371
|
+
if (a.kind === "skip")
|
|
372
|
+
ctx.log.dim(`- ${a.path} ${a.reason}`);
|
|
373
|
+
else
|
|
374
|
+
ctx.log.step(describe(a));
|
|
375
|
+
}
|
|
376
|
+
for (const a of plan) {
|
|
377
|
+
if (a.kind === "skip")
|
|
378
|
+
ctx.log.dim(`- ${a.title} ${a.reason}`);
|
|
379
|
+
else if (a.kind === "cmd")
|
|
380
|
+
ctx.log.step(`${a.title} ${pc.dim(`${where(a.cwd)} $ ${a.cmd.join(" ")}`)}`);
|
|
381
|
+
else if (a.kind === "completion")
|
|
382
|
+
ctx.log.step(`${a.title} ${pc.dim(a.rc ?? a.file)}`);
|
|
383
|
+
else
|
|
384
|
+
ctx.log.step(a.kind === "scaffold" ? `write ${a.title}` : `create ${a.title}`);
|
|
385
|
+
}
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
const toolchain = !!config?.toolchain || toolchainRepo;
|
|
389
|
+
for (const a of plan) {
|
|
390
|
+
if (a.kind === "skip") {
|
|
391
|
+
if (say)
|
|
392
|
+
ctx.log.dim(`- ${a.title} ${a.reason}`);
|
|
393
|
+
results.push({ title: a.title, ok: true, skipped: a.reason });
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
if (say)
|
|
397
|
+
ctx.log.step(a.title);
|
|
398
|
+
let ok = true;
|
|
399
|
+
if (a.kind === "env-file") {
|
|
400
|
+
const dotenv = join(root, ".env");
|
|
401
|
+
writeFileSync(dotenv, readFileSync(join(root, ".env.example")), { mode: 384 });
|
|
402
|
+
chmodSync(dotenv, 384);
|
|
403
|
+
if (say)
|
|
404
|
+
ctx.log.dim(" fill in the values, then run `kit doctor`");
|
|
405
|
+
} else if (a.kind === "scaffold") {
|
|
406
|
+
const file = join(kitPackageRoot(), "templates", scaffoldTemplate(a.scaffold, toolchain));
|
|
407
|
+
const vars = { bun: Bun.version, kit: hookKit(installDir(root)) };
|
|
408
|
+
writeFileSync(join(root, SCAFFOLDS[a.scaffold].file), renderTemplate(readFileSync(file, "utf8"), vars));
|
|
409
|
+
} else if (a.kind === "completion") {
|
|
410
|
+
const script = await runCapture([...self, "completion", a.shell], { cwd: homedir() });
|
|
411
|
+
ok = script.code === 0 && script.stdout.trim() !== "";
|
|
412
|
+
if (ok) {
|
|
413
|
+
mkdirSync(join(a.file, ".."), { recursive: true });
|
|
414
|
+
writeFileSync(a.file, script.stdout);
|
|
415
|
+
if (a.rc) {
|
|
416
|
+
const rc = existsSync(a.rc) ? readFileSync(a.rc, "utf8") : "";
|
|
417
|
+
const lead = rc === "" || rc.endsWith(`
|
|
418
|
+
`) ? "" : `
|
|
419
|
+
`;
|
|
420
|
+
appendFileSync(a.rc, `${lead}${rc === "" ? "" : `
|
|
421
|
+
`}${rcSnippet(a.shell, a.file)}`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (ok && say)
|
|
425
|
+
ctx.log.dim(" open a new shell to use it");
|
|
426
|
+
if (!ok && say)
|
|
427
|
+
ctx.log.error(`${a.title} failed`);
|
|
428
|
+
} else {
|
|
429
|
+
const code = ctx.flags.json ? (await runQuiet(a.cmd, { cwd: a.cwd, env: a.env })).code : await run(a.cmd, { cwd: a.cwd, env: a.env });
|
|
430
|
+
ok = code === 0;
|
|
431
|
+
if (!ok && say)
|
|
432
|
+
ctx.log.error(`${a.title} failed (exit ${code})`);
|
|
433
|
+
}
|
|
434
|
+
results.push({ title: a.title, ok });
|
|
435
|
+
}
|
|
436
|
+
const failed = results.filter((r) => !r.ok).map((r) => r.title);
|
|
437
|
+
if (ctx.flags.json)
|
|
438
|
+
emitJson({ ok: !failed.length, ...template ? { template } : {}, steps: results });
|
|
439
|
+
else if (failed.length)
|
|
440
|
+
ctx.log.error(`init failed: ${failed.join(", ")}`);
|
|
441
|
+
else
|
|
442
|
+
ctx.log.success("init complete");
|
|
443
|
+
if (failed.length)
|
|
444
|
+
process.exitCode = 1;
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
export {
|
|
448
|
+
scaffoldTemplate,
|
|
449
|
+
renderTemplate,
|
|
450
|
+
planInit,
|
|
451
|
+
kitPackageRoot,
|
|
452
|
+
hookKit,
|
|
453
|
+
init_default as default,
|
|
454
|
+
SCAFFOLDS
|
|
455
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
defineCommand
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-6q43d787.js";
|
|
5
5
|
import"./cli-540nme4e.js";
|
|
6
6
|
import"./cli-5wasc5mr.js";
|
|
7
7
|
import"./cli-7wvrehng.js";
|
|
@@ -16,7 +16,7 @@ var init_default = defineCommand({
|
|
|
16
16
|
examples: `kit env init
|
|
17
17
|
kit env init --dry-run`,
|
|
18
18
|
async run(ctx) {
|
|
19
|
-
const { requireProject } = await import("./command-
|
|
19
|
+
const { requireProject } = await import("./command-gtyznw30.js");
|
|
20
20
|
const { loadEnv, assertValid } = await import("./load-4s6t9309.js");
|
|
21
21
|
const { planInit, applyInit } = await import("./init-gtkmx54a.js");
|
|
22
22
|
const { outputs, writeOutputs } = await import("./render-vn40fp54.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
defineCommand
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-6q43d787.js";
|
|
5
5
|
import"./cli-540nme4e.js";
|
|
6
6
|
import"./cli-5wasc5mr.js";
|
|
7
7
|
import"./cli-7wvrehng.js";
|
|
@@ -33,7 +33,7 @@ kit release ios --track beta --yes
|
|
|
33
33
|
kit release ios --track prod --notes "Bug fixes"
|
|
34
34
|
kit release ios --track internal --dry-run`,
|
|
35
35
|
async run(ctx) {
|
|
36
|
-
const { requireProject } = await import("./command-
|
|
36
|
+
const { requireProject } = await import("./command-gtyznw30.js");
|
|
37
37
|
const { releaseMobile } = await import("./mobile-r27grzez.js");
|
|
38
38
|
requireProject(ctx);
|
|
39
39
|
await releaseMobile(ctx, {
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./cli-re3ntm60.js";
|
|
3
|
+
|
|
4
|
+
// src/lib/kitref.ts
|
|
5
|
+
var kitRepoUrl = () => process.env.KIT_REPO_URL || "https://github.com/jordond/kit.git";
|
|
6
|
+
function parseTagSha(lsRemote, version) {
|
|
7
|
+
const ref = `refs/tags/v${version}`;
|
|
8
|
+
const rows = lsRemote.split(`
|
|
9
|
+
`).map((l) => l.trim().split(/\s+/)).filter((r) => r.length === 2);
|
|
10
|
+
const sha = (name) => rows.find(([, r]) => r === name)?.[0];
|
|
11
|
+
const found = sha(`${ref}^{}`) ?? sha(ref);
|
|
12
|
+
return found && /^[0-9a-f]{40}$/.test(found) ? found : undefined;
|
|
13
|
+
}
|
|
14
|
+
async function tagSha(version) {
|
|
15
|
+
if (!Bun.which("git"))
|
|
16
|
+
return;
|
|
17
|
+
const ref = `refs/tags/v${version}`;
|
|
18
|
+
try {
|
|
19
|
+
const proc = Bun.spawn(["git", "ls-remote", kitRepoUrl(), ref, `${ref}^{}`], {
|
|
20
|
+
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" },
|
|
21
|
+
stdin: "ignore",
|
|
22
|
+
stdout: "pipe",
|
|
23
|
+
stderr: "ignore",
|
|
24
|
+
timeout: 20000
|
|
25
|
+
});
|
|
26
|
+
const out = await new Response(proc.stdout).text();
|
|
27
|
+
return await proc.exited === 0 ? parseTagSha(out, version) : undefined;
|
|
28
|
+
} catch {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function usesRef(version, sha) {
|
|
33
|
+
return `${sha ?? `v${version}`} # v${version}`;
|
|
34
|
+
}
|
|
35
|
+
var KIT_USES_LINE = /(jordond\/kit\/[^@\s]+@)[^\s'"]+(['"]?[ \t]*#[ \t]*)v?\d+\.\d+\.\d+[\w.+-]*/g;
|
|
36
|
+
function repinWorkflow(text, version, sha) {
|
|
37
|
+
let count = 0;
|
|
38
|
+
const out = text.replace(KIT_USES_LINE, (_m, head, gap) => {
|
|
39
|
+
count++;
|
|
40
|
+
return `${head}${sha}${gap}v${version}`;
|
|
41
|
+
});
|
|
42
|
+
return { text: out, count: out === text ? 0 : count };
|
|
43
|
+
}
|
|
44
|
+
var KIT_PACKAGE = "@jordond/kit";
|
|
45
|
+
var isVersion = (v) => /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/.test(v);
|
|
46
|
+
async function latestVersion() {
|
|
47
|
+
const registry = (process.env.KIT_REGISTRY || "https://registry.npmjs.org").replace(/\/+$/, "");
|
|
48
|
+
try {
|
|
49
|
+
const res = await fetch(`${registry}/${KIT_PACKAGE}/latest`, { signal: AbortSignal.timeout(15000) });
|
|
50
|
+
if (!res.ok)
|
|
51
|
+
return;
|
|
52
|
+
const version = (await res.json()).version;
|
|
53
|
+
return typeof version === "string" && isVersion(version) ? version : undefined;
|
|
54
|
+
} catch {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function bumpPin(manifest, version) {
|
|
59
|
+
const re = /("@jordond\/kit"\s*:\s*")([^"]*)(")/;
|
|
60
|
+
const m = manifest.match(re);
|
|
61
|
+
if (!m)
|
|
62
|
+
return;
|
|
63
|
+
const from = m[2];
|
|
64
|
+
const range = from.match(/^([\^~]?)v?\d+\.\d+\.\d+\S*$/);
|
|
65
|
+
if (!range || !isVersion(version))
|
|
66
|
+
return { text: manifest, from, to: from };
|
|
67
|
+
const to = `${range[1]}${version}`;
|
|
68
|
+
return {
|
|
69
|
+
text: manifest.replace(re, (_m, head, _old, tail) => `${head}${to}${tail}`),
|
|
70
|
+
from,
|
|
71
|
+
to
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
usesRef,
|
|
76
|
+
tagSha,
|
|
77
|
+
repinWorkflow,
|
|
78
|
+
parseTagSha,
|
|
79
|
+
latestVersion,
|
|
80
|
+
kitRepoUrl,
|
|
81
|
+
isVersion,
|
|
82
|
+
bumpPin,
|
|
83
|
+
KIT_PACKAGE
|
|
84
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
defineCommand
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-6q43d787.js";
|
|
5
5
|
import"./cli-540nme4e.js";
|
|
6
6
|
import"./cli-5wasc5mr.js";
|
|
7
7
|
import"./cli-7wvrehng.js";
|
|
@@ -18,7 +18,7 @@ var kotlin_default = defineCommand({
|
|
|
18
18
|
kit kotlin run -m desktopApp
|
|
19
19
|
kit kotlin show settings -m androidApp`,
|
|
20
20
|
async run(ctx) {
|
|
21
|
-
const { requireProject } = await import("./command-
|
|
21
|
+
const { requireProject } = await import("./command-gtyznw30.js");
|
|
22
22
|
const { run } = await import("./proc-jv4bcyyx.js");
|
|
23
23
|
const { requireWrapper, WRAPPER } = await import("./toolchain-wd7hh812.js");
|
|
24
24
|
const { root, config } = requireProject(ctx);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installing shell completion from `kit init`. The script is written to a file once: fish autoloads
|
|
3
|
+
* it; zsh and bash source it from the rc file. Nothing runs `kit` when a shell starts, so a new
|
|
4
|
+
* terminal never executes the kit.config.ts of whatever repo it opens in.
|
|
5
|
+
*/
|
|
6
|
+
export type Shell = 'zsh' | 'bash' | 'fish';
|
|
7
|
+
export interface CompletionState {
|
|
8
|
+
shell: Shell;
|
|
9
|
+
/** The script file init writes. */
|
|
10
|
+
file: string;
|
|
11
|
+
/** The rc file that sources it (zsh, bash); fish needs none. */
|
|
12
|
+
rc?: string;
|
|
13
|
+
/** Why it is not installed now; undefined installs it. */
|
|
14
|
+
skip?: string;
|
|
15
|
+
}
|
|
16
|
+
/** The user's shell from `$SHELL`, when kit has a completion script for it. */
|
|
17
|
+
export declare function shellOf(shellPath: string | undefined): Shell | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Where completion goes. fish: its completions dir. zsh/bash: `<config>/kit/completion.<shell>`,
|
|
20
|
+
* sourced from `.zshrc`, or from `.bash_profile` on macOS (Terminal starts login shells) and
|
|
21
|
+
* `.bashrc` elsewhere.
|
|
22
|
+
*/
|
|
23
|
+
export declare function completionTargets(shell: Shell, env: Record<string, string | undefined>, home: string, platform?: NodeJS.Platform): {
|
|
24
|
+
script: string;
|
|
25
|
+
rc?: string;
|
|
26
|
+
};
|
|
27
|
+
/** The lines added to the rc file. zsh needs compinit before the script's `compdef`. */
|
|
28
|
+
export declare function rcSnippet(shell: Shell, script: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether completion is already set up. `current` is the rc file's text (zsh, bash) or anything
|
|
31
|
+
* defined when the fish file exists; a hand-added `source <(kit completion zsh)` counts.
|
|
32
|
+
*/
|
|
33
|
+
export declare function completionInstalled(current: string | undefined, rc: boolean): boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* kit's own release refs. Workflows pin kit's setup action and reusable workflows by commit SHA
|
|
3
|
+
* with the version in a trailing comment (`jordond/kit/…@<sha> # vX.Y.Z`); `kit doctor` compares
|
|
4
|
+
* that comment with the npm pin. `kit init` writes the pins and `kit upgrade` moves them.
|
|
5
|
+
*/
|
|
6
|
+
/** Overridable for tests (a local bare repo). */
|
|
7
|
+
export declare const kitRepoUrl: () => string;
|
|
8
|
+
/** Commit SHA of tag `v<version>` in `ls-remote` output; the peeled line of an annotated tag wins. */
|
|
9
|
+
export declare function parseTagSha(lsRemote: string, version: string): string | undefined;
|
|
10
|
+
/** The commit `v<version>` points at, from kit's GitHub repo; undefined offline or for an untagged version. */
|
|
11
|
+
export declare function tagSha(version: string): Promise<string | undefined>;
|
|
12
|
+
/** What follows `@` in a `uses:` line. Without a SHA the tag itself is the ref. */
|
|
13
|
+
export declare function usesRef(version: string, sha: string | undefined): string;
|
|
14
|
+
/** Every `jordond/kit/…@<ref> # vX.Y.Z` in a workflow moved to `sha` and `version`. */
|
|
15
|
+
export declare function repinWorkflow(text: string, version: string, sha: string): {
|
|
16
|
+
text: string;
|
|
17
|
+
count: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const KIT_PACKAGE = "@jordond/kit";
|
|
20
|
+
/** A plain semver version: `1.2.3`, `1.2.3-rc.1`, `1.2.3+build`. */
|
|
21
|
+
export declare const isVersion: (v: string) => boolean;
|
|
22
|
+
/** Latest published version, from the npm registry (`KIT_REGISTRY` overrides the URL for tests). */
|
|
23
|
+
export declare function latestVersion(): Promise<string | undefined>;
|
|
24
|
+
export interface PinEdit {
|
|
25
|
+
/** The manifest with the new range; equal to the input when the pin is already there. */
|
|
26
|
+
text: string;
|
|
27
|
+
from: string;
|
|
28
|
+
to: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Move the `@jordond/kit` range in a package.json to `version`, keeping its operator (`^`, `~` or
|
|
32
|
+
* none) and the file's formatting. Undefined when there is no pin; `from` without a semver range
|
|
33
|
+
* (`file:`, `workspace:`, a tag) comes back unchanged, for the caller to refuse.
|
|
34
|
+
*/
|
|
35
|
+
export declare function bumpPin(manifest: string, version: string): PinEdit | undefined;
|