@forklaunch/core 0.9.16 → 0.9.17
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/lib/__test__/index.d.mts
CHANGED
@@ -2,7 +2,7 @@ import { IdiomaticSchema, Schema } from '@forklaunch/validator';
|
|
2
2
|
import { TypeboxSchemaValidator } from '@forklaunch/validator/typebox';
|
3
3
|
import { ZodSchemaValidator } from '@forklaunch/validator/zod';
|
4
4
|
|
5
|
-
declare function testSchemaEquality<Schematic>(): <Z extends IdiomaticSchema<ZodSchemaValidator>, T extends IdiomaticSchema<TypeboxSchemaValidator>>(zodSchema: Z, typeBoxSchema: T, testData: Schema<Z, ZodSchemaValidator>
|
5
|
+
declare function testSchemaEquality<Schematic>(): <Z extends IdiomaticSchema<ZodSchemaValidator>, T extends IdiomaticSchema<TypeboxSchemaValidator>>(zodSchema: Z, typeBoxSchema: T, testData: Schema<Z, ZodSchemaValidator> extends Schematic ? Schematic extends Schema<T, TypeboxSchemaValidator> ? Schematic : never : never) => EqualityWithoutFunction<T, Z>;
|
6
6
|
type InjectiveWithoutFunction<O, T> = {
|
7
7
|
[K in keyof O]: K extends keyof T ? O[K] extends object ? T[K] extends object ? InjectiveWithoutFunction<O[K], T[K]> : false : O[K] extends (...args: never[]) => unknown ? T[K] extends (...args: never[]) => unknown ? true : false : O[K] extends T[K] ? T[K] extends O[K] ? true : false : false : false;
|
8
8
|
} extends infer R ? R extends {
|
package/lib/__test__/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { IdiomaticSchema, Schema } from '@forklaunch/validator';
|
|
2
2
|
import { TypeboxSchemaValidator } from '@forklaunch/validator/typebox';
|
3
3
|
import { ZodSchemaValidator } from '@forklaunch/validator/zod';
|
4
4
|
|
5
|
-
declare function testSchemaEquality<Schematic>(): <Z extends IdiomaticSchema<ZodSchemaValidator>, T extends IdiomaticSchema<TypeboxSchemaValidator>>(zodSchema: Z, typeBoxSchema: T, testData: Schema<Z, ZodSchemaValidator>
|
5
|
+
declare function testSchemaEquality<Schematic>(): <Z extends IdiomaticSchema<ZodSchemaValidator>, T extends IdiomaticSchema<TypeboxSchemaValidator>>(zodSchema: Z, typeBoxSchema: T, testData: Schema<Z, ZodSchemaValidator> extends Schematic ? Schematic extends Schema<T, TypeboxSchemaValidator> ? Schematic : never : never) => EqualityWithoutFunction<T, Z>;
|
6
6
|
type InjectiveWithoutFunction<O, T> = {
|
7
7
|
[K in keyof O]: K extends keyof T ? O[K] extends object ? T[K] extends object ? InjectiveWithoutFunction<O[K], T[K]> : false : O[K] extends (...args: never[]) => unknown ? T[K] extends (...args: never[]) => unknown ? true : false : O[K] extends T[K] ? T[K] extends O[K] ? true : false : false : false;
|
8
8
|
} extends infer R ? R extends {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../__test__/index.ts","../../__test__/utils/schemaEquality.ts"],"sourcesContent":["export * from './utils/schemaEquality';\n","import { safeStringify, sortObjectKeys } from '@forklaunch/common';\nimport { IdiomaticSchema } from '@forklaunch/validator';\n\nimport { Schema } from '@forklaunch/validator';\nimport {\n TypeboxSchemaValidator,\n parse as typeboxParse\n} from '@forklaunch/validator/typebox';\nimport {\n ZodSchemaValidator,\n parse as zodParse\n} from '@forklaunch/validator/zod';\n\nexport function testSchemaEquality<Schematic>() {\n return <\n Z extends IdiomaticSchema<ZodSchemaValidator>,\n T extends IdiomaticSchema<TypeboxSchemaValidator>\n >(\n zodSchema: Z,\n typeBoxSchema: T,\n testData: Schema<Z, ZodSchemaValidator>
|
1
|
+
{"version":3,"sources":["../../__test__/index.ts","../../__test__/utils/schemaEquality.ts"],"sourcesContent":["export * from './utils/schemaEquality';\n","import { safeStringify, sortObjectKeys } from '@forklaunch/common';\nimport { IdiomaticSchema } from '@forklaunch/validator';\n\nimport { Schema } from '@forklaunch/validator';\nimport {\n TypeboxSchemaValidator,\n parse as typeboxParse\n} from '@forklaunch/validator/typebox';\nimport {\n ZodSchemaValidator,\n parse as zodParse\n} from '@forklaunch/validator/zod';\n\nexport function testSchemaEquality<Schematic>() {\n return <\n Z extends IdiomaticSchema<ZodSchemaValidator>,\n T extends IdiomaticSchema<TypeboxSchemaValidator>\n >(\n zodSchema: Z,\n typeBoxSchema: T,\n testData: Schema<Z, ZodSchemaValidator> extends Schematic\n ? Schematic extends Schema<T, TypeboxSchemaValidator>\n ? Schematic\n : never\n : never\n ) => {\n const zodParseResult = zodParse(zodSchema, testData);\n const typeboxParseResult = typeboxParse(typeBoxSchema, testData);\n\n const isEqual =\n safeStringify(\n zodParseResult.ok ? sortObjectKeys(zodParseResult.value) : '-1'\n ) ===\n safeStringify(\n typeboxParseResult.ok\n ? sortObjectKeys(typeboxParseResult.value as Record<string, unknown>)\n : '1'\n );\n\n return isEqual as EqualityWithoutFunction<T, Z>;\n };\n}\n\ntype InjectiveWithoutFunction<O, T> = {\n [K in keyof O]: K extends keyof T\n ? O[K] extends object\n ? T[K] extends object\n ? InjectiveWithoutFunction<O[K], T[K]>\n : false\n : O[K] extends (...args: never[]) => unknown\n ? T[K] extends (...args: never[]) => unknown\n ? true\n : false\n : O[K] extends T[K]\n ? T[K] extends O[K]\n ? true\n : false\n : false\n : false;\n} extends infer R\n ? R extends {\n [K in keyof R]: true;\n }\n ? true\n : false\n : false;\n\ntype EqualityWithoutFunction<\n T extends IdiomaticSchema<TypeboxSchemaValidator>,\n Z extends IdiomaticSchema<ZodSchemaValidator>\n> =\n Schema<T, TypeboxSchemaValidator> extends infer TypeboxSchema\n ? Schema<Z, ZodSchemaValidator> extends infer ZodSchema\n ? InjectiveWithoutFunction<\n TypeboxSchema,\n ZodSchema\n > extends InjectiveWithoutFunction<ZodSchema, TypeboxSchema>\n ? true\n : false\n : false\n : false;\n\nexport enum DummyEnum {\n A = 'A',\n B = 'B'\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAA8C;AAI9C,qBAGO;AACP,iBAGO;AAEA,SAAS,qBAAgC;AAC9C,SAAO,CAIL,WACA,eACA,aAKG;AACH,UAAM,qBAAiB,WAAAA,OAAS,WAAW,QAAQ;AACnD,UAAM,yBAAqB,eAAAC,OAAa,eAAe,QAAQ;AAE/D,UAAM,cACJ;AAAA,MACE,eAAe,SAAK,8BAAe,eAAe,KAAK,IAAI;AAAA,IAC7D,UACA;AAAA,MACE,mBAAmB,SACf,8BAAe,mBAAmB,KAAgC,IAClE;AAAA,IACN;AAEF,WAAO;AAAA,EACT;AACF;AAyCO,IAAK,YAAL,kBAAKC,eAAL;AACL,EAAAA,WAAA,OAAI;AACJ,EAAAA,WAAA,OAAI;AAFM,SAAAA;AAAA,GAAA;","names":["zodParse","typeboxParse","DummyEnum"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../__test__/utils/schemaEquality.ts"],"sourcesContent":["import { safeStringify, sortObjectKeys } from '@forklaunch/common';\nimport { IdiomaticSchema } from '@forklaunch/validator';\n\nimport { Schema } from '@forklaunch/validator';\nimport {\n TypeboxSchemaValidator,\n parse as typeboxParse\n} from '@forklaunch/validator/typebox';\nimport {\n ZodSchemaValidator,\n parse as zodParse\n} from '@forklaunch/validator/zod';\n\nexport function testSchemaEquality<Schematic>() {\n return <\n Z extends IdiomaticSchema<ZodSchemaValidator>,\n T extends IdiomaticSchema<TypeboxSchemaValidator>\n >(\n zodSchema: Z,\n typeBoxSchema: T,\n testData: Schema<Z, ZodSchemaValidator>
|
1
|
+
{"version":3,"sources":["../../__test__/utils/schemaEquality.ts"],"sourcesContent":["import { safeStringify, sortObjectKeys } from '@forklaunch/common';\nimport { IdiomaticSchema } from '@forklaunch/validator';\n\nimport { Schema } from '@forklaunch/validator';\nimport {\n TypeboxSchemaValidator,\n parse as typeboxParse\n} from '@forklaunch/validator/typebox';\nimport {\n ZodSchemaValidator,\n parse as zodParse\n} from '@forklaunch/validator/zod';\n\nexport function testSchemaEquality<Schematic>() {\n return <\n Z extends IdiomaticSchema<ZodSchemaValidator>,\n T extends IdiomaticSchema<TypeboxSchemaValidator>\n >(\n zodSchema: Z,\n typeBoxSchema: T,\n testData: Schema<Z, ZodSchemaValidator> extends Schematic\n ? Schematic extends Schema<T, TypeboxSchemaValidator>\n ? Schematic\n : never\n : never\n ) => {\n const zodParseResult = zodParse(zodSchema, testData);\n const typeboxParseResult = typeboxParse(typeBoxSchema, testData);\n\n const isEqual =\n safeStringify(\n zodParseResult.ok ? sortObjectKeys(zodParseResult.value) : '-1'\n ) ===\n safeStringify(\n typeboxParseResult.ok\n ? sortObjectKeys(typeboxParseResult.value as Record<string, unknown>)\n : '1'\n );\n\n return isEqual as EqualityWithoutFunction<T, Z>;\n };\n}\n\ntype InjectiveWithoutFunction<O, T> = {\n [K in keyof O]: K extends keyof T\n ? O[K] extends object\n ? T[K] extends object\n ? InjectiveWithoutFunction<O[K], T[K]>\n : false\n : O[K] extends (...args: never[]) => unknown\n ? T[K] extends (...args: never[]) => unknown\n ? true\n : false\n : O[K] extends T[K]\n ? T[K] extends O[K]\n ? true\n : false\n : false\n : false;\n} extends infer R\n ? R extends {\n [K in keyof R]: true;\n }\n ? true\n : false\n : false;\n\ntype EqualityWithoutFunction<\n T extends IdiomaticSchema<TypeboxSchemaValidator>,\n Z extends IdiomaticSchema<ZodSchemaValidator>\n> =\n Schema<T, TypeboxSchemaValidator> extends infer TypeboxSchema\n ? Schema<Z, ZodSchemaValidator> extends infer ZodSchema\n ? InjectiveWithoutFunction<\n TypeboxSchema,\n ZodSchema\n > extends InjectiveWithoutFunction<ZodSchema, TypeboxSchema>\n ? true\n : false\n : false\n : false;\n\nexport enum DummyEnum {\n A = 'A',\n B = 'B'\n}\n"],"mappings":";AAAA,SAAS,eAAe,sBAAsB;AAI9C;AAAA,EAEE,SAAS;AAAA,OACJ;AACP;AAAA,EAEE,SAAS;AAAA,OACJ;AAEA,SAAS,qBAAgC;AAC9C,SAAO,CAIL,WACA,eACA,aAKG;AACH,UAAM,iBAAiB,SAAS,WAAW,QAAQ;AACnD,UAAM,qBAAqB,aAAa,eAAe,QAAQ;AAE/D,UAAM,UACJ;AAAA,MACE,eAAe,KAAK,eAAe,eAAe,KAAK,IAAI;AAAA,IAC7D,MACA;AAAA,MACE,mBAAmB,KACf,eAAe,mBAAmB,KAAgC,IAClE;AAAA,IACN;AAEF,WAAO;AAAA,EACT;AACF;AAyCO,IAAK,YAAL,kBAAKA,eAAL;AACL,EAAAA,WAAA,OAAI;AACJ,EAAAA,WAAA,OAAI;AAFM,SAAAA;AAAA,GAAA;","names":["DummyEnum"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@forklaunch/core",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.17",
|
4
4
|
"description": "forklaunch-js core package. Contains useful building blocks.",
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
6
6
|
"bugs": {
|
@@ -96,17 +96,17 @@
|
|
96
96
|
"pino-pretty": "^13.0.0",
|
97
97
|
"redis": "^5.5.6",
|
98
98
|
"uuid": "^11.1.0",
|
99
|
-
"@forklaunch/common": "0.3.
|
100
|
-
"@forklaunch/validator": "0.6.
|
99
|
+
"@forklaunch/common": "0.3.12",
|
100
|
+
"@forklaunch/validator": "0.6.14"
|
101
101
|
},
|
102
102
|
"devDependencies": {
|
103
|
-
"@eslint/js": "^9.
|
104
|
-
"@scalar/express-api-reference": "^0.8.
|
103
|
+
"@eslint/js": "^9.29.0",
|
104
|
+
"@scalar/express-api-reference": "^0.8.4",
|
105
105
|
"@types/cors": "^2.8.19",
|
106
|
-
"@types/jest": "^
|
106
|
+
"@types/jest": "^30.0.0",
|
107
107
|
"@types/qs": "^6.14.0",
|
108
108
|
"@types/uuid": "^10.0.0",
|
109
|
-
"@typescript/native-preview": "7.0.0-dev.
|
109
|
+
"@typescript/native-preview": "7.0.0-dev.20250618.1",
|
110
110
|
"globals": "^16.2.0",
|
111
111
|
"jest": "^30.0.0",
|
112
112
|
"prettier": "^3.5.3",
|
@@ -116,7 +116,7 @@
|
|
116
116
|
"tsup": "^8.5.0",
|
117
117
|
"typedoc": "^0.28.5",
|
118
118
|
"typescript": "^5.8.3",
|
119
|
-
"typescript-eslint": "^8.34.
|
119
|
+
"typescript-eslint": "^8.34.1"
|
120
120
|
},
|
121
121
|
"scripts": {
|
122
122
|
"build": "tsgo --noEmit && tsup ./src/cache/index.ts ./src/controllers/index.ts ./src/mappers/index.ts ./src/objectstore/index.ts ./src/persistence/index.ts ./src/http/index.ts ./src/services/index.ts ./__test__/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean --sourcemap",
|