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

@redocly/cli

Package Overview
Dependencies
Maintainers
7
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redocly/cli - npm Package Compare versions

Comparing version 1.0.0-beta.96 to 1.0.0-beta.97

2

lib/__tests__/commands/push.test.js

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

branchName: 'test',
'public': true
});

@@ -43,2 +44,3 @@ expect(redoclyClient.registryApi.prepareFileUpload).toBeCalledTimes(1);

isUpsert: true,
isPublic: true,
name: 'my-api',

@@ -45,0 +47,0 @@ organizationId: 'org',

4

lib/commands/login.js

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

const clientToken = yield promptClientToken(client.domain);
client.login(clientToken, argv.verbose);
process.stdout.write(colorette_1.gray('\n Logging in...\n'));
yield client.login(clientToken, argv.verbose);
process.stdout.write(colorette_1.green(' Authorization confirmed. ✅\n\n'));
});
}
exports.handleLogin = handleLogin;

@@ -81,3 +81,3 @@ "use strict";

else {
const filePath =
let filePath =
// @ts-ignore

@@ -88,8 +88,11 @@ {

'/simplewebsocket.min.js': require.resolve('simple-websocket/simplewebsocket.min.js'),
}[request.url || ''] ||
path.resolve(htmlTemplate ? path.dirname(htmlTemplate) : process.cwd(), `.${request.url}`);
if (!utils_1.isSubdir(process.cwd(), filePath)) {
server_1.respondWithGzip('404 Not Found', request, response, { 'Content-Type': 'text/html' }, 404);
console.timeEnd(colorette.dim(`GET ${request.url}`));
return;
}[request.url || ''];
if (!filePath) {
const basePath = htmlTemplate ? path.dirname(htmlTemplate) : process.cwd();
filePath = path.resolve(basePath, `.${request.url}`);
if (!utils_1.isSubdir(basePath, filePath)) {
server_1.respondWithGzip('404 Not Found', request, response, { 'Content-Type': 'text/html' }, 404);
console.timeEnd(colorette.dim(`GET ${request.url}`));
return;
}
}

@@ -96,0 +99,0 @@ const extname = String(path.extname(filePath)).toLowerCase();

@@ -10,2 +10,3 @@ import { Config, Region } from '@redocly/openapi-core';

'skip-decorator'?: string[];
'public'?: boolean;
};

@@ -12,0 +13,0 @@ export declare function handlePush(argv: PushArgs): Promise<void>;

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

isUpsert: upsert,
isPublic: argv['public']
});

@@ -102,0 +103,0 @@ }

@@ -96,2 +96,6 @@ #!/usr/bin/env node

},
'public': {
description: 'Make API registry available to the public',
type: 'boolean',
},
}), push_1.transformPush(push_1.handlePush))

@@ -230,2 +234,3 @@ .command('lint [entrypoints...]', 'Lint definition.', (yargs) => yargs.positional('entrypoints', { array: true, type: 'string', demandOption: true }).option({

client.logout();
process.stdout.write('Logged out from the Redocly account. ✋\n');
}))

@@ -232,0 +237,0 @@ .command('preview-docs [entrypoint]', 'Preview API reference docs for the specified definition.', (yargs) => yargs.positional('entrypoint', { type: 'string' }).options({

{
"name": "@redocly/cli",
"version": "1.0.0-beta.96",
"version": "1.0.0-beta.97",
"description": "",

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

"dependencies": {
"@redocly/openapi-core": "1.0.0-beta.96",
"@types/node": "^14.11.8",
"@redocly/openapi-core": "1.0.0-beta.97",
"assert-node-version": "^1.0.3",

@@ -42,0 +41,0 @@ "chokidar": "^3.5.1",

@@ -34,2 +34,3 @@ import { Config, getMergedConfig } from '@redocly/openapi-core';

branchName: 'test',
'public': true
});

@@ -43,2 +44,3 @@

isUpsert: true,
isPublic: true,
name: 'my-api',

@@ -45,0 +47,0 @@ organizationId: 'org',

import { Region, RedoclyClient, loadConfig } from '@redocly/openapi-core';
import { blue, green } from 'colorette';
import { blue, green, gray } from 'colorette';
import { promptUser } from '../utils';

@@ -18,3 +18,5 @@

const clientToken = await promptClientToken(client.domain);
client.login(clientToken, argv.verbose);
process.stdout.write(gray('\n Logging in...\n'));
await client.login(clientToken, argv.verbose);
process.stdout.write(green(' Authorization confirmed. ✅\n\n'));
}

@@ -101,3 +101,3 @@ import { compile } from 'handlebars';

} else {
const filePath =
let filePath =
// @ts-ignore

@@ -108,9 +108,14 @@ {

'/simplewebsocket.min.js': require.resolve('simple-websocket/simplewebsocket.min.js'),
}[request.url || ''] ||
path.resolve(htmlTemplate ? path.dirname(htmlTemplate) : process.cwd(), `.${request.url}`);
}[request.url || ''];
if (!isSubdir(process.cwd(), filePath)) {
respondWithGzip('404 Not Found', request, response, { 'Content-Type': 'text/html' }, 404);
console.timeEnd(colorette.dim(`GET ${request.url}`));
return;
if (!filePath) {
const basePath = htmlTemplate ? path.dirname(htmlTemplate) : process.cwd();
filePath = path.resolve(basePath, `.${request.url}`);
if (!isSubdir(basePath, filePath)) {
respondWithGzip('404 Not Found', request, response, { 'Content-Type': 'text/html' }, 404);
console.timeEnd(colorette.dim(`GET ${request.url}`));
return;
}
}

@@ -117,0 +122,0 @@

@@ -38,2 +38,3 @@ import * as fs from 'fs';

'skip-decorator'?: string[];
'public'?: boolean;
};

@@ -151,2 +152,3 @@

isUpsert: upsert,
isPublic: argv['public']
});

@@ -153,0 +155,0 @@ } catch (error) {

@@ -109,2 +109,6 @@ #!/usr/bin/env node

},
'public': {
description: 'Make API registry available to the public',
type: 'boolean',
},
}),

@@ -265,2 +269,3 @@ transformPush(handlePush),

client.logout();
process.stdout.write('Logged out from the Redocly account. ✋\n');
},

@@ -267,0 +272,0 @@ )

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