New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

neonctl

Package Overview
Dependencies
Maintainers
2
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neonctl - npm Package Compare versions

Comparing version 1.18.0 to 1.18.1

commands/auth.test.js

2

auth.js

@@ -43,3 +43,3 @@ import { custom, generators, Issuer } from 'openid-client';

server.listen(0, '127.0.0.1', function () {
log.info(`Listening on port ${this.address().port}`);
log.debug(`Listening on port ${this.address().port}`);
});

@@ -46,0 +46,0 @@ await new Promise((resolve) => server.once('listening', resolve));

@@ -16,9 +16,6 @@ import { join } from 'node:path';

};
export const authFlow = async ({ configDir, oauthHost, clientId, }) => {
if (isCi()) {
export const authFlow = async ({ configDir, oauthHost, clientId, forceAuth, }) => {
if (!forceAuth && isCi()) {
throw new Error('Cannot run interactive auth in CI');
}
if (!clientId) {
throw new Error('Missing client id');
}
const tokenSet = await auth({

@@ -25,0 +22,0 @@ oauthHost: oauthHost,

import { describe } from '@jest/globals';
import { testCliCommand } from '../test_utils.js';
import { testCliCommand } from '../test_utils/test_cli_command.js';
describe('branches', () => {

@@ -4,0 +4,0 @@ testCliCommand({

import { describe } from '@jest/globals';
import { testCliCommand } from '../test_utils';
import { testCliCommand } from '../test_utils/test_cli_command';
describe('connection_string', () => {

@@ -4,0 +4,0 @@ testCliCommand({

import { describe } from '@jest/globals';
import { testCliCommand } from '../test_utils.js';
import { testCliCommand } from '../test_utils/test_cli_command.js';
describe('databases', () => {

@@ -4,0 +4,0 @@ testCliCommand({

import { describe, expect } from '@jest/globals';
import { testCliCommand } from '../test_utils.js';
import { testCliCommand } from '../test_utils/test_cli_command.js';
describe('help', () => {

@@ -4,0 +4,0 @@ testCliCommand({

import { describe } from '@jest/globals';
import { testCliCommand } from '../test_utils.js';
import { testCliCommand } from '../test_utils/test_cli_command.js';
describe('operations', () => {

@@ -4,0 +4,0 @@ testCliCommand({

import { describe } from '@jest/globals';
import { testCliCommand } from '../test_utils.js';
import { testCliCommand } from '../test_utils/test_cli_command.js';
describe('projects', () => {

@@ -4,0 +4,0 @@ testCliCommand({

import { describe } from '@jest/globals';
import { testCliCommand } from '../test_utils.js';
import { testCliCommand } from '../test_utils/test_cli_command.js';
describe('roles', () => {

@@ -4,0 +4,0 @@ testCliCommand({

@@ -6,6 +6,6 @@ import { join } from 'node:path';

export const defaultDir = join(process.env.XDG_CONFIG_HOME || join(homedir(), '.config'), 'neonctl');
export const ensureConfigDir = async ({ 'config-dir': configDir, }) => {
if (!existsSync(configDir) && !isCi()) {
export const ensureConfigDir = async ({ 'config-dir': configDir, 'force-auth': forceAuth, }) => {
if (!existsSync(configDir) && (!isCi() || forceAuth)) {
mkdirSync(configDir, { recursive: true });
}
};

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

import { basename } from 'node:path';
import yargs from 'yargs';

@@ -50,2 +51,8 @@ import { hideBin } from 'yargs/helpers';

})
.option('force-auth', {
describe: 'Force authentication',
type: 'boolean',
hidden: true,
default: false,
})
.middleware(ensureConfigDir)

@@ -91,2 +98,3 @@ // Auth flow

.completion()
.scriptName(basename(process.argv[1]) === 'neon' ? 'neon' : 'neonctl')
.fail(async (msg, err) => {

@@ -93,0 +101,0 @@ if (isAxiosError(err)) {

@@ -8,3 +8,3 @@ {

"type": "module",
"version": "1.18.0",
"version": "1.18.1",
"description": "CLI tool for NeonDB Cloud management",

@@ -45,2 +45,3 @@ "main": "index.js",

"lint-staged": "^13.0.3",
"oauth2-mock-server": "^6.0.0",
"pkg": "^5.8.1",

@@ -89,3 +90,3 @@ "prettier": "^2.7.1",

"clean": "rm -rf dist",
"generateParams": "ts-node --esm generateOptionsFromSpec.ts",
"generateParams": "node --loader ts-node/esm ./generateOptionsFromSpec.ts",
"start": "node src/index.js",

@@ -92,0 +93,0 @@ "test": "node --experimental-vm-modules node_modules/.bin/jest"

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