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

@ticketmaster/allure-mock

Package Overview
Dependencies
Maintainers
34
Versions
512
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ticketmaster/allure-mock - npm Package Compare versions

Comparing version 4.0.11-alpha.0 to 4.0.11-alpha.1

32

dist/index.esm.js

@@ -289,2 +289,12 @@ import { Response, createServer } from 'miragejs';

const applicationsMock = (server) => {
server.get(`/api/v1/applications`, () => {
const applications = APPLICATIONS_LIST;
return applications
? new Response(200, {}, applications)
: new Response(401);
});
return server;
};
const IDENTITY_JWT_SECRET = "secret";

@@ -345,24 +355,2 @@ const IDENTITY_LOGIN_URL = "https://login-dev1.tmtools.nonprod.public.tmaws.eu/login";

const getApplicationsFromRequest = (request) => {
var _a;
const session = getSessionFromRequest(request);
const sessionPortalApplications = ((_a = session === null || session === void 0 ? void 0 : session.user) === null || _a === void 0 ? void 0 : _a.portalApplications) || [];
return session
? sessionPortalApplications
.map(({ code }) => APPLICATIONS_LIST.find(({ code: appCode }) => String(code) === String(appCode)))
.filter((r) => r !== undefined)
: null;
};
const applicationsMock = (server) => {
server.get(`/api/v1/applications`, (schema, request) => {
console.log("called");
const applications = getApplicationsFromRequest(request);
return applications
? new Response(200, {}, applications)
: new Response(401);
}, { timing: 1000 });
return server;
};
const configurationMock = (server) => {

@@ -369,0 +357,0 @@ server.get(`/api/v1/globalconfiguration`, (schema, request) => {

@@ -295,2 +295,12 @@ 'use strict';

const applicationsMock = (server) => {
server.get(`/api/v1/applications`, () => {
const applications = APPLICATIONS_LIST;
return applications
? new miragejs.Response(200, {}, applications)
: new miragejs.Response(401);
});
return server;
};
const IDENTITY_JWT_SECRET = "secret";

@@ -351,24 +361,2 @@ const IDENTITY_LOGIN_URL = "https://login-dev1.tmtools.nonprod.public.tmaws.eu/login";

const getApplicationsFromRequest = (request) => {
var _a;
const session = getSessionFromRequest(request);
const sessionPortalApplications = ((_a = session === null || session === void 0 ? void 0 : session.user) === null || _a === void 0 ? void 0 : _a.portalApplications) || [];
return session
? sessionPortalApplications
.map(({ code }) => APPLICATIONS_LIST.find(({ code: appCode }) => String(code) === String(appCode)))
.filter((r) => r !== undefined)
: null;
};
const applicationsMock = (server) => {
server.get(`/api/v1/applications`, (schema, request) => {
console.log("called");
const applications = getApplicationsFromRequest(request);
return applications
? new miragejs.Response(200, {}, applications)
: new miragejs.Response(401);
}, { timing: 1000 });
return server;
};
const configurationMock = (server) => {

@@ -375,0 +363,0 @@ server.get(`/api/v1/globalconfiguration`, (schema, request) => {

{
"name": "@ticketmaster/allure-mock",
"version": "4.0.11-alpha.0",
"version": "4.0.11-alpha.1",
"author": "Ticketmaster (https://www.ticketmaster.com/)",

@@ -17,3 +17,3 @@ "contributors": [

"devDependencies": {
"@ticketmaster/allure-command": "^4.0.11-alpha.0"
"@ticketmaster/allure-command": "^4.0.11-alpha.1"
},

@@ -20,0 +20,0 @@ "peerDependencies": {

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