Comparing version 1.14.1 to 1.14.3
{ | ||
"name": "aws-crt", | ||
"version": "1.14.1", | ||
"version": "1.14.3", | ||
"description": "NodeJS/browser bindings to the aws-c-* libraries", | ||
@@ -25,4 +25,4 @@ "homepage": "https://github.com/awslabs/aws-crt-nodejs", | ||
"install:puppeteer": "npm install --save-dev jest-puppeteer puppeteer @types/puppeteer", | ||
"prepare": "node ./scripts/tsc.js && node ./scripts/build.js", | ||
"install": "node ./scripts/install.js --production" | ||
"prepare": "node ./scripts/tsc.js && node ./scripts/install.js", | ||
"install": "node ./scripts/install.js" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -102,3 +102,3 @@ /** | ||
function buildLocally() { | ||
async function buildLocally() { | ||
const platform = os.platform(); | ||
@@ -151,3 +151,3 @@ let arch = os.arch(); | ||
var buildSystem = new cmake.BuildSystem(options); | ||
return buildSystem.build(); | ||
await buildSystem.build(); | ||
} | ||
@@ -186,21 +186,26 @@ | ||
// Makes sure the work directory is what we need | ||
const workDir = path.join(__dirname, "../") | ||
process.chdir(workDir); | ||
const nativeSourceDir = "crt/" | ||
(async function main() { | ||
// Makes sure the work directory is what we need | ||
const workDir = path.join(__dirname, "../") | ||
process.chdir(workDir); | ||
const nativeSourceDir = "crt/" | ||
if (checkDoDownload()) { | ||
const tmpPath = path.join(__dirname, `temp${crypto.randomBytes(16).toString("hex")}/`); | ||
try { | ||
buildFromRemoteSource(tmpPath); | ||
if (checkDoDownload()) { | ||
const tmpPath = path.join(__dirname, `temp${crypto.randomBytes(16).toString("hex")}/`); | ||
try { | ||
buildFromRemoteSource(tmpPath); | ||
} | ||
catch (err) { | ||
// teardown tmpPath and source directory on failure | ||
rmRecursive(tmpPath); | ||
rmRecursive(nativeSourceDir); | ||
throw err; | ||
} | ||
} else { | ||
// kick off local build | ||
await buildLocally(); | ||
} | ||
catch (err) { | ||
// teardown tmpPath and source directory on failure | ||
rmRecursive(tmpPath); | ||
rmRecursive(nativeSourceDir); | ||
throw err; | ||
} | ||
} else { | ||
// kick off local build | ||
buildLocally(); | ||
} | ||
})().catch((reason) => { | ||
console.error(reason) | ||
process.exitCode = 1 | ||
}) |
@@ -10,6 +10,9 @@ /** | ||
const binaryDir = path.join('dist', 'bin', `${os.platform()}-${os.arch()}`, 'aws-crt-nodejs.node'); | ||
if (fs.existsSync(binaryDir)) { | ||
// Don't continue if the binding already exists (unless --rebuild is specified) | ||
process.exit(0); | ||
if (!process.argv.includes('--rebuild')) { | ||
const binaryDir = path.join('dist', 'bin', `${os.platform()}-${os.arch()}`, 'aws-crt-nodejs.node'); | ||
if (fs.existsSync(binaryDir)) { | ||
// Don't continue if the binding already exists (unless --rebuild is specified) | ||
console.log("The binding already exists, skip rebuilding. To rebuild the native addon, please run install.js with `--rebuild`") | ||
process.exit(0); | ||
} | ||
} | ||
@@ -16,0 +19,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
10106
12094379