Socket
Socket
Sign inDemoInstall

@serenity-js/serenity-bdd

Package Overview
Dependencies
Maintainers
1
Versions
292
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serenity-js/serenity-bdd - npm Package Compare versions

Comparing version 3.10.4 to 3.11.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [3.11.0](https://github.com/serenity-js/serenity-js/compare/v3.10.4...v3.11.0) (2023-10-03)
### Features
* **serenity-bdd:** serenity-bdd downloader will now automatically detect proxy server configuration ([c221210](https://github.com/serenity-js/serenity-js/commit/c221210c95753a518621b5e97f6e037fa9383be1)), closes [#1949](https://github.com/serenity-js/serenity-js/issues/1949)
## [3.10.4](https://github.com/serenity-js/serenity-js/compare/v3.10.3...v3.10.4) (2023-09-22)

@@ -8,0 +19,0 @@

34

lib/cli/commands/update.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
const assertions_1 = require("@serenity-js/assertions");
const core_1 = require("@serenity-js/core");
const io_1 = require("@serenity-js/core/lib/io");
const https = __importStar(require("https"));
const url_1 = require("url");

@@ -39,5 +63,11 @@ const defaults_1 = require("../defaults");

handler: async (argv) => {
const printer = new Printer_1.Printer(process.stdout, process.stderr), artifactGAV = model_1.GAV.fromString(argv.artifact), pathToArtifact = new io_1.Path(argv.cacheDir).join(artifactGAV.toPath()), repository = new url_1.URL(argv.repository);
const printer = new Printer_1.Printer(process.stdout, process.stderr), artifactGAV = model_1.GAV.fromString(argv.artifact), pathToArtifact = new io_1.Path(argv.cacheDir).join(artifactGAV.toPath()), repository = new url_1.URL(argv.repository), ignoreSSL = Boolean(argv.ignoreSSL);
(0, core_1.configure)({
actors: new stage_1.UpdateCommandActors(new io_1.Path(process.cwd()), () => (0, io_2.axiosClient)(repository, Boolean(argv.ignoreSSL), process.env, model_1.Credentials.fromString(argv.auth))),
actors: new stage_1.UpdateCommandActors(new io_1.Path(process.cwd()), {
baseURL: repository.toString(),
auth: model_1.Credentials.fromString(argv.auth).toJSON(),
httpsAgent: ignoreSSL
? new https.Agent({ rejectUnauthorized: !ignoreSSL })
: undefined,
}),
crew: [

@@ -44,0 +74,0 @@ new stage_1.NotificationReporter(printer),

1

lib/cli/io/index.d.ts

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

export * from './axiosClient';
export * from './formatError';
//# sourceMappingURL=index.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./axiosClient"), exports);
__exportStar(require("./formatError"), exports);
//# sourceMappingURL=index.js.map
import type { Actor, Cast } from '@serenity-js/core';
import type { Path } from '@serenity-js/core/lib/io';
import type { AxiosInstance } from 'axios';
import type { AxiosRequestConfigDefaults } from '@serenity-js/rest';
/**

@@ -9,6 +9,6 @@ * @package

private readonly cwd;
private readonly createAxios;
constructor(cwd: Path, createAxios: () => AxiosInstance);
private readonly axiosConfigDefaults;
constructor(cwd: Path, axiosConfigDefaults: AxiosRequestConfigDefaults);
prepare(actor: Actor): Actor;
}
//# sourceMappingURL=UpdateCommandActors.d.ts.map

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

class UpdateCommandActors {
constructor(cwd, createAxios) {
constructor(cwd, axiosConfigDefaults) {
this.cwd = cwd;
this.createAxios = createAxios;
this.axiosConfigDefaults = axiosConfigDefaults;
}
prepare(actor) {
return actor.whoCan(rest_1.CallAnApi.using(this.createAxios()), screenplay_1.UseFileSystem.at(this.cwd), core_1.TakeNotes.usingAnEmptyNotepad());
return actor.whoCan(rest_1.CallAnApi.using(this.axiosConfigDefaults), screenplay_1.UseFileSystem.at(this.cwd), core_1.TakeNotes.usingAnEmptyNotepad());
}

@@ -19,0 +19,0 @@ }

{
"name": "@serenity-js/serenity-bdd",
"version": "3.10.4",
"version": "3.11.0",
"description": "Serenity BDD reporter for Serenity/JS",

@@ -48,5 +48,5 @@ "author": {

"dependencies": {
"@serenity-js/assertions": "3.10.4",
"@serenity-js/core": "3.10.4",
"@serenity-js/rest": "3.10.4",
"@serenity-js/assertions": "3.11.0",
"@serenity-js/core": "3.11.0",
"@serenity-js/rest": "3.11.0",
"ansi-regex": "^5.0.1",

@@ -65,7 +65,7 @@ "axios": "^1.5.0",

"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/mocha": "^10.0.2",
"@types/progress": "^2.0.5",
"c8": "8.0.1",
"if-env": "^1.0.4",
"memfs": "^4.4.0",
"memfs": "^4.5.0",
"mocha": "^10.2.0",

@@ -76,3 +76,3 @@ "mocha-multi": "^1.1.7",

},
"gitHead": "28f12bd6029a9a6c1d8e492486138bf0c83916cd"
"gitHead": "4cd38cd3f6c8ea72e7e2776d76af9fa8a0672265"
}
import { isTrue } from '@serenity-js/assertions';
import { actorCalled, Check, configure } from '@serenity-js/core';
import { Path } from '@serenity-js/core/lib/io';
import * as https from 'https';
import { URL } from 'url';

@@ -8,3 +9,3 @@

import { defaults } from '../defaults';
import { axiosClient, formatError } from '../io';
import { formatError } from '../io';
import { Credentials, GAV } from '../model';

@@ -48,3 +49,4 @@ import { Printer } from '../Printer';

pathToArtifact = new Path(argv.cacheDir).join(artifactGAV.toPath()),
repository = new URL(argv.repository);
repository = new URL(argv.repository),
ignoreSSL = Boolean(argv.ignoreSSL);

@@ -54,3 +56,9 @@ configure({

new Path(process.cwd()),
() => axiosClient(repository, Boolean(argv.ignoreSSL), process.env, Credentials.fromString(argv.auth)),
{
baseURL: repository.toString(),
auth: Credentials.fromString(argv.auth).toJSON() as { username: string, password: string } | undefined,
httpsAgent: ignoreSSL
? new https.Agent({ rejectUnauthorized: ! ignoreSSL })
: undefined,
}
),

@@ -57,0 +65,0 @@ crew: [

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

export * from './axiosClient';
export * from './formatError';

@@ -1,6 +0,6 @@

import type { Actor, Cast} from '@serenity-js/core';
import type { Actor, Cast } from '@serenity-js/core';
import { TakeNotes } from '@serenity-js/core';
import type { Path } from '@serenity-js/core/lib/io';
import type { AxiosRequestConfigDefaults} from '@serenity-js/rest';
import { CallAnApi } from '@serenity-js/rest';
import type { AxiosInstance } from 'axios';

@@ -15,3 +15,3 @@ import { UseFileSystem } from '../screenplay';

private readonly cwd: Path,
private readonly createAxios: () => AxiosInstance,
private readonly axiosConfigDefaults: AxiosRequestConfigDefaults,
){

@@ -22,3 +22,3 @@ }

return actor.whoCan(
CallAnApi.using(this.createAxios()),
CallAnApi.using(this.axiosConfigDefaults),
UseFileSystem.at(this.cwd),

@@ -25,0 +25,0 @@ TakeNotes.usingAnEmptyNotepad(),

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