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

@initx-plugin/core

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@initx-plugin/core - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

49

dist/index.d.ts

@@ -1,34 +0,5 @@

type MaybeArray<T> = T | T[];
import { MatcherRules } from 'matchinitx';
type MaybePromise<T> = T | Promise<T>;
interface MatcherSetup {
/**
* Matching string or RegExp
*
* The key that was used to match the handler
*/
matching: MaybeArray<string | RegExp>;
}
type BaseMatchers<TMatcher> = TMatcher & MatcherSetup;
type TypeMatchers<TMatcher> = Record<string, BaseMatchers<TMatcher>>;
type ResultFunction<TResult, TMatcher> = (matcher: TMatcher, ...others: string[]) => TResult;
type Matchers<TMatcher extends object = object> = MaybeArray<BaseMatchers<TMatcher>> | TypeMatchers<TMatcher>;
declare class InitxMatcher$1<TResult, TMatcher extends object> {
private resultFunction;
constructor(fn: ResultFunction<TResult, TMatcher>);
match(matchers: Matchers<TMatcher>, key: string, ...others: string[]): TResult[];
private matchBaseMatchers;
private matchArrayBaseMatchers;
private matchTypeMatchers;
private isBaseMatchers;
private isArrayBaseMatchers;
private alwaysArray;
private isObject;
private isPassed;
private omit;
private buildResultMatcher;
private buildResultFunction;
}
declare function useInitxMatcher<TResult, TMatcher extends object = object>(fn: ResultFunction<TResult, TMatcher>): InitxMatcher$1<TResult, TMatcher>;
interface PackageInfo {

@@ -63,3 +34,3 @@ root: string;

type InitxMatcher<TMatcher extends object = object> = TMatcher & {
type InitxRuleFields<TRule extends object = object> = TRule & {
/**

@@ -72,3 +43,3 @@ * Description of the handler

};
type InitxMatchers<TMatcher extends object = object> = Matchers<InitxMatcher<TMatcher>>;
type InitxMatcherRules<TRule extends object = object> = MatcherRules<InitxRuleFields<TRule>>;
interface HandlerInfo {

@@ -105,3 +76,3 @@ handler: () => MaybePromise<void>;

}
interface InitxContext<TStore extends object = object, TMatcher extends object = object> extends InitxRunContext {
interface InitxContext<TStore extends object = object, TRule extends object = object> extends InitxRunContext {
/**

@@ -114,10 +85,10 @@ * Store

/**
* Matcher
* Rule
*
* Matched matcher object, you can get custom fields, excluded `matching`
* Matched rule object, you can get custom fields, excluded `matching`
*/
matcher: InitxMatcher<TMatcher>;
rule: InitxRuleFields<TRule>;
}
declare abstract class InitxPlugin<TStore extends object = object> {
abstract matchers: InitxMatchers;
abstract rules: InitxMatcherRules;
abstract handle(context: InitxContext, ...others: string[]): MaybePromise<void>;

@@ -132,2 +103,2 @@ defaultStore?: TStore;

export { type HandlerInfo, type InitxBaseContext, type InitxContext, type InitxMatchers, InitxPlugin, type InitxPluginInfo, type LoadPluginResult, type MatchedPlugin, type Matchers, type PackageInfo, createStore, fetchPlugins, loadPlugins, matchPlugins, useInitxMatcher, writeStore };
export { type HandlerInfo, type InitxBaseContext, type InitxContext, type InitxMatcherRules as InitxMatchers, InitxPlugin, type InitxPluginInfo, type LoadPluginResult, type MatchedPlugin, type PackageInfo, createStore, fetchPlugins, loadPlugins, matchPlugins, writeStore };
{
"name": "@initx-plugin/core",
"type": "module",
"version": "0.0.27",
"version": "0.0.28",
"description": "core module for initx plugins",

@@ -27,4 +27,5 @@ "license": "MIT",

"fs-extra": "^11.2.0",
"importx": "^0.5.0",
"@initx-plugin/utils": "0.0.27"
"importx": "^0.5.1",
"matchinitx": "^0.0.2",
"@initx-plugin/utils": "0.0.28"
},

@@ -31,0 +32,0 @@ "devDependencies": {

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