@cloudcare/cocos-sdk 0.1.1-alpha.2 → 0.1.1-alpha.3
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/creator2/core/auto-tracking.d.ts +3 -1
- package/dist/creator2/core/auto-tracking.d.ts.map +1 -1
- package/dist/creator2/core/auto-tracking.js +60 -7
- package/dist/creator2/core/auto-tracking.js.map +1 -1
- package/dist/creator2/core/client.d.ts.map +1 -1
- package/dist/creator2/core/client.js +1 -3
- package/dist/creator2/core/client.js.map +1 -1
- package/dist/creator2/core/modules.d.ts.map +1 -1
- package/dist/creator2/core/modules.js +2 -2
- package/dist/creator2/core/modules.js.map +1 -1
- package/dist/creator2/core/observation.d.ts +25 -0
- package/dist/creator2/core/observation.d.ts.map +1 -0
- package/dist/creator2/core/observation.js +93 -0
- package/dist/creator2/core/observation.js.map +1 -0
- package/dist/creator2/core/platform-runtime.d.ts +2 -1
- package/dist/creator2/core/platform-runtime.d.ts.map +1 -1
- package/dist/creator2/core/platform-runtime.js.map +1 -1
- package/dist/creator2/core/types.d.ts +9 -0
- package/dist/creator2/core/types.d.ts.map +1 -1
- package/dist/creator2/core/types.js.map +1 -1
- package/dist/creator2/core/validation.d.ts +1 -0
- package/dist/creator2/core/validation.d.ts.map +1 -1
- package/dist/creator2/core/validation.js +13 -0
- package/dist/creator2/core/validation.js.map +1 -1
- package/dist/creator2/core/version.d.ts +1 -3
- package/dist/creator2/core/version.d.ts.map +1 -1
- package/dist/creator2/core/version.js +2 -4
- package/dist/creator2/core/version.js.map +1 -1
- package/dist/creator2/native/bootstrap.js +3 -2
- package/dist/creator2/native/bootstrap.js.map +1 -1
- package/dist/creator2/native/error-bootstrap.d.ts +2 -0
- package/dist/creator2/native/error-bootstrap.d.ts.map +1 -0
- package/dist/creator2/native/error-bootstrap.js +7 -0
- package/dist/creator2/native/error-bootstrap.js.map +1 -0
- package/dist/creator2/native/jsb-errors.d.ts +21 -0
- package/dist/creator2/native/jsb-errors.d.ts.map +1 -0
- package/dist/creator2/native/jsb-errors.js +91 -0
- package/dist/creator2/native/jsb-errors.js.map +1 -0
- package/dist/creator2/web/runtime.d.ts.map +1 -1
- package/dist/creator2/web/runtime.js +0 -1
- package/dist/creator2/web/runtime.js.map +1 -1
- package/dist/creator3/core/auto-tracking.d.ts +3 -1
- package/dist/creator3/core/auto-tracking.d.ts.map +1 -1
- package/dist/creator3/core/auto-tracking.js +60 -7
- package/dist/creator3/core/auto-tracking.js.map +1 -1
- package/dist/creator3/core/client.d.ts.map +1 -1
- package/dist/creator3/core/client.js +1 -3
- package/dist/creator3/core/client.js.map +1 -1
- package/dist/creator3/core/modules.d.ts.map +1 -1
- package/dist/creator3/core/modules.js +4 -9
- package/dist/creator3/core/modules.js.map +1 -1
- package/dist/creator3/core/observation.d.ts +25 -0
- package/dist/creator3/core/observation.d.ts.map +1 -0
- package/dist/creator3/core/observation.js +84 -0
- package/dist/creator3/core/observation.js.map +1 -0
- package/dist/creator3/core/platform-runtime.d.ts +2 -1
- package/dist/creator3/core/platform-runtime.d.ts.map +1 -1
- package/dist/creator3/core/platform-runtime.js.map +1 -1
- package/dist/creator3/core/types.d.ts +9 -0
- package/dist/creator3/core/types.d.ts.map +1 -1
- package/dist/creator3/core/validation.d.ts +1 -0
- package/dist/creator3/core/validation.d.ts.map +1 -1
- package/dist/creator3/core/validation.js +11 -0
- package/dist/creator3/core/validation.js.map +1 -1
- package/dist/creator3/core/version.d.ts +1 -3
- package/dist/creator3/core/version.d.ts.map +1 -1
- package/dist/creator3/core/version.js +1 -3
- package/dist/creator3/core/version.js.map +1 -1
- package/dist/creator3/creator3/index.js +2 -2
- package/dist/creator3/creator3/index.js.map +1 -1
- package/dist/creator3/native/bootstrap.js +2 -2
- package/dist/creator3/native/bootstrap.js.map +1 -1
- package/dist/creator3/native/error-bootstrap.d.ts +2 -0
- package/dist/creator3/native/error-bootstrap.d.ts.map +1 -0
- package/dist/creator3/native/error-bootstrap.js +5 -0
- package/dist/creator3/native/error-bootstrap.js.map +1 -0
- package/dist/creator3/native/jsb-errors.d.ts +21 -0
- package/dist/creator3/native/jsb-errors.d.ts.map +1 -0
- package/dist/creator3/native/jsb-errors.js +82 -0
- package/dist/creator3/native/jsb-errors.js.map +1 -0
- package/dist/creator3/web/runtime.d.ts.map +1 -1
- package/dist/creator3/web/runtime.js +1 -2
- package/dist/creator3/web/runtime.js.map +1 -1
- package/extensions/creator2/install-native.cjs +19 -1
- package/extensions/creator3/install-native.cjs +19 -1
- package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridge.java +7 -10
- package/native/ios/FTCocosBridge.m +6 -4
- package/native/ios/FTCocosBridge.podspec +1 -1
- package/native/jsb-errors.js +266 -0
- package/package.json +1 -1
- package/runtime/native.js +181 -21
- package/web/bootstrap.js +17 -6
- package/web/bootstrap.js.map +2 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FTObservationQueue = void 0;
|
|
4
|
+
exports.observationState = observationState;
|
|
5
|
+
function observationState(target) {
|
|
6
|
+
return target.__FT_COCOS_OBSERVATION_STATE__
|
|
7
|
+
|| (target.__FT_COCOS_OBSERVATION_STATE__ = { reporting: 0 });
|
|
8
|
+
}
|
|
9
|
+
/** A bounded, cancellable side channel. It never runs a task synchronously. */
|
|
10
|
+
var FTObservationQueue = /** @class */ (function () {
|
|
11
|
+
function FTObservationQueue(target) {
|
|
12
|
+
this.target = target;
|
|
13
|
+
this.pending = [];
|
|
14
|
+
this.size = 0;
|
|
15
|
+
this.generation = 0;
|
|
16
|
+
this.dropped = 0;
|
|
17
|
+
this.state = observationState(target);
|
|
18
|
+
}
|
|
19
|
+
FTObservationQueue.prototype.enqueue = function (run, size) {
|
|
20
|
+
var _this = this;
|
|
21
|
+
if (size === void 0) { size = 0; }
|
|
22
|
+
if (this.state.reporting)
|
|
23
|
+
return false;
|
|
24
|
+
if (this.pending.length >= 128 || this.size + size > 1024 * 1024) {
|
|
25
|
+
this.dropped++;
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
this.pending.push({ run: run, size: size });
|
|
29
|
+
this.size += size;
|
|
30
|
+
if (this.timer !== undefined)
|
|
31
|
+
return true;
|
|
32
|
+
var generation = this.generation;
|
|
33
|
+
try {
|
|
34
|
+
// Editor/module import may precede timer installation. Resolve only when
|
|
35
|
+
// an observation actually needs scheduling; absence never means sync work.
|
|
36
|
+
var schedule = this.target.setTimeout || (typeof setTimeout === 'function' ? setTimeout : undefined);
|
|
37
|
+
var cancel = this.target.clearTimeout || (typeof clearTimeout === 'function' ? clearTimeout : undefined);
|
|
38
|
+
if (!schedule) {
|
|
39
|
+
this.dropped += this.pending.length;
|
|
40
|
+
this.pending = [];
|
|
41
|
+
this.size = 0;
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
this.cancel = cancel === null || cancel === void 0 ? void 0 : cancel.bind(this.target);
|
|
45
|
+
this.timer = schedule.call(this.target, function () {
|
|
46
|
+
_this.timer = undefined;
|
|
47
|
+
if (generation !== _this.generation)
|
|
48
|
+
return;
|
|
49
|
+
var batch = _this.pending;
|
|
50
|
+
_this.pending = [];
|
|
51
|
+
_this.size = 0;
|
|
52
|
+
_this.state.reporting++;
|
|
53
|
+
try {
|
|
54
|
+
for (var _i = 0, batch_1 = batch; _i < batch_1.length; _i++) {
|
|
55
|
+
var task = batch_1[_i];
|
|
56
|
+
if (generation !== _this.generation)
|
|
57
|
+
break;
|
|
58
|
+
try {
|
|
59
|
+
task.run();
|
|
60
|
+
}
|
|
61
|
+
catch ( /* Never report observation failures through the observed channel. */_a) { /* Never report observation failures through the observed channel. */ }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
_this.state.reporting--;
|
|
66
|
+
}
|
|
67
|
+
}, 0);
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
catch (_a) {
|
|
71
|
+
this.dropped += this.pending.length;
|
|
72
|
+
this.pending = [];
|
|
73
|
+
this.size = 0;
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
FTObservationQueue.prototype.stop = function () {
|
|
78
|
+
var _a;
|
|
79
|
+
this.generation++;
|
|
80
|
+
this.pending = [];
|
|
81
|
+
this.size = 0;
|
|
82
|
+
if (this.timer !== undefined) {
|
|
83
|
+
try {
|
|
84
|
+
(_a = this.cancel) === null || _a === void 0 ? void 0 : _a.call(this, this.timer);
|
|
85
|
+
}
|
|
86
|
+
catch ( /* The generation check also invalidates the callback. */_b) { /* The generation check also invalidates the callback. */ }
|
|
87
|
+
this.timer = undefined;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return FTObservationQueue;
|
|
91
|
+
}());
|
|
92
|
+
exports.FTObservationQueue = FTObservationQueue;
|
|
93
|
+
//# sourceMappingURL=observation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.js","sourceRoot":"","sources":["../../../../../src/core/observation.ts"],"names":[],"mappings":";;;AAQA,4CAGC;AAHD,SAAgB,gBAAgB,CAAC,MAA2B;IAC1D,OAAO,MAAM,CAAC,8BAA8B;WACvC,CAAC,MAAM,CAAC,8BAA8B,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,+EAA+E;AAC/E;IASE,4BAA6B,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;QANhD,YAAO,GAA6C,EAAE,CAAC;QACvD,SAAI,GAAG,CAAC,CAAC;QAET,eAAU,GAAG,CAAC,CAAC;QACvB,YAAO,GAAG,CAAC,CAAC;QAGV,IAAI,CAAC,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,oCAAO,GAAP,UAAQ,GAAe,EAAE,IAAQ;QAAjC,iBA6CC;QA7CwB,qBAAA,EAAA,QAAQ;QAC/B,IAAI,IA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CAAC,MAAM,qDAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YAAC,CAAC;YAAC,QAAQ,yDAAyD,IAA3D,CAAC,CAAC,yDAAyD,CAAC,CAAC;YACtG,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACzB,CAAC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AArED,IAqEC;AArEY,gDAAkB","sourcesContent":["/** Shared across the early JSB bootstrap and the separately bundled SDK runtime. */\nexport interface FTObservationState { reporting: number; }\nexport interface FTObservationGlobal {\n __FT_COCOS_OBSERVATION_STATE__?: FTObservationState;\n setTimeout?: typeof setTimeout;\n clearTimeout?: typeof clearTimeout;\n}\n\nexport function observationState(target: FTObservationGlobal): FTObservationState {\n return target.__FT_COCOS_OBSERVATION_STATE__\n || (target.__FT_COCOS_OBSERVATION_STATE__ = { reporting: 0 });\n}\n\n/** A bounded, cancellable side channel. It never runs a task synchronously. */\nexport class FTObservationQueue {\n private readonly state: FTObservationState;\n private cancel: typeof clearTimeout | undefined;\n private pending: Array<{ run: () => void; size: number }> = [];\n private size = 0;\n private timer: ReturnType<typeof setTimeout> | undefined;\n private generation = 0;\n dropped = 0;\n\n constructor(private readonly target: FTObservationGlobal) {\n this.state = observationState(target);\n }\n\n enqueue(run: () => void, size = 0): boolean {\n if (this.state.reporting) return false;\n if (this.pending.length >= 128 || this.size + size > 1024 * 1024) {\n this.dropped++;\n return false;\n }\n this.pending.push({ run, size });\n this.size += size;\n if (this.timer !== undefined) return true;\n const generation = this.generation;\n try {\n // Editor/module import may precede timer installation. Resolve only when\n // an observation actually needs scheduling; absence never means sync work.\n const schedule = this.target.setTimeout || (typeof setTimeout === 'function' ? setTimeout : undefined);\n const cancel = this.target.clearTimeout || (typeof clearTimeout === 'function' ? clearTimeout : undefined);\n if (!schedule) {\n this.dropped += this.pending.length;\n this.pending = [];\n this.size = 0;\n return false;\n }\n this.cancel = cancel?.bind(this.target);\n this.timer = schedule.call(this.target, () => {\n this.timer = undefined;\n if (generation !== this.generation) return;\n const batch = this.pending;\n this.pending = [];\n this.size = 0;\n this.state.reporting++;\n try {\n for (const task of batch) {\n if (generation !== this.generation) break;\n try { task.run(); } catch { /* Never report observation failures through the observed channel. */ }\n }\n } finally {\n this.state.reporting--;\n }\n }, 0);\n return true;\n } catch {\n this.dropped += this.pending.length;\n this.pending = [];\n this.size = 0;\n return false;\n }\n }\n\n stop(): void {\n this.generation++;\n this.pending = [];\n this.size = 0;\n if (this.timer !== undefined) {\n try { this.cancel?.(this.timer); } catch { /* The generation check also invalidates the callback. */ }\n this.timer = undefined;\n }\n }\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import type { FTCocosConfig, FTCocosHybridConfig } from './types.js';
|
|
|
3
3
|
import type { FTNativeReplayConfig } from './platform-options.js';
|
|
4
4
|
import type { FTCocosSDK } from './client.js';
|
|
5
5
|
import type { FTCocosWebSDK } from '../web/client.js';
|
|
6
|
+
import type { FTJsbErrorGlobal } from '../native/jsb-errors.js';
|
|
6
7
|
export interface FTPlatformContext {
|
|
7
8
|
engine: 'creator2' | 'creator3';
|
|
8
9
|
platform: 'android' | 'ios' | 'unsupported' | 'web';
|
|
@@ -33,7 +34,7 @@ export interface FTNativeReplayFacade {
|
|
|
33
34
|
leaveHybrid(): void;
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
|
-
export interface FTPlatformGlobal {
|
|
37
|
+
export interface FTPlatformGlobal extends FTJsbErrorGlobal {
|
|
37
38
|
__FT_COCOS_CONFIGURATION__?: FTCocosConfig & {
|
|
38
39
|
replay?: FTNativeReplayConfig;
|
|
39
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/core/platform-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACr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AAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,EAAE,MAAM,CAAC,EAAE,MAAM,wBAAwB,GAAG,wBAAwB,CAc/J"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-runtime.js","sourceRoot":"","sources":["../../../../../src/core/platform-runtime.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"platform-runtime.js","sourceRoot":"","sources":["../../../../../src/core/platform-runtime.ts"],"names":[],"mappings":";;AA0CA,wCAEC;AAED,wEAIC;AAGD,wDAcC;AA9DD,2CAAoD;AAqCpD,SAAgB,cAAc;IAC5B,OAAO,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAqB,CAAC;AACnF,CAAC;AAED,SAAgB,8BAA8B,CAAC,OAA0B,EAAE,MAAyB;;IAAzB,uBAAA,EAAA,SAAS,cAAc,EAAE;IAClG,IAAM,QAAQ,GAAG,MAAA,MAAM,CAAC,sBAAsB,0CAAG,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,iCAAoB;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAC7H,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,CAAC;AACvB,CAAC;AAED,kGAAkG;AAClG,SAAgB,sBAAsB,CAAC,OAA0B,EAAE,MAAyB,EAAE,MAAuC;IAAlE,uBAAA,EAAA,SAAS,cAAc,EAAE;IAC1F,IAAM,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;IACpD,IAAM,SAAS,GAAG,MAAM,CAAC,sBAAsB,IAAI,CAAC,MAAM,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC;IACxF,IAAM,QAAQ,GAAG,8BAA8B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACjE,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,IAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,MAAM,CAAC,2BAA2B,CAAC;IAClH,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,KAAK,iCAAoB,CAAC,EAAE,CAAC;QAChG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,KAAK,KAAK;YACxC,CAAC,CAAC,qIAAqI;YACvI,CAAC,CAAC,mGAAmG,CAAC,CAAC;IAC3G,CAAC;IACD,IAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,OAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACjE,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,iCAAoB,EAAE,GAAG,KAAA,EAAE,CAAC;IACxD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import type { FTEngineTrackingHooks } from './auto-tracking.js';\nimport type { FTCocosConfig, FTCocosHybridConfig } from './types.js';\nimport type { FTNativeReplayConfig } from './platform-options.js';\nimport type { FTCocosSDK } from './client.js';\nimport type { FTCocosWebSDK } from '../web/client.js';\nimport { FT_COCOS_SDK_VERSION } from './version.js';\nimport type { FTJsbErrorGlobal } from '../native/jsb-errors.js';\n\nexport interface FTPlatformContext {\n engine: 'creator2' | 'creator3';\n platform: 'android' | 'ios' | 'unsupported' | 'web';\n hooks: FTEngineTrackingHooks;\n canvasIsPublic: () => boolean;\n engineApi?: unknown;\n reflection?: { callStaticMethod(...args: string[]): unknown };\n}\nexport type FTPlatformImplementation = FTCocosSDK | FTCocosWebSDK;\nexport interface FTPlatformFactory {\n protocol: 1;\n version: string;\n create(context: FTPlatformContext, target: FTPlatformGlobal): FTPlatformImplementation;\n}\nexport interface FTNativeReplayFacade {\n start(config: FTCocosConfig & { replay?: FTNativeReplayConfig }): void;\n attach(config: FTCocosHybridConfig & { replay?: FTNativeReplayConfig }): void;\n replay: {\n start(config?: FTNativeReplayConfig): void;\n stop(): void;\n enterHybrid(): void;\n leaveHybrid(): void;\n };\n}\nexport interface FTPlatformGlobal extends FTJsbErrorGlobal {\n __FT_COCOS_CONFIGURATION__?: FTCocosConfig & { replay?: FTNativeReplayConfig };\n __FT_COCOS_REPLAY_FACTORY__?: {\n protocol: 1; version: string; engine: string;\n create(base: FTCocosSDK, context: FTPlatformContext): FTNativeReplayFacade;\n };\n __FT_COCOS_NATIVE_FACTORY__?: FTPlatformFactory;\n __FT_COCOS_WEB_FACTORY__?: FTPlatformFactory;\n __FT_COCOS_INSTANCES__?: Record<string, { version: string; sdk: FTPlatformImplementation; replay?: FTNativeReplayFacade; replayConfig?: FTNativeReplayConfig }>;\n}\nexport function platformGlobal(): FTPlatformGlobal {\n return (typeof window !== 'undefined' ? window : globalThis) as FTPlatformGlobal;\n}\n\nexport function existingPlatformImplementation(context: FTPlatformContext, target = platformGlobal()): FTPlatformImplementation | undefined {\n const previous = target.__FT_COCOS_INSTANCES__?.[context.engine + ':' + context.platform];\n if (previous && previous.version !== FT_COCOS_SDK_VERSION) throw new Error('Cocos SDK versions must match on the same page');\n return previous?.sdk;\n}\n\n/** The engine module graph contains no platform implementation. Build assets supply factories. */\nexport function platformImplementation(context: FTPlatformContext, target = platformGlobal(), create?: () => FTPlatformImplementation): FTPlatformImplementation {\n const key = context.engine + ':' + context.platform;\n const instances = target.__FT_COCOS_INSTANCES__ || (target.__FT_COCOS_INSTANCES__ = {});\n const previous = existingPlatformImplementation(context, target);\n if (previous) return previous;\n const factory = context.platform === 'web' ? target.__FT_COCOS_WEB_FACTORY__ : target.__FT_COCOS_NATIVE_FACTORY__;\n if (!create && (!factory || factory.protocol !== 1 || factory.version !== FT_COCOS_SDK_VERSION)) {\n throw new Error(context.platform === 'web'\n ? 'Cocos Web runtime is missing or incompatible. Run the installer with --web and rebuild, or load /web/bootstrap before game scripts.'\n : 'Cocos native runtime is missing or incompatible. Rerun the SDK installer and rebuild the project.');\n }\n const sdk = create ? create() : factory!.create(context, target);\n instances[key] = { version: FT_COCOS_SDK_VERSION, sdk };\n return sdk;\n}\n"]}
|
|
@@ -22,6 +22,11 @@ export interface FTSDKConfig {
|
|
|
22
22
|
env?: FTEnvironment;
|
|
23
23
|
/** Enables native SDK debug output. */
|
|
24
24
|
debug?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Allowed WebView hosts shared by RUM and logs. `null` allows every host;
|
|
27
|
+
* an empty array disables automatic Bridge use. Omit to keep native defaults.
|
|
28
|
+
*/
|
|
29
|
+
allowWebViewHost?: string[] | null;
|
|
25
30
|
/** String attributes included with all data produced by the native SDK. */
|
|
26
31
|
globalContext?: Record<string, string>;
|
|
27
32
|
}
|
|
@@ -62,6 +67,8 @@ export interface FTRUMConfig {
|
|
|
62
67
|
enableNativeUserView?: boolean;
|
|
63
68
|
/** Enables native resource tracking. */
|
|
64
69
|
enableNativeUserResource?: boolean;
|
|
70
|
+
/** Enables WebView RUM collection through the native Bridge. @defaultValue `true` */
|
|
71
|
+
enableTraceWebView?: boolean;
|
|
65
72
|
/** Enables native crash tracking. */
|
|
66
73
|
enableNativeCrash?: boolean;
|
|
67
74
|
/** Enables Android ANR tracking. Ignored on platforms that do not support it. */
|
|
@@ -94,6 +101,8 @@ export interface FTLoggerConfig {
|
|
|
94
101
|
enableLinkRumData?: boolean;
|
|
95
102
|
/** Enables logs submitted through the Cocos SDK logger. */
|
|
96
103
|
enableCustomLog?: boolean;
|
|
104
|
+
/** Enables Browser Logs SDK events from WebViews. @defaultValue `false` */
|
|
105
|
+
enableWebViewLog?: boolean;
|
|
97
106
|
/** Mirrors custom logs to the platform console. */
|
|
98
107
|
printCustomLogToConsole?: boolean;
|
|
99
108
|
/** Policy used when the native log cache reaches its limit. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/core/types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAE3D,6CAA6C;AAC7C,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,OAAO,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAE3E,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnD,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAElF,gDAAgD;AAChD,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAA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IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,GAAG,EAAE,WAAW,CAAC;IACjB,kCAAkC;IAClC,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,sCAAsC;IACtC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,kDAAkD;IAClD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,wEAAwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/types.ts"],"names":[],"mappings":"","sourcesContent":["/** A scalar value accepted by SDK attributes. */\nexport type FTPrimitive = string | number | boolean | null;\n\n/** A JSON-compatible SDK attribute value. */\nexport type FTValue = FTPrimitive | FTValue[] | { [key: string]: FTValue };\n\n/** Custom attributes attached to RUM, Log, and Resource data. */\nexport type FTAttributes = Record<string, FTValue>;\n\n/** Deployment environment reported with SDK data. */\nexport type FTEnvironment = 'prod' | 'gray' | 'pre' | 'common' | 'local' | string;\n\n/** Base SDK connection and service settings. */\nexport interface FTSDKConfig {\n /** Datakit address used for direct data reporting. */\n datakitUrl?: string;\n /** DataWay address used for public data reporting. Requires {@link clientToken}. */\n datawayUrl?: string;\n /** Client token used with {@link datawayUrl}. Keep this value outside source control. */\n clientToken?: string;\n /** Service name attached to collected data. */\n serviceName?: string;\n /** Deployment environment attached to collected data. */\n env?: FTEnvironment;\n /** Enables native SDK debug output. */\n debug?: boolean;\n /** String attributes included with all data produced by the native SDK. */\n globalContext?: Record<string, string>;\n}\n\n/** User identity bound to subsequent SDK data. */\nexport interface FTUserData {\n /** Stable application-specific user identifier. */\n userId: string;\n /** Display name of the user. */\n userName?: string;\n /** Email address of the user. */\n userEmail?: string;\n /** Additional string attributes associated with the user. */\n extra?: Record<string, string>;\n}\n\n/** Real User Monitoring configuration. */\nexport interface FTRUMConfig {\n /** Android RUM application ID. */\n androidAppId?: string;\n /** iOS RUM application ID. */\n iosAppId?: string;\n /** Session sampling percentage from `0` to `100`. Supports decimals. @defaultValue `100` */\n sessionSamplingRate?: number;\n /**\n * Session sampling rate from `0` to `1`.\n * @deprecated Use {@link sessionSamplingRate}. This field keeps its original unit and behavior.\n */\n sampleRate?: number;\n /** Additional session sampling percentage from `0` to `100` for sessions that contain errors. Supports decimals. @defaultValue `0` */\n sessionOnErrorSamplingRate?: number;\n /**\n * Additional session sampling rate from `0` to `1` for sessions that contain errors.\n * @deprecated Use {@link sessionOnErrorSamplingRate}. This field keeps its original unit and behavior.\n */\n sessionOnErrorSampleRate?: number;\n /** Enables native user-action tracking. */\n enableNativeUserAction?: boolean;\n /** Enables native view tracking. */\n enableNativeUserView?: boolean;\n /** Enables native resource tracking. */\n enableNativeUserResource?: boolean;\n /** Enables native crash tracking. */\n enableNativeCrash?: boolean;\n /** Enables Android ANR tracking. Ignored on platforms that do not support it. */\n enableNativeAnr?: boolean;\n /** Enables native UI-block or freeze tracking. */\n enableNativeUiBlock?: boolean;\n /** Minimum native UI-block duration in milliseconds. */\n nativeUiBlockDurationMs?: number;\n /** Native SDK error-monitor bit mask. */\n errorMonitorType?: number;\n /** Native SDK device-metrics monitor bit mask. */\n deviceMetricsMonitorType?: number;\n /** Device-metrics collection frequency. */\n detectFrequency?: 'normal' | 'frequent' | 'rare';\n /** String attributes included with all RUM data. */\n globalContext?: Record<string, string>;\n}\n\n/** Log level accepted by the SDK logger. */\nexport type FTLogLevel = 'info' | 'warning' | 'error' | 'critical' | 'ok' | string;\n\n/** Logger configuration. */\nexport interface FTLoggerConfig {\n /** Log sampling percentage from `0` to `100`. Supports decimals. @defaultValue `100` */\n logSamplingRate?: number;\n /**\n * Log sampling rate from `0` to `1`.\n * @deprecated Use {@link logSamplingRate}. This field keeps its original unit and behavior.\n */\n sampleRate?: number;\n /** Associates logs with the current RUM session. */\n enableLinkRumData?: boolean;\n /** Enables logs submitted through the Cocos SDK logger. */\n enableCustomLog?: boolean;\n /** Mirrors custom logs to the platform console. */\n printCustomLogToConsole?: boolean;\n /** Policy used when the native log cache reaches its limit. */\n discardStrategy?: 'discard' | 'discardOldest';\n /** Log levels accepted by the native logger. */\n logLevelFilters?: FTLogLevel[];\n /** Maximum number of cached log entries. */\n logCacheLimitCount?: number;\n /** String attributes included with every log. */\n globalContext?: Record<string, string>;\n}\n\n/** Distributed-tracing propagation format. */\nexport type FTTraceType =\n | 'ddTrace'\n | 'zipkinMultiHeader'\n | 'zipkinSingleHeader'\n | 'traceparent'\n | 'skywalking'\n | 'jaeger';\n\n/** Distributed-tracing configuration. */\nexport interface FTTraceConfig {\n /** Trace sampling percentage from `0` to `100`. Supports decimals. @defaultValue `100` */\n traceSamplingRate?: number;\n /**\n * Trace sampling rate from `0` to `1`.\n * @deprecated Use {@link traceSamplingRate}. This field keeps its original unit and behavior.\n */\n sampleRate?: number;\n /** Header propagation format. */\n traceType?: FTTraceType;\n /** Associates trace data with the current RUM session. */\n enableLinkRumData?: boolean;\n /** Enables native automatic network tracing. */\n enableNativeAutoTrace?: boolean;\n}\n\n/** Request and response details recorded for a manually tracked resource. */\nexport interface FTResourceContent {\n /** Absolute resource URL. */\n url: string;\n /** HTTP method, such as `GET` or `POST`. */\n httpMethod: string;\n /** Request headers safe to include in observability data. */\n requestHeaders?: Record<string, string>;\n /** Response headers safe to include in observability data. */\n responseHeaders?: Record<string, string>;\n /** Optional response body safe to include in observability data. */\n responseBody?: string;\n /** HTTP response status code. */\n statusCode?: number;\n /** Response content type. */\n responseContentType?: string;\n /** Response content encoding. */\n responseContentEncoding?: string;\n}\n\n/** Optional timing metrics for a manually tracked resource. Values are nanosecond timestamps. */\nexport interface FTResourceMetrics {\n /** Time at which the fetch operation started. */\n fetchStartTime?: number;\n /** Time at which the TCP connection started. */\n tcpStartTime?: number;\n /** Time at which the TCP connection completed. */\n tcpEndTime?: number;\n /** Time at which DNS resolution started. */\n dnsStartTime?: number;\n /** Time at which DNS resolution completed. */\n dnsEndTime?: number;\n /** Time at which the first response data arrived. */\n responseStartTime?: number;\n /** Time at which the response completed. */\n responseEndTime?: number;\n /** Time at which the TLS handshake started. */\n sslStartTime?: number;\n /** Time at which the TLS handshake completed. */\n sslEndTime?: number;\n}\n\n/** Cocos events that the SDK can track automatically. */\nexport interface FTAutoTrackingConfig {\n /** Tracks Cocos scene changes as RUM views. */\n scenes?: boolean;\n /** Tracks supported pointer interactions as RUM actions. */\n actions?: boolean;\n /** Tracks supported Cocos errors as RUM errors. */\n errors?: boolean;\n /** Sends supported console output to the SDK logger. */\n console?: boolean;\n /**\n * Tracks supported network requests as RUM resources and traces. In Hybrid\n * mode, starts at attach() and stays active until detach(), including outside\n * Cocos pages. In standalone mode, follows start()/shutdown().\n */\n network?: boolean;\n}\n\n/** Complete configuration for a standalone Cocos application. */\nexport interface FTCocosConfig {\n /** Required base SDK configuration. */\n sdk: FTSDKConfig;\n /** Enables and configures RUM. */\n rum?: FTRUMConfig;\n /** Enables and configures logging. */\n logger?: FTLoggerConfig;\n /** Enables and configures distributed tracing. */\n trace?: FTTraceConfig;\n /** Enables selected Cocos automatic-tracking integrations. */\n autoTrack?: FTAutoTrackingConfig;\n}\n\n/** Cocos-side configuration for applications initialized by a native host. */\nexport interface FTCocosHybridConfig {\n /** Enables selected Cocos automatic-tracking integrations. */\n autoTrack?: FTAutoTrackingConfig;\n}\n\n/** Options applied when entering a Cocos runtime from a native host. */\nexport interface FTCocosEnterOptions {\n /** RUM view name used when automatic scene tracking is disabled. */\n viewName?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/types.ts"],"names":[],"mappings":"","sourcesContent":["/** A scalar value accepted by SDK attributes. */\nexport type FTPrimitive = string | number | boolean | null;\n\n/** A JSON-compatible SDK attribute value. */\nexport type FTValue = FTPrimitive | FTValue[] | { [key: string]: FTValue };\n\n/** Custom attributes attached to RUM, Log, and Resource data. */\nexport type FTAttributes = Record<string, FTValue>;\n\n/** Deployment environment reported with SDK data. */\nexport type FTEnvironment = 'prod' | 'gray' | 'pre' | 'common' | 'local' | string;\n\n/** Base SDK connection and service settings. */\nexport interface FTSDKConfig {\n /** Datakit address used for direct data reporting. */\n datakitUrl?: string;\n /** DataWay address used for public data reporting. Requires {@link clientToken}. */\n datawayUrl?: string;\n /** Client token used with {@link datawayUrl}. Keep this value outside source control. */\n clientToken?: string;\n /** Service name attached to collected data. */\n serviceName?: string;\n /** Deployment environment attached to collected data. */\n env?: FTEnvironment;\n /** Enables native SDK debug output. */\n debug?: boolean;\n /**\n * Allowed WebView hosts shared by RUM and logs. `null` allows every host;\n * an empty array disables automatic Bridge use. Omit to keep native defaults.\n */\n allowWebViewHost?: string[] | null;\n /** String attributes included with all data produced by the native SDK. */\n globalContext?: Record<string, string>;\n}\n\n/** User identity bound to subsequent SDK data. */\nexport interface FTUserData {\n /** Stable application-specific user identifier. */\n userId: string;\n /** Display name of the user. */\n userName?: string;\n /** Email address of the user. */\n userEmail?: string;\n /** Additional string attributes associated with the user. */\n extra?: Record<string, string>;\n}\n\n/** Real User Monitoring configuration. */\nexport interface FTRUMConfig {\n /** Android RUM application ID. */\n androidAppId?: string;\n /** iOS RUM application ID. */\n iosAppId?: string;\n /** Session sampling percentage from `0` to `100`. Supports decimals. @defaultValue `100` */\n sessionSamplingRate?: number;\n /**\n * Session sampling rate from `0` to `1`.\n * @deprecated Use {@link sessionSamplingRate}. This field keeps its original unit and behavior.\n */\n sampleRate?: number;\n /** Additional session sampling percentage from `0` to `100` for sessions that contain errors. Supports decimals. @defaultValue `0` */\n sessionOnErrorSamplingRate?: number;\n /**\n * Additional session sampling rate from `0` to `1` for sessions that contain errors.\n * @deprecated Use {@link sessionOnErrorSamplingRate}. This field keeps its original unit and behavior.\n */\n sessionOnErrorSampleRate?: number;\n /** Enables native user-action tracking. */\n enableNativeUserAction?: boolean;\n /** Enables native view tracking. */\n enableNativeUserView?: boolean;\n /** Enables native resource tracking. */\n enableNativeUserResource?: boolean;\n /** Enables WebView RUM collection through the native Bridge. @defaultValue `true` */\n enableTraceWebView?: boolean;\n /** Enables native crash tracking. */\n enableNativeCrash?: boolean;\n /** Enables Android ANR tracking. Ignored on platforms that do not support it. */\n enableNativeAnr?: boolean;\n /** Enables native UI-block or freeze tracking. */\n enableNativeUiBlock?: boolean;\n /** Minimum native UI-block duration in milliseconds. */\n nativeUiBlockDurationMs?: number;\n /** Native SDK error-monitor bit mask. */\n errorMonitorType?: number;\n /** Native SDK device-metrics monitor bit mask. */\n deviceMetricsMonitorType?: number;\n /** Device-metrics collection frequency. */\n detectFrequency?: 'normal' | 'frequent' | 'rare';\n /** String attributes included with all RUM data. */\n globalContext?: Record<string, string>;\n}\n\n/** Log level accepted by the SDK logger. */\nexport type FTLogLevel = 'info' | 'warning' | 'error' | 'critical' | 'ok' | string;\n\n/** Logger configuration. */\nexport interface FTLoggerConfig {\n /** Log sampling percentage from `0` to `100`. Supports decimals. @defaultValue `100` */\n logSamplingRate?: number;\n /**\n * Log sampling rate from `0` to `1`.\n * @deprecated Use {@link logSamplingRate}. This field keeps its original unit and behavior.\n */\n sampleRate?: number;\n /** Associates logs with the current RUM session. */\n enableLinkRumData?: boolean;\n /** Enables logs submitted through the Cocos SDK logger. */\n enableCustomLog?: boolean;\n /** Enables Browser Logs SDK events from WebViews. @defaultValue `false` */\n enableWebViewLog?: boolean;\n /** Mirrors custom logs to the platform console. */\n printCustomLogToConsole?: boolean;\n /** Policy used when the native log cache reaches its limit. */\n discardStrategy?: 'discard' | 'discardOldest';\n /** Log levels accepted by the native logger. */\n logLevelFilters?: FTLogLevel[];\n /** Maximum number of cached log entries. */\n logCacheLimitCount?: number;\n /** String attributes included with every log. */\n globalContext?: Record<string, string>;\n}\n\n/** Distributed-tracing propagation format. */\nexport type FTTraceType =\n | 'ddTrace'\n | 'zipkinMultiHeader'\n | 'zipkinSingleHeader'\n | 'traceparent'\n | 'skywalking'\n | 'jaeger';\n\n/** Distributed-tracing configuration. */\nexport interface FTTraceConfig {\n /** Trace sampling percentage from `0` to `100`. Supports decimals. @defaultValue `100` */\n traceSamplingRate?: number;\n /**\n * Trace sampling rate from `0` to `1`.\n * @deprecated Use {@link traceSamplingRate}. This field keeps its original unit and behavior.\n */\n sampleRate?: number;\n /** Header propagation format. */\n traceType?: FTTraceType;\n /** Associates trace data with the current RUM session. */\n enableLinkRumData?: boolean;\n /** Enables native automatic network tracing. */\n enableNativeAutoTrace?: boolean;\n}\n\n/** Request and response details recorded for a manually tracked resource. */\nexport interface FTResourceContent {\n /** Absolute resource URL. */\n url: string;\n /** HTTP method, such as `GET` or `POST`. */\n httpMethod: string;\n /** Request headers safe to include in observability data. */\n requestHeaders?: Record<string, string>;\n /** Response headers safe to include in observability data. */\n responseHeaders?: Record<string, string>;\n /** Optional response body safe to include in observability data. */\n responseBody?: string;\n /** HTTP response status code. */\n statusCode?: number;\n /** Response content type. */\n responseContentType?: string;\n /** Response content encoding. */\n responseContentEncoding?: string;\n}\n\n/** Optional timing metrics for a manually tracked resource. Values are nanosecond timestamps. */\nexport interface FTResourceMetrics {\n /** Time at which the fetch operation started. */\n fetchStartTime?: number;\n /** Time at which the TCP connection started. */\n tcpStartTime?: number;\n /** Time at which the TCP connection completed. */\n tcpEndTime?: number;\n /** Time at which DNS resolution started. */\n dnsStartTime?: number;\n /** Time at which DNS resolution completed. */\n dnsEndTime?: number;\n /** Time at which the first response data arrived. */\n responseStartTime?: number;\n /** Time at which the response completed. */\n responseEndTime?: number;\n /** Time at which the TLS handshake started. */\n sslStartTime?: number;\n /** Time at which the TLS handshake completed. */\n sslEndTime?: number;\n}\n\n/** Cocos events that the SDK can track automatically. */\nexport interface FTAutoTrackingConfig {\n /** Tracks Cocos scene changes as RUM views. */\n scenes?: boolean;\n /** Tracks supported pointer interactions as RUM actions. */\n actions?: boolean;\n /** Tracks supported Cocos errors as RUM errors. */\n errors?: boolean;\n /** Sends supported console output to the SDK logger. */\n console?: boolean;\n /**\n * Tracks supported network requests as RUM resources and traces. In Hybrid\n * mode, starts at attach() and stays active until detach(), including outside\n * Cocos pages. In standalone mode, follows start()/shutdown().\n */\n network?: boolean;\n}\n\n/** Complete configuration for a standalone Cocos application. */\nexport interface FTCocosConfig {\n /** Required base SDK configuration. */\n sdk: FTSDKConfig;\n /** Enables and configures RUM. */\n rum?: FTRUMConfig;\n /** Enables and configures logging. */\n logger?: FTLoggerConfig;\n /** Enables and configures distributed tracing. */\n trace?: FTTraceConfig;\n /** Enables selected Cocos automatic-tracking integrations. */\n autoTrack?: FTAutoTrackingConfig;\n}\n\n/** Cocos-side configuration for applications initialized by a native host. */\nexport interface FTCocosHybridConfig {\n /** Enables selected Cocos automatic-tracking integrations. */\n autoTrack?: FTAutoTrackingConfig;\n}\n\n/** Options applied when entering a Cocos runtime from a native host. */\nexport interface FTCocosEnterOptions {\n /** RUM view name used when automatic scene tracking is disabled. */\n viewName?: string;\n}\n"]}
|
|
@@ -2,4 +2,5 @@ export declare function samplingRate(value: number | undefined, name: string): n
|
|
|
2
2
|
export declare function samplingPercentage(value: number | undefined, name: string): number | undefined;
|
|
3
3
|
export declare function validatedSamplingConfig<T extends object>(config: T, scope: string, fields: ReadonlyArray<readonly [percentageField: string, legacyField: string]>): T;
|
|
4
4
|
export declare function requireText(value: string, name: string): string;
|
|
5
|
+
export declare function validateWebViewHosts(value: unknown): void;
|
|
5
6
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../src/core/validation.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMxF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM9F;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACtD,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,GAC7E,CAAC,CAYH;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D"}
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../src/core/validation.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMxF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM9F;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACtD,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,GAC7E,CAAC,CAYH;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAOzD"}
|
|
@@ -15,6 +15,7 @@ exports.samplingRate = samplingRate;
|
|
|
15
15
|
exports.samplingPercentage = samplingPercentage;
|
|
16
16
|
exports.validatedSamplingConfig = validatedSamplingConfig;
|
|
17
17
|
exports.requireText = requireText;
|
|
18
|
+
exports.validateWebViewHosts = validateWebViewHosts;
|
|
18
19
|
function samplingRate(value, name) {
|
|
19
20
|
if (value === undefined)
|
|
20
21
|
return undefined;
|
|
@@ -50,4 +51,16 @@ function requireText(value, name) {
|
|
|
50
51
|
throw new TypeError("".concat(name, " must not be empty"));
|
|
51
52
|
return value;
|
|
52
53
|
}
|
|
54
|
+
function validateWebViewHosts(value) {
|
|
55
|
+
if (value === undefined || value === null)
|
|
56
|
+
return;
|
|
57
|
+
var message = 'sdk.allowWebViewHost must be an array of strings or null';
|
|
58
|
+
if (!Array.isArray(value))
|
|
59
|
+
throw new TypeError(message);
|
|
60
|
+
for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {
|
|
61
|
+
var host = value_1[_i];
|
|
62
|
+
if (typeof host !== 'string')
|
|
63
|
+
throw new TypeError(message);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
53
66
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../src/core/validation.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oCAMC;AAED,gDAMC;AAED,0DAgBC;AAED,kCAGC;
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../src/core/validation.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oCAMC;AAED,gDAMC;AAED,0DAgBC;AAED,kCAGC;AAED,oDAOC;AA9CD,SAAgB,YAAY,CAAC,KAAyB,EAAE,IAAY;IAClE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CA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AI,SAAS,CAAC,UAAG,IAAI,uBAAoB,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,oBAAoB,CAAC,KAAc;IACjD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO;IAClD,IAAM,OAAO,GAAG,0DAA0D,CAAC;IAC3E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;IACxD,KAAmB,UAAK,EAAL,eAAK,EAAL,mBAAK,EAAL,IAAK,EAAE,CAAC;QAAtB,IAAM,IAAI,cAAA;QACb,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC","sourcesContent":["export function samplingRate(value: number | undefined, name: string): number | undefined {\n if (value === undefined) return undefined;\n if (!Number.isFinite(value) || value < 0 || value > 1) {\n throw new RangeError(`${name} must be between 0 and 1`);\n }\n return value;\n}\n\nexport function samplingPercentage(value: number | undefined, name: string): number | undefined {\n if (value === undefined) return undefined;\n if (!Number.isFinite(value) || value < 0 || value > 100) {\n throw new RangeError(`${name} must be between 0 and 100`);\n }\n return value;\n}\n\nexport function validatedSamplingConfig<T extends object>(\n config: T,\n scope: string,\n fields: ReadonlyArray<readonly [percentageField: string, legacyField: string]>,\n): T {\n const result = { ...config } as Record<string, unknown>;\n fields.forEach(([percentageField, legacyField]) => {\n const percentage = result[percentageField] as number | undefined;\n if (percentage !== undefined) {\n samplingPercentage(percentage, `${scope}.${percentageField}`);\n delete result[legacyField];\n return;\n }\n samplingRate(result[legacyField] as number | undefined, `${scope}.${legacyField}`);\n });\n return result as T;\n}\n\nexport function requireText(value: string, name: string): string {\n if (!value.trim()) throw new TypeError(`${name} must not be empty`);\n return value;\n}\n\nexport function validateWebViewHosts(value: unknown): void {\n if (value === undefined || value === null) return;\n const message = 'sdk.allowWebViewHost must be an array of strings or null';\n if (!Array.isArray(value)) throw new TypeError(message);\n for (const host of value) {\n if (typeof host !== 'string') throw new TypeError(message);\n }\n}\n"]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** Version of the installed Cocos SDK package. */
|
|
2
|
-
export declare const FT_COCOS_SDK_VERSION = "0.1.1-alpha.
|
|
3
|
-
/** Global-context key used to report the Cocos SDK package version. */
|
|
4
|
-
export declare const FT_COCOS_SDK_VERSION_KEY = "sdk_package_cocos";
|
|
2
|
+
export declare const FT_COCOS_SDK_VERSION = "0.1.1-alpha.3";
|
|
5
3
|
/** Event attribute used to identify data emitted through a framework bridge. */
|
|
6
4
|
export declare const FT_COCOS_SDK_BRIDGE_INFO_KEY = "sdk_bridge_info";
|
|
7
5
|
/** Serialized bridge metadata expected by the native SDK data model. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../src/core/version.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../src/core/version.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,gFAAgF;AAChF,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAE9D,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,QAEnC,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FT_COCOS_SDK_BRIDGE_INFO = exports.FT_COCOS_SDK_BRIDGE_INFO_KEY = exports.
|
|
3
|
+
exports.FT_COCOS_SDK_BRIDGE_INFO = exports.FT_COCOS_SDK_BRIDGE_INFO_KEY = exports.FT_COCOS_SDK_VERSION = void 0;
|
|
4
4
|
/** Version of the installed Cocos SDK package. */
|
|
5
|
-
exports.FT_COCOS_SDK_VERSION = '0.1.1-alpha.
|
|
6
|
-
/** Global-context key used to report the Cocos SDK package version. */
|
|
7
|
-
exports.FT_COCOS_SDK_VERSION_KEY = 'sdk_package_cocos';
|
|
5
|
+
exports.FT_COCOS_SDK_VERSION = '0.1.1-alpha.3';
|
|
8
6
|
/** Event attribute used to identify data emitted through a framework bridge. */
|
|
9
7
|
exports.FT_COCOS_SDK_BRIDGE_INFO_KEY = 'sdk_bridge_info';
|
|
10
8
|
/** Serialized bridge metadata expected by the native SDK data model. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../src/core/version.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AACrC,QAAA,oBAAoB,GAAG,eAAe,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../src/core/version.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AACrC,QAAA,oBAAoB,GAAG,eAAe,CAAC;AAEpD,gFAAgF;AACnE,QAAA,4BAA4B,GAAG,iBAAiB,CAAC;AAE9D,wEAAwE;AAC3D,QAAA,wBAAwB,GAAG,IAAI,CAAC,SAAS,CAAC;IACrD,KAAK,EAAE,4BAAoB;CAC5B,CAAC,CAAC","sourcesContent":["/** Version of the installed Cocos SDK package. */\nexport const FT_COCOS_SDK_VERSION = '0.1.1-alpha.3';\n\n/** Event attribute used to identify data emitted through a framework bridge. */\nexport const FT_COCOS_SDK_BRIDGE_INFO_KEY = 'sdk_bridge_info';\n\n/** Serialized bridge metadata expected by the native SDK data model. */\nexport const FT_COCOS_SDK_BRIDGE_INFO = JSON.stringify({\n cocos: FT_COCOS_SDK_VERSION,\n});\n"]}
|
|
@@ -10,7 +10,8 @@ var version_js_1 = require("../core/version.js");
|
|
|
10
10
|
(0, platform_runtime_js_1.platformGlobal)().__FT_COCOS_NATIVE_FACTORY__ = {
|
|
11
11
|
protocol: 1,
|
|
12
12
|
version: version_js_1.FT_COCOS_SDK_VERSION,
|
|
13
|
-
create: function (context) {
|
|
13
|
+
create: function (context, target) {
|
|
14
|
+
if (target === void 0) { target = (0, platform_runtime_js_1.platformGlobal)(); }
|
|
14
15
|
if (context.platform === 'web')
|
|
15
16
|
throw new Error('Native runtime cannot serve a Web application');
|
|
16
17
|
var transport = {
|
|
@@ -27,7 +28,7 @@ var version_js_1 = require("../core/version.js");
|
|
|
27
28
|
return (0, transport_js_1.parseTransportResponse)(raw);
|
|
28
29
|
},
|
|
29
30
|
};
|
|
30
|
-
var tracking = new auto_tracking_js_1.FTDefaultAutoTracking(new modules_js_1.FTRUM(transport), new modules_js_1.FTLogger(transport), new modules_js_1.FTTrace(transport), context.hooks);
|
|
31
|
+
var tracking = new auto_tracking_js_1.FTDefaultAutoTracking(new modules_js_1.FTRUM(transport), new modules_js_1.FTLogger(transport), new modules_js_1.FTTrace(transport), context.hooks, target);
|
|
31
32
|
return new client_js_1.FTCocosSDK(transport, tracking, context.engine);
|
|
32
33
|
},
|
|
33
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../../../src/native/bootstrap.ts"],"names":[],"mappings":";;AAAA,6DAAiE;AACjE,+CAA+C;AAC/C,iDAA8D;AAC9D,qDAAsF;AACtF,mEAAqF;AACrF,iDAA0D;AAE1D,6FAA6F;AAC7F,IAAA,oCAAc,GAAE,CAAC,2BAA2B,GAAG;IAC7C,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,iCAAoB;IAC7B,MAAM,YAAC,OAA0B;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../../../src/native/bootstrap.ts"],"names":[],"mappings":";;AAAA,6DAAiE;AACjE,+CAA+C;AAC/C,iDAA8D;AAC9D,qDAAsF;AACtF,mEAAqF;AACrF,iDAA0D;AAE1D,6FAA6F;AAC7F,IAAA,oCAAc,GAAE,CAAC,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SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC","sourcesContent":["import { FTDefaultAutoTracking } from '../core/auto-tracking.js';\nimport { FTCocosSDK } from '../core/client.js';\nimport { FTLogger, FTRUM, FTTrace } from '../core/modules.js';\nimport { parseTransportResponse, type FTNativeTransport } from '../core/transport.js';\nimport { platformGlobal, type FTPlatformContext } from '../core/platform-runtime.js';\nimport { FT_COCOS_SDK_VERSION } from '../core/version.js';\n\n/** Installed as a native/Editor plugin script; never imported by the game's module graph. */\nplatformGlobal().__FT_COCOS_NATIVE_FACTORY__ = {\n protocol: 1,\n version: FT_COCOS_SDK_VERSION,\n create(context: FTPlatformContext, target = platformGlobal()): FTCocosSDK {\n if (context.platform === 'web') throw new Error('Native runtime cannot serve a Web application');\n const transport: FTNativeTransport = {\n platform: context.platform,\n invoke<T>(method: string, payload?: unknown): T | undefined {\n if (context.platform === 'unsupported') return undefined;\n if (!context.reflection) throw new Error('Cocos native reflection is unavailable');\n const json = payload === undefined ? '{}' : JSON.stringify(payload);\n const raw = context.platform === 'android'\n ? context.reflection.callStaticMethod('com/ft/sdk/cocos/FTCocosBridge', 'invoke', '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', method, json)\n : context.reflection.callStaticMethod('FTCocosBridge', 'invoke:payload:', method, json);\n return parseTransportResponse<T>(raw);\n },\n };\n const tracking = new FTDefaultAutoTracking(new FTRUM(transport), new FTLogger(transport), new FTTrace(transport), context.hooks, target);\n return new FTCocosSDK(transport, tracking, context.engine);\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-bootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/native/error-bootstrap.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var platform_runtime_js_1 = require("../core/platform-runtime.js");
|
|
4
|
+
var jsb_errors_js_1 = require("./jsb-errors.js");
|
|
5
|
+
// The native build hook prepends this bundle to main.js before engine adapters.
|
|
6
|
+
(0, jsb_errors_js_1.installJsbErrorSource)((0, platform_runtime_js_1.platformGlobal)());
|
|
7
|
+
//# sourceMappingURL=error-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-bootstrap.js","sourceRoot":"","sources":["../../../../../src/native/error-bootstrap.ts"],"names":[],"mappings":";;AAAA,mEAA6D;AAC7D,iDAA+E;AAE/E,gFAAgF;AAChF,IAAA,qCAAqB,EAAC,IAAA,oCAAc,GAAsB,CAAC,CAAC","sourcesContent":["import { platformGlobal } from '../core/platform-runtime.js';\nimport { installJsbErrorSource, type FTJsbErrorGlobal } from './jsb-errors.js';\n\n// The native build hook prepends this bundle to main.js before engine adapters.\ninstallJsbErrorSource(platformGlobal() as FTJsbErrorGlobal);\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FTObservationGlobal } from '../core/observation.js';
|
|
2
|
+
type ErrorCallback = (location: string, message: string, stack: string) => unknown;
|
|
3
|
+
export interface FTJsbErrorObservation {
|
|
4
|
+
timestampMs: number;
|
|
5
|
+
context?: unknown;
|
|
6
|
+
}
|
|
7
|
+
type ErrorObserver = (location: string, message: string, stack: string, observation: FTJsbErrorObservation) => void;
|
|
8
|
+
export interface FTJsbErrorSource {
|
|
9
|
+
readonly protocol: 2;
|
|
10
|
+
subscribe(callback: ErrorObserver, captureContext?: () => unknown): () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface FTJsbErrorGlobal extends FTObservationGlobal {
|
|
13
|
+
jsb?: {
|
|
14
|
+
onError?: (callback: ErrorCallback) => unknown;
|
|
15
|
+
};
|
|
16
|
+
__FT_COCOS_JSB_ERRORS__?: FTJsbErrorSource;
|
|
17
|
+
}
|
|
18
|
+
/** Run before the engine adapter registers its error callback. JSB has no getter. */
|
|
19
|
+
export declare function installJsbErrorSource(target: FTJsbErrorGlobal): void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=jsb-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsb-errors.d.ts","sourceRoot":"","sources":["../../../../../src/native/jsb-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEpF,KAAK,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AACnF,MAAM,WAAW,qBAAqB;IAAG,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAAE;AAClF,KAAK,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAC;AAEpH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrB,SAAS,CAAC,QAAQ,EAAE,aAAa,EAAE,cAAc,CAAC,EAAE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC;CAChF;AAED,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,GAAG,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,OAAO,CAAA;KAAE,CAAC;IACzD,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;CAC5C;AAED,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CA2DpE"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.installJsbErrorSource = installJsbErrorSource;
|
|
4
|
+
var observation_js_1 = require("../core/observation.js");
|
|
5
|
+
/** Run before the engine adapter registers its error callback. JSB has no getter. */
|
|
6
|
+
function installJsbErrorSource(target) {
|
|
7
|
+
var jsb = target.jsb;
|
|
8
|
+
if (!(jsb === null || jsb === void 0 ? void 0 : jsb.onError) || target.__FT_COCOS_JSB_ERRORS__)
|
|
9
|
+
return;
|
|
10
|
+
var register = jsb.onError;
|
|
11
|
+
var handler;
|
|
12
|
+
var state = (0, observation_js_1.observationState)(target);
|
|
13
|
+
var observing = 0;
|
|
14
|
+
var subscribers = [];
|
|
15
|
+
var dispatch = function (location, message, stack) {
|
|
16
|
+
var _a;
|
|
17
|
+
// Capture only local metadata before the original handler can change scenes.
|
|
18
|
+
// Monitoring reentry suppresses observations, never the original handler.
|
|
19
|
+
var observations = [];
|
|
20
|
+
try {
|
|
21
|
+
if (!state.reporting && !observing) {
|
|
22
|
+
observing++;
|
|
23
|
+
try {
|
|
24
|
+
var timestampMs = Date.now();
|
|
25
|
+
for (var _i = 0, _b = subscribers.slice(); _i < _b.length; _i++) {
|
|
26
|
+
var subscriber = _b[_i];
|
|
27
|
+
try {
|
|
28
|
+
observations.push({ subscriber: subscriber, observation: { timestampMs: timestampMs, context: (_a = subscriber.captureContext) === null || _a === void 0 ? void 0 : _a.call(subscriber) } });
|
|
29
|
+
}
|
|
30
|
+
catch ( /* A failed snapshot cannot change native error delivery. */_c) { /* A failed snapshot cannot change native error delivery. */ }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
observing--;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch ( /* Preserve the original handler even if observation preparation fails. */_d) { /* Preserve the original handler even if observation preparation fails. */ }
|
|
39
|
+
try {
|
|
40
|
+
return handler === null || handler === void 0 ? void 0 : handler.call(this, location, message, stack);
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
for (var _e = 0, observations_1 = observations; _e < observations_1.length; _e++) {
|
|
44
|
+
var _f = observations_1[_e], subscriber = _f.subscriber, observation = _f.observation;
|
|
45
|
+
if (!subscriber.active)
|
|
46
|
+
continue;
|
|
47
|
+
observing++;
|
|
48
|
+
try {
|
|
49
|
+
subscriber.callback(location, message, stack, observation);
|
|
50
|
+
}
|
|
51
|
+
catch ( /* Preserve the original outcome. */_g) { /* Preserve the original outcome. */ }
|
|
52
|
+
finally {
|
|
53
|
+
observing--;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
jsb.onError = function () {
|
|
59
|
+
var args = [];
|
|
60
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
61
|
+
args[_i] = arguments[_i];
|
|
62
|
+
}
|
|
63
|
+
// Preserve argument count as well as type validation (the native API expects exactly one argument).
|
|
64
|
+
if (args.length !== 1 || typeof args[0] !== 'function')
|
|
65
|
+
return register.apply(this, args);
|
|
66
|
+
var callback = args[0];
|
|
67
|
+
var result = register.call(this, subscribers.length ? dispatch : callback);
|
|
68
|
+
handler = callback;
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
target.__FT_COCOS_JSB_ERRORS__ = {
|
|
72
|
+
protocol: 2,
|
|
73
|
+
subscribe: function (callback, captureContext) {
|
|
74
|
+
if (subscribers.length === 0)
|
|
75
|
+
register.call(jsb, dispatch);
|
|
76
|
+
var subscriber = { callback: callback, captureContext: captureContext, active: true };
|
|
77
|
+
subscribers.push(subscriber);
|
|
78
|
+
return function () {
|
|
79
|
+
if (!subscriber.active)
|
|
80
|
+
return;
|
|
81
|
+
subscriber.active = false;
|
|
82
|
+
var index = subscribers.indexOf(subscriber);
|
|
83
|
+
if (index >= 0)
|
|
84
|
+
subscribers.splice(index, 1);
|
|
85
|
+
if (subscribers.length === 0 && handler)
|
|
86
|
+
register.call(jsb, handler);
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=jsb-errors.js.map
|
|
@@ -0,0 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WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC7E,OAAO,GAAG,QAAQ,CAAC;QACnB,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IACF,MAAM,CAAC,uBAAuB,GAAG;QAC/B,QAAQ,EAAE,CAAC;QACX,SAAS,YAAC,QAAQ,EAAE,cAAc;YAChC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;gBAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC3D,IAAM,UAAU,GAAG,EAAE,QAAQ,UAAA,EAAE,cAAc,gBAAA,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;YAC9D,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC7B,OAAO;gBACL,IAAI,CAAC,UAAU,CAAC,MAAM;oBAAE,OAAO;gBAC/B,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC;gBAC1B,IAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBAC9C,IAAI,KAAK,IAAI,CAAC;oBAAE,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBAC7C,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO;oBAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACvE,CAAC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { observationState, type FTObservationGlobal } from '../core/observation.js';\n\ntype ErrorCallback = (location: string, message: string, stack: string) => unknown;\nexport interface FTJsbErrorObservation { timestampMs: number; context?: unknown; }\ntype ErrorObserver = (location: string, message: string, stack: string, observation: FTJsbErrorObservation) => void;\n\nexport interface FTJsbErrorSource {\n readonly protocol: 2;\n subscribe(callback: ErrorObserver, captureContext?: () => unknown): () => void;\n}\n\nexport interface FTJsbErrorGlobal extends FTObservationGlobal {\n jsb?: { onError?: (callback: ErrorCallback) => unknown };\n __FT_COCOS_JSB_ERRORS__?: FTJsbErrorSource;\n}\n\n/** Run before the engine adapter registers its error callback. JSB has no getter. */\nexport function installJsbErrorSource(target: FTJsbErrorGlobal): void {\n const jsb = target.jsb;\n if (!jsb?.onError || target.__FT_COCOS_JSB_ERRORS__) return;\n const register = jsb.onError;\n let handler: ErrorCallback | undefined;\n const state = observationState(target);\n let observing = 0;\n const subscribers: Array<{ callback: ErrorObserver; captureContext?: () => unknown; active: boolean }> = [];\n const dispatch: ErrorCallback = function (this: unknown, location, message, stack): unknown {\n // Capture only local metadata before the original handler can change scenes.\n // Monitoring reentry suppresses observations, never the original handler.\n const observations: Array<{ subscriber: typeof subscribers[number]; observation: FTJsbErrorObservation }> = [];\n try {\n if (!state.reporting && !observing) {\n observing++;\n try {\n const timestampMs = Date.now();\n for (const subscriber of subscribers.slice()) {\n try {\n observations.push({ subscriber, observation: { timestampMs, context: subscriber.captureContext?.() } });\n } catch { /* A failed snapshot cannot change native error delivery. */ }\n }\n } finally { observing--; }\n }\n } catch { /* Preserve the original handler even if observation preparation fails. */ }\n try {\n return handler?.call(this, location, message, stack);\n } finally {\n for (const { subscriber, observation } of observations) {\n if (!subscriber.active) continue;\n observing++;\n try { subscriber.callback(location, message, stack, observation); } catch { /* Preserve the original outcome. */ }\n finally { observing--; }\n }\n }\n };\n jsb.onError = function (...args: unknown[]): unknown {\n // Preserve argument count as well as type validation (the native API expects exactly one argument).\n if (args.length !== 1 || typeof args[0] !== 'function') return register.apply(this, args as [ErrorCallback]);\n const callback = args[0] as ErrorCallback;\n const result = register.call(this, subscribers.length ? dispatch : callback);\n handler = callback;\n return result;\n };\n target.__FT_COCOS_JSB_ERRORS__ = {\n protocol: 2,\n subscribe(callback, captureContext): () => void {\n if (subscribers.length === 0) register.call(jsb, dispatch);\n const subscriber = { callback, captureContext, active: true };\n subscribers.push(subscriber);\n return () => {\n if (!subscriber.active) return;\n subscriber.active = false;\n const index = subscribers.indexOf(subscriber);\n if (index >= 0) subscribers.splice(index, 1);\n if (subscribers.length === 0 && handler) register.call(jsb, handler);\n };\n },\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../src/web/runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAA+B,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO/G,yFAAyF;AACzF,qBAAa,YAAa,YAAW,gBAAgB;IAQvC,QAAQ,CAAC,MAAM,EAAE,gBAAgB;IAP7C,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;IAC/B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA2B;IAC/C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4B;gBAE5B,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,UAAQ;IA2GxF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI1B,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM5B,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI;IAIxE,WAAW,IAAI,IAAI;IAKnB,UAAU,IAAI,IAAI;IAKlB,WAAW,IAAI,OAAO;IAEtB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS;IA8BzD,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../src/web/runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAA+B,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO/G,yFAAyF;AACzF,qBAAa,YAAa,YAAW,gBAAgB;IAQvC,QAAQ,CAAC,MAAM,EAAE,gBAAgB;IAP7C,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;IAC/B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA2B;IAC/C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4B;gBAE5B,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,UAAQ;IA2GxF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI1B,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM5B,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI;IAIxE,WAAW,IAAI,IAAI;IAKnB,UAAU,IAAI,IAAI;IAKlB,WAAW,IAAI,OAAO;IAEtB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS;IA8BzD,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,UAAU;CAGnB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAE,WAAmC,GAAG,gBAAgB,CAKpH"}
|
|
@@ -226,7 +226,6 @@ var FTWebRuntime = /** @class */ (function () {
|
|
|
226
226
|
};
|
|
227
227
|
FTWebRuntime.prototype.setContext = function (api, context) {
|
|
228
228
|
Object.keys(context).forEach(function (key) { return api.setGlobalContextProperty(key, context[key]); });
|
|
229
|
-
api.setGlobalContextProperty(version_js_1.FT_COCOS_SDK_VERSION_KEY, version_js_1.FT_COCOS_SDK_VERSION);
|
|
230
229
|
};
|
|
231
230
|
return FTWebRuntime;
|
|
232
231
|
}());
|