@tinacms/graphql 0.0.0-b551232-20250318064010 → 0.0.0-b749957-20251208035121

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.
@@ -1,8 +1,3 @@
1
- /**
2
-
3
-
4
-
5
- */
6
- import { parseMDX, stringifyMDX } from '@tinacms/mdx';
1
+ import { parseMDX, serializeMDX } from '@tinacms/mdx';
7
2
  export { parseMDX };
8
- export { stringifyMDX };
3
+ export { serializeMDX };
@@ -0,0 +1,31 @@
1
+ import type { TinaSchema } from '@tinacms/schema-tools';
2
+ import type { GraphQLResolveInfo } from 'graphql';
3
+ import type { Resolver } from './index';
4
+ export declare function handleAuthenticate({ tinaSchema, resolver, sub, password, ctxUser, }: {
5
+ tinaSchema: TinaSchema;
6
+ resolver: Resolver;
7
+ sub?: string;
8
+ password: string;
9
+ info: GraphQLResolveInfo;
10
+ ctxUser?: {
11
+ sub?: string;
12
+ };
13
+ }): Promise<any>;
14
+ export declare function handleAuthorize({ tinaSchema, resolver, sub, ctxUser, }: {
15
+ tinaSchema: TinaSchema;
16
+ resolver: Resolver;
17
+ sub?: string;
18
+ info: GraphQLResolveInfo;
19
+ ctxUser?: {
20
+ sub?: string;
21
+ };
22
+ }): Promise<any>;
23
+ export declare function handleUpdatePassword({ tinaSchema, resolver, password, ctxUser, }: {
24
+ tinaSchema: TinaSchema;
25
+ resolver: Resolver;
26
+ password: string;
27
+ info: GraphQLResolveInfo;
28
+ ctxUser?: {
29
+ sub?: string;
30
+ };
31
+ }): Promise<boolean>;
@@ -15,6 +15,7 @@ export declare class TinaGraphQLError extends Error implements GraphQLError {
15
15
  constructor(message: string, extensions?: Record<string, any>);
16
16
  }
17
17
  export type TypeFetchErrorArgs = {
18
+ /** @deprecated */
18
19
  stack?: string;
19
20
  file?: string;
20
21
  includeAuditMessage?: boolean;
@@ -22,7 +23,6 @@ export type TypeFetchErrorArgs = {
22
23
  collection?: string;
23
24
  };
24
25
  export declare class TinaFetchError extends Error {
25
- stack?: string;
26
26
  collection?: string;
27
27
  file?: string;
28
28
  originalError: Error;
@@ -30,16 +30,9 @@ export declare class TinaFetchError extends Error {
30
30
  }
31
31
  export declare class TinaQueryError extends TinaFetchError {
32
32
  stack?: string;
33
- collection?: string;
34
- file?: string;
35
- originalError: Error;
36
33
  constructor(args: TypeFetchErrorArgs);
37
34
  }
38
35
  export declare class TinaParseDocumentError extends TinaFetchError {
39
- stack?: string;
40
- collection?: string;
41
- file?: string;
42
- originalError: Error;
43
36
  constructor(args: TypeFetchErrorArgs);
44
37
  toString(): string;
45
38
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  */
4
4
  import { Database } from '../database';
5
- import type { Collectable, Collection, TinaField, Template, TinaSchema } from '@tinacms/schema-tools';
5
+ import type { Collectable, Collection, Template, TinaField, TinaSchema } from '@tinacms/schema-tools';
6
6
  import type { GraphQLConfig } from '../types';
7
7
  interface ResolverConfig {
8
8
  config?: GraphQLConfig;
@@ -74,10 +74,10 @@ export declare class Resolver {
74
74
  name: string;
75
75
  }[];
76
76
  }[];
77
- format?: "json" | "md" | "markdown" | "mdx" | "yaml" | "yml" | "toml";
77
+ format?: import("@tinacms/schema-tools").ContentFormat;
78
78
  ui?: import("@tinacms/schema-tools").UICollection;
79
79
  defaultItem?: import("@tinacms/schema-tools").DefaultItem<Record<string, any>>;
80
- frontmatterFormat?: "yaml" | "toml" | "json";
80
+ frontmatterFormat?: import("@tinacms/schema-tools").ContentFrontmatterFormat;
81
81
  frontmatterDelimiters?: [string, string] | string;
82
82
  match?: {
83
83
  include?: string;
@@ -102,10 +102,10 @@ export declare class Resolver {
102
102
  name: string;
103
103
  }[];
104
104
  }[];
105
- format?: "json" | "md" | "markdown" | "mdx" | "yaml" | "yml" | "toml";
105
+ format?: import("@tinacms/schema-tools").ContentFormat;
106
106
  ui?: import("@tinacms/schema-tools").UICollection;
107
107
  defaultItem?: import("@tinacms/schema-tools").DefaultItem<Record<string, any>>;
108
- frontmatterFormat?: "yaml" | "toml" | "json";
108
+ frontmatterFormat?: import("@tinacms/schema-tools").ContentFrontmatterFormat;
109
109
  frontmatterDelimiters?: [string, string] | string;
110
110
  match?: {
111
111
  include?: string;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
 
3
3
  */
4
- import type { GraphQLConfig } from '../types';
5
4
  import type { Schema } from '@tinacms/schema-tools';
5
+ import type { GraphQLConfig } from '../types';
6
6
  /**
7
- * Strips away the Tina Cloud Asset URL from an `image` value
7
+ * Strips away the TinaCloud Asset URL from an `image` value
8
8
  *
9
9
  * @param {string | string[]} value
10
10
  * @param {GraphQLConfig} config
@@ -12,7 +12,7 @@ import type { Schema } from '@tinacms/schema-tools';
12
12
  */
13
13
  export declare const resolveMediaCloudToRelative: (value: string | string[], config: GraphQLConfig, schema: Schema<true>) => string | string[];
14
14
  /**
15
- * Adds Tina Cloud Asset URL to an `image` value
15
+ * Adds TinaCloud Asset URL to an `image` value
16
16
  *
17
17
  * @param {string | string[]} value
18
18
  * @param {GraphQLConfig} config
@@ -1,6 +1,3 @@
1
- /**
2
-
3
- */
4
1
  import { TinaSchema, Schema } from '@tinacms/schema-tools';
5
2
  export declare const createSchema: ({ schema, flags, }: {
6
3
  schema: Schema;
@@ -1,6 +1,3 @@
1
- /**
2
-
3
- */
4
1
  import { type Schema, type Collection } from '@tinacms/schema-tools';
5
2
  export declare const validateSchema: (schema: Schema) => Promise<{
6
3
  collections: Collection<true>[];
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "0.0.0-b551232-20250318064010",
3
+ "type": "module",
4
+ "version": "0.0.0-b749957-20251208035121",
4
5
  "main": "dist/index.js",
5
- "module": "dist/index.mjs",
6
- "typings": "dist/index.d.ts",
6
+ "module": "./dist/index.js",
7
7
  "files": [
8
8
  "package.json",
9
9
  "dist"
10
10
  ],
11
11
  "exports": {
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
14
16
  },
15
17
  "license": "SEE LICENSE IN LICENSE",
16
18
  "buildConfig": {
@@ -26,6 +28,7 @@
26
28
  "@iarna/toml": "^2.2.5",
27
29
  "abstract-level": "^1.0.4",
28
30
  "date-fns": "^2.30.0",
31
+ "es-toolkit": "^1.42.0",
29
32
  "fast-glob": "^3.3.3",
30
33
  "fs-extra": "^11.3.0",
31
34
  "glob-parent": "^6.0.2",
@@ -35,17 +38,13 @@
35
38
  "js-sha1": "^0.6.0",
36
39
  "js-yaml": "^3.14.1",
37
40
  "jsonpath-plus": "10.1.0",
38
- "lodash.clonedeep": "^4.5.0",
39
- "lodash.set": "^4.3.2",
40
- "lodash.uniqby": "^4.7.0",
41
41
  "many-level": "^2.0.0",
42
42
  "micromatch": "4.0.8",
43
43
  "normalize-path": "^3.0.0",
44
44
  "readable-stream": "^4.7.0",
45
- "scmp": "^2.1.0",
46
- "yup": "^0.32.11",
47
- "@tinacms/mdx": "1.6.1",
48
- "@tinacms/schema-tools": "1.7.2"
45
+ "yup": "^1.6.1",
46
+ "@tinacms/mdx": "2.0.0",
47
+ "@tinacms/schema-tools": "2.0.0"
49
48
  },
50
49
  "publishConfig": {
51
50
  "registry": "https://registry.npmjs.org"
@@ -60,30 +59,25 @@
60
59
  "@types/express": "^4.17.21",
61
60
  "@types/fs-extra": "^9.0.13",
62
61
  "@types/js-yaml": "^3.12.10",
63
- "@types/lodash.camelcase": "^4.3.9",
64
- "@types/lodash.upperfirst": "^4.3.9",
65
62
  "@types/lru-cache": "^5.1.1",
66
63
  "@types/mdast": "^3.0.15",
67
64
  "@types/micromatch": "^4.0.9",
68
65
  "@types/node": "^22.13.1",
69
66
  "@types/normalize-path": "^3.0.2",
70
67
  "@types/ws": "^7.4.7",
71
- "@types/yup": "^0.29.14",
72
68
  "jest-file-snapshot": "^0.5.0",
73
69
  "memory-level": "^1.0.0",
74
- "nodemon": "3.1.4",
75
70
  "typescript": "^5.7.3",
76
71
  "vite": "^4.5.9",
77
72
  "vitest": "^0.32.4",
78
73
  "zod": "^3.24.2",
79
- "@tinacms/scripts": "1.3.3",
80
- "@tinacms/schema-tools": "1.7.2"
74
+ "@tinacms/schema-tools": "2.0.0",
75
+ "@tinacms/scripts": "0.0.0-b749957-20251208035121"
81
76
  },
82
77
  "scripts": {
83
78
  "types": "pnpm tsc",
84
79
  "build": "tinacms-scripts build",
85
80
  "docs": "pnpm typedoc",
86
- "serve": "pnpm nodemon dist/server.js",
87
81
  "test": "vitest run",
88
82
  "test-watch": "vitest"
89
83
  }