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,227 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// ---- Canonical shared primitives ----
|
|
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 const FIRESTORE_METHODS = ['get', 'list', 'create', 'update', 'delete'];
|
|
15
|
+
/**
|
|
16
|
+
* THE test-identity shape — a signed-in principal for a rules check.
|
|
17
|
+
* Custom claims live under `token` and read as
|
|
18
|
+
* `request.auth.token.<name>` in rules. `null` at usage sites means
|
|
19
|
+
* unauthenticated; the shape itself is always a signed-in identity.
|
|
20
|
+
*/
|
|
21
|
+
export const TestIdentitySchema = z.object({
|
|
22
|
+
uid: z.string(),
|
|
23
|
+
token: z.record(z.unknown()).optional(),
|
|
24
|
+
});
|
|
25
|
+
// ---- Simplified agent-friendly types ----
|
|
26
|
+
export const FunctionMockSchema = z.object({
|
|
27
|
+
function: z.enum(['get', 'exists']).describe('Firestore function to mock'),
|
|
28
|
+
path: z.string().describe('Document path, e.g. "users/alice"'),
|
|
29
|
+
result: z.union([z.record(z.unknown()), z.boolean()]).describe('Document data for get, boolean for exists'),
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Item 0.D / Item 7 — typed write-mode discriminator.
|
|
33
|
+
*
|
|
34
|
+
* Without this, an `update` test had to pre-merge its payload into the
|
|
35
|
+
* post-state by hand (because the simulator just used `tc.data` as the
|
|
36
|
+
* after-state). That works for shallow updates, but for nested-map
|
|
37
|
+
* updates and dot-path updates it silently produces the wrong shape —
|
|
38
|
+
* which then makes `request.resource.data.x.y` and `getAfter()` lie.
|
|
39
|
+
*
|
|
40
|
+
* The four modes mirror what the Firestore admin SDK actually emits:
|
|
41
|
+
* create → write fails if doc exists; after = payload
|
|
42
|
+
* set { merge: false } → full replace; pre-state irrelevant
|
|
43
|
+
* set { merge: true } → recursive merge of pre-state and payload
|
|
44
|
+
* update → top-level keys replace; dot-paths patch nested maps
|
|
45
|
+
*
|
|
46
|
+
* `writeMode` is optional. When omitted, the simulator falls back to the
|
|
47
|
+
* legacy "tc.data IS the full after-state" behavior, which keeps every
|
|
48
|
+
* existing test passing. New tests SHOULD set writeMode whenever the
|
|
49
|
+
* rule reads nested maps or calls getAfter()/existsAfter().
|
|
50
|
+
*/
|
|
51
|
+
export const WriteModeSchema = z.discriminatedUnion('kind', [
|
|
52
|
+
z.object({ kind: z.literal('create') }),
|
|
53
|
+
z.object({ kind: z.literal('set'), merge: z.boolean() }),
|
|
54
|
+
z.object({ kind: z.literal('update') }),
|
|
55
|
+
z.object({ kind: z.literal('delete') }),
|
|
56
|
+
]);
|
|
57
|
+
/**
|
|
58
|
+
* Shape of `request.query` — only populated for `list` operations
|
|
59
|
+
* (REBUILD_PLAN.md Item 6 follow-up). Production exposes:
|
|
60
|
+
* - limit: the requested page size
|
|
61
|
+
* - offset: the start offset within the result set
|
|
62
|
+
* - orderBy: the orderBy clause as a string (field name with optional direction)
|
|
63
|
+
*
|
|
64
|
+
* Unset fields read as `null` from rules. Tests SHOULD set this whenever the
|
|
65
|
+
* rule under evaluation references `request.query.<x>`; otherwise the field
|
|
66
|
+
* read returns null and the rule may silently DENY.
|
|
67
|
+
*/
|
|
68
|
+
export const ListQuerySchema = z.object({
|
|
69
|
+
limit: z.number().optional(),
|
|
70
|
+
offset: z.number().optional(),
|
|
71
|
+
orderBy: z.string().optional(),
|
|
72
|
+
});
|
|
73
|
+
export const TestCaseSchema = z.object({
|
|
74
|
+
description: z.string().describe('Human-readable description of what this test verifies'),
|
|
75
|
+
expectation: z.enum(['ALLOW', 'DENY']).describe('Expected outcome'),
|
|
76
|
+
method: z.enum(FIRESTORE_METHODS).describe('Firestore method to test'),
|
|
77
|
+
path: z.string().describe('Document path, e.g. "users/alice"'),
|
|
78
|
+
auth: z.union([TestIdentitySchema, z.null()]).optional().describe('Auth context; null or omitted for unauthenticated'),
|
|
79
|
+
data: z.record(z.unknown()).optional().describe('request.resource.data for write operations'),
|
|
80
|
+
resource: z.record(z.unknown()).optional().describe('Existing document data (resource.data)'),
|
|
81
|
+
functionMocks: z.array(FunctionMockSchema).optional().describe('Mock get()/exists() calls in rules'),
|
|
82
|
+
/**
|
|
83
|
+
* Optional `request.query` payload for `list` operations only. Populating
|
|
84
|
+
* this is the only way to satisfy rules that read `request.query.limit /
|
|
85
|
+
* .offset / .orderBy` — without it, the field read returns null and a
|
|
86
|
+
* naive `request.query.limit < 100` evaluates as `null < 100 → false → DENY`.
|
|
87
|
+
* Ignored for non-list methods.
|
|
88
|
+
*/
|
|
89
|
+
query: ListQuerySchema.optional().describe('request.query payload (list ops only): limit/offset/orderBy.'),
|
|
90
|
+
/**
|
|
91
|
+
* Override for `request.time` (REBUILD_PLAN.md Item 0.F). ISO-8601 string.
|
|
92
|
+
* Defaults to wallclock when omitted — but date-gated rules then evaluate
|
|
93
|
+
* non-deterministically across CI runs. Set this whenever the rule under
|
|
94
|
+
* test references `request.time`.
|
|
95
|
+
*/
|
|
96
|
+
requestTime: z.string().optional().describe('Override for request.time (ISO-8601). Defaults to wallclock.'),
|
|
97
|
+
/**
|
|
98
|
+
* Optional explicit write semantics (REBUILD_PLAN.md Item 0.D / Item 7).
|
|
99
|
+
* When set, the simulator runs `projectAfterState(writeMode, resource, data)`
|
|
100
|
+
* to derive both `request.resource.data` AND the value `getAfter(path)`
|
|
101
|
+
* returns. When omitted, the simulator preserves legacy behavior:
|
|
102
|
+
* `tc.data` IS the after-state.
|
|
103
|
+
*/
|
|
104
|
+
writeMode: WriteModeSchema.optional().describe('Optional write-mode override; controls update merge semantics and getAfter() projection.'),
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* Project the DECIDING rule from a simulated {@link TestResult}.
|
|
108
|
+
*
|
|
109
|
+
* For an ALLOW, picks the `ALLOW` trace entry (evaluation short-circuits on the
|
|
110
|
+
* first allowing rule, so it's unique). For a DENY, picks the rule the sandbox
|
|
111
|
+
* would report as responsible: the first `DENY`/`ERROR` entry, falling back to
|
|
112
|
+
* the last evaluated rule. Returns `undefined` when no rule was evaluated
|
|
113
|
+
* (implicit deny — no matching `allow`) or the simulator abstained
|
|
114
|
+
* (`UNSUPPORTED`). Never invents data: a missing line/trace stays absent.
|
|
115
|
+
*/
|
|
116
|
+
export function projectEvaluatedRule(result) {
|
|
117
|
+
if (result.decision === 'UNSUPPORTED')
|
|
118
|
+
return undefined;
|
|
119
|
+
const allowed = result.decision === 'ALLOW';
|
|
120
|
+
const deciding = allowed
|
|
121
|
+
? result.trace.find((t) => t.verdict === 'ALLOW')
|
|
122
|
+
: (result.trace.find((t) => t.verdict === 'DENY' || t.verdict === 'ERROR') ??
|
|
123
|
+
result.trace[result.trace.length - 1]);
|
|
124
|
+
if (!deciding)
|
|
125
|
+
return undefined;
|
|
126
|
+
const info = { verdict: allowed ? 'allow' : 'deny' };
|
|
127
|
+
if (deciding.line !== undefined)
|
|
128
|
+
info.line = deciding.line;
|
|
129
|
+
if (deciding.conditionText !== undefined)
|
|
130
|
+
info.expression = deciding.conditionText;
|
|
131
|
+
if (deciding.expressionTrace !== undefined)
|
|
132
|
+
info.expressionTrace = deciding.expressionTrace;
|
|
133
|
+
return info.line !== undefined || info.expression !== undefined || info.expressionTrace !== undefined
|
|
134
|
+
? info
|
|
135
|
+
: undefined;
|
|
136
|
+
}
|
|
137
|
+
export function renderLegacyDebugMessages(result) {
|
|
138
|
+
const out = [];
|
|
139
|
+
for (const note of result.notes)
|
|
140
|
+
out.push(note);
|
|
141
|
+
for (const entry of result.trace) {
|
|
142
|
+
const ops = entry.operations.join(',');
|
|
143
|
+
const head = `Rule #${entry.ruleIndex} (${ops})`;
|
|
144
|
+
if (entry.verdict === 'ALLOW') {
|
|
145
|
+
out.push(`${head} → ALLOW`);
|
|
146
|
+
}
|
|
147
|
+
else if (entry.verdict === 'DENY') {
|
|
148
|
+
out.push(`${head} → deny`);
|
|
149
|
+
}
|
|
150
|
+
else if (entry.verdict === 'UNSUPPORTED') {
|
|
151
|
+
out.push(`${head} → unsupported: ${entry.message ?? ''}`);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
out.push(`${head} → error: ${entry.message ?? ''}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
out.push(`Simulated: ${result.decision}`);
|
|
158
|
+
return out;
|
|
159
|
+
}
|
|
160
|
+
// ---- Path normalization ----
|
|
161
|
+
const DB_PREFIX = '/databases/(default)/documents/';
|
|
162
|
+
export function normalizeDocPath(path) {
|
|
163
|
+
const clean = path.startsWith('/') ? path.slice(1) : path;
|
|
164
|
+
return `${DB_PREFIX}${clean}`;
|
|
165
|
+
}
|
|
166
|
+
export function buildApiTestCase(tc, opts = {}) {
|
|
167
|
+
const request = {
|
|
168
|
+
auth: tc.auth === null || tc.auth === undefined
|
|
169
|
+
? undefined
|
|
170
|
+
: { uid: tc.auth.uid, token: tc.auth.token ?? {} },
|
|
171
|
+
// Firestore rules engine expects request.method as a short verb
|
|
172
|
+
// ('get' | 'list' | 'create' | 'update' | 'delete'). Sending the full
|
|
173
|
+
// gRPC method string (firestore.googleapis.com/.../GetDocument) makes
|
|
174
|
+
// the engine fail to map the request to any allow rule, so every
|
|
175
|
+
// ALLOW-expectation test case silently returns DENY. Discovered by
|
|
176
|
+
// the production-parity smoke test against the live Rules Test API.
|
|
177
|
+
method: tc.method,
|
|
178
|
+
path: normalizeDocPath(tc.path),
|
|
179
|
+
};
|
|
180
|
+
if (tc.data) {
|
|
181
|
+
request.resource = { data: tc.data };
|
|
182
|
+
}
|
|
183
|
+
if (tc.requestTime) {
|
|
184
|
+
request.time = tc.requestTime;
|
|
185
|
+
}
|
|
186
|
+
if (tc.query) {
|
|
187
|
+
request.query = tc.query;
|
|
188
|
+
}
|
|
189
|
+
const result = {
|
|
190
|
+
expectation: tc.expectation,
|
|
191
|
+
request,
|
|
192
|
+
};
|
|
193
|
+
if (opts.expressionReportLevel) {
|
|
194
|
+
result.expressionReportLevel = opts.expressionReportLevel;
|
|
195
|
+
}
|
|
196
|
+
if (tc.resource) {
|
|
197
|
+
result.resource = { data: tc.resource };
|
|
198
|
+
}
|
|
199
|
+
if (tc.functionMocks && tc.functionMocks.length > 0) {
|
|
200
|
+
result.functionMocks = tc.functionMocks.map(buildFunctionMock);
|
|
201
|
+
}
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
export function buildFunctionMock(mock) {
|
|
205
|
+
// Function name must be the short verb ('get' | 'exists') — the same class
|
|
206
|
+
// of bug as request.method. The Rules Test API rejects 'firestore.get' /
|
|
207
|
+
// 'firestore.exists' as not matching any service-declared function, so the
|
|
208
|
+
// mock is ignored and the real get() returns null → rule denies.
|
|
209
|
+
const fnName = mock.function === 'get' ? 'get' : 'exists';
|
|
210
|
+
const normalizedPath = normalizeDocPath(mock.path);
|
|
211
|
+
const result = {
|
|
212
|
+
function: fnName,
|
|
213
|
+
args: [{ exactValue: normalizedPath }],
|
|
214
|
+
result: undefined,
|
|
215
|
+
};
|
|
216
|
+
if (mock.function === 'get') {
|
|
217
|
+
result.result = { value: { data: mock.result } };
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
// exists → true means doc exists (return some data), false means no result
|
|
221
|
+
result.result = mock.result === true
|
|
222
|
+
? { value: { data: {} } }
|
|
223
|
+
: undefined;
|
|
224
|
+
}
|
|
225
|
+
return result;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../src/rules/test/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wCAAwC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGxF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,GAAG,EA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;YAClC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;YACzB,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool factories for `pyric/rules` per F1.
|
|
3
|
+
*
|
|
4
|
+
* - `createFirestoreRulesTools()`: pure-local rules tooling
|
|
5
|
+
* (lint, parse, resolve-modules, simulate) + the Rules Test API
|
|
6
|
+
* client (test, takes ProjectScope).
|
|
7
|
+
* - `createFirestoreSimulatorTools({ resolveSandbox })`: stateful
|
|
8
|
+
* simulator tools — create, execute, read, batch, transaction,
|
|
9
|
+
* undo, events. Tools operate against a session-scoped
|
|
10
|
+
* LocalEnvironment resolved per dispatch.
|
|
11
|
+
*
|
|
12
|
+
* Per F2: identity is a value; lifecycle is a resolver. The
|
|
13
|
+
* `resolveSandbox` resolver returns the session's
|
|
14
|
+
* LocalEnvironment — handlers call it inside `execute` so reset /
|
|
15
|
+
* swap is transparent.
|
|
16
|
+
*
|
|
17
|
+
* Per F5: handlers are self-contained — only deps + args + ctx;
|
|
18
|
+
* no globals.
|
|
19
|
+
*/
|
|
20
|
+
import type { ToolHandler } from '@inbrowser/agent';
|
|
21
|
+
import type { ProjectScope } from '../project-scope.js';
|
|
22
|
+
import { type FirestoreSimulatorToolDeps as FirestoreSimulatorToolDepsImpl } from './simulator-tools-impl.js';
|
|
23
|
+
export type FirestoreSimulatorToolDeps = Pick<FirestoreSimulatorToolDepsImpl, 'resolveSandbox'>;
|
|
24
|
+
export interface FirestoreRulesToolDeps {
|
|
25
|
+
/** Optional ProjectScope for the test-rules tool (calls Google's
|
|
26
|
+
* Firebase Rules Test API). When omitted, `firestore_test_rules`
|
|
27
|
+
* is dropped from the factory's output. */
|
|
28
|
+
scope?: ProjectScope;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pure-local Firestore rules tooling, plus the optional Rules Test
|
|
32
|
+
* API client when `scope` is supplied. Bundles:
|
|
33
|
+
*
|
|
34
|
+
* - `firestore_lint_rules`
|
|
35
|
+
* - `firestore_resolve_modules`
|
|
36
|
+
* - `firestore_simulate_rules`
|
|
37
|
+
* - `firestore_test_rules` (only when `scope` is supplied)
|
|
38
|
+
*/
|
|
39
|
+
export declare function createFirestoreRulesTools(deps?: FirestoreRulesToolDeps): ToolHandler[];
|
|
40
|
+
export declare function createFirestoreSimulatorTools(deps: FirestoreSimulatorToolDeps): ToolHandler[];
|
|
41
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/rules/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMxD,OAAO,EAEL,KAAK,0BAA0B,IAAI,8BAA8B,EAClE,MAAM,2BAA2B,CAAC;AAInC,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,8BAA8B,EAC9B,gBAAgB,CACjB,CAAC;AAIF,MAAM,WAAW,sBAAsB;IACrC;;gDAE4C;IAC5C,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,GAAE,sBAA2B,GAChC,WAAW,EAAE,CAsFf;AAUD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,0BAA0B,GAC/B,WAAW,EAAE,CAKf"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool factories for `pyric/rules` per F1.
|
|
3
|
+
*
|
|
4
|
+
* - `createFirestoreRulesTools()`: pure-local rules tooling
|
|
5
|
+
* (lint, parse, resolve-modules, simulate) + the Rules Test API
|
|
6
|
+
* client (test, takes ProjectScope).
|
|
7
|
+
* - `createFirestoreSimulatorTools({ resolveSandbox })`: stateful
|
|
8
|
+
* simulator tools — create, execute, read, batch, transaction,
|
|
9
|
+
* undo, events. Tools operate against a session-scoped
|
|
10
|
+
* LocalEnvironment resolved per dispatch.
|
|
11
|
+
*
|
|
12
|
+
* Per F2: identity is a value; lifecycle is a resolver. The
|
|
13
|
+
* `resolveSandbox` resolver returns the session's
|
|
14
|
+
* LocalEnvironment — handlers call it inside `execute` so reset /
|
|
15
|
+
* swap is transparent.
|
|
16
|
+
*
|
|
17
|
+
* Per F5: handlers are self-contained — only deps + args + ctx;
|
|
18
|
+
* no globals.
|
|
19
|
+
*/
|
|
20
|
+
import { resolveModules } from './modules/resolver.js';
|
|
21
|
+
import { SimulateFirestoreRulesHandler } from './simulator/handler.js';
|
|
22
|
+
import { createFirestoreRulesStdlibTools } from './stdlib-tools.js';
|
|
23
|
+
import { TestFirestoreRulesHandler } from './test/handler.js';
|
|
24
|
+
import { createFirestoreSimulatorTools as createFirestoreSimulatorToolsImpl, } from './simulator-tools-impl.js';
|
|
25
|
+
/**
|
|
26
|
+
* Pure-local Firestore rules tooling, plus the optional Rules Test
|
|
27
|
+
* API client when `scope` is supplied. Bundles:
|
|
28
|
+
*
|
|
29
|
+
* - `firestore_lint_rules`
|
|
30
|
+
* - `firestore_resolve_modules`
|
|
31
|
+
* - `firestore_simulate_rules`
|
|
32
|
+
* - `firestore_test_rules` (only when `scope` is supplied)
|
|
33
|
+
*/
|
|
34
|
+
export function createFirestoreRulesTools(deps = {}) {
|
|
35
|
+
const handlers = [
|
|
36
|
+
// `firestore_lint_rules` + `firestore_resolve_modules` are
|
|
37
|
+
// provided by `createFirestoreRulesStdlibTools()` (browser-safe;
|
|
38
|
+
// stdlib content inlined at build time) and spread in below.
|
|
39
|
+
// Node consumers that need `basePath`-driven relative-import
|
|
40
|
+
// resolution should call the `resolveModules` function directly
|
|
41
|
+
// — the public tool surface intentionally keeps the schema
|
|
42
|
+
// browser-friendly.
|
|
43
|
+
{
|
|
44
|
+
name: 'firestore_simulate_rules',
|
|
45
|
+
description: 'Simulate Firestore security rules locally against a list of test cases. Same shape as `firestore_test_rules` but in-process — no propagation wait, no side effects. Supports get()/exists() via functionMocks.',
|
|
46
|
+
parameters: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
source: { type: 'string' },
|
|
50
|
+
testCases: { type: 'array' },
|
|
51
|
+
},
|
|
52
|
+
required: ['source', 'testCases'],
|
|
53
|
+
},
|
|
54
|
+
async execute(args) {
|
|
55
|
+
const { source, testCases } = args;
|
|
56
|
+
const handler = new SimulateFirestoreRulesHandler();
|
|
57
|
+
const result = handler.simulate(source, testCases);
|
|
58
|
+
return {
|
|
59
|
+
ok: result.success,
|
|
60
|
+
summary: result.success
|
|
61
|
+
? `${result.data.results.filter((r) => r.state === 'PASSED').length}/${result.data.results.length} test cases passed`
|
|
62
|
+
: `Simulation failed: ${result.error.message}`,
|
|
63
|
+
data: result,
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
// Stdlib reference tools (list + get) — pure data, browser-safe.
|
|
68
|
+
// Defined in `./stdlib-tools.ts` so consumers that only need the
|
|
69
|
+
// reference (the playground, browser docs generators) don't pull
|
|
70
|
+
// in the Node-only resolver via this Node-only factory.
|
|
71
|
+
...createFirestoreRulesStdlibTools(),
|
|
72
|
+
];
|
|
73
|
+
if (deps.scope) {
|
|
74
|
+
const scope = deps.scope;
|
|
75
|
+
// Note: `firestore_get_rules` is NOT added here. `pyric-tools/deploy`'s
|
|
76
|
+
// `createFirestoreDeployTools` already exposes a tool with that
|
|
77
|
+
// name (returning raw rules source); composeMcpRegistry would
|
|
78
|
+
// reject the duplicate. Browser callers that want the parsed
|
|
79
|
+
// inspect (AST + summary + findings) wire `createFirestoreInspectTool`
|
|
80
|
+
// directly from `pyric/rules` — see playground's
|
|
81
|
+
// `firestore-rules-inspect.ts`.
|
|
82
|
+
handlers.push({
|
|
83
|
+
name: 'firestore_test_rules',
|
|
84
|
+
description: 'Test Firestore security rules against test cases via the Firebase Rules Test API. Requires a ProjectScope (auth credentials).',
|
|
85
|
+
parameters: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
source: { type: 'string' },
|
|
89
|
+
testCases: { type: 'array' },
|
|
90
|
+
expressionReportLevel: { type: 'string', enum: ['NONE', 'VISITED', 'FULL'] },
|
|
91
|
+
},
|
|
92
|
+
required: ['source', 'testCases'],
|
|
93
|
+
},
|
|
94
|
+
async execute(args) {
|
|
95
|
+
const { source, testCases, expressionReportLevel } = args;
|
|
96
|
+
const handler = new TestFirestoreRulesHandler();
|
|
97
|
+
const result = await handler.execute(scope, source, testCases, { expressionReportLevel });
|
|
98
|
+
return {
|
|
99
|
+
ok: result.success,
|
|
100
|
+
summary: result.success
|
|
101
|
+
? `${result.data.passed}/${result.data.passed + result.data.failed} test cases passed`
|
|
102
|
+
: `Rules test failed: ${result.error.message}`,
|
|
103
|
+
data: result,
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return handlers;
|
|
109
|
+
}
|
|
110
|
+
// ─── createFirestoreSimulatorTools ────────────────────────────────────
|
|
111
|
+
//
|
|
112
|
+
// Implementation lives in ./simulator-tools-impl.ts so the same factory
|
|
113
|
+
// can run in both Node and browser bundles without forcing the Node-only
|
|
114
|
+
// `resolveModules` (disk reads) into the browser. The /node entry below
|
|
115
|
+
// wires `resolveModules` from `./modules/resolver.js`; the browser-safe
|
|
116
|
+
// `/simulator` entry wires `resolveModulesBrowser`. See `./simulator.ts`.
|
|
117
|
+
//
|
|
118
|
+
export function createFirestoreSimulatorTools(deps) {
|
|
119
|
+
return createFirestoreSimulatorToolsImpl({
|
|
120
|
+
resolveSandbox: deps.resolveSandbox,
|
|
121
|
+
resolveModulesFn: resolveModules,
|
|
122
|
+
});
|
|
123
|
+
}
|
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GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,qBAAqB,EAAE,CAAC,CAAC;gBAC1F,OAAO;oBACL,EAAE,EAAE,MAAM,CAAC,OAAO;oBAClB,OAAO,EAAE,MAAM,CAAC,OAAO;wBACrB,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,oBAAoB;wBACtF,CAAC,CAAC,sBAAsB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;oBAChD,IAAI,EAAE,MAAM;iBACb,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,yEAAyE;AACzE,EAAE;AACF,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,wEAAwE;AACxE,0EAA0E;AAC1E,EAAE;AACF,MAAM,UAAU,6BAA6B,CAC3C,IAAgC;IAEhC,OAAO,iCAAiC,CAAC;QACvC,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,gBAAgB,EAAE,cAAc;KACjC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ProjectScope } from '../../project-scope.js';
|
|
2
|
+
import type { WriteFirestoreRulesResult } from './spec.js';
|
|
3
|
+
export declare class WriteFirestoreRulesHandler {
|
|
4
|
+
execute(scope: ProjectScope, source: string): Promise<WriteFirestoreRulesResult>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/rules/write/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAO3D,qBAAa,0BAA0B;IAC/B,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAkIvF"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { parseToASTOrError } from '../grammar/FirestoreParser.js';
|
|
2
|
+
import { validateFirestoreRules } from '../grammar/FirestoreValidator.js';
|
|
3
|
+
import { lintFirestoreRules } from '../linter/linter.js';
|
|
4
|
+
const RULES_API = 'https://firebaserules.googleapis.com/v1';
|
|
5
|
+
export class WriteFirestoreRulesHandler {
|
|
6
|
+
async execute(scope, source) {
|
|
7
|
+
// 1. Parse — surface line/col on failure so the caller (often an agent)
|
|
8
|
+
// can locate the syntax error instead of getting an opaque PARSE_FAILED.
|
|
9
|
+
const parsed = parseToASTOrError(source);
|
|
10
|
+
if (!parsed.ok) {
|
|
11
|
+
return {
|
|
12
|
+
success: false,
|
|
13
|
+
error: {
|
|
14
|
+
code: 'PARSE_FAILED',
|
|
15
|
+
message: `Failed to parse Firestore rules at line ${parsed.error.line}, col ${parsed.error.column}: expected ${parsed.error.expected || '<unknown>'}`,
|
|
16
|
+
recoverable: true,
|
|
17
|
+
parseError: parsed.error,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const ast = parsed.ast;
|
|
22
|
+
// 2. Check version
|
|
23
|
+
if (ast.version !== '2') {
|
|
24
|
+
return {
|
|
25
|
+
success: false,
|
|
26
|
+
error: { code: 'PARSE_FAILED', message: `Unsupported rules_version '${ast.version}' — only version '2' is supported`, recoverable: true },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// 3. Validate — surface security findings (SEC-1 public write, SEC-2
|
|
30
|
+
// public read at recursive wildcard) before lint. The validator and
|
|
31
|
+
// linter both catch `allow … if true`, so whichever runs first wins.
|
|
32
|
+
// Validate wins because CRITICAL findings carry the security taxonomy
|
|
33
|
+
// (SEC-1/SEC-2 codes, path+operation) that callers actually
|
|
34
|
+
// remediate against; the linter's PERMISSIVE_RULE/RECURSIVE_WILDCARD
|
|
35
|
+
// notes are stylistic and would mask the security signal if they
|
|
36
|
+
// gated first. Compute lint first so its warnings ride along on
|
|
37
|
+
// the CRITICAL response for completeness.
|
|
38
|
+
const lint = lintFirestoreRules(source);
|
|
39
|
+
const findings = validateFirestoreRules(ast);
|
|
40
|
+
const critical = findings.filter(f => f.severity === 'critical');
|
|
41
|
+
if (critical.length > 0) {
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
error: {
|
|
45
|
+
code: 'CRITICAL_FINDINGS',
|
|
46
|
+
message: `${critical.length} critical finding(s) — fix before deploying`,
|
|
47
|
+
recoverable: true,
|
|
48
|
+
findings,
|
|
49
|
+
lint,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// 4. Lint — catch remaining structural issues before deploying
|
|
54
|
+
const lintErrors = lint.warnings.filter(w => w.severity === 'error');
|
|
55
|
+
if (lintErrors.length > 0) {
|
|
56
|
+
return {
|
|
57
|
+
success: false,
|
|
58
|
+
error: {
|
|
59
|
+
code: 'LINT_ERRORS',
|
|
60
|
+
message: `${lintErrors.length} lint error(s) — fix before deploying: ${lintErrors.map(e => e.message).join('; ')}`,
|
|
61
|
+
recoverable: true,
|
|
62
|
+
lint,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
const token = await scope.resolveToken();
|
|
68
|
+
const headers = { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' };
|
|
69
|
+
// 3. Create ruleset
|
|
70
|
+
const createRes = await fetch(`${RULES_API}/projects/${scope.projectId}/rulesets`, {
|
|
71
|
+
method: 'POST',
|
|
72
|
+
headers,
|
|
73
|
+
body: JSON.stringify({ source: { files: [{ name: 'firestore.rules', content: source }] } }),
|
|
74
|
+
});
|
|
75
|
+
if (createRes.status === 403) {
|
|
76
|
+
return {
|
|
77
|
+
success: false,
|
|
78
|
+
error: { code: 'PERMISSION_DENIED', message: 'Service account lacks permission to create Firestore rulesets', recoverable: false },
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (!createRes.ok) {
|
|
82
|
+
const body = await createRes.text().catch(() => '');
|
|
83
|
+
return {
|
|
84
|
+
success: false,
|
|
85
|
+
error: { code: 'CREATE_RULESET_FAILED', message: `Failed to create ruleset: ${createRes.status} ${body}`, recoverable: createRes.status === 400 },
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const createData = await createRes.json();
|
|
89
|
+
const rulesetName = createData.name;
|
|
90
|
+
const rulesetId = rulesetName.split('/').pop();
|
|
91
|
+
// 4. Update the cloud.firestore release to point at the new ruleset.
|
|
92
|
+
// The body MUST include `release.name`. Without it the API responds
|
|
93
|
+
// 200 OK but the active release is left pointing at the previous
|
|
94
|
+
// ruleset — a silent failure where the tool reports success but
|
|
95
|
+
// production rules never change. The release name in the URL path
|
|
96
|
+
// is not enough; the body field is what the API actually reads.
|
|
97
|
+
const releaseName = `projects/${scope.projectId}/releases/cloud.firestore`;
|
|
98
|
+
const releaseRes = await fetch(`${RULES_API}/${releaseName}`, {
|
|
99
|
+
method: 'PATCH',
|
|
100
|
+
headers,
|
|
101
|
+
body: JSON.stringify({ release: { name: releaseName, rulesetName } }),
|
|
102
|
+
});
|
|
103
|
+
if (releaseRes.status === 403) {
|
|
104
|
+
return {
|
|
105
|
+
success: false,
|
|
106
|
+
error: { code: 'PERMISSION_DENIED', message: 'Service account lacks permission to create Firestore releases', recoverable: false },
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (!releaseRes.ok) {
|
|
110
|
+
const body = await releaseRes.text().catch(() => '');
|
|
111
|
+
return {
|
|
112
|
+
success: false,
|
|
113
|
+
error: { code: 'CREATE_RELEASE_FAILED', message: `Failed to create release: ${releaseRes.status} ${body}`, recoverable: false },
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return { success: true, data: { rulesetId, findings, lint } };
|
|
117
|
+
}
|
|
118
|
+
catch (e) {
|
|
119
|
+
return {
|
|
120
|
+
success: false,
|
|
121
|
+
error: { code: 'DEPLOY_FAILED', message: e instanceof Error ? e.message : String(e), recoverable: false },
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/rules/write/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAE5D,MAAM,OAAO,0BAA0B;IACrC,KAAK,CAAC,OAAO,CAAC,KAAmB,EAAE,MAAc;QAC/C,wEAAwE;QACxE,yEAAyE;QACzE,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,cAAc;oBACpB,OAAO,EAAE,2CAA2C,MAAM,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,CAAC,KAAK,CAAC,MAAM,cAAc,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,WAAW,EAAE;oBACrJ,WAAW,EAAE,IAAI;oBACjB,UAAU,EAAE,MAAM,CAAC,KAAK;iBACzB;aACF,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QAEvB,mBAAmB;QACnB,IAAI,GAAG,CAAC,OAAO,KAAK,GAAG,EAAE,CAAC;YACxB,OAAO;gBACL,OAAO,EA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OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE;aAC1G,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ValidationFinding } from '../grammar/FirestoreValidator.js';
|
|
2
|
+
import type { LintWarning, RulesMetrics } from '../linter/linter.js';
|
|
3
|
+
import type { ParseError } from '../grammar/FirestoreParser.js';
|
|
4
|
+
export type WriteFirestoreRulesResult = {
|
|
5
|
+
success: true;
|
|
6
|
+
data: {
|
|
7
|
+
rulesetId: string;
|
|
8
|
+
findings: ValidationFinding[];
|
|
9
|
+
lint: {
|
|
10
|
+
warnings: LintWarning[];
|
|
11
|
+
metrics: RulesMetrics;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
success: false;
|
|
16
|
+
error: {
|
|
17
|
+
code: string;
|
|
18
|
+
message: string;
|
|
19
|
+
recoverable: boolean;
|
|
20
|
+
findings?: ValidationFinding[];
|
|
21
|
+
lint?: {
|
|
22
|
+
warnings: LintWarning[];
|
|
23
|
+
metrics: RulesMetrics;
|
|
24
|
+
};
|
|
25
|
+
parseError?: ParseError;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../src/rules/write/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GACjC;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;QAAC,IAAI,EAAE;YAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;YAAC,OAAO,EAAE,YAAY,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,GACvI;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE;YAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;YAAC,OAAO,EAAE,YAAY,CAAA;SAAE,CAAC;QAAC,UAAU,CAAC,EAAE,UAAU,CAAA;KAAE,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../src/rules/write/spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric/sandbox/admin-compat` — chainable Admin-shaped Firestore
|
|
3
|
+
* wrapper backed by `LocalEnvironment`.
|
|
4
|
+
*
|
|
5
|
+
* This is the surface that mirrors `firebase-admin/firestore` (the
|
|
6
|
+
* Admin Node SDK) so test + agent code that's written against the
|
|
7
|
+
* chainable Admin shape — `db.collection('x').doc('y').get()` etc. —
|
|
8
|
+
* can run unmodified against the in-process sandbox.
|
|
9
|
+
*
|
|
10
|
+
* `pyric-admin` imports from here directly rather than reaching across
|
|
11
|
+
* packages for its substrate.
|
|
12
|
+
*
|
|
13
|
+
* Exported as a separate subpath (not via `/internal`) because the
|
|
14
|
+
* admin-compat surface has its own `DocumentData` / `Transaction` /
|
|
15
|
+
* etc. types that would collide with the local-environment exports
|
|
16
|
+
* already on `/internal`.
|
|
17
|
+
*/
|
|
18
|
+
export * from './firestore/admin-compat/index.js';
|
|
19
|
+
export type { DocumentSnapshot as LiveDocumentSnapshot, QueryDocumentSnapshot as LiveQueryDocumentSnapshot, QuerySnapshot as LiveQuerySnapshot, DocumentChange, DocumentChangeType, DocChangesOptions, SnapshotMetadata, SnapshotDocRef, SnapshotQueryRef, SnapshotTarget, QueryConstraintApplier, SnapshotListenerOptions, } from './internal/index.js';
|
|
20
|
+
//# sourceMappingURL=admin-compat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-compat.d.ts","sourceRoot":"","sources":["../../src/sandbox/admin-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,mCAAmC,CAAC;AAOlD,YAAY,EACV,gBAAgB,IAAI,oBAAoB,EACxC,qBAAqB,IAAI,yBAAyB,EAClD,aAAa,IAAI,iBAAiB,EAClC,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC"}
|