@tangle-network/agent-integrations 0.53.16 → 0.53.18
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/catalog.d.ts +2 -2
- package/dist/catalog.js +9 -9
- package/dist/{chunk-4CQ7WC6R.js → chunk-35JYHZYE.js} +12328 -11408
- package/dist/{chunk-4CQ7WC6R.js.map → chunk-35JYHZYE.js.map} +1 -1
- package/dist/{chunk-PNHETWE4.js → chunk-ANWNXGVV.js} +2 -2
- package/dist/{chunk-SDDHYJK6.js → chunk-BXDMQIRE.js} +49 -6
- package/dist/chunk-BXDMQIRE.js.map +1 -0
- package/dist/{chunk-3NFISG2G.js → chunk-CDVBNIXE.js} +7 -1
- package/dist/chunk-CDVBNIXE.js.map +1 -0
- package/dist/{chunk-6ZHVV537.js → chunk-FK4ENHCP.js} +2 -2
- package/dist/{chunk-HXSZKRMO.js → chunk-GDMM5YQE.js} +3 -3
- package/dist/{chunk-PDV6QQTH.js → chunk-JXFPIZ3O.js} +1 -1
- package/dist/chunk-JXFPIZ3O.js.map +1 -0
- package/dist/{chunk-EP66ZCMG.js → chunk-KNSVWFSU.js} +2 -2
- package/dist/{chunk-5NLIZJOI.js → chunk-XGL345YX.js} +2 -2
- package/dist/connect/index.d.ts +2 -2
- package/dist/connect/index.js +2 -2
- package/dist/connectors/adapters/index.d.ts +11 -3
- package/dist/connectors/adapters/index.js +10 -2
- package/dist/connectors/index.d.ts +6 -4
- package/dist/connectors/index.js +11 -3
- package/dist/{consumer-DJLQcY8t.d.ts → consumer-DV3XEumb.d.ts} +1 -1
- package/dist/consumer.d.ts +3 -3
- package/dist/consumer.js +2 -2
- package/dist/{core-types-CdAHF1wy.d.ts → core-types-qkW_zZDB.d.ts} +1 -1
- package/dist/coverage-catalog.d.ts +2 -2
- package/dist/coverage-catalog.js +1 -1
- package/dist/{importers-Ch76O-1f.d.ts → importers-B7sdp2Ke.d.ts} +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +17 -9
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +9 -9
- package/dist/middleware/index.d.ts +2 -2
- package/dist/middleware/index.js +2 -2
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +9 -9
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +9 -9
- package/dist/specs.d.ts +2 -2
- package/dist/specs.js +5 -5
- package/dist/{tangle-id-DkT2T54x.d.ts → tangle-id-uvHTbgCw.d.ts} +1 -1
- package/dist/{types-DkIrJgM-.d.ts → types-C1rgdXiP.d.ts} +3 -0
- package/docs/integration-execution-audit.md +22 -16
- package/docs/integration-execution-matrix.json +236 -53
- package/package.json +1 -1
- package/dist/chunk-3NFISG2G.js.map +0 -1
- package/dist/chunk-PDV6QQTH.js.map +0 -1
- package/dist/chunk-SDDHYJK6.js.map +0 -1
- /package/dist/{chunk-PNHETWE4.js.map → chunk-ANWNXGVV.js.map} +0 -0
- /package/dist/{chunk-6ZHVV537.js.map → chunk-FK4ENHCP.js.map} +0 -0
- /package/dist/{chunk-HXSZKRMO.js.map → chunk-GDMM5YQE.js.map} +0 -0
- /package/dist/{chunk-EP66ZCMG.js.map → chunk-KNSVWFSU.js.map} +0 -0
- /package/dist/{chunk-5NLIZJOI.js.map → chunk-XGL345YX.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TangleIdentityUnreachableError,
|
|
3
3
|
createTangleIdentityClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JXFPIZ3O.js";
|
|
5
5
|
|
|
6
6
|
// src/middleware/index.ts
|
|
7
7
|
async function requireTangleAuth(request, opts = {}) {
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
honoTangleAuthMiddleware,
|
|
127
127
|
expressTangleAuthMiddleware
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-ANWNXGVV.js.map
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
integrationSpecToConnector,
|
|
7
7
|
listIntegrationSpecs
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GDMM5YQE.js";
|
|
9
9
|
import {
|
|
10
10
|
CONNECTOR_ADAPTER_FACTORIES,
|
|
11
11
|
adapters_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-35JYHZYE.js";
|
|
13
13
|
|
|
14
14
|
// src/activepieces-catalog.ts
|
|
15
15
|
import { readFileSync } from "fs";
|
|
@@ -263,12 +263,16 @@ function createConnectorAdapterProvider(options) {
|
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
265
|
const scopes = request.requestedScopes && request.requestedScopes.length > 0 ? request.requestedScopes : auth.scopes;
|
|
266
|
-
const url = new URL(
|
|
266
|
+
const url = new URL(resolveOAuthUrlTemplate(
|
|
267
|
+
auth.authorizationUrl,
|
|
268
|
+
request.metadata,
|
|
269
|
+
request.connectorId
|
|
270
|
+
));
|
|
267
271
|
url.searchParams.set("response_type", "code");
|
|
268
272
|
url.searchParams.set("client_id", client.clientId);
|
|
269
273
|
url.searchParams.set("redirect_uri", request.redirectUri);
|
|
270
274
|
if (scopes.length > 0) {
|
|
271
|
-
url.searchParams.set("scope", scopes.join(" "));
|
|
275
|
+
url.searchParams.set("scope", scopes.join(auth.scopeSeparator ?? " "));
|
|
272
276
|
}
|
|
273
277
|
const state = request.state ?? randomState();
|
|
274
278
|
url.searchParams.set("state", state);
|
|
@@ -332,9 +336,14 @@ function createConnectorAdapterProvider(options) {
|
|
|
332
336
|
client_secret: client.clientSecret,
|
|
333
337
|
redirect_uri: request.redirectUri
|
|
334
338
|
});
|
|
339
|
+
const tokenUrl = resolveOAuthUrlTemplate(
|
|
340
|
+
auth.tokenUrl,
|
|
341
|
+
request.metadata,
|
|
342
|
+
request.connectorId
|
|
343
|
+
);
|
|
335
344
|
let res;
|
|
336
345
|
try {
|
|
337
|
-
res = await fetchImpl(
|
|
346
|
+
res = await fetchImpl(tokenUrl, {
|
|
338
347
|
method: "POST",
|
|
339
348
|
headers: {
|
|
340
349
|
"content-type": "application/x-www-form-urlencoded",
|
|
@@ -551,6 +560,40 @@ function redactSensitiveText(text, secrets) {
|
|
|
551
560
|
text
|
|
552
561
|
);
|
|
553
562
|
}
|
|
563
|
+
function resolveOAuthUrlTemplate(template, metadata, connectorId) {
|
|
564
|
+
const placeholders = [...template.matchAll(/\{([A-Za-z][A-Za-z0-9_]*)\}/g)];
|
|
565
|
+
let resolved = template;
|
|
566
|
+
for (const match of placeholders) {
|
|
567
|
+
const key = match[1];
|
|
568
|
+
const raw = metadata?.[key];
|
|
569
|
+
if (typeof raw !== "string" || !isDnsLabel(raw.trim())) {
|
|
570
|
+
throw new IntegrationError(
|
|
571
|
+
`OAuth URL for ${connectorId} requires metadata.${key} as a valid tenant label.`,
|
|
572
|
+
"config_missing"
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
resolved = resolved.replaceAll(match[0], raw.trim().toLowerCase());
|
|
576
|
+
}
|
|
577
|
+
let url;
|
|
578
|
+
try {
|
|
579
|
+
url = new URL(resolved);
|
|
580
|
+
} catch {
|
|
581
|
+
throw new IntegrationError(
|
|
582
|
+
`OAuth URL for ${connectorId} is invalid.`,
|
|
583
|
+
"config_missing"
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
if (url.protocol !== "https:" || url.username || url.password) {
|
|
587
|
+
throw new IntegrationError(
|
|
588
|
+
`OAuth URL for ${connectorId} must be HTTPS without embedded credentials.`,
|
|
589
|
+
"config_missing"
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
return url.toString();
|
|
593
|
+
}
|
|
594
|
+
function isDnsLabel(value) {
|
|
595
|
+
return value.length > 0 && value.length <= 63 && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(value);
|
|
596
|
+
}
|
|
554
597
|
function captureTokenMetadata(tokenMetadata, json, connectorId) {
|
|
555
598
|
if (!tokenMetadata) return {};
|
|
556
599
|
const captured = {};
|
|
@@ -4363,4 +4406,4 @@ export {
|
|
|
4363
4406
|
signCapability,
|
|
4364
4407
|
verifyCapabilityToken
|
|
4365
4408
|
};
|
|
4366
|
-
//# sourceMappingURL=chunk-
|
|
4409
|
+
//# sourceMappingURL=chunk-BXDMQIRE.js.map
|