@vendure/cloud 0.3.2 → 0.4.0
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 +6 -1
- package/dist/cli/commands/deployment/build-logs.js +2 -9
- package/dist/cli/commands/deployment/build-logs.js.map +1 -1
- package/dist/cli/commands/deployment/deploy.d.ts.map +1 -1
- package/dist/cli/commands/deployment/deploy.js +34 -64
- package/dist/cli/commands/deployment/deploy.js.map +1 -1
- package/dist/cli/commands/deployment/index.d.ts.map +1 -1
- package/dist/cli/commands/deployment/index.js +52 -27
- package/dist/cli/commands/deployment/index.js.map +1 -1
- package/dist/cli/commands/deployment/log-export.d.ts +13 -0
- package/dist/cli/commands/deployment/log-export.d.ts.map +1 -0
- package/dist/cli/commands/deployment/log-export.js +133 -0
- package/dist/cli/commands/deployment/log-export.js.map +1 -0
- package/dist/cli/commands/deployment/log-query-output.d.ts +13 -0
- package/dist/cli/commands/deployment/log-query-output.d.ts.map +1 -0
- package/dist/cli/commands/deployment/log-query-output.js +106 -0
- package/dist/cli/commands/deployment/log-query-output.js.map +1 -0
- package/dist/cli/commands/deployment/logs.d.ts +1 -0
- package/dist/cli/commands/deployment/logs.d.ts.map +1 -1
- package/dist/cli/commands/deployment/logs.js +347 -69
- package/dist/cli/commands/deployment/logs.js.map +1 -1
- package/dist/cli/commands/deployment/options.d.ts +2 -6
- package/dist/cli/commands/deployment/options.d.ts.map +1 -1
- package/dist/cli/commands/deployment/options.js +21 -9
- package/dist/cli/commands/deployment/options.js.map +1 -1
- package/dist/cli/commands/deployment/plan.d.ts +1 -1
- package/dist/cli/commands/deployment/plan.d.ts.map +1 -1
- package/dist/cli/commands/deployment/plan.js +4 -6
- package/dist/cli/commands/deployment/plan.js.map +1 -1
- package/dist/cli/commands/deployment/recovery.d.ts +9 -0
- package/dist/cli/commands/deployment/recovery.d.ts.map +1 -0
- package/dist/cli/commands/deployment/recovery.js +86 -0
- package/dist/cli/commands/deployment/recovery.js.map +1 -0
- package/dist/cli/commands/deployment/rollback.d.ts.map +1 -1
- package/dist/cli/commands/deployment/rollback.js +8 -3
- package/dist/cli/commands/deployment/rollback.js.map +1 -1
- package/dist/cli/commands/deployment/show.d.ts.map +1 -1
- package/dist/cli/commands/deployment/show.js +16 -5
- package/dist/cli/commands/deployment/show.js.map +1 -1
- package/dist/cli/commands/deployment/source.d.ts +1 -12
- package/dist/cli/commands/deployment/source.d.ts.map +1 -1
- package/dist/cli/commands/deployment/source.js +5 -13
- package/dist/cli/commands/deployment/source.js.map +1 -1
- package/dist/cli/commands/deployment/status.d.ts.map +1 -1
- package/dist/cli/commands/deployment/status.js +22 -20
- package/dist/cli/commands/deployment/status.js.map +1 -1
- package/dist/cli/commands/deployment/teardown.d.ts.map +1 -1
- package/dist/cli/commands/deployment/teardown.js +12 -1
- package/dist/cli/commands/deployment/teardown.js.map +1 -1
- package/dist/cli/commands/identity-context/keys.d.ts.map +1 -1
- package/dist/cli/commands/identity-context/keys.js +6 -5
- package/dist/cli/commands/identity-context/keys.js.map +1 -1
- package/dist/cli/commands/identity-context/login.d.ts.map +1 -1
- package/dist/cli/commands/identity-context/login.js +2 -2
- package/dist/cli/commands/identity-context/login.js.map +1 -1
- package/dist/cli/commands/identity-context/logout.d.ts.map +1 -1
- package/dist/cli/commands/identity-context/logout.js +3 -4
- package/dist/cli/commands/identity-context/logout.js.map +1 -1
- package/dist/cli/commands/identity-context/org-switch.d.ts.map +1 -1
- package/dist/cli/commands/identity-context/org-switch.js +19 -7
- package/dist/cli/commands/identity-context/org-switch.js.map +1 -1
- package/dist/cli/commands/identity-context/use.d.ts.map +1 -1
- package/dist/cli/commands/identity-context/use.js +2 -3
- package/dist/cli/commands/identity-context/use.js.map +1 -1
- package/dist/cli/commands/identity-context/whoami.d.ts.map +1 -1
- package/dist/cli/commands/identity-context/whoami.js +33 -12
- package/dist/cli/commands/identity-context/whoami.js.map +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +0 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/project-config/config/desired-state.d.ts +1 -1
- package/dist/cli/commands/project-config/config/desired-state.d.ts.map +1 -1
- package/dist/cli/commands/project-config/config/desired-state.js +4 -3
- package/dist/cli/commands/project-config/config/desired-state.js.map +1 -1
- package/dist/cli/commands/project-config/config/email/domain.d.ts +5 -0
- package/dist/cli/commands/project-config/config/email/domain.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/email/domain.js +80 -0
- package/dist/cli/commands/project-config/config/email/domain.js.map +1 -0
- package/dist/cli/commands/project-config/config/email/events.d.ts +4 -0
- package/dist/cli/commands/project-config/config/email/events.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/email/events.js +55 -0
- package/dist/cli/commands/project-config/config/email/events.js.map +1 -0
- package/dist/cli/commands/project-config/config/email/index.d.ts +2 -0
- package/dist/cli/commands/project-config/config/email/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/email/index.js +108 -0
- package/dist/cli/commands/project-config/config/email/index.js.map +1 -0
- package/dist/cli/commands/project-config/config/email/test-sending.d.ts +4 -0
- package/dist/cli/commands/project-config/config/email/test-sending.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/email/test-sending.js +68 -0
- package/dist/cli/commands/project-config/config/email/test-sending.js.map +1 -0
- package/dist/cli/commands/project-config/config/index.d.ts.map +1 -1
- package/dist/cli/commands/project-config/config/index.js +12 -7
- package/dist/cli/commands/project-config/config/index.js.map +1 -1
- package/dist/cli/commands/project-config/config/runtime.d.ts +2 -1
- package/dist/cli/commands/project-config/config/runtime.d.ts.map +1 -1
- package/dist/cli/commands/project-config/config/runtime.js +43 -29
- package/dist/cli/commands/project-config/config/runtime.js.map +1 -1
- package/dist/cli/commands/project-config/env/index.d.ts.map +1 -1
- package/dist/cli/commands/project-config/env/index.js +8 -2
- package/dist/cli/commands/project-config/env/index.js.map +1 -1
- package/dist/cli/commands/project-config/environment/index.d.ts.map +1 -1
- package/dist/cli/commands/project-config/environment/index.js +15 -1
- package/dist/cli/commands/project-config/environment/index.js.map +1 -1
- package/dist/cli/commands/project-config/environment/regions.d.ts +6 -0
- package/dist/cli/commands/project-config/environment/regions.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/regions.js +22 -0
- package/dist/cli/commands/project-config/environment/regions.js.map +1 -0
- package/dist/cli/commands/project-config/init/init.d.ts.map +1 -1
- package/dist/cli/commands/project-config/init/init.js +28 -5
- package/dist/cli/commands/project-config/init/init.js.map +1 -1
- package/dist/cli/commands/project-config/project/list.d.ts.map +1 -1
- package/dist/cli/commands/project-config/project/list.js +8 -1
- package/dist/cli/commands/project-config/project/list.js.map +1 -1
- package/dist/cli/commands/project-config/project/show.d.ts.map +1 -1
- package/dist/cli/commands/project-config/project/show.js +12 -0
- package/dist/cli/commands/project-config/project/show.js.map +1 -1
- package/dist/cli/commands/project-config/project/subscription-state.d.ts +5 -0
- package/dist/cli/commands/project-config/project/subscription-state.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/subscription-state.js +57 -0
- package/dist/cli/commands/project-config/project/subscription-state.js.map +1 -0
- package/dist/cli/commands/project-config/source/connect.d.ts.map +1 -1
- package/dist/cli/commands/project-config/source/connect.js +5 -5
- package/dist/cli/commands/project-config/source/connect.js.map +1 -1
- package/dist/cli/commands/project-config/source/map.d.ts.map +1 -1
- package/dist/cli/commands/project-config/source/map.js +4 -4
- package/dist/cli/commands/project-config/source/map.js.map +1 -1
- package/dist/cli/commands/project-config/source/status.d.ts.map +1 -1
- package/dist/cli/commands/project-config/source/status.js +71 -17
- package/dist/cli/commands/project-config/source/status.js.map +1 -1
- package/dist/cli/commands/runtime-data/backup.d.ts +1 -0
- package/dist/cli/commands/runtime-data/backup.d.ts.map +1 -1
- package/dist/cli/commands/runtime-data/backup.js +36 -0
- package/dist/cli/commands/runtime-data/backup.js.map +1 -1
- package/dist/cli/commands/runtime-data/index.d.ts +1 -0
- package/dist/cli/commands/runtime-data/index.d.ts.map +1 -1
- package/dist/cli/commands/runtime-data/index.js +26 -4
- package/dist/cli/commands/runtime-data/index.js.map +1 -1
- package/dist/cli/commands/runtime-data/restore.d.ts.map +1 -1
- package/dist/cli/commands/runtime-data/restore.js +33 -5
- package/dist/cli/commands/runtime-data/restore.js.map +1 -1
- package/dist/cli/index.d.ts +13 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +12 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lib/auth.d.ts +21 -2
- package/dist/cli/lib/auth.d.ts.map +1 -1
- package/dist/cli/lib/auth.js +22 -2
- package/dist/cli/lib/auth.js.map +1 -1
- package/dist/cli/lib/commit.d.ts +4 -0
- package/dist/cli/lib/commit.d.ts.map +1 -0
- package/dist/cli/lib/commit.js +22 -0
- package/dist/cli/lib/commit.js.map +1 -0
- package/dist/cli/lib/console-credential.d.ts +55 -0
- package/dist/cli/lib/console-credential.d.ts.map +1 -0
- package/dist/cli/lib/console-credential.js +164 -0
- package/dist/cli/lib/console-credential.js.map +1 -0
- package/dist/cli/lib/console-origins.d.ts +30 -0
- package/dist/cli/lib/console-origins.d.ts.map +1 -0
- package/dist/cli/lib/console-origins.js +87 -0
- package/dist/cli/lib/console-origins.js.map +1 -0
- package/dist/cli/lib/console-pairing.d.ts +15 -0
- package/dist/cli/lib/console-pairing.d.ts.map +1 -0
- package/dist/cli/lib/console-pairing.js +70 -0
- package/dist/cli/lib/console-pairing.js.map +1 -0
- package/dist/cli/lib/console-session-lock.d.ts +39 -0
- package/dist/cli/lib/console-session-lock.d.ts.map +1 -0
- package/dist/cli/lib/console-session-lock.js +235 -0
- package/dist/cli/lib/console-session-lock.js.map +1 -0
- package/dist/cli/lib/console-session.d.ts +47 -0
- package/dist/cli/lib/console-session.d.ts.map +1 -0
- package/dist/cli/lib/console-session.js +235 -0
- package/dist/cli/lib/console-session.js.map +1 -0
- package/dist/cli/lib/contract/backup-schedule-reasons.d.ts +4 -0
- package/dist/cli/lib/contract/backup-schedule-reasons.d.ts.map +1 -0
- package/dist/cli/lib/contract/backup-schedule-reasons.js +17 -0
- package/dist/cli/lib/contract/backup-schedule-reasons.js.map +1 -0
- package/dist/cli/lib/contract/build-settings.d.ts +1 -1
- package/dist/cli/lib/contract/database.d.ts +19 -0
- package/dist/cli/lib/contract/database.d.ts.map +1 -1
- package/dist/cli/lib/contract/database.js.map +1 -1
- package/dist/cli/lib/contract/deployments.d.ts +13 -0
- package/dist/cli/lib/contract/deployments.d.ts.map +1 -1
- package/dist/cli/lib/contract/deployments.js +38 -0
- package/dist/cli/lib/contract/deployments.js.map +1 -1
- package/dist/cli/lib/contract/desired-state.d.ts +3 -5
- package/dist/cli/lib/contract/desired-state.d.ts.map +1 -1
- package/dist/cli/lib/contract/desired-state.js +42 -28
- package/dist/cli/lib/contract/desired-state.js.map +1 -1
- package/dist/cli/lib/contract/foreign-credentials.d.ts +6 -4
- package/dist/cli/lib/contract/foreign-credentials.d.ts.map +1 -1
- package/dist/cli/lib/contract/foreign-credentials.js +7 -5
- package/dist/cli/lib/contract/foreign-credentials.js.map +1 -1
- package/dist/cli/lib/contract/logs.d.ts +120 -0
- package/dist/cli/lib/contract/logs.d.ts.map +1 -1
- package/dist/cli/lib/contract/logs.js +106 -1
- package/dist/cli/lib/contract/logs.js.map +1 -1
- package/dist/cli/lib/contract/managed-email.d.ts +57 -0
- package/dist/cli/lib/contract/managed-email.d.ts.map +1 -0
- package/dist/cli/lib/contract/managed-email.js +21 -0
- package/dist/cli/lib/contract/managed-email.js.map +1 -0
- package/dist/cli/lib/contract/projects.d.ts +6 -0
- package/dist/cli/lib/contract/projects.d.ts.map +1 -1
- package/dist/cli/lib/contract/regions.d.ts +11 -0
- package/dist/cli/lib/contract/regions.d.ts.map +1 -0
- package/dist/cli/lib/contract/regions.js +7 -0
- package/dist/cli/lib/contract/regions.js.map +1 -0
- package/dist/cli/lib/contract/runtime-operations.d.ts +0 -1
- package/dist/cli/lib/contract/runtime-operations.d.ts.map +1 -1
- package/dist/cli/lib/contract/source-disconnect-reasons.d.ts +4 -0
- package/dist/cli/lib/contract/source-disconnect-reasons.d.ts.map +1 -0
- package/dist/cli/lib/contract/source-disconnect-reasons.js +31 -0
- package/dist/cli/lib/contract/source-disconnect-reasons.js.map +1 -0
- package/dist/cli/lib/contract/source-repository.d.ts +1 -1
- package/dist/cli/lib/contract/source-repository.d.ts.map +1 -1
- package/dist/cli/lib/contract/source-repository.js +1 -0
- package/dist/cli/lib/contract/source-repository.js.map +1 -1
- package/dist/cli/lib/errors.d.ts +30 -0
- package/dist/cli/lib/errors.d.ts.map +1 -1
- package/dist/cli/lib/errors.js +46 -0
- package/dist/cli/lib/errors.js.map +1 -1
- package/dist/cli/lib/platform-address.d.ts +3 -0
- package/dist/cli/lib/platform-address.d.ts.map +1 -0
- package/dist/cli/lib/platform-address.js +7 -0
- package/dist/cli/lib/platform-address.js.map +1 -0
- package/dist/cli/lib/resolve.d.ts +1 -0
- package/dist/cli/lib/resolve.d.ts.map +1 -1
- package/dist/cli/lib/resolve.js +26 -3
- package/dist/cli/lib/resolve.js.map +1 -1
- package/dist/cli/lib/terminal-output.d.ts +8 -0
- package/dist/cli/lib/terminal-output.d.ts.map +1 -0
- package/dist/cli/lib/terminal-output.js +52 -0
- package/dist/cli/lib/terminal-output.js.map +1 -0
- package/dist/dev/dashboard-vite-config.d.ts +1 -0
- package/dist/dev/dashboard-vite-config.d.ts.map +1 -1
- package/dist/dev/dashboard-vite-config.js +26 -3
- package/dist/dev/dashboard-vite-config.js.map +1 -1
- package/dist/dev/dev-command.d.ts.map +1 -1
- package/dist/dev/dev-command.js +21 -1
- package/dist/dev/dev-command.js.map +1 -1
- package/dist/dev/dev-migrate.js +2 -0
- package/dist/dev/dev-migrate.js.map +1 -1
- package/dist/dev/dev-server.js +3 -0
- package/dist/dev/dev-server.js.map +1 -1
- package/dist/dev/dev-worker.js +2 -1
- package/dist/dev/dev-worker.js.map +1 -1
- package/dist/local-core.d.ts +2 -0
- package/dist/local-core.d.ts.map +1 -0
- package/dist/local-core.js +15 -0
- package/dist/local-core.js.map +1 -0
- package/dist/local-durable-execution-plugin.d.ts +3 -0
- package/dist/local-durable-execution-plugin.d.ts.map +1 -0
- package/dist/local-durable-execution-plugin.js +33 -0
- package/dist/local-durable-execution-plugin.js.map +1 -0
- package/dist/local-runtime.d.ts.map +1 -1
- package/dist/local-runtime.js +7 -0
- package/dist/local-runtime.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LogQueryEvent, LogQueryResultState, LogQueryResults, LogRetention, LogSource, LogSourceCapability } from "../../lib/contract/logs.js";
|
|
2
|
+
export declare function pageCarriesEvents(state: LogQueryResultState): boolean;
|
|
3
|
+
export declare function logQueryExitCode(state: LogQueryResultState): number | undefined;
|
|
4
|
+
export declare function printQueryEvent(event: LogQueryEvent, capability: LogSourceCapability): void;
|
|
5
|
+
export declare function reportRetention(retention: LogRetention): void;
|
|
6
|
+
export declare function reportServedWindow(from: string, to: string, windowClamped: boolean, capability: LogSourceCapability): void;
|
|
7
|
+
export declare function reportScanIncomplete(): void;
|
|
8
|
+
export interface ResultStateContext {
|
|
9
|
+
source: LogSource;
|
|
10
|
+
capability: LogSourceCapability;
|
|
11
|
+
}
|
|
12
|
+
export declare function reportUnreadableState(results: LogQueryResults, { source, capability }: ResultStateContext): void;
|
|
13
|
+
//# sourceMappingURL=log-query-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-query-output.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deployment/log-query-output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAapC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAErE;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAG/E;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAO3F;AAKD,wBAAgB,eAAe,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI,CAS7D;AAGD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,OAAO,EACtB,UAAU,EAAE,mBAAmB,GAC9B,IAAI,CAON;AAKD,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,mBAAmB,CAAC;CACjC;AAQD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,kBAAkB,GACzC,IAAI,CAuDN"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { formatBytes, formatDateTime, formatDuration, output } from "../../index.js";
|
|
2
|
+
import { printLogLine } from "../../lib/log-stream.js";
|
|
3
|
+
// What a customer is told about one answer to a Project-scoped log query: the lines themselves, the
|
|
4
|
+
// bounds that shaped the answer, and the states that carry no lines at all.
|
|
5
|
+
//
|
|
6
|
+
// Every sentence here is composed from the capability resource the control plane published for this
|
|
7
|
+
// query rather than from a constant. A bound that rises is then a control-plane change, and the
|
|
8
|
+
// refusal a customer reads names the number they were actually held to.
|
|
9
|
+
// A page carries lines to print in exactly these two states. PARTIAL is a page with a hole in the
|
|
10
|
+
// middle of its window rather than an empty one, so its lines are printed and the hole is reported
|
|
11
|
+
// beside them.
|
|
12
|
+
export function pageCarriesEvents(state) {
|
|
13
|
+
return state === "AVAILABLE" || state === "PARTIAL";
|
|
14
|
+
}
|
|
15
|
+
// The exit code an answer earns, kept apart from reporting it so that the terminal and `--json`
|
|
16
|
+
// cannot disagree about whether a run succeeded. An empty answer is not a failure: an environment
|
|
17
|
+
// with no output and a window with no matches are both things a customer asked about and got a
|
|
18
|
+
// straight answer to. Everything else is a refusal or a read that failed.
|
|
19
|
+
export function logQueryExitCode(state) {
|
|
20
|
+
if (pageCarriesEvents(state) || state === "NO_LOGS" || state === "NO_MATCHES")
|
|
21
|
+
return undefined;
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
export function printQueryEvent(event, capability) {
|
|
25
|
+
// A line the page cut is marked where it was cut. Reporting only a count at the end would leave a
|
|
26
|
+
// customer reading a sentence that stops mid-word with nothing to say why.
|
|
27
|
+
const message = event.messageTruncated
|
|
28
|
+
? `${event.message} […line cut at ${formatBytes(capability.maxMessageBytes)}]`
|
|
29
|
+
: event.message;
|
|
30
|
+
printLogLine({ timestamp: event.timestamp, message });
|
|
31
|
+
}
|
|
32
|
+
// The retention and search bounds this answer was read under. Printed on every query rather than
|
|
33
|
+
// only on an empty one: what a log search reaches is the first thing a customer has to know before
|
|
34
|
+
// they can read an empty answer as an absence of output rather than as an absence of logs.
|
|
35
|
+
export function reportRetention(retention) {
|
|
36
|
+
output.info(`Logs are retained for ${retention.retentionDays} days, and a log search reaches back to ${formatDateTime(retention.searchableFrom)}.`);
|
|
37
|
+
if (retention.oldestEventObserved !== null) {
|
|
38
|
+
output.info(`The oldest line this search reached was ${formatDateTime(retention.oldestEventObserved)}.`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// The window the server read, which is not always the one the customer asked for.
|
|
42
|
+
export function reportServedWindow(from, to, windowClamped, capability) {
|
|
43
|
+
output.info(`Read ${formatDateTime(from)} to ${formatDateTime(to)}.`);
|
|
44
|
+
if (windowClamped) {
|
|
45
|
+
output.warn(`That window was narrowed to the ${formatDuration(capability.maxQueryWindowSeconds * 1_000)} a log search covers. Name both --since and --until to choose a window inside it.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// A page that stopped before the end of its own window. PAGE_LIMIT and EXPORT_LIMIT cut at an edge
|
|
49
|
+
// and are reported by whoever paged or exported past them, because only that caller knows where it
|
|
50
|
+
// stopped. SCAN_INCOMPLETE is the one that means the answer has a hole in it.
|
|
51
|
+
export function reportScanIncomplete() {
|
|
52
|
+
output.warn("Vendure Cloud could not scan the whole of this window, so lines may be missing from the middle of it. Narrow the window with --since and --until to read it completely.");
|
|
53
|
+
}
|
|
54
|
+
// What a customer is told about a page that carries no lines. The code that answer earns is
|
|
55
|
+
// `logQueryExitCode`.
|
|
56
|
+
//
|
|
57
|
+
// The default branch matters as much as the named ones. The state comes from a control plane that
|
|
58
|
+
// may be newer than this client, so a state added after a release would otherwise print nothing and
|
|
59
|
+
// exit zero, which reads as an empty log rather than as a client too old to explain the answer.
|
|
60
|
+
export function reportUnreadableState(results, { source, capability }) {
|
|
61
|
+
switch (results.state) {
|
|
62
|
+
case "NO_LOGS":
|
|
63
|
+
output.warn(`This environment has no ${source} logs. An environment that has not been deployed yet has none.`);
|
|
64
|
+
return;
|
|
65
|
+
case "NO_MATCHES":
|
|
66
|
+
output.warn(`No ${source} lines in this window matched. Widen it with --since, or drop a filter.`);
|
|
67
|
+
return;
|
|
68
|
+
case "RUNNING":
|
|
69
|
+
// No option reads an existing query back, so running the command again asks the same question
|
|
70
|
+
// afresh rather than collecting this query's answer.
|
|
71
|
+
output.error("Vendure Cloud is still running this log query. Running the command again searches the same window afresh.");
|
|
72
|
+
return;
|
|
73
|
+
case "WINDOW_TOO_WIDE":
|
|
74
|
+
output.error(`A log search covers ${formatDuration(capability.maxQueryWindowSeconds * 1_000)} at a time, and that window is wider. Narrow it with --since and --until.`);
|
|
75
|
+
return;
|
|
76
|
+
case "OUTSIDE_SEARCHABLE_WINDOW":
|
|
77
|
+
output.error(`A log search reaches back ${formatDuration(capability.searchableWindowSeconds * 1_000)}, and that window ends before it. Those lines are still retained for ${capability.retentionDays} days; only the search does not reach them.`);
|
|
78
|
+
return;
|
|
79
|
+
case "RETENTION_EXCEEDED":
|
|
80
|
+
output.error(`Logs are kept for ${capability.retentionDays} days. That window starts before the retained period, so those lines are gone.`);
|
|
81
|
+
return;
|
|
82
|
+
case "INVALID_QUERY":
|
|
83
|
+
output.error(results.errorDetails ?? "Vendure Cloud refused this log query.");
|
|
84
|
+
return;
|
|
85
|
+
case "RATE_LIMITED":
|
|
86
|
+
output.error(rateLimitedMessage(results.retryAfterSeconds));
|
|
87
|
+
return;
|
|
88
|
+
case "UNAVAILABLE":
|
|
89
|
+
output.error(results.errorDetails ?? "Vendure Cloud could not read these logs. Try again.");
|
|
90
|
+
return;
|
|
91
|
+
case "AVAILABLE":
|
|
92
|
+
case "PARTIAL":
|
|
93
|
+
return;
|
|
94
|
+
default:
|
|
95
|
+
// Names no package to update. The same code runs under `vendure`, where the artifact is
|
|
96
|
+
// `@vendure/cloud`, and under `vcloud`, where it is `@vendure/cloud-cli`, so any install
|
|
97
|
+
// command here is wrong on one of the two surfaces.
|
|
98
|
+
output.warn(`Vendure Cloud answered this log query with "${results.state}", which this version of the CLI does not recognise. Update the CLI to see it explained.`);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function rateLimitedMessage(retryAfterSeconds) {
|
|
103
|
+
const wait = retryAfterSeconds === null ? "shortly" : `in ${formatDuration(retryAfterSeconds * 1_000)}`;
|
|
104
|
+
return `Vendure Cloud is reading as many logs at once as it can. Try again ${wait}.`;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=log-query-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-query-output.js","sourceRoot":"","sources":["../../../../src/cli/commands/deployment/log-query-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AASrF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,oGAAoG;AACpG,4EAA4E;AAC5E,EAAE;AACF,oGAAoG;AACpG,gGAAgG;AAChG,wEAAw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K,CACV,qBAAqB,UAAU,CAAC,aAAa,gFAAgF,CAC9H,CAAC;YACF,OAAO;QACT,KAAK,eAAe;YAClB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,uCAAuC,CAAC,CAAC;YAC9E,OAAO;QACT,KAAK,cAAc;YACjB,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC5D,OAAO;QACT,KAAK,aAAa;YAChB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,qDAAqD,CAAC,CAAC;YAC5F,OAAO;QACT,KAAK,WAAW,CAAC;QACjB,KAAK,SAAS;YACZ,OAAO;QACT;YACE,wFAAwF;YACxF,yFAAyF;YACzF,oDAAoD;YACpD,MAAM,CAAC,IAAI,CACT,+CAA+C,OAAO,CAAC,KAAK,0FAA0F,CACvJ,CAAC;YACF,OAAO;IACX,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,iBAAgC;IAC1D,MAAM,IAAI,GACR,iBAAiB,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,cAAc,CAAC,iBAAiB,GAAG,KAAK,CAAC,EAAE,CAAC;IAC7F,OAAO,sEAAsE,IAAI,GAAG,CAAC;AACvF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deployment/logs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deployment/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAOvB,MAAM,gBAAgB,CAAC;AAgDxB,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAiD9C,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG/F"}
|
|
@@ -1,88 +1,366 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { createAuthenticatedClient, output, resolveEnvironment, sleep, writeJson, } from "../../index.js";
|
|
2
|
+
import { LOG_SERVICES, LOG_SEVERITIES, classifyLogSeverity, } from "../../lib/contract/logs.js";
|
|
3
|
+
import { consumeLogStream } from "../../lib/log-stream.js";
|
|
4
|
+
import { exportLogQuery } from "./log-export.js";
|
|
5
|
+
import { logQueryExitCode, pageCarriesEvents, printQueryEvent, reportRetention, reportScanIncomplete, reportServedWindow, reportUnreadableState, } from "./log-query-output.js";
|
|
6
|
+
import { MAX_REPLAY_LINES, readBooleanOption, readLineCount, readStringOption } from "./options.js";
|
|
7
|
+
import { resolveDeploymentIdInEnvironment } from "./shared.js";
|
|
8
|
+
// `logs` reads a VC Environment's runtime output over two protocols: the Project-scoped log query
|
|
9
|
+
// for a window of past output, and the SSE stream for `--follow`.
|
|
10
|
+
//
|
|
11
|
+
// Every bound the query half applies is read from the capability resource the control plane
|
|
12
|
+
// publishes for the Project, so raising one is a control-plane change rather than a CLI release.
|
|
13
|
+
//
|
|
14
|
+
// **A query is answered oldest line first.** The provider pages forward in time and offers no way to
|
|
15
|
+
// page backwards, so reading the newest lines of a wide window would mean walking the whole of it —
|
|
16
|
+
// which spends the read budget a Cell shares between every environment placed in it (ADR-0029). A
|
|
17
|
+
// customer wanting the most recent output narrows the window with `--since` or tails it.
|
|
18
|
+
//
|
|
19
|
+
// A refusal is thrown rather than reported here, so that `reportCommandError` decides between prose
|
|
20
|
+
// and the `--json` error envelope in one place. An *answer* is rendered: either as lines and the
|
|
21
|
+
// bounds that shaped them, or as one JSON document.
|
|
6
22
|
// The migration job writes to the same endpoint but is not part of the stream vocabulary: it runs
|
|
7
23
|
// once and finishes, so `contract/logs.ts` names only the two services that can be tailed. Derived
|
|
8
24
|
// from that list rather than written out again, so a service added to the contract is accepted here
|
|
9
25
|
// without a second edit.
|
|
10
|
-
const BATCH_ONLY_SERVICE = "migration";
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
// the
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
export const BATCH_ONLY_SERVICE = "migration";
|
|
27
|
+
const TAILABLE_SERVICE_NAMES = [...LOG_SERVICES];
|
|
28
|
+
const FOLLOW_SERVICE_NAMES = [...LOG_SERVICES, BATCH_ONLY_SERVICE];
|
|
29
|
+
// How long the CLI waits for a query the control plane answers outside the request. The poll is on
|
|
30
|
+
// the state the answer carries rather than on anything the capability publishes: a backend that
|
|
31
|
+
// starts answering `RUNNING` must need no client release, so the state is handled whatever the
|
|
32
|
+
// published bounds say about it.
|
|
33
|
+
const QUERY_POLL_INTERVAL_MS = 2_000;
|
|
34
|
+
const QUERY_POLL_ATTEMPTS = 30;
|
|
35
|
+
// How many pages one command may read. A page is about one provider read from the budget a Cell
|
|
36
|
+
// shares between every environment placed in it (ADR-0029), so the line budget alone does not bound
|
|
37
|
+
// the cost: the server cuts a page on its byte bound too, and a window of very long lines pages far
|
|
38
|
+
// more often than `--lines` divided by the page size. Twenty pages of the published maximum is the
|
|
39
|
+
// twenty thousand events one window is scanned for, which is as much as an interactive read is
|
|
40
|
+
// worth; a customer wanting more takes the window as a file.
|
|
41
|
+
const MAX_QUERY_PAGES = 20;
|
|
21
42
|
const SINCE_UNIT_MS = {
|
|
22
43
|
s: 1_000,
|
|
23
44
|
m: 60_000,
|
|
24
45
|
h: 3_600_000,
|
|
25
46
|
d: 86_400_000,
|
|
26
47
|
};
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
return;
|
|
48
|
+
// A calendar instant rather than a duration. Deliberately narrow: `Date.parse` reads a bare "6" as a
|
|
49
|
+
// year, so a value that is neither a duration nor a dated timestamp has to be refused here rather
|
|
50
|
+
// than silently becoming the first of January 2006.
|
|
51
|
+
const TIMESTAMP_PATTERN = /^\d{4}-\d{2}-\d{2}([T\s].*)?$/;
|
|
52
|
+
export async function logs({ options, globals }) {
|
|
53
|
+
const requested = readLogOptions(options);
|
|
54
|
+
return requested.follow ? followLogs(requested, globals) : queryLogs(requested, globals);
|
|
55
|
+
}
|
|
56
|
+
function readLogOptions(options) {
|
|
57
|
+
return {
|
|
58
|
+
service: readStringOption(options.service, "--service") ?? "",
|
|
59
|
+
lines: options.lines,
|
|
60
|
+
follow: readBooleanOption(options.follow),
|
|
61
|
+
since: readInstantOption(options.since, "--since"),
|
|
62
|
+
until: readInstantOption(options.until, "--until"),
|
|
63
|
+
include: readStringOption(options.include, "--include"),
|
|
64
|
+
exclude: readStringOption(options.exclude, "--exclude"),
|
|
65
|
+
minimumSeverity: readStringOption(options.minSeverity, "--min-severity"),
|
|
66
|
+
deployment: readStringOption(options.deployment, "--deployment"),
|
|
67
|
+
exportRequested: readBooleanOption(options.export),
|
|
68
|
+
format: readStringOption(options.format, "--format"),
|
|
69
|
+
outputPath: readStringOption(options.output, "--output"),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
// --- Follow: the SSE stream ---
|
|
73
|
+
async function followLogs(requested, globals) {
|
|
74
|
+
const unsupported = queryOnlyFlagsGiven(requested);
|
|
75
|
+
if (unsupported.length > 0) {
|
|
76
|
+
throw new Error(`${andList(unsupported)} ${unsupported.length === 1 ? "searches" : "search"} a window of past output, which --follow does not do. Drop --follow to search, or drop ${unsupported.length === 1 ? "that option" : "those options"} to tail the live stream.`);
|
|
57
77
|
}
|
|
58
|
-
|
|
59
|
-
|
|
78
|
+
if (globals.json === true) {
|
|
79
|
+
throw new Error("Followed log output is text and does not support --json.");
|
|
60
80
|
}
|
|
81
|
+
if (!FOLLOW_SERVICE_NAMES.includes(requested.service)) {
|
|
82
|
+
throw new Error(`Invalid service "${requested.service}". Must be ${orList(FOLLOW_SERVICE_NAMES.map(quoted))}.`);
|
|
83
|
+
}
|
|
84
|
+
if (!TAILABLE_SERVICE_NAMES.includes(requested.service)) {
|
|
85
|
+
throw new Error("The migration job runs once, so its logs can't be streamed. Omit --follow to fetch them.");
|
|
86
|
+
}
|
|
87
|
+
const { environment } = await resolveEnvironment(globals);
|
|
88
|
+
const client = createAuthenticatedClient(globals);
|
|
89
|
+
const query = new URLSearchParams({
|
|
90
|
+
service: requested.service,
|
|
91
|
+
lines: String(readLineCount(requested.lines, "--lines", MAX_REPLAY_LINES)),
|
|
92
|
+
});
|
|
93
|
+
if (requested.since)
|
|
94
|
+
query.set("since", requested.since);
|
|
95
|
+
await consumeLogStream(client, `/environments/${environment.id}/logs/stream?${query}`);
|
|
96
|
+
return undefined;
|
|
61
97
|
}
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
98
|
+
function queryOnlyFlagsGiven(requested) {
|
|
99
|
+
const given = [];
|
|
100
|
+
if (requested.until !== undefined)
|
|
101
|
+
given.push("--until");
|
|
102
|
+
if (requested.include !== undefined)
|
|
103
|
+
given.push("--include");
|
|
104
|
+
if (requested.exclude !== undefined)
|
|
105
|
+
given.push("--exclude");
|
|
106
|
+
if (requested.minimumSeverity !== undefined)
|
|
107
|
+
given.push("--min-severity");
|
|
108
|
+
if (requested.deployment !== undefined)
|
|
109
|
+
given.push("--deployment");
|
|
110
|
+
if (requested.exportRequested)
|
|
111
|
+
given.push("--export");
|
|
112
|
+
if (requested.format !== undefined)
|
|
113
|
+
given.push("--format");
|
|
114
|
+
if (requested.outputPath !== undefined)
|
|
115
|
+
given.push("--output");
|
|
116
|
+
return given;
|
|
65
117
|
}
|
|
66
|
-
|
|
67
|
-
|
|
118
|
+
// --- Query: the Project-scoped log query and its export ---
|
|
119
|
+
async function queryLogs(requested, globals) {
|
|
120
|
+
if (!requested.exportRequested &&
|
|
121
|
+
(requested.format !== undefined || requested.outputPath !== undefined)) {
|
|
122
|
+
throw new Error("--format and --output describe an exported file. Add --export to write one.");
|
|
123
|
+
}
|
|
124
|
+
const { project, environment } = await resolveEnvironment(globals);
|
|
68
125
|
const client = createAuthenticatedClient(globals);
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
126
|
+
const capabilities = await client.get(`/projects/${project.id}/log-capabilities`);
|
|
127
|
+
const capability = capabilities.sources.find((published) => published.source === requested.service);
|
|
128
|
+
if (!capability) {
|
|
129
|
+
throw new Error(`Invalid service "${requested.service}". Must be ${orList(capabilities.sources.map((published) => quoted(published.source)))}.`);
|
|
130
|
+
}
|
|
131
|
+
// A search may walk at most `MAX_QUERY_PAGES` pages, so the largest budget it can honour is that
|
|
132
|
+
// many pages of the published maximum. Asking for more is refused here rather than served short.
|
|
133
|
+
const lines = readLineCount(requested.lines, "--lines", MAX_QUERY_PAGES * capability.maxPageSizeLines);
|
|
134
|
+
const unavailable = unavailableFilters(requested, capability);
|
|
135
|
+
if (unavailable.length > 0) {
|
|
136
|
+
throw new Error(`${andList(unavailable)} cannot be used on "${capability.source}" logs. Vendure Cloud publishes ${orList(capability.filters.map(quoted))} for this source.`);
|
|
137
|
+
}
|
|
138
|
+
const format = readExportFormat(requested, capability);
|
|
139
|
+
const minimumSeverity = readMinimumSeverity(requested);
|
|
140
|
+
const deploymentId = requested.deployment === undefined
|
|
141
|
+
? undefined
|
|
142
|
+
: await resolveDeploymentIdInEnvironment(client, environment.id, requested.deployment);
|
|
143
|
+
const request = {
|
|
144
|
+
environmentIds: [environment.id],
|
|
145
|
+
sources: [capability.source],
|
|
146
|
+
from: requested.since,
|
|
147
|
+
to: requested.until,
|
|
148
|
+
deploymentId,
|
|
149
|
+
include: requested.include,
|
|
150
|
+
exclude: requested.exclude,
|
|
151
|
+
minimumSeverity,
|
|
152
|
+
// An export discards the page the query answers with, so it asks for the smallest one the
|
|
153
|
+
// platform will compose rather than spending a page of the Cell's read budget on lines nobody
|
|
154
|
+
// reads. The file itself is walked at the published maximum, by the control plane.
|
|
155
|
+
pageSize: requested.exportRequested
|
|
156
|
+
? capability.minPageSizeLines
|
|
157
|
+
: clampPageSize(lines, capability),
|
|
158
|
+
};
|
|
159
|
+
const created = await client.post(`/projects/${project.id}/log-queries`, request);
|
|
160
|
+
const query = await settleRunningQuery(client, project.id, created);
|
|
161
|
+
// Which answers are a file is the control plane's decision and not a rule worth holding twice: a
|
|
162
|
+
// window that matched nothing is exported as an empty file on purpose, and a query the published
|
|
163
|
+
// bounds refuse is settled as a failed export carrying the refusal's own sentence. So an export is
|
|
164
|
+
// asked for whatever the first page said, and the record that comes back is what is reported.
|
|
165
|
+
if (requested.exportRequested) {
|
|
166
|
+
reportQueryBounds(query, capability, globals);
|
|
167
|
+
return exportLogQuery({
|
|
168
|
+
client,
|
|
169
|
+
projectId: project.id,
|
|
170
|
+
queryId: query.id,
|
|
171
|
+
capability,
|
|
172
|
+
format,
|
|
173
|
+
outputPath: requested.outputPath,
|
|
174
|
+
json: globals.json === true,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
if (!pageCarriesEvents(query.results.state)) {
|
|
178
|
+
if (globals.json === true) {
|
|
179
|
+
writeQueryDocument(query, query.results, [], false);
|
|
180
|
+
return logQueryExitCode(query.results.state);
|
|
181
|
+
}
|
|
182
|
+
reportUnreadableState(query.results, { source: capability.source, capability });
|
|
183
|
+
reportQueryBounds(query, capability, globals);
|
|
184
|
+
return logQueryExitCode(query.results.state);
|
|
185
|
+
}
|
|
186
|
+
return renderQuery({ client, query, capability, lines, globals });
|
|
187
|
+
}
|
|
188
|
+
// Walks the query's pages until the customer's line budget is spent or the window ends, which is
|
|
189
|
+
// what keeps one command bounded: a page is one provider read, and `--lines` is how many of them it
|
|
190
|
+
// is worth.
|
|
191
|
+
async function renderQuery({ client, query, capability, lines, globals, }) {
|
|
192
|
+
const json = globals.json === true;
|
|
193
|
+
const collected = [];
|
|
194
|
+
const context = { source: capability.source, capability };
|
|
195
|
+
let page = query.results;
|
|
196
|
+
// The page whose state describes the answer, which is the last one that carried lines. A walk that
|
|
197
|
+
// ends on an empty page has reached the end of its window, and reporting that page's `NO_MATCHES`
|
|
198
|
+
// beside the lines the walk did return would be two answers to one question.
|
|
199
|
+
let answered = query.results;
|
|
200
|
+
let rendered = 0;
|
|
201
|
+
let leftOnPage = false;
|
|
202
|
+
let scanIncomplete = false;
|
|
203
|
+
for (let read = 1;; read++) {
|
|
204
|
+
if (!pageCarriesEvents(page.state)) {
|
|
205
|
+
// Reached part way through a walk, an empty answer is the end of the window rather than an
|
|
206
|
+
// empty window: the pages before it carried lines. Anything else stopped the read, and a walk
|
|
207
|
+
// presented as complete when it was cut short is the one thing this must not do.
|
|
208
|
+
if (page.state === "NO_LOGS" || page.state === "NO_MATCHES")
|
|
209
|
+
break;
|
|
210
|
+
if (json)
|
|
211
|
+
writeQueryDocument(query, page, collected, false);
|
|
212
|
+
else
|
|
213
|
+
reportUnreadableState(page, context);
|
|
214
|
+
return logQueryExitCode(page.state);
|
|
215
|
+
}
|
|
216
|
+
answered = page;
|
|
217
|
+
if (page.state === "PARTIAL")
|
|
218
|
+
scanIncomplete = true;
|
|
219
|
+
for (const event of page.events) {
|
|
220
|
+
if (rendered >= lines) {
|
|
221
|
+
// The page carried more than the line budget. A page is floored at the published minimum, so
|
|
222
|
+
// this is the ordinary way a small `--lines` leaves lines behind, and it happens on a page
|
|
223
|
+
// the server handed no cursor with.
|
|
224
|
+
leftOnPage = true;
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
if (json)
|
|
228
|
+
collected.push(event);
|
|
229
|
+
else
|
|
230
|
+
printQueryEvent(event, capability);
|
|
231
|
+
rendered += 1;
|
|
232
|
+
}
|
|
233
|
+
// A page the server hands a cursor with always carries at least one event, so a page that
|
|
234
|
+
// carried none has made no progress and following its cursor would repeat this read for ever.
|
|
235
|
+
if (rendered >= lines || page.nextCursor === null || page.events.length === 0)
|
|
236
|
+
break;
|
|
237
|
+
if (read >= MAX_QUERY_PAGES)
|
|
238
|
+
break;
|
|
239
|
+
page = await client.get(`/projects/${query.projectId}/log-queries/${encodeURIComponent(query.id)}/results?cursor=${encodeURIComponent(page.nextCursor)}`);
|
|
240
|
+
}
|
|
241
|
+
const hasMore = page.nextCursor !== null || leftOnPage;
|
|
242
|
+
if (json) {
|
|
243
|
+
writeQueryDocument(query, answered, collected, hasMore);
|
|
244
|
+
return undefined;
|
|
245
|
+
}
|
|
246
|
+
if (scanIncomplete)
|
|
247
|
+
reportScanIncomplete();
|
|
248
|
+
if (hasMore) {
|
|
249
|
+
output.warn(`Stopped after ${rendered} lines, and this window holds more. Raise --lines, or narrow the window with --since and --until.`);
|
|
250
|
+
}
|
|
251
|
+
reportQueryBounds(query, capability, globals);
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
// One document per run under `--json`, whatever the answer was. An empty or refused answer writes
|
|
255
|
+
// the same shape with no events, so a caller parsing the output never has to read an exit code to
|
|
256
|
+
// find out whether anything was written.
|
|
257
|
+
function writeQueryDocument(query, answered, events, hasMore) {
|
|
258
|
+
writeJson({
|
|
259
|
+
queryId: query.id,
|
|
260
|
+
capabilityVersion: query.capabilityVersion,
|
|
261
|
+
query: query.query,
|
|
262
|
+
state: answered.state,
|
|
263
|
+
truncationReason: answered.truncationReason,
|
|
264
|
+
retention: query.results.retention,
|
|
265
|
+
hasMore,
|
|
266
|
+
events,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
// The window this answer was read over and the retention behind it. Both come from the answer rather
|
|
270
|
+
// than from what was asked for: the server narrows a window to the searchable floor and says so, and
|
|
271
|
+
// a customer reading an empty page needs to know which window was actually read.
|
|
272
|
+
function reportQueryBounds(query, capability, globals) {
|
|
273
|
+
if (globals.json === true)
|
|
84
274
|
return;
|
|
275
|
+
reportServedWindow(query.query.from, query.query.to, query.query.windowClamped, capability);
|
|
276
|
+
reportRetention(query.results.retention);
|
|
277
|
+
}
|
|
278
|
+
async function settleRunningQuery(client, projectId, created) {
|
|
279
|
+
let current = created;
|
|
280
|
+
for (let attempt = 1; current.results.state === "RUNNING" && attempt <= QUERY_POLL_ATTEMPTS; attempt++) {
|
|
281
|
+
await sleep(QUERY_POLL_INTERVAL_MS);
|
|
282
|
+
current = await client.get(`/projects/${projectId}/log-queries/${encodeURIComponent(current.id)}`);
|
|
283
|
+
}
|
|
284
|
+
return current;
|
|
285
|
+
}
|
|
286
|
+
// Each filter the customer supplied that this source does not publish. Read from the capability
|
|
287
|
+
// rather than assumed, so a source that gains or loses one needs no CLI release to say so.
|
|
288
|
+
function unavailableFilters(requested, capability) {
|
|
289
|
+
const asked = [
|
|
290
|
+
["--since", requested.since !== undefined, "TIME"],
|
|
291
|
+
["--until", requested.until !== undefined, "TIME"],
|
|
292
|
+
["--include", requested.include !== undefined, "INCLUDE_TEXT"],
|
|
293
|
+
["--exclude", requested.exclude !== undefined, "EXCLUDE_TEXT"],
|
|
294
|
+
["--min-severity", requested.minimumSeverity !== undefined, "MINIMUM_SEVERITY"],
|
|
295
|
+
["--deployment", requested.deployment !== undefined, "DEPLOYMENT"],
|
|
296
|
+
];
|
|
297
|
+
return asked
|
|
298
|
+
.filter(([, given, filter]) => given && !capability.filters.includes(filter))
|
|
299
|
+
.map(([flag]) => flag);
|
|
300
|
+
}
|
|
301
|
+
function readExportFormat(requested, capability) {
|
|
302
|
+
if (requested.format === undefined)
|
|
303
|
+
return undefined;
|
|
304
|
+
const asked = requested.format.trim().toUpperCase();
|
|
305
|
+
const published = capability.exportFormats.find((format) => format === asked);
|
|
306
|
+
if (published === undefined) {
|
|
307
|
+
throw new Error(`Invalid --format "${requested.format}". This source exports ${orList(capability.exportFormats.map((format) => quoted(format.toLowerCase())))}.`);
|
|
308
|
+
}
|
|
309
|
+
return published;
|
|
310
|
+
}
|
|
311
|
+
function readMinimumSeverity(requested) {
|
|
312
|
+
if (requested.minimumSeverity === undefined)
|
|
313
|
+
return undefined;
|
|
314
|
+
const severity = classifyLogSeverity(requested.minimumSeverity);
|
|
315
|
+
if (severity === null) {
|
|
316
|
+
throw new Error(`Invalid --min-severity "${requested.minimumSeverity}". Must be ${orList(LOG_SEVERITIES.map(quoted))}.`);
|
|
85
317
|
}
|
|
86
|
-
|
|
318
|
+
return severity;
|
|
319
|
+
}
|
|
320
|
+
// A page below the published floor costs the same provider read as one at it, so a customer asking
|
|
321
|
+
// for fewer lines than a page carries is served a page and shown the part they asked for.
|
|
322
|
+
function clampPageSize(lines, capability) {
|
|
323
|
+
return Math.min(Math.max(lines, capability.minPageSizeLines), capability.maxPageSizeLines);
|
|
324
|
+
}
|
|
325
|
+
// A `--since` or `--until` value as the ISO-8601 instant the control plane understands. Read here,
|
|
326
|
+
// before any request is made, so a value nothing can parse is refused without spending a round trip
|
|
327
|
+
// on it.
|
|
328
|
+
function readInstantOption(value, flag) {
|
|
329
|
+
const given = readStringOption(value, flag);
|
|
330
|
+
return given === undefined ? undefined : parseInstant(given, flag);
|
|
331
|
+
}
|
|
332
|
+
// A duration such as "30m", "6h" or "2d" is that long before now; anything else must be a dated
|
|
333
|
+
// timestamp.
|
|
334
|
+
function parseInstant(value, flag) {
|
|
335
|
+
const trimmed = value.trim();
|
|
336
|
+
const duration = trimmed.match(/^(\d+)\s*([smhd])$/i);
|
|
337
|
+
const unitMs = duration ? SINCE_UNIT_MS[duration[2].toLowerCase()] : undefined;
|
|
338
|
+
if (duration && unitMs !== undefined) {
|
|
339
|
+
return new Date(Date.now() - Number(duration[1]) * unitMs).toISOString();
|
|
340
|
+
}
|
|
341
|
+
const parsed = TIMESTAMP_PATTERN.test(trimmed) ? Date.parse(trimmed) : Number.NaN;
|
|
342
|
+
if (Number.isFinite(parsed))
|
|
343
|
+
return new Date(parsed).toISOString();
|
|
344
|
+
throw new Error(`Invalid ${flag} value "${value}". Use a number followed by s, m, h, or d (e.g. 30m, 6h, 2d), or an ISO-8601 timestamp.`);
|
|
345
|
+
}
|
|
346
|
+
// The refusal names the list it checked against rather than a second copy of it. A hand-written
|
|
347
|
+
// sentence here would go wrong the first time the contract grows a service: the check would accept
|
|
348
|
+
// the new name and the message would still deny it exists.
|
|
349
|
+
//
|
|
350
|
+
// Two joins, because the two kinds of list read differently: a choice the caller has to pick one of
|
|
351
|
+
// is "a, b, or c", and a set of options the caller actually supplied is "a, b, and c".
|
|
352
|
+
function orList(names) {
|
|
353
|
+
return joinList(names, "or");
|
|
354
|
+
}
|
|
355
|
+
function andList(names) {
|
|
356
|
+
return joinList(names, "and");
|
|
357
|
+
}
|
|
358
|
+
function joinList(names, conjunction) {
|
|
359
|
+
if (names.length < 2)
|
|
360
|
+
return names.join("");
|
|
361
|
+
return `${names.slice(0, -1).join(", ")}, ${conjunction} ${names[names.length - 1]}`;
|
|
362
|
+
}
|
|
363
|
+
function quoted(name) {
|
|
364
|
+
return `"${name}"`;
|
|
87
365
|
}
|
|
88
366
|
//# sourceMappingURL=logs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../../src/cli/commands/deployment/logs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAGL,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAiB,MAAM,4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AAC,GAAG,CAAC,KAAK,CACf,0FAA0F,CAC3F,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAChE,OAAO;IACT,CAAC;IACD,MAAM,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACtE,CAAC"}
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../../src/cli/commands/deployment/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,yBAAyB,EACzB,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,YAAY,EACZ,cAAc,EASd,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAE/D,kGAAkG;AAClG,kEAAkE;AAClE,EAAE;AACF,4FAA4F;AAC5F,iGAAiG;AACjG,EAAE;AACF,qGAAqG;AACrG,oGAAoG;AACpG,kGAAkG;AAClG,yFAAyF;AACzF,EAAE;AACF,oGAAoG;AACpG,iGAAiG;AACjG,oDAAoD;AAEpD,kGAAkG;AAClG,mGAAmG;AACnG,oGAAoG;A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