kitcn 0.13.3 → 0.13.5

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.
@@ -4,7 +4,7 @@ import { i as defineAuth, n as createDisabledAuthRuntime, r as getGeneratedAuthD
4
4
  import { n as createGeneratedFunctionReference, o as isQueryCtx, s as isRunMutationCtx } from "../api-entry-N3nBOlI2.js";
5
5
  import { n as customCtx, r as customMutation } from "../customFunctions-DxEEO4Dq.js";
6
6
  import { a as mergedStream, l as unsetToken, o as stream, t as getByIdWithOrmQueryFallback, v as eq } from "../query-context-ydn9kb6P.js";
7
- import { n as convex } from "../convex-plugin-C3N9BB-J.js";
7
+ import { n as convex } from "../convex-plugin-CVdfB0MA.js";
8
8
  import { v } from "convex/values";
9
9
  import { internalActionGeneric, internalMutationGeneric, internalQueryGeneric, paginationOptsValidator } from "convex/server";
10
10
  import { createAdapterFactory } from "better-auth/adapters";
@@ -1,4 +1,4 @@
1
- import { t as getToken } from "../../token-tpipF-7y.js";
1
+ import { t as getToken } from "../../token-B5i4LfQA.js";
2
2
  import { n as defaultIsUnauthorized } from "../../error-Bvo7YEhk.js";
3
3
  import { t as createCallerFactory } from "../../caller-factory-NEfgD5E0.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import { t as getToken } from "../../token-tpipF-7y.js";
1
+ import { t as getToken } from "../../token-B5i4LfQA.js";
2
2
  import { stripIndent } from "common-tags";
3
3
  import { ConvexHttpClient } from "convex/browser";
4
4
  import React from "react";
@@ -16297,8 +16297,11 @@ async function runAggregateBackfillFlow(params) {
16297
16297
  return 0;
16298
16298
  }
16299
16299
  async function runAggregatePruneFlow(params) {
16300
- const { execaFn, backendAdapter, targetArgs } = params;
16301
- const result = await runBackendFunction(execaFn, backendAdapter, "generated/server:aggregateBackfill", { mode: "prune" }, targetArgs, { echoOutput: false });
16300
+ const { execaFn, backendAdapter, targetArgs, env } = params;
16301
+ const result = await runBackendFunction(execaFn, backendAdapter, "generated/server:aggregateBackfill", { mode: "prune" }, targetArgs, {
16302
+ echoOutput: false,
16303
+ env
16304
+ });
16302
16305
  if (result.exitCode !== 0) return result.exitCode;
16303
16306
  const payload = parseBackendRunJson(result.stdout);
16304
16307
  const pruned = typeof payload === "object" && payload !== null && !Array.isArray(payload) && typeof payload.pruned === "number" ? payload.pruned : 0;
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-BV61sNRx.mjs";
2
+ import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-D2a2poAE.mjs";
3
3
  import fs, { existsSync, readFileSync } from "node:fs";
4
4
  import path, { delimiter, dirname, join, relative, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1571,6 +1571,7 @@ const handleAggregateCommand = async (argv, deps = {}) => {
1571
1571
  realConvexPath,
1572
1572
  realConcavePath
1573
1573
  });
1574
+ const commandEnv = backend === "convex" ? getConvexDeploymentCommandEnv() : void 0;
1574
1575
  const { remainingArgs: aggregateCommandArgs, overrides: aggregateBackfillOverrides } = extractBackfillCliOptions(parsed.restArgs.slice(1));
1575
1576
  const aggregateArgs = [...config.deploy.args, ...aggregateCommandArgs];
1576
1577
  const backfillConfig = {
@@ -1581,7 +1582,8 @@ const handleAggregateCommand = async (argv, deps = {}) => {
1581
1582
  if (subcommand === "prune") return runAggregatePruneFlow({
1582
1583
  execaFn,
1583
1584
  backendAdapter,
1584
- targetArgs
1585
+ targetArgs,
1586
+ env: commandEnv
1585
1587
  });
1586
1588
  return runAggregateBackfillFlow({
1587
1589
  execaFn,
@@ -1589,6 +1591,7 @@ const handleAggregateCommand = async (argv, deps = {}) => {
1589
1591
  backfillConfig,
1590
1592
  mode: subcommand === "rebuild" ? "rebuild" : "resume",
1591
1593
  targetArgs,
1594
+ env: commandEnv,
1592
1595
  context: "aggregate"
1593
1596
  });
1594
1597
  };
@@ -2342,6 +2345,7 @@ const handleMigrateCommand = async (argv, deps = {}) => {
2342
2345
  realConvexPath,
2343
2346
  realConcavePath
2344
2347
  });
2348
+ const commandEnv = backend === "convex" ? getConvexDeploymentCommandEnv() : void 0;
2345
2349
  if (migrateArgs.subcommand === "create") {
2346
2350
  const rawName = migrateArgs.restArgs.join(" ").trim();
2347
2351
  if (!rawName) throw new Error("Missing migration name. Usage: `kitcn migrate create <name>`.");
@@ -2364,6 +2368,7 @@ const handleMigrateCommand = async (argv, deps = {}) => {
2364
2368
  backendAdapter,
2365
2369
  migrationConfig,
2366
2370
  targetArgs,
2371
+ env: commandEnv,
2367
2372
  context: "migration",
2368
2373
  direction: "up"
2369
2374
  });
@@ -2374,13 +2379,14 @@ const handleMigrateCommand = async (argv, deps = {}) => {
2374
2379
  backendAdapter,
2375
2380
  migrationConfig,
2376
2381
  targetArgs: extractBackendRunTargetArgs(backend, remainingArgs),
2382
+ env: commandEnv,
2377
2383
  context: "migration",
2378
2384
  direction: "down",
2379
2385
  steps,
2380
2386
  to
2381
2387
  });
2382
2388
  }
2383
- if (migrateArgs.subcommand === "status") return (await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationStatus", {}, targetArgs)).exitCode;
2389
+ if (migrateArgs.subcommand === "status") return (await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationStatus", {}, targetArgs, { env: commandEnv })).exitCode;
2384
2390
  let runId;
2385
2391
  const cancelArgs = [];
2386
2392
  for (let index = 0; index < commandArgs.length; index += 1) {
@@ -2401,7 +2407,7 @@ const handleMigrateCommand = async (argv, deps = {}) => {
2401
2407
  cancelArgs.push(arg);
2402
2408
  }
2403
2409
  const cancelTargetArgs = extractBackendRunTargetArgs(backend, cancelArgs);
2404
- return (await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationCancel", runId ? { runId } : {}, cancelTargetArgs)).exitCode;
2410
+ return (await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationCancel", runId ? { runId } : {}, cancelTargetArgs, { env: commandEnv })).exitCode;
2405
2411
  };
2406
2412
 
2407
2413
  //#endregion
@@ -35,7 +35,8 @@ const convex = (opts) => {
35
35
  metadata: {
36
36
  issuer: `${process.env.CONVEX_SITE_URL}`,
37
37
  jwks_uri: `${process.env.CONVEX_SITE_URL}${opts.options?.basePath ?? "/api/auth"}/convex/jwks`
38
- }
38
+ },
39
+ __skipDeprecationWarning: true
39
40
  });
40
41
  const providerConfig = parseAuthConfig(opts.authConfig, opts);
41
42
  const jwtOptions = {
@@ -1,4 +1,4 @@
1
- import { t as JWT_COOKIE_NAME } from "./convex-plugin-C3N9BB-J.js";
1
+ import { t as JWT_COOKIE_NAME } from "./convex-plugin-CVdfB0MA.js";
2
2
  import { betterFetch } from "@better-fetch/fetch";
3
3
  import { getSessionCookie } from "better-auth/cookies";
4
4
  import * as jose from "jose";
package/dist/watcher.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-BV61sNRx.mjs";
2
+ import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-D2a2poAE.mjs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.13.3",
3
+ "version": "0.13.5",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",