pyric 0.0.1 → 0.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +216 -0
- package/README.md +179 -2
- package/README.md.orig +54 -0
- package/dist/ai/backend.d.ts +35 -0
- package/dist/ai/backend.d.ts.map +1 -0
- package/dist/ai/backend.js +42 -0
- package/dist/ai/backend.js.map +1 -0
- package/dist/ai/broker/broker.d.ts +65 -0
- package/dist/ai/broker/broker.d.ts.map +1 -0
- package/dist/ai/broker/broker.js +184 -0
- package/dist/ai/broker/broker.js.map +1 -0
- package/dist/ai/broker/index.d.ts +12 -0
- package/dist/ai/broker/index.d.ts.map +1 -0
- package/dist/ai/broker/index.js +11 -0
- package/dist/ai/broker/index.js.map +1 -0
- package/dist/ai/broker/openai-engine.d.ts +175 -0
- package/dist/ai/broker/openai-engine.d.ts.map +1 -0
- package/dist/ai/broker/openai-engine.js +502 -0
- package/dist/ai/broker/openai-engine.js.map +1 -0
- package/dist/ai/broker/scripted-engine.d.ts +44 -0
- package/dist/ai/broker/scripted-engine.d.ts.map +1 -0
- package/dist/ai/broker/scripted-engine.js +218 -0
- package/dist/ai/broker/scripted-engine.js.map +1 -0
- package/dist/ai/broker/synthesizer.d.ts +100 -0
- package/dist/ai/broker/synthesizer.d.ts.map +1 -0
- package/dist/ai/broker/synthesizer.js +278 -0
- package/dist/ai/broker/synthesizer.js.map +1 -0
- package/dist/ai/broker/types.d.ts +210 -0
- package/dist/ai/broker/types.d.ts.map +1 -0
- package/dist/ai/broker/types.js +20 -0
- package/dist/ai/broker/types.js.map +1 -0
- package/dist/ai/enums.d.ts +174 -0
- package/dist/ai/enums.d.ts.map +1 -0
- package/dist/ai/enums.js +155 -0
- package/dist/ai/enums.js.map +1 -0
- package/dist/ai/errors.d.ts +66 -0
- package/dist/ai/errors.d.ts.map +1 -0
- package/dist/ai/errors.js +100 -0
- package/dist/ai/errors.js.map +1 -0
- package/dist/ai/index.d.ts +31 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +27 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/instances.d.ts +15 -0
- package/dist/ai/instances.d.ts.map +1 -0
- package/dist/ai/instances.js +69 -0
- package/dist/ai/instances.js.map +1 -0
- package/dist/ai/internal.d.ts +13 -0
- package/dist/ai/internal.d.ts.map +1 -0
- package/dist/ai/internal.js +45 -0
- package/dist/ai/internal.js.map +1 -0
- package/dist/ai/models.d.ts +116 -0
- package/dist/ai/models.d.ts.map +1 -0
- package/dist/ai/models.js +213 -0
- package/dist/ai/models.js.map +1 -0
- package/dist/ai/request-helpers.d.ts +59 -0
- package/dist/ai/request-helpers.d.ts.map +1 -0
- package/dist/ai/request-helpers.js +157 -0
- package/dist/ai/request-helpers.js.map +1 -0
- package/dist/ai/response-helpers.d.ts +41 -0
- package/dist/ai/response-helpers.d.ts.map +1 -0
- package/dist/ai/response-helpers.js +204 -0
- package/dist/ai/response-helpers.js.map +1 -0
- package/dist/ai/sandbox-plane.d.ts +41 -0
- package/dist/ai/sandbox-plane.d.ts.map +1 -0
- package/dist/ai/sandbox-plane.js +159 -0
- package/dist/ai/sandbox-plane.js.map +1 -0
- package/dist/ai/schema.d.ts +105 -0
- package/dist/ai/schema.d.ts.map +1 -0
- package/dist/ai/schema.js +174 -0
- package/dist/ai/schema.js.map +1 -0
- package/dist/ai/scripting.d.ts +53 -0
- package/dist/ai/scripting.d.ts.map +1 -0
- package/dist/ai/scripting.js +73 -0
- package/dist/ai/scripting.js.map +1 -0
- package/dist/ai/target.d.ts +20 -0
- package/dist/ai/target.d.ts.map +1 -0
- package/dist/ai/target.js +29 -0
- package/dist/ai/target.js.map +1 -0
- package/dist/ai/types.d.ts +400 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/types.js +10 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/app/diagnostics.d.ts +29 -0
- package/dist/app/diagnostics.d.ts.map +1 -0
- package/dist/app/diagnostics.js +88 -0
- package/dist/app/diagnostics.js.map +1 -0
- package/dist/app/index.d.ts +7 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +5 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/internal.d.ts +11 -0
- package/dist/app/internal.d.ts.map +1 -0
- package/dist/app/internal.js +18 -0
- package/dist/app/internal.js.map +1 -0
- package/dist/app/options.d.ts +3 -0
- package/dist/app/options.d.ts.map +1 -0
- package/dist/app/options.js +19 -0
- package/dist/app/options.js.map +1 -0
- package/dist/app/register.d.ts +4 -0
- package/dist/app/register.d.ts.map +1 -0
- package/dist/app/register.js +35 -0
- package/dist/app/register.js.map +1 -0
- package/dist/app/registry.d.ts +12 -0
- package/dist/app/registry.d.ts.map +1 -0
- package/dist/app/registry.js +147 -0
- package/dist/app/registry.js.map +1 -0
- package/dist/app/runtime.d.ts +18 -0
- package/dist/app/runtime.d.ts.map +1 -0
- package/dist/app/runtime.js +119 -0
- package/dist/app/runtime.js.map +1 -0
- package/dist/app/types.d.ts +21 -0
- package/dist/app/types.d.ts.map +1 -0
- package/dist/app/types.js +2 -0
- package/dist/app/types.js.map +1 -0
- package/dist/auth/action-code-url.d.ts +70 -0
- package/dist/auth/action-code-url.d.ts.map +1 -0
- package/dist/auth/action-code-url.js +124 -0
- package/dist/auth/action-code-url.js.map +1 -0
- package/dist/auth/action-codes.d.ts +201 -0
- package/dist/auth/action-codes.d.ts.map +1 -0
- package/dist/auth/action-codes.js +355 -0
- package/dist/auth/action-codes.js.map +1 -0
- package/dist/auth/auth-errors.d.ts +21 -0
- package/dist/auth/auth-errors.d.ts.map +1 -0
- package/dist/auth/auth-errors.js +23 -0
- package/dist/auth/auth-errors.js.map +1 -0
- package/dist/auth/config-tokens.d.ts +90 -0
- package/dist/auth/config-tokens.d.ts.map +1 -0
- package/dist/auth/config-tokens.js +86 -0
- package/dist/auth/config-tokens.js.map +1 -0
- package/dist/auth/credentials.d.ts +140 -0
- package/dist/auth/credentials.d.ts.map +1 -0
- package/dist/auth/credentials.js +194 -0
- package/dist/auth/credentials.js.map +1 -0
- package/dist/auth/email-link.d.ts +91 -0
- package/dist/auth/email-link.d.ts.map +1 -0
- package/dist/auth/email-link.js +172 -0
- package/dist/auth/email-link.js.map +1 -0
- package/dist/auth/enums.d.ts +210 -0
- package/dist/auth/enums.d.ts.map +1 -0
- package/dist/auth/enums.js +206 -0
- package/dist/auth/enums.js.map +1 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +3 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/instances.d.ts +14 -0
- package/dist/auth/instances.d.ts.map +1 -0
- package/dist/auth/instances.js +95 -0
- package/dist/auth/instances.js.map +1 -0
- package/dist/auth/linking.d.ts +93 -0
- package/dist/auth/linking.d.ts.map +1 -0
- package/dist/auth/linking.js +189 -0
- package/dist/auth/linking.js.map +1 -0
- package/dist/auth/modular.d.ts +22 -0
- package/dist/auth/modular.d.ts.map +1 -0
- package/dist/auth/modular.js +18 -0
- package/dist/auth/modular.js.map +1 -0
- package/dist/auth/password-policy.d.ts +60 -0
- package/dist/auth/password-policy.d.ts.map +1 -0
- package/dist/auth/password-policy.js +68 -0
- package/dist/auth/password-policy.js.map +1 -0
- package/dist/auth/providers.d.ts +153 -0
- package/dist/auth/providers.d.ts.map +1 -0
- package/dist/auth/providers.js +207 -0
- package/dist/auth/providers.js.map +1 -0
- package/dist/auth/reauth.d.ts +73 -0
- package/dist/auth/reauth.d.ts.map +1 -0
- package/dist/auth/reauth.js +148 -0
- package/dist/auth/reauth.js.map +1 -0
- package/dist/auth/sandbox/driver.d.ts +51 -0
- package/dist/auth/sandbox/driver.d.ts.map +1 -0
- package/dist/auth/sandbox/driver.js +88 -0
- package/dist/auth/sandbox/driver.js.map +1 -0
- package/dist/auth/sandbox/persistence.d.ts +7 -0
- package/dist/auth/sandbox/persistence.d.ts.map +1 -0
- package/dist/auth/sandbox/persistence.js +121 -0
- package/dist/auth/sandbox/persistence.js.map +1 -0
- package/dist/auth/sandbox/project-store.d.ts +15 -0
- package/dist/auth/sandbox/project-store.d.ts.map +1 -0
- package/dist/auth/sandbox/project-store.js +17 -0
- package/dist/auth/sandbox/project-store.js.map +1 -0
- package/dist/auth/sandbox-auth-flow.d.ts +173 -0
- package/dist/auth/sandbox-auth-flow.d.ts.map +1 -0
- package/dist/auth/sandbox-auth-flow.js +165 -0
- package/dist/auth/sandbox-auth-flow.js.map +1 -0
- package/dist/auth/sandbox-backend-types.d.ts +197 -0
- package/dist/auth/sandbox-backend-types.d.ts.map +1 -0
- package/dist/auth/sandbox-backend-types.js +18 -0
- package/dist/auth/sandbox-backend-types.js.map +1 -0
- package/dist/auth/sandbox-backend.d.ts +811 -0
- package/dist/auth/sandbox-backend.d.ts.map +1 -0
- package/dist/auth/sandbox-backend.js +2007 -0
- package/dist/auth/sandbox-backend.js.map +1 -0
- package/dist/auth/sandbox-credential-validators.d.ts +30 -0
- package/dist/auth/sandbox-credential-validators.d.ts.map +1 -0
- package/dist/auth/sandbox-credential-validators.js +47 -0
- package/dist/auth/sandbox-credential-validators.js.map +1 -0
- package/dist/auth/sandbox-token.d.ts +24 -0
- package/dist/auth/sandbox-token.d.ts.map +1 -0
- package/dist/auth/sandbox-token.js +32 -0
- package/dist/auth/sandbox-token.js.map +1 -0
- package/dist/auth/sign-in.d.ts +14 -0
- package/dist/auth/sign-in.d.ts.map +1 -0
- package/dist/auth/sign-in.js +140 -0
- package/dist/auth/sign-in.js.map +1 -0
- package/dist/auth/target.d.ts +29 -0
- package/dist/auth/target.d.ts.map +1 -0
- package/dist/auth/target.js +23 -0
- package/dist/auth/target.js.map +1 -0
- package/dist/auth/tokens.d.ts +54 -0
- package/dist/auth/tokens.d.ts.map +1 -0
- package/dist/auth/tokens.js +142 -0
- package/dist/auth/tokens.js.map +1 -0
- package/dist/auth/types.d.ts +283 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +24 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/auth/user-lifecycle.d.ts +17 -0
- package/dist/auth/user-lifecycle.d.ts.map +1 -0
- package/dist/auth/user-lifecycle.js +60 -0
- package/dist/auth/user-lifecycle.js.map +1 -0
- package/dist/database/index.d.ts +9 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +9 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/listener-registry.d.ts +16 -0
- package/dist/database/listener-registry.d.ts.map +1 -0
- package/dist/database/listener-registry.js +68 -0
- package/dist/database/listener-registry.js.map +1 -0
- package/dist/database/modular.d.ts +632 -0
- package/dist/database/modular.d.ts.map +1 -0
- package/dist/database/modular.js +1071 -0
- package/dist/database/modular.js.map +1 -0
- package/dist/database/replay.d.ts +32 -0
- package/dist/database/replay.d.ts.map +1 -0
- package/dist/database/replay.js +124 -0
- package/dist/database/replay.js.map +1 -0
- package/dist/database/sandbox/backend-for.d.ts +10 -0
- package/dist/database/sandbox/backend-for.d.ts.map +1 -0
- package/dist/database/sandbox/backend-for.js +19 -0
- package/dist/database/sandbox/backend-for.js.map +1 -0
- package/dist/database/sandbox/backend.d.ts +407 -0
- package/dist/database/sandbox/backend.d.ts.map +1 -0
- package/dist/database/sandbox/backend.js +1495 -0
- package/dist/database/sandbox/backend.js.map +1 -0
- package/dist/database/sandbox/data-tree.d.ts +123 -0
- package/dist/database/sandbox/data-tree.d.ts.map +1 -0
- package/dist/database/sandbox/data-tree.js +310 -0
- package/dist/database/sandbox/data-tree.js.map +1 -0
- package/dist/database/sandbox/normalize.d.ts +77 -0
- package/dist/database/sandbox/normalize.d.ts.map +1 -0
- package/dist/database/sandbox/normalize.js +165 -0
- package/dist/database/sandbox/normalize.js.map +1 -0
- package/dist/database/sandbox/push-id.d.ts +32 -0
- package/dist/database/sandbox/push-id.d.ts.map +1 -0
- package/dist/database/sandbox/push-id.js +82 -0
- package/dist/database/sandbox/push-id.js.map +1 -0
- package/dist/database/sandbox/query.d.ts +175 -0
- package/dist/database/sandbox/query.d.ts.map +1 -0
- package/dist/database/sandbox/query.js +269 -0
- package/dist/database/sandbox/query.js.map +1 -0
- package/dist/database/sandbox/rules-eval.d.ts +87 -0
- package/dist/database/sandbox/rules-eval.d.ts.map +1 -0
- package/dist/database/sandbox/rules-eval.js +131 -0
- package/dist/database/sandbox/rules-eval.js.map +1 -0
- package/dist/database/sandbox/sentinels.d.ts +71 -0
- package/dist/database/sandbox/sentinels.d.ts.map +1 -0
- package/dist/database/sandbox/sentinels.js +92 -0
- package/dist/database/sandbox/sentinels.js.map +1 -0
- package/dist/database/sandbox-controls.d.ts +15 -0
- package/dist/database/sandbox-controls.d.ts.map +1 -0
- package/dist/database/sandbox-controls.js +18 -0
- package/dist/database/sandbox-controls.js.map +1 -0
- package/dist/firestore/aggregates.d.ts +50 -0
- package/dist/firestore/aggregates.d.ts.map +1 -0
- package/dist/firestore/aggregates.js +40 -0
- package/dist/firestore/aggregates.js.map +1 -0
- package/dist/firestore/equality.d.ts +5 -0
- package/dist/firestore/equality.d.ts.map +1 -0
- package/dist/firestore/equality.js +20 -0
- package/dist/firestore/equality.js.map +1 -0
- package/dist/firestore/field-values.d.ts +61 -0
- package/dist/firestore/field-values.d.ts.map +1 -0
- package/dist/firestore/field-values.js +167 -0
- package/dist/firestore/field-values.js.map +1 -0
- package/dist/firestore/index.d.ts +54 -0
- package/dist/firestore/index.d.ts.map +1 -0
- package/dist/firestore/index.js +54 -0
- package/dist/firestore/index.js.map +1 -0
- package/dist/firestore/instances.d.ts +123 -0
- package/dist/firestore/instances.d.ts.map +1 -0
- package/dist/firestore/instances.js +177 -0
- package/dist/firestore/instances.js.map +1 -0
- package/dist/firestore/internal/index.d.ts +2 -0
- package/dist/firestore/internal/index.d.ts.map +1 -0
- package/dist/firestore/internal/index.js +2 -0
- package/dist/firestore/internal/index.js.map +1 -0
- package/dist/firestore/internal/listener-routing.d.ts +4 -0
- package/dist/firestore/internal/listener-routing.d.ts.map +1 -0
- package/dist/firestore/internal/listener-routing.js +4 -0
- package/dist/firestore/internal/listener-routing.js.map +1 -0
- package/dist/firestore/listeners.d.ts +12 -0
- package/dist/firestore/listeners.d.ts.map +1 -0
- package/dist/firestore/listeners.js +200 -0
- package/dist/firestore/listeners.js.map +1 -0
- package/dist/firestore/persistence.d.ts +227 -0
- package/dist/firestore/persistence.d.ts.map +1 -0
- package/dist/firestore/persistence.js +245 -0
- package/dist/firestore/persistence.js.map +1 -0
- package/dist/firestore/query-constraints.d.ts +72 -0
- package/dist/firestore/query-constraints.d.ts.map +1 -0
- package/dist/firestore/query-constraints.js +168 -0
- package/dist/firestore/query-constraints.js.map +1 -0
- package/dist/firestore/reads.d.ts +12 -0
- package/dist/firestore/reads.d.ts.map +1 -0
- package/dist/firestore/reads.js +32 -0
- package/dist/firestore/reads.js.map +1 -0
- package/dist/firestore/refs.d.ts +27 -0
- package/dist/firestore/refs.d.ts.map +1 -0
- package/dist/firestore/refs.js +74 -0
- package/dist/firestore/refs.js.map +1 -0
- package/dist/firestore/sandbox-controls.d.ts +60 -0
- package/dist/firestore/sandbox-controls.d.ts.map +1 -0
- package/dist/firestore/sandbox-controls.js +77 -0
- package/dist/firestore/sandbox-controls.js.map +1 -0
- package/dist/firestore/snapshots.d.ts +71 -0
- package/dist/firestore/snapshots.d.ts.map +1 -0
- package/dist/firestore/snapshots.js +160 -0
- package/dist/firestore/snapshots.js.map +1 -0
- package/dist/firestore/state.d.ts +168 -0
- package/dist/firestore/state.d.ts.map +1 -0
- package/dist/firestore/state.js +260 -0
- package/dist/firestore/state.js.map +1 -0
- package/dist/firestore/tools.d.ts +71 -0
- package/dist/firestore/tools.d.ts.map +1 -0
- package/dist/firestore/tools.js +320 -0
- package/dist/firestore/tools.js.map +1 -0
- package/dist/firestore/transactions.d.ts +4 -0
- package/dist/firestore/transactions.d.ts.map +1 -0
- package/dist/firestore/transactions.js +14 -0
- package/dist/firestore/transactions.js.map +1 -0
- package/dist/firestore/types.d.ts +82 -0
- package/dist/firestore/types.d.ts.map +1 -0
- package/dist/firestore/types.js +15 -0
- package/dist/firestore/types.js.map +1 -0
- package/dist/firestore/writes.d.ts +43 -0
- package/dist/firestore/writes.d.ts.map +1 -0
- package/dist/firestore/writes.js +40 -0
- package/dist/firestore/writes.js.map +1 -0
- package/dist/firestore-values/index.d.ts +63 -0
- package/dist/firestore-values/index.d.ts.map +1 -0
- package/dist/firestore-values/index.js +148 -0
- package/dist/firestore-values/index.js.map +1 -0
- package/dist/messaging/broker/broker.d.ts +171 -0
- package/dist/messaging/broker/broker.d.ts.map +1 -0
- package/dist/messaging/broker/broker.js +400 -0
- package/dist/messaging/broker/broker.js.map +1 -0
- package/dist/messaging/broker/envelopes.d.ts +96 -0
- package/dist/messaging/broker/envelopes.d.ts.map +1 -0
- package/dist/messaging/broker/envelopes.js +132 -0
- package/dist/messaging/broker/envelopes.js.map +1 -0
- package/dist/messaging/broker/index.d.ts +27 -0
- package/dist/messaging/broker/index.d.ts.map +1 -0
- package/dist/messaging/broker/index.js +21 -0
- package/dist/messaging/broker/index.js.map +1 -0
- package/dist/messaging/broker/tokens.d.ts +22 -0
- package/dist/messaging/broker/tokens.d.ts.map +1 -0
- package/dist/messaging/broker/tokens.js +37 -0
- package/dist/messaging/broker/tokens.js.map +1 -0
- package/dist/messaging/broker/types.d.ts +117 -0
- package/dist/messaging/broker/types.d.ts.map +1 -0
- package/dist/messaging/broker/types.js +12 -0
- package/dist/messaging/broker/types.js.map +1 -0
- package/dist/messaging/broker/validate.d.ts +58 -0
- package/dist/messaging/broker/validate.d.ts.map +1 -0
- package/dist/messaging/broker/validate.js +196 -0
- package/dist/messaging/broker/validate.js.map +1 -0
- package/dist/messaging/client.d.ts +108 -0
- package/dist/messaging/client.d.ts.map +1 -0
- package/dist/messaging/client.js +65 -0
- package/dist/messaging/client.js.map +1 -0
- package/dist/messaging/index.d.ts +3 -0
- package/dist/messaging/index.d.ts.map +1 -0
- package/dist/messaging/index.js +3 -0
- package/dist/messaging/index.js.map +1 -0
- package/dist/messaging/instance.d.ts +72 -0
- package/dist/messaging/instance.d.ts.map +1 -0
- package/dist/messaging/instance.js +93 -0
- package/dist/messaging/instance.js.map +1 -0
- package/dist/messaging/internal.d.ts +12 -0
- package/dist/messaging/internal.d.ts.map +1 -0
- package/dist/messaging/internal.js +12 -0
- package/dist/messaging/internal.js.map +1 -0
- package/dist/messaging/sw.d.ts +49 -0
- package/dist/messaging/sw.d.ts.map +1 -0
- package/dist/messaging/sw.js +49 -0
- package/dist/messaging/sw.js.map +1 -0
- package/dist/project-scope.d.ts +5 -0
- package/dist/project-scope.d.ts.map +1 -0
- package/dist/project-scope.js +2 -0
- package/dist/project-scope.js.map +1 -0
- package/dist/rules/api/assert.d.ts +39 -0
- package/dist/rules/api/assert.d.ts.map +1 -0
- package/dist/rules/api/assert.js +93 -0
- package/dist/rules/api/assert.js.map +1 -0
- package/dist/rules/api/case-types.d.ts +141 -0
- package/dist/rules/api/case-types.d.ts.map +1 -0
- package/dist/rules/api/case-types.js +13 -0
- package/dist/rules/api/case-types.js.map +1 -0
- package/dist/rules/api/errors.d.ts +38 -0
- package/dist/rules/api/errors.d.ts.map +1 -0
- package/dist/rules/api/errors.js +47 -0
- package/dist/rules/api/errors.js.map +1 -0
- package/dist/rules/api/firestore.d.ts +34 -0
- package/dist/rules/api/firestore.d.ts.map +1 -0
- package/dist/rules/api/firestore.js +137 -0
- package/dist/rules/api/firestore.js.map +1 -0
- package/dist/rules/api/issue.d.ts +50 -0
- package/dist/rules/api/issue.d.ts.map +1 -0
- package/dist/rules/api/issue.js +66 -0
- package/dist/rules/api/issue.js.map +1 -0
- package/dist/rules/api/lint.d.ts +16 -0
- package/dist/rules/api/lint.d.ts.map +1 -0
- package/dist/rules/api/lint.js +60 -0
- package/dist/rules/api/lint.js.map +1 -0
- package/dist/rules/api/rtdb.d.ts +33 -0
- package/dist/rules/api/rtdb.d.ts.map +1 -0
- package/dist/rules/api/rtdb.js +166 -0
- package/dist/rules/api/rtdb.js.map +1 -0
- package/dist/rules/api/values.d.ts +51 -0
- package/dist/rules/api/values.d.ts.map +1 -0
- package/dist/rules/api/values.js +66 -0
- package/dist/rules/api/values.js.map +1 -0
- package/dist/rules/generators/assembler.d.ts +19 -0
- package/dist/rules/generators/assembler.d.ts.map +1 -0
- package/dist/rules/generators/assembler.js +292 -0
- package/dist/rules/generators/assembler.js.map +1 -0
- package/dist/rules/generators/expressions.d.ts +52 -0
- package/dist/rules/generators/expressions.d.ts.map +1 -0
- package/dist/rules/generators/expressions.js +117 -0
- package/dist/rules/generators/expressions.js.map +1 -0
- package/dist/rules/generators/grid.d.ts +22 -0
- package/dist/rules/generators/grid.d.ts.map +1 -0
- package/dist/rules/generators/grid.js +52 -0
- package/dist/rules/generators/grid.js.map +1 -0
- package/dist/rules/grammar/FirestoreAST.d.ts +129 -0
- package/dist/rules/grammar/FirestoreAST.d.ts.map +1 -0
- package/dist/rules/grammar/FirestoreAST.js +3 -0
- package/dist/rules/grammar/FirestoreAST.js.map +1 -0
- package/dist/rules/grammar/FirestoreAssembler.d.ts +5 -0
- package/dist/rules/grammar/FirestoreAssembler.d.ts.map +1 -0
- package/dist/rules/grammar/FirestoreAssembler.js +158 -0
- package/dist/rules/grammar/FirestoreAssembler.js.map +1 -0
- package/dist/rules/grammar/FirestoreParser.d.ts +46 -0
- package/dist/rules/grammar/FirestoreParser.d.ts.map +1 -0
- package/dist/rules/grammar/FirestoreParser.js +409 -0
- package/dist/rules/grammar/FirestoreParser.js.map +1 -0
- package/dist/rules/grammar/FirestoreRules.ohm +229 -0
- package/dist/rules/grammar/FirestoreRules.ohm.generated.d.ts +2 -0
- package/dist/rules/grammar/FirestoreRules.ohm.generated.d.ts.map +1 -0
- package/dist/rules/grammar/FirestoreRules.ohm.generated.js +234 -0
- package/dist/rules/grammar/FirestoreRules.ohm.generated.js.map +1 -0
- package/dist/rules/grammar/FirestoreValidator.d.ts +10 -0
- package/dist/rules/grammar/FirestoreValidator.d.ts.map +1 -0
- package/dist/rules/grammar/FirestoreValidator.js +482 -0
- package/dist/rules/grammar/FirestoreValidator.js.map +1 -0
- package/dist/rules/index.d.ts +41 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +40 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/indexes/extract/annotation-collect.d.ts +42 -0
- package/dist/rules/indexes/extract/annotation-collect.d.ts.map +1 -0
- package/dist/rules/indexes/extract/annotation-collect.js +69 -0
- package/dist/rules/indexes/extract/annotation-collect.js.map +1 -0
- package/dist/rules/indexes/extract/annotations.d.ts +50 -0
- package/dist/rules/indexes/extract/annotations.d.ts.map +1 -0
- package/dist/rules/indexes/extract/annotations.js +144 -0
- package/dist/rules/indexes/extract/annotations.js.map +1 -0
- package/dist/rules/indexes/extract/ast.d.ts +54 -0
- package/dist/rules/indexes/extract/ast.d.ts.map +1 -0
- package/dist/rules/indexes/extract/ast.js +119 -0
- package/dist/rules/indexes/extract/ast.js.map +1 -0
- package/dist/rules/indexes/extract/classify.d.ts +41 -0
- package/dist/rules/indexes/extract/classify.d.ts.map +1 -0
- package/dist/rules/indexes/extract/classify.js +138 -0
- package/dist/rules/indexes/extract/classify.js.map +1 -0
- package/dist/rules/indexes/extract/composite.d.ts +38 -0
- package/dist/rules/indexes/extract/composite.d.ts.map +1 -0
- package/dist/rules/indexes/extract/composite.js +85 -0
- package/dist/rules/indexes/extract/composite.js.map +1 -0
- package/dist/rules/indexes/extract/dataflow.d.ts +45 -0
- package/dist/rules/indexes/extract/dataflow.d.ts.map +1 -0
- package/dist/rules/indexes/extract/dataflow.js +200 -0
- package/dist/rules/indexes/extract/dataflow.js.map +1 -0
- package/dist/rules/indexes/extract/enumerate.d.ts +41 -0
- package/dist/rules/indexes/extract/enumerate.d.ts.map +1 -0
- package/dist/rules/indexes/extract/enumerate.js +163 -0
- package/dist/rules/indexes/extract/enumerate.js.map +1 -0
- package/dist/rules/indexes/extract/extractor.d.ts +3 -0
- package/dist/rules/indexes/extract/extractor.d.ts.map +1 -0
- package/dist/rules/indexes/extract/extractor.js +274 -0
- package/dist/rules/indexes/extract/extractor.js.map +1 -0
- package/dist/rules/indexes/extract/types.d.ts +211 -0
- package/dist/rules/indexes/extract/types.d.ts.map +1 -0
- package/dist/rules/indexes/extract/types.js +14 -0
- package/dist/rules/indexes/extract/types.js.map +1 -0
- package/dist/rules/indexes/extractHandler.d.ts +16 -0
- package/dist/rules/indexes/extractHandler.d.ts.map +1 -0
- package/dist/rules/indexes/extractHandler.js +100 -0
- package/dist/rules/indexes/extractHandler.js.map +1 -0
- package/dist/rules/indexes/extractTool.d.ts +15 -0
- package/dist/rules/indexes/extractTool.d.ts.map +1 -0
- package/dist/rules/indexes/extractTool.js +55 -0
- package/dist/rules/indexes/extractTool.js.map +1 -0
- package/dist/rules/indexes/types.d.ts +71 -0
- package/dist/rules/indexes/types.d.ts.map +1 -0
- package/dist/rules/indexes/types.js +15 -0
- package/dist/rules/indexes/types.js.map +1 -0
- package/dist/rules/inspect/handler.d.ts +6 -0
- package/dist/rules/inspect/handler.d.ts.map +1 -0
- package/dist/rules/inspect/handler.js +144 -0
- package/dist/rules/inspect/handler.js.map +1 -0
- package/dist/rules/inspect/spec.d.ts +37 -0
- package/dist/rules/inspect/spec.d.ts.map +1 -0
- package/dist/rules/inspect/spec.js +2 -0
- package/dist/rules/inspect/spec.js.map +1 -0
- package/dist/rules/inspect/tools.d.ts +21 -0
- package/dist/rules/inspect/tools.d.ts.map +1 -0
- package/dist/rules/inspect/tools.js +21 -0
- package/dist/rules/inspect/tools.js.map +1 -0
- package/dist/rules/internal/extract.d.ts +28 -0
- package/dist/rules/internal/extract.d.ts.map +1 -0
- package/dist/rules/internal/extract.js +25 -0
- package/dist/rules/internal/extract.js.map +1 -0
- package/dist/rules/internal/index.d.ts +82 -0
- package/dist/rules/internal/index.d.ts.map +1 -0
- package/dist/rules/internal/index.js +103 -0
- package/dist/rules/internal/index.js.map +1 -0
- package/dist/rules/internal/node.d.ts +18 -0
- package/dist/rules/internal/node.d.ts.map +1 -0
- package/dist/rules/internal/node.js +27 -0
- package/dist/rules/internal/node.js.map +1 -0
- package/dist/rules/internal/rtdb.d.ts +20 -0
- package/dist/rules/internal/rtdb.d.ts.map +1 -0
- package/dist/rules/internal/rtdb.js +15 -0
- package/dist/rules/internal/rtdb.js.map +1 -0
- package/dist/rules/linter/ast-utils.d.ts +97 -0
- package/dist/rules/linter/ast-utils.d.ts.map +1 -0
- package/dist/rules/linter/ast-utils.js +491 -0
- package/dist/rules/linter/ast-utils.js.map +1 -0
- package/dist/rules/linter/hallucinations.d.ts +34 -0
- package/dist/rules/linter/hallucinations.d.ts.map +1 -0
- package/dist/rules/linter/hallucinations.js +334 -0
- package/dist/rules/linter/hallucinations.js.map +1 -0
- package/dist/rules/linter/linter.d.ts +84 -0
- package/dist/rules/linter/linter.d.ts.map +1 -0
- package/dist/rules/linter/linter.js +783 -0
- package/dist/rules/linter/linter.js.map +1 -0
- package/dist/rules/modules/resolver-browser.d.ts +41 -0
- package/dist/rules/modules/resolver-browser.d.ts.map +1 -0
- package/dist/rules/modules/resolver-browser.js +63 -0
- package/dist/rules/modules/resolver-browser.js.map +1 -0
- package/dist/rules/modules/resolver-core.d.ts +51 -0
- package/dist/rules/modules/resolver-core.d.ts.map +1 -0
- package/dist/rules/modules/resolver-core.js +338 -0
- package/dist/rules/modules/resolver-core.js.map +1 -0
- package/dist/rules/modules/resolver.d.ts +17 -0
- package/dist/rules/modules/resolver.d.ts.map +1 -0
- package/dist/rules/modules/resolver.js +49 -0
- package/dist/rules/modules/resolver.js.map +1 -0
- package/dist/rules/modules/stdlib/atomic.rules +52 -0
- package/dist/rules/modules/stdlib/atomic.test.json +152 -0
- package/dist/rules/modules/stdlib/auth.rules +7 -0
- package/dist/rules/modules/stdlib/auth.test.json +53 -0
- package/dist/rules/modules/stdlib/content.rules +50 -0
- package/dist/rules/modules/stdlib/content.test.json +238 -0
- package/dist/rules/modules/stdlib/counters.rules +41 -0
- package/dist/rules/modules/stdlib/counters.test.json +254 -0
- package/dist/rules/modules/stdlib/geometry.rules +43 -0
- package/dist/rules/modules/stdlib/geometry.test.json +200 -0
- package/dist/rules/modules/stdlib/joining.rules +49 -0
- package/dist/rules/modules/stdlib/joining.test.json +287 -0
- package/dist/rules/modules/stdlib/lifecycle.rules +51 -0
- package/dist/rules/modules/stdlib/lifecycle.test.json +288 -0
- package/dist/rules/modules/stdlib/lobby.rules +44 -0
- package/dist/rules/modules/stdlib/lobby.test.json +32 -0
- package/dist/rules/modules/stdlib/membership.rules +40 -0
- package/dist/rules/modules/stdlib/membership.test.json +107 -0
- package/dist/rules/modules/stdlib/spaces.rules +46 -0
- package/dist/rules/modules/stdlib/spaces.test.json +392 -0
- package/dist/rules/modules/stdlib/state.rules +28 -0
- package/dist/rules/modules/stdlib/state.test.json +55 -0
- package/dist/rules/modules/stdlib/timing.rules +20 -0
- package/dist/rules/modules/stdlib/timing.test.json +106 -0
- package/dist/rules/modules/stdlib/transitions.rules +34 -0
- package/dist/rules/modules/stdlib/transitions.test.json +86 -0
- package/dist/rules/modules/stdlib/turns.rules +27 -0
- package/dist/rules/modules/stdlib/turns.test.json +64 -0
- package/dist/rules/modules/stdlib/validation.rules +31 -0
- package/dist/rules/modules/stdlib/validation.test.json +184 -0
- package/dist/rules/modules/stdlib-content.d.ts +11 -0
- package/dist/rules/modules/stdlib-content.d.ts.map +1 -0
- package/dist/rules/modules/stdlib-content.js +590 -0
- package/dist/rules/modules/stdlib-content.js.map +1 -0
- package/dist/rules/rtdb/compiled-rules.d.ts +11 -0
- package/dist/rules/rtdb/compiled-rules.d.ts.map +1 -0
- package/dist/rules/rtdb/compiled-rules.js +95 -0
- package/dist/rules/rtdb/compiled-rules.js.map +1 -0
- package/dist/rules/rtdb/constraints/atoms.d.ts +29 -0
- package/dist/rules/rtdb/constraints/atoms.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/atoms.js +43 -0
- package/dist/rules/rtdb/constraints/atoms.js.map +1 -0
- package/dist/rules/rtdb/constraints/compose.d.ts +16 -0
- package/dist/rules/rtdb/constraints/compose.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/compose.js +15 -0
- package/dist/rules/rtdb/constraints/compose.js.map +1 -0
- package/dist/rules/rtdb/constraints/data.d.ts +30 -0
- package/dist/rules/rtdb/constraints/data.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/data.js +46 -0
- package/dist/rules/rtdb/constraints/data.js.map +1 -0
- package/dist/rules/rtdb/constraints/document.d.ts +57 -0
- package/dist/rules/rtdb/constraints/document.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/document.js +85 -0
- package/dist/rules/rtdb/constraints/document.js.map +1 -0
- package/dist/rules/rtdb/constraints/game.d.ts +30 -0
- package/dist/rules/rtdb/constraints/game.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/game.js +49 -0
- package/dist/rules/rtdb/constraints/game.js.map +1 -0
- package/dist/rules/rtdb/constraints/index.d.ts +12 -0
- package/dist/rules/rtdb/constraints/index.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/index.js +9 -0
- package/dist/rules/rtdb/constraints/index.js.map +1 -0
- package/dist/rules/rtdb/constraints/policies.d.ts +16 -0
- package/dist/rules/rtdb/constraints/policies.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/policies.js +17 -0
- package/dist/rules/rtdb/constraints/policies.js.map +1 -0
- package/dist/rules/rtdb/constraints/ruleset.d.ts +5 -0
- package/dist/rules/rtdb/constraints/ruleset.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/ruleset.js +132 -0
- package/dist/rules/rtdb/constraints/ruleset.js.map +1 -0
- package/dist/rules/rtdb/constraints/schema.d.ts +17 -0
- package/dist/rules/rtdb/constraints/schema.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/schema.js +74 -0
- package/dist/rules/rtdb/constraints/schema.js.map +1 -0
- package/dist/rules/rtdb/constraints/types.d.ts +22 -0
- package/dist/rules/rtdb/constraints/types.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/types.js +2 -0
- package/dist/rules/rtdb/constraints/types.js.map +1 -0
- package/dist/rules/rtdb/constraints/write-rules-file.d.ts +24 -0
- package/dist/rules/rtdb/constraints/write-rules-file.d.ts.map +1 -0
- package/dist/rules/rtdb/constraints/write-rules-file.js +30 -0
- package/dist/rules/rtdb/constraints/write-rules-file.js.map +1 -0
- package/dist/rules/rtdb/expression-engine.d.ts +8 -0
- package/dist/rules/rtdb/expression-engine.d.ts.map +1 -0
- package/dist/rules/rtdb/expression-engine.js +20 -0
- package/dist/rules/rtdb/expression-engine.js.map +1 -0
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm +98 -0
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.d.ts +2 -0
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.d.ts.map +1 -0
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.js +103 -0
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.js.map +1 -0
- package/dist/rules/rtdb/grammar/RtdbExprParser.d.ts +3 -0
- package/dist/rules/rtdb/grammar/RtdbExprParser.d.ts.map +1 -0
- package/dist/rules/rtdb/grammar/RtdbExprParser.js +56 -0
- package/dist/rules/rtdb/grammar/RtdbExprParser.js.map +1 -0
- package/dist/rules/rtdb/grammar/linter.d.ts +3 -0
- package/dist/rules/rtdb/grammar/linter.d.ts.map +1 -0
- package/dist/rules/rtdb/grammar/linter.js +73 -0
- package/dist/rules/rtdb/grammar/linter.js.map +1 -0
- package/dist/rules/rtdb/grammar/simulator.d.ts +30 -0
- package/dist/rules/rtdb/grammar/simulator.d.ts.map +1 -0
- package/dist/rules/rtdb/grammar/simulator.js +282 -0
- package/dist/rules/rtdb/grammar/simulator.js.map +1 -0
- package/dist/rules/rtdb/grammar/validator.d.ts +3 -0
- package/dist/rules/rtdb/grammar/validator.d.ts.map +1 -0
- package/dist/rules/rtdb/grammar/validator.js +91 -0
- package/dist/rules/rtdb/grammar/validator.js.map +1 -0
- package/dist/rules/rtdb/simulation/handler.d.ts +6 -0
- package/dist/rules/rtdb/simulation/handler.d.ts.map +1 -0
- package/dist/rules/rtdb/simulation/handler.js +325 -0
- package/dist/rules/rtdb/simulation/handler.js.map +1 -0
- package/dist/rules/rtdb/simulation/spec.d.ts +102 -0
- package/dist/rules/rtdb/simulation/spec.d.ts.map +1 -0
- package/dist/rules/rtdb/simulation/spec.js +40 -0
- package/dist/rules/rtdb/simulation/spec.js.map +1 -0
- package/dist/rules/rtdb/types.d.ts +166 -0
- package/dist/rules/rtdb/types.d.ts.map +1 -0
- package/dist/rules/rtdb/types.js +21 -0
- package/dist/rules/rtdb/types.js.map +1 -0
- package/dist/rules/simulator/evaluator.d.ts +206 -0
- package/dist/rules/simulator/evaluator.d.ts.map +1 -0
- package/dist/rules/simulator/evaluator.js +1251 -0
- package/dist/rules/simulator/evaluator.js.map +1 -0
- package/dist/rules/simulator/expression/eval-errors.d.ts +86 -0
- package/dist/rules/simulator/expression/eval-errors.d.ts.map +1 -0
- package/dist/rules/simulator/expression/eval-errors.js +68 -0
- package/dist/rules/simulator/expression/eval-errors.js.map +1 -0
- package/dist/rules/simulator/expression/evaluator.d.ts +43 -0
- package/dist/rules/simulator/expression/evaluator.d.ts.map +1 -0
- package/dist/rules/simulator/expression/evaluator.js +298 -0
- package/dist/rules/simulator/expression/evaluator.js.map +1 -0
- package/dist/rules/simulator/expression/lexer.d.ts +36 -0
- package/dist/rules/simulator/expression/lexer.d.ts.map +1 -0
- package/dist/rules/simulator/expression/lexer.js +318 -0
- package/dist/rules/simulator/expression/lexer.js.map +1 -0
- package/dist/rules/simulator/expression/parser.d.ts +39 -0
- package/dist/rules/simulator/expression/parser.d.ts.map +1 -0
- package/dist/rules/simulator/expression/parser.js +329 -0
- package/dist/rules/simulator/expression/parser.js.map +1 -0
- package/dist/rules/simulator/expression/types.d.ts +137 -0
- package/dist/rules/simulator/expression/types.d.ts.map +1 -0
- package/dist/rules/simulator/expression/types.js +90 -0
- package/dist/rules/simulator/expression/types.js.map +1 -0
- package/dist/rules/simulator/expression/walk-data.d.ts +52 -0
- package/dist/rules/simulator/expression/walk-data.d.ts.map +1 -0
- package/dist/rules/simulator/expression/walk-data.js +167 -0
- package/dist/rules/simulator/expression/walk-data.js.map +1 -0
- package/dist/rules/simulator/firestore-set.d.ts +25 -0
- package/dist/rules/simulator/firestore-set.d.ts.map +1 -0
- package/dist/rules/simulator/firestore-set.js +89 -0
- package/dist/rules/simulator/firestore-set.js.map +1 -0
- package/dist/rules/simulator/handler.d.ts +47 -0
- package/dist/rules/simulator/handler.d.ts.map +1 -0
- package/dist/rules/simulator/handler.js +644 -0
- package/dist/rules/simulator/handler.js.map +1 -0
- package/dist/rules/simulator/mapdiff.d.ts +29 -0
- package/dist/rules/simulator/mapdiff.d.ts.map +1 -0
- package/dist/rules/simulator/mapdiff.js +72 -0
- package/dist/rules/simulator/mapdiff.js.map +1 -0
- package/dist/rules/simulator/project-after-state.d.ts +33 -0
- package/dist/rules/simulator/project-after-state.d.ts.map +1 -0
- package/dist/rules/simulator/project-after-state.js +88 -0
- package/dist/rules/simulator/project-after-state.js.map +1 -0
- package/dist/rules/simulator/query-proof.d.ts +80 -0
- package/dist/rules/simulator/query-proof.d.ts.map +1 -0
- package/dist/rules/simulator/query-proof.js +142 -0
- package/dist/rules/simulator/query-proof.js.map +1 -0
- package/dist/rules/simulator/value-equality.d.ts +8 -0
- package/dist/rules/simulator/value-equality.d.ts.map +1 -0
- package/dist/rules/simulator/value-equality.js +40 -0
- package/dist/rules/simulator/value-equality.js.map +1 -0
- package/dist/rules/simulator/wrappers/base.d.ts +129 -0
- package/dist/rules/simulator/wrappers/base.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/base.js +90 -0
- package/dist/rules/simulator/wrappers/base.js.map +1 -0
- package/dist/rules/simulator/wrappers/bytes.d.ts +45 -0
- package/dist/rules/simulator/wrappers/bytes.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/bytes.js +130 -0
- package/dist/rules/simulator/wrappers/bytes.js.map +1 -0
- package/dist/rules/simulator/wrappers/duration.d.ts +76 -0
- package/dist/rules/simulator/wrappers/duration.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/duration.js +176 -0
- package/dist/rules/simulator/wrappers/duration.js.map +1 -0
- package/dist/rules/simulator/wrappers/float.d.ts +52 -0
- package/dist/rules/simulator/wrappers/float.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/float.js +88 -0
- package/dist/rules/simulator/wrappers/float.js.map +1 -0
- package/dist/rules/simulator/wrappers/latlng.d.ts +40 -0
- package/dist/rules/simulator/wrappers/latlng.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/latlng.js +100 -0
- package/dist/rules/simulator/wrappers/latlng.js.map +1 -0
- package/dist/rules/simulator/wrappers/path.d.ts +75 -0
- package/dist/rules/simulator/wrappers/path.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/path.js +158 -0
- package/dist/rules/simulator/wrappers/path.js.map +1 -0
- package/dist/rules/simulator/wrappers/reference.d.ts +82 -0
- package/dist/rules/simulator/wrappers/reference.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/reference.js +145 -0
- package/dist/rules/simulator/wrappers/reference.js.map +1 -0
- package/dist/rules/simulator/wrappers/timestamp.d.ts +86 -0
- package/dist/rules/simulator/wrappers/timestamp.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/timestamp.js +207 -0
- package/dist/rules/simulator/wrappers/timestamp.js.map +1 -0
- package/dist/rules/simulator/wrappers/vector.d.ts +43 -0
- package/dist/rules/simulator/wrappers/vector.d.ts.map +1 -0
- package/dist/rules/simulator/wrappers/vector.js +80 -0
- package/dist/rules/simulator/wrappers/vector.js.map +1 -0
- package/dist/rules/simulator-tools-impl.d.ts +64 -0
- package/dist/rules/simulator-tools-impl.d.ts.map +1 -0
- package/dist/rules/simulator-tools-impl.js +462 -0
- package/dist/rules/simulator-tools-impl.js.map +1 -0
- package/dist/rules/simulator.d.ts +20 -0
- package/dist/rules/simulator.d.ts.map +1 -0
- package/dist/rules/simulator.js +24 -0
- package/dist/rules/simulator.js.map +1 -0
- package/dist/rules/stdlib-modules.d.ts +73 -0
- package/dist/rules/stdlib-modules.d.ts.map +1 -0
- package/dist/rules/stdlib-modules.js +837 -0
- package/dist/rules/stdlib-modules.js.map +1 -0
- package/dist/rules/stdlib-tools.d.ts +19 -0
- package/dist/rules/stdlib-tools.d.ts.map +1 -0
- package/dist/rules/stdlib-tools.js +164 -0
- package/dist/rules/stdlib-tools.js.map +1 -0
- package/dist/rules/test/handler.d.ts +21 -0
- package/dist/rules/test/handler.d.ts.map +1 -0
- package/dist/rules/test/handler.js +214 -0
- package/dist/rules/test/handler.js.map +1 -0
- package/dist/rules/test/spec.d.ts +677 -0
- package/dist/rules/test/spec.d.ts.map +1 -0
- package/dist/rules/test/spec.js +327 -0
- package/dist/rules/test/spec.js.map +1 -0
- package/dist/rules/tools.d.ts +41 -0
- package/dist/rules/tools.d.ts.map +1 -0
- package/dist/rules/tools.js +120 -0
- package/dist/rules/tools.js.map +1 -0
- package/dist/rules/write/handler.d.ts +6 -0
- package/dist/rules/write/handler.d.ts.map +1 -0
- package/dist/rules/write/handler.js +126 -0
- package/dist/rules/write/handler.js.map +1 -0
- package/dist/rules/write/spec.d.ts +28 -0
- package/dist/rules/write/spec.d.ts.map +1 -0
- package/dist/rules/write/spec.js +2 -0
- package/dist/rules/write/spec.js.map +1 -0
- package/dist/sandbox/admin-compat.d.ts +20 -0
- package/dist/sandbox/admin-compat.d.ts.map +1 -0
- package/dist/sandbox/admin-compat.js +19 -0
- package/dist/sandbox/admin-compat.js.map +1 -0
- package/dist/sandbox/admin-firestore/error-translation.d.ts +90 -0
- package/dist/sandbox/admin-firestore/error-translation.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/error-translation.js +214 -0
- package/dist/sandbox/admin-firestore/error-translation.js.map +1 -0
- package/dist/sandbox/admin-firestore/get-admin-firestore.d.ts +44 -0
- package/dist/sandbox/admin-firestore/get-admin-firestore.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/get-admin-firestore.js +62 -0
- package/dist/sandbox/admin-firestore/get-admin-firestore.js.map +1 -0
- package/dist/sandbox/admin-firestore/get-firestore.d.ts +34 -0
- package/dist/sandbox/admin-firestore/get-firestore.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/get-firestore.js +71 -0
- package/dist/sandbox/admin-firestore/get-firestore.js.map +1 -0
- package/dist/sandbox/admin-firestore/index.d.ts +36 -0
- package/dist/sandbox/admin-firestore/index.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/index.js +33 -0
- package/dist/sandbox/admin-firestore/index.js.map +1 -0
- package/dist/sandbox/admin-firestore/listeners.d.ts +46 -0
- package/dist/sandbox/admin-firestore/listeners.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/listeners.js +290 -0
- package/dist/sandbox/admin-firestore/listeners.js.map +1 -0
- package/dist/sandbox/admin-firestore/local-handle.d.ts +23 -0
- package/dist/sandbox/admin-firestore/local-handle.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/local-handle.js +74 -0
- package/dist/sandbox/admin-firestore/local-handle.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/batch.d.ts +6 -0
- package/dist/sandbox/admin-firestore/remote/batch.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/batch.js +38 -0
- package/dist/sandbox/admin-firestore/remote/batch.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/channel.d.ts +22 -0
- package/dist/sandbox/admin-firestore/remote/channel.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/channel.js +27 -0
- package/dist/sandbox/admin-firestore/remote/channel.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/doc-ref.d.ts +10 -0
- package/dist/sandbox/admin-firestore/remote/doc-ref.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/doc-ref.js +88 -0
- package/dist/sandbox/admin-firestore/remote/doc-ref.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/errors.d.ts +17 -0
- package/dist/sandbox/admin-firestore/remote/errors.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/errors.js +32 -0
- package/dist/sandbox/admin-firestore/remote/errors.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/listeners.d.ts +43 -0
- package/dist/sandbox/admin-firestore/remote/listeners.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/listeners.js +89 -0
- package/dist/sandbox/admin-firestore/remote/listeners.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/query.d.ts +47 -0
- package/dist/sandbox/admin-firestore/remote/query.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/query.js +186 -0
- package/dist/sandbox/admin-firestore/remote/query.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/remote-firestore.d.ts +55 -0
- package/dist/sandbox/admin-firestore/remote/remote-firestore.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/remote-firestore.js +111 -0
- package/dist/sandbox/admin-firestore/remote/remote-firestore.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/snapshots.d.ts +10 -0
- package/dist/sandbox/admin-firestore/remote/snapshots.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/snapshots.js +37 -0
- package/dist/sandbox/admin-firestore/remote/snapshots.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/transaction.d.ts +19 -0
- package/dist/sandbox/admin-firestore/remote/transaction.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/transaction.js +105 -0
- package/dist/sandbox/admin-firestore/remote/transaction.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/value-codec.d.ts +52 -0
- package/dist/sandbox/admin-firestore/remote/value-codec.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/value-codec.js +120 -0
- package/dist/sandbox/admin-firestore/remote/value-codec.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote/wire-types.d.ts +111 -0
- package/dist/sandbox/admin-firestore/remote/wire-types.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote/wire-types.js +8 -0
- package/dist/sandbox/admin-firestore/remote/wire-types.js.map +1 -0
- package/dist/sandbox/admin-firestore/types.d.ts +59 -0
- package/dist/sandbox/admin-firestore/types.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/types.js +6 -0
- package/dist/sandbox/admin-firestore/types.js.map +1 -0
- package/dist/sandbox/branches/index.d.ts +141 -0
- package/dist/sandbox/branches/index.d.ts.map +1 -0
- package/dist/sandbox/branches/index.js +327 -0
- package/dist/sandbox/branches/index.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/batch.d.ts +34 -0
- package/dist/sandbox/firestore/admin-compat/batch.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/batch.js +73 -0
- package/dist/sandbox/firestore/admin-compat/batch.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/doc-ref.d.ts +38 -0
- package/dist/sandbox/firestore/admin-compat/doc-ref.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/doc-ref.js +154 -0
- package/dist/sandbox/firestore/admin-compat/doc-ref.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/firestore.d.ts +47 -0
- package/dist/sandbox/firestore/admin-compat/firestore.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/firestore.js +117 -0
- package/dist/sandbox/firestore/admin-compat/firestore.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/index.d.ts +49 -0
- package/dist/sandbox/firestore/admin-compat/index.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/index.js +27 -0
- package/dist/sandbox/firestore/admin-compat/index.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/paths.d.ts +37 -0
- package/dist/sandbox/firestore/admin-compat/paths.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/paths.js +49 -0
- package/dist/sandbox/firestore/admin-compat/paths.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/query.d.ts +261 -0
- package/dist/sandbox/firestore/admin-compat/query.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/query.js +758 -0
- package/dist/sandbox/firestore/admin-compat/query.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/read-translation.d.ts +8 -0
- package/dist/sandbox/firestore/admin-compat/read-translation.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/read-translation.js +59 -0
- package/dist/sandbox/firestore/admin-compat/read-translation.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/snapshots.d.ts +39 -0
- package/dist/sandbox/firestore/admin-compat/snapshots.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/snapshots.js +50 -0
- package/dist/sandbox/firestore/admin-compat/snapshots.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/transaction.d.ts +35 -0
- package/dist/sandbox/firestore/admin-compat/transaction.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/transaction.js +88 -0
- package/dist/sandbox/firestore/admin-compat/transaction.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/types.d.ts +297 -0
- package/dist/sandbox/firestore/admin-compat/types.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/types.js +127 -0
- package/dist/sandbox/firestore/admin-compat/types.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/value-order.d.ts +49 -0
- package/dist/sandbox/firestore/admin-compat/value-order.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/value-order.js +172 -0
- package/dist/sandbox/firestore/admin-compat/value-order.js.map +1 -0
- package/dist/sandbox/firestore/auto-id.d.ts +26 -0
- package/dist/sandbox/firestore/auto-id.d.ts.map +1 -0
- package/dist/sandbox/firestore/auto-id.js +36 -0
- package/dist/sandbox/firestore/auto-id.js.map +1 -0
- package/dist/sandbox/firestore/converters/bytes-geopoint.d.ts +48 -0
- package/dist/sandbox/firestore/converters/bytes-geopoint.d.ts.map +1 -0
- package/dist/sandbox/firestore/converters/bytes-geopoint.js +85 -0
- package/dist/sandbox/firestore/converters/bytes-geopoint.js.map +1 -0
- package/dist/sandbox/firestore/converters/fieldvalue.d.ts +69 -0
- package/dist/sandbox/firestore/converters/fieldvalue.d.ts.map +1 -0
- package/dist/sandbox/firestore/converters/fieldvalue.js +166 -0
- package/dist/sandbox/firestore/converters/fieldvalue.js.map +1 -0
- package/dist/sandbox/firestore/converters/reference.d.ts +31 -0
- package/dist/sandbox/firestore/converters/reference.d.ts.map +1 -0
- package/dist/sandbox/firestore/converters/reference.js +51 -0
- package/dist/sandbox/firestore/converters/reference.js.map +1 -0
- package/dist/sandbox/firestore/converters/timestamp.d.ts +32 -0
- package/dist/sandbox/firestore/converters/timestamp.d.ts.map +1 -0
- package/dist/sandbox/firestore/converters/timestamp.js +63 -0
- package/dist/sandbox/firestore/converters/timestamp.js.map +1 -0
- package/dist/sandbox/firestore/converters/user-timestamp.d.ts +46 -0
- package/dist/sandbox/firestore/converters/user-timestamp.d.ts.map +1 -0
- package/dist/sandbox/firestore/converters/user-timestamp.js +65 -0
- package/dist/sandbox/firestore/converters/user-timestamp.js.map +1 -0
- package/dist/sandbox/firestore/converters/vector.d.ts +24 -0
- package/dist/sandbox/firestore/converters/vector.d.ts.map +1 -0
- package/dist/sandbox/firestore/converters/vector.js +53 -0
- package/dist/sandbox/firestore/converters/vector.js.map +1 -0
- package/dist/sandbox/firestore/errors.d.ts +82 -0
- package/dist/sandbox/firestore/errors.d.ts.map +1 -0
- package/dist/sandbox/firestore/errors.js +54 -0
- package/dist/sandbox/firestore/errors.js.map +1 -0
- package/dist/sandbox/firestore/event-log.d.ts +99 -0
- package/dist/sandbox/firestore/event-log.d.ts.map +1 -0
- package/dist/sandbox/firestore/event-log.js +67 -0
- package/dist/sandbox/firestore/event-log.js.map +1 -0
- package/dist/sandbox/firestore/field-merge.d.ts +64 -0
- package/dist/sandbox/firestore/field-merge.d.ts.map +1 -0
- package/dist/sandbox/firestore/field-merge.js +221 -0
- package/dist/sandbox/firestore/field-merge.js.map +1 -0
- package/dist/sandbox/firestore/list-query-proof.d.ts +77 -0
- package/dist/sandbox/firestore/list-query-proof.d.ts.map +1 -0
- package/dist/sandbox/firestore/list-query-proof.js +170 -0
- package/dist/sandbox/firestore/list-query-proof.js.map +1 -0
- package/dist/sandbox/firestore/local-environment.d.ts +825 -0
- package/dist/sandbox/firestore/local-environment.d.ts.map +1 -0
- package/dist/sandbox/firestore/local-environment.js +3129 -0
- package/dist/sandbox/firestore/local-environment.js.map +1 -0
- package/dist/sandbox/firestore/local-state.d.ts +196 -0
- package/dist/sandbox/firestore/local-state.d.ts.map +1 -0
- package/dist/sandbox/firestore/local-state.js +413 -0
- package/dist/sandbox/firestore/local-state.js.map +1 -0
- package/dist/sandbox/firestore/overlay-backing.d.ts +44 -0
- package/dist/sandbox/firestore/overlay-backing.d.ts.map +1 -0
- package/dist/sandbox/firestore/overlay-backing.js +82 -0
- package/dist/sandbox/firestore/overlay-backing.js.map +1 -0
- package/dist/sandbox/firestore/sentinel-capture.d.ts +30 -0
- package/dist/sandbox/firestore/sentinel-capture.d.ts.map +1 -0
- package/dist/sandbox/firestore/sentinel-capture.js +61 -0
- package/dist/sandbox/firestore/sentinel-capture.js.map +1 -0
- package/dist/sandbox/firestore/snapshot-listeners.d.ts +290 -0
- package/dist/sandbox/firestore/snapshot-listeners.d.ts.map +1 -0
- package/dist/sandbox/firestore/snapshot-listeners.js +194 -0
- package/dist/sandbox/firestore/snapshot-listeners.js.map +1 -0
- package/dist/sandbox/firestore/topk.d.ts +12 -0
- package/dist/sandbox/firestore/topk.d.ts.map +1 -0
- package/dist/sandbox/firestore/topk.js +42 -0
- package/dist/sandbox/firestore/topk.js.map +1 -0
- package/dist/sandbox/firestore/transaction-merge.d.ts +55 -0
- package/dist/sandbox/firestore/transaction-merge.d.ts.map +1 -0
- package/dist/sandbox/firestore/transaction-merge.js +107 -0
- package/dist/sandbox/firestore/transaction-merge.js.map +1 -0
- package/dist/sandbox/firestore/transaction-types.d.ts +155 -0
- package/dist/sandbox/firestore/transaction-types.d.ts.map +1 -0
- package/dist/sandbox/firestore/transaction-types.js +10 -0
- package/dist/sandbox/firestore/transaction-types.js.map +1 -0
- package/dist/sandbox/firestore/transaction.d.ts +79 -0
- package/dist/sandbox/firestore/transaction.d.ts.map +1 -0
- package/dist/sandbox/firestore/transaction.js +95 -0
- package/dist/sandbox/firestore/transaction.js.map +1 -0
- package/dist/sandbox/firestore/value-equality.d.ts +2 -0
- package/dist/sandbox/firestore/value-equality.d.ts.map +1 -0
- package/dist/sandbox/firestore/value-equality.js +35 -0
- package/dist/sandbox/firestore/value-equality.js.map +1 -0
- package/dist/sandbox/firestore/value-resolver.d.ts +172 -0
- package/dist/sandbox/firestore/value-resolver.d.ts.map +1 -0
- package/dist/sandbox/firestore/value-resolver.js +221 -0
- package/dist/sandbox/firestore/value-resolver.js.map +1 -0
- package/dist/sandbox/firestore/wire-encoder.d.ts +14 -0
- package/dist/sandbox/firestore/wire-encoder.d.ts.map +1 -0
- package/dist/sandbox/firestore/wire-encoder.js +130 -0
- package/dist/sandbox/firestore/wire-encoder.js.map +1 -0
- package/dist/sandbox/index.d.ts +53 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/index.js +65 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/internal/client-app.d.ts +29 -0
- package/dist/sandbox/internal/client-app.d.ts.map +1 -0
- package/dist/sandbox/internal/client-app.js +18 -0
- package/dist/sandbox/internal/client-app.js.map +1 -0
- package/dist/sandbox/internal/firebase-error.d.ts +14 -0
- package/dist/sandbox/internal/firebase-error.d.ts.map +1 -0
- package/dist/sandbox/internal/firebase-error.js +22 -0
- package/dist/sandbox/internal/firebase-error.js.map +1 -0
- package/dist/sandbox/internal/index.d.ts +39 -0
- package/dist/sandbox/internal/index.d.ts.map +1 -0
- package/dist/sandbox/internal/index.js +75 -0
- package/dist/sandbox/internal/index.js.map +1 -0
- package/dist/sandbox/internal/local-brand.d.ts +3 -0
- package/dist/sandbox/internal/local-brand.d.ts.map +1 -0
- package/dist/sandbox/internal/local-brand.js +3 -0
- package/dist/sandbox/internal/local-brand.js.map +1 -0
- package/dist/sandbox/internal/provenance.d.ts +16 -0
- package/dist/sandbox/internal/provenance.d.ts.map +1 -0
- package/dist/sandbox/internal/provenance.js +139 -0
- package/dist/sandbox/internal/provenance.js.map +1 -0
- package/dist/sandbox/internal/sandbox-impl.d.ts +328 -0
- package/dist/sandbox/internal/sandbox-impl.d.ts.map +1 -0
- package/dist/sandbox/internal/sandbox-impl.js +695 -0
- package/dist/sandbox/internal/sandbox-impl.js.map +1 -0
- package/dist/sandbox/operation-record.d.ts +48 -0
- package/dist/sandbox/operation-record.d.ts.map +1 -0
- package/dist/sandbox/operation-record.js +143 -0
- package/dist/sandbox/operation-record.js.map +1 -0
- package/dist/sandbox/persistence/backends.d.ts +37 -0
- package/dist/sandbox/persistence/backends.d.ts.map +1 -0
- package/dist/sandbox/persistence/backends.js +202 -0
- package/dist/sandbox/persistence/backends.js.map +1 -0
- package/dist/sandbox/persistence/chunk-format.d.ts +58 -0
- package/dist/sandbox/persistence/chunk-format.d.ts.map +1 -0
- package/dist/sandbox/persistence/chunk-format.js +163 -0
- package/dist/sandbox/persistence/chunk-format.js.map +1 -0
- package/dist/sandbox/persistence/controller.d.ts +39 -0
- package/dist/sandbox/persistence/controller.d.ts.map +1 -0
- package/dist/sandbox/persistence/controller.js +505 -0
- package/dist/sandbox/persistence/controller.js.map +1 -0
- package/dist/sandbox/persistence/index.d.ts +13 -0
- package/dist/sandbox/persistence/index.d.ts.map +1 -0
- package/dist/sandbox/persistence/index.js +5 -0
- package/dist/sandbox/persistence/index.js.map +1 -0
- package/dist/sandbox/persistence/serialize.d.ts +53 -0
- package/dist/sandbox/persistence/serialize.d.ts.map +1 -0
- package/dist/sandbox/persistence/serialize.js +98 -0
- package/dist/sandbox/persistence/serialize.js.map +1 -0
- package/dist/sandbox/persistence/types.d.ts +118 -0
- package/dist/sandbox/persistence/types.d.ts.map +1 -0
- package/dist/sandbox/persistence/types.js +15 -0
- package/dist/sandbox/persistence/types.js.map +1 -0
- package/dist/sandbox/remote.d.ts +118 -0
- package/dist/sandbox/remote.d.ts.map +1 -0
- package/dist/sandbox/remote.js +60 -0
- package/dist/sandbox/remote.js.map +1 -0
- package/dist/sandbox/replay/index.d.ts +106 -0
- package/dist/sandbox/replay/index.d.ts.map +1 -0
- package/dist/sandbox/replay/index.js +246 -0
- package/dist/sandbox/replay/index.js.map +1 -0
- package/dist/sandbox/sandbox-context.d.ts +48 -0
- package/dist/sandbox/sandbox-context.d.ts.map +1 -0
- package/dist/sandbox/sandbox-context.js +97 -0
- package/dist/sandbox/sandbox-context.js.map +1 -0
- package/dist/sandbox/tab-sync/index.d.ts +120 -0
- package/dist/sandbox/tab-sync/index.d.ts.map +1 -0
- package/dist/sandbox/tab-sync/index.js +273 -0
- package/dist/sandbox/tab-sync/index.js.map +1 -0
- package/dist/sandbox/types/auth-state.d.ts +23 -0
- package/dist/sandbox/types/auth-state.d.ts.map +1 -0
- package/dist/sandbox/types/auth-state.js +8 -0
- package/dist/sandbox/types/auth-state.js.map +1 -0
- package/dist/sandbox/types/context.d.ts +33 -0
- package/dist/sandbox/types/context.d.ts.map +1 -0
- package/dist/sandbox/types/context.js +5 -0
- package/dist/sandbox/types/context.js.map +1 -0
- package/dist/sandbox/types/errors.d.ts +109 -0
- package/dist/sandbox/types/errors.d.ts.map +1 -0
- package/dist/sandbox/types/errors.js +41 -0
- package/dist/sandbox/types/errors.js.map +1 -0
- package/dist/sandbox/types/events.d.ts +577 -0
- package/dist/sandbox/types/events.d.ts.map +1 -0
- package/dist/sandbox/types/events.js +7 -0
- package/dist/sandbox/types/events.js.map +1 -0
- package/dist/sandbox/types/index.d.ts +24 -0
- package/dist/sandbox/types/index.d.ts.map +1 -0
- package/dist/sandbox/types/index.js +17 -0
- package/dist/sandbox/types/index.js.map +1 -0
- package/dist/sandbox/types/operation.d.ts +60 -0
- package/dist/sandbox/types/operation.d.ts.map +1 -0
- package/dist/sandbox/types/operation.js +3 -0
- package/dist/sandbox/types/operation.js.map +1 -0
- package/dist/sandbox/types/persistence.d.ts +130 -0
- package/dist/sandbox/types/persistence.d.ts.map +1 -0
- package/dist/sandbox/types/persistence.js +7 -0
- package/dist/sandbox/types/persistence.js.map +1 -0
- package/dist/sandbox/types/service.d.ts +357 -0
- package/dist/sandbox/types/service.d.ts.map +1 -0
- package/dist/sandbox/types/service.js +6 -0
- package/dist/sandbox/types/service.js.map +1 -0
- package/dist/storage/admin/api.d.ts +206 -0
- package/dist/storage/admin/api.d.ts.map +1 -0
- package/dist/storage/admin/api.js +349 -0
- package/dist/storage/admin/api.js.map +1 -0
- package/dist/storage/admin/handler.d.ts +28 -0
- package/dist/storage/admin/handler.d.ts.map +1 -0
- package/dist/storage/admin/handler.js +82 -0
- package/dist/storage/admin/handler.js.map +1 -0
- package/dist/storage/admin/spec.d.ts +64 -0
- package/dist/storage/admin/spec.d.ts.map +1 -0
- package/dist/storage/admin/spec.js +8 -0
- package/dist/storage/admin/spec.js.map +1 -0
- package/dist/storage/admin/tools.d.ts +22 -0
- package/dist/storage/admin/tools.d.ts.map +1 -0
- package/dist/storage/admin/tools.js +90 -0
- package/dist/storage/admin/tools.js.map +1 -0
- package/dist/storage/download.d.ts +41 -0
- package/dist/storage/download.d.ts.map +1 -0
- package/dist/storage/download.js +137 -0
- package/dist/storage/download.js.map +1 -0
- package/dist/storage/enforce.d.ts +5 -0
- package/dist/storage/enforce.d.ts.map +1 -0
- package/dist/storage/enforce.js +147 -0
- package/dist/storage/enforce.js.map +1 -0
- package/dist/storage/errors.d.ts +44 -0
- package/dist/storage/errors.d.ts.map +1 -0
- package/dist/storage/errors.js +64 -0
- package/dist/storage/errors.js.map +1 -0
- package/dist/storage/index.d.ts +45 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +39 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/instances.d.ts +9 -0
- package/dist/storage/instances.d.ts.map +1 -0
- package/dist/storage/instances.js +24 -0
- package/dist/storage/instances.js.map +1 -0
- package/dist/storage/internal.d.ts +18 -0
- package/dist/storage/internal.d.ts.map +1 -0
- package/dist/storage/internal.js +18 -0
- package/dist/storage/internal.js.map +1 -0
- package/dist/storage/list.d.ts +42 -0
- package/dist/storage/list.d.ts.map +1 -0
- package/dist/storage/list.js +83 -0
- package/dist/storage/list.js.map +1 -0
- package/dist/storage/metadata.d.ts +92 -0
- package/dist/storage/metadata.d.ts.map +1 -0
- package/dist/storage/metadata.js +164 -0
- package/dist/storage/metadata.js.map +1 -0
- package/dist/storage/persistence.d.ts +134 -0
- package/dist/storage/persistence.d.ts.map +1 -0
- package/dist/storage/persistence.js +132 -0
- package/dist/storage/persistence.js.map +1 -0
- package/dist/storage/reference.d.ts +57 -0
- package/dist/storage/reference.d.ts.map +1 -0
- package/dist/storage/reference.js +105 -0
- package/dist/storage/reference.js.map +1 -0
- package/dist/storage/rules.d.ts +339 -0
- package/dist/storage/rules.d.ts.map +1 -0
- package/dist/storage/rules.js +1334 -0
- package/dist/storage/rules.js.map +1 -0
- package/dist/storage/service.d.ts +122 -0
- package/dist/storage/service.d.ts.map +1 -0
- package/dist/storage/service.js +247 -0
- package/dist/storage/service.js.map +1 -0
- package/dist/storage/upload.d.ts +50 -0
- package/dist/storage/upload.d.ts.map +1 -0
- package/dist/storage/upload.js +246 -0
- package/dist/storage/upload.js.map +1 -0
- package/package.json +156 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `getAdminFirestore(target)` — the rules-bypassing `SandboxFirestore`
|
|
3
|
+
* resolver (the Pyric Studio admin lens, Gap #2).
|
|
4
|
+
*/
|
|
5
|
+
import { isRemoteSandbox } from 'pyric/sandbox';
|
|
6
|
+
import { bindOperationContext } from 'pyric/sandbox/internal';
|
|
7
|
+
import { wrapWithErrorTranslation } from './error-translation.js';
|
|
8
|
+
import { buildFirestoreHandle } from './local-handle.js';
|
|
9
|
+
import { createRemoteFirestore } from './remote/remote-firestore.js';
|
|
10
|
+
/**
|
|
11
|
+
* Idempotency cache for admin (rules-bypassing) handles. Keyed by ctx,
|
|
12
|
+
* SEPARATE from `getFirestore`'s handle cache so the same
|
|
13
|
+
* `SandboxContext` can vend both a rules-enforced handle (`getFirestore`)
|
|
14
|
+
* and a rules-bypassing one (`getAdminFirestore`) without one clobbering
|
|
15
|
+
* the other.
|
|
16
|
+
*/
|
|
17
|
+
const adminHandleCache = new WeakMap();
|
|
18
|
+
export function getAdminFirestore(target) {
|
|
19
|
+
// Admin reads/writes are identity-agnostic (rules are off), so a bare
|
|
20
|
+
// `Sandbox` is accepted as well as a `SandboxContext`. A bare sandbox is
|
|
21
|
+
// normalised to an anonymous ctx — the captured auth is irrelevant since
|
|
22
|
+
// no rule reads `request.auth` on the bypass path.
|
|
23
|
+
const baseContext = isSandboxContext(target)
|
|
24
|
+
? target
|
|
25
|
+
: target.withAuth(null);
|
|
26
|
+
const cached = adminHandleCache.get(baseContext);
|
|
27
|
+
if (cached)
|
|
28
|
+
return cached;
|
|
29
|
+
const ctx = baseContext.operationContext.authLens.mode === 'admin'
|
|
30
|
+
? baseContext
|
|
31
|
+
: bindOperationContext(baseContext, {
|
|
32
|
+
source: baseContext.operationContext.source,
|
|
33
|
+
authLens: { mode: 'admin' },
|
|
34
|
+
...(baseContext.operationContext.planId === undefined
|
|
35
|
+
? {}
|
|
36
|
+
: { planId: baseContext.operationContext.planId }),
|
|
37
|
+
});
|
|
38
|
+
// REMOTE ARM: rules bypass rides the worker's `{ mode: 'admin' }` lens
|
|
39
|
+
// (the same lens Studio's admin surface uses) — identity-agnostic, so
|
|
40
|
+
// the normalised ctx's auth is irrelevant, exactly like the local path.
|
|
41
|
+
const fresh = isRemoteSandbox(ctx.sandbox)
|
|
42
|
+
? createRemoteFirestore(ctx.sandbox, { mode: 'admin' })
|
|
43
|
+
: wrapWithErrorTranslation(buildFirestoreHandle(ctx, true), ctx, true);
|
|
44
|
+
// Cache against the caller-owned context. `bindOperationContext` creates a
|
|
45
|
+
// derived context to pin the admin lens, and keying by that fresh object
|
|
46
|
+
// would silently defeat the public per-context idempotency contract.
|
|
47
|
+
adminHandleCache.set(baseContext, fresh);
|
|
48
|
+
return fresh;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Brand test for the `SandboxContext` overload of {@link getAdminFirestore}.
|
|
52
|
+
* A `SandboxContext` carries `withAuth` + a `sandbox` back-reference; a bare
|
|
53
|
+
* `Sandbox` carries `withAuth` too but also `admin`/`currentUser`. We test
|
|
54
|
+
* for the `sandbox` property which only the context has.
|
|
55
|
+
*/
|
|
56
|
+
function isSandboxContext(target) {
|
|
57
|
+
return (target !== null &&
|
|
58
|
+
typeof target === 'object' &&
|
|
59
|
+
'sandbox' in target &&
|
|
60
|
+
typeof target.withAuth === 'function');
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=get-admin-firestore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-admin-firestore.js","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/get-admin-firestore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAqC,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAoC,CAAC;AAuCzE,MAAM,UAAU,iBAAiB,CAAC,MAAgC;IAChE,sEAAsE;IACtE,yEAAyE;IACzE,yEAAyE;IACzE,mDAAmD;IACnD,MAAM,WAAW,GAAmB,gBAAgB,CAAC,MAAM,CAAC;QAC1D,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1B,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACjD,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,GAAG,GAAmB,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,OAAO;QAChF,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,oBAAoB,CAAC,WAAW,EAAE;YAChC,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,MAAM;YAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YAC3B,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC,MAAM,KAAK,SAAS;gBACnD,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;SACrD,CAAC,CAAC;IACP,uEAAuE;IACvE,sEAAsE;IACtE,wEAAwE;IACxE,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;QACxC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACvD,CAAC,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACzE,2EAA2E;IAC3E,yEAAyE;IACzE,qEAAqE;IACrE,gBAAgB,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,MAAgC;IACxD,OAAO,CACL,MAAM,KAAK,IAAI;QACf,OAAO,MAAM,KAAK,QAAQ;QAC1B,SAAS,IAAI,MAAM;QACnB,OAAQ,MAAiC,CAAC,QAAQ,KAAK,UAAU,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `getFirestore(ctx)` — the rules-enforced `SandboxFirestore` resolver.
|
|
3
|
+
* Dispatches to the local engine handle or the channel-backed remote arm
|
|
4
|
+
* depending on the context's sandbox brand.
|
|
5
|
+
*/
|
|
6
|
+
import { type AuthLens, type AuthState, type SandboxContext } from 'pyric/sandbox';
|
|
7
|
+
import type { SandboxFirestore } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Resolve the Firestore service handle for a context. Idempotent —
|
|
10
|
+
* subsequent calls with the same context return the same wrapper.
|
|
11
|
+
*
|
|
12
|
+
* Requires a `SandboxContext`, never a bare `Sandbox`. Anonymous is
|
|
13
|
+
* `sandbox.withAuth(null)`, written explicitly — every call site
|
|
14
|
+
* states identity.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { initializeSandbox } from 'pyric/sandbox';
|
|
19
|
+
* import { getFirestore } from 'pyric-admin/firestore';
|
|
20
|
+
*
|
|
21
|
+
* const sandbox = initializeSandbox();
|
|
22
|
+
* const db = getFirestore(sandbox.withAuth({ uid: 'alice' }));
|
|
23
|
+
* db.setRules(MY_RULES);
|
|
24
|
+
* db.seed({ documents: { 'tickets/T-1': { ... } } });
|
|
25
|
+
*
|
|
26
|
+
* // Different identity? Different context, same data.
|
|
27
|
+
* const dbAsBob = getFirestore(sandbox.withAuth({ uid: 'bob' }));
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function getFirestore(ctx: SandboxContext): SandboxFirestore;
|
|
31
|
+
/** Map a context's frozen `AuthState` to the worker-relay lens the remote
|
|
32
|
+
* arm pins on every op/sub. Never absent — see {@link getFirestore}. */
|
|
33
|
+
export declare function lensForAuth(auth: AuthState): AuthLens;
|
|
34
|
+
//# sourceMappingURL=get-firestore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-firestore.d.ts","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/get-firestore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAmB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AASnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,gBAAgB,CAsBlE;AAED;yEACyE;AACzE,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAKrD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `getFirestore(ctx)` — the rules-enforced `SandboxFirestore` resolver.
|
|
3
|
+
* Dispatches to the local engine handle or the channel-backed remote arm
|
|
4
|
+
* depending on the context's sandbox brand.
|
|
5
|
+
*/
|
|
6
|
+
import { isRemoteSandbox } from 'pyric/sandbox';
|
|
7
|
+
import { wrapWithErrorTranslation } from './error-translation.js';
|
|
8
|
+
import { buildFirestoreHandle } from './local-handle.js';
|
|
9
|
+
import { createRemoteFirestore } from './remote/remote-firestore.js';
|
|
10
|
+
/**
|
|
11
|
+
* Idempotency cache. Each `SandboxContext` gets its own handle because
|
|
12
|
+
* each context carries its own auth identity. Cached by reference,
|
|
13
|
+
* garbage-collected with the context.
|
|
14
|
+
*/
|
|
15
|
+
const handleCache = new WeakMap();
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the Firestore service handle for a context. Idempotent —
|
|
18
|
+
* subsequent calls with the same context return the same wrapper.
|
|
19
|
+
*
|
|
20
|
+
* Requires a `SandboxContext`, never a bare `Sandbox`. Anonymous is
|
|
21
|
+
* `sandbox.withAuth(null)`, written explicitly — every call site
|
|
22
|
+
* states identity.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { initializeSandbox } from 'pyric/sandbox';
|
|
27
|
+
* import { getFirestore } from 'pyric-admin/firestore';
|
|
28
|
+
*
|
|
29
|
+
* const sandbox = initializeSandbox();
|
|
30
|
+
* const db = getFirestore(sandbox.withAuth({ uid: 'alice' }));
|
|
31
|
+
* db.setRules(MY_RULES);
|
|
32
|
+
* db.seed({ documents: { 'tickets/T-1': { ... } } });
|
|
33
|
+
*
|
|
34
|
+
* // Different identity? Different context, same data.
|
|
35
|
+
* const dbAsBob = getFirestore(sandbox.withAuth({ uid: 'bob' }));
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export function getFirestore(ctx) {
|
|
39
|
+
const cached = handleCache.get(ctx);
|
|
40
|
+
if (cached)
|
|
41
|
+
return cached;
|
|
42
|
+
// REMOTE ARM (remote sandbox, slice 2): a remote-branded sandbox has no
|
|
43
|
+
// in-process engine — return the channel-backed parallel implementation
|
|
44
|
+
// instead of building the local compat handle. Identity mapping: the
|
|
45
|
+
// context's frozen auth pins the per-op lens — `withAuth(null)` means
|
|
46
|
+
// `{ mode: 'anon' }` (an ABSENT lens would silently resolve to the
|
|
47
|
+
// browser tab's port session), and a signed identity pins
|
|
48
|
+
// `{ mode: 'as', uid, token? }` with the FULL claims token (the worker
|
|
49
|
+
// resolves it via `sandbox.withAuth({ uid, token })`, so custom claims
|
|
50
|
+
// evaluate in rules exactly as on the local arm).
|
|
51
|
+
const fresh = isRemoteSandbox(ctx.sandbox)
|
|
52
|
+
? createRemoteFirestore(ctx.sandbox, lensForAuth(ctx.auth))
|
|
53
|
+
: // Wrap the raw handle so every operation (and every object returned
|
|
54
|
+
// from it: `DocumentReference`, `Query`, `WriteBatch`, `Transaction`)
|
|
55
|
+
// re-throws compat errors as `SandboxError` with structured
|
|
56
|
+
// `denialContext`. The wrapper also stashes `ctx` on every wrapped
|
|
57
|
+
// value via CONTEXT_SYMBOL so `onSnapshot` can recover it.
|
|
58
|
+
wrapWithErrorTranslation(buildFirestoreHandle(ctx), ctx);
|
|
59
|
+
handleCache.set(ctx, fresh);
|
|
60
|
+
return fresh;
|
|
61
|
+
}
|
|
62
|
+
/** Map a context's frozen `AuthState` to the worker-relay lens the remote
|
|
63
|
+
* arm pins on every op/sub. Never absent — see {@link getFirestore}. */
|
|
64
|
+
export function lensForAuth(auth) {
|
|
65
|
+
if (auth === null || auth === undefined)
|
|
66
|
+
return { mode: 'anon' };
|
|
67
|
+
return auth.token === undefined
|
|
68
|
+
? { mode: 'as', uid: auth.uid }
|
|
69
|
+
: { mode: 'as', uid: auth.uid, token: auth.token };
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=get-firestore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-firestore.js","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/get-firestore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAsD,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,WAAW,GAAG,IAAI,OAAO,EAAoC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,YAAY,CAAC,GAAmB;IAC9C,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,wEAAwE;IACxE,wEAAwE;IACxE,qEAAqE;IACrE,sEAAsE;IACtE,mEAAmE;IACnE,0DAA0D;IAC1D,uEAAuE;IACvE,uEAAuE;IACvE,kDAAkD;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;QACxC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3D,CAAC,CAAC,oEAAoE;YACpE,sEAAsE;YACtE,4DAA4D;YAC5D,mEAAmE;YACnE,2DAA2D;YAC3D,wBAAwB,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7D,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5B,OAAO,KAAK,CAAC;AACf,CAAC;AAED;yEACyE;AACzE,MAAM,UAAU,WAAW,CAAC,IAAe;IACzC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACjE,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS;QAC7B,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;QAC/B,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric-admin` — Admin-SDK-shaped chainable Firestore adapter for
|
|
3
|
+
* the Pyric sandbox.
|
|
4
|
+
*
|
|
5
|
+
* `getFirestore(ctx)` returns a `SandboxFirestore` whose operations
|
|
6
|
+
* run under the context's auth identity and against the underlying
|
|
7
|
+
* `LocalEnvironment` of the context's sandbox. Idempotent — a second
|
|
8
|
+
* call with the same `SandboxContext` returns the same wrapper.
|
|
9
|
+
*
|
|
10
|
+
* Wraps the `pyric/sandbox/admin-compat` implementation.
|
|
11
|
+
* Per-operation methods construct a fresh delegate so a
|
|
12
|
+
* `sandbox.reset()` (which swaps the underlying environment) is
|
|
13
|
+
* picked up on the next operation. Refs returned from the wrapper
|
|
14
|
+
* (`DocumentReference`, `Query`) are bound to whichever environment
|
|
15
|
+
* was live when they were obtained — re-acquire them after reset to
|
|
16
|
+
* avoid stale-state confusion.
|
|
17
|
+
*
|
|
18
|
+
* This file is the package export barrel only — re-exports from the
|
|
19
|
+
* concept files in this directory (`get-firestore.ts`,
|
|
20
|
+
* `get-admin-firestore.ts`, `listeners.ts`, `types.ts`,
|
|
21
|
+
* `local-handle.ts`, `error-translation.ts`, `remote/`). No
|
|
22
|
+
* implementation lives here.
|
|
23
|
+
*/
|
|
24
|
+
export type { AuthState, Sandbox, SandboxContext, } from 'pyric/sandbox';
|
|
25
|
+
export { SandboxError } from 'pyric/sandbox';
|
|
26
|
+
export type { AggregateField, AggregateQuerySnapshot, AggregateSpec, Filter, CollectionReference, DocumentData, DocumentReference, DocumentSnapshot as AdminDocumentSnapshot, FieldValueSentinel, Firestore, OrderDirection, Query, QueryDocumentSnapshot as AdminQueryDocumentSnapshot, QuerySnapshot as AdminQuerySnapshot, SetOptions, Transaction, WhereFilterOp, WriteBatch, } from 'pyric/sandbox/admin-compat';
|
|
27
|
+
export type { LintResult, LintWarning, RulesMetrics } from 'pyric/rules/internal';
|
|
28
|
+
export { FieldValue, Timestamp } from 'pyric/sandbox/admin-compat';
|
|
29
|
+
export type { LiveDocumentSnapshot as DocumentSnapshot, LiveQueryDocumentSnapshot as QueryDocumentSnapshot, LiveQuerySnapshot as QuerySnapshot, DocumentChange, DocumentChangeType, DocChangesOptions, SnapshotMetadata, } from 'pyric/sandbox/admin-compat';
|
|
30
|
+
export type { SandboxFirestore } from './types.js';
|
|
31
|
+
export type { SnapshotObserver, Unsubscribe } from './types.js';
|
|
32
|
+
export { getFirestore } from './get-firestore.js';
|
|
33
|
+
export { getAdminFirestore } from './get-admin-firestore.js';
|
|
34
|
+
export { onSnapshot } from './listeners.js';
|
|
35
|
+
export type { SnapshotListenOptions } from './listeners.js';
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,YAAY,EACV,SAAS,EACT,OAAO,EACP,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAY7C,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,MAAM,EACN,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,IAAI,qBAAqB,EACzC,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,KAAK,EACL,qBAAqB,IAAI,0BAA0B,EACnD,aAAa,IAAI,kBAAkB,EACnC,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAQnE,YAAY,EACV,oBAAoB,IAAI,gBAAgB,EACxC,yBAAyB,IAAI,qBAAqB,EAClD,iBAAiB,IAAI,aAAa,EAClC,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK7D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric-admin` — Admin-SDK-shaped chainable Firestore adapter for
|
|
3
|
+
* the Pyric sandbox.
|
|
4
|
+
*
|
|
5
|
+
* `getFirestore(ctx)` returns a `SandboxFirestore` whose operations
|
|
6
|
+
* run under the context's auth identity and against the underlying
|
|
7
|
+
* `LocalEnvironment` of the context's sandbox. Idempotent — a second
|
|
8
|
+
* call with the same `SandboxContext` returns the same wrapper.
|
|
9
|
+
*
|
|
10
|
+
* Wraps the `pyric/sandbox/admin-compat` implementation.
|
|
11
|
+
* Per-operation methods construct a fresh delegate so a
|
|
12
|
+
* `sandbox.reset()` (which swaps the underlying environment) is
|
|
13
|
+
* picked up on the next operation. Refs returned from the wrapper
|
|
14
|
+
* (`DocumentReference`, `Query`) are bound to whichever environment
|
|
15
|
+
* was live when they were obtained — re-acquire them after reset to
|
|
16
|
+
* avoid stale-state confusion.
|
|
17
|
+
*
|
|
18
|
+
* This file is the package export barrel only — re-exports from the
|
|
19
|
+
* concept files in this directory (`get-firestore.ts`,
|
|
20
|
+
* `get-admin-firestore.ts`, `listeners.ts`, `types.ts`,
|
|
21
|
+
* `local-handle.ts`, `error-translation.ts`, `remote/`). No
|
|
22
|
+
* implementation lives here.
|
|
23
|
+
*/
|
|
24
|
+
export { SandboxError } from 'pyric/sandbox';
|
|
25
|
+
export { FieldValue, Timestamp } from 'pyric/sandbox/admin-compat';
|
|
26
|
+
// Service resolvers.
|
|
27
|
+
export { getFirestore } from './get-firestore.js';
|
|
28
|
+
export { getAdminFirestore } from './get-admin-firestore.js';
|
|
29
|
+
// `onSnapshot` — the free modular-shaped function, its options type, and
|
|
30
|
+
// the live-vs-frozen marker the modular `pyric/firestore` layer stamps
|
|
31
|
+
// onto listener options (see `listeners.ts`).
|
|
32
|
+
export { onSnapshot } from './listeners.js';
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAUH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAiC7C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAsBnE,qBAAqB;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,yEAAyE;AACzE,uEAAuE;AACvE,8CAA8C;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `onSnapshot` — Web-SDK-shaped streaming reads over the chainable Admin
|
|
3
|
+
* surface. The four overloads mirror `firebase/firestore`'s `onSnapshot`
|
|
4
|
+
* so existing call sites copied from production code typecheck
|
|
5
|
+
* unchanged.
|
|
6
|
+
*
|
|
7
|
+
* Routing:
|
|
8
|
+
* - `DocumentReference` → `LocalEnvironment.addSnapshotListener`
|
|
9
|
+
* with `target = { kind: 'doc', path }`.
|
|
10
|
+
* - `CollectionReference` (and any `Query` whose collection root is
|
|
11
|
+
* reachable via `.path` or `.parent.path`) → `target = { kind: 'query', collection }`.
|
|
12
|
+
* - Chained queries (`.where`/`.orderBy`/`.limit`) currently route as
|
|
13
|
+
* whole-collection listeners; the simulator fires for any change in
|
|
14
|
+
* the collection, and the callback receives every document. Slice 6
|
|
15
|
+
* will add filter/order honoring at the listener layer.
|
|
16
|
+
*
|
|
17
|
+
* The registering context's `auth` is captured at register time and
|
|
18
|
+
* threaded through to `addSnapshotListener` so notifications evaluate
|
|
19
|
+
* rules under the auth that subscribed — not whatever auth happens to
|
|
20
|
+
* be active when a write triggers dispatch
|
|
21
|
+
* (`addSnapshotListener`'s auth-capture invariant).
|
|
22
|
+
*
|
|
23
|
+
* REMOTE ARM: refs minted by the channel-backed handle carry their own
|
|
24
|
+
* listener registrar (`getRemoteSnapshotRegistrar`) — dispatched before
|
|
25
|
+
* any local-engine resolution, since `getInternalEnv` rejects remote
|
|
26
|
+
* handles.
|
|
27
|
+
*/
|
|
28
|
+
import type { CollectionReference, DocumentReference, Query, SnapshotListenerOptions } from 'pyric/sandbox/admin-compat';
|
|
29
|
+
import type { SnapshotObserver, Unsubscribe } from './types.js';
|
|
30
|
+
/**
|
|
31
|
+
* Mirrors `firebase/firestore`'s `SnapshotListenOptions`. The
|
|
32
|
+
* `includeMetadataChanges` flag is accepted for API parity but has no
|
|
33
|
+
* observable effect in the sandbox: there's no offline cache and no
|
|
34
|
+
* pending-writes window, so `metadata.fromCache` and
|
|
35
|
+
* `metadata.hasPendingWrites` are always `false` (snapshot-listeners.ts section 6).
|
|
36
|
+
*/
|
|
37
|
+
export type SnapshotListenOptions = SnapshotListenerOptions;
|
|
38
|
+
export declare function onSnapshot(reference: DocumentReference, observer: SnapshotObserver<import('pyric/sandbox/admin-compat').LiveDocumentSnapshot>): Unsubscribe;
|
|
39
|
+
export declare function onSnapshot(reference: DocumentReference, options: SnapshotListenOptions, observer: SnapshotObserver<import('pyric/sandbox/admin-compat').LiveDocumentSnapshot>): Unsubscribe;
|
|
40
|
+
export declare function onSnapshot(reference: DocumentReference, onNext: (snapshot: import('pyric/sandbox/admin-compat').LiveDocumentSnapshot) => void, onError?: (error: unknown) => void, onCompletion?: () => void): Unsubscribe;
|
|
41
|
+
export declare function onSnapshot(reference: DocumentReference, options: SnapshotListenOptions, onNext: (snapshot: import('pyric/sandbox/admin-compat').LiveDocumentSnapshot) => void, onError?: (error: unknown) => void, onCompletion?: () => void): Unsubscribe;
|
|
42
|
+
export declare function onSnapshot(reference: Query | CollectionReference, observer: SnapshotObserver<import('pyric/sandbox/admin-compat').LiveQuerySnapshot>): Unsubscribe;
|
|
43
|
+
export declare function onSnapshot(reference: Query | CollectionReference, options: SnapshotListenOptions, observer: SnapshotObserver<import('pyric/sandbox/admin-compat').LiveQuerySnapshot>): Unsubscribe;
|
|
44
|
+
export declare function onSnapshot(reference: Query | CollectionReference, onNext: (snapshot: import('pyric/sandbox/admin-compat').LiveQuerySnapshot) => void, onError?: (error: unknown) => void, onCompletion?: () => void): Unsubscribe;
|
|
45
|
+
export declare function onSnapshot(reference: Query | CollectionReference, options: SnapshotListenOptions, onNext: (snapshot: import('pyric/sandbox/admin-compat').LiveQuerySnapshot) => void, onError?: (error: unknown) => void, onCompletion?: () => void): Unsubscribe;
|
|
46
|
+
//# sourceMappingURL=listeners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/listeners.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,EACL,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAQpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAMhE;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAiF5D,wBAAgB,UAAU,CACxB,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,gBAAgB,CAAC,OAAO,4BAA4B,EAAE,oBAAoB,CAAC,GACpF,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,gBAAgB,CAAC,OAAO,4BAA4B,EAAE,oBAAoB,CAAC,GACpF,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,4BAA4B,EAAE,oBAAoB,KAAK,IAAI,EACrF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAClC,YAAY,CAAC,EAAE,MAAM,IAAI,GACxB,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,4BAA4B,EAAE,oBAAoB,KAAK,IAAI,EACrF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAClC,YAAY,CAAC,EAAE,MAAM,IAAI,GACxB,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,KAAK,GAAG,mBAAmB,EACtC,QAAQ,EAAE,gBAAgB,CAAC,OAAO,4BAA4B,EAAE,iBAAiB,CAAC,GACjF,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,KAAK,GAAG,mBAAmB,EACtC,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,gBAAgB,CAAC,OAAO,4BAA4B,EAAE,iBAAiB,CAAC,GACjF,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,KAAK,GAAG,mBAAmB,EACtC,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,4BAA4B,EAAE,iBAAiB,KAAK,IAAI,EAClF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAClC,YAAY,CAAC,EAAE,MAAM,IAAI,GACxB,WAAW,CAAC;AACf,wBAAgB,UAAU,CACxB,SAAS,EAAE,KAAK,GAAG,mBAAmB,EACtC,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,4BAA4B,EAAE,iBAAiB,KAAK,IAAI,EAClF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAClC,YAAY,CAAC,EAAE,MAAM,IAAI,GACxB,WAAW,CAAC"}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `onSnapshot` — Web-SDK-shaped streaming reads over the chainable Admin
|
|
3
|
+
* surface. The four overloads mirror `firebase/firestore`'s `onSnapshot`
|
|
4
|
+
* so existing call sites copied from production code typecheck
|
|
5
|
+
* unchanged.
|
|
6
|
+
*
|
|
7
|
+
* Routing:
|
|
8
|
+
* - `DocumentReference` → `LocalEnvironment.addSnapshotListener`
|
|
9
|
+
* with `target = { kind: 'doc', path }`.
|
|
10
|
+
* - `CollectionReference` (and any `Query` whose collection root is
|
|
11
|
+
* reachable via `.path` or `.parent.path`) → `target = { kind: 'query', collection }`.
|
|
12
|
+
* - Chained queries (`.where`/`.orderBy`/`.limit`) currently route as
|
|
13
|
+
* whole-collection listeners; the simulator fires for any change in
|
|
14
|
+
* the collection, and the callback receives every document. Slice 6
|
|
15
|
+
* will add filter/order honoring at the listener layer.
|
|
16
|
+
*
|
|
17
|
+
* The registering context's `auth` is captured at register time and
|
|
18
|
+
* threaded through to `addSnapshotListener` so notifications evaluate
|
|
19
|
+
* rules under the auth that subscribed — not whatever auth happens to
|
|
20
|
+
* be active when a write triggers dispatch
|
|
21
|
+
* (`addSnapshotListener`'s auth-capture invariant).
|
|
22
|
+
*
|
|
23
|
+
* REMOTE ARM: refs minted by the channel-backed handle carry their own
|
|
24
|
+
* listener registrar (`getRemoteSnapshotRegistrar`) — dispatched before
|
|
25
|
+
* any local-engine resolution, since `getInternalEnv` rejects remote
|
|
26
|
+
* handles.
|
|
27
|
+
*/
|
|
28
|
+
import { SandboxError } from 'pyric/sandbox';
|
|
29
|
+
import { getInternalEnv } from 'pyric/sandbox/internal';
|
|
30
|
+
import { BYPASS_RULES_SYMBOL, CONTEXT_SYMBOL, registerOnSnapshotImpl, } from './error-translation.js';
|
|
31
|
+
import { getRemoteSnapshotRegistrar, registerRemoteOnSnapshotImpl } from './remote/listeners.js';
|
|
32
|
+
import { AUTH_SESSION_SCOPE, FOLLOWS_CURRENT_USER, } from 'pyric/firestore/internal';
|
|
33
|
+
/**
|
|
34
|
+
* Internal channel for the modular `pyric/firestore` layer to mark a
|
|
35
|
+
* listener as live (identity follows `sandbox.currentUser`) vs frozen
|
|
36
|
+
* (`getFirestore(ctx)`, pinned identity). The chainable adapter sees only
|
|
37
|
+
* a `SandboxContext` per call and can't tell the two apart on its own — the
|
|
38
|
+
* live-vs-frozen distinction lives one layer up. The modular `onSnapshot`
|
|
39
|
+
* stamps this symbol onto the options object it forwards; {@link onSnapshot}
|
|
40
|
+
* here reads + strips it and threads the boolean into
|
|
41
|
+
* `LocalEnvironment.addSnapshotListener`'s `followsCurrentUser` parameter.
|
|
42
|
+
*
|
|
43
|
+
* Symbol-keyed (not a named field) so it never collides with a real
|
|
44
|
+
* `SnapshotListenOptions` field and never leaks to consumer code.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Extract a `{ collectionPath }` for query-shaped refs. The compat
|
|
48
|
+
* `QueryImpl` keeps its `collectionPath` as a `protected` field, but
|
|
49
|
+
* `CollectionRefImpl` exposes it via the public `path` getter, and
|
|
50
|
+
* chained queries (the only thing `where`/`orderBy`/`limit` produces)
|
|
51
|
+
* inherit from `QueryImpl` — both expose the same internal field.
|
|
52
|
+
*
|
|
53
|
+
* Read it via a structural lookup rather than `instanceof` so this
|
|
54
|
+
* adapter never has to import the compat impl class (which would create
|
|
55
|
+
* a circular dependency through `pyric/sandbox/admin-compat`).
|
|
56
|
+
*
|
|
57
|
+
* Returns `null` for refs we cannot route (anonymous/foreign Query
|
|
58
|
+
* implementations); the caller throws a clear remediation error.
|
|
59
|
+
*/
|
|
60
|
+
function extractCollectionPath(ref) {
|
|
61
|
+
if (ref === null || typeof ref !== 'object')
|
|
62
|
+
return null;
|
|
63
|
+
const obj = ref;
|
|
64
|
+
// CollectionReference exposes `path` publicly.
|
|
65
|
+
if (typeof obj.path === 'string' && obj.path.length > 0)
|
|
66
|
+
return obj.path;
|
|
67
|
+
// QueryImpl keeps it on a protected field; protected is a TypeScript-
|
|
68
|
+
// only restriction at runtime, so this lookup succeeds for anything
|
|
69
|
+
// produced by `db.collection('x').where(...)` etc.
|
|
70
|
+
if (typeof obj.collectionPath === 'string' && obj.collectionPath.length > 0) {
|
|
71
|
+
return obj.collectionPath;
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Pull the query's `where` / `orderBy` / cursor / `limit` constraints
|
|
77
|
+
* off a query-shaped ref as a pure row transformer (FS-B2), so a
|
|
78
|
+
* filtered `onSnapshot(query(...))` delivers the same membership as a
|
|
79
|
+
* one-shot `getDocs(query(...))`. `QueryImpl.snapshotConstraints()` is a
|
|
80
|
+
* public method on every query produced by `db.collection(...).where(...)`
|
|
81
|
+
* etc.; a bare `CollectionReference` returns `undefined` (no filtering).
|
|
82
|
+
* Structural lookup keeps this adapter from importing the compat class.
|
|
83
|
+
*/
|
|
84
|
+
function extractSnapshotConstraints(ref) {
|
|
85
|
+
if (ref !== null && typeof ref === 'object') {
|
|
86
|
+
const fn = ref.snapshotConstraints;
|
|
87
|
+
if (typeof fn === 'function') {
|
|
88
|
+
return fn.call(ref);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Discriminate a `DocumentReference` from a `Query`/`CollectionReference`.
|
|
95
|
+
* The Admin-shaped `DocumentReference` always has a `parent: CollectionReference`
|
|
96
|
+
* field; `Query` and `CollectionReference` do not have a `parent` field.
|
|
97
|
+
*/
|
|
98
|
+
function isDocumentReference(ref) {
|
|
99
|
+
if (ref === null || typeof ref !== 'object')
|
|
100
|
+
return false;
|
|
101
|
+
const obj = ref;
|
|
102
|
+
return (typeof obj.path === 'string' &&
|
|
103
|
+
obj.path.length > 0 &&
|
|
104
|
+
obj.parent !== undefined &&
|
|
105
|
+
obj.parent !== null);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Implementation. The argument shape is normalized into
|
|
109
|
+
* `{ options, onNext, onError, onCompletion }` here, then routed to
|
|
110
|
+
* `LocalEnvironment.addSnapshotListener`.
|
|
111
|
+
*
|
|
112
|
+
* `onCompletion` is accepted but never invoked: the local listener
|
|
113
|
+
* stream has no terminal state. Documented in the `SnapshotObserver`
|
|
114
|
+
* contract.
|
|
115
|
+
*
|
|
116
|
+
* Routing failures (Query without a discoverable collection path, or a
|
|
117
|
+
* ref that is neither doc nor query) throw immediately — they indicate
|
|
118
|
+
* a programming mistake the caller can fix. Per-call rule denials, by
|
|
119
|
+
* contrast, are routed through `onError` (or swallowed if no handler is
|
|
120
|
+
* supplied), matching production `onSnapshot` behavior.
|
|
121
|
+
*/
|
|
122
|
+
export function onSnapshot(reference,
|
|
123
|
+
// `any`-typed callback in the impl signature is intentional: each
|
|
124
|
+
// overload narrows the callback to a specific snapshot shape, but
|
|
125
|
+
// function parameter types are contravariant — a `(snap: LiveDoc) => void`
|
|
126
|
+
// is *not* assignable to a `(snap: unknown) => void`. Using `any`
|
|
127
|
+
// here keeps every overload assignable to the impl signature without
|
|
128
|
+
// weakening the public surface (the overloads are what consumers see).
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
130
|
+
arg2,
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
132
|
+
arg3, arg4, arg5) {
|
|
133
|
+
// ── Normalize the (options, observer | callback set) variations. ──
|
|
134
|
+
let options = {};
|
|
135
|
+
let onNext;
|
|
136
|
+
let onError;
|
|
137
|
+
// Detect whether arg2 is the SnapshotListenOptions slot. The options
|
|
138
|
+
// object is the only plain-object value at arg2 that lacks both `next`
|
|
139
|
+
// and an `error` handler shaped like a function — the observer form
|
|
140
|
+
// always has at least one handler. This matches how the Web SDK
|
|
141
|
+
// discriminates.
|
|
142
|
+
const arg2IsOptions = typeof arg2 === 'object' &&
|
|
143
|
+
arg2 !== null &&
|
|
144
|
+
typeof arg2.next !== 'function' &&
|
|
145
|
+
typeof arg2.error !== 'function' &&
|
|
146
|
+
typeof arg2.complete !== 'function';
|
|
147
|
+
if (arg2IsOptions) {
|
|
148
|
+
options = arg2;
|
|
149
|
+
if (typeof arg3 === 'function') {
|
|
150
|
+
onNext = arg3;
|
|
151
|
+
onError = arg4;
|
|
152
|
+
// arg5 is onCompletion — accepted, never invoked (no terminal state).
|
|
153
|
+
}
|
|
154
|
+
else if (typeof arg3 === 'object' && arg3 !== null) {
|
|
155
|
+
const obs = arg3;
|
|
156
|
+
onNext = obs.next;
|
|
157
|
+
onError = obs.error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else if (typeof arg2 === 'function') {
|
|
161
|
+
onNext = arg2;
|
|
162
|
+
onError = arg3;
|
|
163
|
+
// arg4 is onCompletion — accepted, never invoked.
|
|
164
|
+
}
|
|
165
|
+
else if (typeof arg2 === 'object' && arg2 !== null) {
|
|
166
|
+
const obs = arg2;
|
|
167
|
+
onNext = obs.next;
|
|
168
|
+
onError = obs.error;
|
|
169
|
+
}
|
|
170
|
+
if (!onNext && !onError) {
|
|
171
|
+
// FS-B14 — prod accepts an observer carrying only `error` (or
|
|
172
|
+
// `complete`); it registers and routes denials to the error handler.
|
|
173
|
+
// Only a fully-empty observer (no next AND no error) is a programming
|
|
174
|
+
// error. Pre-fix this required `next`, so an `{ error: fn }` observer
|
|
175
|
+
// threw "missing next handler".
|
|
176
|
+
throw new TypeError('onSnapshot: missing handler. Provide a callback, or an observer with a ' +
|
|
177
|
+
'`next` and/or `error` method.');
|
|
178
|
+
}
|
|
179
|
+
// The local listener stream has no terminal state, so a `next`-less
|
|
180
|
+
// observer registers purely to receive errors — `onNext` stays undefined
|
|
181
|
+
// and `addSnapshotListener` only fires the error path.
|
|
182
|
+
// ── REMOTE ARM: refs minted by the channel-backed handle carry their
|
|
183
|
+
// own listener registrar — dispatch on it BEFORE any local-engine
|
|
184
|
+
// resolution (`getInternalEnv` rejects remote handles). The registrar
|
|
185
|
+
// pins the handle's auth lens on the worker subscription; error
|
|
186
|
+
// callbacks receive `SandboxError`s with `denialContext` when the
|
|
187
|
+
// worker carried one.
|
|
188
|
+
const remoteRegistrar = getRemoteSnapshotRegistrar(reference);
|
|
189
|
+
if (remoteRegistrar) {
|
|
190
|
+
if (options[FOLLOWS_CURRENT_USER] === true) {
|
|
191
|
+
// The live-listener marker is stamped by the modular browser layer,
|
|
192
|
+
// which never runs against a remote handle — defensive throw so a
|
|
193
|
+
// future mis-wiring fails loudly instead of silently freezing.
|
|
194
|
+
throw new SandboxError('unimplemented', 'onSnapshot: live (follows-current-user) listeners are not supported on a ' +
|
|
195
|
+
'remote sandbox — remote listeners are frozen to the identity of the ' +
|
|
196
|
+
'context that created the ref.');
|
|
197
|
+
}
|
|
198
|
+
return remoteRegistrar(options, onNext, onError);
|
|
199
|
+
}
|
|
200
|
+
// ── Resolve the context + target from the ref. ──
|
|
201
|
+
const ctx = contextFromRef(reference);
|
|
202
|
+
const env = getInternalEnv(ctx.sandbox);
|
|
203
|
+
let target;
|
|
204
|
+
if (isDocumentReference(reference)) {
|
|
205
|
+
target = { kind: 'doc', path: reference.path };
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
const collectionPath = extractCollectionPath(reference);
|
|
209
|
+
if (collectionPath === null) {
|
|
210
|
+
throw new TypeError('onSnapshot: could not determine the collection path for this Query. ' +
|
|
211
|
+
'Pass a CollectionReference or a Query produced by `.where`/`.orderBy`/`.limit` ' +
|
|
212
|
+
'on a CollectionReference obtained from `getFirestore(ctx)`.');
|
|
213
|
+
}
|
|
214
|
+
// FS-B2 — thread the query's where/orderBy/limit/cursor constraints
|
|
215
|
+
// into the target so the listener delivers a filtered/ordered/limited
|
|
216
|
+
// view (matching getDocs), not the whole collection.
|
|
217
|
+
const constraints = extractSnapshotConstraints(reference);
|
|
218
|
+
target = { kind: 'query', collection: collectionPath, constraints };
|
|
219
|
+
}
|
|
220
|
+
// Read the live-vs-frozen marker the modular layer stamped onto the
|
|
221
|
+
// options object (FOLLOWS_CURRENT_USER), then strip it so it never
|
|
222
|
+
// reaches the listener record's public `options`. Absent ⇒ frozen
|
|
223
|
+
// (the safe default for any direct chainable-adapter caller).
|
|
224
|
+
const followsCurrentUser = options[FOLLOWS_CURRENT_USER] === true;
|
|
225
|
+
const authScope = options[AUTH_SESSION_SCOPE];
|
|
226
|
+
const bypassRules = reference[BYPASS_RULES_SYMBOL] === true;
|
|
227
|
+
if (FOLLOWS_CURRENT_USER in options) {
|
|
228
|
+
const { [FOLLOWS_CURRENT_USER]: _omit, ...rest } = options;
|
|
229
|
+
options = rest;
|
|
230
|
+
}
|
|
231
|
+
if (AUTH_SESSION_SCOPE in options) {
|
|
232
|
+
const { [AUTH_SESSION_SCOPE]: _omit, ...rest } = options;
|
|
233
|
+
options = rest;
|
|
234
|
+
}
|
|
235
|
+
// A `next`-less (error-only) observer registers with a no-op data handler
|
|
236
|
+
// so the listener machinery stays on its non-optional callback contract;
|
|
237
|
+
// denials still route to `onError` (FS-B14).
|
|
238
|
+
return env.addSnapshotListener(target, onNext ?? (() => { }), options, ctx.auth, onError, followsCurrentUser, bypassRules, authScope);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Recover the {@link SandboxContext} that produced a ref. Refs returned
|
|
242
|
+
* from `db.doc(path)` / `db.collection(path)` are wrapped by
|
|
243
|
+
* `wrapWithErrorTranslation`, which stashes the owning context on the
|
|
244
|
+
* `CONTEXT_SYMBOL` property of every wrapped object. Reading that
|
|
245
|
+
* symbol gives us the auth + sandbox in one step — multiple contexts
|
|
246
|
+
* can share an env, and this lookup correctly picks the one that
|
|
247
|
+
* produced *this* ref.
|
|
248
|
+
*/
|
|
249
|
+
function contextFromRef(ref) {
|
|
250
|
+
if (ref === null || typeof ref !== 'object') {
|
|
251
|
+
throw new TypeError('onSnapshot: reference must be a DocumentReference or Query.');
|
|
252
|
+
}
|
|
253
|
+
const ctx = ref[CONTEXT_SYMBOL];
|
|
254
|
+
if (!ctx) {
|
|
255
|
+
throw new TypeError('onSnapshot: reference was not produced by a sandbox context — pass a ref obtained from `getFirestore(ctx)`.');
|
|
256
|
+
}
|
|
257
|
+
return ctx;
|
|
258
|
+
}
|
|
259
|
+
// ─── Chainable `.onSnapshot(...)` shim ─────────────────────────────────
|
|
260
|
+
//
|
|
261
|
+
// The free `onSnapshot(ref, observer)` function above mirrors
|
|
262
|
+
// `firebase/firestore`'s modular shape. The rest of `pyric-admin` is
|
|
263
|
+
// chainable-method-shaped, though, and agents reach for
|
|
264
|
+
// `db.collection(path).where(...).onSnapshot(cb)` more often than the
|
|
265
|
+
// free form. To eliminate the asymmetry without losing the modular
|
|
266
|
+
// surface, we declare a chainable `.onSnapshot(...)` method on
|
|
267
|
+
// DocumentReference/CollectionReference/Query via module augmentation
|
|
268
|
+
// and synthesize the implementation in the error-translation Proxy.
|
|
269
|
+
// Both forms route through the same listener registration.
|
|
270
|
+
//
|
|
271
|
+
// The free function stays exported — both styles are first-class.
|
|
272
|
+
// Augmentation made the chainable `.onSnapshot()` method appear on
|
|
273
|
+
// DocumentReference and Query. Under the consolidated layout (admin-compat
|
|
274
|
+
// and admin-firestore in the same package), the augmentation strict-checks
|
|
275
|
+
// every impl class against this signature, which breaks the impl classes
|
|
276
|
+
// that don't define `.onSnapshot()` directly (the Proxy synthesizes it).
|
|
277
|
+
//
|
|
278
|
+
// Post-cutover behavior: use the free `onSnapshot(ref, observer)` function
|
|
279
|
+
// exported above. The chainable `ref.onSnapshot()` continues to work at
|
|
280
|
+
// runtime via the Proxy in error-translation.ts, but is no longer typed.
|
|
281
|
+
// A future iteration can revive the typed chainable variant by moving the
|
|
282
|
+
// augmentation into a separate consumer-facing declaration file that's
|
|
283
|
+
// excluded from impl compilation.
|
|
284
|
+
// Wire the synthesizer. Done at module init, after `onSnapshot` is
|
|
285
|
+
// fully declared so the function reference is stable. The remote arm's
|
|
286
|
+
// chainable `ref.onSnapshot(...)` late-binds through the same free
|
|
287
|
+
// function (a static import back from remote/listeners.ts would be a cycle).
|
|
288
|
+
registerOnSnapshotImpl(onSnapshot);
|
|
289
|
+
registerRemoteOnSnapshotImpl(onSnapshot);
|
|
290
|
+
//# sourceMappingURL=listeners.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../src/sandbox/admin-firestore/listeners.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw local-engine `SandboxFirestore` builder — wraps the
|
|
3
|
+
* `pyric/sandbox/admin-compat` implementation for one `SandboxContext`.
|
|
4
|
+
* Used by both `get-firestore.ts` (rules-enforced) and
|
|
5
|
+
* `get-admin-firestore.ts` (rules-bypassing); the `bypassRules` flag is
|
|
6
|
+
* the only difference between the two callers.
|
|
7
|
+
*/
|
|
8
|
+
import { type SandboxContext } from 'pyric/sandbox';
|
|
9
|
+
import type { SandboxFirestore } from './types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Build a `SandboxFirestore` that delegates each operation to a freshly
|
|
12
|
+
* constructed compat impl. Constructing the delegate per-call is cheap
|
|
13
|
+
* (no allocation cost beyond the class instance) and ensures the
|
|
14
|
+
* operation reads from whatever environment the sandbox currently
|
|
15
|
+
* exposes — `reset()` propagates without explicit cache invalidation.
|
|
16
|
+
*
|
|
17
|
+
* The handle ignores any per-op `OperationOptions` it receives and
|
|
18
|
+
* always issues operations under `ctx.auth`. To test as a different
|
|
19
|
+
* user, derive a sibling context via `sandbox.withAuth(...)` and
|
|
20
|
+
* attach a service handle to that.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildFirestoreHandle(ctx: SandboxContext, bypassRules?: boolean): SandboxFirestore;
|
|
23
|
+
//# sourceMappingURL=local-handle.d.ts.map
|