@acentera/node 0.0.5 → 0.0.7

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.
package/README.md CHANGED
@@ -0,0 +1,11 @@
1
+ # How to build
2
+ ------------------------
3
+
4
+ docker pull registry.gitlab.com/acentera/docker-shared/tools/acentera_core-v0.0.7-amd64
5
+ docker tag registry.gitlab.com/acentera/docker-shared/tools/acentera_core-v0.0.7-amd64 acentera_core:latest
6
+
7
+ git clone git@bitbucket.org:acentera/acentera-core-plugin.git acentera-core-plugin
8
+
9
+ git commit .
10
+ npm version patch
11
+ npm publish
Binary file
Binary file
package/acentera.node CHANGED
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,13 @@
1
1
  {
2
2
  "name": "@acentera/node",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
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"
9
11
  ],
10
12
  "repository": {
11
13
  "type": "git",