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,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inert configuration tokens — the persistence markers, the popup/redirect
|
|
3
|
+
* resolver token, and the two error maps.
|
|
4
|
+
*
|
|
5
|
+
* ─── What "inert" means here, precisely ─────────────────────────────
|
|
6
|
+
* Every value in this file is a value consumer code PASSES somewhere
|
|
7
|
+
* (`setPersistence(auth, browserLocalPersistence)`,
|
|
8
|
+
* `initializeAuth(app, { persistence, popupRedirectResolver, errorMap })`)
|
|
9
|
+
* rather than a value it reads behavior out of. The sandbox accepts them
|
|
10
|
+
* and, for persistence, records the mode; none of them can do their real
|
|
11
|
+
* job here, because their real job is to reach a browser storage backend,
|
|
12
|
+
* a popup window, or a message table that the sandbox does not have.
|
|
13
|
+
*
|
|
14
|
+
* They are mirrored anyway, and NOT as a courtesy: an app that writes the
|
|
15
|
+
* idiomatic `initializeAuth(app, { persistence: indexedDBLocalPersistence })`
|
|
16
|
+
* does not fail to bundle, does not throw, and behaves identically —
|
|
17
|
+
* because in an in-memory sandbox the persistence choice genuinely has no
|
|
18
|
+
* observable consequence. This is the same "honest inert token" pattern
|
|
19
|
+
* `pyric/firestore` already uses for its cache-factory tokens.
|
|
20
|
+
*
|
|
21
|
+
* The one thing that is NOT inert is the `.type` discriminant: consumer
|
|
22
|
+
* code branches on it, so it must match upstream exactly.
|
|
23
|
+
*
|
|
24
|
+
* ─── An oracle caveat, recorded because it would otherwise mislead ──
|
|
25
|
+
* `auth-mechanical-surface-constants` captured `type: 'NONE'` for EVERY
|
|
26
|
+
* persistence token — including `browserLocalPersistence`, which is
|
|
27
|
+
* unambiguously `'LOCAL'` upstream. That is an artifact of the harness:
|
|
28
|
+
* it runs under Node, where firebase/auth ships stubs for the browser-only
|
|
29
|
+
* tokens. The capture is committed as-is (it is what we saw), the
|
|
30
|
+
* conformance suite does NOT assert persistence types from it, and the
|
|
31
|
+
* values below follow the documented `Persistence.type` union instead.
|
|
32
|
+
* An observation you have to explain is still better than one you quietly
|
|
33
|
+
* discard.
|
|
34
|
+
*/
|
|
35
|
+
import type { Persistence } from './types.js';
|
|
36
|
+
/** No persistence — session dies with the tab. */
|
|
37
|
+
export declare const inMemoryPersistence: Persistence;
|
|
38
|
+
/** `sessionStorage`-backed. */
|
|
39
|
+
export declare const browserSessionPersistence: Persistence;
|
|
40
|
+
/** `localStorage`-backed. Firebase's default. */
|
|
41
|
+
export declare const browserLocalPersistence: Persistence;
|
|
42
|
+
/** IndexedDB-backed. Long-term, same observable class as
|
|
43
|
+
* `browserLocalPersistence` — hence the shared `'LOCAL'` type. */
|
|
44
|
+
export declare const indexedDBLocalPersistence: Persistence;
|
|
45
|
+
/** Cookie-backed, for SSR. The fourth member of upstream's
|
|
46
|
+
* `Persistence.type` union. */
|
|
47
|
+
export declare const browserCookiePersistence: Persistence;
|
|
48
|
+
/**
|
|
49
|
+
* `browserPopupRedirectResolver` — upstream's default resolver, the thing
|
|
50
|
+
* a browser `getAuth()` wires in so `signInWithPopup` can open a window.
|
|
51
|
+
*
|
|
52
|
+
* The sandbox has no window to open, and it already has a FIRST-CLASS,
|
|
53
|
+
* pluggable equivalent: {@link AuthFlowResolver}, installed via
|
|
54
|
+
* `sandbox.setAuthFlowResolver`. So this export exists to satisfy the
|
|
55
|
+
* idiomatic `initializeAuth(app, { popupRedirectResolver:
|
|
56
|
+
* browserPopupRedirectResolver })` without changing anything: passing it
|
|
57
|
+
* is accepted and ignored, and popup/redirect sign-in resolves through
|
|
58
|
+
* the sandbox's own resolver seam instead.
|
|
59
|
+
*
|
|
60
|
+
* Branded rather than left as a bare `{}` so a host can recognize it.
|
|
61
|
+
*/
|
|
62
|
+
export declare const browserPopupRedirectResolver: {
|
|
63
|
+
readonly _pyricResolverToken: 'browser-popup-redirect';
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* An error map — upstream's `AuthErrorMap`. Passed to `initializeAuth`
|
|
67
|
+
* to control how much detail a thrown `FirebaseError` carries.
|
|
68
|
+
*/
|
|
69
|
+
export type AuthErrorMap = () => Record<string, string>;
|
|
70
|
+
/**
|
|
71
|
+
* `debugErrorMap` — upstream's verbose map: full human-readable messages
|
|
72
|
+
* on every auth error, at the cost of bundle size.
|
|
73
|
+
*
|
|
74
|
+
* The sandbox ALWAYS throws with a full message (see `auth-errors.ts`:
|
|
75
|
+
* every `makeAuthError` call site passes real prose), so the debug map is
|
|
76
|
+
* effectively already in force and installing it changes nothing. Exported
|
|
77
|
+
* as an accepted no-op token.
|
|
78
|
+
*/
|
|
79
|
+
export declare const debugErrorMap: AuthErrorMap;
|
|
80
|
+
/**
|
|
81
|
+
* `prodErrorMap` — upstream's minified map: error codes without the
|
|
82
|
+
* message text, to save bytes in production builds.
|
|
83
|
+
*
|
|
84
|
+
* NOT honored, deliberately. Installing it upstream STRIPS the messages;
|
|
85
|
+
* doing that in a sandbox whose entire purpose is to tell a developer what
|
|
86
|
+
* went wrong would be actively hostile. Accepted and ignored — the sandbox
|
|
87
|
+
* keeps throwing full messages.
|
|
88
|
+
*/
|
|
89
|
+
export declare const prodErrorMap: AuthErrorMap;
|
|
90
|
+
//# sourceMappingURL=config-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-tokens.d.ts","sourceRoot":"","sources":["../../src/auth/config-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,EAAE,WAA8B,CAAC;AACjE,+BAA+B;AAC/B,eAAO,MAAM,yBAAyB,EAAE,WAAiC,CAAC;AAC1E,iDAAiD;AACjD,eAAO,MAAM,uBAAuB,EAAE,WAA+B,CAAC;AACtE;mEACmE;AACnE,eAAO,MAAM,yBAAyB,EAAE,WAA+B,CAAC;AACxE;gCACgC;AAChC,eAAO,MAAM,wBAAwB,EAAE,WAAgC,CAAC;AAIxE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,EAAE;IAAE,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,CAAA;CAElG,CAAC;AAIF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,YAAyB,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,YAAyB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inert configuration tokens — the persistence markers, the popup/redirect
|
|
3
|
+
* resolver token, and the two error maps.
|
|
4
|
+
*
|
|
5
|
+
* ─── What "inert" means here, precisely ─────────────────────────────
|
|
6
|
+
* Every value in this file is a value consumer code PASSES somewhere
|
|
7
|
+
* (`setPersistence(auth, browserLocalPersistence)`,
|
|
8
|
+
* `initializeAuth(app, { persistence, popupRedirectResolver, errorMap })`)
|
|
9
|
+
* rather than a value it reads behavior out of. The sandbox accepts them
|
|
10
|
+
* and, for persistence, records the mode; none of them can do their real
|
|
11
|
+
* job here, because their real job is to reach a browser storage backend,
|
|
12
|
+
* a popup window, or a message table that the sandbox does not have.
|
|
13
|
+
*
|
|
14
|
+
* They are mirrored anyway, and NOT as a courtesy: an app that writes the
|
|
15
|
+
* idiomatic `initializeAuth(app, { persistence: indexedDBLocalPersistence })`
|
|
16
|
+
* does not fail to bundle, does not throw, and behaves identically —
|
|
17
|
+
* because in an in-memory sandbox the persistence choice genuinely has no
|
|
18
|
+
* observable consequence. This is the same "honest inert token" pattern
|
|
19
|
+
* `pyric/firestore` already uses for its cache-factory tokens.
|
|
20
|
+
*
|
|
21
|
+
* The one thing that is NOT inert is the `.type` discriminant: consumer
|
|
22
|
+
* code branches on it, so it must match upstream exactly.
|
|
23
|
+
*
|
|
24
|
+
* ─── An oracle caveat, recorded because it would otherwise mislead ──
|
|
25
|
+
* `auth-mechanical-surface-constants` captured `type: 'NONE'` for EVERY
|
|
26
|
+
* persistence token — including `browserLocalPersistence`, which is
|
|
27
|
+
* unambiguously `'LOCAL'` upstream. That is an artifact of the harness:
|
|
28
|
+
* it runs under Node, where firebase/auth ships stubs for the browser-only
|
|
29
|
+
* tokens. The capture is committed as-is (it is what we saw), the
|
|
30
|
+
* conformance suite does NOT assert persistence types from it, and the
|
|
31
|
+
* values below follow the documented `Persistence.type` union instead.
|
|
32
|
+
* An observation you have to explain is still better than one you quietly
|
|
33
|
+
* discard.
|
|
34
|
+
*/
|
|
35
|
+
// ─── Persistence markers ──────────────────────────────────────────────
|
|
36
|
+
/** No persistence — session dies with the tab. */
|
|
37
|
+
export const inMemoryPersistence = { type: 'NONE' };
|
|
38
|
+
/** `sessionStorage`-backed. */
|
|
39
|
+
export const browserSessionPersistence = { type: 'SESSION' };
|
|
40
|
+
/** `localStorage`-backed. Firebase's default. */
|
|
41
|
+
export const browserLocalPersistence = { type: 'LOCAL' };
|
|
42
|
+
/** IndexedDB-backed. Long-term, same observable class as
|
|
43
|
+
* `browserLocalPersistence` — hence the shared `'LOCAL'` type. */
|
|
44
|
+
export const indexedDBLocalPersistence = { type: 'LOCAL' };
|
|
45
|
+
/** Cookie-backed, for SSR. The fourth member of upstream's
|
|
46
|
+
* `Persistence.type` union. */
|
|
47
|
+
export const browserCookiePersistence = { type: 'COOKIE' };
|
|
48
|
+
// ─── Popup / redirect resolver token ──────────────────────────────────
|
|
49
|
+
/**
|
|
50
|
+
* `browserPopupRedirectResolver` — upstream's default resolver, the thing
|
|
51
|
+
* a browser `getAuth()` wires in so `signInWithPopup` can open a window.
|
|
52
|
+
*
|
|
53
|
+
* The sandbox has no window to open, and it already has a FIRST-CLASS,
|
|
54
|
+
* pluggable equivalent: {@link AuthFlowResolver}, installed via
|
|
55
|
+
* `sandbox.setAuthFlowResolver`. So this export exists to satisfy the
|
|
56
|
+
* idiomatic `initializeAuth(app, { popupRedirectResolver:
|
|
57
|
+
* browserPopupRedirectResolver })` without changing anything: passing it
|
|
58
|
+
* is accepted and ignored, and popup/redirect sign-in resolves through
|
|
59
|
+
* the sandbox's own resolver seam instead.
|
|
60
|
+
*
|
|
61
|
+
* Branded rather than left as a bare `{}` so a host can recognize it.
|
|
62
|
+
*/
|
|
63
|
+
export const browserPopupRedirectResolver = {
|
|
64
|
+
_pyricResolverToken: 'browser-popup-redirect',
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* `debugErrorMap` — upstream's verbose map: full human-readable messages
|
|
68
|
+
* on every auth error, at the cost of bundle size.
|
|
69
|
+
*
|
|
70
|
+
* The sandbox ALWAYS throws with a full message (see `auth-errors.ts`:
|
|
71
|
+
* every `makeAuthError` call site passes real prose), so the debug map is
|
|
72
|
+
* effectively already in force and installing it changes nothing. Exported
|
|
73
|
+
* as an accepted no-op token.
|
|
74
|
+
*/
|
|
75
|
+
export const debugErrorMap = () => ({});
|
|
76
|
+
/**
|
|
77
|
+
* `prodErrorMap` — upstream's minified map: error codes without the
|
|
78
|
+
* message text, to save bytes in production builds.
|
|
79
|
+
*
|
|
80
|
+
* NOT honored, deliberately. Installing it upstream STRIPS the messages;
|
|
81
|
+
* doing that in a sandbox whose entire purpose is to tell a developer what
|
|
82
|
+
* went wrong would be actively hostile. Accepted and ignored — the sandbox
|
|
83
|
+
* keeps throwing full messages.
|
|
84
|
+
*/
|
|
85
|
+
export const prodErrorMap = () => ({});
|
|
86
|
+
//# sourceMappingURL=config-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-tokens.js","sourceRoot":"","sources":["../../src/auth/config-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,yEAAyE;AAEzE,kDAAkD;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACjE,+BAA+B;AAC/B,MAAM,CAAC,MAAM,yBAAyB,GAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC1E,iDAAiD;AACjD,MAAM,CAAC,MAAM,uBAAuB,GAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACtE;mEACmE;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACxE;gCACgC;AAChC,MAAM,CAAC,MAAM,wBAAwB,GAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAExE,yEAAyE;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA+D;IACtG,mBAAmB,EAAE,wBAAwB;CAC9C,CAAC;AAUF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAiB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth credential classes — `AuthCredential` and its two concrete
|
|
3
|
+
* subclasses, plus `getAdditionalUserInfo`.
|
|
4
|
+
*
|
|
5
|
+
* ─── Why these are CLASSES that carry a secret ─────────────────────
|
|
6
|
+
* Before the linking / reauth climb, `pyric/auth` modeled a credential
|
|
7
|
+
* as a bare `{ providerId, signInMethod }` marker: an opaque token whose
|
|
8
|
+
* only job was to be matched against a pre-staged `mockSignInResult`.
|
|
9
|
+
* That is sufficient for OAuth, where the secret genuinely lives with
|
|
10
|
+
* the identity provider and the sandbox has nothing to check.
|
|
11
|
+
*
|
|
12
|
+
* It is NOT sufficient for the two flows this climb adds. Both
|
|
13
|
+
* `linkWithCredential(user, cred)` and
|
|
14
|
+
* `reauthenticateWithCredential(user, cred)` have to ANSWER A QUESTION
|
|
15
|
+
* about the credential — "does this password actually belong to this
|
|
16
|
+
* account?" — and a marker with no secret in it cannot be asked. An
|
|
17
|
+
* email/password credential carries its own secret, so those two flows
|
|
18
|
+
* are decidable entirely inside the sandbox, with no resolver and no
|
|
19
|
+
* mock: the backend already stores and verifies passwords.
|
|
20
|
+
*
|
|
21
|
+
* Hence {@link EmailAuthCredential} carries the email plus EITHER a
|
|
22
|
+
* password or an email link, and the sandbox validates against the user
|
|
23
|
+
* DB exactly as `signInWithEmailAndPassword` does.
|
|
24
|
+
* {@link OAuthCredential} carries the IdP tokens, which the sandbox
|
|
25
|
+
* still cannot verify — those flows keep going through the resolver /
|
|
26
|
+
* mock seam, which is the honest model (the sandbox is not Google).
|
|
27
|
+
*
|
|
28
|
+
* The `{ providerId, signInMethod }` shape is preserved exactly, so
|
|
29
|
+
* every existing consumer (`signInWithCredential`'s provider match, the
|
|
30
|
+
* mock registry) keeps working unchanged.
|
|
31
|
+
*/
|
|
32
|
+
import type { UserCredential } from './types.js';
|
|
33
|
+
/**
|
|
34
|
+
* Base auth credential. Mirrors `firebase/auth`'s abstract
|
|
35
|
+
* `AuthCredential`: an opaque token identifying a provider and the
|
|
36
|
+
* method used to sign in with it.
|
|
37
|
+
*
|
|
38
|
+
* Concrete, not abstract, so `instanceof AuthCredential` narrowing and
|
|
39
|
+
* direct construction both work in consumer code. Upstream marks it
|
|
40
|
+
* abstract, but nothing in the modular surface constructs a bare
|
|
41
|
+
* `AuthCredential` — the providers' static factories do.
|
|
42
|
+
*/
|
|
43
|
+
export declare class AuthCredential {
|
|
44
|
+
/** Provider identifier (e.g. `'google.com'`, `'password'`). */
|
|
45
|
+
readonly providerId: string;
|
|
46
|
+
/** Sign-in method identifier. Distinct from {@link providerId}: the
|
|
47
|
+
* `'password'` provider signs in via `'password'` OR `'emailLink'`. */
|
|
48
|
+
readonly signInMethod: string;
|
|
49
|
+
constructor(providerId: string, signInMethod: string);
|
|
50
|
+
/** Serialize. Mirrors upstream's `AuthCredential.toJSON()`. */
|
|
51
|
+
toJSON(): Record<string, unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* Deserialize a credential previously produced by {@link toJSON}.
|
|
54
|
+
* Returns `null` for input that isn't a credential payload — matching
|
|
55
|
+
* upstream, which never throws here.
|
|
56
|
+
*/
|
|
57
|
+
static fromJSON(json: string | Record<string, unknown>): AuthCredential | null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Email/password (or email-link) credential. Mirrors `firebase/auth`'s
|
|
61
|
+
* `EmailAuthCredential`.
|
|
62
|
+
*
|
|
63
|
+
* Carries the SECRET — which is the whole reason the linking and reauth
|
|
64
|
+
* families are decidable in the sandbox without a resolver (see the file
|
|
65
|
+
* docstring). The secret is `password` for the `'password'` sign-in
|
|
66
|
+
* method and the email LINK for the `'emailLink'` method.
|
|
67
|
+
*
|
|
68
|
+
* `_secret` is deliberately non-enumerable: it must not leak into a
|
|
69
|
+
* `JSON.stringify(cred)` in host/log code. {@link toJSON} exposes it
|
|
70
|
+
* only for the round-trip upstream also supports.
|
|
71
|
+
*/
|
|
72
|
+
export declare class EmailAuthCredential extends AuthCredential {
|
|
73
|
+
/** The account this credential is for. */
|
|
74
|
+
readonly email: string;
|
|
75
|
+
/** The password, or (for `signInMethod === 'emailLink'`) the link.
|
|
76
|
+
* Assigned via `defineProperty` in the constructor (to make it
|
|
77
|
+
* non-enumerable), which TS cannot see — hence the `!`. */
|
|
78
|
+
private readonly secret;
|
|
79
|
+
constructor(email: string, secret: string, signInMethod?: string);
|
|
80
|
+
/** The password carried by a `'password'`-method credential, else `null`. */
|
|
81
|
+
get password(): string | null;
|
|
82
|
+
/** The email link carried by an `'emailLink'`-method credential, else `null`. */
|
|
83
|
+
get emailLink(): string | null;
|
|
84
|
+
toJSON(): Record<string, unknown>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* OAuth credential. Mirrors `firebase/auth`'s `OAuthCredential`.
|
|
88
|
+
*
|
|
89
|
+
* Carries the IdP tokens the real flow would have obtained. The sandbox
|
|
90
|
+
* does NOT and cannot verify them — it is not the identity provider —
|
|
91
|
+
* so flows consuming one of these still resolve through the
|
|
92
|
+
* `AuthFlowResolver` / `mockSignInResult` seam. Keeping the tokens on
|
|
93
|
+
* the object anyway means a resolver implementation (a playground
|
|
94
|
+
* picker, a test fixture) can read whatever the caller passed.
|
|
95
|
+
*/
|
|
96
|
+
export declare class OAuthCredential extends AuthCredential {
|
|
97
|
+
readonly idToken?: string;
|
|
98
|
+
readonly accessToken?: string;
|
|
99
|
+
readonly secret?: string;
|
|
100
|
+
constructor(providerId: string, signInMethod: string, tokens?: {
|
|
101
|
+
idToken?: string;
|
|
102
|
+
accessToken?: string;
|
|
103
|
+
secret?: string;
|
|
104
|
+
});
|
|
105
|
+
toJSON(): Record<string, unknown>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Per-provider extra data attached to a sign-in. Mirrors
|
|
109
|
+
* `firebase/auth`'s `AdditionalUserInfo`.
|
|
110
|
+
*/
|
|
111
|
+
export interface AdditionalUserInfo {
|
|
112
|
+
/** Was this credential produced by a sign-UP rather than a sign-IN? */
|
|
113
|
+
readonly isNewUser: boolean;
|
|
114
|
+
/** IdP-specific profile blob. Empty object for the sandbox's own
|
|
115
|
+
* providers — there is no real IdP behind them to return a profile. */
|
|
116
|
+
readonly profile: Record<string, unknown> | null;
|
|
117
|
+
/** The provider that authenticated this user, or `null` for the
|
|
118
|
+
* anonymous and custom-token paths (neither is a federated provider —
|
|
119
|
+
* see the `ProviderId` docstring in `enums.ts`). */
|
|
120
|
+
readonly providerId: string | null;
|
|
121
|
+
/** Present only for GitHub / Twitter. */
|
|
122
|
+
readonly username?: string | null;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* `getAdditionalUserInfo(userCredential)` — mirror of `firebase/auth`.
|
|
126
|
+
*
|
|
127
|
+
* Reads the info the sandbox recorded on the credential when it minted
|
|
128
|
+
* it. `isNewUser` is true only when the credential came from a flow that
|
|
129
|
+
* CREATED the identity (`createUserWithEmailAndPassword`,
|
|
130
|
+
* `signInAnonymously`, a first-time email-link sign-in, a link that
|
|
131
|
+
* upgraded an anonymous account).
|
|
132
|
+
*
|
|
133
|
+
* Oracle (`observations/auth/auth-additional-user-info-shape.json`):
|
|
134
|
+
* against prod an anonymous sign-in yields
|
|
135
|
+
* `{ isNewUser: true, providerId: null, profile: {} }` — note
|
|
136
|
+
* `providerId: null`, not `'anonymous'`, because anonymous is not a
|
|
137
|
+
* federated provider.
|
|
138
|
+
*/
|
|
139
|
+
export declare function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null;
|
|
140
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/auth/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;GASG;AACH,qBAAa,cAAc;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;4EACwE;IACxE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAElB,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAKpD,+DAA+D;IAC/D,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIjC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc,GAAG,IAAI;CAa/E;AAWD;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;gEAE4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;gBAErB,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAE,MAAoC;IAY7F,6EAA6E;IAC7E,IAAI,QAAQ,IAAI,MAAM,GAAG,IAAI,CAE5B;IAED,iFAAiF;IACjF,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;IAEQ,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAQ3C;AAED;;;;;;;;;GASG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAGvB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,MAAM,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO;IAQjE,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAS3C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;4EACwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjD;;yDAEqD;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,cAAc,GAAG,kBAAkB,GAAG,IAAI,CAY/F"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth credential classes — `AuthCredential` and its two concrete
|
|
3
|
+
* subclasses, plus `getAdditionalUserInfo`.
|
|
4
|
+
*
|
|
5
|
+
* ─── Why these are CLASSES that carry a secret ─────────────────────
|
|
6
|
+
* Before the linking / reauth climb, `pyric/auth` modeled a credential
|
|
7
|
+
* as a bare `{ providerId, signInMethod }` marker: an opaque token whose
|
|
8
|
+
* only job was to be matched against a pre-staged `mockSignInResult`.
|
|
9
|
+
* That is sufficient for OAuth, where the secret genuinely lives with
|
|
10
|
+
* the identity provider and the sandbox has nothing to check.
|
|
11
|
+
*
|
|
12
|
+
* It is NOT sufficient for the two flows this climb adds. Both
|
|
13
|
+
* `linkWithCredential(user, cred)` and
|
|
14
|
+
* `reauthenticateWithCredential(user, cred)` have to ANSWER A QUESTION
|
|
15
|
+
* about the credential — "does this password actually belong to this
|
|
16
|
+
* account?" — and a marker with no secret in it cannot be asked. An
|
|
17
|
+
* email/password credential carries its own secret, so those two flows
|
|
18
|
+
* are decidable entirely inside the sandbox, with no resolver and no
|
|
19
|
+
* mock: the backend already stores and verifies passwords.
|
|
20
|
+
*
|
|
21
|
+
* Hence {@link EmailAuthCredential} carries the email plus EITHER a
|
|
22
|
+
* password or an email link, and the sandbox validates against the user
|
|
23
|
+
* DB exactly as `signInWithEmailAndPassword` does.
|
|
24
|
+
* {@link OAuthCredential} carries the IdP tokens, which the sandbox
|
|
25
|
+
* still cannot verify — those flows keep going through the resolver /
|
|
26
|
+
* mock seam, which is the honest model (the sandbox is not Google).
|
|
27
|
+
*
|
|
28
|
+
* The `{ providerId, signInMethod }` shape is preserved exactly, so
|
|
29
|
+
* every existing consumer (`signInWithCredential`'s provider match, the
|
|
30
|
+
* mock registry) keeps working unchanged.
|
|
31
|
+
*/
|
|
32
|
+
import { ProviderId, SignInMethod } from './enums.js';
|
|
33
|
+
/**
|
|
34
|
+
* Base auth credential. Mirrors `firebase/auth`'s abstract
|
|
35
|
+
* `AuthCredential`: an opaque token identifying a provider and the
|
|
36
|
+
* method used to sign in with it.
|
|
37
|
+
*
|
|
38
|
+
* Concrete, not abstract, so `instanceof AuthCredential` narrowing and
|
|
39
|
+
* direct construction both work in consumer code. Upstream marks it
|
|
40
|
+
* abstract, but nothing in the modular surface constructs a bare
|
|
41
|
+
* `AuthCredential` — the providers' static factories do.
|
|
42
|
+
*/
|
|
43
|
+
export class AuthCredential {
|
|
44
|
+
/** Provider identifier (e.g. `'google.com'`, `'password'`). */
|
|
45
|
+
providerId;
|
|
46
|
+
/** Sign-in method identifier. Distinct from {@link providerId}: the
|
|
47
|
+
* `'password'` provider signs in via `'password'` OR `'emailLink'`. */
|
|
48
|
+
signInMethod;
|
|
49
|
+
constructor(providerId, signInMethod) {
|
|
50
|
+
this.providerId = providerId;
|
|
51
|
+
this.signInMethod = signInMethod;
|
|
52
|
+
}
|
|
53
|
+
/** Serialize. Mirrors upstream's `AuthCredential.toJSON()`. */
|
|
54
|
+
toJSON() {
|
|
55
|
+
return { providerId: this.providerId, signInMethod: this.signInMethod };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Deserialize a credential previously produced by {@link toJSON}.
|
|
59
|
+
* Returns `null` for input that isn't a credential payload — matching
|
|
60
|
+
* upstream, which never throws here.
|
|
61
|
+
*/
|
|
62
|
+
static fromJSON(json) {
|
|
63
|
+
const obj = typeof json === 'string' ? safeParse(json) : json;
|
|
64
|
+
if (!obj)
|
|
65
|
+
return null;
|
|
66
|
+
const providerId = obj['providerId'];
|
|
67
|
+
const signInMethod = obj['signInMethod'];
|
|
68
|
+
if (typeof providerId !== 'string' || typeof signInMethod !== 'string')
|
|
69
|
+
return null;
|
|
70
|
+
if (providerId === ProviderId.PASSWORD) {
|
|
71
|
+
const email = typeof obj['email'] === 'string' ? obj['email'] : '';
|
|
72
|
+
const secret = typeof obj['password'] === 'string' ? obj['password'] : '';
|
|
73
|
+
return new EmailAuthCredential(email, secret, signInMethod);
|
|
74
|
+
}
|
|
75
|
+
return new AuthCredential(providerId, signInMethod);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function safeParse(json) {
|
|
79
|
+
try {
|
|
80
|
+
const parsed = JSON.parse(json);
|
|
81
|
+
return typeof parsed === 'object' && parsed !== null ? parsed : null;
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Email/password (or email-link) credential. Mirrors `firebase/auth`'s
|
|
89
|
+
* `EmailAuthCredential`.
|
|
90
|
+
*
|
|
91
|
+
* Carries the SECRET — which is the whole reason the linking and reauth
|
|
92
|
+
* families are decidable in the sandbox without a resolver (see the file
|
|
93
|
+
* docstring). The secret is `password` for the `'password'` sign-in
|
|
94
|
+
* method and the email LINK for the `'emailLink'` method.
|
|
95
|
+
*
|
|
96
|
+
* `_secret` is deliberately non-enumerable: it must not leak into a
|
|
97
|
+
* `JSON.stringify(cred)` in host/log code. {@link toJSON} exposes it
|
|
98
|
+
* only for the round-trip upstream also supports.
|
|
99
|
+
*/
|
|
100
|
+
export class EmailAuthCredential extends AuthCredential {
|
|
101
|
+
/** The account this credential is for. */
|
|
102
|
+
email;
|
|
103
|
+
/** The password, or (for `signInMethod === 'emailLink'`) the link.
|
|
104
|
+
* Assigned via `defineProperty` in the constructor (to make it
|
|
105
|
+
* non-enumerable), which TS cannot see — hence the `!`. */
|
|
106
|
+
secret;
|
|
107
|
+
constructor(email, secret, signInMethod = SignInMethod.EMAIL_PASSWORD) {
|
|
108
|
+
super(ProviderId.PASSWORD, signInMethod);
|
|
109
|
+
this.email = email;
|
|
110
|
+
// Non-enumerable so an accidental `JSON.stringify(user.credential)`
|
|
111
|
+
// in host or log code does not print the password.
|
|
112
|
+
Object.defineProperty(this, 'secret', {
|
|
113
|
+
value: secret,
|
|
114
|
+
enumerable: false,
|
|
115
|
+
writable: false,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/** The password carried by a `'password'`-method credential, else `null`. */
|
|
119
|
+
get password() {
|
|
120
|
+
return this.signInMethod === SignInMethod.EMAIL_PASSWORD ? this.secret : null;
|
|
121
|
+
}
|
|
122
|
+
/** The email link carried by an `'emailLink'`-method credential, else `null`. */
|
|
123
|
+
get emailLink() {
|
|
124
|
+
return this.signInMethod === SignInMethod.EMAIL_LINK ? this.secret : null;
|
|
125
|
+
}
|
|
126
|
+
toJSON() {
|
|
127
|
+
return {
|
|
128
|
+
providerId: this.providerId,
|
|
129
|
+
signInMethod: this.signInMethod,
|
|
130
|
+
email: this.email,
|
|
131
|
+
password: this.secret,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* OAuth credential. Mirrors `firebase/auth`'s `OAuthCredential`.
|
|
137
|
+
*
|
|
138
|
+
* Carries the IdP tokens the real flow would have obtained. The sandbox
|
|
139
|
+
* does NOT and cannot verify them — it is not the identity provider —
|
|
140
|
+
* so flows consuming one of these still resolve through the
|
|
141
|
+
* `AuthFlowResolver` / `mockSignInResult` seam. Keeping the tokens on
|
|
142
|
+
* the object anyway means a resolver implementation (a playground
|
|
143
|
+
* picker, a test fixture) can read whatever the caller passed.
|
|
144
|
+
*/
|
|
145
|
+
export class OAuthCredential extends AuthCredential {
|
|
146
|
+
idToken;
|
|
147
|
+
accessToken;
|
|
148
|
+
secret;
|
|
149
|
+
constructor(providerId, signInMethod, tokens = {}) {
|
|
150
|
+
super(providerId, signInMethod);
|
|
151
|
+
this.idToken = tokens.idToken;
|
|
152
|
+
this.accessToken = tokens.accessToken;
|
|
153
|
+
this.secret = tokens.secret;
|
|
154
|
+
}
|
|
155
|
+
toJSON() {
|
|
156
|
+
return {
|
|
157
|
+
providerId: this.providerId,
|
|
158
|
+
signInMethod: this.signInMethod,
|
|
159
|
+
idToken: this.idToken,
|
|
160
|
+
accessToken: this.accessToken,
|
|
161
|
+
secret: this.secret,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* `getAdditionalUserInfo(userCredential)` — mirror of `firebase/auth`.
|
|
167
|
+
*
|
|
168
|
+
* Reads the info the sandbox recorded on the credential when it minted
|
|
169
|
+
* it. `isNewUser` is true only when the credential came from a flow that
|
|
170
|
+
* CREATED the identity (`createUserWithEmailAndPassword`,
|
|
171
|
+
* `signInAnonymously`, a first-time email-link sign-in, a link that
|
|
172
|
+
* upgraded an anonymous account).
|
|
173
|
+
*
|
|
174
|
+
* Oracle (`observations/auth/auth-additional-user-info-shape.json`):
|
|
175
|
+
* against prod an anonymous sign-in yields
|
|
176
|
+
* `{ isNewUser: true, providerId: null, profile: {} }` — note
|
|
177
|
+
* `providerId: null`, not `'anonymous'`, because anonymous is not a
|
|
178
|
+
* federated provider.
|
|
179
|
+
*/
|
|
180
|
+
export function getAdditionalUserInfo(userCredential) {
|
|
181
|
+
const carried = userCredential._additionalUserInfo;
|
|
182
|
+
if (carried)
|
|
183
|
+
return carried;
|
|
184
|
+
// A credential minted before this field existed (a host-synthesized
|
|
185
|
+
// one, an older mockSignInResult). Derive what we honestly can rather
|
|
186
|
+
// than fabricating an isNewUser we never observed: a credential we did
|
|
187
|
+
// not mint is, by definition, not a fresh sign-up.
|
|
188
|
+
return {
|
|
189
|
+
isNewUser: false,
|
|
190
|
+
profile: {},
|
|
191
|
+
providerId: userCredential.providerId,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/auth/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGtD;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IACzB,+DAA+D;IACtD,UAAU,CAAS;IAC5B;4EACwE;IAC/D,YAAY,CAAS;IAE9B,YAAY,UAAkB,EAAE,YAAoB;QAClD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,+DAA+D;IAC/D,MAAM;QACJ,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAsC;QACpD,MAAM,GAAG,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,MAAM,UAAU,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;QACrC,MAAM,YAAY,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC;QACzC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,OAAO,YAAY,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QACpF,IAAI,UAAU,KAAK,UAAU,CAAC,QAAQ,EAAE,CAAC;YACvC,MAAM,KAAK,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACnE,MAAM,MAAM,GAAG,OAAO,GAAG,CAAC,UAAU,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;CACF;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAE,MAAkC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACrD,0CAA0C;IACjC,KAAK,CAAS;IAEvB;;gEAE4D;IAC3C,MAAM,CAAU;IAEjC,YAAY,KAAa,EAAE,MAAc,EAAE,eAAuB,YAAY,CAAC,cAAc;QAC3F,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,oEAAoE;QACpE,mDAAmD;QACnD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;YACpC,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;IACL,CAAC;IAED,6EAA6E;IAC7E,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,YAAY,KAAK,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAChF,CAAC;IAED,iFAAiF;IACjF,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,YAAY,KAAK,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5E,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,MAAM;SACtB,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IACxC,OAAO,CAAU;IACjB,WAAW,CAAU;IACrB,MAAM,CAAU;IAEzB,YACE,UAAkB,EAClB,YAAoB,EACpB,SAAsE,EAAE;QAExE,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF;AAoBD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,qBAAqB,CAAC,cAA8B;IAClE,MAAM,OAAO,GAAI,cAA+D,CAAC,mBAAmB,CAAC;IACrG,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,oEAAoE;IACpE,sEAAsE;IACtE,uEAAuE;IACvE,mDAAmD;IACnD,OAAO;QACL,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,cAAc,CAAC,UAAU;KACtC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passwordless email-link sign-in: `sendSignInLinkToEmail`,
|
|
3
|
+
* `isSignInWithEmailLink`, `signInWithEmailLink`.
|
|
4
|
+
*
|
|
5
|
+
* ─── The flow, and where production becomes unobservable ────────────
|
|
6
|
+
* 1. `sendSignInLinkToEmail(auth, email, settings)` — mails a link.
|
|
7
|
+
* 2. the user opens their inbox and clicks it. <-- the gap
|
|
8
|
+
* 3. the app boots, `isSignInWithEmailLink(auth, location.href)` is
|
|
9
|
+
* true, and `signInWithEmailLink(auth, email, link)` signs them in.
|
|
10
|
+
*
|
|
11
|
+
* Step 2 is the gap no test and no probe can cross. Steps 1 and 3 we
|
|
12
|
+
* probed, and captured what production does on the client side of it:
|
|
13
|
+
*
|
|
14
|
+
* - `isSignInWithEmailLink` is a PURE predicate over the link string —
|
|
15
|
+
* no network at all. True only for `mode=signIn` WITH an `oobCode`;
|
|
16
|
+
* false for a reset link, for `mode=signIn` with no code, and for
|
|
17
|
+
* garbage. Oracle-backed (`auth-issigninwithemaillink-predicate`),
|
|
18
|
+
* and project-independent because no server is involved.
|
|
19
|
+
* - `sendSignInLinkToEmail`'s settings contract is validated CLIENT-side
|
|
20
|
+
* before any request goes out: no `url` -> `auth/invalid-continue-uri`,
|
|
21
|
+
* `handleCodeInApp: false` -> `auth/argument-error`. Both
|
|
22
|
+
* oracle-backed (`auth-sendsigninlinktoemail-settings-validation`).
|
|
23
|
+
* - `signInWithEmailLink` with a link carrying no `oobCode` ->
|
|
24
|
+
* `auth/argument-error`, thrown client-side. Oracle-backed
|
|
25
|
+
* (`auth-signinwithemaillink-invalid-link`).
|
|
26
|
+
*
|
|
27
|
+
* What we could NOT observe: the oracle project has email-link sign-in
|
|
28
|
+
* disabled at the project level, so the SERVER arms (`unauthorized-
|
|
29
|
+
* continue-uri` for a non-allowlisted domain, and the redemption of a
|
|
30
|
+
* real code) answered `auth/operation-not-allowed` instead. Those rows
|
|
31
|
+
* are unit-backed and say so.
|
|
32
|
+
*
|
|
33
|
+
* ─── What the sandbox does about the gap ────────────────────────────
|
|
34
|
+
* It hands you the link. `sendSignInLinkToEmail` puts a real message,
|
|
35
|
+
* with a real single-use code, in an outbox; `sandbox.takeAuthMail(auth)`
|
|
36
|
+
* reads it. So the round trip completes in-process:
|
|
37
|
+
*
|
|
38
|
+
* await sendSignInLinkToEmail(auth, 'ada@example.com', settings);
|
|
39
|
+
* const mail = authSandbox.takeAuthMail(auth); // the inbox
|
|
40
|
+
* await signInWithEmailLink(auth, 'ada@example.com', mail.link);
|
|
41
|
+
*
|
|
42
|
+
* That is not a mock of the outcome — it is the real code, going through
|
|
43
|
+
* the real parse and the real redemption. Only the human is replaced.
|
|
44
|
+
*/
|
|
45
|
+
import { type ActionCodeSettings } from './action-codes.js';
|
|
46
|
+
import type { Auth, UserCredential } from './types.js';
|
|
47
|
+
/**
|
|
48
|
+
* `sendSignInLinkToEmail(auth, email, settings)` — mirror of
|
|
49
|
+
* `firebase/auth`.
|
|
50
|
+
*
|
|
51
|
+
* `settings.url` is REQUIRED and `settings.handleCodeInApp` must be
|
|
52
|
+
* `true` — both enforced client-side, both oracle-pinned (see the file
|
|
53
|
+
* docstring). Unlike `sendPasswordResetEmail`, this one does NOT require
|
|
54
|
+
* an existing account: sending a sign-in link to an unknown address is
|
|
55
|
+
* the sign-UP path, and the account is created when the link is redeemed.
|
|
56
|
+
*/
|
|
57
|
+
export declare function sendSignInLinkToEmail(auth: Auth, email: string, settings: ActionCodeSettings): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* `isSignInWithEmailLink(auth, link)` — mirror of `firebase/auth`.
|
|
60
|
+
*
|
|
61
|
+
* A pure predicate over the string: no network, no project, no state.
|
|
62
|
+
* True iff the link parses AND its operation is `EMAIL_SIGNIN`. Never
|
|
63
|
+
* throws — garbage in, `false` out. Oracle-pinned on all five cases the
|
|
64
|
+
* capture covers.
|
|
65
|
+
*
|
|
66
|
+
* `auth` is unused (upstream takes it for signature symmetry and tenant
|
|
67
|
+
* plumbing, neither of which changes the answer) but is kept in the
|
|
68
|
+
* signature so consumer code is identical across the two SDKs.
|
|
69
|
+
*/
|
|
70
|
+
export declare function isSignInWithEmailLink(auth: Auth, link: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* `signInWithEmailLink(auth, email, link)` — mirror of `firebase/auth`.
|
|
73
|
+
* Redeems the code in the link and signs the user in.
|
|
74
|
+
*
|
|
75
|
+
* Creates the account if the address is new — a first-time email-link
|
|
76
|
+
* sign-in IS a sign-up, and `getAdditionalUserInfo(cred).isNewUser`
|
|
77
|
+
* reports it honestly. Either way the account comes out `emailVerified:
|
|
78
|
+
* true`, because redeeming a code that was mailed to that address is
|
|
79
|
+
* proof the user controls it. (An account born this way has NO password:
|
|
80
|
+
* `signInWithEmailAndPassword` against it fails until one is set, exactly
|
|
81
|
+
* as in prod.)
|
|
82
|
+
*
|
|
83
|
+
* Throws `auth/argument-error` for a link with no `oobCode`
|
|
84
|
+
* (oracle-backed), and `auth/invalid-action-code` for a code the sandbox
|
|
85
|
+
* never issued or that has already been redeemed (single-use).
|
|
86
|
+
*/
|
|
87
|
+
export declare function signInWithEmailLink(auth: Auth, email: string, link: string): Promise<UserCredential>;
|
|
88
|
+
/** The email-link sign-in method id, for symmetry with
|
|
89
|
+
* `EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD`. */
|
|
90
|
+
export declare const EMAIL_LINK_SIGN_IN_METHOD: "emailLink";
|
|
91
|
+
//# sourceMappingURL=email-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-link.d.ts","sourceRoot":"","sources":["../../src/auth/email-link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAKH,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,kBAAkB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAIvE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,cAAc,CAAC,CA8DzB;AAED;qDACqD;AACrD,eAAO,MAAM,yBAAyB,aAA0B,CAAC"}
|