@rocicorp/zero 0.25.10-canary.4 → 0.25.10-canary.6

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.
Files changed (35) hide show
  1. package/out/zero/package.json.js +1 -1
  2. package/out/zero-cache/src/custom/fetch.d.ts +1 -0
  3. package/out/zero-cache/src/custom/fetch.d.ts.map +1 -1
  4. package/out/zero-cache/src/custom/fetch.js +3 -0
  5. package/out/zero-cache/src/custom/fetch.js.map +1 -1
  6. package/out/zero-cache/src/services/mutagen/pusher.d.ts +2 -2
  7. package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +1 -1
  8. package/out/zero-cache/src/services/mutagen/pusher.js +11 -3
  9. package/out/zero-cache/src/services/mutagen/pusher.js.map +1 -1
  10. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +1 -0
  11. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  12. package/out/zero-cache/src/services/view-syncer/view-syncer.js +4 -1
  13. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  14. package/out/zero-cache/src/workers/syncer-ws-message-handler.d.ts.map +1 -1
  15. package/out/zero-cache/src/workers/syncer-ws-message-handler.js +2 -1
  16. package/out/zero-cache/src/workers/syncer-ws-message-handler.js.map +1 -1
  17. package/out/zero-client/src/client/options.d.ts +10 -0
  18. package/out/zero-client/src/client/options.d.ts.map +1 -1
  19. package/out/zero-client/src/client/options.js.map +1 -1
  20. package/out/zero-client/src/client/version.js +1 -1
  21. package/out/zero-client/src/client/zero.d.ts +1 -1
  22. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  23. package/out/zero-client/src/client/zero.js +8 -2
  24. package/out/zero-client/src/client/zero.js.map +1 -1
  25. package/out/zero-protocol/src/connect.d.ts +4 -0
  26. package/out/zero-protocol/src/connect.d.ts.map +1 -1
  27. package/out/zero-protocol/src/connect.js +3 -1
  28. package/out/zero-protocol/src/connect.js.map +1 -1
  29. package/out/zero-protocol/src/protocol-version.d.ts +1 -1
  30. package/out/zero-protocol/src/protocol-version.d.ts.map +1 -1
  31. package/out/zero-protocol/src/protocol-version.js +1 -1
  32. package/out/zero-protocol/src/protocol-version.js.map +1 -1
  33. package/out/zero-protocol/src/up.d.ts +2 -0
  34. package/out/zero-protocol/src/up.d.ts.map +1 -1
  35. package/package.json +1 -1
@@ -2,7 +2,7 @@ import "../../shared/src/valita.js";
2
2
  import { clientSchemaSchema } from "./client-schema.js";
3
3
  import { deleteClientsBodySchema } from "./delete-clients.js";
4
4
  import { upQueriesPatchSchema } from "./queries-patch.js";
5
- import { object, number, string, tuple, literal, array } from "@badrap/valita";
5
+ import { object, number, string, tuple, literal, array, record } from "@badrap/valita";
6
6
  const connectedBodySchema = object({
7
7
  wsid: string(),
8
8
  timestamp: number().optional()
@@ -21,8 +21,10 @@ const initConnectionBodySchema = object({
21
21
  deleted: deleteClientsBodySchema.optional(),
22
22
  // parameters to configure the mutate endpoint
23
23
  userPushURL: string().optional(),
24
+ userPushHeaders: record(string()).optional(),
24
25
  // parameters to configure the query endpoint
25
26
  userQueryURL: string().optional(),
27
+ userQueryHeaders: record(string()).optional(),
26
28
  /**
27
29
  * `activeClients` is an optional array of client IDs that are currently active
28
30
  * in the client group. This is used to inform the server about the clients
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sources":["../../../../zero-protocol/src/connect.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {clientSchemaSchema} from './client-schema.ts';\nimport {deleteClientsBodySchema} from './delete-clients.ts';\nimport {upQueriesPatchSchema} from './queries-patch.ts';\n\n/**\n * After opening a websocket the client waits for a `connected` message\n * from the server. It then sends an `initConnection` message to the\n * server. The server waits for the `initConnection` message before\n * beginning to send pokes to the newly connected client, so as to avoid\n * syncing lots of queries which are no longer desired by the client.\n */\n\nexport const connectedBodySchema = v.object({\n wsid: v.string(),\n timestamp: v.number().optional(),\n});\n\nexport const connectedMessageSchema = v.tuple([\n v.literal('connected'),\n connectedBodySchema,\n]);\n\nconst initConnectionBodySchema = v.object({\n desiredQueriesPatch: upQueriesPatchSchema,\n // As the schema can be large, client only sends when it does not have a\n // server snapshot (i.e. a snapshot with a cookie). Once it has a server\n // snapshot it will assume the zero-cache already has the schema for this\n // client's client group in the CVR store.\n clientSchema: clientSchemaSchema.optional(),\n deleted: deleteClientsBodySchema.optional(),\n // parameters to configure the mutate endpoint\n userPushURL: v.string().optional(),\n // parameters to configure the query endpoint\n userQueryURL: v.string().optional(),\n\n /**\n * `activeClients` is an optional array of client IDs that are currently active\n * in the client group. This is used to inform the server about the clients\n * that are currently active (aka running, aka alive), so it can inactive\n * queries from inactive clients.\n */\n activeClients: v.array(v.string()).optional(),\n});\n\nexport const initConnectionMessageSchema = v.tuple([\n v.literal('initConnection'),\n initConnectionBodySchema,\n]);\n\nexport type ConnectedBody = v.Infer<typeof connectedBodySchema>;\nexport type ConnectedMessage = v.Infer<typeof connectedMessageSchema>;\nexport type InitConnectionBody = v.Infer<typeof initConnectionBodySchema>;\nexport type InitConnectionMessage = v.Infer<typeof initConnectionMessageSchema>;\n\nexport function encodeSecProtocols(\n initConnectionMessage: InitConnectionMessage | undefined,\n authToken: string | undefined,\n): string {\n const protocols = {\n initConnectionMessage,\n authToken,\n };\n // WS sec protocols needs to be URI encoded. To save space, we base64 encode\n // the JSON before URI encoding it. But InitConnectionMessage can contain\n // arbitrary unicode strings, so we need to encode the JSON as UTF-8 first.\n // Phew!\n const bytes = new TextEncoder().encode(JSON.stringify(protocols));\n\n // Convert bytes to string without spreading all bytes as arguments\n // to avoid \"Maximum call stack size exceeded\" error with large data\n const s = Array.from(bytes, byte => String.fromCharCode(byte)).join('');\n\n return encodeURIComponent(btoa(s));\n}\n\nexport function decodeSecProtocols(secProtocol: string): {\n initConnectionMessage: InitConnectionMessage | undefined;\n authToken: string | undefined;\n} {\n const binString = atob(decodeURIComponent(secProtocol));\n const bytes = Uint8Array.from(binString, c => c.charCodeAt(0));\n return JSON.parse(new TextDecoder().decode(bytes));\n}\n"],"names":["v.object","v.string","v.number","v.tuple","v.literal","v.array"],"mappings":";;;;;AAaO,MAAM,sBAAsBA,OAAS;AAAA,EAC1C,MAAMC,OAAE;AAAA,EACR,WAAWC,OAAE,EAAS,SAAA;AACxB,CAAC;AAEM,MAAM,yBAAyBC,MAAQ;AAAA,EAC5CC,QAAU,WAAW;AAAA,EACrB;AACF,CAAC;AAED,MAAM,2BAA2BJ,OAAS;AAAA,EACxC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,cAAc,mBAAmB,SAAA;AAAA,EACjC,SAAS,wBAAwB,SAAA;AAAA;AAAA,EAEjC,aAAaC,OAAE,EAAS,SAAA;AAAA;AAAA,EAExB,cAAcA,OAAE,EAAS,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQzB,eAAeI,MAAQJ,OAAE,CAAQ,EAAE,SAAA;AACrC,CAAC;AAEM,MAAM,8BAA8BE,MAAQ;AAAA,EACjDC,QAAU,gBAAgB;AAAA,EAC1B;AACF,CAAC;AAOM,SAAS,mBACd,uBACA,WACQ;AACR,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,EAAA;AAMF,QAAM,QAAQ,IAAI,YAAA,EAAc,OAAO,KAAK,UAAU,SAAS,CAAC;AAIhE,QAAM,IAAI,MAAM,KAAK,OAAO,CAAA,SAAQ,OAAO,aAAa,IAAI,CAAC,EAAE,KAAK,EAAE;AAEtE,SAAO,mBAAmB,KAAK,CAAC,CAAC;AACnC;AAEO,SAAS,mBAAmB,aAGjC;AACA,QAAM,YAAY,KAAK,mBAAmB,WAAW,CAAC;AACtD,QAAM,QAAQ,WAAW,KAAK,WAAW,OAAK,EAAE,WAAW,CAAC,CAAC;AAC7D,SAAO,KAAK,MAAM,IAAI,cAAc,OAAO,KAAK,CAAC;AACnD;"}
1
+ {"version":3,"file":"connect.js","sources":["../../../../zero-protocol/src/connect.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {clientSchemaSchema} from './client-schema.ts';\nimport {deleteClientsBodySchema} from './delete-clients.ts';\nimport {upQueriesPatchSchema} from './queries-patch.ts';\n\n/**\n * After opening a websocket the client waits for a `connected` message\n * from the server. It then sends an `initConnection` message to the\n * server. The server waits for the `initConnection` message before\n * beginning to send pokes to the newly connected client, so as to avoid\n * syncing lots of queries which are no longer desired by the client.\n */\n\nexport const connectedBodySchema = v.object({\n wsid: v.string(),\n timestamp: v.number().optional(),\n});\n\nexport const connectedMessageSchema = v.tuple([\n v.literal('connected'),\n connectedBodySchema,\n]);\n\nconst initConnectionBodySchema = v.object({\n desiredQueriesPatch: upQueriesPatchSchema,\n // As the schema can be large, client only sends when it does not have a\n // server snapshot (i.e. a snapshot with a cookie). Once it has a server\n // snapshot it will assume the zero-cache already has the schema for this\n // client's client group in the CVR store.\n clientSchema: clientSchemaSchema.optional(),\n deleted: deleteClientsBodySchema.optional(),\n // parameters to configure the mutate endpoint\n userPushURL: v.string().optional(),\n userPushHeaders: v.record(v.string()).optional(),\n // parameters to configure the query endpoint\n userQueryURL: v.string().optional(),\n userQueryHeaders: v.record(v.string()).optional(),\n\n /**\n * `activeClients` is an optional array of client IDs that are currently active\n * in the client group. This is used to inform the server about the clients\n * that are currently active (aka running, aka alive), so it can inactive\n * queries from inactive clients.\n */\n activeClients: v.array(v.string()).optional(),\n});\n\nexport const initConnectionMessageSchema = v.tuple([\n v.literal('initConnection'),\n initConnectionBodySchema,\n]);\n\nexport type ConnectedBody = v.Infer<typeof connectedBodySchema>;\nexport type ConnectedMessage = v.Infer<typeof connectedMessageSchema>;\nexport type InitConnectionBody = v.Infer<typeof initConnectionBodySchema>;\nexport type InitConnectionMessage = v.Infer<typeof initConnectionMessageSchema>;\n\nexport function encodeSecProtocols(\n initConnectionMessage: InitConnectionMessage | undefined,\n authToken: string | undefined,\n): string {\n const protocols = {\n initConnectionMessage,\n authToken,\n };\n // WS sec protocols needs to be URI encoded. To save space, we base64 encode\n // the JSON before URI encoding it. But InitConnectionMessage can contain\n // arbitrary unicode strings, so we need to encode the JSON as UTF-8 first.\n // Phew!\n const bytes = new TextEncoder().encode(JSON.stringify(protocols));\n\n // Convert bytes to string without spreading all bytes as arguments\n // to avoid \"Maximum call stack size exceeded\" error with large data\n const s = Array.from(bytes, byte => String.fromCharCode(byte)).join('');\n\n return encodeURIComponent(btoa(s));\n}\n\nexport function decodeSecProtocols(secProtocol: string): {\n initConnectionMessage: InitConnectionMessage | undefined;\n authToken: string | undefined;\n} {\n const binString = atob(decodeURIComponent(secProtocol));\n const bytes = Uint8Array.from(binString, c => c.charCodeAt(0));\n return JSON.parse(new TextDecoder().decode(bytes));\n}\n"],"names":["v.object","v.string","v.number","v.tuple","v.literal","v.record","v.array"],"mappings":";;;;;AAaO,MAAM,sBAAsBA,OAAS;AAAA,EAC1C,MAAMC,OAAE;AAAA,EACR,WAAWC,OAAE,EAAS,SAAA;AACxB,CAAC;AAEM,MAAM,yBAAyBC,MAAQ;AAAA,EAC5CC,QAAU,WAAW;AAAA,EACrB;AACF,CAAC;AAED,MAAM,2BAA2BJ,OAAS;AAAA,EACxC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,cAAc,mBAAmB,SAAA;AAAA,EACjC,SAAS,wBAAwB,SAAA;AAAA;AAAA,EAEjC,aAAaC,OAAE,EAAS,SAAA;AAAA,EACxB,iBAAiBI,OAASJ,OAAE,CAAQ,EAAE,SAAA;AAAA;AAAA,EAEtC,cAAcA,OAAE,EAAS,SAAA;AAAA,EACzB,kBAAkBI,OAASJ,OAAE,CAAQ,EAAE,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQvC,eAAeK,MAAQL,OAAE,CAAQ,EAAE,SAAA;AACrC,CAAC;AAEM,MAAM,8BAA8BE,MAAQ;AAAA,EACjDC,QAAU,gBAAgB;AAAA,EAC1B;AACF,CAAC;AAOM,SAAS,mBACd,uBACA,WACQ;AACR,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,EAAA;AAMF,QAAM,QAAQ,IAAI,YAAA,EAAc,OAAO,KAAK,UAAU,SAAS,CAAC;AAIhE,QAAM,IAAI,MAAM,KAAK,OAAO,CAAA,SAAQ,OAAO,aAAa,IAAI,CAAC,EAAE,KAAK,EAAE;AAEtE,SAAO,mBAAmB,KAAK,CAAC,CAAC;AACnC;AAEO,SAAS,mBAAmB,aAGjC;AACA,QAAM,YAAY,KAAK,mBAAmB,WAAW,CAAC;AACtD,QAAM,QAAQ,WAAW,KAAK,WAAW,OAAK,EAAE,WAAW,CAAC,CAAC;AAC7D,SAAO,KAAK,MAAM,IAAI,cAAc,OAAO,KAAK,CAAC;AACnD;"}
@@ -10,7 +10,7 @@
10
10
  * release. The server (`zero-cache`) must be deployed before clients start
11
11
  * running the new code.
12
12
  */
13
- export declare const PROTOCOL_VERSION = 44;
13
+ export declare const PROTOCOL_VERSION = 45;
14
14
  /**
15
15
  * The minimum server-supported sync protocol version (i.e. the version
16
16
  * declared in the "/sync/v{#}/connect" URL). The contract for
@@ -1 +1 @@
1
- {"version":3,"file":"protocol-version.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/protocol-version.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAuCH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,KAAK,CAAC"}
1
+ {"version":3,"file":"protocol-version.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/protocol-version.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAwCH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,KAAK,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../shared/src/asserts.js";
2
- const PROTOCOL_VERSION = 44;
2
+ const PROTOCOL_VERSION = 45;
3
3
  const MIN_SERVER_SUPPORTED_SYNC_PROTOCOL = 30;
4
4
  assert(MIN_SERVER_SUPPORTED_SYNC_PROTOCOL < PROTOCOL_VERSION);
5
5
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"protocol-version.js","sources":["../../../../zero-protocol/src/protocol-version.ts"],"sourcesContent":["import {assert} from '../../shared/src/asserts.ts';\n\n/**\n * The current `PROTOCOL_VERSION` of the code.\n *\n * The `PROTOCOL_VERSION` encompasses both the wire-protocol of the `/sync/...`\n * connection between the browser and `zero-cache`, as well as the format of\n * the `AST` objects stored in both components (i.e. IDB and CVR).\n *\n * A change in the `AST` schema (e.g. new functionality added) must be\n * accompanied by an increment of the `PROTOCOL_VERSION` and a new major\n * release. The server (`zero-cache`) must be deployed before clients start\n * running the new code.\n */\n// History:\n// -- Version 5 adds support for `pokeEnd.cookie`. (0.14)\n// -- Version 6 makes `pokeStart.cookie` optional. (0.16)\n// -- Version 7 introduces the initConnection.clientSchema field. (0.17)\n// -- Version 8 drops support for Version 5 (0.18).\n// -- Version 11 adds inspect queries. (0.18)\n// -- Version 12 adds 'timestamp' and 'date' types to the ClientSchema ValueType. (not shipped, reversed by version 14)\n// -- Version 14 removes 'timestamp' and 'date' types from the ClientSchema ValueType. (0.18)\n// -- Version 15 adds a `userPushParams` field to `initConnection` (0.19)\n// -- Version 16 adds a new error type (alreadyProcessed) to mutation responses (0.19)\n// -- Version 17 deprecates `AST` in downstream query puts. It was never used anyway. (0.21)\n// -- Version 18 adds `name` and `args` to the `queries-patch` protocol (0.21)\n// -- Version 19 adds `activeClients` to the `initConnection` protocol (0.22)\n// -- Version 20 changes inspector down message (0.22)\n// -- Version 21 removes `AST` in downstream query puts which was deprecated in Version 17, removes support for versions < 18 (0.22)\n// -- Version 22 adds an optional 'userQueryParams' field to `initConnection` (0.22)\n// -- Version 23 add `mutationResults` to poke (0.22)\n// -- Version 24 adds `ackMutationResults` to upstream (0.22).\n// -- version 25 modifies `mutationsResults` to include `del` patches (0.22)\n// -- version 26 adds inspect/metrics and adds metrics to inspect/query (0.23)\n// -- version 27 adds inspect/version (0.23)\n// -- version 28 adds more inspect/metrics (0.23)\n// -- version 29 adds error responses for custom queries (0.23)\n// -- version 30 adds an optional primaryKey to the ClientSchema (0.24)\n// -- version 31 adds admin password authentication to inspector RPC calls (0.24)\n// -- version 32 adds analyze-query to the inspector RPC calls (0.24)\n// -- version 33 adds `flip` to CorrelatedSubquery (0.25)\n// -- version 34 moves `flip` from CorrelatedSubquery to CorrelatedSubqueryCondition (0.25)\n// -- version 35 adds `readRows`, `readRowCountsByQuery` and `readRowCount` to analyze-query result (0.25)\n// -- version 36 changes inspector analyze-query and adds error response to RPC (0.25)\n// -- version 37 adds `elapsed` to AnalyzeQueryResult (0.25)\n// -- version 38 adds structured push/transform error responses (0.25)\n// -- version 39 removes per-transform error types and adds `message` to app error (0.25)\n// -- version 40 adds `dbRowScansByQuery` to AnalyzeQueryResult (0.25)\n// -- version 41 makes ClientSchema.primaryKey required (0.25)\n// -- version 42 adds planner events to AnalyzeQueryResult (0.25)\n// -- version 43 renames `plans` to `sqlitePlans`, `plannerEvents` to `joinPlans`, and `plannerDebug` option to `joinPlans` (0.25)\n// -- version 44 adds profileID to connection URL (0.25)\nexport const PROTOCOL_VERSION = 44;\n\n/**\n * The minimum server-supported sync protocol version (i.e. the version\n * declared in the \"/sync/v{#}/connect\" URL). The contract for\n * backwards compatibility is that a `zero-cache` supports the current\n * `PROTOCOL_VERSION` and at least the previous one (i.e. `PROTOCOL_VERSION - 1`)\n * if not earlier ones as well. This corresponds to supporting clients running\n * the current release and the previous (major) release. Any client connections\n * from protocol versions before `MIN_SERVER_SUPPORTED_PROTOCOL_VERSION` are\n * closed with a `VersionNotSupported` error.\n */\nexport const MIN_SERVER_SUPPORTED_SYNC_PROTOCOL = 30;\n\nassert(MIN_SERVER_SUPPORTED_SYNC_PROTOCOL < PROTOCOL_VERSION);\n"],"names":[],"mappings":";AAoDO,MAAM,mBAAmB;AAYzB,MAAM,qCAAqC;AAElD,OAAO,qCAAqC,gBAAgB;"}
1
+ {"version":3,"file":"protocol-version.js","sources":["../../../../zero-protocol/src/protocol-version.ts"],"sourcesContent":["import {assert} from '../../shared/src/asserts.ts';\n\n/**\n * The current `PROTOCOL_VERSION` of the code.\n *\n * The `PROTOCOL_VERSION` encompasses both the wire-protocol of the `/sync/...`\n * connection between the browser and `zero-cache`, as well as the format of\n * the `AST` objects stored in both components (i.e. IDB and CVR).\n *\n * A change in the `AST` schema (e.g. new functionality added) must be\n * accompanied by an increment of the `PROTOCOL_VERSION` and a new major\n * release. The server (`zero-cache`) must be deployed before clients start\n * running the new code.\n */\n// History:\n// -- Version 5 adds support for `pokeEnd.cookie`. (0.14)\n// -- Version 6 makes `pokeStart.cookie` optional. (0.16)\n// -- Version 7 introduces the initConnection.clientSchema field. (0.17)\n// -- Version 8 drops support for Version 5 (0.18).\n// -- Version 11 adds inspect queries. (0.18)\n// -- Version 12 adds 'timestamp' and 'date' types to the ClientSchema ValueType. (not shipped, reversed by version 14)\n// -- Version 14 removes 'timestamp' and 'date' types from the ClientSchema ValueType. (0.18)\n// -- Version 15 adds a `userPushParams` field to `initConnection` (0.19)\n// -- Version 16 adds a new error type (alreadyProcessed) to mutation responses (0.19)\n// -- Version 17 deprecates `AST` in downstream query puts. It was never used anyway. (0.21)\n// -- Version 18 adds `name` and `args` to the `queries-patch` protocol (0.21)\n// -- Version 19 adds `activeClients` to the `initConnection` protocol (0.22)\n// -- Version 20 changes inspector down message (0.22)\n// -- Version 21 removes `AST` in downstream query puts which was deprecated in Version 17, removes support for versions < 18 (0.22)\n// -- Version 22 adds an optional 'userQueryParams' field to `initConnection` (0.22)\n// -- Version 23 add `mutationResults` to poke (0.22)\n// -- Version 24 adds `ackMutationResults` to upstream (0.22).\n// -- version 25 modifies `mutationsResults` to include `del` patches (0.22)\n// -- version 26 adds inspect/metrics and adds metrics to inspect/query (0.23)\n// -- version 27 adds inspect/version (0.23)\n// -- version 28 adds more inspect/metrics (0.23)\n// -- version 29 adds error responses for custom queries (0.23)\n// -- version 30 adds an optional primaryKey to the ClientSchema (0.24)\n// -- version 31 adds admin password authentication to inspector RPC calls (0.24)\n// -- version 32 adds analyze-query to the inspector RPC calls (0.24)\n// -- version 33 adds `flip` to CorrelatedSubquery (0.25)\n// -- version 34 moves `flip` from CorrelatedSubquery to CorrelatedSubqueryCondition (0.25)\n// -- version 35 adds `readRows`, `readRowCountsByQuery` and `readRowCount` to analyze-query result (0.25)\n// -- version 36 changes inspector analyze-query and adds error response to RPC (0.25)\n// -- version 37 adds `elapsed` to AnalyzeQueryResult (0.25)\n// -- version 38 adds structured push/transform error responses (0.25)\n// -- version 39 removes per-transform error types and adds `message` to app error (0.25)\n// -- version 40 adds `dbRowScansByQuery` to AnalyzeQueryResult (0.25)\n// -- version 41 makes ClientSchema.primaryKey required (0.25)\n// -- version 42 adds planner events to AnalyzeQueryResult (0.25)\n// -- version 43 renames `plans` to `sqlitePlans`, `plannerEvents` to `joinPlans`, and `plannerDebug` option to `joinPlans` (0.25)\n// -- version 44 adds profileID to connection URL (0.25)\n// -- version 45 adds userPushHeaders and userQueryHeaders to initConnection (0.25)\nexport const PROTOCOL_VERSION = 45;\n\n/**\n * The minimum server-supported sync protocol version (i.e. the version\n * declared in the \"/sync/v{#}/connect\" URL). The contract for\n * backwards compatibility is that a `zero-cache` supports the current\n * `PROTOCOL_VERSION` and at least the previous one (i.e. `PROTOCOL_VERSION - 1`)\n * if not earlier ones as well. This corresponds to supporting clients running\n * the current release and the previous (major) release. Any client connections\n * from protocol versions before `MIN_SERVER_SUPPORTED_PROTOCOL_VERSION` are\n * closed with a `VersionNotSupported` error.\n */\nexport const MIN_SERVER_SUPPORTED_SYNC_PROTOCOL = 30;\n\nassert(MIN_SERVER_SUPPORTED_SYNC_PROTOCOL < PROTOCOL_VERSION);\n"],"names":[],"mappings":";AAqDO,MAAM,mBAAmB;AAYzB,MAAM,qCAAqC;AAElD,OAAO,qCAAqC,gBAAgB;"}
@@ -27,7 +27,9 @@ export declare const upstreamSchema: v.UnionType<[v.TupleType<[v.Type<"initConne
27
27
  readonly clientGroupIDs?: readonly string[] | undefined;
28
28
  }>;
29
29
  userPushURL: v.Optional<string>;
30
+ userPushHeaders: v.Optional<Record<string, string>>;
30
31
  userQueryURL: v.Optional<string>;
32
+ userQueryHeaders: v.Optional<Record<string, string>>;
31
33
  activeClients: v.Optional<string[]>;
32
34
  }, undefined>]>, v.TupleType<[v.Type<"ping">, v.ObjectType<{}, undefined>]>, v.TupleType<[v.Type<"deleteClients">, v.UnionType<[v.ObjectType<Readonly<{
33
35
  clientIDs: v.Optional<readonly string[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAUhD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAUhD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocicorp/zero",
3
- "version": "0.25.10-canary.4",
3
+ "version": "0.25.10-canary.6",
4
4
  "description": "Zero is a web framework for serverless web development.",
5
5
  "author": "Rocicorp, Inc.",
6
6
  "repository": {