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

@aduh95/caritat-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aduh95/caritat-cli - npm Package Compare versions

Comparing version 0.4.2 to 0.5.1

6

dist/bin/countBallotsFromGit.js

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

}).argv;
const { repo: repoUrl, branch, path: subPath } = parsedArgs;
const { repo: repoURL, branch, path: subPath } = parsedArgs;
const privateKey = parsedArgs.key === "-"

@@ -26,3 +26,3 @@ ? await readStdIn(false)

...(await getEnv(parsedArgs)),
repoUrl,
repoURL,
branch,

@@ -32,3 +32,3 @@ subPath,

keyParts: parsedArgs["key-part"],
firstCommitSha: parsedArgs.fromCommit,
firstCommitRef: parsedArgs.fromCommit,
mailmap: parsedArgs.mailmap,

@@ -35,0 +35,0 @@ commitJsonSummary: null,

@@ -123,12 +123,12 @@ #!/usr/bin/env node

const protocol = parsedArgs.protocol ?? (data.viewer.publicKeys.totalCount ? "ssh" : "http");
function getHTTPRepoUrl(repoUrl, login) {
const url = new URL(repoUrl + ".git");
function getHTTPRepoURL(repoURL, login) {
const url = new URL(repoURL + ".git");
url.username = login;
return url.toString();
}
const repoUrl = protocol === "ssh"
const repoURL = protocol === "ssh"
? data.repository.sshUrl
: getHTTPRepoUrl(data.repository.url, handle);
: getHTTPRepoURL(data.repository.url, handle);
console.warn("All relevant information has been retrieved:", {
repoUrl,
repoURL,
branch,

@@ -153,3 +153,3 @@ subPath,

...(await getEnv(parsedArgs)),
repoUrl,
repoURL,
branch,

@@ -159,3 +159,3 @@ subPath,

keyParts: parsedArgs["key-part"] ?? (await getKeyPartsFromComments()),
firstCommitSha: sha,
firstCommitRef: sha,
mailmap: parsedArgs.mailmap,

@@ -162,0 +162,0 @@ commitJsonSummary: parsedArgs["commit-json-summary"]

@@ -0,1 +1,3 @@

import { once } from "node:events";
import { stdin, stdout } from "node:process";
import generateNewVoteFolder from "@aduh95/caritat/generateNewVoteFolder";

@@ -96,2 +98,18 @@ import parseArgs from "../utils/parseArgs.js";

await generateNewVoteFolder({
async askForConfirmation(ballotContent) {
console.log("Here's how a ballot will look like:\n\n");
console.log(ballotContent);
stdout.write("\nIs it ready to commit? [Y/n] ");
stdin.resume();
let chars = await once(stdin, "data");
stdin.pause();
if (chars[0][0] === 0x6e || // n
chars[0][0] === 0x4e // N
) {
console.log("Vote template file is ready for edit.");
return true;
}
else
return false;
},
allowedVoters: parsedArgs["allowed-voter"],

@@ -98,0 +116,0 @@ candidates: parsedArgs.candidate,

@@ -101,12 +101,12 @@ #!/usr/bin/env node

const protocol = parsedArgs.protocol ?? (data.viewer.publicKeys.totalCount ? "ssh" : "http");
function getHTTPRepoUrl(repoUrl, login) {
const url = new URL(repoUrl + ".git");
function getHTTPRepoURL(repoURL, login) {
const url = new URL(repoURL + ".git");
url.username = login;
return url.toString();
}
const repoUrl = protocol === "ssh"
const repoURL = protocol === "ssh"
? data.repository.sshUrl
: getHTTPRepoUrl(data.repository.url, handle);
: getHTTPRepoURL(data.repository.url, handle);
console.log("All relevant information has been retrieved:", {
repoUrl,
repoURL,
branch,

@@ -118,3 +118,3 @@ subPath,

...(await getEnv(parsedArgs)),
repoUrl,
repoURL,
branch,

@@ -121,0 +121,0 @@ subPath,

@@ -5,8 +5,7 @@ #!/usr/bin/env node

import { cliArgs, getEnv } from "../utils/voteGitEnv.js";
const parsedArgs = await parseArgs().options(cliArgs)
.argv;
const { repo: repoUrl, branch, path: subPath } = parsedArgs;
const parsedArgs = await parseArgs().options(cliArgs).argv;
const { repo: repoURL, branch, path: subPath } = parsedArgs;
await voteUsingGit({
...(await getEnv(parsedArgs)),
repoUrl,
repoURL,
branch,

@@ -13,0 +12,0 @@ subPath,

@@ -72,4 +72,4 @@ import { GitCliArgsType } from "../utils/cliArgsForGit.js";

abstain: boolean;
signCommits: boolean;
gpgSign: string | boolean;
doNotCleanTempFiles: boolean;
}>;

@@ -60,5 +60,5 @@ import runChildProcessAsync from "../utils/runChildProcessAsync.js";

abstain: parsedArgs.abstain,
signCommits: parsedArgs["gpg-sign"] === true,
gpgSign: parsedArgs["gpg-sign"],
doNotCleanTempFiles: parsedArgs["do-not-clean"],
};
}
{
"name": "@aduh95/caritat-cli",
"version": "0.4.2",
"version": "0.5.1",
"files": [

@@ -13,3 +13,3 @@ "dist/"

"dependencies": {
"@aduh95/caritat": "0.4.2",
"@aduh95/caritat": "0.5.1",
"yargs": "^17.3.1"

@@ -16,0 +16,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