Skip to content

Commit

Permalink
chore: first pass at bundling core
Browse files Browse the repository at this point in the history
  • Loading branch information
gbockus-sf committed Dec 4, 2023
1 parent d20ec2a commit 2cce606
Show file tree
Hide file tree
Showing 14 changed files with 123,022 additions and 15 deletions.
6,871 changes: 6,871 additions & 0 deletions dist/exported.d.ts

Large diffs are not rendered by default.

94,770 changes: 94,770 additions & 0 deletions dist/exported.js

Large diffs are not rendered by default.

2,973 changes: 2,973 additions & 0 deletions dist/pino-file.js

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions dist/pino-pipeline-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
'use strict';
var c = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
var u = c((T, a) => {
var p = new Function('modulePath', 'return import(modulePath)');
function l(t) {
return typeof __non_webpack__require__ == 'function' ? __non_webpack__require__(t) : require(t);
}
a.exports = { realImport: p, realRequire: l };
});
var d = c((D, f) => {
'use strict';
var { realImport: _, realRequire: n } = u();
f.exports = m;
async function m(t) {
let e;
try {
let r = 'file://' + t;
r.endsWith('.ts') || r.endsWith('.cts')
? (process[Symbol.for('ts-node.register.instance')]
? n('ts-node/register')
: process.env && process.env.TS_NODE_DEV && n('ts-node-dev'),
(e = n(decodeURIComponent(t))))
: (e = await _(r));
} catch (r) {
if (r.code === 'ENOTDIR' || r.code === 'ERR_MODULE_NOT_FOUND') e = n(t);
else if (r.code === void 0) e = n(decodeURIComponent(t));
else throw r;
}
if ((typeof e == 'object' && (e = e.default), typeof e == 'object' && (e = e.default), typeof e != 'function'))
throw Error('exported worker is not a function');
return e;
}
});
var E = require('events'),
w = d(),
{ pipeline: R, PassThrough: y } = require('stream');
module.exports = async function ({ targets: t }) {
let e = await Promise.all(t.map(async (o) => await (await w(o.target))(o.options))),
r = new E(),
i = new y({
autoDestroy: !0,
destroy(o, s) {
r.on('error', s), r.on('closed', s);
},
});
return (
R(i, ...e, function (o) {
if (o && o.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
r.emit('error', o);
return;
}
r.emit('closed');
}),
i
);
};
Loading

0 comments on commit 2cce606

Please sign in to comment.