@pingaura/telemetry 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.
- package/LICENSE +201 -0
- package/README.md +124 -0
- package/dist/cloudflare.cjs +60 -0
- package/dist/cloudflare.cjs.map +1 -0
- package/dist/cloudflare.d.cts +37 -0
- package/dist/cloudflare.d.mts +37 -0
- package/dist/cloudflare.mjs +57 -0
- package/dist/cloudflare.mjs.map +1 -0
- package/dist/core-Cvg8zn6Q.mjs +139 -0
- package/dist/core-Cvg8zn6Q.mjs.map +1 -0
- package/dist/core-DVilpn_i.d.cts +93 -0
- package/dist/core-DVilpn_i.d.mts +93 -0
- package/dist/core-KgLaVgR4.cjs +162 -0
- package/dist/core-KgLaVgR4.cjs.map +1 -0
- package/dist/index.cjs +6 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +2 -0
- package/dist/matchers-CMwG37qc.cjs +18 -0
- package/dist/matchers-CMwG37qc.cjs.map +1 -0
- package/dist/matchers-CUD5NL5K.mjs +13 -0
- package/dist/matchers-CUD5NL5K.mjs.map +1 -0
- package/dist/next.cjs +39 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +39 -0
- package/dist/next.d.mts +39 -0
- package/dist/next.mjs +36 -0
- package/dist/next.mjs.map +1 -0
- package/dist/node.cjs +51 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +25 -0
- package/dist/node.d.mts +25 -0
- package/dist/node.mjs +49 -0
- package/dist/node.mjs.map +1 -0
- package/package.json +104 -0
package/dist/node.cjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_core = require("./core-KgLaVgR4.cjs");
|
|
3
|
+
const require_matchers = require("./matchers-CMwG37qc.cjs");
|
|
4
|
+
//#region src/node.ts
|
|
5
|
+
function header(headers, name) {
|
|
6
|
+
const v = headers[name] ?? headers[name.toLowerCase()];
|
|
7
|
+
return Array.isArray(v) ? v[0] : v;
|
|
8
|
+
}
|
|
9
|
+
/** Framework-agnostic page_view capture from a request-like object. */
|
|
10
|
+
async function capturePageView(client, input) {
|
|
11
|
+
const ip = (header(input.headers, "x-forwarded-for") ?? "").split(",")[0]?.trim() || void 0;
|
|
12
|
+
let url = input.url;
|
|
13
|
+
let path;
|
|
14
|
+
try {
|
|
15
|
+
path = new URL(input.url).pathname;
|
|
16
|
+
} catch {
|
|
17
|
+
path = input.url.split("?")[0] ?? "/";
|
|
18
|
+
const host = header(input.headers, "host");
|
|
19
|
+
if (host) url = `${header(input.headers, "x-forwarded-proto") ?? "https"}://${host}${input.url}`;
|
|
20
|
+
}
|
|
21
|
+
await client.pageView({
|
|
22
|
+
url,
|
|
23
|
+
path,
|
|
24
|
+
referrer: header(input.headers, "referer"),
|
|
25
|
+
userAgent: header(input.headers, "user-agent"),
|
|
26
|
+
ip
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Express/connect middleware. Fire-and-forget; always calls next(). */
|
|
30
|
+
function analyticsMiddleware(config) {
|
|
31
|
+
const client = require_core.createClient(config);
|
|
32
|
+
const matcher = config.shouldTrack ?? require_matchers.shouldTrackPath;
|
|
33
|
+
return (req, _res, next) => {
|
|
34
|
+
try {
|
|
35
|
+
if (matcher(req.originalUrl.split("?")[0] ?? "/")) {
|
|
36
|
+
const host = req.get("host") ?? "localhost";
|
|
37
|
+
const url = `${req.protocol}://${host}${req.originalUrl}`;
|
|
38
|
+
capturePageView(client, {
|
|
39
|
+
headers: req.headers,
|
|
40
|
+
url
|
|
41
|
+
}).catch(() => {});
|
|
42
|
+
}
|
|
43
|
+
} catch {}
|
|
44
|
+
next();
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.analyticsMiddleware = analyticsMiddleware;
|
|
49
|
+
exports.capturePageView = capturePageView;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=node.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.cjs","names":["createClient","shouldTrackPath"],"sources":["../src/node.ts"],"sourcesContent":["import { type AnalyticsClient, type ClientConfig, createClient } from './core';\nimport { shouldTrackPath } from './matchers';\n\ntype HeaderBag = Record<string, string | string[] | undefined>;\n\nfunction header(headers: HeaderBag, name: string): string | undefined {\n const v = headers[name] ?? headers[name.toLowerCase()];\n return Array.isArray(v) ? v[0] : v;\n}\n\nexport interface CaptureInput {\n headers: HeaderBag;\n url: string;\n}\n\n/** Framework-agnostic page_view capture from a request-like object. */\nexport async function capturePageView(\n client: AnalyticsClient,\n input: CaptureInput,\n): Promise<void> {\n const xff = header(input.headers, 'x-forwarded-for') ?? '';\n const ip = xff.split(',')[0]?.trim() || undefined;\n let url = input.url;\n let path: string;\n try {\n path = new URL(input.url).pathname;\n } catch {\n // bare path (e.g. \"/pricing\") — rebuild an absolute URL from Host, else the collector rejects the batch\n path = input.url.split('?')[0] ?? '/';\n const host = header(input.headers, 'host');\n if (host) {\n const proto = header(input.headers, 'x-forwarded-proto') ?? 'https';\n url = `${proto}://${host}${input.url}`;\n }\n }\n await client.pageView({\n url,\n path,\n referrer: header(input.headers, 'referer'),\n userAgent: header(input.headers, 'user-agent'),\n ip,\n });\n}\n\ninterface ExpressReqLike {\n originalUrl: string;\n protocol: string;\n headers: HeaderBag;\n get(name: string): string | undefined;\n}\ntype NextFn = () => void;\n\nexport interface NodeMiddlewareConfig extends ClientConfig {\n shouldTrack?: (pathname: string) => boolean;\n}\n\n/** Express/connect middleware. Fire-and-forget; always calls next(). */\nexport function analyticsMiddleware(\n config: NodeMiddlewareConfig,\n): (req: ExpressReqLike, _res: unknown, next: NextFn) => void {\n const client = createClient(config);\n const matcher = config.shouldTrack ?? shouldTrackPath;\n\n return (req, _res, next) => {\n try {\n const pathname = req.originalUrl.split('?')[0] ?? '/';\n if (matcher(pathname)) {\n const host = req.get('host') ?? 'localhost';\n const url = `${req.protocol}://${host}${req.originalUrl}`;\n // catch the build/send rejection so a voided promise never becomes a fatal unhandled rejection\n void capturePageView(client, { headers: req.headers, url }).catch(\n () => {\n // never block the request\n },\n );\n }\n } catch {\n // never block the request\n }\n next();\n };\n}\n"],"mappings":";;;;AAKA,SAAS,OAAO,SAAoB,MAAkC;CACpE,MAAM,IAAI,QAAQ,SAAS,QAAQ,KAAK,YAAY;CACpD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,KAAK;AACnC;;AAQA,eAAsB,gBACpB,QACA,OACe;CAEf,MAAM,MADM,OAAO,MAAM,SAAS,iBAAiB,KAAK,GAAA,CACzC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,KAAK,KAAA;CACxC,IAAI,MAAM,MAAM;CAChB,IAAI;CACJ,IAAI;EACF,OAAO,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC;CAC5B,QAAQ;EAEN,OAAO,MAAM,IAAI,MAAM,GAAG,CAAC,CAAC,MAAM;EAClC,MAAM,OAAO,OAAO,MAAM,SAAS,MAAM;EACzC,IAAI,MAEF,MAAM,GADQ,OAAO,MAAM,SAAS,mBAAmB,KAAK,QAC7C,KAAK,OAAO,MAAM;CAErC;CACA,MAAM,OAAO,SAAS;EACpB;EACA;EACA,UAAU,OAAO,MAAM,SAAS,SAAS;EACzC,WAAW,OAAO,MAAM,SAAS,YAAY;EAC7C;CACF,CAAC;AACH;;AAeA,SAAgB,oBACd,QAC4D;CAC5D,MAAM,SAASA,aAAAA,aAAa,MAAM;CAClC,MAAM,UAAU,OAAO,eAAeC,iBAAAA;CAEtC,QAAQ,KAAK,MAAM,SAAS;EAC1B,IAAI;GAEF,IAAI,QADa,IAAI,YAAY,MAAM,GAAG,CAAC,CAAC,MAAM,GAC9B,GAAG;IACrB,MAAM,OAAO,IAAI,IAAI,MAAM,KAAK;IAChC,MAAM,MAAM,GAAG,IAAI,SAAS,KAAK,OAAO,IAAI;IAE5C,gBAAqB,QAAQ;KAAE,SAAS,IAAI;KAAS;IAAI,CAAC,CAAC,CAAC,YACpD,CAEN,CACF;GACF;EACF,QAAQ,CAER;EACA,KAAK;CACP;AACF"}
|
package/dist/node.d.cts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { n as ClientConfig, t as AnalyticsClient } from "./core-DVilpn_i.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/node.d.ts
|
|
4
|
+
type HeaderBag = Record<string, string | string[] | undefined>;
|
|
5
|
+
interface CaptureInput {
|
|
6
|
+
headers: HeaderBag;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
/** Framework-agnostic page_view capture from a request-like object. */
|
|
10
|
+
declare function capturePageView(client: AnalyticsClient, input: CaptureInput): Promise<void>;
|
|
11
|
+
interface ExpressReqLike {
|
|
12
|
+
originalUrl: string;
|
|
13
|
+
protocol: string;
|
|
14
|
+
headers: HeaderBag;
|
|
15
|
+
get(name: string): string | undefined;
|
|
16
|
+
}
|
|
17
|
+
type NextFn = () => void;
|
|
18
|
+
interface NodeMiddlewareConfig extends ClientConfig {
|
|
19
|
+
shouldTrack?: (pathname: string) => boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Express/connect middleware. Fire-and-forget; always calls next(). */
|
|
22
|
+
declare function analyticsMiddleware(config: NodeMiddlewareConfig): (req: ExpressReqLike, _res: unknown, next: NextFn) => void;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { CaptureInput, NodeMiddlewareConfig, analyticsMiddleware, capturePageView };
|
|
25
|
+
//# sourceMappingURL=node.d.cts.map
|
package/dist/node.d.mts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { n as ClientConfig, t as AnalyticsClient } from "./core-DVilpn_i.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/node.d.ts
|
|
4
|
+
type HeaderBag = Record<string, string | string[] | undefined>;
|
|
5
|
+
interface CaptureInput {
|
|
6
|
+
headers: HeaderBag;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
/** Framework-agnostic page_view capture from a request-like object. */
|
|
10
|
+
declare function capturePageView(client: AnalyticsClient, input: CaptureInput): Promise<void>;
|
|
11
|
+
interface ExpressReqLike {
|
|
12
|
+
originalUrl: string;
|
|
13
|
+
protocol: string;
|
|
14
|
+
headers: HeaderBag;
|
|
15
|
+
get(name: string): string | undefined;
|
|
16
|
+
}
|
|
17
|
+
type NextFn = () => void;
|
|
18
|
+
interface NodeMiddlewareConfig extends ClientConfig {
|
|
19
|
+
shouldTrack?: (pathname: string) => boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Express/connect middleware. Fire-and-forget; always calls next(). */
|
|
22
|
+
declare function analyticsMiddleware(config: NodeMiddlewareConfig): (req: ExpressReqLike, _res: unknown, next: NextFn) => void;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { CaptureInput, NodeMiddlewareConfig, analyticsMiddleware, capturePageView };
|
|
25
|
+
//# sourceMappingURL=node.d.mts.map
|
package/dist/node.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { t as createClient } from "./core-Cvg8zn6Q.mjs";
|
|
2
|
+
import { t as shouldTrackPath } from "./matchers-CUD5NL5K.mjs";
|
|
3
|
+
//#region src/node.ts
|
|
4
|
+
function header(headers, name) {
|
|
5
|
+
const v = headers[name] ?? headers[name.toLowerCase()];
|
|
6
|
+
return Array.isArray(v) ? v[0] : v;
|
|
7
|
+
}
|
|
8
|
+
/** Framework-agnostic page_view capture from a request-like object. */
|
|
9
|
+
async function capturePageView(client, input) {
|
|
10
|
+
const ip = (header(input.headers, "x-forwarded-for") ?? "").split(",")[0]?.trim() || void 0;
|
|
11
|
+
let url = input.url;
|
|
12
|
+
let path;
|
|
13
|
+
try {
|
|
14
|
+
path = new URL(input.url).pathname;
|
|
15
|
+
} catch {
|
|
16
|
+
path = input.url.split("?")[0] ?? "/";
|
|
17
|
+
const host = header(input.headers, "host");
|
|
18
|
+
if (host) url = `${header(input.headers, "x-forwarded-proto") ?? "https"}://${host}${input.url}`;
|
|
19
|
+
}
|
|
20
|
+
await client.pageView({
|
|
21
|
+
url,
|
|
22
|
+
path,
|
|
23
|
+
referrer: header(input.headers, "referer"),
|
|
24
|
+
userAgent: header(input.headers, "user-agent"),
|
|
25
|
+
ip
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Express/connect middleware. Fire-and-forget; always calls next(). */
|
|
29
|
+
function analyticsMiddleware(config) {
|
|
30
|
+
const client = createClient(config);
|
|
31
|
+
const matcher = config.shouldTrack ?? shouldTrackPath;
|
|
32
|
+
return (req, _res, next) => {
|
|
33
|
+
try {
|
|
34
|
+
if (matcher(req.originalUrl.split("?")[0] ?? "/")) {
|
|
35
|
+
const host = req.get("host") ?? "localhost";
|
|
36
|
+
const url = `${req.protocol}://${host}${req.originalUrl}`;
|
|
37
|
+
capturePageView(client, {
|
|
38
|
+
headers: req.headers,
|
|
39
|
+
url
|
|
40
|
+
}).catch(() => {});
|
|
41
|
+
}
|
|
42
|
+
} catch {}
|
|
43
|
+
next();
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { analyticsMiddleware, capturePageView };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=node.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.mjs","names":[],"sources":["../src/node.ts"],"sourcesContent":["import { type AnalyticsClient, type ClientConfig, createClient } from './core';\nimport { shouldTrackPath } from './matchers';\n\ntype HeaderBag = Record<string, string | string[] | undefined>;\n\nfunction header(headers: HeaderBag, name: string): string | undefined {\n const v = headers[name] ?? headers[name.toLowerCase()];\n return Array.isArray(v) ? v[0] : v;\n}\n\nexport interface CaptureInput {\n headers: HeaderBag;\n url: string;\n}\n\n/** Framework-agnostic page_view capture from a request-like object. */\nexport async function capturePageView(\n client: AnalyticsClient,\n input: CaptureInput,\n): Promise<void> {\n const xff = header(input.headers, 'x-forwarded-for') ?? '';\n const ip = xff.split(',')[0]?.trim() || undefined;\n let url = input.url;\n let path: string;\n try {\n path = new URL(input.url).pathname;\n } catch {\n // bare path (e.g. \"/pricing\") — rebuild an absolute URL from Host, else the collector rejects the batch\n path = input.url.split('?')[0] ?? '/';\n const host = header(input.headers, 'host');\n if (host) {\n const proto = header(input.headers, 'x-forwarded-proto') ?? 'https';\n url = `${proto}://${host}${input.url}`;\n }\n }\n await client.pageView({\n url,\n path,\n referrer: header(input.headers, 'referer'),\n userAgent: header(input.headers, 'user-agent'),\n ip,\n });\n}\n\ninterface ExpressReqLike {\n originalUrl: string;\n protocol: string;\n headers: HeaderBag;\n get(name: string): string | undefined;\n}\ntype NextFn = () => void;\n\nexport interface NodeMiddlewareConfig extends ClientConfig {\n shouldTrack?: (pathname: string) => boolean;\n}\n\n/** Express/connect middleware. Fire-and-forget; always calls next(). */\nexport function analyticsMiddleware(\n config: NodeMiddlewareConfig,\n): (req: ExpressReqLike, _res: unknown, next: NextFn) => void {\n const client = createClient(config);\n const matcher = config.shouldTrack ?? shouldTrackPath;\n\n return (req, _res, next) => {\n try {\n const pathname = req.originalUrl.split('?')[0] ?? '/';\n if (matcher(pathname)) {\n const host = req.get('host') ?? 'localhost';\n const url = `${req.protocol}://${host}${req.originalUrl}`;\n // catch the build/send rejection so a voided promise never becomes a fatal unhandled rejection\n void capturePageView(client, { headers: req.headers, url }).catch(\n () => {\n // never block the request\n },\n );\n }\n } catch {\n // never block the request\n }\n next();\n };\n}\n"],"mappings":";;;AAKA,SAAS,OAAO,SAAoB,MAAkC;CACpE,MAAM,IAAI,QAAQ,SAAS,QAAQ,KAAK,YAAY;CACpD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,KAAK;AACnC;;AAQA,eAAsB,gBACpB,QACA,OACe;CAEf,MAAM,MADM,OAAO,MAAM,SAAS,iBAAiB,KAAK,GAAA,CACzC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,KAAK,KAAA;CACxC,IAAI,MAAM,MAAM;CAChB,IAAI;CACJ,IAAI;EACF,OAAO,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC;CAC5B,QAAQ;EAEN,OAAO,MAAM,IAAI,MAAM,GAAG,CAAC,CAAC,MAAM;EAClC,MAAM,OAAO,OAAO,MAAM,SAAS,MAAM;EACzC,IAAI,MAEF,MAAM,GADQ,OAAO,MAAM,SAAS,mBAAmB,KAAK,QAC7C,KAAK,OAAO,MAAM;CAErC;CACA,MAAM,OAAO,SAAS;EACpB;EACA;EACA,UAAU,OAAO,MAAM,SAAS,SAAS;EACzC,WAAW,OAAO,MAAM,SAAS,YAAY;EAC7C;CACF,CAAC;AACH;;AAeA,SAAgB,oBACd,QAC4D;CAC5D,MAAM,SAAS,aAAa,MAAM;CAClC,MAAM,UAAU,OAAO,eAAe;CAEtC,QAAQ,KAAK,MAAM,SAAS;EAC1B,IAAI;GAEF,IAAI,QADa,IAAI,YAAY,MAAM,GAAG,CAAC,CAAC,MAAM,GAC9B,GAAG;IACrB,MAAM,OAAO,IAAI,IAAI,MAAM,KAAK;IAChC,MAAM,MAAM,GAAG,IAAI,SAAS,KAAK,OAAO,IAAI;IAE5C,gBAAqB,QAAQ;KAAE,SAAS,IAAI;KAAS;IAAI,CAAC,CAAC,CAAC,YACpD,CAEN,CACF;GACF;EACF,QAAQ,CAER;EACA,KAAK;CACP;AACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pingaura/telemetry",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "PingAura first-party analytics — Node / Next.js / Cloudflare Workers server SDK",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "PingAura AI",
|
|
7
|
+
"homepage": "https://www.pingaura.ai",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/pingaura-ai/pingaura-telemetry-sdk.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/pingaura-ai/pingaura-telemetry-sdk/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"analytics",
|
|
17
|
+
"telemetry",
|
|
18
|
+
"first-party-analytics",
|
|
19
|
+
"pingaura",
|
|
20
|
+
"nextjs",
|
|
21
|
+
"cloudflare-workers"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"main": "./dist/index.cjs",
|
|
26
|
+
"module": "./dist/index.mjs",
|
|
27
|
+
"types": "./dist/index.d.cts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
32
|
+
"default": "./dist/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./dist/index.d.cts",
|
|
36
|
+
"default": "./dist/index.cjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"./next": {
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./dist/next.d.mts",
|
|
42
|
+
"default": "./dist/next.mjs"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./dist/next.d.cts",
|
|
46
|
+
"default": "./dist/next.cjs"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./node": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./dist/node.d.mts",
|
|
52
|
+
"default": "./dist/node.mjs"
|
|
53
|
+
},
|
|
54
|
+
"require": {
|
|
55
|
+
"types": "./dist/node.d.cts",
|
|
56
|
+
"default": "./dist/node.cjs"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"./cloudflare": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./dist/cloudflare.d.mts",
|
|
62
|
+
"default": "./dist/cloudflare.mjs"
|
|
63
|
+
},
|
|
64
|
+
"require": {
|
|
65
|
+
"types": "./dist/cloudflare.d.cts",
|
|
66
|
+
"default": "./dist/cloudflare.cjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"./package.json": "./package.json"
|
|
70
|
+
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=24.0.0"
|
|
73
|
+
},
|
|
74
|
+
"files": [
|
|
75
|
+
"dist"
|
|
76
|
+
],
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"access": "public"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "tsdown",
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"lint": "eslint .",
|
|
85
|
+
"format": "prettier --write .",
|
|
86
|
+
"clean": "rm -rf dist",
|
|
87
|
+
"prepublishOnly": "pnpm run build"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@eslint/js": "^10.0.1",
|
|
91
|
+
"@types/node": "^26.0.1",
|
|
92
|
+
"eslint": "^10.5.0",
|
|
93
|
+
"prettier": "^3.8.4",
|
|
94
|
+
"tsdown": "^0.22.3",
|
|
95
|
+
"typescript": "^6.0.3",
|
|
96
|
+
"typescript-eslint": "^8.62.0",
|
|
97
|
+
"vitest": "^4.1.9"
|
|
98
|
+
},
|
|
99
|
+
"pnpm": {
|
|
100
|
+
"onlyBuiltDependencies": [
|
|
101
|
+
"esbuild"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|