Skip to content

Commit 3843c6f

Browse files
authored
Bundle default handler at the build step (#2803)
* Bundle default handler at the build step * fix that
1 parent c863999 commit 3843c6f

File tree

6 files changed

+133
-106
lines changed

6 files changed

+133
-106
lines changed

.c8rc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"scripts",
88
"templates",
99
"**/*.test.ts",
10+
"packages/ai-constructs/lib/conversation/runtime/default_handler_bundled",
1011
"packages/plugin-types",
1112
"packages/integration-tests"
1213
],

.changeset/nice-showers-clean.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aws-amplify/ai-constructs': patch
3+
---
4+
5+
Bundle default handler at the build step

package-lock.json

Lines changed: 75 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"type": "module",
66
"scripts": {
7-
"build": "tsc --build packages/* scripts",
7+
"build": "tsc --build packages/* scripts && tsx scripts/concurrent_workspace_script.ts post:compile --if-present",
88
"check:api": "npm run update:api && tsx scripts/check_api_extract.ts",
99
"check:create-amplify-deps": "npm run update:create-amplify-deps && tsx scripts/check_no_git_diff.ts",
1010
"check:dependencies": "tsx scripts/check_dependencies.ts",

packages/ai-constructs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"main": "lib/index.js",
2323
"types": "lib/index.d.ts",
2424
"scripts": {
25+
"post:compile": "npm run bundle:default-handler",
26+
"bundle:default-handler": "esbuild src/conversation/runtime/default_handler.ts --bundle --platform=node --target=node20 --outfile=lib/conversation/runtime/default_handler_bundled/index.js",
2527
"update:api": "api-extractor run --local"
2628
},
2729
"license": "Apache-2.0",

0 commit comments

Comments
 (0)