@highstate/backend 0.11.7 → 0.12.1

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "sourceHashes": {
3
- "./dist/index.js": 1885488256,
3
+ "./dist/index.js": 3589581688,
4
4
  "./dist/shared/index.js": 1412796191,
5
- "./dist/library/worker/main.js": 875302514,
5
+ "./dist/library/worker/main.js": 278073568,
6
6
  "./dist/library/package-resolution-worker.js": 4258495649,
7
7
  "./dist/database/local/prisma.config.js": 4014074705
8
8
  }
package/dist/index.js CHANGED
@@ -5276,9 +5276,7 @@ var LocalLibraryBackend = class _LocalLibraryBackend {
5276
5276
  }
5277
5277
  }
5278
5278
  async resolveLibraryPackageForPath(path5) {
5279
- const existingPackage = Array.from(this.packages.values()).find(
5280
- (pkg) => path5.startsWith(pkg.rootPath)
5281
- );
5279
+ const existingPackage = Array.from(this.packages.values()).filter((pkg) => path5 === pkg.rootPath || path5.startsWith(`${pkg.rootPath}/`)).toSorted((a, b) => b.rootPath.length - a.rootPath.length).at(0);
5282
5280
  if (existingPackage) {
5283
5281
  return existingPackage;
5284
5282
  }
@@ -8775,7 +8773,8 @@ ${errors.join("\n")}`
8775
8773
  inputs: mapValues(resolvedInputs ?? {}, (input) => input.map((value) => value.input)),
8776
8774
  invokedTriggers,
8777
8775
  secretNames: Object.keys(secrets),
8778
- stateIdMap: this.context.getInstanceIdToStateIdMap(instance.id)
8776
+ stateIdMap: this.context.getInstanceIdToStateIdMap(instance.id),
8777
+ importBasePath: this.libraryBackend.importPath
8779
8778
  };
8780
8779
  }
8781
8780
  async handleUnitStateUpdate(update, state) {