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

@voidwalkers/void-cli

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voidwalkers/void-cli - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

package.json
{
"name": "@voidwalkers/void-cli",
"version": "0.1.7",
"version": "0.1.8",
"description": "CLI for Void Walkers Void",

@@ -5,0 +5,0 @@ "main": "./src/app.js",

@@ -22,4 +22,6 @@ import {Argument, Command} from 'commander';

console.log(JSON.stringify({
projectSlug: config.project.slug,
tokenPublic: config.project.tokenPublic
project: {
slug: config.project.slug,
tokenPublic: config.project.tokenPublic
}
}, null, 2));

@@ -34,4 +36,6 @@

console.log(JSON.stringify({
projectSlug: config.project.slug,
tokenPrivate: config.project.tokenPrivate
project: {
slug: config.project.slug,
tokenPrivate: config.project.tokenPrivate
}
}, null, 2));

@@ -38,0 +42,0 @@

@@ -6,3 +6,3 @@ import fs from 'node:fs';

import {PATH_CONFIG, PATH_FUNCTIONS, PATH_WEBSITES} from '#src/lib/constants.js';
import {PATH_CONFIG, PATH_FUNCTIONS, PATH_WEBSITES, RX_BASE64} from '#src/lib/constants.js';
import {loadConfig} from '#src/lib/helper.js';

@@ -60,3 +60,3 @@ import {init as initFunctions} from '#src/lib/init/functions.js';

name: 'tokenPrivate',
pattern: /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}={2})$/u,
pattern: RX_BASE64,
replace: '*',

@@ -70,3 +70,3 @@ required: true,

name: 'tokenPublic',
pattern: /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}={2})$/u,
pattern: RX_BASE64,
replace: '*',

@@ -73,0 +73,0 @@ required: true,

@@ -24,7 +24,7 @@ import {Argument, Command} from 'commander';

// TODO: Select db
const host = 'mongo-svc.void.svc.cluster.local';
const userName = `user-${config.project.slug}`; // TODO: Length
const password = encodeURIComponent(config.project.tokenPrivate);
const password = encodeURIComponent(config.project.mongo.databases.find(({name}) => name === 'default').password);
const databaseName = `project-${config.project.slug}-default`; // TODO: Length
// TODO: Select db

@@ -31,0 +31,0 @@ switch (mode) {

@@ -16,2 +16,4 @@ const CWD = process.cwd();

export const RX_BASE64 =
/^(?:[a-zA-Z0-9+/]{4})*(?:|[a-zA-Z0-9+/]{3}=|[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]===)$/u;
export const RX_EMAIL = /^[^@]+@[^@]+\.[^.@]+$/u;

@@ -58,3 +58,3 @@ import {execSync} from 'node:child_process';

function functionToString({name, options, type}) {
const systemRoleString = options.systemRole ? `, systemRole=${options.systemRole}` : '';
const systemRoleString = options?.systemRole ? `, systemRole=${options.systemRole}` : '';

@@ -61,0 +61,0 @@ return `${name} (${type}, ${options?.isPrivate ? 'private' : 'public'}${systemRoleString})`;

@@ -11,3 +11,3 @@ import axios from 'axios';

await axios.post(`${BASE_URL_API}/api/projects/${projectSlug}/mongo-databases`, {
const {data} = await axios.post(`${BASE_URL_API}/api/projects/${projectSlug}/mongo-databases`, {
name: 'default'

@@ -20,2 +20,4 @@ }, {

const {password} = data.item;
updateConfig(c => ({

@@ -27,2 +29,3 @@ ...c,

databases: [{
password,
name: 'default'

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