@clerc/core 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/@clerc/core?color=a1b858&label=)](https://www.npmjs.com/package/@clerc/core)
4
4
 
5
- See [Clerc](https://github.com/clercjs/clerc) for documentation.
5
+ ## Documenation
6
+
7
+ Read the [documentation](https://clerc.so1ve.dev) for more details.
6
8
 
7
9
  ## 📝 License
8
10
 
@@ -0,0 +1,18 @@
1
+ //#region rolldown:runtime
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, symbols) => {
4
+ let target = {};
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ export { __exportAll as t };
@@ -1,208 +1,43 @@
1
- //#endregion
2
- //#region ../parser/src/errors.d.ts
3
- declare class InvalidSchemaError extends Error {
4
- constructor(message: string);
5
- }
6
- //#endregion
7
- //#region ../utils/src/types/type-fest.d.ts
8
- type LiteralUnion<LiteralType, BaseType> = LiteralType | (BaseType & Record<never, never>);
9
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
10
- type Primitive = null | undefined | string | number | boolean | symbol | bigint;
11
- type BuiltIns = Primitive | void | Date | RegExp;
12
- type NonRecursiveType = BuiltIns | Function | (new (...arguments_: any[]) => unknown) | Promise<unknown>;
13
- type UnknownArray = readonly unknown[];
14
- type MapsSetsOrArrays = ReadonlyMap<unknown, unknown> | WeakMap<WeakKey, unknown> | ReadonlySet<unknown> | WeakSet<WeakKey> | UnknownArray;
15
- type ConditionalDeepPrettify<T, E = never, I$1 = unknown> = T extends E ? T : T extends I$1 ? { [TypeKey in keyof T]: ConditionalDeepPrettify<T[TypeKey], E, I$1> } : T;
16
- type DeepPrettify<T, E = never> = ConditionalDeepPrettify<T, E | NonRecursiveType | MapsSetsOrArrays, object>;
17
- type IsAny<T> = 0 extends 1 & T ? true : false;
18
- type RequireExactlyOneOrNone<T, Keys extends keyof T = keyof T> = ({ [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, never>> }[Keys] & Omit<T, Keys>) | (Partial<Record<Keys, never>> & Omit<T, Keys>);
19
- //#endregion
20
- //#region ../utils/src/types/index.d.ts
21
- type MaybeArray<T> = T | T[];
22
- type PartialRequired<T, K$1 extends keyof T> = T & { [P in K$1]-?: T[P] };
23
- type UnionToIntersection<U$1> = (U$1 extends any ? (k: U$1) => void : never) extends ((k: infer I) => void) ? I : never;
24
- type CamelCase<S extends string> = S extends `${infer Head} ${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : S extends `${infer Head}-${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : S;
25
- //#endregion
26
- //#region ../parser/src/types.d.ts
27
- interface FlagDefaultValueFunction<T> {
28
- (): T;
29
- display?: string;
30
- }
31
- type FlagDefaultValue<T = unknown> = T | FlagDefaultValueFunction<T>;
32
- /**
33
- * Defines how a string input is converted to the target type T.
34
- *
35
- * @template T The target type.
36
- */
37
- interface TypeFunction<T = unknown> {
38
- (value: string): T;
39
- /**
40
- * Optional display name for the type, useful in help output.
41
- * If provided, this will be shown instead of the function name.
42
- */
43
- display?: string;
44
- }
45
- /**
46
- * A callback function to conditionally stop parsing.
47
- * When it returns true, parsing stops and remaining arguments are preserved in `ignored`.
48
- *
49
- * @param type - The type of the current argument: 'known-flag' or 'unknown-flag' for flags, 'parameter' for positional arguments
50
- * @param arg - The current argument being processed
51
- * @returns true to stop parsing, false to continue
52
- */
53
- type IgnoreFunction = (type: typeof KNOWN_FLAG | typeof UNKNOWN_FLAG | typeof PARAMETER, arg: string) => boolean;
54
- type TypeValue<T = unknown> = TypeFunction<T> | readonly [TypeFunction<T>];
55
- type FlagRequiredOrDefault = RequireExactlyOneOrNone<{
56
- /** The default value of the flag. */
57
- default?: unknown;
58
- /** Whether the flag is required. */
59
- required?: boolean;
60
- }, "default" | "required">;
61
- type BaseFlagOptions<T extends TypeValue = TypeValue> = FlagRequiredOrDefault & {
62
- /**
63
- * The type constructor or a function to convert the string value.
64
- * To support multiple occurrences of a flag (e.g., --file a --file b), wrap the type in an array: [String], [Number].
65
- * e.g., String, Number, [String], (val) => val.split(',')
66
- */
67
- type: T;
68
- /** Short flag alias (single character). */
69
- short?: string;
70
- };
71
- type FlagOptions = (BaseFlagOptions<BooleanConstructor> & {
72
- /**
73
- * Whether to enable the `--no-<flag>` syntax to set the value to false.
74
- * Only useful for boolean flags.
75
- * When set on a non-boolean flag, a type error will be shown.
76
- *
77
- * @default true
78
- */
79
- negatable?: boolean;
80
- }) | (BaseFlagOptions & {
81
- negatable?: never;
82
- });
83
- type FlagDefinitionValue = FlagOptions | TypeValue;
84
- type FlagsDefinition = Record<string, FlagDefinitionValue>;
85
- /**
86
- * Configuration options for the parser.
87
- */
88
- interface ParserOptions<T extends FlagsDefinition = {}> {
89
- /**
90
- * Detailed configuration for flags.
91
- * Supports the full object syntax or a type constructor as a shorthand.
92
- * The key is the flag name (e.g., "file" for "--file").
93
- */
94
- flags?: T;
95
- /**
96
- * Delimiters to split flag names and values.
97
- *
98
- * @default ['=', ':']
99
- */
100
- delimiters?: string[];
101
- /**
102
- * A callback function to conditionally stop parsing.
103
- * When it returns true, parsing stops and remaining arguments are preserved in `ignored`.
104
- */
105
- ignore?: IgnoreFunction;
106
- }
107
- type RawInputType = string | boolean;
108
- interface ObjectInputType {
109
- [key: string]: RawInputType | ObjectInputType;
110
- }
111
- /**
112
- * The parsed result.
113
- * @template TFlags The specific flags type inferred from ParserOptions.
114
- */
115
- interface ParsedResult<TFlags extends Record<string, any>> {
116
- /** Positional arguments or commands. */
117
- parameters: string[];
118
- /** Arguments after the `--` delimiter. */
119
- doubleDash: string[];
120
- /**
121
- * The parsed flags.
122
- * This is a strongly-typed object whose structure is inferred from the `flags` configuration in ParserOptions.
123
- */
124
- flags: TFlags;
125
- /** The raw command-line arguments. */
126
- raw: string[];
127
- /** Unknown flags encountered during parsing. */
128
- unknown: Record<string, RawInputType>;
129
- /** Arguments that were not parsed due to ignore callback. */
130
- ignored: string[];
131
- /** List of required flags that were not provided. */
132
- missingRequiredFlags: string[];
133
- }
134
- type InferFlagDefault<T extends FlagDefinitionValue, Fallback> = T extends {
135
- default: FlagDefaultValue<infer DefaultType>;
136
- } ? DefaultType : Fallback;
137
- type IsTypeAny<T extends FlagDefinitionValue> = IsAny<T> extends true ? true : T extends {
138
- type: infer Type;
139
- } ? IsAny<Type> extends true ? true : false : false;
140
- type _InferFlags<T extends FlagsDefinition> = { [K in keyof T]: IsTypeAny<T[K]> extends true ? any : T[K] extends readonly [BooleanConstructor] | {
141
- type: readonly [BooleanConstructor];
142
- } ? number | InferFlagDefault<T[K], never> : T[K] extends ObjectConstructor | {
143
- type: ObjectConstructor;
144
- } ? ObjectInputType | InferFlagDefault<T[K], never> : T[K] extends readonly [TypeValue<infer U>] | {
145
- type: readonly [TypeValue<infer U>];
146
- } ? U[] | InferFlagDefault<T[K], never> : T[K] extends TypeValue<infer U> | {
147
- type: TypeValue<infer U>;
148
- } ? U | InferFlagDefault<T[K], [U] extends [boolean] ? never : T[K] extends {
149
- required: true;
150
- } ? never : undefined> : never };
151
- /**
152
- * An advanced utility type that infers the exact type of the `flags` object in the parsed result,
153
- * based on the provided `flags` configuration object T.
154
- *
155
- * @template T The type of the flags configuration object.
156
- */
157
- type InferFlags<T extends FlagsDefinition> = Prettify<_InferFlags<T>>;
158
- //#endregion
159
- //#region ../parser/src/iterator.d.ts
160
- declare const KNOWN_FLAG = "known-flag";
161
- declare const UNKNOWN_FLAG = "unknown-flag";
162
- declare const PARAMETER = "parameter";
163
- //#endregion
164
- //#region ../parser/src/parse.d.ts
165
- declare const DOUBLE_DASH = "--";
166
- type ParseFunction<T extends FlagsDefinition> = (args: string[]) => ParsedResult<InferFlags<T>>;
167
- declare function createParser<T extends FlagsDefinition>(options?: ParserOptions<T>): {
168
- parse: ParseFunction<T>;
169
- };
170
- declare const parse: <T extends FlagsDefinition>(args: string[], options?: ParserOptions<T>) => ParsedResult<InferFlags<T>>;
171
- declare namespace index_d_exports {
172
- export { BaseFlagOptions, DOUBLE_DASH, FlagDefaultValue, FlagDefaultValueFunction, FlagDefinitionValue, FlagOptions, FlagsDefinition, IgnoreFunction, InferFlags, InvalidSchemaError, KNOWN_FLAG, ObjectInputType, PARAMETER, ParsedResult, ParserOptions, RawInputType, TypeFunction, TypeValue, UNKNOWN_FLAG, createParser, parse };
173
- }
174
- //#endregion
1
+ import * as Parser from "@clerc/parser";
2
+ import { DOUBLE_DASH, FlagOptions, IgnoreFunction, InferFlags, InvalidSchemaError, KNOWN_FLAG, PARAMETER, ParsedResult, TypeFunction, TypeValue, UNKNOWN_FLAG } from "@clerc/parser";
3
+ import { CamelCase, DeepPrettify, LiteralUnion, MaybeArray, PartialRequired, Prettify, UnionToIntersection } from "@clerc/utils";
4
+
175
5
  //#region ../advanced-types/src/errors.d.ts
176
6
  declare class FlagValidationError extends Error {}
177
- declare namespace index_d_exports$1 {
7
+ declare namespace index_d_exports {
178
8
  export { Enum, FlagValidationError, Range, Regex };
179
9
  }
180
10
  /**
181
11
  * Creates a Enum type function that validates the input against allowed values.
182
- * The display name will be formatted as "value1 | value2 | ..." for help output.
183
- *
184
- * @param values - Array of allowed string values
185
- * @returns A TypeFunction that validates and returns the input value
186
- * @throws {Error} If the value is not in the allowed values list
12
+ * The display name will be formatted as "value1 | value2 | ..." for help
13
+ * output.
187
14
  *
188
15
  * @example
16
+ *
189
17
  * ```typescript
190
- * const format = Enum(['json', 'yaml', 'xml']);
18
+ * const format = Enum(["json", "yaml", "xml"]);
191
19
  * // Help output will show: json | yaml | xml
192
20
  * ```
21
+ *
22
+ * @param values - Array of allowed string values
23
+ * @returns A TypeFunction that validates and returns the input value
24
+ * @throws {Error} If the value is not in the allowed values list
193
25
  */
194
26
  declare function Enum<T extends string>(...values: T[]): TypeFunction<T>;
195
27
  /**
196
- * Creates a range type function that validates the input is a number within the specified range.
28
+ * Creates a range type function that validates the input is a number within the
29
+ * specified range.
197
30
  *
198
31
  * @param min - The minimum acceptable value (inclusive)
199
32
  * @param max - The maximum acceptable value (inclusive)
200
33
  * @returns A TypeFunction that validates the input value
201
- * @throws {Error} If the value is not a number or is outside the specified range
34
+ * @throws {Error} If the value is not a number or is outside the specified
35
+ * range
202
36
  */
203
37
  declare function Range(min: number, max: number): TypeFunction<number>;
204
38
  /**
205
- * Creates a regex type function that validates the input against the provided pattern.
39
+ * Creates a regex type function that validates the input against the provided
40
+ * pattern.
206
41
  *
207
42
  * @param pattern - The regular expression pattern to validate against
208
43
  * @param description - Optional description for display purposes
@@ -224,7 +59,7 @@ type ClercFlagsDefinition = Record<string, ClercFlagDefinitionValue>;
224
59
  //#endregion
225
60
  //#region src/types/parameter.d.ts
226
61
  interface ParameterCustomOptions {}
227
- type InferStringParameter<T extends string, Type$1 = string> = T extends `<${infer Name extends string}...>` | `[${infer Name extends string}...]` ? Record<CamelCase<Name>, Type$1[]> : T extends `<${infer Name extends string}>` ? Record<CamelCase<Name>, Type$1> : T extends `[${infer Name extends string}]` ? Record<CamelCase<Name>, Type$1 | undefined> : never;
62
+ type InferStringParameter<T extends string, Type = string> = T extends `<${infer Name extends string}...>` | `[${infer Name extends string}...]` ? Record<CamelCase<Name>, Type[]> : T extends `<${infer Name extends string}>` ? Record<CamelCase<Name>, Type> : T extends `[${infer Name extends string}]` ? Record<CamelCase<Name>, Type | undefined> : never;
228
63
  type InferParameter<T extends ParameterDefinitionValue> = T extends string ? InferStringParameter<T> : T extends ParameterOptions ? T["type"] extends TypeFunction<infer U> ? InferStringParameter<T["key"], U> : InferStringParameter<T["key"]> : never;
229
64
  type InferParameters<T extends readonly ParameterDefinitionValue[]> = T extends readonly (infer U extends ParameterDefinitionValue)[] ? Prettify<UnionToIntersection<InferParameter<U>>> : never;
230
65
  type ParameterOptions = {
@@ -256,7 +91,8 @@ interface CommandOptions<Parameters extends readonly ParameterDefinitionValue[]
256
91
  parameters?: Parameters;
257
92
  flags?: Flags;
258
93
  /**
259
- * A callback function to conditionally stop parsing. When it returns true, parsing stops and remaining arguments are preserved in ignored.
94
+ * A callback function to conditionally stop parsing. When it returns true,
95
+ * parsing stops and remaining arguments are preserved in ignored.
260
96
  */
261
97
  ignore?: IgnoreFunction;
262
98
  }
@@ -278,8 +114,7 @@ type CommandHandler<C extends Command = Command, GF extends ClercFlagsDefinition
278
114
  //#region src/types/interceptor.d.ts
279
115
  type InterceptorContext<C extends Command = Command, GF extends ClercFlagsDefinition = {}> = DeepPrettify<BaseContext<C, GF>>;
280
116
  /**
281
- * Function to call the next interceptor in the chain.
282
- * **MUST** be awaited.
117
+ * Function to call the next interceptor in the chain. **MUST** be awaited.
283
118
  */
284
119
  type InterceptorNext = () => void | Promise<void>;
285
120
  type InterceptorHandler<C extends Command = Command, GF extends ClercFlagsDefinition = {}> = (context: InterceptorContext<C, GF>, next: InterceptorNext) => void | Promise<void>;
@@ -375,4 +210,4 @@ declare const definePlugin: (plugin: Plugin) => Plugin;
375
210
  declare const normalizeFlagValue: (flag: ClercFlagDefinitionValue) => ClercFlagOptions;
376
211
  declare const normalizeParameterValue: (parameter: ParameterDefinitionValue) => ParameterOptions;
377
212
  //#endregion
378
- export { BaseContext, Clerc, ClercFlagDefinitionValue, ClercFlagOptions, ClercFlagsDefinition, Command, CommandCustomOptions, CommandHandler, CommandHandlerContext, CommandOptions, CommandWithHandler, CommandsMap, CommandsRecord, ContextStore, type CreateOptions, DOUBLE_DASH, ErrorHandler, FlagCustomOptions, InferParameters, Interceptor, InterceptorContext, InterceptorHandler, InterceptorNext, InterceptorObject, InvalidCommandError, InvalidParametersError, InvalidSchemaError, KNOWN_FLAG, MakeEmitterEvents, MissingRequiredFlagError, MissingRequiredMetadataError, NoCommandSpecifiedError, NoSuchCommandError, PARAMETER, ParameterCustomOptions, ParameterDefinitionValue, ParameterOptions, type ParseOptions, type index_d_exports as Parser, Plugin, index_d_exports$1 as Types, UNKNOWN_FLAG, createStopAtFirstParameter, defineCommand, definePlugin, extractParameterInfo, normalizeFlagValue, normalizeParameterValue, resolveCommand };
213
+ export { BaseContext, Clerc, ClercFlagDefinitionValue, ClercFlagOptions, ClercFlagsDefinition, Command, CommandCustomOptions, CommandHandler, CommandHandlerContext, CommandOptions, CommandWithHandler, CommandsMap, CommandsRecord, ContextStore, type CreateOptions, DOUBLE_DASH, ErrorHandler, FlagCustomOptions, InferParameters, Interceptor, InterceptorContext, InterceptorHandler, InterceptorNext, InterceptorObject, InvalidCommandError, InvalidParametersError, InvalidSchemaError, KNOWN_FLAG, MakeEmitterEvents, MissingRequiredFlagError, MissingRequiredMetadataError, NoCommandSpecifiedError, NoSuchCommandError, PARAMETER, ParameterCustomOptions, ParameterDefinitionValue, ParameterOptions, type ParseOptions, type Parser, Plugin, index_d_exports as Types, UNKNOWN_FLAG, createStopAtFirstParameter, defineCommand, definePlugin, extractParameterInfo, normalizeFlagValue, normalizeParameterValue, resolveCommand };
@@ -1,29 +1,78 @@
1
- import * as Types from "@clerc/advanced-types";
1
+ import { t as __exportAll } from "./chunk-15K8U1wQ.mjs";
2
2
  import { DOUBLE_DASH, DOUBLE_DASH as DOUBLE_DASH$1, InvalidSchemaError, KNOWN_FLAG, PARAMETER, PARAMETER as PARAMETER$1, UNKNOWN_FLAG, parse } from "@clerc/parser";
3
+ import { camelCase, looseIsArray, toArray } from "@clerc/utils";
3
4
  import { LiteEmit } from "lite-emit";
4
5
 
5
- //#region ../utils/src/index.ts
6
- const looseIsArray = (arr) => Array.isArray(arr);
7
- const toArray = (a) => Array.isArray(a) ? a : [a];
6
+ //#region ../advanced-types/src/errors.ts
7
+ var FlagValidationError = class extends Error {};
8
+
9
+ //#endregion
10
+ //#region ../advanced-types/src/index.ts
11
+ var src_exports = /* @__PURE__ */ __exportAll({
12
+ Enum: () => Enum,
13
+ FlagValidationError: () => FlagValidationError,
14
+ Range: () => Range,
15
+ Regex: () => Regex
16
+ });
8
17
  /**
9
- * Converts a dash- or space-separated string to camelCase.
10
- * Not using regexp for better performance, because this function is used in parser.
18
+ * Creates a Enum type function that validates the input against allowed values.
19
+ * The display name will be formatted as "value1 | value2 | ..." for help
20
+ * output.
21
+ *
22
+ * @example
23
+ *
24
+ * ```typescript
25
+ * const format = Enum(["json", "yaml", "xml"]);
26
+ * // Help output will show: json | yaml | xml
27
+ * ```
28
+ *
29
+ * @param values - Array of allowed string values
30
+ * @returns A TypeFunction that validates and returns the input value
31
+ * @throws {Error} If the value is not in the allowed values list
11
32
  */
12
- function camelCase(str) {
13
- const firstIdx = Math.min(str.includes("-") ? str.indexOf("-") : Infinity, str.includes(" ") ? str.indexOf(" ") : Infinity);
14
- if (firstIdx === Infinity) return str;
15
- let result = str.slice(0, firstIdx);
16
- for (let i = firstIdx; i < str.length; i++) if ((str[i] === "-" || str[i] === " ") && i + 1 < str.length) {
17
- const nextChar = str.charCodeAt(i + 1);
18
- if (nextChar >= 97 && nextChar <= 122) {
19
- result += String.fromCharCode(nextChar - 32);
20
- i++;
21
- } else {
22
- result += str[i + 1];
23
- i++;
24
- }
25
- } else if (str[i] !== "-" && str[i] !== " ") result += str[i];
26
- return result;
33
+ function Enum(...values) {
34
+ const fn = ((value) => {
35
+ if (!values.includes(value)) throw new FlagValidationError(`Invalid value: ${value}. Must be one of: ${values.join(", ")}`);
36
+ return value;
37
+ });
38
+ fn.display = values.join(" | ");
39
+ return fn;
40
+ }
41
+ /**
42
+ * Creates a range type function that validates the input is a number within the
43
+ * specified range.
44
+ *
45
+ * @param min - The minimum acceptable value (inclusive)
46
+ * @param max - The maximum acceptable value (inclusive)
47
+ * @returns A TypeFunction that validates the input value
48
+ * @throws {Error} If the value is not a number or is outside the specified
49
+ * range
50
+ */
51
+ function Range(min, max) {
52
+ const fn = ((value) => {
53
+ const num = Number(value);
54
+ if (Number.isNaN(num) || num < min || num > max) throw new FlagValidationError(`Invalid value: ${value}. Must be a number between ${min} and ${max}`);
55
+ return num;
56
+ });
57
+ fn.display = `${min} - ${max}`;
58
+ return fn;
59
+ }
60
+ /**
61
+ * Creates a regex type function that validates the input against the provided
62
+ * pattern.
63
+ *
64
+ * @param pattern - The regular expression pattern to validate against
65
+ * @param description - Optional description for display purposes
66
+ * @returns A TypeFunction that validates the input value
67
+ * @throws {Error} If the value does not match the regex pattern
68
+ */
69
+ function Regex(pattern, description) {
70
+ const fn = ((value) => {
71
+ if (!pattern.test(value)) throw new FlagValidationError(`Invalid value: ${value}. Must match pattern: ${pattern}`);
72
+ return value;
73
+ });
74
+ fn.display = description ?? `Regex: ${pattern.toString()}`;
75
+ return fn;
27
76
  }
28
77
 
29
78
  //#endregion
@@ -371,4 +420,4 @@ function createStopAtFirstParameter() {
371
420
  const definePlugin = (plugin) => plugin;
372
421
 
373
422
  //#endregion
374
- export { Clerc, DOUBLE_DASH, InvalidCommandError, InvalidParametersError, InvalidSchemaError, KNOWN_FLAG, MissingRequiredFlagError, MissingRequiredMetadataError, NoCommandSpecifiedError, NoSuchCommandError, PARAMETER, Types, UNKNOWN_FLAG, createStopAtFirstParameter, defineCommand, definePlugin, extractParameterInfo, normalizeFlagValue, normalizeParameterValue, resolveCommand };
423
+ export { Clerc, DOUBLE_DASH, InvalidCommandError, InvalidParametersError, InvalidSchemaError, KNOWN_FLAG, MissingRequiredFlagError, MissingRequiredMetadataError, NoCommandSpecifiedError, NoSuchCommandError, PARAMETER, src_exports as Types, UNKNOWN_FLAG, createStopAtFirstParameter, defineCommand, definePlugin, extractParameterInfo, normalizeFlagValue, normalizeParameterValue, resolveCommand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/core",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "type": "module",
6
6
  "description": "Clerc core",
@@ -24,19 +24,12 @@
24
24
  "license": "MIT",
25
25
  "sideEffects": false,
26
26
  "exports": {
27
- ".": "./dist/index.js"
28
- },
29
- "main": "./dist/index.js",
30
- "module": "./dist/index.js",
31
- "types": "dist/index.d.ts",
32
- "typesVersions": {
33
- "*": {
34
- "*": [
35
- "./dist/*",
36
- "./dist/index.d.ts"
37
- ]
38
- }
27
+ ".": "./dist/index.mjs",
28
+ "./package.json": "./package.json"
39
29
  },
30
+ "main": "./dist/index.mjs",
31
+ "module": "./dist/index.mjs",
32
+ "types": "./dist/index.d.mts",
40
33
  "files": [
41
34
  "dist"
42
35
  ],
@@ -45,11 +38,11 @@
45
38
  },
46
39
  "dependencies": {
47
40
  "lite-emit": "^4.0.0",
48
- "@clerc/advanced-types": "1.0.2",
49
- "@clerc/parser": "1.0.2"
41
+ "@clerc/parser": "1.1.0",
42
+ "@clerc/utils": "1.1.0"
50
43
  },
51
44
  "devDependencies": {
52
45
  "is-platform": "^1.0.0",
53
- "@clerc/utils": "1.0.2"
46
+ "@clerc/advanced-types": "1.1.0"
54
47
  }
55
48
  }