@tinacms/cli 0.61.7 → 0.61.10
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/dist/buildTina/attachPath.d.ts +1 -0
- package/dist/buildTina/index.d.ts +37 -17
- package/dist/cmds/audit/audit.d.ts +6 -0
- package/dist/cmds/compile/defaultSchema.d.ts +1 -1
- package/dist/cmds/compile/index.d.ts +5 -3
- package/dist/cmds/query-gen/index.d.ts +0 -1
- package/dist/cmds/start-server/index.d.ts +9 -3
- package/dist/index.js +329 -413
- package/package.json +5 -6
- package/dist/cmds/query-gen/attachSchema.d.ts +0 -13
|
@@ -10,22 +10,17 @@
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
interface
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
store: Store;
|
|
19
|
-
bridge: Bridge;
|
|
20
|
-
noWatch?: boolean;
|
|
21
|
-
isomorphicGitBridge?: boolean;
|
|
13
|
+
import { Database } from '@tinacms/graphql';
|
|
14
|
+
import { DocumentNode } from 'graphql';
|
|
15
|
+
interface ClientGenOptions {
|
|
16
|
+
noSDK?: boolean;
|
|
17
|
+
local?: boolean;
|
|
22
18
|
verbose?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface BuildOptions {
|
|
23
21
|
dev?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
beforeBuild?: () => Promise<any>;
|
|
27
|
-
afterBuild?: () => Promise<any>;
|
|
28
|
-
skipIndex?: boolean;
|
|
22
|
+
verbose?: boolean;
|
|
23
|
+
rootPath?: string;
|
|
29
24
|
}
|
|
30
25
|
interface BuildSetupOptions {
|
|
31
26
|
isomorphicGitBridge?: boolean;
|
|
@@ -36,7 +31,32 @@ export declare const buildSetupCmdServerStart: (ctx: any, next: () => void, opts
|
|
|
36
31
|
export declare const buildSetupCmdAudit: (ctx: any, next: () => void, options: {
|
|
37
32
|
clean: boolean;
|
|
38
33
|
}) => Promise<void>;
|
|
39
|
-
export declare const buildCmdBuild: (ctx:
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
export declare const buildCmdBuild: (ctx: {
|
|
35
|
+
builder: ConfigBuilder;
|
|
36
|
+
rootPath: string;
|
|
37
|
+
usingTs: boolean;
|
|
38
|
+
}, next: () => void, options: Omit<BuildOptions & BuildSetupOptions & ClientGenOptions, 'bridge' | 'database' | 'store'>) => Promise<void>;
|
|
39
|
+
export declare const auditCmdBuild: (ctx: {
|
|
40
|
+
builder: ConfigBuilder;
|
|
41
|
+
rootPath: string;
|
|
42
|
+
database: Database;
|
|
43
|
+
}, next: () => void, options: Omit<BuildOptions & BuildSetupOptions, 'bridge' | 'database' | 'store'>) => Promise<void>;
|
|
44
|
+
export declare class ConfigBuilder {
|
|
45
|
+
private database;
|
|
46
|
+
constructor(database: Database);
|
|
47
|
+
build({ dev, verbose, rootPath }: BuildOptions): Promise<{
|
|
48
|
+
schema: any;
|
|
49
|
+
graphQLSchema: DocumentNode;
|
|
50
|
+
tinaSchema: any;
|
|
51
|
+
}>;
|
|
52
|
+
genTypedClient({ usingTs, compiledSchema, noSDK, verbose, local, }: ClientGenOptions & {
|
|
53
|
+
usingTs: boolean;
|
|
54
|
+
compiledSchema: any;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
export declare const buildAdmin: ({ schema, local, rootPath, }: {
|
|
58
|
+
schema: any;
|
|
59
|
+
local: boolean;
|
|
60
|
+
rootPath: string;
|
|
61
|
+
}) => Promise<void>;
|
|
42
62
|
export {};
|
|
@@ -15,7 +15,13 @@ declare type AuditArgs = {
|
|
|
15
15
|
collection: TinaCloudCollection;
|
|
16
16
|
database: Database;
|
|
17
17
|
rootPath: string;
|
|
18
|
+
documents: {
|
|
19
|
+
node: {
|
|
20
|
+
path: string;
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
18
23
|
useDefaultValues: boolean;
|
|
24
|
+
verbose?: boolean;
|
|
19
25
|
};
|
|
20
26
|
export declare const auditCollection: (args: AuditArgs) => Promise<boolean>;
|
|
21
27
|
export declare const auditDocuments: (args: AuditArgs) => Promise<boolean>;
|
|
@@ -10,4 +10,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
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 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
|
|
13
|
+
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";
|
|
@@ -20,14 +20,16 @@ export declare const compileClient: (ctx: any, next: any, options: {
|
|
|
20
20
|
verbose?: boolean;
|
|
21
21
|
dev?: boolean;
|
|
22
22
|
}) => Promise<any>;
|
|
23
|
-
export declare const compileFile: (
|
|
23
|
+
export declare const compileFile: (options: {
|
|
24
24
|
schemaFileType?: string;
|
|
25
25
|
verbose?: boolean;
|
|
26
26
|
dev?: boolean;
|
|
27
|
+
rootPath: string;
|
|
27
28
|
}, fileName: string) => Promise<{}>;
|
|
28
|
-
export declare const compileSchema: (
|
|
29
|
+
export declare const compileSchema: (options: {
|
|
29
30
|
schemaFileType?: string;
|
|
30
31
|
verbose?: boolean;
|
|
31
32
|
dev?: boolean;
|
|
32
|
-
|
|
33
|
+
rootPath;
|
|
34
|
+
}) => Promise<any>;
|
|
33
35
|
export declare const defineSchema: (config: TinaCloudSchema) => TinaCloudSchema;
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
+
import type { Bridge, Database } from '@tinacms/graphql';
|
|
14
|
+
import { ConfigBuilder } from '../../buildTina';
|
|
13
15
|
interface Options {
|
|
14
16
|
port?: number;
|
|
15
17
|
command?: string;
|
|
16
18
|
watchFolders?: string[];
|
|
17
|
-
experimentalData?: boolean;
|
|
18
|
-
isomorphicGitBridge?: boolean;
|
|
19
19
|
noWatch?: boolean;
|
|
20
20
|
noSDK: boolean;
|
|
21
21
|
noTelemetry: boolean;
|
|
@@ -23,5 +23,11 @@ interface Options {
|
|
|
23
23
|
dev?: boolean;
|
|
24
24
|
local: boolean;
|
|
25
25
|
}
|
|
26
|
-
export declare function startServer(ctx:
|
|
26
|
+
export declare function startServer(ctx: {
|
|
27
|
+
builder: ConfigBuilder;
|
|
28
|
+
rootPath: string;
|
|
29
|
+
database: Database;
|
|
30
|
+
bridge: Bridge;
|
|
31
|
+
usingTs: boolean;
|
|
32
|
+
}, next: any, { port, noWatch, noSDK, noTelemetry, watchFolders, verbose, dev, }: Options): Promise<void>;
|
|
27
33
|
export {};
|