@tinacms/cli 0.0.0-e0ddb8c-20241004065742 → 0.0.0-e1b6d05-20251114052813

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- The _Tina Cloud CLI_ can be used to set up your project with Tina Cloud configuration, and run a local version of the Tina Cloud content-api (using your file system's content). For a real-world example of how this is being used checkout the [Tina Cloud Starter](https://github.com/tinacms/tina-cloud-starter).
1
+ The _TinaCloud CLI_ can be used to set up your project with TinaCloud configuration, and run a local version of the TinaCloud content-api (using your file system's content). For a real-world example of how this is being used checkout the [TinaCloud Starter](https://github.com/tinacms/tina-nextjs-starter).
2
2
 
3
3
  ## Installation
4
4
 
@@ -24,13 +24,13 @@ Usage: @tinacms/cli command [options]
24
24
  Options:
25
25
  -V, --version output the version number
26
26
  -h, --help display help for command
27
- -v, --verbose increase verbosity of console output
27
+ -v, --verbose increase verbosity of console output
28
28
 
29
29
  Commands:
30
30
  server:start [options] Start Filesystem Graphql Server
31
31
  schema:compile [options] Compile schema into static files for the server
32
32
  schema:types [options] Generate a GraphQL query for your site's schema, (and optionally Typescript types)
33
- init [options] Add Tina Cloud to an existing project
33
+ init [options] Add TinaCloud to an existing project
34
34
  audit [options] Audit your schema and the files to check for errors
35
35
  help [command] display help for command
36
36
  ```
@@ -137,7 +137,7 @@ The top-level key in the schema is an array of _collections_, a `collection` inf
137
137
 
138
138
  ### `templates`
139
139
 
140
- Templates are responsible for defining the shape of your content, you'll see in the schema for [the starter](https://github.com/tinacms/tina-cloud-starter) that we use `templates` for `collections` as well as `blocks`. One important thing to note is that since a `collection` can have multiple `templates`, each file in your collection must store a `_template` key in it's frontmatter:
140
+ Templates are responsible for defining the shape of your content, you'll see in the schema for [the starter](https://github.com/tinacms/tina-nextjs-starter) that we use `templates` for `collections` as well as `blocks`. One important thing to note is that since a `collection` can have multiple `templates`, each file in your collection must store a `_template` key in it's frontmatter:
141
141
 
142
142
  ```markdown
143
143
  ---
@@ -151,7 +151,7 @@ When you use Tina's GraphQL forms, we know about all of the relationships in you
151
151
 
152
152
  ### `fields`
153
153
 
154
- For the most part, you can think of `fields` as the backend equivalent to [Tina field plugins](https://tina.io/docs/plugins/fields/). You might notice that we're defining a `type` on each field, rather than a `component`. This is because the backend isn't concerned with `component`s, only the shape of your content. By default we use the built-in Tina fields, to customize your `component` read the [field customization](https://tina.io/docs/tina-cloud/client/#field-customization) instructions.
154
+ For the most part, you can think of `fields` as the backend equivalent to [Tina field plugins](https://tina.io/docs/plugins/fields/). You might notice that we're defining a `type` on each field, rather than a `component`. This is because the backend isn't concerned with `component`s, only the shape of your content. By default we use the built-in Tina fields, to customize your `component` read the [field customization](https://tina.io/docs/tinacloud/client/#field-customization) instructions.
155
155
 
156
156
  #### `reference` & `reference-list`
157
157
 
@@ -229,7 +229,7 @@ getPostsDocument(relativePath: "voteForPedro.md") {
229
229
  }
230
230
  ```
231
231
 
232
- To learn how to work with this data on a Tina-enabled site, check out the [client documentation](https://tina.io/docs/tina-cloud/client/)
232
+ To learn how to work with this data on a Tina-enabled site, check out the [client documentation](https://tina.io/docs/tinacloud/client/)
233
233
 
234
234
  > This API is currently somewhat limited. Specifically there's no support for filtering and sorting "list" queries. We have plans to tackle that in upcoming cycles
235
235
 
@@ -1,4 +1,4 @@
1
- import type { Collection, TinaField } from '@tinacms/schema-tools';
1
+ import type { Collection, TinaField, ContentFrontmatterFormat } from '@tinacms/schema-tools';
2
2
  export declare const stringifyLabel: (label: string) => string;
3
3
  export declare const stringifyLabelWithField: (label: string) => string;
4
4
  export declare const generateAllTemplates: ({ pathToForestryConfig, }: {
@@ -8,7 +8,7 @@ export declare const generateAllTemplates: ({ pathToForestryConfig, }: {
8
8
  templateObj: any;
9
9
  }>>;
10
10
  export declare const generateCollections: ({ pathToForestryConfig, usingTypescript, frontMatterFormat, }: {
11
- frontMatterFormat?: "toml" | "yaml" | "json";
11
+ frontMatterFormat?: ContentFrontmatterFormat;
12
12
  pathToForestryConfig: string;
13
13
  usingTypescript: boolean;
14
14
  }) => Promise<{
@@ -34,10 +34,10 @@ declare const forestryFieldWithoutField: z.ZodObject<{
34
34
  section?: string;
35
35
  }>>;
36
36
  }, "strip", z.ZodTypeAny, {
37
- min?: number;
38
- max?: number;
39
- options?: string[];
40
37
  required?: boolean;
38
+ options?: string[];
39
+ max?: number;
40
+ min?: number;
41
41
  use_select?: boolean;
42
42
  date_format?: string;
43
43
  time_format?: string;
@@ -46,10 +46,10 @@ declare const forestryFieldWithoutField: z.ZodObject<{
46
46
  section?: string;
47
47
  };
48
48
  }, {
49
- min?: number;
50
- max?: number;
51
- options?: string[];
52
49
  required?: boolean;
50
+ options?: string[];
51
+ max?: number;
52
+ min?: number;
53
53
  use_select?: boolean;
54
54
  date_format?: string;
55
55
  time_format?: string;
@@ -59,13 +59,14 @@ declare const forestryFieldWithoutField: z.ZodObject<{
59
59
  };
60
60
  }>>;
61
61
  }, "strip", z.ZodTypeAny, {
62
- type?: "number" | "boolean" | "file" | "color" | "text" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
62
+ type?: "number" | "boolean" | "file" | "text" | "color" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
63
63
  default?: any;
64
+ name?: string;
64
65
  config?: {
65
- min?: number;
66
- max?: number;
67
- options?: string[];
68
66
  required?: boolean;
67
+ options?: string[];
68
+ max?: number;
69
+ min?: number;
69
70
  use_select?: boolean;
70
71
  date_format?: string;
71
72
  time_format?: string;
@@ -74,18 +75,18 @@ declare const forestryFieldWithoutField: z.ZodObject<{
74
75
  section?: string;
75
76
  };
76
77
  };
77
- name?: string;
78
78
  label?: string;
79
79
  template?: string;
80
80
  template_types?: string[];
81
81
  }, {
82
- type?: "number" | "boolean" | "file" | "color" | "text" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
82
+ type?: "number" | "boolean" | "file" | "text" | "color" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
83
83
  default?: any;
84
+ name?: string;
84
85
  config?: {
85
- min?: number;
86
- max?: number;
87
- options?: string[];
88
86
  required?: boolean;
87
+ options?: string[];
88
+ max?: number;
89
+ min?: number;
89
90
  use_select?: boolean;
90
91
  date_format?: string;
91
92
  time_format?: string;
@@ -94,7 +95,6 @@ declare const forestryFieldWithoutField: z.ZodObject<{
94
95
  section?: string;
95
96
  };
96
97
  };
97
- name?: string;
98
98
  label?: string;
99
99
  template?: string;
100
100
  template_types?: string[];
@@ -152,9 +152,9 @@ export declare const parseSections: ({ val }: {
152
152
  exclude?: string;
153
153
  type?: "heading" | "document" | "directory" | "jekyll-pages" | "jekyll-posts";
154
154
  match?: string;
155
- path?: string;
156
155
  templates?: string[];
157
156
  label?: string;
157
+ path?: string;
158
158
  create?: "none" | "all" | "documents";
159
159
  new_doc_ext?: string;
160
160
  read_only?: boolean;
@@ -1,4 +1,5 @@
1
1
  import { CLICommand } from '../index';
2
+ import { ContentFrontmatterFormat } from '@tinacms/schema-tools';
2
3
  export interface Framework {
3
4
  name: 'next' | 'hugo' | 'jekyll' | 'other';
4
5
  reactive: boolean;
@@ -20,11 +21,10 @@ export type GeneratedFile = {
20
21
  parentPath: string;
21
22
  };
22
23
  };
23
- export type FrontmatterFormat = 'yaml' | 'toml' | 'json';
24
24
  export type InitEnvironment = {
25
25
  hasTinaDeps: boolean;
26
26
  forestryConfigExists: boolean;
27
- frontMatterFormat: FrontmatterFormat;
27
+ frontMatterFormat: ContentFrontmatterFormat;
28
28
  gitIgnoreExists: boolean;
29
29
  gitIgnoreNodeModulesExists: boolean;
30
30
  gitIgnoreTinaEnvExists: boolean;
@@ -1,5 +1,5 @@
1
- import type { PromptAuthProvider, Config } from './types';
2
1
  import type { Framework } from '../';
2
+ import type { Config, PromptAuthProvider } from './types';
3
3
  export declare const chooseAuthProvider: ({ framework, config, }: {
4
4
  config: Config;
5
5
  framework: Framework;
@@ -1,5 +1,6 @@
1
1
  import { Framework, InitEnvironment } from '../';
2
2
  import { Config, ImportStatement } from './types';
3
+ import { ContentFrontmatterFormat } from '@tinacms/schema-tools';
3
4
  export * from './askTinaCloudSetup';
4
5
  export * from './types';
5
6
  export * from './gitProvider';
@@ -7,14 +8,14 @@ export * from './databaseAdapter';
7
8
  export * from './authProvider';
8
9
  export declare const askCommonSetUp: () => Promise<{
9
10
  framework: Framework;
10
- packageManager: "pnpm" | "yarn" | "npm";
11
+ packageManager: "pnpm" | "yarn" | "npm" | "bun";
11
12
  }>;
12
13
  export declare const askForestryMigrate: ({ framework, env, }: {
13
14
  framework: Framework;
14
15
  env: InitEnvironment;
15
16
  }) => Promise<{
16
17
  forestryMigrate: boolean;
17
- frontMatterFormat?: "yaml" | "toml" | "json";
18
+ frontMatterFormat?: ContentFrontmatterFormat;
18
19
  }>;
19
20
  export declare const askTinaSetupPrompts: (params: {
20
21
  frameworkName: string;
@@ -1,11 +1,12 @@
1
+ import { ContentFrontmatterFormat } from '@tinacms/schema-tools';
1
2
  import { Framework, GeneratedFileType } from '../';
2
3
  export type Config = {
3
4
  typescript: boolean;
4
5
  publicFolder?: string;
5
6
  framework: Framework;
6
- packageManager: 'pnpm' | 'yarn' | 'npm';
7
+ packageManager: 'pnpm' | 'yarn' | 'npm' | 'bun';
7
8
  forestryMigrate: boolean;
8
- frontMatterFormat?: 'yaml' | 'toml' | 'json';
9
+ frontMatterFormat?: ContentFrontmatterFormat;
9
10
  hosting?: 'tina-cloud' | 'self-host';
10
11
  gitProvider?: PromptGitProvider;
11
12
  databaseAdapter?: PromptDatabaseAdapter;