@tinacms/cli 0.57.1 → 0.58.2

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/CHANGELOG.md CHANGED
@@ -1,11 +1,50 @@
1
1
  # tinacms-cli
2
2
 
3
+ ## 0.58.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [fffce3af8]
8
+ - @tinacms/graphql@0.58.2
9
+
10
+ ## 0.58.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [4700d7ae4]
15
+ - @tinacms/graphql@0.58.1
16
+
17
+ ## 0.58.0
18
+
19
+ ### Minor Changes
20
+
21
+ - fa7a0419f: Adds experimental support for a data layer between file-based content and the GraphQL API. This allows documents to be indexed so the CMS can behave more like a traditional CMS, with the ability enforce foreign reference constraints and filtering/pagination capabilities.
22
+ - 8c14f29ef: Updated cli to include a new option, `--noSDK`. When this flag is present it will not generate the SDK.
23
+
24
+ ### Patch Changes
25
+
26
+ - 9c5f888a3: Modifies `tinacms init` for `TinaAdmin`-ready page
27
+ - Updated dependencies [eb5fbfac7]
28
+ - Updated dependencies [fa7a0419f]
29
+ - Updated dependencies [47d126029]
30
+ - @tinacms/graphql@0.58.0
31
+
32
+ ## 0.57.2
33
+
34
+ ### Patch Changes
35
+
36
+ - edb2f4011: Trim path property on collections during compilation
37
+ - Updated dependencies [edb2f4011]
38
+ - @tinacms/graphql@0.57.2
39
+
3
40
  ## 0.57.1
4
41
 
5
42
  ### Patch Changes
6
43
 
7
44
  - 50710e1d0: Add no-check for Typescript-generated file
8
45
  - c78d981e6: Reset entire **generated** folder on re-compile
46
+ - Updated dependencies [60729f60c]
47
+ - @tinacms/graphql@0.57.1
9
48
 
10
49
  ## 0.57.0
11
50
 
@@ -0,0 +1,18 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { Command } from '../command';
14
+ export declare const CMD_GEN_TYPES = "schema:types";
15
+ export declare const CMD_START_SERVER = "server:start";
16
+ export declare const CMD_COMPILE_MODELS = "schema:compile";
17
+ export declare const INIT = "init";
18
+ export declare const baseCmds: Command[];
@@ -0,0 +1,13 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export declare const defaultSchema = "\nimport { defineSchema } from \"@tinacms/cli\";\n\nexport default defineSchema({\n collections: [\n {\n label: \"Blog Posts\",\n name: \"posts\",\n path: \"content/posts\",\n fields: [\n {\n type: \"string\",\n label: \"Title\",\n name: \"title\",\n },\n {\n type: \"string\",\n label: \"Blog Post Body\",\n name: \"body\",\n isBody: true,\n ui: {\n component: \"textarea\"\n },\n },\n ],\n },\n ],\n});\n";
@@ -0,0 +1,16 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import type { TinaCloudSchema } from '@tinacms/graphql';
14
+ export declare const resetGeneratedFolder: () => Promise<void>;
15
+ export declare const compile: (_ctx: any, _next: any) => Promise<void>;
16
+ export declare const defineSchema: (config: TinaCloudSchema) => TinaCloudSchema;
@@ -0,0 +1,4 @@
1
+ export declare function initTina(ctx: any, next: () => void, options: any): Promise<void>;
2
+ export declare function installDeps(ctx: any, next: () => void, options: any): Promise<void>;
3
+ export declare function tinaSetup(ctx: any, next: () => void, options: any): Promise<void>;
4
+ export declare function successMessage(ctx: any, next: () => void, options: any): Promise<void>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export declare const adminPage = "import { TinaAdmin } from 'tinacms';\nexport default TinaAdmin;\n";
14
+ export declare const blogPost = "---\ntitle: Vote For Pedro\n---\n# Welcome to the blog.\n\n> To edit this site head over to the [` /\n admin`](/admin) route. Then click the pencil icon in the bottom lefthand corner to start editing \uD83E\uDD99. \n\n\n# Dixi gaude Arethusa\n\n## Oscula mihi\n\nLorem markdownum numerabilis armentorum platanus, cultros coniunx sibi per\nsilvas, nostris clausit sequemur diverso scopulosque. Fecit tum alta sed non\nfalcato murmura, geminas donata Amyntore, quoque Nox. Invitam inquit, modo\nnocte; ut ignis faciemque manes in imagine sinistra ut mucrone non ramos\nsepulcro supplex. Crescentesque populos motura, fit cumque. Verumque est; retro\nsibi tristia bracchia Aetola telae caruerunt et.\n\n\n## Mutato fefellimus sit demisit aut alterius sollicito\n\nPhaethonteos vestes quem involvite iuvenca; furiali anne: sati totumque,\n**corpora** cum rapacibus nunc! Nervis repetatne, miserabile doleas, deprensum\nhunc, fluctus Threicio, ad urbes, magicaeque, quid. Per credensque series adicis\npoteram [quidem](#)! Iam uni mensas victrix\nvittas ut flumina Satyri adulter; bellum iacet domitae repercusso truncis urnis\nmille rigidi sub taurum.\n\n\n";
15
+ export declare const nextPostPage: () => string;
16
+ export declare const AppJsContent: (extraImports?: string) => string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export declare function attachSchema(ctx: any, next: () => void, options: any): Promise<void>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { GraphQLSchema } from 'graphql';
14
+ export declare function genTypes({ schema }: {
15
+ schema: GraphQLSchema;
16
+ }, next: () => void, options: any): Promise<void>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export * from './attachSchema';
14
+ export * from './genTypes';
@@ -0,0 +1,21 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ interface Options {
14
+ port?: number;
15
+ command?: string;
16
+ experimentalData?: boolean;
17
+ noWatch?: boolean;
18
+ noSDK: boolean;
19
+ }
20
+ export declare function startServer(_ctx: any, _next: any, { port, command, noWatch, experimentalData, noSDK }: Options): Promise<void>;
21
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ /// <reference types="node" />
14
+ import http from 'http';
15
+ declare const gqlServer: (database: any) => Promise<http.Server>;
16
+ export default gqlServer;
@@ -0,0 +1,16 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { GraphQLSchema } from 'graphql';
14
+ export declare const generateTypes: (schema: GraphQLSchema, queryPathGlob?: string, fragDocPath?: string, options?: {
15
+ noSDK: boolean;
16
+ }) => Promise<string>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import type { PluginFunction } from '@graphql-codegen/plugin-helpers';
14
+ export declare const AddGeneratedClientFunc: PluginFunction;
15
+ export declare const AddGeneratedClient: {
16
+ plugin: PluginFunction<any, import("@graphql-codegen/plugin-helpers").Types.PluginOutput>;
17
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { RawClientSideBasePluginConfig } from '@graphql-codegen/visitor-plugin-common';
14
+ /**
15
+ * This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.
16
+ */
17
+ export interface RawGenericSdkPluginConfig extends RawClientSideBasePluginConfig {
18
+ /**
19
+ * usingObservableFrom: "import Observable from 'zen-observable';"
20
+ * OR
21
+ * usingObservableFrom: "import { Observable } from 'rxjs';"
22
+ */
23
+ usingObservableFrom?: string;
24
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ /**
14
+ * PLEASE READ THIS:
15
+ *
16
+ * This plugin is directly copied from https://github.com/dotansimha/graphql-code-generator/tree/master/packages/plugins/typescript/generic-sdk
17
+ *
18
+ * The reason this was needed is because we had to modified the return type of the SDK client. We need to return {data, variables, query}. While the other one just returned the data.
19
+ *
20
+ * 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)
21
+ */
22
+ import { PluginFunction, PluginValidateFn } from '@graphql-codegen/plugin-helpers';
23
+ import { RawGenericSdkPluginConfig } from './config';
24
+ import { GenericSdkVisitor } from './visitor';
25
+ export declare const plugin: PluginFunction<RawGenericSdkPluginConfig>;
26
+ export declare const validate: PluginValidateFn<any>;
27
+ export { GenericSdkVisitor };
@@ -0,0 +1,24 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { ClientSideBasePluginConfig, ClientSideBaseVisitor, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
14
+ import { GraphQLSchema, OperationDefinitionNode } from 'graphql';
15
+ import { RawGenericSdkPluginConfig } from './config';
16
+ export interface GenericSdkPluginConfig extends ClientSideBasePluginConfig {
17
+ usingObservableFrom: string;
18
+ }
19
+ export declare class GenericSdkVisitor extends ClientSideBaseVisitor<RawGenericSdkPluginConfig, GenericSdkPluginConfig> {
20
+ private _operationsToInclude;
21
+ constructor(schema: GraphQLSchema, fragments: LoadedFragment[], rawConfig: RawGenericSdkPluginConfig);
22
+ protected buildOperation(node: OperationDefinitionNode, documentVariableName: string, operationType: string, operationResultType: string, operationVariablesTypes: string): string;
23
+ get sdkContent(): string;
24
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export interface Command {
14
+ resource?: string;
15
+ command: string;
16
+ alias?: string;
17
+ description: string;
18
+ action: (...args: any[]) => void;
19
+ examples?: string;
20
+ subCommands?: Command[];
21
+ options?: Option[];
22
+ }
23
+ interface Option {
24
+ name: string;
25
+ description: string;
26
+ }
27
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export { defineSchema } from './cmds/compile';
14
+ export type { TinaCloudSchema, TinaSchema, TinaCloudCollection, TinaCollection, TinaField, TinaTemplate, } from '@tinacms/graphql';
15
+ export declare function init(args: any): Promise<void>;