Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.glibc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apt-get -qq update && apt-get -qq install -y python3 build-essential && ldd
RUN npm run install:libmongocrypt

ARG RUN_TEST
RUN [ -n "$RUN_TEST" ] && npm run test || echo 'skipping testing!'
RUN if [ -n "$RUN_TEST" ]; then npm test ; else echo "skipping tests" ; fi

FROM scratch

Expand Down
27 changes: 0 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"gypfile": true,
"mongodb:libmongocrypt": "1.11.0",
"dependencies": {
"bindings": "^1.5.0",
"node-addon-api": "^4.3.0",
"prebuild-install": "^7.1.2"
},
Expand Down Expand Up @@ -97,4 +96,4 @@
"moduleResolution": "node"
}
}
}
}
15 changes: 11 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { cryptoCallbacks } from './crypto_callbacks';
export { cryptoCallbacks };

import bindings = require('bindings');
const mc: MongoCryptBindings = bindings('mongocrypt');
function load() {
try {
return require('../build/Release/mongocrypt.node');
} catch {
return require('../build/Debug/mongocrypt.node');
}
}

const mc: MongoCryptBindings = load();

/**
* The value returned by the native bindings
Expand Down Expand Up @@ -54,7 +61,7 @@
};

export interface MongoCryptConstructor {
new (options: MongoCryptConstructorOptions): MongoCrypt;
new(options: MongoCryptConstructorOptions): MongoCrypt;

Check failure on line 64 in src/index.ts

View workflow job for this annotation

GitHub Actions / typescript

Insert `·`
libmongocryptVersion: string;
}

Expand Down Expand Up @@ -116,6 +123,6 @@

/** exported for testing only. */
interface MongoCryptContextCtor {
new (): MongoCryptContext;
new(): MongoCryptContext;

Check failure on line 126 in src/index.ts

View workflow job for this annotation

GitHub Actions / typescript

Insert `·`
}
export const MongoCryptContextCtor: MongoCryptContextCtor = mc.MongoCryptContextCtor;
Loading