@zuplo/cli 6.71.21 → 6.71.23
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/node_modules/@posthog/core/dist/error-tracking/exception-steps.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/error-tracking/exception-steps.js +6 -24
- package/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs +7 -25
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts +6 -0
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.js +75 -17
- package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +73 -18
- package/node_modules/@posthog/core/dist/posthog-core.d.ts +2 -2
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.js +10 -6
- package/node_modules/@posthog/core/dist/posthog-core.mjs +11 -7
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.d.ts +1 -0
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.js +3 -0
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.mjs +3 -0
- package/node_modules/@posthog/core/dist/utils/promise-queue.d.ts +3 -0
- package/node_modules/@posthog/core/dist/utils/promise-queue.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/promise-queue.js +15 -3
- package/node_modules/@posthog/core/dist/utils/promise-queue.mjs +15 -3
- package/node_modules/@posthog/core/dist/utils/string-utils.d.ts +1 -0
- package/node_modules/@posthog/core/dist/utils/string-utils.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/string-utils.js +21 -0
- package/node_modules/@posthog/core/dist/utils/string-utils.mjs +19 -1
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/error-tracking/exception-steps.ts +5 -42
- package/node_modules/@posthog/core/src/posthog-core-stateless.ts +118 -23
- package/node_modules/@posthog/core/src/posthog-core.ts +18 -7
- package/node_modules/@posthog/core/src/testing/PostHogCoreTestClient.ts +4 -0
- package/node_modules/@posthog/core/src/utils/promise-queue.ts +17 -4
- package/node_modules/@posthog/core/src/utils/string-utils.spec.ts +38 -1
- package/node_modules/@posthog/core/src/utils/string-utils.ts +42 -0
- package/node_modules/@posthog/types/dist/posthog.d.ts +12 -0
- package/node_modules/@posthog/types/dist/posthog.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/posthog.ts +13 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.d.ts +64 -25
- package/node_modules/@types/node/crypto.d.ts +18 -5
- package/node_modules/@types/node/diagnostics_channel.d.ts +237 -3
- package/node_modules/@types/node/dns.d.ts +1 -1
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +3 -0
- package/node_modules/@types/node/fs.d.ts +21 -6
- package/node_modules/@types/node/http.d.ts +25 -0
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +14 -1
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/sqlite.d.ts +55 -0
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream.d.ts +32 -0
- package/node_modules/@types/node/test.d.ts +112 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
- package/node_modules/@types/node/util.d.ts +19 -2
- package/node_modules/@types/node/v8.d.ts +84 -2
- package/node_modules/@types/node/worker_threads.d.ts +8 -7
- package/node_modules/@zuplo/core/customer.cli.minified.js +2 -2
- package/node_modules/@zuplo/core/index.minified.js +2 -2
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/out/esm/index.js +11 -11
- package/node_modules/@zuplo/graphql/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-DQ4ANJLR.js → chunk-4MNJC7E2.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-4MNJC7E2.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-2Y72LML3.js → chunk-4QJJMELB.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-2Y72LML3.js.map → chunk-4QJJMELB.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-5CYWMN74.js +402 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-5CYWMN74.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-L3MZGNQA.js → chunk-DSZS6PZJ.js} +10 -10
- package/node_modules/@zuplo/runtime/out/esm/chunk-DSZS6PZJ.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +7 -7
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +1050 -18
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +33 -7
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
- package/node_modules/iconv-lite/encodings/utf32.js +10 -3
- package/node_modules/iconv-lite/package.json +2 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +5 -2
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/parse.js +3 -0
- package/node_modules/toad-cache/README.md +10 -9
- package/node_modules/toad-cache/dist/toad-cache.cjs +139 -139
- package/node_modules/toad-cache/dist/toad-cache.mjs +136 -140
- package/node_modules/toad-cache/package.json +8 -8
- package/node_modules/toad-cache/toad-cache.d.cts +20 -14
- package/node_modules/toad-cache/toad-cache.d.ts +18 -14
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-DQ4ANJLR.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-I5HLAHUY.js +0 -357
- package/node_modules/@zuplo/runtime/out/esm/chunk-I5HLAHUY.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-L3MZGNQA.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-I5HLAHUY.js.LEGAL.txt → chunk-5CYWMN74.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-L3MZGNQA.js.LEGAL.txt → chunk-DSZS6PZJ.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-steps.d.ts","sourceRoot":"","sources":["../../src/error-tracking/exception-steps.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,8BAA8B;;;CAGjC,CAAA;AAOV,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChD,CAAC,8BAA8B,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MA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8 +118,12 @@ function normalizePositiveInteger(input, fallback) {
|
|
|
118
118
|
return normalized;
|
|
119
119
|
}
|
|
120
120
|
function normalizeAndSerializeStep(step) {
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
let json;
|
|
122
|
+
try {
|
|
123
|
+
json = (0, index_js_namespaceObject.safeJsonStringify)(step);
|
|
124
|
+
} catch {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
123
127
|
try {
|
|
124
128
|
const parsed = JSON.parse(json);
|
|
125
129
|
if (!(0, index_js_namespaceObject.isObject)(parsed)) return;
|
|
@@ -136,28 +140,6 @@ function normalizeAndSerializeStep(step) {
|
|
|
136
140
|
return;
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
|
-
function safeStringify(value) {
|
|
140
|
-
const seen = new WeakSet();
|
|
141
|
-
try {
|
|
142
|
-
return JSON.stringify(value, (_key, replacementValue)=>{
|
|
143
|
-
if ('bigint' == typeof replacementValue) return replacementValue.toString();
|
|
144
|
-
if ('function' == typeof replacementValue || 'symbol' == typeof replacementValue) return;
|
|
145
|
-
if (replacementValue instanceof Date) return replacementValue.toISOString();
|
|
146
|
-
if (replacementValue instanceof Error) return {
|
|
147
|
-
name: replacementValue.name,
|
|
148
|
-
message: replacementValue.message,
|
|
149
|
-
stack: replacementValue.stack
|
|
150
|
-
};
|
|
151
|
-
if (replacementValue && 'object' == typeof replacementValue) {
|
|
152
|
-
if (seen.has(replacementValue)) return '[Circular]';
|
|
153
|
-
seen.add(replacementValue);
|
|
154
|
-
}
|
|
155
|
-
return replacementValue;
|
|
156
|
-
});
|
|
157
|
-
} catch {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
143
|
function getUtf8ByteLength(value) {
|
|
162
144
|
if ('undefined' != typeof TextEncoder) return new TextEncoder().encode(value).length;
|
|
163
145
|
const encoded = encodeURIComponent(value);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNumber, isObject, isString } from "../utils/index.mjs";
|
|
1
|
+
import { isNumber, isObject, isString, safeJsonStringify } from "../utils/index.mjs";
|
|
2
2
|
const EXCEPTION_STEP_INTERNAL_FIELDS = {
|
|
3
3
|
MESSAGE: '$message',
|
|
4
4
|
TIMESTAMP: '$timestamp'
|
|
@@ -85,8 +85,12 @@ function normalizePositiveInteger(input, fallback) {
|
|
|
85
85
|
return normalized;
|
|
86
86
|
}
|
|
87
87
|
function normalizeAndSerializeStep(step) {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
let json;
|
|
89
|
+
try {
|
|
90
|
+
json = safeJsonStringify(step);
|
|
91
|
+
} catch {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
90
94
|
try {
|
|
91
95
|
const parsed = JSON.parse(json);
|
|
92
96
|
if (!isObject(parsed)) return;
|
|
@@ -103,28 +107,6 @@ function normalizeAndSerializeStep(step) {
|
|
|
103
107
|
return;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
|
-
function safeStringify(value) {
|
|
107
|
-
const seen = new WeakSet();
|
|
108
|
-
try {
|
|
109
|
-
return JSON.stringify(value, (_key, replacementValue)=>{
|
|
110
|
-
if ('bigint' == typeof replacementValue) return replacementValue.toString();
|
|
111
|
-
if ('function' == typeof replacementValue || 'symbol' == typeof replacementValue) return;
|
|
112
|
-
if (replacementValue instanceof Date) return replacementValue.toISOString();
|
|
113
|
-
if (replacementValue instanceof Error) return {
|
|
114
|
-
name: replacementValue.name,
|
|
115
|
-
message: replacementValue.message,
|
|
116
|
-
stack: replacementValue.stack
|
|
117
|
-
};
|
|
118
|
-
if (replacementValue && 'object' == typeof replacementValue) {
|
|
119
|
-
if (seen.has(replacementValue)) return '[Circular]';
|
|
120
|
-
seen.add(replacementValue);
|
|
121
|
-
}
|
|
122
|
-
return replacementValue;
|
|
123
|
-
});
|
|
124
|
-
} catch {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
110
|
function getUtf8ByteLength(value) {
|
|
129
111
|
if ('undefined' != typeof TextEncoder) return new TextEncoder().encode(value).length;
|
|
130
112
|
const encoded = encodeURIComponent(value);
|
|
@@ -9,6 +9,7 @@ declare class PostHogFetchNetworkError extends Error {
|
|
|
9
9
|
constructor(error: unknown);
|
|
10
10
|
}
|
|
11
11
|
export declare const maybeAdd: (key: string, value: JsonType | undefined) => Record<string, JsonType>;
|
|
12
|
+
export declare const applyCallerFeatureFlagOverrides: (target: PostHogEventProperties, callerProperties: PostHogEventProperties) => void;
|
|
12
13
|
export declare function logFlushError(err: any): Promise<void>;
|
|
13
14
|
/**
|
|
14
15
|
* True for the network error PostHog throws when a request fails to reach the server
|
|
@@ -55,6 +56,7 @@ export declare abstract class PostHogCoreStateless {
|
|
|
55
56
|
private maxQueueSize;
|
|
56
57
|
private flushInterval;
|
|
57
58
|
private flushPromise;
|
|
59
|
+
private flushPromises;
|
|
58
60
|
private shutdownPromise;
|
|
59
61
|
private requestTimeout;
|
|
60
62
|
private featureFlagsRequestTimeoutMs;
|
|
@@ -152,6 +154,7 @@ export declare abstract class PostHogCoreStateless {
|
|
|
152
154
|
*** GROUPS
|
|
153
155
|
***/
|
|
154
156
|
protected groupIdentifyStateless(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions, distinctId?: string, eventProperties?: PostHogEventProperties): void;
|
|
157
|
+
protected groupIdentifyStatelessImmediate(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions, distinctId?: string, eventProperties?: PostHogEventProperties): Promise<void>;
|
|
155
158
|
protected getRemoteConfig(): Promise<PostHogRemoteConfig | undefined>;
|
|
156
159
|
/***
|
|
157
160
|
*** FEATURE FLAGS
|
|
@@ -221,6 +224,7 @@ export declare abstract class PostHogCoreStateless {
|
|
|
221
224
|
* Avoids unnecessary promise errors
|
|
222
225
|
*/
|
|
223
226
|
private flushBackground;
|
|
227
|
+
private waitForPendingPromises;
|
|
224
228
|
/**
|
|
225
229
|
* Flushes the queue of pending events.
|
|
226
230
|
*
|
|
@@ -249,7 +253,9 @@ export declare abstract class PostHogCoreStateless {
|
|
|
249
253
|
* @throws PostHogFetchNetworkError
|
|
250
254
|
* @throws Error
|
|
251
255
|
*/
|
|
256
|
+
protected flushWithPendingPromises(): Promise<void>;
|
|
252
257
|
flush(): Promise<void>;
|
|
258
|
+
private flushInternal;
|
|
253
259
|
protected getCustomHeaders(): {
|
|
254
260
|
[key: string]: string;
|
|
255
261
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog-core-stateless.d.ts","sourceRoot":"","sources":["../src/posthog-core-stateless.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAGhB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EAExB,MAAM,EACN,cAAc,EAEf,MAAM,SAAS,CAAA;AAChB,OAAO,EAML,gBAAgB,
|
|
1
|
+
{"version":3,"file":"posthog-core-stateless.d.ts","sourceRoot":"","sources":["../src/posthog-core-stateless.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAGhB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EAExB,MAAM,EACN,cAAc,EAEf,MAAM,SAAS,CAAA;AAChB,OAAO,EAML,gBAAgB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AsBG;IACG,QAAQ,CAAC,iBAAiB,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAYjE"}
|
|
@@ -24,11 +24,12 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
isPostHogFetchNetworkError: ()=>isPostHogFetchNetworkError,
|
|
27
28
|
maybeAdd: ()=>maybeAdd,
|
|
28
29
|
logFlushError: ()=>logFlushError,
|
|
29
30
|
PostHogCoreStateless: ()=>PostHogCoreStateless,
|
|
30
31
|
QuotaLimitedFeature: ()=>posthog_core_stateless_QuotaLimitedFeature,
|
|
31
|
-
|
|
32
|
+
applyCallerFeatureFlagOverrides: ()=>applyCallerFeatureFlagOverrides
|
|
32
33
|
});
|
|
33
34
|
const external_eventemitter_js_namespaceObject = require("./eventemitter.js");
|
|
34
35
|
const external_featureFlagUtils_js_namespaceObject = require("./featureFlagUtils.js");
|
|
@@ -61,6 +62,9 @@ class PostHogFetchNetworkError extends Error {
|
|
|
61
62
|
const maybeAdd = (key, value)=>void 0 !== value ? {
|
|
62
63
|
[key]: value
|
|
63
64
|
} : {};
|
|
65
|
+
const applyCallerFeatureFlagOverrides = (target, callerProperties)=>{
|
|
66
|
+
for (const key of Object.keys(callerProperties))if (key.startsWith('$feature/') || '$active_feature_flags' === key) target[key] = callerProperties[key];
|
|
67
|
+
};
|
|
64
68
|
async function logFlushError(err) {
|
|
65
69
|
if (err instanceof PostHogFetchHttpError) {
|
|
66
70
|
let text = '';
|
|
@@ -78,6 +82,7 @@ function isPostHogFetchNetworkError(err) {
|
|
|
78
82
|
return err instanceof PostHogFetchNetworkError;
|
|
79
83
|
}
|
|
80
84
|
function isRetryableFlagsFetchError(err) {
|
|
85
|
+
if (err instanceof PostHogFetchHttpError) return 502 === err.status || 504 === err.status;
|
|
81
86
|
if (!(err instanceof PostHogFetchNetworkError)) return false;
|
|
82
87
|
const cause = err.error;
|
|
83
88
|
const code = cause?.code ?? cause?.cause?.code;
|
|
@@ -86,6 +91,10 @@ function isRetryableFlagsFetchError(err) {
|
|
|
86
91
|
function isPostHogFetchContentTooLargeError(err) {
|
|
87
92
|
return 'object' == typeof err && err instanceof PostHogFetchHttpError && 413 === err.status;
|
|
88
93
|
}
|
|
94
|
+
function isPostHogFetchRetryableError(err) {
|
|
95
|
+
if (err instanceof PostHogFetchHttpError) return 408 === err.status || 429 === err.status || err.status >= 500;
|
|
96
|
+
return isPostHogFetchNetworkError(err);
|
|
97
|
+
}
|
|
89
98
|
function isPostHogEventProperties(value) {
|
|
90
99
|
return null !== value && 'object' == typeof value && !Array.isArray(value);
|
|
91
100
|
}
|
|
@@ -109,6 +118,7 @@ class PostHogCoreStateless {
|
|
|
109
118
|
}
|
|
110
119
|
constructor(apiKey, options = {}){
|
|
111
120
|
this.flushPromise = null;
|
|
121
|
+
this.flushPromises = new Set();
|
|
112
122
|
this.shutdownPromise = null;
|
|
113
123
|
this.promiseQueue = new index_js_namespaceObject.PromiseQueue();
|
|
114
124
|
this._events = new external_eventemitter_js_namespaceObject.SimpleEventEmitter();
|
|
@@ -130,7 +140,7 @@ class PostHogCoreStateless {
|
|
|
130
140
|
this._retryOptions = {
|
|
131
141
|
retryCount: options.fetchRetryCount ?? 3,
|
|
132
142
|
retryDelay: options.fetchRetryDelay ?? 3000,
|
|
133
|
-
retryCheck:
|
|
143
|
+
retryCheck: isPostHogFetchRetryableError
|
|
134
144
|
};
|
|
135
145
|
this.requestTimeout = options.requestTimeout ?? 10000;
|
|
136
146
|
this.featureFlagsRequestTimeoutMs = options.featureFlagsRequestTimeoutMs ?? 3000;
|
|
@@ -192,13 +202,16 @@ class PostHogCoreStateless {
|
|
|
192
202
|
return this.disabled;
|
|
193
203
|
}
|
|
194
204
|
buildPayload(payload) {
|
|
205
|
+
const userProperties = payload.properties || {};
|
|
206
|
+
const properties = {
|
|
207
|
+
...userProperties,
|
|
208
|
+
...this.getCommonEventProperties()
|
|
209
|
+
};
|
|
210
|
+
applyCallerFeatureFlagOverrides(properties, userProperties);
|
|
195
211
|
return {
|
|
196
212
|
distinct_id: payload.distinct_id,
|
|
197
213
|
event: payload.event,
|
|
198
|
-
properties
|
|
199
|
-
...payload.properties || {},
|
|
200
|
-
...this.getCommonEventProperties()
|
|
201
|
-
}
|
|
214
|
+
properties
|
|
202
215
|
};
|
|
203
216
|
}
|
|
204
217
|
addPendingPromise(promise) {
|
|
@@ -285,6 +298,19 @@ class PostHogCoreStateless {
|
|
|
285
298
|
this.enqueue('capture', payload, options);
|
|
286
299
|
});
|
|
287
300
|
}
|
|
301
|
+
async groupIdentifyStatelessImmediate(groupType, groupKey, groupProperties, options, distinctId, eventProperties) {
|
|
302
|
+
const payload = this.buildPayload({
|
|
303
|
+
distinct_id: distinctId || `$${groupType}_${groupKey}`,
|
|
304
|
+
event: '$groupidentify',
|
|
305
|
+
properties: {
|
|
306
|
+
$group_type: groupType,
|
|
307
|
+
$group_key: groupKey,
|
|
308
|
+
$group_set: groupProperties || {},
|
|
309
|
+
...eventProperties || {}
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
await this.sendImmediate('capture', payload, options);
|
|
313
|
+
}
|
|
288
314
|
async getRemoteConfig() {
|
|
289
315
|
await this._initPromise;
|
|
290
316
|
let host = this.host;
|
|
@@ -423,8 +449,9 @@ class PostHogCoreStateless {
|
|
|
423
449
|
}
|
|
424
450
|
async getFeatureFlagDetailsStateless(distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip, flagKeysToEvaluate) {
|
|
425
451
|
await this._initPromise;
|
|
426
|
-
const extraPayload = {
|
|
427
|
-
|
|
452
|
+
const extraPayload = {
|
|
453
|
+
geoip_disable: disableGeoip ?? this.disableGeoip
|
|
454
|
+
};
|
|
428
455
|
if (flagKeysToEvaluate) extraPayload['flag_keys_to_evaluate'] = flagKeysToEvaluate;
|
|
429
456
|
const result = await this.getFlags(distinctId, groups, personProperties, groupProperties, extraPayload);
|
|
430
457
|
if (!result.success) return;
|
|
@@ -537,7 +564,7 @@ class PostHogCoreStateless {
|
|
|
537
564
|
sent_at: (0, index_js_namespaceObject.currentISOTime)()
|
|
538
565
|
};
|
|
539
566
|
if (this.historicalMigration) data.historical_migration = true;
|
|
540
|
-
const payload =
|
|
567
|
+
const payload = (0, index_js_namespaceObject.safeJsonStringify)(data);
|
|
541
568
|
const url = `${this.host}/batch/`;
|
|
542
569
|
const gzippedPayload = this.disableCompression ? null : await (0, external_gzip_js_namespaceObject.gzipCompress)(payload, this.isDebug);
|
|
543
570
|
const fetchOptions = {
|
|
@@ -601,16 +628,45 @@ class PostHogCoreStateless {
|
|
|
601
628
|
await logFlushError(err);
|
|
602
629
|
});
|
|
603
630
|
}
|
|
604
|
-
async
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
631
|
+
async waitForPendingPromises(maxPromiseId, ignoredPromises = []) {
|
|
632
|
+
const ignoredPendingPromises = ignoredPromises.filter((promise)=>!!promise);
|
|
633
|
+
let iteration = 0;
|
|
634
|
+
while(true){
|
|
635
|
+
const promises = this.promiseQueue.getPromises([
|
|
636
|
+
...ignoredPendingPromises,
|
|
637
|
+
...this.flushPromises
|
|
638
|
+
], maxPromiseId);
|
|
639
|
+
if (0 === promises.length) return;
|
|
640
|
+
if (iteration > 0) this._logger.debug(`flush() re-checking ${promises.length} pending promise(s) before flushing`);
|
|
641
|
+
await Promise.all(promises.map((promise)=>promise.catch(()=>{})));
|
|
642
|
+
iteration++;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
flushWithPendingPromises() {
|
|
646
|
+
return this.flushInternal(true);
|
|
647
|
+
}
|
|
648
|
+
flush() {
|
|
649
|
+
return this.flushInternal(false);
|
|
650
|
+
}
|
|
651
|
+
flushInternal(waitForPendingPromises) {
|
|
652
|
+
if (this.disabled) return Promise.resolve();
|
|
653
|
+
const previousFlushPromise = this.flushPromise;
|
|
654
|
+
const maxPromiseId = this.promiseQueue.maxId;
|
|
655
|
+
const nextFlushPromise = Promise.resolve().then(()=>{
|
|
656
|
+
if (waitForPendingPromises) return this.waitForPendingPromises(maxPromiseId, [
|
|
657
|
+
previousFlushPromise,
|
|
658
|
+
nextFlushPromise
|
|
659
|
+
]);
|
|
660
|
+
}).then(()=>(0, index_js_namespaceObject.allSettled)([
|
|
661
|
+
previousFlushPromise
|
|
662
|
+
])).then(()=>this._flush());
|
|
609
663
|
this.flushPromise = nextFlushPromise;
|
|
664
|
+
this.flushPromises.add(nextFlushPromise);
|
|
610
665
|
this.addPendingPromise(nextFlushPromise);
|
|
611
666
|
(0, index_js_namespaceObject.allSettled)([
|
|
612
667
|
nextFlushPromise
|
|
613
668
|
]).then(()=>{
|
|
669
|
+
this.flushPromises.delete(nextFlushPromise);
|
|
614
670
|
if (this.flushPromise === nextFlushPromise) this.flushPromise = null;
|
|
615
671
|
});
|
|
616
672
|
return nextFlushPromise;
|
|
@@ -644,7 +700,7 @@ class PostHogCoreStateless {
|
|
|
644
700
|
sent_at: (0, index_js_namespaceObject.currentISOTime)()
|
|
645
701
|
};
|
|
646
702
|
if (this.historicalMigration) data.historical_migration = true;
|
|
647
|
-
const payload =
|
|
703
|
+
const payload = (0, index_js_namespaceObject.safeJsonStringify)(data);
|
|
648
704
|
const url = `${this.host}/batch/`;
|
|
649
705
|
const gzippedPayload = this.disableCompression ? null : await (0, external_gzip_js_namespaceObject.gzipCompress)(payload, this.isDebug);
|
|
650
706
|
const fetchOptions = {
|
|
@@ -661,7 +717,7 @@ class PostHogCoreStateless {
|
|
|
661
717
|
const retryOptions = {
|
|
662
718
|
retryCheck: (err)=>{
|
|
663
719
|
if (isPostHogFetchContentTooLargeError(err)) return false;
|
|
664
|
-
return
|
|
720
|
+
return isPostHogFetchRetryableError(err);
|
|
665
721
|
}
|
|
666
722
|
};
|
|
667
723
|
try {
|
|
@@ -705,7 +761,7 @@ class PostHogCoreStateless {
|
|
|
705
761
|
await this.fetchWithRetry(url, fetchOptions, {
|
|
706
762
|
retryCheck: (err)=>{
|
|
707
763
|
if (isPostHogFetchContentTooLargeError(err)) return false;
|
|
708
|
-
return
|
|
764
|
+
return isPostHogFetchRetryableError(err);
|
|
709
765
|
}
|
|
710
766
|
});
|
|
711
767
|
return {
|
|
@@ -805,12 +861,14 @@ class PostHogCoreStateless {
|
|
|
805
861
|
}
|
|
806
862
|
exports.PostHogCoreStateless = __webpack_exports__.PostHogCoreStateless;
|
|
807
863
|
exports.QuotaLimitedFeature = __webpack_exports__.QuotaLimitedFeature;
|
|
864
|
+
exports.applyCallerFeatureFlagOverrides = __webpack_exports__.applyCallerFeatureFlagOverrides;
|
|
808
865
|
exports.isPostHogFetchNetworkError = __webpack_exports__.isPostHogFetchNetworkError;
|
|
809
866
|
exports.logFlushError = __webpack_exports__.logFlushError;
|
|
810
867
|
exports.maybeAdd = __webpack_exports__.maybeAdd;
|
|
811
868
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
812
869
|
"PostHogCoreStateless",
|
|
813
870
|
"QuotaLimitedFeature",
|
|
871
|
+
"applyCallerFeatureFlagOverrides",
|
|
814
872
|
"isPostHogFetchNetworkError",
|
|
815
873
|
"logFlushError",
|
|
816
874
|
"maybeAdd"
|
|
@@ -2,7 +2,7 @@ import { SimpleEventEmitter } from "./eventemitter.mjs";
|
|
|
2
2
|
import { getFeatureFlagValue, normalizeFlagsResponse } from "./featureFlagUtils.mjs";
|
|
3
3
|
import { gzipCompress, isGzipSupported } from "./gzip.mjs";
|
|
4
4
|
import { PostHogPersistedProperty } from "./types.mjs";
|
|
5
|
-
import { PromiseQueue, STRING_FORMAT, allSettled, createLogger, currentISOTime, getEventUuid, removeTrailingSlash, retriable, safeSetTimeout } from "./utils/index.mjs";
|
|
5
|
+
import { PromiseQueue, STRING_FORMAT, allSettled, createLogger, currentISOTime, getEventUuid, removeTrailingSlash, retriable, safeJsonStringify, safeSetTimeout } from "./utils/index.mjs";
|
|
6
6
|
import { uuidv7 } from "./vendor/uuidv7.mjs";
|
|
7
7
|
import { ErrorCoercer, ErrorPropertiesBuilder, ObjectCoercer, PrimitiveCoercer, StringCoercer, createDefaultStackParser } from "./error-tracking/index.mjs";
|
|
8
8
|
class PostHogFetchHttpError extends Error {
|
|
@@ -29,6 +29,9 @@ class PostHogFetchNetworkError extends Error {
|
|
|
29
29
|
const maybeAdd = (key, value)=>void 0 !== value ? {
|
|
30
30
|
[key]: value
|
|
31
31
|
} : {};
|
|
32
|
+
const applyCallerFeatureFlagOverrides = (target, callerProperties)=>{
|
|
33
|
+
for (const key of Object.keys(callerProperties))if (key.startsWith('$feature/') || '$active_feature_flags' === key) target[key] = callerProperties[key];
|
|
34
|
+
};
|
|
32
35
|
async function logFlushError(err) {
|
|
33
36
|
if (err instanceof PostHogFetchHttpError) {
|
|
34
37
|
let text = '';
|
|
@@ -46,6 +49,7 @@ function isPostHogFetchNetworkError(err) {
|
|
|
46
49
|
return err instanceof PostHogFetchNetworkError;
|
|
47
50
|
}
|
|
48
51
|
function isRetryableFlagsFetchError(err) {
|
|
52
|
+
if (err instanceof PostHogFetchHttpError) return 502 === err.status || 504 === err.status;
|
|
49
53
|
if (!(err instanceof PostHogFetchNetworkError)) return false;
|
|
50
54
|
const cause = err.error;
|
|
51
55
|
const code = cause?.code ?? cause?.cause?.code;
|
|
@@ -54,6 +58,10 @@ function isRetryableFlagsFetchError(err) {
|
|
|
54
58
|
function isPostHogFetchContentTooLargeError(err) {
|
|
55
59
|
return 'object' == typeof err && err instanceof PostHogFetchHttpError && 413 === err.status;
|
|
56
60
|
}
|
|
61
|
+
function isPostHogFetchRetryableError(err) {
|
|
62
|
+
if (err instanceof PostHogFetchHttpError) return 408 === err.status || 429 === err.status || err.status >= 500;
|
|
63
|
+
return isPostHogFetchNetworkError(err);
|
|
64
|
+
}
|
|
57
65
|
function isPostHogEventProperties(value) {
|
|
58
66
|
return null !== value && 'object' == typeof value && !Array.isArray(value);
|
|
59
67
|
}
|
|
@@ -77,6 +85,7 @@ class PostHogCoreStateless {
|
|
|
77
85
|
}
|
|
78
86
|
constructor(apiKey, options = {}){
|
|
79
87
|
this.flushPromise = null;
|
|
88
|
+
this.flushPromises = new Set();
|
|
80
89
|
this.shutdownPromise = null;
|
|
81
90
|
this.promiseQueue = new PromiseQueue();
|
|
82
91
|
this._events = new SimpleEventEmitter();
|
|
@@ -98,7 +107,7 @@ class PostHogCoreStateless {
|
|
|
98
107
|
this._retryOptions = {
|
|
99
108
|
retryCount: options.fetchRetryCount ?? 3,
|
|
100
109
|
retryDelay: options.fetchRetryDelay ?? 3000,
|
|
101
|
-
retryCheck:
|
|
110
|
+
retryCheck: isPostHogFetchRetryableError
|
|
102
111
|
};
|
|
103
112
|
this.requestTimeout = options.requestTimeout ?? 10000;
|
|
104
113
|
this.featureFlagsRequestTimeoutMs = options.featureFlagsRequestTimeoutMs ?? 3000;
|
|
@@ -160,13 +169,16 @@ class PostHogCoreStateless {
|
|
|
160
169
|
return this.disabled;
|
|
161
170
|
}
|
|
162
171
|
buildPayload(payload) {
|
|
172
|
+
const userProperties = payload.properties || {};
|
|
173
|
+
const properties = {
|
|
174
|
+
...userProperties,
|
|
175
|
+
...this.getCommonEventProperties()
|
|
176
|
+
};
|
|
177
|
+
applyCallerFeatureFlagOverrides(properties, userProperties);
|
|
163
178
|
return {
|
|
164
179
|
distinct_id: payload.distinct_id,
|
|
165
180
|
event: payload.event,
|
|
166
|
-
properties
|
|
167
|
-
...payload.properties || {},
|
|
168
|
-
...this.getCommonEventProperties()
|
|
169
|
-
}
|
|
181
|
+
properties
|
|
170
182
|
};
|
|
171
183
|
}
|
|
172
184
|
addPendingPromise(promise) {
|
|
@@ -253,6 +265,19 @@ class PostHogCoreStateless {
|
|
|
253
265
|
this.enqueue('capture', payload, options);
|
|
254
266
|
});
|
|
255
267
|
}
|
|
268
|
+
async groupIdentifyStatelessImmediate(groupType, groupKey, groupProperties, options, distinctId, eventProperties) {
|
|
269
|
+
const payload = this.buildPayload({
|
|
270
|
+
distinct_id: distinctId || `$${groupType}_${groupKey}`,
|
|
271
|
+
event: '$groupidentify',
|
|
272
|
+
properties: {
|
|
273
|
+
$group_type: groupType,
|
|
274
|
+
$group_key: groupKey,
|
|
275
|
+
$group_set: groupProperties || {},
|
|
276
|
+
...eventProperties || {}
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
await this.sendImmediate('capture', payload, options);
|
|
280
|
+
}
|
|
256
281
|
async getRemoteConfig() {
|
|
257
282
|
await this._initPromise;
|
|
258
283
|
let host = this.host;
|
|
@@ -391,8 +416,9 @@ class PostHogCoreStateless {
|
|
|
391
416
|
}
|
|
392
417
|
async getFeatureFlagDetailsStateless(distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip, flagKeysToEvaluate) {
|
|
393
418
|
await this._initPromise;
|
|
394
|
-
const extraPayload = {
|
|
395
|
-
|
|
419
|
+
const extraPayload = {
|
|
420
|
+
geoip_disable: disableGeoip ?? this.disableGeoip
|
|
421
|
+
};
|
|
396
422
|
if (flagKeysToEvaluate) extraPayload['flag_keys_to_evaluate'] = flagKeysToEvaluate;
|
|
397
423
|
const result = await this.getFlags(distinctId, groups, personProperties, groupProperties, extraPayload);
|
|
398
424
|
if (!result.success) return;
|
|
@@ -505,7 +531,7 @@ class PostHogCoreStateless {
|
|
|
505
531
|
sent_at: currentISOTime()
|
|
506
532
|
};
|
|
507
533
|
if (this.historicalMigration) data.historical_migration = true;
|
|
508
|
-
const payload =
|
|
534
|
+
const payload = safeJsonStringify(data);
|
|
509
535
|
const url = `${this.host}/batch/`;
|
|
510
536
|
const gzippedPayload = this.disableCompression ? null : await gzipCompress(payload, this.isDebug);
|
|
511
537
|
const fetchOptions = {
|
|
@@ -569,16 +595,45 @@ class PostHogCoreStateless {
|
|
|
569
595
|
await logFlushError(err);
|
|
570
596
|
});
|
|
571
597
|
}
|
|
572
|
-
async
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
598
|
+
async waitForPendingPromises(maxPromiseId, ignoredPromises = []) {
|
|
599
|
+
const ignoredPendingPromises = ignoredPromises.filter((promise)=>!!promise);
|
|
600
|
+
let iteration = 0;
|
|
601
|
+
while(true){
|
|
602
|
+
const promises = this.promiseQueue.getPromises([
|
|
603
|
+
...ignoredPendingPromises,
|
|
604
|
+
...this.flushPromises
|
|
605
|
+
], maxPromiseId);
|
|
606
|
+
if (0 === promises.length) return;
|
|
607
|
+
if (iteration > 0) this._logger.debug(`flush() re-checking ${promises.length} pending promise(s) before flushing`);
|
|
608
|
+
await Promise.all(promises.map((promise)=>promise.catch(()=>{})));
|
|
609
|
+
iteration++;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
flushWithPendingPromises() {
|
|
613
|
+
return this.flushInternal(true);
|
|
614
|
+
}
|
|
615
|
+
flush() {
|
|
616
|
+
return this.flushInternal(false);
|
|
617
|
+
}
|
|
618
|
+
flushInternal(waitForPendingPromises) {
|
|
619
|
+
if (this.disabled) return Promise.resolve();
|
|
620
|
+
const previousFlushPromise = this.flushPromise;
|
|
621
|
+
const maxPromiseId = this.promiseQueue.maxId;
|
|
622
|
+
const nextFlushPromise = Promise.resolve().then(()=>{
|
|
623
|
+
if (waitForPendingPromises) return this.waitForPendingPromises(maxPromiseId, [
|
|
624
|
+
previousFlushPromise,
|
|
625
|
+
nextFlushPromise
|
|
626
|
+
]);
|
|
627
|
+
}).then(()=>allSettled([
|
|
628
|
+
previousFlushPromise
|
|
629
|
+
])).then(()=>this._flush());
|
|
577
630
|
this.flushPromise = nextFlushPromise;
|
|
631
|
+
this.flushPromises.add(nextFlushPromise);
|
|
578
632
|
this.addPendingPromise(nextFlushPromise);
|
|
579
633
|
allSettled([
|
|
580
634
|
nextFlushPromise
|
|
581
635
|
]).then(()=>{
|
|
636
|
+
this.flushPromises.delete(nextFlushPromise);
|
|
582
637
|
if (this.flushPromise === nextFlushPromise) this.flushPromise = null;
|
|
583
638
|
});
|
|
584
639
|
return nextFlushPromise;
|
|
@@ -612,7 +667,7 @@ class PostHogCoreStateless {
|
|
|
612
667
|
sent_at: currentISOTime()
|
|
613
668
|
};
|
|
614
669
|
if (this.historicalMigration) data.historical_migration = true;
|
|
615
|
-
const payload =
|
|
670
|
+
const payload = safeJsonStringify(data);
|
|
616
671
|
const url = `${this.host}/batch/`;
|
|
617
672
|
const gzippedPayload = this.disableCompression ? null : await gzipCompress(payload, this.isDebug);
|
|
618
673
|
const fetchOptions = {
|
|
@@ -629,7 +684,7 @@ class PostHogCoreStateless {
|
|
|
629
684
|
const retryOptions = {
|
|
630
685
|
retryCheck: (err)=>{
|
|
631
686
|
if (isPostHogFetchContentTooLargeError(err)) return false;
|
|
632
|
-
return
|
|
687
|
+
return isPostHogFetchRetryableError(err);
|
|
633
688
|
}
|
|
634
689
|
};
|
|
635
690
|
try {
|
|
@@ -673,7 +728,7 @@ class PostHogCoreStateless {
|
|
|
673
728
|
await this.fetchWithRetry(url, fetchOptions, {
|
|
674
729
|
retryCheck: (err)=>{
|
|
675
730
|
if (isPostHogFetchContentTooLargeError(err)) return false;
|
|
676
|
-
return
|
|
731
|
+
return isPostHogFetchRetryableError(err);
|
|
677
732
|
}
|
|
678
733
|
});
|
|
679
734
|
return {
|
|
@@ -771,4 +826,4 @@ class PostHogCoreStateless {
|
|
|
771
826
|
return this.shutdownPromise;
|
|
772
827
|
}
|
|
773
828
|
}
|
|
774
|
-
export { PostHogCoreStateless, posthog_core_stateless_QuotaLimitedFeature as QuotaLimitedFeature, isPostHogFetchNetworkError, logFlushError, maybeAdd };
|
|
829
|
+
export { PostHogCoreStateless, posthog_core_stateless_QuotaLimitedFeature as QuotaLimitedFeature, applyCallerFeatureFlagOverrides, isPostHogFetchNetworkError, logFlushError, maybeAdd };
|
|
@@ -154,7 +154,7 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
154
154
|
*/
|
|
155
155
|
missingFlagBehavior?: 'getFeatureFlag' | 'getFeatureFlagPayload';
|
|
156
156
|
}): FeatureFlagResult | undefined;
|
|
157
|
-
getFeatureFlag(key: string): FeatureFlagValue | undefined;
|
|
157
|
+
getFeatureFlag(key: string, options?: FeatureFlagResultOptions): FeatureFlagValue | undefined;
|
|
158
158
|
/**
|
|
159
159
|
* @deprecated Use `getFeatureFlagResult()` instead, which returns the flag value and payload from a single evaluation.
|
|
160
160
|
*/
|
|
@@ -166,7 +166,7 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
166
166
|
flags: PostHogFlagsResponse['featureFlags'] | undefined;
|
|
167
167
|
payloads: PostHogFlagsResponse['featureFlagPayloads'] | undefined;
|
|
168
168
|
};
|
|
169
|
-
isFeatureEnabled(key: string): boolean | undefined;
|
|
169
|
+
isFeatureEnabled(key: string, options?: FeatureFlagResultOptions): boolean | undefined;
|
|
170
170
|
reloadFeatureFlags(options?: {
|
|
171
171
|
cb?: (err?: Error, flags?: PostHogFlagsResponse['featureFlags']) => void;
|
|
172
172
|
}): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog-core.d.ts","sourceRoot":"","sources":["../src/posthog-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EAGxB,yBAAyB,EAKzB,sBAAsB,EAGvB,MAAM,SAAS,CAAA;AAahB,OAAO,EAAiC,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"posthog-core.d.ts","sourceRoot":"","sources":["../src/posthog-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,g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