@stainlessdev/xray-remix 0.1.0-branch.bg-publish-to-npm.18b1cb1

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/dist/index.cjs ADDED
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ createEmitter: () => import_xray_core.createEmitter,
24
+ getXrayContext: () => import_xray_fetch.getXrayContext,
25
+ wrapRemixRequestHandler: () => wrapRemixRequestHandler
26
+ });
27
+ module.exports = __toCommonJS(index_exports);
28
+ var import_xray_core = require("@stainlessdev/xray-core");
29
+ var import_xray_fetch = require("@stainlessdev/xray-fetch");
30
+ function wrapRemixRequestHandler(handler, xray, options) {
31
+ return (request, loadContext) => {
32
+ const wrapped = (0, import_xray_fetch.wrapFetchPreserve)((req) => handler(req, loadContext), xray, options);
33
+ return wrapped(request);
34
+ };
35
+ }
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ createEmitter,
39
+ getXrayContext,
40
+ wrapRemixRequestHandler
41
+ });
42
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { RequestHandler } from 'react-router';\nimport type { XrayEmitter } from '@stainlessdev/xray-core';\nimport { createEmitter } from '@stainlessdev/xray-core';\nimport { getXrayContext, wrapFetchPreserve, type WrapOptions } from '@stainlessdev/xray-fetch';\n\nexport { createEmitter };\nexport type {\n CaptureConfig,\n RedactionConfig,\n RequestLog,\n XrayConfig,\n XrayContext,\n XrayEmitter,\n} from '@stainlessdev/xray-core';\nexport type { WrapOptions } from '@stainlessdev/xray-fetch';\nexport { getXrayContext };\n\nexport function wrapRemixRequestHandler(\n handler: RequestHandler,\n xray: XrayEmitter,\n options?: WrapOptions,\n): RequestHandler {\n return (request, loadContext) => {\n const wrapped = wrapFetchPreserve((req: Request) => handler(req, loadContext), xray, options);\n return wrapped(request);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAA8B;AAC9B,wBAAoE;AAc7D,SAAS,wBACd,SACA,MACA,SACgB;AAChB,SAAO,CAAC,SAAS,gBAAgB;AAC/B,UAAM,cAAU,qCAAkB,CAAC,QAAiB,QAAQ,KAAK,WAAW,GAAG,MAAM,OAAO;AAC5F,WAAO,QAAQ,OAAO;AAAA,EACxB;AACF;","names":[]}
@@ -0,0 +1,9 @@
1
+ import { RequestHandler } from 'react-router';
2
+ import { XrayEmitter } from '@stainlessdev/xray-core';
3
+ export { CaptureConfig, RedactionConfig, RequestLog, XrayConfig, XrayContext, XrayEmitter, createEmitter } from '@stainlessdev/xray-core';
4
+ import { WrapOptions } from '@stainlessdev/xray-fetch';
5
+ export { WrapOptions, getXrayContext } from '@stainlessdev/xray-fetch';
6
+
7
+ declare function wrapRemixRequestHandler(handler: RequestHandler, xray: XrayEmitter, options?: WrapOptions): RequestHandler;
8
+
9
+ export { wrapRemixRequestHandler };
@@ -0,0 +1,9 @@
1
+ import { RequestHandler } from 'react-router';
2
+ import { XrayEmitter } from '@stainlessdev/xray-core';
3
+ export { CaptureConfig, RedactionConfig, RequestLog, XrayConfig, XrayContext, XrayEmitter, createEmitter } from '@stainlessdev/xray-core';
4
+ import { WrapOptions } from '@stainlessdev/xray-fetch';
5
+ export { WrapOptions, getXrayContext } from '@stainlessdev/xray-fetch';
6
+
7
+ declare function wrapRemixRequestHandler(handler: RequestHandler, xray: XrayEmitter, options?: WrapOptions): RequestHandler;
8
+
9
+ export { wrapRemixRequestHandler };
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ // src/index.ts
2
+ import { createEmitter } from "@stainlessdev/xray-core";
3
+ import { getXrayContext, wrapFetchPreserve } from "@stainlessdev/xray-fetch";
4
+ function wrapRemixRequestHandler(handler, xray, options) {
5
+ return (request, loadContext) => {
6
+ const wrapped = wrapFetchPreserve((req) => handler(req, loadContext), xray, options);
7
+ return wrapped(request);
8
+ };
9
+ }
10
+ export {
11
+ createEmitter,
12
+ getXrayContext,
13
+ wrapRemixRequestHandler
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { RequestHandler } from 'react-router';\nimport type { XrayEmitter } from '@stainlessdev/xray-core';\nimport { createEmitter } from '@stainlessdev/xray-core';\nimport { getXrayContext, wrapFetchPreserve, type WrapOptions } from '@stainlessdev/xray-fetch';\n\nexport { createEmitter };\nexport type {\n CaptureConfig,\n RedactionConfig,\n RequestLog,\n XrayConfig,\n XrayContext,\n XrayEmitter,\n} from '@stainlessdev/xray-core';\nexport type { WrapOptions } from '@stainlessdev/xray-fetch';\nexport { getXrayContext };\n\nexport function wrapRemixRequestHandler(\n handler: RequestHandler,\n xray: XrayEmitter,\n options?: WrapOptions,\n): RequestHandler {\n return (request, loadContext) => {\n const wrapped = wrapFetchPreserve((req: Request) => handler(req, loadContext), xray, options);\n return wrapped(request);\n };\n}\n"],"mappings":";AAEA,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,yBAA2C;AAc7D,SAAS,wBACd,SACA,MACA,SACgB;AAChB,SAAO,CAAC,SAAS,gBAAgB;AAC/B,UAAM,UAAU,kBAAkB,CAAC,QAAiB,QAAQ,KAAK,WAAW,GAAG,MAAM,OAAO;AAC5F,WAAO,QAAQ,OAAO;AAAA,EACxB;AACF;","names":[]}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@stainlessdev/xray-remix",
3
+ "version": "0.1.0-branch.bg-publish-to-npm.18b1cb1",
4
+ "description": "Remix integration for Stainless X-ray request logging",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "type": "module",
9
+ "main": "./dist/index.cjs",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
+ }
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "dependencies": {
23
+ "@stainlessdev/xray-core": "0.1.0-branch.bg-publish-to-npm.18b1cb1",
24
+ "@stainlessdev/xray-fetch": "0.1.0-branch.bg-publish-to-npm.18b1cb1"
25
+ },
26
+ "devDependencies": {
27
+ "@opentelemetry/api": "^1.9.0",
28
+ "@opentelemetry/core": "^2.2.0",
29
+ "@opentelemetry/otlp-transformer": "^0.208.0",
30
+ "@opentelemetry/resources": "^2.2.0",
31
+ "@opentelemetry/sdk-trace-base": "^2.2.0",
32
+ "@opentelemetry/semantic-conventions": "^1.29.0",
33
+ "@types/node": "^20.11.0",
34
+ "oxlint": "^1.39.0",
35
+ "react-router": "^7.9.3",
36
+ "tsup": "^8.0.0",
37
+ "tsx": "^4.19.0",
38
+ "typescript": "^5.4.0"
39
+ },
40
+ "peerDependencies": {
41
+ "@opentelemetry/api": "^1.9.0",
42
+ "@opentelemetry/core": "^2.2.0",
43
+ "@opentelemetry/otlp-transformer": "^0.208.0",
44
+ "@opentelemetry/resources": "^2.2.0",
45
+ "@opentelemetry/sdk-trace-base": "^2.2.0",
46
+ "@opentelemetry/semantic-conventions": "^1.29.0",
47
+ "react-router": ">=7.0.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=20"
51
+ },
52
+ "scripts": {
53
+ "build": "tsup",
54
+ "test": "tsx --test test/*.test.ts",
55
+ "typecheck": "tsc --noEmit",
56
+ "lint": "oxlint",
57
+ "clean": "rm -rf dist"
58
+ }
59
+ }