@fabrika/provider-zerops 0.9.0-dev.1 → 0.9.0-dev.10
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/package.json +17 -14
- package/sandbox/Dockerfile +16 -0
- package/sandbox/bin/postgres-auth.sh +38 -0
- package/sandbox/bin/reset.sh +12 -0
- package/sandbox/bin/run-build.sh +35 -0
- package/sandbox/bin/run-launcher.sh +18 -0
- package/sandbox/bin/start-launcher.sh +25 -0
- package/sandbox/bin/stop.sh +47 -0
- package/sandbox/init.sh +61 -0
- package/src/api/client.ts +15 -1
- package/src/api/errors.ts +7 -3
- package/src/api/readers.ts +29 -0
- package/src/api/types.ts +52 -0
- package/src/api.ts +2 -0
- package/src/cli.ts +11 -0
- package/src/collaborators.ts +0 -14
- package/src/compile.ts +1 -1
- package/src/control.ts +159 -92
- package/src/execution.ts +45 -195
- package/src/index.ts +2 -0
- package/src/installation/admin.ts +1 -1
- package/src/installation/deploy-options.ts +1 -2
- package/src/installation/deploy.ts +225 -80
- package/src/installation/generated/platform-console-schema.ts +3 -0
- package/src/installation/generated/platform-proxy-manifest.ts +1 -1
- package/src/installation/guide.md +48 -18
- package/src/installation/hosts.ts +1 -7
- package/src/installation/index.ts +13 -16
- package/src/installation/init-options.ts +2 -1
- package/src/installation/install-environment.ts +47 -108
- package/src/installation/install-options.ts +3 -1
- package/src/installation/install-secrets.ts +24 -68
- package/src/installation/install.ts +9 -4
- package/src/installation/sidecar.ts +5 -26
- package/src/installation/topology/setups.ts +17 -4
- package/src/installation/topology/topology.ts +32 -22
- package/src/installation/upgrade-options.ts +2 -2
- package/src/managed-env.ts +1 -174
- package/src/manifest.ts +4 -16
- package/src/namespace/claims.ts +60 -1
- package/src/namespace/codec.ts +17 -0
- package/src/namespace/errors.ts +22 -1
- package/src/namespace/manifest.ts +36 -23
- package/src/namespace/provisioning.ts +88 -114
- package/src/namespace/proxy-attempt.ts +14 -2
- package/src/namespace/proxy-reads.ts +28 -23
- package/src/namespace/proxy-secrets.ts +18 -5
- package/src/namespace/sandbox-host.ts +212 -0
- package/src/namespace/subdomain.ts +113 -0
- package/src/namespace/topology.ts +1 -1
- package/src/namespace/types.ts +13 -0
- package/src/namespace/update.ts +1 -0
- package/src/namespace-cli.ts +152 -0
- package/src/plan.ts +1 -6
- package/src/provider.ts +88 -166
- package/src/proxy-manifest-carrier.ts +39 -0
- package/src/sandbox/base-image.ts +100 -0
- package/src/sandbox/constants.ts +44 -0
- package/src/sandbox/deploy.ts +471 -0
- package/src/sandbox/dev-artifact.ts +206 -0
- package/src/sandbox/lifecycle.ts +204 -0
- package/src/sandbox/scripts.ts +26 -0
- package/src/sandbox-host.ts +28 -0
- package/src/source/port.ts +5 -0
- package/src/types.ts +0 -2
- package/src/zbox/client.ts +259 -0
- package/src/zbox/errors.ts +45 -0
- package/src/zbox/index.ts +22 -0
- package/src/zbox/types.ts +165 -0
- package/types/src/api/client.d.ts +5 -0
- package/types/src/api/errors.d.ts +26 -0
- package/types/src/api/polling.d.ts +41 -0
- package/types/src/api/readers.d.ts +1115 -0
- package/types/src/api/service-env-limit.d.ts +17 -0
- package/types/src/api/service-env-response.d.ts +23 -0
- package/types/src/api/types.d.ts +687 -0
- package/types/src/api.d.ts +6 -0
- package/types/src/authoring.d.ts +9 -0
- package/types/src/cli-args.d.ts +19 -0
- package/types/src/cli.d.ts +13 -0
- package/types/src/collaborators.d.ts +16 -0
- package/types/src/compile.d.ts +91 -0
- package/types/src/control.d.ts +51 -0
- package/types/src/database-budget.d.ts +38 -0
- package/types/src/descriptor.d.ts +28 -0
- package/types/src/execution.d.ts +114 -0
- package/types/src/exposure.d.ts +47 -0
- package/types/src/index.d.ts +31 -0
- package/types/src/installation/admin-options.d.ts +24 -0
- package/types/src/installation/admin.d.ts +35 -0
- package/types/src/installation/checker-release.d.ts +12 -0
- package/types/src/installation/deploy-options.d.ts +37 -0
- package/types/src/installation/deploy.d.ts +136 -0
- package/types/src/installation/generated/platform-console-schema.d.ts +2 -0
- package/types/src/installation/generated/platform-proxy-manifest.d.ts +2 -0
- package/types/src/installation/hosts.d.ts +34 -0
- package/types/src/installation/index.d.ts +7 -0
- package/types/src/installation/init-options.d.ts +38 -0
- package/types/src/installation/init.d.ts +60 -0
- package/types/src/installation/install-collaborators.d.ts +24 -0
- package/types/src/installation/install-environment.d.ts +63 -0
- package/types/src/installation/install-options.d.ts +49 -0
- package/types/src/installation/install-project.d.ts +13 -0
- package/types/src/installation/install-provisioning.d.ts +58 -0
- package/types/src/installation/install-secrets.d.ts +17 -0
- package/types/src/installation/install-token.d.ts +10 -0
- package/types/src/installation/install.d.ts +23 -0
- package/types/src/installation/installation-source.d.ts +8 -0
- package/types/src/installation/log.d.ts +44 -0
- package/types/src/installation/machine-key.d.ts +19 -0
- package/types/src/installation/placement-options.d.ts +11 -0
- package/types/src/installation/platform-archive.d.ts +7 -0
- package/types/src/installation/platform-source.d.ts +8 -0
- package/types/src/installation/platform-upload.d.ts +3 -0
- package/types/src/installation/sidecar.d.ts +49 -0
- package/types/src/installation/source-options.d.ts +1 -0
- package/types/src/installation/topology/artifacts.d.ts +8 -0
- package/types/src/installation/topology/index.d.ts +5 -0
- package/types/src/installation/topology/installation-schemas.d.ts +2242 -0
- package/types/src/installation/topology/invariants.d.ts +23 -0
- package/types/src/installation/topology/setups.d.ts +59 -0
- package/types/src/installation/topology/topology.d.ts +153 -0
- package/types/src/installation/topology/validate.d.ts +11 -0
- package/types/src/installation/upgrade-options.d.ts +26 -0
- package/types/src/installation/upgrade-output.d.ts +6 -0
- package/types/src/installation/upgrade.d.ts +88 -0
- package/types/src/managed-env.d.ts +24 -0
- package/types/src/manifest.d.ts +199 -0
- package/types/src/namespace/claims.d.ts +16 -0
- package/types/src/namespace/codec.d.ts +352 -0
- package/types/src/namespace/constants.d.ts +25 -0
- package/types/src/namespace/errors.d.ts +25 -0
- package/types/src/namespace/manifest.d.ts +4 -0
- package/types/src/namespace/operator.d.ts +12 -0
- package/types/src/namespace/provisioning.d.ts +4 -0
- package/types/src/namespace/proxy-attempt.d.ts +39 -0
- package/types/src/namespace/proxy-reads.d.ts +27 -0
- package/types/src/namespace/proxy-secrets.d.ts +8 -0
- package/types/src/namespace/proxy-source.d.ts +74 -0
- package/types/src/namespace/sandbox-host.d.ts +23 -0
- package/types/src/namespace/subdomain.d.ts +43 -0
- package/types/src/namespace/topology.d.ts +9 -0
- package/types/src/namespace/types.d.ts +111 -0
- package/types/src/namespace/update.d.ts +6 -0
- package/types/src/namespace/validation.d.ts +12 -0
- package/types/src/namespace-cli.d.ts +2 -0
- package/types/src/namespace.d.ts +9 -0
- package/types/src/plan.d.ts +11 -0
- package/types/src/provider.d.ts +60 -0
- package/types/src/proxy-manifest-carrier.d.ts +37 -0
- package/types/src/sandbox/base-image.d.ts +28 -0
- package/types/src/sandbox/constants.d.ts +30 -0
- package/types/src/sandbox/deploy.d.ts +75 -0
- package/types/src/sandbox/dev-artifact.d.ts +51 -0
- package/types/src/sandbox/lifecycle.d.ts +27 -0
- package/types/src/sandbox/scripts.d.ts +11 -0
- package/types/src/sandbox-host.d.ts +16 -0
- package/types/src/schema.generated.d.ts +376 -0
- package/types/src/service-names.d.ts +4 -0
- package/types/src/service-references.d.ts +13 -0
- package/types/src/source/constants.d.ts +6 -0
- package/types/src/source/port.d.ts +65 -0
- package/types/src/source/types.d.ts +4 -0
- package/types/src/source/validation.d.ts +19 -0
- package/types/src/source.d.ts +2 -0
- package/types/src/types.d.ts +119 -0
- package/types/src/version-attempt.d.ts +8 -0
- package/types/src/zbox/client.d.ts +2 -0
- package/types/src/zbox/errors.d.ts +25 -0
- package/types/src/zbox/index.d.ts +3 -0
- package/types/src/zbox/types.d.ts +433 -0
- package/src/installation/mcp.ts +0 -102
- package/src/installation/proxy-manifest.ts +0 -214
- package/src/installation/secrets.ts +0 -78
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
// Each schema reads only the fields the provider uses; Box adds fields freely and they are ignored.
|
|
4
|
+
|
|
5
|
+
const nullableString = z
|
|
6
|
+
.string()
|
|
7
|
+
.nullish()
|
|
8
|
+
.transform((value) => value ?? null)
|
|
9
|
+
|
|
10
|
+
export const zboxOperationSchema = z.object({
|
|
11
|
+
id: z.string().min(1),
|
|
12
|
+
sandboxId: nullableString,
|
|
13
|
+
kind: z.string().min(1),
|
|
14
|
+
status: z.enum(['PENDING', 'RUNNING', 'FINISHED', 'FAILED']),
|
|
15
|
+
error: nullableString,
|
|
16
|
+
})
|
|
17
|
+
export type ZboxOperation = z.infer<typeof zboxOperationSchema>
|
|
18
|
+
|
|
19
|
+
export const zboxSandboxSchema = z.object({
|
|
20
|
+
id: z.string().min(1),
|
|
21
|
+
name: nullableString,
|
|
22
|
+
status: z.enum(['CREATING', 'RUNNING', 'PARKING', 'PARKED', 'WAKING', 'FORKING', 'RESTORING', 'FAILED', 'TERMINATED', 'ARCHIVED']),
|
|
23
|
+
baseDigest: z.string(),
|
|
24
|
+
hosts: z.array(
|
|
25
|
+
z.object({
|
|
26
|
+
port: z.number().int(),
|
|
27
|
+
access: z.string(),
|
|
28
|
+
url: z.string(),
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
policyGeneration: z.number().int(),
|
|
32
|
+
})
|
|
33
|
+
export type ZboxSandbox = z.infer<typeof zboxSandboxSchema>
|
|
34
|
+
|
|
35
|
+
export const zboxSandboxListSchema = z.object({ items: z.array(zboxSandboxSchema) })
|
|
36
|
+
|
|
37
|
+
export const zboxSpawnSchema = z.object({ operation: zboxOperationSchema, sandboxes: z.array(zboxSandboxSchema) })
|
|
38
|
+
|
|
39
|
+
export const zboxWorkspaceSchema = z.object({ version: z.string() })
|
|
40
|
+
export type ZboxWorkspace = z.infer<typeof zboxWorkspaceSchema>
|
|
41
|
+
|
|
42
|
+
export const zboxBaseSchema = z.object({
|
|
43
|
+
digest: z.string().min(1),
|
|
44
|
+
name: nullableString,
|
|
45
|
+
imageRef: z.string(),
|
|
46
|
+
status: z.enum(['PULLING', 'FLATTENING', 'READY', 'FAILED', 'DELETED']),
|
|
47
|
+
})
|
|
48
|
+
export type ZboxBase = z.infer<typeof zboxBaseSchema>
|
|
49
|
+
|
|
50
|
+
export const zboxBaseListSchema = z.object({ items: z.array(zboxBaseSchema) })
|
|
51
|
+
|
|
52
|
+
export const zboxExecResultSchema = z.object({
|
|
53
|
+
stdout: z.string(),
|
|
54
|
+
stderr: z.string(),
|
|
55
|
+
exitCode: z
|
|
56
|
+
.number()
|
|
57
|
+
.int()
|
|
58
|
+
.nullish()
|
|
59
|
+
.transform((value) => value ?? null),
|
|
60
|
+
timedOut: z.boolean(),
|
|
61
|
+
stdoutTruncated: z.boolean(),
|
|
62
|
+
stderrTruncated: z.boolean(),
|
|
63
|
+
})
|
|
64
|
+
export type ZboxExecResult = z.infer<typeof zboxExecResultSchema>
|
|
65
|
+
|
|
66
|
+
export const zboxSessionSchema = z.object({
|
|
67
|
+
id: z.string().min(1),
|
|
68
|
+
status: z.enum(['OPEN', 'CLOSED', 'FAILED']),
|
|
69
|
+
exitCode: z
|
|
70
|
+
.number()
|
|
71
|
+
.int()
|
|
72
|
+
.nullish()
|
|
73
|
+
.transform((value) => value ?? null),
|
|
74
|
+
hasOutput: z.boolean(),
|
|
75
|
+
})
|
|
76
|
+
export type ZboxSession = z.infer<typeof zboxSessionSchema>
|
|
77
|
+
|
|
78
|
+
export const zboxSuccessSchema = z.object({ success: z.literal(true) })
|
|
79
|
+
|
|
80
|
+
export type ZboxNetworkMode = 'AIRGAPPED' | 'PROJECT' | 'INTERNET' | 'PROJECT_INTERNET'
|
|
81
|
+
export type ZboxPortAccess = 'PROJECT' | 'MEMBERS' | 'TICKET' | 'TOKEN' | 'PUBLIC'
|
|
82
|
+
|
|
83
|
+
export interface ZboxIngressPort {
|
|
84
|
+
port: number
|
|
85
|
+
access: ZboxPortAccess
|
|
86
|
+
wakeOnRequest: boolean
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** No `env`: a credential reaches a sandbox only in the root-only file a deploy writes through the file API. */
|
|
90
|
+
export interface ZboxLaunch {
|
|
91
|
+
entrypoint?: string[]
|
|
92
|
+
cmd?: string[]
|
|
93
|
+
workingDir?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ZboxCreateSandboxInput {
|
|
97
|
+
name: string
|
|
98
|
+
baseDigest: string
|
|
99
|
+
cpus: number
|
|
100
|
+
memoryBytes: number
|
|
101
|
+
/** Box refuses a create whose disk does not fit the workspace's data volume, and its default can exceed a small one. */
|
|
102
|
+
diskBytes: number
|
|
103
|
+
networkMode: ZboxNetworkMode
|
|
104
|
+
launch: ZboxLaunch
|
|
105
|
+
ports: ZboxIngressPort[]
|
|
106
|
+
/** Reused on a retry so Box answers the first create instead of making a second sandbox. */
|
|
107
|
+
idempotencyKey: string
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** No `env`, for the same reason as `ZboxLaunch`. */
|
|
111
|
+
export interface ZboxExecInput {
|
|
112
|
+
command: string[]
|
|
113
|
+
workingDir?: string
|
|
114
|
+
timeoutSeconds?: number
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface ZboxProcessInput {
|
|
118
|
+
command: string[]
|
|
119
|
+
workingDir?: string
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type ZboxBody = Uint8Array<ArrayBuffer> | ReadableStream<Uint8Array>
|
|
123
|
+
|
|
124
|
+
export type ZboxFetch = (
|
|
125
|
+
input: string,
|
|
126
|
+
init: { method: string; headers: Record<string, string>; body?: string | ZboxBody; signal: AbortSignal },
|
|
127
|
+
) => Promise<Response>
|
|
128
|
+
|
|
129
|
+
export interface ZboxClientOptions {
|
|
130
|
+
/** The API origin; requests go to `<baseUrl>/api/rest/…`. */
|
|
131
|
+
baseUrl: string
|
|
132
|
+
/** The Workspace API key, sent as `Authorization: Bearer`. Never logged. */
|
|
133
|
+
apiKey: string
|
|
134
|
+
fetch?: ZboxFetch
|
|
135
|
+
/** Generates the `Idempotency-Key` of a call whose caller supplied none. */
|
|
136
|
+
idempotencyKey?: () => string
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ZboxAwaitOptions {
|
|
140
|
+
signal?: AbortSignal
|
|
141
|
+
/** Milliseconds from now after which waiting gives up. */
|
|
142
|
+
deadlineMs: number
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface ZboxClient {
|
|
146
|
+
getWorkspace(signal?: AbortSignal): Promise<ZboxWorkspace>
|
|
147
|
+
pullBase(input: { imageRef: string; name: string }, signal?: AbortSignal): Promise<ZboxOperation>
|
|
148
|
+
buildBase(input: { context: ZboxBody; name: string }, signal?: AbortSignal): Promise<ZboxOperation>
|
|
149
|
+
listBases(signal?: AbortSignal): Promise<ZboxBase[]>
|
|
150
|
+
getOperation(id: string, waitSeconds: number, signal?: AbortSignal): Promise<ZboxOperation>
|
|
151
|
+
awaitOperation(operation: ZboxOperation, options: ZboxAwaitOptions): Promise<ZboxOperation>
|
|
152
|
+
createSandbox(input: ZboxCreateSandboxInput, signal?: AbortSignal): Promise<{ operation: ZboxOperation; sandbox: ZboxSandbox }>
|
|
153
|
+
getSandbox(id: string, signal?: AbortSignal): Promise<ZboxSandbox>
|
|
154
|
+
findSandboxByName(name: string, signal?: AbortSignal): Promise<ZboxSandbox | null>
|
|
155
|
+
deleteSandbox(id: string, idempotencyKey: string, signal?: AbortSignal): Promise<void>
|
|
156
|
+
park(id: string, input: { memory: boolean }, signal?: AbortSignal): Promise<ZboxOperation>
|
|
157
|
+
wake(id: string, signal?: AbortSignal): Promise<ZboxOperation>
|
|
158
|
+
exec(id: string, input: ZboxExecInput, signal?: AbortSignal): Promise<ZboxExecResult>
|
|
159
|
+
startProcess(id: string, input: ZboxProcessInput, signal?: AbortSignal): Promise<ZboxSession>
|
|
160
|
+
getSession(id: string, signal?: AbortSignal): Promise<ZboxSession>
|
|
161
|
+
sessionOutput(id: string, signal?: AbortSignal): Promise<Uint8Array>
|
|
162
|
+
/** `mode` is the octal file mode (Box defaults to 0644). */
|
|
163
|
+
putFile(id: string, path: string, body: ZboxBody, options?: { mode?: string; signal?: AbortSignal }): Promise<void>
|
|
164
|
+
getFile(id: string, path: string, signal?: AbortSignal): Promise<Uint8Array | null>
|
|
165
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ZeropsApi, ZeropsApiOptions } from './types';
|
|
2
|
+
/** Base URL of the Zerops public REST API. */
|
|
3
|
+
export declare const ZEROPS_API_BASE = "https://api.app-prg1.zerops.io/api/rest/public";
|
|
4
|
+
/** Build the real client. Every request carries the bearer and the run's signal. */
|
|
5
|
+
export declare const createZeropsApi: (options: ZeropsApiOptions) => ZeropsApi;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const isAppVersionNotFoundResponse: (value: unknown) => boolean;
|
|
2
|
+
/**
|
|
3
|
+
* A non-2xx answer from the Zerops API. `code` is the platform's own error identifier, so a caller can
|
|
4
|
+
* branch on `userDataDuplicateKey` rather than matching a prose message.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ZeropsApiError extends Error {
|
|
7
|
+
readonly status: number;
|
|
8
|
+
readonly code: string;
|
|
9
|
+
/** The codes of an `errorList` answer's entries: the platform reports several refusals of one request there. */
|
|
10
|
+
readonly listedCodes: readonly string[];
|
|
11
|
+
constructor(message: string, status: number, code: string, listedCodes?: readonly string[]);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The platform's code for "this service publishes no HTTP port", the answer `enableSubdomainAccess` gives
|
|
15
|
+
* before a service's first deploy. Exported so a caller can say what is missing instead of relaying prose.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ZEROPS_SERVICE_NOT_HTTP = "serviceStackIsNotHttp";
|
|
18
|
+
/**
|
|
19
|
+
* Turn a non-2xx response into a `ZeropsApiError`. Zerops answers with `{ error: { code, message, meta } }`
|
|
20
|
+
* (the envelope observed live; the OpenAPI `Error` schema shows the inner `{ code, message }`).
|
|
21
|
+
*
|
|
22
|
+
* `redactDetail` drops the server's MESSAGE, which a validation error can fill with the value it
|
|
23
|
+
* rejected. The CODE is a fixed identifier and is kept either way — without it nothing downstream can
|
|
24
|
+
* tell a duplicate key from a missing service.
|
|
25
|
+
*/
|
|
26
|
+
export declare const apiError: (label: string, status: number, body: unknown, redactDetail: boolean) => ZeropsApiError;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Sleeper } from '../collaborators';
|
|
2
|
+
import { type ZeropsApi, type ZeropsProcess } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Poll ONE process to completion.
|
|
5
|
+
*
|
|
6
|
+
* The same loop `deployPlatformService` (`installation/deploy.ts`) runs over `/app-version`, run over `/process`
|
|
7
|
+
* instead: read, decide ONLY on a status this build knows to be terminal, sleep, and give up on a deadline
|
|
8
|
+
* of our own rather than on a coincidence. Returns the finished process so a caller can read
|
|
9
|
+
* `actionName`/`appVersionId` off it.
|
|
10
|
+
*
|
|
11
|
+
* Anything outside `ZEROPS_PROCESS_TERMINAL` means "keep waiting", including a status this build has never
|
|
12
|
+
* seen — which is why an unpublished vocabulary (see that constant) can cost a timeout and never a false
|
|
13
|
+
* success. A non-`FINISHED` terminal status throws, naming the status and nothing else.
|
|
14
|
+
*/
|
|
15
|
+
export declare const waitForProcess: (input: {
|
|
16
|
+
api: Pick<ZeropsApi, "getProcess">;
|
|
17
|
+
processId: string;
|
|
18
|
+
sleep: Sleeper;
|
|
19
|
+
signal: AbortSignal;
|
|
20
|
+
/** What to call this process in a failure or timeout message. Defaults to its id. */
|
|
21
|
+
label?: string;
|
|
22
|
+
intervalMs?: number;
|
|
23
|
+
attempts?: number;
|
|
24
|
+
}) => Promise<ZeropsProcess>;
|
|
25
|
+
/**
|
|
26
|
+
* `enableSubdomainAccess`, repeated while the service does not yet publish an HTTP port.
|
|
27
|
+
*
|
|
28
|
+
* Live-verified: right after a service's first app version reads ACTIVE the platform still answers
|
|
29
|
+
* `serviceStackIsNotHttp`, and a minute later the same call is accepted. The ports lag ACTIVE, so that
|
|
30
|
+
* answer means "not yet" for a bounded window. Past it the last refusal is rethrown unchanged, so a caller
|
|
31
|
+
* still names the missing port. Any other failure is rethrown at once. The 2xx still proves nothing: the
|
|
32
|
+
* caller decides by reading `subdomainAccess` back.
|
|
33
|
+
*/
|
|
34
|
+
export declare const enableSubdomainAccessWhenHttp: (input: {
|
|
35
|
+
api: Pick<ZeropsApi, "enableSubdomainAccess">;
|
|
36
|
+
serviceId: string;
|
|
37
|
+
sleep: Sleeper;
|
|
38
|
+
signal: AbortSignal;
|
|
39
|
+
intervalMs?: number;
|
|
40
|
+
attempts?: number;
|
|
41
|
+
}) => Promise<void>;
|