@cortexkit/opencode-antigravity-auth 3.0.4 → 3.0.5
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/server.js +55 -2
- package/dist/server.js.map +2 -2
- package/dist/server.meta.json +1 -1
- package/dist/src/ga/rpc/protocol.d.ts +2 -3
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/src/ga/rpc/protocol.js +60 -0
- package/dist/src/ga/rpc/protocol.js.map +1 -1
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +15 -2
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/types/src/ga/rpc/protocol.d.ts +2 -3
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -44183,8 +44183,51 @@ function validateApplyInput(value, issues) {
|
|
|
44183
44183
|
checkMenuRequest(value.request, ["request"], issues);
|
|
44184
44184
|
}
|
|
44185
44185
|
}
|
|
44186
|
+
function checkJsonValue(value, path5, issues, ancestors = /* @__PURE__ */ new Set()) {
|
|
44187
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") {
|
|
44188
|
+
return true;
|
|
44189
|
+
}
|
|
44190
|
+
if (typeof value === "number" && Number.isFinite(value)) return true;
|
|
44191
|
+
if (typeof value !== "object" || value === null) {
|
|
44192
|
+
issues.add(path5, "expected a plain JSON value");
|
|
44193
|
+
return false;
|
|
44194
|
+
}
|
|
44195
|
+
const array = Array.isArray(value);
|
|
44196
|
+
if (array && Object.getPrototypeOf(value) !== Array.prototype || !array && !isPlainRecord2(value) || ancestors.has(value)) {
|
|
44197
|
+
issues.add(path5, "expected a plain JSON value without cycles");
|
|
44198
|
+
return false;
|
|
44199
|
+
}
|
|
44200
|
+
ancestors.add(value);
|
|
44201
|
+
const before = issues.list.length;
|
|
44202
|
+
if (array) {
|
|
44203
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
44204
|
+
if (!Object.hasOwn(value, index)) {
|
|
44205
|
+
issues.add([...path5, index], "expected a JSON array element");
|
|
44206
|
+
}
|
|
44207
|
+
}
|
|
44208
|
+
}
|
|
44209
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
44210
|
+
if (array && key === "length") continue;
|
|
44211
|
+
if (typeof key !== "string") {
|
|
44212
|
+
issues.add(path5, "expected a JSON string key");
|
|
44213
|
+
continue;
|
|
44214
|
+
}
|
|
44215
|
+
const index = Number(key);
|
|
44216
|
+
const arrayIndex = array && Number.isSafeInteger(index) && index >= 0 && index < value.length && String(index) === key;
|
|
44217
|
+
const fieldPath = [...path5, arrayIndex ? index : key];
|
|
44218
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
44219
|
+
if (!descriptor || !("value" in descriptor) || !descriptor.enumerable || array && !arrayIndex) {
|
|
44220
|
+
issues.add(fieldPath, "expected a JSON data property");
|
|
44221
|
+
continue;
|
|
44222
|
+
}
|
|
44223
|
+
checkJsonValue(descriptor.value, fieldPath, issues, ancestors);
|
|
44224
|
+
}
|
|
44225
|
+
ancestors.delete(value);
|
|
44226
|
+
return issues.list.length === before;
|
|
44227
|
+
}
|
|
44186
44228
|
function validateStateOutput(value, issues) {
|
|
44187
44229
|
const path5 = [];
|
|
44230
|
+
if (!checkJsonValue(value, path5, issues)) return;
|
|
44188
44231
|
if (!isPlainRecord2(value)) {
|
|
44189
44232
|
issues.add(path5, "expected a plain object");
|
|
44190
44233
|
return;
|
|
@@ -44355,6 +44398,7 @@ function checkSettings(value, path5, issues) {
|
|
|
44355
44398
|
}
|
|
44356
44399
|
function validateApplyOutput(value, issues) {
|
|
44357
44400
|
const path5 = [];
|
|
44401
|
+
if (!checkJsonValue(value, path5, issues)) return;
|
|
44358
44402
|
if (!isPlainRecord2(value)) {
|
|
44359
44403
|
issues.add(path5, "expected a plain object");
|
|
44360
44404
|
return;
|
|
@@ -44955,6 +44999,15 @@ function routeDto(entry) {
|
|
|
44955
44999
|
updatedAt: entry.updatedAt
|
|
44956
45000
|
};
|
|
44957
45001
|
}
|
|
45002
|
+
function omitUndefinedFields(value) {
|
|
45003
|
+
if (Array.isArray(value)) return value.map(omitUndefinedFields);
|
|
45004
|
+
if (value === null || typeof value !== "object") return value;
|
|
45005
|
+
const prototype = Object.getPrototypeOf(value);
|
|
45006
|
+
if (prototype !== Object.prototype && prototype !== null) return value;
|
|
45007
|
+
return Object.fromEntries(
|
|
45008
|
+
Object.entries(value).filter(([, field]) => field !== void 0).map(([key, field]) => [key, omitUndefinedFields(field)])
|
|
45009
|
+
);
|
|
45010
|
+
}
|
|
44958
45011
|
function createGaRpcActivation(options) {
|
|
44959
45012
|
const generation = options.generation ?? createGaGeneration();
|
|
44960
45013
|
const now = options.now ?? Date.now;
|
|
@@ -45044,13 +45097,13 @@ function createGaRpcActivation(options) {
|
|
|
45044
45097
|
};
|
|
45045
45098
|
const gemini = entry(quota.gemini);
|
|
45046
45099
|
const nonGemini = entry(quota["non-gemini"]);
|
|
45047
|
-
return {
|
|
45100
|
+
return omitUndefinedFields({
|
|
45048
45101
|
...rest,
|
|
45049
45102
|
quota: {
|
|
45050
45103
|
...gemini ? { gemini } : {},
|
|
45051
45104
|
...nonGemini ? { "non-gemini": nonGemini } : {}
|
|
45052
45105
|
}
|
|
45053
|
-
};
|
|
45106
|
+
});
|
|
45054
45107
|
};
|
|
45055
45108
|
const state = async (input2, signal) => {
|
|
45056
45109
|
const parsed = AntigravityStateInputSchema.parse(input2);
|