@tinacms/cli 1.3.2 → 1.4.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.
Files changed (54) hide show
  1. package/bin/tinacms +3 -1
  2. package/dist/cmds/forestry-migrate/util/index.d.ts +14 -14
  3. package/dist/cmds/init/index.d.ts +4 -1
  4. package/dist/index.d.ts +3 -2
  5. package/dist/index.js +2229 -2070
  6. package/dist/logger/index.d.ts +16 -3
  7. package/dist/logger/is-unicode-supported.d.ts +1 -0
  8. package/dist/next/codegen/codegen/index.d.ts +5 -0
  9. package/dist/{codegen → next/codegen/codegen}/plugin.d.ts +2 -2
  10. package/dist/{codegen → next/codegen/codegen}/sdkPlugin/index.d.ts +1 -1
  11. package/dist/next/codegen/index.d.ts +30 -0
  12. package/dist/{cmds/audit → next/commands/audit-command}/audit.d.ts +7 -5
  13. package/dist/next/commands/audit-command/index.d.ts +12 -0
  14. package/dist/next/commands/build-command/index.d.ts +23 -0
  15. package/dist/next/commands/build-command/server.d.ts +3 -0
  16. package/dist/next/commands/build-command/tailwind.d.ts +2 -0
  17. package/dist/next/commands/build-command/waitForDB.d.ts +7 -0
  18. package/dist/next/commands/codemod-command/index.d.ts +9 -0
  19. package/dist/next/commands/codemod-command/server/index.d.ts +2 -0
  20. package/dist/next/commands/dev-command/html.d.ts +1 -0
  21. package/dist/next/commands/dev-command/index.d.ts +21 -0
  22. package/dist/next/commands/dev-command/server/index.d.ts +3 -0
  23. package/dist/next/commands/dev-command/server/media.d.ts +45 -0
  24. package/dist/next/commands/dev-command/tailwind.d.ts +2 -0
  25. package/dist/next/commands/init-command/index.d.ts +9 -0
  26. package/dist/next/config-manager.d.ts +54 -0
  27. package/dist/next/database.d.ts +4 -0
  28. package/dist/next/vite/index.d.ts +12 -0
  29. package/dist/next/vite/tailwind.d.ts +2 -0
  30. package/dist/utils/sleep.d.ts +4 -0
  31. package/dist/utils/start-subprocess.d.ts +5 -0
  32. package/package.json +17 -6
  33. package/dist/buildTina/attachDatabase.d.ts +0 -8
  34. package/dist/buildTina/attachPath.d.ts +0 -5
  35. package/dist/buildTina/git.d.ts +0 -13
  36. package/dist/buildTina/index.d.ts +0 -71
  37. package/dist/cmds/audit/index.d.ts +0 -5
  38. package/dist/cmds/baseCmds.d.ts +0 -11
  39. package/dist/cmds/compile/defaultSchema.d.ts +0 -4
  40. package/dist/cmds/compile/index.d.ts +0 -24
  41. package/dist/cmds/query-gen/genTypes.d.ts +0 -16
  42. package/dist/cmds/query-gen/index.d.ts +0 -4
  43. package/dist/cmds/start-server/errors/index.d.ts +0 -10
  44. package/dist/cmds/start-server/index.d.ts +0 -27
  45. package/dist/cmds/start-server/lock.d.ts +0 -9
  46. package/dist/cmds/start-server/server.d.ts +0 -5
  47. package/dist/cmds/startSubprocess/index.d.ts +0 -8
  48. package/dist/cmds/statusChecks/checkClientInformation.d.ts +0 -32
  49. package/dist/cmds/statusChecks/waitForIndexing.d.ts +0 -11
  50. package/dist/codegen/index.d.ts +0 -8
  51. package/dist/command.d.ts +0 -19
  52. package/dist/middleware.d.ts +0 -4
  53. /package/dist/{codegen → next/codegen/codegen}/sdkPlugin/config.d.ts +0 -0
  54. /package/dist/{codegen → next/codegen/codegen}/sdkPlugin/visitor.d.ts +0 -0
@@ -1,5 +1,18 @@
1
- /**
2
-
3
- */
4
1
  import log4js from 'log4js';
5
2
  export declare const logger: log4js.Logger;
3
+ export declare const note: (message?: string, title?: string) => void;
4
+ export declare const log: (message?: string) => void;
5
+ export declare const warn: (message?: string, path?: string) => void;
6
+ export declare const err: (message?: string, path?: string) => void;
7
+ export declare const tnote: (message?: string, title?: string) => void;
8
+ export declare const summary: (content: {
9
+ heading: string;
10
+ items: {
11
+ heading: string;
12
+ emoji: string;
13
+ subItems: {
14
+ key: string;
15
+ value: string;
16
+ }[];
17
+ }[];
18
+ }) => void;
@@ -0,0 +1 @@
1
+ export default function isUnicodeSupported(): boolean;
@@ -0,0 +1,5 @@
1
+ /**
2
+
3
+ */
4
+ import { GraphQLSchema } from 'graphql';
5
+ export declare const generateTypes: (schema: GraphQLSchema, queryPathGlob: string, fragDocPath: string, apiURL: string) => Promise<string>;
@@ -2,7 +2,7 @@
2
2
 
3
3
  */
4
4
  import type { PluginFunction } from '@graphql-codegen/plugin-helpers';
5
- export declare const AddGeneratedClientFunc: PluginFunction;
6
- export declare const AddGeneratedClient: {
5
+ export declare const AddGeneratedClientFunc: (apiURL: string) => PluginFunction;
6
+ export declare const AddGeneratedClient: (apiURL: string) => {
7
7
  plugin: PluginFunction<any, import("@graphql-codegen/plugin-helpers").Types.PluginOutput>;
8
8
  };
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * This is the same as the above link and may need to be updated time to time. (for example if we want to support GQL v16). There is only one line that differs from the original. (This is shown)
12
12
  */
13
- import { PluginFunction, PluginValidateFn } from '@graphql-codegen/plugin-helpers';
13
+ import type { PluginFunction, PluginValidateFn } from '@graphql-codegen/plugin-helpers';
14
14
  import { RawGenericSdkPluginConfig } from './config';
15
15
  import { GenericSdkVisitor } from './visitor';
16
16
  export declare const plugin: PluginFunction<RawGenericSdkPluginConfig>;
@@ -0,0 +1,30 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { ConfigManager } from '../config-manager';
3
+ export declare const TINA_HOST = "content.tinajs.io";
4
+ export declare class Codegen {
5
+ configManager: ConfigManager;
6
+ port?: number;
7
+ schema: GraphQLSchema;
8
+ queryDoc: string;
9
+ fragDoc: string;
10
+ noSDK: boolean;
11
+ constructor({ configManager, port, schema, noSDK, queryDoc, fragDoc, }: {
12
+ configManager: ConfigManager;
13
+ port?: number;
14
+ schema: GraphQLSchema;
15
+ noSDK: boolean;
16
+ queryDoc: string;
17
+ fragDoc: string;
18
+ });
19
+ removeGeneratedFilesIfExists(): Promise<void>;
20
+ execute(): Promise<string>;
21
+ getApiURL(): string;
22
+ genClient(): Promise<{
23
+ apiURL: string;
24
+ clientString: string;
25
+ }>;
26
+ genTypes(): Promise<{
27
+ codeString: string;
28
+ schemaString: string;
29
+ }>;
30
+ }
@@ -1,11 +1,14 @@
1
- /**
2
-
3
- */
4
1
  import type { Database, Collection } from '@tinacms/graphql';
2
+ export declare const audit: ({ database, clean, useDefaultValues, noTelemetry, verbose, }: {
3
+ database: Database;
4
+ clean?: boolean;
5
+ useDefaultValues?: boolean;
6
+ noTelemetry?: boolean;
7
+ verbose?: boolean;
8
+ }) => Promise<void>;
5
9
  declare type AuditArgs = {
6
10
  collection: Collection<true>;
7
11
  database: Database;
8
- rootPath: string;
9
12
  documents: {
10
13
  node: {
11
14
  path: string;
@@ -14,7 +17,6 @@ declare type AuditArgs = {
14
17
  useDefaultValues: boolean;
15
18
  verbose?: boolean;
16
19
  };
17
- export declare const auditCollection: (args: AuditArgs) => Promise<boolean>;
18
20
  export declare const auditDocuments: (args: AuditArgs) => Promise<boolean>;
19
21
  export declare const transformDocumentIntoMutationRequestPayload: (document: {
20
22
  [key: string]: unknown;
@@ -0,0 +1,12 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class AuditCommand extends Command {
3
+ static paths: string[][];
4
+ rootPath: string;
5
+ verbose: boolean;
6
+ clean: boolean;
7
+ useDefaultValues: boolean;
8
+ noTelemetry: boolean;
9
+ static usage: import("clipanion").Usage;
10
+ catch(error: any): Promise<void>;
11
+ execute(): Promise<number | void>;
12
+ }
@@ -0,0 +1,23 @@
1
+ import { Command } from 'clipanion';
2
+ import { Database } from '@tinacms/graphql';
3
+ import { ConfigManager } from '../../config-manager';
4
+ export declare class BuildCommand extends Command {
5
+ static paths: string[][];
6
+ rootPath: string;
7
+ verbose: boolean;
8
+ noSDK: boolean;
9
+ isomorphicGitBridge: boolean;
10
+ localOption: boolean;
11
+ experimentalDataLayer: boolean;
12
+ noTelemetry: boolean;
13
+ tinaGraphQLVersion: string;
14
+ static usage: import("clipanion").Usage;
15
+ catch(error: any): Promise<void>;
16
+ execute(): Promise<number | void>;
17
+ checkClientInfo(configManager: ConfigManager, apiURL: string): Promise<void>;
18
+ checkGraphqlSchema(configManager: ConfigManager, database: Database, apiURL: string): Promise<void>;
19
+ }
20
+ export declare const fetchRemoteGraphqlSchema: ({ url, token, }: {
21
+ url: string;
22
+ token?: string;
23
+ }) => Promise<any>;
@@ -0,0 +1,3 @@
1
+ import { Database } from '@tinacms/graphql';
2
+ import { ConfigManager } from '../../config-manager';
3
+ export declare const buildProductionSpa: (configManager: ConfigManager, database: Database, apiURL: string, noSDK: boolean) => Promise<import("rollup").RollupOutput | import("rollup").RollupOutput[] | import("rollup").RollupWatcher>;
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'vite';
2
+ export declare const tinaTailwind: (spaPath: string, configFilePath: any) => Plugin;
@@ -0,0 +1,7 @@
1
+ import { Config } from '@tinacms/schema-tools';
2
+ export interface IndexStatusResponse {
3
+ status: 'inprogress' | 'complete' | 'failed' | 'unknown';
4
+ timestamp: number;
5
+ error?: string;
6
+ }
7
+ export declare const waitForDB: (config: Config<true>, apiUrl: string, verbose?: boolean) => Promise<void>;
@@ -0,0 +1,9 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class CodemodCommand extends Command {
3
+ static paths: string[][];
4
+ rootPath: string;
5
+ verbose: boolean;
6
+ static usage: import("clipanion").Usage;
7
+ catch(error: any): Promise<void>;
8
+ execute(): Promise<number | void>;
9
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="node" />
2
+ export declare const createDBServer: () => import("net").Server;
@@ -0,0 +1 @@
1
+ export declare const devHTML: (port: string) => string;
@@ -0,0 +1,21 @@
1
+ import { Command } from 'clipanion';
2
+ import { Database } from '@tinacms/graphql';
3
+ import { ConfigManager } from '../../config-manager';
4
+ export declare class DevCommand extends Command {
5
+ static paths: string[][];
6
+ port: string;
7
+ subCommand: string;
8
+ rootPath: string;
9
+ watchFolders: string;
10
+ isomorphicGitBridge: boolean;
11
+ experimentalDataLayer: boolean;
12
+ verbose: boolean;
13
+ noWatch: boolean;
14
+ noSDK: boolean;
15
+ noTelemetry: boolean;
16
+ static usage: import("clipanion").Usage;
17
+ catch(error: any): Promise<void>;
18
+ execute(): Promise<number | void>;
19
+ watchContentFiles(configManager: ConfigManager, database: Database): void;
20
+ watchQueries(configManager: ConfigManager, callback: () => Promise<string>): void;
21
+ }
@@ -0,0 +1,3 @@
1
+ import { Database } from '@tinacms/graphql';
2
+ import { ConfigManager } from '../../../config-manager';
3
+ export declare const createDevServer: (configManager: ConfigManager, database: Database, apiURL: string, noSDK: boolean, noWatch: boolean) => Promise<import("vite").ViteDevServer>;
@@ -0,0 +1,45 @@
1
+ import type { Connect } from 'vite';
2
+ import type { ServerResponse } from 'http';
3
+ export declare const createMediaRouter: (config: PathConfig) => {
4
+ handleList: (req: any, res: any) => Promise<void>;
5
+ handleDelete: (req: Connect.IncomingMessage, res: any) => Promise<void>;
6
+ handlePost: (req: Connect.IncomingMessage, res: ServerResponse) => Promise<void>;
7
+ };
8
+ export declare const parseMediaFolder: (str: string) => string;
9
+ interface MediaArgs {
10
+ searchPath: string;
11
+ cursor?: string;
12
+ limit?: string;
13
+ }
14
+ interface File {
15
+ src: string;
16
+ filename: string;
17
+ size: number;
18
+ }
19
+ interface ListMediaRes {
20
+ directories: string[];
21
+ files: File[];
22
+ cursor?: string;
23
+ error?: string;
24
+ }
25
+ export interface PathConfig {
26
+ rootPath: string;
27
+ apiURL: string;
28
+ publicFolder: string;
29
+ mediaRoot: string;
30
+ }
31
+ declare type SuccessRecord = {
32
+ ok: true;
33
+ } | {
34
+ ok: false;
35
+ message: string;
36
+ };
37
+ export declare class MediaModel {
38
+ readonly rootPath: string;
39
+ readonly publicFolder: string;
40
+ readonly mediaRoot: string;
41
+ constructor({ rootPath, publicFolder, mediaRoot }: PathConfig);
42
+ listMedia(args: MediaArgs): Promise<ListMediaRes>;
43
+ deleteMedia(args: MediaArgs): Promise<SuccessRecord>;
44
+ }
45
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'vite';
2
+ export declare const tinaTailwind: (spaPath: string, configFilePath: any) => Plugin;
@@ -0,0 +1,9 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class InitCommand extends Command {
3
+ static paths: string[][];
4
+ rootPath: string;
5
+ noTelemetry: boolean;
6
+ static usage: import("clipanion").Usage;
7
+ catch(error: any): Promise<void>;
8
+ execute(): Promise<number | void>;
9
+ }
@@ -0,0 +1,54 @@
1
+ import { Config } from '@tinacms/schema-tools';
2
+ export declare const TINA_FOLDER = "tina";
3
+ export declare const LEGACY_TINA_FOLDER = ".tina";
4
+ export declare class ConfigManager {
5
+ config: Config;
6
+ rootPath: string;
7
+ tinaFolderPath: string;
8
+ isUsingLegacyFolder: boolean;
9
+ tinaConfigFilePath: string;
10
+ tinaSpaPackagePath: string;
11
+ contentRootPath?: string;
12
+ envFilePath: string;
13
+ generatedFolderPath: string;
14
+ generatedGraphQLGQLPath: string;
15
+ generatedGraphQLJSONPath: string;
16
+ generatedSchemaJSONPath: string;
17
+ generatedLookupJSONPath: string;
18
+ generatedTypesTSFilePath: string;
19
+ generatedTypesJSFilePath: string;
20
+ generatedTypesDFilePath: string;
21
+ generatedClientTSFilePath: string;
22
+ generatedClientJSFilePath: string;
23
+ generatedQueriesFilePath: string;
24
+ generatedFragmentsFilePath: string;
25
+ generatedQueriesAndFragmentsGlob: string;
26
+ userQueriesAndFragmentsGlob: string;
27
+ publicFolderPath: string;
28
+ outputFolderPath: string;
29
+ outputHTMLFilePath: string;
30
+ outputGitignorePath: string;
31
+ selfHostedDatabaseFilePath?: string;
32
+ spaRootPath: string;
33
+ spaMainPath: string;
34
+ spaHTMLPath: string;
35
+ tinaGraphQLVersionFromCLI?: string;
36
+ constructor(rootPath?: string, tinaGraphQLVersion?: string);
37
+ isUsingTs(): boolean;
38
+ hasSelfHostedConfig(): boolean;
39
+ hasSeparateContentRoot(): boolean;
40
+ processConfig(): Promise<void>;
41
+ getTinaFolderPath(rootPath: any): Promise<string>;
42
+ getTinaGraphQLVersion(): string;
43
+ printGeneratedClientFilePath(): string;
44
+ printGeneratedTypesFilePath(): string;
45
+ printoutputHTMLFilePath(): string;
46
+ printRelativePath(filename: string): string;
47
+ printContentRelativePath(filename: string): string;
48
+ /**
49
+ * Given a filepath without an extension, find the first match (eg. tsx, ts, jsx, js)
50
+ */
51
+ getPathWithExtension(filepath: string): Promise<any>;
52
+ loadDatabaseFile(): Promise<any>;
53
+ loadConfigFile(generatedFolderPath: string, configFilePath: string): Promise<any>;
54
+ }
@@ -0,0 +1,4 @@
1
+ import { Database, Bridge } from '@tinacms/graphql';
2
+ import { ConfigManager } from './config-manager';
3
+ export declare const createDBServer: () => void;
4
+ export declare function createAndInitializeDatabase(configManager: ConfigManager, bridgeOverride?: Bridge): Promise<Database>;
@@ -0,0 +1,12 @@
1
+ import { BuildOptions, InlineConfig, Plugin } from 'vite';
2
+ import { Database } from '@tinacms/graphql';
3
+ import { ConfigManager } from '../config-manager';
4
+ export declare const createConfig: ({ configManager, database, apiURL, plugins, noSDK, noWatch, rollupOptions, }: {
5
+ configManager: ConfigManager;
6
+ database: Database;
7
+ apiURL: string;
8
+ noSDK: boolean;
9
+ noWatch: boolean;
10
+ plugins?: Plugin[];
11
+ rollupOptions?: BuildOptions['rollupOptions'];
12
+ }) => Promise<InlineConfig>;
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'vite';
2
+ export declare const tinaTailwind: (spaPath: string, configFilePath: any) => Plugin;
@@ -0,0 +1,4 @@
1
+ export declare function sleepAndCallFunc<T>({ fn, ms, }: {
2
+ fn: () => Promise<T>;
3
+ ms: number;
4
+ }): Promise<T>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ import childProcess from 'child_process';
3
+ export declare const startSubprocess2: ({ command }: {
4
+ command: string;
5
+ }) => Promise<childProcess.ChildProcess>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  ]
22
22
  },
23
23
  "devDependencies": {
24
- "@tinacms/scripts": "1.0.4",
24
+ "@tinacms/scripts": "1.1.0",
25
25
  "@types/clear": "0.1.0",
26
26
  "@types/cli-spinner": "^0.2.1",
27
27
  "@types/cors": "2.8.5",
@@ -53,19 +53,24 @@
53
53
  "@graphql-inspector/core": "^4.0.0",
54
54
  "@graphql-tools/graphql-file-loader": "^7.2.0",
55
55
  "@graphql-tools/load": "^7.3.2",
56
- "@tinacms/app": "1.1.2",
57
- "@tinacms/datalayer": "1.1.5",
58
- "@tinacms/graphql": "1.3.4",
56
+ "@tailwindcss/aspect-ratio": "^0.4.0",
57
+ "@tailwindcss/line-clamp": "^0.3.1",
58
+ "@tailwindcss/typography": "^0.5.9",
59
+ "@tinacms/app": "1.2.0",
60
+ "@tinacms/datalayer": "1.2.0",
61
+ "@tinacms/graphql": "1.4.0",
59
62
  "@tinacms/metrics": "1.0.2",
60
- "@tinacms/schema-tools": "1.3.3",
63
+ "@tinacms/schema-tools": "1.4.0",
61
64
  "ajv": "^6.12.3",
62
65
  "altair-express-middleware": "4.0.6",
63
66
  "auto-bind": "^4.0.0",
64
67
  "axios": "0.21.2",
65
68
  "body-parser": "^1.19.0",
69
+ "busboy": "^1.6.0",
66
70
  "chalk": "^2.4.2",
67
71
  "chokidar": "^3.5.1",
68
72
  "cli-spinner": "^0.2.10",
73
+ "clipanion": "^3.2.0",
69
74
  "commander": "^9.0.0",
70
75
  "cors": "^2.8.5",
71
76
  "dotenv": "^16.0.1",
@@ -75,6 +80,7 @@
75
80
  "fs-extra": "^9.0.1",
76
81
  "graphql": "15.8.0",
77
82
  "ini": "^3.0.0",
83
+ "is-unicode-supported": "^1.3.0",
78
84
  "js-yaml": "^4.0.0",
79
85
  "lodash": "^4.17.19",
80
86
  "lodash.get": "^4.4.2",
@@ -83,12 +89,17 @@
83
89
  "memory-level": "^1.0.0",
84
90
  "minimatch": "^5.1.2",
85
91
  "multer": "1.4.5-lts.1",
92
+ "node-fetch": "2",
86
93
  "normalize-path": "^3.0.0",
94
+ "postcss-nested": "^5.0.6",
87
95
  "prettier": "^2.2.1",
88
96
  "progress": "^2.0.3",
89
97
  "prompts": "^2.4.1",
90
98
  "readable-stream": "^4.3.0",
99
+ "rollup-plugin-visualizer": "^5.9.0",
100
+ "tailwindcss": "^3.2.7",
91
101
  "url-pattern": "^1.0.3",
102
+ "vite": "^4.1.4",
92
103
  "yarn": "^1.22.17",
93
104
  "yup": "^0.32.9",
94
105
  "zod": "^3.14.3"
@@ -1,8 +0,0 @@
1
- /**
2
-
3
- */
4
- export declare const attachDatabase: (ctx: any, next: () => void, _options: {
5
- isomorphicGitBridge: boolean;
6
- dev: boolean;
7
- verbose: boolean;
8
- }) => Promise<void>;
@@ -1,5 +0,0 @@
1
- /**
2
-
3
- */
4
- export declare const attachPath: (ctx: any, next: () => void, options: any) => Promise<void>;
5
- export declare const isProjectTs: (rootPath: string) => Promise<boolean>;
@@ -1,13 +0,0 @@
1
- /**
2
-
3
- */
4
- import { FilesystemBridge } from '@tinacms/datalayer';
5
- export declare function makeIsomorphicOptions(fsBridge: FilesystemBridge): Promise<{
6
- gitRoot: string;
7
- author: {
8
- name: string;
9
- email: string;
10
- };
11
- onPut: (filepath: string, data: string) => Promise<void>;
12
- onDelete: (filepath: string) => Promise<void>;
13
- }>;
@@ -1,71 +0,0 @@
1
- /**
2
-
3
- */
4
- import { Database } from '@tinacms/graphql';
5
- import { DocumentNode } from 'graphql';
6
- interface ClientGenOptions {
7
- noSDK?: boolean;
8
- local?: boolean;
9
- verbose?: boolean;
10
- port?: number;
11
- rootPath?: string;
12
- }
13
- interface BuildOptions {
14
- local: boolean;
15
- dev?: boolean;
16
- verbose?: boolean;
17
- rootPath?: string;
18
- }
19
- interface BuildSetupOptions {
20
- isomorphicGitBridge?: boolean;
21
- experimentalData?: boolean;
22
- }
23
- export declare const buildSetupCmdBuild: (ctx: any, next: () => void, opts: BuildSetupOptions) => Promise<void>;
24
- export declare const buildSetupCmdServerStart: (ctx: any, next: () => void, opts: BuildSetupOptions) => Promise<void>;
25
- export declare const buildSetupCmdAudit: (ctx: any, next: () => void, options: {
26
- clean: boolean;
27
- }) => Promise<void>;
28
- export declare const buildCmdBuild: (ctx: {
29
- builder: ConfigBuilder;
30
- database: Database;
31
- graphQLSchema: DocumentNode;
32
- rootPath: string;
33
- usingTs: boolean;
34
- schema: unknown;
35
- apiUrl: string;
36
- tinaSchema: any;
37
- }, next: () => void, options: Omit<BuildOptions & BuildSetupOptions & ClientGenOptions, 'bridge' | 'database' | 'store'>) => Promise<void>;
38
- export declare const auditCmdBuild: (ctx: {
39
- builder: ConfigBuilder;
40
- rootPath: string;
41
- database: Database;
42
- }, next: () => void, options: Omit<BuildOptions & BuildSetupOptions, 'bridge' | 'database' | 'store'>) => Promise<void>;
43
- export declare const indexIntoSelfHostedDatabase: (ctx: {
44
- builder: ConfigBuilder;
45
- isSelfHostedDatabase?: boolean;
46
- rootPath: string;
47
- database: Database;
48
- graphQLSchema: DocumentNode;
49
- schema: any;
50
- tinaSchema: any;
51
- }, next: () => void) => Promise<void>;
52
- export declare class ConfigBuilder {
53
- private database;
54
- constructor(database: Database);
55
- build({ dev, verbose, rootPath, local }: BuildOptions): Promise<{
56
- schema: any;
57
- graphQLSchema: DocumentNode;
58
- tinaSchema: any;
59
- }>;
60
- genTypedClient({ usingTs, compiledSchema, noSDK, verbose, local, port, rootPath, }: ClientGenOptions & {
61
- usingTs: boolean;
62
- compiledSchema: any;
63
- }): Promise<string>;
64
- }
65
- export declare const buildAdmin: ({ schema, local, rootPath, apiUrl, }: {
66
- schema: any;
67
- local: boolean;
68
- rootPath: string;
69
- apiUrl: string;
70
- }) => Promise<void>;
71
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
-
3
- */
4
- export declare const audit: (ctx: any, next: () => void, options: any) => Promise<void>;
5
- export declare const printFinalMessage: (ctx: any, next: () => void, _options: any) => Promise<void>;
@@ -1,11 +0,0 @@
1
- /**
2
-
3
- */
4
- import 'dotenv/config';
5
- import { Command } from '../command';
6
- export declare const CMD_START_SERVER = "server:start";
7
- export declare const CMD_DEV = "dev";
8
- export declare const INIT = "init";
9
- export declare const AUDIT = "audit";
10
- export declare const CMD_BUILD = "build";
11
- export declare const baseCmds: Command[];
@@ -1,4 +0,0 @@
1
- /**
2
-
3
- */
4
- export declare const defaultSchema = "\nimport { defineSchema, defineConfig } from 'tinacms'\nimport { client } from './__generated__/client'\n\n\nconst branch =\n process.env.NEXT_PUBLIC_TINA_BRANCH ||\n process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF ||\n process.env.HEAD ||\n 'main'\nconst schema = defineSchema({\n // See https://tina.io/docs/tina-cloud/connecting-site/ for more information about this config\n config: {\n token: '<Your Read Only Token>', // generated on app.tina.io,\n clientId: '<Your Client ID>', // generated on app.tina.io\n branch,\n },\n collections: [\n {\n label: 'Blog Posts',\n name: 'post',\n path: 'content/posts',\n format: 'mdx',\n ui: {\n router: ({ document }) => {\n // This can be used to add contextual editing to your site. See https://tina.io/docs/tinacms-context/#accessing-contextual-editing-from-the-cms for more information.\n return `/demo/blog/${document._sys.filename}`\n },\n },\n fields: [\n {\n type: 'string',\n label: 'Title',\n name: 'title',\n },\n {\n type: 'rich-text',\n label: 'Blog Post Body',\n name: 'body',\n isBody: true,\n templates: [\n {\n name: 'PageSection',\n label: 'Page Section',\n fields: [\n {\n type: 'string',\n name: 'heading',\n label: 'Heading',\n },\n {\n type: 'string',\n name: 'content',\n label: 'Content',\n ui: {\n component: 'textarea',\n },\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n})\n\nexport default schema\n\n// Your tina config\n\nexport const tinaConfig = defineConfig({\n client,\n schema,\n})\n\n";
@@ -1,24 +0,0 @@
1
- /**
2
-
3
- */
4
- import { Platform } from 'esbuild';
5
- import type { Schema } from '@tinacms/graphql';
6
- export declare const resetGeneratedFolder: ({ tinaGeneratedPath, usingTs, isBuild, }: {
7
- tinaGeneratedPath: string;
8
- usingTs: boolean;
9
- isBuild: boolean;
10
- }) => Promise<void>;
11
- export declare const compileFile: (options: {
12
- schemaFileType?: string;
13
- verbose?: boolean;
14
- dev?: boolean;
15
- rootPath: string;
16
- }, fileName: string) => Promise<{}>;
17
- export declare const compileSchema: (options: {
18
- schemaFileType?: string;
19
- verbose?: boolean;
20
- dev?: boolean;
21
- rootPath: string;
22
- }) => Promise<any>;
23
- export declare const transpile: (inputFile: any, outputFile: any, tempDir: any, verbose: any, define: any, packageJSONFilePath: string, platform?: Platform) => Promise<void>;
24
- export declare const defineSchema: (config: Schema) => Schema<false>;
@@ -1,16 +0,0 @@
1
- /**
2
-
3
- */
4
- import { GraphQLSchema } from 'graphql';
5
- import { Schema } from '@tinacms/schema-tools';
6
- export declare const TINA_HOST = "content.tinajs.io";
7
- export declare function genClient({ tinaSchema, usingTs, rootPath, }: {
8
- tinaSchema: Schema;
9
- usingTs?: boolean;
10
- rootPath: string;
11
- }, options: any): Promise<string>;
12
- export declare function genTypes({ schema, usingTs, rootPath, }: {
13
- schema: GraphQLSchema;
14
- usingTs?: boolean;
15
- rootPath: string;
16
- }, next: () => void, options: any): Promise<void>;
@@ -1,4 +0,0 @@
1
- /**
2
-
3
- */
4
- export * from './genTypes';
@@ -1,10 +0,0 @@
1
- /**
2
-
3
- */
4
- export declare class BuildSchemaError extends Error {
5
- constructor(message: any);
6
- }
7
- export declare class ExecuteSchemaError extends Error {
8
- constructor(message: any);
9
- }
10
- export declare const handleServerErrors: (e: Error) => void;