@powerhousedao/reactor-workflow 6.2.3-dev.78 → 6.2.3-dev.80

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/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G as PieceWorkerPool, K as PieceWorker, M as StaticConnectionResolver, R as InMemorySecretProvider, a as PieceRegistry, d as runWorkflow, gt as fetchPieceBundle, ht as ensurePieceBundle, it as extractDedupeKey, lt as sourcedResolver, n as WorkflowTelemetry, ut as buildDescriptor, v as ActivepiecesBlockExecutor, y as CompositeBlockExecutor } from "./telemetry-CiXdMoVa.js";
1
+ import { G as PieceWorkerPool, K as PieceWorker, M as StaticConnectionResolver, R as InMemorySecretProvider, a as PieceRegistry, d as runWorkflow, gt as fetchPieceBundle, ht as ensurePieceBundle, it as extractDedupeKey, lt as sourcedResolver, n as WorkflowTelemetry, ut as buildDescriptor, v as ActivepiecesBlockExecutor, y as CompositeBlockExecutor } from "./telemetry-BCXPCbfB.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { readFileSync, realpathSync } from "node:fs";
4
4
  import path from "node:path";
@@ -13,6 +13,7 @@ import dgram from "node:dgram";
13
13
  import dns from "node:dns";
14
14
  import net, { isIP } from "node:net";
15
15
  import { AsyncLocalStorage } from "node:async_hooks";
16
+ import tls from "node:tls";
16
17
  //#region \0rolldown/runtime.js
17
18
  var __create = Object.create;
18
19
  var __defProp = Object.defineProperty;
@@ -6186,6 +6187,30 @@ function installEgressGuard() {
6186
6187
  refuseResolvers(dns.promises.Resolver.prototype, true);
6187
6188
  }
6188
6189
  //#endregion
6190
+ //#region src/pieces/activepieces/worker/tls-guard.ts
6191
+ /** Defaults rejectUnauthorized to true on every tls.connect; returns the undo. */
6192
+ function installTlsGuard() {
6193
+ const original = tls.connect;
6194
+ const guarded = function(...args) {
6195
+ const index = args.findIndex((a) => a !== null && typeof a === "object" && !Array.isArray(a));
6196
+ if (index === -1) {
6197
+ const at = args.findIndex((a) => typeof a === "function");
6198
+ args.splice(at === -1 ? args.length : at, 0, { rejectUnauthorized: true });
6199
+ } else {
6200
+ const options = args[index];
6201
+ if (options.rejectUnauthorized === void 0) args[index] = {
6202
+ ...options,
6203
+ rejectUnauthorized: true
6204
+ };
6205
+ }
6206
+ return original.apply(this, args);
6207
+ };
6208
+ tls.connect = guarded;
6209
+ return () => {
6210
+ if (tls.connect === guarded) tls.connect = original;
6211
+ };
6212
+ }
6213
+ //#endregion
6189
6214
  //#region src/pieces/activepieces/worker/timings.ts
6190
6215
  const ANCHOR_MS = 1e3;
6191
6216
  const STEP_MS = 5;
@@ -6594,6 +6619,7 @@ function dispatch(message) {
6594
6619
  }
6595
6620
  function startPieceWorker() {
6596
6621
  installEgressGuard();
6622
+ installTlsGuard();
6597
6623
  process.on("message", onMessage);
6598
6624
  markWorkerReady();
6599
6625
  }