@highstate/backend 0.9.24 → 0.9.26

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/dist/index.js CHANGED
@@ -5991,7 +5991,7 @@ var OperationContext = class _OperationContext {
5991
5991
  const dependencies = this.getDependencies(instanceId).map((i) => i.id);
5992
5992
  for (const dep of dependencies) {
5993
5993
  const state = this.getState(dep);
5994
- map2[instanceId] = state.id;
5994
+ map2[dep] = state.id;
5995
5995
  }
5996
5996
  return map2;
5997
5997
  }
@@ -7189,9 +7189,9 @@ ${errors.join("\n")}`
7189
7189
  logger.error({ error }, "failed to handle unit state update");
7190
7190
  }
7191
7191
  if (update.type === "error") {
7192
- throw new Error(`An error occurred while processing the unit "${update.unitId}"`, {
7193
- cause: update.message
7194
- });
7192
+ throw new Error(
7193
+ `An error occurred while processing the unit "${update.unitId}": ${update.message}`
7194
+ );
7195
7195
  }
7196
7196
  if (update.type === "completion") {
7197
7197
  return;
@@ -7229,20 +7229,7 @@ ${errors.join("\n")}`
7229
7229
  }
7230
7230
  }
7231
7231
  handleUnitMessage(update, state) {
7232
- for (; ; ) {
7233
- this.promiseTracker.track(
7234
- this.operationService.appendLog(
7235
- this.project.id,
7236
- this.operation.id,
7237
- state.id,
7238
- update.message
7239
- )
7240
- );
7241
- if (!state.parentInstanceId) {
7242
- break;
7243
- }
7244
- state = this.context.getState(state.parentInstanceId);
7245
- }
7232
+ this.operationService.appendLog(this.project.id, this.operation.id, state.id, update.message);
7246
7233
  }
7247
7234
  async handleUnitProgress(update) {
7248
7235
  await this.workset.updateState(update.unitId, {