better-supabase 0.58.0 → 0.58.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/{adapter-base-xVHtNe6Y.js → adapter-base-8PuJ3OoB.js} +1 -1
- package/dist/{api-CCA7xIEu.js → api-D-YoZpRe.js} +1 -1
- package/dist/{app-tables-BS_qkwdc.d.ts → app-tables-IXL0Hzut.d.ts} +1 -1
- package/dist/astro/index.js +3 -3
- package/dist/{block-tables-DCB8f9J4.d.ts → block-tables-DmDyNlJf.d.ts} +1 -1
- package/dist/{build-CfjNUbQF.js → build-1ikup3O6.js} +1 -1
- package/dist/cli/{add-AGqgANt0.js → add-B63B07UG.js} +9 -9
- package/dist/cli/{add-PGMtNCB5.js → add-CBNxtc8h.js} +2 -2
- package/dist/cli/add-CeZUs_jU.js +1 -0
- package/dist/cli/{app-table-files-DN6altk8.js → app-table-files-BQU5_xhz.js} +3 -3
- package/dist/cli/{app-tables-BEuVy9jZ.js → app-tables-DUCrWiGS.js} +2 -2
- package/dist/cli/{backfill-DQky-bnQ.js → backfill-ff_y-n3l.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-C4gf-NCB.js → blocks-BuwjO--N.js} +1 -1
- package/dist/cli/{blocks-CvgKphq5.js → blocks-DcMd8kRY.js} +1 -1
- package/dist/cli/{cache-BL0PV5bp.js → cache-Di8fhrqf.js} +1 -1
- package/dist/cli/{codemod-CfMLArut.js → codemod-Bu77IP-l.js} +40 -10
- package/dist/cli/{codemod-naming-GlDd60vP.js → codemod-naming-CB4FfxcO.js} +3 -3
- package/dist/cli/{column-renames-OREkqj_i.js → column-renames-B8tfoufA.js} +2 -2
- package/dist/cli/{content-mapper-4kvJb2Zr.js → content-mapper-Dby_JOgB.js} +1 -1
- package/dist/cli/{dev-DZPgvArG.js → dev-CJnbxe_s.js} +3 -3
- package/dist/cli/{doctor-9H-4NFvs.js → doctor-C_GPFp8I.js} +39 -24
- package/dist/cli/{emit-CvADhyWe.js → emit-Diublx-B.js} +2 -2
- package/dist/cli/{gen-DMIJFtUS.js → gen-BgTMpJhV.js} +3 -3
- package/dist/cli/{gen-tasks--SLFTBiL.js → gen-tasks-Dn9gxauI.js} +9 -9
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-PfhcsqFp.js → init-1gNLko5F.js} +8 -8
- package/dist/cli/{live-D7d0_esL.js → live-D07gGcoV.js} +2 -2
- package/dist/cli/{mcp-3zkYyT1k.js → mcp-BwMLfpxa.js} +2 -2
- package/dist/cli/{memo-backend-u47k0fen.js → memo-backend-yki17W-K.js} +1 -1
- package/dist/cli/{metadata-DPc2UrU8.js → metadata-CxF9te2t.js} +4 -4
- package/dist/cli/{migrate-BaOQ2TRl.js → migrate-D4gNS4gj.js} +1 -1
- package/dist/cli/{migration-safety-C9VTNSRj.js → migration-safety-DsQonP4-.js} +1 -1
- package/dist/cli/{module-migration-D3eboFLN.js → module-migration-Cl-I5j0j.js} +1 -1
- package/dist/cli/{partition-DWO1HSmo.js → partition-C5G03PgD.js} +1 -1
- package/dist/cli/powersync-TDly6ptq.js +1 -0
- package/dist/cli/{powersync-CVA8cmDL.js → powersync-WhAasez3.js} +3 -3
- package/dist/cli/{print-BLFFKbTG.js → print-B6dsmPgY.js} +2 -2
- package/dist/cli/{providers-CwsjSukl.js → providers-B4QIwuqF.js} +1 -1
- package/dist/cli/{prune-workflows-Y-8-5f6g.js → prune-workflows-BRLMJAN3.js} +1 -1
- package/dist/cli/{remove-BJXH69GK.js → remove-H86BDqeG.js} +6 -6
- package/dist/cli/{render-DpQu2hex.js → render-DinflArt.js} +4 -4
- package/dist/cli/{render-cache-D-mQmPU3.js → render-cache-BoFKfBx6.js} +1 -1
- package/dist/cli/{run-DBtkS8LK.js → run-3BMqhsTa.js} +7 -7
- package/dist/cli/{run-DfESdGAS.js → run-sk-YY1p3.js} +30 -30
- package/dist/cli/{shared-BOCyL4Jr.js → shared-B9fxx6uL.js} +1 -1
- package/dist/cli/{source-Di9xMdUa.js → source-Dwn8SwJg.js} +1 -1
- package/dist/cli/{spec-B8BagkH4.js → spec--0tYexnO.js} +1 -1
- package/dist/cli/{spec-CKLkRyUY.js → spec-BFlvbXVb.js} +2 -2
- package/dist/cli/{sql-layout-DoiFr1yL.js → sql-layout-CpbXj-r9.js} +2 -2
- package/dist/cli/{squash-COXoWW5e.js → squash-DLXeXmpI.js} +1 -1
- package/dist/cli/{sync-B4TvyjWJ.js → sync-DHUrIa97.js} +4 -4
- package/dist/cli/{upgrade-AyAHttUG.js → upgrade-DKfXHex4.js} +5 -5
- package/dist/cli/{upgrade-MiBhMtCR.js → upgrade-N7lDosgT.js} +5 -5
- package/dist/cli/{version-Coyg0Oh1.js → version-Bm4K-iOw.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/native/index.js +2 -2
- package/dist/{composite-CE_0rQOp.js → composite-6VIY4jUO.js} +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/{context-CTVM2dnp.d.ts → context-DMBXEzQa.d.ts} +7 -1
- package/dist/contract/index.d.ts +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +1 -1
- package/dist/create/lite/index.d.ts +2 -2
- package/dist/create/lite/index.js +2 -2
- package/dist/{define-runtime-D65Va0N-.js → define-runtime-BBF5JHl4.js} +3 -2
- package/dist/{define-runtime-full-BbAQ7sWI.js → define-runtime-full-D6v1ST7M.js} +1 -1
- package/dist/edge/index.js +4 -4
- package/dist/{executor-BL-zAKSs.js → executor-BgjsCon6.js} +1 -1
- package/dist/expo/index.js +3 -3
- package/dist/{extras-BUIrkbFZ.d.ts → extras-C258FsPj.d.ts} +1 -1
- package/dist/{framework-B2sjpHOX.js → framework-DSGTH9p6.js} +1 -1
- package/dist/generators/factories/index.d.ts +1 -1
- package/dist/generators/factories/index.js +1 -1
- package/dist/generators/index.d.ts +2 -2
- package/dist/generators/json-schema/index.d.ts +2 -2
- package/dist/generators/json-schema/index.js +1 -1
- package/dist/generators/nuqs/index.d.ts +1 -1
- package/dist/generators/nuqs/index.js +1 -1
- package/dist/generators/standard-schema/index.d.ts +1 -1
- package/dist/generators/standard-schema/index.js +1 -1
- package/dist/generators/valibot/index.d.ts +1 -1
- package/dist/generators/valibot/index.js +1 -1
- package/dist/generators/zod/index.d.ts +1 -1
- package/dist/generators/zod/index.js +1 -1
- package/dist/hono/index.js +3 -3
- package/dist/{index-DYIGj6Qq.d.ts → index-CIVA5x1i.d.ts} +1 -1
- package/dist/{index-C1UeevYS.d.ts → index-DRKAMZV3.d.ts} +1 -1
- package/dist/{json-schema-CjKyPNYA.js → json-schema-Ba8xSQxR.js} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/{mcp-CzzpcpQl.js → mcp-CaC-3JB3.js} +3 -3
- package/dist/next/index.js +2 -2
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.js +5 -5
- package/dist/{ports-_zS9fGcE.js → ports-BXtpOQRz.js} +1 -1
- package/dist/powersync/index.js +1 -1
- package/dist/preset/index.d.ts +3 -3
- package/dist/{project-I5wL8liz.js → project-Bgz2gbh5.js} +1 -1
- package/dist/react-router/index.js +3 -3
- package/dist/server/index.js +4 -4
- package/dist/{server-DwF_O2Lx.js → server-DFxO9Dyz.js} +1 -1
- package/dist/solid-start/index.js +3 -3
- package/dist/spec/index.js +2 -2
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +1 -1
- package/dist/{sql-C4eWk1yb.js → sql-BbaGokNJ.js} +45 -26
- package/dist/sqlite/index.js +1 -1
- package/dist/sveltekit/index.js +3 -3
- package/dist/tanstack-start/index.js +3 -3
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{types-B7t7smOy.d.ts → types-BidEA6pZ.d.ts} +1 -1
- package/dist/{version-4Go_CIFV.js → version-Ce4Rk4uV.js} +1 -1
- package/dist/webmcp/index.js +1 -1
- package/package.json +1 -1
- package/dist/cli/add-Ck4nVuBp.js +0 -1
- package/dist/cli/powersync-BQSUM-F9.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as problemResponse } from "./problem-BwplIuhI.js";
|
|
2
2
|
import { p as flushEvents } from "./sessions-Dedk1ubX.js";
|
|
3
3
|
import { n as defaultExpose } from "./respond-DLvLJwwN.js";
|
|
4
|
-
import { n as extendServer } from "./server-
|
|
4
|
+
import { n as extendServer } from "./server-DFxO9Dyz.js";
|
|
5
5
|
// src/server/adapter-base.ts
|
|
6
6
|
/**
|
|
7
7
|
* What every framework adapter shares: the `exposeErrors` default, event
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as isPlainObject } from "./clone-H_gCsL29.js";
|
|
2
2
|
import { t as SPEC_PINS } from "./spec-pins-Dlz8OVqi.js";
|
|
3
|
-
import { d as mergeJson, f as pointerToken, n as publishedResources, o as publishedBlocks, t as defineApiModel, u as pascal } from "./build-
|
|
3
|
+
import { d as mergeJson, f as pointerToken, n as publishedResources, o as publishedBlocks, t as defineApiModel, u as pascal } from "./build-1ikup3O6.js";
|
|
4
4
|
// src/spec/format.ts
|
|
5
5
|
/**
|
|
6
6
|
* Identity helper that fixes `apiVersion` and checks that the default version
|
package/dist/astro/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as around } from "../shared-Ci1g9nl4.js";
|
|
2
|
-
import { t as adapterBase } from "../adapter-base-
|
|
2
|
+
import { t as adapterBase } from "../adapter-base-8PuJ3OoB.js";
|
|
3
3
|
import { p as flushEvents } from "../sessions-Dedk1ubX.js";
|
|
4
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
4
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-DSGTH9p6.js";
|
|
5
5
|
import { i as requireCaller, o as runAction } from "../kit-BgRTtW9w.js";
|
|
6
6
|
import { r as refusalResponse } from "../refusal-CgSrkirX.js";
|
|
7
|
-
import { n as extendServer, t as createServer } from "../server-
|
|
7
|
+
import { n as extendServer, t as createServer } from "../server-DFxO9Dyz.js";
|
|
8
8
|
import { i as storageImageUrl } from "../image-url-bsGeybeg.js";
|
|
9
9
|
// src/astro/index.ts
|
|
10
10
|
function runtimeEnv(locals) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as ResolvedConfig } from "./context-
|
|
1
|
+
import { Ct as ResolvedConfig } from "./context-DMBXEzQa.js";
|
|
2
2
|
/**
|
|
3
3
|
* One block table as the config names it: unquoted schema and table, and each
|
|
4
4
|
* logical column's written name, or `null` when an adopted table lacks it.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as isPlainObject } from "./clone-H_gCsL29.js";
|
|
2
2
|
import { t as instanceProperty } from "./instance-property-BlH7QSDl.js";
|
|
3
3
|
import { s as problemType, t as PROBLEM_CONTENT_TYPE } from "./problem-BwplIuhI.js";
|
|
4
|
-
import { n as toJsonSchema } from "./json-schema-
|
|
4
|
+
import { n as toJsonSchema } from "./json-schema-Ba8xSQxR.js";
|
|
5
5
|
import { n as pageQuery, r as pageSchema } from "./resource-schemas-Bq0g2RCQ.js";
|
|
6
6
|
import { r as planResource } from "./resource-DQ4kIBpa.js";
|
|
7
7
|
import { n as isRecord } from "./guards-CsRa6v57.js";
|
|
@@ -2,18 +2,18 @@ import { c as parseNames, n as CliError } from "./errors-B7i-VGxk.js";
|
|
|
2
2
|
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
3
3
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
|
|
4
4
|
import { r as readIfExists, t as display } from "./io-CngfGyMA.js";
|
|
5
|
-
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-
|
|
6
|
-
import { t as VERSION } from "./version-
|
|
5
|
+
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-DsQonP4-.js";
|
|
6
|
+
import { t as VERSION } from "./version-Bm4K-iOw.js";
|
|
7
7
|
import { n as installCommand, t as detectProject } from "./detect-CHR-SAmE.js";
|
|
8
|
-
import { a as addBlocksToWiring, d as setBlockInConfig, f as setBlockInJson, g as setPresetInJson, h as setPresetInConfig, i as addBlocksToJson, m as setPathInJson, p as setPathInConfig, r as addBlocksToConfig, t as addModules } from "./add-
|
|
9
|
-
import { o as dataMigration, t as syncModules } from "./sync-
|
|
10
|
-
import { n as adoptionContext } from "./app-tables-
|
|
11
|
-
import { a as toCatalog } from "./source-
|
|
8
|
+
import { a as addBlocksToWiring, d as setBlockInConfig, f as setBlockInJson, g as setPresetInJson, h as setPresetInConfig, i as addBlocksToJson, m as setPathInJson, p as setPathInConfig, r as addBlocksToConfig, t as addModules } from "./add-CBNxtc8h.js";
|
|
9
|
+
import { o as dataMigration, t as syncModules } from "./sync-DHUrIa97.js";
|
|
10
|
+
import { n as adoptionContext } from "./app-tables-DUCrWiGS.js";
|
|
11
|
+
import { a as toCatalog } from "./source-Dwn8SwJg.js";
|
|
12
12
|
import { i as plain } from "./style-B5-nByxb.js";
|
|
13
|
-
import { d as loadSnapshot } from "./sql-layout-
|
|
13
|
+
import { d as loadSnapshot } from "./sql-layout-CpbXj-r9.js";
|
|
14
14
|
import { a as findConfig, h as INTEGRATIONS, s as loadConfig } from "./config-NxPVkM-K.js";
|
|
15
|
-
import { t as appTablePlan } from "./app-table-files-
|
|
16
|
-
import { t as blockNames } from "./blocks-
|
|
15
|
+
import { t as appTablePlan } from "./app-table-files-BQU5_xhz.js";
|
|
16
|
+
import { t as blockNames } from "./blocks-DcMd8kRY.js";
|
|
17
17
|
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-B3Rowfv5.js";
|
|
18
18
|
import { existsSync } from "node:fs";
|
|
19
19
|
import { dirname, join, posix, resolve } from "node:path";
|
|
@@ -3,8 +3,8 @@ import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
|
3
3
|
import { r as applyPlan } from "./files-NnXnawki.js";
|
|
4
4
|
import { t as codeRanges } from "./code-ranges-uTOKmIXC.js";
|
|
5
5
|
import { t as isRecord } from "./guards-DxwRG0Uv.js";
|
|
6
|
-
import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-
|
|
7
|
-
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-
|
|
6
|
+
import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-B4QIwuqF.js";
|
|
7
|
+
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-DHUrIa97.js";
|
|
8
8
|
import { basename, dirname } from "node:path";
|
|
9
9
|
import { readFile } from "node:fs/promises";
|
|
10
10
|
import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as addCommand } from "./add-B63B07UG.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
2
2
|
import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-B6-eEV5p.js";
|
|
3
|
-
import { r as literal } from "./live-
|
|
4
|
-
import { r as layoutFor } from "./providers-
|
|
5
|
-
import { n as renderBlocksCached } from "./render-cache-
|
|
3
|
+
import { r as literal } from "./live-D07gGcoV.js";
|
|
4
|
+
import { r as layoutFor } from "./providers-B4QIwuqF.js";
|
|
5
|
+
import { n as renderBlocksCached } from "./render-cache-BoFKfBx6.js";
|
|
6
6
|
import { f as subjectTagArgs } from "./config-NxPVkM-K.js";
|
|
7
7
|
import { join, resolve, sep } from "node:path";
|
|
8
8
|
import { APP_TABLES_MODULE, setTableFeature } from "better-supabase/sql";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as accessProviderMode } from "./authorization-CNWhpdKb.js";
|
|
2
|
-
import { u as writtenByBlocks } from "./sql-layout-
|
|
3
|
-
import { c as qualified, t as catalogOf } from "./shared-
|
|
2
|
+
import { u as writtenByBlocks } from "./sql-layout-CpbXj-r9.js";
|
|
3
|
+
import { c as qualified, t as catalogOf } from "./shared-B9fxx6uL.js";
|
|
4
4
|
import { declaredTables, resolveBlocks } from "better-supabase/sql";
|
|
5
5
|
// src/cli/doctor/app-tables.ts
|
|
6
6
|
/**
|
|
@@ -3,7 +3,7 @@ import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-BlYLJPzM.js"
|
|
|
3
3
|
import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
4
4
|
import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
|
|
5
5
|
import { t as connect } from "./db-B_xr3ZvK.js";
|
|
6
|
-
import { n as ident } from "./live-
|
|
6
|
+
import { n as ident } from "./live-D07gGcoV.js";
|
|
7
7
|
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-B3Rowfv5.js";
|
|
8
8
|
// src/cli/commands/backfill.ts
|
|
9
9
|
const DEFAULT_BATCH = 1e3;
|
package/dist/cli/bin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-
|
|
1
|
+
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-DcMd8kRY.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
2
2
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
3
3
|
import { t as SQL_ARGS } from "./args-CS_64_tg.js";
|
|
4
|
-
import { n as listModules, t as printModule } from "./print-
|
|
4
|
+
import { n as listModules, t as printModule } from "./print-B6dsmPgY.js";
|
|
5
5
|
import { t as decodePresetInput } from "./preset-CWfLlmTO.js";
|
|
6
6
|
import { SQL_MODULES } from "better-supabase/sql";
|
|
7
7
|
import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
2
|
+
import { t as VERSION } from "./version-Bm4K-iOw.js";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as codeRanges } from "./code-ranges-uTOKmIXC.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as pinReview, n as namingCodemod, o as configCodemod, r as columnPins, t as NAMING_RENAMES } from "./codemod-naming-CB4FfxcO.js";
|
|
3
3
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
4
|
-
import { r as layoutFor } from "./providers-
|
|
5
|
-
import { c as snapshotColumnTypes, i as migrationsDir, o as ownLayout, u as writtenByBlocks } from "./sql-layout-
|
|
4
|
+
import { r as layoutFor } from "./providers-B4QIwuqF.js";
|
|
5
|
+
import { c as snapshotColumnTypes, i as migrationsDir, o as ownLayout, u as writtenByBlocks } from "./sql-layout-CpbXj-r9.js";
|
|
6
6
|
import { r as arrayEntries, t as PROMISE_ALL } from "./round-trips-D2KD5Hpq.js";
|
|
7
|
-
import { l as schemaModulePath } from "./emit-
|
|
8
|
-
import { s as loadConfig } from "./config-NxPVkM-K.js";
|
|
7
|
+
import { l as schemaModulePath } from "./emit-Diublx-B.js";
|
|
8
|
+
import { n as databaseUrl, s as loadConfig } from "./config-NxPVkM-K.js";
|
|
9
9
|
import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
10
10
|
import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
|
|
11
|
+
import { t as connect } from "./db-B_xr3ZvK.js";
|
|
11
12
|
import { n as migrationFile } from "./migration-names-7zAdXfcd.js";
|
|
12
13
|
import { i as plain } from "./style-B5-nByxb.js";
|
|
13
14
|
import { basename, dirname, extname, join, posix, relative, resolve } from "node:path";
|
|
@@ -307,7 +308,10 @@ function ownedColumnsCodemod() {
|
|
|
307
308
|
columns = ownedColumns(renderBlocks(config.blockNames, layout).map((file) => ({ contents: file.contents })), app, config.schemas);
|
|
308
309
|
const own = await ownLayout(config);
|
|
309
310
|
const report = columnPins(config, NAMING_RENAMES, own.ownTables ?? {}, own.ownColumns ?? {});
|
|
310
|
-
const
|
|
311
|
+
const tables = columns.map((column) => column.table);
|
|
312
|
+
const snapshot = await snapshotColumnTypes(config, tables);
|
|
313
|
+
const live = await project.liveColumns?.(tables);
|
|
314
|
+
const present = (table, column) => snapshot.get(table)?.has(column) === true || live?.get(table)?.has(column) === true;
|
|
311
315
|
const blocked = /* @__PURE__ */ new Map();
|
|
312
316
|
for (const pin of report.pins) {
|
|
313
317
|
const next = SQL_MODULES[pin.module]?.names?.tables[pin.table]?.columns[pin.column];
|
|
@@ -323,7 +327,7 @@ function ownedColumnsCodemod() {
|
|
|
323
327
|
continue;
|
|
324
328
|
}
|
|
325
329
|
const choice = optional.get(`${column.table}.${column.column}`);
|
|
326
|
-
if (choice !== void 0 && present
|
|
330
|
+
if (choice !== void 0 && !present(column.table, column.column)) {
|
|
327
331
|
review.push({ message: `blocks.${choice.block}.columns.${choice.table}.${choice.logical} is optional, and the database or snapshot has no "${column.column}" column on ${column.table}. Set it to null to keep the feature off.` });
|
|
328
332
|
continue;
|
|
329
333
|
}
|
|
@@ -901,7 +905,32 @@ async function loadRewritten(codemod, configFile) {
|
|
|
901
905
|
await rm(copy, { force: true });
|
|
902
906
|
}
|
|
903
907
|
}
|
|
904
|
-
|
|
908
|
+
/**
|
|
909
|
+
* The columns of `tables` in the project's database, or undefined when there is
|
|
910
|
+
* no database to read, so the codemod falls back to the snapshot.
|
|
911
|
+
*/
|
|
912
|
+
async function liveColumns(config, env, tables, open = connect) {
|
|
913
|
+
if (tables.length === 0) return;
|
|
914
|
+
let db;
|
|
915
|
+
try {
|
|
916
|
+
db = await open(await databaseUrl(config, env));
|
|
917
|
+
} catch {
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
try {
|
|
921
|
+
const { rows } = await db.client.query(`select table_schema || '.' || table_name as name, column_name as column
|
|
922
|
+
from information_schema.columns
|
|
923
|
+
where table_schema || '.' || table_name = any($1::text[])`, [[...new Set(tables)]]);
|
|
924
|
+
const found = /* @__PURE__ */ new Map();
|
|
925
|
+
for (const row of rows) found.set(row.name, (found.get(row.name) ?? /* @__PURE__ */ new Set()).add(row.column));
|
|
926
|
+
return found;
|
|
927
|
+
} catch {
|
|
928
|
+
return;
|
|
929
|
+
} finally {
|
|
930
|
+
await db.close().catch(() => void 0);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
async function runCodemod(loadedConfig, args, paint = plain, configFile, loadError, env) {
|
|
905
934
|
const [name, ...paths] = args._ ?? [];
|
|
906
935
|
const names = Object.entries(CODEMODS).map(([key, codemod]) => ` ${key.padEnd(5)} ${codemod.description}`).join("\n");
|
|
907
936
|
if (name === void 0) throw new CliError("usage", `Name a codemod:\n${names}`);
|
|
@@ -920,6 +949,7 @@ async function runCodemod(loadedConfig, args, paint = plain, configFile, loadErr
|
|
|
920
949
|
config,
|
|
921
950
|
configLoaded: configError === void 0,
|
|
922
951
|
sql: await projectSqlFiles(config.root),
|
|
952
|
+
...env === void 0 ? {} : { liveColumns: (tables) => liveColumns(config, env, tables) },
|
|
923
953
|
...configFile === void 0 ? {} : {
|
|
924
954
|
configFile,
|
|
925
955
|
configText: await readFile(configFile, "utf-8")
|
|
@@ -1038,10 +1068,10 @@ function codemodCommand(name) {
|
|
|
1038
1068
|
meta: commandMeta(`codemod ${name}`),
|
|
1039
1069
|
args: CODEMOD_ARGS,
|
|
1040
1070
|
runsWithInvalidConfig: true,
|
|
1041
|
-
run: (args, { config, configFile, configError, paint }) => runCodemod(config, {
|
|
1071
|
+
run: (args, { config, configFile, configError, paint, env }) => runCodemod(config, {
|
|
1042
1072
|
...args,
|
|
1043
1073
|
_: [name, ...args._]
|
|
1044
|
-
}, paint, configFile, configError)
|
|
1074
|
+
}, paint, configFile, configError, env)
|
|
1045
1075
|
});
|
|
1046
1076
|
}
|
|
1047
1077
|
export { codemodCommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as codeRanges } from "./code-ranges-uTOKmIXC.js";
|
|
2
|
-
import { o as ownLayout } from "./sql-layout-
|
|
2
|
+
import { o as ownLayout } from "./sql-layout-CpbXj-r9.js";
|
|
3
3
|
import { t as isRecord } from "./guards-DxwRG0Uv.js";
|
|
4
4
|
import { LEGACY_OPTION, SQL_MODULES, bsbPolicyName, moduleContext, readPolicies, redundantNulls } from "better-supabase/sql";
|
|
5
5
|
// src/cli/codemod-config.ts
|
|
@@ -2105,7 +2105,7 @@ function renameArguments(text, renames) {
|
|
|
2105
2105
|
const after = text.slice(at + match[0].length).trimStart();
|
|
2106
2106
|
const previous = before.at(-1);
|
|
2107
2107
|
const key = after.startsWith(":") && !after.startsWith("::");
|
|
2108
|
-
const shorthand = after.startsWith(",") || after.startsWith("}");
|
|
2108
|
+
const shorthand = (previous === "{" || previous === ",") && (after.startsWith(",") || after.startsWith("}"));
|
|
2109
2109
|
const inObject = openBracket(text, at, ranges) === "{";
|
|
2110
2110
|
const memberOf = previous === "." && before.at(-2) !== ".";
|
|
2111
2111
|
const listed = /\b(?:import|export)(?:\s+type)?\s*\{[^}]*$/.test(before);
|
|
@@ -3045,4 +3045,4 @@ function namingCodemod(renames = NAMING_RENAMES) {
|
|
|
3045
3045
|
}
|
|
3046
3046
|
};
|
|
3047
3047
|
}
|
|
3048
|
-
export {
|
|
3048
|
+
export { renameArguments as a, pinReview as i, namingCodemod as n, configCodemod as o, columnPins as r, tenantEntries as s, NAMING_RENAMES as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as NAMING_RENAMES } from "./codemod-naming-
|
|
2
|
-
import { u as writtenByBlocks } from "./sql-layout-
|
|
1
|
+
import { t as NAMING_RENAMES } from "./codemod-naming-CB4FfxcO.js";
|
|
2
|
+
import { u as writtenByBlocks } from "./sql-layout-CpbXj-r9.js";
|
|
3
3
|
import { SQL_MODULES } from "better-supabase/sql";
|
|
4
4
|
// src/cli/doctor/column-renames.ts
|
|
5
5
|
const ADD_COLUMN = /\balter\s+table\s+(?:if\s+exists\s+)?(?:only\s+)?((?:"?[\w$]+"?\s*\.\s*)?"?[\w$]+"?)\s+add\s+column\s+if\s+not\s+exists\s+("?[\w$]+"?)/gi;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as i } from "./jsonc-Dyww6wHM.js";
|
|
2
2
|
import { r as readIfExists } from "./io-CngfGyMA.js";
|
|
3
3
|
import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
|
|
4
|
-
import { H as installedVersion } from "./sql-layout-
|
|
4
|
+
import { H as installedVersion } from "./sql-layout-CpbXj-r9.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
// src/cli/content-mapper.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
2
2
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
3
3
|
import { m as GEN_TASKS } from "./config-NxPVkM-K.js";
|
|
4
|
-
import { c as stampFiles, l as watchLoop, o as fileWaker, s as parseInterval } from "./spec-
|
|
5
|
-
import { a as stepInputs, i as selectTasks, n as runTasks, r as parseTasks, t as poll } from "./gen-tasks
|
|
6
|
-
import { g as snapshotFile, p as openSource } from "./sql-layout-
|
|
4
|
+
import { c as stampFiles, l as watchLoop, o as fileWaker, s as parseInterval } from "./spec-BFlvbXVb.js";
|
|
5
|
+
import { a as stepInputs, i as selectTasks, n as runTasks, r as parseTasks, t as poll } from "./gen-tasks-Dn9gxauI.js";
|
|
6
|
+
import { g as snapshotFile, p as openSource } from "./sql-layout-CpbXj-r9.js";
|
|
7
7
|
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-B3Rowfv5.js";
|
|
8
8
|
import { dirname, resolve } from "node:path";
|
|
9
9
|
import { readdir } from "node:fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as subjectFromTag, l as stdinDatabaseUrl, n as databaseUrl, u as withTableTags } from "./config-NxPVkM-K.js";
|
|
2
|
-
import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-
|
|
2
|
+
import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-Dby_JOgB.js";
|
|
3
3
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-BlYLJPzM.js";
|
|
4
4
|
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
5
5
|
import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
|
|
@@ -7,35 +7,35 @@ import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-NnXna
|
|
|
7
7
|
import { a as sameText, t as display } from "./io-CngfGyMA.js";
|
|
8
8
|
import { t as connect } from "./db-B_xr3ZvK.js";
|
|
9
9
|
import { t as byCodePoint } from "./compare-yl4sSwVn.js";
|
|
10
|
-
import { C as dataFiles, D as sourceFiles, E as seedFiles, H as installedVersion, O as sqlFiles, S as ENV_FILES, T as readText, U as peerVersions, W as satisfies, _ as liteDriverOf, a as moduleLayoutFor, d as loadSnapshot, f as managementTarget, g as snapshotFile, i as migrationsDir, j as MetadataRejectedError, p as openSource, r as blockDeclaredTables, u as writtenByBlocks, v as isSqliteLiteDriver, w as functionFiles } from "./sql-layout-
|
|
11
|
-
import { i as request } from "./source-
|
|
10
|
+
import { C as dataFiles, D as sourceFiles, E as seedFiles, H as installedVersion, O as sqlFiles, S as ENV_FILES, T as readText, U as peerVersions, W as satisfies, _ as liteDriverOf, a as moduleLayoutFor, d as loadSnapshot, f as managementTarget, g as snapshotFile, i as migrationsDir, j as MetadataRejectedError, p as openSource, r as blockDeclaredTables, u as writtenByBlocks, v as isSqliteLiteDriver, w as functionFiles } from "./sql-layout-CpbXj-r9.js";
|
|
11
|
+
import { i as request } from "./source-Dwn8SwJg.js";
|
|
12
12
|
import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-B6-eEV5p.js";
|
|
13
13
|
import { r as supabaseCli } from "./exec-DBgtTCHK.js";
|
|
14
14
|
import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
|
|
15
|
-
import { _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$7, g as withoutStrings, h as policyHelpers, l as COMMANDS$2, m as functionObject, p as functionBody, s as AUTHORIZATION_RULES, u as RLS_RULES, v as blockTargets, y as advisorRule } from "./run-
|
|
16
|
-
import { r as renderFiles } from "./render-
|
|
17
|
-
import { l as schemaModulePath, m as configFor, p as notNullTag } from "./emit-
|
|
15
|
+
import { _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$7, g as withoutStrings, h as policyHelpers, l as COMMANDS$2, m as functionObject, p as functionBody, s as AUTHORIZATION_RULES, u as RLS_RULES, v as blockTargets, y as advisorRule } from "./run-3BMqhsTa.js";
|
|
16
|
+
import { r as renderFiles } from "./render-DinflArt.js";
|
|
17
|
+
import { l as schemaModulePath, m as configFor, p as notNullTag } from "./emit-Diublx-B.js";
|
|
18
18
|
import { t as orphanedBlockFiles } from "./orphans-ByB0gKOp.js";
|
|
19
|
-
import {
|
|
19
|
+
import { a as renameArguments, s as tenantEntries, t as NAMING_RENAMES } from "./codemod-naming-CB4FfxcO.js";
|
|
20
20
|
import { t as isRecord$1 } from "./guards-DxwRG0Uv.js";
|
|
21
|
-
import { i as appViewsOf, n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-
|
|
22
|
-
import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-
|
|
23
|
-
import { n as renderBlocksCached } from "./render-cache-
|
|
24
|
-
import { a as lineOf, c as qualified, i as exposedSchemas, l as tableObject, n as deniesAll, o as permissionCatalogKeys, r as exposed, s as policyObject, t as catalogOf, u as workflowOf } from "./shared-
|
|
25
|
-
import { n as staleRenameKeys, t as shadowedBlockColumns } from "./column-renames-
|
|
26
|
-
import { a as reservedRoles, i as statementsView, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-
|
|
21
|
+
import { i as appViewsOf, n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-DUCrWiGS.js";
|
|
22
|
+
import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-Cl-I5j0j.js";
|
|
23
|
+
import { n as renderBlocksCached } from "./render-cache-BoFKfBx6.js";
|
|
24
|
+
import { a as lineOf, c as qualified, i as exposedSchemas, l as tableObject, n as deniesAll, o as permissionCatalogKeys, r as exposed, s as policyObject, t as catalogOf, u as workflowOf } from "./shared-B9fxx6uL.js";
|
|
25
|
+
import { n as staleRenameKeys, t as shadowedBlockColumns } from "./column-renames-B8tfoufA.js";
|
|
26
|
+
import { a as reservedRoles, i as statementsView, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-D07gGcoV.js";
|
|
27
27
|
import { t as projectionsOf } from "./projection-DlVB5YL-.js";
|
|
28
28
|
import { s as providerLabel } from "./authorization-CNWhpdKb.js";
|
|
29
|
-
import { t as VERSION$1 } from "./version-
|
|
29
|
+
import { t as VERSION$1 } from "./version-Bm4K-iOw.js";
|
|
30
30
|
import { t as PROCESS_ENV } from "./env-CQ831uY0.js";
|
|
31
31
|
import { a as stackEnvValues, i as redactValue, o as staleVariables, t as PREFIX_NAMES } from "./stack-env-CtkfVXsR.js";
|
|
32
32
|
import { n as readStackStatus } from "./stack-status-rNPCacin.js";
|
|
33
|
-
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-
|
|
33
|
+
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-DsQonP4-.js";
|
|
34
34
|
import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-3e1LT1bn.js";
|
|
35
35
|
import { n as ROUND_TRIP_RULES } from "./round-trips-D2KD5Hpq.js";
|
|
36
36
|
import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-Eu6d45F8.js";
|
|
37
37
|
import { i as plain$2 } from "./style-B5-nByxb.js";
|
|
38
|
-
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-
|
|
38
|
+
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-CxF9te2t.js";
|
|
39
39
|
import { t as compiledReadSets } from "./read-sets-77o7SxpK.js";
|
|
40
40
|
import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-B3Rowfv5.js";
|
|
41
41
|
import { existsSync } from "node:fs";
|
|
@@ -2759,14 +2759,29 @@ const NAMING_RENAME_RULES = [{
|
|
|
2759
2759
|
description: "The app sources name an export, type, subpath or environment variable that the rename table of `api/naming.json` replaced. The old names have no alias. `better-supabase codemod naming` renames them.",
|
|
2760
2760
|
check: (context) => {
|
|
2761
2761
|
const kept = renamedEntityArguments(context.config.blocks);
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2762
|
+
const argumentAt = (text, rename) => {
|
|
2763
|
+
const renamed = renameArguments(text, [rename]);
|
|
2764
|
+
let at = 0;
|
|
2765
|
+
while (at < text.length && text[at] === renamed[at]) at += 1;
|
|
2766
|
+
return at === text.length && renamed.length === text.length ? -1 : at;
|
|
2767
|
+
};
|
|
2768
|
+
return context.sources.flatMap((file) => OLD_NAMES.flatMap(({ rename, pattern }) => {
|
|
2769
|
+
let line;
|
|
2770
|
+
if (rename.kind === "argument") {
|
|
2771
|
+
const at = kept.has(rename.from) ? -1 : argumentAt(file.text, rename);
|
|
2772
|
+
if (at === -1) return [];
|
|
2773
|
+
line = file.text.slice(0, at).split("\n").length;
|
|
2774
|
+
} else if (pattern.test(file.text)) line = lineOf(file.text, new RegExp(pattern.source)) ?? 1;
|
|
2775
|
+
else return [];
|
|
2776
|
+
return [{
|
|
2777
|
+
message: `${file.path} uses \`${rename.from}\`, which ${rename.since} renamed \`${rename.to}\`. Run \`better-supabase codemod naming\`.`,
|
|
2778
|
+
target: file.path,
|
|
2779
|
+
location: {
|
|
2780
|
+
file: file.path,
|
|
2781
|
+
line
|
|
2782
|
+
}
|
|
2783
|
+
}];
|
|
2784
|
+
}));
|
|
2770
2785
|
}
|
|
2771
2786
|
}];
|
|
2772
2787
|
// src/cli/doctor/shims.ts
|
|
@@ -2,8 +2,8 @@ import { t as byCodePoint } from "./compare-yl4sSwVn.js";
|
|
|
2
2
|
import { r as claimMarkerOverrides } from "./authorization-CNWhpdKb.js";
|
|
3
3
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
4
4
|
import { t as isRecord } from "./guards-DxwRG0Uv.js";
|
|
5
|
-
import { a as toCatalog } from "./source-
|
|
6
|
-
import { F as restrictSchemas, R as tsTypeOf, b as bootstrapTables } from "./sql-layout-
|
|
5
|
+
import { a as toCatalog } from "./source-Dwn8SwJg.js";
|
|
6
|
+
import { F as restrictSchemas, R as tsTypeOf, b as bootstrapTables } from "./sql-layout-CpbXj-r9.js";
|
|
7
7
|
import { resolveBlock, resolveProviderSql } from "better-supabase/sql";
|
|
8
8
|
import { DEFAULT_CLAIMS, tenantClaimPaths } from "better-supabase/config";
|
|
9
9
|
import { toCamel } from "better-supabase";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
2
2
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
3
|
-
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-
|
|
3
|
+
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-CxF9te2t.js";
|
|
4
4
|
import { m as GEN_TASKS } from "./config-NxPVkM-K.js";
|
|
5
|
-
import { i as selectTasks, n as runTasks, r as parseTasks } from "./gen-tasks
|
|
5
|
+
import { i as selectTasks, n as runTasks, r as parseTasks } from "./gen-tasks-Dn9gxauI.js";
|
|
6
6
|
import { c as insideRoot, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
|
|
7
|
-
import { F as restrictSchemas, I as serializeGenerator, d as loadSnapshot, h as serializeSnapshot } from "./sql-layout-
|
|
7
|
+
import { F as restrictSchemas, I as serializeGenerator, d as loadSnapshot, h as serializeSnapshot } from "./sql-layout-CpbXj-r9.js";
|
|
8
8
|
import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-B3Rowfv5.js";
|
|
9
9
|
// src/cli/commands/save-snapshot.ts
|
|
10
10
|
/** The flags `gen --save-snapshot` reads. */
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { c as parseNames, i as failedResult, n as CliError } from "./errors-B7i-VGxk.js";
|
|
2
|
-
import { n as runGen } from "./run-
|
|
3
|
-
import { l as catalogFingerprint } from "./cache-
|
|
2
|
+
import { n as runGen } from "./run-3BMqhsTa.js";
|
|
3
|
+
import { l as catalogFingerprint } from "./cache-Di8fhrqf.js";
|
|
4
4
|
import { i as plain } from "./style-B5-nByxb.js";
|
|
5
5
|
import { g as isGenTask, m as GEN_TASKS } from "./config-NxPVkM-K.js";
|
|
6
6
|
import { i as runEnv } from "./env-DtJNOdyD.js";
|
|
7
|
-
import { n as runPowerSync } from "./powersync-
|
|
7
|
+
import { n as runPowerSync } from "./powersync-WhAasez3.js";
|
|
8
8
|
import { t as runSeed } from "./seed-DVKgi-7l.js";
|
|
9
|
-
import { r as specOptionsFromConfig, t as runSpec } from "./spec-
|
|
10
|
-
import { t as addModules } from "./add-
|
|
11
|
-
import { n as listModules, t as printModule } from "./print-
|
|
12
|
-
import { o as dataMigration, t as syncModules } from "./sync-
|
|
13
|
-
import { t as upgrade } from "./upgrade-
|
|
14
|
-
import { d as loadSnapshot } from "./sql-layout-
|
|
9
|
+
import { r as specOptionsFromConfig, t as runSpec } from "./spec-BFlvbXVb.js";
|
|
10
|
+
import { t as addModules } from "./add-CBNxtc8h.js";
|
|
11
|
+
import { n as listModules, t as printModule } from "./print-B6dsmPgY.js";
|
|
12
|
+
import { o as dataMigration, t as syncModules } from "./sync-DHUrIa97.js";
|
|
13
|
+
import { t as upgrade } from "./upgrade-DKfXHex4.js";
|
|
14
|
+
import { d as loadSnapshot } from "./sql-layout-CpbXj-r9.js";
|
|
15
15
|
import { existsSync } from "node:fs";
|
|
16
16
|
import { resolve } from "node:path";
|
|
17
17
|
// src/cli/commands/sql.ts
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -864,5 +864,5 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
|
|
|
864
864
|
export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined, options?: {
|
|
865
865
|
readonly legacyTables?: boolean;
|
|
866
866
|
}): Promise<ResolvedConfig>;
|
|
867
|
-
export declare const VERSION = "0.58.
|
|
867
|
+
export declare const VERSION = "0.58.1";
|
|
868
868
|
export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, Choice, Cli, CliCommand, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliLog, CliProblem, CliProblemExtensions, CliValues, CommandResult, CreateCliOptions, ExitCode, ExtrasFunction, ExtrasHook, ExtrasHookFunction, ExtrasTable, ForeignKeyAction, Format, GeneratorMetadata, IntrospectionSource, ManagementSourceOptions, NextStep, Paint, Prompter, Queryable, RunOptions, RunResult, Snapshot, SnapshotBucket, SnapshotExtras };
|
package/dist/cli/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { i as run, n as createCli, r as help, t as commandNames } from "./run-
|
|
1
|
+
import { i as run, n as createCli, r as help, t as commandNames } from "./run-sk-YY1p3.js";
|
|
2
2
|
import { a as list, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
3
3
|
import { n as CliError, t as CLI_ERRORS_URL } from "./errors-B7i-VGxk.js";
|
|
4
|
-
import { a as emitBlockConfig, c as emitClientBlocks, o as emitBlockConfigModule, r as renderFiles, s as emitBlockReads } from "./render-
|
|
5
|
-
import { n as runGen } from "./run-
|
|
6
|
-
import { d as loadSnapshot, h as serializeSnapshot, m as parseSnapshot, y as introspect } from "./sql-layout-
|
|
7
|
-
import { a as emitModule, d as buildModel, t as GENERATED_HEADER } from "./emit-
|
|
8
|
-
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-
|
|
4
|
+
import { a as emitBlockConfig, c as emitClientBlocks, o as emitBlockConfigModule, r as renderFiles, s as emitBlockReads } from "./render-DinflArt.js";
|
|
5
|
+
import { n as runGen } from "./run-3BMqhsTa.js";
|
|
6
|
+
import { d as loadSnapshot, h as serializeSnapshot, m as parseSnapshot, y as introspect } from "./sql-layout-CpbXj-r9.js";
|
|
7
|
+
import { a as emitModule, d as buildModel, t as GENERATED_HEADER } from "./emit-Diublx-B.js";
|
|
8
|
+
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-Dwn8SwJg.js";
|
|
9
9
|
import { s as loadConfig } from "./config-NxPVkM-K.js";
|
|
10
|
-
import { t as VERSION } from "./version-
|
|
10
|
+
import { t as VERSION } from "./version-Bm4K-iOw.js";
|
|
11
11
|
// src/cli/introspect/from-catalog.ts
|
|
12
12
|
/**
|
|
13
13
|
* Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { a as findConfig, s as loadConfig } from "./config-NxPVkM-K.js";
|
|
2
|
-
import { r as contentMapperFiles } from "./content-mapper-
|
|
3
|
-
import { C as withConventions, S as promptConventions, _ as CONVENTION_ARGS, a as writeDesign, b as defaultConventions, c as createUrlParam, d as integrationFiles, f as overwrite, g as templatePlan, h as templateContextFor, i as blocksWiringPath, l as CANCELLED, m as parseIntegrations, o as readPresetInput, p as packagesFor, r as blockConfigImport, s as AUTHZ_NOTE, u as chooseIntegrations, v as CONVENTION_COMPLETIONS, x as hasConventionFlags, y as conventionFlags } from "./add-
|
|
2
|
+
import { r as contentMapperFiles } from "./content-mapper-Dby_JOgB.js";
|
|
3
|
+
import { C as withConventions, S as promptConventions, _ as CONVENTION_ARGS, a as writeDesign, b as defaultConventions, c as createUrlParam, d as integrationFiles, f as overwrite, g as templatePlan, h as templateContextFor, i as blocksWiringPath, l as CANCELLED, m as parseIntegrations, o as readPresetInput, p as packagesFor, r as blockConfigImport, s as AUTHZ_NOTE, u as chooseIntegrations, v as CONVENTION_COMPLETIONS, x as hasConventionFlags, y as conventionFlags } from "./add-B63B07UG.js";
|
|
4
4
|
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
5
5
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
6
6
|
import { c as insideRoot, i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
|
|
7
7
|
import { r as readIfExists } from "./io-CngfGyMA.js";
|
|
8
|
-
import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-
|
|
9
|
-
import { c as enablePgDelta, t as syncModules } from "./sync-
|
|
10
|
-
import { A as suggestedPackage, d as loadSnapshot, h as serializeSnapshot, k as detectWorkspace } from "./sql-layout-
|
|
11
|
-
import { a as toCatalog } from "./source-
|
|
12
|
-
import { c as TYPEGEN_VERSION } from "./cache-
|
|
8
|
+
import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-DsQonP4-.js";
|
|
9
|
+
import { c as enablePgDelta, t as syncModules } from "./sync-DHUrIa97.js";
|
|
10
|
+
import { A as suggestedPackage, d as loadSnapshot, h as serializeSnapshot, k as detectWorkspace } from "./sql-layout-CpbXj-r9.js";
|
|
11
|
+
import { a as toCatalog } from "./source-Dwn8SwJg.js";
|
|
12
|
+
import { c as TYPEGEN_VERSION } from "./cache-Di8fhrqf.js";
|
|
13
13
|
import { n as installCommand, t as detectProject } from "./detect-CHR-SAmE.js";
|
|
14
|
-
import { t as appTablePlan } from "./app-table-files-
|
|
14
|
+
import { t as appTablePlan } from "./app-table-files-BQU5_xhz.js";
|
|
15
15
|
import { i as plain } from "./style-B5-nByxb.js";
|
|
16
16
|
import { existsSync } from "node:fs";
|
|
17
17
|
import { join, posix, resolve } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorText } from "./errors-B7i-VGxk.js";
|
|
2
|
-
import "./source-
|
|
3
|
-
import { c as qualified, l as tableObject, r as exposed, t as catalogOf } from "./shared-
|
|
2
|
+
import "./source-Dwn8SwJg.js";
|
|
3
|
+
import { c as qualified, l as tableObject, r as exposed, t as catalogOf } from "./shared-B9fxx6uL.js";
|
|
4
4
|
// src/cli/doctor/reserved-roles.ts
|
|
5
5
|
/**
|
|
6
6
|
* Supautils' `reserved_roles` on Supabase. Nobody but a superuser may alter,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
2
|
-
import { a as errorDocument, i as run } from "./run-
|
|
2
|
+
import { a as errorDocument, i as run } from "./run-sk-YY1p3.js";
|
|
3
3
|
import { C as optional, D as record, N as unknown, a as array, d as is, j as string$1, k as safeParse, t as PROCESS_ENV, x as object } from "./env-CQ831uY0.js";
|
|
4
4
|
import { n as consentDigest } from "./agent-BlYLJPzM.js";
|
|
5
5
|
import { n as CliError } from "./errors-B7i-VGxk.js";
|
|
6
|
-
import { t as VERSION } from "./version-
|
|
6
|
+
import { t as VERSION } from "./version-Bm4K-iOw.js";
|
|
7
7
|
import { createInterface } from "node:readline";
|
|
8
8
|
import { answerLine } from "better-supabase/mcp";
|
|
9
9
|
// src/cli/mcp/server.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as generatorHash } from "./generator-hash-BkdtEywR.js";
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
2
|
+
import { t as VERSION } from "./version-Bm4K-iOw.js";
|
|
3
3
|
import { n as cacheEnabled, r as cacheRoot } from "./store-DP-nmqBt.js";
|
|
4
4
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
|
|
2
2
|
import { i as readStdin } from "./io-CngfGyMA.js";
|
|
3
|
-
import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-
|
|
4
|
-
import { P as parseMetadataDocument, j as MetadataRejectedError } from "./sql-layout-
|
|
5
|
-
import { c as metaPaths } from "./emit-
|
|
6
|
-
import { n as render } from "./render-
|
|
3
|
+
import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-3BMqhsTa.js";
|
|
4
|
+
import { P as parseMetadataDocument, j as MetadataRejectedError } from "./sql-layout-CpbXj-r9.js";
|
|
5
|
+
import { c as metaPaths } from "./emit-Diublx-B.js";
|
|
6
|
+
import { n as render } from "./render-DinflArt.js";
|
|
7
7
|
import { basename, join, relative, resolve, sep } from "node:path";
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
9
9
|
import { jsonSchema } from "better-supabase/generators/json-schema";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
|
|
2
2
|
import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
|
|
3
|
-
import { t as appTablePlan } from "./app-table-files-
|
|
3
|
+
import { t as appTablePlan } from "./app-table-files-BQU5_xhz.js";
|
|
4
4
|
import { i as plain } from "./style-B5-nByxb.js";
|
|
5
5
|
// src/cli/commands/migrate.ts
|
|
6
6
|
const MIGRATE_ARGS = {};
|