@descryy/runtime-adapter-typescript 0.0.0 → 0.1.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"typescript-runtime-adapter.d.ts","sourceRoot":"","sources":["../src/typescript-runtime-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,sCAAsC,CAAC;AAQhG,MAAM,WAAW,+BAA+B;IAC9C,qGAAqG;IACrG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,+BAAoC,GAAG,cAAc,CAuB5G"}
1
+ {"version":3,"file":"typescript-runtime-adapter.d.ts","sourceRoot":"","sources":["../src/typescript-runtime-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA2C,MAAM,sCAAsC,CAAC;AAcpH,MAAM,WAAW,+BAA+B;IAC9C,qGAAqG;IACrG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,+BAAoC,GAAG,cAAc,CAkC5G"}
@@ -6,6 +6,12 @@
6
6
  * neutral seam `@descryy/runtime-backend-observation` defines.
7
7
  */
8
8
  import { createLogCollector } from "@descryy/runtime-backend-observation";
9
+ // The path constant only. `fetch-instrumentation.ts` replaces
10
+ // `globalThis.fetch` in its body and is loaded by absolute path via
11
+ // `node --import`, INSIDE the observed process -- importing it here would
12
+ // instrument this process instead, which is the defect
13
+ // `scripts/package-index-side-effects.test.mjs` now measures for.
14
+ import { FETCH_PRELOAD_MODULE_PATH } from "@descryy/runtime-external-service-observation";
9
15
  import { createV8LineClassifier } from "./v8-frame-parsing.js";
10
16
  import { createNodeSourceLocationResolver } from "./node-source-location-resolver.js";
11
17
  import { createV8StackTraceParser } from "./v8-stack-trace-parser.js";
@@ -22,11 +28,21 @@ export function createTypeScriptRuntimeAdapter(options = {}) {
22
28
  ...(options.service !== undefined ? { service: options.service } : {}),
23
29
  }));
24
30
  }
31
+ /**
32
+ * Node loads a preload module ahead of the entry script with `--import`,
33
+ * so the patch is installed before any application code can capture an
34
+ * unpatched `fetch` reference. It must sit between the interpreter and the
35
+ * script: `node --import <preload> server.mjs`.
36
+ */
37
+ function outboundHttpLaunch() {
38
+ return { interpreterArgs: ["--import", FETCH_PRELOAD_MODULE_PATH] };
39
+ }
25
40
  return {
26
41
  language: "typescript",
27
42
  stackTraceParser,
28
43
  sourceLocationResolver,
29
44
  createBackendCollectors,
45
+ outboundHttpLaunch,
30
46
  };
31
47
  }
32
48
  //# sourceMappingURL=typescript-runtime-adapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typescript-runtime-adapter.js","sourceRoot":"","sources":["../src/typescript-runtime-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAOtE,MAAM,UAAU,8BAA8B,CAAC,UAA2C,EAAE;IAC1F,MAAM,sBAAsB,GAAG,gCAAgC,EAAE,CAAC;IAClE,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;IAE1E,SAAS,uBAAuB,CAAC,OAAuC;QACtE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC5B,kBAAkB,CAAC;YACjB,MAAM;YACN,mEAAmE;YACnE,qEAAqE;YACrE,UAAU,EAAE,sBAAsB,EAAE;YACpC,gBAAgB;YAChB,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK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IACH,SAAS,kBAAkB;QACzB,OAAO,EAAE,eAAe,EAAE,CAAC,UAAU,EAAE,yBAAyB,CAAC,EAAE,CAAC;IACtE,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,YAAY;QACtB,gBAAgB;QAChB,sBAAsB;QACtB,uBAAuB;QACvB,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descryy/runtime-adapter-typescript",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript/Node runtime adapter: V8 stack-trace parsing, Node source-map resolution, the concrete RuntimeAdapter for TS/Node.",
6
6
  "license": "UNLICENSED",
@@ -24,9 +24,10 @@
24
24
  "build": "tsc -b"
25
25
  },
26
26
  "dependencies": {
27
- "@descryy/runtime-contracts": "0.0.0",
28
- "@descryy/runtime-backend-observation": "0.0.0",
29
- "@jridgewell/trace-mapping": "^0.3.31"
27
+ "@descryy/runtime-contracts": "0.1.0",
28
+ "@descryy/runtime-backend-observation": "0.1.0",
29
+ "@jridgewell/trace-mapping": "^0.3.31",
30
+ "@descryy/runtime-external-service-observation": "0.1.0"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@descryy/runtime-evidence-store": "*"