@heroku/plugin-compute 0.4.2 → 0.4.3
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.
|
@@ -60,20 +60,23 @@ export async function packageComputeBundle(appDir, name, projectRoot) {
|
|
|
60
60
|
debug('packaged %s into %d bytes (%d files)', appDir, buffer.length, sourceEntries.length);
|
|
61
61
|
return { buffer, fileCount: sourceEntries.length };
|
|
62
62
|
}
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
//
|
|
63
|
+
// Writes every file in the downloaded source.tar.gz into appDir. The download endpoint returns
|
|
64
|
+
// that inner tarball directly (api-spec.yaml included), unlike the nested bundle packageComputeBundle
|
|
65
|
+
// uploads -- the asymmetry is deliberate: the appserver inspects the upload's top-level files
|
|
66
|
+
// without untarring the source. Used by sf compute source retrieve, the only caller that needs
|
|
67
|
+
// to go this direction.
|
|
66
68
|
export async function unpackComputeBundle(buffer, appDir) {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (
|
|
69
|
+
const sourceEntries = await untarGzip(buffer);
|
|
70
|
+
// Release ordering alone doesn't protect against an org still returning the old nested bundle
|
|
71
|
+
// (api-spec.yaml + source.tar.gz), which would otherwise "succeed" with an unextracted blob.
|
|
72
|
+
if (Object.keys(sourceEntries).length === 0) {
|
|
73
|
+
throw messages.createError('error.sourceBundleMalformed', ['archive contains no files']);
|
|
74
|
+
}
|
|
75
|
+
if ('source.tar.gz' in sourceEntries) {
|
|
71
76
|
throw messages.createError('error.sourceBundleMalformed', [
|
|
72
|
-
|
|
77
|
+
'unexpected nested source.tar.gz (the org returned the older nested bundle shape)',
|
|
73
78
|
]);
|
|
74
79
|
}
|
|
75
|
-
await writeFile(join(appDir, 'api-spec.yaml'), apiSpec);
|
|
76
|
-
const sourceEntries = await untarGzip(sourceTarGz);
|
|
77
80
|
const resolvedAppDir = resolve(appDir);
|
|
78
81
|
await Promise.all(Object.entries(sourceEntries).map(async ([relativePath, data]) => {
|
|
79
82
|
const filePath = resolve(appDir, relativePath);
|
|
@@ -86,9 +89,7 @@ export async function unpackComputeBundle(buffer, appDir) {
|
|
|
86
89
|
await mkdir(dirname(filePath), { recursive: true });
|
|
87
90
|
await writeFile(filePath, data);
|
|
88
91
|
}));
|
|
89
|
-
|
|
90
|
-
// plugin carry api-spec.yaml in source.tar.gz too; older ones only had the outer copy.
|
|
91
|
-
return { fileCount: new Set([...Object.keys(sourceEntries), 'api-spec.yaml']).size };
|
|
92
|
+
return { fileCount: Object.keys(sourceEntries).length };
|
|
92
93
|
}
|
|
93
94
|
// Inverse of tarGzip below -- decompress and read every tar entry into memory, keyed by name.
|
|
94
95
|
// Wraps decompression/parse failures as error.sourceBundleMalformed rather than letting a raw
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeBundle.js","sourceRoot":"","sources":["../../src/shared/computeBundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,MAAqB,MAAM,QAAQ,CAAC;AAC3C,OAAO,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,GAAG,GACJ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAC,MAAM,IAAI,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,WAAW,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,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aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAqB,EAAE;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,OAAO,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACxC,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;YACnB,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CACH,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -41,15 +41,16 @@ export async function uploadComputeSource(connection, params) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
// Speculative resource -- see the Compute tag description in salesforce-connect-compute.yaml.
|
|
44
|
-
// The
|
|
45
|
-
//
|
|
44
|
+
// The CLI always asks for the `latest` build (it has no build id); Heroku Builds pins a build id.
|
|
45
|
+
// The response body is the flat source.tar.gz (not the nested deployment-bundle.tar.gz
|
|
46
|
+
// uploadComputeSource sends), binary, so this must round-trip exact bytes. connection.request()'s default string decoding is UTF-8,
|
|
46
47
|
// which is lossy for arbitrary gzip bytes (any byte >0x7F gets re-encoded) -- passing
|
|
47
48
|
// { encoding: 'binary' } (Node's alias for latin1) as the second argument makes jsforce decode
|
|
48
49
|
// the response 1:1 into a string, which Buffer.from(str, 'binary') then turns back into the
|
|
49
50
|
// exact original bytes.
|
|
50
51
|
export async function downloadComputeSource(connection, params) {
|
|
51
52
|
try {
|
|
52
|
-
const body = await connection.request({ method: 'GET', url: `/connect/compute/${encodeURIComponent(params.appIdOrName)}/source` }, { encoding: 'binary' });
|
|
53
|
+
const body = await connection.request({ method: 'GET', url: `/connect/compute/${encodeURIComponent(params.appIdOrName)}/builds/latest/source` }, { encoding: 'binary' });
|
|
53
54
|
return Buffer.from(body, 'binary');
|
|
54
55
|
}
|
|
55
56
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeConnectApi.js","sourceRoot":"","sources":["../../src/shared/computeConnectApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAkB,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,QAAQ,MAAM,WAAW,CAAC;AAIjC,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;AAYtE,iFAAiF;AACjF,yEAAyE;AACzE,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,UAAsB,EACtB,MAAiC;IAEjC,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC5B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QACnC,QAAQ,EAAE,0BAA0B;QACpC,WAAW,EAAE,kBAAkB;KAChC,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC,OAAO,CAAsB;YACnD,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yBAAyB;YAC9B,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;SA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AAM,QAAQ,CAAC,WAAW,CAAC,+BAA+B,EAAE,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC;AAOD,8FAA8F;AAC9F,kGAAkG;AAClG,uFAAuF;AACvF,oIAAoI;AACpI,sFAAsF;AACtF,+FAA+F;AAC/F,4FAA4F;AAC5F,wBAAwB;AACxB,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,UAAsB,EACtB,MAAmC;IAEnC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,OAAO,CACnC,EAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,oBAAoB,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,uBAAuB,EAAC,EACvG,EAAC,QAAQ,EAAE,QAAQ,EAAC,CACrB,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,QAAQ,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku/plugin-compute",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@heroku/plugin-compute",
|
|
9
|
-
"version": "0.4.
|
|
9
|
+
"version": "0.4.3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4",
|
package/oclif.manifest.json
CHANGED
|
@@ -659,12 +659,13 @@
|
|
|
659
659
|
"telemetry-drain:display:compute"
|
|
660
660
|
]
|
|
661
661
|
},
|
|
662
|
-
"compute:
|
|
662
|
+
"compute:list:config": {
|
|
663
663
|
"aliases": [],
|
|
664
664
|
"args": {},
|
|
665
|
-
"
|
|
665
|
+
"deprecateAliases": true,
|
|
666
|
+
"description": "Shows every config var (environment variable) currently set for a deployed\ncompute app, sorted alphabetically. Goes through the target org's Salesforce\nConnect API, which calls Heroku on your behalf. Use sf compute get config to\nread a single var's value, sf compute set config to add or change vars, or\nsf compute unset config to remove them.",
|
|
666
667
|
"examples": [
|
|
667
|
-
"
|
|
668
|
+
"List all config vars for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
668
669
|
],
|
|
669
670
|
"flags": {
|
|
670
671
|
"json": {
|
|
@@ -686,7 +687,7 @@
|
|
|
686
687
|
"char": "n",
|
|
687
688
|
"env": "COMPUTE_APP_NAME",
|
|
688
689
|
"name": "name",
|
|
689
|
-
"summary": "DeveloperName of the compute app to
|
|
690
|
+
"summary": "DeveloperName of the compute app to list config vars for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
690
691
|
"hasDynamicHelp": false,
|
|
691
692
|
"multiple": false,
|
|
692
693
|
"type": "option"
|
|
@@ -710,13 +711,15 @@
|
|
|
710
711
|
}
|
|
711
712
|
},
|
|
712
713
|
"hasDynamicHelp": true,
|
|
713
|
-
"hiddenAliases": [
|
|
714
|
-
|
|
714
|
+
"hiddenAliases": [
|
|
715
|
+
"compute:config:list"
|
|
716
|
+
],
|
|
717
|
+
"id": "compute:list:config",
|
|
715
718
|
"pluginAlias": "@heroku/plugin-compute",
|
|
716
719
|
"pluginName": "@heroku/plugin-compute",
|
|
717
720
|
"pluginType": "core",
|
|
718
721
|
"strict": true,
|
|
719
|
-
"summary": "
|
|
722
|
+
"summary": "List a compute app's config vars.",
|
|
720
723
|
"enableJsonFlag": true,
|
|
721
724
|
"requiresProject": false,
|
|
722
725
|
"isESM": true,
|
|
@@ -724,32 +727,25 @@
|
|
|
724
727
|
"dist",
|
|
725
728
|
"commands",
|
|
726
729
|
"compute",
|
|
727
|
-
"
|
|
728
|
-
"
|
|
730
|
+
"list",
|
|
731
|
+
"config.js"
|
|
729
732
|
],
|
|
730
733
|
"aliasPermutations": [],
|
|
731
734
|
"permutations": [
|
|
732
|
-
"compute:
|
|
733
|
-
"
|
|
734
|
-
"
|
|
735
|
-
"compute:
|
|
736
|
-
"
|
|
737
|
-
"
|
|
735
|
+
"compute:list:config",
|
|
736
|
+
"list:compute:config",
|
|
737
|
+
"list:config:compute",
|
|
738
|
+
"compute:config:list",
|
|
739
|
+
"config:compute:list",
|
|
740
|
+
"config:list:compute"
|
|
738
741
|
]
|
|
739
742
|
},
|
|
740
|
-
"compute:
|
|
743
|
+
"compute:list:telemetry-drain": {
|
|
741
744
|
"aliases": [],
|
|
742
|
-
"args": {
|
|
743
|
-
|
|
744
|
-
"multiple": true,
|
|
745
|
-
"name": "key"
|
|
746
|
-
}
|
|
747
|
-
},
|
|
748
|
-
"deprecateAliases": true,
|
|
749
|
-
"description": "Goes through the target org's Salesforce Connect API, which calls Heroku on\nyour behalf. Pass a single key to print its bare value, or more than one to\nprint each as key: value. Fails if any requested key isn't currently set.",
|
|
745
|
+
"args": {},
|
|
746
|
+
"description": "Shows every OpenTelemetry drain forwarding the compute app's logs, metrics,\nand traces, with each drain's ID, signals, and endpoint. Use\nsf compute display telemetry-drain to see the full detail of a single drain.",
|
|
750
747
|
"examples": [
|
|
751
|
-
"
|
|
752
|
-
"Print more than one config var:\n<%= config.bin %> <%= command.id %> STRIPE_KEY LOG_LEVEL --name CreditRatingScorer --target-org my-org"
|
|
748
|
+
"List the telemetry drains for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
753
749
|
],
|
|
754
750
|
"flags": {
|
|
755
751
|
"json": {
|
|
@@ -771,7 +767,7 @@
|
|
|
771
767
|
"char": "n",
|
|
772
768
|
"env": "COMPUTE_APP_NAME",
|
|
773
769
|
"name": "name",
|
|
774
|
-
"summary": "DeveloperName of the compute app to
|
|
770
|
+
"summary": "DeveloperName of the compute app to list telemetry drains for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
775
771
|
"hasDynamicHelp": false,
|
|
776
772
|
"multiple": false,
|
|
777
773
|
"type": "option"
|
|
@@ -795,15 +791,13 @@
|
|
|
795
791
|
}
|
|
796
792
|
},
|
|
797
793
|
"hasDynamicHelp": true,
|
|
798
|
-
"hiddenAliases": [
|
|
799
|
-
|
|
800
|
-
],
|
|
801
|
-
"id": "compute:get:config",
|
|
794
|
+
"hiddenAliases": [],
|
|
795
|
+
"id": "compute:list:telemetry-drain",
|
|
802
796
|
"pluginAlias": "@heroku/plugin-compute",
|
|
803
797
|
"pluginName": "@heroku/plugin-compute",
|
|
804
798
|
"pluginType": "core",
|
|
805
799
|
"strict": true,
|
|
806
|
-
"summary": "
|
|
800
|
+
"summary": "List the telemetry drains configured for a compute app.",
|
|
807
801
|
"enableJsonFlag": true,
|
|
808
802
|
"requiresProject": false,
|
|
809
803
|
"isESM": true,
|
|
@@ -811,26 +805,25 @@
|
|
|
811
805
|
"dist",
|
|
812
806
|
"commands",
|
|
813
807
|
"compute",
|
|
814
|
-
"
|
|
815
|
-
"
|
|
808
|
+
"list",
|
|
809
|
+
"telemetry-drain.js"
|
|
816
810
|
],
|
|
817
811
|
"aliasPermutations": [],
|
|
818
812
|
"permutations": [
|
|
819
|
-
"compute:
|
|
820
|
-
"
|
|
821
|
-
"
|
|
822
|
-
"compute:
|
|
823
|
-
"
|
|
824
|
-
"
|
|
813
|
+
"compute:list:telemetry-drain",
|
|
814
|
+
"list:compute:telemetry-drain",
|
|
815
|
+
"list:telemetry-drain:compute",
|
|
816
|
+
"compute:telemetry-drain:list",
|
|
817
|
+
"telemetry-drain:compute:list",
|
|
818
|
+
"telemetry-drain:list:compute"
|
|
825
819
|
]
|
|
826
820
|
},
|
|
827
|
-
"compute:get:
|
|
821
|
+
"compute:get:build-log": {
|
|
828
822
|
"aliases": [],
|
|
829
823
|
"args": {},
|
|
830
|
-
"description": "Fetches
|
|
824
|
+
"description": "Fetches the bounded build/compile log (dependency install, slug compile,\nrelease) for the most recent build of a compute app -- useful right after\ndeploy to confirm the build compiled. This is a one-shot fetch of a\nfinished-or-in-progress log, not a live stream; use compute tail runtime-log\nfor the ongoing runtime log.\n\nThis is a read-only, org-mediated lookup by --name (the app's DeveloperName)\n-- the org calls Heroku's Build Info API on your behalf. It doesn't read from\nor require a local Salesforce DX project.",
|
|
831
825
|
"examples": [
|
|
832
|
-
"Print the
|
|
833
|
-
"Print the most recent 500 log lines:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --num 500 --target-org my-org"
|
|
826
|
+
"Print the latest build's log:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
834
827
|
],
|
|
835
828
|
"flags": {
|
|
836
829
|
"json": {
|
|
@@ -852,7 +845,7 @@
|
|
|
852
845
|
"char": "n",
|
|
853
846
|
"env": "COMPUTE_APP_NAME",
|
|
854
847
|
"name": "name",
|
|
855
|
-
"summary": "DeveloperName of the compute app to fetch
|
|
848
|
+
"summary": "DeveloperName of the compute app to fetch build output for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
856
849
|
"hasDynamicHelp": false,
|
|
857
850
|
"multiple": false,
|
|
858
851
|
"type": "option"
|
|
@@ -873,24 +866,16 @@
|
|
|
873
866
|
"hasDynamicHelp": false,
|
|
874
867
|
"multiple": false,
|
|
875
868
|
"type": "option"
|
|
876
|
-
},
|
|
877
|
-
"num": {
|
|
878
|
-
"name": "num",
|
|
879
|
-
"summary": "Number of recent log lines to print.",
|
|
880
|
-
"default": 100,
|
|
881
|
-
"hasDynamicHelp": false,
|
|
882
|
-
"multiple": false,
|
|
883
|
-
"type": "option"
|
|
884
869
|
}
|
|
885
870
|
},
|
|
886
871
|
"hasDynamicHelp": true,
|
|
887
872
|
"hiddenAliases": [],
|
|
888
|
-
"id": "compute:get:
|
|
873
|
+
"id": "compute:get:build-log",
|
|
889
874
|
"pluginAlias": "@heroku/plugin-compute",
|
|
890
875
|
"pluginName": "@heroku/plugin-compute",
|
|
891
876
|
"pluginType": "core",
|
|
892
877
|
"strict": true,
|
|
893
|
-
"summary": "Print the
|
|
878
|
+
"summary": "Print the build/compile log for a compute app's latest build.",
|
|
894
879
|
"enableJsonFlag": true,
|
|
895
880
|
"requiresProject": false,
|
|
896
881
|
"isESM": true,
|
|
@@ -899,25 +884,31 @@
|
|
|
899
884
|
"commands",
|
|
900
885
|
"compute",
|
|
901
886
|
"get",
|
|
902
|
-
"
|
|
887
|
+
"build-log.js"
|
|
903
888
|
],
|
|
904
889
|
"aliasPermutations": [],
|
|
905
890
|
"permutations": [
|
|
906
|
-
"compute:get:
|
|
907
|
-
"get:compute:
|
|
908
|
-
"get:
|
|
909
|
-
"compute:
|
|
910
|
-
"
|
|
911
|
-
"
|
|
891
|
+
"compute:get:build-log",
|
|
892
|
+
"get:compute:build-log",
|
|
893
|
+
"get:build-log:compute",
|
|
894
|
+
"compute:build-log:get",
|
|
895
|
+
"build-log:compute:get",
|
|
896
|
+
"build-log:get:compute"
|
|
912
897
|
]
|
|
913
898
|
},
|
|
914
|
-
"compute:
|
|
899
|
+
"compute:get:config": {
|
|
915
900
|
"aliases": [],
|
|
916
|
-
"args": {
|
|
901
|
+
"args": {
|
|
902
|
+
"key": {
|
|
903
|
+
"multiple": true,
|
|
904
|
+
"name": "key"
|
|
905
|
+
}
|
|
906
|
+
},
|
|
917
907
|
"deprecateAliases": true,
|
|
918
|
-
"description": "
|
|
908
|
+
"description": "Goes through the target org's Salesforce Connect API, which calls Heroku on\nyour behalf. Pass a single key to print its bare value, or more than one to\nprint each as key: value. Fails if any requested key isn't currently set.",
|
|
919
909
|
"examples": [
|
|
920
|
-
"
|
|
910
|
+
"Print a single config var's value:\n<%= config.bin %> <%= command.id %> STRIPE_KEY --name CreditRatingScorer --target-org my-org",
|
|
911
|
+
"Print more than one config var:\n<%= config.bin %> <%= command.id %> STRIPE_KEY LOG_LEVEL --name CreditRatingScorer --target-org my-org"
|
|
921
912
|
],
|
|
922
913
|
"flags": {
|
|
923
914
|
"json": {
|
|
@@ -939,7 +930,7 @@
|
|
|
939
930
|
"char": "n",
|
|
940
931
|
"env": "COMPUTE_APP_NAME",
|
|
941
932
|
"name": "name",
|
|
942
|
-
"summary": "DeveloperName of the compute app to
|
|
933
|
+
"summary": "DeveloperName of the compute app to read config from (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
943
934
|
"hasDynamicHelp": false,
|
|
944
935
|
"multiple": false,
|
|
945
936
|
"type": "option"
|
|
@@ -964,14 +955,14 @@
|
|
|
964
955
|
},
|
|
965
956
|
"hasDynamicHelp": true,
|
|
966
957
|
"hiddenAliases": [
|
|
967
|
-
"compute:config:
|
|
958
|
+
"compute:config:get"
|
|
968
959
|
],
|
|
969
|
-
"id": "compute:
|
|
960
|
+
"id": "compute:get:config",
|
|
970
961
|
"pluginAlias": "@heroku/plugin-compute",
|
|
971
962
|
"pluginName": "@heroku/plugin-compute",
|
|
972
963
|
"pluginType": "core",
|
|
973
964
|
"strict": true,
|
|
974
|
-
"summary": "
|
|
965
|
+
"summary": "Print one or more of a compute app's config var values.",
|
|
975
966
|
"enableJsonFlag": true,
|
|
976
967
|
"requiresProject": false,
|
|
977
968
|
"isESM": true,
|
|
@@ -979,25 +970,26 @@
|
|
|
979
970
|
"dist",
|
|
980
971
|
"commands",
|
|
981
972
|
"compute",
|
|
982
|
-
"
|
|
973
|
+
"get",
|
|
983
974
|
"config.js"
|
|
984
975
|
],
|
|
985
976
|
"aliasPermutations": [],
|
|
986
977
|
"permutations": [
|
|
987
|
-
"compute:
|
|
988
|
-
"
|
|
989
|
-
"
|
|
990
|
-
"compute:config:
|
|
991
|
-
"config:compute:
|
|
992
|
-
"config:
|
|
978
|
+
"compute:get:config",
|
|
979
|
+
"get:compute:config",
|
|
980
|
+
"get:config:compute",
|
|
981
|
+
"compute:config:get",
|
|
982
|
+
"config:compute:get",
|
|
983
|
+
"config:get:compute"
|
|
993
984
|
]
|
|
994
985
|
},
|
|
995
|
-
"compute:
|
|
986
|
+
"compute:get:runtime-log": {
|
|
996
987
|
"aliases": [],
|
|
997
988
|
"args": {},
|
|
998
|
-
"description": "
|
|
989
|
+
"description": "Fetches a compute app's runtime log -- the app's ongoing output (request\nhandling, application logs), not the build/compile log; use compute get\nbuild-log for that.\n\nThis prints the most recent log lines and exits. To keep the session open and\nstream new lines as they arrive, use compute tail runtime-log.\n\nThe recent lines come from the Cedar log buffer (about 1500 lines at most), so\n--num can't return more than that. Fir apps keep no log history, so for them\nthe command reads the live log session instead and stops once it goes quiet\nfor a few seconds; it can only show output the session delivers in that\nwindow, so --num doesn't apply; use compute tail runtime-log to follow a Fir app's log. The\ncommand stops waiting after 30 seconds and prints whatever log lines it has\nreceived by then; if none arrived, it fails with a timeout error.\n\nThis is an org-mediated operation by --name (the app's DeveloperName) -- the\norg creates a log session with Heroku on your behalf and hands back a\nshort-lived, pre-authorized URL that the CLI reads from directly. It doesn't\nread from or require a local Salesforce DX project.",
|
|
999
990
|
"examples": [
|
|
1000
|
-
"
|
|
991
|
+
"Print the most recent log lines:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org",
|
|
992
|
+
"Print the most recent 500 log lines:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --num 500 --target-org my-org"
|
|
1001
993
|
],
|
|
1002
994
|
"flags": {
|
|
1003
995
|
"json": {
|
|
@@ -1019,7 +1011,7 @@
|
|
|
1019
1011
|
"char": "n",
|
|
1020
1012
|
"env": "COMPUTE_APP_NAME",
|
|
1021
1013
|
"name": "name",
|
|
1022
|
-
"summary": "DeveloperName of the compute app to
|
|
1014
|
+
"summary": "DeveloperName of the compute app to fetch logs for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
1023
1015
|
"hasDynamicHelp": false,
|
|
1024
1016
|
"multiple": false,
|
|
1025
1017
|
"type": "option"
|
|
@@ -1040,16 +1032,24 @@
|
|
|
1040
1032
|
"hasDynamicHelp": false,
|
|
1041
1033
|
"multiple": false,
|
|
1042
1034
|
"type": "option"
|
|
1035
|
+
},
|
|
1036
|
+
"num": {
|
|
1037
|
+
"name": "num",
|
|
1038
|
+
"summary": "Number of recent log lines to print.",
|
|
1039
|
+
"default": 100,
|
|
1040
|
+
"hasDynamicHelp": false,
|
|
1041
|
+
"multiple": false,
|
|
1042
|
+
"type": "option"
|
|
1043
1043
|
}
|
|
1044
1044
|
},
|
|
1045
1045
|
"hasDynamicHelp": true,
|
|
1046
1046
|
"hiddenAliases": [],
|
|
1047
|
-
"id": "compute:
|
|
1047
|
+
"id": "compute:get:runtime-log",
|
|
1048
1048
|
"pluginAlias": "@heroku/plugin-compute",
|
|
1049
1049
|
"pluginName": "@heroku/plugin-compute",
|
|
1050
1050
|
"pluginType": "core",
|
|
1051
1051
|
"strict": true,
|
|
1052
|
-
"summary": "
|
|
1052
|
+
"summary": "Print the recent runtime log for a compute app.",
|
|
1053
1053
|
"enableJsonFlag": true,
|
|
1054
1054
|
"requiresProject": false,
|
|
1055
1055
|
"isESM": true,
|
|
@@ -1057,25 +1057,32 @@
|
|
|
1057
1057
|
"dist",
|
|
1058
1058
|
"commands",
|
|
1059
1059
|
"compute",
|
|
1060
|
-
"
|
|
1061
|
-
"
|
|
1060
|
+
"get",
|
|
1061
|
+
"runtime-log.js"
|
|
1062
1062
|
],
|
|
1063
1063
|
"aliasPermutations": [],
|
|
1064
1064
|
"permutations": [
|
|
1065
|
-
"compute:
|
|
1066
|
-
"
|
|
1067
|
-
"
|
|
1068
|
-
"compute:
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1065
|
+
"compute:get:runtime-log",
|
|
1066
|
+
"get:compute:runtime-log",
|
|
1067
|
+
"get:runtime-log:compute",
|
|
1068
|
+
"compute:runtime-log:get",
|
|
1069
|
+
"runtime-log:compute:get",
|
|
1070
|
+
"runtime-log:get:compute"
|
|
1071
1071
|
]
|
|
1072
1072
|
},
|
|
1073
|
-
"compute:
|
|
1073
|
+
"compute:set:config": {
|
|
1074
1074
|
"aliases": [],
|
|
1075
|
-
"args": {
|
|
1076
|
-
|
|
1075
|
+
"args": {
|
|
1076
|
+
"pair": {
|
|
1077
|
+
"multiple": true,
|
|
1078
|
+
"name": "pair"
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
"deprecateAliases": true,
|
|
1082
|
+
"description": "Goes through the target org's Salesforce Connect API, which calls Heroku on\nyour behalf. Setting a config var restarts the app's dynos so the new value\ntakes effect. Pass one or more KEY=VALUE pairs; a key that doesn't already\nexist is created.",
|
|
1077
1083
|
"examples": [
|
|
1078
|
-
"
|
|
1084
|
+
"Set a single config var:\n<%= config.bin %> <%= command.id %> STRIPE_KEY=sk_live_xyz789 --name CreditRatingScorer --target-org my-org",
|
|
1085
|
+
"Set more than one config var in one command:\n<%= config.bin %> <%= command.id %> STRIPE_KEY=sk_live_xyz789 LOG_LEVEL=debug --name CreditRatingScorer --target-org my-org"
|
|
1079
1086
|
],
|
|
1080
1087
|
"flags": {
|
|
1081
1088
|
"json": {
|
|
@@ -1095,9 +1102,9 @@
|
|
|
1095
1102
|
},
|
|
1096
1103
|
"name": {
|
|
1097
1104
|
"char": "n",
|
|
1105
|
+
"env": "COMPUTE_APP_NAME",
|
|
1098
1106
|
"name": "name",
|
|
1099
|
-
"
|
|
1100
|
-
"summary": "DeveloperName of the compute app to retrieve (or <namespace>\\_\\_<developerName>\nif it was deployed under a namespace).",
|
|
1107
|
+
"summary": "DeveloperName of the compute app to change config for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
1101
1108
|
"hasDynamicHelp": false,
|
|
1102
1109
|
"multiple": false,
|
|
1103
1110
|
"type": "option"
|
|
@@ -1118,59 +1125,44 @@
|
|
|
1118
1125
|
"hasDynamicHelp": false,
|
|
1119
1126
|
"multiple": false,
|
|
1120
1127
|
"type": "option"
|
|
1121
|
-
},
|
|
1122
|
-
"output-dir": {
|
|
1123
|
-
"char": "d",
|
|
1124
|
-
"description": "Defaults to force-app/main/default/computeApps. The app itself is created in a\nsubdirectory named after --name.",
|
|
1125
|
-
"name": "output-dir",
|
|
1126
|
-
"summary": "Directory to create the app in.",
|
|
1127
|
-
"default": "force-app/main/default/computeApps",
|
|
1128
|
-
"hasDynamicHelp": false,
|
|
1129
|
-
"multiple": false,
|
|
1130
|
-
"type": "option"
|
|
1131
1128
|
}
|
|
1132
1129
|
},
|
|
1133
1130
|
"hasDynamicHelp": true,
|
|
1134
|
-
"hiddenAliases": [
|
|
1135
|
-
|
|
1131
|
+
"hiddenAliases": [
|
|
1132
|
+
"compute:config:set"
|
|
1133
|
+
],
|
|
1134
|
+
"id": "compute:set:config",
|
|
1136
1135
|
"pluginAlias": "@heroku/plugin-compute",
|
|
1137
1136
|
"pluginName": "@heroku/plugin-compute",
|
|
1138
1137
|
"pluginType": "core",
|
|
1139
1138
|
"strict": true,
|
|
1140
|
-
"summary": "
|
|
1139
|
+
"summary": "Set one or more of a compute app's config vars.",
|
|
1141
1140
|
"enableJsonFlag": true,
|
|
1142
|
-
"requiresProject":
|
|
1141
|
+
"requiresProject": false,
|
|
1143
1142
|
"isESM": true,
|
|
1144
1143
|
"relativePath": [
|
|
1145
1144
|
"dist",
|
|
1146
1145
|
"commands",
|
|
1147
1146
|
"compute",
|
|
1148
|
-
"
|
|
1149
|
-
"
|
|
1147
|
+
"set",
|
|
1148
|
+
"config.js"
|
|
1150
1149
|
],
|
|
1151
1150
|
"aliasPermutations": [],
|
|
1152
1151
|
"permutations": [
|
|
1153
|
-
"compute:
|
|
1154
|
-
"
|
|
1155
|
-
"
|
|
1156
|
-
"compute:
|
|
1157
|
-
"
|
|
1158
|
-
"
|
|
1152
|
+
"compute:set:config",
|
|
1153
|
+
"set:compute:config",
|
|
1154
|
+
"set:config:compute",
|
|
1155
|
+
"compute:config:set",
|
|
1156
|
+
"config:compute:set",
|
|
1157
|
+
"config:set:compute"
|
|
1159
1158
|
]
|
|
1160
1159
|
},
|
|
1161
|
-
"compute:
|
|
1160
|
+
"compute:source:retrieve": {
|
|
1162
1161
|
"aliases": [],
|
|
1163
|
-
"args": {
|
|
1164
|
-
|
|
1165
|
-
"multiple": true,
|
|
1166
|
-
"name": "pair"
|
|
1167
|
-
}
|
|
1168
|
-
},
|
|
1169
|
-
"deprecateAliases": true,
|
|
1170
|
-
"description": "Goes through the target org's Salesforce Connect API, which calls Heroku on\nyour behalf. Setting a config var restarts the app's dynos so the new value\ntakes effect. Pass one or more KEY=VALUE pairs; a key that doesn't already\nexist is created.",
|
|
1162
|
+
"args": {},
|
|
1163
|
+
"description": "Creates the compute app's directory under force-app/main/default/computeApps/<name>/\n(or --output-dir), retrieves its <name>.computeApp-meta.xml through the Metadata\nAPI, then downloads its source code through the Connect API and extracts it\ninto that same directory. Deploy it with project deploy start.",
|
|
1171
1164
|
"examples": [
|
|
1172
|
-
"
|
|
1173
|
-
"Set more than one config var in one command:\n<%= config.bin %> <%= command.id %> STRIPE_KEY=sk_live_xyz789 LOG_LEVEL=debug --name CreditRatingScorer --target-org my-org"
|
|
1165
|
+
"Retrieve a compute app's source and metadata from an org:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
1174
1166
|
],
|
|
1175
1167
|
"flags": {
|
|
1176
1168
|
"json": {
|
|
@@ -1190,9 +1182,9 @@
|
|
|
1190
1182
|
},
|
|
1191
1183
|
"name": {
|
|
1192
1184
|
"char": "n",
|
|
1193
|
-
"env": "COMPUTE_APP_NAME",
|
|
1194
1185
|
"name": "name",
|
|
1195
|
-
"
|
|
1186
|
+
"required": true,
|
|
1187
|
+
"summary": "DeveloperName of the compute app to retrieve (or <namespace>\\_\\_<developerName>\nif it was deployed under a namespace).",
|
|
1196
1188
|
"hasDynamicHelp": false,
|
|
1197
1189
|
"multiple": false,
|
|
1198
1190
|
"type": "option"
|
|
@@ -1213,36 +1205,44 @@
|
|
|
1213
1205
|
"hasDynamicHelp": false,
|
|
1214
1206
|
"multiple": false,
|
|
1215
1207
|
"type": "option"
|
|
1208
|
+
},
|
|
1209
|
+
"output-dir": {
|
|
1210
|
+
"char": "d",
|
|
1211
|
+
"description": "Defaults to force-app/main/default/computeApps. The app itself is created in a\nsubdirectory named after --name.",
|
|
1212
|
+
"name": "output-dir",
|
|
1213
|
+
"summary": "Directory to create the app in.",
|
|
1214
|
+
"default": "force-app/main/default/computeApps",
|
|
1215
|
+
"hasDynamicHelp": false,
|
|
1216
|
+
"multiple": false,
|
|
1217
|
+
"type": "option"
|
|
1216
1218
|
}
|
|
1217
1219
|
},
|
|
1218
1220
|
"hasDynamicHelp": true,
|
|
1219
|
-
"hiddenAliases": [
|
|
1220
|
-
|
|
1221
|
-
],
|
|
1222
|
-
"id": "compute:set:config",
|
|
1221
|
+
"hiddenAliases": [],
|
|
1222
|
+
"id": "compute:source:retrieve",
|
|
1223
1223
|
"pluginAlias": "@heroku/plugin-compute",
|
|
1224
1224
|
"pluginName": "@heroku/plugin-compute",
|
|
1225
1225
|
"pluginType": "core",
|
|
1226
1226
|
"strict": true,
|
|
1227
|
-
"summary": "
|
|
1227
|
+
"summary": "Retrieve a compute app's source and metadata from an org into your local Salesforce DX project.",
|
|
1228
1228
|
"enableJsonFlag": true,
|
|
1229
|
-
"requiresProject":
|
|
1229
|
+
"requiresProject": true,
|
|
1230
1230
|
"isESM": true,
|
|
1231
1231
|
"relativePath": [
|
|
1232
1232
|
"dist",
|
|
1233
1233
|
"commands",
|
|
1234
1234
|
"compute",
|
|
1235
|
-
"
|
|
1236
|
-
"
|
|
1235
|
+
"source",
|
|
1236
|
+
"retrieve.js"
|
|
1237
1237
|
],
|
|
1238
1238
|
"aliasPermutations": [],
|
|
1239
1239
|
"permutations": [
|
|
1240
|
-
"compute:
|
|
1241
|
-
"
|
|
1242
|
-
"
|
|
1243
|
-
"compute:
|
|
1244
|
-
"
|
|
1245
|
-
"
|
|
1240
|
+
"compute:source:retrieve",
|
|
1241
|
+
"source:compute:retrieve",
|
|
1242
|
+
"source:retrieve:compute",
|
|
1243
|
+
"compute:retrieve:source",
|
|
1244
|
+
"retrieve:compute:source",
|
|
1245
|
+
"retrieve:source:compute"
|
|
1246
1246
|
]
|
|
1247
1247
|
},
|
|
1248
1248
|
"compute:tail:runtime-log": {
|
|
@@ -1517,5 +1517,5 @@
|
|
|
1517
1517
|
]
|
|
1518
1518
|
}
|
|
1519
1519
|
},
|
|
1520
|
-
"version": "0.4.
|
|
1520
|
+
"version": "0.4.3"
|
|
1521
1521
|
}
|