eslint-plugin-package-json 1.5.0 → 1.6.1
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 +107 -106
- package/{lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/definitions/jsonSchema.d.mts → dist/createRule-29pC9RoP.d.mts} +49 -4
- package/dist/experimental/index.d.mts +68 -0
- package/{lib/experimental/plugin.mjs → dist/experimental/index.mjs} +10 -5
- package/dist/index.d.mts +99 -0
- package/{lib → dist}/index.mjs +1 -1
- package/dist/plugin-C-Z8sf5g.mjs +1737 -0
- package/package.json +33 -27
- package/lib/createRule.d.mts +0 -59
- package/lib/createRule.mjs +0 -24
- package/lib/experimental/index.d.mts +0 -34
- package/lib/experimental/index.mjs +0 -7
- package/lib/experimental/plugin.d.mts +0 -40
- package/lib/index.d.mts +0 -49
- package/lib/node_modules/.pnpm/@types_estree@1.0.8/node_modules/@types/estree/index.d.mts +0 -438
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/definitions/deserializationPattern.d.mts +0 -7
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/definitions/fromSchemaOptions.d.mts +0 -20
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/index.d.mts +0 -11
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-options.d.mts +0 -16
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/allOf.d.mts +0 -13
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/anyOf.d.mts +0 -14
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/array.d.mts +0 -58
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/const.d.mts +0 -14
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/deserialize.d.mts +0 -13
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/enum.d.mts +0 -14
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/ifThenElse.d.mts +0 -20
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/index.d.mts +0 -34
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/multipleTypes.d.mts +0 -14
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/not.d.mts +0 -20
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/nullable.d.mts +0 -14
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/object.d.mts +0 -34
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/oneOf.d.mts +0 -14
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/external.d.mts +0 -22
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/index.d.mts +0 -13
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/internal.d.mts +0 -8
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/utils.d.mts +0 -12
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/singleType.d.mts +0 -24
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/utils.d.mts +0 -20
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/and.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/extends.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/get.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/join.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/not.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/pop.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/split.d.mts +0 -7
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/tail.d.mts +0 -4
- package/lib/node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/writable.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/any.d.mts +0 -20
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/array.d.mts +0 -28
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/const.d.mts +0 -25
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/enum.d.mts +0 -25
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/any.d.mts +0 -16
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/array.d.mts +0 -20
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/const.d.mts +0 -28
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/enum.d.mts +0 -23
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/index.d.mts +0 -24
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/object.d.mts +0 -44
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/primitive.d.mts +0 -16
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/tuple.d.mts +0 -43
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/union.d.mts +0 -13
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/utils.d.mts +0 -35
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/any.d.mts +0 -23
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/array.d.mts +0 -24
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/const.d.mts +0 -34
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/enum.d.mts +0 -26
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/index.d.mts +0 -24
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/object.d.mts +0 -25
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/primitive.d.mts +0 -23
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/tuple.d.mts +0 -26
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/union.d.mts +0 -17
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/utils.d.mts +0 -10
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/never.d.mts +0 -9
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/object.d.mts +0 -49
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/primitive.d.mts +0 -26
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/resolve.d.mts +0 -22
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/tuple.d.mts +0 -36
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/type.d.mts +0 -18
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/union.d.mts +0 -23
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/utils.d.mts +0 -7
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/and.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/extends.d.mts +0 -7
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/if.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/intersectUnion.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/isNever.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/merge.d.mts +0 -6
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/not.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/or.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/prettify.d.mts +0 -6
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/tail.d.mts +0 -4
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/unionLast.d.mts +0 -6
- package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/utils/unionPop.d.mts +0 -6
- package/lib/plugin.d.mts +0 -56
- package/lib/plugin.mjs +0 -93
- package/lib/rules/bin-name-casing.d.mts +0 -6
- package/lib/rules/bin-name-casing.mjs +0 -41
- package/lib/rules/exports-subpaths-style.d.mts +0 -18
- package/lib/rules/exports-subpaths-style.mjs +0 -71
- package/lib/rules/no-empty-fields.d.mts +0 -20
- package/lib/rules/no-empty-fields.mjs +0 -90
- package/lib/rules/no-local-dependencies.d.mts +0 -17
- package/lib/rules/no-local-dependencies.mjs +0 -47
- package/lib/rules/no-redundant-files.d.mts +0 -6
- package/lib/rules/no-redundant-files.mjs +0 -100
- package/lib/rules/no-redundant-publishConfig.d.mts +0 -6
- package/lib/rules/no-redundant-publishConfig.mjs +0 -50
- package/lib/rules/order-properties.d.mts +0 -25
- package/lib/rules/order-properties.mjs +0 -64
- package/lib/rules/repository-shorthand.d.mts +0 -18
- package/lib/rules/repository-shorthand.mjs +0 -111
- package/lib/rules/require-attribution.d.mts +0 -22
- package/lib/rules/require-attribution.mjs +0 -91
- package/lib/rules/require-properties.d.mts +0 -22
- package/lib/rules/require-properties.mjs +0 -74
- package/lib/rules/restrict-dependency-ranges.d.mts +0 -92
- package/lib/rules/restrict-dependency-ranges.mjs +0 -147
- package/lib/rules/restrict-private-properties.d.mts +0 -20
- package/lib/rules/restrict-private-properties.mjs +0 -53
- package/lib/rules/restrict-top-level-properties.d.mts +0 -39
- package/lib/rules/restrict-top-level-properties.mjs +0 -73
- package/lib/rules/scripts-name-casing.d.mts +0 -6
- package/lib/rules/scripts-name-casing.mjs +0 -44
- package/lib/rules/sort-collections.d.mts +0 -35
- package/lib/rules/sort-collections.mjs +0 -111
- package/lib/rules/specify-peers-locally.d.mts +0 -6
- package/lib/rules/specify-peers-locally.mjs +0 -63
- package/lib/rules/unique-dependencies.d.mts +0 -6
- package/lib/rules/unique-dependencies.mjs +0 -87
- package/lib/rules/valid-author.d.mts +0 -6
- package/lib/rules/valid-author.mjs +0 -59
- package/lib/rules/valid-peerDependenciesMeta-relationship.d.mts +0 -6
- package/lib/rules/valid-peerDependenciesMeta-relationship.mjs +0 -50
- package/lib/rules/valid-properties.d.mts +0 -9
- package/lib/rules/valid-properties.mjs +0 -57
- package/lib/rules/valid-repository-directory.d.mts +0 -6
- package/lib/rules/valid-repository-directory.mjs +0 -73
- package/lib/types/estree.d.mts +0 -8
- package/lib/utils/createSimpleRequirePropertyRule.d.mts +0 -48
- package/lib/utils/createSimpleRequirePropertyRule.mjs +0 -62
- package/lib/utils/createSimpleValidPropertyRule.d.mts +0 -17
- package/lib/utils/createSimpleValidPropertyRule.mjs +0 -57
- package/lib/utils/findPropertyWithKeyValue.d.mts +0 -10
- package/lib/utils/findPropertyWithKeyValue.mjs +0 -6
- package/lib/utils/formatErrors.d.mts +0 -9
- package/lib/utils/formatErrors.mjs +0 -12
- package/lib/utils/git/getGitAuthor.d.mts +0 -8
- package/lib/utils/git/getGitAuthor.mjs +0 -29
- package/lib/utils/git/index.d.mts +0 -2
- package/lib/utils/git/index.mjs +0 -2
- package/lib/utils/predicates/index.d.mts +0 -4
- package/lib/utils/predicates/index.mjs +0 -4
- package/lib/utils/predicates/isJSONStringLiteral.d.mts +0 -6
- package/lib/utils/predicates/isJSONStringLiteral.mjs +0 -6
- package/lib/utils/predicates/isNotNullish.d.mts +0 -4
- package/lib/utils/predicates/isNotNullish.mjs +0 -6
- package/lib/utils/predicates/isPackageJson.d.mts +0 -4
- package/lib/utils/predicates/isPackageJson.mjs +0 -4
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Never } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/never.mjs";
|
|
2
|
-
import { Any } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/any.mjs";
|
|
3
|
-
import { $Intersect } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/index.mjs";
|
|
4
|
-
import { DeserializationPattern } from "../definitions/deserializationPattern.mjs";
|
|
5
|
-
import { JSONSchema } from "../definitions/jsonSchema.mjs";
|
|
6
|
-
import { And } from "../type-utils/and.mjs";
|
|
7
|
-
import { DoesExtend } from "../type-utils/extends.mjs";
|
|
8
|
-
import { AllOfSchema, ParseAllOfSchema } from "./allOf.mjs";
|
|
9
|
-
import { AnyOfSchema, ParseAnyOfSchema } from "./anyOf.mjs";
|
|
10
|
-
import { ConstSchema, ParseConstSchema } from "./const.mjs";
|
|
11
|
-
import { DeserializeSchema } from "./deserialize.mjs";
|
|
12
|
-
import { EnumSchema, ParseEnumSchema } from "./enum.mjs";
|
|
13
|
-
import { IfThenElseSchema, ParseIfThenElseSchema } from "./ifThenElse.mjs";
|
|
14
|
-
import { MultipleTypesSchema, ParseMultipleTypesSchema } from "./multipleTypes.mjs";
|
|
15
|
-
import { NotSchema, ParseNotSchema } from "./not.mjs";
|
|
16
|
-
import { NullableSchema, ParseNullableSchema } from "./nullable.mjs";
|
|
17
|
-
import { OneOfSchema, ParseOneOfSchema } from "./oneOf.mjs";
|
|
18
|
-
import { ParseReferenceSchema, ReferencingSchema } from "./references/index.mjs";
|
|
19
|
-
import { ParseSingleTypeSchema, SingleTypeSchema } from "./singleType.mjs";
|
|
20
|
-
|
|
21
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/index.d.ts
|
|
22
|
-
type ParseSchemaOptions = {
|
|
23
|
-
parseNotKeyword: boolean;
|
|
24
|
-
parseIfThenElseKeywords: boolean;
|
|
25
|
-
keepDefaultedPropertiesOptional: boolean;
|
|
26
|
-
rootSchema: JSONSchema;
|
|
27
|
-
references: Record<string, JSONSchema>;
|
|
28
|
-
deserialize: DeserializationPattern[] | false;
|
|
29
|
-
};
|
|
30
|
-
type ParseSchema<SCHEMA extends JSONSchema, OPTIONS extends ParseSchemaOptions, RESULT = (JSONSchema extends SCHEMA ? Any : SCHEMA extends true | string ? Any : SCHEMA extends false ? Never : SCHEMA extends NullableSchema ? ParseNullableSchema<SCHEMA, OPTIONS> : SCHEMA extends ReferencingSchema ? ParseReferenceSchema<SCHEMA, OPTIONS> : And<DoesExtend<OPTIONS["parseIfThenElseKeywords"], true>, DoesExtend<SCHEMA, IfThenElseSchema>> extends true ? SCHEMA extends IfThenElseSchema ? ParseIfThenElseSchema<SCHEMA, OPTIONS> : never : And<DoesExtend<OPTIONS["parseNotKeyword"], true>, DoesExtend<SCHEMA, NotSchema>> extends true ? SCHEMA extends NotSchema ? ParseNotSchema<SCHEMA, OPTIONS> : never : SCHEMA extends AllOfSchema ? ParseAllOfSchema<SCHEMA, OPTIONS> : SCHEMA extends OneOfSchema ? ParseOneOfSchema<SCHEMA, OPTIONS> : SCHEMA extends AnyOfSchema ? ParseAnyOfSchema<SCHEMA, OPTIONS> : SCHEMA extends EnumSchema ? ParseEnumSchema<SCHEMA, OPTIONS> : SCHEMA extends ConstSchema ? ParseConstSchema<SCHEMA, OPTIONS> : SCHEMA extends MultipleTypesSchema ? ParseMultipleTypesSchema<SCHEMA, OPTIONS> : SCHEMA extends SingleTypeSchema ? ParseSingleTypeSchema<SCHEMA, OPTIONS> : Any)> = OPTIONS extends {
|
|
31
|
-
deserialize: DeserializationPattern[];
|
|
32
|
-
} ? $Intersect<DeserializeSchema<SCHEMA, OPTIONS>, RESULT> : RESULT;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { ParseSchema, ParseSchemaOptions };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { $Union } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/union.mjs";
|
|
2
|
-
import { JSONSchema, JSONSchemaType } from "../definitions/jsonSchema.mjs";
|
|
3
|
-
import { ParseSchema, ParseSchemaOptions } from "./index.mjs";
|
|
4
|
-
|
|
5
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/multipleTypes.d.ts
|
|
6
|
-
type MultipleTypesSchema = JSONSchema & Readonly<{
|
|
7
|
-
type: readonly JSONSchemaType[];
|
|
8
|
-
}>;
|
|
9
|
-
type ParseMultipleTypesSchema<MULTI_TYPE_SCHEMA extends MultipleTypesSchema, OPTIONS extends ParseSchemaOptions> = $Union<RecurseOnMixedSchema<MULTI_TYPE_SCHEMA["type"], MULTI_TYPE_SCHEMA, OPTIONS>>;
|
|
10
|
-
type RecurseOnMixedSchema<TYPES extends readonly JSONSchemaType[], ROOT_MULTI_TYPE_SCHEMA extends MultipleTypesSchema, OPTIONS extends ParseSchemaOptions, RESULT = never> = TYPES extends readonly [infer TYPES_HEAD, ...infer TYPES_TAIL] ? TYPES_HEAD extends JSONSchemaType ? TYPES_TAIL extends readonly JSONSchemaType[] ? RecurseOnMixedSchema<TYPES_TAIL, ROOT_MULTI_TYPE_SCHEMA, OPTIONS, RESULT | ParseSchema<Omit<ROOT_MULTI_TYPE_SCHEMA, "type"> & {
|
|
11
|
-
type: TYPES_HEAD;
|
|
12
|
-
}, OPTIONS>> : never : never : RESULT;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { MultipleTypesSchema, ParseMultipleTypesSchema };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Never } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/never.mjs";
|
|
2
|
-
import { _Object } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/object.mjs";
|
|
3
|
-
import { Primitive } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/primitive.mjs";
|
|
4
|
-
import { Union } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/union.mjs";
|
|
5
|
-
import { _Array } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/array.mjs";
|
|
6
|
-
import { Any, AnyType } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/any.mjs";
|
|
7
|
-
import { $Intersect } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/index.mjs";
|
|
8
|
-
import { _$Exclude } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/index.mjs";
|
|
9
|
-
import { JSONSchema } from "../definitions/jsonSchema.mjs";
|
|
10
|
-
import { MergeSubSchema } from "./utils.mjs";
|
|
11
|
-
import { ParseSchema, ParseSchemaOptions } from "./index.mjs";
|
|
12
|
-
|
|
13
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/not.d.ts
|
|
14
|
-
type NotSchema = JSONSchema & Readonly<{
|
|
15
|
-
not: JSONSchema;
|
|
16
|
-
}>;
|
|
17
|
-
type AllTypes = Union<Primitive<null> | Primitive<boolean> | Primitive<number> | Primitive<string> | _Array | _Object<{}, never, Any>>;
|
|
18
|
-
type ParseNotSchema<NOT_SCHEMA extends NotSchema, OPTIONS extends ParseSchemaOptions, PARSED_REST_SCHEMA = ParseSchema<Omit<NOT_SCHEMA, "not">, OPTIONS>, EXCLUSION = _$Exclude<PARSED_REST_SCHEMA extends AnyType ? $Intersect<AllTypes, PARSED_REST_SCHEMA> : PARSED_REST_SCHEMA, ParseSchema<MergeSubSchema<Omit<NOT_SCHEMA, "not">, NOT_SCHEMA["not"]>, OPTIONS>>> = EXCLUSION extends Never ? PARSED_REST_SCHEMA : EXCLUSION;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { NotSchema, ParseNotSchema };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Primitive } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/primitive.mjs";
|
|
2
|
-
import { $Union } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/union.mjs";
|
|
3
|
-
import { JSONSchema } from "../definitions/jsonSchema.mjs";
|
|
4
|
-
import { ParseSchema, ParseSchemaOptions } from "./index.mjs";
|
|
5
|
-
|
|
6
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/nullable.d.ts
|
|
7
|
-
type NullableSchema = JSONSchema & Readonly<{
|
|
8
|
-
nullable: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
type ParseNullableSchema<NULLABLE_SCHEMA extends NullableSchema, OPTIONS extends ParseSchemaOptions, PARSED_REST_SCHEMA = ParseSchema<Omit<NULLABLE_SCHEMA, "nullable">, OPTIONS>> = NULLABLE_SCHEMA extends Readonly<{
|
|
11
|
-
nullable: true;
|
|
12
|
-
}> ? $Union<Primitive<null> | PARSED_REST_SCHEMA> : PARSED_REST_SCHEMA;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { NullableSchema, ParseNullableSchema };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { _$Object } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/object.mjs";
|
|
2
|
-
import { $Union } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/union.mjs";
|
|
3
|
-
import { Any } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/any.mjs";
|
|
4
|
-
import { JSONSchema } from "../definitions/jsonSchema.mjs";
|
|
5
|
-
import { ParseSchema, ParseSchemaOptions } from "./index.mjs";
|
|
6
|
-
|
|
7
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/object.d.ts
|
|
8
|
-
type ObjectSchema = JSONSchema & Readonly<{
|
|
9
|
-
type: "object";
|
|
10
|
-
}>;
|
|
11
|
-
type ParseObjectSchema<OBJECT_SCHEMA extends ObjectSchema, OPTIONS extends ParseSchemaOptions> = OBJECT_SCHEMA extends Readonly<{
|
|
12
|
-
properties: Readonly<Record<string, JSONSchema>>;
|
|
13
|
-
}> ? _$Object<{ [KEY in keyof OBJECT_SCHEMA["properties"]]: ParseSchema<OBJECT_SCHEMA["properties"][KEY], OPTIONS> }, GetRequired<OBJECT_SCHEMA, OPTIONS>, GetOpenProps<OBJECT_SCHEMA, OPTIONS>, GetClosedOnResolve<OBJECT_SCHEMA>> : _$Object<{}, GetRequired<OBJECT_SCHEMA, OPTIONS>, GetOpenProps<OBJECT_SCHEMA, OPTIONS>, GetClosedOnResolve<OBJECT_SCHEMA>>;
|
|
14
|
-
type GetRequired<OBJECT_SCHEMA extends ObjectSchema, OPTIONS extends ParseSchemaOptions> = (OBJECT_SCHEMA extends Readonly<{
|
|
15
|
-
required: ReadonlyArray<string>;
|
|
16
|
-
}> ? OBJECT_SCHEMA["required"][number] : never) | (OPTIONS["keepDefaultedPropertiesOptional"] extends true ? never : OBJECT_SCHEMA extends Readonly<{
|
|
17
|
-
properties: Readonly<Record<string, JSONSchema>>;
|
|
18
|
-
}> ? { [KEY in keyof OBJECT_SCHEMA["properties"] & string]: OBJECT_SCHEMA["properties"][KEY] extends Readonly<{
|
|
19
|
-
default: unknown;
|
|
20
|
-
}> ? KEY : never }[keyof OBJECT_SCHEMA["properties"] & string] : never);
|
|
21
|
-
type GetOpenProps<OBJECT_SCHEMA extends ObjectSchema, OPTIONS extends ParseSchemaOptions> = OBJECT_SCHEMA extends Readonly<{
|
|
22
|
-
additionalProperties: JSONSchema;
|
|
23
|
-
}> ? OBJECT_SCHEMA extends Readonly<{
|
|
24
|
-
patternProperties: Record<string, JSONSchema>;
|
|
25
|
-
}> ? AdditionalAndPatternProps<OBJECT_SCHEMA["additionalProperties"], OBJECT_SCHEMA["patternProperties"], OPTIONS> : ParseSchema<OBJECT_SCHEMA["additionalProperties"], OPTIONS> : OBJECT_SCHEMA extends Readonly<{
|
|
26
|
-
patternProperties: Record<string, JSONSchema>;
|
|
27
|
-
}> ? PatternProps<OBJECT_SCHEMA["patternProperties"], OPTIONS> : Any;
|
|
28
|
-
type GetClosedOnResolve<OBJECT_SCHEMA extends ObjectSchema> = OBJECT_SCHEMA extends Readonly<{
|
|
29
|
-
unevaluatedProperties: false;
|
|
30
|
-
}> ? true : false;
|
|
31
|
-
type PatternProps<PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema>>, OPTIONS extends ParseSchemaOptions> = $Union<{ [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS> }[keyof PATTERN_PROPERTY_SCHEMAS]>;
|
|
32
|
-
type AdditionalAndPatternProps<ADDITIONAL_PROPERTIES_SCHEMA extends JSONSchema, PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema>>, OPTIONS extends ParseSchemaOptions> = ADDITIONAL_PROPERTIES_SCHEMA extends boolean ? PatternProps<PATTERN_PROPERTY_SCHEMAS, OPTIONS> : $Union<ParseSchema<ADDITIONAL_PROPERTIES_SCHEMA, OPTIONS> | { [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS> }[keyof PATTERN_PROPERTY_SCHEMAS]>;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { ObjectSchema, ParseObjectSchema };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { $Union } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/union.mjs";
|
|
2
|
-
import { $Intersect } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/index.mjs";
|
|
3
|
-
import { JSONSchema } from "../definitions/jsonSchema.mjs";
|
|
4
|
-
import { MergeSubSchema } from "./utils.mjs";
|
|
5
|
-
import { ParseSchema, ParseSchemaOptions } from "./index.mjs";
|
|
6
|
-
|
|
7
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/oneOf.d.ts
|
|
8
|
-
type OneOfSchema = JSONSchema & Readonly<{
|
|
9
|
-
oneOf: readonly JSONSchema[];
|
|
10
|
-
}>;
|
|
11
|
-
type ParseOneOfSchema<ONE_OF_SCHEMA extends OneOfSchema, OPTIONS extends ParseSchemaOptions> = $Union<RecurseOnOneOfSchema<ONE_OF_SCHEMA["oneOf"], ONE_OF_SCHEMA, OPTIONS>>;
|
|
12
|
-
type RecurseOnOneOfSchema<SUB_SCHEMAS extends readonly JSONSchema[], ROOT_ONE_OF_SCHEMA extends OneOfSchema, OPTIONS extends ParseSchemaOptions, RESULT = never> = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema ? SUB_SCHEMAS_TAIL extends readonly JSONSchema[] ? RecurseOnOneOfSchema<SUB_SCHEMAS_TAIL, ROOT_ONE_OF_SCHEMA, OPTIONS, RESULT | $Intersect<ParseSchema<Omit<ROOT_ONE_OF_SCHEMA, "oneOf">, OPTIONS>, ParseSchema<MergeSubSchema<Omit<ROOT_ONE_OF_SCHEMA, "oneOf">, SUB_SCHEMAS_HEAD>, OPTIONS>>> : never : never : RESULT;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { OneOfSchema, ParseOneOfSchema };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Never } from "../../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/never.mjs";
|
|
2
|
-
import { JSONSchema } from "../../definitions/jsonSchema.mjs";
|
|
3
|
-
import { Join } from "../../type-utils/join.mjs";
|
|
4
|
-
import { Pop } from "../../type-utils/pop.mjs";
|
|
5
|
-
import { Split } from "../../type-utils/split.mjs";
|
|
6
|
-
import { ParseReference } from "./utils.mjs";
|
|
7
|
-
import { ReferencingSchema } from "./index.mjs";
|
|
8
|
-
import { ParseSchemaOptions } from "../index.mjs";
|
|
9
|
-
|
|
10
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/external.d.ts
|
|
11
|
-
type ParseExternalReferenceSchema<REF_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, EXTERNAL_REFERENCE_ID extends string, SUB_PATH extends string | undefined> = OPTIONS["references"] extends { [KEY in EXTERNAL_REFERENCE_ID]: JSONSchema } ? ParseReference<Omit<REF_SCHEMA, "$ref">, OPTIONS, OPTIONS["references"][EXTERNAL_REFERENCE_ID], SUB_PATH> : OPTIONS extends {
|
|
12
|
-
rootSchema: IdSchema;
|
|
13
|
-
} ? ParseExternalReferenceWithoutDirectorySchema<Omit<REF_SCHEMA, "$ref">, OPTIONS, EXTERNAL_REFERENCE_ID, SUB_PATH> : Never;
|
|
14
|
-
type ParseDirectory<REFERENCE extends string> = Join<Pop<Split<REFERENCE, "/">>, "/">;
|
|
15
|
-
type IdSchema = JSONSchema & {
|
|
16
|
-
$id: string;
|
|
17
|
-
};
|
|
18
|
-
type ParseExternalReferenceWithoutDirectorySchema<SUB_SCHEMA extends JSONSchema, OPTIONS extends ParseSchemaOptions & {
|
|
19
|
-
rootSchema: IdSchema;
|
|
20
|
-
}, EXTERNAL_REFERENCE_ID extends string, SUB_PATH extends string | undefined, DIRECTORY extends string = ParseDirectory<OPTIONS["rootSchema"]["$id"]>, COMPLETE_REFERENCE extends string = Join<[DIRECTORY, EXTERNAL_REFERENCE_ID], "/">> = COMPLETE_REFERENCE extends keyof OPTIONS["references"] ? ParseReference<SUB_SCHEMA, OPTIONS, OPTIONS["references"][COMPLETE_REFERENCE], SUB_PATH> : Never;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { ParseExternalReferenceSchema };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { JSONSchema } from "../../definitions/jsonSchema.mjs";
|
|
2
|
-
import { Split } from "../../type-utils/split.mjs";
|
|
3
|
-
import { ParseExternalReferenceSchema } from "./external.mjs";
|
|
4
|
-
import { ParseInternalReferenceSchema } from "./internal.mjs";
|
|
5
|
-
import { ParseSchemaOptions } from "../index.mjs";
|
|
6
|
-
|
|
7
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/index.d.ts
|
|
8
|
-
type ReferencingSchema = JSONSchema & {
|
|
9
|
-
$ref: string;
|
|
10
|
-
};
|
|
11
|
-
type ParseReferenceSchema<REFERENCING_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, REFERENCE_ID_AND_PATH extends string[] = Split<REFERENCING_SCHEMA["$ref"], "#">> = REFERENCE_ID_AND_PATH[0] extends "" ? ParseInternalReferenceSchema<REFERENCING_SCHEMA, OPTIONS, REFERENCE_ID_AND_PATH[1]> : ParseExternalReferenceSchema<REFERENCING_SCHEMA, OPTIONS, REFERENCE_ID_AND_PATH[0], REFERENCE_ID_AND_PATH[1]>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { ParseReferenceSchema, ReferencingSchema };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ParseReference } from "./utils.mjs";
|
|
2
|
-
import { ReferencingSchema } from "./index.mjs";
|
|
3
|
-
import { ParseSchemaOptions } from "../index.mjs";
|
|
4
|
-
|
|
5
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/internal.d.ts
|
|
6
|
-
type ParseInternalReferenceSchema<REFERENCING_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, PATH extends string> = ParseReference<Omit<REFERENCING_SCHEMA, "$ref">, OPTIONS, OPTIONS["rootSchema"], PATH>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { ParseInternalReferenceSchema };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { $Intersect } from "../../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/intersection/index.mjs";
|
|
2
|
-
import { JSONSchema } from "../../definitions/jsonSchema.mjs";
|
|
3
|
-
import { DeepGet } from "../../type-utils/get.mjs";
|
|
4
|
-
import { Split } from "../../type-utils/split.mjs";
|
|
5
|
-
import { Tail } from "../../type-utils/tail.mjs";
|
|
6
|
-
import { MergeSubSchema } from "../utils.mjs";
|
|
7
|
-
import { ParseSchema, ParseSchemaOptions } from "../index.mjs";
|
|
8
|
-
|
|
9
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/references/utils.d.ts
|
|
10
|
-
type ParseReference<SCHEMA extends JSONSchema, OPTIONS extends ParseSchemaOptions, REFERENCE_SOURCE extends JSONSchema, PATH_IN_SOURCE extends string | undefined, MATCHING_REFERENCE extends JSONSchema = (PATH_IN_SOURCE extends string ? DeepGet<REFERENCE_SOURCE, Tail<Split<PATH_IN_SOURCE, "/">>, false> : REFERENCE_SOURCE)> = $Intersect<ParseSchema<MATCHING_REFERENCE, OPTIONS>, ParseSchema<MergeSubSchema<MATCHING_REFERENCE, SCHEMA>, OPTIONS>>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { ParseReference };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Never } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/never.mjs";
|
|
2
|
-
import { Primitive } from "../../../../../../ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/primitive.mjs";
|
|
3
|
-
import { JSONSchema, JSONSchemaType } from "../definitions/jsonSchema.mjs";
|
|
4
|
-
import { ArrayOrTupleSchema, ParseArrayOrTupleSchema } from "./array.mjs";
|
|
5
|
-
import { ObjectSchema, ParseObjectSchema } from "./object.mjs";
|
|
6
|
-
import { ParseSchemaOptions } from "./index.mjs";
|
|
7
|
-
|
|
8
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/singleType.d.ts
|
|
9
|
-
type SingleTypeSchema = JSONSchema & Readonly<{
|
|
10
|
-
type: JSONSchemaType;
|
|
11
|
-
}>;
|
|
12
|
-
type ParseSingleTypeSchema<SINGLE_TYPE_SCHEMA extends SingleTypeSchema, OPTIONS extends ParseSchemaOptions> = SINGLE_TYPE_SCHEMA extends Readonly<{
|
|
13
|
-
type: "null";
|
|
14
|
-
}> ? Primitive<null> : SINGLE_TYPE_SCHEMA extends Readonly<{
|
|
15
|
-
type: "boolean";
|
|
16
|
-
}> ? Primitive<boolean> : SINGLE_TYPE_SCHEMA extends Readonly<{
|
|
17
|
-
type: "integer";
|
|
18
|
-
}> ? Primitive<number> : SINGLE_TYPE_SCHEMA extends Readonly<{
|
|
19
|
-
type: "number";
|
|
20
|
-
}> ? Primitive<number> : SINGLE_TYPE_SCHEMA extends Readonly<{
|
|
21
|
-
type: "string";
|
|
22
|
-
}> ? Primitive<string> : SINGLE_TYPE_SCHEMA extends ArrayOrTupleSchema ? ParseArrayOrTupleSchema<SINGLE_TYPE_SCHEMA, OPTIONS> : SINGLE_TYPE_SCHEMA extends ObjectSchema ? ParseObjectSchema<SINGLE_TYPE_SCHEMA, OPTIONS> : Never;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { ParseSingleTypeSchema, SingleTypeSchema };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { JSONSchema } from "../definitions/jsonSchema.mjs";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/parse-schema/utils.d.ts
|
|
4
|
-
type RemoveInvalidAdditionalItems<SCHEMA extends JSONSchema> = SCHEMA extends Readonly<{
|
|
5
|
-
items: JSONSchema | readonly JSONSchema[];
|
|
6
|
-
}> ? SCHEMA extends Readonly<{
|
|
7
|
-
additionalItems: JSONSchema;
|
|
8
|
-
}> ? SCHEMA : SCHEMA & Readonly<{
|
|
9
|
-
additionalItems: true;
|
|
10
|
-
}> : SCHEMA extends boolean ? SCHEMA : Omit<SCHEMA, "additionalItems">;
|
|
11
|
-
type RemoveInvalidAdditionalProperties<SCHEMA extends JSONSchema> = SCHEMA extends Readonly<{
|
|
12
|
-
additionalProperties: JSONSchema;
|
|
13
|
-
}> ? SCHEMA extends Readonly<{
|
|
14
|
-
properties: Readonly<Record<string, JSONSchema>>;
|
|
15
|
-
}> ? SCHEMA : SCHEMA & Readonly<{
|
|
16
|
-
properties: {};
|
|
17
|
-
}> : SCHEMA extends boolean ? SCHEMA : Omit<SCHEMA, "additionalProperties">;
|
|
18
|
-
type MergeSubSchema<PARENT_SCHEMA extends JSONSchema, SUB_SCHEMA extends JSONSchema, CLEANED_SUB_SCHEMA extends JSONSchema = RemoveInvalidAdditionalProperties<RemoveInvalidAdditionalItems<SUB_SCHEMA>>> = Omit<PARENT_SCHEMA, keyof CLEANED_SUB_SCHEMA | "additionalProperties" | "patternProperties" | "unevaluatedProperties" | "required" | "additionalItems"> & CLEANED_SUB_SCHEMA;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { MergeSubSchema };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/get.d.ts
|
|
2
|
-
type DeepGet<OBJECT, PATH extends string[], DEFAULT = undefined> = PATH extends [infer PATH_HEAD, ...infer PATH_TAIL] ? PATH_HEAD extends string ? PATH_TAIL extends string[] ? PATH_HEAD extends keyof OBJECT ? DeepGet<OBJECT[PATH_HEAD], PATH_TAIL, DEFAULT> : DEFAULT : never : never : OBJECT;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { DeepGet };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/join.d.ts
|
|
2
|
-
type Join<STRINGS extends string[], SEPARATOR extends string = ","> = STRINGS extends [] ? "" : STRINGS extends [string] ? `${STRINGS[0]}` : STRINGS extends [string, ...infer STRINGS_TAIL] ? STRINGS_TAIL extends string[] ? `${STRINGS[0]}${SEPARATOR}${Join<STRINGS_TAIL, SEPARATOR>}` : never : string;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { Join };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/pop.d.ts
|
|
2
|
-
type Pop<ARRAY extends unknown[]> = ARRAY extends readonly [...infer ARRAY_BODY, unknown] | readonly [...infer ARRAY_BODY, unknown?] ? ARRAY_BODY : ARRAY;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { Pop };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Pop } from "./pop.mjs";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/split.d.ts
|
|
4
|
-
type RecursiveSplit<STRING extends string, SEPARATOR extends string = ""> = STRING extends `${infer BEFORE}${SEPARATOR}${infer AFTER}` ? [BEFORE, ...RecursiveSplit<AFTER, SEPARATOR>] : [STRING];
|
|
5
|
-
type Split<STRING extends string, SEPARATOR extends string = "", RESULT extends string[] = RecursiveSplit<STRING, SEPARATOR>> = SEPARATOR extends "" ? Pop<RESULT> : RESULT;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { Split };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/tail.d.ts
|
|
2
|
-
type Tail<ARRAY extends unknown[]> = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer ARRAY_TAIL] ? ARRAY_TAIL : ARRAY;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { Tail };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/type-utils/writable.d.ts
|
|
2
|
-
type Writable<TYPE> = TYPE extends ((...args: unknown[]) => unknown) | Date | RegExp ? TYPE : TYPE extends ReadonlyMap<infer KEYS, infer VALUES> ? Map<Writable<KEYS>, Writable<VALUES>> : TYPE extends ReadonlySet<infer VALUES> ? Set<Writable<VALUES>> : TYPE extends ReadonlyArray<unknown> ? `${bigint}` extends `${keyof TYPE & any}` ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]> } : Writable<TYPE[number]>[] : TYPE extends object ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]> } : TYPE;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { Writable };
|
package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/any.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { And } from "../utils/and.mjs";
|
|
2
|
-
import { If } from "../utils/if.mjs";
|
|
3
|
-
import { Deserialized, IsSerialized } from "./utils.mjs";
|
|
4
|
-
import { ResolveOptions } from "./resolve.mjs";
|
|
5
|
-
|
|
6
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/any.d.ts
|
|
7
|
-
declare type AnyTypeId = "any";
|
|
8
|
-
declare type Any<IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = {
|
|
9
|
-
type: AnyTypeId;
|
|
10
|
-
isSerialized: IS_SERIALIZED;
|
|
11
|
-
deserialized: DESERIALIZED;
|
|
12
|
-
};
|
|
13
|
-
declare type AnyType = {
|
|
14
|
-
type: AnyTypeId;
|
|
15
|
-
isSerialized: boolean;
|
|
16
|
-
deserialized: unknown;
|
|
17
|
-
};
|
|
18
|
-
declare type ResolveAny<META_ANY extends AnyType, OPTIONS extends ResolveOptions> = If<And<OPTIONS["deserialize"], IsSerialized<META_ANY>>, Deserialized<META_ANY>, unknown>;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { Any, AnyType, ResolveAny };
|
package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/array.d.mts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { And } from "../utils/and.mjs";
|
|
2
|
-
import { If } from "../utils/if.mjs";
|
|
3
|
-
import { Prettify } from "../utils/prettify.mjs";
|
|
4
|
-
import { NeverType } from "./never.mjs";
|
|
5
|
-
import { Deserialized, IsSerialized } from "./utils.mjs";
|
|
6
|
-
import { Type } from "./type.mjs";
|
|
7
|
-
import { Resolve, ResolveOptions } from "./resolve.mjs";
|
|
8
|
-
import { Any } from "./any.mjs";
|
|
9
|
-
|
|
10
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/array.d.ts
|
|
11
|
-
declare type ArrayTypeId = "array";
|
|
12
|
-
declare type _Array<VALUES extends Type = Any, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = _$Array<VALUES, IS_SERIALIZED, DESERIALIZED>;
|
|
13
|
-
declare type _$Array<VALUES = Any, IS_SERIALIZED = false, DESERIALIZED = never> = {
|
|
14
|
-
type: ArrayTypeId;
|
|
15
|
-
values: VALUES;
|
|
16
|
-
isSerialized: IS_SERIALIZED;
|
|
17
|
-
deserialized: DESERIALIZED;
|
|
18
|
-
};
|
|
19
|
-
declare type ArrayType = {
|
|
20
|
-
type: ArrayTypeId;
|
|
21
|
-
values: Type;
|
|
22
|
-
isSerialized: boolean;
|
|
23
|
-
deserialized: unknown;
|
|
24
|
-
};
|
|
25
|
-
declare type ArrayValues<META_ARRAY extends ArrayType> = META_ARRAY["values"];
|
|
26
|
-
declare type ResolveArray<META_ARRAY extends ArrayType, OPTIONS extends ResolveOptions> = If<And<OPTIONS["deserialize"], IsSerialized<META_ARRAY>>, Deserialized<META_ARRAY>, ArrayValues<META_ARRAY> extends NeverType ? [] : Prettify<Resolve<ArrayValues<META_ARRAY>, OPTIONS>[]>>;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { ArrayType, ArrayValues, ResolveArray, _$Array, _Array };
|
package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/const.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { And } from "../utils/and.mjs";
|
|
2
|
-
import { If } from "../utils/if.mjs";
|
|
3
|
-
import { IsNever } from "../utils/isNever.mjs";
|
|
4
|
-
import { Never } from "./never.mjs";
|
|
5
|
-
import { Deserialized, IsSerialized } from "./utils.mjs";
|
|
6
|
-
import { ResolveOptions } from "./resolve.mjs";
|
|
7
|
-
|
|
8
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/const.d.ts
|
|
9
|
-
declare type ConstTypeId = "const";
|
|
10
|
-
declare type Const<VALUE, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = If<IsNever<VALUE>, Never, {
|
|
11
|
-
type: ConstTypeId;
|
|
12
|
-
value: VALUE;
|
|
13
|
-
isSerialized: IS_SERIALIZED;
|
|
14
|
-
deserialized: DESERIALIZED;
|
|
15
|
-
}>;
|
|
16
|
-
declare type ConstType = {
|
|
17
|
-
type: ConstTypeId;
|
|
18
|
-
value: unknown;
|
|
19
|
-
isSerialized: boolean;
|
|
20
|
-
deserialized: unknown;
|
|
21
|
-
};
|
|
22
|
-
declare type ConstValue<META_CONST extends ConstType> = META_CONST["value"];
|
|
23
|
-
declare type ResolveConst<META_CONST extends ConstType, OPTIONS extends ResolveOptions> = If<And<OPTIONS["deserialize"], IsSerialized<META_CONST>>, Deserialized<META_CONST>, ConstValue<META_CONST>>;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { Const, ConstType, ConstValue, ResolveConst };
|
package/lib/node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/enum.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { And } from "../utils/and.mjs";
|
|
2
|
-
import { If } from "../utils/if.mjs";
|
|
3
|
-
import { IsNever } from "../utils/isNever.mjs";
|
|
4
|
-
import { Never } from "./never.mjs";
|
|
5
|
-
import { Deserialized, IsSerialized } from "./utils.mjs";
|
|
6
|
-
import { ResolveOptions } from "./resolve.mjs";
|
|
7
|
-
|
|
8
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/enum.d.ts
|
|
9
|
-
declare type EnumTypeId = "enum";
|
|
10
|
-
declare type Enum<VALUES, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = If<IsNever<VALUES>, Never, {
|
|
11
|
-
type: EnumTypeId;
|
|
12
|
-
values: VALUES;
|
|
13
|
-
isSerialized: IS_SERIALIZED;
|
|
14
|
-
deserialized: DESERIALIZED;
|
|
15
|
-
}>;
|
|
16
|
-
declare type EnumType = {
|
|
17
|
-
type: EnumTypeId;
|
|
18
|
-
values: unknown;
|
|
19
|
-
isSerialized: boolean;
|
|
20
|
-
deserialized: unknown;
|
|
21
|
-
};
|
|
22
|
-
declare type EnumValues<META_ENUM extends EnumType> = META_ENUM["values"];
|
|
23
|
-
declare type ResolveEnum<META_ENUM extends EnumType, OPTIONS extends ResolveOptions> = If<And<OPTIONS["deserialize"], IsSerialized<META_ENUM>>, Deserialized<META_ENUM>, EnumValues<META_ENUM>>;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { Enum, EnumType, EnumValues, ResolveEnum };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Never, NeverType } from "../never.mjs";
|
|
2
|
-
import { ConstType } from "../const.mjs";
|
|
3
|
-
import { EnumType } from "../enum.mjs";
|
|
4
|
-
import { ObjectType } from "../object.mjs";
|
|
5
|
-
import { PrimitiveType } from "../primitive.mjs";
|
|
6
|
-
import { TupleType } from "../tuple.mjs";
|
|
7
|
-
import { UnionType } from "../union.mjs";
|
|
8
|
-
import { Type } from "../type.mjs";
|
|
9
|
-
import { ArrayType } from "../array.mjs";
|
|
10
|
-
import { AnyType } from "../any.mjs";
|
|
11
|
-
import { ExcludeUnion } from "./union.mjs";
|
|
12
|
-
|
|
13
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/any.d.ts
|
|
14
|
-
declare type ExcludeFromAny<META_ANY extends AnyType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ANY : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_ANY : META_TYPE extends EnumType ? META_ANY : META_TYPE extends PrimitiveType ? META_ANY : META_TYPE extends ArrayType ? META_ANY : META_TYPE extends TupleType ? META_ANY : META_TYPE extends ObjectType ? META_ANY : META_TYPE extends UnionType ? ExcludeUnion<META_ANY, META_TYPE> : Never : Never;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { ExcludeFromAny };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { And } from "../../utils/and.mjs";
|
|
2
|
-
import { DoesExtend } from "../../utils/extends.mjs";
|
|
3
|
-
import { Never, NeverType } from "../never.mjs";
|
|
4
|
-
import { ConstType } from "../const.mjs";
|
|
5
|
-
import { EnumType } from "../enum.mjs";
|
|
6
|
-
import { ObjectType } from "../object.mjs";
|
|
7
|
-
import { PrimitiveType } from "../primitive.mjs";
|
|
8
|
-
import { IsTupleOpen, TupleOpenProps, TupleType, TupleValues } from "../tuple.mjs";
|
|
9
|
-
import { UnionType } from "../union.mjs";
|
|
10
|
-
import { Type } from "../type.mjs";
|
|
11
|
-
import { ArrayType, ArrayValues, _Array } from "../array.mjs";
|
|
12
|
-
import { AnyType } from "../any.mjs";
|
|
13
|
-
import { ExcludeUnion } from "./union.mjs";
|
|
14
|
-
import { _Exclude } from "./index.mjs";
|
|
15
|
-
|
|
16
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/array.d.ts
|
|
17
|
-
declare type ExcludeFromArray<META_ARRAY extends ArrayType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ARRAY : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_ARRAY : META_TYPE extends EnumType ? META_ARRAY : META_TYPE extends PrimitiveType ? META_ARRAY : META_TYPE extends ArrayType ? ExcludeArrays<META_ARRAY, META_TYPE> : META_TYPE extends TupleType ? And<DoesExtend<TupleValues<META_TYPE>, []>, IsTupleOpen<META_TYPE>> extends true ? ExcludeArrays<META_ARRAY, _Array<TupleOpenProps<META_TYPE>>> : META_ARRAY : META_TYPE extends ObjectType ? META_ARRAY : META_TYPE extends UnionType ? ExcludeUnion<META_ARRAY, META_TYPE> : Never : Never;
|
|
18
|
-
declare type ExcludeArrays<META_ARRAY_A extends ArrayType, META_ARRAY_B extends ArrayType> = _Exclude<ArrayValues<META_ARRAY_A>, ArrayValues<META_ARRAY_B>> extends NeverType ? NeverType : META_ARRAY_A;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ExcludeFromArray };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IsObject } from "../../utils/extends.mjs";
|
|
2
|
-
import { If } from "../../utils/if.mjs";
|
|
3
|
-
import { IsNever } from "../../utils/isNever.mjs";
|
|
4
|
-
import { Never, NeverType } from "../never.mjs";
|
|
5
|
-
import { Const, ConstType, ConstValue } from "../const.mjs";
|
|
6
|
-
import { EnumType } from "../enum.mjs";
|
|
7
|
-
import { IsObjectOpen, ObjectOpenProps, ObjectRequiredKeys, ObjectType, ObjectValues } from "../object.mjs";
|
|
8
|
-
import { PrimitiveType } from "../primitive.mjs";
|
|
9
|
-
import { TupleType } from "../tuple.mjs";
|
|
10
|
-
import { UnionType } from "../union.mjs";
|
|
11
|
-
import { Type } from "../type.mjs";
|
|
12
|
-
import { ArrayType } from "../array.mjs";
|
|
13
|
-
import { Resolve } from "../resolve.mjs";
|
|
14
|
-
import { AnyType } from "../any.mjs";
|
|
15
|
-
import { ExcludeUnion } from "./union.mjs";
|
|
16
|
-
import { _Exclude } from "./index.mjs";
|
|
17
|
-
|
|
18
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/const.d.ts
|
|
19
|
-
declare type ExcludeFromConst<META_CONST extends ConstType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_CONST : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends EnumType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends PrimitiveType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends ArrayType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends TupleType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends ObjectType ? ExcludeObject<META_CONST, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_CONST, META_TYPE> : Never : Never;
|
|
20
|
-
declare type CheckNotExtendsResolved<META_CONST extends ConstType, META_TYPE extends Type> = ConstValue<META_CONST> extends Resolve<META_TYPE, {
|
|
21
|
-
deserialize: false;
|
|
22
|
-
}> ? Never : META_CONST;
|
|
23
|
-
declare type ExcludeObject<META_CONST extends ConstType, META_OBJECT extends ObjectType> = If<IsObject<ConstValue<META_CONST>>, ObjectRequiredKeys<META_OBJECT> extends keyof ConstValue<META_CONST> ? ExcludeObjectFromConst<META_CONST, META_OBJECT> : META_CONST, META_CONST>;
|
|
24
|
-
declare type ExcludeObjectFromConst<META_CONST extends ConstType, META_OBJECT extends ObjectType, EXCLUDED_CONST_VALUES = ExcludeConstValues<ConstValue<META_CONST>, META_OBJECT>> = If<IsNever<RepresentableKeys<EXCLUDED_CONST_VALUES>>, Never, META_CONST>;
|
|
25
|
-
declare type ExcludeConstValues<VALUE, META_OBJECT extends ObjectType> = { [KEY in keyof VALUE]: KEY extends keyof ObjectValues<META_OBJECT> ? _Exclude<Const<VALUE[KEY]>, ObjectValues<META_OBJECT>[KEY]> : IsObjectOpen<META_OBJECT> extends true ? _Exclude<Const<VALUE[KEY]>, ObjectOpenProps<META_OBJECT>> : Const<VALUE[KEY]> };
|
|
26
|
-
declare type RepresentableKeys<VALUES> = { [KEY in keyof VALUES]: VALUES[KEY] extends Never ? never : KEY }[keyof VALUES];
|
|
27
|
-
//#endregion
|
|
28
|
-
export { ExcludeFromConst };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UnionLast } from "../../utils/unionLast.mjs";
|
|
2
|
-
import { Never, NeverType } from "../never.mjs";
|
|
3
|
-
import { Const, ConstType } from "../const.mjs";
|
|
4
|
-
import { Enum, EnumType, EnumValues } from "../enum.mjs";
|
|
5
|
-
import { ObjectType } from "../object.mjs";
|
|
6
|
-
import { PrimitiveType } from "../primitive.mjs";
|
|
7
|
-
import { TupleType } from "../tuple.mjs";
|
|
8
|
-
import { UnionType } from "../union.mjs";
|
|
9
|
-
import { Type } from "../type.mjs";
|
|
10
|
-
import { ArrayType } from "../array.mjs";
|
|
11
|
-
import { AnyType } from "../any.mjs";
|
|
12
|
-
import { $Intersect } from "../intersection/index.mjs";
|
|
13
|
-
import { ExcludeUnion } from "./union.mjs";
|
|
14
|
-
import { _Exclude } from "./index.mjs";
|
|
15
|
-
|
|
16
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/enum.d.ts
|
|
17
|
-
declare type ExcludeFromEnum<META_ENUM extends EnumType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ENUM : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends EnumType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends PrimitiveType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends ArrayType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends TupleType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends ObjectType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_ENUM, META_TYPE> : Never : Never;
|
|
18
|
-
declare type FilterEnumExcluded<META_ENUM extends EnumType, META_TYPE extends Type> = Enum<FilterEnumExcludedValues<EnumValues<META_ENUM>, META_TYPE>>;
|
|
19
|
-
declare type FilterEnumExcludedValues<ENUM_VALUES, META_TYPE extends Type> = ENUM_VALUES extends infer ENUM_VALUE ? _Exclude<Const<ENUM_VALUE>, META_TYPE> extends NeverType ? never : ENUM_VALUE : never;
|
|
20
|
-
declare type ExcludeEnum<META_TYPE extends Type, ENUM_TYPE extends EnumType, ENUM_VALUES = EnumValues<ENUM_TYPE>> = ExcludeEnumValue<META_TYPE, UnionLast<ENUM_VALUES>, ENUM_VALUES>;
|
|
21
|
-
declare type ExcludeEnumValue<META_TYPE extends Type, LAST_ENUM_VALUE, ENUM_VALUES> = $Intersect<_Exclude<META_TYPE, Const<LAST_ENUM_VALUE>>, _Exclude<META_TYPE, Enum<Exclude<ENUM_VALUES, LAST_ENUM_VALUE>>>>;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { ExcludeEnum, ExcludeFromEnum };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Never, NeverType } from "../never.mjs";
|
|
2
|
-
import { ConstType } from "../const.mjs";
|
|
3
|
-
import { EnumType } from "../enum.mjs";
|
|
4
|
-
import { ObjectType } from "../object.mjs";
|
|
5
|
-
import { PrimitiveType } from "../primitive.mjs";
|
|
6
|
-
import { TupleType } from "../tuple.mjs";
|
|
7
|
-
import { UnionType } from "../union.mjs";
|
|
8
|
-
import { Type } from "../type.mjs";
|
|
9
|
-
import { ArrayType } from "../array.mjs";
|
|
10
|
-
import { AnyType } from "../any.mjs";
|
|
11
|
-
import { ExcludeFromUnion } from "./union.mjs";
|
|
12
|
-
import { ExcludeFromAny } from "./any.mjs";
|
|
13
|
-
import { ExcludeFromArray } from "./array.mjs";
|
|
14
|
-
import { ExcludeFromConst } from "./const.mjs";
|
|
15
|
-
import { ExcludeFromEnum } from "./enum.mjs";
|
|
16
|
-
import { ExcludeFromObject } from "./object.mjs";
|
|
17
|
-
import { ExcludeFromPrimitive } from "./primitive.mjs";
|
|
18
|
-
import { ExcludeFromTuple } from "./tuple.mjs";
|
|
19
|
-
|
|
20
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/index.d.ts
|
|
21
|
-
declare type _Exclude<META_TYPE_A extends Type, META_TYPE_B extends Type> = _$Exclude<META_TYPE_A, META_TYPE_B>;
|
|
22
|
-
declare type _$Exclude<META_TYPE_A, META_TYPE_B> = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? ExcludeFromAny<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ConstType ? ExcludeFromConst<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends EnumType ? ExcludeFromEnum<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends PrimitiveType ? ExcludeFromPrimitive<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ArrayType ? ExcludeFromArray<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends TupleType ? ExcludeFromTuple<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ObjectType ? ExcludeFromObject<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends UnionType ? ExcludeFromUnion<META_TYPE_A, META_TYPE_B> : Never;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { _$Exclude, _Exclude };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { And } from "../../utils/and.mjs";
|
|
2
|
-
import { DoesExtend, IsObject } from "../../utils/extends.mjs";
|
|
3
|
-
import { If } from "../../utils/if.mjs";
|
|
4
|
-
import { IsNever } from "../../utils/isNever.mjs";
|
|
5
|
-
import { Not } from "../../utils/not.mjs";
|
|
6
|
-
import { Or } from "../../utils/or.mjs";
|
|
7
|
-
import { UnionPop } from "../../utils/unionPop.mjs";
|
|
8
|
-
import { Never, NeverType } from "../never.mjs";
|
|
9
|
-
import { Deserialized, IsSerialized } from "../utils.mjs";
|
|
10
|
-
import { Const, ConstType, ConstValue } from "../const.mjs";
|
|
11
|
-
import { EnumType } from "../enum.mjs";
|
|
12
|
-
import { IsObjectClosedOnResolve, IsObjectOpen, ObjectOpenProps, ObjectRequiredKeys, ObjectType, ObjectValue, ObjectValues, _Object } from "../object.mjs";
|
|
13
|
-
import { PrimitiveType } from "../primitive.mjs";
|
|
14
|
-
import { TupleType } from "../tuple.mjs";
|
|
15
|
-
import { UnionType } from "../union.mjs";
|
|
16
|
-
import { Type } from "../type.mjs";
|
|
17
|
-
import { ArrayType } from "../array.mjs";
|
|
18
|
-
import { AnyType } from "../any.mjs";
|
|
19
|
-
import { ExcludeUnion } from "./union.mjs";
|
|
20
|
-
import { ExcludeEnum } from "./enum.mjs";
|
|
21
|
-
import { ExclusionResult, IsOmittable, IsOutsideOfExcludedScope, IsOutsideOfSourceScope, PropagateExclusion, SourceValue, ValueExclusionResult, ValueExclusionResultType } from "./utils.mjs";
|
|
22
|
-
import { _$Exclude, _Exclude } from "./index.mjs";
|
|
23
|
-
|
|
24
|
-
//#region node_modules/.pnpm/ts-algebra@2.0.0/node_modules/ts-algebra/lib/meta-types/exclusion/object.d.ts
|
|
25
|
-
declare type ExcludeFromObject<META_OBJECT extends ObjectType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_OBJECT : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? ExcludeConstFromObject<META_OBJECT, META_TYPE> : META_TYPE extends EnumType ? ExcludeEnum<META_OBJECT, META_TYPE> : META_TYPE extends PrimitiveType ? META_OBJECT : META_TYPE extends ArrayType ? META_OBJECT : META_TYPE extends TupleType ? META_OBJECT : META_TYPE extends ObjectType ? ExcludeObjects<META_OBJECT, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_OBJECT, META_TYPE> : Never : Never;
|
|
26
|
-
declare type ExcludeObjects<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType> = ExcludeObjectValues<META_OBJECT_A, META_OBJECT_B>, REPRESENTABLE_KEYS extends string = RepresentableKeys<VALUE_EXCLUSION_RESULTS>, OPEN_PROPS_EXCLUSION = _Exclude<ObjectOpenProps<META_OBJECT_A>, ObjectOpenProps<META_OBJECT_B>>> = DoesObjectSizesMatch<META_OBJECT_A, META_OBJECT_B, VALUE_EXCLUSION_RESULTS> extends true ? {
|
|
27
|
-
moreThanTwo: META_OBJECT_A;
|
|
28
|
-
onlyOne: PropagateExclusions<META_OBJECT_A, VALUE_EXCLUSION_RESULTS>;
|
|
29
|
-
none: OmitOmittableKeys<META_OBJECT_A, VALUE_EXCLUSION_RESULTS>;
|
|
30
|
-
}[And<IsObjectOpen<META_OBJECT_A>, Not<DoesExtend<OPEN_PROPS_EXCLUSION, NeverType>>> extends true ? "moreThanTwo" : GetUnionLength<REPRESENTABLE_KEYS>] : META_OBJECT_A;
|
|
31
|
-
declare type ExcludeObjectValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B> | ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, string>]: ValueExclusionResult<ObjectValue<META_OBJECT_A, KEY>, IsAllowedIn<META_OBJECT_A, KEY>, IsRequiredIn<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY>, IsAllowedIn<META_OBJECT_B, KEY>, IsRequiredIn<META_OBJECT_B, KEY>> };
|
|
32
|
-
declare type GetUnionLength<UNION> = If<IsNever<UNION>, "none", If<IsNever<UnionPop<UNION>>, "onlyOne", "moreThanTwo">>;
|
|
33
|
-
declare type IsAllowedIn<META_OBJECT extends ObjectType, KEY extends string> = Or<DoesExtend<KEY, keyof ObjectValues<META_OBJECT>>, IsObjectOpen<META_OBJECT>>;
|
|
34
|
-
declare type IsRequiredIn<META_OBJECT extends ObjectType, KEY extends string> = DoesExtend<KEY, ObjectRequiredKeys<META_OBJECT>>;
|
|
35
|
-
declare type DoesObjectSizesMatch<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = If<And<IsObjectOpen<META_OBJECT_A>, Not<IsObjectOpen<META_OBJECT_B>>>, false, And<IsExcludedSmallEnough<VALUE_EXCLUSION_RESULTS>, IsExcludedBigEnough<VALUE_EXCLUSION_RESULTS>>>;
|
|
36
|
-
declare type IsExcludedSmallEnough<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not<DoesExtend<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfSourceScope<VALUE_EXCLUSION_RESULTS[KEY]> }[keyof VALUE_EXCLUSION_RESULTS]>>;
|
|
37
|
-
declare type IsExcludedBigEnough<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not<DoesExtend<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfExcludedScope<VALUE_EXCLUSION_RESULTS[KEY]> }[keyof VALUE_EXCLUSION_RESULTS]>>;
|
|
38
|
-
declare type RepresentableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: ExclusionResult<VALUE_EXCLUSION_RESULTS[KEY]> extends NeverType ? never : KEY }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
|
|
39
|
-
declare type PropagateExclusions<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: PropagateExclusion<VALUE_EXCLUSION_RESULTS[KEY]> }, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_OBJECT>, Deserialized<META_OBJECT>>;
|
|
40
|
-
declare type OmitOmittableKeys<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>, OMITTABLE_KEYS extends string = OmittableKeys<VALUE_EXCLUSION_RESULTS>, OMITTABLE_KEYS_COUNT extends string = GetUnionLength<OMITTABLE_KEYS>> = OMITTABLE_KEYS_COUNT extends "moreThanTwo" ? META_OBJECT : OMITTABLE_KEYS_COUNT extends "onlyOne" ? _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: KEY extends OMITTABLE_KEYS ? Never : SourceValue<VALUE_EXCLUSION_RESULTS[KEY]> }, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_OBJECT>, Deserialized<META_OBJECT>> : Never;
|
|
41
|
-
declare type OmittableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: IsOmittable<VALUE_EXCLUSION_RESULTS[KEY]> extends true ? KEY : never }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
|
|
42
|
-
declare type ExcludeConstFromObject<META_OBJECT extends ObjectType, META_CONST extends ConstType, CONST_VALUE = ConstValue<META_CONST>> = If<IsObject<CONST_VALUE>, _$Exclude<META_OBJECT, _Object<{ [KEY in Extract<keyof CONST_VALUE, string>]: Const<CONST_VALUE[KEY]> }, Extract<keyof CONST_VALUE, string>, Never, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_CONST>, Deserialized<META_CONST>>>, META_OBJECT>;
|
|
43
|
-
//#endregion
|
|
44
|
-
export { ExcludeFromObject };
|