@heroku/plugin-compute 0.3.0 → 0.3.2
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/lib/commands/compute/create/telemetry-drain.d.ts +21 -0
- package/lib/commands/compute/create/telemetry-drain.js +82 -0
- package/lib/commands/compute/create/telemetry-drain.js.map +1 -0
- package/lib/commands/compute/delete/telemetry-drain.d.ts +20 -0
- package/lib/commands/compute/delete/telemetry-drain.js +60 -0
- package/lib/commands/compute/delete/telemetry-drain.js.map +1 -0
- package/lib/commands/compute/deploy.d.ts +5 -11
- package/lib/commands/compute/deploy.js +7 -65
- package/lib/commands/compute/deploy.js.map +1 -1
- package/lib/commands/compute/display/telemetry-drain.d.ts +1 -0
- package/lib/commands/compute/display/telemetry-drain.js +4 -3
- package/lib/commands/compute/display/telemetry-drain.js.map +1 -1
- package/lib/commands/compute/display.d.ts +1 -0
- package/lib/commands/compute/display.js +2 -1
- package/lib/commands/compute/display.js.map +1 -1
- package/lib/commands/compute/generate.d.ts +5 -0
- package/lib/commands/compute/generate.js +6 -0
- package/lib/commands/compute/generate.js.map +1 -1
- package/lib/commands/compute/get/build-log.d.ts +1 -0
- package/lib/commands/compute/get/build-log.js +2 -1
- package/lib/commands/compute/get/build-log.js.map +1 -1
- package/lib/commands/compute/get/config.d.ts +1 -0
- package/lib/commands/compute/get/config.js +2 -1
- package/lib/commands/compute/get/config.js.map +1 -1
- package/lib/commands/compute/get/runtime-log.d.ts +1 -0
- package/lib/commands/compute/get/runtime-log.js +14 -3
- package/lib/commands/compute/get/runtime-log.js.map +1 -1
- package/lib/commands/compute/list/config.d.ts +1 -0
- package/lib/commands/compute/list/config.js +2 -1
- package/lib/commands/compute/list/config.js.map +1 -1
- package/lib/commands/compute/list/telemetry-drain.d.ts +1 -0
- package/lib/commands/compute/list/telemetry-drain.js +2 -1
- package/lib/commands/compute/list/telemetry-drain.js.map +1 -1
- package/lib/commands/compute/list.d.ts +1 -0
- package/lib/commands/compute/list.js +2 -1
- package/lib/commands/compute/list.js.map +1 -1
- package/lib/commands/compute/scale.d.ts +1 -0
- package/lib/commands/compute/scale.js +2 -1
- package/lib/commands/compute/scale.js.map +1 -1
- package/lib/commands/compute/set/config.d.ts +1 -0
- package/lib/commands/compute/set/config.js +2 -1
- package/lib/commands/compute/set/config.js.map +1 -1
- package/lib/commands/compute/source/retrieve.d.ts +1 -0
- package/lib/commands/compute/source/retrieve.js +2 -1
- package/lib/commands/compute/source/retrieve.js.map +1 -1
- package/lib/commands/compute/tail/runtime-log.d.ts +1 -0
- package/lib/commands/compute/tail/runtime-log.js +22 -6
- package/lib/commands/compute/tail/runtime-log.js.map +1 -1
- package/lib/commands/compute/unset/config.d.ts +1 -0
- package/lib/commands/compute/unset/config.js +2 -1
- package/lib/commands/compute/unset/config.js.map +1 -1
- package/lib/commands/compute/update/telemetry-drain.d.ts +21 -0
- package/lib/commands/compute/update/telemetry-drain.js +70 -0
- package/lib/commands/compute/update/telemetry-drain.js.map +1 -0
- package/lib/shared/computeGenerateSkeletons.js +4 -2
- package/lib/shared/computeGenerateSkeletons.js.map +1 -1
- package/lib/shared/computeLogStream.d.ts +6 -1
- package/lib/shared/computeLogStream.js +30 -3
- package/lib/shared/computeLogStream.js.map +1 -1
- package/lib/shared/computeTelemetryDrain.d.ts +12 -0
- package/lib/shared/computeTelemetryDrain.js +33 -7
- package/lib/shared/computeTelemetryDrain.js.map +1 -1
- package/lib/shared/herokuProxyApi.js +2 -2
- package/messages/compute.create.telemetry-drain.md +53 -0
- package/messages/compute.delete.telemetry-drain.md +41 -0
- package/messages/compute.deploy.md +12 -70
- package/messages/compute.display.telemetry-drain.md +1 -0
- package/messages/compute.errors.md +23 -5
- package/messages/compute.generate.md +8 -0
- package/messages/compute.get.runtime-log.md +19 -0
- package/messages/compute.source.retrieve.md +1 -1
- package/messages/compute.update.telemetry-drain.md +57 -0
- package/npm-shrinkwrap.json +147 -504
- package/oclif.manifest.json +489 -100
- package/package.json +4 -4
- package/schemas/compute-create-telemetry__drain.json +44 -0
- package/schemas/compute-delete-telemetry__drain.json +22 -0
- package/schemas/compute-update-telemetry__drain.json +43 -0
- package/schemas/compute-deploy.json +0 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeGenerateSkeletons.js","sourceRoot":"","sources":["../../src/shared/computeGenerateSkeletons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,6FAA6F;AAC7F,0FAA0F;AAC1F,8FAA8F;AAC9F,+FAA+F;AAC/F,iGAAiG;AACjG,+FAA+F;AAC/F,+CAA+C;AAC/C,EAAE;AACF,sFAAsF;AACtF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAA6C;IAC3E,IAAI,EAAE;QACJ,cAAc,EAAE;;;;;;;;;;;CAWnB;QACG,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBpB;QACG,qBAAqB,EAAE;;;;;;;;;;;;;;CAc1B;QACG,iCAAiC,EAAE;;;;;;;;;;;;CAYtC;QACG,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"computeGenerateSkeletons.js","sourceRoot":"","sources":["../../src/shared/computeGenerateSkeletons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,6FAA6F;AAC7F,0FAA0F;AAC1F,8FAA8F;AAC9F,+FAA+F;AAC/F,iGAAiG;AACjG,+FAA+F;AAC/F,+CAA+C;AAC/C,EAAE;AACF,sFAAsF;AACtF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAA6C;IAC3E,IAAI,EAAE;QACJ,cAAc,EAAE;;;;;;;;;;;CAWnB;QACG,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBpB;QACG,qBAAqB,EAAE;;;;;;;;;;;;;;CAc1B;QACG,iCAAiC,EAAE;;;;;;;;;;;;CAYtC;QACG,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BhB;KACE;IACD,MAAM,EAAE;QACN,cAAc,EAAE;;;;;;;;;;;CAWnB;QACG,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBpB;QACG,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkElB;QACG,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgChB;KACE;CACF,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const LOGPLEX_FETCH_TIMEOUT_MS = 30000;
|
|
2
|
+
export type LogplexSnapshot = {
|
|
3
|
+
output: string;
|
|
4
|
+
timedOut: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function fetchLogplexOutput(logplexUrl: string, timeoutMs?: number): Promise<LogplexSnapshot>;
|
|
2
7
|
export declare function fetchBuildOutputStream(outputStreamUrl: string): Promise<string>;
|
|
3
8
|
export type StreamEndReason = 'aborted' | 'eof';
|
|
4
9
|
export declare function streamLogplexOutput(logplexUrl: string, onLine: (line: string) => void, signal?: AbortSignal): Promise<StreamEndReason>;
|
|
@@ -21,15 +21,42 @@ const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.errors');
|
|
|
21
21
|
// handed back by a Heroku proxy call) -- these calls are raw fetch against the URL Heroku gave
|
|
22
22
|
// us, not connection.request() (wrong host, no Salesforce bearer token applies) and not a
|
|
23
23
|
// Heroku-token-bearing client (wrong host, no Heroku bearer token held client-side).
|
|
24
|
-
|
|
24
|
+
// Fir apps keep no log history, so their session URL streams and never closes; the timeout also
|
|
25
|
+
// covers a Cedar logplex that stalls, so the one-shot fetch can never wait indefinitely.
|
|
26
|
+
export const LOGPLEX_FETCH_TIMEOUT_MS = 30_000;
|
|
27
|
+
// On timeout, returns the partial output if any arrived rather than discarding it; throws only
|
|
28
|
+
// when nothing arrived before the deadline.
|
|
29
|
+
export async function fetchLogplexOutput(logplexUrl, timeoutMs = LOGPLEX_FETCH_TIMEOUT_MS) {
|
|
30
|
+
const signal = AbortSignal.timeout(timeoutMs);
|
|
31
|
+
let output = '';
|
|
25
32
|
try {
|
|
26
|
-
const response = await fetch(logplexUrl);
|
|
33
|
+
const response = await fetch(logplexUrl, { signal });
|
|
27
34
|
if (!response.ok) {
|
|
28
35
|
throw new Error(`HTTP ${response.status}`);
|
|
29
36
|
}
|
|
30
|
-
|
|
37
|
+
if (!response.body) {
|
|
38
|
+
return { output: await response.text(), timedOut: false };
|
|
39
|
+
}
|
|
40
|
+
const reader = response.body.getReader();
|
|
41
|
+
const decoder = new TextDecoder();
|
|
42
|
+
while (true) {
|
|
43
|
+
// Sequential reads of one ordered stream -- there's nothing to parallelize.
|
|
44
|
+
// eslint-disable-next-line no-await-in-loop
|
|
45
|
+
const { done, value } = await reader.read();
|
|
46
|
+
if (done) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
output += decoder.decode(value, { stream: true });
|
|
50
|
+
}
|
|
51
|
+
return { output: output + decoder.decode(), timedOut: false };
|
|
31
52
|
}
|
|
32
53
|
catch (error) {
|
|
54
|
+
if (signal.aborted) {
|
|
55
|
+
if (output.length > 0) {
|
|
56
|
+
return { output, timedOut: true };
|
|
57
|
+
}
|
|
58
|
+
throw messages.createError('error.logFetchTimedOut', [String(Math.round(timeoutMs / 1000))]);
|
|
59
|
+
}
|
|
33
60
|
throw messages.createError('error.logStreamFailed', [error.message]);
|
|
34
61
|
}
|
|
35
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeLogStream.js","sourceRoot":"","sources":["../../src/shared/computeLogStream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC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AAoB;IACpB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAA6C,CAAC;IACpF,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;YACZ,4EAA4E;YAC5E,4CAA4C;YAC5C,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1C,IAAI,IAAI,EAAE,CAAC;gBACT,MAAM;YACR,CAAC;YAED,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjC,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;YAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,CAAC,IAAI,CAAC,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACpB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,QAAQ,CAAC,WAAW,CAAC,uBAAuB,EAAE,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC;IAED,8FAA8F;IAC9F,iGAAiG;IACjG,2DAA2D;IAC3D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { components } from '../generated/heroku-platform-api.js';
|
|
2
2
|
import type { TelemetryExporterType, TelemetrySignal } from './herokuProxyApi.js';
|
|
3
|
+
export declare function maskHeaderValues(headers: Record<string, string>): Record<string, string>;
|
|
3
4
|
export declare const TELEMETRY_SIGNALS: readonly TelemetrySignal[];
|
|
4
5
|
export declare const TELEMETRY_TRANSPORTS: readonly string[];
|
|
6
|
+
export declare const PUBLIC_TRANSPORTS: readonly string[];
|
|
5
7
|
export declare function validateAndFormatSignals(input: string): TelemetrySignal[];
|
|
6
8
|
export declare function exporterTypeForTransport(transport: string): TelemetryExporterType;
|
|
7
9
|
export declare function transportLabelForExporterType(exporterType: string): string;
|
|
@@ -9,3 +11,13 @@ export declare function formatTelemetryDrainRows(drain: components['schemas']['T
|
|
|
9
11
|
key: string;
|
|
10
12
|
value: string;
|
|
11
13
|
}>;
|
|
14
|
+
export declare function parseHeaderFlags(inputs: readonly string[]): Record<string, string>;
|
|
15
|
+
export type TelemetryDrainResult = {
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
exporterType?: string;
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
id: string;
|
|
20
|
+
signals: string[];
|
|
21
|
+
transport?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function toTelemetryDrainResult(drain: components['schemas']['TelemetryDrain']): TelemetryDrainResult;
|
|
@@ -20,13 +20,10 @@ const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.errors');
|
|
|
20
20
|
// Placeholder for a drain field the platform left unset -- matches the dash the other compute
|
|
21
21
|
// tables use so single-drain display reads consistently.
|
|
22
22
|
const DASH = '-';
|
|
23
|
-
// Exporter
|
|
24
|
-
//
|
|
25
|
-
// can't leak into terminal scrollback, screen-shares, or screenshots. The machine-readable --json
|
|
26
|
-
// result keeps them verbatim -- same trust boundary as the authenticated caller (see
|
|
27
|
-
// display/telemetry-drain.ts). Masks a copy; never mutates the caller's drain object.
|
|
23
|
+
// Exporter headers routinely carry credentials, so both human and JSON output mask every value.
|
|
24
|
+
// Mask a copy to preserve credentials in API requests and the caller's drain object.
|
|
28
25
|
const REDACTED = '<redacted>';
|
|
29
|
-
function maskHeaderValues(headers) {
|
|
26
|
+
export function maskHeaderValues(headers) {
|
|
30
27
|
return Object.fromEntries(Object.keys(headers).map(key => [key, REDACTED]));
|
|
31
28
|
}
|
|
32
29
|
// The three OpenTelemetry signal categories a drain can forward. Order matches the
|
|
@@ -41,6 +38,8 @@ const TRANSPORT_TO_EXPORTER = {
|
|
|
41
38
|
splunk: 'splunk',
|
|
42
39
|
};
|
|
43
40
|
export const TELEMETRY_TRANSPORTS = Object.keys(TRANSPORT_TO_EXPORTER);
|
|
41
|
+
// The transports advertised to users (error text, hints). `splunk` is still accepted but stays hidden.
|
|
42
|
+
export const PUBLIC_TRANSPORTS = ['http', 'grpc'];
|
|
44
43
|
// DELIBERATELY case-sensitive, non-trimming, and treats `all` only as the whole input (never as a
|
|
45
44
|
// comma-separated element). This is an explicit decision, not an oversight: the plugin is pre-GA and
|
|
46
45
|
// no command consumes this yet, so staying strict now is the safe direction -- leniency (trimming,
|
|
@@ -61,7 +60,8 @@ export function validateAndFormatSignals(input) {
|
|
|
61
60
|
// (exact-match, no trim/case-fold); an unknown transport throws rather than silently defaulting.
|
|
62
61
|
export function exporterTypeForTransport(transport) {
|
|
63
62
|
if (!Object.hasOwn(TRANSPORT_TO_EXPORTER, transport)) {
|
|
64
|
-
|
|
63
|
+
const publicList = PUBLIC_TRANSPORTS.join(', ');
|
|
64
|
+
throw messages.createError('error.invalidTransport', [transport, publicList], [publicList]);
|
|
65
65
|
}
|
|
66
66
|
return TRANSPORT_TO_EXPORTER[transport];
|
|
67
67
|
}
|
|
@@ -83,4 +83,30 @@ export function formatTelemetryDrainRows(drain, appName) {
|
|
|
83
83
|
{ key: 'Headers', value: hasHeaders ? JSON.stringify(maskHeaderValues(headers)) : DASH },
|
|
84
84
|
];
|
|
85
85
|
}
|
|
86
|
+
// Splits on the first = only, so a header value that itself contains one (e.g. a base64 token's
|
|
87
|
+
// padding) isn't truncated. Requires a non-empty key; an empty value is allowed.
|
|
88
|
+
const HEADER_PATTERN = /^([^=]+)=(.*)$/v;
|
|
89
|
+
// Turns repeated --header key=value flags into the exporter headers object. A repeated key keeps its
|
|
90
|
+
// last value. Built via fromEntries so a key like `__proto__` becomes an own property rather than
|
|
91
|
+
// touching the prototype.
|
|
92
|
+
export function parseHeaderFlags(inputs) {
|
|
93
|
+
const entries = inputs.map((input) => {
|
|
94
|
+
const match = HEADER_PATTERN.exec(input);
|
|
95
|
+
if (!match) {
|
|
96
|
+
throw messages.createError('error.invalidHeader');
|
|
97
|
+
}
|
|
98
|
+
return [match[1], match[2]];
|
|
99
|
+
});
|
|
100
|
+
return Object.fromEntries(entries);
|
|
101
|
+
}
|
|
102
|
+
export function toTelemetryDrainResult(drain) {
|
|
103
|
+
return {
|
|
104
|
+
id: drain.id ?? '',
|
|
105
|
+
signals: drain.signals ?? [],
|
|
106
|
+
endpoint: drain.exporter?.endpoint,
|
|
107
|
+
exporterType: drain.exporter?.type,
|
|
108
|
+
transport: drain.exporter?.type ? transportLabelForExporterType(drain.exporter.type) : undefined,
|
|
109
|
+
headers: drain.exporter?.headers === undefined ? undefined : maskHeaderValues(drain.exporter.headers),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
86
112
|
//# sourceMappingURL=computeTelemetryDrain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeTelemetryDrain.js","sourceRoot":"","sources":["../../src/shared/computeTelemetryDrain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAK1C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAEtE,8FAA8F;AAC9F,yDAAyD;AACzD,MAAM,IAAI,G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K,EAAoB,EAAE;QACrD,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,QAAQ,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAcD,MAAM,UAAU,sBAAsB,CAAC,KAA8C;IACnF,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ;QAClC,YAAY,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI;QAClC,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAChG,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;KACtG,CAAC;AACJ,CAAC"}
|
|
@@ -193,7 +193,7 @@ export async function updateComputeConfigVarsViaProxy(connection, params) {
|
|
|
193
193
|
}
|
|
194
194
|
// Shared by display.ts (formation display) and config/set.ts + config/unset.ts (post-update
|
|
195
195
|
// release number) -- the one place that owns "list releases, take the highest version number."
|
|
196
|
-
// Range: version ..; max=1
|
|
196
|
+
// Range: version ..; max=1, order=desc asks Heroku for just the single highest-version release,
|
|
197
197
|
// but Math.max is still applied defensively rather than trusting max=1 to always return exactly
|
|
198
198
|
// one element. Returns undefined (not an error) for a brand-new app with no releases yet.
|
|
199
199
|
export async function fetchLatestReleaseVersionViaProxy(connection, params) {
|
|
@@ -202,7 +202,7 @@ export async function fetchLatestReleaseVersionViaProxy(connection, params) {
|
|
|
202
202
|
method: 'GET',
|
|
203
203
|
path: '/apps/{app_id_or_name}/releases',
|
|
204
204
|
params: { app_id_or_name: params.appId },
|
|
205
|
-
headers: { Range: 'version ..; max=1
|
|
205
|
+
headers: { Range: 'version ..; max=1, order=desc' },
|
|
206
206
|
});
|
|
207
207
|
const versions = releases.map(r => r.version).filter((v) => v !== undefined);
|
|
208
208
|
return versions.length === 0 ? undefined : Math.max(...versions);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Add a telemetry drain to a compute app.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Creates an OpenTelemetry drain that forwards the compute app's logs, metrics,
|
|
8
|
+
and traces to the endpoint you give with --url. Choose which signals to
|
|
9
|
+
forward with --signals and the wire protocol with --transport. Use
|
|
10
|
+
sf compute update telemetry-drain to change a drain later.
|
|
11
|
+
|
|
12
|
+
# flags.name.summary
|
|
13
|
+
|
|
14
|
+
DeveloperName of the compute app to add the drain to (or
|
|
15
|
+
<namespace>\_\_<developerName> if it was deployed under a namespace).
|
|
16
|
+
Defaults to the COMPUTE_APP_NAME environment variable, or the current
|
|
17
|
+
directory's app name if that isn't set either.
|
|
18
|
+
|
|
19
|
+
# flags.url.summary
|
|
20
|
+
|
|
21
|
+
Endpoint to forward telemetry to.
|
|
22
|
+
|
|
23
|
+
# flags.signals.summary
|
|
24
|
+
|
|
25
|
+
Comma-separated signals to forward: traces, metrics, logs, or all.
|
|
26
|
+
|
|
27
|
+
# flags.transport.summary
|
|
28
|
+
|
|
29
|
+
Wire protocol to use: http (OTLP over HTTP) or grpc (OTLP over gRPC).
|
|
30
|
+
|
|
31
|
+
# flags.header.summary
|
|
32
|
+
|
|
33
|
+
Header to send with each export, as key=value.
|
|
34
|
+
|
|
35
|
+
# flags.header.description
|
|
36
|
+
|
|
37
|
+
Repeat the flag to send more than one header. Header values often carry
|
|
38
|
+
credentials; they are sent to the endpoint and are never printed to the
|
|
39
|
+
terminal or --json output; header keys are preserved with redacted values.
|
|
40
|
+
|
|
41
|
+
# info.created
|
|
42
|
+
|
|
43
|
+
Created telemetry drain %s for %s.
|
|
44
|
+
|
|
45
|
+
# examples
|
|
46
|
+
|
|
47
|
+
- Forward all signals from a compute app to an OTLP/HTTP collector:
|
|
48
|
+
|
|
49
|
+
<%= config.bin %> <%= command.id %> --name CreditRatingScorer --url https://collector.example.com:4318 --target-org my-org
|
|
50
|
+
|
|
51
|
+
- Forward only traces and logs over gRPC, with an auth header:
|
|
52
|
+
|
|
53
|
+
<%= config.bin %> <%= command.id %> --name CreditRatingScorer --url https://collector.example.com:4317 --transport grpc --signals traces,logs --header "x-api-key=my-key" --target-org my-org
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Delete a compute telemetry drain.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Removes a single OpenTelemetry drain by its ID, so its compute app stops
|
|
8
|
+
forwarding logs, metrics, and traces to the drain's endpoint. This can't be
|
|
9
|
+
undone; to forward telemetry again, create a new drain. You're asked to
|
|
10
|
+
confirm first unless you pass --no-prompt. Use sf compute list telemetry-drain
|
|
11
|
+
to find a drain's ID.
|
|
12
|
+
|
|
13
|
+
# args.id.summary
|
|
14
|
+
|
|
15
|
+
ID of the telemetry drain to delete.
|
|
16
|
+
|
|
17
|
+
# flags.no-prompt.summary
|
|
18
|
+
|
|
19
|
+
Don't ask for confirmation before deleting.
|
|
20
|
+
|
|
21
|
+
# info.confirm
|
|
22
|
+
|
|
23
|
+
Delete telemetry drain %s? This stops forwarding telemetry to its endpoint.
|
|
24
|
+
|
|
25
|
+
# info.aborted
|
|
26
|
+
|
|
27
|
+
Telemetry drain %s was not deleted.
|
|
28
|
+
|
|
29
|
+
# info.deleted
|
|
30
|
+
|
|
31
|
+
Deleted telemetry drain %s.
|
|
32
|
+
|
|
33
|
+
# examples
|
|
34
|
+
|
|
35
|
+
- Delete a telemetry drain, confirming first:
|
|
36
|
+
|
|
37
|
+
<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --target-org my-org
|
|
38
|
+
|
|
39
|
+
- Delete a telemetry drain without the confirmation prompt, for scripts:
|
|
40
|
+
|
|
41
|
+
<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --target-org my-org --no-prompt
|
|
@@ -1,84 +1,26 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Show how to deploy a compute app.
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
deploys the app's <name>.compute-meta.xml through the
|
|
11
|
-
Metadata API to trigger the build. The metadata deploy itself returns a job
|
|
12
|
-
ID that can be checked independently with "sf project deploy report
|
|
13
|
-
--job-id <id>". Deploy is asynchronous: this command returns once the build
|
|
14
|
-
has been enqueued, it doesn't wait for the build to finish.
|
|
15
|
-
|
|
16
|
-
Files matching patterns in a .forceignore are excluded from the source
|
|
17
|
-
bundle. Both the compute app's own .forceignore and the one at the project
|
|
18
|
-
root (next to sfdx-project.json) are applied, if present. api-spec.yaml and
|
|
19
|
-
project.toml are always included, since the build can't succeed without them.
|
|
20
|
-
|
|
21
|
-
# flags.source-dir.summary
|
|
22
|
-
|
|
23
|
-
Directory containing the compute app to deploy. Defaults to the current directory.
|
|
7
|
+
This command no longer deploys compute apps. Install the Compute variant of
|
|
8
|
+
the deploy-retrieve plugin and use project deploy start from your Salesforce
|
|
9
|
+
DX project instead.
|
|
24
10
|
|
|
25
11
|
# examples
|
|
26
12
|
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
cd force-app/main/default/platformComputeApps/CreditRatingScorer
|
|
30
|
-
|
|
31
|
-
<%= config.bin %> <%= command.id %> --target-org my-org
|
|
32
|
-
|
|
33
|
-
- Deploy a compute app to an org, from anywhere, by pointing --source-dir at it:
|
|
34
|
-
|
|
35
|
-
<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/platformComputeApps/CreditRatingScorer --target-org my-org
|
|
36
|
-
|
|
37
|
-
# error.notAppDir
|
|
38
|
-
|
|
39
|
-
This directory has no %s.compute-meta.xml. Run this command from inside the compute app's own directory (the one "sf compute generate" created).
|
|
40
|
-
|
|
41
|
-
# error.notAppDir.actions
|
|
42
|
-
|
|
43
|
-
- cd into the compute app's directory (e.g. force-app/main/default/platformComputeApps/<AppName>) and run the command again.
|
|
44
|
-
- Run sf compute generate first if the app hasn't been scaffolded yet.
|
|
45
|
-
|
|
46
|
-
# error.noProcfile
|
|
47
|
-
|
|
48
|
-
%s has no Procfile. A compute app needs a Procfile to define how it starts.
|
|
49
|
-
|
|
50
|
-
# error.noProcfile.actions
|
|
51
|
-
|
|
52
|
-
- Add a Procfile to the app directory before deploying.
|
|
53
|
-
|
|
54
|
-
# error.noApiSpec
|
|
55
|
-
|
|
56
|
-
%s has no api-spec.yaml. A compute app needs an OpenAPI spec to describe its external service.
|
|
57
|
-
|
|
58
|
-
# error.noApiSpec.actions
|
|
59
|
-
|
|
60
|
-
- Add an api-spec.yaml to the app directory before deploying.
|
|
61
|
-
|
|
62
|
-
# info.preparing
|
|
63
|
-
|
|
64
|
-
Preparing deployment for %s...
|
|
65
|
-
|
|
66
|
-
# info.packaging
|
|
67
|
-
|
|
68
|
-
packaging source (%s files, %s)... done
|
|
69
|
-
|
|
70
|
-
# info.uploading
|
|
71
|
-
|
|
72
|
-
uploading source... done
|
|
13
|
+
- Install the plugin and deploy a compute app:
|
|
73
14
|
|
|
74
|
-
|
|
15
|
+
<%= config.bin %> plugins install @salesforce/plugin-deploy-retrieve@compute
|
|
75
16
|
|
|
76
|
-
|
|
17
|
+
<%= config.bin %> project deploy start --metadata PlatformComputeApp:my_app --target-org my-org
|
|
77
18
|
|
|
78
|
-
#
|
|
19
|
+
# error.migrate
|
|
79
20
|
|
|
80
|
-
|
|
21
|
+
This command no longer deploys compute apps.
|
|
81
22
|
|
|
82
|
-
#
|
|
23
|
+
# error.migrate.actions
|
|
83
24
|
|
|
84
|
-
|
|
25
|
+
- Run sf plugins install @salesforce/plugin-deploy-retrieve@compute.
|
|
26
|
+
- From your Salesforce DX project, run sf project deploy start --metadata PlatformComputeApp:<app-name> --target-org <org>.
|
|
@@ -7,6 +7,7 @@ Show the full detail of a single compute telemetry drain.
|
|
|
7
7
|
Shows a single OpenTelemetry drain in full: the compute app it belongs to,
|
|
8
8
|
the signals it forwards, and its exporter endpoint, transport, and headers.
|
|
9
9
|
Use sf compute list telemetry-drain to find a drain's ID.
|
|
10
|
+
Header values are redacted in both human-readable and --json output; header keys are preserved.
|
|
10
11
|
|
|
11
12
|
# args.id.summary
|
|
12
13
|
|
|
@@ -39,7 +39,8 @@ No compute app named %s was found in the org. It may not have been deployed yet,
|
|
|
39
39
|
|
|
40
40
|
# error.appNotFoundInOrg.actions
|
|
41
41
|
|
|
42
|
-
-
|
|
42
|
+
- Run sf plugins install @salesforce/plugin-deploy-retrieve@compute.
|
|
43
|
+
- From your Salesforce DX project, run sf project deploy start --metadata PlatformComputeApp:%s --target-org <org>.
|
|
43
44
|
- Check that the app's directory name matches the DeveloperName used when it was deployed.
|
|
44
45
|
|
|
45
46
|
# error.ambiguousName
|
|
@@ -77,6 +78,15 @@ Couldn't read the log stream: %s
|
|
|
77
78
|
- Run the command again; the log session may have expired.
|
|
78
79
|
- If the problem persists, check your network connection to logplex.heroku.com.
|
|
79
80
|
|
|
81
|
+
# error.logFetchTimedOut
|
|
82
|
+
|
|
83
|
+
Timed out waiting for the log output after %s seconds.
|
|
84
|
+
|
|
85
|
+
# error.logFetchTimedOut.actions
|
|
86
|
+
|
|
87
|
+
- Run the command again.
|
|
88
|
+
- To watch the live log instead of a snapshot, use sf compute tail runtime-log.
|
|
89
|
+
|
|
80
90
|
# error.herokuAppNotFound
|
|
81
91
|
|
|
82
92
|
Heroku didn't find an app named %s.
|
|
@@ -130,7 +140,7 @@ Compute app %s doesn't have a Heroku app identifier yet.
|
|
|
130
140
|
# error.herokuAppIdentifierUnavailable.actions
|
|
131
141
|
|
|
132
142
|
- Wait for the app's current build to finish, then run the command again.
|
|
133
|
-
- If the app has never had a successful build,
|
|
143
|
+
- If the app has never had a successful build, deploy it first with project deploy start.
|
|
134
144
|
|
|
135
145
|
# error.configVarNotFound
|
|
136
146
|
|
|
@@ -146,7 +156,7 @@ Couldn't retrieve metadata for compute app %s: %s
|
|
|
146
156
|
|
|
147
157
|
# error.metadataRetrieveFailed.actions
|
|
148
158
|
|
|
149
|
-
- Confirm the app has been deployed to this org (run
|
|
159
|
+
- Confirm the app has been deployed to this org (run project deploy start first).
|
|
150
160
|
- Check that --name matches the DeveloperName used when it was deployed.
|
|
151
161
|
|
|
152
162
|
# error.sourceDownloadFailed
|
|
@@ -156,7 +166,7 @@ Couldn't download the compute app's source: %s
|
|
|
156
166
|
# error.sourceDownloadFailed.actions
|
|
157
167
|
|
|
158
168
|
- Confirm the target org has compute apps enabled and that you have the DeployCompute or ManageCompute permission.
|
|
159
|
-
- Confirm the app has been deployed to this org (run
|
|
169
|
+
- Confirm the app has been deployed to this org (run project deploy start first).
|
|
160
170
|
|
|
161
171
|
# error.sourceBundleMalformed
|
|
162
172
|
|
|
@@ -205,7 +215,15 @@ The telemetry transport "%s" isn't valid. Use one of: %s.
|
|
|
205
215
|
|
|
206
216
|
# error.invalidTransport.actions
|
|
207
217
|
|
|
208
|
-
- Pass http
|
|
218
|
+
- Pass one of: %s. http is OTLP over HTTP; grpc is OTLP over gRPC.
|
|
219
|
+
|
|
220
|
+
# error.invalidHeader
|
|
221
|
+
|
|
222
|
+
A telemetry header isn't valid. Headers must be passed as key=value.
|
|
223
|
+
|
|
224
|
+
# error.invalidHeader.actions
|
|
225
|
+
|
|
226
|
+
- Pass each header as --header key=value; repeat the flag for more than one header.
|
|
209
227
|
|
|
210
228
|
# error.telemetryDrainNotFound
|
|
211
229
|
|
|
@@ -11,6 +11,14 @@ contacted, but this command does fetch the starter source for the chosen
|
|
|
11
11
|
language from its Heroku AppLink reference app on GitHub, so it requires
|
|
12
12
|
outbound network access.
|
|
13
13
|
|
|
14
|
+
This command is deprecated but still works. When you move to sf template generate
|
|
15
|
+
project --template compute, note that --language no longer defaults to node: the
|
|
16
|
+
replacement's --compute-language flag makes the language an explicit choice.
|
|
17
|
+
|
|
18
|
+
# deprecation.message
|
|
19
|
+
|
|
20
|
+
This command will be available as sf template generate project --template compute in version 1.0.0 of plugin-compute.
|
|
21
|
+
|
|
14
22
|
# flags.name.summary
|
|
15
23
|
|
|
16
24
|
Name for the new compute app. Use <namespace>\_\_<developerName> to scaffold
|
|
@@ -11,6 +11,12 @@ build-log for that.
|
|
|
11
11
|
This prints the most recent log lines and exits. To keep the session open and
|
|
12
12
|
stream new lines as they arrive, use compute tail runtime-log.
|
|
13
13
|
|
|
14
|
+
The recent lines come from the Cedar log buffer (about 1500 lines at most), so
|
|
15
|
+
--num can't return more than that. Fir apps keep no log history, so this
|
|
16
|
+
command isn't supported for them; use compute tail runtime-log instead. The
|
|
17
|
+
command stops waiting after 30 seconds and prints whatever log lines it has
|
|
18
|
+
received by then; if none arrived, it fails with a timeout error.
|
|
19
|
+
|
|
14
20
|
This is an org-mediated operation by --name (the app's DeveloperName) -- the
|
|
15
21
|
org creates a log session with Heroku on your behalf and hands back a
|
|
16
22
|
short-lived, pre-authorized URL that the CLI reads from directly. It doesn't
|
|
@@ -27,6 +33,19 @@ directory's app name if that isn't set either.
|
|
|
27
33
|
|
|
28
34
|
Number of recent log lines to print.
|
|
29
35
|
|
|
36
|
+
# error.firNoLogHistory
|
|
37
|
+
|
|
38
|
+
Fir apps keep no log history, so there is no recent log to fetch for %s.
|
|
39
|
+
|
|
40
|
+
# error.firNoLogHistory.actions
|
|
41
|
+
|
|
42
|
+
- Run sf compute tail runtime-log to watch the live log instead.
|
|
43
|
+
- To learn how Fir differs from Cedar, see https://devcenter.heroku.com/articles/generations.
|
|
44
|
+
|
|
45
|
+
# warning.logFetchPartial
|
|
46
|
+
|
|
47
|
+
The log output didn't finish arriving in time, so only the lines received so far are shown.
|
|
48
|
+
|
|
30
49
|
# info.noBuildsFound
|
|
31
50
|
|
|
32
51
|
Compute app %s has no builds yet, so it has no logs.
|
|
@@ -7,7 +7,7 @@ Retrieve a compute app's source and metadata from an org into your local Salesfo
|
|
|
7
7
|
Creates the compute app's directory under force-app/main/default/platformComputeApps/<name>/
|
|
8
8
|
(or --output-dir), retrieves its <name>.compute-meta.xml through the Metadata
|
|
9
9
|
API, then downloads its source code through the Connect API and extracts it
|
|
10
|
-
into that same directory.
|
|
10
|
+
into that same directory. Deploy it with project deploy start.
|
|
11
11
|
|
|
12
12
|
# flags.name.summary
|
|
13
13
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Change the configuration of a compute telemetry drain.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Updates only the attributes you pass and leaves the rest of the drain as it
|
|
8
|
+
is. Passing --header adds or overwrites the headers you give and keeps the
|
|
9
|
+
drain's other headers. Use sf compute list telemetry-drain to find a drain's ID.
|
|
10
|
+
|
|
11
|
+
# args.id.summary
|
|
12
|
+
|
|
13
|
+
ID of the telemetry drain to update.
|
|
14
|
+
|
|
15
|
+
# flags.url.summary
|
|
16
|
+
|
|
17
|
+
New endpoint to forward telemetry to.
|
|
18
|
+
|
|
19
|
+
# flags.signals.summary
|
|
20
|
+
|
|
21
|
+
New comma-separated signals to forward: traces, metrics, logs, or all.
|
|
22
|
+
|
|
23
|
+
# flags.transport.summary
|
|
24
|
+
|
|
25
|
+
New wire protocol: http (OTLP over HTTP) or grpc (OTLP over gRPC).
|
|
26
|
+
|
|
27
|
+
# flags.header.summary
|
|
28
|
+
|
|
29
|
+
Header to send with each export, as key=value.
|
|
30
|
+
|
|
31
|
+
# flags.header.description
|
|
32
|
+
|
|
33
|
+
Repeat the flag to send more than one header. A header you pass adds
|
|
34
|
+
or overwrites the one with the same name; the drain's other headers are kept. Header values often carry credentials; they are
|
|
35
|
+
never printed to the terminal or --json output; header keys are preserved with redacted values.
|
|
36
|
+
|
|
37
|
+
# error.nothingToUpdate
|
|
38
|
+
|
|
39
|
+
Nothing to update. Pass at least one of --url, --signals, --transport, or --header.
|
|
40
|
+
|
|
41
|
+
# error.nothingToUpdate.actions
|
|
42
|
+
|
|
43
|
+
- Pass the attribute you want to change, for example --url https://collector.example.com:4318.
|
|
44
|
+
|
|
45
|
+
# info.updated
|
|
46
|
+
|
|
47
|
+
Updated telemetry drain %s.
|
|
48
|
+
|
|
49
|
+
# examples
|
|
50
|
+
|
|
51
|
+
- Point a drain at a new endpoint:
|
|
52
|
+
|
|
53
|
+
<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --url https://collector.example.com:4318 --target-org my-org
|
|
54
|
+
|
|
55
|
+
- Forward only logs over gRPC:
|
|
56
|
+
|
|
57
|
+
<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --signals logs --transport grpc --target-org my-org
|