@cross-deck/web 1.4.2 → 1.5.0
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/dist/contracts.json +378 -0
- package/dist/crossdeck.umd.min.js +2 -2
- package/dist/crossdeck.umd.min.js.map +1 -1
- package/dist/error-codes.json +1 -1
- package/dist/index.cjs +457 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +174 -1
- package/dist/index.d.ts +174 -1
- package/dist/index.mjs +456 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +31 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +31 -0
- package/dist/react.mjs.map +1 -1
- package/dist/vue.cjs +31 -0
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.mjs +31 -0
- package/dist/vue.mjs.map +1 -1
- package/package.json +3 -2
package/dist/react.mjs
CHANGED
|
@@ -3676,6 +3676,37 @@ var CrossdeckClient = class {
|
|
|
3676
3676
|
* trip happens in the background. To flush before the page unloads,
|
|
3677
3677
|
* call flush().
|
|
3678
3678
|
*/
|
|
3679
|
+
/**
|
|
3680
|
+
* Emit `crossdeck.contract_failed` with the canonical property
|
|
3681
|
+
* shape (`contract_id`, `sdk_version`, `sdk_platform`,
|
|
3682
|
+
* `failure_reason`, `run_context`, `run_id`). Goes through the
|
|
3683
|
+
* standard track() pipeline — same consent gate, same queue,
|
|
3684
|
+
* same ingest, no new endpoint.
|
|
3685
|
+
*
|
|
3686
|
+
* Wire the call from a test hook, dogfood failure path, or
|
|
3687
|
+
* customer contract-verification harness; see
|
|
3688
|
+
* `contracts/README.md` for the per-test-framework hook recipes.
|
|
3689
|
+
*/
|
|
3690
|
+
reportContractFailure(input) {
|
|
3691
|
+
const props = {
|
|
3692
|
+
contract_id: input.contractId,
|
|
3693
|
+
sdk_version: SDK_VERSION,
|
|
3694
|
+
sdk_platform: "web",
|
|
3695
|
+
failure_reason: input.failureReason,
|
|
3696
|
+
run_context: input.runContext,
|
|
3697
|
+
run_id: input.runId
|
|
3698
|
+
};
|
|
3699
|
+
if (input.testRef) {
|
|
3700
|
+
props.test_file = input.testRef.file;
|
|
3701
|
+
props.test_name = input.testRef.name;
|
|
3702
|
+
}
|
|
3703
|
+
if (input.extra) {
|
|
3704
|
+
for (const [k, v] of Object.entries(input.extra)) {
|
|
3705
|
+
if (props[k] === void 0) props[k] = v;
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
this.track("crossdeck.contract_failed", props);
|
|
3709
|
+
}
|
|
3679
3710
|
track(name, properties) {
|
|
3680
3711
|
const s = this.requireStarted();
|
|
3681
3712
|
if (!name) {
|