@rebasepro/server 0.12.0 → 0.12.1-canary.g35be8cb
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/GCSStorageController-BEmDYFKc.js +216 -0
- package/dist/GCSStorageController-BEmDYFKc.js.map +1 -0
- package/dist/S3StorageController-CK7r5yZb.js +243 -0
- package/dist/S3StorageController-CK7r5yZb.js.map +1 -0
- package/dist/admin_block-BGQFSAuV.js +123 -0
- package/dist/admin_block-BGQFSAuV.js.map +1 -0
- package/dist/auth-za0fzik1.js +8898 -0
- package/dist/auth-za0fzik1.js.map +1 -0
- package/dist/backend-CIxN4FVm.js +15 -0
- package/dist/backend-CIxN4FVm.js.map +1 -0
- package/dist/backup-CVggVhR2.js +163 -0
- package/dist/backup-CVggVhR2.js.map +1 -0
- package/dist/boot/boot.d.ts +35 -0
- package/dist/boot/driver.d.ts +10 -1
- package/dist/boot/fetch-bundle.d.ts +43 -0
- package/dist/contract-routes-Dj8i5AiM.js +264 -0
- package/dist/contract-routes-Dj8i5AiM.js.map +1 -0
- package/dist/cron/cron-scheduler.d.ts +34 -0
- package/dist/cron-loader-B1S2MCSl.js +63 -0
- package/dist/cron-loader-B1S2MCSl.js.map +1 -0
- package/dist/cron-routes-CrQ0tK-_.js +62 -0
- package/dist/cron-routes-CrQ0tK-_.js.map +1 -0
- package/dist/cron-scheduler-B3RFt0HS.js +647 -0
- package/dist/cron-scheduler-B3RFt0HS.js.map +1 -0
- package/dist/cron-store-BywZsyfZ.js +164 -0
- package/dist/cron-store-BywZsyfZ.js.map +1 -0
- package/dist/dynamic-import-Dvh-K5fl.js.map +1 -1
- package/dist/errors-CgkCzoj7.js +226 -0
- package/dist/errors-CgkCzoj7.js.map +1 -0
- package/dist/function-loader-B_1fYfUY.js +86 -0
- package/dist/function-loader-B_1fYfUY.js.map +1 -0
- package/dist/function-routes-C0cLIy3N.js +28 -0
- package/dist/function-routes-C0cLIy3N.js.map +1 -0
- package/dist/index.es.js +7536 -17820
- package/dist/index.es.js.map +1 -1
- package/dist/{jwt-D-eI6TTu.js → jwt-DD6EtpGj.js} +32 -13
- package/dist/{jwt-D-eI6TTu.js.map → jwt-DD6EtpGj.js.map} +1 -1
- package/dist/logger-BYU66ENZ.js.map +1 -1
- package/dist/logs-routes-BYA72C_C.js +100 -0
- package/dist/logs-routes-BYA72C_C.js.map +1 -0
- package/dist/{openapi-generator-Bjzmb5cn.js → openapi-generator-CFoAp5vF.js} +9 -3
- package/dist/openapi-generator-CFoAp5vF.js.map +1 -0
- package/dist/{schema-editor-routes-DDxfOIid.js → schema-editor-routes-Doil0rrr.js} +4 -3
- package/dist/{schema-editor-routes-DDxfOIid.js.map → schema-editor-routes-Doil0rrr.js.map} +1 -1
- package/dist/{src-CoOAMnBh.js → src-BjI5Wx_8.js} +295 -66
- package/dist/src-BjI5Wx_8.js.map +1 -0
- package/dist/src-_qQ3RNCK.js +279 -0
- package/dist/src-_qQ3RNCK.js.map +1 -0
- package/dist/types-DSnOC4mF.js +38 -0
- package/dist/types-DSnOC4mF.js.map +1 -0
- package/package.json +10 -10
- package/dist/openapi-generator-Bjzmb5cn.js.map +0 -1
- package/dist/src-CoOAMnBh.js.map +0 -1
- package/dist/src-Ivjud8jD.js +0 -957
- package/dist/src-Ivjud8jD.js.map +0 -1
- /package/dist/{chunk-DSJWtz9O.js → rolldown-runtime-DSJWtz9O.js} +0 -0
|
@@ -1,8 +1,189 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "module";
|
|
2
2
|
import "process";
|
|
3
3
|
__createRequire(import.meta.url);
|
|
4
|
-
import { r as __require, t as __commonJSMin } from "./
|
|
5
|
-
import {
|
|
4
|
+
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-DSJWtz9O.js";
|
|
5
|
+
import { c as NULL_OPS, i as isRelationalCollectionConfig, l as REST_TO_CANONICAL, n as getDeclaredSubcollections, o as getDataSourceCapabilities, r as isPostgresCollectionConfig, s as CANONICAL_TO_REST, u as toCanonicalOp } from "./src-_qQ3RNCK.js";
|
|
6
|
+
//#region ../types/src/types/entities.ts
|
|
7
|
+
/**
|
|
8
|
+
* Class used to create a reference to a entity in a different path.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Simple reference (most common case - single driver, single db)
|
|
12
|
+
* new EntityReference({ id: "123", path: "users" })
|
|
13
|
+
*
|
|
14
|
+
* // Reference to a different driver (e.g., Firestore)
|
|
15
|
+
* new EntityReference({ id: "123", path: "analytics", driver: "firestore" })
|
|
16
|
+
*
|
|
17
|
+
* // Reference to a specific database within a driver
|
|
18
|
+
* new EntityReference({ id: "123", path: "orders", driver: "postgres", databaseId: "orders_db" })
|
|
19
|
+
*/
|
|
20
|
+
var EntityReference = class {
|
|
21
|
+
__type = "reference";
|
|
22
|
+
/**
|
|
23
|
+
* ID of the entity
|
|
24
|
+
*/
|
|
25
|
+
id;
|
|
26
|
+
/**
|
|
27
|
+
* A string representing the path of the referenced document (relative
|
|
28
|
+
* to the root of the database).
|
|
29
|
+
*/
|
|
30
|
+
path;
|
|
31
|
+
/**
|
|
32
|
+
* Which driver (e.g., 'postgres', 'firestore').
|
|
33
|
+
* Defaults to "(default)" if not specified.
|
|
34
|
+
*/
|
|
35
|
+
driver;
|
|
36
|
+
/**
|
|
37
|
+
* Which database within the driver.
|
|
38
|
+
* Defaults to "(default)" if not specified.
|
|
39
|
+
*/
|
|
40
|
+
databaseId;
|
|
41
|
+
/**
|
|
42
|
+
* Create a reference to a entity.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // Simple reference (most common case)
|
|
46
|
+
* new EntityReference({ id: "123", path: "users" })
|
|
47
|
+
*
|
|
48
|
+
* // With driver
|
|
49
|
+
* new EntityReference({ id: "123", path: "analytics", driver: "firestore" })
|
|
50
|
+
*/
|
|
51
|
+
constructor(props) {
|
|
52
|
+
this.id = props.id;
|
|
53
|
+
this.path = props.path;
|
|
54
|
+
this.driver = props.driver;
|
|
55
|
+
this.databaseId = props.databaseId;
|
|
56
|
+
}
|
|
57
|
+
get pathWithId() {
|
|
58
|
+
return `${this.path}/${this.id}`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get the full path including driver and database prefixes if specified.
|
|
62
|
+
* For the common case (single driver, single db), this just returns pathWithId.
|
|
63
|
+
*/
|
|
64
|
+
get fullPath() {
|
|
65
|
+
const parts = [];
|
|
66
|
+
if (this.driver && this.driver !== "(default)") parts.push(this.driver);
|
|
67
|
+
if (this.databaseId && this.databaseId !== "(default)") parts.push(this.databaseId);
|
|
68
|
+
if (parts.length > 0) return `${parts.join(":")}:::${this.path}/${this.id}`;
|
|
69
|
+
return this.pathWithId;
|
|
70
|
+
}
|
|
71
|
+
isEntityReference() {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Class used to create a reference to a entity in a different path
|
|
77
|
+
*/
|
|
78
|
+
var EntityRelation = class {
|
|
79
|
+
__type = "relation";
|
|
80
|
+
/**
|
|
81
|
+
* ID of the entity
|
|
82
|
+
*/
|
|
83
|
+
id;
|
|
84
|
+
/**
|
|
85
|
+
* A string representing the path of the referenced document (relative
|
|
86
|
+
* to the root of the database).
|
|
87
|
+
*/
|
|
88
|
+
path;
|
|
89
|
+
/**
|
|
90
|
+
* Pre-fetched data payload to eliminate N+1 queries.
|
|
91
|
+
* When present, clients can use this directly instead of fetching.
|
|
92
|
+
*/
|
|
93
|
+
data;
|
|
94
|
+
constructor(id, path, data) {
|
|
95
|
+
this.id = id;
|
|
96
|
+
this.path = path;
|
|
97
|
+
this.data = data;
|
|
98
|
+
}
|
|
99
|
+
get pathWithId() {
|
|
100
|
+
return `${this.path}/${this.id}`;
|
|
101
|
+
}
|
|
102
|
+
isEntityReference() {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
isEntityRelation() {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var GeoPoint = class {
|
|
110
|
+
/**
|
|
111
|
+
* The latitude of this GeoPoint instance.
|
|
112
|
+
*/
|
|
113
|
+
latitude;
|
|
114
|
+
/**
|
|
115
|
+
* The longitude of this GeoPoint instance.
|
|
116
|
+
*/
|
|
117
|
+
longitude;
|
|
118
|
+
constructor(latitude, longitude) {
|
|
119
|
+
this.latitude = latitude;
|
|
120
|
+
this.longitude = longitude;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var Vector = class {
|
|
124
|
+
value;
|
|
125
|
+
constructor(value) {
|
|
126
|
+
this.value = value;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region ../types/src/types/policy.ts
|
|
131
|
+
/** @group Models */
|
|
132
|
+
var policy = {
|
|
133
|
+
true: () => ({ kind: "true" }),
|
|
134
|
+
false: () => ({ kind: "false" }),
|
|
135
|
+
and: (...operands) => ({
|
|
136
|
+
kind: "and",
|
|
137
|
+
operands
|
|
138
|
+
}),
|
|
139
|
+
or: (...operands) => ({
|
|
140
|
+
kind: "or",
|
|
141
|
+
operands
|
|
142
|
+
}),
|
|
143
|
+
not: (operand) => ({
|
|
144
|
+
kind: "not",
|
|
145
|
+
operand
|
|
146
|
+
}),
|
|
147
|
+
compare: (left, op, right) => ({
|
|
148
|
+
kind: "compare",
|
|
149
|
+
op,
|
|
150
|
+
left,
|
|
151
|
+
right
|
|
152
|
+
}),
|
|
153
|
+
rolesOverlap: (roles) => ({
|
|
154
|
+
kind: "rolesOverlap",
|
|
155
|
+
roles
|
|
156
|
+
}),
|
|
157
|
+
rolesContain: (roles) => ({
|
|
158
|
+
kind: "rolesContain",
|
|
159
|
+
roles
|
|
160
|
+
}),
|
|
161
|
+
authenticated: () => ({ kind: "authenticated" }),
|
|
162
|
+
serverContext: () => ({ kind: "serverContext" }),
|
|
163
|
+
existsIn: (args) => ({
|
|
164
|
+
kind: "existsIn",
|
|
165
|
+
collection: args.collection,
|
|
166
|
+
where: args.where
|
|
167
|
+
}),
|
|
168
|
+
raw: (sql) => ({
|
|
169
|
+
kind: "raw",
|
|
170
|
+
sql
|
|
171
|
+
}),
|
|
172
|
+
field: (name) => ({
|
|
173
|
+
kind: "field",
|
|
174
|
+
name
|
|
175
|
+
}),
|
|
176
|
+
outerField: (name) => ({
|
|
177
|
+
kind: "outerField",
|
|
178
|
+
name
|
|
179
|
+
}),
|
|
180
|
+
literal: (value) => ({
|
|
181
|
+
kind: "literal",
|
|
182
|
+
value
|
|
183
|
+
}),
|
|
184
|
+
authUid: () => ({ kind: "authUid" }),
|
|
185
|
+
authRoles: () => ({ kind: "authRoles" })
|
|
186
|
+
};
|
|
6
187
|
(/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7
188
|
(function(e) {
|
|
8
189
|
var t;
|
|
@@ -1381,7 +1562,105 @@ function getEntityChildViews(collection) {
|
|
|
1381
1562
|
function getSubcollections(collection) {
|
|
1382
1563
|
return getEntityChildViews(collection).map((view) => view.collection);
|
|
1383
1564
|
}
|
|
1384
|
-
|
|
1565
|
+
//#endregion
|
|
1566
|
+
//#region ../common/src/util/auth-default-policies.ts
|
|
1567
|
+
/**
|
|
1568
|
+
* Default RLS policies injected by the schema generator.
|
|
1569
|
+
*
|
|
1570
|
+
* Rebase's enforcement model is unified: authenticated (user-context) requests
|
|
1571
|
+
* run under the restricted `rebase_user` role, so Postgres RLS binds *every*
|
|
1572
|
+
* statement — reads and writes. A collection's `securityRules` are the whole
|
|
1573
|
+
* authorization model. The server context (auth flows, migrations,
|
|
1574
|
+
* `dataAsAdmin`) runs as the owner and bypasses RLS.
|
|
1575
|
+
*
|
|
1576
|
+
* Because RLS default-denies, every collection is **locked by default**: with
|
|
1577
|
+
* no rules, only the server context and admins can touch it. The generator
|
|
1578
|
+
* injects that safe baseline:
|
|
1579
|
+
*
|
|
1580
|
+
* **For every collection**
|
|
1581
|
+
* 1. A permissive **server-or-admin SELECT** grant.
|
|
1582
|
+
* 2. A permissive **server-or-admin write** grant (insert/update/delete).
|
|
1583
|
+
*
|
|
1584
|
+
* Author `securityRules` are permissive and OR together, so explicit rules only
|
|
1585
|
+
* *broaden* access from this locked baseline (e.g. "users read/write their own
|
|
1586
|
+
* rows").
|
|
1587
|
+
*
|
|
1588
|
+
* **For auth collections additionally**
|
|
1589
|
+
* 3. A permissive **self SELECT** grant (`id = auth.uid()`), so users can read
|
|
1590
|
+
* their own row (profile, session bootstrap) without every app re-declaring
|
|
1591
|
+
* it.
|
|
1592
|
+
* 4. A **restrictive** admin write gate. Restrictive policies are AND'd with
|
|
1593
|
+
* every other policy, so a write is rejected unless the caller is an admin
|
|
1594
|
+
* (or the server context) — even if the author also wrote a permissive rule
|
|
1595
|
+
* such as "a user may edit their own row". Without this, a permissive owner
|
|
1596
|
+
* rule would let a user change their own `roles`.
|
|
1597
|
+
*
|
|
1598
|
+
* The server context is recognised as `auth.uid() IS NULL` (`policy.serverContext()`)
|
|
1599
|
+
* — the built-in flows that run without a user (signup, migrations) set no user
|
|
1600
|
+
* GUC — which also lets the owner connection satisfy these policies even under
|
|
1601
|
+
* FORCE RLS. A *user* request never reaches that state: an anonymous one carries
|
|
1602
|
+
* `ANONYMOUS_USER_ID`, precisely so it cannot pass for the server here.
|
|
1603
|
+
*
|
|
1604
|
+
* Opt out with `disableDefaultPolicies: true` to take full responsibility for
|
|
1605
|
+
* the collection's RLS.
|
|
1606
|
+
*/
|
|
1607
|
+
var SERVER_OR_ADMIN_EXPR$1 = policy.or(policy.serverContext(), policy.rolesOverlap(["admin"]));
|
|
1608
|
+
/** Write operations that must be admin-gated by default on auth collections. */
|
|
1609
|
+
var DEFAULT_GUARDED_OPS = [
|
|
1610
|
+
"insert",
|
|
1611
|
+
"update",
|
|
1612
|
+
"delete"
|
|
1613
|
+
];
|
|
1614
|
+
/** Whether a collection is flagged as an authentication collection. */
|
|
1615
|
+
function isAuthCollection(collection) {
|
|
1616
|
+
const auth = collection.auth;
|
|
1617
|
+
return auth === true || typeof auth === "object" && auth?.enabled === true;
|
|
1618
|
+
}
|
|
1619
|
+
/** The property marked as the row id (falls back to `id`). */
|
|
1620
|
+
function getIdPropertyName(collection) {
|
|
1621
|
+
for (const [name, prop] of Object.entries(collection.properties ?? {})) if (prop && typeof prop === "object" && "isId" in prop && prop.isId) return name;
|
|
1622
|
+
return "id";
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* Returns the security rules that should be applied to a collection: the
|
|
1626
|
+
* author's explicit `securityRules` plus the framework defaults described in
|
|
1627
|
+
* the module doc (baseline server/admin read for all collections; self-read
|
|
1628
|
+
* and the admin write gate for auth collections).
|
|
1629
|
+
*
|
|
1630
|
+
* Collections that opt out via `disableDefaultPolicies` are returned unchanged.
|
|
1631
|
+
*/
|
|
1632
|
+
function getEffectiveSecurityRules(collection) {
|
|
1633
|
+
const explicit = [...collection.securityRules ?? []];
|
|
1634
|
+
if (isPostgresCollectionConfig(collection) && collection.disableDefaultPolicies) return explicit;
|
|
1635
|
+
const tableName = getTableName(collection);
|
|
1636
|
+
const injected = [];
|
|
1637
|
+
injected.push({
|
|
1638
|
+
name: `${tableName}_default_admin_read`,
|
|
1639
|
+
operations: ["select"],
|
|
1640
|
+
condition: SERVER_OR_ADMIN_EXPR$1
|
|
1641
|
+
});
|
|
1642
|
+
injected.push({
|
|
1643
|
+
name: `${tableName}_default_admin_write`,
|
|
1644
|
+
operations: [...DEFAULT_GUARDED_OPS],
|
|
1645
|
+
condition: SERVER_OR_ADMIN_EXPR$1,
|
|
1646
|
+
check: SERVER_OR_ADMIN_EXPR$1
|
|
1647
|
+
});
|
|
1648
|
+
if (isAuthCollection(collection)) {
|
|
1649
|
+
injected.push({
|
|
1650
|
+
name: `${tableName}_default_self_read`,
|
|
1651
|
+
operations: ["select"],
|
|
1652
|
+
condition: policy.compare(policy.field(getIdPropertyName(collection)), "eq", policy.authUid())
|
|
1653
|
+
});
|
|
1654
|
+
injected.push({
|
|
1655
|
+
name: `${tableName}_require_admin_write`,
|
|
1656
|
+
mode: "restrictive",
|
|
1657
|
+
operations: [...DEFAULT_GUARDED_OPS],
|
|
1658
|
+
condition: SERVER_OR_ADMIN_EXPR$1,
|
|
1659
|
+
check: SERVER_OR_ADMIN_EXPR$1
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
return [...explicit, ...injected];
|
|
1663
|
+
}
|
|
1385
1664
|
policy.or(policy.serverContext(), policy.rolesOverlap(["admin"]));
|
|
1386
1665
|
(/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1387
1666
|
(function(root, factory) {
|
|
@@ -1660,7 +1939,7 @@ policy.or(policy.serverContext(), policy.rolesOverlap(["admin"]));
|
|
|
1660
1939
|
* Apply PropertyConditions to a resolved property, evaluating all JSON Logic rules.
|
|
1661
1940
|
*/
|
|
1662
1941
|
//#endregion
|
|
1663
|
-
//#region ../../node_modules/.pnpm/fast-equals@6.0.
|
|
1942
|
+
//#region ../../node_modules/.pnpm/fast-equals@6.0.2/node_modules/fast-equals/dist/es/index.mjs
|
|
1664
1943
|
var { getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
1665
1944
|
var { hasOwnProperty } = Object.prototype;
|
|
1666
1945
|
/**
|
|
@@ -1696,7 +1975,8 @@ function createIsCircular(areItemsEqual) {
|
|
|
1696
1975
|
* not enumerable and symbol properties.
|
|
1697
1976
|
*/
|
|
1698
1977
|
function getStrictProperties(object) {
|
|
1699
|
-
|
|
1978
|
+
const symbols = getOwnPropertySymbols(object);
|
|
1979
|
+
return symbols.length ? getOwnPropertyNames(object).concat(symbols) : getOwnPropertyNames(object);
|
|
1700
1980
|
}
|
|
1701
1981
|
/**
|
|
1702
1982
|
* Whether the object contains the property passed as an own property.
|
|
@@ -1769,7 +2049,7 @@ function areMapsEqual(a, b, state) {
|
|
|
1769
2049
|
const size = a.size;
|
|
1770
2050
|
if (size !== b.size) return false;
|
|
1771
2051
|
if (!size) return true;
|
|
1772
|
-
const matchedIndices = new
|
|
2052
|
+
const matchedIndices = new Uint8Array(size);
|
|
1773
2053
|
const aIterable = a.entries();
|
|
1774
2054
|
let aResult;
|
|
1775
2055
|
let bResult;
|
|
@@ -1777,7 +2057,7 @@ function areMapsEqual(a, b, state) {
|
|
|
1777
2057
|
while (aResult = aIterable.next()) {
|
|
1778
2058
|
if (aResult.done) break;
|
|
1779
2059
|
const bIterable = b.entries();
|
|
1780
|
-
let hasMatch =
|
|
2060
|
+
let hasMatch = 0;
|
|
1781
2061
|
let matchIndex = 0;
|
|
1782
2062
|
while (bResult = bIterable.next()) {
|
|
1783
2063
|
if (bResult.done) break;
|
|
@@ -1788,7 +2068,7 @@ function areMapsEqual(a, b, state) {
|
|
|
1788
2068
|
const aEntry = aResult.value;
|
|
1789
2069
|
const bEntry = bResult.value;
|
|
1790
2070
|
if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
|
|
1791
|
-
hasMatch = matchedIndices[matchIndex] =
|
|
2071
|
+
hasMatch = matchedIndices[matchIndex] = 1;
|
|
1792
2072
|
break;
|
|
1793
2073
|
}
|
|
1794
2074
|
matchIndex++;
|
|
@@ -1846,19 +2126,19 @@ function areSetsEqual(a, b, state) {
|
|
|
1846
2126
|
const size = a.size;
|
|
1847
2127
|
if (size !== b.size) return false;
|
|
1848
2128
|
if (!size) return true;
|
|
1849
|
-
const matchedIndices = new
|
|
2129
|
+
const matchedIndices = new Uint8Array(size);
|
|
1850
2130
|
const aIterable = a.values();
|
|
1851
2131
|
let aResult;
|
|
1852
2132
|
let bResult;
|
|
1853
2133
|
while (aResult = aIterable.next()) {
|
|
1854
2134
|
if (aResult.done) break;
|
|
1855
2135
|
const bIterable = b.values();
|
|
1856
|
-
let hasMatch =
|
|
2136
|
+
let hasMatch = 0;
|
|
1857
2137
|
let matchIndex = 0;
|
|
1858
2138
|
while (bResult = bIterable.next()) {
|
|
1859
2139
|
if (bResult.done) break;
|
|
1860
2140
|
if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
|
|
1861
|
-
hasMatch = matchedIndices[matchIndex] =
|
|
2141
|
+
hasMatch = matchedIndices[matchIndex] = 1;
|
|
1862
2142
|
break;
|
|
1863
2143
|
}
|
|
1864
2144
|
matchIndex++;
|
|
@@ -1871,8 +2151,8 @@ function areSetsEqual(a, b, state) {
|
|
|
1871
2151
|
* Whether the TypedArray instances are equal in value.
|
|
1872
2152
|
*/
|
|
1873
2153
|
function areTypedArraysEqual(a, b) {
|
|
1874
|
-
let index = a.
|
|
1875
|
-
if (b.
|
|
2154
|
+
let index = a.length;
|
|
2155
|
+
if (b.length !== index || a.byteOffset !== b.byteOffset) return false;
|
|
1876
2156
|
while (index-- > 0) if (a[index] !== b[index]) return false;
|
|
1877
2157
|
return true;
|
|
1878
2158
|
}
|
|
@@ -3306,57 +3586,6 @@ function buildRoutedRebaseData({ defaultData, sources, resolveKey }) {
|
|
|
3306
3586
|
} });
|
|
3307
3587
|
}
|
|
3308
3588
|
//#endregion
|
|
3309
|
-
|
|
3310
|
-
/**
|
|
3311
|
-
* Sort-order wire codec.
|
|
3312
|
-
*
|
|
3313
|
-
* This is the ONLY module that knows about the colon-delimited wire format
|
|
3314
|
-
* (`"field:direction"`) used in HTTP query parameters.
|
|
3315
|
-
* Everything else speaks {@link OrderByTuple} exclusively.
|
|
3316
|
-
*
|
|
3317
|
-
* Mirrors the filter architecture in `filter-dialect.ts`.
|
|
3318
|
-
*
|
|
3319
|
-
* @module
|
|
3320
|
-
*/
|
|
3321
|
-
/**
|
|
3322
|
-
* Serialize an {@link OrderByTuple} to the wire format `"field:direction"`.
|
|
3323
|
-
*
|
|
3324
|
-
* **Runtime tolerance:** if the input is already a well-formed wire string
|
|
3325
|
-
* (from an untyped JS caller), it is returned unchanged.
|
|
3326
|
-
* This is undocumented tolerance, not public API — don't rely on it.
|
|
3327
|
-
*
|
|
3328
|
-
* @param orderBy - A canonical `[field, direction]` tuple, or at runtime
|
|
3329
|
-
* possibly a pre-serialized string (undocumented tolerance).
|
|
3330
|
-
* @returns The wire-format string, or `undefined` if the input is falsy.
|
|
3331
|
-
*
|
|
3332
|
-
* @remarks
|
|
3333
|
-
* Field names containing `:` are representable in the tuple form but
|
|
3334
|
-
* **not** on the wire — this is an inherent limitation of the colon-delimited
|
|
3335
|
-
* encoding and is not resolved here.
|
|
3336
|
-
*/
|
|
3337
|
-
function serializeOrderBy(orderBy) {
|
|
3338
|
-
if (!orderBy) return void 0;
|
|
3339
|
-
if (typeof orderBy === "string") return orderBy;
|
|
3340
|
-
return `${orderBy[0]}:${orderBy[1]}`;
|
|
3341
|
-
}
|
|
3342
|
-
/**
|
|
3343
|
-
* Deserialize a wire-format `"field:direction"` string into an {@link OrderByTuple}.
|
|
3344
|
-
*
|
|
3345
|
-
* Lenient parsing (matches existing server behaviour):
|
|
3346
|
-
* - Bare field name (no colon): `"name"` → `["name", "asc"]`
|
|
3347
|
-
* - Unknown direction: `"name:foo"` → `["name", "asc"]`
|
|
3348
|
-
* - Empty / falsy input: → `undefined`
|
|
3349
|
-
*
|
|
3350
|
-
* @param raw - The wire-format string from an HTTP query parameter.
|
|
3351
|
-
* @returns The canonical tuple, or `undefined` if the input is empty/falsy.
|
|
3352
|
-
*/
|
|
3353
|
-
function deserializeOrderBy(raw) {
|
|
3354
|
-
if (!raw) return void 0;
|
|
3355
|
-
const idx = raw.indexOf(":");
|
|
3356
|
-
if (idx === -1) return [raw, "asc"];
|
|
3357
|
-
return [raw.slice(0, idx), raw.slice(idx + 1) === "desc" ? "desc" : "asc"];
|
|
3358
|
-
}
|
|
3359
|
-
//#endregion
|
|
3360
|
-
export { toSnakeCase as _, deserializeFilter as a, serializeLogicalCondition as c, CollectionRegistry as d, createDataSourceRegistry as f, buildCompositeId as g, resolveCollectionRelations as h, buildSdkData as i, collectAllPages as l, findRelation as m, serializeOrderBy as n, deserializeLogicalCondition as o, resolveDataSource as p, buildRoutedRebaseData as r, serializeFilter as s, deserializeOrderBy as t, paginateFind as u };
|
|
3589
|
+
export { EntityReference as _, serializeFilter as a, Vector as b, paginateFind as c, resolveDataSource as d, getEffectiveSecurityRules as f, toSnakeCase as g, buildCompositeId as h, deserializeLogicalCondition as i, CollectionRegistry as l, resolveCollectionRelations as m, buildSdkData as n, serializeLogicalCondition as o, findRelation as p, deserializeFilter as r, collectAllPages as s, buildRoutedRebaseData as t, createDataSourceRegistry as u, EntityRelation as v, GeoPoint as y };
|
|
3361
3590
|
|
|
3362
|
-
//# sourceMappingURL=src-
|
|
3591
|
+
//# sourceMappingURL=src-BjI5Wx_8.js.map
|