@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.0.1-alpha.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 9066f95: CF deployer fixes
8
+
3
9
  ## 0.0.1-alpha.8
4
10
 
5
11
  ### Patch Changes
@@ -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
@@ -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;AAEtC,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;;;;;;GA4B/F"}
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 = require('child_process').spawnSync(cmd, args, {
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
- if (subprocess.stdout) {
934
- pinoStream.write(subprocess.stdout);
935
- }
936
- if (subprocess.stderr) {
937
- pinoStream.write(subprocess.stderr);
938
- }
939
- pinoStream.end();
940
- return _context2.abrupt("return", {
941
- stdout: subprocess.stdout,
942
- stderr: subprocess.stderr
943
- });
944
- case 9:
945
- _context2.prev = 9;
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, 9]]);
968
+ }, _callee2, null, [[1, 8]]);
957
969
  }));
958
970
  return function (_x2) {
959
971
  return _ref6.apply(this, arguments);