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

repo2pdf

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repo2pdf - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

57

dist/clone.js

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

{
type: "list",
name: "keepRepo",
message: "Do you want to keep the cloned repository?",
choices: ["No", "Yes"],
filter: function (val) {
return val.toLowerCase() === "yes";
},
},
{
name: "outputFileName",

@@ -141,20 +150,21 @@ message: "Please provide an output file name:",

type: "list",
name: "keepRepo",
message: "Do you want to keep the cloned repository?",
choices: ["No", "Yes"],
filter: function (val) {
return val.toLowerCase() === "yes";
},
},
{
type: "input",
name: "fontStyle",
message: "What font style do you want to use for the PDF?",
default: "Courier",
validate: function (value) {
if (value) {
return true;
}
return "Please enter a valid font style.";
},
choices: [
"Helvetica",
"Helvetica-Bold",
"Helvetica-Oblique",
"Helvetica-BoldOblique",
"Courier",
"Courier-Bold",
"Courier-Oblique",
"Courier-BoldOblique",
"Times-Roman",
"Times-Bold",
"Times-Italic",
"Times-BoldItalic",
"Symbol",
"ZapfDingbats"
],
default: "Courier"
},

@@ -165,3 +175,3 @@ {

message: "What font size do you want to use for the PDF?",
default: "10",
default: "8",
validate: function (value) {

@@ -277,4 +287,4 @@ var isValid = !isNaN(parseInt(value));

doc
.font("Courier")
.fontSize(10)
.font(fontStyle)
.fontSize(parseInt(fontSize, 10))
.text(`${fileName}\n\nBASE64:\n\n${data}`, { lineGap: 4 });

@@ -290,4 +300,4 @@ }

doc
.font("Courier")
.fontSize(10)
.font(fontStyle) // Use variable for font style
.fontSize(parseInt(fontSize, 10)) // Use variable for font size
.text(`${fileName}\n\n`, { lineGap: 4 });

@@ -325,3 +335,3 @@ if (removeComments) {

const { text, color } = hlData[i];
if (i == 0 || ((_a = hlData[i - 1]) === null || _a === void 0 ? void 0 : _a.text) === "\n")
if (i == 0 || ((_a = hlData[i - 1]) === null || _a === void 0 ? void 0 : _a.text) === "\n") {
if (addLineNumbers) {

@@ -333,2 +343,3 @@ doc.text(String(lineNum++).padStart(lineNumWidth, " ") + " ", {

}
}
if (color)

@@ -338,2 +349,4 @@ doc.fillColor(color);

doc.fillColor("black");
doc.font(fontStyle); // Apply font style here
doc.fontSize(parseInt(fontSize, 10)); // Apply font size here
if (text !== "\n")

@@ -340,0 +353,0 @@ doc.text(text, { continued: true });

{
"name": "repo2pdf",
"version": "2.0.2",
"version": "2.0.3",
"description": "A Node.js utility for generating a PDF document from a GitHub repository",

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

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

type?: string
name: string
name: [
"repoUrl",
"addLineNumbers",
"addHighlighting",
"addPageNumbers",
"removeComments",
"removeEmptyLines",
"onePdfPerFile",
"outputFileName",
"outputFolderName",
"keepRepo"
][number]
message: string

@@ -161,25 +172,2 @@ validate?: (value: string) => boolean | string

},
{
type: "input",
name: "fontStyle",
message: "What font style do you want to use for the PDF?",
default: "Courier",
validate: function (value: string) {
if (value) {
return true;
}
return "Please enter a valid font style.";
},
},
{
type: "input",
name: "fontSize",
message: "What font size do you want to use for the PDF?",
default: "10",
validate: function (value: string) {
var isValid = !isNaN(parseInt(value));
return isValid || "Please enter a valid font size.";
},
},
]

@@ -213,5 +201,3 @@

answers.outputFolderName,
answers.keepRepo,
answers.fontStyle,
answers.fontSize
answers.keepRepo
)

@@ -230,5 +216,3 @@ }

outputFolderName: any,
keepRepo: any,
fontStyle: any,
fontSize: any
keepRepo: any
) {

@@ -353,4 +337,4 @@ const gitP = git()

doc
.font(fontStyle)
.fontSize(fontSize)
.font("Courier")
.fontSize(10)
.text(`${fileName}\n\nBASE64:\n\n${data}`, { lineGap: 4 })

@@ -357,0 +341,0 @@ } else {

Sorry, the diff of this file is not supported yet

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