@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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/mixins/OxyServices.auth.js +9 -6
- package/dist/cjs/package.json +9 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/mixins/OxyServices.auth.js +9 -6
- package/dist/esm/package.json +9 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/mixins/OxyServices.auth.d.ts +7 -4
- package/package.json +2 -12
- package/src/mixins/OxyServices.auth.ts +9 -6
|
@@ -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
|
-
*
|
|
263
|
-
* and browser bundlers, and the signer only for
|
|
264
|
-
* Node guard avoids calling attestation on clients;
|
|
265
|
-
* keeps node:crypto out of their bundle graphs (a guard
|
|
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('
|
|
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('
|
|
304
|
+
const { requestWorkloadServiceToken } = await import('#workload-identity');
|
|
302
305
|
const seeded = entry ?? {
|
|
303
306
|
token: '',
|
|
304
307
|
expiresAt: 0,
|
package/dist/esm/package.json
CHANGED
|
@@ -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
|
}
|