@jolibox/implement 1.1.4-beta.16 → 1.1.4-beta.18
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/.rush/temp/package-deps_build.json +14 -14
- package/dist/common/ads/channel-policy.d.ts +24 -2
- package/dist/common/ads/index.d.ts +1 -0
- package/dist/common/context/index.d.ts +1 -0
- package/dist/common/report/base-tracker.d.ts +9 -0
- package/dist/common/report/errors/index.d.ts +2 -2
- package/dist/h5/http/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.native.js +3 -3
- package/dist/native/network/index.d.ts +0 -3
- package/implement.build.log +2 -2
- package/package.json +3 -3
- package/src/common/ads/channel-policy.ts +49 -4
- package/src/common/ads/index.ts +6 -4
- package/src/common/api-factory/index.ts +3 -3
- package/src/common/context/index.ts +3 -0
- package/src/common/report/base-tracker.ts +40 -0
- package/src/common/report/errors/index.ts +3 -3
- package/src/common/report/errors/report/listeners.ts +0 -2
- package/src/common/report/track.ts +2 -2
- package/src/h5/http/index.ts +19 -27
- package/src/h5/report/index.ts +1 -1
- package/src/native/api/ads.ts +6 -2
- package/src/native/network/index.ts +11 -4
- package/src/native/types/native-method-map.d.ts +11 -0
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"packages/implement/.eslintrc.js": "7a3d2747dc887655ca9e2d3ff621f7dfd98500b9",
|
|
5
5
|
"packages/implement/README.md": "5660cd88848b7a5428394cc34d881a35dd402188",
|
|
6
6
|
"packages/implement/esbuild.config.js": "889e44fb2f426aae078b59a42fcfb9c2f28ebd89",
|
|
7
|
-
"packages/implement/package.json": "
|
|
7
|
+
"packages/implement/package.json": "823de089d4d3a03be54c1998b071043f784e037f",
|
|
8
8
|
"packages/implement/src/common/ads/ads-action-detection.ts": "5a7b9f85d7eab9e744f8a9fc7638063f43baa214",
|
|
9
9
|
"packages/implement/src/common/ads/anti-cheating.ts": "62e1b5d24aa246849a17ac8cde6cfdc66e577cab",
|
|
10
|
-
"packages/implement/src/common/ads/channel-policy.ts": "
|
|
11
|
-
"packages/implement/src/common/ads/index.ts": "
|
|
12
|
-
"packages/implement/src/common/api-factory/index.ts": "
|
|
10
|
+
"packages/implement/src/common/ads/channel-policy.ts": "c6d036be5cedf0c5d545fac271c6c8447ca55d8a",
|
|
11
|
+
"packages/implement/src/common/ads/index.ts": "926b053fbf348cbc74aa918dbde532e50faf936f",
|
|
12
|
+
"packages/implement/src/common/api-factory/index.ts": "a2b60f027384e37492ddde550dd46f3fb3e14cfe",
|
|
13
13
|
"packages/implement/src/common/api-factory/validator/__tests__/validate/any.test.ts": "6e225e09fce401b374221ad2e4fe33bc91df4152",
|
|
14
14
|
"packages/implement/src/common/api-factory/validator/__tests__/validate/array.test.ts": "8a9cc32be03e952f1176a970fea033d597c176cb",
|
|
15
15
|
"packages/implement/src/common/api-factory/validator/__tests__/validate/arraybuffer.test.ts": "be353282c36f813ef1301044572446dc9ea8cd3c",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"packages/implement/src/common/api-factory/validator/index.ts": "204e86b97c854647d177805e3180d4cfd542b0f8",
|
|
31
31
|
"packages/implement/src/common/api-factory/validator/validate.ts": "5fee8175a9a05a69fe709c7e7899e5372d81efb1",
|
|
32
32
|
"packages/implement/src/common/can-i-use.ts": "9a28562870d92b82ce42ec656c8e9d868dd87528",
|
|
33
|
-
"packages/implement/src/common/context/index.ts": "
|
|
33
|
+
"packages/implement/src/common/context/index.ts": "9c640b009220093720be645d986510964c8a1c09",
|
|
34
34
|
"packages/implement/src/common/context/types.ts": "244ff65de52dcbce2457ffee427f5fa102987825",
|
|
35
35
|
"packages/implement/src/common/context/url-parse.ts": "567bb6ee4124e0320431bd3c30fcae9759c99fa9",
|
|
36
36
|
"packages/implement/src/common/http/index.ts": "5087185d80e1e239262f849b3015eb9b810e2945",
|
|
37
37
|
"packages/implement/src/common/http/uuid.ts": "72e0bcc38976f6d25a55128843c6e3b0dbfd978e",
|
|
38
38
|
"packages/implement/src/common/http/xua.ts": "2ef571b8467fe5e8ecb470c26cb6da99b24be9a8",
|
|
39
|
-
"packages/implement/src/common/report/base-tracker.ts": "
|
|
39
|
+
"packages/implement/src/common/report/base-tracker.ts": "816cfde9160f260ad8703e5d65b1383ef09ce5a1",
|
|
40
40
|
"packages/implement/src/common/report/create-trace.ts": "38f54dbbf2e3aa55553395dbe2bb93dbdb9e07df",
|
|
41
|
-
"packages/implement/src/common/report/errors/index.ts": "
|
|
41
|
+
"packages/implement/src/common/report/errors/index.ts": "346132103c1f6b2a7c1324bea0c78896b5c6fca8",
|
|
42
42
|
"packages/implement/src/common/report/errors/report/index.ts": "bee6f5f324ebddcc423c3549916a0eee04e880cf",
|
|
43
|
-
"packages/implement/src/common/report/errors/report/listeners.ts": "
|
|
43
|
+
"packages/implement/src/common/report/errors/report/listeners.ts": "7aa3ec847f4c7e22304abe9efad62226dbced36f",
|
|
44
44
|
"packages/implement/src/common/report/index.ts": "6d94d6985cb79a460ab9e2e84fa1b77b5db2b25a",
|
|
45
45
|
"packages/implement/src/common/report/task-track/index.ts": "056d4ce9121648e94aa177e8e6b261adb455d244",
|
|
46
|
-
"packages/implement/src/common/report/track.ts": "
|
|
46
|
+
"packages/implement/src/common/report/track.ts": "1c71050f8caadfe7065f0db5a4a0708c264c21b4",
|
|
47
47
|
"packages/implement/src/common/report/types.ts": "72e1e2d96860335ce67df6c7083883e2b219f194",
|
|
48
48
|
"packages/implement/src/h5/api/ads.ts": "7a40ea4d3937a1d193e5bd1abd88f5f2cdd28f78",
|
|
49
49
|
"packages/implement/src/h5/api/base.ts": "ead2c3cdcbe174b0e725c31a3885c7985bd8f667",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"packages/implement/src/h5/api/storage.ts": "f6943bad6f8ee86213c78c8b51921ad509bbe357",
|
|
54
54
|
"packages/implement/src/h5/api/task.ts": "8bb87ad8874f6a3833901977b9b5659838c9aacf",
|
|
55
55
|
"packages/implement/src/h5/bootstrap/index.ts": "d20a81443849cdc2dbdce28c64f98e8ce0a4f36f",
|
|
56
|
-
"packages/implement/src/h5/http/index.ts": "
|
|
56
|
+
"packages/implement/src/h5/http/index.ts": "3ac24e79abe82f2ac2223d6c70aada6fce0240af",
|
|
57
57
|
"packages/implement/src/h5/http/utils/__tests__/xua.test.ts": "c92a065460d421b9e0723b4d6e74b1c5eed58102",
|
|
58
58
|
"packages/implement/src/h5/http/utils/index.ts": "05f4d94be09b9bfdcbb1365b31a5559e44a74991",
|
|
59
59
|
"packages/implement/src/h5/http/utils/session.ts": "4762a6a56762484f91ca5f2a456ab2cff3107659",
|
|
60
60
|
"packages/implement/src/h5/report/errors/index.ts": "22ef4184d6a6d272a5fefc1453a4a6d78ae8f2ff",
|
|
61
61
|
"packages/implement/src/h5/report/event-tracker.ts": "eb52379559e584a5b3f7a5241a3555b667b18c8c",
|
|
62
|
-
"packages/implement/src/h5/report/index.ts": "
|
|
62
|
+
"packages/implement/src/h5/report/index.ts": "a4129dd2efb9167cf18798de55a6dc2d010e7d9b",
|
|
63
63
|
"packages/implement/src/h5/report/task-tracker.ts": "184708c10b610b305f4f87af1639d9005486218e",
|
|
64
64
|
"packages/implement/src/index.native.ts": "39f7832965ef86a4bae707db859f64e9eb50b8af",
|
|
65
65
|
"packages/implement/src/index.ts": "28aedcd4086e5bc32597b371d02384a90308f805",
|
|
66
|
-
"packages/implement/src/native/api/ads.ts": "
|
|
66
|
+
"packages/implement/src/native/api/ads.ts": "bec8c772e1f881dc49030082e48b32af0c7db0fb",
|
|
67
67
|
"packages/implement/src/native/api/base.ts": "c4c4d04519cdbc3a08226c620f6314ee3b151435",
|
|
68
68
|
"packages/implement/src/native/api/get-system-info.ts": "d0132211c53425eed4811721ac5d577781b118a7",
|
|
69
69
|
"packages/implement/src/native/api/index.ts": "137dbcbeda2533a09d417d2b6c5d8dea992df9a6",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"packages/implement/src/native/js-core/message-port.ts": "7199fe2e9a89617bfce7853562ac0fd37772bce2",
|
|
89
89
|
"packages/implement/src/native/js-core/utils.ts": "a3639631f50764a5498f17949d3b9204fcc86fbf",
|
|
90
90
|
"packages/implement/src/native/network/create-fetch.ts": "e677cf812494994762afc48ddb8a6eca70a1936d",
|
|
91
|
-
"packages/implement/src/native/network/index.ts": "
|
|
91
|
+
"packages/implement/src/native/network/index.ts": "f57653dfa388545cbe7fb0a3f1eb9603c6208f45",
|
|
92
92
|
"packages/implement/src/native/network/report.ts": "705e9614faeb0611c9c57ced998885bdc3a02d11",
|
|
93
93
|
"packages/implement/src/native/network/types.ts": "4e8eb72bf0b0b26a5298ce42d96855d27769be51",
|
|
94
94
|
"packages/implement/src/native/network/utils.ts": "cc94ff34d8cda8e8a2a4731185c1d57c7dd04b92",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"packages/implement/src/native/report/index.ts": "ff134bfdc49cb36de8f40e6aababcef051b5d837",
|
|
97
97
|
"packages/implement/src/native/report/task-tracker.ts": "09f8bc1dd157fe9a2159c261278bd2a92930cee3",
|
|
98
98
|
"packages/implement/src/native/types/global.d.ts": "065076bbecdd9a0ffe7a71c19475356a6f816cee",
|
|
99
|
-
"packages/implement/src/native/types/native-method-map.d.ts": "
|
|
99
|
+
"packages/implement/src/native/types/native-method-map.d.ts": "5095851df53e1a63403f5d6135cbe2902bc9e6b0",
|
|
100
100
|
"packages/implement/src/native/types/native-method.d.ts": "e4e22c921a5b54d4e10fe5ca18158d691fbfe3e7",
|
|
101
101
|
"packages/implement/src/utils/index.ts": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
102
102
|
"packages/implement/tsconfig.json": "b150f4b2ef4eb9d98f92135d481fe530eb7145b5"
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
export interface IChannelPolicy {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The rate at which interstitial ads should be shown.
|
|
4
|
+
* A value of 1 means always bypass interstitials call, while a value of 0 means always forbid calling interstitials.
|
|
5
|
+
* A value between 0 and 1 means the interstitial call will be bypassed with a probability of `rate`.
|
|
6
|
+
*/
|
|
7
|
+
interstitialRate?: number;
|
|
3
8
|
}
|
|
4
|
-
|
|
9
|
+
interface HttpClient {
|
|
10
|
+
get<T>(url: string, options?: {
|
|
11
|
+
query?: Record<string, string>;
|
|
12
|
+
}): Promise<T>;
|
|
13
|
+
}
|
|
14
|
+
export declare class ChannelPolicy {
|
|
15
|
+
readonly httpClient: HttpClient;
|
|
16
|
+
private configs;
|
|
17
|
+
private firstRun;
|
|
18
|
+
constructor(httpClient: HttpClient);
|
|
19
|
+
private init;
|
|
20
|
+
/**
|
|
21
|
+
* Should bypass calling interstitial based on the channel policy.
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
shouldBypassCallingInterstitial(): boolean;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { IDevice, IPage, IEvent, EProject } from '@jolibox/common';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for event tracker, all the event tracker should inherit from this class
|
|
4
|
+
* Send event to oss reporter
|
|
5
|
+
* @abstract
|
|
6
|
+
*/
|
|
2
7
|
export declare abstract class EventTracker {
|
|
3
8
|
deviceInfo: IDevice | null;
|
|
4
9
|
abstract doReport(event: unknown[]): void;
|
|
5
10
|
abstract doReport<T extends Record<string, unknown>>(event: unknown[], extra: T): void;
|
|
6
11
|
abstract doReport<T extends Record<string, unknown>>(event: unknown[], extra?: T): void;
|
|
7
12
|
private pastTrackings;
|
|
13
|
+
private samplesConfig;
|
|
8
14
|
private pushPastTracking;
|
|
15
|
+
constructor();
|
|
9
16
|
get networkIsOk(): boolean;
|
|
17
|
+
private fetchSamplesConfig;
|
|
18
|
+
private checkIsSampled;
|
|
10
19
|
getDevice(): IDevice;
|
|
11
20
|
getLocation(): IPage;
|
|
12
21
|
trackEvent(event: IEvent, project: EProject, extraInfo?: Record<string, unknown>): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './report';
|
|
2
|
-
import { APIError,
|
|
2
|
+
import { APIError, UserValidateError } from '@jolibox/common';
|
|
3
3
|
export declare function formatErrorCode(method: string, code?: number): string;
|
|
4
4
|
export declare const createAPIError: (error: {
|
|
5
5
|
code: number;
|
|
@@ -9,5 +9,5 @@ export declare const createAPIError: (error: {
|
|
|
9
9
|
errNo?: number;
|
|
10
10
|
errMsg?: string;
|
|
11
11
|
}) => APIError;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const createUserValidateAPIError: (msg: string) => UserValidateError;
|
|
13
13
|
export { errorReportEmitter, ErrorData } from './report';
|
package/dist/h5/http/index.d.ts
CHANGED
|
@@ -12,18 +12,18 @@ export declare class JoliboxHttpClient implements IHttpClient {
|
|
|
12
12
|
private xua;
|
|
13
13
|
private getJoliSource;
|
|
14
14
|
constructor(config?: IHttpClientInitParams);
|
|
15
|
-
get<T>(path: string,
|
|
15
|
+
get<T>(path: string, configs?: {
|
|
16
16
|
query?: Record<string, string>;
|
|
17
17
|
headers?: Record<string, string>;
|
|
18
18
|
timeout?: number;
|
|
19
19
|
}): Promise<T>;
|
|
20
|
-
post<T = any>(path: string,
|
|
20
|
+
post<T = any>(path: string, configs?: {
|
|
21
21
|
data?: any;
|
|
22
22
|
query?: Record<string, string>;
|
|
23
23
|
headers?: Record<string, string>;
|
|
24
24
|
timeout?: number;
|
|
25
25
|
}): Promise<T>;
|
|
26
|
-
put<T>(path: string,
|
|
26
|
+
put<T>(path: string, configs?: {
|
|
27
27
|
data?: any;
|
|
28
28
|
query?: Record<string, string>;
|
|
29
29
|
headers?: Record<string, string>;
|