agl 22.0.2 → 22.0.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.
- package/changelog.md +8 -0
- package/dist_serve/bundle.js +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.opencodeclient.js +10 -2
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.opencodeclient.ts +8 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -117,12 +117,19 @@ interface IUnknownBudget {
|
|
|
117
117
|
const isRecord = (value: unknown): value is Record<string, unknown> =>
|
|
118
118
|
typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
119
119
|
|
|
120
|
-
const
|
|
120
|
+
const isOpenCodeNotFoundBody = (valueArg: unknown): boolean =>
|
|
121
121
|
isRecord(valueArg)
|
|
122
122
|
&& valueArg.name === 'NotFoundError'
|
|
123
123
|
&& isRecord(valueArg.data)
|
|
124
124
|
&& typeof valueArg.data.message === 'string';
|
|
125
125
|
|
|
126
|
+
const isOpenCodeNotFoundError = (valueArg: unknown): boolean => {
|
|
127
|
+
if (isOpenCodeNotFoundBody(valueArg)) return true;
|
|
128
|
+
if (!isRecord(valueArg) || !isRecord(valueArg.cause)) return false;
|
|
129
|
+
return valueArg.cause.status === 404
|
|
130
|
+
&& isOpenCodeNotFoundBody(valueArg.cause.body);
|
|
131
|
+
};
|
|
132
|
+
|
|
126
133
|
const hasExactKeys = (
|
|
127
134
|
valueArg: Record<string, unknown>,
|
|
128
135
|
requiredArg: readonly string[],
|