@heroku/plugin-compute 0.2.0 → 0.3.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.
Files changed (63) hide show
  1. package/lib/commands/compute/create/telemetry-drain.d.ts +20 -0
  2. package/lib/commands/compute/create/telemetry-drain.js +81 -0
  3. package/lib/commands/compute/create/telemetry-drain.js.map +1 -0
  4. package/lib/commands/compute/display/telemetry-drain.d.ts +26 -0
  5. package/lib/commands/compute/display/telemetry-drain.js +77 -0
  6. package/lib/commands/compute/display/telemetry-drain.js.map +1 -0
  7. package/lib/commands/compute/generate.d.ts +5 -0
  8. package/lib/commands/compute/generate.js +6 -0
  9. package/lib/commands/compute/generate.js.map +1 -1
  10. package/lib/commands/compute/{config/get.d.ts → get/config.d.ts} +2 -0
  11. package/lib/commands/compute/{config/get.js → get/config.js} +9 -2
  12. package/lib/commands/compute/get/config.js.map +1 -0
  13. package/lib/commands/compute/{config/list.d.ts → list/config.d.ts} +2 -0
  14. package/lib/commands/compute/{config/list.js → list/config.js} +9 -2
  15. package/lib/commands/compute/list/config.js.map +1 -0
  16. package/lib/commands/compute/list/telemetry-drain.d.ts +20 -0
  17. package/lib/commands/compute/list/telemetry-drain.js +89 -0
  18. package/lib/commands/compute/list/telemetry-drain.js.map +1 -0
  19. package/lib/commands/compute/{config/set.d.ts → set/config.d.ts} +2 -0
  20. package/lib/commands/compute/{config/set.js → set/config.js} +9 -2
  21. package/lib/commands/compute/set/config.js.map +1 -0
  22. package/lib/commands/compute/{config/unset.d.ts → unset/config.d.ts} +2 -0
  23. package/lib/commands/compute/{config/unset.js → unset/config.js} +9 -2
  24. package/lib/commands/compute/unset/config.js.map +1 -0
  25. package/lib/commands/compute/update/telemetry-drain.d.ts +20 -0
  26. package/lib/commands/compute/update/telemetry-drain.js +69 -0
  27. package/lib/commands/compute/update/telemetry-drain.js.map +1 -0
  28. package/lib/shared/computeConfig.js +2 -2
  29. package/lib/shared/computeConfig.js.map +1 -1
  30. package/lib/shared/computeQuery.d.ts +1 -0
  31. package/lib/shared/computeQuery.js +37 -42
  32. package/lib/shared/computeQuery.js.map +1 -1
  33. package/lib/shared/computeTelemetryDrain.d.ts +22 -0
  34. package/lib/shared/computeTelemetryDrain.js +115 -0
  35. package/lib/shared/computeTelemetryDrain.js.map +1 -0
  36. package/lib/shared/herokuProxyApi.d.ts +30 -0
  37. package/lib/shared/herokuProxyApi.js +104 -4
  38. package/lib/shared/herokuProxyApi.js.map +1 -1
  39. package/messages/compute.create.telemetry-drain.md +53 -0
  40. package/messages/compute.display.telemetry-drain.md +19 -0
  41. package/messages/compute.errors.md +43 -1
  42. package/messages/compute.generate.md +8 -0
  43. package/messages/{compute.config.list.md → compute.list.config.md} +3 -3
  44. package/messages/compute.list.telemetry-drain.md +26 -0
  45. package/messages/compute.update.telemetry-drain.md +57 -0
  46. package/npm-shrinkwrap.json +258 -116
  47. package/oclif.manifest.json +484 -128
  48. package/package.json +10 -4
  49. package/schemas/compute-create-telemetry__drain.json +44 -0
  50. package/schemas/compute-display-telemetry__drain.json +54 -0
  51. package/schemas/compute-list-telemetry__drain.json +43 -0
  52. package/schemas/compute-update-telemetry__drain.json +43 -0
  53. package/lib/commands/compute/config/get.js.map +0 -1
  54. package/lib/commands/compute/config/list.js.map +0 -1
  55. package/lib/commands/compute/config/set.js.map +0 -1
  56. package/lib/commands/compute/config/unset.js.map +0 -1
  57. /package/messages/{compute.config.get.md → compute.get.config.md} +0 -0
  58. /package/messages/{compute.config.set.md → compute.set.config.md} +0 -0
  59. /package/messages/{compute.config.unset.md → compute.unset.config.md} +0 -0
  60. /package/schemas/{compute-config-get.json → compute-get-config.json} +0 -0
  61. /package/schemas/{compute-config-list.json → compute-list-config.json} +0 -0
  62. /package/schemas/{compute-config-set.json → compute-set-config.json} +0 -0
  63. /package/schemas/{compute-config-unset.json → compute-unset-config.json} +0 -0
@@ -22,7 +22,7 @@ import { resolveHerokuAppId } from '../../../shared/computeQuery.js';
22
22
  import { fetchComputeConfigVarsViaProxy, fetchLatestReleaseVersionViaProxy, updateComputeConfigVarsViaProxy, } from '../../../shared/herokuProxyApi.js';
23
23
  import { PLUGIN_NAME } from '../../../shared/plugin-name.js';
24
24
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
25
- const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.config.unset');
25
+ const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.unset.config');
26
26
  export default class ConfigUnset extends SfCommand {
27
27
  static args = {
28
28
  key: Args.string({
@@ -30,6 +30,7 @@ export default class ConfigUnset extends SfCommand {
30
30
  summary: messages.getMessage('args.key.summary'),
31
31
  }),
32
32
  };
33
+ static deprecateAliases = true;
33
34
  static description = messages.getMessage('description');
34
35
  static examples = messages.getMessages('examples');
35
36
  static flags = {
@@ -40,6 +41,12 @@ export default class ConfigUnset extends SfCommand {
40
41
  }),
41
42
  'target-org': Flags.requiredOrg({ char: 'o' }),
42
43
  };
44
+ // Back-compat: the command was `compute config unset` before the verb-noun migration (W-24542276).
45
+ // Kept as a hidden deprecated alias -- deprecateAliases above still prints a one-line warning
46
+ // steering users to the new id, and the old id stays out of --help and docs/. (It stays tracked
47
+ // in command-snapshot.json, but as its own `compute:config:unset` entry rather than in this
48
+ // command's alias array -- see the hiddenAliases snapshot gotcha in AGENTS.md.)
49
+ static hiddenAliases = ['compute:config:unset'];
43
50
  // Org-mediated lookup by --name -- no local project files are read.
44
51
  static requiresProject = false;
45
52
  static summary = messages.getMessage('summary');
@@ -90,4 +97,4 @@ export default class ConfigUnset extends SfCommand {
90
97
  return release === undefined ? { name, unset: keys } : { name, unset: keys, release };
91
98
  }
92
99
  }
93
- //# sourceMappingURL=unset.js.map
100
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/commands/compute/unset/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,IAAI,EAAC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salesforce/sf-plugins-core';
2
+ import { type TelemetryDrainResult } from '../../../shared/computeTelemetryDrain.js';
3
+ export type ComputeTelemetryDrainUpdateResult = TelemetryDrainResult;
4
+ export default class TelemetryDrainUpdate extends SfCommand<ComputeTelemetryDrainUpdateResult> {
5
+ static readonly args: {
6
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static readonly description: string;
9
+ static readonly examples: string[];
10
+ static readonly flags: {
11
+ url: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ signals: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ transport: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ header: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
16
+ };
17
+ static readonly requiresProject = false;
18
+ static readonly summary: string;
19
+ run(): Promise<ComputeTelemetryDrainUpdateResult>;
20
+ }
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Args } from '@oclif/core';
17
+ import { Messages } from '@salesforce/core';
18
+ import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
19
+ import { exporterTypeForTransport, parseHeaderFlags, toTelemetryDrainResult, validateAndFormatSignals, } from '../../../shared/computeTelemetryDrain.js';
20
+ import { updateTelemetryDrainViaProxy } from '../../../shared/herokuProxyApi.js';
21
+ import { PLUGIN_NAME } from '../../../shared/plugin-name.js';
22
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
23
+ const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.update.telemetry-drain');
24
+ export default class TelemetryDrainUpdate extends SfCommand {
25
+ // No --name: the drain ID is globally unique, as in display telemetry-drain.
26
+ static args = {
27
+ id: Args.string({
28
+ required: true,
29
+ summary: messages.getMessage('args.id.summary'),
30
+ }),
31
+ };
32
+ static description = messages.getMessage('description');
33
+ static examples = messages.getMessages('examples');
34
+ static flags = {
35
+ url: Flags.string({ summary: messages.getMessage('flags.url.summary') }),
36
+ signals: Flags.string({ summary: messages.getMessage('flags.signals.summary') }),
37
+ // As in create: splunk is accepted but kept out of the help text.
38
+ transport: Flags.string({ summary: messages.getMessage('flags.transport.summary') }),
39
+ header: Flags.string({
40
+ multiple: true,
41
+ summary: messages.getMessage('flags.header.summary'),
42
+ description: messages.getMessage('flags.header.description'),
43
+ }),
44
+ 'target-org': Flags.requiredOrg({ char: 'o' }),
45
+ };
46
+ static requiresProject = false;
47
+ static summary = messages.getMessage('summary');
48
+ async run() {
49
+ const { args, flags } = await this.parse(TelemetryDrainUpdate);
50
+ if (!flags.url && !flags.signals && !flags.transport && !flags.header) {
51
+ throw messages.createError('error.nothingToUpdate');
52
+ }
53
+ // Only the attributes the user passed go on the wire (PATCH), so everything else is left as-is.
54
+ const signals = flags.signals ? validateAndFormatSignals(flags.signals) : undefined;
55
+ const type = flags.transport ? exporterTypeForTransport(flags.transport) : undefined;
56
+ const headers = flags.header ? parseHeaderFlags(flags.header) : undefined;
57
+ const endpoint = flags.url;
58
+ const hasExporterChange = endpoint !== undefined || type !== undefined || headers !== undefined;
59
+ const exporter = hasExporterChange ? { endpoint, type, headers } : undefined;
60
+ const connection = flags['target-org'].getConnection();
61
+ const drain = await updateTelemetryDrainViaProxy(connection, { drainId: args.id, signals, exporter });
62
+ // Fall back to the requested ID if the response omits it, so --json never reports an empty id.
63
+ const drainResult = toTelemetryDrainResult(drain);
64
+ const result = { ...drainResult, id: drainResult.id === '' ? args.id : drainResult.id };
65
+ this.logSuccess(messages.getMessage('info.updated', [result.id]));
66
+ return result;
67
+ }
68
+ }
69
+ //# sourceMappingURL=telemetry-drain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry-drain.js","sourceRoot":"","sources":["../../../../src/commands/compute/update/telemetry-drain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAEhB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAC,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAE3D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,gCAAgC,CAAC,CAAC;AAItF,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAA4C;IAC5F,6EAA6E;IACtE,MAAM,CAAU,IAAI,GAAG;QAC5B,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;SAChD,CAAC;KACH,CAAC;IAEK,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACj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B,CAAC"}
@@ -17,7 +17,7 @@ import { Messages } from '@salesforce/core';
17
17
  import { PLUGIN_NAME } from './plugin-name.js';
18
18
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
19
19
  const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.errors');
20
- // Shared by `config get` and `config unset` -- both validate requested keys against the same
20
+ // Shared by `get config` and `unset config` -- both validate requested keys against the same
21
21
  // fetched map and must raise byte-identical text for a missing key, so this is the one source of
22
22
  // truth for that check rather than duplicating the message in each command's own .md file.
23
23
  export function requireConfigVar(configVars, name, key) {
@@ -27,7 +27,7 @@ export function requireConfigVar(configVars, name, key) {
27
27
  return configVars[key];
28
28
  }
29
29
  // Right-pads each key to the widest key's width (plus Heroku's own two-space minimum gap) so
30
- // values line up in a column -- shared by `config` (list) and multi-key `config get` so the two
30
+ // values line up in a column -- shared by `list config` and multi-key `get config` so the two
31
31
  // commands agree visually when run back-to-back.
32
32
  export function formatConfigVarLines(configVars) {
33
33
  const keys = Object.keys(configVars);
@@ -1 +1 @@
1
- {"version":3,"file":"computeConfig.js","sourceRoot":"","sources":["../../src/shared/computeConfig.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,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAEtE,6FAA6F;AAC7F,iGAAiG;AACjG,2FAA2F;AAC3F,MAAM,UAAU,gBAAgB,CAAC,UAAkC,EAAE,IAAY,EAAE,GAAW;IAC5F,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,QAAQ,CAAC,WAA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W,CAAC,yBAAyB,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,6FAA6F;AAC7F,8FAA8F;AAC9F,iDAAiD;AACjD,MAAM,UAAU,oBAAoB,CAAC,UAAkC;IACrE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3F,CAAC"}
@@ -49,4 +49,5 @@ export type ComputeAppSummary = {
49
49
  export declare function pickHerokuAppId(record: ComputeAppRecord): string | undefined;
50
50
  export declare function requireHerokuAppId(record: ComputeAppRecord, name: string): string;
51
51
  export declare function resolveHerokuAppId(connection: Connection, name: string): Promise<string>;
52
+ export declare function findDeveloperNameByHerokuAppId(connection: Connection, herokuAppId: string): Promise<string | undefined>;
52
53
  export declare function toComputeAppSummary(record: ComputeAppRecord): ComputeAppSummary;
@@ -22,13 +22,14 @@ const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.errors');
22
22
  // the internal org/connection module), so match the stable error names it throws by value.
23
23
  const SINGLE_RECORD_QUERY_NO_RECORDS = 'SingleRecordQuery_NoRecords';
24
24
  const SINGLE_RECORD_QUERY_MULTIPLE_RECORDS = 'SingleRecordQuery_MultipleRecords';
25
- const BASE_SOQL_FIELDS = [
25
+ const SOQL_FIELDS = [
26
26
  'Id',
27
27
  'DeveloperName',
28
28
  'MasterLabel',
29
29
  'Description',
30
30
  'Status',
31
31
  'StatusReason',
32
+ 'ExternalAppIdentifier',
32
33
  'CurrentBuild.Id',
33
34
  'CurrentBuild.BuildStatus',
34
35
  'CurrentBuild.BuildStartedAt',
@@ -36,58 +37,33 @@ const BASE_SOQL_FIELDS = [
36
37
  'CurrentBuild.DeployedAt',
37
38
  'CurrentBuild.DeployedBy.Username',
38
39
  'CurrentBuild.Error',
40
+ 'CurrentBuild.ExternalBuildIdentifier',
39
41
  'ExternalServiceRegistration.Id',
40
- ];
41
- // ExternalAppIdentifier/CurrentBuild.ExternalBuildIdentifier share PlatformComputeApp's
42
- // entity-level isSfdcInternal restriction (W-24176390) -- querying them without the
43
- // SfdcInternalQA client override applied (see setSfdcInternalQaCallOptions below) fails the whole
44
- // query, so only add them once that override is already in effect. Keeps the default query text
45
- // byte-for-byte unchanged until W-24176390 ships.
46
- function soqlFields() {
47
- const fields = process.env.SALESFORCE_INTERNAL_QA_CLIENT === 'true'
48
- ? [...BASE_SOQL_FIELDS, 'ExternalAppIdentifier', 'CurrentBuild.ExternalBuildIdentifier']
49
- : BASE_SOQL_FIELDS;
50
- return fields.join(', ');
51
- }
52
- // Defense-in-depth for the SOQL string interpolations in queryComputeApp/listComputeApps below --
53
- // parseName's regexes already reject the characters SOQL string literals need escaped, so this
54
- // should never actually fire, but it keeps a future NAME_PATTERN/NAMESPACE_PATTERN change from
55
- // silently reopening injection.
42
+ ].join(', ');
43
+ // A Heroku app id as it appears in a telemetry drain's owner.id -- hex/alphanumeric and hyphens,
44
+ // never quotes, spaces, or backslashes. It's Heroku-sourced (not user-typed) and never routed
45
+ // through parseName, so this is the primary injection guard for findDeveloperNameByHerokuAppId's
46
+ // interpolation (escapeSoqlLiteral is the belt-and-suspenders second layer, matching
47
+ // queryComputeApp's posture below).
48
+ const HEROKU_APP_ID_PATTERN = /^[A-Za-z0-9\-]+$/v;
49
+ // Defense-in-depth for the SOQL string interpolations in queryComputeApp and
50
+ // findDeveloperNameByHerokuAppId below -- the shape guards there (parseName's regexes,
51
+ // HEROKU_APP_ID_PATTERN) already reject the characters a SOQL string literal needs escaped, so this
52
+ // should never actually fire, but it keeps a future loosening of either guard from silently
53
+ // reopening injection.
56
54
  function escapeSoqlLiteral(value) {
57
55
  return value.replaceAll('\\', '\\\\').replaceAll('\'', String.raw `\'`);
58
56
  }
59
- // Internal engineering workaround, not a customer-facing feature -- do not document in README.
60
- // PlatformComputeApp/PlatformComputeAppBuild currently ship with
61
- // Tooling API access gated behind apiAccess="isSfdcInternal" (W-23426078 opened first-party-only
62
- // access; W-24176390 tracks removing the restriction so any customer org can query these entities
63
- // without this workaround). Until W-24176390 ships, this lets internal testing exercise the CLI's
64
- // Tooling queries against a pilot org: jsforce's http-api sets the Sforce-Call-Options header from
65
- // connection._callOptions on every REST request (incl. Tooling API query); this sets the
66
- // SfdcInternalQA/ client identifier, which requires the target org's "Allow Salesforce Internal
67
- // QA Clients" (SfdcInternalQAClients) org perm to be enabled. Gated behind
68
- // SALESFORCE_INTERNAL_QA_CLIENT=true (opt-in, never silently applied). Note this does NOT unblock
69
- // ExternalServiceRegistration.IsActive, which has its own separate field-level restriction --
70
- // see the comment on ComputeAppRecord.ExternalServiceRegistration.IsActive above.
71
- // Remove this function and its call sites once W-24176390 ships and public access is confirmed.
72
- function setSfdcInternalQaCallOptions(connection) {
73
- if (process.env.SALESFORCE_INTERNAL_QA_CLIENT !== 'true') {
74
- return;
75
- }
76
- connection._callOptions = {
77
- client: 'SfdcInternalQA/plugin-compute',
78
- };
79
- }
80
57
  // Accepts a bare DeveloperName or a namespace-qualified <namespace>__<developerName> value; the
81
58
  // latter adds a Namespace filter so it only matches an app deployed under that namespace, since
82
59
  // DeveloperName alone isn't unique across namespaces.
83
60
  export async function queryComputeApp(connection, name) {
84
- setSfdcInternalQaCallOptions(connection);
85
61
  // parseName's NAME_PATTERN/NAMESPACE_PATTERN (letters/digits/underscore, anchored, no quotes or
86
62
  // spaces) are the injection guard for the two interpolations below -- escapeSoqlLiteral is
87
63
  // belt-and-suspenders in case either pattern is ever loosened, not the primary defense.
88
64
  const { namespace, developerName } = parseName(name);
89
65
  const namespaceFilter = namespace === undefined ? '' : ` AND Namespace = '${escapeSoqlLiteral(namespace)}'`;
90
- const soql = `SELECT ${soqlFields()} FROM PlatformComputeApp WHERE DeveloperName = '${escapeSoqlLiteral(developerName)}'${namespaceFilter}`;
66
+ const soql = `SELECT ${SOQL_FIELDS} FROM PlatformComputeApp WHERE DeveloperName = '${escapeSoqlLiteral(developerName)}'${namespaceFilter}`;
91
67
  try {
92
68
  return await connection.singleRecordQuery(soql, { tooling: true });
93
69
  }
@@ -104,8 +80,7 @@ export async function queryComputeApp(connection, name) {
104
80
  // No --name filter -- lists every PlatformComputeApp in the org. autoFetchQuery auto-paginates
105
81
  // (10,000-record default fetch size), which comfortably covers any realistic org's compute-app count.
106
82
  export async function listComputeApps(connection) {
107
- setSfdcInternalQaCallOptions(connection);
108
- const soql = `SELECT ${soqlFields()} FROM PlatformComputeApp ORDER BY DeveloperName ASC`;
83
+ const soql = `SELECT ${SOQL_FIELDS} FROM PlatformComputeApp ORDER BY DeveloperName ASC`;
109
84
  try {
110
85
  // autoFetchQuery's type param is bounded to jsforce's Schema (org-wide SObject map), not the
111
86
  // record shape -- there's no way to type this call against ComputeAppRecord directly.
@@ -139,6 +114,26 @@ export async function resolveHerokuAppId(connection, name) {
139
114
  const record = await queryComputeApp(connection, name);
140
115
  return requireHerokuAppId(record, name);
141
116
  }
117
+ // Reverse of resolveHerokuAppId: given a Heroku app id (as it appears in a telemetry drain's
118
+ // owner.id), find the owning compute app's Salesforce DeveloperName -- the only identity the rest
119
+ // of the CLI accepts (--name/COMPUTE_APP_NAME). Best-effort for a display label: returns undefined
120
+ // (never throws) when the id is malformed, matches no app, matches more than one, or the query
121
+ // itself fails, so a label lookup can never turn a read command fatal. Filters ExternalAppIdentifier
122
+ // directly rather than scanning every app.
123
+ export async function findDeveloperNameByHerokuAppId(connection, herokuAppId) {
124
+ if (!HEROKU_APP_ID_PATTERN.test(herokuAppId)) {
125
+ return undefined;
126
+ }
127
+ const soql = `SELECT DeveloperName FROM PlatformComputeApp WHERE ExternalAppIdentifier = '${escapeSoqlLiteral(herokuAppId)}'`;
128
+ try {
129
+ const record = await connection.singleRecordQuery(soql, { tooling: true });
130
+ return record.DeveloperName;
131
+ }
132
+ catch {
133
+ // No match, more than one match, or a query failure -- all non-fatal for a best-effort label.
134
+ return undefined;
135
+ }
136
+ }
142
137
  // Heroku-side runtime metadata (dyno type, web process/formation count) isn't included here --
143
138
  // there's no confirmed Salesforce-queryable source for it yet. Open item, not yet resolved.
144
139
  export function toComputeAppSummary(record) {
@@ -1 +1 @@
1
- {"version":3,"file":"computeQuery.js","sourceRoot":"","sources":["../../src/shared/computeQuery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAkB,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,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,2FAA2F;AAC3F,MAAM,8BAA8B,GAAG,6BAA6B,CAAC;AACrE,MAAM,oCAAoC,GAAG,mCAAmC,CAAC;AA0CjF,MAAM,gBAAgB,GAAG;IACvB,IAAI;IACJ,eAAe;IACf,aAAa;IACb,aAAa;IACb,QAAQ;IACR,cAAc;IACd,iBAAiB;IACjB,0BAA0B;IAC1B,6BAA6B;IAC7B,+BAA+B;IAC/B,yBAAyB;IACzB,kCAAkC;IAClC,oBAAoB;IACpB,gCAAgC;CACjC,CAAC;AAEF,wFAAwF;AACx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AM,CAAC,YAAY,CAAC,gBAAgB,IAAI,SAAS;gBACnE,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU,IAAI,SAAS;gBACvD,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ;gBACpD,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI,SAAS;aAC9C;YACD,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { components } from '../generated/heroku-platform-api.js';
2
+ import type { TelemetryExporterType, TelemetrySignal } from './herokuProxyApi.js';
3
+ export declare const TELEMETRY_SIGNALS: readonly TelemetrySignal[];
4
+ export declare const TELEMETRY_TRANSPORTS: readonly string[];
5
+ export declare const PUBLIC_TRANSPORTS: readonly string[];
6
+ export declare function validateAndFormatSignals(input: string): TelemetrySignal[];
7
+ export declare function exporterTypeForTransport(transport: string): TelemetryExporterType;
8
+ export declare function transportLabelForExporterType(exporterType: string): string;
9
+ export declare function formatTelemetryDrainRows(drain: components['schemas']['TelemetryDrain'], appName: string): Array<{
10
+ key: string;
11
+ value: string;
12
+ }>;
13
+ export declare function parseHeaderFlags(inputs: readonly string[]): Record<string, string>;
14
+ export type TelemetryDrainResult = {
15
+ endpoint?: string;
16
+ exporterType?: string;
17
+ headers?: Record<string, string>;
18
+ id: string;
19
+ signals: string[];
20
+ transport?: string;
21
+ };
22
+ export declare function toTelemetryDrainResult(drain: components['schemas']['TelemetryDrain']): TelemetryDrainResult;
@@ -0,0 +1,115 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Messages } from '@salesforce/core';
17
+ import { PLUGIN_NAME } from './plugin-name.js';
18
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
19
+ const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.errors');
20
+ // Placeholder for a drain field the platform left unset -- matches the dash the other compute
21
+ // tables use so single-drain display reads consistently.
22
+ const DASH = '-';
23
+ // Exporter header values routinely carry credentials (bearer / Splunk-HEC tokens). The human table
24
+ // masks the VALUES (keys stay visible so an operator can still see which headers are set) so a secret
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.
28
+ const REDACTED = '<redacted>';
29
+ function maskHeaderValues(headers) {
30
+ return Object.fromEntries(Object.keys(headers).map(key => [key, REDACTED]));
31
+ }
32
+ // The three OpenTelemetry signal categories a drain can forward. Order matches the
33
+ // TelemetryDrain.signals enum in the platform API spec; `all` is the shorthand for every one.
34
+ export const TELEMETRY_SIGNALS = ['traces', 'metrics', 'logs'];
35
+ // User-facing --transport values and the exporter type each one maps to. `grpc`/`http` are the two
36
+ // OTLP wire protocols; `splunk` is its own exporter. Reversed for display by
37
+ // transportLabelForExporterType below.
38
+ const TRANSPORT_TO_EXPORTER = {
39
+ grpc: 'otlp',
40
+ http: 'otlphttp',
41
+ splunk: 'splunk',
42
+ };
43
+ export const TELEMETRY_TRANSPORTS = Object.keys(TRANSPORT_TO_EXPORTER);
44
+ // The transports advertised to users (error text, hints). `splunk` is still accepted but stays hidden.
45
+ export const PUBLIC_TRANSPORTS = ['http', 'grpc'];
46
+ // DELIBERATELY case-sensitive, non-trimming, and treats `all` only as the whole input (never as a
47
+ // comma-separated element). This is an explicit decision, not an oversight: the plugin is pre-GA and
48
+ // no command consumes this yet, so staying strict now is the safe direction -- leniency (trimming,
49
+ // case-insensitivity) can be loosened later without breaking anyone, whereas tightening after GA
50
+ // would break users. The companion unit tests lock each quirk (`Traces`/` traces`/`all,logs` all throw).
51
+ export function validateAndFormatSignals(input) {
52
+ if (input === 'all') {
53
+ return [...TELEMETRY_SIGNALS];
54
+ }
55
+ const requested = input.split(',');
56
+ const invalid = requested.filter(signal => !TELEMETRY_SIGNALS.includes(signal));
57
+ if (invalid.length > 0) {
58
+ throw messages.createError('error.invalidSignal', [invalid.join(', '), [...TELEMETRY_SIGNALS, 'all'].join(', ')]);
59
+ }
60
+ return requested;
61
+ }
62
+ // Maps a user-facing --transport onto its exporter type. Same strictness as signals above
63
+ // (exact-match, no trim/case-fold); an unknown transport throws rather than silently defaulting.
64
+ export function exporterTypeForTransport(transport) {
65
+ if (!Object.hasOwn(TRANSPORT_TO_EXPORTER, transport)) {
66
+ const publicList = PUBLIC_TRANSPORTS.join(', ');
67
+ throw messages.createError('error.invalidTransport', [transport, publicList], [publicList]);
68
+ }
69
+ return TRANSPORT_TO_EXPORTER[transport];
70
+ }
71
+ // Display label for an exporter type: only `otlp` is gRPC; `otlphttp` and `splunk` both ride HTTP.
72
+ export function transportLabelForExporterType(exporterType) {
73
+ return exporterType === 'otlp' ? 'gRPC' : 'HTTP';
74
+ }
75
+ // Builds the ordered key/value rows for a single-drain display. App-only: the app name is passed in
76
+ // (already resolved by the command from the drain's own owner -- see display/telemetry-drain.ts), not
77
+ // re-derived here, since this foundation never looks owners up. `compute display telemetry-drain` renders these rows.
78
+ export function formatTelemetryDrainRows(drain, appName) {
79
+ const headers = drain.exporter?.headers;
80
+ const hasHeaders = headers !== undefined && Object.keys(headers).length > 0;
81
+ return [
82
+ { key: 'App', value: appName },
83
+ { key: 'Signals', value: drain.signals && drain.signals.length > 0 ? drain.signals.join(', ') : DASH },
84
+ { key: 'Endpoint', value: drain.exporter?.endpoint ?? DASH },
85
+ { key: 'Transport', value: drain.exporter?.type ? transportLabelForExporterType(drain.exporter.type) : DASH },
86
+ { key: 'Headers', value: hasHeaders ? JSON.stringify(maskHeaderValues(headers)) : DASH },
87
+ ];
88
+ }
89
+ // Splits on the first = only, so a header value that itself contains one (e.g. a base64 token's
90
+ // padding) isn't truncated. Requires a non-empty key; an empty value is allowed.
91
+ const HEADER_PATTERN = /^([^=]+)=(.*)$/v;
92
+ // Turns repeated --header key=value flags into the exporter headers object. A repeated key keeps its
93
+ // last value. Built via fromEntries so a key like `__proto__` becomes an own property rather than
94
+ // touching the prototype.
95
+ export function parseHeaderFlags(inputs) {
96
+ const entries = inputs.map((input) => {
97
+ const match = HEADER_PATTERN.exec(input);
98
+ if (!match) {
99
+ throw messages.createError('error.invalidHeader', [input]);
100
+ }
101
+ return [match[1], match[2]];
102
+ });
103
+ return Object.fromEntries(entries);
104
+ }
105
+ export function toTelemetryDrainResult(drain) {
106
+ return {
107
+ id: drain.id ?? '',
108
+ signals: drain.signals ?? [],
109
+ endpoint: drain.exporter?.endpoint,
110
+ exporterType: drain.exporter?.type,
111
+ transport: drain.exporter?.type ? transportLabelForExporterType(drain.exporter.type) : undefined,
112
+ headers: drain.exporter?.headers,
113
+ };
114
+ }
115
+ //# sourceMappingURL=computeTelemetryDrain.js.map
@@ -0,0 +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,GAAG,GAAG,CAAC;AAEjB,mGAAmG;AACnG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C,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;KACjC,CAAC;AACJ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { type Connection } from '@salesforce/core';
2
+ import type { components } from '../generated/heroku-platform-api.js';
2
3
  export declare class HerokuProxyError extends Error {
3
4
  readonly herokuErrorId?: string;
4
5
  readonly origin: 'heroku' | 'proxy';
@@ -60,3 +61,32 @@ export declare function fetchLatestBuildOutputStreamUrlViaProxy(connection: Conn
60
61
  appId: string;
61
62
  name: string;
62
63
  }): Promise<string | undefined>;
64
+ export type TelemetryExporterType = components['schemas']['TelemetryDrainCreateRequest']['exporter']['type'];
65
+ export type TelemetrySignal = components['schemas']['TelemetryDrainCreateRequest']['signals'][number];
66
+ export declare function listTelemetryDrainsViaProxy(connection: Connection, params: {
67
+ appId: string;
68
+ name: string;
69
+ }): Promise<Array<components['schemas']['TelemetryDrain']>>;
70
+ export declare function fetchTelemetryDrainViaProxy(connection: Connection, params: {
71
+ drainId: string;
72
+ }): Promise<components['schemas']['TelemetryDrain']>;
73
+ export declare function createTelemetryDrainViaProxy(connection: Connection, params: {
74
+ appId: string;
75
+ endpoint: string;
76
+ exporterType: TelemetryExporterType;
77
+ headers?: Record<string, string>;
78
+ name: string;
79
+ signals: TelemetrySignal[];
80
+ }): Promise<components['schemas']['TelemetryDrain']>;
81
+ export declare function updateTelemetryDrainViaProxy(connection: Connection, params: {
82
+ drainId: string;
83
+ exporter?: {
84
+ endpoint?: string;
85
+ headers?: Record<string, string>;
86
+ type?: TelemetryExporterType;
87
+ };
88
+ signals?: TelemetrySignal[];
89
+ }): Promise<components['schemas']['TelemetryDrain']>;
90
+ export declare function deleteTelemetryDrainViaProxy(connection: Connection, params: {
91
+ drainId: string;
92
+ }): Promise<components['schemas']['TelemetryDrain']>;