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

backk-frontend-utils

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backk-frontend-utils - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

7

lib/callRemoteService.js

@@ -5,12 +5,13 @@ import { Base64 } from 'js-base64';

export default async function callRemoteService(microserviceName, serviceFunctionName, serviceFunctionArgument, microserviceNamespace, jwtStorageEncryptionKey, options) {
var _a, _b, _c;
const serverPort = window.location.search
? window.location.search.split('serverPort=').pop() ?? HTTPS_DEFAULT_PORT
? (_a = window.location.search.split('serverPort=').pop()) !== null && _a !== void 0 ? _a : HTTPS_DEFAULT_PORT
: HTTPS_DEFAULT_PORT;
try {
const response = await fetch(`https://${window.location.hostname}:${serverPort}/${microserviceName}.${microserviceNamespace}/${serviceFunctionName}`, {
method: options?.httpMethod ?? 'POST',
method: (_b = options === null || options === void 0 ? void 0 : options.httpMethod) !== null && _b !== void 0 ? _b : 'POST',
body: serviceFunctionArgument ? JSON.stringify(serviceFunctionArgument) : undefined,
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + Base64.encode(getJwtFromSessionStorage(jwtStorageEncryptionKey) ?? ''),
Authorization: 'Bearer ' + Base64.encode((_c = getJwtFromSessionStorage(jwtStorageEncryptionKey)) !== null && _c !== void 0 ? _c : ''),
},

@@ -17,0 +18,0 @@ });

export const MAX_INT_VALUE = 2147483647;
export const HTTPS_DEFAULT_PORT = '443';
export class Lengths {
static _1 = 1;
static _2 = 2;
static _4 = 4;
static _8 = 8;
static _16 = 16;
static _32 = 32;
static _64 = 64;
static _128 = 128;
static _256 = 256;
static _512 = 512;
static _1024 = 1024;
static _1K = Lengths._1024;
static _2K = 2 * Lengths._1024;
static _3K = 3 * Lengths._1024;
static _4K = 4 * Lengths._1024;
static _5K = 5 * Lengths._1024;
static _8K = 8 * Lengths._1024;
static _10K = 10 * Lengths._1024;
static _16K = 16 * Lengths._1024;
static _32K = 32 * Lengths._1024;
static _64K = 64 * Lengths._1024;
static _128K = 128 * Lengths._1024;
static _256K = 256 * Lengths._1024;
static _512K = 512 * Lengths._1024;
static _1024K = 1024 * Lengths._1024;
static _1M = Lengths._1024K;
static _2M = 2 * Lengths._1024K;
static _3M = 3 * Lengths._1024K;
static _4M = 4 * Lengths._1024K;
static _5M = 5 * Lengths._1024K;
static _6M = 6 * Lengths._1024K;
static _7M = 7 * Lengths._1024K;
static _8M = 8 * Lengths._1024K;
static _9M = 9 * Lengths._1024K;
static _10M = 10 * Lengths._1024K;
static _16M = 16 * Lengths._1024K;
static _32M = 32 * Lengths._1024K;
static _64M = 64 * Lengths._1024K;
static _128M = 128 * Lengths._1024K;
static _256M = 256 * Lengths._1024K;
static _512M = 512 * Lengths._1024K;
}
Lengths._1 = 1;
Lengths._2 = 2;
Lengths._4 = 4;
Lengths._8 = 8;
Lengths._16 = 16;
Lengths._32 = 32;
Lengths._64 = 64;
Lengths._128 = 128;
Lengths._256 = 256;
Lengths._512 = 512;
Lengths._1024 = 1024;
Lengths._1K = Lengths._1024;
Lengths._2K = 2 * Lengths._1024;
Lengths._3K = 3 * Lengths._1024;
Lengths._4K = 4 * Lengths._1024;
Lengths._5K = 5 * Lengths._1024;
Lengths._8K = 8 * Lengths._1024;
Lengths._10K = 10 * Lengths._1024;
Lengths._16K = 16 * Lengths._1024;
Lengths._32K = 32 * Lengths._1024;
Lengths._64K = 64 * Lengths._1024;
Lengths._128K = 128 * Lengths._1024;
Lengths._256K = 256 * Lengths._1024;
Lengths._512K = 512 * Lengths._1024;
Lengths._1024K = 1024 * Lengths._1024;
Lengths._1M = Lengths._1024K;
Lengths._2M = 2 * Lengths._1024K;
Lengths._3M = 3 * Lengths._1024K;
Lengths._4M = 4 * Lengths._1024K;
Lengths._5M = 5 * Lengths._1024K;
Lengths._6M = 6 * Lengths._1024K;
Lengths._7M = 7 * Lengths._1024K;
Lengths._8M = 8 * Lengths._1024K;
Lengths._9M = 9 * Lengths._1024K;
Lengths._10M = 10 * Lengths._1024K;
Lengths._16M = 16 * Lengths._1024K;
Lengths._32M = 32 * Lengths._1024K;
Lengths._64M = 64 * Lengths._1024K;
Lengths._128M = 128 * Lengths._1024K;
Lengths._256M = 256 * Lengths._1024K;
Lengths._512M = 512 * Lengths._1024K;
export class Values {
static _24 = 24;
static _25 = 25;
static _50 = 50;
static _100 = 100;
static _200 = 200;
static _250 = 250;
static _500 = 500;
static _1K = 1000;
static _10K = 10000;
static _100K = 100000;
static _1M = 1000000;
static _10M = 10000000;
static _100M = 100000000;
static _1B = 1000000000;
}
Values._24 = 24;
Values._25 = 25;
Values._50 = 50;
Values._100 = 100;
Values._200 = 200;
Values._250 = 250;
Values._500 = 500;
Values._1K = 1000;
Values._10K = 10000;
Values._100K = 100000;
Values._1M = 1000000;
Values._10M = 10000000;
Values._100M = 100000000;
Values._1B = 1000000000;
export class Durations {
static SECS_IN_MINUTE = 60;
}
Durations.SECS_IN_MINUTE = 60;
//# sourceMappingURL=constants.js.map
export { default as callRemoteService } from './callRemoteService';
export { BackkError } from './types/BackkError';
export { BackkError, PossibleBackkError } from './types/BackkError';
export { PromiseErrorOr } from './types/PromiseErrorOr';

@@ -4,0 +4,0 @@ export { One } from './types/One';

export default class _Id {
_id;
}
//# sourceMappingURL=_Id.js.map
export default class CurrentPageToken {
constructor(subEntityPath, currentPageToken) {
this.subEntityPath = '';
this.subEntityPath = subEntityPath;
this.currentPageToken = currentPageToken;
}
subEntityPath = '';
currentPageToken;
}
//# sourceMappingURL=CurrentPageToken.js.map

@@ -6,10 +6,9 @@ import SortBy from './SortBy';

constructor(pageNumber = 1, pageSize = Values._50) {
this.includeResponseFields = [];
this.excludeResponseFields = [];
this.sortBys = [new SortBy('*', '_id', 'ASC'), new SortBy('*', 'id', 'ASC')];
this.currentPageTokens = [];
this.paginations = [new Pagination('*', 1, pageSize)];
}
includeResponseFields = [];
excludeResponseFields = [];
sortBys = [new SortBy('*', '_id', 'ASC'), new SortBy('*', 'id', 'ASC')];
paginations;
currentPageTokens = [];
}
//# sourceMappingURL=DefaultPostQueryOperations.js.map
export default class Pagination {
constructor(subEntityPath, pageNumber, pageSize) {
this.subEntityPath = '';
this.subEntityPath = subEntityPath;

@@ -7,6 +8,3 @@ this.pageNumber = pageNumber;

}
subEntityPath = '';
pageNumber;
pageSize;
}
//# sourceMappingURL=Pagination.js.map
export default class SortBy {
constructor(subEntityPath, fieldName, sortDirection) {
this.subEntityPath = '';
this.subEntityPath = subEntityPath;

@@ -7,6 +8,3 @@ this.fieldName = fieldName;

}
subEntityPath = '';
fieldName;
sortDirection;
}
//# sourceMappingURL=SortBy.js.map
{
"name": "backk-frontend-utils",
"version": "1.0.5",
"version": "1.0.6",
"description": "Web frontend utils for Backk microservices",

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

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