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

@slack/cli-test

Package Overview
Dependencies
Maintainers
10
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/cli-test - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

dist/cli/cli-process.d.ts
/// <reference types="node" />
import type { ShellProcess } from '../utils/types';
import type { SpawnOptionsWithoutStdio } from 'node:child_process';
import type { ShellProcess } from '../utils/types';
export interface SlackCLIGlobalOptions {

@@ -10,3 +10,3 @@ /**

/**
* @description Whether the command should interact with dev.slack (`--slackdev`)
* @description Whether the command should interact with qa.slack (`--apihost qa.slack.com`)
*/

@@ -13,0 +13,0 @@ qa?: boolean;

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

const opts = this.globalOptions;
if (opts.qa || opts.dev) {
if (opts.qa) {
cmd += ' --apihost qa.slack.com';
}
if (opts.dev) {
cmd += ' --slackdev';

@@ -59,0 +62,0 @@ }

@@ -17,4 +17,4 @@ "use strict";

const sinon_1 = __importDefault(require("sinon"));
const cli_process_1 = require("./cli-process");
const shell_1 = require("./shell");
const cli_process_1 = require("./cli-process");
describe('SlackCLIProcess class', () => {

@@ -42,4 +42,4 @@ const sandbox = sinon_1.default.createSandbox();

describe('global options', () => {
it('should map qa or dev options to --slackdev', () => __awaiter(void 0, void 0, void 0, function* () {
let cmd = new cli_process_1.SlackCLIProcess('help', { qa: true });
it('should map dev option to --slackdev', () => __awaiter(void 0, void 0, void 0, function* () {
let cmd = new cli_process_1.SlackCLIProcess('help', { dev: true });
yield cmd.execAsync();

@@ -52,5 +52,12 @@ sandbox.assert.calledWithMatch(spawnProcessSpy, '--slackdev');

spawnProcessSpy.resetHistory();
cmd = new cli_process_1.SlackCLIProcess('help', { dev: true });
}));
it('should map qa option to QA host', () => __awaiter(void 0, void 0, void 0, function* () {
let cmd = new cli_process_1.SlackCLIProcess('help', { qa: true });
yield cmd.execAsync();
sandbox.assert.calledWithMatch(spawnProcessSpy, '--slackdev');
sandbox.assert.calledWithMatch(spawnProcessSpy, '--apihost qa.slack.com');
spawnProcessSpy.resetHistory();
cmd = new cli_process_1.SlackCLIProcess('help');
yield cmd.execAsync();
sandbox.assert.neverCalledWithMatch(spawnProcessSpy, '--apihost qa.slack.com');
spawnProcessSpy.resetHistory();
}));

@@ -57,0 +64,0 @@ it('should default to passing --skip-update but allow overriding that', () => __awaiter(void 0, void 0, void 0, function* () {

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

Object.defineProperty(exports, "__esModule", { value: true });
const constants_1 = require("../../utils/constants");
const logger_1 = __importDefault(require("../../utils/logger"));
const cli_process_1 = require("../cli-process");
const command_error_1 = __importDefault(require("../command-error"));
const shell_1 = require("../shell");
const command_error_1 = __importDefault(require("../command-error"));
const constants_1 = require("../../utils/constants");
// TODO: the options for these methods could be DRYed up

@@ -22,0 +22,0 @@ exports.default = {

@@ -209,2 +209,3 @@ /// <reference types="node" />

} | undefined) => Promise<string>;
/** Path to app. If not provided, will not interact with any app */
collaboratorsList: (appPath: string, teamFlag: string, options?: {

@@ -211,0 +212,0 @@ qa?: boolean | undefined;

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

const path = __importStar(require("node:path"));
const logger_1 = __importDefault(require("../utils/logger"));
const app_1 = __importDefault(require("./commands/app"));

@@ -53,2 +52,3 @@ const auth_1 = __importDefault(require("./commands/auth"));

const trigger_1 = __importDefault(require("./commands/trigger"));
const logger_1 = __importDefault(require("../utils/logger"));
/**

@@ -55,0 +55,0 @@ * Set of functions to spawn and interact with Slack Platform CLI processes and commands

@@ -16,4 +16,4 @@ "use strict";

const sinon_1 = __importDefault(require("sinon"));
const index_1 = require("./index");
const logger_1 = __importDefault(require("../utils/logger"));
const index_1 = require("./index");
describe('cli module', () => {

@@ -20,0 +20,0 @@ const sandbox = sinon_1.default.createSandbox();

@@ -18,4 +18,4 @@ "use strict";

const tree_kill_1 = __importDefault(require("tree-kill"));
const constants_1 = require("../utils/constants");
const logger_1 = __importDefault(require("../utils/logger"));
const constants_1 = require("../utils/constants");
exports.shell = {

@@ -22,0 +22,0 @@ /**

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

Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = __importDefault(require("child_process"));
const events_1 = __importDefault(require("events"));
const stream_1 = __importDefault(require("stream"));
const chai_1 = require("chai");
const sinon_1 = __importDefault(require("sinon"));
const child_process_1 = __importDefault(require("child_process"));
const stream_1 = __importDefault(require("stream"));
const events_1 = __importDefault(require("events"));
const shell_1 = require("./shell");

@@ -13,0 +13,0 @@ describe('shell module', () => {

{
"name": "@slack/cli-test",
"version": "0.2.0+cli.2.25.0",
"version": "0.2.1+cli.2.26.0",
"description": "Node.js bindings for the Slack CLI for use in automated testing",

@@ -24,3 +24,3 @@ "author": "Salesforce, Inc.",

"scripts": {
"lint": "eslint --ext .ts src",
"lint": "eslint --fix --ext .ts src",
"build": "npm run build:clean && tsc",

@@ -27,0 +27,0 @@ "build:clean": "shx rm -rf ./dist ./coverage",

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

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

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

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