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

create-payload-app

Package Overview
Dependencies
Maintainers
1
Versions
435
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-payload-app - npm Package Compare versions

Comparing version 0.3.17 to 0.3.18-beta.0

12

dist/lib/create-project.js

@@ -51,3 +51,3 @@ "use strict";

var write_common_files_1 = require("./write-common-files");
function createProjectDir(projectDir) {
function createOrFindProjectDir(projectDir) {
return __awaiter(this, void 0, void 0, function () {

@@ -60,10 +60,8 @@ var pathExists;

pathExists = _a.sent();
if (pathExists) {
(0, log_1.error)("The project directory '".concat(projectDir, "' already exists"));
process.exit(1);
}
if (!!pathExists) return [3 /*break*/, 3];
return [4 /*yield*/, fs_extra_1.default.mkdir(projectDir)];
case 2:
_a.sent();
return [2 /*return*/];
_a.label = 3;
case 3: return [2 /*return*/];
}

@@ -170,3 +168,3 @@ });

switch (_a.label) {
case 0: return [4 /*yield*/, createProjectDir(projectDir)];
case 0: return [4 /*yield*/, createOrFindProjectDir(projectDir)];
case 1:

@@ -173,0 +171,0 @@ _a.sent();

@@ -57,3 +57,5 @@ "use strict";

message: 'Enter MongoDB connection',
initial: "mongodb://localhost/".concat((0, slugify_1.default)(projectName)),
initial: "mongodb://localhost/".concat(projectName === '.'
? "payload-".concat(getRandomDigitSuffix())
: (0, slugify_1.default)(projectName)),
validate: function (value) { return value.length; },

@@ -73,1 +75,4 @@ }, {

exports.getDatabaseConnection = getDatabaseConnection;
function getRandomDigitSuffix() {
return (Math.random() * Math.pow(10, 6)).toFixed(0);
}

@@ -121,3 +121,3 @@ "use strict";

payloadSecret = _e.sent();
projectDir = "./".concat((0, slugify_1.default)(projectName));
projectDir = projectName === '.' ? process.cwd() : "./".concat((0, slugify_1.default)(projectName));
return [4 /*yield*/, getPackageManager(this.args)];

@@ -124,0 +124,0 @@ case 12:

@@ -39,3 +39,3 @@ {

},
"version": "0.3.17",
"version": "0.3.18-beta.0",
"devDependencies": {

@@ -42,0 +42,0 @@ "@types/command-exists": "^1.2.0",

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