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,811 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandbox backend for `pyric/auth`.
|
|
3
|
+
*
|
|
4
|
+
* Owns app-session state over a sandbox-shared project store:
|
|
5
|
+
* 1. In-memory user database — emails / passwords / customClaims
|
|
6
|
+
* seeded via `sandbox.seedUsers(auth, …)` plus accounts created
|
|
7
|
+
* through `createUserWithEmailAndPassword`.
|
|
8
|
+
* 2. Listener registries — one for `onAuthStateChanged`, one for
|
|
9
|
+
* `onIdTokenChanged`. Both fire on user change; the
|
|
10
|
+
* `onIdTokenChanged` registry ALSO fires on a forced ID-token
|
|
11
|
+
* refresh (matches prod — see oracle observation
|
|
12
|
+
* `auth-onidtokenchanged-force-refresh.json`).
|
|
13
|
+
* 3. Auth-flow staging — the pre-staged `UserCredential` mock
|
|
14
|
+
* registry (consumed by `signInWithPopup` /
|
|
15
|
+
* `signInWithCredential`), the injected popup/redirect resolver,
|
|
16
|
+
* and the pending redirect-result slot. Delegated to
|
|
17
|
+
* {@link AuthFlowRegistry} (`sandbox-auth-flow.ts`); the backend
|
|
18
|
+
* holds one `flow` field and the accessor methods forward to it.
|
|
19
|
+
* 4. Token cache — current ID token string + IdTokenResult per uid.
|
|
20
|
+
* A fresh token is minted on each setCurrentUser transition into
|
|
21
|
+
* a non-null user (new session = new token) and on each
|
|
22
|
+
* `getIdToken(forceRefresh=true)`. Subsequent
|
|
23
|
+
* `getIdToken(false)` reads return the cached token (matches
|
|
24
|
+
* prod — see `auth-getidtoken-force-refresh.json`).
|
|
25
|
+
*
|
|
26
|
+
* The current user lives on the injected session host. The default app and
|
|
27
|
+
* bare-sandbox API use `sandbox.currentUser`; named apps inject independent
|
|
28
|
+
* session hosts, while Firestore/RTDB/Storage read that app session per call.
|
|
29
|
+
*
|
|
30
|
+
* `signInAnonymously` / `signInWithEmailAndPassword` / `signOut` /
|
|
31
|
+
* `sandbox.setUser` all flow through {@link setCurrentUser}, which
|
|
32
|
+
* writes the session's `currentUser` and fans out to both listener
|
|
33
|
+
* registries. The session setter is idempotent,
|
|
34
|
+
* so calling it with the same identity twice is a no-op.
|
|
35
|
+
*/
|
|
36
|
+
import { type AuthActionCode, type AuthMailResolver, type OutboundAuthMail } from './sandbox-auth-flow.js';
|
|
37
|
+
import { type AuthProjectStore } from './sandbox/project-store.js';
|
|
38
|
+
import type { Sandbox } from 'pyric/sandbox';
|
|
39
|
+
import { type AuthFlowResolver, type AuthObserver, type IdTokenResult, type Unsubscribe, type User, type UserCredential } from './types.js';
|
|
40
|
+
import { type AuthUserRecord, type CreateUserRequest, type MintSessionRequest, type MintedSession, type ProviderUserInfo, type SeedUser, type SignInIdentitySpec, type StoredUser, type UpdateUserRequest } from './sandbox-backend-types.js';
|
|
41
|
+
export { NO_PASSWORD_SENTINEL } from './sandbox-backend-types.js';
|
|
42
|
+
export type { AuthUserRecord, CreateUserRequest, MintSessionRequest, MintedSession, ProviderUserInfo, SeedUser, SignInIdentitySpec, UpdateUserRequest, } from './sandbox-backend-types.js';
|
|
43
|
+
/**
|
|
44
|
+
* Per-app-session backend state. Repeated `getAuth(app)` calls are memoized;
|
|
45
|
+
* sibling app backends share account/provider maps but not currentUser,
|
|
46
|
+
* listeners, tokens, flow staging, or persistence mode.
|
|
47
|
+
*/
|
|
48
|
+
export declare class SandboxBackend {
|
|
49
|
+
/** Email → stored user. Lowercase keys so lookups are case-
|
|
50
|
+
* insensitive (matches upstream). */
|
|
51
|
+
private readonly usersByEmail;
|
|
52
|
+
/** UID → stored user. Lets `setUser` resolve customClaims for an
|
|
53
|
+
* arbitrary uid without scanning the email index. */
|
|
54
|
+
private readonly usersByUid;
|
|
55
|
+
/** onAuthStateChanged registrations. Array, NOT a Set, so duplicate
|
|
56
|
+
* observer functions register independently — upstream backs each
|
|
57
|
+
* registry with an array (`util/src/subscribe.ts:191` pushes; dups
|
|
58
|
+
* allowed) and `unsubscribeOne(i)` removes by *index*, so the same
|
|
59
|
+
* fn subscribed twice fires twice and one unsubscribe removes one
|
|
60
|
+
* registration (AUTH-B4). Each record carries its own initial-fire
|
|
61
|
+
* bookkeeping so a shared per-observer dedup can't suppress a
|
|
62
|
+
* resubscribe or a second registration of the same fn (AUTH-B3). */
|
|
63
|
+
private readonly authStateSubs;
|
|
64
|
+
/** onIdTokenChanged registrations. Same array semantics. */
|
|
65
|
+
private readonly idTokenSubs;
|
|
66
|
+
/** `subscribeUsers` subscribers — coarse "user DB changed"
|
|
67
|
+
* callbacks; listeners re-list via `listUsers`. */
|
|
68
|
+
private readonly userDbSubs;
|
|
69
|
+
/** `beforeAuthStateChanged` registrations, in registration order.
|
|
70
|
+
* Mirrors upstream's `AuthMiddlewareQueue` (`auth_impl.ts`): an
|
|
71
|
+
* array (NOT a Set) so duplicate callback fns register
|
|
72
|
+
* independently, and unregistering swaps the slot for a no-op
|
|
73
|
+
* instead of splicing — splicing would shift later indices and
|
|
74
|
+
* disturb an in-flight `runBeforeStateChange` iteration. */
|
|
75
|
+
private readonly beforeStateSubs;
|
|
76
|
+
/** Monotonic uid counter for `createUser` calls without a uid. */
|
|
77
|
+
private readonly sharedCounters;
|
|
78
|
+
/** Popup / redirect / credential flow-staging machinery — the
|
|
79
|
+
* one-shot mock registry, the injected resolver, and the pending
|
|
80
|
+
* redirect-result slot. Kept in {@link AuthFlowRegistry} (see
|
|
81
|
+
* `sandbox-auth-flow.ts`) because that state is independent of the
|
|
82
|
+
* coupled auth state machine, and it is the seam the email-link /
|
|
83
|
+
* linking / reauth climbs extend. The six accessor methods below
|
|
84
|
+
* delegate here verbatim. */
|
|
85
|
+
private readonly flow;
|
|
86
|
+
/** Underlying sandbox — written to on every sign-in/out. */
|
|
87
|
+
private readonly sandbox;
|
|
88
|
+
/** App-local session state. Bare-sandbox callers use the sandbox itself. */
|
|
89
|
+
private readonly session;
|
|
90
|
+
/** Cached `User` for `auth.currentUser` snapshots. Recomputed when
|
|
91
|
+
* the sandbox's currentUser changes; null on signed-out. */
|
|
92
|
+
private cachedUser;
|
|
93
|
+
/** The uid `onAuthStateChanged` was last notified with. Mirrors
|
|
94
|
+
* upstream's `lastNotifiedUid` (`auth_impl.ts:720`): auth-state only
|
|
95
|
+
* re-fires when this changes, so a same-uid profile-shape change or a
|
|
96
|
+
* same-uid re-sign-in does NOT re-fire auth-state (AUTH-B7). */
|
|
97
|
+
private lastNotifiedUid;
|
|
98
|
+
/** True while {@link setCurrentUser} is driving a transition through
|
|
99
|
+
* the sandbox setter. The synchronous `onCurrentUserChanged`
|
|
100
|
+
* subscriber checks this so it doesn't double-notify — setCurrentUser
|
|
101
|
+
* owns the fan-out decision (id-token always, auth-state on uid
|
|
102
|
+
* change). The subscriber only notifies for EXTERNAL mutations
|
|
103
|
+
* (direct sandbox writes, `reset()`, another handle). */
|
|
104
|
+
private applyingTransition;
|
|
105
|
+
/** Per-uid current ID token + result. Refreshed on each
|
|
106
|
+
* `getIdToken(forceRefresh=true)` and on each new sign-in
|
|
107
|
+
* transition (so a sign-out / sign-in round-trip mints a fresh
|
|
108
|
+
* token, matching prod's "new session = new token" semantics).
|
|
109
|
+
* Subsequent `getIdToken(false)` reads return the cached value. */
|
|
110
|
+
private readonly tokenCache;
|
|
111
|
+
/** Monotonic counter used to disambiguate freshly-minted tokens
|
|
112
|
+
* for the same uid + claims map. Without this, two refreshes that
|
|
113
|
+
* happen within the same millisecond would hash to the same
|
|
114
|
+
* string (claims map + iat tie-breaker not enough). */
|
|
115
|
+
private nextTokenSerial;
|
|
116
|
+
/**
|
|
117
|
+
* Current persistence mode — mirrors the real Firebase SDK's
|
|
118
|
+
* `setPersistence` semantics. Default is `'LOCAL'` (Firebase default:
|
|
119
|
+
* `browserLocalPersistence` keeps you signed in across reloads and
|
|
120
|
+
* browser restarts).
|
|
121
|
+
*
|
|
122
|
+
* Stored here on the backend so the persistence controller can read it
|
|
123
|
+
* without knowing about auth internals. The `auth/modular.ts` top-level
|
|
124
|
+
* `setPersistence` function writes this via `setPersistenceMode`; the
|
|
125
|
+
* controller reads it via `getPersistenceMode` on every session save.
|
|
126
|
+
*
|
|
127
|
+
* Subscribers to persistence-mode changes (the set holding the
|
|
128
|
+
* controller's session-save callback) are notified by `setPersistenceMode`
|
|
129
|
+
* so a `setPersistence` call that changes the mode immediately migrates
|
|
130
|
+
* the session to the new store without waiting for the next sign-in.
|
|
131
|
+
*/
|
|
132
|
+
private persistenceMode;
|
|
133
|
+
/** Per-uid provider of the *current/most-recent* sign-in session —
|
|
134
|
+
* backs `IdTokenResult.signInProvider` and the synthesized
|
|
135
|
+
* `firebase.sign_in_provider` token claim. Written by each
|
|
136
|
+
* sign-in path via {@link setCurrentUser}'s `signInProvider`
|
|
137
|
+
* argument; `null` for identities driven directly through the
|
|
138
|
+
* test driver (`sandbox.setUser`), which has no prod analog. */
|
|
139
|
+
private readonly signInProviderByUid;
|
|
140
|
+
/**
|
|
141
|
+
* Sign-in provider enablement — mirrors a real Firebase project's
|
|
142
|
+
* Authentication → Sign-in method toggles. GATED at every provider
|
|
143
|
+
* entry point OF THE ENFORCING BACKEND (owner decision — full
|
|
144
|
+
* fidelity): `resolveFlow` (`signInWithPopup`/`signInWithRedirect`),
|
|
145
|
+
* `signInWithCredential`, `createUserWithEmailAndPassword`/
|
|
146
|
+
* `signInWithEmailAndPassword` (the `'password'` provider), and
|
|
147
|
+
* `signInAnonymously` (the `'anonymous'` provider). A disabled
|
|
148
|
+
* provider throws the same `auth/operation-not-allowed` prod throws
|
|
149
|
+
* — a code deliberately distinct from `auth/argument-error` (which
|
|
150
|
+
* keeps meaning "no resolver/mock wired" for an ENABLED-but-unmocked
|
|
151
|
+
* OAuth provider).
|
|
152
|
+
*
|
|
153
|
+
* DELEGATION ESCAPE HATCH ({@link providerEnforcementDelegated}): a
|
|
154
|
+
* backend that is merely a UI vehicle for a REMOTE authority — the
|
|
155
|
+
* served worker path's page-local sandbox, whose popup picker
|
|
156
|
+
* resolves identities that a SharedWorker then gates + signs in —
|
|
157
|
+
* can delegate enforcement to that authority. With delegation on,
|
|
158
|
+
* {@link assertProviderEnabled} is a no-op HERE and the authority's
|
|
159
|
+
* own (undelegated) backend gate is the one that decides.
|
|
160
|
+
*
|
|
161
|
+
* DEFAULTS DIVERGE FROM A FRESH REAL PROJECT (owner decision,
|
|
162
|
+
* documented): prod ships every provider OFF until an admin flips it
|
|
163
|
+
* on in the console. The sandbox ships `'password'` and `'anonymous'`
|
|
164
|
+
* ON — everything else (`google.com`, `github.com`, `apple.com`,
|
|
165
|
+
* `microsoft.com`, custom OAuth ids, …) OFF — so the enforcement is
|
|
166
|
+
* identical to prod but the DEFAULTS are friendlier: every existing
|
|
167
|
+
* sandbox flow that never called `sandbox.setAuthProviderConfig`
|
|
168
|
+
* keeps signing in via email/password and anonymous auth unchanged
|
|
169
|
+
* after this landed.
|
|
170
|
+
*/
|
|
171
|
+
private readonly providerConfig;
|
|
172
|
+
/** Subscribers to provider-config changes — the config analog of
|
|
173
|
+
* {@link userDbSubs}. Same coarse contract: no payload, re-read via
|
|
174
|
+
* {@link listProviderConfig} on each callback. */
|
|
175
|
+
private readonly providerConfigSubs;
|
|
176
|
+
/** When true, THIS backend's provider gate is delegated to a remote
|
|
177
|
+
* authority (see the {@link providerConfig} docstring's delegation
|
|
178
|
+
* section) — {@link assertProviderEnabled} becomes a no-op. Not
|
|
179
|
+
* persisted: a runtime wiring decision, not project config. */
|
|
180
|
+
private providerEnforcementDelegated;
|
|
181
|
+
constructor(sandbox: Sandbox, session?: Pick<Sandbox, 'currentUser' | 'onCurrentUserChanged'>, projectStore?: AuthProjectStore, ownCleanup?: (cleanup: () => void) => void);
|
|
182
|
+
/** Snapshot of the current user — backs `auth.currentUser`. */
|
|
183
|
+
getCurrentUser(): User | null;
|
|
184
|
+
/**
|
|
185
|
+
* Subscribe to user change. Fires *immediately* on subscribe with
|
|
186
|
+
* the current value (mirrors `firebase/auth`'s
|
|
187
|
+
* `onAuthStateChanged` semantics).
|
|
188
|
+
*
|
|
189
|
+
* `kind: 'auth-state'` and `kind: 'id-token'` share the identity-
|
|
190
|
+
* transition fan-out path; additionally, `getIdToken(true)` fans
|
|
191
|
+
* out to the `'id-token'` registry only (without re-firing
|
|
192
|
+
* `'auth-state'`). Matches prod: `onIdTokenChanged` sees both
|
|
193
|
+
* identity changes AND forced token refreshes.
|
|
194
|
+
*/
|
|
195
|
+
subscribe(kind: 'auth-state' | 'id-token', observer: AuthObserver): Unsubscribe;
|
|
196
|
+
/**
|
|
197
|
+
* Notify the requested registries of the current user. Snapshots
|
|
198
|
+
* the registration list before iteration so unsubscribes during
|
|
199
|
+
* emission don't skip remaining subscribers (upstream semantics).
|
|
200
|
+
*
|
|
201
|
+
* `kind: 'both'` (default) fires both auth-state and id-token
|
|
202
|
+
* registries — used for identity transitions.
|
|
203
|
+
* `kind: 'id-token'` fires ONLY the id-token registry — used for
|
|
204
|
+
* forced token refreshes, where the user identity hasn't changed
|
|
205
|
+
* but the token has. Matches prod: `onIdTokenChanged` sees refresh
|
|
206
|
+
* events; `onAuthStateChanged` does not.
|
|
207
|
+
*/
|
|
208
|
+
private fanOut;
|
|
209
|
+
/**
|
|
210
|
+
* Mirror of upstream `notifyAuthListeners` (`auth_impl.ts:714-723`):
|
|
211
|
+
* - `onIdTokenChanged` fires on EVERY notify (every identity update,
|
|
212
|
+
* including a same-uid re-sign-in that mints a fresh token —
|
|
213
|
+
* AUTH-B8);
|
|
214
|
+
* - `onAuthStateChanged` fires ONLY when the uid changed vs the last
|
|
215
|
+
* notification (`lastNotifiedUid`) — a same-uid profile-shape
|
|
216
|
+
* change does NOT re-fire auth-state (AUTH-B7).
|
|
217
|
+
* Call this after `cachedUser` is updated.
|
|
218
|
+
*/
|
|
219
|
+
private notifyAuthListeners;
|
|
220
|
+
private deliverOne;
|
|
221
|
+
/** Build a fresh {@link StoredUser} with admin-field defaults. */
|
|
222
|
+
private makeStored;
|
|
223
|
+
/** Fan a coarse "user DB changed" notification out to
|
|
224
|
+
* `subscribeUsers` listeners. Snapshotted iteration; throwing
|
|
225
|
+
* listeners are isolated (same policy as the auth observers). */
|
|
226
|
+
private notifyUsersChanged;
|
|
227
|
+
/**
|
|
228
|
+
* Emit an auth {@link ServiceMutationEvent} onto the sandbox's unified
|
|
229
|
+
* `onEvent`/`history()` stream (Pyric Studio keystone). Best-effort and
|
|
230
|
+
* fully isolated — a throw from the emit path (or a sandbox that somehow
|
|
231
|
+
* isn't a real `SandboxImpl`) must NOT break the auth operation that
|
|
232
|
+
* triggered it, so we swallow. `auth` defaults to the current sandbox
|
|
233
|
+
* identity; admin ops (createUser/updateUser/deleteUser) pass `null`
|
|
234
|
+
* since they have no acting session. `actor` defaults to `{ kind: 'app' }`
|
|
235
|
+
* via `stampProvenance`.
|
|
236
|
+
*/
|
|
237
|
+
private emitAuthEvent;
|
|
238
|
+
/** Subscribe to user-DB mutations (seed/create/update/delete/clear,
|
|
239
|
+
* provider links, lastLoginAt bumps). Coarse: no payload, no
|
|
240
|
+
* initial fire — re-list via `listUsers` on each callback. */
|
|
241
|
+
subscribeUsers(cb: () => void): Unsubscribe;
|
|
242
|
+
/** Whether `providerId` is currently enabled. Unknown providers
|
|
243
|
+
* (never toggled) default to `true` — every sign-in method works out
|
|
244
|
+
* of the box until the sandbox grows a provider-enablement API and
|
|
245
|
+
* UI. An explicit `false` entry still disables. */
|
|
246
|
+
isProviderEnabled(providerId: string): boolean;
|
|
247
|
+
/** Every provider this backend has an explicit enablement for —
|
|
248
|
+
* seeded defaults (`password`, `anonymous`) plus anything a host
|
|
249
|
+
* toggled via {@link setProviderConfig}. */
|
|
250
|
+
listProviderConfig(): Array<{
|
|
251
|
+
providerId: string;
|
|
252
|
+
enabled: boolean;
|
|
253
|
+
}>;
|
|
254
|
+
/** Toggle a provider on/off. No-op (no notify) when the value is
|
|
255
|
+
* already what was requested — mirrors {@link setPersistenceMode}'s
|
|
256
|
+
* dedup so a redundant toggle doesn't churn subscribers / flushes. */
|
|
257
|
+
setProviderConfig(providerId: string, enabled: boolean): void;
|
|
258
|
+
private notifyProviderConfigChanged;
|
|
259
|
+
/** Subscribe to provider-config mutations. Coarse: no payload, no
|
|
260
|
+
* initial fire — re-read via {@link listProviderConfig} on each
|
|
261
|
+
* callback (same contract as {@link subscribeUsers}). */
|
|
262
|
+
subscribeProviderConfig(cb: () => void): Unsubscribe;
|
|
263
|
+
/**
|
|
264
|
+
* Mark this backend's provider gate as delegated to (or reclaimed
|
|
265
|
+
* from) a remote authority. See the {@link providerConfig} docstring:
|
|
266
|
+
* the served worker path sets this on the PAGE-LOCAL sandbox so the
|
|
267
|
+
* popup picker opens regardless of local toggles — the SharedWorker's
|
|
268
|
+
* `auth.acceptIdentity` gate (against the worker's own, undelegated
|
|
269
|
+
* backend) is the enforcement point.
|
|
270
|
+
*/
|
|
271
|
+
setProviderEnforcementDelegated(delegated: boolean): void;
|
|
272
|
+
/**
|
|
273
|
+
* Gate a provider entry point. Throws real Firebase's
|
|
274
|
+
* `auth/operation-not-allowed` (exactly the code/shape prod throws
|
|
275
|
+
* for a disabled sign-in method) when `providerId` is off. Called by
|
|
276
|
+
* every provider-flow entry point in `index.ts` BEFORE any other
|
|
277
|
+
* work, so a disabled provider never touches the user DB / mock
|
|
278
|
+
* registry / resolver. A no-op when enforcement is delegated to a
|
|
279
|
+
* remote authority ({@link setProviderEnforcementDelegated}).
|
|
280
|
+
*/
|
|
281
|
+
assertProviderEnabled(providerId: string): void;
|
|
282
|
+
/** Snapshot the full provider-config map for the persistable-service
|
|
283
|
+
* `snapshot()` hook — plain JSON, ready to embed under the `auth`
|
|
284
|
+
* service's `providers` key. */
|
|
285
|
+
exportProviderConfig(): Record<string, boolean>;
|
|
286
|
+
/**
|
|
287
|
+
* Restore provider config from a persisted blob — a REPLACE, not a
|
|
288
|
+
* merge (same policy as `seedUsers`'s persistence path: the map
|
|
289
|
+
* becomes EXACTLY what `data` holds). When `data` is missing/invalid
|
|
290
|
+
* — including every blob written BEFORE this feature landed, which
|
|
291
|
+
* has no `providers` key at all — falls back to the documented
|
|
292
|
+
* defaults (`password`/`anonymous` enabled) rather than leaving the
|
|
293
|
+
* map empty, so an old `--persist` file doesn't silently lock
|
|
294
|
+
* existing sandbox flows out of email/password + anonymous sign-in.
|
|
295
|
+
*/
|
|
296
|
+
restoreProviderConfig(data: Record<string, boolean> | undefined): void;
|
|
297
|
+
/**
|
|
298
|
+
* Read the current persistence mode. Used by the session-persistence
|
|
299
|
+
* controller to decide which web-storage slot (local / session) to
|
|
300
|
+
* write the signed-in uid into.
|
|
301
|
+
*
|
|
302
|
+
* The default value is `'LOCAL'` — matches Firebase's default of
|
|
303
|
+
* `browserLocalPersistence` (you stay signed in across page reloads
|
|
304
|
+
* and browser restarts unless you explicitly call `setPersistence`).
|
|
305
|
+
*/
|
|
306
|
+
getPersistenceMode(): 'LOCAL' | 'SESSION' | 'NONE';
|
|
307
|
+
/**
|
|
308
|
+
* Record the new persistence mode. Called by the auth `setPersistence`
|
|
309
|
+
* function when the sandbox target receives a mode change.
|
|
310
|
+
*
|
|
311
|
+
* Changing the mode notifies the session-change subscribers so the
|
|
312
|
+
* persistence controller can IMMEDIATELY migrate the stored uid to
|
|
313
|
+
* the new web-storage slot — matching the real SDK's behavior where
|
|
314
|
+
* `setPersistence` carries the active session across modes before
|
|
315
|
+
* returning.
|
|
316
|
+
*
|
|
317
|
+
* Why notify on mode change (not just on sign-in/out): the session
|
|
318
|
+
* controller subscribes to "something about this session changed"
|
|
319
|
+
* events and re-reads both `currentUid()` and `mode()` on each fire.
|
|
320
|
+
* Notifying here lets the controller react to a mode change with the
|
|
321
|
+
* same code path as a sign-in/out, rather than a separate migration
|
|
322
|
+
* hook.
|
|
323
|
+
*/
|
|
324
|
+
setPersistenceMode(mode: 'LOCAL' | 'SESSION' | 'NONE'): void;
|
|
325
|
+
/**
|
|
326
|
+
* Subscribers that need to react to ANY session state change —
|
|
327
|
+
* sign-in, sign-out, or persistence-mode change. The controller
|
|
328
|
+
* installs one subscriber here to drive session saves.
|
|
329
|
+
*
|
|
330
|
+
* Separate from `currentUserSubs` (on the sandbox) because we need
|
|
331
|
+
* to fire on mode changes (which don't change the currentUser) and
|
|
332
|
+
* because the backend owns the mode — it's cleaner to keep both
|
|
333
|
+
* signals on the same object.
|
|
334
|
+
*/
|
|
335
|
+
private readonly sessionChangeSubs;
|
|
336
|
+
/** Notify all session-change subscribers. Used by `setCurrentUser`
|
|
337
|
+
* (sign-in / sign-out) and by `setPersistenceMode` (mode change). */
|
|
338
|
+
private notifySessionChanged;
|
|
339
|
+
/**
|
|
340
|
+
* Subscribe to session-level changes: sign-in, sign-out, and
|
|
341
|
+
* persistence-mode changes. The persistence controller installs one
|
|
342
|
+
* subscription here and re-saves the session on every fire.
|
|
343
|
+
*
|
|
344
|
+
* This is the mechanism the `PersistableService.session.subscribe`
|
|
345
|
+
* hook exposes — the controller doesn't need to know it's subscribing
|
|
346
|
+
* to two separate event sources (sign-in/out AND mode); they both
|
|
347
|
+
* flow through this one subscription.
|
|
348
|
+
*/
|
|
349
|
+
subscribeSession(cb: () => void): Unsubscribe;
|
|
350
|
+
seedUsers(users: ReadonlyArray<SeedUser>): void;
|
|
351
|
+
/**
|
|
352
|
+
* Export the user DB as `SeedUser`s — the exact shape `seedUsers`
|
|
353
|
+
* accepts, so export → seed round-trips (the persistence substrate,
|
|
354
|
+
* the design rationale section 3c). Identities with an email but no
|
|
355
|
+
* password (provider-flow users created via `createSignInCredential`)
|
|
356
|
+
* export with {@link NO_PASSWORD_SENTINEL} so they survive the
|
|
357
|
+
* round-trip (same trick hosts already use when seeding popup
|
|
358
|
+
* identities). Anonymous users (no email) are NOT exported — they are
|
|
359
|
+
* ephemeral by design; documented divergence from prod's persisted
|
|
360
|
+
* anonymous sessions.
|
|
361
|
+
*/
|
|
362
|
+
exportUsers(): SeedUser[];
|
|
363
|
+
/**
|
|
364
|
+
* Re-establish a signed-in session for an EXISTING identity — the
|
|
365
|
+
* substrate behind web-storage session persistence (`setPersistence`
|
|
366
|
+
* parity at the serve layer). Fires the auth-state listeners exactly
|
|
367
|
+
* like a real restored session. Throws `auth/user-not-found` for
|
|
368
|
+
* unknown uids and `auth/user-disabled` for disabled accounts (a
|
|
369
|
+
* restore is a sign-in).
|
|
370
|
+
*/
|
|
371
|
+
restoreSession(uid: string): User;
|
|
372
|
+
findByEmail(email: string): StoredUser | undefined;
|
|
373
|
+
findByUid(uid: string): StoredUser | undefined;
|
|
374
|
+
mintActionCode(spec: AuthActionCode): string;
|
|
375
|
+
stageActionCode(code: string, spec: AuthActionCode): void;
|
|
376
|
+
peekActionCode(code: string): AuthActionCode | undefined;
|
|
377
|
+
consumeActionCode(code: string): AuthActionCode | undefined;
|
|
378
|
+
deliverMail(mail: OutboundAuthMail): void;
|
|
379
|
+
takeMail(email?: string): OutboundAuthMail | null;
|
|
380
|
+
listMail(): OutboundAuthMail[];
|
|
381
|
+
setMailResolver(resolver: AuthMailResolver | null): void;
|
|
382
|
+
/**
|
|
383
|
+
* Mark an account's email verified — what a redeemed `VERIFY_EMAIL`
|
|
384
|
+
* code does. This is the state change the whole verification flow
|
|
385
|
+
* exists to produce, and the one that (in prod) only happens when a
|
|
386
|
+
* human clicks the link. Idempotent.
|
|
387
|
+
*/
|
|
388
|
+
setEmailVerified(email: string, verified: boolean): StoredUser;
|
|
389
|
+
/**
|
|
390
|
+
* Set an account's password by email — what a redeemed
|
|
391
|
+
* `PASSWORD_RESET` code does (`confirmPasswordReset`). Runs the same
|
|
392
|
+
* strength check `createUserWithEmailAndPassword` does, so a reset
|
|
393
|
+
* cannot install a password the create path would have rejected.
|
|
394
|
+
*/
|
|
395
|
+
setPasswordByEmail(email: string, newPassword: string): StoredUser;
|
|
396
|
+
/**
|
|
397
|
+
* Move an account to a new address — what a redeemed
|
|
398
|
+
* `VERIFY_AND_CHANGE_EMAIL` code does (`verifyBeforeUpdateEmail`). The
|
|
399
|
+
* new address arrives already verified: the user just proved they
|
|
400
|
+
* control it by redeeming a code sent TO it. That is the entire
|
|
401
|
+
* difference between this flow and a bare `updateEmail`.
|
|
402
|
+
*/
|
|
403
|
+
changeEmail(fromEmail: string, toEmail: string): StoredUser;
|
|
404
|
+
/**
|
|
405
|
+
* Get-or-create the account an email-link sign-in resolves to.
|
|
406
|
+
* A first-time email-link sign-in CREATES the account (that is the
|
|
407
|
+
* passwordless flow's whole point) — and it arrives verified, because
|
|
408
|
+
* redeeming a code mailed to that address is proof of control.
|
|
409
|
+
*
|
|
410
|
+
* Returns `isNewUser` so the credential can carry an honest
|
|
411
|
+
* `getAdditionalUserInfo().isNewUser`.
|
|
412
|
+
*/
|
|
413
|
+
upsertEmailLinkUser(email: string): {
|
|
414
|
+
stored: StoredUser;
|
|
415
|
+
isNewUser: boolean;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Link a provider onto an existing identity. The mutation behind
|
|
419
|
+
* `linkWithCredential` / `linkWithPopup` / `linkWithRedirect`.
|
|
420
|
+
*
|
|
421
|
+
* Enforces the two conflict codes prod enforces:
|
|
422
|
+
* - `auth/provider-already-linked` when the account already carries
|
|
423
|
+
* this provider;
|
|
424
|
+
* - `auth/email-already-in-use` when the email credential being
|
|
425
|
+
* linked belongs to a DIFFERENT account (an email can only ever
|
|
426
|
+
* back one identity).
|
|
427
|
+
*
|
|
428
|
+
* Linking a credential onto an ANONYMOUS account upgrades it in place:
|
|
429
|
+
* same uid, `isAnonymous` flips false. That upgrade is the single most
|
|
430
|
+
* common reason this API exists (the "let them try it, then let them
|
|
431
|
+
* keep it" onboarding flow), and preserving the uid is what makes the
|
|
432
|
+
* data they created while anonymous still theirs afterward.
|
|
433
|
+
*/
|
|
434
|
+
linkProvider(uid: string, providerId: string, identity?: {
|
|
435
|
+
email?: string;
|
|
436
|
+
password?: string | null;
|
|
437
|
+
emailVerified?: boolean;
|
|
438
|
+
}): StoredUser;
|
|
439
|
+
/**
|
|
440
|
+
* Remove a provider from an identity — the mutation behind `unlink`.
|
|
441
|
+
* Throws `auth/no-such-provider` when it was never linked (oracle:
|
|
442
|
+
* `observations/auth/auth-unlink-provider.json` confirms prod emits
|
|
443
|
+
* exactly that code for an unlinked provider).
|
|
444
|
+
*
|
|
445
|
+
* Unlinking the LAST provider does NOT re-anonymize the account: the
|
|
446
|
+
* identity stays, credential-less. Matches prod — `isAnonymous` is
|
|
447
|
+
* about how the account was born, not what it currently carries.
|
|
448
|
+
*/
|
|
449
|
+
unlinkProvider(uid: string, providerId: string): StoredUser;
|
|
450
|
+
/** Shared lookup-or-throw behind the by-email mutations above. */
|
|
451
|
+
private requireByEmail;
|
|
452
|
+
createEmailPasswordUser(email: string, password: string): StoredUser;
|
|
453
|
+
/**
|
|
454
|
+
* Register a `beforeAuthStateChanged` callback. Mirrors upstream's
|
|
455
|
+
* `AuthMiddlewareQueue.pushCallback` (`auth_impl.ts`): callbacks run
|
|
456
|
+
* in registration order, before any REAL sign-in/sign-out transition
|
|
457
|
+
* commits — see {@link runBeforeStateChange}. Unregistering swaps the
|
|
458
|
+
* slot to inactive rather than removing it, so later indices stay
|
|
459
|
+
* stable if unsubscribe happens from inside a running pass.
|
|
460
|
+
*/
|
|
461
|
+
beforeAuthStateChanged(callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
|
|
462
|
+
/**
|
|
463
|
+
* Run every registered `beforeAuthStateChanged` callback, in
|
|
464
|
+
* registration order, BEFORE a real identity transition commits.
|
|
465
|
+
* Mirrors upstream `AuthMiddlewareQueue.runMiddleware`
|
|
466
|
+
* (`auth_impl.ts`):
|
|
467
|
+
* - skip entirely if `nextUser` is reference-identical to the
|
|
468
|
+
* current cached user (no-op transition);
|
|
469
|
+
* - `await` each active callback in order;
|
|
470
|
+
* - on success, push its `onAbort` (if any) onto a rollback stack;
|
|
471
|
+
* - if any callback throws/rejects, run the ENTIRE rollback stack
|
|
472
|
+
* in REVERSE registration order (swallowing each `onAbort`'s own
|
|
473
|
+
* errors), then throw `auth/login-blocked` wrapping the original
|
|
474
|
+
* message. The caller (a `signInWith…` / `signOut` call site)
|
|
475
|
+
* must NOT commit the transition when this rejects — the
|
|
476
|
+
* sandbox's `currentUser` / listeners are left untouched.
|
|
477
|
+
*
|
|
478
|
+
* Fires for BOTH directions: `nextUser` non-null (sign-in) and
|
|
479
|
+
* `nextUser === null` (sign-out) — matches prod, where the same
|
|
480
|
+
* queue gates `_updateCurrentUser` and `signOut`.
|
|
481
|
+
*/
|
|
482
|
+
runBeforeStateChange(nextUser: User | null): Promise<void>;
|
|
483
|
+
/**
|
|
484
|
+
* The gated entry point for REAL sign-in / sign-out transitions —
|
|
485
|
+
* runs {@link runBeforeStateChange} first, and only calls
|
|
486
|
+
* {@link setCurrentUser} (committing the transition + firing
|
|
487
|
+
* `onAuthStateChanged` / `onIdTokenChanged`) if every before-callback
|
|
488
|
+
* allows it. If a before-callback throws, this rejects and
|
|
489
|
+
* `setCurrentUser` is never called — the sign-in call site's promise
|
|
490
|
+
* rejects, `currentUser` is unchanged, and no listener fires.
|
|
491
|
+
*
|
|
492
|
+
* NOT used by the `sandbox.setUser` test driver — that bypass has no
|
|
493
|
+
* prod analog (documented on {@link setCurrentUser}) and stays a raw,
|
|
494
|
+
* ungated identity force, same as before this hook existed.
|
|
495
|
+
*
|
|
496
|
+
* FAST PATH (deliberate, documented divergence): when NO
|
|
497
|
+
* `beforeAuthStateChanged` callback is registered, this commits
|
|
498
|
+
* `setCurrentUser` SYNCHRONOUSLY — before returning the resolved
|
|
499
|
+
* promise — rather than unconditionally going through an async
|
|
500
|
+
* `await`. Every JS `await` (even of an already-resolved value)
|
|
501
|
+
* defers to a microtask; unconditionally awaiting here would push the
|
|
502
|
+
* commit at least one microtask later for every sign-in, even ones
|
|
503
|
+
* nobody gates, and would break the existing sandbox-only
|
|
504
|
+
* same-tick-dedup guarantee `onAuthStateChanged` callers rely on
|
|
505
|
+
* (COMPAT row 31: subscribe(); signInAnonymously(); with no
|
|
506
|
+
* await-gap between them must not double-fire). Once a caller
|
|
507
|
+
* registers a `beforeAuthStateChanged` callback, the transition
|
|
508
|
+
* genuinely becomes async (an unavoidable consequence of "blocking,
|
|
509
|
+
* awaitable middleware"), matching prod's own async gate — this
|
|
510
|
+
* method is NOT declared `async` for that reason; it returns a
|
|
511
|
+
* pre-resolved promise on the fast path instead of ever suspending.
|
|
512
|
+
*/
|
|
513
|
+
transitionCurrentUser(user: User | null, signInProvider?: string | null): Promise<void>;
|
|
514
|
+
/**
|
|
515
|
+
* Set the active user. Owns the fan-out decision directly (rather than
|
|
516
|
+
* leaning on the sandbox setter's structural-equality dedup), so it can
|
|
517
|
+
* mirror upstream `notifyAuthListeners`: `onIdTokenChanged` fires on
|
|
518
|
+
* every sign-in (incl. a same-uid re-sign-in that mints a fresh token —
|
|
519
|
+
* AUTH-B8), while `onAuthStateChanged` fires only on a uid change
|
|
520
|
+
* (AUTH-B7). The `applyingTransition` guard suppresses the synchronous
|
|
521
|
+
* `onCurrentUserChanged` subscriber so we don't double-notify.
|
|
522
|
+
*
|
|
523
|
+
* `signInProvider` (when passed) records the provider of THIS
|
|
524
|
+
* sign-in session — it feeds `IdTokenResult.signInProvider` and the
|
|
525
|
+
* synthesized `firebase.sign_in_provider` claim. Omitted by the
|
|
526
|
+
* test driver (`sandbox.setUser`), which leaves any previous value
|
|
527
|
+
* in place.
|
|
528
|
+
*/
|
|
529
|
+
setCurrentUser(user: User | null, signInProvider?: string | null): void;
|
|
530
|
+
setMockResult(providerId: string, result: UserCredential): void;
|
|
531
|
+
consumeMockResult(providerId: string): UserCredential | undefined;
|
|
532
|
+
setResolver(resolver: AuthFlowResolver | null): void;
|
|
533
|
+
getResolver(): AuthFlowResolver | null;
|
|
534
|
+
setRedirectResult(result: UserCredential): void;
|
|
535
|
+
takeRedirectResult(): UserCredential | null;
|
|
536
|
+
/**
|
|
537
|
+
* Record a provider-flow sign-in (popup / redirect / credential)
|
|
538
|
+
* against the user DB so the identity shows up in `listIdentities`
|
|
539
|
+
* with its real provider. Upserts: unknown uids get a fresh record
|
|
540
|
+
* (no password — these identities can't sign in via
|
|
541
|
+
* `signInWithEmailAndPassword`); known uids get the provider
|
|
542
|
+
* appended to `providerUserInfo` if it isn't already linked.
|
|
543
|
+
*/
|
|
544
|
+
recordProviderSignIn(user: User, providerId: string): void;
|
|
545
|
+
/**
|
|
546
|
+
* Mint a sign-in credential for a host-driven flow (the account
|
|
547
|
+
* picker behind `AuthFlowResolver`). Token + claims synthesis is
|
|
548
|
+
* backend-owned: the returned `User`'s `getIdToken` /
|
|
549
|
+
* `getIdTokenResult` route through this backend's token cache, so
|
|
550
|
+
* helper-driven sign-ins get real (cached, refreshable,
|
|
551
|
+
* provider-labeled) sandbox tokens instead of host-synthesized
|
|
552
|
+
* strings.
|
|
553
|
+
*
|
|
554
|
+
* Two request shapes:
|
|
555
|
+
* - `{providerId, uid}` — credential for an EXISTING identity
|
|
556
|
+
* (the picker's "pick" action). Throws `invalid-argument` for
|
|
557
|
+
* unknown uids.
|
|
558
|
+
* - `{providerId, spec}` — upsert a new identity (the picker's
|
|
559
|
+
* "add account"). If `spec.email` already belongs to a stored
|
|
560
|
+
* user, that identity is reused and the provider linked
|
|
561
|
+
* (Google-style same-email account reuse); otherwise a fresh
|
|
562
|
+
* record is created with uid `spec.uid ?? '<providerId>:<email>'`
|
|
563
|
+
* and NO password (provider identities can't sign in via
|
|
564
|
+
* `signInWithEmailAndPassword`).
|
|
565
|
+
*
|
|
566
|
+
* In both shapes the provider is linked into `providerUserInfo`.
|
|
567
|
+
* The credential does NOT sign the user in — hand it to the
|
|
568
|
+
* resolver's promise; `signInWithPopup`/`signInWithRedirect`
|
|
569
|
+
* complete the sign-in.
|
|
570
|
+
*/
|
|
571
|
+
createSignInCredential(req: {
|
|
572
|
+
providerId: string;
|
|
573
|
+
uid: string;
|
|
574
|
+
} | {
|
|
575
|
+
providerId: string;
|
|
576
|
+
spec: SignInIdentitySpec;
|
|
577
|
+
}): UserCredential;
|
|
578
|
+
/** Snapshot of every known identity (seeded + created), for a host
|
|
579
|
+
* account-picker UI. No `firebase/auth` equivalent — sandbox-only.
|
|
580
|
+
*
|
|
581
|
+
* `providerId` is the primary provider label (first linked
|
|
582
|
+
* provider, or `'anonymous'` for anonymous users);
|
|
583
|
+
* `providerUserInfo` is the full emulator-shaped array. */
|
|
584
|
+
listIdentities(): Array<{
|
|
585
|
+
uid: string;
|
|
586
|
+
email: string | null;
|
|
587
|
+
displayName: string | null;
|
|
588
|
+
providerId: string;
|
|
589
|
+
providerUserInfo: ProviderUserInfo[];
|
|
590
|
+
isAnonymous: boolean;
|
|
591
|
+
customClaims: Record<string, unknown>;
|
|
592
|
+
}>;
|
|
593
|
+
/** Public snapshot of a stored user. Defensive copies — mutating a
|
|
594
|
+
* returned record never touches the DB. */
|
|
595
|
+
private toRecord;
|
|
596
|
+
/** Every user in the DB (seeded, created, signed-in-via-provider,
|
|
597
|
+
* anonymous), as admin records. */
|
|
598
|
+
listUsers(): AuthUserRecord[];
|
|
599
|
+
/** Sanitize an admin-supplied linked-provider list (create + update):
|
|
600
|
+
* dedup by providerId, reject empty ids, and refuse the two ids that
|
|
601
|
+
* are NOT linkable entries — `password` is credential-derived (a
|
|
602
|
+
* password on the account links it; it leads the list when present)
|
|
603
|
+
* and `anonymous` surfaces on the token, never on the record. */
|
|
604
|
+
private sanitizeLinkedProviders;
|
|
605
|
+
/** Admin user creation. Does NOT sign the user in (unlike
|
|
606
|
+
* `createUserWithEmailAndPassword`) — matches the emulator's
|
|
607
|
+
* add-user flow / admin SDK semantics. */
|
|
608
|
+
createUser(req: CreateUserRequest): AuthUserRecord;
|
|
609
|
+
/** Admin user update. `undefined` fields untouched; `customClaims`
|
|
610
|
+
* replaces the whole map (admin `setCustomUserClaims` semantics).
|
|
611
|
+
* Claims changes reach an ACTIVE session only on the next token
|
|
612
|
+
* refresh / sign-in — same propagation story as prod. */
|
|
613
|
+
updateUser(uid: string, update: UpdateUserRequest): AuthUserRecord;
|
|
614
|
+
/** Admin user deletion. The active session (if it's this user) is
|
|
615
|
+
* NOT terminated — matches prod, where admin deletion doesn't kill
|
|
616
|
+
* live client sessions until the token is revoked/refreshed. */
|
|
617
|
+
deleteUser(uid: string): void;
|
|
618
|
+
/** Drop every user record (the emulator's "delete all accounts").
|
|
619
|
+
* Active sessions are untouched, like {@link deleteUser}. */
|
|
620
|
+
clearUsers(): void;
|
|
621
|
+
/** Throw `auth/user-disabled` if the uid resolves to a disabled
|
|
622
|
+
* record. Called by every provider-flow sign-in path; the
|
|
623
|
+
* email/password path runs the same check inside
|
|
624
|
+
* {@link validatePassword}. */
|
|
625
|
+
assertSignInAllowed(uid: string): void;
|
|
626
|
+
/**
|
|
627
|
+
* Mint a `User` shell for the given stored record. Used by all
|
|
628
|
+
* email/password and popup sign-in paths.
|
|
629
|
+
*/
|
|
630
|
+
buildUserFromStored(stored: StoredUser): User;
|
|
631
|
+
/** Mint a fresh anonymous user with an auto-generated uid. Records
|
|
632
|
+
* the identity in the user DB (empty `providerUserInfo`, matching
|
|
633
|
+
* the emulator) so `listIdentities` / future user-admin surfaces
|
|
634
|
+
* see anonymous accounts too. */
|
|
635
|
+
mintAnonymousUser(): User;
|
|
636
|
+
/**
|
|
637
|
+
* Mint a session identity WITHOUT making it the global current user —
|
|
638
|
+
* the substrate for per-connection identity at the serve layer (one
|
|
639
|
+
* SharedWorker sandbox, N tab sessions; issue #754). Performs a real
|
|
640
|
+
* sign-in's bookkeeping — provider record, `lastLoginAt` bump, a fresh
|
|
641
|
+
* token (new session = new token), the `sign_in` activity event — but
|
|
642
|
+
* leaves `sandbox.currentUser`, the auth-state listeners, and the
|
|
643
|
+
* session-change subscribers untouched.
|
|
644
|
+
*
|
|
645
|
+
* Returns the `User` plus the {@link AuthState} a data context should
|
|
646
|
+
* carry (`sandbox.withAuth(state)`) so rules evaluate exactly as they
|
|
647
|
+
* would for a globally signed-in user (`request.auth.uid` + custom
|
|
648
|
+
* claims on `request.auth.token`).
|
|
649
|
+
*
|
|
650
|
+
* GATING: `'anonymous'` / `'password'` / `'createPassword'` run through
|
|
651
|
+
* {@link assertProviderEnabled} — this is the path the served worker's
|
|
652
|
+
* per-port sessions actually use (`sandbox.mintSession`, NOT the
|
|
653
|
+
* `index.ts` free functions), so without this the provider toggle would
|
|
654
|
+
* have zero effect in `pyric dev`/Studio's served mode, the primary
|
|
655
|
+
* product surface. `'uid'` (session RESTORE for an existing identity —
|
|
656
|
+
* a page reload re-establishing a previously-valid session) is
|
|
657
|
+
* deliberately NOT gated, matching {@link restoreSession}: disabling a
|
|
658
|
+
* provider after the fact doesn't retroactively invalidate an already-
|
|
659
|
+
* authenticated session, same as real Firebase.
|
|
660
|
+
*/
|
|
661
|
+
mintDetachedSession(request: MintSessionRequest): MintedSession;
|
|
662
|
+
/** The shared sign-in bookkeeping behind {@link mintDetachedSession} —
|
|
663
|
+
* everything {@link setCurrentUser} does for a real sign-in EXCEPT the
|
|
664
|
+
* global-session parts. */
|
|
665
|
+
private establishDetachedSession;
|
|
666
|
+
/** Reconstruct a `User` object from an {@link AuthState}. Returns
|
|
667
|
+
* `null` for `null` input. Used to mirror sandbox-level state
|
|
668
|
+
* changes that didn't originate from this backend. */
|
|
669
|
+
private buildUserFromState;
|
|
670
|
+
/**
|
|
671
|
+
* Mint a fresh `{ token, result }` for the given uid + claims. Used
|
|
672
|
+
* both on initial `getIdToken` (cache miss) and on a forced
|
|
673
|
+
* refresh. Each call advances {@link nextTokenSerial} so two
|
|
674
|
+
* refreshes inside the same millisecond still produce distinct
|
|
675
|
+
* token strings.
|
|
676
|
+
*/
|
|
677
|
+
private mintToken;
|
|
678
|
+
/**
|
|
679
|
+
* Get-or-mint the ID token entry for a uid. `forceRefresh: true`
|
|
680
|
+
* always mints a fresh token, overwrites the cache, and fires the
|
|
681
|
+
* `onIdTokenChanged` listeners (NOT `onAuthStateChanged` — the
|
|
682
|
+
* user identity didn't change). Matches prod oracle observations:
|
|
683
|
+
*
|
|
684
|
+
* - `auth-getidtoken-force-refresh.json` — forceRefresh returns a
|
|
685
|
+
* different string than the previous read; a subsequent
|
|
686
|
+
* getIdToken(false) returns the new (cached) token.
|
|
687
|
+
* - `auth-onidtokenchanged-force-refresh.json` — onIdTokenChanged
|
|
688
|
+
* fires after a forced refresh.
|
|
689
|
+
*/
|
|
690
|
+
getIdTokenFor(uid: string, claims: Record<string, unknown>, forceRefresh: boolean): string;
|
|
691
|
+
/** {@link getIdTokenFor} variant returning the full IdTokenResult.
|
|
692
|
+
* Same cache + fan-out semantics. */
|
|
693
|
+
getIdTokenResultFor(uid: string, claims: Record<string, unknown>, forceRefresh: boolean): IdTokenResult;
|
|
694
|
+
/**
|
|
695
|
+
* Build a `User` shell whose `getIdToken` / `getIdTokenResult`
|
|
696
|
+
* route through the backend's token cache. The User object closes
|
|
697
|
+
* over its uid + claims; the cache is owned by the backend so all
|
|
698
|
+
* User instances for the same uid agree on the current token.
|
|
699
|
+
*/
|
|
700
|
+
private makeUser;
|
|
701
|
+
/** This backend's dispatch target — the same shape `getAuth` builds. */
|
|
702
|
+
private selfTarget;
|
|
703
|
+
/**
|
|
704
|
+
* Update a signed-in user's profile (`displayName` / `photoURL`) — the
|
|
705
|
+
* backend behind the top-level `updateProfile(user, profile)`.
|
|
706
|
+
*
|
|
707
|
+
* Updates the stored record, then mutates the passed `user` AND
|
|
708
|
+
* `this.cachedUser` IN PLACE when their uid matches (the `User` fields are
|
|
709
|
+
* TS-`readonly` but runtime-mutable, so held references — including
|
|
710
|
+
* `auth.currentUser` — reflect the change without a re-read). Only a field
|
|
711
|
+
* whose `profile.<field> !== undefined` is applied, so `null` clears and
|
|
712
|
+
* `undefined` leaves the field untouched.
|
|
713
|
+
*
|
|
714
|
+
* Fires the coarse user-DB change (`notifyUsersChanged`) + a `user_update`
|
|
715
|
+
* activity event, but does NOT fan out auth-state / id-token listeners:
|
|
716
|
+
* real `firebase/auth.updateProfile` does not fire `onAuthStateChanged` /
|
|
717
|
+
* `onIdTokenChanged`.
|
|
718
|
+
*/
|
|
719
|
+
updateProfileFor(user: User, profile: {
|
|
720
|
+
displayName?: string | null;
|
|
721
|
+
photoURL?: string | null;
|
|
722
|
+
}): void;
|
|
723
|
+
/** Mutate a `User`'s `displayName` / `photoURL` (and the first
|
|
724
|
+
* `providerData` entry's, when present) in place. `readonly` at the type
|
|
725
|
+
* level, mutable at runtime — cast through a Mutable helper. Only applies a
|
|
726
|
+
* field when it was explicitly provided (`!== undefined`). */
|
|
727
|
+
private applyProfileToUser;
|
|
728
|
+
/**
|
|
729
|
+
* Worker-path `updateProfile`: update the stored record for `uid`
|
|
730
|
+
* (+ mutate `this.cachedUser` in place if it matches), then return the
|
|
731
|
+
* refreshed {@link AuthUserRecord}. The worker holds the real per-port
|
|
732
|
+
* session `User` and mutates it separately (host-auth.ts). Throws
|
|
733
|
+
* `auth/user-not-found` for an unknown uid.
|
|
734
|
+
*/
|
|
735
|
+
updateProfileByUid(uid: string, profile: {
|
|
736
|
+
displayName?: string | null;
|
|
737
|
+
photoURL?: string | null;
|
|
738
|
+
}): AuthUserRecord;
|
|
739
|
+
/**
|
|
740
|
+
* Backend for the top-level `deleteUser(user)` free function. Removes the
|
|
741
|
+
* account from the store (via the same path admin {@link deleteUser} uses)
|
|
742
|
+
* AND — unlike admin deletion — signs the user out if they are the current
|
|
743
|
+
* user, matching `firebase/auth`'s `user.delete()` / `deleteUser(user)`,
|
|
744
|
+
* which clears `auth.currentUser` and fans out `onAuthStateChanged(null)`.
|
|
745
|
+
*/
|
|
746
|
+
deleteFor(user: User): void;
|
|
747
|
+
/**
|
|
748
|
+
* Backend for the top-level `updateEmail(user, newEmail)`. Re-keys the
|
|
749
|
+
* stored record's email (via {@link updateUser}, which validates format +
|
|
750
|
+
* rejects `auth/email-already-in-use`) so a subsequent sign-in resolves
|
|
751
|
+
* against the NEW email, then mutates the passed `user` (and
|
|
752
|
+
* `this.cachedUser`) in place so held references reflect the change.
|
|
753
|
+
*
|
|
754
|
+
* Divergence: the sandbox applies the change directly. Real
|
|
755
|
+
* `firebase/auth.updateEmail` may require a recent login
|
|
756
|
+
* (`auth/requires-recent-login`) and, with email-enumeration protection
|
|
757
|
+
* on, is superseded by `verifyBeforeUpdateEmail`; the sandbox enforces
|
|
758
|
+
* neither.
|
|
759
|
+
*/
|
|
760
|
+
updateEmailFor(user: User, newEmail: string): void;
|
|
761
|
+
/** Mutate a `User`'s `email` (and its first `providerData` entry) in
|
|
762
|
+
* place — `readonly` at the type level, runtime-mutable. */
|
|
763
|
+
private applyEmailToUser;
|
|
764
|
+
/**
|
|
765
|
+
* Backend for the top-level `updatePassword(user, newPassword)`. Sets the
|
|
766
|
+
* stored password (via {@link updateUser}, which validates strength and
|
|
767
|
+
* links the `password` provider). The sandbox DOES store + verify
|
|
768
|
+
* passwords, so a subsequent `signInWithEmailAndPassword` with the new
|
|
769
|
+
* password succeeds and the old one throws `auth/wrong-password`.
|
|
770
|
+
*
|
|
771
|
+
* Divergence: real `firebase/auth.updatePassword` may require a recent
|
|
772
|
+
* login (`auth/requires-recent-login`); the sandbox does not enforce it.
|
|
773
|
+
*/
|
|
774
|
+
updatePasswordFor(user: User, newPassword: string): void;
|
|
775
|
+
/**
|
|
776
|
+
* Backend for the top-level `reload(user)`. Re-reads the stored record
|
|
777
|
+
* into the passed `user` (and `this.cachedUser`) in place so a change
|
|
778
|
+
* made out of band (e.g. `sandbox.updateUser`) is reflected — matching
|
|
779
|
+
* `firebase/auth.reload`, which refreshes the user from the server.
|
|
780
|
+
*
|
|
781
|
+
* If the identity is gone from the store (e.g. after `deleteUser`),
|
|
782
|
+
* throws `auth/user-token-expired` — matching upstream integration
|
|
783
|
+
* flows (`email.test.ts` / `custom.local.test.ts`: delete then reload).
|
|
784
|
+
*/
|
|
785
|
+
reloadFor(user: User): void;
|
|
786
|
+
/** Copy a stored record's mutable profile fields onto a live `User`
|
|
787
|
+
* object in place. */
|
|
788
|
+
private applyStoredToUser;
|
|
789
|
+
/** Live customClaims for a uid — the current value in the user DB,
|
|
790
|
+
* falling back to `fallback` for uids the DB doesn't track (anonymous
|
|
791
|
+
* / popup users). Used so a re-seed / `updateUser` is reflected in
|
|
792
|
+
* held users' forced-refresh tokens (AUTH-B10). */
|
|
793
|
+
private liveClaims;
|
|
794
|
+
/** Internal validator for email/password — checks the password
|
|
795
|
+
* matches the stored record. Throws `auth/invalid-email` on a
|
|
796
|
+
* malformed email, `auth/wrong-password` on mismatch,
|
|
797
|
+
* `auth/user-not-found` if the email isn't seeded.
|
|
798
|
+
*
|
|
799
|
+
* Format validation fires BEFORE the user-DB lookup so callers
|
|
800
|
+
* shipping malformed inputs see the same `auth/invalid-email`
|
|
801
|
+
* prod returns — they wouldn't reach the missing-user path in
|
|
802
|
+
* production either. Password-strength is NOT enforced on sign-in
|
|
803
|
+
* (a previously-weak seeded password should still let the user
|
|
804
|
+
* in); only `createUserWithEmailAndPassword` runs the strength
|
|
805
|
+
* check, mirroring prod. */
|
|
806
|
+
validatePassword(email: string, password: string): StoredUser;
|
|
807
|
+
}
|
|
808
|
+
/** Re-exported from {@link ./auth-errors.ts} so consumers importing
|
|
809
|
+
* `makeAuthError` from the `sandbox-backend` barrel keep working. */
|
|
810
|
+
export { makeAuthError } from './auth-errors.js';
|
|
811
|
+
//# sourceMappingURL=sandbox-backend.d.ts.map
|