Socket
Socket
Sign inDemoInstall

gemini-configparser

Package Overview
Dependencies
Maintainers
8
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gemini-configparser - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

0

.eslintrc.js

@@ -0,0 +0,0 @@ module.exports = {

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

## [1.3.1](https://github.com/gemini-testing/configparser/compare/v1.3.0...v1.3.1) (2022-09-27)
### Chores
* fix typings ([474eaeaf](https://github.com/gemini-testing/configparser/commit/474eaeaf067210aeafa2d9e936d52b09ca11e75e))
## [1.3.0](https://github.com/gemini-testing/configparser/compare/v1.2.0...v1.3.0) (2022-03-17)

@@ -7,0 +13,0 @@

@@ -0,0 +0,0 @@ const _ = require('lodash');

@@ -0,0 +0,0 @@ class MissingOptionError extends Error {

@@ -0,0 +0,0 @@ const {root, section, map, option} = require('./core');

@@ -0,0 +0,0 @@ const _ = require('lodash');

@@ -0,0 +0,0 @@ const _ = require('lodash');

2

package.json
{
"name": "gemini-configparser",
"version": "1.3.0",
"version": "1.3.1",
"description": "Config parser module for gemini",

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

@@ -0,0 +0,0 @@ # @gemini/configparser

@@ -6,5 +6,7 @@ declare module "gemini-configparser" {

type UnsanitizedConfigNode = any;
type DeepPartial<T> = {
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
}
export type Parser<T> = (locator: Locator, config: PartialConfig) => T;
type Parser<T> = (locator: Locator, config: PartialConfig) => T;
type RootPrefixes = {

@@ -19,10 +21,11 @@ envPrefix: string;

type OptionParserConfig<T> = {
defaultValue: T | ((config: UnsanitizedRootConfig, currNode: UnsanitizedConfigNode) => T);
export type OptionParserConfig<T> = {
defaultValue?: T | ((config: UnsanitizedRootConfig, currNode: UnsanitizedConfigNode) => T);
parseCli?(input: string): T;
parseEnv?(input: string): T;
validate?(value: T, config: UnsanitizedRootConfig, currNode: UnsanitizedConfigNode, meta: MetaInfo): void;
validate?(value: unknown, config: UnsanitizedRootConfig, currNode: UnsanitizedConfigNode, meta: MetaInfo): asserts value is T;
isDeprecated?: boolean;
};
type MappedOptionParserConfig<S, T> = OptionParserConfig<S> & {
export type MappedOptionParserConfig<S, T> = OptionParserConfig<S> & {
map(value: S, config: UnsanitizedRootConfig, currNode: UnsanitizedConfigNode, meta: MetaInfo): T;

@@ -34,11 +37,12 @@ };

export function option<T>(description: OptionParserConfig<T>): Parser<T>;
export function option<S, T>(description: MappedOptionParserConfig<S, T>): Parser<T>;
export function option<S, T = S>(description: MappedOptionParserConfig<S, T>): Parser<T>;
export function section<T>(properties: SectionProperties<T>): Parser<T>;
export function map<T>(properties: Parser<T>, defaultValue?: Record<string, DeepPartial<T>>): Parser<Record<string, T>>;
type RootParserArg = {
options: UnsanitizedRootConfig;
type RootParserArg<T> = {
options: DeepPartial<T>;
env: NodeJS.ProcessEnv;
argv: Array<string>;
argv: NodeJS.Process['argv'];
};
type RootParser<T> = (arg: RootParserArg) => T;
type RootParser<T> = (arg: RootParserArg<T>) => T;
export function root<T>(rootParser: Parser<T>, prefixes: RootPrefixes): RootParser<T>;

@@ -45,0 +49,0 @@

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