Fix file name typo in .gitignore and update build scripts for InfrastructureAgent

This commit is contained in:
Simon Larsen
2024-03-06 15:42:06 +00:00
parent cbca931460
commit eccefe30df
6 changed files with 27 additions and 10 deletions

2
.gitignore vendored
View File

@@ -101,4 +101,4 @@ Llama/__pycache__/*
Examples/otel-dotnet/obj/*
InfrastructureAgent/sea-prep.blob
InfrastructureAgent/InfrastrctureAgent
InfrastructureAgent/InfrastructureAgent

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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",

View File

@@ -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. */