@powersync/service-sync-rules 0.29.0 → 0.29.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/ExpressionType.d.ts
CHANGED
|
@@ -35,6 +35,6 @@ export declare class ExpressionType {
|
|
|
35
35
|
isNone(): boolean;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* Here only for backwards-compatibility only.
|
|
38
|
+
* @deprecated Here only for backwards-compatibility only.
|
|
39
39
|
*/
|
|
40
40
|
export declare function expressionTypeFromPostgresType(type: string | undefined): ExpressionType;
|
package/dist/ExpressionType.js
CHANGED
package/dist/compatibility.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class CompatibilityOption {
|
|
|
16
16
|
static timestampsIso8601: CompatibilityOption;
|
|
17
17
|
static versionedBucketIds: CompatibilityOption;
|
|
18
18
|
static fixedJsonExtract: CompatibilityOption;
|
|
19
|
+
static customTypes: CompatibilityOption;
|
|
19
20
|
static byName: Record<string, CompatibilityOption>;
|
|
20
21
|
}
|
|
21
22
|
export declare class CompatibilityContext {
|
package/dist/compatibility.js
CHANGED
|
@@ -21,10 +21,12 @@ export class CompatibilityOption {
|
|
|
21
21
|
static timestampsIso8601 = new CompatibilityOption('timestamps_iso8601', 'Consistently renders timestamps with an ISO 8601-compatible format (previous versions used a space instead of a T to separate date and time).', CompatibilityEdition.SYNC_STREAMS);
|
|
22
22
|
static versionedBucketIds = new CompatibilityOption('versioned_bucket_ids', 'Encode the version of sync rules in generated bucket ids, which avoids clients downloading data twice and improves client-side progress estimates.', CompatibilityEdition.SYNC_STREAMS);
|
|
23
23
|
static fixedJsonExtract = new CompatibilityOption('fixed_json_extract', "Old versions of the sync service used to treat `->> 'foo.bar'` as a two-element JSON path. With this compatibility option enabled, it follows modern SQLite and treats it as a single key. The `$.` prefix would be required to split on `.`.", CompatibilityEdition.SYNC_STREAMS);
|
|
24
|
+
static customTypes = new CompatibilityOption('custom_postgres_types', 'Map custom Postgres types into appropriate structures instead of syncing the raw string.', CompatibilityEdition.SYNC_STREAMS);
|
|
24
25
|
static byName = Object.freeze({
|
|
25
26
|
timestamps_iso8601: this.timestampsIso8601,
|
|
26
27
|
versioned_bucket_ids: this.versionedBucketIds,
|
|
27
|
-
fixed_json_extract: this.fixedJsonExtract
|
|
28
|
+
fixed_json_extract: this.fixedJsonExtract,
|
|
29
|
+
custom_postgres_types: this.customTypes
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
export class CompatibilityContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,mEAAU,CAAA;IACV,+EAAgB,CAAA;AAClB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B;AAED;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IAEnB;IACA;IACA;IAHX,YACW,IAAY,EACZ,WAAmB,EACnB,OAA6B;QAF7B,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAsB;IACrC,CAAC;IAEJ,MAAM,CAAC,iBAAiB,GAAG,IAAI,mBAAmB,CAChD,oBAAoB,EACpB,+IAA+I,EAC/I,oBAAoB,CAAC,YAAY,CAClC,CAAC;IAEF,MAAM,CAAC,kBAAkB,GAAG,IAAI,mBAAmB,CACjD,sBAAsB,EACtB,oJAAoJ,EACpJ,oBAAoB,CAAC,YAAY,CAClC,CAAC;IAEF,MAAM,CAAC,gBAAgB,GAAG,IAAI,mBAAmB,CAC/C,oBAAoB,EACpB,+OAA+O,EAC/O,oBAAoB,CAAC,YAAY,CAClC,CAAC;IAEF,MAAM,CAAC,MAAM,GAAwC,MAAM,CAAC,MAAM,CAAC;QACjE,kBAAkB,EAAE,IAAI,CAAC,iBAAiB;QAC1C,oBAA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/B;;;;;OAKG;IACM,OAAO,CAAuB;IAEvC;;OAEG;IACM,SAAS,CAAoC;IAEtD,YAAY,OAA6B,EAAE,SAA6C;QACtF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,IAAI,GAAG,EAAE,CAAC;IAC1C,CAAC;IAED,SAAS,CAAC,MAA2B;QACnC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,4BAA4B,GAAyB,IAAI,oBAAoB,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
package/schema/sync_rules.json
CHANGED
|
@@ -167,6 +167,10 @@
|
|
|
167
167
|
"fixed_json_extract": {
|
|
168
168
|
"type": "boolean",
|
|
169
169
|
"description": "Enabled by default starting from edition 2: Old versions of the sync service used to treat `->> 'foo.bar'` as a two-element JSON path. With this compatibility option enabled, it follows modern SQLite and treats it as a single key. The `$.` prefix would be required to split on `.`."
|
|
170
|
+
},
|
|
171
|
+
"custom_postgres_types": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"description": "Enabled by default starting from edition 2: Map custom Postgres types into appropriate structures instead of syncing the raw string."
|
|
170
174
|
}
|
|
171
175
|
},
|
|
172
176
|
"additionalProperties": false
|