@jordond/kit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/kit +39 -0
- package/dist/_verb-espppzez.js +115 -0
- package/dist/android-g73naxgg.js +31 -0
- package/dist/build-88hxf0kc.js +42 -0
- package/dist/check-7mndz8g8.js +54 -0
- package/dist/check-ngc4kzmj.js +33 -0
- package/dist/cleanup-hrcvxmh2.js +18 -0
- package/dist/cli/builtins.d.ts +13 -0
- package/dist/cli/command.d.ts +86 -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-07t28k94.js +30 -0
- package/dist/cli-12dww95e.js +195 -0
- package/dist/cli-5d61x8vg.js +675 -0
- package/dist/cli-5wasc5mr.js +76 -0
- package/dist/cli-6dxp4v3m.js +73 -0
- package/dist/cli-7wvrehng.js +23 -0
- package/dist/cli-bam7dqfd.js +33 -0
- package/dist/cli-fqfan92n.js +135 -0
- package/dist/cli-fqxtcj42.js +75 -0
- package/dist/cli-h974q2wr.js +2019 -0
- package/dist/cli-m53122z6.js +221 -0
- package/dist/cli-qhs8ww91.js +51 -0
- package/dist/cli-qq1ktr8q.js +234 -0
- package/dist/cli-rds33bnp.js +101 -0
- package/dist/cli-re3ntm60.js +48 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +35 -0
- package/dist/cloudflare-n5c46k6x.js +43 -0
- package/dist/command-gazq4bmt.js +19 -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/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 +13 -0
- package/dist/commands/deps.d.ts +72 -0
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/doctor.d.ts +56 -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 +12 -0
- package/dist/commands/env/sync.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 +53 -0
- package/dist/commands/lint.d.ts +12 -0
- package/dist/commands/release/android.d.ts +13 -0
- package/dist/commands/release/ios.d.ts +13 -0
- package/dist/commands/test.d.ts +2 -0
- package/dist/commands/typecheck.d.ts +2 -0
- package/dist/commands/wrangler.d.ts +4 -0
- package/dist/commands/xcode.d.ts +8 -0
- package/dist/config/load.d.ts +6 -0
- package/dist/config/schema.d.ts +135 -0
- package/dist/config-ey5yrrfn.js +22 -0
- package/dist/create-7s8h3dja.js +38 -0
- package/dist/deploy-8mg1zhpb.js +102 -0
- package/dist/deps-97dq4mg8.js +334 -0
- package/dist/dev-yc9xmntj.js +62 -0
- package/dist/doctor-0wzmfyyh.js +324 -0
- package/dist/errors-1fjbr7ee.js +10 -0
- package/dist/exec-1k3sqwxz.js +53 -0
- package/dist/format-mnqfak22.js +39 -0
- package/dist/git-52v5rk51.js +80 -0
- package/dist/gradle-gtkf3geq.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 +10 -0
- package/dist/index.js +50 -0
- package/dist/init-0402av4m.js +78 -0
- package/dist/init-dk5sym9w.js +76 -0
- package/dist/init-qr7y55ea.js +185 -0
- package/dist/ios-msg4bk15.js +31 -0
- package/dist/lib/cleanup.d.ts +21 -0
- package/dist/lib/cloudflare.d.ts +96 -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 +49 -0
- package/dist/lib/env/schema.d.ts +49 -0
- package/dist/lib/errors.d.ts +14 -0
- package/dist/lib/git.d.ts +36 -0
- package/dist/lib/log.d.ts +11 -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/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-280dpn4y.js +39 -0
- package/dist/list-jdc3dqk0.js +34 -0
- package/dist/load-5qzs1c6b.js +137 -0
- package/dist/log-hhspqwjw.js +11 -0
- package/dist/main-ywtsjxev.js +2052 -0
- package/dist/migrate-emk758k1.js +35 -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-v510j04z.js +93 -0
- package/dist/push-4z70h3d8.js +117 -0
- package/dist/push-xzqw218t.js +117 -0
- package/dist/render-488tjnsq.js +22 -0
- package/dist/sync-wc4jpmkj.js +53 -0
- package/dist/targets-hbwxv97d.js +22 -0
- package/dist/test-198w46m4.js +26 -0
- package/dist/toml-zbhtxjh1.js +1062 -0
- package/dist/typecheck-e86e6yg1.js +24 -0
- package/dist/wrangler-0ctx1p3w.js +66 -0
- package/dist/xcode-g44qh2rc.js +60 -0
- package/fastlane/Fastfile +413 -0
- package/fastlane/Gemfile +21 -0
- package/fastlane/Gemfile.lock +275 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar +0 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.jar.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module +64 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.module.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom +12 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-plugins/0.1.0/kit-plugins-0.1.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.1.0/kit-settings-0.1.0.jar +0 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.jar.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module +64 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.module.sha512 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom +12 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/kit-settings/0.1.0/kit-settings-0.1.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/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/release/io.github.jordond.kit.release.gradle.plugin/0.1.0/io.github.jordond.kit.release.gradle.plugin-0.1.0.pom.sha512 +1 -0
- 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.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom +15 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.md5 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha1 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha256 +1 -0
- package/gradle/maven/io/github/jordond/kit/settings/io.github.jordond.kit.settings.gradle.plugin/0.1.0/io.github.jordond.kit.settings.gradle.plugin-0.1.0.pom.sha512 +1 -0
- 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/README.md +0 -3
package/dist/cli.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__require
|
|
4
|
+
} from "./cli-re3ntm60.js";
|
|
5
|
+
|
|
6
|
+
// src/cli.ts
|
|
7
|
+
var argv = process.argv;
|
|
8
|
+
var stop = argv.indexOf("--");
|
|
9
|
+
var take = (flag, withValue = false) => {
|
|
10
|
+
for (let i = 2;i < (stop < 0 ? argv.length : stop); i++) {
|
|
11
|
+
const a = argv[i];
|
|
12
|
+
if (a === flag) {
|
|
13
|
+
const value = withValue ? argv[i + 1] : undefined;
|
|
14
|
+
argv.splice(i, withValue ? 2 : 1);
|
|
15
|
+
return withValue ? value : true;
|
|
16
|
+
}
|
|
17
|
+
if (withValue && a.startsWith(`${flag}=`)) {
|
|
18
|
+
argv.splice(i, 1);
|
|
19
|
+
return a.slice(flag.length + 1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return;
|
|
23
|
+
};
|
|
24
|
+
var noColor = take("--no-color");
|
|
25
|
+
if (!process.env.FORCE_COLOR && (noColor || !process.stderr.isTTY || process.env.TERM === "dumb")) {
|
|
26
|
+
process.env.NO_COLOR = "1";
|
|
27
|
+
}
|
|
28
|
+
if (take("--no-input"))
|
|
29
|
+
process.env.KIT_NO_INPUT = "1";
|
|
30
|
+
var cwd = take("--cwd", true);
|
|
31
|
+
if (typeof cwd === "string") {
|
|
32
|
+
process.chdir(cwd);
|
|
33
|
+
delete process.env.KIT_ROOT;
|
|
34
|
+
}
|
|
35
|
+
await import("./main-ywtsjxev.js");
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
WRANGLER_FILES,
|
|
4
|
+
accountTarget,
|
|
5
|
+
d1Args,
|
|
6
|
+
dbArgs,
|
|
7
|
+
locality,
|
|
8
|
+
parseSecretNames,
|
|
9
|
+
pinCloudflareAccount,
|
|
10
|
+
readAccountId,
|
|
11
|
+
remoteArg,
|
|
12
|
+
resolveAccountId,
|
|
13
|
+
resolveD1,
|
|
14
|
+
runD1,
|
|
15
|
+
sqlString,
|
|
16
|
+
stripJsonc,
|
|
17
|
+
wrangler,
|
|
18
|
+
wranglerSecretPut
|
|
19
|
+
} from "./cli-m53122z6.js";
|
|
20
|
+
import"./cli-bam7dqfd.js";
|
|
21
|
+
import"./cli-qhs8ww91.js";
|
|
22
|
+
import"./cli-fqfan92n.js";
|
|
23
|
+
import"./cli-fqxtcj42.js";
|
|
24
|
+
import"./cli-7wvrehng.js";
|
|
25
|
+
import"./cli-re3ntm60.js";
|
|
26
|
+
export {
|
|
27
|
+
wranglerSecretPut,
|
|
28
|
+
wrangler,
|
|
29
|
+
stripJsonc,
|
|
30
|
+
sqlString,
|
|
31
|
+
runD1,
|
|
32
|
+
resolveD1,
|
|
33
|
+
resolveAccountId,
|
|
34
|
+
remoteArg,
|
|
35
|
+
readAccountId,
|
|
36
|
+
pinCloudflareAccount,
|
|
37
|
+
parseSecretNames,
|
|
38
|
+
locality,
|
|
39
|
+
dbArgs,
|
|
40
|
+
d1Args,
|
|
41
|
+
accountTarget,
|
|
42
|
+
WRANGLER_FILES
|
|
43
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
computeFlags,
|
|
4
|
+
defineCommand,
|
|
5
|
+
globalArgs,
|
|
6
|
+
requireProject,
|
|
7
|
+
toGunshi
|
|
8
|
+
} from "./cli-6dxp4v3m.js";
|
|
9
|
+
import"./cli-07t28k94.js";
|
|
10
|
+
import"./cli-5wasc5mr.js";
|
|
11
|
+
import"./cli-7wvrehng.js";
|
|
12
|
+
import"./cli-re3ntm60.js";
|
|
13
|
+
export {
|
|
14
|
+
toGunshi,
|
|
15
|
+
requireProject,
|
|
16
|
+
globalArgs,
|
|
17
|
+
defineCommand,
|
|
18
|
+
computeFlags
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type KitContext } from '../cli/command';
|
|
2
|
+
import type { Verb } from '../config/schema';
|
|
3
|
+
import { type PlanOptions } from '../lib/targets';
|
|
4
|
+
export interface VerbRun {
|
|
5
|
+
/** Name shown in the summary (`check`, `lint --fix`). */
|
|
6
|
+
name: string;
|
|
7
|
+
verbs: Verb[];
|
|
8
|
+
plan?: Omit<PlanOptions, 'targets' | 'extra'>;
|
|
9
|
+
/** Shown under a failure. */
|
|
10
|
+
hint?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Shared body of lint/format/typecheck/check/test/build: plan, run as a tree, summarize, exit code. */
|
|
13
|
+
export declare function runVerb(ctx: KitContext, v: VerbRun): Promise<void>;
|
|
14
|
+
/** One target for `dev` and `deploy`. */
|
|
15
|
+
export declare function singleTarget(ctx: KitContext, verb: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("..").KitCommand<{
|
|
2
|
+
readonly release: {
|
|
3
|
+
readonly type: "boolean";
|
|
4
|
+
readonly description: "Gradle: the signed release bundle (AAB)";
|
|
5
|
+
};
|
|
6
|
+
readonly apk: {
|
|
7
|
+
readonly type: "boolean";
|
|
8
|
+
readonly description: "Gradle: the signed release APK";
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import("../..").KitCommand<{
|
|
2
|
+
readonly db: {
|
|
3
|
+
readonly type: 'string';
|
|
4
|
+
readonly description: 'cloudflare.d1 key or database name (default: the only one)';
|
|
5
|
+
};
|
|
6
|
+
readonly remote: {
|
|
7
|
+
readonly type: 'boolean';
|
|
8
|
+
readonly description: 'Deployed D1 (default: local)';
|
|
9
|
+
};
|
|
10
|
+
readonly file: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly short: "f";
|
|
13
|
+
readonly description: "Run a .sql file instead of a statement";
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("../..").KitCommand<{
|
|
2
|
+
readonly db: {
|
|
3
|
+
readonly type: 'string';
|
|
4
|
+
readonly description: 'cloudflare.d1 key or database name (default: the only one)';
|
|
5
|
+
};
|
|
6
|
+
readonly remote: {
|
|
7
|
+
readonly type: 'boolean';
|
|
8
|
+
readonly description: 'Deployed D1 (default: local)';
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("../..").KitCommand<{
|
|
2
|
+
readonly db: {
|
|
3
|
+
readonly type: 'string';
|
|
4
|
+
readonly description: 'cloudflare.d1 key or database name (default: the only one)';
|
|
5
|
+
};
|
|
6
|
+
readonly remote: {
|
|
7
|
+
readonly type: 'boolean';
|
|
8
|
+
readonly description: 'Deployed D1 (default: local)';
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { KitConfig } from '../config/schema';
|
|
2
|
+
/** Validate `--env` against `targets.<t>.envs`. */
|
|
3
|
+
export declare function checkEnv(config: KitConfig, name: string, env: string | undefined): string | undefined;
|
|
4
|
+
/** `deploy.before` entries are kit commands (`env sync`), run as child kit processes. */
|
|
5
|
+
export declare function beforeCommands(config: KitConfig, name: string): string[][];
|
|
6
|
+
declare const _default: import("..").KitCommand<{
|
|
7
|
+
readonly env: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly short: "e";
|
|
10
|
+
readonly description: "Environment (when the target has envs)";
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kit deps [update|latest]`, ported from brewd `cli deps` (+ `lib/manifests.ts`). What is out of
|
|
3
|
+
* date across the bun workspace, and the two ways to move: `update` stays inside the declared
|
|
4
|
+
* ranges (bun.lock only), `latest` rewrites the ranges themselves, the catalog entry first.
|
|
5
|
+
* Both defend the root manifest's `catalog:` references, which `bun update` unpins.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CATALOG_REF = "catalog:";
|
|
8
|
+
export declare const CATALOG_FIELD = "catalog";
|
|
9
|
+
export declare const DEPENDENCY_FIELDS: readonly ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'];
|
|
10
|
+
export type DependencyField = (typeof DEPENDENCY_FIELDS)[number];
|
|
11
|
+
type DependencyMap = Record<string, string>;
|
|
12
|
+
export interface PackageManifest {
|
|
13
|
+
workspaces?: string[] | {
|
|
14
|
+
packages?: string[];
|
|
15
|
+
catalog?: DependencyMap;
|
|
16
|
+
};
|
|
17
|
+
catalog?: DependencyMap;
|
|
18
|
+
dependencies?: DependencyMap;
|
|
19
|
+
devDependencies?: DependencyMap;
|
|
20
|
+
peerDependencies?: DependencyMap;
|
|
21
|
+
optionalDependencies?: DependencyMap;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface CatalogRef {
|
|
25
|
+
readonly field: DependencyField;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RangeChange {
|
|
29
|
+
readonly field: DependencyField | typeof CATALOG_FIELD;
|
|
30
|
+
readonly from: string;
|
|
31
|
+
readonly to: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function readManifest(path: string): PackageManifest;
|
|
34
|
+
export declare function writeManifest(path: string, manifest: PackageManifest): void;
|
|
35
|
+
/** The workspace catalog: `workspaces.catalog`, or a top-level `catalog` (both are bun's). */
|
|
36
|
+
export declare function catalogOf(manifest: PackageManifest): DependencyMap | undefined;
|
|
37
|
+
/** Member globs from `workspaces` (array or `{ packages }`). */
|
|
38
|
+
export declare function workspaceGlobs(manifest: PackageManifest): string[];
|
|
39
|
+
export declare function catalogRefs(manifest: PackageManifest): CatalogRef[];
|
|
40
|
+
/**
|
|
41
|
+
* Bun's `bun update` rewrites the **root** manifest's `catalog:` pins into the literal version it
|
|
42
|
+
* just resolved (workspace members keep theirs). Put back the pins that were there before.
|
|
43
|
+
*/
|
|
44
|
+
export declare function restoreCatalogRefs(manifest: PackageManifest, refs: readonly CatalogRef[]): string[];
|
|
45
|
+
/** The range for a bumped dependency, spelled like the current one: caret stays caret, exact stays exact. */
|
|
46
|
+
export declare function nextRange(current: string, latest: string): string;
|
|
47
|
+
export declare function setCatalogRange(manifest: PackageManifest, name: string, latest: string): RangeChange | undefined;
|
|
48
|
+
/** Every field of one manifest that names `name` with a literal range. `catalog:` and `workspace:` are references. */
|
|
49
|
+
export declare function setDeclaredRange(manifest: PackageManifest, name: string, latest: string): RangeChange[];
|
|
50
|
+
/** The root manifest and each workspace member's, as absolute paths. */
|
|
51
|
+
export declare function manifestPaths(root: string): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Packages `bun outdated` lists with a newer version their declared range already allows. `(dev)`
|
|
54
|
+
* is the table's annotation, not part of the name.
|
|
55
|
+
*/
|
|
56
|
+
export declare function inRangeOutdated(table: string): string[];
|
|
57
|
+
/** `bun outdated`'s table as rows keyed by its lower-cased header (`package`, `current`, `update`, …). */
|
|
58
|
+
export declare function outdatedRows(table: string): Record<string, string>[];
|
|
59
|
+
export interface OpenManifest {
|
|
60
|
+
readonly path: string;
|
|
61
|
+
readonly manifest: PackageManifest;
|
|
62
|
+
}
|
|
63
|
+
export interface PlannedEdit {
|
|
64
|
+
readonly path: string;
|
|
65
|
+
readonly name: string;
|
|
66
|
+
readonly change: RangeChange;
|
|
67
|
+
}
|
|
68
|
+
/** Bump `name` to `latest` wherever the workspace declares its version. Edits in place, so two
|
|
69
|
+
* packages that share one file (the catalog) both survive the write. */
|
|
70
|
+
export declare function planEdits(files: readonly OpenManifest[], name: string, latest: string): PlannedEdit[];
|
|
71
|
+
declare const _default: import("..").KitCommand<import("gunshi").Args>;
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kit doctor`: one line per check on stderr (✔ ok, ▲ warning, ✖ failure), `--json` on stdout.
|
|
3
|
+
* Each check is a pure function over what the run probed, so the rules are unit-tested without the
|
|
4
|
+
* tools. A tool the project needs (java for a Gradle root, Xcode for an iOS release, …) fails; one
|
|
5
|
+
* it doesn't need only warns. Any failure exits 4.
|
|
6
|
+
*/
|
|
7
|
+
export type Status = 'ok' | 'warn' | 'fail' | 'skip';
|
|
8
|
+
export interface Check {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
status: Status;
|
|
12
|
+
detail?: string;
|
|
13
|
+
hint?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Output of a probed command; undefined when the binary is not on PATH. */
|
|
16
|
+
export type Probe = {
|
|
17
|
+
code: number;
|
|
18
|
+
output: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
export declare const MIN_JAVA = 21;
|
|
21
|
+
export declare function checkBun(version: string): Check;
|
|
22
|
+
/** `java -version` → '21.0.2' (and '1.8.0_292' → '8'). */
|
|
23
|
+
export declare function parseJavaVersion(output: string): string | undefined;
|
|
24
|
+
export declare function checkJava(probe: Probe, required: boolean): Check;
|
|
25
|
+
export declare function checkRuby(probe: Probe, required: boolean): Check;
|
|
26
|
+
export declare function checkXcode(probe: Probe, required: boolean, platform: string): Check;
|
|
27
|
+
/** ANDROID_HOME / ANDROID_SDK_ROOT, or `sdk.dir` in the Gradle root's local.properties (brewd init). */
|
|
28
|
+
export declare function checkAndroidSdk(env: Record<string, string | undefined>, localProperties: string | undefined, exists: (path: string) => boolean, required: boolean): Check;
|
|
29
|
+
/** `wrangler whoami`; undefined when the repo has no worker target. */
|
|
30
|
+
export declare function checkWranglerLogin(probe: Probe | 'skip'): Check;
|
|
31
|
+
/** `[tools]` of mise.toml → tool → version spec (`"21"`, `["21", "17"]`, `{ version = "21" }`). */
|
|
32
|
+
export declare function parseMiseTools(tools: unknown): Record<string, string>;
|
|
33
|
+
/** `"21"` matches `21.0.2`; `"temurin-21"` too; `latest`/`lts` always match. */
|
|
34
|
+
export declare function versionMatches(spec: string, actual: string): boolean;
|
|
35
|
+
export declare function checkMise(tools: Record<string, string> | undefined, detected: Record<string, string | undefined>): Check;
|
|
36
|
+
/** A project file kit reads (mise.toml, package.json) that does not parse: a failure, not a crash. */
|
|
37
|
+
export declare function checkUnreadable(id: string, label: string, file: string, error: unknown): Check;
|
|
38
|
+
/** Key names in a dotenv file. */
|
|
39
|
+
export declare function parseEnvKeys(text: string): string[];
|
|
40
|
+
/** `.env` has every key `.env.example` names (names only; values are never read into the result). */
|
|
41
|
+
export declare function checkEnvFile(example: string | undefined, env: string | undefined): Check;
|
|
42
|
+
/**
|
|
43
|
+
* Workflow `uses: jordond/kit/…@<sha> # vX.Y.Z` pins vs the package.json pin. The SHA itself isn't
|
|
44
|
+
* resolved (stub): the version comment Renovate keeps next to it is compared instead.
|
|
45
|
+
*/
|
|
46
|
+
export declare function checkCiPin(workflows: {
|
|
47
|
+
file: string;
|
|
48
|
+
text: string;
|
|
49
|
+
}[], pin: string | undefined, strict: boolean): Check;
|
|
50
|
+
declare const _default: import("..").KitCommand<{
|
|
51
|
+
readonly ci: {
|
|
52
|
+
readonly type: "boolean";
|
|
53
|
+
readonly description: "Fail when CI workflow pins drift from the package.json pin";
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("../..").KitCommand<{
|
|
2
|
+
readonly target: {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly short: "t";
|
|
5
|
+
readonly description: "Only this worker target (env.workerSecrets)";
|
|
6
|
+
};
|
|
7
|
+
readonly github: {
|
|
8
|
+
readonly type: "boolean";
|
|
9
|
+
readonly description: "Push env.githubSecrets with gh";
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("..").KitCommand<{
|
|
2
|
+
readonly check: {
|
|
3
|
+
readonly type: "boolean";
|
|
4
|
+
readonly description: "Check only (runs each target's lint command)";
|
|
5
|
+
};
|
|
6
|
+
readonly staged: {
|
|
7
|
+
readonly type: "boolean";
|
|
8
|
+
readonly description: "Only targets with staged files; workspace commands get the files";
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { KitConfig } from '../config/schema';
|
|
2
|
+
import type { PackageManager } from '../lib/pm';
|
|
3
|
+
/**
|
|
4
|
+
* `kit init`, existing-repo mode (brewd `cli init` + WhaleSay `ws init`, generalized): `.env` from
|
|
5
|
+
* `.env.example`, install, optional mise/lefthook scaffolds, `kit env sync`, `wrangler types`.
|
|
6
|
+
* Idempotent: whatever is already there is skipped. Every step runs even after a failure, so one
|
|
7
|
+
* pass surfaces every problem; the exit code is 1 if any failed. New-repo scaffolding is Phase 2.
|
|
8
|
+
*/
|
|
9
|
+
export type Scaffold = 'mise' | 'lefthook';
|
|
10
|
+
export declare const SCAFFOLDS: Record<Scaffold, {
|
|
11
|
+
file: string;
|
|
12
|
+
alt: string[];
|
|
13
|
+
template: string;
|
|
14
|
+
}>;
|
|
15
|
+
export interface InitState {
|
|
16
|
+
root: string;
|
|
17
|
+
config: KitConfig | undefined;
|
|
18
|
+
exists: (repoPath: string) => boolean;
|
|
19
|
+
pm: PackageManager;
|
|
20
|
+
/** Scaffolds the user accepted (or `--yes` did). */
|
|
21
|
+
accepted: Scaffold[];
|
|
22
|
+
/** Why a missing scaffold isn't written, when nobody could be asked. */
|
|
23
|
+
declinedReason?: string;
|
|
24
|
+
/** argv prefix that runs this kit (`bun --no-env-file …/cli.ts`). */
|
|
25
|
+
self: string[];
|
|
26
|
+
/** A node_modules binary run with the package manager of `cwd` (`bun x wrangler …`). */
|
|
27
|
+
exec: (cwd: string, bin: string, ...args: string[]) => string[];
|
|
28
|
+
}
|
|
29
|
+
export type InitAction = {
|
|
30
|
+
kind: 'env-file';
|
|
31
|
+
title: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'scaffold';
|
|
34
|
+
title: string;
|
|
35
|
+
scaffold: Scaffold;
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'cmd';
|
|
38
|
+
title: string;
|
|
39
|
+
cmd: string[];
|
|
40
|
+
cwd: string;
|
|
41
|
+
env?: Record<string, string>;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'skip';
|
|
44
|
+
title: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
};
|
|
47
|
+
/** What init would do, in order. Pure: everything it reads comes in through `state`. */
|
|
48
|
+
export declare function planInit(s: InitState): InitAction[];
|
|
49
|
+
/** kit's package root (templates live there), from src/commands or dist/. */
|
|
50
|
+
export declare function kitPackageRoot(from?: string): string;
|
|
51
|
+
export declare function renderTemplate(text: string, vars: Record<string, string>): string;
|
|
52
|
+
declare const _default: import("..").KitCommand<import("gunshi").Args>;
|
|
53
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("..").KitCommand<{
|
|
2
|
+
readonly fix: {
|
|
3
|
+
readonly type: "boolean";
|
|
4
|
+
readonly short: "f";
|
|
5
|
+
readonly description: "Apply fixes (runs each target's format command)";
|
|
6
|
+
};
|
|
7
|
+
readonly staged: {
|
|
8
|
+
readonly type: "boolean";
|
|
9
|
+
readonly description: "Only targets with staged files; workspace commands get the files";
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("../..").KitCommand<{
|
|
2
|
+
readonly track: {
|
|
3
|
+
readonly type: "enum";
|
|
4
|
+
readonly choices: ["internal", "alpha", "beta", "prod"];
|
|
5
|
+
readonly required: true;
|
|
6
|
+
readonly description: "Store track";
|
|
7
|
+
};
|
|
8
|
+
readonly build: {
|
|
9
|
+
readonly type: "number";
|
|
10
|
+
readonly description: "Override the store build number";
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("../..").KitCommand<{
|
|
2
|
+
readonly track: {
|
|
3
|
+
readonly type: "enum";
|
|
4
|
+
readonly choices: ["internal", "alpha", "beta", "prod"];
|
|
5
|
+
readonly required: true;
|
|
6
|
+
readonly description: "Store track";
|
|
7
|
+
};
|
|
8
|
+
readonly build: {
|
|
9
|
+
readonly type: "number";
|
|
10
|
+
readonly description: "Override the store build number";
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** `kit wrangler --help`: arguments pass through, so kit's own help never sees a leading flag. */
|
|
2
|
+
export declare function wranglerUsage(workers: string[] | undefined): string;
|
|
3
|
+
declare const _default: import("..").KitCommand<import("gunshi").Args>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { KitConfig } from '../config/schema';
|
|
2
|
+
/**
|
|
3
|
+
* The iOS project to open, repo-relative: `release.ios.project`, else the first workspace (then
|
|
4
|
+
* project) under `<gradle root>/ios`. A workspace wins so CocoaPods setups open whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare function findIosProject(root: string, config: KitConfig): string | undefined;
|
|
7
|
+
declare const _default: import("..").KitCommand<import("gunshi").Args>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type KitConfig } from './schema';
|
|
2
|
+
export declare const CONFIG_FILE = "kit.config.ts";
|
|
3
|
+
export declare function findRoot(from?: string): string | undefined;
|
|
4
|
+
/** Load `<root>/.env` into process.env without overriding values already set. */
|
|
5
|
+
export declare function loadDotEnv(root: string): Promise<void>;
|
|
6
|
+
export declare function loadConfig(root: string): Promise<KitConfig>;
|