@bobbykim/manguito-cms-api 0.2.0 → 0.3.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/dist/chunk-FBS2RQI3.mjs +232 -0
- package/dist/chunk-FBS2RQI3.mjs.map +1 -0
- package/dist/chunk-QXMW74MR.mjs +589 -0
- package/dist/chunk-QXMW74MR.mjs.map +1 -0
- package/dist/graphql/index.d.mts +15 -0
- package/dist/graphql/index.d.ts +15 -0
- package/dist/graphql/index.js +729 -0
- package/dist/graphql/index.js.map +1 -0
- package/dist/graphql/index.mjs +8 -0
- package/dist/graphql/index.mjs.map +1 -0
- package/dist/handler-GMCFYZY5.mjs +8 -0
- package/dist/handler-GMCFYZY5.mjs.map +1 -0
- package/dist/index.d.mts +7 -14
- package/dist/index.d.ts +7 -14
- package/dist/index.js +959 -253
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +184 -330
- package/dist/index.mjs.map +1 -1
- package/dist/resolve-Dtsk27aI.d.mts +15 -0
- package/dist/resolve-Dtsk27aI.d.ts +15 -0
- package/package.json +12 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProgrammaticFieldDefinition, SchemaRegistry } from '@bobbykim/manguito-cms-core';
|
|
2
|
+
|
|
3
|
+
type ResolverMap = Map<string, ProgrammaticFieldDefinition>;
|
|
4
|
+
declare function resolverKey(schema: string, field: string): string;
|
|
5
|
+
declare function validateResolverBindings(registry: SchemaRegistry, resolvers: ResolverMap): void;
|
|
6
|
+
declare function createProgrammaticResolver(resolvers: ResolverMap, options?: {
|
|
7
|
+
onError?: (message: string) => void;
|
|
8
|
+
}): {
|
|
9
|
+
resolveItem: (schema: string, row: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
10
|
+
resolveList: (schema: string, rows: Record<string, unknown>[]) => Promise<Record<string, unknown>[]>;
|
|
11
|
+
hasSchema: (schema: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
type ProgrammaticResolver = ReturnType<typeof createProgrammaticResolver>;
|
|
14
|
+
|
|
15
|
+
export { type ProgrammaticResolver as P, type ResolverMap as R, createProgrammaticResolver as c, resolverKey as r, validateResolverBindings as v };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProgrammaticFieldDefinition, SchemaRegistry } from '@bobbykim/manguito-cms-core';
|
|
2
|
+
|
|
3
|
+
type ResolverMap = Map<string, ProgrammaticFieldDefinition>;
|
|
4
|
+
declare function resolverKey(schema: string, field: string): string;
|
|
5
|
+
declare function validateResolverBindings(registry: SchemaRegistry, resolvers: ResolverMap): void;
|
|
6
|
+
declare function createProgrammaticResolver(resolvers: ResolverMap, options?: {
|
|
7
|
+
onError?: (message: string) => void;
|
|
8
|
+
}): {
|
|
9
|
+
resolveItem: (schema: string, row: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
10
|
+
resolveList: (schema: string, rows: Record<string, unknown>[]) => Promise<Record<string, unknown>[]>;
|
|
11
|
+
hasSchema: (schema: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
type ProgrammaticResolver = ReturnType<typeof createProgrammaticResolver>;
|
|
14
|
+
|
|
15
|
+
export { type ProgrammaticResolver as P, type ResolverMap as R, createProgrammaticResolver as c, resolverKey as r, validateResolverBindings as v };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/manguito-cms-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Bobby Kim <bobby.sihun.kim@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/bobbykim89/manguito-cms",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"types": "./dist/codegen/index.d.ts",
|
|
33
33
|
"import": "./dist/codegen/index.mjs",
|
|
34
34
|
"require": "./dist/codegen/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./graphql": {
|
|
37
|
+
"types": "./dist/graphql/index.d.ts",
|
|
38
|
+
"import": "./dist/graphql/index.mjs",
|
|
39
|
+
"require": "./dist/graphql/index.js"
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
"main": "./dist/index.js",
|
|
@@ -43,14 +48,18 @@
|
|
|
43
48
|
"dependencies": {
|
|
44
49
|
"@aws-sdk/client-s3": "^3.1081.0",
|
|
45
50
|
"@aws-sdk/s3-request-presigner": "^3.1081.0",
|
|
51
|
+
"@escape.tech/graphql-armor": "^3.2.0",
|
|
46
52
|
"@hono/node-server": "^1.19.14",
|
|
47
53
|
"@hono/zod-openapi": "^1.4.0",
|
|
48
54
|
"bcryptjs": "^2.4.3",
|
|
55
|
+
"dataloader": "^2.2.3",
|
|
49
56
|
"drizzle-orm": "^0.45.2",
|
|
57
|
+
"graphql": "^16.14.2",
|
|
58
|
+
"graphql-yoga": "^5.21.2",
|
|
50
59
|
"hono": "^4.12.28",
|
|
51
60
|
"zod": "^4.4.3",
|
|
52
|
-
"@bobbykim/manguito-cms-
|
|
53
|
-
"@bobbykim/manguito-cms-
|
|
61
|
+
"@bobbykim/manguito-cms-core": "0.3.0",
|
|
62
|
+
"@bobbykim/manguito-cms-db": "0.1.3"
|
|
54
63
|
},
|
|
55
64
|
"devDependencies": {
|
|
56
65
|
"@types/bcryptjs": "^2.4.6",
|