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

@kasko/fe-webapp-utils-lib

Package Overview
Dependencies
Maintainers
10
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kasko/fe-webapp-utils-lib - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

5

CHANGELOG.md
# Changelog
## [v1.1.0](https://github.com/kasko/fe-webapp-utils-lib/compare/v1.0.3...v1.1.0) (2022-06-10)
## Feature
- `dev` - Fixes case sensitivity in contents loader;
- `dev` - Removes need for pointing path to files to load;
## [v1.0.3](https://github.com/kasko/fe-webapp-utils-lib/compare/v1.0.2...v1.0.3) (2022-06-03)

@@ -4,0 +9,0 @@ ## Other

2

dist/dev.d.ts
declare function requireTypescript(entry: string, cacheName: string): Promise<Record<string, any>>;
declare function buildResponse<T extends Record<string, any> = Record<string, any>>(entryPath: string, responsePath: string, id: string, language?: string): Promise<T>;
declare function buildResponse<T extends Record<string, any> = Record<string, any>>(entryJSON: Record<string, any>, responseJSON: Record<string, any>, id: string, language?: string): Promise<T>;
export { requireTypescript, buildResponse, };

@@ -84,5 +84,3 @@ var __defProp = Object.defineProperty;

}
async function buildResponse(entryPath, responsePath, id, language) {
const timeName = `${id} endpoint built`;
console.time(timeName);
async function buildResponse(entryJSON, responseJSON, id, language) {
const {

@@ -92,8 +90,8 @@ fieldDefinition,

contents
} = await requireTypescript(entryPath, id);
const responseJSON = require(responsePath);
} = entryJSON;
const responseClone = JSON.parse(JSON.stringify(responseJSON));
const lang = language || "en";
if (contents[lang]) {
responseClone.content = (0, import_csv.csvToObject)(contents[lang]);
const content = Object.entries(contents).find(([key]) => key.toLocaleLowerCase() === lang.toLocaleLowerCase());
if (content) {
responseClone.content = (0, import_csv.csvToObject)(content[1]);
} else {

@@ -100,0 +98,0 @@ console.error(`!!! Language "${lang}" for "${id}" is not defined.`);

{
"name": "@kasko/fe-webapp-utils-lib",
"version": "1.0.3",
"version": "1.1.0",
"main": "dist/index.js",

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

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