@peakfinder/headless 1.0.7 → 1.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.
package/index.js CHANGED
@@ -1,8 +1,16 @@
1
- 'use strict'
1
+ const native = require('./src/native/index.js');
2
2
 
3
- // const path = require('path')
4
- // const load = require('node-gyp-build')
3
+ const { getDataDir, getCacheDir } = require('./src/util/paths');
5
4
 
6
- // module.exports = load(path.join(__dirname))
5
+ const APP_NAME = 'PeakFinder';
7
6
 
8
- module.exports = require('node-gyp-build')(__dirname)
7
+ const paths = {
8
+ dataDir: getDataDir(APP_NAME),
9
+ cacheDir: getCacheDir(APP_NAME),
10
+ };
11
+
12
+ console.log(paths);
13
+
14
+ native.init(paths);
15
+
16
+ module.exports = native;
package/package.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
2
  "name": "@peakfinder/headless",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "PeakFinder headless functions for getting 'true' sun and moon times by using a digital elevation model for the calculations.",
5
5
  "author": "Fabio Soldati <info@peakfinder.com> (https://www.peakfinder.com/about/)",
6
- "os": ["linux", "darwin", "win32"],
7
- "cpu": ["x64", "arm64"],
6
+ "os": [
7
+ "linux",
8
+ "darwin",
9
+ "win32"
10
+ ],
11
+ "cpu": [
12
+ "x64",
13
+ "arm64"
14
+ ],
8
15
  "license": "SEE LICENSE IN LICENSE.txt",
9
16
  "scripts": {
10
17
  "prebuild": "prebuildify --napi --strip",
11
18
  "test": "node --napi-modules ./test/test_index.js",
19
+ "prettier": "prettier --write '**/*.js'",
12
20
  "publishtonodejs": "npm publish --access public"
13
21
  },
14
22
  "main": "index.js",
@@ -22,9 +30,8 @@
22
30
  "node-gyp-build": "^4.8.0"
23
31
  },
24
32
  "devDependencies": {
33
+ "node-gyp": "^10.0.0",
25
34
  "prebuildify": "^6.0.0",
26
- "node-gyp": "^10.0.0"
35
+ "prettier": "^3.7.4"
27
36
  }
28
37
  }
29
-
30
-