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

@cplace/cli

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cplace/cli - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

5

dist/cli.js

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

e2e [--baseUrl <baseUrl>] [--context <context>] [--tenantId <context>] [--browser <browser>] [--plugins <plugins>] [--timeout <timeout>] [--headless]
e2e [--baseUrl <baseUrl>] [--context <context>] [--tenantId <tenantId>] [--e2eToken <token>] [--browser <browser>] [--plugins <plugins>] [--specs <specs>] [--timeout <timeout>] [--headless] [--noInstall]

@@ -102,6 +102,9 @@ --baseUrl to configure where to run the tests against (default: 'http://localhost:8083')

--tenantId to define against which tenant the tests are run (default: '' single tenant mode)
--e2eToken to define the Test Setup Handler E2E token (default: '')
--browser to specify which browser to use (default: Chrome)
--plugins to specify a comma separated list of plugins to run tests for (default: all plugins in the current repository)
--specs to specify the pattern used to search for specification files inside plugins (default: '**/*.spec.ts')
--timeout to specify a global Timeout for Test Execution
--headless currently only possible in Chrome
--noInstall will skip the check for new Selenium Drivers (required to run offline, default: false)

@@ -108,0 +111,0 @@

2

dist/commands/e2e/ConfigTemplate.d.ts
export declare class ConfigTemplate {
private readonly template;
constructor(mainRepoDir: string, e2eFolder: string, browser: string, baseUrl: string, timeout: number, headless: boolean);
constructor(mainRepoDir: string, e2eFolder: string, specs: string, browser: string, baseUrl: string, timeout: number, headless: boolean, noInstall: boolean);
getTemplate(): string;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ConfigTemplate {
constructor(mainRepoDir, e2eFolder, browser, baseUrl, timeout, headless) {
constructor(mainRepoDir, e2eFolder, specs, browser, baseUrl, timeout, headless, noInstall) {
let capabilities = '';

@@ -40,3 +40,3 @@ if (headless) {

specs: [
'${e2eFolder}/specs/**/*.spec.ts'
'${e2eFolder}/specs/${specs || '**/*.spec.ts'}'
],

@@ -53,2 +53,3 @@ exclude: [],

services: ['selenium-standalone', 'intercept'],
skipSeleniumInstall: ${noInstall ? 'true' : 'false'},
framework: 'jasmine',

@@ -55,0 +56,0 @@ jasmineNodeOpts: {

@@ -9,6 +9,9 @@ /**

private static readonly PARAMETER_TENANTID;
private static readonly PARAMETER_E2E_TOKEN;
private static readonly PARAMETER_PLUGINS;
private static readonly PARAMETER_SPECS;
private static readonly PARAMETER_BROWSER;
private static readonly PARAMETER_TIMEOUT;
private static readonly PARAMETER_HEADLESS;
private static readonly PARAMETER_NO_INSTALL;
private static readonly DEFAULT_BASE_URL;

@@ -20,9 +23,12 @@ private static readonly DEFAULT_CONTEXT;

private mainRepoDir;
private pluginsToBeTested;
private baseUrl;
private context;
private tenantId;
private e2eToken;
private pluginsToBeTested;
private specs;
private browser;
private timeout;
private headless;
private noInstall;
private testRunner;

@@ -29,0 +35,0 @@ prepareAndMayExecute(params: ICommandParameters): boolean;

@@ -32,2 +32,6 @@ "use strict";

console.log('Running E2E tests for: ', this.pluginsToBeTested.join(', '));
const specs = params[E2E.PARAMETER_SPECS];
if (typeof specs === 'string' && specs.length > 0) {
this.specs = specs;
}
// NOTE: The slashes of baseUrl and context need to match the

@@ -66,2 +70,9 @@ // specifications required by the cplace base system. Also see the E2EENV

}
const e2eToken = params[E2E.PARAMETER_E2E_TOKEN];
if (typeof e2eToken === 'string' && e2eToken.length > 0) {
this.e2eToken = e2eToken;
}
else {
this.e2eToken = '';
}
const browser = params[E2E.PARAMETER_BROWSER];

@@ -85,2 +96,9 @@ if (typeof browser === 'string' && browser.length > 0) {

}
const noInstall = params[E2E.PARAMETER_NO_INSTALL];
if (typeof noInstall === 'boolean') {
this.noInstall = noInstall;
}
else {
this.noInstall = false;
}
if (this.browser.toLowerCase() !== 'chrome') {

@@ -104,5 +122,6 @@ this.headless = false;

context: this.context,
tenantId: this.tenantId
tenantId: this.tenantId,
e2eToken: this.e2eToken
};
const wdioGenerator = new WdioConfigGenerator_1.WdioConfigGenerator(this.workingDir, this.mainRepoDir, this.pluginsToBeTested, this.browser, context, this.timeout, this.headless);
const wdioGenerator = new WdioConfigGenerator_1.WdioConfigGenerator(this.workingDir, this.mainRepoDir, this.pluginsToBeTested, this.specs, this.browser, context, this.timeout, this.headless, this.noInstall);
console.log('Generating WDIO configuration files...');

@@ -136,6 +155,9 @@ wdioGenerator.generateE2EEnv();

E2E.PARAMETER_TENANTID = 'tenantId';
E2E.PARAMETER_E2E_TOKEN = 'e2eToken';
E2E.PARAMETER_PLUGINS = 'plugins';
E2E.PARAMETER_SPECS = 'specs';
E2E.PARAMETER_BROWSER = 'browser';
E2E.PARAMETER_TIMEOUT = 'timeout';
E2E.PARAMETER_HEADLESS = 'headless';
E2E.PARAMETER_NO_INSTALL = 'noInstall';
// Default

@@ -142,0 +164,0 @@ E2E.DEFAULT_BASE_URL = 'http://localhost:8083';

@@ -5,2 +5,3 @@ export interface IE2EContext {

tenantId: string;
e2eToken?: string;
}

@@ -7,0 +8,0 @@ export declare class E2EEnvTemplate {

@@ -10,3 +10,4 @@ "use strict";

context: '${context.context}',
tenantId: '${context.tenantId}'
tenantId: '${context.tenantId}',
testSetupHandlerE2EToken: '${context.e2eToken || ''}'
};

@@ -13,0 +14,0 @@ `;

@@ -9,6 +9,8 @@ import { IE2EContext } from './E2EEnvTemplate';

private readonly plugins;
private readonly specs;
private readonly browser;
private readonly timeout;
private readonly headless;
constructor(workingDir: string, mainDir: string, plugins: string[], browser: string, context: IE2EContext, timeout: number, headless: boolean);
private readonly noInstall;
constructor(workingDir: string, mainDir: string, plugins: string[], specs: string, browser: string, context: IE2EContext, timeout: number, headless: boolean, noInstall: boolean);
private static safePath;

@@ -15,0 +17,0 @@ private static pathToE2EFolder;

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

class WdioConfigGenerator {
constructor(workingDir, mainDir, plugins, browser, context, timeout, headless) {
constructor(workingDir, mainDir, plugins, specs, browser, context, timeout, headless, noInstall) {
this.workingDir = workingDir;

@@ -14,5 +14,7 @@ this.mainDir = mainDir;

this.plugins = plugins;
this.specs = specs;
this.context = context;
this.timeout = timeout;
this.headless = headless;
this.noInstall = noInstall;
}

@@ -35,3 +37,3 @@ static safePath(filePath) {

const mainDir = WdioConfigGenerator.safePath(this.mainDir);
const config = new ConfigTemplate_1.ConfigTemplate(mainDir, e2eFolder, this.browser, this.context.baseUrl, this.timeout, this.headless);
const config = new ConfigTemplate_1.ConfigTemplate(mainDir, e2eFolder, this.specs, this.browser, this.context.baseUrl, this.timeout, this.headless, this.noInstall);
fs.writeFileSync(path.join(e2eFolder, WdioConfigGenerator.WDIO_CONF_NAME), config.getTemplate(), { encoding: 'utf8' });

@@ -38,0 +40,0 @@ });

{
"name": "@cplace/cli",
"version": "0.11.1",
"version": "0.12.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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