You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP →
Socket
Book a DemoInstallSign in
Socket

@celo/celo-composer

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@celo/celo-composer - npm Package Compare versions

Comparing version

to
2.2.6

3

dist/commands/create.js

@@ -120,3 +120,4 @@ "use strict";

console.log(chalk_1.default.white(" pnpm dev"));
console.log(chalk_1.default.gray("\nHappy coding! šŸš€\n"));
console.log(chalk_1.default.gray("\nYour project has been initialized with Git and an initial commit has been created."));
console.log(chalk_1.default.gray("Happy coding! šŸš€\n"));
}

@@ -123,0 +124,0 @@ catch (error) {

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

const child_process_1 = require("child_process");
const fs_extra_1 = __importDefault(require("fs-extra"));
const ora_1 = __importDefault(require("ora"));
const path_1 = __importDefault(require("path"));
const util_1 = require("util");

@@ -40,3 +42,60 @@ const plop_generator_1 = require("./plop-generator");

}
// Initialize Git repository and create initial commit
const gitSpinner = (0, ora_1.default)("Initializing Git repository...").start();
try {
// Check if Git is installed
try {
await execAsync("git --version");
}
catch (error) {
gitSpinner.warn("Git is not installed. Skipping Git initialization.");
return;
}
// Initialize Git repository
await execAsync("git init", { cwd: projectPath });
// Create .gitignore if it doesn't exist
const gitignorePath = path_1.default.join(projectPath, ".gitignore");
if (!fs_extra_1.default.existsSync(gitignorePath)) {
const defaultGitignore = `# Dependencies
node_modules
.pnpm-store
# Build outputs
.next
dist
out
# Environment variables
.env*.local
# Debug logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Local development
.DS_Store
*.pem
# IDE
.idea
.vscode
*.swp
*.swo
`;
await fs_extra_1.default.writeFile(gitignorePath, defaultGitignore);
}
// Add all files and create initial commit
await execAsync("git add .", { cwd: projectPath });
await execAsync('git commit -m "Initial commit"', {
cwd: projectPath,
env: { ...process.env, GIT_AUTHOR_NAME: "Celo Composer", GIT_AUTHOR_EMAIL: "composer@celo.org" }
});
gitSpinner.succeed("Git repository initialized with initial commit");
}
catch (error) {
gitSpinner.fail("Failed to initialize Git repository");
console.log(chalk_1.default.yellow("You can initialize Git manually later with: git init && git add . && git commit -m 'Initial commit'"));
}
}
//# sourceMappingURL=project-generator.js.map
{
"name": "@celo/celo-composer",
"version": "2.2.5",
"version": "2.2.6",
"description": "CLI tool for generating customizable Celo blockchain starter kits",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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