@g9tm/syncdata 1.5.1 → 1.5.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/LICENSE.md +21 -21
- package/PARITY.md +96 -96
- package/README.md +71 -71
- package/THIRD-PARTY-NOTICES.md +31 -31
- package/dist/abstractions/digest.js.map +1 -1
- package/dist/abstractions/enums.js.map +1 -1
- package/dist/abstractions/errors.js.map +1 -1
- package/dist/abstractions/guid.js.map +1 -1
- package/dist/abstractions/key.js.map +1 -1
- package/dist/abstractions/long.js.map +1 -1
- package/dist/abstractions/parameters.js.map +1 -1
- package/dist/brotli-js/decode.js.map +1 -1
- package/dist/brotli-js/index.js.map +1 -1
- package/dist/client/engine.d.ts +6 -0
- package/dist/client/engine.js +9 -0
- package/dist/client/engine.js.map +1 -1
- package/dist/client/model.js.map +1 -1
- package/dist/client/progress.js.map +1 -1
- package/dist/client/runs.js.map +1 -1
- package/dist/client/storeTypes.d.ts +2 -0
- package/dist/client/storeTypes.js.map +1 -1
- package/dist/client/transport.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/abort.js.map +1 -1
- package/dist/internal/base64.js.map +1 -1
- package/dist/internal/dotnetFormat.js.map +1 -1
- package/dist/internal/md5.js.map +1 -1
- package/dist/internal/sha256.js.map +1 -1
- package/dist/internal/utf8.js.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/snapshotFileSink.js.map +1 -1
- package/dist/node/sqliteDriver.js.map +1 -1
- package/dist/protocol/dtos.js.map +1 -1
- package/dist/protocol/protocol.js.map +1 -1
- package/dist/protocol/rowBatch/columnLayout.js.map +1 -1
- package/dist/protocol/rowBatch/format.js.map +1 -1
- package/dist/protocol/rowBatch/reader.js.map +1 -1
- package/dist/protocol/rowBatch/writer.js.map +1 -1
- package/dist/protocol/wire.js.map +1 -1
- package/dist/signalr/index.js.map +1 -1
- package/dist/signalr/protocols.js.map +1 -1
- package/dist/signalr/transport.js.map +1 -1
- package/dist/sqlite/apply.js.map +1 -1
- package/dist/sqlite/commands.js.map +1 -1
- package/dist/sqlite/connection.js.map +1 -1
- package/dist/sqlite/driver.js.map +1 -1
- package/dist/sqlite/index.js.map +1 -1
- package/dist/sqlite/internals.js.map +1 -1
- package/dist/sqlite/options.js.map +1 -1
- package/dist/sqlite/push.js.map +1 -1
- package/dist/sqlite/query.js.map +1 -1
- package/dist/sqlite/revocation.d.ts +6 -0
- package/dist/sqlite/revocation.js +41 -0
- package/dist/sqlite/revocation.js.map +1 -1
- package/dist/sqlite/sql.js +113 -113
- package/dist/sqlite/sql.js.map +1 -1
- package/dist/sqlite/store.d.ts +1 -0
- package/dist/sqlite/store.js +3 -0
- package/dist/sqlite/store.js.map +1 -1
- package/dist/sqlite/values.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/brotli-js/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,mCAAmC;AACnC,MAAM,UAAU,kBAAkB,CAAC,UAAsB;IACvD,MAAM,KAAK,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACzF,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAc,CAAC;IAChD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACzE,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,oBAAoB;IAClC,OAAO;QACL,UAAU,CAAC,UAAsB,EAAE,cAAsB;YACvD,MAAM,GAAG,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;YAC3C,IAAI,GAAG,CAAC,MAAM,KAAK,cAAc;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,MAAM,WAAW,cAAc,YAAY,CAAC,CAAC;YAC9H,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// @g9tm/syncdata/brotli-js — a pure-JavaScript Brotli decoder for frames, for runtimes with no native one (Lynx web,\n// a Lynx host without @g9tm/syncdata-lynx's native module, tests). It is Google's own decoder (about 190 KB of source,\n// most of it the static dictionary), so import it only where it is needed: the native decoders are far faster.\nimport type { G9FrameDecompressor } from '../protocol/rowBatch/reader.js';\nimport { brotliDecode } from './decode.js';\n\n/** Decodes a raw Brotli stream. */\nexport function brotliDecompressJs(compressed: Uint8Array): Uint8Array {\n const input = new Int8Array(compressed.buffer, compressed.byteOffset, compressed.length);\n const output = brotliDecode(input) as Int8Array;\n return new Uint8Array(output.buffer, output.byteOffset, output.length);\n}\n\n/** A frame decompressor over the JavaScript decoder. */\nexport function jsBrotliDecompressor(): G9FrameDecompressor {\n return {\n decompress(compressed: Uint8Array, expectedLength: number): Uint8Array {\n const out = brotliDecompressJs(compressed);\n if (out.length !== expectedLength) throw new Error(`Brotli body decoded to ${out.length} bytes, ${expectedLength} expected.`);\n return out;\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/brotli-js/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,mCAAmC;AACnC,MAAM,UAAU,kBAAkB,CAAC,UAAsB;IACvD,MAAM,KAAK,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACzF,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAc,CAAC;IAChD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACzE,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,oBAAoB;IAClC,OAAO;QACL,UAAU,CAAC,UAAsB,EAAE,cAAsB;YACvD,MAAM,GAAG,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;YAC3C,IAAI,GAAG,CAAC,MAAM,KAAK,cAAc;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,MAAM,WAAW,cAAc,YAAY,CAAC,CAAC;YAC9H,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// @g9tm/syncdata/brotli-js — a pure-JavaScript Brotli decoder for frames, for runtimes with no native one (Lynx web,\r\n// a Lynx host without @g9tm/syncdata-lynx's native module, tests). It is Google's own decoder (about 190 KB of source,\r\n// most of it the static dictionary), so import it only where it is needed: the native decoders are far faster.\r\nimport type { G9FrameDecompressor } from '../protocol/rowBatch/reader.js';\r\nimport { brotliDecode } from './decode.js';\r\n\r\n/** Decodes a raw Brotli stream. */\r\nexport function brotliDecompressJs(compressed: Uint8Array): Uint8Array {\r\n const input = new Int8Array(compressed.buffer, compressed.byteOffset, compressed.length);\r\n const output = brotliDecode(input) as Int8Array;\r\n return new Uint8Array(output.buffer, output.byteOffset, output.length);\r\n}\r\n\r\n/** A frame decompressor over the JavaScript decoder. */\r\nexport function jsBrotliDecompressor(): G9FrameDecompressor {\r\n return {\r\n decompress(compressed: Uint8Array, expectedLength: number): Uint8Array {\r\n const out = brotliDecompressJs(compressed);\r\n if (out.length !== expectedLength) throw new Error(`Brotli body decoded to ${out.length} bytes, ${expectedLength} expected.`);\r\n return out;\r\n },\r\n };\r\n}\r\n"]}
|
package/dist/client/engine.d.ts
CHANGED
|
@@ -73,6 +73,12 @@ export declare class G9SyncEngine {
|
|
|
73
73
|
discardQuarantined(localTable?: string | null, key?: string | null, signal?: AbortSignal): Promise<number>;
|
|
74
74
|
getRetained(signal?: AbortSignal): Promise<G9RetainedRow[]>;
|
|
75
75
|
retryRejected(localTable?: string | null, key?: string | null, signal?: AbortSignal): Promise<number>;
|
|
76
|
+
/**
|
|
77
|
+
* Gives up the local change of rejected rows and takes the server's copy (LES-0070, .NET `RevertRejectedAsync`): a row the server
|
|
78
|
+
* never had is removed locally, any other is fetched again by the next run with `forceReconcile` - run one after this. Nothing is
|
|
79
|
+
* uploaded. Omitted arguments widen the scope.
|
|
80
|
+
*/
|
|
81
|
+
revertRejected(localTable?: string | null, key?: string | null, signal?: AbortSignal): Promise<number>;
|
|
76
82
|
readChangeFeed(localTable: string, afterSequence: number, limit?: number, signal?: AbortSignal): Promise<G9ChangeFeedEntry[]>;
|
|
77
83
|
/**
|
|
78
84
|
* The change feed for one table narrowed to the keys `keyFilter` selects (plus every deletion), so a projection of one site does
|
package/dist/client/engine.js
CHANGED
|
@@ -236,6 +236,15 @@ export class G9SyncEngine {
|
|
|
236
236
|
await this.initialize(signal);
|
|
237
237
|
return this._store.retryRejected(localTable !== null && localTable !== void 0 ? localTable : null, key !== null && key !== void 0 ? key : null, signal);
|
|
238
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Gives up the local change of rejected rows and takes the server's copy (LES-0070, .NET `RevertRejectedAsync`): a row the server
|
|
241
|
+
* never had is removed locally, any other is fetched again by the next run with `forceReconcile` - run one after this. Nothing is
|
|
242
|
+
* uploaded. Omitted arguments widen the scope.
|
|
243
|
+
*/
|
|
244
|
+
async revertRejected(localTable, key, signal) {
|
|
245
|
+
await this.initialize(signal);
|
|
246
|
+
return this._store.revertRejected(localTable !== null && localTable !== void 0 ? localTable : null, key !== null && key !== void 0 ? key : null, signal);
|
|
247
|
+
}
|
|
239
248
|
async readChangeFeed(localTable, afterSequence, limit = 1000, signal) {
|
|
240
249
|
await this.initialize(signal);
|
|
241
250
|
return this._store.readChangeFeed(localTable, afterSequence, limit, signal);
|