// ============================================================================= // THIS FILE IS GENERATED - DO NOT EDIT // // Detects duplicate loads of @grest-ts/locator. Two copies of a grest-ts // framework package in the same process break async context, validation // registries, and service discovery. Throw with both paths so the packaging // mistake is immediately diagnosable. // // Generated by scripts/packager — re-run `npm run generate` to refresh. // ============================================================================= const __KEY = Symbol.for("grest-ts:dedup:@grest-ts/locator"); const __slot = globalThis as Record; const __existing = __slot[__KEY] as { path: string; version: string } | undefined; const __here = { path: import.meta.url, version: "0.0.70" }; // Same path + same version means the same physical package is being // re-evaluated by a different ESM runner (e.g. vitest projects share one // process but each project has its own module cache). That isn't a true // duplicate package — only differing paths or versions are. if (__existing && (__existing.path !== __here.path || __existing.version !== __here.version)) { throw new Error( "[@grest-ts/locator] Duplicate package load detected.\n" + " Already loaded: " + __existing.path + " (v" + __existing.version + ")\n" + " Now loading: " + __here.path + " (v" + __here.version + ")\n" + "Two copies of grest-ts framework packages in one process break\n" + "async context, validation, and service discovery. Fix the packaging." ); } __slot[__KEY] = __here;