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

devcert

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devcert - npm Package Compare versions

Comparing version 1.0.0-beta.5 to 1.0.0-beta.6

7

dist/certificates.d.ts

@@ -0,2 +1,9 @@

/**
* Generate a domain certificate signed by the devcert root CA. Domain
* certificates are cached in their own directories under
* CONFIG_ROOT/domains/<domain>, and reused on subsequent requests. Because the
* individual domain certificates are signed by the devcert root CA (which was
* added to the OS/browser trust stores), they are trusted.
*/
export default function generateDomainCertificate(domain: string): Promise<void>;
export declare function generateKey(filename: string): void;

12

dist/certificates.js

@@ -6,2 +6,3 @@ "use strict";

const createDebug = require("debug");
const mkdirp_1 = require("mkdirp");
const fs_1 = require("fs");

@@ -12,5 +13,12 @@ const constants_1 = require("./constants");

const debug = createDebug('devcert:certificates');
// Generate an app certificate signed by the devcert root CA
/**
* Generate a domain certificate signed by the devcert root CA. Domain
* certificates are cached in their own directories under
* CONFIG_ROOT/domains/<domain>, and reused on subsequent requests. Because the
* individual domain certificates are signed by the devcert root CA (which was
* added to the OS/browser trust stores), they are trusted.
*/
function generateDomainCertificate(domain) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
mkdirp_1.sync(constants_1.pathForDomain(domain));
debug(`Generating private key for ${domain}`);

@@ -38,2 +46,2 @@ let keyPath = constants_1.pathForDomain(domain, 'private-key.key');

exports.generateKey = generateKey;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydGlmaWNhdGVzLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6WyJjZXJ0aWZpY2F0ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkJBQTZCO0FBQzdCLHFDQUFxQztBQUNyQywy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YSAtY29uZmlnICR7IG9wZW5zc2xDb25mUGF0aCB9IC1pbiAkeyBjc3JGaWxlIH0gLW91dCAkeyBwYXRoLmJhc2VuYW1lKGNlcnRQYXRoKSB9IC1vdXRkaXIgJHsgcGF0aC5kaXJuYW1lKGNlcnRQYXRoKSB9IC1rZXlmaWxlICR7IHJvb3RLZXlQYXRoIH0gLWNlcnQgJHsgcm9vdENlcnRQYXRoIH0gLW5vdGV4dCAtbWQgc2hhMjU2IC1kYXlzIDcwMDAgLWJhdGNoIC1leHRlbnNpb25zIHNlcnZlcl9jZXJ0YClcblxuICBybShyb290S2V5UGF0aCk7XG4gIHJtKHJvb3RDZXJ0UGF0aCk7XG59XG5cbi8vIEdlbmVyYXRlIGEgY3J5cHRvZ3JhcGhpYyBrZXksIHVzZWQgdG8gc2lnbiBjZXJ0aWZpY2F0ZXMgb3IgY2VydGlmaWNhdGUgc2lnbmluZyByZXF1ZXN0cy5cbmV4cG9ydCBmdW5jdGlvbiBnZW5lcmF0ZUtleShmaWxlbmFtZTogc3RyaW5nKTogdm9pZCB7XG4gIGRlYnVnKGBnZW5lcmF0ZUtleTogJHsgZmlsZW5hbWUgfWApO1xuICBvcGVuc3NsKGBnZW5yc2EgLW91dCAkeyBmaWxlbmFtZSB9IDIwNDhgKTtcbiAgY2htb2QoZmlsZW5hbWUsIDQwMCk7XG59Il19

8

dist/constants.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const mkdirp = require("mkdirp");
const mkdirp_1 = require("mkdirp");
const applicationConfigPath = require("application-config-path");

@@ -18,4 +18,4 @@ // Platform shortcuts

exports.rootCAInstalledFlagFilePath = exports.configPath('root-ca-installed');
mkdirp.sync(exports.configDir);
mkdirp.sync(exports.domainsDir);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlc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cnQgY29uc3QgcGF0aEZvckRvbWFpbjogKGRvbWFpbjogc3RyaW5nLCAuLi5wYXRoU2VnbWVudHM6IHN0cmluZ1tdKSA9PiBzdHJpbmcgPSBwYXRoLmpvaW4uYmluZChwYXRoLCBkb21haW5zRGlyKVxuXG5leHBvcnQgY29uc3Qgb3BlbnNzbENvbmZUZW1wbGF0ZSA9IHBhdGguam9pbihfX2Rpcm5hbWUsICcuLicsICdvcGVuc3NsLmNvbmYnKTtcbmV4cG9ydCBjb25zdCBvcGVuc3NsQ29uZlBhdGggPSBjb25maWdQYXRoKCdvcGVuc3NsLmNvbmYnKTtcblxuZXhwb3J0IGNvbnN0IHJvb3RDQUluc3RhbGxlZEZsYWdGaWxlUGF0aCA9IGNvbmZpZ1BhdGgoJ3Jvb3QtY2EtaW5zdGFsbGVkJyk7XG5cbm1rZGlycChjb25maWdEaXIpO1xubWtkaXJwKGRvbWFpbnNEaXIpO1xuIl19

@@ -25,7 +25,7 @@ "use strict";

if (fs_1.existsSync(path.join(potentialNSSDBDir, 'cert8.db'))) {
debug(`Found legacy NSS database in ${potentialNSSDBDir}, adding devcert ...`);
debug(`Found legacy NSS database in ${potentialNSSDBDir}, adding certificate ...`);
utils_1.run(`${certutilPath} -A -d "${potentialNSSDBDir}" -t 'C,,' -i ${certPath} -n devcert`);
}
else if (fs_1.existsSync(path.join(potentialNSSDBDir, 'cert9.db'))) {
debug(`Found modern NSS database in ${potentialNSSDBDir}, adding devcert ...`);
debug(`Found modern NSS database in ${potentialNSSDBDir}, adding certificate ...`);
utils_1.run(`${certutilPath} -A -d "sql:${potentialNSSDBDir}" -t 'C,,' -i ${certPath} -n devcert`);

@@ -135,2 +135,2 @@ }

exports.openCertificateInFirefox = openCertificateInFirefox;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6Wy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dHA6Ly9sb2NhbGhvc3Q6JHsgcG9ydCB9IGluIGEgbmV3IHRhYi4pXG5cbiAgICBJZiB5b3UgYXJlIGN1cmlvdXMgYWJvdXQgd2h5IGFsbCB0aGlzIGlzIG5lY2Vzc2FyeSwgY2hlY2sgb3V0XG4gICAgaHR0cHM6Ly9naXRodWIuY29tL2RhdmV3YXNtZXIvZGV2Y2VydCNob3ctaXQtd29ya3NcblxuICAgIDxQcmVzcyBhbnkga2V5IHRvIGxhdW5jaCBGaXJlZm94IHdpemFyZD5cbiAgYCk7XG4gIHJ1bihgJHsgZmlyZWZveFBhdGggfSBodHRwOi8vbG9jYWxob3N0OiR7IHBvcnQgfWApO1xuICBjb25zb2xlLmxvZyhgXG4gICAgTGF1bmNoaW5nIEZpcmVmb3ggLi4uXG5cbiAgICBHcmVhdCEgT25jZSB5b3UndmUgZmluaXNoZWQgdGhlIEZpcmVmb3ggd2l6YXJkIGZvciBhZGRpbmcgdGhlIGRldmNlcnRcbiAgICBjZXJ0aWZpY2F0ZSwganVzdCBoaXQgYW55IGtleSBoZXJlIGFnYWluIGFuZCB3ZSdsbCB3cmFwIHVwLlxuXG4gICAgPFByZXNzIGFueSBrZXkgdG8gY29udGludWU+XG4gIGApXG4gIGF3YWl0IHdhaXRGb3JVc2VyKCk7XG4gIHNlcnZlci5jbG9zZSgpO1xufVxuIl19
{
"name": "devcert",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "Generate trusted local SSL/TLS certificates for local SSL development",

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

import * as path from 'path';
import * as createDebug from 'debug';
import { sync as mkdirp } from 'mkdirp';
import { unlinkSync as rm, chmodSync as chmod } from 'fs';

@@ -10,4 +11,12 @@ import { pathForDomain, opensslConfPath } from './constants';

// Generate an app certificate signed by the devcert root CA
/**
* Generate a domain certificate signed by the devcert root CA. Domain
* certificates are cached in their own directories under
* CONFIG_ROOT/domains/<domain>, and reused on subsequent requests. Because the
* individual domain certificates are signed by the devcert root CA (which was
* added to the OS/browser trust stores), they are trusted.
*/
export default async function generateDomainCertificate(domain: string): Promise<void> {
mkdirp(pathForDomain(domain));
debug(`Generating private key for ${ domain }`);

@@ -14,0 +23,0 @@ let keyPath = pathForDomain(domain, 'private-key.key');

import * as path from 'path';
import * as mkdirp from 'mkdirp';
import { sync as mkdirp } from 'mkdirp';
import applicationConfigPath = require('application-config-path');

@@ -22,3 +22,3 @@

mkdirp.sync(configDir);
mkdirp.sync(domainsDir);
mkdirp(configDir);
mkdirp(domainsDir);

@@ -23,6 +23,6 @@ import * as path from 'path';

if (exists(path.join(potentialNSSDBDir, 'cert8.db'))) {
debug(`Found legacy NSS database in ${ potentialNSSDBDir }, adding devcert ...`)
debug(`Found legacy NSS database in ${ potentialNSSDBDir }, adding certificate ...`)
run(`${ certutilPath } -A -d "${ potentialNSSDBDir }" -t 'C,,' -i ${ certPath } -n devcert`);
} else if (exists(path.join(potentialNSSDBDir, 'cert9.db'))) {
debug(`Found modern NSS database in ${ potentialNSSDBDir }, adding devcert ...`)
debug(`Found modern NSS database in ${ potentialNSSDBDir }, adding certificate ...`)
run(`${ certutilPath } -A -d "sql:${ potentialNSSDBDir }" -t 'C,,' -i ${ certPath } -n devcert`);

@@ -29,0 +29,0 @@ } else {

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