better-supabase 0.18.2 → 0.18.3
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/add-BKybJ2e1.js +1 -0
- package/dist/cli/{add-ee805E_R.js → add-Ccca1h3C.js} +2 -2
- package/dist/cli/{add-CbUFLPVA.js → add-Elh2S4Z8.js} +9 -9
- package/dist/cli/{backfill-CCNXzDjt.js → backfill-kq6M-ksU.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CKp4EfLe.js → blocks-CSOK4qqe.js} +1 -1
- package/dist/cli/{blocks-DNgcfS8X.js → blocks-vl6ydiEz.js} +1 -1
- package/dist/cli/{cache-CDNVq1vO.js → cache-DPRc-BzP.js} +1 -1
- package/dist/cli/{codemod-B621vQYQ.js → codemod-CoaS9hJu.js} +1 -1
- package/dist/cli/{content-mapper-Chm3txER.js → content-mapper-DM2jgKpn.js} +2 -2
- package/dist/cli/{doctor-EWtWH8I9.js → doctor-CU08NDWh.js} +14 -14
- package/dist/cli/{gen-D-g9TAmr.js → gen-DNwJl35g.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-D0SxtKH5.js → init-B_CsBYPR.js} +5 -5
- package/dist/cli/{live-PaO1MC10.js → live-TQN9GSV4.js} +2 -2
- package/dist/cli/{mcp-CHpzdlOg.js → mcp-BfC4giv7.js} +2 -2
- package/dist/cli/{metadata-KKCdxMLb.js → metadata-DlISbZDp.js} +3 -3
- package/dist/cli/{migration-safety-Cgr44KLM.js → migration-safety-C8mh2xlK.js} +1 -1
- package/dist/cli/{migrations-VmJloDtq.js → migrations-D-0Sd9tO.js} +1 -1
- package/dist/cli/{module-migration-D4lirR47.js → module-migration-Cl8hBBqw.js} +2 -2
- package/dist/cli/powersync-BEWwRqNy.js +1 -0
- package/dist/cli/{powersync-Cc9Ad_Mn.js → powersync-CBCanSnb.js} +2 -2
- package/dist/cli/{print-CXmXGe3Y.js → print-DImaK12W.js} +2 -2
- package/dist/cli/{remove-CJi3fvpP.js → remove-DeOze3-k.js} +5 -5
- package/dist/cli/{render-CVTKsacY.js → render-GFy-2cii.js} +3 -3
- package/dist/cli/{run-DvK2vagi.js → run-D4XWCMl2.js} +21 -21
- package/dist/cli/{run-x9l841K2.js → run-DNpUCD8d.js} +8 -8
- package/dist/cli/{shared-FhGSrA9E.js → shared-DM_FKwqk.js} +1 -1
- package/dist/cli/{snapshot-B12QpZNf.js → snapshot-BnZCeU7E.js} +2 -2
- package/dist/cli/{source-DP8KOgax.js → source-DZonA0x5.js} +1 -1
- package/dist/cli/{spec-D-NPgLTj.js → spec-DCO8EEnf.js} +2 -2
- package/dist/cli/{spec-CIQBAQgr.js → spec-U6hCGGu_.js} +1 -1
- package/dist/cli/{sql-layout-DTczUfCt.js → sql-layout-VnkvENWw.js} +2 -2
- package/dist/cli/{sync-DHJ6UBod.js → sync-D-YWMzZI.js} +3 -3
- package/dist/cli/{upgrade-B69K7-JE.js → upgrade-BGcDzVSu.js} +4 -4
- package/dist/cli/{upgrade-C7SEKT4b.js → upgrade-DKZ3QOEJ.js} +2 -2
- package/dist/cli/{version-DmaGTP3L.js → version-BatoE1Gj.js} +1 -1
- package/dist/create/index.js +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/otel/index.js +4 -4
- package/dist/sql/index.js +1 -1
- package/dist/{sql-D2Sc6BTr.js → sql-B8usqPPx.js} +2 -1
- package/package.json +1 -1
- package/dist/cli/add-k8gdux-e.js +0 -1
- package/dist/cli/powersync-Bo16K2S6.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as addCommand } from "./add-Elh2S4Z8.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-
|
|
2
|
+
import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-D-0Sd9tO.js";
|
|
3
3
|
import { r as applyPlan } from "./files-CX71yBm8.js";
|
|
4
4
|
import { n as addBlocksToJson, s as keyText, t as addBlocksToConfig } from "./config-edit-CrWfk8s3.js";
|
|
5
|
-
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-
|
|
5
|
+
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-D-YWMzZI.js";
|
|
6
6
|
import { basename, dirname } from "node:path";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
4
4
|
import { a as parseNames, n as CliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
|
|
6
|
-
import { t as loadSnapshot } from "./snapshot-
|
|
6
|
+
import { t as loadSnapshot } from "./snapshot-BnZCeU7E.js";
|
|
7
7
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
8
|
-
import { a as toCatalog } from "./source-
|
|
9
|
-
import { n as dataMigration } from "./migrations-
|
|
8
|
+
import { a as toCatalog } from "./source-DZonA0x5.js";
|
|
9
|
+
import { n as dataMigration } from "./migrations-D-0Sd9tO.js";
|
|
10
10
|
import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-BJSqMi04.js";
|
|
11
11
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
12
|
-
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-
|
|
12
|
+
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-C8mh2xlK.js";
|
|
13
13
|
import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
|
|
14
14
|
import { d as setBlockInJson, f as setPathInConfig, h as setPresetInJson, m as setPresetInConfig, n as addBlocksToJson, p as setPathInJson, r as addBlocksToWiring, t as addBlocksToConfig, u as setBlockInConfig } from "./config-edit-CrWfk8s3.js";
|
|
15
|
-
import { t as syncModules } from "./sync-
|
|
16
|
-
import { t as addModules } from "./add-
|
|
17
|
-
import { n as ident } from "./live-
|
|
18
|
-
import { t as blockNames } from "./blocks-
|
|
15
|
+
import { t as syncModules } from "./sync-D-YWMzZI.js";
|
|
16
|
+
import { t as addModules } from "./add-Ccca1h3C.js";
|
|
17
|
+
import { n as ident } from "./live-TQN9GSV4.js";
|
|
18
|
+
import { t as blockNames } from "./blocks-CSOK4qqe.js";
|
|
19
19
|
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-DlckPVje.js";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { dirname, join, posix, resolve } from "node:path";
|
|
@@ -3,7 +3,7 @@ import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
|
3
3
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
|
|
4
4
|
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BJSqMi04.js";
|
|
5
5
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
6
|
-
import { n as ident } from "./live-
|
|
6
|
+
import { n as ident } from "./live-TQN9GSV4.js";
|
|
7
7
|
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-DlckPVje.js";
|
|
8
8
|
//#region src/cli/commands/backfill.ts
|
|
9
9
|
const DEFAULT_BATCH = 1e3;
|
package/dist/cli/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
|
|
4
|
-
import { n as listModules, t as printModule } from "./print-
|
|
4
|
+
import { n as listModules, t as printModule } from "./print-DImaK12W.js";
|
|
5
5
|
import { t as decodePresetInput } from "./preset-BwmIfFnh.js";
|
|
6
6
|
import { BLOCK_CATEGORIES } from "better-supabase/blocks";
|
|
7
7
|
import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
|
|
@@ -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-CSOK4qqe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
@@ -4,7 +4,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
|
|
|
4
4
|
import { t as migrateCliCall } from "./moved-DVwgE8lV.js";
|
|
5
5
|
import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
|
|
6
6
|
import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
7
|
-
import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-
|
|
7
|
+
import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-VnkvENWw.js";
|
|
8
8
|
import { a as configObject, c as mask, f as setPathInConfig, g as skipSpace, h as setPresetInJson, i as closingIndex, l as properties, m as setPresetInConfig, o as indentAt, p as setPathInJson, t as addBlocksToConfig, v as codeRanges } from "./config-edit-CrWfk8s3.js";
|
|
9
9
|
import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-R7UChFFl.js";
|
|
10
10
|
import { a as REVIEW_0_15, c as renameSubpaths, r as PLUGIN_IMPORT_RENAMES, s as SUBPATH_RENAMES_0_15, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as readIfExists } from "./io-DH1kcmmP.js";
|
|
2
|
-
import { t as CACHE_DIR } from "./cache-
|
|
3
|
-
import { x as installedVersion } from "./snapshot-
|
|
2
|
+
import { t as CACHE_DIR } from "./cache-DPRc-BzP.js";
|
|
3
|
+
import { x as installedVersion } from "./snapshot-BnZCeU7E.js";
|
|
4
4
|
import { t as i } from "./jsonc-D5Fu67jw.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
4
4
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
|
|
6
6
|
import { a as sameText, t as display } from "./io-DH1kcmmP.js";
|
|
7
|
-
import { t as CACHE_DIR } from "./cache-
|
|
7
|
+
import { t as CACHE_DIR } from "./cache-DPRc-BzP.js";
|
|
8
8
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
9
|
-
import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError } from "./snapshot-
|
|
10
|
-
import { d as configFor, r as renderFiles, u as notNullTag } from "./render-
|
|
9
|
+
import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError } from "./snapshot-BnZCeU7E.js";
|
|
10
|
+
import { d as configFor, r as renderFiles, u as notNullTag } from "./render-GFy-2cii.js";
|
|
11
11
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
12
|
-
import { i as request } from "./source-
|
|
13
|
-
import { g as providerLabel, u as compiledReadSets } from "./migrations-
|
|
12
|
+
import { i as request } from "./source-DZonA0x5.js";
|
|
13
|
+
import { g as providerLabel, u as compiledReadSets } from "./migrations-D-0Sd9tO.js";
|
|
14
14
|
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BJSqMi04.js";
|
|
15
15
|
import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-CncmQbO0.js";
|
|
16
16
|
import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
|
|
17
17
|
import { n as readStackStatus } from "./stack-status-B_Ipd_-z.js";
|
|
18
18
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
19
|
-
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-
|
|
19
|
+
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-DM2jgKpn.js";
|
|
20
20
|
import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
21
|
-
import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-
|
|
22
|
-
import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-
|
|
23
|
-
import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-
|
|
24
|
-
import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-
|
|
25
|
-
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-
|
|
21
|
+
import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-DNpUCD8d.js";
|
|
22
|
+
import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-VnkvENWw.js";
|
|
23
|
+
import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-DM_FKwqk.js";
|
|
24
|
+
import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-Cl8hBBqw.js";
|
|
25
|
+
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-C8mh2xlK.js";
|
|
26
26
|
import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
|
|
27
|
-
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-
|
|
27
|
+
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-TQN9GSV4.js";
|
|
28
28
|
import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-DlckPVje.js";
|
|
29
29
|
import { i as PLUGIN_SUBPATH_RENAMES, n as BLOCK_SUBPATH_RENAMES, o as SPEC_SUBPATH_RENAMES, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
|
|
30
30
|
import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-DQTW53Vf.js";
|
|
31
31
|
import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-6hS-WEmh.js";
|
|
32
32
|
import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-BYlQ96WS.js";
|
|
33
|
-
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-
|
|
33
|
+
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-DlISbZDp.js";
|
|
34
34
|
import { existsSync } from "node:fs";
|
|
35
35
|
import { dirname, resolve } from "node:path";
|
|
36
36
|
import { createHash } from "node:crypto";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
3
|
import { a as parseNames, i as failedResult, n as CliError } from "./errors-BTe6A15O.js";
|
|
4
|
-
import { u as catalogFingerprint } from "./cache-
|
|
5
|
-
import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-
|
|
6
|
-
import { n as dataMigration } from "./migrations-
|
|
4
|
+
import { u as catalogFingerprint } from "./cache-DPRc-BzP.js";
|
|
5
|
+
import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-BnZCeU7E.js";
|
|
6
|
+
import { n as dataMigration } from "./migrations-D-0Sd9tO.js";
|
|
7
7
|
import { d as GEN_TASKS, p as isGenTask } from "./config-BJSqMi04.js";
|
|
8
8
|
import { c as insideRoot, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
9
|
-
import { n as runGen } from "./run-
|
|
10
|
-
import { t as syncModules } from "./sync-
|
|
11
|
-
import { t as addModules } from "./add-
|
|
12
|
-
import { n as listModules, t as printModule } from "./print-
|
|
9
|
+
import { n as runGen } from "./run-DNpUCD8d.js";
|
|
10
|
+
import { t as syncModules } from "./sync-D-YWMzZI.js";
|
|
11
|
+
import { t as addModules } from "./add-Ccca1h3C.js";
|
|
12
|
+
import { n as listModules, t as printModule } from "./print-DImaK12W.js";
|
|
13
13
|
import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-DlckPVje.js";
|
|
14
|
-
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-
|
|
14
|
+
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-DlISbZDp.js";
|
|
15
15
|
import { a as runEnv } from "./env-BCgVZkcb.js";
|
|
16
|
-
import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-
|
|
17
|
-
import { n as runPowerSync } from "./powersync-
|
|
16
|
+
import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-DCO8EEnf.js";
|
|
17
|
+
import { n as runPowerSync } from "./powersync-CBCanSnb.js";
|
|
18
18
|
import { t as runSeed } from "./seed-D9mt8bnW.js";
|
|
19
|
-
import { t as upgrade } from "./upgrade-
|
|
19
|
+
import { t as upgrade } from "./upgrade-BGcDzVSu.js";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { resolve } from "node:path";
|
|
22
22
|
//#region src/cli/commands/sql.ts
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -798,6 +798,6 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
|
|
|
798
798
|
export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined): Promise<ResolvedConfig>;
|
|
799
799
|
//#endregion
|
|
800
800
|
//#region src/cli/version.d.ts
|
|
801
|
-
export declare const VERSION = "0.18.
|
|
801
|
+
export declare const VERSION = "0.18.3";
|
|
802
802
|
//#endregion
|
|
803
803
|
export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, Choice, Cli, CliArgs, CliCommand, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliLog, CliProblem, CliProblemExtensions, 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,12 +1,12 @@
|
|
|
1
1
|
import { a as list, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
|
-
import { i as run, n as createCli, r as help, t as commandNames } from "./run-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
2
|
+
import { i as run, n as createCli, r as help, t as commandNames } from "./run-D4XWCMl2.js";
|
|
3
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
4
4
|
import { n as CliError, t as CLI_ERRORS_URL } from "./errors-BTe6A15O.js";
|
|
5
|
-
import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-
|
|
6
|
-
import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-
|
|
7
|
-
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-
|
|
5
|
+
import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-BnZCeU7E.js";
|
|
6
|
+
import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-GFy-2cii.js";
|
|
7
|
+
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-DZonA0x5.js";
|
|
8
8
|
import { s as loadConfig } from "./config-BJSqMi04.js";
|
|
9
|
-
import { n as runGen } from "./run-
|
|
9
|
+
import { n as runGen } from "./run-DNpUCD8d.js";
|
|
10
10
|
//#region src/cli/introspect/from-catalog.ts
|
|
11
11
|
/**
|
|
12
12
|
* Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
|
|
@@ -2,14 +2,14 @@ import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BW
|
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
3
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
4
4
|
import { r as readIfExists } from "./io-DH1kcmmP.js";
|
|
5
|
-
import { l as TYPEGEN_VERSION } from "./cache-
|
|
5
|
+
import { l as TYPEGEN_VERSION } from "./cache-DPRc-BzP.js";
|
|
6
6
|
import { a as findConfig, s as loadConfig } from "./config-BJSqMi04.js";
|
|
7
|
-
import { r as contentMapperFiles } from "./content-mapper-
|
|
7
|
+
import { r as contentMapperFiles } from "./content-mapper-DM2jgKpn.js";
|
|
8
8
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
9
|
-
import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-
|
|
10
|
-
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 promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-Elh2S4Z8.js";
|
|
10
|
+
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-C8mh2xlK.js";
|
|
11
11
|
import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
|
|
12
|
-
import { s as enablePgDelta, t as syncModules } from "./sync-
|
|
12
|
+
import { s as enablePgDelta, t as syncModules } from "./sync-D-YWMzZI.js";
|
|
13
13
|
import { existsSync } from "node:fs";
|
|
14
14
|
import { join, posix, resolve } from "node:path";
|
|
15
15
|
import { glob, readFile } from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorText } from "./errors-BTe6A15O.js";
|
|
2
|
-
import "./source-
|
|
3
|
-
import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-
|
|
2
|
+
import "./source-DZonA0x5.js";
|
|
3
|
+
import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-DM_FKwqk.js";
|
|
4
4
|
//#region src/cli/doctor/reserved-roles.ts
|
|
5
5
|
/**
|
|
6
6
|
* Supautils' `reserved_roles` on Supabase. Nobody but a superuser may alter,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
|
-
import { a as envelope, i as run } from "./run-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
2
|
+
import { a as envelope, i as run } from "./run-D4XWCMl2.js";
|
|
3
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
4
4
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { n as consentToken } from "./agent-CbuPvI2x.js";
|
|
6
6
|
import { C as optional, D as record, N as unknown, a as array, d as is, j as string$1, k as safeParse, o as boolean, t as PROCESS_ENV, x as object } from "./env-DMgjB_4y.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { i as readStdin } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-
|
|
4
|
-
import { c as metaPaths, n as render } from "./render-
|
|
5
|
-
import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-
|
|
3
|
+
import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-BnZCeU7E.js";
|
|
4
|
+
import { c as metaPaths, n as render } from "./render-GFy-2cii.js";
|
|
5
|
+
import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-DNpUCD8d.js";
|
|
6
6
|
import { basename, join, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { jsonSchema, standardSchema, valibot, zod } from "better-supabase/config";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as INTEGRATIONS } from "./config-BJSqMi04.js";
|
|
2
|
-
import { c as splitStatements } from "./shared-
|
|
2
|
+
import { c as splitStatements } from "./shared-DM_FKwqk.js";
|
|
3
3
|
import { dirname, join, posix } from "node:path";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { INTEGRATION_INFO, groupEntries } from "better-supabase/config";
|
|
@@ -2,7 +2,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
|
|
|
2
2
|
import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
3
3
|
import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
|
|
4
4
|
import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
5
|
-
import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-
|
|
5
|
+
import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-VnkvENWw.js";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import { readFile, readdir } from "node:fs/promises";
|
|
8
8
|
import { MODULE_ID_TYPES, compileReadSets, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, renderBlocks, resolveBlocks, scopeProblems, templateFunctions } from "better-supabase/sql";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as stampAfter } from "./migrations-
|
|
1
|
+
import { i as stampAfter } from "./migrations-D-0Sd9tO.js";
|
|
2
2
|
import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
3
3
|
import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
4
|
-
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-
|
|
4
|
+
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-VnkvENWw.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { readFile, readdir } from "node:fs/promises";
|
|
7
7
|
import { moduleSchemaExtensions } from "better-supabase/sql";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as powersyncStreamsCommand } from "./powersync-CBCanSnb.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
|
-
import { c as layoutFor, i as stampAfter } from "./migrations-
|
|
2
|
+
import { c as layoutFor, i as stampAfter } from "./migrations-D-0Sd9tO.js";
|
|
3
3
|
import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
4
|
-
import { n as migrationsDir } from "./sql-layout-
|
|
4
|
+
import { n as migrationsDir } from "./sql-layout-VnkvENWw.js";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { join, resolve } from "node:path";
|
|
7
7
|
import { readFile, readdir } from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { s as layout } from "./migrations-
|
|
3
|
-
import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-
|
|
2
|
+
import { s as layout } from "./migrations-D-0Sd9tO.js";
|
|
3
|
+
import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-Cl8hBBqw.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { SQL_MODULES, contractSignature, customContracts, moduleBody, moduleFilePaths } from "better-supabase/sql";
|
|
@@ -2,15 +2,15 @@ import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
3
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
4
4
|
import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
|
|
5
|
-
import { c as layoutFor } from "./migrations-
|
|
5
|
+
import { c as layoutFor } from "./migrations-D-0Sd9tO.js";
|
|
6
6
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-CX71yBm8.js";
|
|
7
|
-
import { a as sqlPlan } from "./sql-layout-
|
|
8
|
-
import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-
|
|
7
|
+
import { a as sqlPlan } from "./sql-layout-VnkvENWw.js";
|
|
8
|
+
import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-Elh2S4Z8.js";
|
|
9
9
|
import { t as detectProject } from "./detect-D9JaAX20.js";
|
|
10
10
|
import { _ as wiringBlocks, a as configObject, c as mask, i as closingIndex, l as properties } from "./config-edit-CrWfk8s3.js";
|
|
11
|
-
import { n as guardedRemoval } from "./sync-
|
|
11
|
+
import { n as guardedRemoval } from "./sync-D-YWMzZI.js";
|
|
12
12
|
import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
|
|
13
|
-
import { t as blockNames } from "./blocks-
|
|
13
|
+
import { t as blockNames } from "./blocks-CSOK4qqe.js";
|
|
14
14
|
import { i as tidyInline, t as cutRange } from "./config-group-C8tjut39.js";
|
|
15
15
|
import { existsSync } from "node:fs";
|
|
16
16
|
import { resolve } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { n as importPath } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-
|
|
3
|
+
import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-DPRc-BzP.js";
|
|
4
4
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
5
|
-
import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-
|
|
5
|
+
import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-BnZCeU7E.js";
|
|
6
6
|
import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
|
|
7
|
-
import { a as toCatalog } from "./source-
|
|
7
|
+
import { a as toCatalog } from "./source-DZonA0x5.js";
|
|
8
8
|
import { basename, dirname, isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
9
9
|
import { entityNames } from "better-supabase/blocks";
|
|
10
10
|
import { DEFAULT_CLAIMS, blockEntities, blockEntityRenames, blockSubjectTypes, tenantClaimPaths, tenantNameOf } from "better-supabase/config";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as COMMANDS, d as GROUPS, f as RESERVED_NAMES, h as runCommand, i as joinRepeated, m as parseArgs$2, o as listArgs, s as runsWithInvalidConfig, t as GLOBAL_ARGS, u as DOCS_ORIGIN } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { n as highlight, r as painter } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
4
4
|
import { n as CliError, o as toCliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { a as missingInputNext, o as resolveAgent, t as checkConsent } from "./agent-CbuPvI2x.js";
|
|
6
6
|
import { a as globalFlags, c as resolveCommand, i as commandTree, n as closestName, o as isVariadic, r as commandArgs, t as checkArgs } from "./parse-B079x40m.js";
|
|
@@ -16,36 +16,36 @@ import { resolve } from "node:path";
|
|
|
16
16
|
* loads on demand, so `--version` and `--help` import no command.
|
|
17
17
|
*/
|
|
18
18
|
const LOADERS = [
|
|
19
|
-
["init", () => import("./init-
|
|
20
|
-
["add", () => import("./add-
|
|
21
|
-
["remove", () => import("./remove-
|
|
22
|
-
["upgrade", () => import("./upgrade-
|
|
23
|
-
["gen", () => import("./gen-
|
|
24
|
-
["doctor", () => import("./doctor-
|
|
19
|
+
["init", () => import("./init-B_CsBYPR.js").then((m) => m.initCommand)],
|
|
20
|
+
["add", () => import("./add-BKybJ2e1.js").then((m) => m.addCommand)],
|
|
21
|
+
["remove", () => import("./remove-DeOze3-k.js").then((m) => m.removeCommand)],
|
|
22
|
+
["upgrade", () => import("./upgrade-DKZ3QOEJ.js").then((m) => m.upgradeCommand)],
|
|
23
|
+
["gen", () => import("./gen-DNwJl35g.js").then((m) => m.genCommand)],
|
|
24
|
+
["doctor", () => import("./doctor-CU08NDWh.js").then((m) => m.doctorCommand)],
|
|
25
25
|
["db query", () => import("./db-DYU5hUcd.js").then((m) => m.dbQueryCommand)],
|
|
26
26
|
["db diff", () => import("./db-DYU5hUcd.js").then((m) => m.dbDiffCommand)],
|
|
27
27
|
["db seed", () => import("./seed-EPO6AvLG.js").then((m) => m.seedCommand)],
|
|
28
|
-
["db backfill", () => import("./backfill-
|
|
28
|
+
["db backfill", () => import("./backfill-kq6M-ksU.js").then((m) => m.dbBackfillCommand)],
|
|
29
29
|
["dev env", () => import("./env-xhwXk5Ri.js").then((m) => m.envCommand)],
|
|
30
30
|
["dev run", () => import("./run-DmOTMa44.js").then((m) => m.runCommand)],
|
|
31
31
|
["dev keys", () => import("./keys-CbaL0lnw.js").then((m) => m.keysCommand)],
|
|
32
32
|
["dev stack ls", () => import("./stack-DgASZP0K.js").then((m) => m.stackLsCommand)],
|
|
33
33
|
["dev stack prune", () => import("./stack-DgASZP0K.js").then((m) => m.stackPruneCommand)],
|
|
34
|
-
["blocks list", () => import("./blocks-
|
|
35
|
-
["blocks view", () => import("./blocks-
|
|
36
|
-
["blocks search", () => import("./blocks-
|
|
37
|
-
["powersync streams", () => import("./powersync-
|
|
38
|
-
["spec emit", () => import("./spec-
|
|
39
|
-
["spec validate", () => import("./spec-
|
|
40
|
-
["mcp", () => import("./mcp-
|
|
34
|
+
["blocks list", () => import("./blocks-vl6ydiEz.js").then((m) => m.blocksListCommand)],
|
|
35
|
+
["blocks view", () => import("./blocks-vl6ydiEz.js").then((m) => m.blocksViewCommand)],
|
|
36
|
+
["blocks search", () => import("./blocks-vl6ydiEz.js").then((m) => m.blocksSearchCommand)],
|
|
37
|
+
["powersync streams", () => import("./powersync-BEWwRqNy.js").then((m) => m.powersyncStreamsCommand)],
|
|
38
|
+
["spec emit", () => import("./spec-U6hCGGu_.js").then((m) => m.specEmitCommand)],
|
|
39
|
+
["spec validate", () => import("./spec-U6hCGGu_.js").then((m) => m.specValidateCommand)],
|
|
40
|
+
["mcp", () => import("./mcp-BfC4giv7.js").then((m) => m.mcpCommand)],
|
|
41
41
|
["skills list", () => import("./skills-FXAVPLzp.js").then((m) => m.skillsListCommand)],
|
|
42
42
|
["skills install", () => import("./skills-FXAVPLzp.js").then((m) => m.skillsInstallCommand)],
|
|
43
|
-
["codemod 0.4", () => import("./codemod-
|
|
44
|
-
["codemod 0.5", () => import("./codemod-
|
|
45
|
-
["codemod 0.6", () => import("./codemod-
|
|
46
|
-
["codemod 0.9", () => import("./codemod-
|
|
47
|
-
["codemod 0.11", () => import("./codemod-
|
|
48
|
-
["codemod 0.15", () => import("./codemod-
|
|
43
|
+
["codemod 0.4", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.4"))],
|
|
44
|
+
["codemod 0.5", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.5"))],
|
|
45
|
+
["codemod 0.6", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.6"))],
|
|
46
|
+
["codemod 0.9", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.9"))],
|
|
47
|
+
["codemod 0.11", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.11"))],
|
|
48
|
+
["codemod 0.15", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.15"))],
|
|
49
49
|
["completion", () => import("./completion-BfnKI4QZ.js").then((m) => m.completionCommand)],
|
|
50
50
|
["config", () => import("./config-WKDixoGK.js").then((m) => m.configCommand)]
|
|
51
51
|
];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { r as errorText } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { a as sameText, t as display } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-
|
|
3
|
+
import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-DPRc-BzP.js";
|
|
4
4
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
5
|
-
import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-
|
|
6
|
-
import { n as render } from "./render-
|
|
7
|
-
import { _ as unsafeKey, d as accessProviderMode, f as accessRequirements, g as providerLabel, h as moduleKeyProblems, m as entitlementsMode, p as entitlementRequirements, u as compiledReadSets } from "./migrations-
|
|
8
|
-
import { s as schemaStampPath } from "./content-mapper-
|
|
5
|
+
import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-BnZCeU7E.js";
|
|
6
|
+
import { n as render } from "./render-GFy-2cii.js";
|
|
7
|
+
import { _ as unsafeKey, d as accessProviderMode, f as accessRequirements, g as providerLabel, h as moduleKeyProblems, m as entitlementsMode, p as entitlementRequirements, u as compiledReadSets } from "./migrations-D-0Sd9tO.js";
|
|
8
|
+
import { s as schemaStampPath } from "./content-mapper-DM2jgKpn.js";
|
|
9
9
|
import { a as changedFiles, d as fileDiff, i as changeLines, r as applyPlan, s as hasConflicts } from "./files-CX71yBm8.js";
|
|
10
|
-
import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-
|
|
11
|
-
import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-
|
|
12
|
-
import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-
|
|
10
|
+
import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-VnkvENWw.js";
|
|
11
|
+
import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-DM_FKwqk.js";
|
|
12
|
+
import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-Cl8hBBqw.js";
|
|
13
13
|
import { existsSync } from "node:fs";
|
|
14
14
|
import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
15
15
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as toCatalog } from "./source-
|
|
1
|
+
import { a as toCatalog } from "./source-DZonA0x5.js";
|
|
2
2
|
import { h as tomlGet, p as sqlWorkflow, r as detectWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
3
3
|
//#region src/cli/doctor/shared.ts
|
|
4
4
|
const catalogs = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-
|
|
2
|
+
import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-DPRc-BzP.js";
|
|
3
3
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
4
|
-
import { n as managementSource, r as pgSource } from "./source-
|
|
4
|
+
import { n as managementSource, r as pgSource } from "./source-DZonA0x5.js";
|
|
5
5
|
import { n as databaseUrl, u as accessToken } from "./config-BJSqMi04.js";
|
|
6
6
|
import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, u as pgFunctionHooks } from "./supabase-toml-CncmQbO0.js";
|
|
7
7
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { r as redactUrl } from "./redact-KGAk2Ul9.js";
|
|
4
4
|
import { n as HTTP_CHANNEL } from "./trace-VbdO6bcN.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require, t as __commonJSMin } from "./rolldown-runtime-kJ_i4yPo.js";
|
|
2
2
|
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BatoE1Gj.js";
|
|
4
4
|
import { i as failedResult, n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
6
|
-
import { c as writeAtomic, t as CACHE_DIR } from "./cache-
|
|
6
|
+
import { c as writeAtomic, t as CACHE_DIR } from "./cache-DPRc-BzP.js";
|
|
7
7
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
8
8
|
import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
|
|
9
9
|
import { a as changedFiles, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as specEmitCommand, i as specValidateCommand } from "./spec-
|
|
1
|
+
export { n as specEmitCommand, i as specValidateCommand } from "./spec-DCO8EEnf.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-
|
|
2
|
-
import { a as toCatalog } from "./source-
|
|
1
|
+
import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-BnZCeU7E.js";
|
|
2
|
+
import { a as toCatalog } from "./source-DZonA0x5.js";
|
|
3
3
|
import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { a as writeExtensionsMigration, c as layoutFor, t as DATA_NEXT } from "./migrations-
|
|
3
|
+
import { a as writeExtensionsMigration, c as layoutFor, t as DATA_NEXT } from "./migrations-D-0Sd9tO.js";
|
|
4
4
|
import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, o as findSupabaseRoot, p as sqlWorkflow, t as PGDELTA_TABLE } from "./supabase-toml-CncmQbO0.js";
|
|
5
5
|
import { d as fileDiff, i as changeLines, l as keepHandEdit, o as handEditedError, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-CX71yBm8.js";
|
|
6
|
-
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-
|
|
7
|
-
import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-
|
|
6
|
+
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-VnkvENWw.js";
|
|
7
|
+
import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-Cl8hBBqw.js";
|
|
8
8
|
import { t as loadTopics } from "./topics-BpdnYmWb.js";
|
|
9
9
|
import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
|
|
10
10
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
2
|
-
import { c as layoutFor, r as migrationStamp } from "./migrations-
|
|
2
|
+
import { c as layoutFor, r as migrationStamp } from "./migrations-D-0Sd9tO.js";
|
|
3
3
|
import { d as fileDiff, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
4
|
-
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-
|
|
5
|
-
import { a as migrationInstances, c as sameModuleMigration, o as migrationModules, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-
|
|
6
|
-
import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-
|
|
4
|
+
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-VnkvENWw.js";
|
|
5
|
+
import { a as migrationInstances, c as sameModuleMigration, o as migrationModules, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-Cl8hBBqw.js";
|
|
6
|
+
import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-D-YWMzZI.js";
|
|
7
7
|
import { a as legacyPrefixSql, i as legacyPrefixNames, r as legacyBlocksTableSql } from "./legacy-prefix-R7UChFFl.js";
|
|
8
8
|
import { resolve } from "node:path";
|
|
9
9
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as syncModules } from "./sync-
|
|
3
|
+
import { t as syncModules } from "./sync-D-YWMzZI.js";
|
|
4
4
|
import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
|
|
5
|
-
import { t as upgrade } from "./upgrade-
|
|
5
|
+
import { t as upgrade } from "./upgrade-BGcDzVSu.js";
|
|
6
6
|
//#region src/cli/commands/upgrade.ts
|
|
7
7
|
const UPGRADE_ARGS = {
|
|
8
8
|
check: {
|
package/dist/create/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as presetOf, d as resolvePreset } from "../config-CD2OGfCG.js";
|
|
|
2
2
|
import { C as APP_ON_DELETE_ACTIONS, E as PRESET_CATALOG, a as appIdentifierError, m as isAppDefault, o as appNameLengthError, p as appDefaultError, s as appReservedColumns } from "../app-tables-DyswUg6J.js";
|
|
3
3
|
import { c as resolveConfig } from "../config-mbVyJwSc.js";
|
|
4
4
|
import { _ as jsonPointer, a as DesignParseError, h as encodeDesign, n as diffDesigns, o as DesignTooLongError, p as designOf, u as designConfig, v as parseDesign } from "../preset-B3CukUhu.js";
|
|
5
|
-
import { R as SQL_MODULES, _ as renderBlocks, i as moduleLayout } from "../sql-
|
|
5
|
+
import { R as SQL_MODULES, _ as renderBlocks, i as moduleLayout } from "../sql-B8usqPPx.js";
|
|
6
6
|
//#region src/create/column-keys.ts
|
|
7
7
|
/** The most options a select takes, and the longest option. */
|
|
8
8
|
const MAX_OPTIONS = 100;
|
package/dist/mapper/bin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as VERSION } from "../cli/version-
|
|
2
|
-
import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-
|
|
3
|
-
import { t as loadSnapshot } from "../cli/snapshot-
|
|
4
|
-
import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-
|
|
1
|
+
import { t as VERSION } from "../cli/version-BatoE1Gj.js";
|
|
2
|
+
import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-DPRc-BzP.js";
|
|
3
|
+
import { t as loadSnapshot } from "../cli/snapshot-BnZCeU7E.js";
|
|
4
|
+
import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-GFy-2cii.js";
|
|
5
5
|
import { i as discoverConfig, s as loadConfig } from "../cli/config-BJSqMi04.js";
|
|
6
6
|
import { i as parseEnv, n as configEnvironment } from "../cli/env-DMgjB_4y.js";
|
|
7
|
-
import { s as schemaStampPath } from "../cli/content-mapper-
|
|
7
|
+
import { s as schemaStampPath } from "../cli/content-mapper-DM2jgKpn.js";
|
|
8
8
|
import { existsSync, realpathSync } from "node:fs";
|
|
9
9
|
import { basename, dirname, join, resolve } from "node:path";
|
|
10
10
|
import { createHash } from "node:crypto";
|
package/dist/otel/index.js
CHANGED
|
@@ -40,9 +40,9 @@ function systemOf(executor) {
|
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
function otel(options = {}) {
|
|
43
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.18.
|
|
43
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.18.3");
|
|
44
44
|
let histogram;
|
|
45
|
-
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.18.
|
|
45
|
+
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.18.3")).createHistogram("db.client.operation.duration", {
|
|
46
46
|
unit: "s",
|
|
47
47
|
description: "Duration of database client operations.",
|
|
48
48
|
advice: { explicitBucketBoundaries: [
|
|
@@ -219,7 +219,7 @@ function otel(options = {}) {
|
|
|
219
219
|
* `betterSupabase.events`. Returns a function that stops listening.
|
|
220
220
|
*/
|
|
221
221
|
function traceAuth(betterSupabase, options = {}) {
|
|
222
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.18.
|
|
222
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.18.3");
|
|
223
223
|
const offAuth = betterSupabase.events.on("auth", (event) => {
|
|
224
224
|
const span = tracer.startSpan("auth.resolve", {
|
|
225
225
|
kind: SpanKind.INTERNAL,
|
|
@@ -257,7 +257,7 @@ function traceAuth(betterSupabase, options = {}) {
|
|
|
257
257
|
* an error status. Returns a function that stops listening.
|
|
258
258
|
*/
|
|
259
259
|
function traceBlockEvents(betterSupabase, options = {}) {
|
|
260
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.18.
|
|
260
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.18.3");
|
|
261
261
|
return betterSupabase.events.on("block", (event) => {
|
|
262
262
|
const attributes = {
|
|
263
263
|
...options.attributes,
|
package/dist/sql/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as resolveBlock, l as appTableEventTypes, v as hasColumnAccess } from "../app-tables-DyswUg6J.js";
|
|
2
2
|
import { c as templateFunctions, o as resolveProviderSql, s as scopeProblems, t as SCOPE_ID_TYPES } from "../access-sql-CNIgUqWf.js";
|
|
3
3
|
import { Y as notNullCheckName, a as DEFAULT_ROLES } from "../workflow-sdk-DELaQEp3.js";
|
|
4
|
-
import { $ as AUDIT_CATEGORIES, A as blockFileState, B as TENANT_SCOPE_POLICY, C as moduleDataDir, D as appTablesFiles, E as APP_TABLES_MODULE, F as moduleHidingColumns, G as subjectColumns, H as resolveExposeColumns, I as modulePermissionKeys, J as migrationOptionUses, K as sameTenantColumn, L as moduleSchemaExtensions, M as moduleFileVersion, N as sameBlockFile, O as scopePolicyName, P as moduleEventTriggers, Q as renamedBlock, R as SQL_MODULES, S as widenedCommands, T as APP_TABLES_MARKER, U as SECRET_COLUMNS, V as excludedColumns, W as dataExportPlan, X as currentBlockName, Y as BLOCK_RENAMES, Z as formerBlockName, _ as renderBlocks, a as tenantsQuery, at as declaredColumnTypes, b as appTablePolicyNotes, c as adoptedColumnProblems, ct as declaredUpdatedAtTriggers, d as moduleWritesText, dt as policyGrants, et as MODULE_ID_TYPES, f as instanceFunctions, ft as rlsTables, g as moduleTopics, h as moduleBody, i as moduleLayout, it as BLOCK_OPTION_SCHEMAS, j as isModuleDataFile, k as blockSqlVersion, l as adoptedTables, lt as declaredViews, m as customContracts, n as compileReadSets, nt as isBlockSqlIdType, o as expiredFlagsQuery, ot as declaredTableColumns, p as entityRenamePlan, pt as auditRegistrations, q as sameTenantTrigger, r as sharedRolesProblems, rt as moduleIdType, s as sameTenantLayout, st as declaredTables, t as compileReadSet, tt as contractSignature, u as adoptedViews, ut as extensionSchema, v as moduleDeprecations, w as moduleFilePaths, x as declaredPolicies, y as upgradePlan, z as resolveBlocks } from "../sql-
|
|
4
|
+
import { $ as AUDIT_CATEGORIES, A as blockFileState, B as TENANT_SCOPE_POLICY, C as moduleDataDir, D as appTablesFiles, E as APP_TABLES_MODULE, F as moduleHidingColumns, G as subjectColumns, H as resolveExposeColumns, I as modulePermissionKeys, J as migrationOptionUses, K as sameTenantColumn, L as moduleSchemaExtensions, M as moduleFileVersion, N as sameBlockFile, O as scopePolicyName, P as moduleEventTriggers, Q as renamedBlock, R as SQL_MODULES, S as widenedCommands, T as APP_TABLES_MARKER, U as SECRET_COLUMNS, V as excludedColumns, W as dataExportPlan, X as currentBlockName, Y as BLOCK_RENAMES, Z as formerBlockName, _ as renderBlocks, a as tenantsQuery, at as declaredColumnTypes, b as appTablePolicyNotes, c as adoptedColumnProblems, ct as declaredUpdatedAtTriggers, d as moduleWritesText, dt as policyGrants, et as MODULE_ID_TYPES, f as instanceFunctions, ft as rlsTables, g as moduleTopics, h as moduleBody, i as moduleLayout, it as BLOCK_OPTION_SCHEMAS, j as isModuleDataFile, k as blockSqlVersion, l as adoptedTables, lt as declaredViews, m as customContracts, n as compileReadSets, nt as isBlockSqlIdType, o as expiredFlagsQuery, ot as declaredTableColumns, p as entityRenamePlan, pt as auditRegistrations, q as sameTenantTrigger, r as sharedRolesProblems, rt as moduleIdType, s as sameTenantLayout, st as declaredTables, t as compileReadSet, tt as contractSignature, u as adoptedViews, ut as extensionSchema, v as moduleDeprecations, w as moduleFilePaths, x as declaredPolicies, y as upgradePlan, z as resolveBlocks } from "../sql-B8usqPPx.js";
|
|
5
5
|
export { APP_TABLES_MARKER, APP_TABLES_MODULE, AUDIT_CATEGORIES, BLOCK_OPTION_SCHEMAS, BLOCK_RENAMES, DEFAULT_ROLES, MODULE_ID_TYPES, SCOPE_ID_TYPES, SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_POLICY, adoptedColumnProblems, adoptedTables, adoptedViews, appTableEventTypes, appTablePolicyNotes, appTablesFiles, auditRegistrations, blockFileState, blockSqlVersion, compileReadSet, compileReadSets, contractSignature, currentBlockName, customContracts, dataExportPlan, declaredColumnTypes, declaredPolicies, declaredTableColumns, declaredTables, declaredUpdatedAtTriggers, declaredViews, entityRenamePlan, excludedColumns, expiredFlagsQuery, extensionSchema, formerBlockName, hasColumnAccess, instanceFunctions, isBlockSqlIdType, isModuleDataFile, migrationOptionUses, moduleBody, moduleDataDir, moduleDeprecations, moduleEventTriggers, moduleFilePaths, moduleFileVersion, moduleHidingColumns, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, moduleTopics, moduleWritesText, notNullCheckName, policyGrants, renamedBlock, renderBlocks, resolveBlock, resolveBlocks, resolveExposeColumns, resolveProviderSql, rlsTables, sameBlockFile, sameTenantColumn, sameTenantLayout, sameTenantTrigger, scopePolicyName, scopeProblems, sharedRolesProblems, subjectColumns, templateFunctions, tenantsQuery, upgradePlan, widenedCommands };
|
|
@@ -191,10 +191,11 @@ function actorMayWriteExpression(layout) {
|
|
|
191
191
|
return fillTemplate("authorization.functions.actorMayWrite", template, {});
|
|
192
192
|
}
|
|
193
193
|
const BUILTIN_ACTOR_MAY_WRITE = "better_supabase.actor_may_write()";
|
|
194
|
+
const BUILTIN_CALL = /(?<!\bfunction\s+)better_supabase\.actor_may_write\(\)/gi;
|
|
194
195
|
/** Swaps the built-in for the provider template so a write never calls both. */
|
|
195
196
|
function applyProviderCheck(sql, expression) {
|
|
196
197
|
if (expression === BUILTIN_ACTOR_MAY_WRITE) return sql;
|
|
197
|
-
return sql.replaceAll(
|
|
198
|
+
return sql.replaceAll(BUILTIN_CALL, `(${expression})`);
|
|
198
199
|
}
|
|
199
200
|
const WRITE = /\b(insert\s+into|update\s+(?:only\s+)?["a-z_]|delete\s+from)\b/i;
|
|
200
201
|
/** Puts the read-only check on user-callable write functions and write policies. */
|
package/package.json
CHANGED
package/dist/cli/add-k8gdux-e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as addCommand } from "./add-CbUFLPVA.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as powersyncStreamsCommand } from "./powersync-Cc9Ad_Mn.js";
|