@jskit-ai/kernel 0.1.101 → 0.1.102

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/kernel",
3
- "version": "0.1.101",
3
+ "version": "0.1.102",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "json-rest-schema": "1.x.x"
@@ -2,6 +2,8 @@ import path from "node:path";
2
2
  import { sortStrings } from "../../../shared/support/sorting.js";
3
3
  import { loadInstalledPackageDescriptor } from "../../../internal/node/installedPackageDescriptor.js";
4
4
 
5
+ const EXCLUSIVE_CAPABILITIES = Object.freeze(["auth.provider"]);
6
+
5
7
  function normalizeUiRoutePath(pathValue) {
6
8
  const rawPath = String(pathValue || "").trim();
7
9
  if (!rawPath || !rawPath.startsWith("/") || rawPath.startsWith("//")) {
@@ -160,6 +162,15 @@ function validateDescriptorCapabilities(descriptorEntries, { builtinProvidersByC
160
162
  }
161
163
  }
162
164
  }
165
+
166
+ for (const capabilityId of EXCLUSIVE_CAPABILITIES) {
167
+ const providers = providersByCapability.get(capabilityId);
168
+ if (providers && providers.size > 1) {
169
+ throw new Error(
170
+ `Capability ${capabilityId} is exclusive, but multiple installed packages provide it: ${sortStrings([...providers]).join(", ")}.`
171
+ );
172
+ }
173
+ }
163
174
  }
164
175
 
165
176
  export {