@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
|
@@ -391,10 +391,13 @@ export declare function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(B
|
|
|
391
391
|
/**
|
|
392
392
|
* Whether this process can prove what it is (ADR 0026).
|
|
393
393
|
*
|
|
394
|
-
*
|
|
395
|
-
* and browser bundlers, and the signer only for
|
|
396
|
-
* Node guard avoids calling attestation on clients;
|
|
397
|
-
* keeps node:crypto out of their bundle graphs (a guard
|
|
394
|
+
* `#workload-identity` (package.json `imports`) selects a client
|
|
395
|
+
* implementation for native and browser bundlers, and the signer only for
|
|
396
|
+
* Node hosts. The runtime Node guard avoids calling attestation on clients;
|
|
397
|
+
* the module boundary keeps node:crypto out of their bundle graphs (a guard
|
|
398
|
+
* alone cannot). It is a package import, not a self-reference to an export
|
|
399
|
+
* subpath: a self-reference only resolves where `@oxy.so/core` is reachable
|
|
400
|
+
* through `node_modules`, which bundlers inside this workspace are not.
|
|
398
401
|
*
|
|
399
402
|
* @internal
|
|
400
403
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/core",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -59,17 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"default": "./dist/esm/logger/index.js"
|
|
61
61
|
},
|
|
62
|
-
"./package.json": "./package.json"
|
|
63
|
-
"./internal/workload-identity": {
|
|
64
|
-
"types": "./dist/types/server/workloadIdentity.d.ts",
|
|
65
|
-
"react-native": "./dist/esm/server/workloadIdentity.client.js",
|
|
66
|
-
"browser": "./dist/esm/server/workloadIdentity.client.js",
|
|
67
|
-
"node": {
|
|
68
|
-
"import": "./dist/esm/server/workloadIdentity.js",
|
|
69
|
-
"require": "./dist/cjs/server/workloadIdentity.js"
|
|
70
|
-
},
|
|
71
|
-
"default": "./dist/esm/server/workloadIdentity.client.js"
|
|
72
|
-
}
|
|
62
|
+
"./package.json": "./package.json"
|
|
73
63
|
},
|
|
74
64
|
"files": [
|
|
75
65
|
"NOTICE",
|
|
@@ -647,17 +647,20 @@ export function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(Base: T)
|
|
|
647
647
|
/**
|
|
648
648
|
* Whether this process can prove what it is (ADR 0026).
|
|
649
649
|
*
|
|
650
|
-
*
|
|
651
|
-
* and browser bundlers, and the signer only for
|
|
652
|
-
* Node guard avoids calling attestation on clients;
|
|
653
|
-
* keeps node:crypto out of their bundle graphs (a guard
|
|
650
|
+
* `#workload-identity` (package.json `imports`) selects a client
|
|
651
|
+
* implementation for native and browser bundlers, and the signer only for
|
|
652
|
+
* Node hosts. The runtime Node guard avoids calling attestation on clients;
|
|
653
|
+
* the module boundary keeps node:crypto out of their bundle graphs (a guard
|
|
654
|
+
* alone cannot). It is a package import, not a self-reference to an export
|
|
655
|
+
* subpath: a self-reference only resolves where `@oxy.so/core` is reachable
|
|
656
|
+
* through `node_modules`, which bundlers inside this workspace are not.
|
|
654
657
|
*
|
|
655
658
|
* @internal
|
|
656
659
|
*/
|
|
657
660
|
async _canUseWorkloadIdentity(): Promise<boolean> {
|
|
658
661
|
if (typeof process === 'undefined' || !process.versions?.node) return false;
|
|
659
662
|
try {
|
|
660
|
-
const { canAttestWorkloadIdentity } = await import('
|
|
663
|
+
const { canAttestWorkloadIdentity } = await import('#workload-identity');
|
|
661
664
|
return canAttestWorkloadIdentity();
|
|
662
665
|
} catch {
|
|
663
666
|
// A bundler that dropped the server subpath, or a runtime without it.
|
|
@@ -684,7 +687,7 @@ export function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(Base: T)
|
|
|
684
687
|
if (entry?.token && entry.expiresAt > now + 60_000) return entry.token;
|
|
685
688
|
if (entry?.pending) return entry.pending;
|
|
686
689
|
|
|
687
|
-
const { requestWorkloadServiceToken } = await import('
|
|
690
|
+
const { requestWorkloadServiceToken } = await import('#workload-identity');
|
|
688
691
|
const seeded = entry ?? {
|
|
689
692
|
token: '',
|
|
690
693
|
expiresAt: 0,
|