@shushed/helpers 0.0.156 → 0.0.157
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/dist/index.js +1 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108943,9 +108943,6 @@ var ActionHelper = class _ActionHelper {
|
|
|
108943
108943
|
return this.getTopicName(false);
|
|
108944
108944
|
}
|
|
108945
108945
|
resolveEnvName(envName) {
|
|
108946
|
-
if (!this.config || !this.config.topicName) {
|
|
108947
|
-
throw new Error("Invariant. onExecute must be called first. topicName must be present in the trigger config");
|
|
108948
|
-
}
|
|
108949
108946
|
if (!this.runtime) {
|
|
108950
108947
|
throw new Error("Invariant. preOnExecute must be called first");
|
|
108951
108948
|
}
|
|
@@ -109058,6 +109055,7 @@ var ActionHelper = class _ActionHelper {
|
|
|
109058
109055
|
if (!this.opts) {
|
|
109059
109056
|
throw new Error("Invariant. onExecute must be called first");
|
|
109060
109057
|
}
|
|
109058
|
+
this.config = Object.fromEntries(Object.entries(this.config).map(([key, value]) => [key, typeof value === "string" ? value.indexOf("process.env.") === 0 ? this.resolveEnvName(value.slice("process.env.".length)) : value : value]));
|
|
109061
109059
|
this.runtime = this.getRuntime();
|
|
109062
109060
|
this.rateLimiters = this.getRateLimiters();
|
|
109063
109061
|
if (this.rateLimiters) {
|
|
@@ -109076,7 +109074,6 @@ var ActionHelper = class _ActionHelper {
|
|
|
109076
109074
|
* Execute the action with proper context binding
|
|
109077
109075
|
*/
|
|
109078
109076
|
async onExecute(config, opts, message, flags) {
|
|
109079
|
-
this.config = Object.fromEntries(Object.entries(config).map(([key, value]) => [key, typeof value === "string" ? value.indexOf("process.env.") === 0 ? this.resolveEnvName(value.slice("process.env.".length)) : value : value]));
|
|
109080
109077
|
this.opts = opts;
|
|
109081
109078
|
this.message = message;
|
|
109082
109079
|
this.flags = Object.fromEntries((flags || []).map((x) => [x, true]));
|