kitcn 0.12.0 → 0.12.1
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/dist/cli.mjs
CHANGED
|
@@ -9465,6 +9465,7 @@ async function runScaffoldCommandFlow(params) {
|
|
|
9465
9465
|
allowCodegenBootstrapFallback: params.allowCodegenBootstrapFallback ?? true,
|
|
9466
9466
|
config: initPlan.config,
|
|
9467
9467
|
backend,
|
|
9468
|
+
yes: params.yes,
|
|
9468
9469
|
sharedDir: initPlan.config.paths.shared,
|
|
9469
9470
|
debug: initPlan.config.codegen.debug,
|
|
9470
9471
|
generateMetaFn: params.generateMetaFn,
|
|
@@ -9964,6 +9965,9 @@ function buildCodegenBootstrapArgs(targetArgs) {
|
|
|
9964
9965
|
function didConvexInitCreateConfiguration(output) {
|
|
9965
9966
|
return CONVEX_INIT_CREATED_CONFIG_RE.test(output);
|
|
9966
9967
|
}
|
|
9968
|
+
function hasRemoteConvexInitTargetArgs(targetArgs) {
|
|
9969
|
+
return targetArgs?.some((arg) => arg === "--prod" || arg === "--preview-name" || arg === "--deployment-name") ?? false;
|
|
9970
|
+
}
|
|
9967
9971
|
async function runConvexInitIfNeeded(params) {
|
|
9968
9972
|
if (params.backendAdapter.publicName !== "convex") return {
|
|
9969
9973
|
created: false,
|
|
@@ -9971,13 +9975,17 @@ async function runConvexInitIfNeeded(params) {
|
|
|
9971
9975
|
stdout: "",
|
|
9972
9976
|
stderr: ""
|
|
9973
9977
|
};
|
|
9978
|
+
const shouldUseAnonymousAgentMode = params.yes && !hasRemoteConvexInitTargetArgs(params.targetArgs);
|
|
9974
9979
|
const result = normalizeConvexCommandResult(await params.execaFn(params.backendAdapter.command, [
|
|
9975
9980
|
...params.backendAdapter.argsPrefix,
|
|
9976
9981
|
"init",
|
|
9977
9982
|
...params.targetArgs ?? []
|
|
9978
9983
|
], {
|
|
9979
9984
|
cwd: process.cwd(),
|
|
9980
|
-
env: createBackendCommandEnv(
|
|
9985
|
+
env: createBackendCommandEnv({
|
|
9986
|
+
...params.env,
|
|
9987
|
+
CONVEX_AGENT_MODE: shouldUseAnonymousAgentMode ? "anonymous" : params.env?.CONVEX_AGENT_MODE
|
|
9988
|
+
}),
|
|
9981
9989
|
reject: false,
|
|
9982
9990
|
stdio: "pipe"
|
|
9983
9991
|
}));
|
|
@@ -10083,6 +10091,7 @@ async function runInitializationCodegen(params) {
|
|
|
10083
10091
|
const initResult = await runConvexInitIfNeeded({
|
|
10084
10092
|
execaFn: params.execaFn,
|
|
10085
10093
|
backendAdapter: runtimeAdapter,
|
|
10094
|
+
yes: params.yes,
|
|
10086
10095
|
targetArgs: params.targetArgs
|
|
10087
10096
|
});
|
|
10088
10097
|
if (initResult.exitCode !== 0) throw new Error(`Failed to configure Convex project via \`convex init\`.\n${`${initResult.stdout}\n${initResult.stderr}`.trim()}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "kitcn - React Query integration and CLI tools for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"picocolors": "^1.1.1",
|
|
72
72
|
"remeda": "^2.33.6",
|
|
73
73
|
"svix": "^1.84.1",
|
|
74
|
+
"typescript": "5.9.3",
|
|
74
75
|
"type-fest": "^5.4.4"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
@@ -91,7 +91,9 @@ bunx kitcn init -t next --yes
|
|
|
91
91
|
|
|
92
92
|
Then start the long-running backend with `bunx kitcn dev`, run the
|
|
93
93
|
framework dev server (`bun dev` for the Next starter), and open `/convex` for
|
|
94
|
-
the scaffolded messages demo.
|
|
94
|
+
the scaffolded messages demo. In `--yes` mode, kitcn provisions an anonymous
|
|
95
|
+
local Convex deployment when no account is linked yet, so the starter path does
|
|
96
|
+
not stop on a login prompt.
|
|
95
97
|
|
|
96
98
|
Use the CLI first:
|
|
97
99
|
|