@rebasepro/types 0.17.1 → 0.17.2-canary.g4d21a53
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/index.es.js
CHANGED
|
@@ -986,7 +986,8 @@ var DEFAULT_COMMIT_PATHS = {
|
|
|
986
986
|
schemaFile: "backend/src/schema.generated.ts",
|
|
987
987
|
ddlFile: "drizzle/schema.sql",
|
|
988
988
|
policiesFile: "drizzle/policies.sql",
|
|
989
|
-
searchFile: "drizzle/search.sql"
|
|
989
|
+
searchFile: "drizzle/search.sql",
|
|
990
|
+
vectorFile: "drizzle/vector.sql"
|
|
990
991
|
};
|
|
991
992
|
//#endregion
|
|
992
993
|
//#region src/types/channel_bus.ts
|
|
@@ -1196,19 +1197,36 @@ registerResourceKind({
|
|
|
1196
1197
|
"REBASE_DRIVER",
|
|
1197
1198
|
"REBASE_DB_POOL_MAX"
|
|
1198
1199
|
],
|
|
1199
|
-
optionKeys: [
|
|
1200
|
+
optionKeys: [
|
|
1201
|
+
"databaseId",
|
|
1202
|
+
"migrations",
|
|
1203
|
+
"extensions"
|
|
1204
|
+
],
|
|
1200
1205
|
implicitDefault: true
|
|
1201
1206
|
});
|
|
1207
|
+
function database(keyOrOptions = DEFAULT_RESOURCE_KEY, options = {}) {
|
|
1208
|
+
return typeof keyOrOptions === "string" ? declareResource("database", keyOrOptions, options) : declareResource("database", DEFAULT_RESOURCE_KEY, keyOrOptions);
|
|
1209
|
+
}
|
|
1202
1210
|
/**
|
|
1203
|
-
*
|
|
1211
|
+
* The extensions the project's databases gave Rebase leave to install.
|
|
1204
1212
|
*
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1213
|
+
* A flat union rather than a per-database answer, because the surfaces that ask
|
|
1214
|
+
* — `rebase db push` and the boot schema-ensure — drive one connection and
|
|
1215
|
+
* generate one `schema.sql` for every collection regardless of `dataSource`.
|
|
1216
|
+
* Splitting the permission by data source would be a distinction the rest of
|
|
1217
|
+
* that pipeline does not make, and a false precision is worse than none.
|
|
1218
|
+
*
|
|
1219
|
+
* Empty for a project that declared nothing, which is every project that has
|
|
1220
|
+
* not opted in — so this reads as a refusal by default, on purpose.
|
|
1209
1221
|
*/
|
|
1210
|
-
function
|
|
1211
|
-
|
|
1222
|
+
function declaredDatabaseExtensions() {
|
|
1223
|
+
const names = /* @__PURE__ */ new Set();
|
|
1224
|
+
for (const declaration of declaredResources("database")) {
|
|
1225
|
+
const declared = declaration.options.extensions;
|
|
1226
|
+
if (!Array.isArray(declared)) continue;
|
|
1227
|
+
for (const name of declared) if (typeof name === "string" && name.trim()) names.add(name.trim());
|
|
1228
|
+
}
|
|
1229
|
+
return [...names].sort();
|
|
1212
1230
|
}
|
|
1213
1231
|
registerResourceKind({
|
|
1214
1232
|
kind: "bucket",
|
|
@@ -1875,6 +1893,6 @@ function isPublicStoragePath(path) {
|
|
|
1875
1893
|
return p.startsWith("public/") || p.startsWith(`default/public/`);
|
|
1876
1894
|
}
|
|
1877
1895
|
//#endregion
|
|
1878
|
-
export { ADMIN_COLLECTION_KEYS, ADMIN_PROPERTY_KEYS, ALL_WHERE_FILTER_OPS, ANONYMOUS_USER_ID, ANONYMOUS_USER_IDS, BUNDLE_FORMAT_VERSION, CANONICAL_TO_REST, DEFAULT_CAPABILITIES, DEFAULT_COMMIT_PATHS, DEFAULT_DATA_SOURCE_KEY, DEFAULT_FILTERABLE_RELATION_KINDS, DEFAULT_FUZZY_THRESHOLD, DEFAULT_LIST_LIMIT, DEFAULT_RESOURCE_KEY, DEFAULT_SEARCH_COLUMN, DEFAULT_SEARCH_LANGUAGE, DEFAULT_SEARCH_WEIGHT, DEFAULT_STORAGE_SOURCE_KEY, DEFAULT_VECTOR_LIST_LIMIT, EntityReference, EntityRelation, FIREBASE_CAPABILITIES, GeoPoint, LEGACY_RLS_JWT_SQL, LEGACY_RLS_ROLES_SQL, LEGACY_RLS_SCHEMA, LEGACY_RLS_UID_SQL, ListLimitError, MAX_LIST_LIMIT, MONGODB_CAPABILITIES, NULL_OPS, POSTGRES_CAPABILITIES, PUBLIC_STORAGE_PREFIX, REBASE_SCHEMA, RELEVANCE_SORT_FIELD, RESERVED_BACKEND_PREFIXES, RESOURCE_GRAPH_VERSION, REST_TO_CANONICAL, RLS_JWT_SQL, RLS_ROLES_SQL, RLS_UID_SQL, RUNTIME_CONTRACT_VERSION, RebaseApiError, RebaseClientError, SCHEMA_VERSION_HEADER, Vector, bucket, buildResourceGraph, canonicalSchemaPayload, computeSchemaVersion, database, declareResource, declaredDataSources, declaredResources, declaredStorageSources, declaredSubscriptions, deserializeCollections, encodeRelationAggregateSort, envBasesForResource, findEnvSuffixCollision, findStorageSuffixCollision, getCollectionDataPath, getDataSourceCapabilities, getDeclaredSubcollections, hasForeignKeyOnTarget, isAnonymousUid, isBranchAdmin, isChannelBusInstance, isDocumentAdmin, isFirebaseCollectionConfig, isLazyComponentRef, isManyToMany, isMongoDBCollectionConfig, isPostgresCollectionConfig, isPublicStoragePath, isRelationAggregateSort, isRelationalCollectionConfig, isResourceHandle, isSQLAdmin, isSchemaAdmin, isSchemaEditingAdmin, isSerializedCollectionRef, isToMany, isValidEngine, nestAdminCollectionKeys, nestAdminKeysOf, nestAdminPropertyKeys, normalizeStorageSources, parseRelationAggregateSort, policy, registerDataSourceCapabilities, registerResourceKind, reservedPrefixFor, resetDeclaredResources, resetDeclaredSubscriptions, resolveClientListLimit, resourceEnvSuffix, resourceKeyOf, resourceKind, resourceKinds, rewriteLegacyRlsFunctions, serializeCollections, setTopicRuntime, sortKeyToString, storageEnvSuffix, toCanonicalOp, topic, usesLegacyRlsFunctions };
|
|
1896
|
+
export { ADMIN_COLLECTION_KEYS, ADMIN_PROPERTY_KEYS, ALL_WHERE_FILTER_OPS, ANONYMOUS_USER_ID, ANONYMOUS_USER_IDS, BUNDLE_FORMAT_VERSION, CANONICAL_TO_REST, DEFAULT_CAPABILITIES, DEFAULT_COMMIT_PATHS, DEFAULT_DATA_SOURCE_KEY, DEFAULT_FILTERABLE_RELATION_KINDS, DEFAULT_FUZZY_THRESHOLD, DEFAULT_LIST_LIMIT, DEFAULT_RESOURCE_KEY, DEFAULT_SEARCH_COLUMN, DEFAULT_SEARCH_LANGUAGE, DEFAULT_SEARCH_WEIGHT, DEFAULT_STORAGE_SOURCE_KEY, DEFAULT_VECTOR_LIST_LIMIT, EntityReference, EntityRelation, FIREBASE_CAPABILITIES, GeoPoint, LEGACY_RLS_JWT_SQL, LEGACY_RLS_ROLES_SQL, LEGACY_RLS_SCHEMA, LEGACY_RLS_UID_SQL, ListLimitError, MAX_LIST_LIMIT, MONGODB_CAPABILITIES, NULL_OPS, POSTGRES_CAPABILITIES, PUBLIC_STORAGE_PREFIX, REBASE_SCHEMA, RELEVANCE_SORT_FIELD, RESERVED_BACKEND_PREFIXES, RESOURCE_GRAPH_VERSION, REST_TO_CANONICAL, RLS_JWT_SQL, RLS_ROLES_SQL, RLS_UID_SQL, RUNTIME_CONTRACT_VERSION, RebaseApiError, RebaseClientError, SCHEMA_VERSION_HEADER, Vector, bucket, buildResourceGraph, canonicalSchemaPayload, computeSchemaVersion, database, declareResource, declaredDataSources, declaredDatabaseExtensions, declaredResources, declaredStorageSources, declaredSubscriptions, deserializeCollections, encodeRelationAggregateSort, envBasesForResource, findEnvSuffixCollision, findStorageSuffixCollision, getCollectionDataPath, getDataSourceCapabilities, getDeclaredSubcollections, hasForeignKeyOnTarget, isAnonymousUid, isBranchAdmin, isChannelBusInstance, isDocumentAdmin, isFirebaseCollectionConfig, isLazyComponentRef, isManyToMany, isMongoDBCollectionConfig, isPostgresCollectionConfig, isPublicStoragePath, isRelationAggregateSort, isRelationalCollectionConfig, isResourceHandle, isSQLAdmin, isSchemaAdmin, isSchemaEditingAdmin, isSerializedCollectionRef, isToMany, isValidEngine, nestAdminCollectionKeys, nestAdminKeysOf, nestAdminPropertyKeys, normalizeStorageSources, parseRelationAggregateSort, policy, registerDataSourceCapabilities, registerResourceKind, reservedPrefixFor, resetDeclaredResources, resetDeclaredSubscriptions, resolveClientListLimit, resourceEnvSuffix, resourceKeyOf, resourceKind, resourceKinds, rewriteLegacyRlsFunctions, serializeCollections, setTopicRuntime, sortKeyToString, storageEnvSuffix, toCanonicalOp, topic, usesLegacyRlsFunctions };
|
|
1879
1897
|
|
|
1880
1898
|
//# sourceMappingURL=index.es.js.map
|