@oxy.so/core 1.7.1 → 1.7.3

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.
@@ -299,10 +299,10 @@ function OxyServicesAuthMixin(Base) {
299
299
  /**
300
300
  * Whether this process can prove what it is (ADR 0026).
301
301
  *
302
- * The check and the module that performs it are loaded LAZILY and only on a
303
- * Node host. `@oxy.so/core`'s root barrel reaches React Native and Expo, and
304
- * `server/workloadIdentity` imports `node:crypto` — a static import here
305
- * would pull it into every mobile bundle for a path a phone can never take.
302
+ * The internal package subpath selects a client implementation for native
303
+ * and browser bundlers, and the signer only for Node hosts. The runtime
304
+ * Node guard avoids calling attestation on clients; the module boundary
305
+ * keeps node:crypto out of their bundle graphs (a guard alone cannot).
306
306
  *
307
307
  * @internal
308
308
  */
@@ -310,7 +310,7 @@ function OxyServicesAuthMixin(Base) {
310
310
  if (typeof process === 'undefined' || !process.versions?.node)
311
311
  return false;
312
312
  try {
313
- const { canAttestWorkloadIdentity } = await Promise.resolve().then(() => __importStar(require('../server/workloadIdentity')));
313
+ const { canAttestWorkloadIdentity } = await Promise.resolve().then(() => __importStar(require('@oxy.so/core/internal/workload-identity')));
314
314
  return canAttestWorkloadIdentity();
315
315
  }
316
316
  catch {
@@ -338,7 +338,7 @@ function OxyServicesAuthMixin(Base) {
338
338
  return entry.token;
339
339
  if (entry?.pending)
340
340
  return entry.pending;
341
- const { requestWorkloadServiceToken } = await Promise.resolve().then(() => __importStar(require('../server/workloadIdentity')));
341
+ const { requestWorkloadServiceToken } = await Promise.resolve().then(() => __importStar(require('@oxy.so/core/internal/workload-identity')));
342
342
  const seeded = entry ?? {
343
343
  token: '',
344
344
  expiresAt: 0,
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.canAttestWorkloadIdentity = canAttestWorkloadIdentity;
4
+ exports.requestWorkloadServiceToken = requestWorkloadServiceToken;
5
+ /** Workload attestation belongs to a Node host, never a browser or device. */
6
+ function canAttestWorkloadIdentity() {
7
+ return false;
8
+ }
9
+ async function requestWorkloadServiceToken(_options) {
10
+ throw new Error('Workload identity is only available on a Node host');
11
+ }