pyric 0.1.0-alpha.19 → 0.1.0-alpha.21
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 +64 -89
- package/dist/ai/blocked.d.ts +52 -0
- package/dist/ai/blocked.d.ts.map +1 -0
- package/dist/ai/blocked.js +83 -0
- package/dist/ai/blocked.js.map +1 -0
- package/dist/ai/broker/broker.d.ts +50 -0
- package/dist/ai/broker/broker.d.ts.map +1 -1
- package/dist/ai/broker/broker.js +157 -21
- package/dist/ai/broker/broker.js.map +1 -1
- package/dist/ai/broker/gemini-engine.d.ts +56 -0
- package/dist/ai/broker/gemini-engine.d.ts.map +1 -0
- package/dist/ai/broker/gemini-engine.js +235 -0
- package/dist/ai/broker/gemini-engine.js.map +1 -0
- package/dist/ai/broker/index.d.ts +2 -1
- package/dist/ai/broker/index.d.ts.map +1 -1
- package/dist/ai/broker/index.js +2 -1
- package/dist/ai/broker/index.js.map +1 -1
- package/dist/ai/broker/openai-engine.d.ts +10 -1
- package/dist/ai/broker/openai-engine.d.ts.map +1 -1
- package/dist/ai/broker/openai-engine.js +26 -4
- package/dist/ai/broker/openai-engine.js.map +1 -1
- package/dist/ai/broker/synthesizer.d.ts +14 -0
- package/dist/ai/broker/synthesizer.d.ts.map +1 -1
- package/dist/ai/broker/synthesizer.js +31 -0
- package/dist/ai/broker/synthesizer.js.map +1 -1
- package/dist/ai/broker/types.d.ts +29 -0
- package/dist/ai/broker/types.d.ts.map +1 -1
- package/dist/ai/instances.js +1 -1
- package/dist/ai/instances.js.map +1 -1
- package/dist/ai/internal.d.ts +5 -0
- package/dist/ai/internal.d.ts.map +1 -1
- package/dist/ai/internal.js +5 -0
- package/dist/ai/internal.js.map +1 -1
- package/dist/ai/response-helpers.d.ts.map +1 -1
- package/dist/ai/response-helpers.js +6 -24
- package/dist/ai/response-helpers.js.map +1 -1
- package/dist/analytics/index.d.ts +40 -0
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js +25 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/app-check/index.d.ts +31 -0
- package/dist/app-check/index.d.ts.map +1 -0
- package/dist/app-check/index.js +20 -0
- package/dist/app-check/index.js.map +1 -0
- package/dist/auth/instances.js +1 -1
- package/dist/auth/instances.js.map +1 -1
- package/dist/database/controls.d.ts +1 -1
- package/dist/database/controls.js +1 -1
- package/dist/database/instances.js +1 -1
- package/dist/database/instances.js.map +1 -1
- package/dist/database/sandbox/backend.d.ts +1 -0
- package/dist/database/sandbox/backend.d.ts.map +1 -1
- package/dist/database/sandbox/backend.js +1 -0
- package/dist/database/sandbox/backend.js.map +1 -1
- package/dist/database/sandbox/rules-eval.d.ts +6 -2
- package/dist/database/sandbox/rules-eval.d.ts.map +1 -1
- package/dist/database/sandbox/rules-eval.js +15 -2
- package/dist/database/sandbox/rules-eval.js.map +1 -1
- package/dist/database/sandbox/write-plane.d.ts +1 -0
- package/dist/database/sandbox/write-plane.d.ts.map +1 -1
- package/dist/database/sandbox/write-plane.js +7 -2
- package/dist/database/sandbox/write-plane.js.map +1 -1
- package/dist/database/sandbox-controls.d.ts +12 -5
- package/dist/database/sandbox-controls.d.ts.map +1 -1
- package/dist/database/sandbox-controls.js +20 -9
- package/dist/database/sandbox-controls.js.map +1 -1
- package/dist/database/sandbox-namespace.d.ts +19 -1
- package/dist/database/sandbox-namespace.d.ts.map +1 -1
- package/dist/database/sandbox-namespace.js +24 -1
- package/dist/database/sandbox-namespace.js.map +1 -1
- package/dist/deferred/entry.d.ts +75 -0
- package/dist/deferred/entry.d.ts.map +1 -0
- package/dist/deferred/entry.js +143 -0
- package/dist/deferred/entry.js.map +1 -0
- package/dist/firestore/instances.js +1 -1
- package/dist/firestore/instances.js.map +1 -1
- package/dist/firestore/lite.d.ts +72 -0
- package/dist/firestore/lite.d.ts.map +1 -0
- package/dist/firestore/lite.js +22 -0
- package/dist/firestore/lite.js.map +1 -0
- package/dist/firestore/persistence.d.ts +2 -2
- package/dist/firestore/persistence.js +1 -1
- package/dist/firestore/sandbox-controls.d.ts +2 -0
- package/dist/firestore/sandbox-controls.d.ts.map +1 -1
- package/dist/firestore/sandbox-controls.js +8 -0
- package/dist/firestore/sandbox-controls.js.map +1 -1
- package/dist/functions/index.d.ts +29 -0
- package/dist/functions/index.d.ts.map +1 -0
- package/dist/functions/index.js +20 -0
- package/dist/functions/index.js.map +1 -0
- package/dist/messaging/client.d.ts +2 -1
- package/dist/messaging/client.d.ts.map +1 -1
- package/dist/messaging/client.js +2 -2
- package/dist/messaging/client.js.map +1 -1
- package/dist/messaging/instance.d.ts +2 -2
- package/dist/messaging/instance.d.ts.map +1 -1
- package/dist/messaging/instance.js +40 -6
- package/dist/messaging/instance.js.map +1 -1
- package/dist/messaging/sw.d.ts +2 -1
- package/dist/messaging/sw.d.ts.map +1 -1
- package/dist/messaging/sw.js +2 -2
- package/dist/messaging/sw.js.map +1 -1
- package/dist/performance/index.d.ts +22 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/index.js +19 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/remote-config/index.d.ts +40 -0
- package/dist/remote-config/index.d.ts.map +1 -0
- package/dist/remote-config/index.js +25 -0
- package/dist/remote-config/index.js.map +1 -0
- package/dist/rules/grammar/FirestoreValidator.d.ts.map +1 -1
- package/dist/rules/grammar/FirestoreValidator.js +43 -27
- package/dist/rules/grammar/FirestoreValidator.js.map +1 -1
- package/dist/rules/grammar/document-access-count.d.ts +24 -0
- package/dist/rules/grammar/document-access-count.d.ts.map +1 -0
- package/dist/rules/grammar/document-access-count.js +100 -0
- package/dist/rules/grammar/document-access-count.js.map +1 -0
- package/dist/rules/linter/ast-utils.d.ts +2 -6
- package/dist/rules/linter/ast-utils.d.ts.map +1 -1
- package/dist/rules/linter/ast-utils.js +2 -63
- package/dist/rules/linter/ast-utils.js.map +1 -1
- package/dist/rules/linter/hallucinations.d.ts +8 -0
- package/dist/rules/linter/hallucinations.d.ts.map +1 -1
- package/dist/rules/linter/hallucinations.js +121 -31
- package/dist/rules/linter/hallucinations.js.map +1 -1
- package/dist/rules/linter/linter.d.ts +10 -1
- package/dist/rules/linter/linter.d.ts.map +1 -1
- package/dist/rules/linter/linter.js +23 -9
- package/dist/rules/linter/linter.js.map +1 -1
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm +5 -2
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.d.ts +1 -1
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.d.ts.map +1 -1
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.js +5 -2
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.js.map +1 -1
- package/dist/rules/rtdb/grammar/simulator.d.ts.map +1 -1
- package/dist/rules/rtdb/grammar/simulator.js +61 -15
- package/dist/rules/rtdb/grammar/simulator.js.map +1 -1
- package/dist/rules/rtdb/simulation/handler.d.ts.map +1 -1
- package/dist/rules/rtdb/simulation/handler.js +96 -35
- package/dist/rules/rtdb/simulation/handler.js.map +1 -1
- package/dist/rules/simulator/document-lookups.d.ts +4 -0
- package/dist/rules/simulator/document-lookups.d.ts.map +1 -1
- package/dist/rules/simulator/document-lookups.js +42 -3
- package/dist/rules/simulator/document-lookups.js.map +1 -1
- package/dist/rules/simulator/eval-error.d.ts +11 -0
- package/dist/rules/simulator/eval-error.d.ts.map +1 -1
- package/dist/rules/simulator/eval-error.js +14 -0
- package/dist/rules/simulator/eval-error.js.map +1 -1
- package/dist/rules/simulator/evaluation-builtins.d.ts.map +1 -1
- package/dist/rules/simulator/evaluation-builtins.js +33 -8
- package/dist/rules/simulator/evaluation-builtins.js.map +1 -1
- package/dist/rules/simulator/evaluation-context.d.ts +12 -0
- package/dist/rules/simulator/evaluation-context.d.ts.map +1 -1
- package/dist/rules/simulator/evaluator.d.ts +1 -1
- package/dist/rules/simulator/evaluator.d.ts.map +1 -1
- package/dist/rules/simulator/evaluator.js +16 -4
- package/dist/rules/simulator/evaluator.js.map +1 -1
- package/dist/rules/simulator/handler.d.ts.map +1 -1
- package/dist/rules/simulator/handler.js +52 -5
- package/dist/rules/simulator/handler.js.map +1 -1
- package/dist/rules/simulator/lookup-budget.d.ts +37 -0
- package/dist/rules/simulator/lookup-budget.d.ts.map +1 -0
- package/dist/rules/simulator/lookup-budget.js +96 -0
- package/dist/rules/simulator/lookup-budget.js.map +1 -0
- package/dist/rules/stdlib-modules.d.ts +7 -0
- package/dist/rules/stdlib-modules.d.ts.map +1 -1
- package/dist/rules/stdlib-modules.js +11 -11
- package/dist/rules/stdlib-modules.js.map +1 -1
- package/dist/sandbox/admin-firestore/get-firestore.d.ts +6 -0
- package/dist/sandbox/admin-firestore/get-firestore.d.ts.map +1 -1
- package/dist/sandbox/admin-firestore/get-firestore.js +22 -3
- package/dist/sandbox/admin-firestore/get-firestore.js.map +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/persistence/types.d.ts +1 -1
- package/dist/sandbox/remote.d.ts +2 -2
- package/dist/sandbox/sandbox-context.d.ts +8 -1
- package/dist/sandbox/sandbox-context.d.ts.map +1 -1
- package/dist/sandbox/sandbox-context.js +59 -8
- package/dist/sandbox/sandbox-context.js.map +1 -1
- package/dist/sandbox/types/auth-state.d.ts +1 -0
- package/dist/sandbox/types/auth-state.d.ts.map +1 -1
- package/dist/sandbox/types/events.d.ts +2 -1
- package/dist/sandbox/types/events.d.ts.map +1 -1
- package/dist/sandbox/types/operation.d.ts +1 -0
- package/dist/sandbox/types/operation.d.ts.map +1 -1
- package/dist/storage/enforce.d.ts +20 -1
- package/dist/storage/enforce.d.ts.map +1 -1
- package/dist/storage/enforce.js +47 -14
- package/dist/storage/enforce.js.map +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/list.js +1 -1
- package/dist/storage/list.js.map +1 -1
- package/dist/storage/persistence.d.ts.map +1 -1
- package/dist/storage/persistence.js +66 -14
- package/dist/storage/persistence.js.map +1 -1
- package/dist/storage/sandbox/rules-evaluation-error.d.ts +25 -0
- package/dist/storage/sandbox/rules-evaluation-error.d.ts.map +1 -1
- package/dist/storage/sandbox/rules-evaluation-error.js +29 -0
- package/dist/storage/sandbox/rules-evaluation-error.js.map +1 -1
- package/dist/storage/sandbox/rules-evaluator.d.ts +10 -5
- package/dist/storage/sandbox/rules-evaluator.d.ts.map +1 -1
- package/dist/storage/sandbox/rules-evaluator.js +105 -33
- package/dist/storage/sandbox/rules-evaluator.js.map +1 -1
- package/dist/storage/sandbox/rules-methods.d.ts.map +1 -1
- package/dist/storage/sandbox/rules-methods.js +17 -7
- package/dist/storage/sandbox/rules-methods.js.map +1 -1
- package/dist/storage/service.d.ts +23 -2
- package/dist/storage/service.d.ts.map +1 -1
- package/dist/storage/service.js +37 -26
- package/dist/storage/service.js.map +1 -1
- package/package.json +42 -2
- package/src/ai/blocked.ts +97 -0
- package/src/ai/broker/broker.ts +153 -22
- package/src/ai/broker/gemini-engine.ts +311 -0
- package/src/ai/broker/index.ts +2 -0
- package/src/ai/broker/openai-engine.ts +31 -3
- package/src/ai/broker/synthesizer.ts +34 -0
- package/src/ai/broker/types.ts +27 -1
- package/src/ai/instances.ts +1 -1
- package/src/ai/internal.ts +5 -0
- package/src/ai/response-helpers.ts +6 -25
- package/src/analytics/index.ts +53 -0
- package/src/app/dispatch.test.ts +3 -1
- package/src/app-check/index.ts +41 -0
- package/src/auth/instances.ts +1 -1
- package/src/database/controls.ts +1 -1
- package/src/database/instances.ts +1 -1
- package/src/database/sandbox/backend.ts +1 -0
- package/src/database/sandbox/rules-eval.ts +18 -2
- package/src/database/sandbox/write-plane.ts +8 -2
- package/src/database/sandbox-controls.ts +29 -9
- package/src/database/sandbox-namespace.ts +28 -1
- package/src/deferred/entry.ts +167 -0
- package/src/firestore/instances.ts +1 -1
- package/src/firestore/lite.ts +91 -0
- package/src/firestore/persistence.ts +2 -2
- package/src/firestore/sandbox-controls.ts +10 -0
- package/src/functions/index.ts +38 -0
- package/src/messaging/client.ts +3 -2
- package/src/messaging/instance.ts +44 -7
- package/src/messaging/sw.ts +3 -2
- package/src/performance/index.ts +31 -0
- package/src/remote-config/index.ts +53 -0
- package/src/rules/grammar/FirestoreValidator.ts +44 -28
- package/src/rules/grammar/document-access-count.ts +75 -0
- package/src/rules/linter/ast-utils.ts +2 -36
- package/src/rules/linter/hallucinations.ts +123 -25
- package/src/rules/linter/linter.ts +32 -10
- package/src/rules/rtdb/grammar/RtdbExpr.ohm +5 -2
- package/src/rules/rtdb/grammar/RtdbExpr.ohm.generated.ts +5 -2
- package/src/rules/rtdb/grammar/simulator.ts +41 -15
- package/src/rules/rtdb/simulation/handler.ts +149 -46
- package/src/rules/simulator/document-lookups.ts +46 -3
- package/src/rules/simulator/eval-error.ts +16 -0
- package/src/rules/simulator/evaluation-builtins.ts +35 -8
- package/src/rules/simulator/evaluation-context.ts +12 -0
- package/src/rules/simulator/evaluator.ts +14 -3
- package/src/rules/simulator/handler.ts +68 -4
- package/src/rules/simulator/lookup-budget.ts +101 -0
- package/src/rules/stdlib-modules.ts +19 -11
- package/src/sandbox/admin-firestore/get-firestore.ts +19 -3
- package/src/sandbox/index.ts +5 -1
- package/src/sandbox/persistence/types.ts +1 -1
- package/src/sandbox/remote.ts +2 -2
- package/src/sandbox/sandbox-context.ts +69 -9
- package/src/sandbox/types/auth-state.ts +1 -1
- package/src/sandbox/types/events.ts +2 -1
- package/src/sandbox/types/operation.ts +1 -1
- package/src/storage/enforce.ts +53 -14
- package/src/storage/index.ts +1 -1
- package/src/storage/list.ts +1 -1
- package/src/storage/persistence.ts +74 -16
- package/src/storage/sandbox/rules-evaluation-error.ts +32 -0
- package/src/storage/sandbox/rules-evaluator.ts +109 -32
- package/src/storage/sandbox/rules-methods.ts +21 -7
- package/src/storage/service.ts +93 -27
- package/README.md.orig +0 -53
|
@@ -3,10 +3,33 @@ import { targetOf } from './routing.js';
|
|
|
3
3
|
//
|
|
4
4
|
// Mirrors `pyric/firestore`'s `sandbox` namespace — explicit
|
|
5
5
|
// per-package sandbox lifecycle.
|
|
6
|
+
export const DEFAULT_DENY_RTDB_RULES = {
|
|
7
|
+
rules: {
|
|
8
|
+
'.read': false,
|
|
9
|
+
'.write': false,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export const DEFAULT_OPEN_RTDB_RULES = {
|
|
13
|
+
rules: {
|
|
14
|
+
'.read': true,
|
|
15
|
+
'.write': true,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
6
18
|
export const sandbox = {
|
|
19
|
+
DEFAULT_DENY_RULES: DEFAULT_DENY_RTDB_RULES,
|
|
20
|
+
DEFAULT_OPEN_RULES: DEFAULT_OPEN_RTDB_RULES,
|
|
21
|
+
/**
|
|
22
|
+
* Set the default access policy when no rules are loaded ('allow' or 'deny').
|
|
23
|
+
* In 'deny' mode (matching production Firebase), all client reads and writes
|
|
24
|
+
* without rules are rejected with PERMISSION_DENIED.
|
|
25
|
+
*/
|
|
26
|
+
setDefaultPolicy(db, policy) {
|
|
27
|
+
const target = targetOf(db);
|
|
28
|
+
target.backend.setDefaultPolicy(policy);
|
|
29
|
+
},
|
|
7
30
|
/**
|
|
8
31
|
* Replace deployed rules. Pass `null` to clear (sandbox returns to
|
|
9
|
-
* default
|
|
32
|
+
* default policy). Rules are evaluated through the existing
|
|
10
33
|
* RTDB rules simulator — the same engine used by the rules tooling.
|
|
11
34
|
*
|
|
12
35
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox-namespace.js","sourceRoot":"","sources":["../../src/database/sandbox-namespace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,uEAAuE;AACvE,EAAE;AACF,6DAA6D;AAC7D,iCAAiC;AAEjC,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB;;;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M,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAY,EAAE,SAAoD;QACzE,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,EAAY,EAAE,IAA6B;QACjD,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAiC,CAAC,CAAC;IAC5D,CAAC;IAED;uEACmE;IACnE,aAAa,CAAC,EAAY;QACxB,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared factory behind pyric's *deferred* Firebase Web SDK subpaths —
|
|
3
|
+
* `pyric/functions`, `pyric/analytics`, `pyric/app-check`,
|
|
4
|
+
* `pyric/firestore/lite`, `pyric/performance` and `pyric/remote-config`.
|
|
5
|
+
*
|
|
6
|
+
* WHY THESE EXIST AT ALL. pyric is a symbol-for-symbol drop-in for the
|
|
7
|
+
* Firebase Web SDK: an app swaps the `firebase` specifier for `pyric` and its
|
|
8
|
+
* module graph must keep loading. A subpath that is simply absent from the
|
|
9
|
+
* package `exports` map fails at RESOLVE time — Node raises
|
|
10
|
+
* `ERR_PACKAGE_PATH_NOT_EXPORTED`, bundlers raise their own variants — long
|
|
11
|
+
* before any pyric code runs. That error names neither pyric nor the reason,
|
|
12
|
+
* so a developer whose app merely *mentions* `firebase/functions` on a code
|
|
13
|
+
* path it never takes sees an unattributable build failure.
|
|
14
|
+
*
|
|
15
|
+
* THE CONTRACT. Resolution and linking succeed; *use* fails loudly.
|
|
16
|
+
* - The subpath resolves, so the module graph loads.
|
|
17
|
+
* - Every symbol the real Firebase entry exports is present as a value, so
|
|
18
|
+
* named-import linking (which is static in ESM — a missing name is a link
|
|
19
|
+
* error, not a runtime one) succeeds and bundlers can tree-shake.
|
|
20
|
+
* - Calling, constructing, or reading a member off one of those values
|
|
21
|
+
* throws {@link PyricDeferredApiError} with a message that names the
|
|
22
|
+
* subpath and points at the conformance matrix.
|
|
23
|
+
*
|
|
24
|
+
* An app that imports but never calls therefore runs unchanged. An app that
|
|
25
|
+
* genuinely depends on a deferred service gets one clear, attributed error at
|
|
26
|
+
* the exact call site instead of a cryptic resolver failure.
|
|
27
|
+
*
|
|
28
|
+
* NOT a mirror. These entries deliberately implement nothing. They are marked
|
|
29
|
+
* deferred in the conformance surface story and must never be counted as
|
|
30
|
+
* implemented surface.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The error thrown by every deferred Firebase entry. Carries the subpath and
|
|
34
|
+
* the symbol that was touched so tooling can group these without parsing the
|
|
35
|
+
* message.
|
|
36
|
+
*/
|
|
37
|
+
export declare class PyricDeferredApiError extends Error {
|
|
38
|
+
readonly name = "PyricDeferredApiError";
|
|
39
|
+
/** The Firebase subpath, without the `firebase/` prefix (e.g. `functions`). */
|
|
40
|
+
readonly subpath: string;
|
|
41
|
+
/** The exported symbol whose use triggered this error (e.g. `getFunctions`). */
|
|
42
|
+
readonly symbol: string;
|
|
43
|
+
constructor(subpath: string, symbol: string);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The static type of a deferred export.
|
|
47
|
+
*
|
|
48
|
+
* It is callable, constructible, and indexable so a deferred symbol can stand
|
|
49
|
+
* in for any of the three shapes a Firebase entry exports — a factory function
|
|
50
|
+
* (`getFunctions`), a class (`ReCaptchaV3Provider`), or an enum-like constant
|
|
51
|
+
* object (`HarmCategory`). Every result is `never`, which is assignable to
|
|
52
|
+
* anything, so a consumer's own annotations keep type-checking.
|
|
53
|
+
*/
|
|
54
|
+
export interface DeferredApi {
|
|
55
|
+
(...args: readonly unknown[]): never;
|
|
56
|
+
new (...args: readonly unknown[]): never;
|
|
57
|
+
readonly [member: string]: never;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The lazily-materialised export bag for one deferred subpath.
|
|
61
|
+
*
|
|
62
|
+
* Each entry module destructures the symbols it needs off this object:
|
|
63
|
+
*
|
|
64
|
+
* ```ts
|
|
65
|
+
* export const { getFunctions, httpsCallable } = deferredEntry('functions');
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* Destructuring is what makes the names real ESM exports (and what keeps the
|
|
69
|
+
* generated `.d.ts` honest); the proxy just mints a correctly-attributed stub
|
|
70
|
+
* for whichever name is read.
|
|
71
|
+
*
|
|
72
|
+
* @param subpath - The Firebase subpath, without the `firebase/` prefix.
|
|
73
|
+
*/
|
|
74
|
+
export declare function deferredEntry(subpath: string): Record<string, DeferredApi>;
|
|
75
|
+
//# sourceMappingURL=entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/deferred/entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAgBH;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,SAAkB,IAAI,2BAA2B;IAEjD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAK5C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,KAAK,CAAC;IACrC,KAAK,GAAG,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,KAAK,CAAC;IACzC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;CAClC;AAuDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAgB1E"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared factory behind pyric's *deferred* Firebase Web SDK subpaths —
|
|
3
|
+
* `pyric/functions`, `pyric/analytics`, `pyric/app-check`,
|
|
4
|
+
* `pyric/firestore/lite`, `pyric/performance` and `pyric/remote-config`.
|
|
5
|
+
*
|
|
6
|
+
* WHY THESE EXIST AT ALL. pyric is a symbol-for-symbol drop-in for the
|
|
7
|
+
* Firebase Web SDK: an app swaps the `firebase` specifier for `pyric` and its
|
|
8
|
+
* module graph must keep loading. A subpath that is simply absent from the
|
|
9
|
+
* package `exports` map fails at RESOLVE time — Node raises
|
|
10
|
+
* `ERR_PACKAGE_PATH_NOT_EXPORTED`, bundlers raise their own variants — long
|
|
11
|
+
* before any pyric code runs. That error names neither pyric nor the reason,
|
|
12
|
+
* so a developer whose app merely *mentions* `firebase/functions` on a code
|
|
13
|
+
* path it never takes sees an unattributable build failure.
|
|
14
|
+
*
|
|
15
|
+
* THE CONTRACT. Resolution and linking succeed; *use* fails loudly.
|
|
16
|
+
* - The subpath resolves, so the module graph loads.
|
|
17
|
+
* - Every symbol the real Firebase entry exports is present as a value, so
|
|
18
|
+
* named-import linking (which is static in ESM — a missing name is a link
|
|
19
|
+
* error, not a runtime one) succeeds and bundlers can tree-shake.
|
|
20
|
+
* - Calling, constructing, or reading a member off one of those values
|
|
21
|
+
* throws {@link PyricDeferredApiError} with a message that names the
|
|
22
|
+
* subpath and points at the conformance matrix.
|
|
23
|
+
*
|
|
24
|
+
* An app that imports but never calls therefore runs unchanged. An app that
|
|
25
|
+
* genuinely depends on a deferred service gets one clear, attributed error at
|
|
26
|
+
* the exact call site instead of a cryptic resolver failure.
|
|
27
|
+
*
|
|
28
|
+
* NOT a mirror. These entries deliberately implement nothing. They are marked
|
|
29
|
+
* deferred in the conformance surface story and must never be counted as
|
|
30
|
+
* implemented surface.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Compose the single user-facing message every deferred entry raises.
|
|
34
|
+
*
|
|
35
|
+
* @param subpath - The Firebase subpath *without* the `firebase/` prefix, e.g.
|
|
36
|
+
* `functions` or `firestore/lite`.
|
|
37
|
+
*/
|
|
38
|
+
function deferredApiMessage(subpath) {
|
|
39
|
+
return (`pyric: 'firebase/${subpath}' is not yet mirrored by the local sandbox. ` +
|
|
40
|
+
'This API is deferred — see the conformance matrix. Imports resolve so ' +
|
|
41
|
+
'module graphs load; calls fail with this message.');
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The error thrown by every deferred Firebase entry. Carries the subpath and
|
|
45
|
+
* the symbol that was touched so tooling can group these without parsing the
|
|
46
|
+
* message.
|
|
47
|
+
*/
|
|
48
|
+
export class PyricDeferredApiError extends Error {
|
|
49
|
+
name = 'PyricDeferredApiError';
|
|
50
|
+
/** The Firebase subpath, without the `firebase/` prefix (e.g. `functions`). */
|
|
51
|
+
subpath;
|
|
52
|
+
/** The exported symbol whose use triggered this error (e.g. `getFunctions`). */
|
|
53
|
+
symbol;
|
|
54
|
+
constructor(subpath, symbol) {
|
|
55
|
+
super(deferredApiMessage(subpath));
|
|
56
|
+
this.subpath = subpath;
|
|
57
|
+
this.symbol = symbol;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Property reads that must NOT throw.
|
|
62
|
+
*
|
|
63
|
+
* Bundlers, test runners, `console.log`, promise adoption and React all probe
|
|
64
|
+
* values with these keys as part of ordinary machinery, never as an intent to
|
|
65
|
+
* use the API. Throwing on `then` in particular would turn `await`-ing
|
|
66
|
+
* anything holding a deferred value into this error at the wrong site, and
|
|
67
|
+
* throwing on `$$typeof` would break React's element check. They read as
|
|
68
|
+
* `undefined`, exactly as they would on a real function.
|
|
69
|
+
*/
|
|
70
|
+
const INERT_PROPERTIES = new Set([
|
|
71
|
+
'$$typeof',
|
|
72
|
+
'__esModule',
|
|
73
|
+
'constructor',
|
|
74
|
+
'displayName',
|
|
75
|
+
'inspect',
|
|
76
|
+
'length',
|
|
77
|
+
'name',
|
|
78
|
+
'nodeType',
|
|
79
|
+
'prototype',
|
|
80
|
+
'then',
|
|
81
|
+
'toJSON',
|
|
82
|
+
'toString',
|
|
83
|
+
'valueOf',
|
|
84
|
+
]);
|
|
85
|
+
/**
|
|
86
|
+
* Build one deferred export: a function that throws when called or
|
|
87
|
+
* constructed, wrapped in a proxy so member reads (the enum-constant shape)
|
|
88
|
+
* throw the same error.
|
|
89
|
+
*/
|
|
90
|
+
function deferredSymbol(subpath, symbol) {
|
|
91
|
+
const throwing = function deferred() {
|
|
92
|
+
throw new PyricDeferredApiError(subpath, symbol);
|
|
93
|
+
};
|
|
94
|
+
Object.defineProperty(throwing, 'name', { value: symbol, configurable: true });
|
|
95
|
+
return new Proxy(throwing, {
|
|
96
|
+
get(target, property, receiver) {
|
|
97
|
+
// Symbol-keyed reads are always machinery (Symbol.toPrimitive,
|
|
98
|
+
// Symbol.hasInstance, Symbol.toStringTag, the inspect hook, …) — never a
|
|
99
|
+
// user reaching for an API member.
|
|
100
|
+
if (typeof property === 'symbol' || INERT_PROPERTIES.has(property)) {
|
|
101
|
+
return Reflect.get(target, property, receiver);
|
|
102
|
+
}
|
|
103
|
+
throw new PyricDeferredApiError(subpath, `${symbol}.${property}`);
|
|
104
|
+
},
|
|
105
|
+
construct() {
|
|
106
|
+
throw new PyricDeferredApiError(subpath, symbol);
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The lazily-materialised export bag for one deferred subpath.
|
|
112
|
+
*
|
|
113
|
+
* Each entry module destructures the symbols it needs off this object:
|
|
114
|
+
*
|
|
115
|
+
* ```ts
|
|
116
|
+
* export const { getFunctions, httpsCallable } = deferredEntry('functions');
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* Destructuring is what makes the names real ESM exports (and what keeps the
|
|
120
|
+
* generated `.d.ts` honest); the proxy just mints a correctly-attributed stub
|
|
121
|
+
* for whichever name is read.
|
|
122
|
+
*
|
|
123
|
+
* @param subpath - The Firebase subpath, without the `firebase/` prefix.
|
|
124
|
+
*/
|
|
125
|
+
export function deferredEntry(subpath) {
|
|
126
|
+
const minted = new Map();
|
|
127
|
+
return new Proxy(Object.create(null), {
|
|
128
|
+
get(_target, property) {
|
|
129
|
+
if (typeof property === 'symbol')
|
|
130
|
+
return undefined;
|
|
131
|
+
let api = minted.get(property);
|
|
132
|
+
if (!api) {
|
|
133
|
+
api = deferredSymbol(subpath, property);
|
|
134
|
+
minted.set(property, api);
|
|
135
|
+
}
|
|
136
|
+
return api;
|
|
137
|
+
},
|
|
138
|
+
has() {
|
|
139
|
+
return true;
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/deferred/entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,OAAe;IACzC,OAAO,CACL,oBAAoB,OAAO,8CAA8C;QACzE,wEAAwE;QACxE,mDAAmD,CACpD,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC5B,IAAI,GAAG,uBAAuB,CAAC;IAEjD,+EAA+E;IACtE,OAAO,CAAS;IAEzB,gFAAgF;IACvE,MAAM,CAAS;IAExB,YAAY,OAAe,EAAE,MAAc;QACzC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;Q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,CAAC;IAC9C,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAgC,EAAE;QACnE,GAAG,CAAC,OAAO,EAAE,QAAQ;YACnB,IAAI,OAAO,QAAQ,KAAK,QAAQ;gBAAE,OAAO,SAAmC,CAAC;YAC7E,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,GAAG,GAAG,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBACxC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;YAC5B,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC;QACD,GAAG;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -58,7 +58,7 @@ export function getFirestore(target) {
|
|
|
58
58
|
};
|
|
59
59
|
return { [TARGET_SYMBOL]: t };
|
|
60
60
|
}
|
|
61
|
-
throw new TypeError('pyric/firestore is a sandbox-only mirror. Package resolution must leave firebase/firestore unchanged for production; activate pyric
|
|
61
|
+
throw new TypeError('pyric/firestore is a sandbox-only mirror. Package resolution must leave firebase/firestore unchanged for production; activate pyric sandbox or @pyric/cli/register before importing to select the sandbox.');
|
|
62
62
|
}
|
|
63
63
|
function createFirestoreTargetLifecycle() {
|
|
64
64
|
let terminated = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.js","sourceRoot":"","sources":["../../src/firestore/instances.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,IAAI,qBAAqB,EACrC,iBAAiB,IAAI,0BAA0B,GAEhD,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,c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O,CACL,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU;WAC7B,OAAO,CAAC,CAAC,oBAAoB,KAAK,UAAU;WAC5C,aAAa,IAAI,CAAC;WAClB,OAAO,IAAI,CAAC,CAChB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,SAAS,CAChB,OAAgB,EAChB,cAA+B,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW;IAExD,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,GAAG,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;YAChE,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACvB,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;SAClC,CAAC,CAAC;QACH,OAAO,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAED,4EAA4E;AAE5E;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,EAAa,EACb,IAAY,EACZ,IAAY,EACZ,OAOC;IAED,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,KAAK,IAAI,CAAC;IACV,KAAK,IAAI,CAAC;IACV,KAAK,OAAO,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric/firestore/lite` — a DEFERRED mirror of `firebase/firestore/lite`.
|
|
3
|
+
*
|
|
4
|
+
* The Lite SDK is a separate build of Firestore with no local cache, no
|
|
5
|
+
* listeners and no offline queue. pyric mirrors the full `firebase/firestore`
|
|
6
|
+
* surface against the in-process sandbox; the Lite build needs its own
|
|
7
|
+
* cache-free instance identity, so it is deferred rather than aliased — an
|
|
8
|
+
* alias would silently give Lite consumers listener-backed semantics the real
|
|
9
|
+
* Lite SDK does not have.
|
|
10
|
+
*
|
|
11
|
+
* Every symbol below resolves and links so an app that swaps `firebase` for
|
|
12
|
+
* `pyric` still loads; touching one throws `PyricDeferredApiError` naming this
|
|
13
|
+
* subpath. See `../deferred/entry.ts` for the full rationale.
|
|
14
|
+
*
|
|
15
|
+
* The value list is the exact public runtime surface of `firebase/firestore/lite`
|
|
16
|
+
* (Firebase Web SDK 12.13.0). Keep it in sync when this entry graduates to a
|
|
17
|
+
* real mirror.
|
|
18
|
+
*/
|
|
19
|
+
import { type DeferredApi } from '../deferred/entry.js';
|
|
20
|
+
export { PyricDeferredApiError } from '../deferred/entry.js';
|
|
21
|
+
export declare const AggregateField: DeferredApi, AggregateQuerySnapshot: DeferredApi, Bytes: DeferredApi, CollectionReference: DeferredApi, DocumentReference: DeferredApi, DocumentSnapshot: DeferredApi, FieldPath: DeferredApi, FieldValue: DeferredApi, Firestore: DeferredApi, FirestoreError: DeferredApi, GeoPoint: DeferredApi, Query: DeferredApi, QueryCompositeFilterConstraint: DeferredApi, QueryConstraint: DeferredApi, QueryDocumentSnapshot: DeferredApi, QueryEndAtConstraint: DeferredApi, QueryFieldFilterConstraint: DeferredApi, QueryLimitConstraint: DeferredApi, QueryOrderByConstraint: DeferredApi, QuerySnapshot: DeferredApi, QueryStartAtConstraint: DeferredApi, Timestamp: DeferredApi, Transaction: DeferredApi, VectorValue: DeferredApi, WriteBatch: DeferredApi, addDoc: DeferredApi, aggregateFieldEqual: DeferredApi, aggregateQuerySnapshotEqual: DeferredApi, and: DeferredApi, arrayRemove: DeferredApi, arrayUnion: DeferredApi, average: DeferredApi, collection: DeferredApi, collectionGroup: DeferredApi, connectFirestoreEmulator: DeferredApi, count: DeferredApi, deleteDoc: DeferredApi, deleteField: DeferredApi, doc: DeferredApi, documentId: DeferredApi, endAt: DeferredApi, endBefore: DeferredApi, getAggregate: DeferredApi, getCount: DeferredApi, getDoc: DeferredApi, getDocs: DeferredApi, getFirestore: DeferredApi, increment: DeferredApi, initializeFirestore: DeferredApi, limit: DeferredApi, limitToLast: DeferredApi, or: DeferredApi, orderBy: DeferredApi, query: DeferredApi, queryEqual: DeferredApi, refEqual: DeferredApi, runTransaction: DeferredApi, serverTimestamp: DeferredApi, setDoc: DeferredApi, setLogLevel: DeferredApi, snapshotEqual: DeferredApi, startAfter: DeferredApi, startAt: DeferredApi, sum: DeferredApi, terminate: DeferredApi, updateDoc: DeferredApi, vector: DeferredApi, where: DeferredApi, writeBatch: DeferredApi;
|
|
22
|
+
export type AddPrefixToKeys = DeferredApi;
|
|
23
|
+
export type AggregateField = DeferredApi;
|
|
24
|
+
export type AggregateFieldType = DeferredApi;
|
|
25
|
+
export type AggregateQuerySnapshot = DeferredApi;
|
|
26
|
+
export type AggregateSpec = DeferredApi;
|
|
27
|
+
export type AggregateSpecData = DeferredApi;
|
|
28
|
+
export type AggregateType = DeferredApi;
|
|
29
|
+
export type Bytes = DeferredApi;
|
|
30
|
+
export type ChildUpdateFields = DeferredApi;
|
|
31
|
+
export type CollectionReference = DeferredApi;
|
|
32
|
+
export type DocumentData = DeferredApi;
|
|
33
|
+
export type DocumentReference = DeferredApi;
|
|
34
|
+
export type DocumentSnapshot = DeferredApi;
|
|
35
|
+
export type EmulatorMockTokenOptions = DeferredApi;
|
|
36
|
+
export type FieldPath = DeferredApi;
|
|
37
|
+
export type FieldValue = DeferredApi;
|
|
38
|
+
export type Firestore = DeferredApi;
|
|
39
|
+
export type FirestoreDataConverter = DeferredApi;
|
|
40
|
+
export type FirestoreError = DeferredApi;
|
|
41
|
+
export type FirestoreErrorCode = DeferredApi;
|
|
42
|
+
export type GeoPoint = DeferredApi;
|
|
43
|
+
export type LogLevel = DeferredApi;
|
|
44
|
+
export type NestedUpdateFields = DeferredApi;
|
|
45
|
+
export type OrderByDirection = DeferredApi;
|
|
46
|
+
export type PartialWithFieldValue = DeferredApi;
|
|
47
|
+
export type Primitive = DeferredApi;
|
|
48
|
+
export type Query = DeferredApi;
|
|
49
|
+
export type QueryCompositeFilterConstraint = DeferredApi;
|
|
50
|
+
export type QueryConstraint = DeferredApi;
|
|
51
|
+
export type QueryConstraintType = DeferredApi;
|
|
52
|
+
export type QueryDocumentSnapshot = DeferredApi;
|
|
53
|
+
export type QueryEndAtConstraint = DeferredApi;
|
|
54
|
+
export type QueryFieldFilterConstraint = DeferredApi;
|
|
55
|
+
export type QueryFilterConstraint = DeferredApi;
|
|
56
|
+
export type QueryLimitConstraint = DeferredApi;
|
|
57
|
+
export type QueryNonFilterConstraint = DeferredApi;
|
|
58
|
+
export type QueryOrderByConstraint = DeferredApi;
|
|
59
|
+
export type QuerySnapshot = DeferredApi;
|
|
60
|
+
export type QueryStartAtConstraint = DeferredApi;
|
|
61
|
+
export type SetOptions = DeferredApi;
|
|
62
|
+
export type Settings = DeferredApi;
|
|
63
|
+
export type Timestamp = DeferredApi;
|
|
64
|
+
export type Transaction = DeferredApi;
|
|
65
|
+
export type TransactionOptions = DeferredApi;
|
|
66
|
+
export type UnionToIntersection = DeferredApi;
|
|
67
|
+
export type UpdateData = DeferredApi;
|
|
68
|
+
export type VectorValue = DeferredApi;
|
|
69
|
+
export type WhereFilterOp = DeferredApi;
|
|
70
|
+
export type WithFieldValue = DeferredApi;
|
|
71
|
+
export type WriteBatch = DeferredApi;
|
|
72
|
+
//# sourceMappingURL=lite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lite.d.ts","sourceRoot":"","sources":["../../src/firestore/lite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,eAAO,MACL,cAAc,eAAE,sBAAsB,eAAE,KAAK,eAAE,mBAAmB,eAAE,iBAAiB,eACrF,gBAAgB,eAAE,SAAS,eAAE,UAAU,eAAE,SAAS,eAAE,cAAc,eAAE,QAAQ,eAAE,KAAK,eACnF,8BAA8B,eAAE,eAAe,eAAE,qBAAqB,eAAE,oBAAoB,eAC5F,0BAA0B,eAAE,oBAAoB,eAA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AAS,GAAG,WAAW,CAAC;AACpC,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AACtC,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAC7C,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAC9C,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AACtC,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC;AACxC,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric/firestore/lite` — a DEFERRED mirror of `firebase/firestore/lite`.
|
|
3
|
+
*
|
|
4
|
+
* The Lite SDK is a separate build of Firestore with no local cache, no
|
|
5
|
+
* listeners and no offline queue. pyric mirrors the full `firebase/firestore`
|
|
6
|
+
* surface against the in-process sandbox; the Lite build needs its own
|
|
7
|
+
* cache-free instance identity, so it is deferred rather than aliased — an
|
|
8
|
+
* alias would silently give Lite consumers listener-backed semantics the real
|
|
9
|
+
* Lite SDK does not have.
|
|
10
|
+
*
|
|
11
|
+
* Every symbol below resolves and links so an app that swaps `firebase` for
|
|
12
|
+
* `pyric` still loads; touching one throws `PyricDeferredApiError` naming this
|
|
13
|
+
* subpath. See `../deferred/entry.ts` for the full rationale.
|
|
14
|
+
*
|
|
15
|
+
* The value list is the exact public runtime surface of `firebase/firestore/lite`
|
|
16
|
+
* (Firebase Web SDK 12.13.0). Keep it in sync when this entry graduates to a
|
|
17
|
+
* real mirror.
|
|
18
|
+
*/
|
|
19
|
+
import { deferredEntry } from '../deferred/entry.js';
|
|
20
|
+
export { PyricDeferredApiError } from '../deferred/entry.js';
|
|
21
|
+
export const { AggregateField, AggregateQuerySnapshot, Bytes, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, Timestamp, Transaction, VectorValue, WriteBatch, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, collection, collectionGroup, connectFirestoreEmulator, count, deleteDoc, deleteField, doc, documentId, endAt, endBefore, getAggregate, getCount, getDoc, getDocs, getFirestore, increment, initializeFirestore, limit, limitToLast, or, orderBy, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, vector, where, writeBatch, } = deferredEntry('firestore/lite');
|
|
22
|
+
//# sourceMappingURL=lite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lite.js","sourceRoot":"","sources":["../../src/firestore/lite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,aAAa,EAAoB,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,CAAC,MAAM,EACX,cAAc,EAAE,sBAAsB,EAAE,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EACrF,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EACnF,8BAA8B,EAAE,eAAe,EAAE,qBAAqB,EAAE,oBAAoB,EAC5F,0BAA0B,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,aAAa,EACvF,sBAAsB,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAC/E,mBAAmB,EAAE,2BAA2B,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EACvF,UAAU,EAAE,eAAe,EAAE,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EACzF,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EACnF,SAAS,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAC5F,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EACxF,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GACrD,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -90,7 +90,7 @@ declare const TAB_MANAGER_SYMBOL: unique symbol;
|
|
|
90
90
|
* {@link memoryEagerGarbageCollector} / {@link memoryLruGarbageCollector}. */
|
|
91
91
|
declare const GC_SYMBOL: unique symbol;
|
|
92
92
|
/** Opaque tab-manager config token. Inert — persistence is always on,
|
|
93
|
-
* and the SharedWorker/`pyric
|
|
93
|
+
* and the SharedWorker/`pyric sandbox` path already is the one shared
|
|
94
94
|
* store every tab talks to, so there is no separate multi-tab mode
|
|
95
95
|
* to opt into. Carries the requested kind only for debugging. */
|
|
96
96
|
export interface PersistentTabManager {
|
|
@@ -235,7 +235,7 @@ export type LogLevel = 'debug' | 'verbose' | 'info' | 'warn' | 'error' | 'silent
|
|
|
235
235
|
/**
|
|
236
236
|
* Accepted no-op: the sandbox has no modular-SDK-style logger to wire
|
|
237
237
|
* a level into (it uses host-level `console` logging directly, gated
|
|
238
|
-
* by `pyric
|
|
238
|
+
* by `pyric sandbox`'s own flags, not this call). Exists purely so app
|
|
239
239
|
* code that calls this defensively at startup doesn't crash on a
|
|
240
240
|
* missing export.
|
|
241
241
|
*/
|
|
@@ -263,7 +263,7 @@ export function getDocsFromCache(query) {
|
|
|
263
263
|
/**
|
|
264
264
|
* Accepted no-op: the sandbox has no modular-SDK-style logger to wire
|
|
265
265
|
* a level into (it uses host-level `console` logging directly, gated
|
|
266
|
-
* by `pyric
|
|
266
|
+
* by `pyric sandbox`'s own flags, not this call). Exists purely so app
|
|
267
267
|
* code that calls this defensively at startup doesn't crash on a
|
|
268
268
|
* missing export.
|
|
269
269
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox-controls.d.ts","sourceRoot":"","sources":["../../src/firestore/sandbox-controls.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,eAAe,CAAC;AAIjE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE3D,MAAM,WAAW,uBAAuB;IACtC,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE;YACJ,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,EAAE,KAAK,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;SACtE,CAAC;KACH,CAAC;IACF,SAAS,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACtC,CAAC;IACF,MAAM,EAAE;QACN,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,KAAK,CAAC;YACnB,IAAI,EAAE,MAAM,CAAC;YACb,MAAM,EAAE,MAAM,CAAC;YACf,IAAI,EAAE,OAAO,CAAC;Y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AAE,MAAM,CAAC;YACb,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,IAAI,EAAE,OAAO,CAAC;SACf,CAAC,CAAC;KACJ,CAAC;CACH;AAED,2EAA2E;AAC3E,wBAAgB,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAE1E;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAC3B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GACtC,UAAU,CAGZ;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,YAAY,GACpB,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAE9B;AAED,8EAA8E;AAC9E,wBAAgB,OAAO,CACrB,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CAgJxB"}
|
|
@@ -133,11 +133,19 @@ export function inspect(sandbox, options = {}) {
|
|
|
133
133
|
if (typeof event.debugMessage === 'string') {
|
|
134
134
|
debugMessageVal = event.debugMessage;
|
|
135
135
|
}
|
|
136
|
+
const ruleVal = event.evaluatedRule ?? event.rule ?? undefined;
|
|
137
|
+
const reasonsVal = Array.isArray(event.debugMessages)
|
|
138
|
+
? event.debugMessages
|
|
139
|
+
: typeof event.debugMessage === 'string'
|
|
140
|
+
? [event.debugMessage]
|
|
141
|
+
: undefined;
|
|
136
142
|
return {
|
|
137
143
|
path: pathVal,
|
|
138
144
|
method: methodVal,
|
|
139
145
|
auth: authVal,
|
|
140
146
|
debugMessage: debugMessageVal,
|
|
147
|
+
rule: ruleVal,
|
|
148
|
+
reasons: reasonsVal,
|
|
141
149
|
};
|
|
142
150
|
});
|
|
143
151
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox-controls.js","sourceRoot":"","sources":["../../src/firestore/sandbox-controls.ts"],"names":[],"mappings":"A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OAAO;YACb,OAAO,EAAE,UAAU;SACpB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE;YACL,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,UAAU;YAC3D,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YACxC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE;SAC9B;QACD,SAAS,EAAE;YACT,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM;YACzC,YAAY;SACb;QACD,MAAM,EAAE;YACN,UAAU,EAAE,OAAO,CAAC,MAAM;YAC1B,aAAa;YACb,cAAc;SACf;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric/functions` — a DEFERRED mirror of `firebase/functions`.
|
|
3
|
+
*
|
|
4
|
+
* Callable Cloud Functions dispatch to deployed server code. Mirroring this
|
|
5
|
+
* means running the user’s functions, which is the emulator’s job, not the
|
|
6
|
+
* in-process sandbox’s — deferred pending a decision on the function-host
|
|
7
|
+
* seam.
|
|
8
|
+
*
|
|
9
|
+
* Every symbol below resolves and links so an app that swaps `firebase` for
|
|
10
|
+
* `pyric` still loads; touching one throws `PyricDeferredApiError` naming this
|
|
11
|
+
* subpath. See `../deferred/entry.ts` for the full rationale.
|
|
12
|
+
*
|
|
13
|
+
* The value list is the exact public runtime surface of `firebase/functions`
|
|
14
|
+
* (Firebase Web SDK 12.13.0). Keep it in sync when this entry graduates to a
|
|
15
|
+
* real mirror.
|
|
16
|
+
*/
|
|
17
|
+
import { type DeferredApi } from '../deferred/entry.js';
|
|
18
|
+
export { PyricDeferredApiError } from '../deferred/entry.js';
|
|
19
|
+
export declare const FunctionsError: DeferredApi, connectFunctionsEmulator: DeferredApi, getFunctions: DeferredApi, httpsCallable: DeferredApi, httpsCallableFromURL: DeferredApi;
|
|
20
|
+
export type Functions = DeferredApi;
|
|
21
|
+
export type FunctionsError = DeferredApi;
|
|
22
|
+
export type FunctionsErrorCode = DeferredApi;
|
|
23
|
+
export type FunctionsErrorCodeCore = DeferredApi;
|
|
24
|
+
export type HttpsCallable = DeferredApi;
|
|
25
|
+
export type HttpsCallableOptions = DeferredApi;
|
|
26
|
+
export type HttpsCallableResult = DeferredApi;
|
|
27
|
+
export type HttpsCallableStreamOptions = DeferredApi;
|
|
28
|
+
export type HttpsCallableStreamResult = DeferredApi;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,eAAO,MACL,cAAc,eAAE,wBAAwB,eAAE,YAAY,eAAE,aAAa,eAAE,oBAAoB,aAC/D,CAAC;AAO/B,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AACpC,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;AACzC,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAC7C,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC;AACxC,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAC/C,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAC9C,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC;AACrD,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pyric/functions` — a DEFERRED mirror of `firebase/functions`.
|
|
3
|
+
*
|
|
4
|
+
* Callable Cloud Functions dispatch to deployed server code. Mirroring this
|
|
5
|
+
* means running the user’s functions, which is the emulator’s job, not the
|
|
6
|
+
* in-process sandbox’s — deferred pending a decision on the function-host
|
|
7
|
+
* seam.
|
|
8
|
+
*
|
|
9
|
+
* Every symbol below resolves and links so an app that swaps `firebase` for
|
|
10
|
+
* `pyric` still loads; touching one throws `PyricDeferredApiError` naming this
|
|
11
|
+
* subpath. See `../deferred/entry.ts` for the full rationale.
|
|
12
|
+
*
|
|
13
|
+
* The value list is the exact public runtime surface of `firebase/functions`
|
|
14
|
+
* (Firebase Web SDK 12.13.0). Keep it in sync when this entry graduates to a
|
|
15
|
+
* real mirror.
|
|
16
|
+
*/
|
|
17
|
+
import { deferredEntry } from '../deferred/entry.js';
|
|
18
|
+
export { PyricDeferredApiError } from '../deferred/entry.js';
|
|
19
|
+
export const { FunctionsError, connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } = deferredEntry('functions');
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,aAAa,EAAoB,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,CAAC,MAAM,EACX,cAAc,EAAE,wBAAwB,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,GAC5F,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* upstream counterpart and is additive to the mirrored surface.
|
|
15
15
|
*/
|
|
16
16
|
import type { FirebaseApp } from '../app/types.js';
|
|
17
|
+
import type { Sandbox, SandboxContext } from '../sandbox/index.js';
|
|
17
18
|
import { type DeliverSpec, type Messaging, type SimulatedServiceWorkerRegistration } from './instance.js';
|
|
18
19
|
import type { DeliveryResult } from './broker/index.js';
|
|
19
20
|
export type { Messaging };
|
|
@@ -69,7 +70,7 @@ export interface GetTokenOptions {
|
|
|
69
70
|
* Return the FCM `Messaging` instance for the given (or default) app —
|
|
70
71
|
* window-client plane (upstream component name `messaging`).
|
|
71
72
|
*/
|
|
72
|
-
export declare function getMessaging(
|
|
73
|
+
export declare function getMessaging(target?: FirebaseApp | Sandbox | SandboxContext): Messaging;
|
|
73
74
|
/**
|
|
74
75
|
* Subscribe the instance to push and resolve its registration token.
|
|
75
76
|
* Sandbox semantics per the captured contract: the minted token matches the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/messaging/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kCAAkC,EACxC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAoB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE1E,YAAY,EAAE,SAAS,EAAE,CAAC;AAI1B,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,0DAA0D;AAC1D,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACjC,UAA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G;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,GAChE,WAAW,CAMb;AAED,+EAA+E;AAC/E,wBAAsB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAEpD;AAID,eAAO,MAAM,OAAO;IAClB;;;;;OAKG;uBACgB,SAAS,QAAQ,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;IAGzE,gEAAgE;oBAChD,kCAAkC;CAGnD,CAAC;AAEF,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,kCAAkC,EAAE,CAAC"}
|
package/dist/messaging/client.js
CHANGED
|
@@ -4,8 +4,8 @@ import { defaultRegistration, deliverToMessaging, registrationIdOf, resolveMessa
|
|
|
4
4
|
* Return the FCM `Messaging` instance for the given (or default) app —
|
|
5
5
|
* window-client plane (upstream component name `messaging`).
|
|
6
6
|
*/
|
|
7
|
-
export function getMessaging(
|
|
8
|
-
return resolveMessaging('window',
|
|
7
|
+
export function getMessaging(target) {
|
|
8
|
+
return resolveMessaging('window', target);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Subscribe the instance to push and resolve its registration token.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/messaging/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/messaging/client.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,OAAO,GAIR,MAAM,eAAe,CAAC;AA0DvB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,MAA+C;IAC1E,OAAO,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,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