native-machine-id 0.0.9 → 0.0.10
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0DA,MAAM,MAAM,mBAAmB,GAAG;IAEhC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAMF,wBAAsB,YAAY,CAAC,EACjC,GAAW,GACZ,GAAE,mBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAQxD;AAMD,wBAAgB,gBAAgB,CAAC,EAAE,GAAW,EAAE,GAAE,mBAAwB,GACtE,MAAM,GACN,SAAS,CAQZ"}
|
package/dist/index.js
CHANGED
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getMachineId = getMachineId;
|
|
7
7
|
exports.getMachineIdSync = getMachineIdSync;
|
|
8
|
-
const bindings_1 = __importDefault(require("bindings"));
|
|
9
8
|
const crypto_1 = require("crypto");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const util_1 = require("util");
|
|
11
11
|
const getBindings = () => {
|
|
12
12
|
const tries = [
|
|
13
|
-
() => (0, bindings_1.default)('native_machine_id'),
|
|
14
13
|
() => require('../build/Release/native_machine_id.node'),
|
|
14
|
+
() => require('./build/Release/native_machine_id.node'),
|
|
15
15
|
() => require('../build/Debug/native_machine_id.node'),
|
|
16
16
|
];
|
|
17
17
|
for (const tryBinding of tries) {
|
|
@@ -19,9 +19,14 @@ const getBindings = () => {
|
|
|
19
19
|
return tryBinding();
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
|
+
console.error(error);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
throw new Error('Unable to load native machine ID bindings. Please ensure the module is built correctly.'
|
|
25
|
+
throw new Error('Unable to load native machine ID bindings. Please ensure the module is built correctly. Tried: ' +
|
|
26
|
+
JSON.stringify([
|
|
27
|
+
path_1.default.resolve('../build/Release/native_machine_id.node'),
|
|
28
|
+
path_1.default.resolve('../build/Debug/native_machine_id.node'),
|
|
29
|
+
]));
|
|
25
30
|
};
|
|
26
31
|
const binding = getBindings();
|
|
27
32
|
function getMachineIdFromBindingSync() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAmEA,oCAUC;AAMD,4CAUC;AA7FD,mCAAoC;AACpC,gDAAwB;AACxB,+BAAiC;AAEjC,MAAM,WAAW,GAAG,GAKlB,EAAE;IACF,MAAM,KAAK,GAAG;QAEZ,GAAG,EAAE,CAAC,OAAO,CAAC,yCAAyC,CAAC;QACxD,GAAG,EAAE,CAAC,OAAO,CAAC,wCAAwC,CAAC;QACvD,GAAG,EAAE,CAAC,OAAO,CAAC,uCAAuC,CAAC;KACvD,CAAC;IAEF,KAAK,MAAM,UAAU,IAAI,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC;YACH,OAAO,UAAU,EAAE,CAAC;QACtB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAEf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CACb,iGAAiG;QAC/F,IAAI,CAAC,SAAS,CAAC;YACb,cAAI,CAAC,OAAO,CAAC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C9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-machine-id",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Native retrieval of a unique desktop machine ID without admin privileges or child processes. Faster and more reliable alternative to node-machine-id.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|