@oxy.so/core 1.7.3 → 1.7.4

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.
@@ -259,10 +259,13 @@ export function OxyServicesAuthMixin(Base) {
259
259
  /**
260
260
  * Whether this process can prove what it is (ADR 0026).
261
261
  *
262
- * The internal package subpath selects a client implementation for native
263
- * and browser bundlers, and the signer only for Node hosts. The runtime
264
- * Node guard avoids calling attestation on clients; the module boundary
265
- * keeps node:crypto out of their bundle graphs (a guard alone cannot).
262
+ * `#workload-identity` (package.json `imports`) selects a client
263
+ * implementation for native and browser bundlers, and the signer only for
264
+ * Node hosts. The runtime Node guard avoids calling attestation on clients;
265
+ * the module boundary keeps node:crypto out of their bundle graphs (a guard
266
+ * alone cannot). It is a package import, not a self-reference to an export
267
+ * subpath: a self-reference only resolves where `@oxy.so/core` is reachable
268
+ * through `node_modules`, which bundlers inside this workspace are not.
266
269
  *
267
270
  * @internal
268
271
  */
@@ -270,7 +273,7 @@ export function OxyServicesAuthMixin(Base) {
270
273
  if (typeof process === 'undefined' || !process.versions?.node)
271
274
  return false;
272
275
  try {
273
- const { canAttestWorkloadIdentity } = await import('@oxy.so/core/internal/workload-identity');
276
+ const { canAttestWorkloadIdentity } = await import('#workload-identity');
274
277
  return canAttestWorkloadIdentity();
275
278
  }
276
279
  catch {
@@ -298,7 +301,7 @@ export function OxyServicesAuthMixin(Base) {
298
301
  return entry.token;
299
302
  if (entry?.pending)
300
303
  return entry.pending;
301
- const { requestWorkloadServiceToken } = await import('@oxy.so/core/internal/workload-identity');
304
+ const { requestWorkloadServiceToken } = await import('#workload-identity');
302
305
  const seeded = entry ?? {
303
306
  token: '',
304
307
  expiresAt: 0,
@@ -1,3 +1,11 @@
1
1
  {
2
- "type": "module"
2
+ "type": "module",
3
+ "imports": {
4
+ "#workload-identity": {
5
+ "react-native": "./server/workloadIdentity.client.js",
6
+ "browser": "./server/workloadIdentity.client.js",
7
+ "node": "./server/workloadIdentity.js",
8
+ "default": "./server/workloadIdentity.client.js"
9
+ }
10
+ }
3
11
  }