Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-bridge-app

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-bridge-app - npm Package Compare versions

Comparing version 1.0.31 to 1.0.32

dist/renameSync.js

33

dist/index.js

@@ -20,2 +20,3 @@ #!/usr/bin/env node

const child_process_1 = require("child_process");
const renameSync_1 = require("./renameSync");
const launch = () => __awaiter(void 0, void 0, void 0, function* () {

@@ -52,33 +53,7 @@ const slugRegex = /^[a-zA-Z0-9-]+$/;

fs_1.default.mkdirSync(projectName);
const oldPath = path_1.default.join(tempRepoPath, `examples/${template}`);
const newPath = projectName;
// const oldPath = path.join(tempRepoPath, `examples/${template}`);
// const newPath = projectName;
// fs.copyFileSync(path.join(tempRepoPath, `examples/${template}`), projectName);
// fs.unlinkSync(`examples/${template}`);
fs_1.default.rename(oldPath, newPath, (err) => {
if (err) {
if (err.code === 'EPERM') {
copy();
}
else {
console.error(err);
}
return;
}
console.log(`Successfully renamed '${oldPath}' to '${newPath}'`);
});
function copy() {
const readStream = fs_1.default.createReadStream(oldPath);
const writeStream = fs_1.default.createWriteStream(newPath);
readStream.on('error', console.error);
writeStream.on('error', console.error);
readStream.on('close', () => {
fs_1.default.rmdir(oldPath, (err) => {
if (err)
return console.error(err);
console.log(`Successfully renamed '${oldPath}' to '${newPath}'`);
});
});
readStream.pipe(writeStream);
}
// fs.renameSync(path.join(tempRepoPath, `examples/${template}`), projectName);
(0, renameSync_1.renameFolder)(path_1.default.join(tempRepoPath, `examples/${template}`), projectName);
const packageJSONPath = path_1.default.join(projectName, 'package.json');

@@ -85,0 +60,0 @@ fs_1.default.readFile(packageJSONPath, 'utf-8', (err, data) => {

{
"name": "create-bridge-app",
"version": "1.0.31",
"version": "1.0.32",
"description": "Create Bridge-powered Express app with one command",

@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc