@kvbox/server 0.6.3 → 0.6.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/kvbox-server.js +40 -1
- package/dist/kvbox-server.js.map +1 -1
- package/package.json +1 -1
package/dist/kvbox-server.js
CHANGED
|
@@ -1886,6 +1886,45 @@ var LoginResponseSchema = z4.object({
|
|
|
1886
1886
|
/** Whose boxes the certificate opens: `<slug>@<realm>` for the user and each org they are in (orgs phase 4). */
|
|
1887
1887
|
sshCertPrincipals: z4.array(z4.string()).optional()
|
|
1888
1888
|
});
|
|
1889
|
+
var DeviceLoginRequestSchema = z4.object({
|
|
1890
|
+
// Capped: anyone may open a login, and the key is stored until it expires (an RSA-16384 key is ~2.8 KB).
|
|
1891
|
+
publicKey: z4.string().max(16384).optional(),
|
|
1892
|
+
hostname: z4.string().max(255).optional()
|
|
1893
|
+
});
|
|
1894
|
+
var DeviceLoginStartSchema = z4.object({
|
|
1895
|
+
deviceCode: z4.string(),
|
|
1896
|
+
userCode: z4.string(),
|
|
1897
|
+
verifyUrl: z4.string(),
|
|
1898
|
+
expiresIn: z4.number(),
|
|
1899
|
+
interval: z4.number()
|
|
1900
|
+
});
|
|
1901
|
+
var DeviceLoginPollRequestSchema = z4.object({ deviceCode: z4.string().min(1) });
|
|
1902
|
+
var DeviceLoginPollSchema = z4.union([
|
|
1903
|
+
z4.object({ status: z4.enum(["pending", "slow_down", "refused", "expired"]) }),
|
|
1904
|
+
LoginResponseSchema.extend({ status: z4.literal("approved") })
|
|
1905
|
+
]);
|
|
1906
|
+
var DeviceLoginInfoSchema = z4.object({
|
|
1907
|
+
userCode: z4.string(),
|
|
1908
|
+
hostname: z4.string(),
|
|
1909
|
+
/** The address the request came from; null when the control plane could not tell. */
|
|
1910
|
+
ip: z4.string().nullable(),
|
|
1911
|
+
createdAt: z4.string(),
|
|
1912
|
+
expiresAt: z4.string()
|
|
1913
|
+
});
|
|
1914
|
+
var API_KEY_NAME_RE = /^[a-z0-9][a-z0-9._-]{0,31}$/;
|
|
1915
|
+
var ApiKeySchema = z4.object({
|
|
1916
|
+
name: z4.string(),
|
|
1917
|
+
createdAt: z4.string(),
|
|
1918
|
+
/** Last request made with it (ISO); null: never used. */
|
|
1919
|
+
lastUsedAt: z4.string().nullable(),
|
|
1920
|
+
/** When it stops working (ISO); null: never. */
|
|
1921
|
+
expiresAt: z4.string().nullable()
|
|
1922
|
+
});
|
|
1923
|
+
var CreateApiKeyRequestSchema = z4.object({
|
|
1924
|
+
name: z4.string().regex(API_KEY_NAME_RE, "a key's name is lowercase letters, digits, '.', '_' or '-' (up to 32 characters)"),
|
|
1925
|
+
expiresAt: z4.iso.datetime({ offset: true }).nullable().optional()
|
|
1926
|
+
});
|
|
1927
|
+
var CreatedApiKeySchema = ApiKeySchema.extend({ key: z4.string() });
|
|
1889
1928
|
var SshCertRequestSchema = z4.object({
|
|
1890
1929
|
publicKey: z4.string().min(1)
|
|
1891
1930
|
});
|
|
@@ -6117,7 +6156,7 @@ function versionOf(srcFileUrl, injected) {
|
|
|
6117
6156
|
}
|
|
6118
6157
|
|
|
6119
6158
|
// src/version.ts
|
|
6120
|
-
var VERSION = versionOf(import.meta.url, true ? "0.6.
|
|
6159
|
+
var VERSION = versionOf(import.meta.url, true ? "0.6.5" : void 0);
|
|
6121
6160
|
|
|
6122
6161
|
// src/caller.ts
|
|
6123
6162
|
import { createHash as createHash3, timingSafeEqual } from "node:crypto";
|