kitcn 0.12.24 → 0.12.25
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.
|
@@ -9467,6 +9467,8 @@ const reconcileAuthScaffoldFiles = async ({ functionsDir, loadAuthOptions = load
|
|
|
9467
9467
|
const INIT_HTTP_API_USE_BLOCK_RE = /app\.use\(\s*['"]\/api\/\*['"][\s\S]*?\);\n?/;
|
|
9468
9468
|
const AUTH_CONVEX_HTTP_CALL_RE = /registerRoutes\(http,\s*getAuth,\s*\{/;
|
|
9469
9469
|
const AUTH_CONVEX_HTTP_ROUTER_RE = /const\s+http\s*=\s*httpRouter\(\);?/;
|
|
9470
|
+
const AUTH_CONVEX_HTTP_IMPORT_RE = /from\s+['"]kitcn\/auth\/http['"]/;
|
|
9471
|
+
const AUTH_CONVEX_HTTP_GET_AUTH_IMPORT_RE = /from\s+['"]\.\/generated\/auth['"]/;
|
|
9470
9472
|
const AUTH_CONVEX_SCHEMA_CALL_RE = /defineSchema\(\s*\{/;
|
|
9471
9473
|
const AUTH_CONVEX_APP_IMPORT_RE = /import App from ['"][^'"]+['"];?/;
|
|
9472
9474
|
const AUTH_CONVEX_PROVIDER_IMPORT_RE = /import\s+\{\s*ConvexProvider,\s*ConvexReactClient\s*\}\s+from\s+['"]convex\/react['"];?/;
|
|
@@ -9758,8 +9760,8 @@ registerRoutes(http, getAuth, {
|
|
|
9758
9760
|
|
|
9759
9761
|
export default http;
|
|
9760
9762
|
`;
|
|
9761
|
-
if (!
|
|
9762
|
-
if (!
|
|
9763
|
+
if (!AUTH_CONVEX_HTTP_IMPORT_RE.test(source)) source = `import { registerRoutes } from 'kitcn/auth/http';\n${source}`;
|
|
9764
|
+
if (!AUTH_CONVEX_HTTP_GET_AUTH_IMPORT_RE.test(source)) source = `import { getAuth } from './generated/auth';\n${source}`;
|
|
9763
9765
|
if (!AUTH_CONVEX_HTTP_CALL_RE.test(source)) source = source.replace(AUTH_CONVEX_HTTP_ROUTER_RE, (match) => `${match}\n\nregisterRoutes(http, getAuth, {\n cors: {\n allowedOrigins: [process.env.SITE_URL!],\n },\n});`);
|
|
9764
9766
|
return createPlanFile({
|
|
9765
9767
|
kind: "scaffold",
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as resolveAddTemplateDefaults, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, Et as highlighter, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as createSpinner, K as withLocalCodegenEnv, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as promptForScaffoldTemplateSelection, R as runBackendFunction, S as isEntryPoint, St as stripConvexCommandNoise, T as parseBackendRunJson, Tt as logger, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as filterScaffoldTemplatePathMap, Y as collectPluginScaffoldTemplates, Z as promptForPluginSelection, _ as formatInfoOutput, _t as applyPluginDependencyInstall, a as cleanup, at as getSupportedPluginKeys, b as hasRemoteConvexDeploymentEnv, bt as resolveAuthEnvState, c as createCommandEnv, ct as resolvePluginScaffoldRoots, d as extractBackfillCliOptions, dt as getPluginLockfilePath, et as resolvePluginPreset, f as extractConcaveRunTargetArgs, ft as getSchemaFilePath, g as formatDocsOutput, gt as applyPlanningDependencyInstall, h as extractResetCliOptions, ht as applyDependencyHintsInstall, i as buildInitializationPlan, it as getPluginCatalogEntry, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as assertSchemaFileExists, m as extractMigrationDownOptions, mt as resolveSchemaInstalledPlugins, n as applyPluginInstallPlanFiles, nt as resolveTemplateSelectionSource, o as createBackendAdapter, ot as isSupportedPluginKey, p as extractMigrationCliOptions, pt as readPluginLockfile, q as withWorkingDirectory, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplatesByIdOrThrow, s as createBackendCommandEnv, st as buildPluginInstallPlan, t as applyDependencyInstallPlan, tt as resolvePresetScaffoldTemplates, u as extractBackendRunTargetArgs, ut as collectInstalledPluginKeys, v as getAggregateBackfillDeploymentKey, vt as inspectPluginDependencyInstall, w as parseArgs, x as isConvexDevPreRunConflictFlag, xt as serializeEnvValue, y as getDevAggregateBackfillStatePath, yt as resolveProjectScaffoldContext, z as runConfiguredCodegen } from "./backend-core-
|
|
2
|
+
import { $ as resolveAddTemplateDefaults, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, Et as highlighter, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as createSpinner, K as withLocalCodegenEnv, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as promptForScaffoldTemplateSelection, R as runBackendFunction, S as isEntryPoint, St as stripConvexCommandNoise, T as parseBackendRunJson, Tt as logger, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as filterScaffoldTemplatePathMap, Y as collectPluginScaffoldTemplates, Z as promptForPluginSelection, _ as formatInfoOutput, _t as applyPluginDependencyInstall, a as cleanup, at as getSupportedPluginKeys, b as hasRemoteConvexDeploymentEnv, bt as resolveAuthEnvState, c as createCommandEnv, ct as resolvePluginScaffoldRoots, d as extractBackfillCliOptions, dt as getPluginLockfilePath, et as resolvePluginPreset, f as extractConcaveRunTargetArgs, ft as getSchemaFilePath, g as formatDocsOutput, gt as applyPlanningDependencyInstall, h as extractResetCliOptions, ht as applyDependencyHintsInstall, i as buildInitializationPlan, it as getPluginCatalogEntry, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as assertSchemaFileExists, m as extractMigrationDownOptions, mt as resolveSchemaInstalledPlugins, n as applyPluginInstallPlanFiles, nt as resolveTemplateSelectionSource, o as createBackendAdapter, ot as isSupportedPluginKey, p as extractMigrationCliOptions, pt as readPluginLockfile, q as withWorkingDirectory, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplatesByIdOrThrow, s as createBackendCommandEnv, st as buildPluginInstallPlan, t as applyDependencyInstallPlan, tt as resolvePresetScaffoldTemplates, u as extractBackendRunTargetArgs, ut as collectInstalledPluginKeys, v as getAggregateBackfillDeploymentKey, vt as inspectPluginDependencyInstall, w as parseArgs, x as isConvexDevPreRunConflictFlag, xt as serializeEnvValue, y as getDevAggregateBackfillStatePath, yt as resolveProjectScaffoldContext, z as runConfiguredCodegen } from "./backend-core-DtIbLptD.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";
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as resolveConfiguredBackend, Ct as generateMeta, K as withLocalCodegenEnv, P as resolveRunDeps, Tt as logger, wt as getConvexConfig } from "./backend-core-
|
|
2
|
+
import { A as resolveConfiguredBackend, Ct as generateMeta, K as withLocalCodegenEnv, P as resolveRunDeps, Tt as logger, wt as getConvexConfig } from "./backend-core-DtIbLptD.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|