diff --git a/.gitignore b/.gitignore index 4d0bdc8266..eb71e87556 100644 --- a/.gitignore +++ b/.gitignore @@ -101,4 +101,4 @@ Llama/__pycache__/* Examples/otel-dotnet/obj/* InfrastructureAgent/sea-prep.blob -InfrastructureAgent/InfrastrctureAgent \ No newline at end of file +InfrastructureAgent/InfrastructureAgent \ No newline at end of file diff --git a/InfrastructureAgent/Scripts/Build/Linux.sh b/InfrastructureAgent/Scripts/Build/Linux.sh index 6e8dd17519..7068711c45 100644 --- a/InfrastructureAgent/Scripts/Build/Linux.sh +++ b/InfrastructureAgent/Scripts/Build/Linux.sh @@ -1,6 +1,10 @@ +# This is taken from: https://nodejs.org/api/single-executable-applications.html + node --experimental-sea-config sea-config.json -cp $(command -v node) InfrastrctureAgent -npx postject hello NODE_SEA_BLOB sea-prep.blob \ - --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 +cp $(command -v node) InfrastructureAgent +npm i postject -g +npx postject InfrastructureAgent NODE_SEA_BLOB sea-prep.blob \ + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 + diff --git a/InfrastructureAgent/Scripts/Build/Mac.sh b/InfrastructureAgent/Scripts/Build/Mac.sh index 2130ce1727..3501c6e5b4 100644 --- a/InfrastructureAgent/Scripts/Build/Mac.sh +++ b/InfrastructureAgent/Scripts/Build/Mac.sh @@ -1,10 +1,12 @@ +# This is taken from: https://nodejs.org/api/single-executable-applications.html + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" node --experimental-sea-config $SCRIPT_DIR/../../sea-config.json -cp $(command -v node) InfrastrctureAgent -codesign --remove-signature InfrastrctureAgent +cp $(command -v node) InfrastructureAgent +codesign --remove-signature InfrastructureAgent npm i postject -g -npx postject InfrastrctureAgent NODE_SEA_BLOB sea-prep.blob \ +npx postject InfrastructureAgent NODE_SEA_BLOB sea-prep.blob \ --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ --macho-segment-name NODE_SEA -codesign --sign - InfrastrctureAgent +codesign --sign - InfrastructureAgent diff --git a/InfrastructureAgent/Scripts/Build/Windows.sh b/InfrastructureAgent/Scripts/Build/Windows.sh index e69de29bb2..655204e1ad 100644 --- a/InfrastructureAgent/Scripts/Build/Windows.sh +++ b/InfrastructureAgent/Scripts/Build/Windows.sh @@ -0,0 +1,11 @@ +# This is taken from: https://nodejs.org/api/single-executable-applications.html + +SET TEMP_SCRIPT_DIR=%~dp0 +SET SCRIPT_DIR=%SCRIPT_DIR:~0,-1% +npm i postject -g +node --experimental-sea-config %(SCRIPT_DIR)/../../sea-config.json +node -e "require('fs').copyFileSync(process.execPath, 'InfrastructureAgent.exe')" +signtool remove /s InfrastructureAgent.exe +npx postject InfrastructureAgent.exe NODE_SEA_BLOB sea-prep.blob ` + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 +signtool sign /fd SHA256 InfrastructureAgent.exe \ No newline at end of file diff --git a/InfrastructureAgent/package.json b/InfrastructureAgent/package.json index 9f53e75b29..8da118b5a2 100644 --- a/InfrastructureAgent/package.json +++ b/InfrastructureAgent/package.json @@ -1,8 +1,8 @@ { "name": "infrastructure-agent", "version": "1.0.0", - "description": "", "type": "module", + "description": "", "main": "./build/dist/Index.js", "scripts": { "start": "node --require ts-node/register Index.ts", diff --git a/InfrastructureAgent/tsconfig.json b/InfrastructureAgent/tsconfig.json index eb74c7ec7f..7f30ba7057 100644 --- a/InfrastructureAgent/tsconfig.json +++ b/InfrastructureAgent/tsconfig.json @@ -18,7 +18,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ "jsx": "react" /* Specify what JSX code is generated. */, "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */