@zuplo/cli 7.9.14 → 7.9.15
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/privacy.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/privacy.js +5 -2
- package/node_modules/@posthog/core/dist/privacy.mjs +5 -2
- package/node_modules/@posthog/core/package.json +3 -2
- package/node_modules/@posthog/core/src/privacy.ts +8 -2
- package/node_modules/@posthog/core/surveys/package.json +6 -0
- package/node_modules/@zuplo/core/package.json +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-Q3IDJ2WR.js → chunk-CBNXKT6K.js} +31 -31
- package/node_modules/@zuplo/runtime/out/esm/{chunk-Q3IDJ2WR.js.map → chunk-CBNXKT6K.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +1 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +11 -11
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-Q3IDJ2WR.js.LEGAL.txt → chunk-CBNXKT6K.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../src/privacy.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;CACzB;
|
|
1
|
+
{"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../src/privacy.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AA2iBD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAKxF;AA6DD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAE/F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAE/F"}
|
|
@@ -95,7 +95,10 @@ function sanitizeUrlFields(fields, allowNestedUrls) {
|
|
|
95
95
|
const sanitized = new URLSearchParams();
|
|
96
96
|
let changed = false;
|
|
97
97
|
let lastFieldSensitive = false;
|
|
98
|
-
for (const [
|
|
98
|
+
for (const [decodedKey, decodedValue] of new URLSearchParams(fields)){
|
|
99
|
+
const key = redactCredentials(decodedKey);
|
|
100
|
+
const value = redactCredentials(decodedValue);
|
|
101
|
+
changed ||= key !== decodedKey || value !== decodedValue;
|
|
99
102
|
const sanitizedValue = sanitizeUrlFieldValue(key, value, allowNestedUrls);
|
|
100
103
|
changed ||= sanitizedValue !== value;
|
|
101
104
|
lastFieldSensitive = shouldRedactQueryKey(key) || sanitizedValue !== value;
|
|
@@ -237,7 +240,7 @@ function sanitizeSingleUrl(value, mode) {
|
|
|
237
240
|
changed = true;
|
|
238
241
|
}
|
|
239
242
|
const trailingFields = hasFragment ? sanitizedTail ?? sanitizedHead : sanitizedQuery;
|
|
240
|
-
return (changed ? url.toString() : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
|
|
243
|
+
return (changed ? redactCredentials(url.toString()) : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
|
|
241
244
|
}
|
|
242
245
|
function sanitizeUrlsInString(text, mode) {
|
|
243
246
|
return text.replace(URL_PATTERN, (match)=>sanitizeUrl(match, {
|
|
@@ -66,7 +66,10 @@ function sanitizeUrlFields(fields, allowNestedUrls) {
|
|
|
66
66
|
const sanitized = new URLSearchParams();
|
|
67
67
|
let changed = false;
|
|
68
68
|
let lastFieldSensitive = false;
|
|
69
|
-
for (const [
|
|
69
|
+
for (const [decodedKey, decodedValue] of new URLSearchParams(fields)){
|
|
70
|
+
const key = redactCredentials(decodedKey);
|
|
71
|
+
const value = redactCredentials(decodedValue);
|
|
72
|
+
changed ||= key !== decodedKey || value !== decodedValue;
|
|
70
73
|
const sanitizedValue = sanitizeUrlFieldValue(key, value, allowNestedUrls);
|
|
71
74
|
changed ||= sanitizedValue !== value;
|
|
72
75
|
lastFieldSensitive = shouldRedactQueryKey(key) || sanitizedValue !== value;
|
|
@@ -208,7 +211,7 @@ function sanitizeSingleUrl(value, mode) {
|
|
|
208
211
|
changed = true;
|
|
209
212
|
}
|
|
210
213
|
const trailingFields = hasFragment ? sanitizedTail ?? sanitizedHead : sanitizedQuery;
|
|
211
|
-
return (changed ? url.toString() : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
|
|
214
|
+
return (changed ? redactCredentials(url.toString()) : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
|
|
212
215
|
}
|
|
213
216
|
function sanitizeUrlsInString(text, mode) {
|
|
214
217
|
return text.replace(URL_PATTERN, (match)=>sanitizeUrl(match, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/core",
|
|
3
|
-
"version": "1.57.
|
|
3
|
+
"version": "1.57.2",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/PostHog/posthog-js/issues"
|
|
6
6
|
},
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|
|
37
|
+
"surveys",
|
|
37
38
|
"src",
|
|
38
39
|
"!src/__tests__"
|
|
39
40
|
],
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
}
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
73
|
-
"@posthog/types": "^1.415.
|
|
74
|
+
"@posthog/types": "^1.415.1"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
77
|
"@rslib/core": "0.23.2",
|
|
@@ -209,7 +209,12 @@ function sanitizeUrlFields(
|
|
|
209
209
|
const sanitized = new URLSearchParams()
|
|
210
210
|
let changed = false
|
|
211
211
|
let lastFieldSensitive = false
|
|
212
|
-
|
|
212
|
+
// Parsing decodes each field, which can turn an encoded PostHog token
|
|
213
|
+
// (`%70hx_...`) into a plain one, so tokens are redacted again after decoding.
|
|
214
|
+
for (const [decodedKey, decodedValue] of new URLSearchParams(fields)) {
|
|
215
|
+
const key = redactCredentials(decodedKey)
|
|
216
|
+
const value = redactCredentials(decodedValue)
|
|
217
|
+
changed ||= key !== decodedKey || value !== decodedValue
|
|
213
218
|
const sanitizedValue = sanitizeUrlFieldValue(key, value, allowNestedUrls)
|
|
214
219
|
// `changed` is compared, not inferred from the key: the PostHog-token pass
|
|
215
220
|
// runs first, so a value can already read `[redacted]`, and calling that a
|
|
@@ -479,7 +484,8 @@ function sanitizeSingleUrl(value: string, mode: UrlSanitizeMode): string {
|
|
|
479
484
|
// with it; losing a comma from the surrounding prose is the accepted cost of
|
|
480
485
|
// not shipping `!!!`.
|
|
481
486
|
const trailingFields = hasFragment ? (sanitizedTail ?? sanitizedHead) : sanitizedQuery
|
|
482
|
-
|
|
487
|
+
// Serializing writes the host decoded, which can expose an encoded PostHog token.
|
|
488
|
+
return (changed ? redactCredentials(url.toString()) : address) + (trailingFields.lastFieldSensitive ? '' : suffix)
|
|
483
489
|
}
|
|
484
490
|
|
|
485
491
|
/**
|