@rocicorp/zero 1.4.0-canary.1 → 1.4.0-canary.2

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 (115) hide show
  1. package/out/analyze-query/src/bin-analyze.js +1 -1
  2. package/out/analyze-query/src/bin-analyze.js.map +1 -1
  3. package/out/analyze-query/src/bin-transform.js +1 -1
  4. package/out/analyze-query/src/bin-transform.js.map +1 -1
  5. package/out/replicache/src/btree/node.d.ts +1 -1
  6. package/out/replicache/src/btree/node.d.ts.map +1 -1
  7. package/out/replicache/src/btree/node.js +34 -21
  8. package/out/replicache/src/btree/node.js.map +1 -1
  9. package/out/replicache/src/btree/write.js +1 -2
  10. package/out/replicache/src/btree/write.js.map +1 -1
  11. package/out/shared/src/btree-set.d.ts +6 -0
  12. package/out/shared/src/btree-set.d.ts.map +1 -1
  13. package/out/shared/src/btree-set.js +34 -0
  14. package/out/shared/src/btree-set.js.map +1 -1
  15. package/out/zero/package.js +1 -1
  16. package/out/zero/package.js.map +1 -1
  17. package/out/zero-cache/src/config/zero-config.d.ts +18 -0
  18. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  19. package/out/zero-cache/src/config/zero-config.js +35 -3
  20. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  21. package/out/zero-cache/src/scripts/decommission.d.ts.map +1 -1
  22. package/out/zero-cache/src/scripts/decommission.js +3 -3
  23. package/out/zero-cache/src/scripts/decommission.js.map +1 -1
  24. package/out/zero-cache/src/scripts/deploy-permissions.js +1 -1
  25. package/out/zero-cache/src/scripts/deploy-permissions.js.map +1 -1
  26. package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
  27. package/out/zero-cache/src/server/change-streamer.js +2 -5
  28. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  29. package/out/zero-cache/src/server/main.d.ts.map +1 -1
  30. package/out/zero-cache/src/server/main.js +6 -1
  31. package/out/zero-cache/src/server/main.js.map +1 -1
  32. package/out/zero-cache/src/server/reaper.d.ts.map +1 -1
  33. package/out/zero-cache/src/server/reaper.js +1 -4
  34. package/out/zero-cache/src/server/reaper.js.map +1 -1
  35. package/out/zero-cache/src/server/shadow-syncer.js +35 -0
  36. package/out/zero-cache/src/server/shadow-syncer.js.map +1 -0
  37. package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
  38. package/out/zero-cache/src/server/syncer.js +2 -8
  39. package/out/zero-cache/src/server/syncer.js.map +1 -1
  40. package/out/zero-cache/src/server/worker-urls.d.ts +1 -0
  41. package/out/zero-cache/src/server/worker-urls.d.ts.map +1 -1
  42. package/out/zero-cache/src/server/worker-urls.js +2 -1
  43. package/out/zero-cache/src/server/worker-urls.js.map +1 -1
  44. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts +8 -1
  45. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts.map +1 -1
  46. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js +31 -18
  47. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js.map +1 -1
  48. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts.map +1 -1
  49. package/out/zero-cache/src/services/change-source/pg/change-source.js +44 -46
  50. package/out/zero-cache/src/services/change-source/pg/change-source.js.map +1 -1
  51. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +6 -1
  52. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts.map +1 -1
  53. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +62 -22
  54. package/out/zero-cache/src/services/change-source/pg/initial-sync.js.map +1 -1
  55. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
  56. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +2 -3
  57. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  58. package/out/zero-cache/src/services/change-streamer/schema/tables.js +1 -1
  59. package/out/zero-cache/src/services/shadow-sync/shadow-sync-service.js +49 -0
  60. package/out/zero-cache/src/services/shadow-sync/shadow-sync-service.js.map +1 -0
  61. package/out/zero-cache/src/services/statz.js +3 -3
  62. package/out/zero-cache/src/services/statz.js.map +1 -1
  63. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +1 -0
  64. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +1 -1
  65. package/out/zero-cache/src/services/view-syncer/cvr-store.js +34 -11
  66. package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
  67. package/out/zero-cache/src/services/view-syncer/cvr.d.ts +16 -1
  68. package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +1 -1
  69. package/out/zero-cache/src/services/view-syncer/cvr.js +19 -1
  70. package/out/zero-cache/src/services/view-syncer/cvr.js.map +1 -1
  71. package/out/zero-cache/src/services/view-syncer/inspect-handler.js +1 -1
  72. package/out/zero-cache/src/services/view-syncer/inspect-handler.js.map +1 -1
  73. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +6 -0
  74. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
  75. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +45 -2
  76. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
  77. package/out/zero-cache/src/services/view-syncer/row-set-signature.d.ts +17 -0
  78. package/out/zero-cache/src/services/view-syncer/row-set-signature.d.ts.map +1 -0
  79. package/out/zero-cache/src/services/view-syncer/row-set-signature.js +29 -0
  80. package/out/zero-cache/src/services/view-syncer/row-set-signature.js.map +1 -0
  81. package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts +1 -0
  82. package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts.map +1 -1
  83. package/out/zero-cache/src/services/view-syncer/schema/cvr.js +1 -0
  84. package/out/zero-cache/src/services/view-syncer/schema/cvr.js.map +1 -1
  85. package/out/zero-cache/src/services/view-syncer/schema/init.d.ts.map +1 -1
  86. package/out/zero-cache/src/services/view-syncer/schema/init.js +5 -1
  87. package/out/zero-cache/src/services/view-syncer/schema/init.js.map +1 -1
  88. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +105 -0
  89. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts.map +1 -1
  90. package/out/zero-cache/src/services/view-syncer/schema/types.js +8 -4
  91. package/out/zero-cache/src/services/view-syncer/schema/types.js.map +1 -1
  92. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  93. package/out/zero-cache/src/services/view-syncer/view-syncer.js +2 -2
  94. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  95. package/out/zero-cache/src/types/pg.d.ts +1 -1
  96. package/out/zero-cache/src/types/pg.d.ts.map +1 -1
  97. package/out/zero-cache/src/types/pg.js +8 -2
  98. package/out/zero-cache/src/types/pg.js.map +1 -1
  99. package/out/zero-cache/src/types/timeout.d.ts +11 -0
  100. package/out/zero-cache/src/types/timeout.d.ts.map +1 -0
  101. package/out/zero-cache/src/types/timeout.js +26 -0
  102. package/out/zero-cache/src/types/timeout.js.map +1 -0
  103. package/out/zero-cache/src/workers/connection.js +3 -3
  104. package/out/zero-cache/src/workers/connection.js.map +1 -1
  105. package/out/zero-client/src/client/version.js +1 -1
  106. package/out/zero-server/src/adapters/postgresjs.d.ts.map +1 -1
  107. package/out/zero-server/src/adapters/postgresjs.js +1 -1
  108. package/out/zero-server/src/adapters/postgresjs.js.map +1 -1
  109. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  110. package/out/zql/src/ivm/memory-source.js +3 -3
  111. package/out/zql/src/ivm/memory-source.js.map +1 -1
  112. package/out/zql/src/query/query-internals.d.ts.map +1 -1
  113. package/out/zql/src/query/query-internals.js +1 -1
  114. package/out/zql/src/query/query-internals.js.map +1 -1
  115. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"query-internals.js","names":[],"sources":["../../../../../zql/src/query/query-internals.ts"],"sourcesContent":["import {assert} from '../../../shared/src/asserts.ts';\nimport type {ReadonlyJSONValue} from '../../../shared/src/json.ts';\nimport type {AST} from '../../../zero-protocol/src/ast.ts';\nimport type {Schema as ZeroSchema} from '../../../zero-types/src/schema.ts';\nimport type {Format} from '../ivm/view.ts';\nimport type {CustomQueryID} from './named.ts';\nimport type {Query} from './query.ts';\n\nexport const queryInternalsTag = Symbol();\n\n/**\n * Internal interface for query implementation details.\n * This is not part of the public API and should only be accessed via\n * the {@linkcode asQueryInternals} function.\n *\n * @typeParam TSchema The database schema type extending ZeroSchema\n * @typeParam TTable The name of the table being queried, must be a key of TSchema['tables']\n * @typeParam TReturn The return type of the query, defaults to PullRow<TTable, TSchema>\n */\nexport interface QueryInternals<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n> {\n readonly [queryInternalsTag]: true;\n\n /**\n * Format is used to specify the shape of the query results. This is used by\n * {@linkcode one} and it also describes the shape when using\n * {@linkcode related}.\n */\n readonly format: Format;\n\n /**\n * A string that uniquely identifies this query. This can be used to determine\n * if two queries are the same.\n *\n * The hash of a custom query, on the client, is the hash of its AST.\n * The hash of a custom query, on the server, is the hash of its name and args.\n *\n * The first allows many client-side queries to be pinned to the same backend query.\n * The second ensures we do not invoke a named query on the backend more than once for the same `name:arg` pairing.\n *\n * If the query.hash was of `name:args` then `useQuery` would de-dupe\n * queries with divergent ASTs.\n *\n * QueryManager will hash based on `name:args` since it is speaking with\n * the server which tracks queries by `name:args`.\n */\n hash(): string;\n\n /**\n * The completed AST for this query, with any missing primary keys added to\n * orderBy and start.\n */\n readonly ast: AST;\n\n readonly customQueryID: CustomQueryID | undefined;\n\n /**\n * Associates a name and arguments with this query for custom query tracking.\n * This is used internally to track named queries on the server.\n *\n * @internal\n */\n nameAndArgs(\n name: string,\n args: ReadonlyArray<ReadonlyJSONValue>,\n ): Query<TTable, TSchema, TReturn>;\n}\n\n/**\n * Helper function to cast a Query to QueryInternals.\n * This is used in tests and internal code to access query implementation details.\n * The function asserts that the query has the queryInternalsTag to ensure it\n * properly implements the QueryInternals interface.\n *\n * @internal\n */\nexport function asQueryInternals<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n>(\n query: Query<TTable, TSchema, TReturn>,\n): QueryInternals<TTable, TSchema, TReturn> {\n assert(queryInternalsTag in query, 'Query does not implement QueryInternals');\n return query as unknown as QueryInternals<TTable, TSchema, TReturn>;\n}\n\nexport function isQueryInternals<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n>(obj: unknown): obj is QueryInternals<TTable, TSchema, TReturn> {\n return typeof obj === 'object' && obj !== null && queryInternalsTag in obj;\n}\n\nexport function asQuery<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n>(\n queryInternals: QueryInternals<TTable, TSchema, TReturn>,\n): Query<TTable, TSchema, TReturn> {\n assert(queryInternalsTag in queryInternals, 'Expected query internals tag');\n return queryInternals as unknown as Query<TTable, TSchema, TReturn>;\n}\n\n// oxlint-disable-next-line no-explicit-any\nexport type AnyQueryInternals = QueryInternals<string, ZeroSchema, any>;\n"],"mappings":";;AAQA,IAAa,oBAAoB,QAAQ;;;;;;;;;AAuEzC,SAAgB,iBAKd,OAC0C;AAC1C,QAAO,qBAAqB,OAAO,0CAA0C;AAC7E,QAAO"}
1
+ {"version":3,"file":"query-internals.js","names":[],"sources":["../../../../../zql/src/query/query-internals.ts"],"sourcesContent":["import {assert} from '../../../shared/src/asserts.ts';\nimport type {ReadonlyJSONValue} from '../../../shared/src/json.ts';\nimport type {AST} from '../../../zero-protocol/src/ast.ts';\nimport type {Schema as ZeroSchema} from '../../../zero-types/src/schema.ts';\nimport type {Format} from '../ivm/view.ts';\nimport type {CustomQueryID} from './named.ts';\nimport type {Query} from './query.ts';\n\nexport const queryInternalsTag = Symbol();\n\n/**\n * Internal interface for query implementation details.\n * This is not part of the public API and should only be accessed via\n * the {@linkcode asQueryInternals} function.\n *\n * @typeParam TSchema The database schema type extending ZeroSchema\n * @typeParam TTable The name of the table being queried, must be a key of TSchema['tables']\n * @typeParam TReturn The return type of the query, defaults to PullRow<TTable, TSchema>\n */\nexport interface QueryInternals<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n> {\n readonly [queryInternalsTag]: true;\n\n /**\n * Format is used to specify the shape of the query results. This is used by\n * {@linkcode one} and it also describes the shape when using\n * {@linkcode related}.\n */\n readonly format: Format;\n\n /**\n * A string that uniquely identifies this query. This can be used to determine\n * if two queries are the same.\n *\n * The hash of a custom query, on the client, is the hash of its AST.\n * The hash of a custom query, on the server, is the hash of its name and args.\n *\n * The first allows many client-side queries to be pinned to the same backend query.\n * The second ensures we do not invoke a named query on the backend more than once for the same `name:arg` pairing.\n *\n * If the query.hash was of `name:args` then `useQuery` would de-dupe\n * queries with divergent ASTs.\n *\n * QueryManager will hash based on `name:args` since it is speaking with\n * the server which tracks queries by `name:args`.\n */\n hash(): string;\n\n /**\n * The completed AST for this query, with any missing primary keys added to\n * orderBy and start.\n */\n readonly ast: AST;\n\n readonly customQueryID: CustomQueryID | undefined;\n\n /**\n * Associates a name and arguments with this query for custom query tracking.\n * This is used internally to track named queries on the server.\n *\n * @internal\n */\n nameAndArgs(\n name: string,\n args: ReadonlyArray<ReadonlyJSONValue>,\n ): Query<TTable, TSchema, TReturn>;\n}\n\n/**\n * Helper function to cast a Query to QueryInternals.\n * This is used in tests and internal code to access query implementation details.\n * The function asserts that the query has the queryInternalsTag to ensure it\n * properly implements the QueryInternals interface.\n *\n * @internal\n */\nexport function asQueryInternals<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n>(\n query: Query<TTable, TSchema, TReturn>,\n): QueryInternals<TTable, TSchema, TReturn> {\n assert(\n queryInternalsTag in query,\n 'Query does not implement QueryInternals. This likely means there are two copies of Zero in your runtime.',\n );\n return query as unknown as QueryInternals<TTable, TSchema, TReturn>;\n}\n\nexport function isQueryInternals<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n>(obj: unknown): obj is QueryInternals<TTable, TSchema, TReturn> {\n return typeof obj === 'object' && obj !== null && queryInternalsTag in obj;\n}\n\nexport function asQuery<\n TTable extends keyof TSchema['tables'] & string,\n TSchema extends ZeroSchema,\n TReturn,\n>(\n queryInternals: QueryInternals<TTable, TSchema, TReturn>,\n): Query<TTable, TSchema, TReturn> {\n assert(queryInternalsTag in queryInternals, 'Expected query internals tag');\n return queryInternals as unknown as Query<TTable, TSchema, TReturn>;\n}\n\n// oxlint-disable-next-line no-explicit-any\nexport type AnyQueryInternals = QueryInternals<string, ZeroSchema, any>;\n"],"mappings":";;AAQA,IAAa,oBAAoB,QAAQ;;;;;;;;;AAuEzC,SAAgB,iBAKd,OAC0C;AAC1C,QACE,qBAAqB,OACrB,2GACD;AACD,QAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocicorp/zero",
3
- "version": "1.4.0-canary.1",
3
+ "version": "1.4.0-canary.2",
4
4
  "description": "Zero is a web framework for serverless web development.",
5
5
  "homepage": "https://zero.rocicorp.dev",
6
6
  "bugs": {