@tempad-dev/mcp 1.0.3 → 1.0.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/dist/{acquire-TEiVy85j.mjs → acquire-BtKFZ9Lz.mjs} +1 -1
- package/dist/{acquire-DkkzoJ5Z.mjs → acquire-DHwsqq0j.mjs} +6 -7
- package/dist/{acquire-DkkzoJ5Z.mjs.map → acquire-DHwsqq0j.mjs.map} +1 -1
- package/dist/{bootstrap-Cz9cxf6f.mjs → bootstrap-B9-RyWlM.mjs} +14 -15
- package/dist/{bootstrap-Cz9cxf6f.mjs.map → bootstrap-B9-RyWlM.mjs.map} +1 -1
- package/dist/cli.mjs +12 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-binding-CuHY1-__.mjs → client-binding-CvSSv9JC.mjs} +4 -5
- package/dist/{client-binding-CuHY1-__.mjs.map → client-binding-CvSSv9JC.mjs.map} +1 -1
- package/dist/{cold-start-DnlXxs4o.mjs → cold-start-DOy9JsIQ.mjs} +11 -12
- package/dist/{cold-start-DnlXxs4o.mjs.map → cold-start-DOy9JsIQ.mjs.map} +1 -1
- package/dist/{cold-start-r07QQPSK.mjs → cold-start-U3cW0q9T.mjs} +1 -1
- package/dist/{config-CM4LsvW5.mjs → config-Busa_Dqv.mjs} +42 -31
- package/dist/config-Busa_Dqv.mjs.map +1 -0
- package/dist/{design-task-store-C9DJ_EQq.mjs → design-task-store-BHR54v8-.mjs} +8 -10
- package/dist/{design-task-store-C9DJ_EQq.mjs.map → design-task-store-BHR54v8-.mjs.map} +1 -1
- package/dist/{durable-json-dsqpwT93.mjs → durable-json-_WKesGDj.mjs} +2 -3
- package/dist/{durable-json-dsqpwT93.mjs.map → durable-json-_WKesGDj.mjs.map} +1 -1
- package/dist/{edge-DBOKhsN4.mjs → edge-BUf7gs4J.mjs} +14 -15
- package/dist/{edge-DBOKhsN4.mjs.map → edge-BUf7gs4J.mjs.map} +1 -1
- package/dist/{edge-C5SyBEy3.mjs → edge-CHzaTUFt.mjs} +1 -1
- package/dist/{hook-receipts-DcO9rRhi.mjs → hook-receipts-QJU3AMoY.mjs} +4 -5
- package/dist/{hook-receipts-DcO9rRhi.mjs.map → hook-receipts-QJU3AMoY.mjs.map} +1 -1
- package/dist/{host-context-CRMK5AI5.mjs → host-context-9TVtjsSm.mjs} +3 -4
- package/dist/{host-context-CRMK5AI5.mjs.map → host-context-9TVtjsSm.mjs.map} +1 -1
- package/dist/{hub-control-591ZGr_p.mjs → hub-control-UlA4Fncg.mjs} +7 -9
- package/dist/{hub-control-591ZGr_p.mjs.map → hub-control-UlA4Fncg.mjs.map} +1 -1
- package/dist/{hub-runtime-_GWa0RDc.mjs → hub-runtime-DjdqIgGl.mjs} +1 -1
- package/dist/{hub-runtime-j_CZJnWz.mjs → hub-runtime-DsEO9zvX.mjs} +130 -150
- package/dist/hub-runtime-DsEO9zvX.mjs.map +1 -0
- package/dist/hub.mjs +3 -4
- package/dist/{identity-BgzOQE2L.mjs → identity-CCaDEwgc.mjs} +4 -5
- package/dist/{identity-BgzOQE2L.mjs.map → identity-CCaDEwgc.mjs.map} +1 -1
- package/dist/{indexes-CCA-CTcL.mjs → indexes-zYqwqnU6.mjs} +10 -12
- package/dist/{indexes-CCA-CTcL.mjs.map → indexes-zYqwqnU6.mjs.map} +1 -1
- package/dist/log-transport.mjs +234 -143
- package/dist/log-transport.mjs.map +1 -1
- package/dist/managed-runtime.mjs +15 -17
- package/dist/managed-runtime.mjs.map +1 -1
- package/dist/{on-exit-leak-free-BvimJ0rP.mjs → on-exit-leak-free-By20-eFK.mjs} +6 -8
- package/dist/{on-exit-leak-free-BvimJ0rP.mjs.map → on-exit-leak-free-By20-eFK.mjs.map} +1 -1
- package/dist/{pino-CLoB7tK6.mjs → pino-BiEyUxFF.mjs} +56 -82
- package/dist/pino-BiEyUxFF.mjs.map +1 -0
- package/dist/{pino-abstract-transport-B0ISte63.mjs → pino-abstract-transport-BBwCGDga.mjs} +4 -6
- package/dist/{pino-abstract-transport-B0ISte63.mjs.map → pino-abstract-transport-BBwCGDga.mjs.map} +1 -1
- package/dist/pino-file.mjs +3 -4
- package/dist/pino-worker.mjs +6 -8
- package/dist/pino-worker.mjs.map +1 -1
- package/dist/{probe-B6KQJxXU.mjs → probe-BeWkMbzQ.mjs} +40 -55
- package/dist/probe-BeWkMbzQ.mjs.map +1 -0
- package/dist/{process-environment-DJDtCcdv.mjs → process-environment-DRRIdoL8.mjs} +2 -3
- package/dist/{process-environment-DJDtCcdv.mjs.map → process-environment-DRRIdoL8.mjs.map} +1 -1
- package/dist/{processes-CQvuh1Sl.mjs → processes-BCCE8As7.mjs} +17 -23
- package/dist/{processes-CQvuh1Sl.mjs.map → processes-BCCE8As7.mjs.map} +1 -1
- package/dist/{processes-n0G2xAWb.mjs → processes-CBoalzSk.mjs} +1 -1
- package/dist/{proper-lockfile-CisPoFAZ.mjs → proper-lockfile-BgKrOq5D.mjs} +19 -32
- package/dist/{proper-lockfile-CisPoFAZ.mjs.map → proper-lockfile-BgKrOq5D.mjs.map} +1 -1
- package/dist/{protocol-DNswG6F2.mjs → protocol-7m-E_iFu.mjs} +57 -108
- package/dist/protocol-7m-E_iFu.mjs.map +1 -0
- package/dist/{protocol-0jvK718o.mjs → protocol-COK3rM6m.mjs} +1 -1
- package/dist/{rolldown-runtime-CLlik3RS.mjs → rolldown-runtime-BH1-_iVd.mjs} +2 -3
- package/dist/{runtime-identity-BiWIlGgw.mjs → runtime-identity-D9V-g5M-.mjs} +2 -3
- package/dist/{runtime-identity-BiWIlGgw.mjs.map → runtime-identity-D9V-g5M-.mjs.map} +1 -1
- package/dist/runtime-installer.mjs +4 -5
- package/dist/runtime-manifest.json +107 -107
- package/dist/{runtime-platform-EULgJm_w.mjs → runtime-platform-C-Yk9F3L.mjs} +2 -3
- package/dist/{runtime-platform-EULgJm_w.mjs.map → runtime-platform-C-Yk9F3L.mjs.map} +1 -1
- package/dist/{runtime-recovery-Dq3hD3IT.mjs → runtime-recovery-DAYSaVV2.mjs} +1 -1
- package/dist/{runtime-recovery-DpqftTl9.mjs → runtime-recovery-DaRaQ8qY.mjs} +5 -6
- package/dist/{runtime-recovery-DpqftTl9.mjs.map → runtime-recovery-DaRaQ8qY.mjs.map} +1 -1
- package/dist/runtime-verification.mjs +6 -6
- package/dist/{schemas-BgOH6OcJ.mjs → schemas-ZDdPV7RQ.mjs} +23 -39
- package/dist/schemas-ZDdPV7RQ.mjs.map +1 -0
- package/dist/{server-C-tcoOT7.mjs → server-CsCpY0Ft.mjs} +645 -287
- package/dist/server-CsCpY0Ft.mjs.map +1 -0
- package/dist/{shared--CO_WPTx.mjs → shared--othnF1c.mjs} +16 -21
- package/dist/{shared--CO_WPTx.mjs.map → shared--othnF1c.mjs.map} +1 -1
- package/dist/{state-3mPLv7lh.mjs → shared-S0dtOYq8.mjs} +1 -1
- package/dist/{src-BGNQgTr6.mjs → src-BSnzZMvK.mjs} +3 -4
- package/dist/{src-BGNQgTr6.mjs.map → src-BSnzZMvK.mjs.map} +1 -1
- package/dist/{stable-edge-DQmYi4Mf.mjs → stable-edge-VAAxSYSS.mjs} +10 -14
- package/dist/stable-edge-VAAxSYSS.mjs.map +1 -0
- package/dist/{startup-log-iSoBU74r.mjs → startup-log-CYlFgdy5.mjs} +3 -4
- package/dist/{startup-log-iSoBU74r.mjs.map → startup-log-CYlFgdy5.mjs.map} +1 -1
- package/dist/{startup-log-C4DVL-6M.mjs → startup-log-DqK2uwBd.mjs} +1 -1
- package/dist/{state-CnkSwi5E.mjs → state-6qFcvi-I.mjs} +5 -6
- package/dist/{state-CnkSwi5E.mjs.map → state-6qFcvi-I.mjs.map} +1 -1
- package/dist/{shared-B8lb63iG.mjs → state-BrWBtYNG.mjs} +1 -1
- package/dist/{stdio-CZb1NNIa.mjs → stdio-20SBFdww.mjs} +3 -4
- package/dist/{stdio-CZb1NNIa.mjs.map → stdio-20SBFdww.mjs.map} +1 -1
- package/dist/{supervisor-B9lkK4ey.mjs → supervisor-CesT-H5_.mjs} +23 -27
- package/dist/{supervisor-B9lkK4ey.mjs.map → supervisor-CesT-H5_.mjs.map} +1 -1
- package/dist/{task-storage-recovery-_JdAWD5X.mjs → task-storage-recovery-I9lpYYX6.mjs} +6 -7
- package/dist/{task-storage-recovery-_JdAWD5X.mjs.map → task-storage-recovery-I9lpYYX6.mjs.map} +1 -1
- package/dist/thread-stream-worker.mjs +5 -6
- package/dist/thread-stream-worker.mjs.map +1 -1
- package/dist/{types-BEqvvpHh.mjs → types-C8GH0osr.mjs} +1 -1
- package/dist/{types-gJ5HkL66.mjs → types-kNTSQOnR.mjs} +4 -6
- package/dist/{types-gJ5HkL66.mjs.map → types-kNTSQOnR.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/config-CM4LsvW5.mjs.map +0 -1
- package/dist/hub-runtime-j_CZJnWz.mjs.map +0 -1
- package/dist/pino-CLoB7tK6.mjs.map +0 -1
- package/dist/probe-B6KQJxXU.mjs.map +0 -1
- package/dist/protocol-DNswG6F2.mjs.map +0 -1
- package/dist/schemas-BgOH6OcJ.mjs.map +0 -1
- package/dist/server-C-tcoOT7.mjs.map +0 -1
- package/dist/stable-edge-DQmYi4Mf.mjs.map +0 -1
package/dist/{pino-abstract-transport-B0ISte63.mjs.map → pino-abstract-transport-BBwCGDga.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pino-abstract-transport-B0ISte63.mjs","names":[],"sources":["../../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js","../../../node_modules/.pnpm/pino-abstract-transport@3.0.0/node_modules/pino-abstract-transport/index.js"],"sourcesContent":["/*\nCopyright (c) 2014-2021, Matteo Collina <hello@matteocollina.com>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\n'use strict'\n\nconst { Transform } = require('stream')\nconst { StringDecoder } = require('string_decoder')\nconst kLast = Symbol('last')\nconst kDecoder = Symbol('decoder')\n\nfunction transform (chunk, enc, cb) {\n let list\n if (this.overflow) { // Line buffer is full. Skip to start of next line.\n const buf = this[kDecoder].write(chunk)\n list = buf.split(this.matcher)\n\n if (list.length === 1) return cb() // Line ending not found. Discard entire chunk.\n\n // Line ending found. Discard trailing fragment of previous line and reset overflow state.\n list.shift()\n this.overflow = false\n } else {\n this[kLast] += this[kDecoder].write(chunk)\n list = this[kLast].split(this.matcher)\n }\n\n this[kLast] = list.pop()\n\n for (let i = 0; i < list.length; i++) {\n try {\n push(this, this.mapper(list[i]))\n } catch (error) {\n return cb(error)\n }\n }\n\n this.overflow = this[kLast].length > this.maxLength\n if (this.overflow && !this.skipOverflow) {\n cb(new Error('maximum buffer reached'))\n return\n }\n\n cb()\n}\n\nfunction flush (cb) {\n // forward any gibberish left in there\n this[kLast] += this[kDecoder].end()\n\n if (this[kLast]) {\n try {\n push(this, this.mapper(this[kLast]))\n } catch (error) {\n return cb(error)\n }\n }\n\n cb()\n}\n\nfunction push (self, val) {\n if (val !== undefined) {\n self.push(val)\n }\n}\n\nfunction noop (incoming) {\n return incoming\n}\n\nfunction split (matcher, mapper, options) {\n // Set defaults for any arguments not supplied.\n matcher = matcher || /\\r?\\n/\n mapper = mapper || noop\n options = options || {}\n\n // Test arguments explicitly.\n switch (arguments.length) {\n case 1:\n // If mapper is only argument.\n if (typeof matcher === 'function') {\n mapper = matcher\n matcher = /\\r?\\n/\n // If options is only argument.\n } else if (typeof matcher === 'object' && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {\n options = matcher\n matcher = /\\r?\\n/\n }\n break\n\n case 2:\n // If mapper and options are arguments.\n if (typeof matcher === 'function') {\n options = mapper\n mapper = matcher\n matcher = /\\r?\\n/\n // If matcher and options are arguments.\n } else if (typeof mapper === 'object') {\n options = mapper\n mapper = noop\n }\n }\n\n options = Object.assign({}, options)\n options.autoDestroy = true\n options.transform = transform\n options.flush = flush\n options.readableObjectMode = true\n\n const stream = new Transform(options)\n\n stream[kLast] = ''\n stream[kDecoder] = new StringDecoder('utf8')\n stream.matcher = matcher\n stream.mapper = mapper\n stream.maxLength = options.maxLength\n stream.skipOverflow = options.skipOverflow || false\n stream.overflow = false\n stream._destroy = function (err, cb) {\n // Weird Node v12 bug that we need to work around\n this._writableState.errorEmitted = false\n cb(err)\n }\n\n return stream\n}\n\nmodule.exports = split\n","'use strict'\n\nconst metadata = Symbol.for('pino.metadata')\nconst split = require('split2')\nconst { Duplex } = require('stream')\nconst { parentPort, workerData } = require('worker_threads')\n\nfunction createDeferred () {\n let resolve\n let reject\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n })\n promise.resolve = resolve\n promise.reject = reject\n return promise\n}\n\nmodule.exports = function build (fn, opts = {}) {\n const waitForConfig = opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig === true\n const parseLines = opts.parse === 'lines'\n const parseLine = typeof opts.parseLine === 'function' ? opts.parseLine : JSON.parse\n const close = opts.close || defaultClose\n const stream = split(function (line) {\n let value\n\n try {\n value = parseLine(line)\n } catch (error) {\n this.emit('unknown', line, error)\n return\n }\n\n if (value === null) {\n this.emit('unknown', line, 'Null value ignored')\n return\n }\n\n if (typeof value !== 'object') {\n value = {\n data: value,\n time: Date.now()\n }\n }\n\n if (stream[metadata]) {\n stream.lastTime = value.time\n stream.lastLevel = value.level\n stream.lastObj = value\n }\n\n if (parseLines) {\n return line\n }\n\n return value\n }, { autoDestroy: true })\n\n stream._destroy = function (err, cb) {\n const promise = close(err, cb)\n if (promise && typeof promise.then === 'function') {\n promise.then(cb, cb)\n }\n }\n\n if (opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig !== true) {\n setImmediate(() => {\n stream.emit('error', new Error('This transport is not compatible with the current version of pino. Please upgrade pino to the latest version.'))\n })\n }\n\n if (opts.metadata !== false) {\n stream[metadata] = true\n stream.lastTime = 0\n stream.lastLevel = 0\n stream.lastObj = null\n }\n\n if (waitForConfig) {\n let pinoConfig = {}\n const configReceived = createDeferred()\n parentPort.on('message', function handleMessage (message) {\n if (message.code === 'PINO_CONFIG') {\n pinoConfig = message.config\n configReceived.resolve()\n parentPort.off('message', handleMessage)\n }\n })\n\n Object.defineProperties(stream, {\n levels: {\n get () { return pinoConfig.levels }\n },\n messageKey: {\n get () { return pinoConfig.messageKey }\n },\n errorKey: {\n get () { return pinoConfig.errorKey }\n }\n })\n\n return configReceived.then(finish)\n }\n\n return finish()\n\n function finish () {\n let res = fn(stream)\n\n if (res && typeof res.catch === 'function') {\n res.catch((err) => {\n stream.destroy(err)\n })\n\n // set it to null to not retain a reference to the promise\n res = null\n } else if (opts.enablePipelining && res) {\n return Duplex.from({ writable: stream, readable: res })\n }\n\n return stream\n }\n}\n\nfunction defaultClose (err, cb) {\n process.nextTick(cb, err)\n}\n"],"ignoreList":[0,1],"mappings":";;;;;;;;;CAkBA,MAAM,EAAE,cAAA,UAAsB,QAAQ;CACtC,MAAM,EAAE,kBAAA,UAA0B,gBAAgB;CAClD,MAAM,QAAQ,OAAO,MAAM;CAC3B,MAAM,WAAW,OAAO,SAAS;CAEjC,SAAS,UAAW,OAAO,KAAK,IAAI;EAClC,IAAI;EACJ,IAAI,KAAK,UAAU;GAEjB,OADY,KAAK,SAAS,CAAC,MAAM,KACxB,CAAC,CAAC,MAAM,KAA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AAS,SAAU;GACjB,IAAI,MAAM,GAAG,MAAM;GAEnB,IAAI,OAAO,OAAO,IAAI,UAAU,YAAY;IAC1C,IAAI,OAAO,QAAQ;KACjB,OAAO,QAAQ,GAAG;IACpB,CAAC;IAGD,MAAM;GACR,OAAO,IAAI,KAAK,oBAAoB,KAClC,OAAO,OAAO,KAAK;IAAE,UAAU;IAAQ,UAAU;GAAI,CAAC;GAGxD,OAAO;EACT;CACF;CAEA,SAAS,aAAc,KAAK,IAAI;EAC9B,QAAQ,SAAS,IAAI,GAAG;CAC1B"}
|
|
1
|
+
{"version":3,"file":"pino-abstract-transport-BBwCGDga.mjs","names":[],"sources":["../../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js","../../../node_modules/.pnpm/pino-abstract-transport@3.0.0/node_modules/pino-abstract-transport/index.js"],"sourcesContent":["/*\nCopyright (c) 2014-2021, Matteo Collina <hello@matteocollina.com>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\n'use strict'\n\nconst { Transform } = require('stream')\nconst { StringDecoder } = require('string_decoder')\nconst kLast = Symbol('last')\nconst kDecoder = Symbol('decoder')\n\nfunction transform (chunk, enc, cb) {\n let list\n if (this.overflow) { // Line buffer is full. Skip to start of next line.\n const buf = this[kDecoder].write(chunk)\n list = buf.split(this.matcher)\n\n if (list.length === 1) return cb() // Line ending not found. Discard entire chunk.\n\n // Line ending found. Discard trailing fragment of previous line and reset overflow state.\n list.shift()\n this.overflow = false\n } else {\n this[kLast] += this[kDecoder].write(chunk)\n list = this[kLast].split(this.matcher)\n }\n\n this[kLast] = list.pop()\n\n for (let i = 0; i < list.length; i++) {\n try {\n push(this, this.mapper(list[i]))\n } catch (error) {\n return cb(error)\n }\n }\n\n this.overflow = this[kLast].length > this.maxLength\n if (this.overflow && !this.skipOverflow) {\n cb(new Error('maximum buffer reached'))\n return\n }\n\n cb()\n}\n\nfunction flush (cb) {\n // forward any gibberish left in there\n this[kLast] += this[kDecoder].end()\n\n if (this[kLast]) {\n try {\n push(this, this.mapper(this[kLast]))\n } catch (error) {\n return cb(error)\n }\n }\n\n cb()\n}\n\nfunction push (self, val) {\n if (val !== undefined) {\n self.push(val)\n }\n}\n\nfunction noop (incoming) {\n return incoming\n}\n\nfunction split (matcher, mapper, options) {\n // Set defaults for any arguments not supplied.\n matcher = matcher || /\\r?\\n/\n mapper = mapper || noop\n options = options || {}\n\n // Test arguments explicitly.\n switch (arguments.length) {\n case 1:\n // If mapper is only argument.\n if (typeof matcher === 'function') {\n mapper = matcher\n matcher = /\\r?\\n/\n // If options is only argument.\n } else if (typeof matcher === 'object' && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {\n options = matcher\n matcher = /\\r?\\n/\n }\n break\n\n case 2:\n // If mapper and options are arguments.\n if (typeof matcher === 'function') {\n options = mapper\n mapper = matcher\n matcher = /\\r?\\n/\n // If matcher and options are arguments.\n } else if (typeof mapper === 'object') {\n options = mapper\n mapper = noop\n }\n }\n\n options = Object.assign({}, options)\n options.autoDestroy = true\n options.transform = transform\n options.flush = flush\n options.readableObjectMode = true\n\n const stream = new Transform(options)\n\n stream[kLast] = ''\n stream[kDecoder] = new StringDecoder('utf8')\n stream.matcher = matcher\n stream.mapper = mapper\n stream.maxLength = options.maxLength\n stream.skipOverflow = options.skipOverflow || false\n stream.overflow = false\n stream._destroy = function (err, cb) {\n // Weird Node v12 bug that we need to work around\n this._writableState.errorEmitted = false\n cb(err)\n }\n\n return stream\n}\n\nmodule.exports = split\n","'use strict'\n\nconst metadata = Symbol.for('pino.metadata')\nconst split = require('split2')\nconst { Duplex } = require('stream')\nconst { parentPort, workerData } = require('worker_threads')\n\nfunction createDeferred () {\n let resolve\n let reject\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n })\n promise.resolve = resolve\n promise.reject = reject\n return promise\n}\n\nmodule.exports = function build (fn, opts = {}) {\n const waitForConfig = opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig === true\n const parseLines = opts.parse === 'lines'\n const parseLine = typeof opts.parseLine === 'function' ? opts.parseLine : JSON.parse\n const close = opts.close || defaultClose\n const stream = split(function (line) {\n let value\n\n try {\n value = parseLine(line)\n } catch (error) {\n this.emit('unknown', line, error)\n return\n }\n\n if (value === null) {\n this.emit('unknown', line, 'Null value ignored')\n return\n }\n\n if (typeof value !== 'object') {\n value = {\n data: value,\n time: Date.now()\n }\n }\n\n if (stream[metadata]) {\n stream.lastTime = value.time\n stream.lastLevel = value.level\n stream.lastObj = value\n }\n\n if (parseLines) {\n return line\n }\n\n return value\n }, { autoDestroy: true })\n\n stream._destroy = function (err, cb) {\n const promise = close(err, cb)\n if (promise && typeof promise.then === 'function') {\n promise.then(cb, cb)\n }\n }\n\n if (opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig !== true) {\n setImmediate(() => {\n stream.emit('error', new Error('This transport is not compatible with the current version of pino. Please upgrade pino to the latest version.'))\n })\n }\n\n if (opts.metadata !== false) {\n stream[metadata] = true\n stream.lastTime = 0\n stream.lastLevel = 0\n stream.lastObj = null\n }\n\n if (waitForConfig) {\n let pinoConfig = {}\n const configReceived = createDeferred()\n parentPort.on('message', function handleMessage (message) {\n if (message.code === 'PINO_CONFIG') {\n pinoConfig = message.config\n configReceived.resolve()\n parentPort.off('message', handleMessage)\n }\n })\n\n Object.defineProperties(stream, {\n levels: {\n get () { return pinoConfig.levels }\n },\n messageKey: {\n get () { return pinoConfig.messageKey }\n },\n errorKey: {\n get () { return pinoConfig.errorKey }\n }\n })\n\n return configReceived.then(finish)\n }\n\n return finish()\n\n function finish () {\n let res = fn(stream)\n\n if (res && typeof res.catch === 'function') {\n res.catch((err) => {\n stream.destroy(err)\n })\n\n // set it to null to not retain a reference to the promise\n res = null\n } else if (opts.enablePipelining && res) {\n return Duplex.from({ writable: stream, readable: res })\n }\n\n return stream\n }\n}\n\nfunction defaultClose (err, cb) {\n process.nextTick(cb, err)\n}\n"],"ignoreList":[0,1],"mappings":";;;;;;;;;CAkBA,MAAM,EAAE,cAAA,UAAsB,QAAQ;CACtC,MAAM,EAAE,kBAAA,UAA0B,gBAAgB;CAClD,MAAM,QAAQ,OAAO,MAAM;CAC3B,MAAM,WAAW,OAAO,SAAS;CAEjC,SAAS,UAAW,OAAO,KAAK,IAAI;EAClC,IAAI;EACJ,IAAI,KAAK,UAAU;GAEjB,OADY,KAAK,SAAS,CAAC,MAAM,KACxB,CAAC,CAAC,MAAM,KAAK,OAAO;GAE7B,IAAI,KAAK,WAAW,GAAG,OAAO,GAAG;GAGjC,KAAK,MAAM;GACX,KAAK,WAAW;EAClB,OAAO;GACL,KAAK,UAAU,KAAK,SAAS,CAAC,MAAM,KAAK;GACzC,OAAO,KAAK,MAAM,CAAC,MAAM,KAAK,OAAO;EACvC;EAEA,KAAK,SAAS,KAAK,IAAI;EAEvB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAC/B,IAAI;GACF,KAAK,MAAM,KAAK,OAAO,KAAK,EAAE,CAAC;EACjC,SAAS,OAAO;GACd,OAAO,GAAG,KAAK;EACjB;EAGF,KAAK,WAAW,KAAK,MAAM,CAAC,SAAS,KAAK;EAC1C,IAAI,KAAK,YAAY,CAAC,KAAK,cAAc;GACvC,mBAAG,IA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ino/file': runtimeFilePath(new URL('./pino-file.mjs', import.meta.url))
|
|
6
6
|
};
|
|
7
|
-
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-
|
|
8
|
-
import { t as require_pino } from "./pino-
|
|
9
|
-
|
|
7
|
+
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-BH1-_iVd.mjs";
|
|
8
|
+
import { t as require_pino } from "./pino-BiEyUxFF.mjs";
|
|
9
|
+
// ../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/file.js
|
|
10
10
|
var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11
11
|
const pino = require_pino();
|
|
12
12
|
const { once } = __require("node:events");
|
|
@@ -21,7 +21,6 @@ var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21
21
|
return destination;
|
|
22
22
|
};
|
|
23
23
|
}));
|
|
24
|
-
//#endregion
|
|
25
24
|
export default require_file();
|
|
26
25
|
export {};
|
|
27
26
|
|
package/dist/pino-worker.mjs
CHANGED
|
@@ -4,11 +4,11 @@ globalThis.__bundlerPathsOverrides = {
|
|
|
4
4
|
'pino-worker': runtimeFilePath(new URL('./pino-worker.mjs', import.meta.url)),
|
|
5
5
|
'pino/file': runtimeFilePath(new URL('./pino-file.mjs', import.meta.url))
|
|
6
6
|
};
|
|
7
|
-
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-
|
|
8
|
-
import { t as require_pino } from "./pino-
|
|
9
|
-
import { t as require_pino_abstract_transport } from "./pino-abstract-transport-
|
|
10
|
-
import { t as require_src } from "./src-
|
|
11
|
-
|
|
7
|
+
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-BH1-_iVd.mjs";
|
|
8
|
+
import { t as require_pino } from "./pino-BiEyUxFF.mjs";
|
|
9
|
+
import { t as require_pino_abstract_transport } from "./pino-abstract-transport-BBwCGDga.mjs";
|
|
10
|
+
import { t as require_src } from "./src-BSnzZMvK.mjs";
|
|
11
|
+
// ../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/transport-stream.js
|
|
12
12
|
var require_transport_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13
13
|
const { realImport, realRequire } = require_src();
|
|
14
14
|
module.exports = loadTransportStreamBuilder;
|
|
@@ -42,8 +42,7 @@ var require_transport_stream = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
42
42
|
return fn;
|
|
43
43
|
}
|
|
44
44
|
}));
|
|
45
|
-
|
|
46
|
-
//#region ../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/worker.js
|
|
45
|
+
// ../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/worker.js
|
|
47
46
|
var require_worker = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
48
47
|
const EE = __require("node:events");
|
|
49
48
|
const { pipeline, PassThrough } = __require("node:stream");
|
|
@@ -135,7 +134,6 @@ var require_worker = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
135
134
|
}
|
|
136
135
|
};
|
|
137
136
|
}));
|
|
138
|
-
//#endregion
|
|
139
137
|
export default require_worker();
|
|
140
138
|
export {};
|
|
141
139
|
|
package/dist/pino-worker.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pino-worker.mjs","names":[],"sources":["../../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/transport-stream.js","../../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/worker.js"],"sourcesContent":["'use strict'\n\nconst { realImport, realRequire } = require('real-require')\n\nmodule.exports = loadTransportStreamBuilder\n\n/**\n * Loads & returns a function to build transport streams\n * @param {string} target\n * @returns {Promise<function(object): Promise<import('node:stream').Writable>>}\n * @throws {Error} In case the target module does not export a function\n */\nasync function loadTransportStreamBuilder (target) {\n let fn\n try {\n const toLoad = target.startsWith('file://') ? target : 'file://' + target\n\n if (toLoad.endsWith('.ts') || toLoad.endsWith('.cts')) {\n // TODO: add support for the TSM modules loader ( https://github.com/lukeed/tsm ).\n if (process[Symbol.for('ts-node.register.instance')]) {\n realRequire('ts-node/register')\n } else if (process.env && process.env.TS_NODE_DEV) {\n realRequire('ts-node-dev')\n }\n // TODO: Support ES imports once tsc, tap & ts-node provide better compatibility guarantees.\n fn = realRequire(decodeURIComponent(target))\n } else {\n fn = (await realImport(toLoad))\n }\n } catch (error) {\n // See this PR for details: https://github.com/pinojs/thread-stream/pull/34\n if ((error.code === 'ENOTDIR' || error.code === 'ERR_MODULE_NOT_FOUND')) {\n fn = realRequire(target)\n } else if (error.code === undefined || error.code === 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') {\n // When bundled with pkg, an undefined error is thrown when called with realImport\n // When bundled with pkg and using node v20, an ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error is thrown when called with realImport\n // More info at: https://github.com/pinojs/thread-stream/issues/143\n try {\n fn = realRequire(decodeURIComponent(target))\n } catch {\n throw error\n }\n } else {\n throw error\n }\n }\n\n // Depending on how the default export is performed, and on how the code is\n // transpiled, we may find cases of two nested \"default\" objects.\n // See https://github.com/pinojs/pino/issues/1243#issuecomment-982774762\n if (typeof fn === 'object') fn = fn.default\n if (typeof fn === 'object') fn = fn.default\n if (typeof fn !== 'function') throw Error('exported worker is not a function')\n\n return fn\n}\n","'use strict'\n\nconst EE = require('node:events')\nconst { pipeline, PassThrough } = require('node:stream')\nconst pino = require('../pino.js')\nconst build = require('pino-abstract-transport')\nconst loadTransportStreamBuilder = require('./transport-stream')\n\n// This file is not checked by the code coverage tool,\n// as it is not reliable.\n\n/* istanbul ignore file */\n\n/*\n * > Multiple targets & pipelines\n *\n *\n * ┌─────────────────────────────────────────────────┐ ┌─────┐\n * │ │ │ p │\n * │ │ │ i │\n * │ target │ │ n │\n * │ │ ────────────────────────────────┼────┤ o │\n * │ targets │ target │ │ . │\n * │ ────────────► │ ────────────────────────────────┼────┤ m │ source\n * │ │ target │ │ u │ │\n * │ │ ────────────────────────────────┼────┤ l │ │write\n * │ │ │ │ t │ ▼\n * │ │ pipeline ┌───────────────┐ │ │ i │ ┌────────┐\n * │ │ ──────────► │ PassThrough ├───┼────┤ s ├──────┤ │\n * │ │ └───────────────┘ │ │ t │ write│ Thread │\n * │ │ │ │ r │◄─────┤ Stream │\n * │ │ pipeline ┌───────────────┐ │ │ e │ │ │\n * │ │ ──────────► │ PassThrough ├───┼────┤ a │ └────────┘\n * │ └───────────────┘ │ │ m │\n * │ │ │ │\n * └─────────────────────────────────────────────────┘ └─────┘\n *\n *\n *\n * > One single pipeline or target\n *\n *\n * source\n * │\n * ┌────────────────────────────────────────────────┐ │write\n * │ │ ▼\n * │ │ ┌────────┐\n * │ targets │ target │ │ │\n * │ ────────────► │ ──────────────────────────────┤ │ │\n * │ │ │ │ │\n * │ ├──────┤ │\n * │ │ │ │\n * │ │ │ │\n * │ OR │ │ │\n * │ │ │ │\n * │ │ │ │\n * │ ┌──────────────┐ │ │ │\n * │ targets │ pipeline │ │ │ │ Thread │\n * │ ────────────► │ ────────────►│ PassThrough ├─┤ │ Stream │\n * │ │ │ │ │ │ │\n * │ └──────────────┘ │ │ │\n * │ │ │ │\n * │ OR │ write│ │\n * │ │◄─────┤ │\n * │ │ │ │\n * │ ┌──────────────┐ │ │ │\n * │ pipeline │ │ │ │ │\n * │ ──────────────►│ PassThrough ├────────────────┤ │ │\n * │ │ │ │ │ │\n * │ └──────────────┘ │ └────────┘\n * │ │\n * │ │\n * └────────────────────────────────────────────────┘\n */\n\nmodule.exports = async function ({ targets, pipelines, levels, dedupe }) {\n const targetStreams = []\n\n // Process targets\n if (targets && targets.length) {\n targets = await Promise.all(targets.map(async (t) => {\n const fn = await loadTransportStreamBuilder(t.target)\n const stream = await fn(t.options)\n return {\n level: t.level,\n stream\n }\n }))\n\n targetStreams.push(...targets)\n }\n\n // Process pipelines\n if (pipelines && pipelines.length) {\n pipelines = await Promise.all(\n pipelines.map(async (p) => {\n let level\n const pipeDests = await Promise.all(\n p.map(async (t) => {\n // level assigned to pipeline is duplicated over all its targets, just store it\n level = t.level\n const fn = await loadTransportStreamBuilder(t.target)\n const stream = await fn(t.options)\n return stream\n }\n ))\n\n return {\n level,\n stream: createPipeline(pipeDests)\n }\n })\n )\n targetStreams.push(...pipelines)\n }\n\n // Skip building the multistream step if either one single pipeline or target is defined and\n // return directly the stream instance back to TreadStream.\n // This is equivalent to define either:\n //\n // pino.transport({ target: ... })\n //\n // OR\n //\n // pino.transport({ pipeline: ... })\n //\n // When a `level` is set on the single target/pipeline, fall through to the\n // multistream path so the per-target level filter is honored (#1996).\n if (targetStreams.length === 1 && targetStreams[0].level == null) {\n return targetStreams[0].stream\n } else {\n return build(process, {\n parse: 'lines',\n metadata: true,\n close (err, cb) {\n let expected = 0\n for (const transport of targetStreams) {\n expected++\n transport.stream.on('close', closeCb)\n transport.stream.end()\n }\n\n function closeCb () {\n if (--expected === 0) {\n cb(err)\n }\n }\n }\n })\n }\n\n // TODO: Why split2 was not used for pipelines?\n function process (stream) {\n const multi = pino.multistream(targetStreams, { levels, dedupe })\n // TODO manage backpressure\n stream.on('data', function (chunk) {\n const { lastTime, lastMsg, lastObj, lastLevel } = this\n multi.lastLevel = lastLevel\n multi.lastTime = lastTime\n multi.lastMsg = lastMsg\n multi.lastObj = lastObj\n\n // TODO handle backpressure\n multi.write(chunk + '\\n')\n })\n }\n\n /**\n * Creates a pipeline using the provided streams and return an instance of `PassThrough` stream\n * as a source for the pipeline.\n *\n * @param {(TransformStream|WritableStream)[]} streams An array of streams.\n * All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.\n * @returns A `PassThrough` stream instance representing the source stream of the pipeline\n */\n function createPipeline (streams) {\n const ee = new EE()\n const stream = new PassThrough({\n autoDestroy: true,\n destroy (_, cb) {\n ee.on('error', cb)\n ee.on('closed', cb)\n }\n })\n\n pipeline(stream, ...streams, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n ee.emit('error', err)\n return\n }\n\n ee.emit('closed')\n })\n\n return stream\n }\n}\n"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Aa;IACb,QAAS,GAAG,IAAI;KACd,GAAG,GAAG,SAAS,EAAE;KACjB,GAAG,GAAG,UAAU,EAAE;IACpB;GACF,CAAC;GAED,SAAS,QAAQ,GAAG,SAAS,SAAU,KAAK;IAC1C,IAAI,OAAO,IAAI,SAAS,8BAA8B;KACpD,GAAG,KAAK,SAAS,GAAG;KACpB;IACF;IAEA,GAAG,KAAK,QAAQ;GAClB,CAAC;GAED,OAAO;EACT;CACF"}
|
|
1
|
+
{"version":3,"file":"pino-worker.mjs","names":[],"sources":["../../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/transport-stream.js","../../../node_modules/.pnpm/pino@10.4.0/node_modules/pino/lib/worker.js"],"sourcesContent":["'use strict'\n\nconst { realImport, realRequire } = require('real-require')\n\nmodule.exports = loadTransportStreamBuilder\n\n/**\n * Loads & returns a function to build transport streams\n * @param {string} target\n * @returns {Promise<function(object): Promise<import('node:stream').Writable>>}\n * @throws {Error} In case the target module does not export a function\n */\nasync function loadTransportStreamBuilder (target) {\n let fn\n try {\n const toLoad = target.startsWith('file://') ? target : 'file://' + target\n\n if (toLoad.endsWith('.ts') || toLoad.endsWith('.cts')) {\n // TODO: add support for the TSM modules loader ( https://github.com/lukeed/tsm ).\n if (process[Symbol.for('ts-node.register.instance')]) {\n realRequire('ts-node/register')\n } else if (process.env && process.env.TS_NODE_DEV) {\n realRequire('ts-node-dev')\n }\n // TODO: Support ES imports once tsc, tap & ts-node provide better compatibility guarantees.\n fn = realRequire(decodeURIComponent(target))\n } else {\n fn = (await realImport(toLoad))\n }\n } catch (error) {\n // See this PR for details: https://github.com/pinojs/thread-stream/pull/34\n if ((error.code === 'ENOTDIR' || error.code === 'ERR_MODULE_NOT_FOUND')) {\n fn = realRequire(target)\n } else if (error.code === undefined || error.code === 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') {\n // When bundled with pkg, an undefined error is thrown when called with realImport\n // When bundled with pkg and using node v20, an ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error is thrown when called with realImport\n // More info at: https://github.com/pinojs/thread-stream/issues/143\n try {\n fn = realRequire(decodeURIComponent(target))\n } catch {\n throw error\n }\n } else {\n throw error\n }\n }\n\n // Depending on how the default export is performed, and on how the code is\n // transpiled, we may find cases of two nested \"default\" objects.\n // See https://github.com/pinojs/pino/issues/1243#issuecomment-982774762\n if (typeof fn === 'object') fn = fn.default\n if (typeof fn === 'object') fn = fn.default\n if (typeof fn !== 'function') throw Error('exported worker is not a function')\n\n return fn\n}\n","'use strict'\n\nconst EE = require('node:events')\nconst { pipeline, PassThrough } = require('node:stream')\nconst pino = require('../pino.js')\nconst build = require('pino-abstract-transport')\nconst loadTransportStreamBuilder = require('./transport-stream')\n\n// This file is not checked by the code coverage tool,\n// as it is not reliable.\n\n/* istanbul ignore file */\n\n/*\n * > Multiple targets & pipelines\n *\n *\n * ┌─────────────────────────────────────────────────┐ ┌─────┐\n * │ │ │ p │\n * │ │ │ i │\n * │ target │ │ n │\n * │ │ ────────────────────────────────┼────┤ o │\n * │ targets │ target │ │ . │\n * │ ────────────► │ ────────────────────────────────┼────┤ m │ source\n * │ │ target │ │ u │ │\n * │ │ ────────────────────────────────┼────┤ l │ │write\n * │ │ │ │ t │ ▼\n * │ │ pipeline ┌───────────────┐ │ │ i │ ┌────────┐\n * │ │ ──────────► │ PassThrough ├───┼────┤ s ├──────┤ │\n * │ │ └───────────────┘ │ │ t │ write│ Thread │\n * │ │ │ │ r │◄─────┤ Stream │\n * │ │ pipeline ┌───────────────┐ │ │ e │ │ │\n * │ │ ──────────► │ PassThrough ├───┼────┤ a │ └────────┘\n * │ └───────────────┘ │ │ m │\n * │ │ │ │\n * └─────────────────────────────────────────────────┘ └─────┘\n *\n *\n *\n * > One single pipeline or target\n *\n *\n * source\n * │\n * ┌────────────────────────────────────────────────┐ │write\n * │ │ ▼\n * │ │ ┌────────┐\n * │ targets │ target │ │ │\n * │ ────────────► │ ──────────────────────────────┤ │ │\n * │ │ │ │ │\n * │ ├──────┤ │\n * │ │ │ │\n * │ │ │ │\n * │ OR │ │ │\n * │ │ │ │\n * │ │ │ │\n * │ ┌──────────────┐ │ │ │\n * │ targets │ pipeline │ │ │ │ Thread │\n * │ ────────────► │ ────────────►│ PassThrough ├─┤ │ Stream │\n * │ │ │ │ │ │ │\n * │ └──────────────┘ │ │ │\n * │ │ │ │\n * │ OR │ write│ │\n * │ │◄─────┤ │\n * │ │ │ │\n * │ ┌──────────────┐ │ │ │\n * │ pipeline │ │ │ │ │\n * │ ──────────────►│ PassThrough ├────────────────┤ │ │\n * │ │ │ │ │ │\n * │ └──────────────┘ │ └────────┘\n * │ │\n * │ │\n * └────────────────────────────────────────────────┘\n */\n\nmodule.exports = async function ({ targets, pipelines, levels, dedupe }) {\n const targetStreams = []\n\n // Process targets\n if (targets && targets.length) {\n targets = await Promise.all(targets.map(async (t) => {\n const fn = await loadTransportStreamBuilder(t.target)\n const stream = await fn(t.options)\n return {\n level: t.level,\n stream\n }\n }))\n\n targetStreams.push(...targets)\n }\n\n // Process pipelines\n if (pipelines && pipelines.length) {\n pipelines = await Promise.all(\n pipelines.map(async (p) => {\n let level\n const pipeDests = await Promise.all(\n p.map(async (t) => {\n // level assigned to pipeline is duplicated over all its targets, just store it\n level = t.level\n const fn = await loadTransportStreamBuilder(t.target)\n const stream = await fn(t.options)\n return stream\n }\n ))\n\n return {\n level,\n stream: createPipeline(pipeDests)\n }\n })\n )\n targetStreams.push(...pipelines)\n }\n\n // Skip building the multistream step if either one single pipeline or target is defined and\n // return directly the stream instance back to TreadStream.\n // This is equivalent to define either:\n //\n // pino.transport({ target: ... })\n //\n // OR\n //\n // pino.transport({ pipeline: ... })\n //\n // When a `level` is set on the single target/pipeline, fall through to the\n // multistream path so the per-target level filter is honored (#1996).\n if (targetStreams.length === 1 && targetStreams[0].level == null) {\n return targetStreams[0].stream\n } else {\n return build(process, {\n parse: 'lines',\n metadata: true,\n close (err, cb) {\n let expected = 0\n for (const transport of targetStreams) {\n expected++\n transport.stream.on('close', closeCb)\n transport.stream.end()\n }\n\n function closeCb () {\n if (--expected === 0) {\n cb(err)\n }\n }\n }\n })\n }\n\n // TODO: Why split2 was not used for pipelines?\n function process (stream) {\n const multi = pino.multistream(targetStreams, { levels, dedupe })\n // TODO manage backpressure\n stream.on('data', function (chunk) {\n const { lastTime, lastMsg, lastObj, lastLevel } = this\n multi.lastLevel = lastLevel\n multi.lastTime = lastTime\n multi.lastMsg = lastMsg\n multi.lastObj = lastObj\n\n // TODO handle backpressure\n multi.write(chunk + '\\n')\n })\n }\n\n /**\n * Creates a pipeline using the provided streams and return an instance of `PassThrough` stream\n * as a source for the pipeline.\n *\n * @param {(TransformStream|WritableStream)[]} streams An array of streams.\n * All intermediate streams in the array *MUST* be `Transform` streams and only the last one `Writable`.\n * @returns A `PassThrough` stream instance representing the source stream of the pipeline\n */\n function createPipeline (streams) {\n const ee = new EE()\n const stream = new PassThrough({\n autoDestroy: true,\n destroy (_, cb) {\n ee.on('error', cb)\n ee.on('closed', cb)\n }\n })\n\n pipeline(stream, ...streams, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n ee.emit('error', err)\n return\n }\n\n ee.emit('closed')\n })\n\n return stream\n }\n}\n"],"ignoreList":[0,1],"mappings":";;;;;;;;;;;;CAEA,MAAM,EAAE,YAAY,gBAAA,YAAA;CAEpB,OAAO,UAAU;;;;;;;CAQjB,eAAe,2BAA4B,QAAQ;EACjD,IAAI;EACJ,IAAI;GACF,MAAM,SAAS,OAAO,WAAW,SAAS,IAAI,SAAS,YAAY;GAEnE,IAAI,OAAO,SAAS,KAAK,KAAK,OAAO,SAAS,MAAM,GAAG;IAErD,IAAI,QAAQ,OAAO,IAAI,2BAA2B,IAChD,YAAY,kBAAkB;SACzB,IAAI,QAAQ,OAAO,QAAQ,IAAI,aACpC,YAAY,aAAa;IAG3B,KAAK,YAAY,mBAAmB,MAAM,CAAC;GAC7C,OACE,KAAM,MAAM,WAAW,MAAM;EAEjC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AG,SAAS;EACjC;EAcA,IAAI,cAAc,WAAW,KAAK,cAAc,EAAE,CAAC,SAAS,MAC1D,OAAO,cAAc,EAAE,CAAC;OAExB,OAAO,MAAM,SAAS;GACpB,OAAO;GACP,UAAU;GACV,MAAO,KAAK,IAAI;IACd,IAAI,WAAW;IACf,KAAK,MAAM,aAAa,eAAe;KACrC;KACA,UAAU,OAAO,GAAG,SAAS,OAAO;KACpC,UAAU,OAAO,IAAI;IACvB;IAEA,SAAS,UAAW;KAClB,IAAI,EAAE,aAAa,GACjB,GAAG,GAAG;IAEV;GACF;EACF,CAAC;EAIH,SAAS,QAAS,QAAQ;GACxB,MAAM,QAAQ,KAAK,YAAY,eAAe;IAAE;IAAQ;GAAO,CAAC;GAEhE,OAAO,GAAG,QAAQ,SAAU,OAAO;IACjC,MAAM,EAAE,UAAU,SAAS,SAAS,cAAc;IAClD,MAAM,YAAY;IAClB,MAAM,WAAW;IACjB,MAAM,UAAU;IAChB,MAAM,UAAU;IAGhB,MAAM,MAAM,QAAQ,IAAI;GAC1B,CAAC;EACH;;;;;;;;;EAUA,SAAS,eAAgB,SAAS;GAChC,MAAM,KAAK,IAAI,GAAG;GAClB,MAAM,SAAS,IAAI,YAAY;IAC7B,aAAa;IACb,QAAS,GAAG,IAAI;KACd,GAAG,GAAG,SAAS,EAAE;KACjB,GAAG,GAAG,UAAU,EAAE;IACpB;GACF,CAAC;GAED,SAAS,QAAQ,GAAG,SAAS,SAAU,KAAK;IAC1C,IAAI,OAAO,IAAI,SAAS,8BAA8B;KACpD,GAAG,KAAK,SAAS,GAAG;KACpB;IACF;IAEA,GAAG,KAAK,QAAQ;GAClB,CAAC;GAED,OAAO;EACT;CACF"}
|
|
@@ -4,23 +4,23 @@ globalThis.__bundlerPathsOverrides = {
|
|
|
4
4
|
'pino-worker': runtimeFilePath(new URL('./pino-worker.mjs', import.meta.url)),
|
|
5
5
|
'pino/file': runtimeFilePath(new URL('./pino-file.mjs', import.meta.url))
|
|
6
6
|
};
|
|
7
|
-
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-
|
|
8
|
-
import { _ as record, d as literal, m as object, p as number, v as string, x as unknown } from "./schemas-
|
|
9
|
-
import { tn as ResultSchema } from "./types-
|
|
10
|
-
import { i as serializeMessage, t as ReadBuffer } from "./stdio-
|
|
11
|
-
import { n as hubEnvironment } from "./process-environment-
|
|
12
|
-
import { a as createPrivateTempDirectory, u as runtimeEndpoint } from "./runtime-platform-
|
|
13
|
-
import { f as SocketTransport, n as ControlPeer, s as RECOVER_MS } from "./protocol-
|
|
14
|
-
import { C as sha256, E as MAX_ARCHIVE_BYTES, M as PACKAGE_NAME, P as VersionSchema, R as compareVersions, k as IntegritySchema, n as fingerprintBundle, t as connectSocket } from "./processes-
|
|
15
|
-
import { t as ArtifactSchema } from "./state-
|
|
16
|
-
import { i as Client, n as readRuntimeContract, t as contractHashes } from "./stable-edge-
|
|
7
|
+
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-BH1-_iVd.mjs";
|
|
8
|
+
import { _ as record, d as literal, m as object, p as number, v as string, x as unknown } from "./schemas-ZDdPV7RQ.mjs";
|
|
9
|
+
import { tn as ResultSchema } from "./types-kNTSQOnR.mjs";
|
|
10
|
+
import { i as serializeMessage, t as ReadBuffer } from "./stdio-20SBFdww.mjs";
|
|
11
|
+
import { n as hubEnvironment } from "./process-environment-DRRIdoL8.mjs";
|
|
12
|
+
import { a as createPrivateTempDirectory, u as runtimeEndpoint } from "./runtime-platform-C-Yk9F3L.mjs";
|
|
13
|
+
import { f as SocketTransport, n as ControlPeer, s as RECOVER_MS } from "./protocol-7m-E_iFu.mjs";
|
|
14
|
+
import { C as sha256, E as MAX_ARCHIVE_BYTES, M as PACKAGE_NAME, P as VersionSchema, R as compareVersions, k as IntegritySchema, n as fingerprintBundle, t as connectSocket } from "./processes-BCCE8As7.mjs";
|
|
15
|
+
import { t as ArtifactSchema } from "./state-6qFcvi-I.mjs";
|
|
16
|
+
import { i as Client, n as readRuntimeContract, t as contractHashes } from "./stable-edge-VAAxSYSS.mjs";
|
|
17
17
|
import { join } from "node:path";
|
|
18
18
|
import { PassThrough } from "node:stream";
|
|
19
19
|
import { realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
20
20
|
import { createHash } from "node:crypto";
|
|
21
21
|
import process$1 from "node:process";
|
|
22
22
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
23
|
-
|
|
23
|
+
// src/runtime-update/registry.ts
|
|
24
24
|
const REGISTRY = "https://registry.npmjs.org";
|
|
25
25
|
const MetadataSchema = object({
|
|
26
26
|
name: literal(PACKAGE_NAME),
|
|
@@ -103,12 +103,11 @@ function downloadRelease(release, fetcher = fetch) {
|
|
|
103
103
|
if (release.url !== `${REGISTRY}/@tempad-dev/mcp/-/mcp-${release.version}.tgz`) throw new Error("Runtime download must use the official npm artifact URL.");
|
|
104
104
|
return bytes(release.url, MAX_ARCHIVE_BYTES, 12e4, fetcher);
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
106
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
108
107
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
109
108
|
module.exports = isexe;
|
|
110
109
|
isexe.sync = sync;
|
|
111
|
-
var fs
|
|
110
|
+
var fs = __require("fs");
|
|
112
111
|
function checkPathExt(path, options) {
|
|
113
112
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
114
113
|
if (!pathext) return true;
|
|
@@ -125,27 +124,26 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
125
124
|
return checkPathExt(path, options);
|
|
126
125
|
}
|
|
127
126
|
function isexe(path, options, cb) {
|
|
128
|
-
fs
|
|
127
|
+
fs.stat(path, function(er, stat) {
|
|
129
128
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
130
129
|
});
|
|
131
130
|
}
|
|
132
131
|
function sync(path, options) {
|
|
133
|
-
return checkStat(fs
|
|
132
|
+
return checkStat(fs.statSync(path), path, options);
|
|
134
133
|
}
|
|
135
134
|
}));
|
|
136
|
-
|
|
137
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
135
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
138
136
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
139
137
|
module.exports = isexe;
|
|
140
138
|
isexe.sync = sync;
|
|
141
|
-
var fs
|
|
139
|
+
var fs = __require("fs");
|
|
142
140
|
function isexe(path, options, cb) {
|
|
143
|
-
fs
|
|
141
|
+
fs.stat(path, function(er, stat) {
|
|
144
142
|
cb(er, er ? false : checkStat(stat, options));
|
|
145
143
|
});
|
|
146
144
|
}
|
|
147
145
|
function sync(path, options) {
|
|
148
|
-
return checkStat(fs
|
|
146
|
+
return checkStat(fs.statSync(path), options);
|
|
149
147
|
}
|
|
150
148
|
function checkStat(stat, options) {
|
|
151
149
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -163,8 +161,7 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
163
161
|
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
164
162
|
}
|
|
165
163
|
}));
|
|
166
|
-
|
|
167
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
164
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
168
165
|
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
169
166
|
__require("fs");
|
|
170
167
|
var core;
|
|
@@ -205,11 +202,10 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
205
202
|
}
|
|
206
203
|
}
|
|
207
204
|
}));
|
|
208
|
-
|
|
209
|
-
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
205
|
+
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
210
206
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
211
207
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
212
|
-
const path
|
|
208
|
+
const path = __require("path");
|
|
213
209
|
const COLON = isWindows ? ";" : ":";
|
|
214
210
|
const isexe = require_isexe();
|
|
215
211
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -240,7 +236,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
240
236
|
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
241
237
|
const ppRaw = pathEnv[i];
|
|
242
238
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
243
|
-
const pCmd = path
|
|
239
|
+
const pCmd = path.join(pathPart, cmd);
|
|
244
240
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
245
241
|
resolve(subStep(p, i, 0));
|
|
246
242
|
});
|
|
@@ -264,7 +260,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
264
260
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
265
261
|
const ppRaw = pathEnv[i];
|
|
266
262
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
267
|
-
const pCmd = path
|
|
263
|
+
const pCmd = path.join(pathPart, cmd);
|
|
268
264
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
269
265
|
for (let j = 0; j < pathExt.length; j++) {
|
|
270
266
|
const cur = p + pathExt[j];
|
|
@@ -283,8 +279,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
283
279
|
module.exports = which;
|
|
284
280
|
which.sync = whichSync;
|
|
285
281
|
}));
|
|
286
|
-
|
|
287
|
-
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
282
|
+
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
288
283
|
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
289
284
|
const pathKey = (options = {}) => {
|
|
290
285
|
const environment = options.env || process.env;
|
|
@@ -294,10 +289,9 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
294
289
|
module.exports = pathKey;
|
|
295
290
|
module.exports.default = pathKey;
|
|
296
291
|
}));
|
|
297
|
-
|
|
298
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
292
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
299
293
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300
|
-
const path
|
|
294
|
+
const path = __require("path");
|
|
301
295
|
const which = require_which();
|
|
302
296
|
const getPathKey = require_path_key();
|
|
303
297
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -312,12 +306,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
312
306
|
try {
|
|
313
307
|
resolved = which.sync(parsed.command, {
|
|
314
308
|
path: env[getPathKey({ env })],
|
|
315
|
-
pathExt: withoutPathExt ? path
|
|
309
|
+
pathExt: withoutPathExt ? path.delimiter : void 0
|
|
316
310
|
});
|
|
317
311
|
} catch (e) {} finally {
|
|
318
312
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
319
313
|
}
|
|
320
|
-
if (resolved) resolved = path
|
|
314
|
+
if (resolved) resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
321
315
|
return resolved;
|
|
322
316
|
}
|
|
323
317
|
function resolveCommand(parsed) {
|
|
@@ -325,8 +319,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
325
319
|
}
|
|
326
320
|
module.exports = resolveCommand;
|
|
327
321
|
}));
|
|
328
|
-
|
|
329
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
322
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
330
323
|
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
331
324
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
332
325
|
function escapeCommand(arg) {
|
|
@@ -345,13 +338,11 @@ var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
345
338
|
module.exports.command = escapeCommand;
|
|
346
339
|
module.exports.argument = escapeArgument;
|
|
347
340
|
}));
|
|
348
|
-
|
|
349
|
-
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
341
|
+
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
350
342
|
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
351
343
|
module.exports = /^#!(.*)/;
|
|
352
344
|
}));
|
|
353
|
-
|
|
354
|
-
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
345
|
+
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
355
346
|
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
356
347
|
const shebangRegex = require_shebang_regex();
|
|
357
348
|
module.exports = (string = "") => {
|
|
@@ -363,8 +354,7 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
363
354
|
return argument ? `${binary} ${argument}` : binary;
|
|
364
355
|
};
|
|
365
356
|
}));
|
|
366
|
-
|
|
367
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
357
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
368
358
|
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
369
359
|
const fs = __require("fs");
|
|
370
360
|
const shebangCommand = require_shebang_command();
|
|
@@ -381,10 +371,9 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
381
371
|
}
|
|
382
372
|
module.exports = readShebang;
|
|
383
373
|
}));
|
|
384
|
-
|
|
385
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
374
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
386
375
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
387
|
-
const path
|
|
376
|
+
const path = __require("path");
|
|
388
377
|
const resolveCommand = require_resolveCommand();
|
|
389
378
|
const escape = require_escape();
|
|
390
379
|
const readShebang = require_readShebang();
|
|
@@ -407,7 +396,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
407
396
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
408
397
|
if (parsed.options.forceShell || needsShell) {
|
|
409
398
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
410
|
-
parsed.command = path
|
|
399
|
+
parsed.command = path.normalize(parsed.command);
|
|
411
400
|
parsed.command = escape.command(parsed.command);
|
|
412
401
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
413
402
|
parsed.args = [
|
|
@@ -442,8 +431,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
442
431
|
}
|
|
443
432
|
module.exports = parse;
|
|
444
433
|
}));
|
|
445
|
-
|
|
446
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
434
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
447
435
|
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
448
436
|
const isWin = process.platform === "win32";
|
|
449
437
|
function notFoundError(original, syscall) {
|
|
@@ -481,8 +469,7 @@ var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
481
469
|
notFoundError
|
|
482
470
|
};
|
|
483
471
|
}));
|
|
484
|
-
|
|
485
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_supports-color@7.2.0_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
472
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_supports-color@7.2.0_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
486
473
|
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
487
474
|
const cp = __require("child_process");
|
|
488
475
|
const parse = require_parse();
|
|
@@ -665,8 +652,7 @@ var StdioClientTransport = class {
|
|
|
665
652
|
});
|
|
666
653
|
}
|
|
667
654
|
};
|
|
668
|
-
|
|
669
|
-
//#region src/runtime-prototype/probe.ts
|
|
655
|
+
// src/runtime-prototype/probe.ts
|
|
670
656
|
/** Run only an explicitly offered local entry, with private stores and no user host identity. */
|
|
671
657
|
async function probeArtifact(entry) {
|
|
672
658
|
entry = realpathSync(entry);
|
|
@@ -765,7 +751,6 @@ async function probeArtifact(entry) {
|
|
|
765
751
|
if (failure) throw failure;
|
|
766
752
|
return result;
|
|
767
753
|
}
|
|
768
|
-
//#endregion
|
|
769
754
|
export { resolveRelease as i, downloadRelease as n, releaseCatalog as r, probeArtifact as t };
|
|
770
755
|
|
|
771
|
-
//# sourceMappingURL=probe-
|
|
756
|
+
//# sourceMappingURL=probe-BeWkMbzQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe-BeWkMbzQ.mjs","names":["z.object","z.literal","z.string","z\n .object","z.record","z.unknown","process","spawn","z.literal","z.number","delay"],"sources":["../src/runtime-update/registry.ts","../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js","../../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_supports-color@7.2.0_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js","../src/runtime-prototype/probe.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { MAX_ARCHIVE_BYTES } from './archive'\nimport { compareVersions, IntegritySchema, PACKAGE_NAME, VersionSchema } from './manifest'\nimport { sha256 } from './package'\n\nconst REGISTRY = 'https://registry.npmjs.org'\nconst MetadataSchema = z.object({\n name: z.literal(PACKAGE_NAME),\n version: VersionSchema,\n deprecated: z.string().optional(),\n dist: z.object({ integrity: IntegritySchema, tarball: z.string() })\n})\nexport type Release = { version: string; integrity: string; url: string; deprecated?: string }\n\nfunction releaseMetadata(value: unknown, version?: string): Release {\n const metadata = MetadataSchema.parse(value)\n const url = `${REGISTRY}/@tempad-dev/mcp/-/mcp-${metadata.version}.tgz`\n if (metadata.dist.tarball !== url || (version && version !== metadata.version))\n throw new Error('Registry metadata does not identify the requested official release.')\n return {\n version: metadata.version,\n integrity: metadata.dist.integrity,\n url,\n ...(metadata.deprecated ? { deprecated: metadata.deprecated } : {})\n }\n}\n\nasync function bytes(url: string, limit: number, timeout: number, fetcher: typeof fetch) {\n const controller = new AbortController()\n const timer = setTimeout(() => controller.abort(), timeout)\n let reader: ReadableStreamDefaultReader<Uint8Array> | undefined\n try {\n const response = await fetcher(url, {\n signal: controller.signal,\n redirect: 'error',\n credentials: 'omit',\n headers: { accept: 'application/json, application/octet-stream' }\n })\n if (!response.ok || !response.body)\n throw new Error(`Runtime registry returned HTTP ${response.status}.`)\n reader = response.body.getReader()\n const chunks: Buffer[] = []\n let size = 0\n while (true) {\n const next = await reader.read()\n if (next.done) break\n size += next.value.byteLength\n if (size > limit) throw new Error('Runtime registry response exceeds its byte limit.')\n chunks.push(Buffer.from(next.value))\n }\n return Buffer.concat(chunks)\n } finally {\n clearTimeout(timer)\n await reader?.cancel().catch(() => {})\n controller.abort()\n }\n}\n\nexport async function resolveRelease(\n selector: string,\n fetcher: typeof fetch = fetch\n): Promise<Release> {\n if (selector !== 'latest') VersionSchema.parse(selector)\n const body = await bytes(\n `${REGISTRY}/@tempad-dev%2fmcp/${selector}`,\n 2 * 1024 * 1024,\n 10_000,\n fetcher\n )\n return releaseMetadata(\n JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(body)),\n selector === 'latest' ? undefined : selector\n )\n}\n\n/** The stable tag is an upper bound, including when its publisher rolls it back. */\nexport async function releaseCatalog(current: string, fetcher: typeof fetch = fetch) {\n VersionSchema.parse(current)\n const body = await bytes(`${REGISTRY}/@tempad-dev%2fmcp`, 8 * 1024 * 1024, 10_000, fetcher)\n const catalog = z\n .object({\n name: z.literal(PACKAGE_NAME),\n 'dist-tags': z.object({ latest: VersionSchema }),\n versions: z.record(z.string(), z.unknown())\n })\n .parse(JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(body)))\n const latest = catalog['dist-tags'].latest\n releaseMetadata(catalog.versions[latest], latest)\n const releases = Object.keys(catalog.versions)\n .filter(\n (version) =>\n VersionSchema.safeParse(version).success &&\n compareVersions(version, current) > 0 &&\n compareVersions(version, latest) <= 0\n )\n .sort((a, b) => compareVersions(b, a))\n .map((version) => releaseMetadata(catalog.versions[version], version))\n return { latest, releases, fingerprint: sha256(JSON.stringify({ latest, releases })) }\n}\n\nexport function downloadRelease(release: Release, fetcher: typeof fetch = fetch) {\n VersionSchema.parse(release.version)\n IntegritySchema.parse(release.integrity)\n if (release.url !== `${REGISTRY}/@tempad-dev/mcp/-/mcp-${release.version}.tgz`)\n throw new Error('Runtime download must use the official npm artifact URL.')\n return bytes(release.url, MAX_ARCHIVE_BYTES, 120_000, fetcher)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input\n // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(?=(\\\\+?)?)\\1\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(?=(\\\\+?)?)\\1$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","import spawn from 'cross-spawn';\nimport process from 'node:process';\nimport { PassThrough } from 'node:stream';\nimport { ReadBuffer, serializeMessage } from '../shared/stdio.js';\n/**\n * Environment variables to inherit by default, if an environment is not explicitly given.\n */\nexport const DEFAULT_INHERITED_ENV_VARS = process.platform === 'win32'\n ? [\n 'APPDATA',\n 'HOMEDRIVE',\n 'HOMEPATH',\n 'LOCALAPPDATA',\n 'PATH',\n 'PROCESSOR_ARCHITECTURE',\n 'SYSTEMDRIVE',\n 'SYSTEMROOT',\n 'TEMP',\n 'USERNAME',\n 'USERPROFILE',\n 'PROGRAMFILES'\n ]\n : /* list inspired by the default env inheritance of sudo */\n ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];\n/**\n * Returns a default environment object including only environment variables deemed safe to inherit.\n */\nexport function getDefaultEnvironment() {\n const env = {};\n for (const key of DEFAULT_INHERITED_ENV_VARS) {\n const value = process.env[key];\n if (value === undefined) {\n continue;\n }\n if (value.startsWith('()')) {\n // Skip functions, which are a security risk.\n continue;\n }\n env[key] = value;\n }\n return env;\n}\n/**\n * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioClientTransport {\n constructor(server) {\n this._stderrStream = null;\n this._serverParams = server;\n this._readBuffer = new ReadBuffer({ maxBufferSize: server.maxBufferSize });\n if (server.stderr === 'pipe' || server.stderr === 'overlapped') {\n this._stderrStream = new PassThrough();\n }\n }\n /**\n * Starts the server process and prepares to communicate with it.\n */\n async start() {\n if (this._process) {\n throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');\n }\n return new Promise((resolve, reject) => {\n this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {\n // merge default env with server env because mcp server needs some env vars\n env: {\n ...getDefaultEnvironment(),\n ...this._serverParams.env\n },\n stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],\n shell: false,\n windowsHide: process.platform === 'win32',\n cwd: this._serverParams.cwd\n });\n this._process.on('error', error => {\n reject(error);\n this.onerror?.(error);\n });\n this._process.on('spawn', () => {\n resolve();\n });\n this._process.on('close', _code => {\n this._process = undefined;\n this.onclose?.();\n });\n this._process.stdin?.on('error', error => {\n this.onerror?.(error);\n });\n this._process.stdout?.on('data', chunk => {\n try {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n }\n catch (error) {\n this.onerror?.(error);\n this.close().catch(() => { });\n }\n });\n this._process.stdout?.on('error', error => {\n this.onerror?.(error);\n });\n if (this._stderrStream && this._process.stderr) {\n this._process.stderr.pipe(this._stderrStream);\n }\n });\n }\n /**\n * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to \"pipe\" or \"overlapped\".\n *\n * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to\n * attach listeners before the start method is invoked. This prevents loss of any early\n * error output emitted by the child process.\n */\n get stderr() {\n if (this._stderrStream) {\n return this._stderrStream;\n }\n return this._process?.stderr ?? null;\n }\n /**\n * The child process pid spawned by this transport.\n *\n * This is only available after the transport has been started.\n */\n get pid() {\n return this._process?.pid ?? null;\n }\n processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n this.onmessage?.(message);\n }\n catch (error) {\n this.onerror?.(error);\n }\n }\n }\n async close() {\n if (this._process) {\n const processToClose = this._process;\n this._process = undefined;\n const closePromise = new Promise(resolve => {\n processToClose.once('close', () => {\n resolve();\n });\n });\n try {\n processToClose.stdin?.end();\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGTERM');\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n }\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGKILL');\n }\n catch {\n // ignore\n }\n }\n }\n this._readBuffer.clear();\n }\n send(message) {\n return new Promise(resolve => {\n if (!this._process?.stdin) {\n throw new Error('Not connected');\n }\n const json = serializeMessage(message);\n if (this._process.stdin.write(json)) {\n resolve();\n }\n else {\n this._process.stdin.once('drain', resolve);\n }\n });\n }\n}\n//# sourceMappingURL=stdio.js.map","import { Client } from '@modelcontextprotocol/sdk/client/index.js'\nimport { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'\nimport { ResultSchema } from '@modelcontextprotocol/sdk/types.js'\nimport { createHash } from 'node:crypto'\nimport { realpathSync, rmSync, writeFileSync } from 'node:fs'\nimport { join } from 'node:path'\nimport { setTimeout as delay } from 'node:timers/promises'\nimport { z } from 'zod'\n\nimport { hubEnvironment } from '../process-environment'\nimport { createPrivateTempDirectory, runtimeEndpoint } from '../runtime-platform'\nimport { contractHashes, readRuntimeContract } from '../stable-edge'\nimport { connectSocket, fingerprintBundle } from './processes'\nimport { ControlPeer, RECOVER_MS, SocketTransport } from './protocol'\nimport { ArtifactSchema } from './state'\n\n/** Run only an explicitly offered local entry, with private stores and no user host identity. */\nexport async function probeArtifact(entry: string) {\n entry = realpathSync(entry)\n const bundle = fingerprintBundle(entry)\n const root = createPrivateTempDirectory('tp-probe-')\n const transport = new StdioClientTransport({\n command: process.execPath,\n args: [entry, '--root', root],\n stderr: 'pipe',\n env: Object.fromEntries(\n Object.entries(hubEnvironment(process.env)).filter(\n (value): value is [string, string] => typeof value[1] === 'string'\n )\n )\n })\n let stderr = Buffer.alloc(0)\n transport.stderr?.on('data', (chunk: Buffer) => {\n stderr = Buffer.concat([stderr, chunk.subarray(-16_384)]).subarray(-16_384)\n })\n const client = new Client({ name: 'tempad-artifact-probe', version: '1' })\n const control = new ControlPeer()\n let pids: number[] | undefined\n let result:\n | {\n artifact: z.infer<typeof ArtifactSchema>\n contract: string\n wireHash: string\n presentationHash: string\n }\n | undefined\n let failure: unknown\n let phase = 'initialize'\n const started = performance.now()\n try {\n // Initial attachment can use the edge's full recovery budget. Allow the\n // following SDK exchange without extending any business-request deadline.\n await client.connect(transport, { timeout: RECOVER_MS + 5000 })\n phase = 'runtime-status'\n await control.connect(\n new SocketTransport(await connectSocket(runtimeEndpoint(root, 'supervisor.sock')))\n )\n const state = await control.request(\n { method: 'tempad/runtime-status' },\n ResultSchema.extend({\n handoffVersion: z.literal(1),\n hubPid: z.number().int().positive(),\n supervisorPid: z.number().int().positive()\n }),\n { timeout: 5000 }\n )\n pids = [state.hubPid, state.supervisorPid]\n phase = 'contract'\n const contract = await readRuntimeContract(client, AbortSignal.timeout(10_000), 5000)\n const artifact = ArtifactSchema.parse({\n entry,\n bundle,\n version: client.getServerVersion()!.version\n })\n if (fingerprintBundle(entry) !== bundle)\n throw new Error('Local runtime changed during verification.')\n result = {\n artifact,\n ...contractHashes(contract),\n contract: createHash('sha256')\n .update(JSON.stringify({ ...contract, pages: [...contract.pages] }))\n .digest('hex')\n }\n phase = 'shutdown'\n } catch (error) {\n failure = error\n } finally {\n await control.close()\n await client.close()\n await transport.close()\n }\n // No forced PID kill: an uncertain probe retains its private evidence and\n // cannot authorize activation. The prototype's idle-owner rule stops children.\n let exited = false\n for (let attempt = 0; pids && attempt < 60; attempt++) {\n exited = pids.every((pid) => {\n try {\n process.kill(pid, 0)\n return false\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ESRCH') return true\n throw error\n }\n })\n if (exited) break\n await delay(100)\n }\n if (!exited) {\n const diagnostic = {\n phase,\n elapsedMs: Math.round(performance.now() - started),\n pids,\n failure:\n failure instanceof Error ? (failure.stack ?? failure.message).slice(-16_384) : undefined,\n stderr: stderr.toString('utf8')\n }\n try {\n writeFileSync(join(root, 'probe-failure.json'), JSON.stringify(diagnostic), { mode: 0o600 })\n } catch {\n // Evidence collection must not replace the original failure or permit cleanup.\n }\n const reason = pids ? 'did not stop' : `ownership is unknown after ${phase} failed`\n // Release preparation runs this probe in a subprocess. Include its bounded\n // private diagnostic so an uncaught failure retains the evidence in stderr.\n throw Object.assign(\n new Error(`Local runtime probe ${reason}; preserve ${root} for diagnosis.`, {\n cause: failure\n }),\n { diagnostic }\n )\n }\n rmSync(root, { recursive: true, force: true })\n if (failure) throw failure\n return result!\n}\n"],"ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,WAAW;AACjB,MAAM,iBAAiBA,OAAS;CAC9B,MAAMC,QAAU,YAAY;CAC5B,SAAS;CACT,YAAYC,OAAS,CAAC,CAAC,SAAS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ChC;EACA,IAAI;GACF,cAAc,KAAK,MAAM,oBAAoB,GAAG,KAAK,UAAU,UAAU,GAAG,EAAE,MAAM,IAAM,CAAC;EAC7F,QAAQ,CAER;EACA,MAAM,SAAS,OAAO,iBAAiB,8BAA8B,MAAM;EAG3E,MAAM,OAAO,OACX,IAAI,MAAM,uBAAuB,OAAO,aAAa,KAAK,kBAAkB,EAC1E,OAAO,QACT,CAAC,GACD,EAAE,WAAW,CACf;CACF;CACA,OAAO,MAAM;EAAE,WAAW;EAAM,OAAO;CAAK,CAAC;CAC7C,IAAI,SAAS,MAAM;CACnB,OAAO;AACT"}
|
|
@@ -5,7 +5,7 @@ globalThis.__bundlerPathsOverrides = {
|
|
|
5
5
|
'pino/file': runtimeFilePath(new URL('./pino-file.mjs', import.meta.url))
|
|
6
6
|
};
|
|
7
7
|
import { win32 } from "node:path";
|
|
8
|
-
|
|
8
|
+
// src/process-environment.ts
|
|
9
9
|
const PLATFORM_KEYS = [
|
|
10
10
|
"PATH",
|
|
11
11
|
"Path",
|
|
@@ -103,7 +103,6 @@ function hostEnvironment(context, env = process.env) {
|
|
|
103
103
|
CODEX_SQLITE_HOME: context.codexSqliteHome
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
//#endregion
|
|
107
106
|
export { hubEnvironment as n, hostEnvironment as t };
|
|
108
107
|
|
|
109
|
-
//# sourceMappingURL=process-environment-
|
|
108
|
+
//# sourceMappingURL=process-environment-DRRIdoL8.mjs.map
|