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

@ewizardjs/settings

Package Overview
Dependencies
Maintainers
7
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ewizardjs/settings - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

dist/client/Hooks.d.ts

4

dist/backend/index.d.ts
import { Strategy } from '@ewizardjs/settings-strategies';
import { SettingsOptions, SettingsJson, TargetCLMs, ISettings, Robots, Sitemap, ChangeFrequency, ExtendedRobots, SiteScreenshoterOptions, EdetailerScreenshoterOptions } from '../interfaces/settings';
import { SettingsOptions, SettingsJson } from '../interfaces/settings';
import interpolateSettings from '../utils/interpolate-settings';
export { SettingsJson, TargetCLMs, ISettings, Robots, Sitemap, ChangeFrequency, ExtendedRobots, SiteScreenshoterOptions, EdetailerScreenshoterOptions };
export * from '../interfaces/settings';
export declare function getClmSettings(contentPath: string, clmName: string, options?: SettingsOptions, storageStrategy?: Strategy<any>): Promise<any>;

@@ -6,0 +6,0 @@ export declare function getByPath(contentPath: string, keypath: string, options?: SettingsOptions, defaultValue?: any, storageStrategy?: Strategy<any>): Promise<any>;

"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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -39,3 +53,3 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

Object.defineProperty(exports, "__esModule", { value: true });
exports.interpolate = exports.getCurrentTheme = exports.getRawByPath = exports.getRawWithoutProcessing = exports.getRawWithoutCache = exports.getRaw = exports.get = exports.getByPath = exports.getClmSettings = exports.TargetCLMs = void 0;
exports.interpolate = exports.getCurrentTheme = exports.getRawByPath = exports.getRawWithoutProcessing = exports.getRawWithoutCache = exports.getRaw = exports.get = exports.getByPath = exports.getClmSettings = void 0;
var path_1 = require("path");

@@ -47,4 +61,2 @@ var dot = require("dot-prop");

var getCache_1 = require("../utils/getCache");
var settings_1 = require("../interfaces/settings");
Object.defineProperty(exports, "TargetCLMs", { enumerable: true, get: function () { return settings_1.TargetCLMs; } });
var default_settings_1 = require("../default-settings");

@@ -54,2 +66,3 @@ var interpolate_settings_1 = require("../utils/interpolate-settings");

var parseSettingsJson_1 = require("../utils/parseSettingsJson");
__exportStar(require("../interfaces/settings"), exports);
function getClmSettings(contentPath, clmName, options, storageStrategy) {

@@ -56,0 +69,0 @@ if (options === void 0) { options = {}; }

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

import { IHooks } from '../interfaces/Hooks';
import interpolateSettings from '../utils/interpolate-settings';

@@ -8,2 +9,3 @@ import { iStructure } from '@ewizardjs/structure';

settingsJson: SettingsJson | undefined;
hooks: IHooks;
private settingsCache;

@@ -10,0 +12,0 @@ constructor(settingsJson?: SettingsJson);

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

var default_settings_1 = require("../default-settings");
var Hooks_1 = require("./Hooks");
var plugin_1 = require("./plugin");

@@ -43,2 +44,3 @@ Object.defineProperty(exports, "SettingsPlugin", { enumerable: true, get: function () { return plugin_1.SettingsPlugin; } });

this.settingsCache = new NodeCache();
this.hooks = new Hooks_1.default();
}

@@ -71,3 +73,6 @@ Settings.prototype.getClmSettings = function (structure, clmName, options) {

this.clearCache();
var oldSettings = this.settingsJson;
this.settingsJson = mergeDeepAll(this.settingsJson, settingsJson);
var settings = this.settingsJson;
this.hooks.invoke({ settings: settings, oldSettings: oldSettings }).then();
};

@@ -74,0 +79,0 @@ Settings.prototype.getRaw = function () {

@@ -47,2 +47,5 @@ "use strict";

},
onchange: function (handler) {
settings.hooks.add(handler);
}
};

@@ -49,0 +52,0 @@ },

import { iStructure } from '@ewizardjs/structure';
import { StructureApi } from '@ewizardjs/structure-api';
import { IVueI18n } from 'vue-i18n';
import { IHooks } from './Hooks';
export interface ISettings {
hooks: IHooks;
getRaw(): SettingsJson;

@@ -140,2 +142,7 @@ getClmSettings(structure: iStructure, clmName: string): any;

};
externalSystems?: {
contentful?: {
twoWaySync?: boolean;
};
};
}

@@ -142,0 +149,0 @@ export interface SettingsOptions {

{
"name": "@ewizardjs/settings",
"version": "4.0.1",
"version": "4.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/backend/index.js",

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