@friggframework/devtools 2.0.0--canary.596.97a5c6b.0 → 2.0.0--canary.596.fc8739c.0
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.
|
@@ -348,8 +348,7 @@ class IntegrationBuilder extends InfrastructureBuilder {
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
// Create HTTP API handler for integration (catch-all route AFTER
|
|
351
|
-
// webhooks).
|
|
352
|
-
// binding gets its own function below so it can have its own DB infra.
|
|
351
|
+
// webhooks). Extension routes get their own functions below.
|
|
353
352
|
result.functions[integrationName] = {
|
|
354
353
|
handler: `node_modules/@friggframework/core/handlers/routers/integration-defined-routers.handlers.${integrationName}.handler`,
|
|
355
354
|
skipEsbuild: true, // Nested exports in node_modules - skip esbuild bundling
|
|
@@ -366,13 +365,8 @@ class IntegrationBuilder extends InfrastructureBuilder {
|
|
|
366
365
|
};
|
|
367
366
|
console.log(` ✓ HTTP handler function defined`);
|
|
368
367
|
|
|
369
|
-
//
|
|
370
|
-
//
|
|
371
|
-
// hubspot + clockwork webhooks) never collide on the same path. The
|
|
372
|
-
// Prisma layer is attached only when the extension/binding declares
|
|
373
|
-
// useDatabase: true (default false → DB-free receiver, faster cold
|
|
374
|
-
// start). Route shape mirrors core's getExtensionRoutes; read directly
|
|
375
|
-
// to avoid coupling the build-time generator to a core runtime import.
|
|
368
|
+
// One serverless function per extension binding, namespaced under
|
|
369
|
+
// /{bindingKey}. Prisma layer attached only when useDatabase is true.
|
|
376
370
|
const sanitizeBindingKey = (name) =>
|
|
377
371
|
String(name).replace(/[^A-Za-z0-9]/g, '');
|
|
378
372
|
const extensionEntries = Object.entries(
|
|
@@ -386,15 +380,12 @@ class IntegrationBuilder extends InfrastructureBuilder {
|
|
|
386
380
|
binding.useDatabase ??
|
|
387
381
|
(extension && extension.useDatabase) ??
|
|
388
382
|
false;
|
|
389
|
-
//
|
|
390
|
-
//
|
|
391
|
-
// Keep this derivation IN SYNC with that file.
|
|
383
|
+
// Wire contract: core's integration-defined-routers derives the
|
|
384
|
+
// identical handler key. Keep both in sync.
|
|
392
385
|
const fnName = `${integrationName}__${sanitizeBindingKey(
|
|
393
386
|
bindingKey
|
|
394
387
|
)}`;
|
|
395
|
-
//
|
|
396
|
-
// binding keys that sanitize to the same value would clobber one
|
|
397
|
-
// function definition while leaving both httpApi paths live.
|
|
388
|
+
// Distinct binding keys can sanitize to the same fnName — fail loud rather than overwrite.
|
|
398
389
|
if (
|
|
399
390
|
Object.prototype.hasOwnProperty.call(result.functions, fnName)
|
|
400
391
|
) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.596.
|
|
4
|
+
"version": "2.0.0--canary.596.fc8739c.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@babel/eslint-parser": "^7.18.9",
|
|
26
26
|
"@babel/parser": "^7.25.3",
|
|
27
27
|
"@babel/traverse": "^7.25.3",
|
|
28
|
-
"@friggframework/core": "2.0.0--canary.596.
|
|
29
|
-
"@friggframework/schemas": "2.0.0--canary.596.
|
|
30
|
-
"@friggframework/test": "2.0.0--canary.596.
|
|
28
|
+
"@friggframework/core": "2.0.0--canary.596.fc8739c.0",
|
|
29
|
+
"@friggframework/schemas": "2.0.0--canary.596.fc8739c.0",
|
|
30
|
+
"@friggframework/test": "2.0.0--canary.596.fc8739c.0",
|
|
31
31
|
"@hapi/boom": "^10.0.1",
|
|
32
32
|
"@inquirer/prompts": "^5.3.8",
|
|
33
33
|
"axios": "^1.7.2",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"validate-npm-package-name": "^5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@friggframework/eslint-config": "2.0.0--canary.596.
|
|
59
|
-
"@friggframework/prettier-config": "2.0.0--canary.596.
|
|
58
|
+
"@friggframework/eslint-config": "2.0.0--canary.596.fc8739c.0",
|
|
59
|
+
"@friggframework/prettier-config": "2.0.0--canary.596.fc8739c.0",
|
|
60
60
|
"aws-sdk-client-mock": "^4.1.0",
|
|
61
61
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
62
62
|
"jest": "^30.1.3",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "fc8739c1c49a9731b8465e0d5e864c71db20c581"
|
|
92
92
|
}
|