@heroku/plugin-compute 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ servers:
63
63
  # description: Successful response
64
64
  paths: {}
65
65
  `,
66
- 'src/routes/index.js': `export default async function (_fastify, _opts) {
66
+ 'src/routes/index.js': `export default async function (fastify, _opts) {
67
67
  // Add your routes here. Every route registered this way automatically gets
68
68
  // the Salesforce preHandler from ../plugins/heroku-applink.js, which
69
69
  // decodes the invoking org's context onto request.sdk. For example:
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@heroku/plugin-compute",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@heroku/plugin-compute",
9
- "version": "0.4.0",
9
+ "version": "0.4.1",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@oclif/core": "^4",
@@ -15,7 +15,7 @@
15
15
  "@salesforce/sf-plugins-core": "^12",
16
16
  "@salesforce/source-deploy-retrieve": "^12.37.2",
17
17
  "form-data": "^4.0.6",
18
- "ignore": "^7.0.8",
18
+ "ignore": "^7.0.13",
19
19
  "jszip": "^3.10.1",
20
20
  "openapi-fetch": "^0.17.0",
21
21
  "tar-stream": "^3.2.1"
@@ -9476,9 +9476,9 @@
9476
9476
  "license": "BSD-3-Clause"
9477
9477
  },
9478
9478
  "node_modules/ignore": {
9479
- "version": "7.0.12",
9480
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz",
9481
- "integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==",
9479
+ "version": "7.0.13",
9480
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.13.tgz",
9481
+ "integrity": "sha512-2E8Q6rh+1RRSq/YdaGsNfXsEZy9FVqv6BSSrkmZJP7BnaoPnRfKL+YaofPvP+5rzdk144qSm6i4+hvPgUcbV4Q==",
9482
9482
  "license": "MIT",
9483
9483
  "engines": {
9484
9484
  "node": ">= 4"
@@ -659,12 +659,13 @@
659
659
  "telemetry-drain:display:compute"
660
660
  ]
661
661
  },
662
- "compute:get:build-log": {
662
+ "compute:list:config": {
663
663
  "aliases": [],
664
664
  "args": {},
665
- "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.",
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
- "Print the latest build's log:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
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 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.",
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
- "id": "compute:get:build-log",
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": "Print the build/compile log for a compute app's latest build.",
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
- "get",
728
- "build-log.js"
730
+ "list",
731
+ "config.js"
729
732
  ],
730
733
  "aliasPermutations": [],
731
734
  "permutations": [
732
- "compute:get:build-log",
733
- "get:compute:build-log",
734
- "get:build-log:compute",
735
- "compute:build-log:get",
736
- "build-log:compute:get",
737
- "build-log:get:compute"
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:get:config": {
743
+ "compute:list:telemetry-drain": {
741
744
  "aliases": [],
742
- "args": {
743
- "key": {
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
- "Print a single config var's value:\n<%= config.bin %> <%= command.id %> STRIPE_KEY --name CreditRatingScorer --target-org my-org",
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 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.",
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
- "compute:config:get"
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": "Print one or more of a compute app's config var values.",
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
- "get",
815
- "config.js"
808
+ "list",
809
+ "telemetry-drain.js"
816
810
  ],
817
811
  "aliasPermutations": [],
818
812
  "permutations": [
819
- "compute:get:config",
820
- "get:compute:config",
821
- "get:config:compute",
822
- "compute:config:get",
823
- "config:compute:get",
824
- "config:get:compute"
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:runtime-log": {
821
+ "compute:get:build-log": {
828
822
  "aliases": [],
829
823
  "args": {},
830
- "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 this\ncommand isn't supported for them; use compute tail runtime-log instead. 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.",
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 most recent log lines:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org",
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 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.",
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:runtime-log",
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 recent runtime log for a compute app.",
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
- "runtime-log.js"
887
+ "build-log.js"
903
888
  ],
904
889
  "aliasPermutations": [],
905
890
  "permutations": [
906
- "compute:get:runtime-log",
907
- "get:compute:runtime-log",
908
- "get:runtime-log:compute",
909
- "compute:runtime-log:get",
910
- "runtime-log:compute:get",
911
- "runtime-log:get:compute"
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:list:config": {
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": "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.",
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
- "List all config vars for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
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 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.",
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:list"
958
+ "compute:config:get"
968
959
  ],
969
- "id": "compute:list:config",
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": "List a compute app's config vars.",
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
- "list",
973
+ "get",
983
974
  "config.js"
984
975
  ],
985
976
  "aliasPermutations": [],
986
977
  "permutations": [
987
- "compute:list:config",
988
- "list:compute:config",
989
- "list:config:compute",
990
- "compute:config:list",
991
- "config:compute:list",
992
- "config:list:compute"
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:list:telemetry-drain": {
986
+ "compute:get:runtime-log": {
996
987
  "aliases": [],
997
988
  "args": {},
998
- "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.",
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 this\ncommand isn't supported for them; use compute tail runtime-log instead. 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
- "List the telemetry drains for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
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 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.",
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:list:telemetry-drain",
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": "List the telemetry drains configured for a compute app.",
1052
+ "summary": "Print the recent runtime log for a compute app.",
1053
1053
  "enableJsonFlag": true,
1054
1054
  "requiresProject": false,
1055
1055
  "isESM": true,
@@ -1057,17 +1057,17 @@
1057
1057
  "dist",
1058
1058
  "commands",
1059
1059
  "compute",
1060
- "list",
1061
- "telemetry-drain.js"
1060
+ "get",
1061
+ "runtime-log.js"
1062
1062
  ],
1063
1063
  "aliasPermutations": [],
1064
1064
  "permutations": [
1065
- "compute:list:telemetry-drain",
1066
- "list:compute:telemetry-drain",
1067
- "list:telemetry-drain:compute",
1068
- "compute:telemetry-drain:list",
1069
- "telemetry-drain:compute:list",
1070
- "telemetry-drain:list:compute"
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
1073
  "compute:set:config": {
@@ -1517,5 +1517,5 @@
1517
1517
  ]
1518
1518
  }
1519
1519
  },
1520
- "version": "0.4.0"
1520
+ "version": "0.4.1"
1521
1521
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@heroku/plugin-compute",
3
3
  "description": "CLI for Compute",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "author": "Heroku",
6
6
  "bugs": "https://github.com/heroku/plugin-compute/issues",
7
7
  "dependencies": {
@@ -11,7 +11,7 @@
11
11
  "@salesforce/sf-plugins-core": "^12",
12
12
  "@salesforce/source-deploy-retrieve": "^12.37.2",
13
13
  "form-data": "^4.0.6",
14
- "ignore": "^7.0.8",
14
+ "ignore": "^7.0.13",
15
15
  "jszip": "^3.10.1",
16
16
  "openapi-fetch": "^0.17.0",
17
17
  "tar-stream": "^3.2.1"