@inquir/compute-cli 0.4.0 → 0.4.1
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/README.md +632 -619
- package/dist/commands/admin.js +2 -2
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/apps-describe.d.ts.map +1 -1
- package/dist/commands/apps-describe.js +8 -1
- package/dist/commands/apps-describe.js.map +1 -1
- package/dist/commands/apps-instances.d.ts +18 -0
- package/dist/commands/apps-instances.d.ts.map +1 -0
- package/dist/commands/apps-instances.js +87 -0
- package/dist/commands/apps-instances.js.map +1 -0
- package/dist/commands/apps-observability.d.ts +6 -0
- package/dist/commands/apps-observability.d.ts.map +1 -1
- package/dist/commands/apps-observability.js +38 -9
- package/dist/commands/apps-observability.js.map +1 -1
- package/dist/commands/apps.d.ts +95 -2
- package/dist/commands/apps.d.ts.map +1 -1
- package/dist/commands/apps.js +572 -51
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/deploy.js +3 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/init.js +15 -15
- package/dist/utils/api.d.ts +22 -6
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/api.js +22 -3
- package/dist/utils/api.js.map +1 -1
- package/dist/utils/apps-presentation.d.ts +7 -0
- package/dist/utils/apps-presentation.d.ts.map +1 -1
- package/dist/utils/apps-presentation.js +25 -1
- package/dist/utils/apps-presentation.js.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +41 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/msys-path.d.ts +14 -0
- package/dist/utils/msys-path.d.ts.map +1 -0
- package/dist/utils/msys-path.js +55 -0
- package/dist/utils/msys-path.js.map +1 -0
- package/dist/utils/package-metadata.js +1 -1
- package/dist/utils/source-pack.d.ts +24 -0
- package/dist/utils/source-pack.d.ts.map +1 -0
- package/dist/utils/source-pack.js +63 -0
- package/dist/utils/source-pack.js.map +1 -0
- package/package.json +34 -34
- package/skill/SKILL.md +73 -73
package/dist/commands/apps.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type AppNetworkPolicy, type AppPortSpec, type AppRuntimeSpec, type AppScalingPolicy, type ApiRequestOptions, type ApplicationDetail, type Build, type Release } from '../utils/api.js';
|
|
1
|
+
import { type AppNetworkPolicy, type AppPortSpec, type AppRuntimeSpec, type AppScalingPolicy, type ApiRequestOptions, type ApplicationDetail, type AppLocationStatus, type AppVolumeBackup, type AppBackupPolicy, type Build, type Release } from '../utils/api.js';
|
|
2
|
+
import { type AppLogHistoryResponse, type AppRuntimeLogEntry, type AppRuntimeLogQuery } from '../sdk.js';
|
|
2
3
|
export declare function appsCommand(args: string[]): Promise<void>;
|
|
3
4
|
/**
|
|
4
5
|
* `--tcp name:port[:public][:hostPort]` — ordinary usage stops at `public` and
|
|
@@ -6,6 +7,29 @@ export declare function appsCommand(args: string[]): Promise<void>;
|
|
|
6
7
|
* remains an API/CLI compatibility escape hatch for an existing installation.
|
|
7
8
|
*/
|
|
8
9
|
export declare function parseTcpPortFlag(value: string): AppPortSpec;
|
|
10
|
+
/**
|
|
11
|
+
* `--location <id|auto>`: the service's location, verbatim; the server says
|
|
12
|
+
* which ids it offers. Undefined when the flag is absent.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseLocationFlag(value: string | undefined): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The status line of a service's location: its setting by name, what
|
|
17
|
+
* production runs with while a change waits for the next deploy, and where
|
|
18
|
+
* the replicas run. Undefined while the platform offers no location choice.
|
|
19
|
+
*/
|
|
20
|
+
export declare function describeServiceLocation(status: AppLocationStatus): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* `--node-selector KEY=VALUE` (repeatable): the node labels a server must
|
|
23
|
+
* carry, verbatim (`inquir.io/region=eu`, `tier=fast`). The server validates
|
|
24
|
+
* keys and values and says which keys it exposes.
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseNodeSelectorFlags(values: string[]): Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* The runtime defaults with `--node-selector` / `--clear-node-selector`
|
|
29
|
+
* applied over `base` (the flags' runtime, else the stored one); undefined
|
|
30
|
+
* when neither flag is given.
|
|
31
|
+
*/
|
|
32
|
+
export declare function applyNodeSelectorFlags(args: string[], base: AppRuntimeSpec | undefined): AppRuntimeSpec | undefined;
|
|
9
33
|
export declare function parseSetFlags(values: string[]): Record<string, string>;
|
|
10
34
|
/** Parse a CLI duration such as `90`, `90s`, `15m`, `1h30m`, or `1.5m`. */
|
|
11
35
|
export declare function parseDurationSeconds(value: string): number;
|
|
@@ -18,6 +42,21 @@ export declare function parseVolumeFlag(value: string): AppVolumeSpec;
|
|
|
18
42
|
export declare function parseDrainGraceFlag(value: string): number;
|
|
19
43
|
/** Runtime flags patch the saved application runtime rather than replacing unrelated fields. */
|
|
20
44
|
export declare function buildRuntimeFromFlags(args: string[], baseRuntime?: AppRuntimeSpec): AppRuntimeSpec | undefined;
|
|
45
|
+
/** `apps <sub> --help` answered per subcommand; the global page is the fallback. */
|
|
46
|
+
export declare const SUBCOMMAND_HELP: Record<string, string[]>;
|
|
47
|
+
/**
|
|
48
|
+
* "2/3 ~10-08 14:00": the row's place among its volume's backups of the same
|
|
49
|
+
* kind, and roughly when it goes; "next cleanup" once past the limit.
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatBackupKeeps(backup: AppVolumeBackup): string;
|
|
52
|
+
/** One line on what the workspace's backup policy keeps. */
|
|
53
|
+
export declare function formatBackupPolicy(policy: AppBackupPolicy): string;
|
|
54
|
+
/**
|
|
55
|
+
* An empty backup list. A volume on a worker runner cannot be snapshotted by
|
|
56
|
+
* the platform yet, and `create` is refused there too: say so instead of
|
|
57
|
+
* suggesting it.
|
|
58
|
+
*/
|
|
59
|
+
export declare function emptyBackupsLines(appName: string, policy: AppBackupPolicy | undefined): string[];
|
|
21
60
|
/**
|
|
22
61
|
* The refusals of `apps connect` and `apps connection-url`, told as what to do
|
|
23
62
|
* next. The server's code and message are kept; the cause, the fix and the
|
|
@@ -46,6 +85,19 @@ export declare function waitForBuild(buildId: string, apiOptions: ApiRequestOpti
|
|
|
46
85
|
noLogs?: boolean;
|
|
47
86
|
initial?: Pick<Build, 'status' | 'timeoutPolicy' | 'timeoutRemainingMs'>;
|
|
48
87
|
}): Promise<Build>;
|
|
88
|
+
/**
|
|
89
|
+
* The phase of the stop-first production replacement a PENDING release is
|
|
90
|
+
* the target of. Bounded: the operation is read on the first PENDING poll
|
|
91
|
+
* and then every REPLACEMENT_PROBE_EVERY polls, and never again once a read
|
|
92
|
+
* fails or names no replacement for this release (a preview, an older
|
|
93
|
+
* server), so an ordinary deploy costs one extra request.
|
|
94
|
+
*/
|
|
95
|
+
export declare function createReplacementProbe(read: (applicationId: string) => Promise<{
|
|
96
|
+
targetReleaseId: string;
|
|
97
|
+
phase: string;
|
|
98
|
+
} | null>, every?: number): {
|
|
99
|
+
phaseOf(release: Pick<Release, 'id' | 'applicationId'>): Promise<string>;
|
|
100
|
+
};
|
|
49
101
|
/**
|
|
50
102
|
* Where a client can actually connect. Public endpoints first; a host-local
|
|
51
103
|
* port is still printed (marked as such) because on an installation with no
|
|
@@ -60,7 +112,7 @@ export declare function releaseEndpointLines(release: Release, previewUrl?: stri
|
|
|
60
112
|
* missing domain on an installation with private networking means "still
|
|
61
113
|
* being reconciled", not "no such thing" — and that is worth a line too.
|
|
62
114
|
*/
|
|
63
|
-
export declare function privateEndpointLines(detail: Pick<ApplicationDetail, 'privateDomain' | 'privateBaseUrl'>, active: Pick<Release, 'ports' | 'runtime'> | undefined, options?: {
|
|
115
|
+
export declare function privateEndpointLines(detail: Pick<ApplicationDetail, 'privateDomain' | 'privateBaseUrl'>, active: (Pick<Release, 'ports' | 'runtime'> & Partial<Pick<Release, 'serving'>>) | undefined, options?: {
|
|
64
116
|
privateNetworking?: boolean;
|
|
65
117
|
}): string[];
|
|
66
118
|
/**
|
|
@@ -76,6 +128,47 @@ export declare function buildNetworkPolicyPatch(input: {
|
|
|
76
128
|
}): AppNetworkPolicy | undefined;
|
|
77
129
|
/** A build-sourced release is best named by its build; a pulled one by its ref. */
|
|
78
130
|
export declare function describeImage(release: Pick<Release, 'imageSource' | 'buildId' | 'imageRef' | 'imageDigest'>): string;
|
|
131
|
+
/** One line for a startup probe; defaults as the server applies them (src/apps/startup-probe.ts). */
|
|
132
|
+
export declare function describeStartupProbe(probe: NonNullable<AppRuntimeSpec['startupProbe']>): string;
|
|
79
133
|
export declare function describeScalingPolicy(policy: AppScalingPolicy): string;
|
|
134
|
+
/**
|
|
135
|
+
* Calls `stop` once a stream goes quiet: BUILD_LOG_FIRST_EVENT_MS before the
|
|
136
|
+
* first event (connecting may be slow), BUILD_LOG_QUIET_MS after the latest.
|
|
137
|
+
*/
|
|
138
|
+
export declare function createQuietStop(stop: () => void, timings?: {
|
|
139
|
+
firstEventMs: number;
|
|
140
|
+
quietMs: number;
|
|
141
|
+
}): {
|
|
142
|
+
heard(): void;
|
|
143
|
+
cancel(): void;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* `apps logs --no-follow`: the last `tail` stored lines of one release (one
|
|
147
|
+
* replica with `allocationId`), oldest first — what the live stream prints
|
|
148
|
+
* before it starts following, without the following.
|
|
149
|
+
*/
|
|
150
|
+
export declare function readRecentRuntimeLogs(fetchPage: (query: AppRuntimeLogQuery) => Promise<AppLogHistoryResponse<AppRuntimeLogEntry>>, options: {
|
|
151
|
+
releaseId: string;
|
|
152
|
+
tail: number;
|
|
153
|
+
allocationId?: string;
|
|
154
|
+
now?: number;
|
|
155
|
+
}): Promise<AppRuntimeLogEntry[]>;
|
|
156
|
+
/**
|
|
157
|
+
* What to say after a promotion that produced no public URL. An HTTP service
|
|
158
|
+
* is private, not unreachable: same-workspace services reach it at its
|
|
159
|
+
* private address. Only a TCP-only service is reached at its TCP endpoints.
|
|
160
|
+
*/
|
|
161
|
+
export declare function promotedWithoutHostnameLines(release: Pick<Release, 'runtime'> | null, app: Pick<ApplicationDetail, 'name' | 'privateBaseUrl'> | null): string[];
|
|
162
|
+
/**
|
|
163
|
+
* When an `apps update` takes effect. Public Networking is applied by the
|
|
164
|
+
* server at once (the generated route is created or removed in the same
|
|
165
|
+
* request); env, runtime, egress, placement and location are what the next
|
|
166
|
+
* release is built from.
|
|
167
|
+
*/
|
|
168
|
+
export declare function updateTimingLines(appName: string, changed: {
|
|
169
|
+
ingress?: 'public' | 'private';
|
|
170
|
+
nextRelease: boolean;
|
|
171
|
+
hasProduction?: boolean;
|
|
172
|
+
}): string[];
|
|
80
173
|
export {};
|
|
81
174
|
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AAcA,OAAO,EAyCL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EAEnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAA2G,KAAK,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAA2B,MAAM,WAAW,CAAC;AA6D3O,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiF/D;AAwFD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CA6B3D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO/E;AA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