on-zero 0.7.10 → 0.8.0
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/{readme.md → README.md} +172 -231
- package/dist/cjs/cli.cjs +5 -2
- package/dist/cjs/cli.native.js +5 -2
- package/dist/cjs/cli.native.js.map +1 -1
- package/dist/cjs/combineZeroClients.cjs +2 -2
- package/dist/cjs/combineZeroClients.native.js +6 -6
- package/dist/cjs/combineZeroClients.native.js.map +1 -1
- package/dist/cjs/config.cjs +30 -0
- package/dist/cjs/config.native.js +33 -0
- package/dist/cjs/config.native.js.map +1 -0
- package/dist/cjs/createPermissions.cjs +2 -2
- package/dist/cjs/createPermissions.native.js +17 -27
- package/dist/cjs/createPermissions.native.js.map +1 -1
- package/dist/cjs/createUseQuery.cjs +3 -3
- package/dist/cjs/createUseQuery.native.js +4 -4
- package/dist/cjs/createUseQuery.native.js.map +1 -1
- package/dist/cjs/createUseQueryDirect.cjs +4 -3
- package/dist/cjs/createUseQueryDirect.native.js +14 -18
- package/dist/cjs/createUseQueryDirect.native.js.map +1 -1
- package/dist/cjs/createZeroClient.cjs +29 -9
- package/dist/cjs/createZeroClient.connection.test.cjs +11 -0
- package/dist/cjs/createZeroClient.connection.test.native.js +14 -7
- package/dist/cjs/createZeroClient.connection.test.native.js.map +1 -1
- package/dist/cjs/createZeroClient.native.js +58 -32
- package/dist/cjs/createZeroClient.native.js.map +1 -1
- package/dist/cjs/createZeroClient.recovery.test.cjs +90 -3
- package/dist/cjs/createZeroClient.recovery.test.native.js +109 -19
- package/dist/cjs/createZeroClient.recovery.test.native.js.map +1 -1
- package/dist/cjs/generate-helpers.cjs +70 -17
- package/dist/cjs/generate-helpers.native.js +110 -23
- package/dist/cjs/generate-helpers.native.js.map +1 -1
- package/dist/cjs/generate-layout.cjs +586 -0
- package/dist/cjs/generate-layout.native.js +1275 -0
- package/dist/cjs/generate-layout.native.js.map +1 -0
- package/dist/cjs/generate-lite.cjs +295 -27
- package/dist/cjs/generate-lite.native.js +854 -102
- package/dist/cjs/generate-lite.native.js.map +1 -1
- package/dist/cjs/generate-lite.test.cjs +433 -41
- package/dist/cjs/generate-lite.test.native.js +446 -41
- package/dist/cjs/generate-lite.test.native.js.map +1 -1
- package/dist/cjs/generate.cjs +172 -94
- package/dist/cjs/generate.native.js +324 -148
- package/dist/cjs/generate.native.js.map +1 -1
- package/dist/cjs/generate.test.cjs +362 -45
- package/dist/cjs/generate.test.native.js +374 -45
- package/dist/cjs/generate.test.native.js.map +1 -1
- package/dist/cjs/helpers/NullToOptional.cjs +18 -0
- package/dist/cjs/helpers/NullToOptional.native.js +21 -0
- package/dist/cjs/helpers/NullToOptional.native.js.map +1 -0
- package/dist/cjs/helpers/asyncContext.cjs +128 -0
- package/dist/cjs/helpers/asyncContext.native.js +87 -0
- package/dist/cjs/helpers/asyncContext.native.js.map +1 -0
- package/dist/cjs/helpers/batchQuery.cjs +2 -2
- package/dist/cjs/helpers/batchQuery.native.js +2 -2
- package/dist/cjs/helpers/batchQuery.native.js.map +1 -1
- package/dist/cjs/helpers/createMutators.cjs +7 -4
- package/dist/cjs/helpers/createMutators.native.js +12 -9
- package/dist/cjs/helpers/createMutators.native.js.map +1 -1
- package/dist/cjs/helpers/createMutators.test.native.js +2 -2
- package/dist/cjs/helpers/createMutators.test.native.js.map +1 -1
- package/dist/cjs/helpers/ellipsis.cjs +35 -0
- package/dist/cjs/helpers/ellipsis.native.js +38 -0
- package/dist/cjs/helpers/ellipsis.native.js.map +1 -0
- package/dist/cjs/helpers/emitter.cjs +99 -0
- package/dist/cjs/helpers/emitter.native.js +125 -0
- package/dist/cjs/helpers/emitter.native.js.map +1 -0
- package/dist/cjs/helpers/ensure.cjs +33 -0
- package/dist/cjs/helpers/ensure.native.js +37 -0
- package/dist/cjs/helpers/ensure.native.js.map +1 -0
- package/dist/cjs/helpers/ensureLoggedIn.cjs +2 -2
- package/dist/cjs/helpers/ensureLoggedIn.native.js +3 -3
- package/dist/cjs/helpers/ensureLoggedIn.native.js.map +1 -1
- package/dist/cjs/helpers/errors.cjs +40 -0
- package/dist/cjs/helpers/errors.native.js +152 -0
- package/dist/cjs/helpers/errors.native.js.map +1 -0
- package/dist/cjs/helpers/getCurrentComponentStack.cjs +71 -0
- package/dist/cjs/helpers/getCurrentComponentStack.native.js +93 -0
- package/dist/cjs/helpers/getCurrentComponentStack.native.js.map +1 -0
- package/dist/cjs/helpers/globalValue.cjs +39 -0
- package/dist/cjs/helpers/globalValue.native.js +42 -0
- package/dist/cjs/helpers/globalValue.native.js.map +1 -0
- package/dist/cjs/helpers/mapObject.cjs +36 -0
- package/dist/cjs/helpers/mapObject.native.js +39 -0
- package/dist/cjs/helpers/mapObject.native.js.map +1 -0
- package/dist/cjs/helpers/mutationLifecycle.cjs +251 -0
- package/dist/cjs/helpers/mutationLifecycle.native.js +392 -0
- package/dist/cjs/helpers/mutationLifecycle.native.js.map +1 -0
- package/dist/cjs/helpers/mutationLifecycle.test.cjs +174 -0
- package/dist/cjs/helpers/mutationLifecycle.test.native.js +182 -0
- package/dist/cjs/helpers/mutationLifecycle.test.native.js.map +1 -0
- package/dist/cjs/helpers/mutatorContext.cjs +3 -3
- package/dist/cjs/helpers/mutatorContext.native.js +5 -5
- package/dist/cjs/helpers/mutatorContext.native.js.map +1 -1
- package/dist/cjs/helpers/platform.cjs +31 -0
- package/dist/cjs/helpers/platform.native.js +33 -0
- package/dist/cjs/helpers/platform.native.js.map +1 -0
- package/dist/cjs/helpers/prettyFormatZeroQuery.cjs +2 -2
- package/dist/cjs/helpers/prettyFormatZeroQuery.native.js +7 -7
- package/dist/cjs/helpers/prettyFormatZeroQuery.native.js.map +1 -1
- package/dist/cjs/helpers/queryContext.cjs +2 -2
- package/dist/cjs/helpers/queryContext.native.js +4 -4
- package/dist/cjs/helpers/queryContext.native.js.map +1 -1
- package/dist/cjs/helpers/recoverZeroClient.cjs +14 -15
- package/dist/cjs/helpers/recoverZeroClient.native.js +26 -23
- package/dist/cjs/helpers/recoverZeroClient.native.js.map +1 -1
- package/dist/cjs/helpers/recoverZeroClient.test.cjs +10 -8
- package/dist/cjs/helpers/recoverZeroClient.test.native.js +17 -21
- package/dist/cjs/helpers/recoverZeroClient.test.native.js.map +1 -1
- package/dist/cjs/helpers/sleep.cjs +34 -0
- package/dist/cjs/helpers/sleep.native.js +39 -0
- package/dist/cjs/helpers/sleep.native.js.map +1 -0
- package/dist/cjs/helpers/time.cjs +47 -0
- package/dist/cjs/helpers/time.native.js +80 -0
- package/dist/cjs/helpers/time.native.js.map +1 -0
- package/dist/cjs/helpers/tuple.cjs +18 -0
- package/dist/cjs/helpers/tuple.native.js +21 -0
- package/dist/cjs/helpers/tuple.native.js.map +1 -0
- package/dist/cjs/helpers/useMutation.native.js +5 -5
- package/dist/cjs/helpers/useMutation.native.js.map +1 -1
- package/dist/cjs/helpers/useMutation.test.native.js +1 -1
- package/dist/cjs/helpers/useMutation.test.native.js.map +1 -1
- package/dist/cjs/helpers/useZeroDebug.cjs +2 -2
- package/dist/cjs/helpers/useZeroDebug.native.js +7 -8
- package/dist/cjs/helpers/useZeroDebug.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -1
- package/dist/cjs/index.native.js +8 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/instanceRegistry.cjs +16 -4
- package/dist/cjs/instanceRegistry.native.js +56 -6
- package/dist/cjs/instanceRegistry.native.js.map +1 -1
- package/dist/cjs/multi.cjs +34 -13
- package/dist/cjs/multi.native.js +39 -17
- package/dist/cjs/multi.native.js.map +1 -1
- package/dist/cjs/multiInstance.test.cjs +6 -2
- package/dist/cjs/multiInstance.test.native.js +13 -9
- package/dist/cjs/multiInstance.test.native.js.map +1 -1
- package/dist/cjs/multiInstanceNested.test.native.js +10 -10
- package/dist/cjs/multiInstanceNested.test.native.js.map +1 -1
- package/dist/cjs/multiPartition.test.cjs +85 -36
- package/dist/cjs/multiPartition.test.native.js +102 -39
- package/dist/cjs/multiPartition.test.native.js.map +1 -1
- package/dist/cjs/mutations.cjs +2 -2
- package/dist/cjs/mutations.native.js +4 -4
- package/dist/cjs/mutations.native.js.map +1 -1
- package/dist/cjs/mutations.test.native.js +3 -3
- package/dist/cjs/mutations.test.native.js.map +1 -1
- package/dist/cjs/provideZero.hydration.test.cjs +3 -3
- package/dist/cjs/provideZero.hydration.test.native.js +4 -4
- package/dist/cjs/provideZero.hydration.test.native.js.map +1 -1
- package/dist/cjs/run.cjs +1 -1
- package/dist/cjs/run.native.js +3 -3
- package/dist/cjs/run.native.js.map +1 -1
- package/dist/cjs/server.cjs +20 -16
- package/dist/cjs/server.native.js +50 -57
- package/dist/cjs/server.native.js.map +1 -1
- package/dist/cjs/server.test.cjs +129 -6
- package/dist/cjs/server.test.native.js +141 -10
- package/dist/cjs/server.test.native.js.map +1 -1
- package/dist/cjs/serverWhere.test.native.js +3 -3
- package/dist/cjs/serverWhere.test.native.js.map +1 -1
- package/dist/cjs/state.cjs +2 -2
- package/dist/cjs/state.native.js +10 -10
- package/dist/cjs/state.native.js.map +1 -1
- package/dist/cjs/usePermission.test.native.js +3 -3
- package/dist/cjs/usePermission.test.native.js.map +1 -1
- package/dist/cjs/useQuery.empty.test.cjs +3 -3
- package/dist/cjs/useQuery.empty.test.native.js +6 -6
- package/dist/cjs/useQuery.empty.test.native.js.map +1 -1
- package/dist/cjs/useQuery.ssr.test.native.js +2 -2
- package/dist/cjs/useQuery.ssr.test.native.js.map +1 -1
- package/dist/cjs/vite-plugin.cjs +7 -8
- package/dist/cjs/vite-plugin.native.js +11 -11
- package/dist/cjs/vite-plugin.native.js.map +1 -1
- package/dist/cjs/where.cjs +3 -3
- package/dist/cjs/where.native.js +4 -4
- package/dist/cjs/where.native.js.map +1 -1
- package/dist/esm/cli.mjs +6 -3
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +6 -3
- package/dist/esm/cli.native.js.map +1 -1
- package/dist/esm/combineZeroClients.mjs +1 -1
- package/dist/esm/combineZeroClients.mjs.map +1 -1
- package/dist/esm/combineZeroClients.native.js +5 -5
- package/dist/esm/combineZeroClients.native.js.map +1 -1
- package/dist/esm/config.mjs +5 -0
- package/dist/esm/config.mjs.map +1 -0
- package/dist/esm/config.native.js +5 -0
- package/dist/esm/config.native.js.map +1 -0
- package/dist/esm/createPermissions.mjs +1 -1
- package/dist/esm/createPermissions.mjs.map +1 -1
- package/dist/esm/createPermissions.native.js +16 -26
- package/dist/esm/createPermissions.native.js.map +1 -1
- package/dist/esm/createUseQuery.mjs +2 -2
- package/dist/esm/createUseQuery.mjs.map +1 -1
- package/dist/esm/createUseQuery.native.js +3 -3
- package/dist/esm/createUseQuery.native.js.map +1 -1
- package/dist/esm/createUseQueryDirect.mjs +2 -1
- package/dist/esm/createUseQueryDirect.mjs.map +1 -1
- package/dist/esm/createUseQueryDirect.native.js +12 -16
- package/dist/esm/createUseQueryDirect.native.js.map +1 -1
- package/dist/esm/createZeroClient.connection.test.mjs +11 -0
- package/dist/esm/createZeroClient.connection.test.mjs.map +1 -1
- package/dist/esm/createZeroClient.connection.test.native.js +14 -7
- package/dist/esm/createZeroClient.connection.test.native.js.map +1 -1
- package/dist/esm/createZeroClient.mjs +25 -5
- package/dist/esm/createZeroClient.mjs.map +1 -1
- package/dist/esm/createZeroClient.native.js +54 -28
- package/dist/esm/createZeroClient.native.js.map +1 -1
- package/dist/esm/createZeroClient.recovery.test.mjs +90 -3
- package/dist/esm/createZeroClient.recovery.test.mjs.map +1 -1
- package/dist/esm/createZeroClient.recovery.test.native.js +109 -19
- package/dist/esm/createZeroClient.recovery.test.native.js.map +1 -1
- package/dist/esm/generate-helpers.mjs +70 -18
- package/dist/esm/generate-helpers.mjs.map +1 -1
- package/dist/esm/generate-helpers.native.js +110 -24
- package/dist/esm/generate-helpers.native.js.map +1 -1
- package/dist/esm/generate-layout.mjs +560 -0
- package/dist/esm/generate-layout.mjs.map +1 -0
- package/dist/esm/generate-layout.native.js +1246 -0
- package/dist/esm/generate-layout.native.js.map +1 -0
- package/dist/esm/generate-lite.mjs +296 -28
- package/dist/esm/generate-lite.mjs.map +1 -1
- package/dist/esm/generate-lite.native.js +855 -103
- package/dist/esm/generate-lite.native.js.map +1 -1
- package/dist/esm/generate-lite.test.mjs +434 -42
- package/dist/esm/generate-lite.test.mjs.map +1 -1
- package/dist/esm/generate-lite.test.native.js +447 -42
- package/dist/esm/generate-lite.test.native.js.map +1 -1
- package/dist/esm/generate.mjs +172 -96
- package/dist/esm/generate.mjs.map +1 -1
- package/dist/esm/generate.native.js +324 -150
- package/dist/esm/generate.native.js.map +1 -1
- package/dist/esm/generate.test.mjs +366 -49
- package/dist/esm/generate.test.mjs.map +1 -1
- package/dist/esm/generate.test.native.js +378 -49
- package/dist/esm/generate.test.native.js.map +1 -1
- package/dist/esm/helpers/NullToOptional.mjs +2 -0
- package/dist/esm/helpers/NullToOptional.mjs.map +1 -0
- package/dist/esm/helpers/NullToOptional.native.js +2 -0
- package/dist/esm/helpers/NullToOptional.native.js.map +1 -0
- package/dist/esm/helpers/asyncContext.mjs +102 -0
- package/dist/esm/helpers/asyncContext.mjs.map +1 -0
- package/dist/esm/helpers/asyncContext.native.js +58 -0
- package/dist/esm/helpers/asyncContext.native.js.map +1 -0
- package/dist/esm/helpers/batchQuery.mjs +1 -1
- package/dist/esm/helpers/batchQuery.native.js +1 -1
- package/dist/esm/helpers/createMutators.mjs +5 -2
- package/dist/esm/helpers/createMutators.mjs.map +1 -1
- package/dist/esm/helpers/createMutators.native.js +10 -7
- package/dist/esm/helpers/createMutators.native.js.map +1 -1
- package/dist/esm/helpers/createMutators.test.native.js +2 -2
- package/dist/esm/helpers/createMutators.test.native.js.map +1 -1
- package/dist/esm/helpers/ellipsis.mjs +10 -0
- package/dist/esm/helpers/ellipsis.mjs.map +1 -0
- package/dist/esm/helpers/ellipsis.native.js +10 -0
- package/dist/esm/helpers/ellipsis.native.js.map +1 -0
- package/dist/esm/helpers/emitter.mjs +72 -0
- package/dist/esm/helpers/emitter.mjs.map +1 -0
- package/dist/esm/helpers/emitter.native.js +95 -0
- package/dist/esm/helpers/emitter.native.js.map +1 -0
- package/dist/esm/helpers/ensure.mjs +8 -0
- package/dist/esm/helpers/ensure.mjs.map +1 -0
- package/dist/esm/helpers/ensure.native.js +9 -0
- package/dist/esm/helpers/ensure.native.js.map +1 -0
- package/dist/esm/helpers/ensureLoggedIn.mjs +1 -1
- package/dist/esm/helpers/ensureLoggedIn.mjs.map +1 -1
- package/dist/esm/helpers/ensureLoggedIn.native.js +2 -2
- package/dist/esm/helpers/ensureLoggedIn.native.js.map +1 -1
- package/dist/esm/helpers/errors.mjs +14 -0
- package/dist/esm/helpers/errors.mjs.map +1 -0
- package/dist/esm/helpers/errors.native.js +123 -0
- package/dist/esm/helpers/errors.native.js.map +1 -0
- package/dist/esm/helpers/getCurrentComponentStack.mjs +35 -0
- package/dist/esm/helpers/getCurrentComponentStack.mjs.map +1 -0
- package/dist/esm/helpers/getCurrentComponentStack.native.js +54 -0
- package/dist/esm/helpers/getCurrentComponentStack.native.js.map +1 -0
- package/dist/esm/helpers/globalValue.mjs +14 -0
- package/dist/esm/helpers/globalValue.mjs.map +1 -0
- package/dist/esm/helpers/globalValue.native.js +14 -0
- package/dist/esm/helpers/globalValue.native.js.map +1 -0
- package/dist/esm/helpers/mapObject.mjs +11 -0
- package/dist/esm/helpers/mapObject.mjs.map +1 -0
- package/dist/esm/helpers/mapObject.native.js +11 -0
- package/dist/esm/helpers/mapObject.native.js.map +1 -0
- package/dist/esm/helpers/mutationLifecycle.mjs +221 -0
- package/dist/esm/helpers/mutationLifecycle.mjs.map +1 -0
- package/dist/esm/helpers/mutationLifecycle.native.js +359 -0
- package/dist/esm/helpers/mutationLifecycle.native.js.map +1 -0
- package/dist/esm/helpers/mutationLifecycle.test.mjs +175 -0
- package/dist/esm/helpers/mutationLifecycle.test.mjs.map +1 -0
- package/dist/esm/helpers/mutationLifecycle.test.native.js +180 -0
- package/dist/esm/helpers/mutationLifecycle.test.native.js.map +1 -0
- package/dist/esm/helpers/mutatorContext.mjs +1 -1
- package/dist/esm/helpers/mutatorContext.native.js +4 -4
- package/dist/esm/helpers/mutatorContext.native.js.map +1 -1
- package/dist/esm/helpers/platform.mjs +5 -0
- package/dist/esm/helpers/platform.mjs.map +1 -0
- package/dist/esm/helpers/platform.native.js +4 -0
- package/dist/esm/helpers/platform.native.js.map +1 -0
- package/dist/esm/helpers/prettyFormatZeroQuery.mjs +1 -1
- package/dist/esm/helpers/prettyFormatZeroQuery.native.js +6 -6
- package/dist/esm/helpers/prettyFormatZeroQuery.native.js.map +1 -1
- package/dist/esm/helpers/queryContext.mjs +1 -1
- package/dist/esm/helpers/queryContext.native.js +3 -3
- package/dist/esm/helpers/queryContext.native.js.map +1 -1
- package/dist/esm/helpers/recoverZeroClient.mjs +14 -15
- package/dist/esm/helpers/recoverZeroClient.mjs.map +1 -1
- package/dist/esm/helpers/recoverZeroClient.native.js +26 -23
- package/dist/esm/helpers/recoverZeroClient.native.js.map +1 -1
- package/dist/esm/helpers/recoverZeroClient.test.mjs +8 -6
- package/dist/esm/helpers/recoverZeroClient.test.mjs.map +1 -1
- package/dist/esm/helpers/recoverZeroClient.test.native.js +15 -19
- package/dist/esm/helpers/recoverZeroClient.test.native.js.map +1 -1
- package/dist/esm/helpers/sleep.mjs +9 -0
- package/dist/esm/helpers/sleep.mjs.map +1 -0
- package/dist/esm/helpers/sleep.native.js +11 -0
- package/dist/esm/helpers/sleep.native.js.map +1 -0
- package/dist/esm/helpers/time.mjs +22 -0
- package/dist/esm/helpers/time.mjs.map +1 -0
- package/dist/esm/helpers/time.native.js +52 -0
- package/dist/esm/helpers/time.native.js.map +1 -0
- package/dist/esm/helpers/tuple.mjs +2 -0
- package/dist/esm/helpers/tuple.mjs.map +1 -0
- package/dist/esm/helpers/tuple.native.js +2 -0
- package/dist/esm/helpers/tuple.native.js.map +1 -0
- package/dist/esm/helpers/useMutation.native.js +5 -5
- package/dist/esm/helpers/useMutation.native.js.map +1 -1
- package/dist/esm/helpers/useMutation.test.native.js +1 -1
- package/dist/esm/helpers/useMutation.test.native.js.map +1 -1
- package/dist/esm/helpers/useZeroDebug.mjs +1 -1
- package/dist/esm/helpers/useZeroDebug.mjs.map +1 -1
- package/dist/esm/helpers/useZeroDebug.native.js +6 -7
- package/dist/esm/helpers/useZeroDebug.native.js.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +3 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +3 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/instanceRegistry.mjs +13 -2
- package/dist/esm/instanceRegistry.mjs.map +1 -1
- package/dist/esm/instanceRegistry.native.js +53 -4
- package/dist/esm/instanceRegistry.native.js.map +1 -1
- package/dist/esm/multi.mjs +33 -12
- package/dist/esm/multi.mjs.map +1 -1
- package/dist/esm/multi.native.js +38 -16
- package/dist/esm/multi.native.js.map +1 -1
- package/dist/esm/multiInstance.test.mjs +5 -1
- package/dist/esm/multiInstance.test.mjs.map +1 -1
- package/dist/esm/multiInstance.test.native.js +12 -8
- package/dist/esm/multiInstance.test.native.js.map +1 -1
- package/dist/esm/multiInstanceNested.test.native.js +10 -10
- package/dist/esm/multiInstanceNested.test.native.js.map +1 -1
- package/dist/esm/multiPartition.test.mjs +86 -37
- package/dist/esm/multiPartition.test.mjs.map +1 -1
- package/dist/esm/multiPartition.test.native.js +103 -40
- package/dist/esm/multiPartition.test.native.js.map +1 -1
- package/dist/esm/mutations.mjs +1 -1
- package/dist/esm/mutations.mjs.map +1 -1
- package/dist/esm/mutations.native.js +3 -3
- package/dist/esm/mutations.native.js.map +1 -1
- package/dist/esm/mutations.test.native.js +3 -3
- package/dist/esm/mutations.test.native.js.map +1 -1
- package/dist/esm/provideZero.hydration.test.mjs +1 -1
- package/dist/esm/provideZero.hydration.test.mjs.map +1 -1
- package/dist/esm/provideZero.hydration.test.native.js +2 -2
- package/dist/esm/provideZero.hydration.test.native.js.map +1 -1
- package/dist/esm/run.mjs +1 -1
- package/dist/esm/run.mjs.map +1 -1
- package/dist/esm/run.native.js +3 -3
- package/dist/esm/run.native.js.map +1 -1
- package/dist/esm/server.mjs +20 -15
- package/dist/esm/server.mjs.map +1 -1
- package/dist/esm/server.native.js +50 -56
- package/dist/esm/server.native.js.map +1 -1
- package/dist/esm/server.test.mjs +130 -7
- package/dist/esm/server.test.mjs.map +1 -1
- package/dist/esm/server.test.native.js +142 -11
- package/dist/esm/server.test.native.js.map +1 -1
- package/dist/esm/serverWhere.test.mjs.map +1 -1
- package/dist/esm/serverWhere.test.native.js +3 -3
- package/dist/esm/serverWhere.test.native.js.map +1 -1
- package/dist/esm/state.mjs +1 -1
- package/dist/esm/state.mjs.map +1 -1
- package/dist/esm/state.native.js +9 -9
- package/dist/esm/state.native.js.map +1 -1
- package/dist/esm/usePermission.test.native.js +3 -3
- package/dist/esm/usePermission.test.native.js.map +1 -1
- package/dist/esm/useQuery.empty.test.mjs +1 -1
- package/dist/esm/useQuery.empty.test.mjs.map +1 -1
- package/dist/esm/useQuery.empty.test.native.js +4 -4
- package/dist/esm/useQuery.empty.test.native.js.map +1 -1
- package/dist/esm/useQuery.ssr.test.native.js +2 -2
- package/dist/esm/useQuery.ssr.test.native.js.map +1 -1
- package/dist/esm/vite-plugin.mjs +7 -8
- package/dist/esm/vite-plugin.mjs.map +1 -1
- package/dist/esm/vite-plugin.native.js +11 -11
- package/dist/esm/vite-plugin.native.js.map +1 -1
- package/dist/esm/where.mjs +1 -1
- package/dist/esm/where.mjs.map +1 -1
- package/dist/esm/where.native.js +2 -2
- package/dist/esm/where.native.js.map +1 -1
- package/package.json +18 -6
- package/src/cli.ts +11 -3
- package/src/combineZeroClients.tsx +18 -10
- package/src/config.ts +72 -0
- package/src/createPermissions.ts +3 -4
- package/src/createUseQuery.tsx +8 -8
- package/src/createUseQueryDirect.tsx +11 -10
- package/src/createZeroClient.authData.test.tsx +1 -1
- package/src/createZeroClient.connection.test.tsx +13 -2
- package/src/createZeroClient.recovery.test.tsx +100 -4
- package/src/createZeroClient.tsx +87 -30
- package/src/generate-helpers.ts +108 -31
- package/src/generate-layout.ts +841 -0
- package/src/generate-lite.test.ts +421 -42
- package/src/generate-lite.ts +479 -43
- package/src/generate.test.ts +552 -90
- package/src/generate.ts +360 -163
- package/src/helpers/NullToOptional.ts +5 -0
- package/src/helpers/asyncContext.native.ts +90 -0
- package/src/helpers/asyncContext.ts +159 -0
- package/src/helpers/batchQuery.ts +2 -2
- package/src/helpers/createMutators.ts +11 -8
- package/src/helpers/ellipsis.ts +9 -0
- package/src/helpers/emitter.tsx +106 -0
- package/src/helpers/ensure.ts +10 -0
- package/src/helpers/ensureLoggedIn.ts +1 -2
- package/src/helpers/errors.ts +13 -0
- package/src/helpers/getCurrentComponentStack.ts +56 -0
- package/src/helpers/globalValue.ts +40 -0
- package/src/helpers/mapObject.ts +14 -0
- package/src/helpers/mutationLifecycle.test.ts +180 -0
- package/src/helpers/mutationLifecycle.ts +313 -0
- package/src/helpers/mutatorContext.ts +3 -3
- package/src/helpers/platform.native.ts +2 -0
- package/src/helpers/platform.ts +16 -0
- package/src/helpers/prettyFormatZeroQuery.ts +2 -2
- package/src/helpers/queryContext.ts +2 -2
- package/src/helpers/recoverZeroClient.test.ts +23 -21
- package/src/helpers/recoverZeroClient.ts +56 -49
- package/src/helpers/sleep.ts +8 -0
- package/src/helpers/time.ts +51 -0
- package/src/helpers/tuple.ts +1 -0
- package/src/helpers/useMutation.tsx +3 -3
- package/src/helpers/useZeroDebug.ts +3 -3
- package/src/index.ts +13 -1
- package/src/instanceRegistry.ts +19 -6
- package/src/multi.ts +75 -31
- package/src/multiInstance.test.tsx +31 -13
- package/src/multiInstanceNested.test.tsx +2 -2
- package/src/multiPartition.test.ts +62 -27
- package/src/mutations.ts +10 -10
- package/src/provideZero.hydration.test.tsx +1 -1
- package/src/resolveQuery.ts +2 -2
- package/src/run.ts +7 -7
- package/src/server.test.ts +117 -18
- package/src/server.ts +70 -43
- package/src/serverWhere.ts +2 -2
- package/src/state.ts +2 -2
- package/src/types.ts +47 -6
- package/src/useQuery.empty.test.tsx +3 -3
- package/src/useQuery.ssr.test.ts +1 -1
- package/src/vite-plugin.ts +12 -9
- package/src/where.ts +6 -7
- package/src/zeroRunner.ts +2 -2
- package/types/combineZeroClients.d.ts +11 -5
- package/types/combineZeroClients.d.ts.map +1 -1
- package/types/config.d.ts +62 -0
- package/types/config.d.ts.map +1 -0
- package/types/createPermissions.d.ts.map +1 -1
- package/types/createUseQuery.d.ts.map +1 -1
- package/types/createUseQueryDirect.d.ts +1 -1
- package/types/createUseQueryDirect.d.ts.map +1 -1
- package/types/createZeroClient.d.ts +22 -12
- package/types/createZeroClient.d.ts.map +1 -1
- package/types/createZeroClient.recovery.test.d.ts.map +1 -1
- package/types/generate-helpers.d.ts +17 -2
- package/types/generate-helpers.d.ts.map +1 -1
- package/types/generate-layout.d.ts +26 -0
- package/types/generate-layout.d.ts.map +1 -0
- package/types/generate-lite.d.ts +29 -1
- package/types/generate-lite.d.ts.map +1 -1
- package/types/generate.d.ts +20 -0
- package/types/generate.d.ts.map +1 -1
- package/types/helpers/NullToOptional.d.ts +6 -0
- package/types/helpers/NullToOptional.d.ts.map +1 -0
- package/types/helpers/asyncContext.d.ts +15 -0
- package/types/helpers/asyncContext.d.ts.map +1 -0
- package/types/helpers/asyncContext.native.d.ts +8 -0
- package/types/helpers/asyncContext.native.d.ts.map +1 -0
- package/types/helpers/createMutators.d.ts +2 -1
- package/types/helpers/createMutators.d.ts.map +1 -1
- package/types/helpers/ellipsis.d.ts +2 -0
- package/types/helpers/ellipsis.d.ts.map +1 -0
- package/types/helpers/emitter.d.ts +21 -0
- package/types/helpers/emitter.d.ts.map +1 -0
- package/types/helpers/ensure.d.ts +2 -0
- package/types/helpers/ensure.d.ts.map +1 -0
- package/types/helpers/ensureLoggedIn.d.ts.map +1 -1
- package/types/helpers/errors.d.ts +7 -0
- package/types/helpers/errors.d.ts.map +1 -0
- package/types/helpers/getCurrentComponentStack.d.ts +2 -0
- package/types/helpers/getCurrentComponentStack.d.ts.map +1 -0
- package/types/helpers/globalValue.d.ts +23 -0
- package/types/helpers/globalValue.d.ts.map +1 -0
- package/types/helpers/mapObject.d.ts +4 -0
- package/types/helpers/mapObject.d.ts.map +1 -0
- package/types/helpers/mutationLifecycle.d.ts +44 -0
- package/types/helpers/mutationLifecycle.d.ts.map +1 -0
- package/types/helpers/mutationLifecycle.test.d.ts +2 -0
- package/types/helpers/mutationLifecycle.test.d.ts.map +1 -0
- package/types/helpers/platform.d.ts +3 -0
- package/types/helpers/platform.d.ts.map +1 -0
- package/types/helpers/platform.native.d.ts +3 -0
- package/types/helpers/platform.native.d.ts.map +1 -0
- package/types/helpers/recoverZeroClient.d.ts +13 -9
- package/types/helpers/recoverZeroClient.d.ts.map +1 -1
- package/types/helpers/sleep.d.ts +2 -0
- package/types/helpers/sleep.d.ts.map +1 -0
- package/types/helpers/time.d.ts +28 -0
- package/types/helpers/time.d.ts.map +1 -0
- package/types/helpers/tuple.d.ts +2 -0
- package/types/helpers/tuple.d.ts.map +1 -0
- package/types/index.d.ts +3 -1
- package/types/index.d.ts.map +1 -1
- package/types/instanceRegistry.d.ts +1 -0
- package/types/instanceRegistry.d.ts.map +1 -1
- package/types/multi.d.ts +23 -1
- package/types/multi.d.ts.map +1 -1
- package/types/mutations.d.ts +1 -1
- package/types/mutations.d.ts.map +1 -1
- package/types/run.d.ts.map +1 -1
- package/types/server.d.ts +12 -8
- package/types/server.d.ts.map +1 -1
- package/types/state.d.ts +1 -1
- package/types/state.d.ts.map +1 -1
- package/types/types.d.ts +23 -1
- package/types/types.d.ts.map +1 -1
- package/types/vite-plugin.d.ts.map +1 -1
- package/types/where.d.ts.map +1 -1
- package/lint/ssr-guards.js +0 -165
- package/test-fixtures/server-return-types.ts +0 -58
- package/test-fixtures/tsconfig.json +0 -13
- package/tsconfig.json +0 -26
- package/vitest.config.ts +0 -8
package/src/server.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { createBuilder, mustGetQuery } from '@rocicorp/zero'
|
|
2
2
|
import { asQueryInternals } from '@rocicorp/zero/bindings'
|
|
3
|
-
// type-only: @rocicorp/zero/server pulls node and postgresql formatting in, and
|
|
4
|
-
// importing it eagerly means merely importing on-zero/server drags that into a
|
|
5
|
-
// browser worker. the real import happens inside transformQueryRequest, which
|
|
6
|
-
// only ever runs on a server.
|
|
7
|
-
import type { handleQueryRequest as zeroHandleQueryRequest } from '@rocicorp/zero/server'
|
|
8
|
-
import { createAsyncContext } from '@take-out/helpers'
|
|
9
3
|
|
|
10
4
|
import { createPermissions } from './createPermissions'
|
|
5
|
+
import { createAsyncContext } from './helpers/asyncContext'
|
|
11
6
|
import { createMutators } from './helpers/createMutators'
|
|
12
7
|
import { getScopedAuthData, runWithAuthScope } from './helpers/mutatorContext'
|
|
13
8
|
import { runWithQueryContext } from './helpers/queryContext'
|
|
@@ -19,6 +14,7 @@ import { setRunner } from './zeroRunner'
|
|
|
19
14
|
|
|
20
15
|
import type {
|
|
21
16
|
AdminRoleMode,
|
|
17
|
+
AsyncActionEnvelope,
|
|
22
18
|
AuthData,
|
|
23
19
|
GenericModels,
|
|
24
20
|
MutatorContext,
|
|
@@ -32,6 +28,11 @@ import type {
|
|
|
32
28
|
Schema as ZeroSchema,
|
|
33
29
|
ServerTransaction as RocicorpServerTransaction,
|
|
34
30
|
} from '@rocicorp/zero'
|
|
31
|
+
// type-only: @rocicorp/zero/server pulls node and postgresql formatting in, and
|
|
32
|
+
// importing it eagerly means merely importing on-zero/server drags that into a
|
|
33
|
+
// browser worker. the real import happens inside transformQueryRequest, which
|
|
34
|
+
// only ever runs on a server.
|
|
35
|
+
import type { handleQueryRequest as zeroHandleQueryRequest } from '@rocicorp/zero/server'
|
|
35
36
|
|
|
36
37
|
export type JsonPrimitive = string | number | boolean | null
|
|
37
38
|
export type JsonValue =
|
|
@@ -59,16 +60,16 @@ export interface ZeroServerApplicationTransaction {
|
|
|
59
60
|
exec(
|
|
60
61
|
sql: string,
|
|
61
62
|
params?: readonly unknown[],
|
|
62
|
-
metadata?: SqlStatementMetadata
|
|
63
|
+
metadata?: SqlStatementMetadata
|
|
63
64
|
): Promise<{ readonly changes: number }>
|
|
64
65
|
query<Row extends Record<string, unknown> = Record<string, unknown>>(
|
|
65
66
|
sql: string,
|
|
66
|
-
params?: readonly unknown[]
|
|
67
|
+
params?: readonly unknown[]
|
|
67
68
|
): Promise<readonly Row[]>
|
|
68
69
|
queryAst<Result = unknown>(
|
|
69
70
|
ast: JsonValue,
|
|
70
71
|
format: TransactionQueryFormat,
|
|
71
|
-
queryName?: string
|
|
72
|
+
queryName?: string
|
|
72
73
|
): Promise<Result>
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -81,7 +82,7 @@ export type ZeroServerMutationContext = {
|
|
|
81
82
|
readonly claims: NormalizedClaims
|
|
82
83
|
defer(
|
|
83
84
|
effect: () => void | Promise<void>,
|
|
84
|
-
options?: { readonly barrier?: boolean }
|
|
85
|
+
options?: { readonly barrier?: boolean }
|
|
85
86
|
): void
|
|
86
87
|
}
|
|
87
88
|
|
|
@@ -100,11 +101,11 @@ export interface ZeroServerExecutor<Schema extends ZeroSchema> {
|
|
|
100
101
|
execute(name: string, args: JsonValue, claims: NormalizedClaims): Promise<void>
|
|
101
102
|
transaction<Value>(
|
|
102
103
|
claims: NormalizedClaims,
|
|
103
|
-
work: (tx: ZeroServerTransaction<Schema>) => Value | Promise<Value
|
|
104
|
+
work: (tx: ZeroServerTransaction<Schema>) => Value | Promise<Value>
|
|
104
105
|
): Promise<Value>
|
|
105
106
|
query<Result>(
|
|
106
107
|
claims: NormalizedClaims,
|
|
107
|
-
work: (tx: ZeroServerTransaction<Schema>) => Result | Promise<Result
|
|
108
|
+
work: (tx: ZeroServerTransaction<Schema>) => Result | Promise<Result>
|
|
108
109
|
): Promise<Result>
|
|
109
110
|
}
|
|
110
111
|
|
|
@@ -134,21 +135,31 @@ export type ServerMutate<Models extends GenericModels> = {
|
|
|
134
135
|
[Key in keyof Models]: {
|
|
135
136
|
[K in keyof Models[Key]['mutate']]: Models[Key]['mutate'][K] extends (
|
|
136
137
|
ctx: MutatorContext,
|
|
137
|
-
arg: infer Arg
|
|
138
|
+
arg: infer Arg
|
|
138
139
|
) => any
|
|
139
140
|
? (arg: Arg, options?: MutateOptions) => Promise<void>
|
|
140
141
|
: (options?: MutateOptions) => Promise<void>
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
export type ZeroServerActionsConfig<Action extends AsyncActionEnvelope> = {
|
|
146
|
+
// used by runtimes that can execute application effects locally.
|
|
147
|
+
execute(action: Action): void | Promise<void>
|
|
148
|
+
// when present, this is the selected route. failures do not fall back to
|
|
149
|
+
// local execution, which prevents an action from running twice.
|
|
150
|
+
dispatchRemote?(action: Action): void | Promise<void>
|
|
151
|
+
}
|
|
152
|
+
|
|
144
153
|
export type CreateZeroServerBindingsOptions<
|
|
145
154
|
Schema extends ZeroSchema,
|
|
146
155
|
Models extends GenericModels,
|
|
147
156
|
ServerActions extends Record<string, unknown>,
|
|
157
|
+
Action extends AsyncActionEnvelope = never,
|
|
148
158
|
> = {
|
|
149
159
|
schema: Schema
|
|
150
160
|
models: Models
|
|
151
161
|
createServerActions: () => ServerActions
|
|
162
|
+
actions?: ZeroServerActionsConfig<Action>
|
|
152
163
|
queries?: AnyQueryRegistry
|
|
153
164
|
mutations?: Record<string, Record<string, unknown>>
|
|
154
165
|
validateQuery?: ValidateQueryFn
|
|
@@ -165,7 +176,7 @@ export type ZeroServerBindings<
|
|
|
165
176
|
resolveQuery(
|
|
166
177
|
name: string,
|
|
167
178
|
args: readonly JsonValue[],
|
|
168
|
-
|
|
179
|
+
authData: AuthData | null
|
|
169
180
|
): Promise<JsonValue>
|
|
170
181
|
transformQueryRequest(options: {
|
|
171
182
|
authData: AuthData | null
|
|
@@ -174,12 +185,12 @@ export type ZeroServerBindings<
|
|
|
174
185
|
server(executor: ZeroServerExecutor<Schema>): {
|
|
175
186
|
mutate: ServerMutate<Models>
|
|
176
187
|
transaction<Value>(
|
|
177
|
-
|
|
178
|
-
work: (tx: Transaction) => Value | Promise<Value
|
|
188
|
+
authData: AuthData | null,
|
|
189
|
+
work: (tx: Transaction) => Value | Promise<Value>
|
|
179
190
|
): Promise<Value>
|
|
180
191
|
query<Result>(
|
|
181
|
-
|
|
182
|
-
work: (q: QueryBuilder) => Query<any, Schema, Result
|
|
192
|
+
authData: AuthData | null,
|
|
193
|
+
work: (q: QueryBuilder) => Query<any, Schema, Result>
|
|
183
194
|
): Promise<HumanReadable<Result>>
|
|
184
195
|
}
|
|
185
196
|
}
|
|
@@ -188,8 +199,9 @@ export function createZeroServerBindings<
|
|
|
188
199
|
Schema extends ZeroSchema,
|
|
189
200
|
Models extends GenericModels,
|
|
190
201
|
ServerActions extends Record<string, unknown>,
|
|
202
|
+
Action extends AsyncActionEnvelope = never,
|
|
191
203
|
>(
|
|
192
|
-
options: CreateZeroServerBindingsOptions<Schema, Models, ServerActions
|
|
204
|
+
options: CreateZeroServerBindingsOptions<Schema, Models, ServerActions, Action>
|
|
193
205
|
): ZeroServerBindings<Schema, Models> {
|
|
194
206
|
setSchema(options.schema, createBuilder(options.schema))
|
|
195
207
|
setEnvironment('server')
|
|
@@ -206,6 +218,17 @@ export function createZeroServerBindings<
|
|
|
206
218
|
authData: AuthData | null
|
|
207
219
|
ctx: Parameters<ZeroServerMutatorRegistry<Schema>[string]>[0]['ctx']
|
|
208
220
|
}>()
|
|
221
|
+
const executeAction = options.actions
|
|
222
|
+
? (options.actions.dispatchRemote ?? options.actions.execute)
|
|
223
|
+
: null
|
|
224
|
+
const enqueueTask: NonNullable<MutatorContext['server']>['enqueueTask'] = (
|
|
225
|
+
task,
|
|
226
|
+
taskOptions
|
|
227
|
+
) => {
|
|
228
|
+
const current = invocation.get()
|
|
229
|
+
if (!current) throw new Error('on-zero task scheduled outside a server mutation')
|
|
230
|
+
current.ctx.defer(() => runWithAuthScope(current.authData, task), taskOptions)
|
|
231
|
+
}
|
|
209
232
|
const decoratedMutators = createMutators({
|
|
210
233
|
authData: null,
|
|
211
234
|
can: permissions.can,
|
|
@@ -223,10 +246,12 @@ export function createZeroServerBindings<
|
|
|
223
246
|
}
|
|
224
247
|
: undefined,
|
|
225
248
|
resolveAuthData: () => invocation.get()?.authData ?? null,
|
|
226
|
-
enqueueTask
|
|
227
|
-
|
|
228
|
-
if (!
|
|
229
|
-
|
|
249
|
+
enqueueTask,
|
|
250
|
+
enqueueAction(action, actionOptions) {
|
|
251
|
+
if (!executeAction) {
|
|
252
|
+
throw new Error(`on-zero async actions are not configured`)
|
|
253
|
+
}
|
|
254
|
+
enqueueTask(() => Promise.resolve(executeAction(action as Action)), actionOptions)
|
|
230
255
|
},
|
|
231
256
|
}) as Record<string, Record<string, (tx: Transaction, args: unknown) => Promise<void>>>
|
|
232
257
|
|
|
@@ -239,7 +264,7 @@ export function createZeroServerBindings<
|
|
|
239
264
|
throw new Error(`unknown on-zero mutator: ${modelName}|${mutatorName}`)
|
|
240
265
|
try {
|
|
241
266
|
await invocation.run({ authData, ctx }, () =>
|
|
242
|
-
mutation(tx as unknown as Transaction, args)
|
|
267
|
+
mutation(tx as unknown as Transaction, args)
|
|
243
268
|
)
|
|
244
269
|
} catch (error) {
|
|
245
270
|
const name = (error as { name?: unknown })?.name
|
|
@@ -255,11 +280,10 @@ export function createZeroServerBindings<
|
|
|
255
280
|
// freezing the registry makes the server seam immutable without importing
|
|
256
281
|
// any particular executor implementation.
|
|
257
282
|
mutators: Object.freeze({ ...registry }),
|
|
258
|
-
async resolveQuery(name, args,
|
|
283
|
+
async resolveQuery(name, args, authData) {
|
|
259
284
|
if (!options.queries) {
|
|
260
285
|
throw new Error('No queries registered with createZeroServerBindings.')
|
|
261
286
|
}
|
|
262
|
-
const authData = mapClaims(claims)
|
|
263
287
|
const query = await runWithQueryContext({ authData }, () =>
|
|
264
288
|
resolveServerQuery({
|
|
265
289
|
authData,
|
|
@@ -268,7 +292,7 @@ export function createZeroServerBindings<
|
|
|
268
292
|
queries: options.queries!,
|
|
269
293
|
permissions,
|
|
270
294
|
validateQuery: options.validateQuery,
|
|
271
|
-
})
|
|
295
|
+
})
|
|
272
296
|
)
|
|
273
297
|
return asQueryInternals(query as never).ast as JsonValue
|
|
274
298
|
},
|
|
@@ -295,18 +319,19 @@ export function createZeroServerBindings<
|
|
|
295
319
|
schema: options.schema,
|
|
296
320
|
request,
|
|
297
321
|
userID,
|
|
298
|
-
})
|
|
322
|
+
})
|
|
299
323
|
)
|
|
300
324
|
},
|
|
301
325
|
server(executor) {
|
|
302
326
|
const transaction = <Value>(
|
|
303
|
-
|
|
304
|
-
work: (tx: Transaction) => Value | Promise<Value
|
|
305
|
-
) =>
|
|
327
|
+
authData: AuthData | null,
|
|
328
|
+
work: (tx: Transaction) => Value | Promise<Value>
|
|
329
|
+
) =>
|
|
330
|
+
executor.transaction(authToClaims(authData), (tx) =>
|
|
331
|
+
work(tx as unknown as Transaction)
|
|
332
|
+
)
|
|
306
333
|
|
|
307
|
-
setRunner((query) =>
|
|
308
|
-
transaction({ userID: 'server' }, (tx) => tx.run(query as never)),
|
|
309
|
-
)
|
|
334
|
+
setRunner((query) => transaction(null, (tx) => tx.run(query as never)))
|
|
310
335
|
|
|
311
336
|
const mutate = new Proxy({} as ServerMutate<Models>, {
|
|
312
337
|
get(_target, modelName: string) {
|
|
@@ -319,7 +344,7 @@ export function createZeroServerBindings<
|
|
|
319
344
|
typeof handler === 'function' && handler.length > 1
|
|
320
345
|
return (
|
|
321
346
|
argsOrOptions: JsonValue | MutateOptions,
|
|
322
|
-
optionsForArgument?: MutateOptions
|
|
347
|
+
optionsForArgument?: MutateOptions
|
|
323
348
|
) => {
|
|
324
349
|
const args = acceptsArgument ? (argsOrOptions as JsonValue) : null
|
|
325
350
|
const mutateOptions = acceptsArgument
|
|
@@ -330,7 +355,7 @@ export function createZeroServerBindings<
|
|
|
330
355
|
return executor.execute(`${modelName}|${mutatorName}`, args, claims)
|
|
331
356
|
}
|
|
332
357
|
},
|
|
333
|
-
}
|
|
358
|
+
}
|
|
334
359
|
)
|
|
335
360
|
},
|
|
336
361
|
})
|
|
@@ -339,11 +364,13 @@ export function createZeroServerBindings<
|
|
|
339
364
|
mutate,
|
|
340
365
|
transaction,
|
|
341
366
|
query<Result>(
|
|
342
|
-
|
|
343
|
-
work: (q: QueryBuilder) => Query<any, Schema, Result
|
|
367
|
+
authData: AuthData | null,
|
|
368
|
+
work: (q: QueryBuilder) => Query<any, Schema, Result>
|
|
344
369
|
) {
|
|
345
|
-
return runWithQueryContext({ authData
|
|
346
|
-
executor.query(
|
|
370
|
+
return runWithQueryContext({ authData }, () =>
|
|
371
|
+
executor.query(authToClaims(authData), (tx) =>
|
|
372
|
+
tx.run(work(getZQL()) as never)
|
|
373
|
+
)
|
|
347
374
|
) as Promise<HumanReadable<Result>>
|
|
348
375
|
},
|
|
349
376
|
}
|
|
@@ -378,7 +405,7 @@ function resolveServerQuery({
|
|
|
378
405
|
try {
|
|
379
406
|
return (getZQL() as any)[table]
|
|
380
407
|
.where((eb: any) =>
|
|
381
|
-
permissions.buildPermissionQuery(authData, eb, permission, objOrId, table)
|
|
408
|
+
permissions.buildPermissionQuery(authData, eb, permission, objOrId, table)
|
|
382
409
|
)
|
|
383
410
|
.one()
|
|
384
411
|
} finally {
|
|
@@ -396,9 +423,9 @@ function resolveServerQuery({
|
|
|
396
423
|
// authData and walk straight through `ensure(authData)` guards.
|
|
397
424
|
const AUTH_CLAIM = 'authData'
|
|
398
425
|
|
|
399
|
-
|
|
426
|
+
function authDataToClaims(
|
|
400
427
|
authData: AuthData | null | undefined,
|
|
401
|
-
anonymousUserID = 'anon'
|
|
428
|
+
anonymousUserID = 'anon'
|
|
402
429
|
): NormalizedClaims {
|
|
403
430
|
const userID = typeof authData?.id === 'string' ? authData.id : anonymousUserID
|
|
404
431
|
const claims: Record<string, JsonValue> = { userID }
|
package/src/serverWhere.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Condition } from '@rocicorp/zero'
|
|
|
5
5
|
|
|
6
6
|
export function serverWhere<Table extends TableName, Builder extends Where<Table>>(
|
|
7
7
|
tableName: Table,
|
|
8
|
-
builder: Builder
|
|
8
|
+
builder: Builder
|
|
9
9
|
): Where<Table, Condition>
|
|
10
10
|
|
|
11
11
|
export function serverWhere<
|
|
@@ -15,7 +15,7 @@ export function serverWhere<
|
|
|
15
15
|
|
|
16
16
|
export function serverWhere<Table extends TableName, Builder extends Where<Table>>(
|
|
17
17
|
a: Table | Builder,
|
|
18
|
-
b?: Builder
|
|
18
|
+
b?: Builder
|
|
19
19
|
): Where<Table, any> | Builder {
|
|
20
20
|
return where(a as any, b as any, true)
|
|
21
21
|
}
|
package/src/state.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { globalValue } from '@take-out/helpers'
|
|
1
|
+
import { globalValue } from './helpers/globalValue'
|
|
3
2
|
|
|
4
3
|
import type { AuthData, QueryBuilder } from './types'
|
|
4
|
+
import type { Schema, SchemaQuery } from '@rocicorp/zero'
|
|
5
5
|
|
|
6
6
|
type State = {
|
|
7
7
|
schema: Schema | null
|
package/src/types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { NullToOptional } from './helpers/NullToOptional'
|
|
2
|
+
import type { TupleToUnion } from './helpers/tuple'
|
|
1
3
|
import type {
|
|
2
4
|
Condition,
|
|
3
5
|
ExpressionBuilder,
|
|
@@ -7,7 +9,6 @@ import type {
|
|
|
7
9
|
Schema as ZeroSchema,
|
|
8
10
|
Transaction as ZeroTransaction,
|
|
9
11
|
} from '@rocicorp/zero'
|
|
10
|
-
import type { NullToOptional, TupleToUnion } from '@take-out/helpers'
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* ➗0️⃣ START OVERRIDDEN TYPES
|
|
@@ -35,6 +36,7 @@ interface DefaultConfig {
|
|
|
35
36
|
schema: ZeroSchema
|
|
36
37
|
authData: {}
|
|
37
38
|
serverActions: null
|
|
39
|
+
asyncAction: never
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
interface FinalConfig extends Omit<DefaultConfig, keyof Config>, Config {}
|
|
@@ -58,6 +60,15 @@ export type ServerActions =
|
|
|
58
60
|
? FinalConfig['serverActions']
|
|
59
61
|
: Record<string, unknown>
|
|
60
62
|
|
|
63
|
+
export type AsyncActionEnvelope = {
|
|
64
|
+
readonly type: string
|
|
65
|
+
readonly [field: string]: unknown
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type AsyncAction = FinalConfig['asyncAction'] extends AsyncActionEnvelope
|
|
69
|
+
? FinalConfig['asyncAction']
|
|
70
|
+
: never
|
|
71
|
+
|
|
61
72
|
export type QueryBuilder = SchemaQuery<Schema>
|
|
62
73
|
|
|
63
74
|
export type AsyncTask = () => Promise<void>
|
|
@@ -87,6 +98,7 @@ export type MutatorContext = {
|
|
|
87
98
|
* through a new instance. Barrier tasks finish before the push response.
|
|
88
99
|
*/
|
|
89
100
|
enqueueTask(task: AsyncTask, opts?: AsyncTaskOptions): void
|
|
101
|
+
enqueueAction(action: AsyncAction, opts?: AsyncTaskOptions): void
|
|
90
102
|
}
|
|
91
103
|
can: Can
|
|
92
104
|
}
|
|
@@ -119,12 +131,12 @@ export type Where<
|
|
|
119
131
|
ReturnType extends Condition | boolean = Condition | boolean,
|
|
120
132
|
> = (
|
|
121
133
|
expressionBuilder: ExpressionBuilder<Table, Schema>,
|
|
122
|
-
auth?: AuthData | null
|
|
134
|
+
auth?: AuthData | null
|
|
123
135
|
) => ReturnType
|
|
124
136
|
|
|
125
137
|
export type Can = <PWhere extends Where>(
|
|
126
138
|
where: PWhere,
|
|
127
|
-
obj: string | Record<string, unknown
|
|
139
|
+
obj: string | Record<string, unknown>
|
|
128
140
|
) => Promise<void>
|
|
129
141
|
|
|
130
142
|
type GenericTable = TableBuilderWithColumns<any>
|
|
@@ -149,11 +161,40 @@ export type TablePrimaryKeys<TS extends GenericTable> = TupleToUnion<
|
|
|
149
161
|
>
|
|
150
162
|
|
|
151
163
|
export type ZeroEvent =
|
|
152
|
-
| {
|
|
164
|
+
| {
|
|
165
|
+
type: 'error'
|
|
166
|
+
reasonKey: 'connection-error' | 'connection-needs-auth'
|
|
167
|
+
message: string
|
|
168
|
+
}
|
|
153
169
|
// recovery lifecycle: 'recovering' = dropping local state + reloading;
|
|
154
170
|
// 'fatal' = recovery already attempted (loop guard tripped), not reloading.
|
|
155
|
-
| { type: 'recovering'; reason: string }
|
|
156
|
-
| { type: 'fatal'; reason: string }
|
|
171
|
+
| { type: 'recovering'; reasonKey: ZeroRecoveryReasonKey; reason: string }
|
|
172
|
+
| { type: 'fatal'; reasonKey: ZeroRecoveryReasonKey; reason: string }
|
|
173
|
+
|
|
174
|
+
export type ZeroEventsEmitter = {
|
|
175
|
+
value: ZeroEvent | null
|
|
176
|
+
options?: {
|
|
177
|
+
name: string
|
|
178
|
+
silent?: boolean
|
|
179
|
+
comparator?: (a: ZeroEvent | null, b: ZeroEvent | null) => boolean
|
|
180
|
+
}
|
|
181
|
+
listen: (listener: (value: ZeroEvent | null) => void) => () => void
|
|
182
|
+
emit: (next: ZeroEvent | null) => void
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type ZeroRecoveryReasonKey =
|
|
186
|
+
| 'NewClientGroup'
|
|
187
|
+
| 'VersionNotSupported'
|
|
188
|
+
| 'SchemaVersionNotSupported'
|
|
189
|
+
| 'client-state-not-found'
|
|
190
|
+
| 'indexeddb-not-found'
|
|
191
|
+
| 'sqlite-statement-finalized'
|
|
192
|
+
| 'store-closed-repeat'
|
|
193
|
+
| 'mutation-desync'
|
|
194
|
+
| 'connection-cookie-invalid'
|
|
195
|
+
| 'client-not-found'
|
|
196
|
+
| 'connection-userid-mismatch'
|
|
197
|
+
| 'server-ack-timeout'
|
|
157
198
|
|
|
158
199
|
/**
|
|
159
200
|
* Admin role bypass for permissions:
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
import { createSchema, number, string, table } from '@rocicorp/zero'
|
|
10
10
|
import { useQuery as useRawZeroQuery } from '@rocicorp/zero/react'
|
|
11
|
-
import { IS_SERVER, IS_SERVER_RUNTIME } from '@take-out/helpers'
|
|
12
11
|
import { act } from 'react'
|
|
13
12
|
import { createRoot, type Root } from 'react-dom/client'
|
|
14
13
|
import { afterEach, beforeEach, expect, test } from 'vitest'
|
|
15
14
|
|
|
16
15
|
import { createZeroClient } from './createZeroClient'
|
|
16
|
+
import { IS_SERVER, IS_SERVER_RUNTIME } from './helpers/platform'
|
|
17
17
|
import { zql } from './zql'
|
|
18
18
|
|
|
19
19
|
declare global {
|
|
@@ -32,7 +32,7 @@ const schema = createSchema({ tables: [todoTable] })
|
|
|
32
32
|
const allTodos = (_args: void) =>
|
|
33
33
|
(zql as unknown as { todo: { orderBy: (k: string, d: string) => any } }).todo.orderBy(
|
|
34
34
|
'createdAt',
|
|
35
|
-
'desc'
|
|
35
|
+
'desc'
|
|
36
36
|
)
|
|
37
37
|
const oneTodo = (args: { id: string }) =>
|
|
38
38
|
(zql as unknown as { todo: { where: (k: string, v: string) => any } }).todo
|
|
@@ -73,7 +73,7 @@ function renderWithDisabled<T>(useHook: () => T): T {
|
|
|
73
73
|
root.render(
|
|
74
74
|
<client.ProvideZero authData={{}} userID="anon" disable>
|
|
75
75
|
<Probe />
|
|
76
|
-
</client.ProvideZero
|
|
76
|
+
</client.ProvideZero>
|
|
77
77
|
)
|
|
78
78
|
})
|
|
79
79
|
if (captured === undefined) throw new Error('Probe did not render')
|
package/src/useQuery.ssr.test.ts
CHANGED
|
@@ -29,7 +29,7 @@ const schema = createSchema({ tables: [todoTable] })
|
|
|
29
29
|
const allTodos = (_args: void) =>
|
|
30
30
|
(zql as unknown as { todo: { orderBy: (k: string, d: string) => any } }).todo.orderBy(
|
|
31
31
|
'createdAt',
|
|
32
|
-
'desc'
|
|
32
|
+
'desc'
|
|
33
33
|
)
|
|
34
34
|
const oneTodo = (args: { id: string }) =>
|
|
35
35
|
(zql as unknown as { todo: { where: (k: string, v: string) => any } }).todo
|
package/src/vite-plugin.ts
CHANGED
|
@@ -13,8 +13,9 @@ export interface OnZeroPluginOptions extends Omit<GenerateOptions, 'dir' | 'sile
|
|
|
13
13
|
disableGenerate?: boolean
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
function createOnZeroHmrPlugin(hmrInclude: string[] = []): Plugin {
|
|
17
|
-
const
|
|
16
|
+
function createOnZeroHmrPlugin(hmrInclude: string[] = [], dataDir = 'src/data'): Plugin {
|
|
17
|
+
const normalizedDataDir = `/${dataDir.replaceAll('\\', '/').replace(/^\/+|\/+$/g, '')}/`
|
|
18
|
+
const hmrPaths = [normalizedDataDir, ...hmrInclude]
|
|
18
19
|
|
|
19
20
|
return {
|
|
20
21
|
name: 'on-zero:hmr',
|
|
@@ -30,7 +31,7 @@ function createOnZeroHmrPlugin(hmrInclude: string[] = []): Plugin {
|
|
|
30
31
|
if (code.includes('import.meta.hot.invalidate')) {
|
|
31
32
|
transformed = transformed.replace(
|
|
32
33
|
/if\s*\(invalidateMessage\)\s*import\.meta\.hot\.invalidate\(invalidateMessage\);?/g,
|
|
33
|
-
'/* on-zero: HMR invalidate disabled */'
|
|
34
|
+
'/* on-zero: HMR invalidate disabled */'
|
|
34
35
|
)
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -54,8 +55,7 @@ export function onZeroPlugin(options: OnZeroPluginOptions = {}): Plugin[] {
|
|
|
54
55
|
const dir = options.dir ?? 'src/data'
|
|
55
56
|
|
|
56
57
|
let dataDir: string
|
|
57
|
-
let
|
|
58
|
-
let queriesDir: string
|
|
58
|
+
let databaseDir: string
|
|
59
59
|
|
|
60
60
|
const runGenerate = (silent: boolean) =>
|
|
61
61
|
generate({
|
|
@@ -72,8 +72,7 @@ export function onZeroPlugin(options: OnZeroPluginOptions = {}): Plugin[] {
|
|
|
72
72
|
|
|
73
73
|
configResolved(config) {
|
|
74
74
|
dataDir = resolve(config.root, dir)
|
|
75
|
-
|
|
76
|
-
queriesDir = resolve(dataDir, 'queries')
|
|
75
|
+
databaseDir = resolve(dataDir, '../database')
|
|
77
76
|
},
|
|
78
77
|
|
|
79
78
|
async buildStart() {
|
|
@@ -85,7 +84,11 @@ export function onZeroPlugin(options: OnZeroPluginOptions = {}): Plugin[] {
|
|
|
85
84
|
|
|
86
85
|
const handler = async (file: string) => {
|
|
87
86
|
if (!/\.tsx?$/.test(file)) return
|
|
88
|
-
if (
|
|
87
|
+
if (
|
|
88
|
+
(isWithinDirectory(file, dataDir) &&
|
|
89
|
+
!isWithinDirectory(file, resolve(dataDir, 'generated'))) ||
|
|
90
|
+
isWithinDirectory(file, databaseDir)
|
|
91
|
+
) {
|
|
89
92
|
await runGenerate(false)
|
|
90
93
|
}
|
|
91
94
|
}
|
|
@@ -109,7 +112,7 @@ export function onZeroPlugin(options: OnZeroPluginOptions = {}): Plugin[] {
|
|
|
109
112
|
},
|
|
110
113
|
},
|
|
111
114
|
|
|
112
|
-
createOnZeroHmrPlugin(options.hmrInclude),
|
|
115
|
+
createOnZeroHmrPlugin(options.hmrInclude, dir),
|
|
113
116
|
]
|
|
114
117
|
}
|
|
115
118
|
|
package/src/where.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { globalValue } from '@take-out/helpers'
|
|
2
|
-
|
|
3
1
|
import { getAuth } from './helpers/getAuth'
|
|
2
|
+
import { globalValue } from './helpers/globalValue'
|
|
4
3
|
import { getEnvironment } from './state'
|
|
5
4
|
|
|
6
5
|
import type { TableName, Where } from './types'
|
|
@@ -17,17 +16,17 @@ export function setEvaluatingPermission(value: boolean) {
|
|
|
17
16
|
export function where<Table extends TableName, Builder extends Where<Table>>(
|
|
18
17
|
tableName: Table,
|
|
19
18
|
builder: Builder,
|
|
20
|
-
isServerOnly?: boolean
|
|
19
|
+
isServerOnly?: boolean
|
|
21
20
|
): Where<Table, Condition>
|
|
22
21
|
|
|
23
22
|
export function where<Table extends TableName, Builder extends Where = Where<Table>>(
|
|
24
|
-
builder: Builder
|
|
23
|
+
builder: Builder
|
|
25
24
|
): Where<Table, Condition>
|
|
26
25
|
|
|
27
26
|
export function where<Table extends TableName, Builder extends Where<Table>>(
|
|
28
27
|
a: Table | Builder,
|
|
29
28
|
b?: Builder,
|
|
30
|
-
isServerOnly = false
|
|
29
|
+
isServerOnly = false
|
|
31
30
|
): Where<Table, any> | Builder {
|
|
32
31
|
const whereFn = (b || a) as any
|
|
33
32
|
|
|
@@ -62,12 +61,12 @@ export function where<Table extends TableName, Builder extends Where<Table>>(
|
|
|
62
61
|
|
|
63
62
|
const WhereTableNameMap = globalValue(
|
|
64
63
|
`on-zero:where-name`,
|
|
65
|
-
() => new WeakMap<Where, TableName>()
|
|
64
|
+
() => new WeakMap<Where, TableName>()
|
|
66
65
|
)
|
|
67
66
|
|
|
68
67
|
const WhereRawBuilderMap = globalValue(
|
|
69
68
|
`on-zero:where-raw`,
|
|
70
|
-
() => new WeakMap<Where, Where>()
|
|
69
|
+
() => new WeakMap<Where, Where>()
|
|
71
70
|
)
|
|
72
71
|
|
|
73
72
|
export function getWhereTableName(where: Where) {
|
package/src/zeroRunner.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type { RunOptions }
|
|
|
11
11
|
|
|
12
12
|
export type ZeroRunner = <TReturn>(
|
|
13
13
|
query: Query<any, ZeroSchema, TReturn>,
|
|
14
|
-
options?: RunOptions
|
|
14
|
+
options?: RunOptions
|
|
15
15
|
) => Promise<HumanReadable<TReturn>>
|
|
16
16
|
|
|
17
17
|
let runner: ZeroRunner | null = null
|
|
@@ -37,7 +37,7 @@ export function getAmbientRunner(instance?: { runner: ZeroRunner | null }): Zero
|
|
|
37
37
|
|
|
38
38
|
if (!runner) {
|
|
39
39
|
throw new Error(
|
|
40
|
-
'Zero runner not initialized. Ensure ProvideZero is mounted or server bindings are active.'
|
|
40
|
+
'Zero runner not initialized. Ensure ProvideZero is mounted or server bindings are active.'
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type Emitter } from '@take-out/helpers';
|
|
2
1
|
import { run } from './run';
|
|
3
|
-
import type {
|
|
2
|
+
import type { ZeroEventsEmitter } from './types';
|
|
4
3
|
import type { ReactNode } from 'react';
|
|
5
4
|
type ControlQueriesProps = {
|
|
6
5
|
children: ReactNode;
|
|
@@ -16,21 +15,28 @@ type CombinableZeroClient = {
|
|
|
16
15
|
zero: any;
|
|
17
16
|
preload: (...args: any[]) => any;
|
|
18
17
|
getQuery: (...args: any[]) => any;
|
|
19
|
-
zeroEvents:
|
|
18
|
+
zeroEvents: ZeroEventsEmitter;
|
|
20
19
|
ControlQueries: (props: ControlQueriesProps) => ReactNode;
|
|
21
20
|
};
|
|
22
21
|
export type CombineZeroClientsOptions = {
|
|
23
22
|
inner?: string;
|
|
24
23
|
};
|
|
25
24
|
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
25
|
+
type WithoutMutate<Zero> = Zero extends unknown ? Omit<Zero, 'mutate'> : never;
|
|
26
|
+
type MutationsOf<Zero> = Zero extends {
|
|
27
|
+
mutate: infer Mutations;
|
|
28
|
+
} ? Mutations : never;
|
|
29
|
+
type CombinedZero<Clients extends readonly CombinableZeroClient[]> = UnionToIntersection<WithoutMutate<Clients[number]['zero']>> & {
|
|
30
|
+
mutate: UnionToIntersection<MutationsOf<Clients[number]['zero']>>;
|
|
31
|
+
};
|
|
26
32
|
export type CombinedZeroClients<Clients extends readonly CombinableZeroClient[]> = {
|
|
27
33
|
useQuery: UnionToIntersection<Clients[number]['useQuery']>;
|
|
28
34
|
usePermission: UnionToIntersection<Clients[number]['usePermission']>;
|
|
29
|
-
zero:
|
|
35
|
+
zero: CombinedZero<Clients>;
|
|
30
36
|
preload: UnionToIntersection<Clients[number]['preload']>;
|
|
31
37
|
getQuery: UnionToIntersection<Clients[number]['getQuery']>;
|
|
32
38
|
run: typeof run;
|
|
33
|
-
zeroEvents:
|
|
39
|
+
zeroEvents: ZeroEventsEmitter;
|
|
34
40
|
ControlQueries: (props: ControlQueriesProps) => ReactNode;
|
|
35
41
|
};
|
|
36
42
|
export declare function combineZeroClients<const Clients extends readonly [CombinableZeroClient, ...CombinableZeroClient[]]>(...clientsAndOptions: [...Clients] | [...Clients, CombineZeroClientsOptions]): CombinedZeroClients<Clients>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combineZeroClients.d.ts","sourceRoot":"","sources":["../src/combineZeroClients.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"combineZeroClients.d.ts","sourceRoot":"","sources":["../src/combineZeroClients.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAoBtC,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,YAAY,CAAC,EAAE,OAAO,GAAG,YAAY,CAAA;CACtC,CAAA;AAID,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACvC,aAAa,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACtC,mBAAmB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC5C,IAAI,EAAE,GAAG,CAAA;IACT,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAChC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,UAAU,EAAE,iBAAiB,CAAA;IAC7B,cAAc,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,SAAS,CAAA;CAC1D,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IAGtC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CAC7E,CAAC,EAAE,MAAM,CAAC,KACP,IAAI,GACL,CAAC,GACD,KAAK,CAAA;AAET,KAAK,aAAa,CAAC,IAAI,IAAI,IAAI,SAAS,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAA;AAC9E,KAAK,WAAW,CAAC,IAAI,IAAI,IAAI,SAAS;IAAE,MAAM,EAAE,MAAM,SAAS,CAAA;CAAE,GAAG,SAAS,GAAG,KAAK,CAAA;AAErF,KAAK,YAAY,CAAC,OAAO,SAAS,SAAS,oBAAoB,EAAE,IAAI,mBAAmB,CACtF,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CACvC,GAAG;IACF,MAAM,EAAE,mBAAmB,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CAClE,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,SAAS,oBAAoB,EAAE,IAAI;IACjF,QAAQ,EAAE,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;IAC1D,aAAa,EAAE,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAA;IACpE,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAC3B,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACxD,QAAQ,EAAE,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;IAC1D,GAAG,EAAE,OAAO,GAAG,CAAA;IACf,UAAU,EAAE,iBAAiB,CAAA;IAC7B,cAAc,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,SAAS,CAAA;CAC1D,CAAA;AAED,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,OAAO,SAAS,SAAS,CAAC,oBAAoB,EAAE,GAAG,oBAAoB,EAAE,CAAC,EAEhF,GAAG,iBAAiB,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE,yBAAyB,CAAC,GAC3E,mBAAmB,CAAC,OAAO,CAAC,CA6G9B"}
|