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,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when the queue contains a `delete` followed by another write
|
|
3
|
+
* at the same path. The combination is unprobed; v1 errors instead of
|
|
4
|
+
* guessing. The wrapper in the commit path (Item 2) translates this
|
|
5
|
+
* to a `FirestoreSimError { code: 'failed-precondition' }` with a
|
|
6
|
+
* message naming the unprobed combo.
|
|
7
|
+
*/
|
|
8
|
+
export class AmbiguousPostDeleteWriteError extends Error {
|
|
9
|
+
path;
|
|
10
|
+
secondMethod;
|
|
11
|
+
constructor(path, secondMethod) {
|
|
12
|
+
super(`Queued ${secondMethod} on '${path}' after a delete in the same ` +
|
|
13
|
+
`transaction. This combination is unprobed against production ` +
|
|
14
|
+
`Firestore; refusing to guess. Either drop the delete or split ` +
|
|
15
|
+
`into two transactions.`);
|
|
16
|
+
this.name = 'AmbiguousPostDeleteWriteError';
|
|
17
|
+
this.path = path;
|
|
18
|
+
this.secondMethod = secondMethod;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Collapse the per-path queue into one `BatchOperation` per path.
|
|
23
|
+
*
|
|
24
|
+
* - Iterates writes in queue order.
|
|
25
|
+
* - For each path, maintains the "effective op" (method + accumulated
|
|
26
|
+
* data) and folds in subsequent writes per the table above.
|
|
27
|
+
* - Throws `AmbiguousPostDeleteWriteError` on `delete + anything`.
|
|
28
|
+
*/
|
|
29
|
+
export function mergeQueuedWrites(writes) {
|
|
30
|
+
// Insertion-ordered map keeps the output stable for callers that
|
|
31
|
+
// care about ordering across paths (none today, but cheap to preserve).
|
|
32
|
+
const byPath = new Map();
|
|
33
|
+
for (const w of writes) {
|
|
34
|
+
const prior = byPath.get(w.path);
|
|
35
|
+
if (prior === undefined) {
|
|
36
|
+
byPath.set(w.path, toBatchOp(w));
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (prior.method === 'delete') {
|
|
40
|
+
throw new AmbiguousPostDeleteWriteError(w.path, w.method);
|
|
41
|
+
}
|
|
42
|
+
byPath.set(w.path, fold(prior, w));
|
|
43
|
+
}
|
|
44
|
+
return Array.from(byPath.values());
|
|
45
|
+
}
|
|
46
|
+
/** Convert a single queued write to its initial `BatchOperation` shape. */
|
|
47
|
+
function toBatchOp(w) {
|
|
48
|
+
if (w.method === 'delete') {
|
|
49
|
+
return { method: 'delete', path: w.path };
|
|
50
|
+
}
|
|
51
|
+
// set / create / update all carry data; queue invariant.
|
|
52
|
+
if (w.data === undefined) {
|
|
53
|
+
throw new Error(`internal: queued ${w.method} on ${w.path} has no data — ` +
|
|
54
|
+
`Transaction class invariant violated`);
|
|
55
|
+
}
|
|
56
|
+
return { method: w.method, path: w.path, data: w.data };
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Fold a new queued write into an existing same-path effective op.
|
|
60
|
+
* Pre: `prior.method !== 'delete'` (caller checked).
|
|
61
|
+
*/
|
|
62
|
+
function fold(prior, next) {
|
|
63
|
+
switch (next.method) {
|
|
64
|
+
case 'delete':
|
|
65
|
+
// Anything-then-delete: final state is gone.
|
|
66
|
+
return { method: 'delete', path: next.path };
|
|
67
|
+
case 'set': {
|
|
68
|
+
// Anything-then-set: set replaces entirely. The earlier op is
|
|
69
|
+
// semantically erased (Admin's set is overwrite).
|
|
70
|
+
const data = requireData(next);
|
|
71
|
+
return { method: 'set', path: next.path, data };
|
|
72
|
+
}
|
|
73
|
+
case 'update': {
|
|
74
|
+
// Merge update fields onto the prior payload. Last-wins per
|
|
75
|
+
// field; earlier non-overlapping fields preserved (probe 0.D).
|
|
76
|
+
const updateData = requireData(next);
|
|
77
|
+
const priorData = prior.data ?? {};
|
|
78
|
+
const merged = { ...priorData, ...updateData };
|
|
79
|
+
// Method stays the same as prior — set+update keeps `set`,
|
|
80
|
+
// create+update keeps `create`, update+update stays `update`.
|
|
81
|
+
// This preserves the "structural failure" semantics: a `create`
|
|
82
|
+
// that's later updated still throws `already-exists` if the doc
|
|
83
|
+
// exists at commit, which is what production would do.
|
|
84
|
+
return { method: prior.method, path: next.path, data: merged };
|
|
85
|
+
}
|
|
86
|
+
case 'create': {
|
|
87
|
+
// create-after-anything-non-delete is unusual but well-defined:
|
|
88
|
+
// the prior op already established intent, then create adds a
|
|
89
|
+
// fail-on-exists guard. We honor the most recent intent — if
|
|
90
|
+
// someone queued `update` then `create`, the final intent is
|
|
91
|
+
// create-with-merged-data. This is consistent with the
|
|
92
|
+
// update-after-create case and avoids a third "ambiguous" throw.
|
|
93
|
+
const createData = requireData(next);
|
|
94
|
+
const priorData = prior.data ?? {};
|
|
95
|
+
const merged = { ...priorData, ...createData };
|
|
96
|
+
return { method: 'create', path: next.path, data: merged };
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function requireData(w) {
|
|
101
|
+
if (w.data === undefined) {
|
|
102
|
+
throw new Error(`internal: queued ${w.method} on ${w.path} has no data — ` +
|
|
103
|
+
`Transaction class invariant violated`);
|
|
104
|
+
}
|
|
105
|
+
return w.data;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=transaction-merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-merge.js","sourceRoot":"","sources":["../../../src/sandbox/firestore/transaction-merge.ts"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IAC7C,IAAI,CAAS;IACb,YAAY,CAAS;IAC9B,YAAY,IAAY,EAAE,YAAoB;QAC5C,KAAK,CACH,UAAU,YAAY,QAAQ,IAAI,+BAA+B;YACjE,+DAA+D;YAC/D,gEAAgE;YAChE,wBAAwB,CACzB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAA8B;IAC9D,iEAAiE;IACjE,wEAAwE;IACxE,MAAM,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEjD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAA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IAAI,iBAAiB;YAC1D,sCAAsC,CACvC,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,CAAC,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Item 1.1 — Transaction type surface.
|
|
3
|
+
*
|
|
4
|
+
* Locked decisions live in the design rationale's
|
|
5
|
+
* Decisions Log. Re-stated here only as inline anchors:
|
|
6
|
+
*
|
|
7
|
+
* - 0.B: `tx.get` of a missing doc returns `{ exists: false, data: () =>
|
|
8
|
+
* undefined }`. Never throws. Mirrors Admin SDK shape.
|
|
9
|
+
* - 0.C: `tx.getAll(...paths)` returns snapshots in input order.
|
|
10
|
+
* - 0.A + 0.J: read-before-write ordering is GLOBAL — any write method
|
|
11
|
+
* flips a per-tx flag; subsequent reads throw `failed-precondition`.
|
|
12
|
+
* - 0.D: same-path multi-write merges on commit (last-wins per field).
|
|
13
|
+
* The merge happens at commit time in `transaction-merge.ts`; the
|
|
14
|
+
* queue here is append-only.
|
|
15
|
+
* - 0.G: callback exceptions propagate unchanged. The result types
|
|
16
|
+
* here only describe the *successful* (or rule-denied) path; thrown
|
|
17
|
+
* errors don't construct a `TransactionResult`.
|
|
18
|
+
* - 0.H: no `retries` field. Single-threaded simulator can't trigger
|
|
19
|
+
* conflicts. Documented as a known limitation.
|
|
20
|
+
*/
|
|
21
|
+
import type { DocumentData } from './local-state.js';
|
|
22
|
+
import type { AgentEvent } from './event-log.js';
|
|
23
|
+
import type { FirestoreSimError } from './errors.js';
|
|
24
|
+
import type { EventProvenance } from '../types/events.js';
|
|
25
|
+
/**
|
|
26
|
+
* Snapshot shape returned by `tx.get` / `tx.getAll`. Matches the Admin
|
|
27
|
+
* SDK's `DocumentSnapshot` surface narrowly enough for the rules-eval
|
|
28
|
+
* use case — `exists` discriminates and `data()` is lazy because it
|
|
29
|
+
* mirrors the Admin SDK signature even though our impl is eager.
|
|
30
|
+
*
|
|
31
|
+
* Probe 0.B: Admin returns `snap.exists === false` and `snap.data() ===
|
|
32
|
+
* undefined` for a missing doc; never throws. Our shape matches.
|
|
33
|
+
*/
|
|
34
|
+
export interface TransactionSnapshot {
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly exists: boolean;
|
|
37
|
+
data(): DocumentData | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Internal — a single read captured during the callback. Surfaced on
|
|
41
|
+
* `TransactionResult.reads` for diagnostic value (production doesn't
|
|
42
|
+
* expose this, but agents debugging "why did my tx commit nothing"
|
|
43
|
+
* benefit from seeing what the callback saw).
|
|
44
|
+
*/
|
|
45
|
+
export interface CapturedRead {
|
|
46
|
+
path: string;
|
|
47
|
+
data: DocumentData | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Internal — a queued write before merge/commit. Carries the original
|
|
51
|
+
* call method so `transaction-merge.ts` can collapse same-path entries
|
|
52
|
+
* with the right semantics (`update + update` merges; `set + update`
|
|
53
|
+
* applies update on top of set; etc.).
|
|
54
|
+
*/
|
|
55
|
+
export interface QueuedWrite {
|
|
56
|
+
method: 'set' | 'create' | 'update' | 'delete';
|
|
57
|
+
path: string;
|
|
58
|
+
data?: DocumentData;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Caller surface for `Transaction`. Implementation lives in
|
|
62
|
+
* `transaction.ts`; this interface is what callbacks see.
|
|
63
|
+
*
|
|
64
|
+
* `set` is included even though `BatchOperationInput` doesn't expose
|
|
65
|
+
* it — the Admin SDK's transaction does, and the merge layer collapses
|
|
66
|
+
* `set` into the appropriate `BatchOperation` at commit.
|
|
67
|
+
*/
|
|
68
|
+
export interface Transaction {
|
|
69
|
+
/** Admin-mode read; never evaluates rules. */
|
|
70
|
+
get(path: string): TransactionSnapshot;
|
|
71
|
+
/** Admin-mode batched read; preserves input order. */
|
|
72
|
+
getAll(...paths: string[]): TransactionSnapshot[];
|
|
73
|
+
/** Queue a `set` (overwrite-or-create). Flips writeStarted. */
|
|
74
|
+
set(path: string, data: DocumentData): void;
|
|
75
|
+
/** Queue a `create` (fail-on-exists at commit). Flips writeStarted. */
|
|
76
|
+
create(path: string, data: DocumentData): void;
|
|
77
|
+
/** Queue an `update` (fail-if-missing at commit). Flips writeStarted. */
|
|
78
|
+
update(path: string, data: DocumentData): void;
|
|
79
|
+
/** Queue a `delete`. Flips writeStarted. */
|
|
80
|
+
delete(path: string): void;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Options accepted by `LocalEnvironment.transaction(fn, options)`.
|
|
84
|
+
*
|
|
85
|
+
* `auth` is required (matches `Operation.auth` shape elsewhere in the
|
|
86
|
+
* simulator); rules eval needs it on every queued write.
|
|
87
|
+
*
|
|
88
|
+
* `readOnly` is the side-finding from probe 0.H — Admin's
|
|
89
|
+
* `runTransaction(fn, { readOnly })` accepts it. v1 simulator records
|
|
90
|
+
* a `readOnlyViolation: true` on the result if a write was queued
|
|
91
|
+
* inside a read-only tx, but does NOT throw. Provisional; v2 may flip
|
|
92
|
+
* to strict.
|
|
93
|
+
*/
|
|
94
|
+
export interface TransactionOptions {
|
|
95
|
+
auth: {
|
|
96
|
+
uid: string;
|
|
97
|
+
token?: Record<string, unknown>;
|
|
98
|
+
} | null;
|
|
99
|
+
readOnly?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Studio admin lens (Pyric Studio Gap #2). When `true`, per-write rule
|
|
102
|
+
* evaluation at commit is skipped — every queued write is treated as
|
|
103
|
+
* ALLOW. Storage preconditions (create-already-exists, etc.) and the
|
|
104
|
+
* normal commit/event/listener path still apply, so an admin transaction
|
|
105
|
+
* behaves like a rule-allowed one minus the rule gate. Transaction reads
|
|
106
|
+
* (`tx.get`) already bypass rules in the sandbox model, so this flag only
|
|
107
|
+
* affects the write commit. Default (absent/false) enforces rules.
|
|
108
|
+
*/
|
|
109
|
+
bypassRules?: boolean;
|
|
110
|
+
/** Immutable adapter context captured before an async callback yields. */
|
|
111
|
+
provenance?: EventProvenance;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Result returned from `LocalEnvironment.transaction(...)` on success
|
|
115
|
+
* or rule-denial. Thrown errors (callback throw, read-after-write
|
|
116
|
+
* violation) do NOT produce a `TransactionResult` — they propagate.
|
|
117
|
+
*
|
|
118
|
+
* `reads` is included for diagnostic value (production doesn't surface
|
|
119
|
+
* this; we do). `writes` is one entry per *queued* write at the time
|
|
120
|
+
* of commit, post-merge — so two `update` calls to the same path
|
|
121
|
+
* produce one `writes[]` entry, not two.
|
|
122
|
+
*/
|
|
123
|
+
export interface TransactionResult<R = unknown> {
|
|
124
|
+
/** True iff every queued write passed rules and applied. */
|
|
125
|
+
allowed: boolean;
|
|
126
|
+
reads: CapturedRead[];
|
|
127
|
+
writes: {
|
|
128
|
+
path: string;
|
|
129
|
+
method: 'create' | 'update' | 'delete';
|
|
130
|
+
allowed: boolean;
|
|
131
|
+
debugMessages: string[];
|
|
132
|
+
error?: FirestoreSimError;
|
|
133
|
+
}[];
|
|
134
|
+
/** Whatever the callback returned; `undefined` if it returned nothing. */
|
|
135
|
+
returnValue: R | undefined;
|
|
136
|
+
event: AgentEvent;
|
|
137
|
+
/** Top-level error (atomic-rollback case). Absent when `allowed: true`. */
|
|
138
|
+
error?: FirestoreSimError;
|
|
139
|
+
/**
|
|
140
|
+
* Provisional 0.H side-finding: true iff a write method was called
|
|
141
|
+
* inside a `readOnly: true` transaction. v1 still queues + commits
|
|
142
|
+
* the write; v2 may flip to strict (throw at the call site).
|
|
143
|
+
*/
|
|
144
|
+
readOnlyViolation?: boolean;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Locked Admin SDK message for read-after-write violations. Matched
|
|
148
|
+
* exactly so `error.message` parity is preserved for callers that
|
|
149
|
+
* stringify and grep — agents porting tests from prod expect the
|
|
150
|
+
* same wording.
|
|
151
|
+
*
|
|
152
|
+
* Source: probe 0.A run 2026-05-05 against firebase-admin 12.x.
|
|
153
|
+
*/
|
|
154
|
+
export declare const READ_AFTER_WRITE_MESSAGE = "Firestore transactions require all reads to be executed before all writes.";
|
|
155
|
+
//# sourceMappingURL=transaction-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-types.d.ts","sourceRoot":"","sources":["../../../src/sandbox/firestore/transaction-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,IAAI,IAAI,YAAY,GAAG,SAAS,CAAC;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACvC,sDAAsD;IACtD,MAAM,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAElD,+DAA+D;IAC/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,E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OG;AACH,eAAO,MAAM,wBAAwB,+EACyC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locked Admin SDK message for read-after-write violations. Matched
|
|
3
|
+
* exactly so `error.message` parity is preserved for callers that
|
|
4
|
+
* stringify and grep — agents porting tests from prod expect the
|
|
5
|
+
* same wording.
|
|
6
|
+
*
|
|
7
|
+
* Source: probe 0.A run 2026-05-05 against firebase-admin 12.x.
|
|
8
|
+
*/
|
|
9
|
+
export const READ_AFTER_WRITE_MESSAGE = 'Firestore transactions require all reads to be executed before all writes.';
|
|
10
|
+
//# sourceMappingURL=transaction-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-types.js","sourceRoot":"","sources":["../../../src/sandbox/firestore/transaction-types.ts"],"names":[],"mappings":"AAsJA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,4EAA4E,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Item 1.2 — `Transaction` callback class.
|
|
3
|
+
*
|
|
4
|
+
* The class agents see inside their `runTransaction` callback. Its job
|
|
5
|
+
* is narrow:
|
|
6
|
+
*
|
|
7
|
+
* 1. Capture reads (admin-mode, no rules) via an injected reader
|
|
8
|
+
* callback. This decouples the class from `LocalEnvironment` for
|
|
9
|
+
* testability — Item 2 binds the reader to `this.getDocument`.
|
|
10
|
+
* 2. Queue writes append-only. The merge / atomic-apply / rules-eval
|
|
11
|
+
* all happen *after* the callback returns, in `LocalEnvironment.
|
|
12
|
+
* transaction()` (Item 2.1).
|
|
13
|
+
* 3. Enforce global read-before-write ordering — once any write
|
|
14
|
+
* method runs, every subsequent `get` / `getAll` throws. This is
|
|
15
|
+
* the locked Admin SDK behavior (probes 0.A + 0.J).
|
|
16
|
+
*
|
|
17
|
+
* The class is single-use: a fresh instance is constructed per call to
|
|
18
|
+
* `LocalEnvironment.transaction(...)`. After the callback returns,
|
|
19
|
+
* `consume()` hands the captured reads + queued writes to the commit
|
|
20
|
+
* path and the instance is discarded.
|
|
21
|
+
*/
|
|
22
|
+
import type { DocumentData } from './local-state.js';
|
|
23
|
+
import { type FirestoreSimError } from './errors.js';
|
|
24
|
+
import { type CapturedRead, type QueuedWrite, type Transaction, type TransactionSnapshot } from './transaction-types.js';
|
|
25
|
+
/**
|
|
26
|
+
* Reader signature. Returns the document at `path` or `null` if it
|
|
27
|
+
* doesn't exist. Bound at construction time; the class itself doesn't
|
|
28
|
+
* know whether the reader hits `LocalState`, a stub, or a remote.
|
|
29
|
+
*/
|
|
30
|
+
export type TransactionReader = (path: string) => DocumentData | null;
|
|
31
|
+
/**
|
|
32
|
+
* Thrown synchronously by `tx.get` / `tx.getAll` when called after
|
|
33
|
+
* any write method. Maps cleanly to the simulator's typed-error
|
|
34
|
+
* surface — callers in Item 2 catch this, translate to
|
|
35
|
+
* `FirestoreSimError { code: 'failed-precondition' }`, and re-raise.
|
|
36
|
+
*
|
|
37
|
+
* Carrying a typed error class (rather than a plain `Error`) lets the
|
|
38
|
+
* commit path discriminate from arbitrary user throws (probe 0.G:
|
|
39
|
+
* those propagate unchanged) without instanceof-checking message
|
|
40
|
+
* strings.
|
|
41
|
+
*/
|
|
42
|
+
export declare class ReadAfterWriteError extends Error {
|
|
43
|
+
readonly simError: FirestoreSimError;
|
|
44
|
+
constructor();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Single-use transaction context. See file header for design notes.
|
|
48
|
+
*/
|
|
49
|
+
export declare class TransactionContext implements Transaction {
|
|
50
|
+
private readonly reader;
|
|
51
|
+
private readonly reads;
|
|
52
|
+
private readonly writes;
|
|
53
|
+
private writeStarted;
|
|
54
|
+
constructor(reader: TransactionReader);
|
|
55
|
+
get(path: string): TransactionSnapshot;
|
|
56
|
+
getAll(...paths: string[]): TransactionSnapshot[];
|
|
57
|
+
set(path: string, data: DocumentData): void;
|
|
58
|
+
create(path: string, data: DocumentData): void;
|
|
59
|
+
update(path: string, data: DocumentData): void;
|
|
60
|
+
delete(path: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Hand reads + queued writes to the commit path. After this is
|
|
63
|
+
* called the instance is dead — further calls would corrupt the
|
|
64
|
+
* commit. Item 2 calls this exactly once after the callback returns.
|
|
65
|
+
*/
|
|
66
|
+
consume(): {
|
|
67
|
+
reads: readonly CapturedRead[];
|
|
68
|
+
writes: readonly QueuedWrite[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* True iff any write method has been called. Item 2.3 checks this
|
|
72
|
+
* after the callback returns to populate `readOnlyViolation` when
|
|
73
|
+
* the tx was started with `readOnly: true`.
|
|
74
|
+
*/
|
|
75
|
+
hadWrites(): boolean;
|
|
76
|
+
private queue;
|
|
77
|
+
private assertReadsAllowed;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/sandbox/firestore/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,GAAG,IAAI,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;;CAMtC;AAED;;GAEG;AACH,qBAAa,kBAAmB,YAAW,WAAW;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,YAAY,CAAS;gBAEjB,MAAM,EAAE,iBAAiB;IAMrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB;IAetC,MAAM,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE;IASjD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI;IAG3C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI;IAG9C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI;IAG9C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM1B;;;;OAIG;IACH,OAAO,IAAI;QAAE,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;QAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAA;KAAE;IAI7E;;;;OAIG;IACH,SAAS,IAAI,OAAO;IAMpB,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,kBAAkB;CAK3B"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { makeError } from './errors.js';
|
|
2
|
+
import { READ_AFTER_WRITE_MESSAGE, } from './transaction-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Thrown synchronously by `tx.get` / `tx.getAll` when called after
|
|
5
|
+
* any write method. Maps cleanly to the simulator's typed-error
|
|
6
|
+
* surface — callers in Item 2 catch this, translate to
|
|
7
|
+
* `FirestoreSimError { code: 'failed-precondition' }`, and re-raise.
|
|
8
|
+
*
|
|
9
|
+
* Carrying a typed error class (rather than a plain `Error`) lets the
|
|
10
|
+
* commit path discriminate from arbitrary user throws (probe 0.G:
|
|
11
|
+
* those propagate unchanged) without instanceof-checking message
|
|
12
|
+
* strings.
|
|
13
|
+
*/
|
|
14
|
+
export class ReadAfterWriteError extends Error {
|
|
15
|
+
simError;
|
|
16
|
+
constructor() {
|
|
17
|
+
super(READ_AFTER_WRITE_MESSAGE);
|
|
18
|
+
this.name = 'ReadAfterWriteError';
|
|
19
|
+
this.simError = makeError('failed-precondition', READ_AFTER_WRITE_MESSAGE);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Single-use transaction context. See file header for design notes.
|
|
24
|
+
*/
|
|
25
|
+
export class TransactionContext {
|
|
26
|
+
reader;
|
|
27
|
+
reads = [];
|
|
28
|
+
writes = [];
|
|
29
|
+
writeStarted = false;
|
|
30
|
+
constructor(reader) {
|
|
31
|
+
this.reader = reader;
|
|
32
|
+
}
|
|
33
|
+
// ─── Reads ────────────────────────────────────────────────────────
|
|
34
|
+
get(path) {
|
|
35
|
+
this.assertReadsAllowed();
|
|
36
|
+
const data = this.reader(path);
|
|
37
|
+
this.reads.push({ path, data });
|
|
38
|
+
// Capture-by-value: callbacks that mutate `data()` later don't
|
|
39
|
+
// poison the captured read set. Cheap (small docs) and matches
|
|
40
|
+
// production semantics where the snapshot is immutable.
|
|
41
|
+
const captured = data === null ? null : structuredClone(data);
|
|
42
|
+
return {
|
|
43
|
+
path,
|
|
44
|
+
exists: captured !== null,
|
|
45
|
+
data: () => (captured === null ? undefined : captured),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
getAll(...paths) {
|
|
49
|
+
this.assertReadsAllowed();
|
|
50
|
+
// Order-preserving: probe 0.C confirmed Admin returns snapshots
|
|
51
|
+
// in input order. We mirror that by mapping in place.
|
|
52
|
+
return paths.map(p => this.get(p));
|
|
53
|
+
}
|
|
54
|
+
// ─── Writes ───────────────────────────────────────────────────────
|
|
55
|
+
set(path, data) {
|
|
56
|
+
this.queue({ method: 'set', path, data });
|
|
57
|
+
}
|
|
58
|
+
create(path, data) {
|
|
59
|
+
this.queue({ method: 'create', path, data });
|
|
60
|
+
}
|
|
61
|
+
update(path, data) {
|
|
62
|
+
this.queue({ method: 'update', path, data });
|
|
63
|
+
}
|
|
64
|
+
delete(path) {
|
|
65
|
+
this.queue({ method: 'delete', path });
|
|
66
|
+
}
|
|
67
|
+
// ─── Internal — used by Item 2's commit path ──────────────────────
|
|
68
|
+
/**
|
|
69
|
+
* Hand reads + queued writes to the commit path. After this is
|
|
70
|
+
* called the instance is dead — further calls would corrupt the
|
|
71
|
+
* commit. Item 2 calls this exactly once after the callback returns.
|
|
72
|
+
*/
|
|
73
|
+
consume() {
|
|
74
|
+
return { reads: this.reads, writes: this.writes };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* True iff any write method has been called. Item 2.3 checks this
|
|
78
|
+
* after the callback returns to populate `readOnlyViolation` when
|
|
79
|
+
* the tx was started with `readOnly: true`.
|
|
80
|
+
*/
|
|
81
|
+
hadWrites() {
|
|
82
|
+
return this.writeStarted;
|
|
83
|
+
}
|
|
84
|
+
// ─── Private ──────────────────────────────────────────────────────
|
|
85
|
+
queue(write) {
|
|
86
|
+
this.writeStarted = true;
|
|
87
|
+
this.writes.push(write);
|
|
88
|
+
}
|
|
89
|
+
assertReadsAllowed() {
|
|
90
|
+
if (this.writeStarted) {
|
|
91
|
+
throw new ReadAfterWriteError();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/sandbox/firestore/transaction.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAA0B,MAAM,aAAa,CAAC;AAChE,OAAO,EACL,wBAAwB,GAKzB,MAAM,wBAAwB,CAAC;AAShC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACnC,QAAQ,CAAoB;IACrC;QACE,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChC,IAAI,CAAC,IA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
|
|
|
1
|
+
function hasFirestoreValueEquality(value) {
|
|
2
|
+
return (typeof value === 'object' &&
|
|
3
|
+
value !== null &&
|
|
4
|
+
'isEqual' in value &&
|
|
5
|
+
typeof value.isEqual === 'function');
|
|
6
|
+
}
|
|
7
|
+
function isFirestoreMapValue(value) {
|
|
8
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
9
|
+
return false;
|
|
10
|
+
const prototype = Object.getPrototypeOf(value);
|
|
11
|
+
return prototype === Object.prototype || prototype === null;
|
|
12
|
+
}
|
|
13
|
+
export function firestoreValuesEqual(a, b) {
|
|
14
|
+
if (Object.is(a, b))
|
|
15
|
+
return true;
|
|
16
|
+
if (hasFirestoreValueEquality(a))
|
|
17
|
+
return a.isEqual(b);
|
|
18
|
+
if (hasFirestoreValueEquality(b))
|
|
19
|
+
return b.isEqual(a);
|
|
20
|
+
if (Array.isArray(a) || Array.isArray(b)) {
|
|
21
|
+
if (!Array.isArray(a) || !Array.isArray(b))
|
|
22
|
+
return false;
|
|
23
|
+
if (a.length !== b.length)
|
|
24
|
+
return false;
|
|
25
|
+
return a.every((value, index) => firestoreValuesEqual(value, b[index]));
|
|
26
|
+
}
|
|
27
|
+
if (!isFirestoreMapValue(a) || !isFirestoreMapValue(b))
|
|
28
|
+
return false;
|
|
29
|
+
const aKeys = Object.keys(a);
|
|
30
|
+
const bKeys = Object.keys(b);
|
|
31
|
+
if (aKeys.length !== bKeys.length)
|
|
32
|
+
return false;
|
|
33
|
+
return aKeys.every((key) => key in b && firestoreValuesEqual(a[key], b[key]));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=value-equality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-equality.js","sourceRoot":"","sources":["../../../src/sandbox/firestore/value-equality.ts"],"names":[],"mappings":"AAIA,SAAS,yBAAyB,CAAC,KAAc;IAC/C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;Q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