@oatscenter/trellis 0.100.0-rc.48 → 0.100.0-rc.49
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/auth/connection.js +25 -7
- package/auth/issuer_trust.js +11 -1
- package/caller.d.ts +15 -1
- package/internal_sdk/generated/_internal/evidence.js +4 -4
- package/internal_sdk/generated/apis/auth/mod.d.ts +1 -1
- package/internal_sdk/generated/apis/auth/mod.js +1 -1
- package/internal_sdk/generated/apis/events/mod.d.ts +1 -1
- package/internal_sdk/generated/apis/events/mod.js +1 -1
- package/internal_sdk/generated/apps/cli/mod.d.ts +1035 -0
- package/internal_sdk/generated/apps/console/mod.d.ts +1243 -0
- package/internal_sdk/generated/package.json +2 -2
- package/internal_sdk/generated/participants/eventsRuntime/mod.d.ts +118 -1
- package/internal_sdk/generated/participants/eventsRuntime/mod.js +2 -2
- package/internal_sdk/generated/participants/healthRuntime/mod.d.ts +75 -0
- package/internal_sdk/generated/participants/jobsRuntime/mod.d.ts +123 -0
- package/internal_sdk/generated/participants/platform/mod.d.ts +1130 -1
- package/internal_sdk/generated/participants/platform/mod.js +2 -2
- package/internal_sdk/generated/types/_internal/p0.d.ts +92 -3
- package/internal_sdk/generated/types/_internal/p0.js +24 -1
- package/internal_sdk/generated/types/index.d.ts +4 -0
- package/internal_sdk/generated/types/index.js +2 -0
- package/package.json +2 -2
- package/provider.d.ts +3 -3
- package/service/config.js +11 -4
- package/service/runtime/service.js +1 -0
- package/transport/generations.d.ts +6 -0
- package/transport/generations.js +6 -3
package/auth/connection.js
CHANGED
|
@@ -77,16 +77,34 @@ export async function connectProvisioned(options, kind, hooks = {}, transport) {
|
|
|
77
77
|
*
|
|
78
78
|
* nats.js fails a pending flush only when it redials in place. A generation
|
|
79
79
|
* never does, so without this a flush awaiting a lost connection's `PONG`
|
|
80
|
-
* would wait forever instead of failing with the loss.
|
|
80
|
+
* would wait forever instead of failing with the loss. One close watcher
|
|
81
|
+
* serves every flush, and each flush leaves the pending set when it settles,
|
|
82
|
+
* so a long-lived connection retains nothing per completed flush.
|
|
81
83
|
*/
|
|
82
84
|
function settleFlushOnClose(nc) {
|
|
83
85
|
const flush = nc.flush.bind(nc);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
const pending = new Set();
|
|
87
|
+
let closedWith;
|
|
88
|
+
void nc.closed().then((error) => {
|
|
89
|
+
closedWith = error ?? new ClosedConnectionError();
|
|
90
|
+
for (const reject of pending)
|
|
91
|
+
reject(closedWith);
|
|
92
|
+
pending.clear();
|
|
93
|
+
});
|
|
94
|
+
nc.flush = () => {
|
|
95
|
+
if (closedWith)
|
|
96
|
+
return Promise.reject(closedWith);
|
|
97
|
+
return new Promise((resolve, reject) => {
|
|
98
|
+
pending.add(reject);
|
|
99
|
+
flush().then(() => {
|
|
100
|
+
pending.delete(reject);
|
|
101
|
+
resolve();
|
|
102
|
+
}, (error) => {
|
|
103
|
+
pending.delete(reject);
|
|
104
|
+
reject(error);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
90
108
|
return nc;
|
|
91
109
|
}
|
|
92
110
|
/** One signed-admission connection path for OAuth and provisioned runtimes. */
|
package/auth/issuer_trust.js
CHANGED
|
@@ -64,7 +64,17 @@ export async function authenticateIssuerChain(issuer, anchor, target, signal, ex
|
|
|
64
64
|
/^[0-9]{1,20}$/.test(sequence) &&
|
|
65
65
|
BigInt(sequence) <= BigInt(owner.trustSnapshot.rotationSequence))
|
|
66
66
|
continue;
|
|
67
|
-
|
|
67
|
+
try {
|
|
68
|
+
await owner.acceptIssuerRotation(signedBytes(rotation));
|
|
69
|
+
}
|
|
70
|
+
catch (cause) {
|
|
71
|
+
// The connected session may install the same link while this one
|
|
72
|
+
// waits its turn; the final trust check below still decides.
|
|
73
|
+
if (typeof sequence !== "string" ||
|
|
74
|
+
!/^[0-9]{1,20}$/.test(sequence) ||
|
|
75
|
+
BigInt(sequence) > BigInt(owner.trustSnapshot.rotationSequence))
|
|
76
|
+
throw cause;
|
|
77
|
+
}
|
|
68
78
|
}
|
|
69
79
|
}
|
|
70
80
|
const verified = owner.trustForCredential(anchor);
|
package/caller.d.ts
CHANGED
|
@@ -124,10 +124,24 @@ type StoreFacadeFor<TContract extends GeneratedCaller> = {
|
|
|
124
124
|
export type CallerParticipant = GeneratedCaller;
|
|
125
125
|
/** One selected caller action with its generated surface name resolved. */
|
|
126
126
|
export type CallerSelectedAction<TContract extends GeneratedCaller> = SelectedAction<TContract>;
|
|
127
|
+
type MethodDocs<TContract> = TContract extends {
|
|
128
|
+
readonly __runtimeTypes?: {
|
|
129
|
+
readonly methods: infer TDocs;
|
|
130
|
+
};
|
|
131
|
+
} ? TDocs : Record<never, never>;
|
|
132
|
+
/**
|
|
133
|
+
* `TSurface` with the generated documentation of each of its methods.
|
|
134
|
+
*
|
|
135
|
+
* Facade method names come from key remapping, which drops JSDoc. Generated
|
|
136
|
+
* descriptors carry the docs under the final names with `unknown` members, so
|
|
137
|
+
* intersecting them leaves every signature as it is and gives editor hover the
|
|
138
|
+
* authored text.
|
|
139
|
+
*/
|
|
140
|
+
export type DocumentedMethods<TSurface, TContract> = TSurface & Pick<MethodDocs<TContract>, Extract<keyof TSurface, keyof MethodDocs<TContract>>>;
|
|
127
141
|
/**
|
|
128
142
|
* Selected caller action methods, including selected event subscriptions.
|
|
129
143
|
*/
|
|
130
|
-
export type CallerSelectedActionSurface<TContract extends GeneratedCaller> = UnionToIntersection<ActionRecord<CallerSelectedAction<TContract
|
|
144
|
+
export type CallerSelectedActionSurface<TContract extends GeneratedCaller> = DocumentedMethods<UnionToIntersection<ActionRecord<CallerSelectedAction<TContract>>>, TContract>;
|
|
131
145
|
/**
|
|
132
146
|
* Selected caller invocation and publish methods, excluding event
|
|
133
147
|
* subscriptions.
|