@powerhousedao/reactor-api 6.2.3-dev.5 → 6.2.3-dev.50
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/README.md +7 -2
- package/dist/{adapter-gateway-apollo-CxJNBVyD.mjs → adapter-gateway-apollo-B54G_cXT.mjs} +15 -13
- package/dist/{adapter-gateway-apollo-CxJNBVyD.mjs.map → adapter-gateway-apollo-B54G_cXT.mjs.map} +1 -1
- package/dist/{adapter-gateway-apollo-DowrX6E_.mjs → adapter-gateway-apollo-D2DNlPY0.mjs} +3 -3
- package/dist/{adapter-gateway-mercurius-CZVy88Za.mjs → adapter-gateway-mercurius-rbKlwF9m.mjs} +4 -4
- package/dist/{adapter-gateway-mercurius-CZVy88Za.mjs.map → adapter-gateway-mercurius-rbKlwF9m.mjs.map} +1 -1
- package/dist/{adapter-gateway-stitching-CaZjvRzx.mjs → adapter-gateway-stitching-Dzv10u8D.mjs} +15 -10
- package/dist/{adapter-gateway-stitching-CaZjvRzx.mjs.map → adapter-gateway-stitching-Dzv10u8D.mjs.map} +1 -1
- package/dist/{adapter-http-express-B39rPhqH.mjs → adapter-http-express-P0t-mdMV.mjs} +10 -10
- package/dist/adapter-http-express-P0t-mdMV.mjs.map +1 -0
- package/dist/{adapter-http-fastify-BwXO6rqE.mjs → adapter-http-fastify-D0OP5q9K.mjs} +13 -12
- package/dist/adapter-http-fastify-D0OP5q9K.mjs.map +1 -0
- package/dist/index.d.mts +1621 -604
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2622 -617
- package/dist/index.mjs.map +1 -1
- package/dist/pglite-node-Ow9i5Rb4.mjs +573 -0
- package/dist/pglite-node-Ow9i5Rb4.mjs.map +1 -0
- package/dist/rolldown-runtime-8H4AJuhK.mjs +16 -0
- package/dist/run-node-handler-CQjyjOuN.mjs +52 -0
- package/dist/run-node-handler-CQjyjOuN.mjs.map +1 -0
- package/dist/src/packages/https-hooks.d.mts +4 -4
- package/dist/src/packages/https-hooks.d.mts.map +1 -1
- package/dist/src/packages/https-hooks.mjs +2 -2
- package/dist/src/packages/https-hooks.mjs.map +1 -1
- package/dist/src/packages/vite-loader.d.mts +19 -9
- package/dist/src/packages/vite-loader.d.mts.map +1 -1
- package/dist/src/packages/vite-loader.mjs +114 -50
- package/dist/src/packages/vite-loader.mjs.map +1 -1
- package/dist/src/pglite/pglite-node.d.mts +130 -0
- package/dist/src/pglite/pglite-node.d.mts.map +1 -0
- package/dist/src/pglite/pglite-node.mjs +4 -0
- package/dist/{utils-XWVecaNn.mjs → subgraph-extraction-DTFoN_bS.mjs} +266 -11
- package/dist/subgraph-extraction-DTFoN_bS.mjs.map +1 -0
- package/dist/{types-DcYyNcHJ.d.mts → types-DlTiz6AA.d.mts} +27 -4
- package/dist/types-DlTiz6AA.d.mts.map +1 -0
- package/dist/{websocket-DncAB9XK.mjs → websocket-_SH5aBcy.mjs} +3 -3
- package/dist/{websocket-DncAB9XK.mjs.map → websocket-_SH5aBcy.mjs.map} +1 -1
- package/package.json +24 -19
- package/dist/adapter-http-express-B39rPhqH.mjs.map +0 -1
- package/dist/adapter-http-fastify-BwXO6rqE.mjs.map +0 -1
- package/dist/path-normalize-BOQwY9wR.mjs +0 -23
- package/dist/path-normalize-BOQwY9wR.mjs.map +0 -1
- package/dist/types-DcYyNcHJ.d.mts.map +0 -1
- package/dist/utils-XWVecaNn.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import {
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="858c51f5-8289-53be-bf25-14f7c2aa4177")}catch(e){}}();
|
|
3
|
+
import { n as normalizePath, t as runNodeHandler } from "./run-node-handler-CQjyjOuN.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { match } from "path-to-regexp";
|
|
6
6
|
import { Readable } from "node:stream";
|
|
7
|
-
import
|
|
7
|
+
import nodeFs from "node:fs";
|
|
8
8
|
import http from "node:http";
|
|
9
9
|
import https from "node:https";
|
|
10
10
|
import Fastify from "fastify";
|
|
@@ -87,7 +87,7 @@ var FastifyHttpAdapter = class {
|
|
|
87
87
|
if (!this.#instance) return;
|
|
88
88
|
sentry.setupFastifyErrorHandler(this.#instance);
|
|
89
89
|
}
|
|
90
|
-
async listen(port, tls) {
|
|
90
|
+
async listen(port, tls, host) {
|
|
91
91
|
let httpServer;
|
|
92
92
|
if (tls === true) {
|
|
93
93
|
const { cert, key } = await devcert.certificateFor("localhost");
|
|
@@ -99,20 +99,21 @@ var FastifyHttpAdapter = class {
|
|
|
99
99
|
} else if (tls && "keyPath" in tls) {
|
|
100
100
|
const cwd = process.cwd();
|
|
101
101
|
httpServer = https.createServer({
|
|
102
|
-
key:
|
|
103
|
-
cert:
|
|
102
|
+
key: nodeFs.readFileSync(path.join(cwd, tls.keyPath)),
|
|
103
|
+
cert: nodeFs.readFileSync(path.join(cwd, tls.certPath))
|
|
104
104
|
});
|
|
105
105
|
} else if (tls && "cert" in tls) httpServer = https.createServer({
|
|
106
106
|
cert: tls.cert,
|
|
107
107
|
key: tls.key
|
|
108
108
|
});
|
|
109
109
|
else httpServer = http.createServer();
|
|
110
|
+
const bodyLimit = this.#setupOps.find((op) => op.kind === "cors")?.bodyLimit ?? 52428800;
|
|
110
111
|
const instance = Fastify({
|
|
111
112
|
serverFactory: (handler) => {
|
|
112
113
|
httpServer.on("request", handler);
|
|
113
114
|
return httpServer;
|
|
114
115
|
},
|
|
115
|
-
bodyLimit
|
|
116
|
+
bodyLimit,
|
|
116
117
|
logger: false
|
|
117
118
|
});
|
|
118
119
|
this.#instance = instance;
|
|
@@ -128,7 +129,7 @@ var FastifyHttpAdapter = class {
|
|
|
128
129
|
}
|
|
129
130
|
req.raw.params = claimed.params;
|
|
130
131
|
reply.hijack();
|
|
131
|
-
claimed.route.handler
|
|
132
|
+
runNodeHandler(claimed.route.handler, req.raw, reply.raw, void 0);
|
|
132
133
|
});
|
|
133
134
|
instance.route({
|
|
134
135
|
method: [
|
|
@@ -145,7 +146,7 @@ var FastifyHttpAdapter = class {
|
|
|
145
146
|
await instance.ready();
|
|
146
147
|
return new Promise((resolve, reject) => {
|
|
147
148
|
httpServer.once("error", reject);
|
|
148
|
-
httpServer.listen(port, () => {
|
|
149
|
+
httpServer.listen(port, host, () => {
|
|
149
150
|
httpServer.off("error", reject);
|
|
150
151
|
resolve(httpServer);
|
|
151
152
|
});
|
|
@@ -176,7 +177,7 @@ var FastifyHttpAdapter = class {
|
|
|
176
177
|
if (node) {
|
|
177
178
|
req.raw.params = node.params;
|
|
178
179
|
reply.hijack();
|
|
179
|
-
node.route.handler
|
|
180
|
+
runNodeHandler(node.route.handler, req.raw, reply.raw, req.body);
|
|
180
181
|
return;
|
|
181
182
|
}
|
|
182
183
|
if (method === "GET") {
|
|
@@ -239,5 +240,5 @@ function createFastifyHttpAdapter() {
|
|
|
239
240
|
//#endregion
|
|
240
241
|
export { createFastifyHttpAdapter };
|
|
241
242
|
|
|
242
|
-
//# sourceMappingURL=adapter-http-fastify-
|
|
243
|
-
//# debugId=
|
|
243
|
+
//# sourceMappingURL=adapter-http-fastify-D0OP5q9K.mjs.map
|
|
244
|
+
//# debugId=858c51f5-8289-53be-bf25-14f7c2aa4177
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-http-fastify-D0OP5q9K.mjs","sources":["../src/graphql/gateway/adapter-http-fastify.ts"],"sourcesContent":["import fastifyCors from \"@fastify/cors\";\nimport fastifyFormbody from \"@fastify/formbody\";\nimport fastifyMiddie from \"@fastify/middie\";\nimport type { CorsOptions } from \"cors\";\nimport devcert from \"devcert\";\nimport Fastify from \"fastify\";\nimport type { FastifyInstance, FastifyReply, FastifyRequest } from \"fastify\";\nimport fs from \"node:fs\";\nimport http from \"node:http\";\nimport https from \"node:https\";\nimport nodePath from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport type { ReadableStream as WebReadableStream } from \"node:stream/web\";\nimport { match, type MatchFunction, type ParamData } from \"path-to-regexp\";\nimport type {\n FetchHandler,\n HttpMethod,\n IHttpAdapter,\n NodeRouteOptions,\n AdapterRouteHandle,\n TlsOptions,\n} from \"./types.js\";\nimport { normalizePath } from \"./path-normalize.js\";\nimport { runNodeHandler, type NodeHandler } from \"./run-node-handler.js\";\n\n/** Parses body-limit strings like \"50mb\" to bytes. */\nfunction parseBodyLimit(limit: string): number {\n const m = /^(\\d+(?:\\.\\d+)?)\\s*(b|kb|mb|gb)?$/i.exec(limit.trim());\n if (!m) return 52_428_800; // 50 MB fallback\n const n = parseFloat(m[1]);\n const units: Record<string, number> = {\n b: 1,\n kb: 1_024,\n mb: 1_048_576,\n gb: 1_073_741_824,\n };\n return Math.round(n * (units[(m[2] ?? \"b\").toLowerCase()] ?? 1));\n}\n\ntype FetchEntry = {\n path: string;\n handler: FetchHandler;\n matcher: MatchFunction<ParamData>;\n prefix: boolean;\n};\n\ntype GetEntry = {\n path: string;\n handler: (r: Request) => Response | Promise<Response>;\n matcher: MatchFunction<ParamData>;\n};\n\ntype NodeEntry = {\n path: string;\n method: HttpMethod;\n matcher: MatchFunction<ParamData>;\n handler: NodeHandler;\n /** Claimed in the onRequest hook, before any body parsing. */\n rawBody: boolean;\n};\n\n// Pre-listen configuration ops (need the Fastify instance to apply).\ntype SetupOp =\n | { kind: \"cors\"; options?: CorsOptions; bodyLimit: number }\n | { kind: \"middie\"; middleware: unknown };\n\nexport class FastifyHttpAdapter implements IHttpAdapter {\n // Dispatch maps, keyed by route handle and iterated in registration\n // order — populated at any time (before or after listen). Mounting a\n // path that already holds a route of the same kind (and method, for\n // node routes) replaces the old entry, so re-mounting is last-write-\n // wins without accumulating; a handle's dispose() removes its own entry.\n readonly #fetchRoutes = new Map<number, FetchEntry>();\n readonly #getRoutes = new Map<number, GetEntry>();\n readonly #nodeRoutes = new Map<number, NodeEntry>();\n #nextHandle = 0;\n\n // Ops that need the Fastify instance (CORS config, Connect middleware).\n readonly #setupOps: SetupOp[] = [];\n\n #instance: FastifyInstance | undefined;\n\n get handle(): unknown {\n return this.#instance;\n }\n\n setupMiddleware({\n corsOptions,\n bodyLimit = \"50mb\",\n }: {\n corsOptions?: CorsOptions;\n bodyLimit?: string;\n }): void {\n this.#setupOps.push({\n kind: \"cors\",\n options: corsOptions,\n bodyLimit: parseBodyLimit(bodyLimit),\n });\n }\n\n mount(\n path: string,\n handler: FetchHandler,\n { prefix, exact }: { prefix?: boolean; exact?: boolean } = {},\n ): AdapterRouteHandle {\n // `exact` never meant exact: it selected prefix matching. Kept as an alias\n // so existing callers keep working while the name is retired.\n const asPrefix = prefix ?? exact ?? false;\n for (const [handle, entry] of this.#fetchRoutes) {\n if (entry.path === path) this.#fetchRoutes.delete(handle);\n }\n const handle = this.#nextHandle++;\n this.#fetchRoutes.set(handle, {\n path,\n handler,\n matcher: match(normalizePath(path), { end: !asPrefix }),\n prefix: asPrefix,\n });\n return { dispose: () => this.#fetchRoutes.delete(handle) };\n }\n\n getRoute(\n path: string,\n handler: (r: Request) => Response | Promise<Response>,\n ): AdapterRouteHandle {\n for (const [handle, entry] of this.#getRoutes) {\n if (entry.path === path) this.#getRoutes.delete(handle);\n }\n const handle = this.#nextHandle++;\n this.#getRoutes.set(handle, {\n path,\n handler,\n matcher: match(normalizePath(path)),\n });\n return { dispose: () => this.#getRoutes.delete(handle) };\n }\n\n mountNodeRoute(\n method: HttpMethod,\n path: string,\n handler: NodeHandler,\n { rawBody = false, prefix = false }: NodeRouteOptions = {},\n ): AdapterRouteHandle {\n for (const [handle, entry] of this.#nodeRoutes) {\n if (entry.path === path && entry.method === method) {\n this.#nodeRoutes.delete(handle);\n }\n }\n const handle = this.#nextHandle++;\n this.#nodeRoutes.set(handle, {\n path,\n method,\n matcher: match(normalizePath(path), { end: !prefix }),\n handler,\n rawBody,\n });\n return { dispose: () => this.#nodeRoutes.delete(handle) };\n }\n\n mountRawMiddleware(middleware: unknown): void {\n if (this.#instance) {\n // @fastify/middie is always registered, so .use() is available post-listen.\n (\n this.#instance as FastifyInstance & {\n use(middleware: unknown): FastifyInstance;\n }\n ).use(middleware);\n } else {\n this.#setupOps.push({ kind: \"middie\", middleware });\n }\n }\n\n setupSentryErrorHandler(sentry: object): void {\n if (!this.#instance) return;\n const s = sentry as {\n setupFastifyErrorHandler(app: FastifyInstance): void;\n };\n s.setupFastifyErrorHandler(this.#instance);\n }\n\n async listen(\n port: number,\n tls?: TlsOptions,\n host?: string,\n ): Promise<http.Server> {\n let httpServer: http.Server;\n\n if (tls === true) {\n const { cert, key } = (await devcert.certificateFor(\"localhost\")) as {\n cert: Buffer;\n key: Buffer;\n };\n if (!cert || !key) throw new Error(\"Invalid certificate generated\");\n httpServer = https.createServer({ cert, key });\n } else if (tls && \"keyPath\" in tls) {\n const cwd = process.cwd();\n httpServer = https.createServer({\n key: fs.readFileSync(nodePath.join(cwd, tls.keyPath)),\n cert: fs.readFileSync(nodePath.join(cwd, tls.certPath)),\n });\n } else if (tls && \"cert\" in tls) {\n httpServer = https.createServer({ cert: tls.cert, key: tls.key });\n } else {\n httpServer = http.createServer();\n }\n\n const corsOp = this.#setupOps.find(\n (op): op is Extract<SetupOp, { kind: \"cors\" }> => op.kind === \"cors\",\n );\n const bodyLimit = corsOp?.bodyLimit ?? 52_428_800;\n\n const instance = Fastify({\n serverFactory: (handler) => {\n httpServer.on(\"request\", handler);\n return httpServer;\n },\n bodyLimit,\n logger: false,\n });\n\n this.#instance = instance;\n\n // Always register middie first so .use() is available post-listen.\n await instance.register(fastifyMiddie);\n await instance.register(fastifyFormbody);\n\n for (const op of this.#setupOps) {\n if (op.kind === \"cors\") {\n await instance.register(\n fastifyCors,\n op.options as Parameters<typeof fastifyCors>[1],\n );\n } else {\n (\n instance as FastifyInstance & {\n use(middleware: unknown): FastifyInstance;\n }\n ).use(op.middleware);\n }\n }\n\n // Raw routes are claimed here, in the earliest hook there is: Fastify\n // parses the body before the handler runs, and it 415s an unknown content\n // type outright, so a route that needs the octets as sent cannot wait for\n // dispatch. `hijack()` takes the reply out of Fastify's lifecycle and the\n // handler owns the socket from here.\n instance.addHook(\"onRequest\", (req, reply, done) => {\n const claimed = this.#matchNodeRoute(req, true);\n if (!claimed) {\n done();\n return;\n }\n (req.raw as http.IncomingMessage & { params?: ParamData }).params =\n claimed.params;\n reply.hijack();\n runNodeHandler(claimed.route.handler, req.raw, reply.raw, undefined);\n });\n\n // Single catch-all route — all dispatching is done via the Maps above so\n // that routes registered after listen() are picked up automatically.\n // OPTIONS is excluded because @fastify/cors registers its own OPTIONS /*\n // handler for preflight; including it here would cause a duplicate-route\n // conflict at startup.\n instance.route({\n method: [\"DELETE\", \"GET\", \"HEAD\", \"PATCH\", \"POST\", \"PUT\"],\n url: \"/*\",\n handler: (req, reply) => this.#dispatch(req, reply),\n });\n\n await instance.ready();\n\n return new Promise<http.Server>((resolve, reject) => {\n httpServer.once(\"error\", reject);\n httpServer.listen(port, host, () => {\n httpServer.off(\"error\", reject);\n resolve(httpServer);\n });\n });\n }\n\n /**\n * Finds a node route for this request. `raw` selects which half of the\n * registry to consider: raw routes are claimed in the onRequest hook, the\n * rest in the catch-all handler once the body is parsed.\n */\n #matchNodeRoute(\n req: FastifyRequest,\n raw: boolean,\n ): { route: NodeEntry; params: ParamData } | undefined {\n const pathname = new URL(req.url, \"http://localhost\").pathname;\n const method = req.method.toUpperCase();\n for (const entry of this.#nodeRoutes.values()) {\n if (entry.rawBody !== raw) continue;\n if (entry.method !== method) continue;\n const result = entry.matcher(pathname);\n if (result) return { route: entry, params: result.params };\n }\n return undefined;\n }\n\n #dispatch(\n req: FastifyRequest,\n reply: FastifyReply,\n ): void | Promise<FastifyReply> {\n const pathname = new URL(req.url, \"http://localhost\").pathname;\n const method = req.method.toUpperCase() as\n | \"DELETE\"\n | \"GET\"\n | \"HEAD\"\n | \"PATCH\"\n | \"POST\"\n | \"PUT\";\n\n // 1. Node routes — path-to-regexp match + method, handler manages raw\n // response. Attach decoded params onto `req.raw` so downstream handlers\n // can read them via the same `req.params` API the Express adapter exposes.\n const node = this.#matchNodeRoute(req, false);\n if (node) {\n (req.raw as http.IncomingMessage & { params?: ParamData }).params =\n node.params;\n reply.hijack();\n runNodeHandler(node.route.handler, req.raw, reply.raw, req.body);\n return;\n }\n\n // 2. GET-specific routes (health, explorer, etc.).\n if (method === \"GET\") {\n for (const entry of this.#getRoutes.values()) {\n if (entry.matcher(pathname)) {\n return this.#serveGetEntry(entry, req, reply);\n }\n }\n }\n\n // 3. Fetch routes (GraphQL handlers, SSE, etc.).\n // Iterate in reverse so that the last-mounted handler wins when the same\n // path is mounted more than once (e.g. supergraph remount after reload).\n for (const entry of [...this.#fetchRoutes.values()].reverse()) {\n if (entry.matcher(pathname)) {\n return serveFetchHandler(entry.handler, req, reply);\n }\n }\n\n void reply.status(404).send({\n message: `Route ${req.method}:${pathname} not found`,\n error: \"Not Found\",\n statusCode: 404,\n });\n }\n\n async #serveGetEntry(\n entry: GetEntry,\n req: FastifyRequest,\n reply: FastifyReply,\n ): Promise<FastifyReply> {\n const url = buildUrl(req);\n const headers = buildHeaders(req);\n const fetchReq = new Request(url, { method: \"GET\", headers });\n const response = await entry.handler(fetchReq);\n writeResponse(reply, response);\n if (response.body === null) {\n return reply.send(await response.text());\n }\n // Stream the body instead of awaiting .text(): a stream-backed body\n // (e.g. graphql-sse) only closes when the subscription completes, so\n // awaiting would hang the request. Fastify tears the source down on\n // client disconnect and routes pre-header stream errors to the\n // error handler.\n // `response.body` is typed against the global (lib) ReadableStream\n // declaration, while Readable.fromWeb wants node:stream/web's; at\n // runtime they are the same stream, so the cast is safe.\n const bodyStream = response.body as WebReadableStream;\n return reply.send(Readable.fromWeb(bodyStream));\n }\n}\n\nasync function serveFetchHandler(\n handler: FetchHandler,\n req: FastifyRequest,\n reply: FastifyReply,\n): Promise<FastifyReply> {\n const url = buildUrl(req);\n const headers = buildHeaders(req);\n let body: string | undefined;\n if (req.method !== \"GET\" && req.method !== \"HEAD\" && req.body !== undefined) {\n body = JSON.stringify(req.body);\n }\n const response = await handler(\n new Request(url, { method: req.method, headers, body }),\n );\n writeResponse(reply, response);\n if (response.body === null) {\n return reply.send(await response.text());\n }\n // Stream the body instead of awaiting .text(): a stream-backed body\n // (e.g. graphql-sse) only closes when the subscription completes, so\n // awaiting would hang the request. Fastify tears the source down on\n // client disconnect and routes pre-header stream errors to the\n // error handler.\n // `response.body` is typed against the global (lib) ReadableStream\n // declaration, while Readable.fromWeb wants node:stream/web's; at\n // runtime they are the same stream, so the cast is safe.\n const bodyStream = response.body as WebReadableStream;\n return reply.send(Readable.fromWeb(bodyStream));\n}\n\nfunction buildUrl(req: FastifyRequest): string {\n const protocol = req.protocol;\n const host = req.headers.host ?? \"localhost\";\n return `${protocol}://${host}${req.url}`;\n}\n\nfunction buildHeaders(req: FastifyRequest): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(req.headers)) {\n if (typeof value === \"string\") {\n headers.set(key, value);\n } else if (Array.isArray(value)) {\n headers.set(key, value.join(\", \"));\n }\n }\n return headers;\n}\n\nfunction writeResponse(reply: FastifyReply, response: Response): void {\n reply.statusCode = response.status;\n response.headers.forEach((value, key) => {\n reply.header(key, value);\n });\n}\n\nexport function createFastifyHttpAdapter(): { adapter: IHttpAdapter } {\n return { adapter: new FastifyHttpAdapter() };\n}\n"],"names":["fs","nodePath"],"mappings":";;;;;;;;;;;;;;;;AA0BA,SAAS,eAAe,OAAuB;CAC7C,MAAM,IAAI,qCAAqC,KAAK,MAAM,KAAK,CAAC;CAChE,IAAI,CAAC,GAAG,OAAO;CACf,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