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

@spinajs/configuration

Package Overview
Dependencies
Maintainers
0
Versions
316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/configuration - npm Package Compare versions

Comparing version 2.0.305 to 2.0.306

19

lib/cjs/configuration.js

@@ -37,2 +37,3 @@ "use strict";

const ajv_keywords_1 = __importDefault(require("ajv-keywords"));
const PROTOCOL_REGEXP = /^([a-zA-Z0-9\-]+:\/\/)+(.+)$/gm;
/**

@@ -181,2 +182,11 @@ * HACK:

const proxyFunc = (obj) => {
const haveProtoVals = Object.values(obj).some((v) => {
if (v instanceof configuration_common_1.ConfigVar) {
return true;
}
return false;
});
if (!haveProtoVals) {
return obj;
}
return new Proxy(obj, {

@@ -199,3 +209,2 @@ get: (obj, prop) => {

const configProtocols = await di_1.DI.resolve(Array.ofType(configuration_common_1.ConfigVarProtocol));
const reg = /^([a-zA-Z0-9\-]+:\/\/)+(.+)$/gm;
const iterate = async (obj) => {

@@ -210,8 +219,8 @@ if (!obj) {

await Promise.all((0, util_js_1.pickString)(obj).map(async ([key, val]) => {
reg.lastIndex = 0;
if (!reg.test(val)) {
PROTOCOL_REGEXP.lastIndex = 0;
if (!PROTOCOL_REGEXP.test(val)) {
return;
}
reg.lastIndex = 0;
const match = reg.exec(val);
PROTOCOL_REGEXP.lastIndex = 0;
const match = PROTOCOL_REGEXP.exec(val);
const protocol = configProtocols.find((p) => p.Protocol === match[1]);

@@ -218,0 +227,0 @@ if (!protocol) {

@@ -31,2 +31,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

import { default as ajvKeywords } from 'ajv-keywords';
const PROTOCOL_REGEXP = /^([a-zA-Z0-9\-]+:\/\/)+(.+)$/gm;
/**

@@ -175,2 +176,11 @@ * HACK:

const proxyFunc = (obj) => {
const haveProtoVals = Object.values(obj).some((v) => {
if (v instanceof ConfigVar) {
return true;
}
return false;
});
if (!haveProtoVals) {
return obj;
}
return new Proxy(obj, {

@@ -193,3 +203,2 @@ get: (obj, prop) => {

const configProtocols = await DI.resolve(Array.ofType(ConfigVarProtocol));
const reg = /^([a-zA-Z0-9\-]+:\/\/)+(.+)$/gm;
const iterate = async (obj) => {

@@ -204,8 +213,8 @@ if (!obj) {

await Promise.all(pickString(obj).map(async ([key, val]) => {
reg.lastIndex = 0;
if (!reg.test(val)) {
PROTOCOL_REGEXP.lastIndex = 0;
if (!PROTOCOL_REGEXP.test(val)) {
return;
}
reg.lastIndex = 0;
const match = reg.exec(val);
PROTOCOL_REGEXP.lastIndex = 0;
const match = PROTOCOL_REGEXP.exec(val);
const protocol = configProtocols.find((p) => p.Protocol === match[1]);

@@ -212,0 +221,0 @@ if (!protocol) {

{
"name": "@spinajs/configuration",
"version": "2.0.305",
"version": "2.0.306",
"description": "framework configuration module",

@@ -55,7 +55,7 @@ "main": "lib/cjs/index.js",

"dependencies": {
"@spinajs/configuration-common": "^2.0.305",
"@spinajs/di": "^2.0.305",
"@spinajs/exceptions": "^2.0.305",
"@spinajs/internal-logger": "^2.0.305",
"@spinajs/util": "2.0.305",
"@spinajs/configuration-common": "^2.0.306",
"@spinajs/di": "^2.0.306",
"@spinajs/exceptions": "^2.0.306",
"@spinajs/internal-logger": "^2.0.306",
"@spinajs/util": "2.0.306",
"ajv": "^8.12.0",

@@ -62,0 +62,0 @@ "ajv-formats": "^2.1.1",

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