alink-cli 0.11.3 → 0.11.4
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 +1 -1
- package/bin/agentlink-prompts.js +27 -0
- package/bin/agentlink.js +68 -14
- package/dist/{Config-nQ0ig08n.mjs → Config-CxDW-52j.mjs} +5 -5
- package/dist/Config-CxDW-52j.mjs.map +1 -0
- package/dist/{NodeHttpServer-D8xOGdyN.mjs → NodeHttpServer-D2VeYRw1.mjs} +11 -11
- package/dist/NodeHttpServer-D2VeYRw1.mjs.map +1 -0
- package/dist/{NodeServices-D5Lui-4t.mjs → NodeServices-BtcL7AtO.mjs} +22 -22
- package/dist/NodeServices-BtcL7AtO.mjs.map +1 -0
- package/dist/{NodeSocket-C7yHTDM1.mjs → NodeSocket-CLfrrutd.mjs} +61 -61
- package/dist/NodeSocket-CLfrrutd.mjs.map +1 -0
- package/dist/{NodeSqliteClient-S86HxjMf.mjs → NodeSqliteClient-FfrElFAX.mjs} +5 -5
- package/dist/NodeSqliteClient-FfrElFAX.mjs.map +1 -0
- package/dist/{Schema-CxqR6bXx.mjs → Schema-B4KtKnpr.mjs} +91 -91
- package/dist/Schema-B4KtKnpr.mjs.map +1 -0
- package/dist/{SqlClient-ePUtEqLJ.mjs → SqlClient-BQM_tAo_.mjs} +6 -6
- package/dist/SqlClient-BQM_tAo_.mjs.map +1 -0
- package/dist/bin.mjs +170 -170
- package/dist/bin.mjs.map +1 -1
- package/dist/daemon.js +138 -138
- package/dist/qr.js +22 -22
- package/dist/ui.js +179 -171
- package/package.json +1 -1
- package/dist/Config-nQ0ig08n.mjs.map +0 -1
- package/dist/NodeHttpServer-D8xOGdyN.mjs.map +0 -1
- package/dist/NodeServices-D5Lui-4t.mjs.map +0 -1
- package/dist/NodeSocket-C7yHTDM1.mjs.map +0 -1
- package/dist/NodeSqliteClient-S86HxjMf.mjs.map +0 -1
- package/dist/Schema-CxqR6bXx.mjs.map +0 -1
- package/dist/SqlClient-ePUtEqLJ.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeHttpServer-D2VeYRw1.mjs","names":["Inspectable.Class","IncomingMessage.TypeId","Headers.fromInput","Option.fromNullishOr","Effect.runSync","Effect.cached","Effect.flatMap","IncomingMessage.MaxBodySize","NodeStream.toString","Effect.map","Effect.try","UrlParams.fromInput","NodeStream.fromReadable","Effect.withFiber","NodeStream.toArrayBuffer","Effect.callback","Effect.succeed","Effect.die","make","Effect.map","Response.setHeader","Response.setBody","HttpBody.uint8Array","ServerResponse.removeHeader","ServerResponse.setBody","NodeHttpCompression.algorithms","Effect.succeed","HttpBody.stream","NodeStream.pipeThroughDuplex","NodeHttpCompression.compressTransform","HttpBody.raw","make","ServerResponse.raw","Mime","Headers.merge","Headers.fromRecordUnsafe","layer","Platform.HttpPlatform","NodeFileSystem.layer","EtagImpl.layer","MP.make","make","Multipart.makeConfig","Effect.map","NodeStream.fromReadable","MP.make","Stream.unwrap","Stream.map","Multipart.toPersisted","Effect.tryPromise","NFS","Inspectable.Class","Multipart.TypeId","MP.decodeField","NodeStream.toUint8Array","scope","Effect.scope","Effect.callback","Effect.void","Effect.die","Effect.cached","Effect.timeoutOrElse","Duration.seconds","Scope.addFinalizer","Effect.fail","Effect.acquireRelease","Effect.sync","Scope.provide","HttpServer.make","Effect.fnUntraced","Scope.forkUnsafe","Scope.addFinalizerExit","HttpEffect.toHandled","Effect.withFiber","Effect.succeed","Context.add","Fiber.runIn","Effect.runForkWith","Socket.fromWebSocket","Effect.flatMap","Request.TypeId","Cookies.parseHeader","Effect.runSync","NodeMultipart.persisted","NodeMultipart.stream","HttpIncomingMessage.inspect","HttpServer.HttpServer","NodeHttpPlatform.layer","Etag.layerWeak","NodeServices.layer","Layer.mergeAll","Layer.effect","Config.unwrap","FetchHttpClient.layer","FetchHttpClient.RequestInit","Cookies.isEmpty","Cookies.toSetCookieHeaders","Effect.andThen","Effect.tryPromise","Effect.interruptible","Effect.tapCause","Effect.suspend","Latch.makeUnsafe","Stream.orDie","Stream.runForEachArray","Effect.matchCauseEffect","Effect.failCause","Cause.combine","Cause.die"],"sources":["../../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeHttpIncomingMessage.js","../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodeHttpCompression.js","../../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeHttpPlatform.js","../../../node_modules/.pnpm/multipasta@0.2.8/node_modules/multipasta/dist/esm/node.js","../../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeMultipart.js","../../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeHttpServer.js"],"sourcesContent":["/**\n * Adapter base for exposing Node `http.IncomingMessage` values as Effect HTTP\n * incoming messages.\n *\n * Server requests and Node client responses both arrive as Node readable\n * streams with raw header objects, socket metadata, and one-shot body\n * consumption. This module's `NodeHttpIncomingMessage` class keeps the original\n * Node message available while presenting Effect's `HttpIncomingMessage` shape:\n * typed headers, remote address lookup, stream access, and text, JSON,\n * URL-encoded, and array-buffer body readers.\n *\n * @since 4.0.0\n */\nimport * as Effect from \"effect/Effect\";\nimport * as Inspectable from \"effect/Inspectable\";\nimport * as Option from \"effect/Option\";\nimport * as Headers from \"effect/unstable/http/Headers\";\nimport * as IncomingMessage from \"effect/unstable/http/HttpIncomingMessage\";\nimport * as UrlParams from \"effect/unstable/http/UrlParams\";\nimport * as NodeStream from \"./NodeStream.js\";\n/**\n * Adapts a Node `IncomingMessage` to Effect HTTP incoming messages.\n *\n * **When to use**\n *\n * Use to implement Node HTTP request or response adapters that expose the\n * Effect HTTP incoming-message interface.\n *\n * **Details**\n *\n * The adapter exposes headers, remote address, stream access, and cached body\n * decoders. Subclasses provide the error mapping for unknown Node errors.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport class NodeHttpIncomingMessage extends Inspectable.Class {\n /**\n * Marks this value as an HTTP incoming message for runtime guards.\n *\n * @since 4.0.0\n */\n [IncomingMessage.TypeId];\n source;\n onError;\n remoteAddressOverride;\n constructor(source, onError, remoteAddressOverride) {\n super();\n this[IncomingMessage.TypeId] = IncomingMessage.TypeId;\n this.source = source;\n this.onError = onError;\n this.remoteAddressOverride = remoteAddressOverride;\n }\n get headers() {\n return Headers.fromInput(this.source.headers);\n }\n get remoteAddress() {\n return this.remoteAddressOverride ?? Option.fromNullishOr(this.source.socket.remoteAddress);\n }\n textEffect;\n get text() {\n if (this.textEffect) {\n return this.textEffect;\n }\n this.textEffect = Effect.runSync(Effect.cached(Effect.flatMap(IncomingMessage.MaxBodySize, maxBodySize => NodeStream.toString(() => this.source, {\n onError: this.onError,\n maxBytes: maxBodySize\n }))));\n this.arrayBufferEffect = Effect.map(this.textEffect, _ => new TextEncoder().encode(_).buffer);\n return this.textEffect;\n }\n get textUnsafe() {\n return Effect.runSync(this.text);\n }\n get json() {\n return Effect.flatMap(this.text, text => Effect.try({\n try: () => text === \"\" ? null : JSON.parse(text),\n catch: this.onError\n }));\n }\n get jsonUnsafe() {\n return Effect.runSync(this.json);\n }\n get urlParamsBody() {\n return Effect.flatMap(this.text, _ => Effect.try({\n try: () => UrlParams.fromInput(new URLSearchParams(_)),\n catch: this.onError\n }));\n }\n get stream() {\n return NodeStream.fromReadable({\n evaluate: () => this.source,\n onError: this.onError\n });\n }\n arrayBufferEffect;\n get arrayBuffer() {\n if (this.arrayBufferEffect) {\n return this.arrayBufferEffect;\n }\n this.arrayBufferEffect = Effect.withFiber(fiber => NodeStream.toArrayBuffer(() => this.source, {\n onError: this.onError,\n maxBytes: fiber.getRef(IncomingMessage.MaxBodySize)\n })).pipe(Effect.cached, Effect.runSync);\n this.textEffect = Effect.map(this.arrayBufferEffect, _ => new TextDecoder().decode(_));\n return this.arrayBufferEffect;\n }\n}\n//# sourceMappingURL=NodeHttpIncomingMessage.js.map","/**\n * HTTP response compression backed by `node:zlib`, shared by the Node.js, Bun,\n * and Deno platforms.\n *\n * Byte-array bodies are compressed in one shot with the asynchronous\n * `node:zlib` APIs, preserving an exact `Content-Length`. Streaming bodies go\n * through `node:zlib` transform streams that flush each input chunk.\n *\n * @since 4.0.0\n */\nimport * as Effect from \"effect/Effect\";\nimport * as HttpBody from \"effect/unstable/http/HttpBody\";\nimport * as Response from \"effect/unstable/http/HttpServerResponse\";\nimport { Readable } from \"node:stream\";\nimport * as Zlib from \"node:zlib\";\n/**\n * The compression algorithms supported by the runtime's `node:zlib`. `zstd`\n * requires Node.js 22.15 or newer.\n *\n * @category constants\n * @since 4.0.0\n */\nexport const algorithms = /*#__PURE__*/new Set(typeof Zlib.zstdCompress === \"function\" ? [\"gzip\", \"deflate\", \"br\", \"zstd\"] : [\"gzip\", \"deflate\", \"br\"]);\nconst brotliParams = (level, sizeHint) => {\n const params = {};\n if (level !== undefined) {\n params[Zlib.constants.BROTLI_PARAM_QUALITY] = level;\n }\n if (sizeHint !== undefined) {\n params[Zlib.constants.BROTLI_PARAM_SIZE_HINT] = sizeHint;\n }\n return {\n params\n };\n};\nconst zstdParams = level => level === undefined || level === 3 ? undefined : {\n params: {\n [Zlib.constants.ZSTD_c_compressionLevel]: level\n }\n};\nconst compress = (data, algorithm, options) => Effect.callback(resume => {\n const complete = (error, result) => resume(error === null ? Effect.succeed(result) : Effect.die(error));\n switch (algorithm) {\n case \"gzip\":\n {\n Zlib.gzip(data, {\n level: options?.level\n }, complete);\n break;\n }\n case \"deflate\":\n {\n Zlib.deflate(data, {\n level: options?.level\n }, complete);\n break;\n }\n case \"br\":\n {\n Zlib.brotliCompress(data, brotliParams(options?.level, data.byteLength), complete);\n break;\n }\n case \"zstd\":\n {\n const params = zstdParams(options?.level);\n if (params === undefined) {\n Zlib.zstdCompress(data, complete);\n } else {\n Zlib.zstdCompress(data, params, complete);\n }\n break;\n }\n }\n});\n/**\n * Creates a `Compression` that compresses byte-array bodies in one shot with\n * the asynchronous `node:zlib` APIs, setting the exact `Content-Length` of the\n * compressed body. All other bodies are delegated to `fallback`.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = fallback => ({\n algorithms: fallback.algorithms,\n compressResponse(response, algorithm, options) {\n const body = response.body;\n if (body._tag !== \"Uint8Array\") {\n return fallback.compressResponse(response, algorithm, options);\n }\n return Effect.map(compress(body.body, algorithm, options), result => Response.setHeader(Response.setBody(response, HttpBody.uint8Array(result, body.contentType)), \"content-length\", result.byteLength.toString()));\n }\n});\n/**\n * Creates a `node:zlib` compression transform stream that flushes each input\n * chunk, for streaming response bodies.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const compressTransform = (algorithm, options) => {\n switch (algorithm) {\n case \"gzip\":\n {\n return Zlib.createGzip({\n level: options?.level,\n flush: Zlib.constants.Z_SYNC_FLUSH\n });\n }\n case \"deflate\":\n {\n return Zlib.createDeflate({\n level: options?.level,\n flush: Zlib.constants.Z_SYNC_FLUSH\n });\n }\n case \"br\":\n {\n return Zlib.createBrotliCompress({\n ...brotliParams(options?.level),\n flush: Zlib.constants.BROTLI_OPERATION_FLUSH\n });\n }\n case \"zstd\":\n {\n return Zlib.createZstdCompress({\n ...zstdParams(options?.level),\n flush: Zlib.constants.ZSTD_e_flush\n });\n }\n }\n};\n/**\n * A Web `ReadableStream` version of `compressTransform`, for platforms that\n * stream response bodies as Web streams.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const compressTransformWeb = (algorithm, options) => stream => {\n const transform = compressTransform(algorithm, options);\n const source = Readable.fromWeb(stream);\n source.on(\"error\", cause => transform.destroy(cause));\n transform.on(\"close\", () => source.destroy());\n return Readable.toWeb(source.pipe(transform));\n};\n//# sourceMappingURL=NodeHttpCompression.js.map","/**\n * Node.js implementation of the Effect HTTP platform service.\n *\n * This module connects the portable `HttpPlatform` file response helpers to\n * Node runtime primitives. It serves local files through Node readable streams,\n * supports byte ranges, converts Web `File` values to readable streams, and\n * fills in content type and content length headers when needed.\n *\n * @since 4.0.0\n */\nimport * as NodeHttpCompression from \"@effect/platform-node-shared/NodeHttpCompression\";\nimport * as Effect from \"effect/Effect\";\nimport { pipe } from \"effect/Function\";\nimport * as Layer from \"effect/Layer\";\nimport * as EtagImpl from \"effect/unstable/http/Etag\";\nimport * as Headers from \"effect/unstable/http/Headers\";\nimport * as HttpBody from \"effect/unstable/http/HttpBody\";\nimport * as Platform from \"effect/unstable/http/HttpPlatform\";\nimport * as ServerResponse from \"effect/unstable/http/HttpServerResponse\";\nimport * as Fs from \"node:fs\";\nimport { Readable } from \"node:stream\";\nimport Mime from \"./Mime.js\";\nimport * as NodeFileSystem from \"./NodeFileSystem.js\";\nimport * as NodeStream from \"./NodeStream.js\";\n// replaces the response body while keeping every other field, dropping the\n// now-stale Content-Length header\nconst compressedBody = (response, body) => ServerResponse.removeHeader(ServerResponse.setBody(response, body), \"content-length\");\nconst compression = /*#__PURE__*/NodeHttpCompression.make({\n algorithms: NodeHttpCompression.algorithms,\n compressResponse(response, algorithm, options) {\n const body = response.body;\n switch (body._tag) {\n case \"Stream\":\n {\n return Effect.succeed(compressedBody(response, HttpBody.stream(NodeStream.pipeThroughDuplex(body.stream, {\n evaluate: () => NodeHttpCompression.compressTransform(algorithm, options)\n }), body.contentType)));\n }\n case \"Raw\":\n {\n const readable = body.body instanceof Readable ? body.body : Readable.fromWeb(new Response(body.body).body);\n const transform = NodeHttpCompression.compressTransform(algorithm, options);\n readable.on(\"error\", cause => transform.destroy(cause));\n transform.on(\"error\", cause => readable.destroy(cause));\n transform.on(\"close\", () => readable.destroy());\n return Effect.succeed(compressedBody(response, HttpBody.raw(readable.pipe(transform), {\n contentType: body.contentType\n })));\n }\n default:\n {\n return Effect.succeed(response);\n }\n }\n }\n});\n/**\n * Creates the Node `HttpPlatform`, serving file responses from Node readable\n * streams and adding MIME type and content-length headers when needed.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = /*#__PURE__*/Platform.make({\n platform: \"node\",\n compression,\n fileResponse(path, status, statusText, headers, start, end, contentLength) {\n const stream = contentLength === 0 ? Readable.from([]) : Fs.createReadStream(path, {\n start,\n end: end === undefined ? undefined : end - 1\n });\n return ServerResponse.raw(stream, {\n headers: {\n ...headers,\n \"content-type\": headers[\"content-type\"] ?? Mime.getType(path) ?? \"application/octet-stream\",\n \"content-length\": contentLength.toString()\n },\n status,\n statusText\n });\n },\n fileWebResponse(file, status, statusText, headers, _options) {\n return ServerResponse.raw(Readable.fromWeb(file.stream()), {\n headers: Headers.merge(headers, Headers.fromRecordUnsafe({\n \"content-type\": headers[\"content-type\"] ?? Mime.getType(file.name) ?? \"application/octet-stream\",\n \"content-length\": file.size.toString()\n })),\n status,\n statusText\n });\n }\n});\n/**\n * Provides the Node `HttpPlatform` together with the filesystem and ETag\n * services it needs for file responses.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/pipe(/*#__PURE__*/Layer.effect(Platform.HttpPlatform)(make), /*#__PURE__*/Layer.provide(NodeFileSystem.layer), /*#__PURE__*/Layer.provide(EtagImpl.layer));\n//# sourceMappingURL=NodeHttpPlatform.js.map","import * as MP from \"./index.js\";\nimport { Duplex, Readable } from \"node:stream\";\nexport { decodeField } from \"./index.js\";\nexport class MultipastaStream extends Duplex {\n _parser;\n _canWrite = true;\n _writeCallback;\n constructor(config) {\n super({\n readableObjectMode: true\n });\n let currentError;\n let currentFile;\n this._parser = MP.make({\n ...config,\n onField: (info, value) => {\n if (currentError !== undefined) return;\n const field = {\n _tag: \"Field\",\n info,\n value\n };\n this.push(field);\n this.emit(\"field\", field);\n },\n onFile: info => {\n if (currentError !== undefined) return _ => {};\n const file = new FileStream(info, this);\n currentFile = file;\n this.push(file);\n this.emit(\"file\", file);\n return chunk => {\n this._canWrite = file.push(chunk);\n if (chunk === null && !this._canWrite) {\n currentFile = undefined;\n this._resume();\n }\n };\n },\n onError: error => {\n this.emit(\"error\", error);\n currentFile?.emit(\"error\", error);\n currentError = error;\n },\n onDone: () => {\n this.push(null);\n }\n });\n }\n _resume() {\n this._canWrite = true;\n if (this._writeCallback !== undefined) {\n const callback = this._writeCallback;\n this._writeCallback = undefined;\n callback();\n }\n }\n _read(_size) {}\n _write(chunk, encoding, callback) {\n this._parser.write(chunk instanceof Uint8Array ? chunk : Buffer.from(chunk, encoding));\n if (this._canWrite) {\n callback();\n } else {\n this._writeCallback = callback;\n }\n }\n _final(callback) {\n this._parser.end();\n callback();\n }\n}\nexport const make = config => new MultipastaStream(config);\nexport class FileStream extends Readable {\n info;\n _parent;\n _tag = \"File\";\n filename;\n constructor(info, _parent) {\n super();\n this.info = info;\n this._parent = _parent;\n this.filename = info.filename;\n }\n _read(_size) {\n if (this._parent._canWrite === false) {\n this._parent._resume();\n }\n }\n}\n//# sourceMappingURL=node.js.map","/**\n * Node.js multipart parsing for HTTP `multipart/form-data` request bodies.\n *\n * `NodeMultipart` adapts a Node `Readable` plus incoming HTTP headers into\n * Effect's shared multipart model. It can expose form parts as a stream or\n * collect a complete persisted form by writing file uploads to scoped temporary\n * files through the current `FileSystem` and `Path` services. `fileToReadable`\n * returns the underlying Node readable stream for file parts produced by this\n * parser.\n *\n * @since 4.0.0\n */\nimport * as Effect from \"effect/Effect\";\nimport * as Inspectable from \"effect/Inspectable\";\nimport * as Stream from \"effect/Stream\";\nimport * as Multipart from \"effect/unstable/http/Multipart\";\nimport * as MP from \"effect/unstable/http/Multipasta/Node\";\nimport * as NFS from \"node:fs\";\nimport * as NodeStreamP from \"node:stream/promises\";\nimport * as NodeStream from \"./NodeStream.js\";\n/**\n * Parses multipart data from a Node readable request body and headers into a\n * stream of `Multipart.Part` values, converting parser failures to\n * `MultipartError`.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const stream = (source, headers) => Multipart.makeConfig(headers).pipe(Effect.map(config => NodeStream.fromReadable({\n evaluate() {\n const parser = MP.make(config);\n source.pipe(parser);\n return parser;\n },\n onError: error => convertError(error)\n})), Stream.unwrap, Stream.map(convertPart));\n/**\n * Parses multipart data from a Node readable request body and persists file\n * parts using the current `FileSystem`, `Path`, and `Scope` services.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const persisted = (source, headers) => Multipart.toPersisted(stream(source, headers), (path, file) => Effect.tryPromise({\n try: signal => NodeStreamP.pipeline(file.file, NFS.createWriteStream(path), {\n signal\n }),\n catch: cause => Multipart.MultipartError.fromReason(\"InternalError\", cause)\n}));\n/**\n * Returns the underlying Node readable stream for a multipart file produced by\n * the Node multipart parser.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const fileToReadable = file => file.file;\n// -----------------------------------------------------------------------------\n// Internal\n// -----------------------------------------------------------------------------\nconst convertPart = part => part._tag === \"Field\" ? new FieldImpl(part.info, part.value) : new FileImpl(part);\nclass PartBase extends Inspectable.Class {\n [Multipart.TypeId];\n constructor() {\n super();\n this[Multipart.TypeId] = Multipart.TypeId;\n }\n}\nclass FieldImpl extends PartBase {\n _tag = \"Field\";\n key;\n contentType;\n value;\n constructor(info, value) {\n super();\n this.key = info.name;\n this.contentType = info.contentType;\n this.value = MP.decodeField(info, value);\n }\n toJSON() {\n return {\n _id: \"@effect/platform/Multipart/Part\",\n _tag: \"Field\",\n key: this.key,\n value: this.value,\n contentType: this.contentType\n };\n }\n}\nclass FileImpl extends PartBase {\n _tag = \"File\";\n key;\n name;\n contentType;\n content;\n contentEffect;\n file;\n constructor(file) {\n super();\n this.file = file;\n this.key = file.info.name;\n this.name = file.filename ?? file.info.name;\n this.contentType = file.info.contentType;\n this.content = NodeStream.fromReadable({\n evaluate: () => file,\n onError: cause => Multipart.MultipartError.fromReason(\"InternalError\", cause)\n });\n this.contentEffect = NodeStream.toUint8Array(() => file, {\n onError: cause => Multipart.MultipartError.fromReason(\"InternalError\", cause)\n });\n }\n toJSON() {\n return {\n _id: \"@effect/platform/Multipart/Part\",\n _tag: \"File\",\n key: this.key,\n name: this.name,\n contentType: this.contentType\n };\n }\n}\nfunction convertError(cause) {\n switch (cause._tag) {\n case \"ReachedLimit\":\n {\n switch (cause.limit) {\n case \"MaxParts\":\n {\n return Multipart.MultipartError.fromReason(\"TooManyParts\", cause);\n }\n case \"MaxFieldSize\":\n {\n return Multipart.MultipartError.fromReason(\"FieldTooLarge\", cause);\n }\n case \"MaxPartSize\":\n {\n return Multipart.MultipartError.fromReason(\"FileTooLarge\", cause);\n }\n case \"MaxTotalSize\":\n {\n return Multipart.MultipartError.fromReason(\"BodyTooLarge\", cause);\n }\n }\n }\n default:\n {\n return Multipart.MultipartError.fromReason(\"Parse\", cause);\n }\n }\n}\n//# sourceMappingURL=NodeMultipart.js.map","/**\n * Node.js implementation of the Effect `HttpServer`.\n *\n * This module adapts a supplied Node `http.Server` into Effect's\n * platform-independent HTTP server service. It starts the server with Node\n * `listen` options, converts `request` events into `HttpServerRequest` values,\n * writes `HttpServerResponse` bodies through Node's `ServerResponse`, and\n * handles `upgrade` events by exposing the upgraded socket through\n * `HttpServerRequest.upgrade`. It also exports request and upgrade handler\n * constructors plus layers for the server alone, HTTP support services, the\n * combined server, configurable options, and tests.\n *\n * @since 4.0.0\n */\nimport * as Cause from \"effect/Cause\";\nimport * as Config from \"effect/Config\";\nimport * as Context from \"effect/Context\";\nimport * as Duration from \"effect/Duration\";\nimport * as Effect from \"effect/Effect\";\nimport * as Fiber from \"effect/Fiber\";\nimport { flow } from \"effect/Function\";\nimport * as Latch from \"effect/Latch\";\nimport * as Layer from \"effect/Layer\";\nimport * as Scope from \"effect/Scope\";\nimport * as Stream from \"effect/Stream\";\nimport * as Cookies from \"effect/unstable/http/Cookies\";\nimport * as Etag from \"effect/unstable/http/Etag\";\nimport * as FetchHttpClient from \"effect/unstable/http/FetchHttpClient\";\nimport * as HttpEffect from \"effect/unstable/http/HttpEffect\";\nimport * as HttpIncomingMessage from \"effect/unstable/http/HttpIncomingMessage\";\nimport * as HttpServer from \"effect/unstable/http/HttpServer\";\nimport { causeResponse, ClientAbort, HttpServerError, RequestParseError, ResponseError, ServeError } from \"effect/unstable/http/HttpServerError\";\nimport * as Request from \"effect/unstable/http/HttpServerRequest\";\nimport { HttpServerRequest } from \"effect/unstable/http/HttpServerRequest\";\nimport * as Socket from \"effect/unstable/socket/Socket\";\nimport * as Http from \"node:http\";\nimport { Readable } from \"node:stream\";\nimport { pipeline } from \"node:stream/promises\";\nimport { NodeHttpIncomingMessage } from \"./NodeHttpIncomingMessage.js\";\nimport * as NodeHttpPlatform from \"./NodeHttpPlatform.js\";\nimport * as NodeMultipart from \"./NodeMultipart.js\";\nimport * as NodeServices from \"./NodeServices.js\";\nimport { NodeWS } from \"./NodeSocket.js\";\n/**\n * Creates a scoped `HttpServer` from a Node `http.Server`, starts listening\n * with the supplied options, registers request and upgrade handling, and closes\n * the server during scope finalization with optional graceful-shutdown control.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = /*#__PURE__*/Effect.fnUntraced(function* (evaluate, options) {\n const scope = yield* Effect.scope;\n const server = evaluate();\n const shutdown = yield* Effect.callback(resume => {\n if (!server.listening) {\n return resume(Effect.void);\n }\n server.close(error => {\n if (error) {\n resume(Effect.die(error));\n } else {\n resume(Effect.void);\n }\n });\n }).pipe(Effect.cached);\n const preemptiveShutdown = options.disablePreemptiveShutdown ? Effect.void : Effect.timeoutOrElse(shutdown, {\n duration: options.gracefulShutdownTimeout ?? Duration.seconds(20),\n orElse: () => Effect.void\n });\n yield* Scope.addFinalizer(scope, shutdown);\n yield* Effect.callback(resume => {\n function onError(cause) {\n resume(Effect.fail(new ServeError({\n cause\n })));\n }\n server.on(\"error\", onError);\n server.listen(options, () => {\n server.off(\"error\", onError);\n resume(Effect.void);\n });\n });\n const address = server.address();\n const wss = yield* Effect.acquireRelease(Effect.sync(() => new NodeWS.WebSocketServer({\n ...options.websocket,\n noServer: true\n })), wss => Effect.callback(resume => {\n wss.close(() => resume(Effect.void));\n })).pipe(Scope.provide(scope), Effect.cached);\n return HttpServer.make({\n address: typeof address === \"string\" ? {\n _tag: \"UnixAddress\",\n path: address\n } : {\n _tag: \"TcpAddress\",\n hostname: address.address === \"::\" ? \"0.0.0.0\" : address.address,\n port: address.port\n },\n serve: Effect.fnUntraced(function* (httpApp, middleware) {\n const serveScope = yield* Effect.scope;\n const scope = Scope.forkUnsafe(serveScope, \"parallel\");\n const handler = yield* makeHandler(httpApp, {\n middleware: middleware,\n scope\n });\n const upgradeHandler = yield* makeUpgradeHandler(wss, httpApp, {\n middleware: middleware,\n scope\n });\n yield* Scope.addFinalizerExit(serveScope, () => {\n server.off(\"request\", handler);\n server.off(\"upgrade\", upgradeHandler);\n return preemptiveShutdown;\n });\n server.on(\"request\", handler);\n server.on(\"upgrade\", upgradeHandler);\n })\n });\n});\n/**\n * Creates a Node `request` event handler for an Effect HTTP application,\n * injecting a `HttpServerRequest` and interrupting the request fiber if the\n * client closes the response before it finishes.\n *\n * @category handlers\n * @since 4.0.0\n */\nexport const makeHandler = (httpEffect, options) => {\n const handled = HttpEffect.toHandled(httpEffect, handleResponse, options.middleware);\n return Effect.withFiber(parent => {\n const services = parent.context;\n return Effect.succeed(function handler(nodeRequest, nodeResponse) {\n const context = Context.add(services, HttpServerRequest, new ServerRequestImpl(nodeRequest, nodeResponse));\n const fiber = Fiber.runIn(Effect.runForkWith(context)(handled), options.scope);\n nodeResponse.on(\"close\", () => {\n if (!nodeResponse.writableEnded) {\n fiber.interruptUnsafe(parent.id, ClientAbort.annotation);\n }\n });\n });\n });\n};\n/**\n * Creates a Node `upgrade` event handler for an Effect HTTP application,\n * exposing the upgraded WebSocket as the request's `upgrade` effect and\n * interrupting the request fiber when the socket closes early.\n *\n * @category handlers\n * @since 4.0.0\n */\nexport const makeUpgradeHandler = (lazyWss, httpEffect, options) => {\n const handledApp = HttpEffect.toHandled(httpEffect, handleResponse, options.middleware);\n return Effect.withFiber(parent => {\n const services = parent.context;\n return Effect.succeed(function handler(nodeRequest, socket, head) {\n let nodeResponse_ = undefined;\n const nodeResponse = () => {\n if (nodeResponse_ === undefined) {\n nodeResponse_ = new Http.ServerResponse(nodeRequest);\n nodeResponse_.assignSocket(socket);\n nodeResponse_.on(\"finish\", () => {\n socket.end();\n });\n }\n return nodeResponse_;\n };\n const upgradeEffect = Socket.fromWebSocket(Effect.flatMap(lazyWss, wss => Effect.acquireRelease(Effect.callback(resume => wss.handleUpgrade(nodeRequest, socket, head, ws => {\n resume(Effect.succeed(ws));\n })), ws => Effect.sync(() => ws.close()))));\n const context = Context.add(services, HttpServerRequest, new ServerRequestImpl(nodeRequest, nodeResponse, upgradeEffect));\n const fiber = Fiber.runIn(Effect.runForkWith(context)(handledApp), options.scope);\n socket.on(\"close\", () => {\n if (!socket.writableEnded) {\n fiber.interruptUnsafe(parent.id, ClientAbort.annotation);\n }\n });\n });\n });\n};\nclass ServerRequestImpl extends NodeHttpIncomingMessage {\n [Request.TypeId];\n response;\n upgradeEffect;\n url;\n headersOverride;\n constructor(source, response, upgradeEffect, url = source.url, headersOverride, remoteAddressOverride) {\n super(source, cause => new HttpServerError({\n reason: new RequestParseError({\n request: this,\n cause\n })\n }), remoteAddressOverride);\n this[Request.TypeId] = Request.TypeId;\n this.response = response;\n this.upgradeEffect = upgradeEffect;\n this.url = url;\n this.headersOverride = headersOverride;\n }\n cachedCookies;\n get cookies() {\n if (this.cachedCookies) {\n return this.cachedCookies;\n }\n return this.cachedCookies = Cookies.parseHeader(this.headers.cookie ?? \"\");\n }\n get resolvedResponse() {\n return typeof this.response === \"function\" ? this.response() : this.response;\n }\n modify(options) {\n return new ServerRequestImpl(this.source, this.response, this.upgradeEffect, options.url ?? this.url, options.headers ?? this.headersOverride, \"remoteAddress\" in options ? options.remoteAddress : this.remoteAddressOverride);\n }\n get originalUrl() {\n return this.source.url;\n }\n cachedMethod;\n get method() {\n return this.cachedMethod ??= this.source.method.toUpperCase();\n }\n get headers() {\n this.headersOverride ??= this.source.headers;\n return this.headersOverride;\n }\n multipartEffect;\n get multipart() {\n if (this.multipartEffect) {\n return this.multipartEffect;\n }\n this.multipartEffect = Effect.runSync(Effect.cached(NodeMultipart.persisted(this.source, this.source.headers)));\n return this.multipartEffect;\n }\n get multipartStream() {\n return NodeMultipart.stream(this.source, this.source.headers);\n }\n get upgrade() {\n return this.upgradeEffect ?? Effect.fail(new HttpServerError({\n reason: new RequestParseError({\n request: this,\n description: \"not an upgradeable ServerRequest\"\n })\n }));\n }\n toString() {\n return `ServerRequest(${this.method} ${this.url})`;\n }\n toJSON() {\n return HttpIncomingMessage.inspect(this, {\n _id: \"HttpServerRequest\",\n method: this.method,\n url: this.originalUrl\n });\n }\n}\n/**\n * Provides an `HttpServer` by creating and managing a scoped Node\n * `http.Server` with the supplied listen and shutdown options.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerServer = /*#__PURE__*/flow(make, /*#__PURE__*/Layer.effect(HttpServer.HttpServer));\n/**\n * Provides the Node HTTP support services used by `NodeHttpServer`, including\n * the HTTP platform, ETag generator, and core Node platform services.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerHttpServices = /*#__PURE__*/Layer.mergeAll(NodeHttpPlatform.layer, Etag.layerWeak, NodeServices.layer);\n/**\n * Provides a Node `HttpServer` together with the Node HTTP platform, ETag, and\n * core platform services required to serve requests.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = (evaluate, options) => Layer.mergeAll(layerServer(evaluate, options), layerHttpServices);\n/**\n * Provides a Node `HttpServer` together with the Node HTTP platform, ETag,\n * and core Node platform services, reading the listen and shutdown options from\n * a `Config` value.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerConfig = (evaluate, options) => Layer.mergeAll(Layer.effect(HttpServer.HttpServer)(Effect.flatMap(Config.unwrap(options), options => make(evaluate, options))), layerHttpServices);\n/**\n * Provides a test HTTP server listening on an ephemeral port together with a\n * Fetch-backed `HttpClient` configured for server integration tests.\n *\n * @category testing\n * @since 4.0.0\n */\nexport const layerTest = /*#__PURE__*/HttpServer.layerTestClient.pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/Layer.fresh(FetchHttpClient.layer).pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/Layer.succeed(FetchHttpClient.RequestInit)({\n keepalive: false\n})))), /*#__PURE__*/Layer.provideMerge(/*#__PURE__*/layer(Http.createServer, {\n port: 0\n})));\n// -----------------------------------------------------------------------------\n// Internal\n// -----------------------------------------------------------------------------\nconst handleResponse = (request, response) => {\n const nodeResponse = request.resolvedResponse;\n if (nodeResponse.writableEnded) {\n return Effect.void;\n }\n let headers = response.headers;\n if (!Cookies.isEmpty(response.cookies)) {\n headers = {\n ...headers\n };\n const toSet = Cookies.toSetCookieHeaders(response.cookies);\n if (headers[\"set-cookie\"] !== undefined) {\n toSet.push(headers[\"set-cookie\"]);\n }\n headers[\"set-cookie\"] = toSet;\n }\n if (request.method === \"HEAD\") {\n nodeResponse.writeHead(response.status, headers);\n return Effect.andThen(cancelResponseBody(response.body), Effect.callback(resume => {\n let completed = false;\n const done = () => {\n if (completed) return;\n completed = true;\n nodeResponse.off(\"close\", done);\n resume(Effect.void);\n };\n nodeResponse.once(\"close\", done);\n nodeResponse.end(done);\n }));\n }\n const body = response.body;\n switch (body._tag) {\n case \"Empty\":\n {\n nodeResponse.writeHead(response.status, headers);\n nodeResponse.end();\n return Effect.void;\n }\n case \"Raw\":\n {\n nodeResponse.writeHead(response.status, headers);\n if (typeof body.body === \"object\" && body.body !== null && \"pipe\" in body.body && typeof body.body.pipe === \"function\") {\n return Effect.tryPromise({\n try: signal => pipeline(body.body, nodeResponse, {\n signal,\n end: true\n }),\n catch: cause => new HttpServerError({\n reason: new ResponseError({\n request,\n response,\n description: \"Error writing raw response\",\n cause\n })\n })\n }).pipe(Effect.interruptible, Effect.tapCause(handleCause(nodeResponse, response)));\n }\n return Effect.callback(resume => {\n nodeResponse.end(body.body, () => resume(Effect.void));\n });\n }\n case \"Uint8Array\":\n {\n nodeResponse.writeHead(response.status, headers);\n // If the body is less than 1MB, we skip the callback\n if (body.body.length < 1024 * 1024) {\n nodeResponse.end(body.body);\n return Effect.void;\n }\n return Effect.callback(resume => {\n nodeResponse.end(body.body, () => resume(Effect.void));\n });\n }\n case \"FormData\":\n {\n return Effect.suspend(() => {\n const r = new globalThis.Response(body.formData);\n nodeResponse.writeHead(response.status, {\n ...headers,\n ...Object.fromEntries(r.headers)\n });\n return Effect.callback((resume, signal) => {\n Readable.fromWeb(r.body, {\n signal\n }).pipe(nodeResponse).on(\"error\", cause => {\n resume(Effect.fail(new HttpServerError({\n reason: new ResponseError({\n request,\n response,\n description: \"Error writing FormData response\",\n cause\n })\n })));\n }).once(\"finish\", () => {\n resume(Effect.void);\n });\n }).pipe(Effect.interruptible, Effect.tapCause(handleCause(nodeResponse, response)));\n });\n }\n case \"Stream\":\n {\n nodeResponse.writeHead(response.status, headers);\n const drainLatch = Latch.makeUnsafe();\n nodeResponse.on(\"drain\", () => drainLatch.openUnsafe());\n return body.stream.pipe(Stream.orDie, Stream.runForEachArray(array => {\n const chunk = array.length > 1 ? Buffer.concat(array) : array[0];\n if (nodeResponse.write(chunk)) return Effect.void;\n drainLatch.closeUnsafe();\n return drainLatch.await;\n }), Effect.interruptible, Effect.matchCauseEffect({\n onSuccess: () => Effect.sync(() => nodeResponse.end()),\n onFailure: handleCause(nodeResponse, response)\n }));\n }\n }\n};\nconst cancelResponseBody = body => {\n const stream = body._tag === \"Raw\" ? body.body : undefined;\n if (stream instanceof Readable) {\n return Effect.sync(() => stream.destroy());\n }\n return Effect.void;\n};\nconst handleCause = (nodeResponse, originalResponse) => originalCause => Effect.flatMap(causeResponse(originalCause), ([response, cause]) => {\n const headersSent = nodeResponse.headersSent;\n if (!headersSent) {\n nodeResponse.writeHead(response.status);\n }\n if (!nodeResponse.writableEnded) {\n nodeResponse.end();\n }\n return Effect.failCause(headersSent ? Cause.combine(originalCause, Cause.die(originalResponse)) : cause);\n});\n//# sourceMappingURL=NodeHttpServer.js.map"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAa,0BAAb,cAA6CA,MAAkB;;;;;;CAM7D,CAACC;CACD;CACA;CACA;CACA,YAAY,QAAQ,SAAS,uBAAuB;EAClD,MAAM;EACN,KAAKA,UAA0BA;EAC/B,KAAK,SAAS;EACd,KAAK,UAAU;EACf,KAAK,wBAAwB;CAC/B;CACA,IAAI,UAAU;EACZ,OAAOC,UAAkB,KAAK,OAAO,OAAO;CAC9C;CACA,IAAI,gBAAgB;EAClB,OAAO,KAAK,yBAAyBC,cAAqB,KAAK,OAAO,OAAO,aAAa;CAC5F;CACA;CACA,IAAI,OAAO;EACT,IAAI,KAAK,YACP,OAAO,KAAK;EAEd,KAAK,aAAaC,QAAeC,OAAcC,QAAeC,cAA6B,gBAAeC,eAA0B,KAAK,QAAQ;GAC/I,SAAS,KAAK;GACd,UAAU;EACZ,CAAC,CAAC,CAAC,CAAC;EACJ,KAAK,oBAAoBC,IAAW,KAAK,aAAY,MAAK,IAAI,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;EAC5F,OAAO,KAAK;CACd;CACA,IAAI,aAAa;EACf,OAAOL,QAAe,KAAK,IAAI;CACjC;CACA,IAAI,OAAO;EACT,OAAOE,QAAe,KAAK,OAAM,SAAQI,KAAW;GAClD,WAAW,SAAS,KAAK,OAAO,KAAK,MAAM,IAAI;GAC/C,OAAO,KAAK;EACd,CAAC,CAAC;CACJ;CACA,IAAI,aAAa;EACf,OAAON,QAAe,KAAK,IA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,WAAiB;GACpC,aAAa,GAAG,eAAe,WAAW,WAAW,CAAC;GACtD,OAAO,KAAK,OAAO,KAAKC,OAAcC,iBAAuB,UAAS;IACpE,MAAM,QAAQ,MAAM,SAAS,IAAI,OAAO,OAAO,KAAK,IAAI,MAAM;IAC9D,IAAI,aAAa,MAAM,KAAK,GAAG,OAAO9C;IACtC,WAAW,YAAY;IACvB,OAAO,WAAW;GACpB,CAAC,GAAGyC,eAAsBM,iBAAwB;IAChD,iBAAiBvC,WAAkB,aAAa,IAAI,CAAC;IACrD,WAAW,YAAY,cAAc,QAAQ;GAC/C,CAAC,CAAC;EACJ;CACJ;AACF;AACA,MAAM,sBAAqB,SAAQ;CACjC,MAAM,SAAS,KAAK,SAAS,QAAQ,KAAK,OAAO,KAAA;CACjD,IAAI,kBAAkB,UACpB,OAAOA,WAAkB,OAAO,QAAQ,CAAC;CAE3C,OAAOR;AACT;AACA,MAAM,eAAe,cAAc,sBAAqB,kBAAiBqB,QAAe,cAAc,aAAa,IAAI,CAAC,UAAU,WAAW;CAC3I,MAAM,cAAc,aAAa;CACjC,IAAI,CAAC,aACH,aAAa,UAAU,SAAS,MAAM;CAExC,IAAI,CAAC,aAAa,eAChB,aAAa,IAAI;CAEnB,OAAO2B,UAAiB,cAAcC,QAAc,eAAeC,MAAU,gBAAgB,CAAC,IAAI,KAAK;AACzG,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { Cn as __exportAll } from "./NodeSocket-
|
|
4
|
-
import { $a as flatMap, $c as UnknownError, $d as hasProperty, $n as WatchBackend, Aa as asVoid, Ac as _await, Ao as matchEffect, Au as of, Bi as offerUnsafe, Ca as andThen, Co as map, Ed as some, Er as isStream, Gs as isDoneCause, Ha as clockWith, Hc as fail$1, Hr as runCollect, Ii as failCauseUnsafe, Jc as succeed$2, Jn as Path$1, Jr as splitLines, Lc as isDone, Li as make$10, Lo as orDie, Ma as callback, Mc as doneUnsafe, Mr as merge, Na as catchCause, Nd as Prototype, Nr as mkString, Oa as as, Pi as endUnsafe, Qi as make$8, Qn as Size, Qo as scoped, Qu as Service, Ri as offer, Rr as pipeThroughChannelOrFail, Td as none, Ti as mapDone, To as mapError, Uc as failCause, Uo as raceFirst, Va as catch_, Vi as poll, Vr as run, Wi as take, Ws as catchDone, Xa as fail, Xc as Done, Xn as FileSystem, Yn as TypeId$4, Yu as succeed, Zn as FileTypeId, _a as systemError, _d as fromUndefinedOr, _f as identity, _r as fromChannel$1, _s as try_, ad as getUnsafe, ai as get, ao as forever, bs as uninterruptible, co as forkScoped, d as ErrorClass, do as ignore, ea as makeUnsafe, ef as isNotNull, er as make$9, fc as provideMerge, ga as badArgument, gd as fromNullishOr, gi as drain, gs as tryPromise, hf as dual, hs as timeoutOrElse, ic as effect, io as forEach, jt as tag, lr as empty, ma as BadArgument, md as flatMap$1, nf as isNullish, nl as done, of as isUndefined, oi as make$11, or as decodeText, os as suspend, pc as succeed$3, qa as effectify, qo as runFork, ri as unwrap, rl as fail$2, ro as fnUntraced, rs as succeed$1, so as forkIn, ss as sync, tf as isNotUndefined, ti as transduce, tr as callback$1, ts as serviceOption, uc as mergeAll, uo as gen, vd as getOrElse, vf as pipe, vi as fromChannel, wd as match, wi as fromTransform, ws as void_, xa as addFinalizer$1, ya as acquireRelease, yc as addFinalizer, yi as isSink, zc as makeUnsafe$1, zd as BaseProto } from "./Schema-
|
|
3
|
+
import { Cn as __exportAll } from "./NodeSocket-CLfrrutd.mjs";
|
|
4
|
+
import { $a as flatMap, $c as UnknownError, $d as hasProperty, $n as WatchBackend, Aa as asVoid, Ac as _await, Ao as matchEffect, Au as of, Bi as offerUnsafe, Ca as andThen, Co as map, Ed as some, Er as isStream, Gs as isDoneCause, Ha as clockWith, Hc as fail$1, Hr as runCollect, Ii as failCauseUnsafe, Jc as succeed$2, Jn as Path$1, Jr as splitLines, Lc as isDone, Li as make$10, Lo as orDie, Ma as callback, Mc as doneUnsafe, Mr as merge, Na as catchCause, Nd as Prototype, Nr as mkString, Oa as as, Pi as endUnsafe, Qi as make$8, Qn as Size, Qo as scoped, Qu as Service, Ri as offer, Rr as pipeThroughChannelOrFail, Td as none, Ti as mapDone, To as mapError, Uc as failCause, Uo as raceFirst, Va as catch_, Vi as poll, Vr as run, Wi as take, Ws as catchDone, Xa as fail, Xc as Done, Xn as FileSystem, Yn as TypeId$4, Yu as succeed, Zn as FileTypeId, _a as systemError, _d as fromUndefinedOr, _f as identity, _r as fromChannel$1, _s as try_, ad as getUnsafe, ai as get, ao as forever, bs as uninterruptible, co as forkScoped, d as ErrorClass, do as ignore, ea as makeUnsafe, ef as isNotNull, er as make$9, fc as provideMerge, ga as badArgument, gd as fromNullishOr, gi as drain, gs as tryPromise, hf as dual, hs as timeoutOrElse, ic as effect, io as forEach, jt as tag, lr as empty, ma as BadArgument, md as flatMap$1, nf as isNullish, nl as done, of as isUndefined, oi as make$11, or as decodeText, os as suspend, pc as succeed$3, qa as effectify, qo as runFork, ri as unwrap, rl as fail$2, ro as fnUntraced, rs as succeed$1, so as forkIn, ss as sync, tf as isNotUndefined, ti as transduce, tr as callback$1, ts as serviceOption, uc as mergeAll, uo as gen, vd as getOrElse, vf as pipe, vi as fromChannel, wd as match, wi as fromTransform, ws as void_, xa as addFinalizer$1, ya as acquireRelease, yc as addFinalizer, yi as isSink, zc as makeUnsafe$1, zd as BaseProto } from "./Schema-B4KtKnpr.mjs";
|
|
5
5
|
import * as NodeChildProcess from "node:child_process";
|
|
6
6
|
import { PassThrough } from "node:stream";
|
|
7
7
|
import * as NodeCrypto from "node:crypto";
|
|
@@ -10,7 +10,7 @@ import * as OS from "node:os";
|
|
|
10
10
|
import * as Path from "node:path";
|
|
11
11
|
import * as NodeUrl from "node:url";
|
|
12
12
|
import * as readline from "node:readline";
|
|
13
|
-
//#region
|
|
13
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/Brand.js
|
|
14
14
|
/**
|
|
15
15
|
* Returns a `Constructor` that **does not apply any runtime checks** and just
|
|
16
16
|
* returns the provided value.
|
|
@@ -34,7 +34,7 @@ function nominal() {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region
|
|
37
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/unstable/process/ChildProcessSpawner.js
|
|
38
38
|
/**
|
|
39
39
|
* Service boundary for starting and controlling child processes.
|
|
40
40
|
*
|
|
@@ -106,7 +106,7 @@ const make$7 = (spawn) => {
|
|
|
106
106
|
*/
|
|
107
107
|
var ChildProcessSpawner = class extends Service()("effect/process/ChildProcessSpawner") {};
|
|
108
108
|
//#endregion
|
|
109
|
-
//#region
|
|
109
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/unstable/process/ChildProcess.js
|
|
110
110
|
/**
|
|
111
111
|
* Describes child processes before they are started.
|
|
112
112
|
*
|
|
@@ -315,7 +315,7 @@ const concatTokens = (prevTokens, nextTokens, isSeparated) => isSeparated || pre
|
|
|
315
315
|
...nextTokens.slice(1)
|
|
316
316
|
];
|
|
317
317
|
//#endregion
|
|
318
|
-
//#region
|
|
318
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
319
319
|
/** @internal */
|
|
320
320
|
const handleErrnoException = (module, method) => (err, [path]) => {
|
|
321
321
|
let reason = "Unknown";
|
|
@@ -352,7 +352,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
|
|
|
352
352
|
});
|
|
353
353
|
};
|
|
354
354
|
//#endregion
|
|
355
|
-
//#region
|
|
355
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
356
356
|
/**
|
|
357
357
|
* Creates a `Sink` that writes chunks to a Node writable stream, respecting
|
|
358
358
|
* backpressure, mapping writable errors with `onError`, and ending the stream
|
|
@@ -417,7 +417,7 @@ const pullIntoWritable = (options) => options.pull.pipe(flatMap((chunk) => {
|
|
|
417
417
|
});
|
|
418
418
|
}) : identity);
|
|
419
419
|
//#endregion
|
|
420
|
-
//#region
|
|
420
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
421
421
|
/**
|
|
422
422
|
* Adapters between Node streams and Effect streams, channels, and readables.
|
|
423
423
|
*
|
|
@@ -613,7 +613,7 @@ const readableToPullUnsafe = (options) => {
|
|
|
613
613
|
};
|
|
614
614
|
const defaultOnError = (error) => new UnknownError(error);
|
|
615
615
|
//#endregion
|
|
616
|
-
//#region
|
|
616
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
617
617
|
const toError = (error) => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));
|
|
618
618
|
const toPlatformError = (method, error, command) => {
|
|
619
619
|
const { commands } = flattenCommand(command);
|
|
@@ -1015,7 +1015,7 @@ const flattenCommand = (command) => {
|
|
|
1015
1015
|
};
|
|
1016
1016
|
};
|
|
1017
1017
|
//#endregion
|
|
1018
|
-
//#region
|
|
1018
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/Crypto.js
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Defines a platform-independent service for cryptographic operations.
|
|
1021
1021
|
*
|
|
@@ -1158,7 +1158,7 @@ const formatUUIDv7 = (timestampMillis, bytes) => {
|
|
|
1158
1158
|
return formatUUID(bytes);
|
|
1159
1159
|
};
|
|
1160
1160
|
//#endregion
|
|
1161
|
-
//#region
|
|
1161
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
|
|
1162
1162
|
/**
|
|
1163
1163
|
* Node-compatible implementation of Effect's `Crypto` service.
|
|
1164
1164
|
*
|
|
@@ -1188,7 +1188,7 @@ const digest = (algorithm, data) => try_({
|
|
|
1188
1188
|
})
|
|
1189
1189
|
});
|
|
1190
1190
|
//#endregion
|
|
1191
|
-
//#region
|
|
1191
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeCrypto.js
|
|
1192
1192
|
/**
|
|
1193
1193
|
* The `NodeCrypto` module provides the Node.js `Crypto` service layer for
|
|
1194
1194
|
* Effect programs. Provide {@link layer} at the edge of a Node application,
|
|
@@ -1213,7 +1213,7 @@ const layer$9 = /* @__PURE__ */ succeed$3(Crypto, /* @__PURE__ */ make$4({
|
|
|
1213
1213
|
digest
|
|
1214
1214
|
}));
|
|
1215
1215
|
//#endregion
|
|
1216
|
-
//#region
|
|
1216
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
1217
1217
|
/**
|
|
1218
1218
|
* Shared Node-compatible implementation of Effect's `FileSystem` service.
|
|
1219
1219
|
*
|
|
@@ -1567,7 +1567,7 @@ const makeFileSystem = /*#__PURE__*/ map(/*#__PURE__*/ serviceOption(WatchBacken
|
|
|
1567
1567
|
writeFile
|
|
1568
1568
|
}));
|
|
1569
1569
|
//#endregion
|
|
1570
|
-
//#region
|
|
1570
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeFileSystem.js
|
|
1571
1571
|
/**
|
|
1572
1572
|
* Node.js `FileSystem` layer for programs that perform real filesystem I/O.
|
|
1573
1573
|
*
|
|
@@ -1586,7 +1586,7 @@ const makeFileSystem = /*#__PURE__*/ map(/*#__PURE__*/ serviceOption(WatchBacken
|
|
|
1586
1586
|
*/
|
|
1587
1587
|
const layer$7 = /* @__PURE__ */ effect(FileSystem)(makeFileSystem);
|
|
1588
1588
|
//#endregion
|
|
1589
|
-
//#region
|
|
1589
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patc_c414c3b6e1e822e230993f828f7aeb31/node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
1590
1590
|
/**
|
|
1591
1591
|
* Node-backed provider for Effect's `Path` service.
|
|
1592
1592
|
*
|
|
@@ -1624,7 +1624,7 @@ const fileUrlOps = (windows) => ({
|
|
|
1624
1624
|
.../*#__PURE__*/ fileUrlOps(true)
|
|
1625
1625
|
});
|
|
1626
1626
|
//#endregion
|
|
1627
|
-
//#region
|
|
1627
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodePath.js
|
|
1628
1628
|
/**
|
|
1629
1629
|
* Node.js layers for Effect's `Path` service.
|
|
1630
1630
|
*
|
|
@@ -1648,7 +1648,7 @@ const layer$5 = /* @__PURE__ */ succeed$3(Path$1)({
|
|
|
1648
1648
|
.../*#__PURE__*/ fileUrlOps(void 0)
|
|
1649
1649
|
});
|
|
1650
1650
|
//#endregion
|
|
1651
|
-
//#region
|
|
1651
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/Stdio.js
|
|
1652
1652
|
/**
|
|
1653
1653
|
* Service contract for command-line arguments and standard input, output, and
|
|
1654
1654
|
* error output. It lets programs depend on standard I/O through the Effect
|
|
@@ -1713,7 +1713,7 @@ const make$2 = (options) => ({
|
|
|
1713
1713
|
...options
|
|
1714
1714
|
});
|
|
1715
1715
|
//#endregion
|
|
1716
|
-
//#region
|
|
1716
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeStdio.js
|
|
1717
1717
|
/**
|
|
1718
1718
|
* Node.js `Stdio` layer for the current process.
|
|
1719
1719
|
*
|
|
@@ -1765,7 +1765,7 @@ const layer$3 = /* @__PURE__ */ succeed$3(Stdio, /*#__PURE__*/ make$2({
|
|
|
1765
1765
|
})
|
|
1766
1766
|
}));
|
|
1767
1767
|
//#endregion
|
|
1768
|
-
//#region
|
|
1768
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/Terminal.js
|
|
1769
1769
|
const TypeId = "~effect/platform/Terminal";
|
|
1770
1770
|
const QuitErrorTypeId = "effect/platform/Terminal/QuitError";
|
|
1771
1771
|
/**
|
|
@@ -1949,7 +1949,7 @@ function defaultShouldQuit(input) {
|
|
|
1949
1949
|
return input.key.ctrl && (input.key.name === "c" || input.key.name === "d");
|
|
1950
1950
|
}
|
|
1951
1951
|
//#endregion
|
|
1952
|
-
//#region
|
|
1952
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeTerminal.js
|
|
1953
1953
|
/**
|
|
1954
1954
|
* Node.js implementation of the Effect `Terminal` service.
|
|
1955
1955
|
*
|
|
@@ -1968,7 +1968,7 @@ function defaultShouldQuit(input) {
|
|
|
1968
1968
|
*/
|
|
1969
1969
|
const layer$1 = layer$2;
|
|
1970
1970
|
//#endregion
|
|
1971
|
-
//#region
|
|
1971
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.103_bufferutil@4.1.0_effect@4.0.0-beta.103_patch_hash=_7eec308fcf6351488fccaf9a0edac255/node_modules/@effect/platform-node/dist/NodeServices.js
|
|
1972
1972
|
var NodeServices_exports = /* @__PURE__ */ __exportAll({ layer: () => layer });
|
|
1973
1973
|
/**
|
|
1974
1974
|
* Provides the default Node implementations for child process spawning,
|
|
@@ -1981,4 +1981,4 @@ const layer = /*#__PURE__*/ provideMerge(layer$11, /*#__PURE__*/ mergeAll(layer$
|
|
|
1981
1981
|
//#endregion
|
|
1982
1982
|
export { isQuitError as a, layer$7 as c, pipeThroughDuplex as d, toArrayBuffer as f, ChildProcessSpawner as g, make$6 as h, Terminal as i, Crypto as l, toUint8Array as m, layer as n, Stdio as o, toString as p, QuitError as r, make$2 as s, NodeServices_exports as t, fromReadable as u };
|
|
1983
1983
|
|
|
1984
|
-
//# sourceMappingURL=NodeServices-
|
|
1984
|
+
//# sourceMappingURL=NodeServices-BtcL7AtO.mjs.map
|