@zuplo/cli 7.3.2 → 7.4.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.
Files changed (105) hide show
  1. package/dist/cli.js +2 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cmds/lint.d.ts +9 -0
  4. package/dist/cmds/lint.d.ts.map +1 -0
  5. package/dist/cmds/lint.js +67 -0
  6. package/dist/cmds/lint.js.map +1 -0
  7. package/dist/lint/handler.d.ts +10 -0
  8. package/dist/lint/handler.d.ts.map +1 -0
  9. package/dist/lint/handler.js +60 -0
  10. package/dist/lint/handler.js.map +1 -0
  11. package/dist/lint/resolve-binary.d.ts +20 -0
  12. package/dist/lint/resolve-binary.d.ts.map +1 -0
  13. package/dist/lint/resolve-binary.js +71 -0
  14. package/dist/lint/resolve-binary.js.map +1 -0
  15. package/dist/lint/resolve-binary.test.d.ts +2 -0
  16. package/dist/lint/resolve-binary.test.d.ts.map +1 -0
  17. package/dist/lint/resolve-binary.test.js +155 -0
  18. package/dist/lint/resolve-binary.test.js.map +1 -0
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/node_modules/@inquirer/checkbox/package.json +5 -4
  21. package/node_modules/@inquirer/confirm/dist/index.d.ts +1 -1
  22. package/node_modules/@inquirer/confirm/package.json +4 -3
  23. package/node_modules/@inquirer/core/README.md +9 -3
  24. package/node_modules/@inquirer/core/dist/lib/hook-engine.d.ts +2 -8
  25. package/node_modules/@inquirer/core/dist/lib/use-memo.js +1 -1
  26. package/node_modules/@inquirer/core/dist/lib/use-state.d.ts +5 -2
  27. package/node_modules/@inquirer/core/dist/lib/use-state.js +7 -2
  28. package/node_modules/@inquirer/core/package.json +5 -4
  29. package/node_modules/@inquirer/editor/dist/index.d.ts +1 -1
  30. package/node_modules/@inquirer/editor/package.json +5 -4
  31. package/node_modules/@inquirer/expand/README.md +1 -1
  32. package/node_modules/@inquirer/expand/package.json +4 -3
  33. package/node_modules/@inquirer/external-editor/README.md +13 -0
  34. package/node_modules/@inquirer/external-editor/package.json +4 -3
  35. package/node_modules/@inquirer/figures/package.json +4 -3
  36. package/node_modules/@inquirer/input/package.json +4 -3
  37. package/node_modules/@inquirer/number/dist/index.d.ts +1 -1
  38. package/node_modules/@inquirer/number/dist/index.js +1 -6
  39. package/node_modules/@inquirer/number/dist/is-step-of.d.ts +1 -0
  40. package/node_modules/@inquirer/number/dist/is-step-of.js +22 -0
  41. package/node_modules/@inquirer/number/package.json +4 -3
  42. package/node_modules/@inquirer/password/package.json +4 -3
  43. package/node_modules/@inquirer/rawlist/package.json +4 -3
  44. package/node_modules/@inquirer/search/README.md +9 -8
  45. package/node_modules/@inquirer/search/dist/index.d.ts +1 -0
  46. package/node_modules/@inquirer/search/dist/index.js +6 -1
  47. package/node_modules/@inquirer/search/package.json +5 -4
  48. package/node_modules/@inquirer/select/package.json +5 -4
  49. package/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.d.ts.map +1 -1
  50. package/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.js +4 -2
  51. package/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs +4 -2
  52. package/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.d.ts.map +1 -1
  53. package/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.js +5 -5
  54. package/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs +5 -5
  55. package/node_modules/@posthog/core/dist/error-tracking/parsers/base.d.ts.map +1 -1
  56. package/node_modules/@posthog/core/dist/error-tracking/parsers/base.js +2 -1
  57. package/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs +2 -1
  58. package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
  59. package/node_modules/@posthog/core/dist/posthog-core.js +1 -0
  60. package/node_modules/@posthog/core/dist/posthog-core.mjs +1 -0
  61. package/node_modules/@posthog/core/package.json +1 -1
  62. package/node_modules/@posthog/core/src/error-tracking/coercers/error-coercer.ts +8 -2
  63. package/node_modules/@posthog/core/src/error-tracking/coercers/error-event-coercer.spec.ts +33 -0
  64. package/node_modules/@posthog/core/src/error-tracking/coercers/error-event-coercer.ts +13 -6
  65. package/node_modules/@posthog/core/src/error-tracking/error-properties-builder.coerce.spec.ts +15 -0
  66. package/node_modules/@posthog/core/src/error-tracking/parsers/base.spec.ts +34 -0
  67. package/node_modules/@posthog/core/src/error-tracking/parsers/base.ts +10 -2
  68. package/node_modules/@posthog/core/src/posthog-core.ts +1 -0
  69. package/node_modules/@zuplo/core/customer.cli.minified.js +239 -239
  70. package/node_modules/@zuplo/core/index.minified.js +253 -253
  71. package/node_modules/@zuplo/core/package.json +1 -1
  72. package/node_modules/@zuplo/graphql/package.json +1 -1
  73. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  74. package/node_modules/@zuplo/otel/package.json +1 -1
  75. package/node_modules/@zuplo/runtime/out/esm/chunk-NHSMO7UN.js +409 -0
  76. package/node_modules/@zuplo/runtime/out/esm/chunk-NHSMO7UN.js.map +1 -0
  77. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  78. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  79. package/node_modules/@zuplo/runtime/out/types/index.d.ts +108 -69
  80. package/node_modules/@zuplo/runtime/package.json +1 -1
  81. package/node_modules/negotiator/lib/accept.js +54 -0
  82. package/node_modules/negotiator/lib/charset.js +10 -34
  83. package/node_modules/negotiator/lib/encoding.js +9 -30
  84. package/node_modules/negotiator/lib/language.js +15 -36
  85. package/node_modules/negotiator/lib/mediaType.js +16 -134
  86. package/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  87. package/node_modules/negotiator/node_modules/content-type/README.md +71 -0
  88. package/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
  89. package/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  90. package/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
  91. package/node_modules/negotiator/node_modules/content-type/package.json +52 -0
  92. package/node_modules/negotiator/package.json +16 -10
  93. package/package.json +13 -6
  94. package/node_modules/@inquirer/external-editor/dist/errors/CreateFileError.d.ts +0 -10
  95. package/node_modules/@inquirer/external-editor/dist/errors/CreateFileError.js +0 -13
  96. package/node_modules/@inquirer/external-editor/dist/errors/LaunchEditorError.d.ts +0 -10
  97. package/node_modules/@inquirer/external-editor/dist/errors/LaunchEditorError.js +0 -13
  98. package/node_modules/@inquirer/external-editor/dist/errors/ReadFileError.d.ts +0 -10
  99. package/node_modules/@inquirer/external-editor/dist/errors/ReadFileError.js +0 -13
  100. package/node_modules/@inquirer/external-editor/dist/errors/RemoveFileError.d.ts +0 -10
  101. package/node_modules/@inquirer/external-editor/dist/errors/RemoveFileError.js +0 -13
  102. package/node_modules/@zuplo/runtime/out/esm/chunk-YOMMW6SX.js +0 -409
  103. package/node_modules/@zuplo/runtime/out/esm/chunk-YOMMW6SX.js.map +0 -1
  104. package/node_modules/negotiator/HISTORY.md +0 -114
  105. /package/node_modules/@zuplo/runtime/out/esm/{chunk-YOMMW6SX.js.LEGAL.txt → chunk-NHSMO7UN.js.LEGAL.txt} +0 -0
@@ -45,7 +45,7 @@ export default createPrompt((config, done) => {
45
45
  const { pageSize = 7, validate = () => true } = config;
46
46
  const theme = makeTheme(searchTheme, config.theme);
47
47
  const [status, setStatus] = useState('loading');
48
- const [searchTerm, setSearchTerm] = useState('');
48
+ const [searchTerm, setSearchTerm] = useState(config.initialValue ?? '');
49
49
  const [searchResults, setSearchResults] = useState([]);
50
50
  const [searchError, setSearchError] = useState();
51
51
  const defaultApplied = useRef(false);
@@ -56,6 +56,11 @@ export default createPrompt((config, done) => {
56
56
  return { first, last };
57
57
  }, [searchResults]);
58
58
  const [active = bounds.first, setActive] = useState();
59
+ useEffect((rl) => {
60
+ if (config.initialValue) {
61
+ rl.write(config.initialValue);
62
+ }
63
+ }, []);
59
64
  useEffect(() => {
60
65
  const controller = new AbortController();
61
66
  setStatus('loading');
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/search",
3
- "version": "4.2.1",
3
+ "version": "4.3.0",
4
4
  "description": "Inquirer search prompt",
5
5
  "keywords": [
6
6
  "answer",
@@ -67,11 +67,12 @@
67
67
  "tsc": "tsc"
68
68
  },
69
69
  "dependencies": {
70
- "@inquirer/core": "^11.2.1",
71
- "@inquirer/figures": "^2.0.7",
70
+ "@inquirer/core": "^12.0.0",
71
+ "@inquirer/figures": "^2.0.8",
72
72
  "@inquirer/type": "^4.0.7"
73
73
  },
74
74
  "devDependencies": {
75
+ "@repo/tsconfig": "0.0.0",
75
76
  "typescript": "^6.0.2"
76
77
  },
77
78
  "peerDependencies": {
@@ -87,5 +88,5 @@
87
88
  },
88
89
  "main": "./dist/index.js",
89
90
  "types": "./dist/index.d.ts",
90
- "gitHead": "b43359d803733b1a7c4638addcc270987fb894c3"
91
+ "gitHead": "999706755afbdcae271f62decbd9bcd05560905b"
91
92
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/select",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "description": "Inquirer select/list prompt",
5
5
  "keywords": [
6
6
  "answer",
@@ -68,11 +68,12 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@inquirer/ansi": "^2.0.7",
71
- "@inquirer/core": "^11.2.1",
72
- "@inquirer/figures": "^2.0.7",
71
+ "@inquirer/core": "^12.0.0",
72
+ "@inquirer/figures": "^2.0.8",
73
73
  "@inquirer/type": "^4.0.7"
74
74
  },
75
75
  "devDependencies": {
76
+ "@repo/tsconfig": "0.0.0",
76
77
  "typescript": "^6.0.2"
77
78
  },
78
79
  "peerDependencies": {
@@ -88,5 +89,5 @@
88
89
  },
89
90
  "main": "./dist/index.js",
90
91
  "types": "./dist/index.d.ts",
91
- "gitHead": "b43359d803733b1a7c4638addcc270987fb894c3"
92
+ "gitHead": "999706755afbdcae271f62decbd9bcd05560905b"
92
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error-coercer.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/coercers/error-coercer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE/E,qBAAa,YAAa,YAAW,oBAAoB,CAAC,KAAK,CAAC;IAC9D,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,KAAK;IAIjC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa;IAUvD,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,QAAQ;CAGjB"}
1
+ {"version":3,"file":"error-coercer.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/coercers/error-coercer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE/E,qBAAa,YAAa,YAAW,oBAAoB,CAAC,KAAK,CAAC;IAC9D,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,KAAK;IAIjC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa;IAgBvD,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,QAAQ;CAGjB"}
@@ -32,12 +32,14 @@ class ErrorCoercer {
32
32
  return (0, type_utils_js_namespaceObject.isError)(err);
33
33
  }
34
34
  coerce(err, ctx) {
35
+ const stack = this.getStack(err);
36
+ const synthetic = void 0 === stack;
35
37
  return {
36
38
  type: this.getType(err),
37
39
  value: this.getMessage(err, ctx),
38
- stack: this.getStack(err),
40
+ stack: stack ?? ctx.syntheticException?.stack,
39
41
  cause: err.cause ? ctx.next(err.cause) : void 0,
40
- synthetic: false
42
+ synthetic
41
43
  };
42
44
  }
43
45
  getType(err) {
@@ -4,12 +4,14 @@ class ErrorCoercer {
4
4
  return isError(err);
5
5
  }
6
6
  coerce(err, ctx) {
7
+ const stack = this.getStack(err);
8
+ const synthetic = void 0 === stack;
7
9
  return {
8
10
  type: this.getType(err),
9
11
  value: this.getMessage(err, ctx),
10
- stack: this.getStack(err),
12
+ stack: stack ?? ctx.syntheticException?.stack,
11
13
  cause: err.cause ? ctx.next(err.cause) : void 0,
12
- synthetic: false
14
+ synthetic
13
15
  };
14
16
  }
15
17
  getType(err) {
@@ -1 +1 @@
1
- {"version":3,"file":"error-event-coercer.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/coercers/error-event-coercer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAO/E,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAQD,qBAAa,iBAAkB,YAAW,oBAAoB,CAAC,cAAc,CAAC;;IAG5E,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,cAAc;IAQ1C,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa;IAahE,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,mBAAmB;CAU5B"}
1
+ {"version":3,"file":"error-event-coercer.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/coercers/error-event-coercer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAO/E,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAQD,qBAAa,iBAAkB,YAAW,oBAAoB,CAAC,cAAc,CAAC;;IAG5E,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,cAAc;IAQ1C,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa;IAahE,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,mBAAmB;CAiB5B"}
@@ -48,11 +48,11 @@ class ErrorEventCoercer {
48
48
  }
49
49
  _buildLocationStack(err) {
50
50
  const location = err;
51
- if ((0, index_js_namespaceObject.isString)(location.filename) && location.filename.length > 0) {
52
- const lineno = location.lineno ?? 0;
53
- const colno = location.colno ?? 0;
54
- return `Error\n at ${location.filename}:${lineno}:${colno}`;
55
- }
51
+ const lineno = location.lineno ?? 0;
52
+ const colno = location.colno ?? 0;
53
+ if (!(0, index_js_namespaceObject.isString)(location.filename) || 0 === location.filename.length) return;
54
+ if (0 === lineno) return;
55
+ return `Error\n at ${location.filename}:${lineno}:${colno}`;
56
56
  }
57
57
  }
58
58
  exports.ErrorEventCoercer = __webpack_exports__.ErrorEventCoercer;
@@ -20,11 +20,11 @@ class ErrorEventCoercer {
20
20
  }
21
21
  _buildLocationStack(err) {
22
22
  const location = err;
23
- if (isString(location.filename) && location.filename.length > 0) {
24
- const lineno = location.lineno ?? 0;
25
- const colno = location.colno ?? 0;
26
- return `Error\n at ${location.filename}:${lineno}:${colno}`;
27
- }
23
+ const lineno = location.lineno ?? 0;
24
+ const colno = location.colno ?? 0;
25
+ if (!isString(location.filename) || 0 === location.filename.length) return;
26
+ if (0 === lineno) return;
27
+ return `Error\n at ${location.filename}:${lineno}:${colno}`;
28
28
  }
29
29
  }
30
30
  export { ErrorEventCoercer };
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/parsers/base.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,eAAO,MAAM,gBAAgB,MAAM,CAAA;AASnC,wBAAgB,WAAW,CACzB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,UAAU,CAmBZ"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/parsers/base.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,eAAO,MAAM,gBAAgB,MAAM,CAAA;AAiBnC,wBAAgB,WAAW,CACzB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,UAAU,CAmBZ"}
@@ -30,12 +30,13 @@ __webpack_require__.d(__webpack_exports__, {
30
30
  const index_js_namespaceObject = require("../../utils/index.js");
31
31
  const UNKNOWN_FUNCTION = '?';
32
32
  const MASKED_URL_PREFIX = 'webkit-masked-url://';
33
+ const ANONYMOUS_FILENAME = '<anonymous>';
33
34
  function createFrame(platform, filename, func, lineno, colno) {
34
35
  const frame = {
35
36
  platform,
36
37
  filename,
37
38
  function: '<anonymous>' === func ? UNKNOWN_FUNCTION : func,
38
- in_app: !filename?.startsWith(MASKED_URL_PREFIX)
39
+ in_app: !filename?.startsWith(MASKED_URL_PREFIX) && filename !== ANONYMOUS_FILENAME
39
40
  };
40
41
  if (!(0, index_js_namespaceObject.isUndefined)(lineno)) frame.lineno = lineno;
41
42
  if (!(0, index_js_namespaceObject.isUndefined)(colno)) frame.colno = colno;
@@ -1,12 +1,13 @@
1
1
  import { isUndefined } from "../../utils/index.mjs";
2
2
  const UNKNOWN_FUNCTION = '?';
3
3
  const MASKED_URL_PREFIX = 'webkit-masked-url://';
4
+ const ANONYMOUS_FILENAME = '<anonymous>';
4
5
  function createFrame(platform, filename, func, lineno, colno) {
5
6
  const frame = {
6
7
  platform,
7
8
  filename,
8
9
  function: '<anonymous>' === func ? UNKNOWN_FUNCTION : func,
9
- in_app: !filename?.startsWith(MASKED_URL_PREFIX)
10
+ in_app: !filename?.startsWith(MASKED_URL_PREFIX) && filename !== ANONYMOUS_FILENAME
10
11
  };
11
12
  if (!isUndefined(lineno)) frame.lineno = lineno;
12
13
  if (!isUndefined(colno)) frame.colno = colno;
@@ -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,EACxB,uBAAuB,EAGvB,yBAAyB,EAKzB,sBAAsB,EAGvB,MAAM,SAAS,CAAA;AAahB,OAAO,EAAiC,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACjF,OAAO,EAGL,oBAAoB,EAErB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,UAAU,iBAAiB;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAOD,8BAAsB,WAAY,SAAQ,oBAAoB;IAE5D,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,yBAAyB,CAAS;IAC1C,OAAO,CAAC,gBAAgB,CAA2D;IACnF,OAAO,CAAC,WAAW,CAAC,CAA+B;IAGnD,SAAS,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAA;IAClF,SAAS,CAAC,6BAA6B,EAAE,MAAM,CAAA;IAC/C,OAAO,CAAC,wBAAwB,CAAuB;IACvD,SAAS,CAAC,YAAY,EAAE,sBAAsB,CAAK;IAInD,OAAO,CAAC,oBAAoB,CAAC,CAAqB;IAGlD,SAAS,CAAC,eAAe,EAAE,QA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AAY,EAAE,MAAM,GAAG,OAAO;IAWjE;;;;;;;;OAQG;IACH,mBAAmB,IAAI,IAAI;IAa3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,mBAAmB,CACjB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,EACjD,uBAAuB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,EACrD,kBAAkB,UAAO,GACxB,IAAI;IAkCP;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,kBAAkB,UAAO,GAAG,IAAI;IAmCxF;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,sBAAsB,GAAG,IAAI;IA+C9F;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;CAuBvB"}
@@ -925,6 +925,7 @@ class PostHogCore extends external_posthog_core_stateless_js_namespaceObject.Pos
925
925
  }
926
926
  } catch (e) {
927
927
  this._logger.error(`Error in before_send function for event '${captureEvent.event}':`, e);
928
+ return null;
928
929
  }
929
930
  return result;
930
931
  }
@@ -897,6 +897,7 @@ class PostHogCore extends PostHogCoreStateless {
897
897
  }
898
898
  } catch (e) {
899
899
  this._logger.error(`Error in before_send function for event '${captureEvent.event}':`, e);
900
+ return null;
900
901
  }
901
902
  return result;
902
903
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/core",
3
- "version": "1.48.3",
3
+ "version": "1.48.6",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -7,12 +7,18 @@ export class ErrorCoercer implements ErrorTrackingCoercer<Error> {
7
7
  }
8
8
 
9
9
  coerce(err: Error, ctx: CoercingContext): ExceptionLike {
10
+ const stack = this.getStack(err)
11
+ // Some errors carry no usable stack (for example a Firefox network `fetch`
12
+ // `TypeError`). Fall back to the synthetic exception captured at the call
13
+ // site so the frames still point at the caller. Mark it synthetic so the
14
+ // parser trims the SDK's own frames.
15
+ const synthetic = stack === undefined
10
16
  return {
11
17
  type: this.getType(err),
12
18
  value: this.getMessage(err, ctx),
13
- stack: this.getStack(err),
19
+ stack: stack ?? ctx.syntheticException?.stack,
14
20
  cause: err.cause ? ctx.next(err.cause) : undefined,
15
- synthetic: false,
21
+ synthetic,
16
22
  }
17
23
  }
18
24
 
@@ -88,6 +88,39 @@ describe('ErrorEventCoercer', () => {
88
88
  })
89
89
  })
90
90
 
91
+ it.each([
92
+ { name: 'a zeroed position', lineno: 0, colno: 0 },
93
+ { name: 'no position at all', lineno: undefined, colno: undefined },
94
+ { name: 'a column but no line', lineno: 0, colno: 13 },
95
+ ])('reports no stack trace for $name', ({ lineno, colno }) => {
96
+ const exception = buildException(
97
+ new FakeErrorEvent({
98
+ message: 'ResizeObserver loop completed with undelivered notifications.',
99
+ filename: 'https://example.com/dashboard/1',
100
+ lineno,
101
+ colno,
102
+ })
103
+ )
104
+
105
+ expect(exception.stacktrace).toBeUndefined()
106
+ expect(exception).toMatchObject({ value: 'ResizeObserver loop completed with undelivered notifications.' })
107
+ })
108
+
109
+ it('keeps a frame when only the column is zero', () => {
110
+ const exception = buildException(
111
+ new FakeErrorEvent({
112
+ message: 'Uncaught TypeError: x is not a function',
113
+ filename: 'https://example.com/app.js',
114
+ lineno: 42,
115
+ colno: 0,
116
+ })
117
+ )
118
+
119
+ expect(exception.stacktrace?.frames).toEqual([
120
+ expect.objectContaining({ filename: 'https://example.com/app.js', lineno: 42, colno: 0 }),
121
+ ])
122
+ })
123
+
91
124
  it('does not parse frame-shaped lines from a multiline message', () => {
92
125
  const exception = buildException(
93
126
  new FakeErrorEvent({
@@ -46,12 +46,19 @@ export class ErrorEventCoercer implements ErrorTrackingCoercer<ErrorEventLike> {
46
46
 
47
47
  private _buildLocationStack(err: ErrorEventLike): string | undefined {
48
48
  const location = err as ErrorEventLike & ErrorEventLocation
49
- if (isString(location.filename) && location.filename.length > 0) {
50
- const lineno = location.lineno ?? 0
51
- const colno = location.colno ?? 0
52
- // The message stays in `value`, which prevents multiline messages from being parsed as extra frames.
53
- return `Error\n at ${location.filename}:${lineno}:${colno}`
49
+ const lineno = location.lineno ?? 0
50
+ const colno = location.colno ?? 0
51
+ if (!isString(location.filename) || location.filename.length === 0) {
52
+ return undefined
54
53
  }
55
- return undefined
54
+ // Stack lines are 1-indexed, so a zero line means the report carries no code position. The
55
+ // browser pairs that with the document URL as `filename`, and a frame built from the two names
56
+ // a page rather than a script, which no source map can resolve. Leaving the exception frameless
57
+ // says the same thing without inviting a lookup that cannot succeed.
58
+ if (lineno === 0) {
59
+ return undefined
60
+ }
61
+ // The message stays in `value`, which prevents multiline messages from being parsed as extra frames.
62
+ return `Error\n at ${location.filename}:${lineno}:${colno}`
56
63
  }
57
64
  }
@@ -112,6 +112,21 @@ describe('ErrorPropertiesBuilder', () => {
112
112
  })
113
113
  })
114
114
 
115
+ it('should fall back to the synthetic stack when the error has no stack', () => {
116
+ // Firefox rejects a network `fetch` with a `TypeError` that carries no
117
+ // stack, so the frames must come from the synthetic exception instead.
118
+ const errorObject = new CustomTestError('My special error')
119
+ errorObject.stack = ''
120
+ const syntheticError = new Error()
121
+ const exception = coerceInput(errorObject, syntheticError)
122
+ expect(exception).toMatchObject({
123
+ type: 'CustomTestError',
124
+ value: 'My special error',
125
+ stack: syntheticError.stack,
126
+ synthetic: true,
127
+ })
128
+ })
129
+
115
130
  it('should preserve a cross-realm error', () => {
116
131
  const crossRealmError = runInNewContext(
117
132
  `new TypeError('cross-realm error', {
@@ -1,4 +1,5 @@
1
1
  import { createFrame } from './base'
2
+ import { createDefaultStackParser } from './index'
2
3
 
3
4
  describe('createFrame', () => {
4
5
  const platform = 'web:javascript'
@@ -25,9 +26,42 @@ describe('createFrame', () => {
25
26
  })
26
27
  })
27
28
 
29
+ it('does not mark Chromium <anonymous> frames as in_app', () => {
30
+ // Chromium reports scripts that have no URL (extension-injected code, devtools, string eval)
31
+ // as `<anonymous>`. They can never be symbolicated and are not attributable to the page.
32
+ const frame = createFrame(platform, '<anonymous>', '?', 1, 394)
33
+ expect(frame.in_app).toBe(false)
34
+ expect(frame).toMatchObject({ filename: '<anonymous>', function: '?', lineno: 1, colno: 394 })
35
+ })
36
+
28
37
  it('falls back to in_app when the parser could not determine a filename', () => {
29
38
  // Regex capture groups that do not participate arrive here as undefined despite the type
30
39
  const frame = createFrame(platform, undefined as unknown as string, 'doThing')
31
40
  expect(frame.in_app).toBe(true)
32
41
  })
33
42
  })
43
+
44
+ describe('createDefaultStackParser in_app classification', () => {
45
+ const parse = createDefaultStackParser()
46
+
47
+ it('demotes a bare <anonymous> frame from injected code', () => {
48
+ const frames = parse("SyntaxError: Failed to execute 'appendChild' on 'Node': boom\n at <anonymous>:1:394")
49
+ expect(frames).toEqual([
50
+ { platform: 'web:javascript', filename: '<anonymous>', function: '?', in_app: false, lineno: 1, colno: 394 },
51
+ ])
52
+ })
53
+
54
+ it("keeps the page's own eval'd code as in_app", () => {
55
+ // V8 attributes eval'd code to the script that called eval; the chrome parser already
56
+ // rewrites these frames to that URL, so they must not be caught by the <anonymous> rule.
57
+ const frames = parse(
58
+ 'Error: boom\n' +
59
+ ' at eval (eval at <anonymous> (https://example.com/app.js:10:5), <anonymous>:1:394)\n' +
60
+ ' at https://example.com/app.js:10:5'
61
+ )
62
+ expect(frames.map((f) => [f.filename, f.in_app])).toEqual([
63
+ ['https://example.com/app.js', true],
64
+ ['https://example.com/app.js', true],
65
+ ])
66
+ })
67
+ })
@@ -14,6 +14,14 @@ export const UNKNOWN_FUNCTION = '?'
14
14
  // but do not let it count as in_app and pull the issue into the site's own stack.
15
15
  const MASKED_URL_PREFIX = 'webkit-masked-url://'
16
16
 
17
+ // Chromium's counterpart: a script with no URL at all -- code injected by an extension
18
+ // (`chrome.scripting.executeScript`), pasted into devtools, or evaluated from a string -- shows
19
+ // up as a bare `<anonymous>:line:col` frame. The page's own eval'd code is *not* affected: V8
20
+ // reports it as `eval at <anonymous> (https://site/app.js:1:2)` and the chrome parser already
21
+ // rewrites that to the site URL. A bare `<anonymous>` can never be symbolicated, so treating it
22
+ // as in_app only ever pulled an unresolvable frame into the site's own stack.
23
+ const ANONYMOUS_FILENAME = '<anonymous>'
24
+
17
25
  export function createFrame(
18
26
  platform: StackFrame['platform'],
19
27
  filename: string,
@@ -26,8 +34,8 @@ export function createFrame(
26
34
  platform,
27
35
  filename,
28
36
  function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,
29
- // Browser frames are considered in_app unless the runtime has masked their origin
30
- in_app: !filename?.startsWith(MASKED_URL_PREFIX),
37
+ // Browser frames are considered in_app unless the runtime has masked or dropped their origin
38
+ in_app: !filename?.startsWith(MASKED_URL_PREFIX) && filename !== ANONYMOUS_FILENAME,
31
39
  }
32
40
 
33
41
  if (!isUndefined(lineno)) {
@@ -1739,6 +1739,7 @@ export abstract class PostHogCore extends PostHogCoreStateless {
1739
1739
  }
1740
1740
  } catch (e) {
1741
1741
  this._logger.error(`Error in before_send function for event '${captureEvent.event}':`, e)
1742
+ return null
1742
1743
  }
1743
1744
  }
1744
1745