@mastra/deployer 0.0.1-alpha.8 → 0.0.1-alpha.9
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/CHANGELOG.md +6 -0
- package/dist/deploy/log.d.ts +1 -7
- package/dist/deploy/log.d.ts.map +1 -1
- package/dist/deployer.cjs.development.js +33 -21
- package/dist/deployer.cjs.development.js.map +1 -1
- package/dist/deployer.cjs.production.min.js +1 -1
- package/dist/deployer.cjs.production.min.js.map +1 -1
- package/dist/deployer.esm.js +34 -22
- package/dist/deployer.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/deploy/log.ts +22 -13
package/CHANGELOG.md
CHANGED
package/dist/deploy/log.d.ts
CHANGED
|
@@ -20,11 +20,5 @@ export declare function createChildProcessLogger({ logger, root }: {
|
|
|
20
20
|
cmd: string;
|
|
21
21
|
args: string[];
|
|
22
22
|
env: Record<string, string>;
|
|
23
|
-
}) => Promise<
|
|
24
|
-
stdout: any;
|
|
25
|
-
stderr: any;
|
|
26
|
-
} | {
|
|
27
|
-
stdout?: undefined;
|
|
28
|
-
stderr?: undefined;
|
|
29
|
-
}>;
|
|
23
|
+
}) => Promise<unknown>;
|
|
30
24
|
//# sourceMappingURL=log.d.ts.map
|
package/dist/deploy/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/deploy/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/deploy/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,gBAAgB,WAAY,MAAM,cAgB9C,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,wBAEhD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE;;;;IAa/F;AAED,wBAAgB,wBAAwB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,wBAEvD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,sBAoC/F"}
|
|
@@ -916,44 +916,56 @@ function createChildProcessLogger(_ref4) {
|
|
|
916
916
|
var pinoStream = createPinoStream(logger);
|
|
917
917
|
return /*#__PURE__*/function () {
|
|
918
918
|
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
|
|
919
|
-
var cmd, args, env, subprocess;
|
|
919
|
+
var cmd, args, env, _subprocess$stdout2, _subprocess$stderr2, subprocess;
|
|
920
920
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
921
921
|
while (1) switch (_context2.prev = _context2.next) {
|
|
922
922
|
case 0:
|
|
923
923
|
cmd = _ref5.cmd, args = _ref5.args, env = _ref5.env;
|
|
924
924
|
_context2.prev = 1;
|
|
925
|
-
subprocess =
|
|
925
|
+
subprocess = child_process.spawn(cmd, args, {
|
|
926
926
|
cwd: root,
|
|
927
|
-
encoding: 'utf8',
|
|
928
927
|
shell: true,
|
|
929
|
-
env: env
|
|
930
|
-
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
|
|
928
|
+
env: env
|
|
931
929
|
}); // Pipe stdout and stderr through the Pino stream
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
930
|
+
(_subprocess$stdout2 = subprocess.stdout) == null || _subprocess$stdout2.pipe(pinoStream);
|
|
931
|
+
(_subprocess$stderr2 = subprocess.stderr) == null || _subprocess$stderr2.pipe(pinoStream);
|
|
932
|
+
// Wait for the process to complete
|
|
933
|
+
return _context2.abrupt("return", new Promise(function (resolve, reject) {
|
|
934
|
+
subprocess.on('close', function (code) {
|
|
935
|
+
pinoStream.end();
|
|
936
|
+
if (code === 0) {
|
|
937
|
+
resolve({
|
|
938
|
+
success: true
|
|
939
|
+
});
|
|
940
|
+
} else {
|
|
941
|
+
reject(new Error("Process exited with code " + code));
|
|
942
|
+
}
|
|
943
|
+
});
|
|
944
|
+
subprocess.on('error', function (error) {
|
|
945
|
+
pinoStream.end();
|
|
946
|
+
logger.error('Process failed', {
|
|
947
|
+
error: error
|
|
948
|
+
});
|
|
949
|
+
reject(error);
|
|
950
|
+
});
|
|
951
|
+
}));
|
|
952
|
+
case 8:
|
|
953
|
+
_context2.prev = 8;
|
|
946
954
|
_context2.t0 = _context2["catch"](1);
|
|
955
|
+
console.log(_context2.t0);
|
|
947
956
|
logger.error('Process failed', {
|
|
948
957
|
error: _context2.t0
|
|
949
958
|
});
|
|
950
959
|
pinoStream.end();
|
|
951
|
-
return _context2.abrupt("return", {
|
|
960
|
+
return _context2.abrupt("return", {
|
|
961
|
+
success: false,
|
|
962
|
+
error: _context2.t0
|
|
963
|
+
});
|
|
952
964
|
case 14:
|
|
953
965
|
case "end":
|
|
954
966
|
return _context2.stop();
|
|
955
967
|
}
|
|
956
|
-
}, _callee2, null, [[1,
|
|
968
|
+
}, _callee2, null, [[1, 8]]);
|
|
957
969
|
}));
|
|
958
970
|
return function (_x2) {
|
|
959
971
|
return _ref6.apply(this, arguments);
|