@inforge/migrations-tools-cli 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -558,16 +558,31 @@ var TriggersHandler = class {
558
558
  }
559
559
  const deployCmd = `sf project deploy start --source-dir force-app --target-org ${connection.getUsername()}`;
560
560
  await this.logger.debug("Executing deploy command", { command: deployCmd, cwd: tempDir });
561
- const { stdout: deployOut, stderr: deployErr } = await execAsync(deployCmd, { cwd: tempDir });
562
- await this.logger.debug("Deploy result", { stdout: deployOut, stderr: deployErr });
563
- const isLocaleError = deployErr && deployErr.includes("Missing message metadata.transfer:Finalizing");
564
- const deploySucceeded = deployOut && (deployOut.includes("Deploy Succeeded") || deployOut.includes("Status: Succeeded") || deployOut.includes("Deployment completed successfully"));
565
- if (deployErr && !isLocaleError && !deploySucceeded) {
566
- throw new Error(`Deployment failed: ${deployErr}`);
567
- }
568
- if (isLocaleError) {
569
- await this.logger.debug("Ignoring SF CLI locale message error - deployment appears successful");
561
+ let deployOut = "";
562
+ let deployErr = "";
563
+ try {
564
+ const result = await execAsync(deployCmd, { cwd: tempDir });
565
+ deployOut = result.stdout;
566
+ deployErr = result.stderr;
567
+ } catch (error) {
568
+ deployOut = error.stdout || "";
569
+ deployErr = error.stderr || "";
570
+ await this.logger.debug("Deploy command threw error", {
571
+ stdout: deployOut,
572
+ stderr: deployErr,
573
+ code: error.code
574
+ });
575
+ const isLocaleError = deployErr && deployErr.includes("Missing message metadata.transfer:Finalizing");
576
+ const deploySucceeded = deployOut && (deployOut.includes("Deploy Succeeded") || deployOut.includes("Status: Succeeded") || deployOut.includes("Deployment completed successfully"));
577
+ if (isLocaleError && deploySucceeded) {
578
+ await this.logger.debug("Ignoring SF CLI locale message error - deployment appears successful");
579
+ } else if (isLocaleError) {
580
+ await this.logger.debug("Locale error detected but no success message in stdout - checking org");
581
+ } else {
582
+ throw error;
583
+ }
570
584
  }
585
+ await this.logger.debug("Deploy result", { stdout: deployOut, stderr: deployErr });
571
586
  await this.logger.info("Successfully updated trigger status via SF CLI deployment", {
572
587
  triggerCount: triggerNames.length,
573
588
  status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inforge/migrations-tools-cli",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Inforge's interactive CLI for side-effect-free Salesforce data operations by managing automation",
5
5
  "main": "index.js",
6
6
  "type": "module",