napi-postinstall
Advanced tools
+3
-1
@@ -5,3 +5,5 @@ #!/usr/bin/env node | ||
| const index_js_1 = require("./index.js"); | ||
| void (0, index_js_1.checkAndPreparePackage)(process.argv[2], ['1', 'check', 'true', 'yes'].includes(process.argv[3])); | ||
| if ((0, index_js_1.isNpm)()) { | ||
| void (0, index_js_1.checkAndPreparePackage)(process.argv[2], ['1', 'check', 'true', 'yes'].includes(process.argv[3])); | ||
| } | ||
| //# sourceMappingURL=cli.js.map |
+1
-0
| import type { PackageJson } from './types.js'; | ||
| export type * from './target.js'; | ||
| export type * from './types.js'; | ||
| export declare function isNpm(): boolean; | ||
| export declare function checkAndPreparePackage(packageNameOrPackageJson: PackageJson | string, checkVersion?: boolean): Promise<void>; |
+1
-0
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.isNpm = isNpm; | ||
| exports.checkAndPreparePackage = checkAndPreparePackage; | ||
@@ -4,0 +5,0 @@ const node_child_process_1 = require("node:child_process"); |
+1
-1
| { | ||
| "name": "napi-postinstall", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "The `postinstall` script helper for handling native bindings in legacy `npm` versions", |
+4
-2
@@ -93,5 +93,7 @@ # napi-postinstall | ||
| ```js | ||
| import { checkAndPreparePackage } from 'napi-postinstall' | ||
| import { checkAndPreparePackage, isNpm } from 'napi-postinstall' | ||
| checkAndPreparePackage('unrs-resolver' /* <napi-package-name> */) | ||
| if (isNpm()) { | ||
| checkAndPreparePackage('unrs-resolver' /* <napi-package-name> */) | ||
| } | ||
| ``` | ||
@@ -98,0 +100,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
40209
0.47%500
0.81%133
1.53%