@inforge/migrations-tools-cli 1.2.3 → 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 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -558,11 +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
- if (deployErr && !deployErr.includes("Deploy Succeeded")) {
564
- throw new Error(`Deployment failed: ${deployErr}`);
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
+ }
565
584
  }
585
+ await this.logger.debug("Deploy result", { stdout: deployOut, stderr: deployErr });
566
586
  await this.logger.info("Successfully updated trigger status via SF CLI deployment", {
567
587
  triggerCount: triggerNames.length,
568
588
  status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inforge/migrations-tools-cli",
3
- "version": "1.2.3",
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",