pyric 0.0.1 → 0.1.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -1
- package/dist/app/index.d.ts +81 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +78 -0
- package/dist/app/index.js.map +1 -0
- package/dist/auth/index.d.ts +346 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +701 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/prod-backend.d.ts +39 -0
- package/dist/auth/prod-backend.d.ts.map +1 -0
- package/dist/auth/prod-backend.js +179 -0
- package/dist/auth/prod-backend.js.map +1 -0
- package/dist/auth/providers.d.ts +107 -0
- package/dist/auth/providers.d.ts.map +1 -0
- package/dist/auth/providers.js +138 -0
- package/dist/auth/providers.js.map +1 -0
- package/dist/auth/sandbox-backend.d.ts +769 -0
- package/dist/auth/sandbox-backend.d.ts.map +1 -0
- package/dist/auth/sandbox-backend.js +1598 -0
- package/dist/auth/sandbox-backend.js.map +1 -0
- package/dist/auth/target.d.ts +40 -0
- package/dist/auth/target.d.ts.map +1 -0
- package/dist/auth/target.js +28 -0
- package/dist/auth/target.js.map +1 -0
- package/dist/auth/types.d.ts +252 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +26 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/database/constraints/atoms.d.ts +29 -0
- package/dist/database/constraints/atoms.d.ts.map +1 -0
- package/dist/database/constraints/atoms.js +43 -0
- package/dist/database/constraints/atoms.js.map +1 -0
- package/dist/database/constraints/compose.d.ts +16 -0
- package/dist/database/constraints/compose.d.ts.map +1 -0
- package/dist/database/constraints/compose.js +15 -0
- package/dist/database/constraints/compose.js.map +1 -0
- package/dist/database/constraints/data.d.ts +30 -0
- package/dist/database/constraints/data.d.ts.map +1 -0
- package/dist/database/constraints/data.js +46 -0
- package/dist/database/constraints/data.js.map +1 -0
- package/dist/database/constraints/document.d.ts +42 -0
- package/dist/database/constraints/document.d.ts.map +1 -0
- package/dist/database/constraints/document.js +86 -0
- package/dist/database/constraints/document.js.map +1 -0
- package/dist/database/constraints/game.d.ts +30 -0
- package/dist/database/constraints/game.d.ts.map +1 -0
- package/dist/database/constraints/game.js +49 -0
- package/dist/database/constraints/game.js.map +1 -0
- package/dist/database/constraints/index.d.ts +12 -0
- package/dist/database/constraints/index.d.ts.map +1 -0
- package/dist/database/constraints/index.js +9 -0
- package/dist/database/constraints/index.js.map +1 -0
- package/dist/database/constraints/policies.d.ts +16 -0
- package/dist/database/constraints/policies.d.ts.map +1 -0
- package/dist/database/constraints/policies.js +17 -0
- package/dist/database/constraints/policies.js.map +1 -0
- package/dist/database/constraints/ruleset.d.ts +5 -0
- package/dist/database/constraints/ruleset.d.ts.map +1 -0
- package/dist/database/constraints/ruleset.js +132 -0
- package/dist/database/constraints/ruleset.js.map +1 -0
- package/dist/database/constraints/schema.d.ts +17 -0
- package/dist/database/constraints/schema.d.ts.map +1 -0
- package/dist/database/constraints/schema.js +74 -0
- package/dist/database/constraints/schema.js.map +1 -0
- package/dist/database/constraints/types.d.ts +22 -0
- package/dist/database/constraints/types.d.ts.map +1 -0
- package/dist/database/constraints/types.js +2 -0
- package/dist/database/constraints/types.js.map +1 -0
- package/dist/database/crawl/handler.d.ts +7 -0
- package/dist/database/crawl/handler.d.ts.map +1 -0
- package/dist/database/crawl/handler.js +91 -0
- package/dist/database/crawl/handler.js.map +1 -0
- package/dist/database/crawl/semaphore.d.ts +9 -0
- package/dist/database/crawl/semaphore.d.ts.map +1 -0
- package/dist/database/crawl/semaphore.js +27 -0
- package/dist/database/crawl/semaphore.js.map +1 -0
- package/dist/database/crawl/spec.d.ts +33 -0
- package/dist/database/crawl/spec.d.ts.map +1 -0
- package/dist/database/crawl/spec.js +12 -0
- package/dist/database/crawl/spec.js.map +1 -0
- package/dist/database/data/handler.d.ts +9 -0
- package/dist/database/data/handler.d.ts.map +1 -0
- package/dist/database/data/handler.js +96 -0
- package/dist/database/data/handler.js.map +1 -0
- package/dist/database/data/spec.d.ts +77 -0
- package/dist/database/data/spec.d.ts.map +1 -0
- package/dist/database/data/spec.js +17 -0
- package/dist/database/data/spec.js.map +1 -0
- package/dist/database/data/validated.d.ts +8 -0
- package/dist/database/data/validated.d.ts.map +1 -0
- package/dist/database/data/validated.js +99 -0
- package/dist/database/data/validated.js.map +1 -0
- package/dist/database/grammar/RtdbExpr.ohm +98 -0
- package/dist/database/grammar/RtdbExpr.ohm.generated.d.ts +2 -0
- package/dist/database/grammar/RtdbExpr.ohm.generated.d.ts.map +1 -0
- package/dist/database/grammar/RtdbExpr.ohm.generated.js +103 -0
- package/dist/database/grammar/RtdbExpr.ohm.generated.js.map +1 -0
- package/dist/database/grammar/RtdbExprParser.d.ts +5 -0
- package/dist/database/grammar/RtdbExprParser.d.ts.map +1 -0
- package/dist/database/grammar/RtdbExprParser.js +53 -0
- package/dist/database/grammar/RtdbExprParser.js.map +1 -0
- package/dist/database/grammar/linter.d.ts +3 -0
- package/dist/database/grammar/linter.d.ts.map +1 -0
- package/dist/database/grammar/linter.js +66 -0
- package/dist/database/grammar/linter.js.map +1 -0
- package/dist/database/grammar/simulator.d.ts +31 -0
- package/dist/database/grammar/simulator.d.ts.map +1 -0
- package/dist/database/grammar/simulator.js +255 -0
- package/dist/database/grammar/simulator.js.map +1 -0
- package/dist/database/grammar/validator.d.ts +3 -0
- package/dist/database/grammar/validator.d.ts.map +1 -0
- package/dist/database/grammar/validator.js +84 -0
- package/dist/database/grammar/validator.js.map +1 -0
- package/dist/database/host.d.ts +50 -0
- package/dist/database/host.d.ts.map +1 -0
- package/dist/database/host.js +41 -0
- package/dist/database/host.js.map +1 -0
- package/dist/database/index.d.ts +40 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +47 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/initialize-from-app.d.ts +28 -0
- package/dist/database/initialize-from-app.d.ts.map +1 -0
- package/dist/database/initialize-from-app.js +23 -0
- package/dist/database/initialize-from-app.js.map +1 -0
- package/dist/database/ir/handler.d.ts +6 -0
- package/dist/database/ir/handler.d.ts.map +1 -0
- package/dist/database/ir/handler.js +52 -0
- package/dist/database/ir/handler.js.map +1 -0
- package/dist/database/ir/spec.d.ts +25 -0
- package/dist/database/ir/spec.d.ts.map +1 -0
- package/dist/database/ir/spec.js +11 -0
- package/dist/database/ir/spec.js.map +1 -0
- package/dist/database/mapper.d.ts +9 -0
- package/dist/database/mapper.d.ts.map +1 -0
- package/dist/database/mapper.js +115 -0
- package/dist/database/mapper.js.map +1 -0
- package/dist/database/modular.d.ts +604 -0
- package/dist/database/modular.d.ts.map +1 -0
- package/dist/database/modular.js +1226 -0
- package/dist/database/modular.js.map +1 -0
- package/dist/database/replay.d.ts +33 -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/resolver.d.ts +4 -0
- package/dist/database/resolver.d.ts.map +1 -0
- package/dist/database/resolver.js +66 -0
- package/dist/database/resolver.js.map +1 -0
- package/dist/database/sandbox/backend.d.ts +403 -0
- package/dist/database/sandbox/backend.d.ts.map +1 -0
- package/dist/database/sandbox/backend.js +1467 -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 +69 -0
- package/dist/database/sandbox/rules-eval.d.ts.map +1 -0
- package/dist/database/sandbox/rules-eval.js +124 -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/simulation/handler.d.ts +6 -0
- package/dist/database/simulation/handler.d.ts.map +1 -0
- package/dist/database/simulation/handler.js +236 -0
- package/dist/database/simulation/handler.js.map +1 -0
- package/dist/database/simulation/spec.d.ts +69 -0
- package/dist/database/simulation/spec.d.ts.map +1 -0
- package/dist/database/simulation/spec.js +25 -0
- package/dist/database/simulation/spec.js.map +1 -0
- package/dist/database/tools.d.ts +22 -0
- package/dist/database/tools.d.ts.map +1 -0
- package/dist/database/tools.js +272 -0
- package/dist/database/tools.js.map +1 -0
- package/dist/database/types.d.ts +210 -0
- package/dist/database/types.d.ts.map +1 -0
- package/dist/database/types.js +26 -0
- package/dist/database/types.js.map +1 -0
- package/dist/database/write/handler.d.ts +7 -0
- package/dist/database/write/handler.d.ts.map +1 -0
- package/dist/database/write/handler.js +42 -0
- package/dist/database/write/handler.js.map +1 -0
- package/dist/database/write/spec.d.ts +18 -0
- package/dist/database/write/spec.d.ts.map +1 -0
- package/dist/database/write/spec.js +7 -0
- package/dist/database/write/spec.js.map +1 -0
- package/dist/firestore/index.d.ts +533 -0
- package/dist/firestore/index.d.ts.map +1 -0
- package/dist/firestore/index.js +1536 -0
- package/dist/firestore/index.js.map +1 -0
- package/dist/firestore/tools.d.ts +67 -0
- package/dist/firestore/tools.d.ts.map +1 -0
- package/dist/firestore/tools.js +318 -0
- package/dist/firestore/tools.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/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/extract.d.ts +28 -0
- package/dist/rules/extract.d.ts.map +1 -0
- package/dist/rules/extract.js +25 -0
- package/dist/rules/extract.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 +67 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +80 -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/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 +784 -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/node.d.ts +17 -0
- package/dist/rules/node.d.ts.map +1 -0
- package/dist/rules/node.js +21 -0
- package/dist/rules/node.js.map +1 -0
- package/dist/rules/rtdb.d.ts +28 -0
- package/dist/rules/rtdb.d.ts.map +1 -0
- package/dist/rules/rtdb.js +15 -0
- package/dist/rules/rtdb.js.map +1 -0
- package/dist/rules/simulator/evaluator.d.ts +179 -0
- package/dist/rules/simulator/evaluator.d.ts.map +1 -0
- package/dist/rules/simulator/evaluator.js +1221 -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 +36 -0
- package/dist/rules/simulator/handler.d.ts.map +1 -0
- package/dist/rules/simulator/handler.js +583 -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 +849 -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 +9 -0
- package/dist/rules/test/handler.d.ts.map +1 -0
- package/dist/rules/test/handler.js +124 -0
- package/dist/rules/test/handler.js.map +1 -0
- package/dist/rules/test/spec.d.ts +517 -0
- package/dist/rules/test/spec.d.ts.map +1 -0
- package/dist/rules/test/spec.js +227 -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 +124 -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 +86 -0
- package/dist/sandbox/admin-firestore/error-translation.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/error-translation.js +204 -0
- package/dist/sandbox/admin-firestore/error-translation.js.map +1 -0
- package/dist/sandbox/admin-firestore/index.d.ts +169 -0
- package/dist/sandbox/admin-firestore/index.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/index.js +456 -0
- package/dist/sandbox/admin-firestore/index.js.map +1 -0
- package/dist/sandbox/admin-firestore/remote.d.ts +97 -0
- package/dist/sandbox/admin-firestore/remote.d.ts.map +1 -0
- package/dist/sandbox/admin-firestore/remote.js +735 -0
- package/dist/sandbox/admin-firestore/remote.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 +45 -0
- package/dist/sandbox/firestore/admin-compat/firestore.d.ts.map +1 -0
- package/dist/sandbox/firestore/admin-compat/firestore.js +114 -0
- package/dist/sandbox/firestore/admin-compat/firestore.js.map +1 -0
- package/dist/sandbox/firestore/admin-compat/index.d.ts +45 -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 +704 -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 +806 -0
- package/dist/sandbox/firestore/local-environment.d.ts.map +1 -0
- package/dist/sandbox/firestore/local-environment.js +3028 -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 +284 -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 +152 -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 +50 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/index.js +63 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/internal/index.d.ts +36 -0
- package/dist/sandbox/internal/index.d.ts.map +1 -0
- package/dist/sandbox/internal/index.js +72 -0
- package/dist/sandbox/internal/index.js.map +1 -0
- package/dist/sandbox/internal/sandbox-impl.d.ts +343 -0
- package/dist/sandbox/internal/sandbox-impl.d.ts.map +1 -0
- package/dist/sandbox/internal/sandbox-impl.js +718 -0
- package/dist/sandbox/internal/sandbox-impl.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 +605 -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 +40 -0
- package/dist/sandbox/sandbox-context.d.ts.map +1 -0
- package/dist/sandbox/sandbox-context.js +72 -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 +272 -0
- package/dist/sandbox/tab-sync/index.js.map +1 -0
- package/dist/sandbox/types.d.ts +1235 -0
- package/dist/sandbox/types.d.ts.map +1 -0
- package/dist/sandbox/types.js +46 -0
- package/dist/sandbox/types.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 +29 -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 +23 -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 +27 -0
- package/dist/storage/download.d.ts.map +1 -0
- package/dist/storage/download.js +136 -0
- package/dist/storage/download.js.map +1 -0
- package/dist/storage/enforce.d.ts +26 -0
- package/dist/storage/enforce.d.ts.map +1 -0
- package/dist/storage/enforce.js +16 -0
- package/dist/storage/enforce.js.map +1 -0
- package/dist/storage/errors.d.ts +46 -0
- package/dist/storage/errors.d.ts.map +1 -0
- package/dist/storage/errors.js +62 -0
- package/dist/storage/errors.js.map +1 -0
- package/dist/storage/index.d.ts +49 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +60 -0
- package/dist/storage/index.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 +17 -0
- package/dist/storage/list.d.ts.map +1 -0
- package/dist/storage/list.js +91 -0
- package/dist/storage/list.js.map +1 -0
- package/dist/storage/metadata.d.ts +86 -0
- package/dist/storage/metadata.d.ts.map +1 -0
- package/dist/storage/metadata.js +167 -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 +63 -0
- package/dist/storage/reference.d.ts.map +1 -0
- package/dist/storage/reference.js +156 -0
- package/dist/storage/reference.js.map +1 -0
- package/dist/storage/rules.d.ts +176 -0
- package/dist/storage/rules.d.ts.map +1 -0
- package/dist/storage/rules.js +621 -0
- package/dist/storage/rules.js.map +1 -0
- package/dist/storage/service.d.ts +139 -0
- package/dist/storage/service.d.ts.map +1 -0
- package/dist/storage/service.js +241 -0
- package/dist/storage/service.js.map +1 -0
- package/dist/storage/upload.d.ts +43 -0
- package/dist/storage/upload.d.ts.map +1 -0
- package/dist/storage/upload.js +235 -0
- package/dist/storage/upload.js.map +1 -0
- package/package.json +109 -3
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ExprTraceEntry } from '../simulator/evaluator.js';
|
|
3
|
+
/**
|
|
4
|
+
* THE Firestore rules method union — the one canonical declaration.
|
|
5
|
+
* Everything that talks about per-method access (the simulator's
|
|
6
|
+
* `TestCase`, the playground's workspace-test runner, the app-spec
|
|
7
|
+
* access matrix) imports this; nothing redeclares it.
|
|
8
|
+
*
|
|
9
|
+
* Note: this is the RULES vocabulary (`request.method`). Data-plane
|
|
10
|
+
* vocabularies that include `set` (sandbox `RequestEvent`, traffic
|
|
11
|
+
* types) are deliberately distinct — `set` lowers to create/update at
|
|
12
|
+
* rules-evaluation time.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FIRESTORE_METHODS: readonly ["get", "list", "create", "update", "delete"];
|
|
15
|
+
export type FirestoreMethod = (typeof FIRESTORE_METHODS)[number];
|
|
16
|
+
/**
|
|
17
|
+
* THE test-identity shape — a signed-in principal for a rules check.
|
|
18
|
+
* Custom claims live under `token` and read as
|
|
19
|
+
* `request.auth.token.<name>` in rules. `null` at usage sites means
|
|
20
|
+
* unauthenticated; the shape itself is always a signed-in identity.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TestIdentitySchema: z.ZodObject<{
|
|
23
|
+
uid: z.ZodString;
|
|
24
|
+
token: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
uid: string;
|
|
27
|
+
token?: Record<string, unknown> | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
uid: string;
|
|
30
|
+
token?: Record<string, unknown> | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export type TestIdentity = z.infer<typeof TestIdentitySchema>;
|
|
33
|
+
export declare const FunctionMockSchema: z.ZodObject<{
|
|
34
|
+
function: z.ZodEnum<["get", "exists"]>;
|
|
35
|
+
path: z.ZodString;
|
|
36
|
+
result: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodBoolean]>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
function: "get" | "exists";
|
|
39
|
+
path: string;
|
|
40
|
+
result: boolean | Record<string, unknown>;
|
|
41
|
+
}, {
|
|
42
|
+
function: "get" | "exists";
|
|
43
|
+
path: string;
|
|
44
|
+
result: boolean | Record<string, unknown>;
|
|
45
|
+
}>;
|
|
46
|
+
export type FunctionMock = z.infer<typeof FunctionMockSchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Item 0.D / Item 7 — typed write-mode discriminator.
|
|
49
|
+
*
|
|
50
|
+
* Without this, an `update` test had to pre-merge its payload into the
|
|
51
|
+
* post-state by hand (because the simulator just used `tc.data` as the
|
|
52
|
+
* after-state). That works for shallow updates, but for nested-map
|
|
53
|
+
* updates and dot-path updates it silently produces the wrong shape —
|
|
54
|
+
* which then makes `request.resource.data.x.y` and `getAfter()` lie.
|
|
55
|
+
*
|
|
56
|
+
* The four modes mirror what the Firestore admin SDK actually emits:
|
|
57
|
+
* create → write fails if doc exists; after = payload
|
|
58
|
+
* set { merge: false } → full replace; pre-state irrelevant
|
|
59
|
+
* set { merge: true } → recursive merge of pre-state and payload
|
|
60
|
+
* update → top-level keys replace; dot-paths patch nested maps
|
|
61
|
+
*
|
|
62
|
+
* `writeMode` is optional. When omitted, the simulator falls back to the
|
|
63
|
+
* legacy "tc.data IS the full after-state" behavior, which keeps every
|
|
64
|
+
* existing test passing. New tests SHOULD set writeMode whenever the
|
|
65
|
+
* rule reads nested maps or calls getAfter()/existsAfter().
|
|
66
|
+
*/
|
|
67
|
+
export declare const WriteModeSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"create">;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
kind: "create";
|
|
71
|
+
}, {
|
|
72
|
+
kind: "create";
|
|
73
|
+
}>, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"set">;
|
|
75
|
+
merge: z.ZodBoolean;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
kind: "set";
|
|
78
|
+
merge: boolean;
|
|
79
|
+
}, {
|
|
80
|
+
kind: "set";
|
|
81
|
+
merge: boolean;
|
|
82
|
+
}>, z.ZodObject<{
|
|
83
|
+
kind: z.ZodLiteral<"update">;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
kind: "update";
|
|
86
|
+
}, {
|
|
87
|
+
kind: "update";
|
|
88
|
+
}>, z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"delete">;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
kind: "delete";
|
|
92
|
+
}, {
|
|
93
|
+
kind: "delete";
|
|
94
|
+
}>]>;
|
|
95
|
+
export type WriteMode = z.infer<typeof WriteModeSchema>;
|
|
96
|
+
/**
|
|
97
|
+
* Shape of `request.query` — only populated for `list` operations
|
|
98
|
+
* (REBUILD_PLAN.md Item 6 follow-up). Production exposes:
|
|
99
|
+
* - limit: the requested page size
|
|
100
|
+
* - offset: the start offset within the result set
|
|
101
|
+
* - orderBy: the orderBy clause as a string (field name with optional direction)
|
|
102
|
+
*
|
|
103
|
+
* Unset fields read as `null` from rules. Tests SHOULD set this whenever the
|
|
104
|
+
* rule under evaluation references `request.query.<x>`; otherwise the field
|
|
105
|
+
* read returns null and the rule may silently DENY.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ListQuerySchema: z.ZodObject<{
|
|
108
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
orderBy: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
limit?: number | undefined;
|
|
113
|
+
offset?: number | undefined;
|
|
114
|
+
orderBy?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
limit?: number | undefined;
|
|
117
|
+
offset?: number | undefined;
|
|
118
|
+
orderBy?: string | undefined;
|
|
119
|
+
}>;
|
|
120
|
+
export type ListQuery = z.infer<typeof ListQuerySchema>;
|
|
121
|
+
export type ExpressionReportLevel = 'NONE' | 'VISITED' | 'FULL';
|
|
122
|
+
export interface RulesTestIssue {
|
|
123
|
+
sourcePosition?: unknown;
|
|
124
|
+
description: string;
|
|
125
|
+
severity: string;
|
|
126
|
+
}
|
|
127
|
+
export interface RulesTestApiResultDetails {
|
|
128
|
+
errorPosition?: unknown;
|
|
129
|
+
functionCalls?: unknown[];
|
|
130
|
+
visitedExpressions?: unknown[];
|
|
131
|
+
expressionReports?: unknown[];
|
|
132
|
+
}
|
|
133
|
+
export declare const TestCaseSchema: z.ZodObject<{
|
|
134
|
+
description: z.ZodString;
|
|
135
|
+
expectation: z.ZodEnum<["ALLOW", "DENY"]>;
|
|
136
|
+
method: z.ZodEnum<["get", "list", "create", "update", "delete"]>;
|
|
137
|
+
path: z.ZodString;
|
|
138
|
+
auth: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
139
|
+
uid: z.ZodString;
|
|
140
|
+
token: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
uid: string;
|
|
143
|
+
token?: Record<string, unknown> | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
uid: string;
|
|
146
|
+
token?: Record<string, unknown> | undefined;
|
|
147
|
+
}>, z.ZodNull]>>;
|
|
148
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
149
|
+
resource: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
150
|
+
functionMocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
|
+
function: z.ZodEnum<["get", "exists"]>;
|
|
152
|
+
path: z.ZodString;
|
|
153
|
+
result: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodBoolean]>;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
function: "get" | "exists";
|
|
156
|
+
path: string;
|
|
157
|
+
result: boolean | Record<string, unknown>;
|
|
158
|
+
}, {
|
|
159
|
+
function: "get" | "exists";
|
|
160
|
+
path: string;
|
|
161
|
+
result: boolean | Record<string, unknown>;
|
|
162
|
+
}>, "many">>;
|
|
163
|
+
/**
|
|
164
|
+
* Optional `request.query` payload for `list` operations only. Populating
|
|
165
|
+
* this is the only way to satisfy rules that read `request.query.limit /
|
|
166
|
+
* .offset / .orderBy` — without it, the field read returns null and a
|
|
167
|
+
* naive `request.query.limit < 100` evaluates as `null < 100 → false → DENY`.
|
|
168
|
+
* Ignored for non-list methods.
|
|
169
|
+
*/
|
|
170
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
orderBy: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
limit?: number | undefined;
|
|
176
|
+
offset?: number | undefined;
|
|
177
|
+
orderBy?: string | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
limit?: number | undefined;
|
|
180
|
+
offset?: number | undefined;
|
|
181
|
+
orderBy?: string | undefined;
|
|
182
|
+
}>>;
|
|
183
|
+
/**
|
|
184
|
+
* Override for `request.time` (REBUILD_PLAN.md Item 0.F). ISO-8601 string.
|
|
185
|
+
* Defaults to wallclock when omitted — but date-gated rules then evaluate
|
|
186
|
+
* non-deterministically across CI runs. Set this whenever the rule under
|
|
187
|
+
* test references `request.time`.
|
|
188
|
+
*/
|
|
189
|
+
requestTime: z.ZodOptional<z.ZodString>;
|
|
190
|
+
/**
|
|
191
|
+
* Optional explicit write semantics (REBUILD_PLAN.md Item 0.D / Item 7).
|
|
192
|
+
* When set, the simulator runs `projectAfterState(writeMode, resource, data)`
|
|
193
|
+
* to derive both `request.resource.data` AND the value `getAfter(path)`
|
|
194
|
+
* returns. When omitted, the simulator preserves legacy behavior:
|
|
195
|
+
* `tc.data` IS the after-state.
|
|
196
|
+
*/
|
|
197
|
+
writeMode: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
198
|
+
kind: z.ZodLiteral<"create">;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
kind: "create";
|
|
201
|
+
}, {
|
|
202
|
+
kind: "create";
|
|
203
|
+
}>, z.ZodObject<{
|
|
204
|
+
kind: z.ZodLiteral<"set">;
|
|
205
|
+
merge: z.ZodBoolean;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
kind: "set";
|
|
208
|
+
merge: boolean;
|
|
209
|
+
}, {
|
|
210
|
+
kind: "set";
|
|
211
|
+
merge: boolean;
|
|
212
|
+
}>, z.ZodObject<{
|
|
213
|
+
kind: z.ZodLiteral<"update">;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
kind: "update";
|
|
216
|
+
}, {
|
|
217
|
+
kind: "update";
|
|
218
|
+
}>, z.ZodObject<{
|
|
219
|
+
kind: z.ZodLiteral<"delete">;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
kind: "delete";
|
|
222
|
+
}, {
|
|
223
|
+
kind: "delete";
|
|
224
|
+
}>]>>;
|
|
225
|
+
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
path: string;
|
|
227
|
+
description: string;
|
|
228
|
+
expectation: "ALLOW" | "DENY";
|
|
229
|
+
method: "get" | "list" | "create" | "update" | "delete";
|
|
230
|
+
auth?: {
|
|
231
|
+
uid: string;
|
|
232
|
+
token?: Record<string, unknown> | undefined;
|
|
233
|
+
} | null | undefined;
|
|
234
|
+
data?: Record<string, unknown> | undefined;
|
|
235
|
+
resource?: Record<string, unknown> | undefined;
|
|
236
|
+
functionMocks?: {
|
|
237
|
+
function: "get" | "exists";
|
|
238
|
+
path: string;
|
|
239
|
+
result: boolean | Record<string, unknown>;
|
|
240
|
+
}[] | undefined;
|
|
241
|
+
query?: {
|
|
242
|
+
limit?: number | undefined;
|
|
243
|
+
offset?: number | undefined;
|
|
244
|
+
orderBy?: string | undefined;
|
|
245
|
+
} | undefined;
|
|
246
|
+
requestTime?: string | undefined;
|
|
247
|
+
writeMode?: {
|
|
248
|
+
kind: "create";
|
|
249
|
+
} | {
|
|
250
|
+
kind: "set";
|
|
251
|
+
merge: boolean;
|
|
252
|
+
} | {
|
|
253
|
+
kind: "update";
|
|
254
|
+
} | {
|
|
255
|
+
kind: "delete";
|
|
256
|
+
} | undefined;
|
|
257
|
+
}, {
|
|
258
|
+
path: string;
|
|
259
|
+
description: string;
|
|
260
|
+
expectation: "ALLOW" | "DENY";
|
|
261
|
+
method: "get" | "list" | "create" | "update" | "delete";
|
|
262
|
+
auth?: {
|
|
263
|
+
uid: string;
|
|
264
|
+
token?: Record<string, unknown> | undefined;
|
|
265
|
+
} | null | undefined;
|
|
266
|
+
data?: Record<string, unknown> | undefined;
|
|
267
|
+
resource?: Record<string, unknown> | undefined;
|
|
268
|
+
functionMocks?: {
|
|
269
|
+
function: "get" | "exists";
|
|
270
|
+
path: string;
|
|
271
|
+
result: boolean | Record<string, unknown>;
|
|
272
|
+
}[] | undefined;
|
|
273
|
+
query?: {
|
|
274
|
+
limit?: number | undefined;
|
|
275
|
+
offset?: number | undefined;
|
|
276
|
+
orderBy?: string | undefined;
|
|
277
|
+
} | undefined;
|
|
278
|
+
requestTime?: string | undefined;
|
|
279
|
+
writeMode?: {
|
|
280
|
+
kind: "create";
|
|
281
|
+
} | {
|
|
282
|
+
kind: "set";
|
|
283
|
+
merge: boolean;
|
|
284
|
+
} | {
|
|
285
|
+
kind: "update";
|
|
286
|
+
} | {
|
|
287
|
+
kind: "delete";
|
|
288
|
+
} | undefined;
|
|
289
|
+
}>;
|
|
290
|
+
export type TestCase = z.infer<typeof TestCaseSchema>;
|
|
291
|
+
/**
|
|
292
|
+
* Per-rule evaluation entry produced by the local simulator. Each entry
|
|
293
|
+
* corresponds to one `allow` declaration the simulator evaluated, in
|
|
294
|
+
* source order.
|
|
295
|
+
*
|
|
296
|
+
* Populated only by `SimulateFirestoreRulesHandler` (which has the parsed
|
|
297
|
+
* AST in hand); the production Test API client (`TestFirestoreRulesHandler`)
|
|
298
|
+
* returns an empty `trace` and surfaces the wire text on `TestResult.notes`.
|
|
299
|
+
*/
|
|
300
|
+
export interface RuleEvaluation {
|
|
301
|
+
/** Position of the `allow` declaration within its match block, 0-indexed
|
|
302
|
+
* in source order. */
|
|
303
|
+
ruleIndex: number;
|
|
304
|
+
/** Operations declared on the allow rule (`read`, `write`, `get`, ...). */
|
|
305
|
+
operations: Array<'read' | 'write' | 'get' | 'list' | 'create' | 'update' | 'delete'>;
|
|
306
|
+
/**
|
|
307
|
+
* Outcome for this single rule. The TestResult's overall `decision` is
|
|
308
|
+
* derived from the trace under OR semantics (any `'ALLOW'` ⇒ ALLOW,
|
|
309
|
+
* else any `'UNSUPPORTED'` ⇒ UNSUPPORTED, else DENY).
|
|
310
|
+
*/
|
|
311
|
+
verdict: 'ALLOW' | 'DENY' | 'UNSUPPORTED' | 'ERROR';
|
|
312
|
+
/** Pretty-printed condition expression. Use this verbatim in agent-facing
|
|
313
|
+
* summaries — derived from the AST via `printExpression`, so it survives
|
|
314
|
+
* comment removal and whitespace re-flow in the source. */
|
|
315
|
+
conditionText?: string;
|
|
316
|
+
/** 1-indexed source line of the `allow` keyword. Populated when the
|
|
317
|
+
* rule's `loc` was set by the parser. */
|
|
318
|
+
line?: number;
|
|
319
|
+
/** Human-readable diagnostic — populated for `UNSUPPORTED` (which sim
|
|
320
|
+
* surface is missing) and `ERROR` (which runtime error caused the
|
|
321
|
+
* rule to abort). */
|
|
322
|
+
message?: string;
|
|
323
|
+
/**
|
|
324
|
+
* Per-sub-expression evaluation trace for this rule's condition.
|
|
325
|
+
* Flat, in evaluation order; reconstruct the tree via the `parent`
|
|
326
|
+
* index on each entry. Populated by the local simulator when the
|
|
327
|
+
* caller enables tracing — currently always on for
|
|
328
|
+
* `SimulateFirestoreRulesHandler.simulate()` so agents can see *why*
|
|
329
|
+
* a rule's condition resolved as it did (which disjunct was true,
|
|
330
|
+
* which `let` binding the value flowed through, which method call
|
|
331
|
+
* threw). Absent on entries that came from the production Test API
|
|
332
|
+
* client (no AST visibility).
|
|
333
|
+
*/
|
|
334
|
+
expressionTrace?: ExprTraceEntry[];
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* One `match` block the simulator considered while resolving the
|
|
338
|
+
* request path. Together, `PathResolutionTrace.attempts` forms a
|
|
339
|
+
* complete picture of "what did the resolver try, and where did
|
|
340
|
+
* each attempt fall apart?" — useful for the agent when a request
|
|
341
|
+
* lands in the default-deny path because no block matched.
|
|
342
|
+
*
|
|
343
|
+
* Recorded only by the local simulator; the production Test API
|
|
344
|
+
* client doesn't expose path-resolution internals.
|
|
345
|
+
*/
|
|
346
|
+
export interface PathResolutionEntry {
|
|
347
|
+
/** Source line of the `match` keyword. Absent when the parser
|
|
348
|
+
* didn't populate `loc` (programmatically-constructed blocks). */
|
|
349
|
+
line?: number;
|
|
350
|
+
/** Raw match path as written in the source, e.g.
|
|
351
|
+
* `'/users/{uid}/messages/{mId}'`. */
|
|
352
|
+
blockPath: string;
|
|
353
|
+
/** How many of the block's path segments matched against the
|
|
354
|
+
* request path before the resolver gave up or completed. */
|
|
355
|
+
matchedSegments: number;
|
|
356
|
+
/** Total segments in the block's path pattern. */
|
|
357
|
+
totalSegments: number;
|
|
358
|
+
/** Wildcard / recursive bindings the block produced (even when
|
|
359
|
+
* the overall match failed — the partial bindings are still
|
|
360
|
+
* diagnostic). */
|
|
361
|
+
bindings: Record<string, string>;
|
|
362
|
+
/** True only for the block that fully resolved (no remaining
|
|
363
|
+
* request segments AND every nested match either completed or
|
|
364
|
+
* wasn't needed). */
|
|
365
|
+
matched: boolean;
|
|
366
|
+
/** Why the resolver moved on. Absent when `matched: true`.
|
|
367
|
+
* - `'literal-mismatch'` — a literal segment in the block
|
|
368
|
+
* didn't match the corresponding request segment.
|
|
369
|
+
* - `'request-shorter'` — block path had more segments than
|
|
370
|
+
* the request supplied (e.g. block is `/a/{b}/c`, request is `/a/x`).
|
|
371
|
+
* - `'no-matching-child'` — block matched its own segments but
|
|
372
|
+
* remaining request segments weren't covered by any child block. */
|
|
373
|
+
reason?: 'literal-mismatch' | 'request-shorter' | 'no-matching-child';
|
|
374
|
+
}
|
|
375
|
+
export interface PathResolutionTrace {
|
|
376
|
+
/** The request path that was resolved, verbatim from `TestCase.path`. */
|
|
377
|
+
requestPath: string;
|
|
378
|
+
/** One entry per match block the resolver considered, in the
|
|
379
|
+
* order it tried them. `attempts[i].matched: true` marks the
|
|
380
|
+
* winning block — at most one per trace. */
|
|
381
|
+
attempts: PathResolutionEntry[];
|
|
382
|
+
}
|
|
383
|
+
export interface TestResult {
|
|
384
|
+
description: string;
|
|
385
|
+
expectation: 'ALLOW' | 'DENY';
|
|
386
|
+
/**
|
|
387
|
+
* Expectation-relative state. `'UNSUPPORTED'` is emitted only by the
|
|
388
|
+
* local simulator (`SimulateFirestoreRulesHandler`) when it hits a
|
|
389
|
+
* feature it doesn't yet implement — see REBUILD_PLAN.md Item 0.A. The
|
|
390
|
+
* production Test API (`TestFirestoreRulesHandler`) only ever returns
|
|
391
|
+
* `'PASSED'` | `'FAILED'`.
|
|
392
|
+
*/
|
|
393
|
+
state: 'PASSED' | 'FAILED' | 'UNSUPPORTED';
|
|
394
|
+
/** Absolute decision (ignores expectation). Always set. */
|
|
395
|
+
decision: 'ALLOW' | 'DENY' | 'UNSUPPORTED';
|
|
396
|
+
/** Per-rule evaluation entries in source order. Empty when no allow rule
|
|
397
|
+
* was evaluated (e.g. no matching path, or method not declared by any
|
|
398
|
+
* allow rule); see `notes` for the reason in that case. Also empty when
|
|
399
|
+
* the result came from the production Test API client. */
|
|
400
|
+
trace: RuleEvaluation[];
|
|
401
|
+
/** Top-level diagnostic strings. From the local simulator, holds
|
|
402
|
+
* no-match / no-rule-found descriptions (e.g. `"No match block found
|
|
403
|
+
* for path 'X'"`). From the production Test API client, this is the
|
|
404
|
+
* raw `debugMessages` from the wire response. */
|
|
405
|
+
notes: string[];
|
|
406
|
+
/** Per-test-case path-resolution trace — which `match` blocks the
|
|
407
|
+
* resolver considered and where each one failed (or succeeded).
|
|
408
|
+
* Populated by the local simulator; absent on results from the
|
|
409
|
+
* production Test API client. Empty `attempts` is possible when
|
|
410
|
+
* the ruleset has no match blocks at all (degenerate, but valid). */
|
|
411
|
+
pathResolution?: PathResolutionTrace;
|
|
412
|
+
/** Diagnostics returned by Firebase's hosted Rules Test API. Local
|
|
413
|
+
* simulation leaves this absent because its structured diagnostics live
|
|
414
|
+
* in `trace` and `pathResolution`. */
|
|
415
|
+
api?: RulesTestApiResultDetails;
|
|
416
|
+
}
|
|
417
|
+
export type TestFirestoreRulesResult = {
|
|
418
|
+
success: true;
|
|
419
|
+
data: {
|
|
420
|
+
passed: number;
|
|
421
|
+
failed: number;
|
|
422
|
+
unsupported: number;
|
|
423
|
+
results: TestResult[];
|
|
424
|
+
issues?: RulesTestIssue[];
|
|
425
|
+
};
|
|
426
|
+
} | {
|
|
427
|
+
success: false;
|
|
428
|
+
error: {
|
|
429
|
+
code: string;
|
|
430
|
+
message: string;
|
|
431
|
+
recoverable: boolean;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* Render a `TestResult` as a flat `debugMessages: string[]` trail.
|
|
436
|
+
*
|
|
437
|
+
* Format mirrors what the simulator emitted before the structured trace
|
|
438
|
+
* landed: per-rule lines `Rule #<i> (<ops>) → <verdict>` plus top-level
|
|
439
|
+
* `notes` plus a final `Simulated: <decision>` summary line.
|
|
440
|
+
*
|
|
441
|
+
* Use this for the (small) set of consumers that still expect a flat
|
|
442
|
+
* string trail — currently the sandbox's `RequestEvent.debugMessages`
|
|
443
|
+
* surface, which propagates into the playground's traffic log UI. New
|
|
444
|
+
* consumers should read `result.trace` + `result.notes` directly.
|
|
445
|
+
*/
|
|
446
|
+
/**
|
|
447
|
+
* The DECIDING rule's source position + sub-expression trace, projected from a
|
|
448
|
+
* {@link TestResult} — for BOTH verdicts: the `allow` rule that granted an
|
|
449
|
+
* ALLOW, or the rule responsible for a DENY. Additive companion to
|
|
450
|
+
* {@link renderLegacyDebugMessages}: that flattens the per-rule trace to
|
|
451
|
+
* strings (dropping `line` and `expressionTrace`); this preserves the
|
|
452
|
+
* structured detail a UI needs to point at the exact source line and step
|
|
453
|
+
* through the evaluation ("show the work"). Position/trace fields are optional
|
|
454
|
+
* so a partial trace projects honestly.
|
|
455
|
+
*/
|
|
456
|
+
export interface EvaluatedRuleInfo {
|
|
457
|
+
/** The verdict the deciding rule produced for the op. */
|
|
458
|
+
verdict: 'allow' | 'deny';
|
|
459
|
+
/** 1-indexed source line of the deciding `allow` rule. */
|
|
460
|
+
line?: number;
|
|
461
|
+
/** Pretty-printed condition text of the deciding rule. */
|
|
462
|
+
expression?: string;
|
|
463
|
+
/** Per-sub-expression evaluation trace of the deciding rule. */
|
|
464
|
+
expressionTrace?: ExprTraceEntry[];
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Project the DECIDING rule from a simulated {@link TestResult}.
|
|
468
|
+
*
|
|
469
|
+
* For an ALLOW, picks the `ALLOW` trace entry (evaluation short-circuits on the
|
|
470
|
+
* first allowing rule, so it's unique). For a DENY, picks the rule the sandbox
|
|
471
|
+
* would report as responsible: the first `DENY`/`ERROR` entry, falling back to
|
|
472
|
+
* the last evaluated rule. Returns `undefined` when no rule was evaluated
|
|
473
|
+
* (implicit deny — no matching `allow`) or the simulator abstained
|
|
474
|
+
* (`UNSUPPORTED`). Never invents data: a missing line/trace stays absent.
|
|
475
|
+
*/
|
|
476
|
+
export declare function projectEvaluatedRule(result: TestResult): EvaluatedRuleInfo | undefined;
|
|
477
|
+
export declare function renderLegacyDebugMessages(result: TestResult): string[];
|
|
478
|
+
export interface ApiTestCase {
|
|
479
|
+
expectation: 'ALLOW' | 'DENY';
|
|
480
|
+
expressionReportLevel?: ExpressionReportLevel;
|
|
481
|
+
request: {
|
|
482
|
+
auth: {
|
|
483
|
+
uid: string;
|
|
484
|
+
token: Record<string, unknown>;
|
|
485
|
+
} | undefined;
|
|
486
|
+
method: string;
|
|
487
|
+
path: string;
|
|
488
|
+
resource?: {
|
|
489
|
+
data: Record<string, unknown>;
|
|
490
|
+
};
|
|
491
|
+
query?: ListQuery;
|
|
492
|
+
/** ISO-8601 — forwarded from `TestCase.requestTime` (Item 0.F). */
|
|
493
|
+
time?: string;
|
|
494
|
+
};
|
|
495
|
+
resource?: {
|
|
496
|
+
data: Record<string, unknown>;
|
|
497
|
+
};
|
|
498
|
+
functionMocks?: ApiFunctionMock[];
|
|
499
|
+
}
|
|
500
|
+
export interface ApiFunctionMock {
|
|
501
|
+
function: 'get' | 'exists';
|
|
502
|
+
args: Array<{
|
|
503
|
+
exactValue: string;
|
|
504
|
+
}>;
|
|
505
|
+
result: {
|
|
506
|
+
value: {
|
|
507
|
+
data: Record<string, unknown>;
|
|
508
|
+
};
|
|
509
|
+
} | undefined;
|
|
510
|
+
}
|
|
511
|
+
export declare function normalizeDocPath(path: string): string;
|
|
512
|
+
export interface BuildApiTestCaseOptions {
|
|
513
|
+
expressionReportLevel?: ExpressionReportLevel;
|
|
514
|
+
}
|
|
515
|
+
export declare function buildApiTestCase(tc: TestCase, opts?: BuildApiTestCaseOptions): ApiTestCase;
|
|
516
|
+
export declare function buildFunctionMock(mock: FunctionMock): ApiFunctionMock;
|
|
517
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../src/rules/test/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,wDAAyD,CAAC;AACxF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D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