From 39cb0caa554a74f9fbbd7e1b579004f08ddac407 Mon Sep 17 00:00:00 2001 From: Jeremiah Gowdy Date: Wed, 4 Oct 2023 11:48:58 -0700 Subject: [PATCH] Attempt to fix package.json (#64) * Attempt to fix package.json * Fix GitHub Actions * Set main to dist/asherah.node * Add stub * Avoid conflicting with asherah.node name --- .github/workflows/publish.yml | 4 +--- .github/workflows/test.yml | 4 +--- package.json | 6 +++--- src/main.js | 0 4 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 src/main.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1139828..8ee3eae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,9 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install packages - run: npm i - - name: Build - run: npm run build + run: npm install - name: Test run: npm test - name: Set version to match tag diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e619358..c678300 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,9 +31,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install npm packages - run: npm i - - name: Build TypeScript - run: npm run build + run: npm install - name: Unit Test run: npm test - name: Initialize RDBMS based metastore diff --git a/package.json b/package.json index 57d1b63..430cf5f 100644 --- a/package.json +++ b/package.json @@ -2,15 +2,14 @@ "name": "asherah", "version": "0.0.0", "description": "Asherah envelope encryption and key rotation library", - "main": "dist/asherah.js", + "main": "dist/main.js", "repository": { "type": "git", "url": "https://github.com/jgowdy/asherah-cobhan.git" }, "scripts": { - "build": "node-gyp build && mkdir -p dist/ && cp build/Release/asherah.node dist/asherah.node && cp src/asherah.d.ts dist/asherah.d.ts", "preinstall": "scripts/download-libraries.sh", - "install": "CFLAGS=-fexceptions CXXFLAGS=-fexceptions node-gyp rebuild", + "install": "node-gyp configure && node-gyp build && mkdir -p dist/ && cp build/Release/asherah.node dist/asherah.node && cp src/asherah.d.ts dist/asherah.d.ts && cp src/main.js dist/main.js", "test:mocha": "mocha", "test": "nyc npm run test:mocha", "posttest": "npm run lint", @@ -23,6 +22,7 @@ "binding.gyp", "src/asherah.cc", "dist/asherah.d.ts", + "dist/main.js", "scripts/download-libraries.sh", "SHA256SUMS", "SHA256SUMS-darwin", diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..e69de29