@tinacms/cli 1.5.10 → 1.5.12

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,5 +1,6 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import type { TypeDefinitionNode, GraphQLSchema } from 'graphql';
2
2
  import { ConfigManager } from '../config-manager';
3
+ import type { TinaSchema } from '@tinacms/schema-tools';
3
4
  export declare const TINA_HOST = "content.tinajs.io";
4
5
  export declare class Codegen {
5
6
  configManager: ConfigManager;
@@ -7,15 +8,33 @@ export declare class Codegen {
7
8
  schema: GraphQLSchema;
8
9
  queryDoc: string;
9
10
  fragDoc: string;
10
- constructor({ configManager, port, schema, queryDoc, fragDoc, }: {
11
+ isLocal: boolean;
12
+ apiURL: string;
13
+ localUrl: string;
14
+ productionUrl: string;
15
+ graphqlSchemaDoc: {
16
+ kind: 'Document';
17
+ definitions: TypeDefinitionNode[];
18
+ };
19
+ tinaSchema: TinaSchema;
20
+ lookup: any;
21
+ constructor({ configManager, port, queryDoc, fragDoc, isLocal, graphqlSchemaDoc, tinaSchema, lookup, }: {
11
22
  configManager: ConfigManager;
12
23
  port?: number;
13
- schema: GraphQLSchema;
14
24
  queryDoc: string;
15
25
  fragDoc: string;
26
+ isLocal: boolean;
27
+ graphqlSchemaDoc: {
28
+ kind: 'Document';
29
+ definitions: TypeDefinitionNode[];
30
+ };
31
+ tinaSchema: TinaSchema;
32
+ lookup: any;
16
33
  });
34
+ writeConfigFile(fileName: string, data: string): Promise<void>;
17
35
  removeGeneratedFilesIfExists(): Promise<void>;
18
36
  execute(): Promise<string>;
37
+ private _createApiUrl;
19
38
  getApiURL(): string;
20
39
  genClient(): Promise<{
21
40
  apiURL: string;
@@ -0,0 +1,26 @@
1
+ import { Command } from 'clipanion';
2
+ import type { DocumentNode } from 'graphql';
3
+ import type { Database } from '@tinacms/graphql';
4
+ import type { TinaSchema } from '@tinacms/schema-tools';
5
+ /**
6
+ * Base Command for Dev and build
7
+ */
8
+ export declare abstract class BaseCommand extends Command {
9
+ experimentalDataLayer: boolean;
10
+ isomorphicGitBridge: boolean;
11
+ port: string;
12
+ datalayerPort: string;
13
+ subCommand: string;
14
+ rootPath: string;
15
+ verbose: boolean;
16
+ noSDK: boolean;
17
+ noTelemetry: boolean;
18
+ abstract execute(): Promise<number | void>;
19
+ startSubCommand(): Promise<void>;
20
+ logDeprecationWarnings(): void;
21
+ indexContentWithSpinner({ database, graphQLSchema, tinaSchema, }: {
22
+ database: Database;
23
+ graphQLSchema: DocumentNode;
24
+ tinaSchema: TinaSchema;
25
+ }): Promise<void>;
26
+ }
@@ -1,17 +1,14 @@
1
- import { Command } from 'clipanion';
2
1
  import { Database } from '@tinacms/graphql';
3
2
  import { ConfigManager } from '../../config-manager';
4
- export declare class BuildCommand extends Command {
3
+ import { BaseCommand } from '../baseCommands';
4
+ export declare class BuildCommand extends BaseCommand {
5
5
  static paths: string[][];
6
- rootPath: string;
7
- verbose: boolean;
8
- noSDK: boolean;
9
- datalayerPort: string;
10
- isomorphicGitBridge: boolean;
11
6
  localOption: boolean;
12
- experimentalDataLayer: boolean;
13
- noTelemetry: boolean;
14
7
  tinaGraphQLVersion: string;
8
+ /**
9
+ * This option allows the user to skip the tina cloud checks if they want to. This could be useful for mismatched GraphQL versions or if they want to build only using the local client and never connect to Tina Cloud
10
+ */
11
+ skipCloudChecks: boolean;
15
12
  static usage: import("clipanion").Usage;
16
13
  catch(error: any): Promise<void>;
17
14
  execute(): Promise<number | void>;
@@ -1,21 +1,13 @@
1
- import { Command } from 'clipanion';
2
1
  import { Database } from '@tinacms/graphql';
3
2
  import { ConfigManager } from '../../config-manager';
4
- export declare class DevCommand extends Command {
3
+ import { BaseCommand } from '../baseCommands';
4
+ export declare class DevCommand extends BaseCommand {
5
5
  static paths: string[][];
6
- port: string;
7
- datalayerPort: string;
8
- subCommand: string;
9
- rootPath: string;
10
6
  watchFolders: string;
11
- isomorphicGitBridge: boolean;
12
- experimentalDataLayer: boolean;
13
- verbose: boolean;
14
7
  noWatch: boolean;
15
- noSDK: boolean;
16
- noTelemetry: boolean;
17
8
  static usage: import("clipanion").Usage;
18
9
  catch(error: any): Promise<void>;
10
+ logDeprecationWarnings(): void;
19
11
  execute(): Promise<number | void>;
20
12
  watchContentFiles(configManager: ConfigManager, database: Database): void;
21
13
  watchQueries(configManager: ConfigManager, callback: () => Promise<string>): void;
@@ -2,6 +2,7 @@ import type { Loader } from 'esbuild';
2
2
  import { Config } from '@tinacms/schema-tools';
3
3
  export declare const TINA_FOLDER = "tina";
4
4
  export declare const LEGACY_TINA_FOLDER = ".tina";
5
+ export declare const GENERATED_FOLDER = "__generated__";
5
6
  export declare class ConfigManager {
6
7
  config: Config;
7
8
  rootPath: string;
@@ -12,6 +13,7 @@ export declare class ConfigManager {
12
13
  contentRootPath?: string;
13
14
  envFilePath: string;
14
15
  generatedFolderPath: string;
16
+ generatedFolderPathContentRepo: string;
15
17
  generatedGraphQLGQLPath: string;
16
18
  generatedGraphQLJSONPath: string;
17
19
  generatedSchemaJSONPath: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "1.5.10",
3
+ "version": "1.5.12",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -58,11 +58,11 @@
58
58
  "@tailwindcss/aspect-ratio": "^0.4.0",
59
59
  "@tailwindcss/line-clamp": "^0.3.1",
60
60
  "@tailwindcss/typography": "^0.5.9",
61
- "@tinacms/app": "1.2.10",
62
- "@tinacms/datalayer": "1.2.10",
63
- "@tinacms/graphql": "1.4.10",
61
+ "@tinacms/app": "1.2.12",
62
+ "@tinacms/datalayer": "1.2.12",
63
+ "@tinacms/graphql": "1.4.12",
64
64
  "@tinacms/metrics": "1.0.2",
65
- "@tinacms/schema-tools": "1.4.3",
65
+ "@tinacms/schema-tools": "1.4.4",
66
66
  "@vitejs/plugin-react": "3.1.0",
67
67
  "ajv": "^6.12.3",
68
68
  "altair-express-middleware": "4.0.6",
@@ -74,7 +74,6 @@
74
74
  "chokidar": "^3.5.1",
75
75
  "cli-spinner": "^0.2.10",
76
76
  "clipanion": "^3.2.0",
77
- "commander": "^9.0.0",
78
77
  "cors": "^2.8.5",
79
78
  "dotenv": "^16.0.1",
80
79
  "esbuild": "^0.15.5",