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

@ms-cloudpack/setup-utilities

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ms-cloudpack/setup-utilities - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

7

lib/createCertificate.js
import os from 'os';
import { writeFile } from 'fs/promises';
import { writeFile, mkdir } from 'fs/promises';
import path from 'path';

@@ -8,3 +8,2 @@ import { execFileSync } from 'child_process';

import { getCertificatePaths } from './getCertificatePaths.js';
import { ensureDir } from 'fs-extra';
import { getValidDomains } from './getValidDomains.js';

@@ -20,6 +19,6 @@ /**

console.log(`Generating self-signed cert for "${domains[0]}" in "${certFolderPath}"`);
const opensslFilePath = await getOpensslPath();
const opensslFilePath = getOpensslPath();
console.info(`The "openssl" binary was found in "${opensslFilePath}"`);
// Ensure the folder exists.
await ensureDir(certFolderPath);
await mkdir(certFolderPath, { recursive: true });
const config = generateOpensslConfig(options);

@@ -26,0 +25,0 @@ const opensslConfigPath = path.join(certFolderPath, `${domains[0]}.cnf`);

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

import fs from 'fs';
import { readFile } from 'fs/promises';
import { exists } from 'fs-extra';
import { getCertificatePaths } from './getCertificatePaths.js';

@@ -9,3 +9,3 @@ import { defaultPassphrase } from './defaultPassphrase.js';

// Return undefined if the certs don't exist.
if (!(await exists(certPath)) || !(await exists(keyPath))) {
if (!fs.existsSync(certPath) || !fs.existsSync(keyPath)) {
return undefined;

@@ -12,0 +12,0 @@ }

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

export declare function getOpensslPath(): Promise<string>;
export declare function getOpensslPath(): string;
//# sourceMappingURL=getOpensslPath.d.ts.map

@@ -0,5 +1,5 @@

import fs from 'fs';
import os from 'os';
import path from 'path';
import { exists } from 'fs-extra';
export async function getOpensslPath() {
export function getOpensslPath() {
const openSslFilename = os.type() === 'Windows_NT' ? 'openssl.exe' : 'openssl';

@@ -10,3 +10,3 @@ const defaultOpenSslPath = os.type() === 'Windows_NT'

const defaultOpenSslFilePath = path.join(defaultOpenSslPath, openSslFilename);
if (!(await exists(defaultOpenSslFilePath))) {
if (!fs.existsSync(defaultOpenSslFilePath)) {
throw Error(`\nCould not find openssl in path: "${defaultOpenSslPath}"\n`);

@@ -13,0 +13,0 @@ }

{
"name": "@ms-cloudpack/setup-utilities",
"version": "0.4.3",
"version": "0.4.4",
"description": "A set of utilities for setting up projects.",

@@ -24,4 +24,3 @@ "license": "MIT",

"dependencies": {
"@ms-cloudpack/common-types": "^0.21.1",
"fs-extra": "^11.2.0"
"@ms-cloudpack/common-types": "^0.22.0"
},

@@ -28,0 +27,0 @@ "devDependencies": {

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

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