Skip to content

Commit 5f86bab

Browse files
asdf
1 parent f0b14e3 commit 5f86bab

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- uses: actions/setup-node@v4
2121
with:
2222
node-version: ${{ matrix.node }}
23-
cache: 'npm'
24-
registry-url: 'https://registry.npmjs.org'
23+
cache: "npm"
24+
registry-url: "https://registry.npmjs.org"
2525

2626
- name: Build with Node.js ${{ matrix.node }} on ${{ matrix.os }}
2727
run: node .github/scripts/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
@@ -61,7 +61,7 @@ jobs:
6161
- name: Run Buildx
6262
run: |
6363
docker buildx create --name builder --bootstrap --use
64-
docker buildx build --progress=plain --no-cache \
64+
docker buildx build \
6565
--platform linux/${{ matrix.linux_arch }} \
6666
--build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \
6767
--build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \

src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
import { resolve } from 'path';
12
import { cryptoCallbacks } from './crypto_callbacks';
23
export { cryptoCallbacks };
34

5+
function loadBindings(): MongoCryptBindings {
6+
return require(resolve(__dirname, '../build/Release/mongocrypt.node'));
7+
8+
}
49
import bindings = require('bindings');
510
const mc: MongoCryptBindings = bindings('mongocrypt');
611

@@ -54,7 +59,7 @@ type MongoCryptConstructorOptions = {
5459
};
5560

5661
export interface MongoCryptConstructor {
57-
new (options: MongoCryptConstructorOptions): MongoCrypt;
62+
new(options: MongoCryptConstructorOptions): MongoCrypt;
5863
libmongocryptVersion: string;
5964
}
6065

@@ -116,6 +121,6 @@ export const MongoCrypt: MongoCryptConstructor = class MongoCrypt extends mc.Mon
116121

117122
/** exported for testing only. */
118123
interface MongoCryptContextCtor {
119-
new (): MongoCryptContext;
124+
new(): MongoCryptContext;
120125
}
121126
export const MongoCryptContextCtor: MongoCryptContextCtor = mc.MongoCryptContextCtor;

0 commit comments

Comments
 (0)