-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/cpuinfo-as-node-module-new-build-scripts
- Loading branch information
1 parent
683b12c
commit 049fd2a
Showing
14 changed files
with
281 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"targets": [ | ||
{ | ||
"target_name": "cpuinfo", | ||
"sources": ["src/cpuinfo.cpp"], | ||
"include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")" ], | ||
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Type definitions for cpuinfo | ||
// Project: http://github.com/tryghost/node-sqlite3 | ||
|
||
/// <reference types="node" /> | ||
export type InstructionSet = 'AVX' | 'AVX2' | 'AVX512'; // Add more as needed later | ||
declare module "cpuinfo" { | ||
declare const cpuInfo: { | ||
cpuInfo: () => InstructionSet[]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = exports = { cpuInfo: require('./build/Release/cpuinfo.node') } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "cpuinfo", | ||
"version": "1.0.0", | ||
"description": "Get CPU instructions", | ||
"main": "index.js", | ||
"types": "./index.d.ts", | ||
"scripts": { | ||
"install": "prebuild-install -r napi || node-gyp rebuild" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"gypfile": true, | ||
"binary": { | ||
"napi_versions": [ | ||
3, | ||
6 | ||
] | ||
}, | ||
"dependencies": { | ||
"bindings": "^1.5.0", | ||
"node-addon-api": "^7.0.0", | ||
"prebuild-install": "^7.1.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.14.9", | ||
"typescript": "^5.5.3" | ||
}, | ||
"peerDependencies": { | ||
"node-gyp": "8.x" | ||
}, | ||
"files": [ | ||
"binding.gyp", | ||
"deps/", | ||
"*.js", | ||
"*.d.ts", | ||
"src/" | ||
] | ||
} |
Oops, something went wrong.