@acentera/node 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
package/index.js ADDED
@@ -0,0 +1,28 @@
1
+ const os = require('os');
2
+
3
+ function loadLibrary() {
4
+ const arch = os.arch();
5
+ const platform = os.platform();
6
+
7
+ let libName;
8
+ if (platform === 'darwin') {
9
+ if (arch === 'x64') {
10
+ libName = './acentera.dylib.x86';
11
+ } else {
12
+ libName = './acentera.dylib.arm64';
13
+ }
14
+ } else if (platform === 'linux') {
15
+ if (arch === 'x64') {
16
+ libName = './acentera';
17
+ } else {
18
+ libName = './acentera.arm64';
19
+ }
20
+ } else {
21
+ throw new Error('Unsupported platform');
22
+ }
23
+
24
+ libName += '.node';
25
+ return require(libName);
26
+ }
27
+
28
+ module.exports = loadLibrary();
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@acentera/node",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "ACenterA library",
5
5
  "main": "acentera.node",
6
6
  "scripts": {},
7
7
  "files": [
8
- "dist/"
8
+ "dist/",
9
+ "*.node",
10
+ "index.js",
11
+ "users.yaml"
9
12
  ],
10
13
  "repository": {
11
14
  "type": "git",
package/users.yaml ADDED
@@ -0,0 +1,11 @@
1
+ users:
2
+ bob:
3
+ password: secret
4
+ username: bob
5
+ roles:
6
+ - admin
7
+ alice:
8
+ password: secret
9
+ username: client
10
+ roles:
11
+ - client