@tinacms/cli 0.0.0-e88638d-20250922015536 → 0.0.0-e97cc34-20260505010028
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 +25 -5
- package/bin/tinacms +12 -6
- package/dist/cmds/forestry-migrate/util/index.d.ts +4 -4
- package/dist/index.js +1681 -964
- package/dist/logger/index.d.ts +7 -2
- package/dist/next/codegen/index.d.ts +7 -10
- package/dist/next/codegen/stripSearchTokenFromConfig.d.ts +7 -0
- package/dist/next/commands/build-command/index.d.ts +1 -0
- package/dist/next/commands/dev-command/server/media.d.ts +18 -1
- package/dist/next/commands/dev-command/server/searchIndex.d.ts +39 -4
- package/dist/next/commands/doctor-command/doctor.d.ts +34 -0
- package/dist/next/commands/doctor-command/index.d.ts +10 -0
- package/dist/next/config-manager.d.ts +3 -1
- package/dist/next/database.d.ts +1 -1
- package/dist/next/resolve-content-root.d.ts +19 -0
- package/dist/next/vite/cors.d.ts +13 -0
- package/dist/next/vite/filterPublicEnv.d.ts +9 -0
- package/dist/next/vite/plugins.d.ts +2 -2
- package/dist/server/models/media.d.ts +17 -0
- package/dist/utils/host.d.ts +5 -0
- package/dist/utils/path.d.ts +26 -0
- package/dist/utils/theme.d.ts +10 -30
- package/package.json +10 -12
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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,7 +24,7 @@ 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
|
|
@@ -32,11 +32,31 @@ Commands:
|
|
|
32
32
|
schema:types [options] Generate a GraphQL query for your site's schema, (and optionally Typescript types)
|
|
33
33
|
init [options] Add TinaCloud to an existing project
|
|
34
34
|
audit [options] Audit your schema and the files to check for errors
|
|
35
|
+
doctor [options] Check direct TinaCMS dependencies against npm latest
|
|
35
36
|
help [command] display help for command
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
[See our docs](https://tina.io/docs/cli-overview/) for more information about the commands.
|
|
39
40
|
|
|
41
|
+
### `doctor`
|
|
42
|
+
|
|
43
|
+
Use `tinacms doctor` to check whether the Tina packages installed in your
|
|
44
|
+
project are current against the npm `latest` dist-tag.
|
|
45
|
+
|
|
46
|
+
The command reads your `package.json`, resolves installed versions from
|
|
47
|
+
`node_modules` or the project lockfile, filters to Tina package names
|
|
48
|
+
(`tinacms`, `@tinacms/*`, `tinacms-*`, `next-tinacms-*`, and
|
|
49
|
+
`create-tina-app`), then prints the installed version next to the latest
|
|
50
|
+
published version.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm tinacms doctor
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Use `--json` for machine-readable output. The command exits with code `1` if a
|
|
57
|
+
Tina package is outdated or if a package version cannot be checked, which makes
|
|
58
|
+
it suitable for CI.
|
|
59
|
+
|
|
40
60
|
## Getting started
|
|
41
61
|
|
|
42
62
|
The simplest way to get started is to add a `.tina/schema.ts` file
|
|
@@ -137,7 +157,7 @@ The top-level key in the schema is an array of _collections_, a `collection` inf
|
|
|
137
157
|
|
|
138
158
|
### `templates`
|
|
139
159
|
|
|
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-
|
|
160
|
+
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
161
|
|
|
142
162
|
```markdown
|
|
143
163
|
---
|
|
@@ -151,7 +171,7 @@ When you use Tina's GraphQL forms, we know about all of the relationships in you
|
|
|
151
171
|
|
|
152
172
|
### `fields`
|
|
153
173
|
|
|
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/
|
|
174
|
+
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
175
|
|
|
156
176
|
#### `reference` & `reference-list`
|
|
157
177
|
|
|
@@ -229,7 +249,7 @@ getPostsDocument(relativePath: "voteForPedro.md") {
|
|
|
229
249
|
}
|
|
230
250
|
```
|
|
231
251
|
|
|
232
|
-
To learn how to work with this data on a Tina-enabled site, check out the [client documentation](https://tina.io/docs/
|
|
252
|
+
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
253
|
|
|
234
254
|
> 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
255
|
|
package/bin/tinacms
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const version = process.version.slice(1)
|
|
4
|
-
const [major, minor] = version.split('.')
|
|
3
|
+
const version = process.version.slice(1);
|
|
4
|
+
const [major, minor] = version.split('.');
|
|
5
5
|
if (major < 14 || (major == 14 && minor < 18)) {
|
|
6
6
|
console.error(
|
|
7
7
|
'ERROR: Node.js version lower than 14.18 is not supported in tinacms, please update to the latest LTS version. See https://nodejs.org/en/download/ for more details'
|
|
8
|
-
)
|
|
8
|
+
);
|
|
9
9
|
} else {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const [node, app, ...args] = process.argv;
|
|
11
|
+
import('../dist/index.js')
|
|
12
|
+
.then((cli) => {
|
|
13
|
+
cli.default.runExit(args);
|
|
14
|
+
})
|
|
15
|
+
.catch((err) => {
|
|
16
|
+
console.error('Failed to load CLI:', err);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
|
13
19
|
}
|
|
@@ -59,7 +59,6 @@ declare const forestryFieldWithoutField: z.ZodObject<{
|
|
|
59
59
|
};
|
|
60
60
|
}>>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
type?: "number" | "boolean" | "file" | "text" | "color" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
63
62
|
default?: any;
|
|
64
63
|
name?: string;
|
|
65
64
|
config?: {
|
|
@@ -76,10 +75,10 @@ declare const forestryFieldWithoutField: z.ZodObject<{
|
|
|
76
75
|
};
|
|
77
76
|
};
|
|
78
77
|
label?: string;
|
|
78
|
+
type?: "number" | "boolean" | "text" | "color" | "file" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
79
79
|
template?: string;
|
|
80
80
|
template_types?: string[];
|
|
81
81
|
}, {
|
|
82
|
-
type?: "number" | "boolean" | "file" | "text" | "color" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
83
82
|
default?: any;
|
|
84
83
|
name?: string;
|
|
85
84
|
config?: {
|
|
@@ -96,6 +95,7 @@ declare const forestryFieldWithoutField: z.ZodObject<{
|
|
|
96
95
|
};
|
|
97
96
|
};
|
|
98
97
|
label?: string;
|
|
98
|
+
type?: "number" | "boolean" | "text" | "color" | "file" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
99
99
|
template?: string;
|
|
100
100
|
template_types?: string[];
|
|
101
101
|
}>;
|
|
@@ -149,12 +149,12 @@ export declare const parseSections: ({ val }: {
|
|
|
149
149
|
val: unknown;
|
|
150
150
|
}) => {
|
|
151
151
|
sections?: {
|
|
152
|
-
exclude?: string;
|
|
153
|
-
type?: "heading" | "document" | "directory" | "jekyll-pages" | "jekyll-posts";
|
|
154
152
|
match?: string;
|
|
155
153
|
templates?: string[];
|
|
156
154
|
label?: string;
|
|
157
155
|
path?: string;
|
|
156
|
+
type?: "heading" | "document" | "directory" | "jekyll-pages" | "jekyll-posts";
|
|
157
|
+
exclude?: string;
|
|
158
158
|
create?: "none" | "all" | "documents";
|
|
159
159
|
new_doc_ext?: string;
|
|
160
160
|
read_only?: boolean;
|