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

@clerc/core

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clerc/core - npm Package Compare versions

Comparing version 0.24.0 to 0.25.0

27

dist/index.d.ts

@@ -0,3 +1,4 @@

import { LiteralUnion, OmitIndexSignature } from 'type-fest';
import * as _clerc_utils from '@clerc/utils';
import { Dict, MaybeArray as MaybeArray$1, Equals, CamelCase, LiteralUnion } from '@clerc/utils';
import { Dict, MaybeArray as MaybeArray$1, Equals, CamelCase } from '@clerc/utils';

@@ -112,9 +113,13 @@ declare const DOUBLE_DASH = "--";

};
type TypeFlagWithDefault<C extends Command> = TypeFlag<NonNullable<C["flags"]>>;
type Raw<C extends Command> = TypeFlagWithDefault<C> & {
type FallbackFlags<C extends Command> = Equals<NonNullableFlag<C>["flags"], {}> extends true ? Dict<any> : NonNullableFlag<C>["flags"];
type NonNullableFlag<C extends Command> = TypeFlag<NonNullable<C["flags"]>>;
type ParseFlag<C extends CommandRecord, N extends keyof C> = N extends keyof C ? OmitIndexSignature<NonNullableFlag<C[N]>["flags"]> : FallbackFlags<C[N]>["flags"];
type ParseRaw<C extends Command> = NonNullableFlag<C> & {
flags: FallbackFlags<C>;
parameters: string[];
mergedFlags: TypeFlagWithDefault<C>["flags"] & TypeFlagWithDefault<C>["unknownFlags"];
mergedFlags: FallbackFlags<C> & NonNullableFlag<C>["unknownFlags"];
};
type ParseParameters<C extends CommandRecord = CommandRecord, N extends keyof C = keyof C> = Equals<TransformParameters<C[N]>, {}> extends true ? N extends keyof C ? TransformParameters<C[N]> : Dict<string | string[] | undefined> : TransformParameters<C[N]>;
interface HandlerContext<C extends CommandRecord = CommandRecord, N extends keyof C = keyof C> {
name?: N;
name?: LiteralUnion<N, string>;
called?: string | RootType;

@@ -125,11 +130,11 @@ resolved: boolean;

raw: {
[K in keyof Raw<C[N]>]: Raw<C[N]>[K];
[K in keyof ParseRaw<C[N]>]: ParseRaw<C[N]>[K];
};
parameters: Equals<{
[K in keyof TransformParameters<C[N]>]: TransformParameters<C[N]>[K];
}, {}> extends true ? Dict<string | string[] | undefined> : {
[K in keyof TransformParameters<C[N]>]: TransformParameters<C[N]>[K];
parameters: {
[K in keyof ParseParameters<C, N>]: ParseParameters<C, N>[K];
};
unknownFlags: ParsedFlags["unknownFlags"];
flags: Equals<TypeFlagWithDefault<C[N]>["flags"], {}> extends true ? Dict<any> : TypeFlagWithDefault<C[N]>["flags"];
flags: {
[K in keyof ParseFlag<C, N>]: ParseFlag<C, N>[K];
};
cli: Clerc<C>;

@@ -136,0 +141,0 @@ }

{
"name": "@clerc/core",
"version": "0.24.0",
"version": "0.25.0",
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",

@@ -52,4 +52,5 @@ "description": "Clerc core",

"lite-emit": "^1.4.0",
"type-fest": "^3.5.1",
"type-flag": "^3.0.0",
"@clerc/utils": "0.24.0"
"@clerc/utils": "0.25.0"
},

@@ -56,0 +57,0 @@ "scripts": {

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