@ercworldio/blockchain-shared 1.0.3-dev.3-PROJ-1296.38 → 1.0.3-dev.3-PROJ-1296.39
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlchemyWebhooks.d.ts","sourceRoot":"","sources":["../../src/services/AlchemyWebhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAS,OAAO,EAAE,MAAM,eAAe,CAAC;AAK/D,OAAO,EAA6B,yBAAyB,EAAE,qBAAqB,EAAE,kBAAkB,EAAqC,MAAM,iBAAiB,CAAC;AACrK,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAOvD,KAAK,eAAe,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC7C,MAAM,WAAW,4BAA4B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB;AAQD,UAAU,aAAa;IACnB,OAAO,EAAE,qBAAqB,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;CAC3B;AAGD,cAAM,eAAe;IACjB,OAAc,QAAQ,EAAE,eAAe,CAAC;IACxC,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,MAAM,CAAgB;IACvB,qBAAqB,EAAE,CAAC,GAAG,EAAE,yBAAyB,EAAE,IAAI,EAAE,kBAAkB,KAAK,MAAM,CAAC;IAC5F,iBAAiB,EAAE,CAAC,GAAG,EAAE,yBAAyB,K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C,GAAG,EAAE,yBAAyB,EAAE,IAAI,EAAE,kBAAkB,KAAK,MAAM,CAAC;IAC5F,iBAAiB,EAAE,CAAC,GAAG,EAAE,yBAAyB,KAAK,MAAM,CAAC;IACrE,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa;IAgBlD,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa;IAQlD,UAAU,GAAU,MAAM,yBAAyB,EAAE,cAAc,MAAM,EAAE,WAAW,qBAAqB,EAAE;;;;;;;OAyDnH;IAEM,2CAA2C,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,EAAE,yBAAyB;IAYjH,OAAO,CAAC,cAAc,CAmHrB;IAED,OAAO,CAAC,eAAe,CAiEtB;IAGM,iCAAiC,GAAI,KAAK,yBAAyB;;;;;;;QAIzE;IAIM,sCAAsC,GAAI,KAAK,yBAAyB;;;;;;;QAO9E;IAGY,8BAA8B,CAAC,YAAY,EAAE,yBAAyB;;wBAcR,cAAc;oBAAU,OAAO;mBAAS,MAAM;;;wBAA9C,cAAc;oBAAU,OAAO;mBAAS,MAAM;;;wBAA9C,cAAc;oBAAU,OAAO;mBAAS,MAAM;;;;IAgB5G,8BAA8B,CAAC,GAAG,EAAE,yBAAyB,EAAE,UAAU,EAAE,cAAc;;;;;;;;;CAyEzG;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -61,41 +61,45 @@ class AlchemyWebhooks {
|
|
|
61
61
|
env = "prod";
|
|
62
62
|
const report = yield this.validate_setup(env);
|
|
63
63
|
let new_webhooks = [];
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
new_webhooks.push(...is_created);
|
|
70
|
-
this.logger.info(`Successfully created ${report.failed.length} missing ADDRESS_ACTIVITY webhooks.`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// // Create missing graphql webhooks
|
|
74
|
-
if (report.failed_graphql.length) {
|
|
75
|
-
this.logger.info(`Creating ${report.failed_graphql.length} missing GRAPHQL webhooks`);
|
|
76
|
-
const is_created = yield this.create_webhooks(env, report.failed_graphql, server_host);
|
|
77
|
-
if (is_created.length > 0) {
|
|
78
|
-
new_webhooks.push(...is_created);
|
|
79
|
-
this.logger.info(`Successfully created ${report.failed.length} missing GRAPHQL webhooks.`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (this.config.config.useTunnel) {
|
|
83
|
-
this.logger.info(`Validating local setup.`);
|
|
84
|
-
const report_dev = yield this.validate_setup("local");
|
|
85
|
-
if (report_dev.failed.length) {
|
|
86
|
-
this.logger.info(`LOCAL: Creating ${report_dev.failed.length} missing ADDRESS_ACTIVITY webhooks`);
|
|
87
|
-
const is_created = yield this.create_webhooks("local", report_dev.failed);
|
|
64
|
+
if (env === 'prod') {
|
|
65
|
+
// create missing webhook
|
|
66
|
+
if (report.failed.length) {
|
|
67
|
+
this.logger.info(`Creating ${report.failed.length} missing ADDRESS_ACTIVITY webhooks`);
|
|
68
|
+
const is_created = yield this.create_webhooks(env, report.failed, server_host);
|
|
88
69
|
if (is_created.length > 0) {
|
|
89
70
|
new_webhooks.push(...is_created);
|
|
90
|
-
this.logger.info(`
|
|
71
|
+
this.logger.info(`Successfully created ${report.failed.length} missing ADDRESS_ACTIVITY webhooks.`);
|
|
91
72
|
}
|
|
92
73
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
74
|
+
// // Create missing graphql webhooks
|
|
75
|
+
if (report.failed_graphql.length) {
|
|
76
|
+
this.logger.info(`Creating ${report.failed_graphql.length} missing GRAPHQL webhooks`);
|
|
77
|
+
const is_created = yield this.create_webhooks(env, report.failed_graphql, server_host);
|
|
96
78
|
if (is_created.length > 0) {
|
|
97
79
|
new_webhooks.push(...is_created);
|
|
98
|
-
this.logger.info(`
|
|
80
|
+
this.logger.info(`Successfully created ${report.failed.length} missing GRAPHQL webhooks.`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (this.config.config.useTunnel) {
|
|
86
|
+
this.logger.info(`Validating local setup.`);
|
|
87
|
+
// const report_dev = await this.validate_setup("local");
|
|
88
|
+
if (report.failed.length) {
|
|
89
|
+
this.logger.info(`LOCAL: Creating ${report.failed.length} missing ADDRESS_ACTIVITY webhooks`);
|
|
90
|
+
const is_created = yield this.create_webhooks("local", report.failed);
|
|
91
|
+
if (is_created.length > 0) {
|
|
92
|
+
new_webhooks.push(...is_created);
|
|
93
|
+
this.logger.info(`LOCAL: Successfully created ${report.failed.length} missing ADDRESS_ACTIVITY webhooks.`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (report.failed_graphql.length) {
|
|
97
|
+
this.logger.info(`LOCAL: Creating ${report.failed_graphql.length} missing GRAPHQL webhooks`);
|
|
98
|
+
const is_created = yield this.create_webhooks("local", report.failed_graphql);
|
|
99
|
+
if (is_created.length > 0) {
|
|
100
|
+
new_webhooks.push(...is_created);
|
|
101
|
+
this.logger.info(`LOCLA: Successfully created ${report.failed_graphql.length} missing GRAPHQL webhooks.`);
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
}
|
package/package.json
CHANGED