diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6d023a0ee..43829b665 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -58,6 +58,8 @@ jobs: agentcore --version agentcore create --name sanitytest --language Python --framework Strands --model-provider Bedrock --memory none --json test -f sanitytest/agentcore/agentcore.json + agentcore package --directory integ-tests/fixtures/typescript-package + test -f integ-tests/fixtures/typescript-package/agentcore/TestRuntime.zip - name: Upload tarball artifact if: matrix.node-version == '20.x' uses: actions/upload-artifact@v7 diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 7b88a3835..83d9216d6 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -56,7 +56,7 @@ await esbuild.build({ banner: { js: `import { createRequire } from 'module'; import { fileURLToPath as __ef } from 'url'; import { dirname as __ed } from 'path'; const require = createRequire(import.meta.url); const __filename = __ef(import.meta.url); const __dirname = __ed(__filename);`, }, - external: ['fsevents', '@aws-cdk/toolkit-lib', '@napi-rs/keyring'], + external: ['esbuild', 'fsevents', '@aws-cdk/toolkit-lib', '@napi-rs/keyring'], plugins: [optionalDepsPlugin, textLoaderPlugin], }); diff --git a/integ-tests/fixtures/typescript-package/agentcore/agentcore.json b/integ-tests/fixtures/typescript-package/agentcore/agentcore.json new file mode 100644 index 000000000..850133be9 --- /dev/null +++ b/integ-tests/fixtures/typescript-package/agentcore/agentcore.json @@ -0,0 +1,14 @@ +{ + "name": "PackageTest", + "version": 1, + "runtimes": [ + { + "name": "TestRuntime", + "build": "CodeZip", + "entrypoint": "main.ts", + "codeLocation": "./app/TestRuntime", + "runtimeVersion": "NODE_22", + "protocol": "HTTP" + } + ] +} diff --git a/integ-tests/fixtures/typescript-package/app/TestRuntime/main.ts b/integ-tests/fixtures/typescript-package/app/TestRuntime/main.ts new file mode 100644 index 000000000..4bccd8813 --- /dev/null +++ b/integ-tests/fixtures/typescript-package/app/TestRuntime/main.ts @@ -0,0 +1,2 @@ +// The packaged CLI only needs a valid TypeScript entry point to exercise esbuild. +export {}; diff --git a/integ-tests/fixtures/typescript-package/app/TestRuntime/package.json b/integ-tests/fixtures/typescript-package/app/TestRuntime/package.json new file mode 100644 index 000000000..4a795ba47 --- /dev/null +++ b/integ-tests/fixtures/typescript-package/app/TestRuntime/package.json @@ -0,0 +1,5 @@ +{ + "name": "typescript-package-fixture", + "version": "1.0.0", + "private": true +} diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 51381483d..458a779f7 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -38,6 +38,7 @@ "@smithy/shared-ini-file-loader": "^4.4.2", "commander": "^14.0.2", "dotenv": "^17.2.3", + "esbuild": "^0.28.0", "fast-json-stable-stringify": "^2.1.0", "fflate": "^0.8.2", "handlebars": "^4.7.8", @@ -72,7 +73,6 @@ "@xterm/headless": "^6.0.0", "aws-cdk-lib": "^2.258.0", "constructs": "^10.4.4", - "esbuild": "^0.28.0", "eslint": "^9.39.4", "eslint-config-prettier": "^10.1.8", "eslint-import-resolver-typescript": "^4.4.4", @@ -3180,7 +3180,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3197,7 +3196,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3214,7 +3212,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3231,7 +3228,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3248,7 +3244,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3265,7 +3260,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3282,7 +3276,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3299,7 +3292,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3316,7 +3308,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3333,7 +3324,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3350,7 +3340,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3367,7 +3356,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3384,7 +3372,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3401,7 +3388,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3418,7 +3404,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3435,7 +3420,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3452,7 +3436,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3469,7 +3452,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3486,7 +3468,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3503,7 +3484,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3520,7 +3500,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3537,7 +3516,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3554,7 +3532,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3571,7 +3548,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3588,7 +3564,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3605,7 +3580,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8625,7 +8599,6 @@ "version": "0.28.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { diff --git a/package.json b/package.json index e1baafff7..a44b4cd13 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "@smithy/shared-ini-file-loader": "^4.4.2", "commander": "^14.0.2", "dotenv": "^17.2.3", + "esbuild": "^0.28.0", "fast-json-stable-stringify": "^2.1.0", "fflate": "^0.8.2", "handlebars": "^4.7.8", @@ -143,7 +144,6 @@ "@xterm/headless": "^6.0.0", "aws-cdk-lib": "^2.258.0", "constructs": "^10.4.4", - "esbuild": "^0.28.0", "eslint": "^9.39.4", "eslint-config-prettier": "^10.1.8", "eslint-import-resolver-typescript": "^4.4.4",