@tinacms/cli 1.5.49 → 1.5.50

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.
@@ -8,11 +8,11 @@ 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?: "toml" | "yaml" | "json";
12
12
  pathToForestryConfig: string;
13
13
  usingTypescript: boolean;
14
14
  }) => Promise<{
15
- collections: Collection<false>[];
15
+ collections: Collection[];
16
16
  importStatements: string;
17
17
  templateCode: string;
18
18
  }>;
@@ -99,7 +99,7 @@ declare const forestryFieldWithoutField: z.ZodObject<{
99
99
  template_types?: string[];
100
100
  template?: string;
101
101
  }>;
102
- declare type ForestryFieldWithoutFieldType = z.infer<typeof forestryFieldWithoutField>;
102
+ type ForestryFieldWithoutFieldType = z.infer<typeof forestryFieldWithoutField>;
103
103
  interface ForestryFieldType extends ForestryFieldWithoutFieldType {
104
104
  fields?: ForestryFieldType[];
105
105
  }
@@ -117,11 +117,11 @@ declare const FrontmatterTemplateSchema: z.ZodObject<{
117
117
  hide_body?: boolean;
118
118
  }>;
119
119
  export declare const transformForestryFieldsToTinaFields: ({ fields, pathToForestryConfig, template, skipBlocks, }: {
120
- fields: z.infer<typeof FrontmatterTemplateSchema>['fields'];
120
+ fields: z.infer<typeof FrontmatterTemplateSchema>["fields"];
121
121
  pathToForestryConfig: string;
122
122
  template: string;
123
123
  skipBlocks?: boolean;
124
- }) => TinaField<false>[];
124
+ }) => TinaField[];
125
125
  export declare const getFieldsFromTemplates: (_args: {
126
126
  tem: string;
127
127
  pathToForestryConfig: string;
@@ -3,9 +3,9 @@ export interface Framework {
3
3
  name: 'next' | 'hugo' | 'jekyll' | 'other';
4
4
  reactive: boolean;
5
5
  }
6
- export declare type ReactiveFramework = 'next';
7
- export declare type GeneratedFileType = 'next-api-handler' | 'config' | 'database' | 'templates' | 'reactive-example' | 'sample-content' | 'users-json';
8
- export declare type GeneratedFile = {
6
+ export type ReactiveFramework = 'next';
7
+ export type GeneratedFileType = 'next-api-handler' | 'config' | 'database' | 'templates' | 'reactive-example' | 'sample-content' | 'users-json';
8
+ export type GeneratedFile = {
9
9
  fullPathJS: string;
10
10
  fullPathTS: string;
11
11
  fullPathOverride?: string;
@@ -20,8 +20,8 @@ export declare type GeneratedFile = {
20
20
  parentPath: string;
21
21
  };
22
22
  };
23
- export declare type FrontmatterFormat = 'yaml' | 'toml' | 'json';
24
- export declare type InitEnvironment = {
23
+ export type FrontmatterFormat = 'yaml' | 'toml' | 'json';
24
+ export type InitEnvironment = {
25
25
  hasTinaDeps: boolean;
26
26
  forestryConfigExists: boolean;
27
27
  frontMatterFormat: FrontmatterFormat;
@@ -38,7 +38,7 @@ export declare type InitEnvironment = {
38
38
  usingSrc: boolean;
39
39
  tinaConfigExists: boolean;
40
40
  };
41
- export declare type InitParams = {
41
+ export type InitParams = {
42
42
  rootPath: string;
43
43
  pathToForestryConfig: string;
44
44
  noTelemetry: boolean;
@@ -7,14 +7,14 @@ export * from './databaseAdapter';
7
7
  export * from './authProvider';
8
8
  export declare const askCommonSetUp: () => Promise<{
9
9
  framework: Framework;
10
- packageManager: 'pnpm' | 'yarn' | 'npm';
10
+ packageManager: "pnpm" | "yarn" | "npm";
11
11
  }>;
12
12
  export declare const askForestryMigrate: ({ framework, env, }: {
13
13
  framework: Framework;
14
14
  env: InitEnvironment;
15
15
  }) => Promise<{
16
16
  forestryMigrate: boolean;
17
- frontMatterFormat?: 'yaml' | 'toml' | 'json';
17
+ frontMatterFormat?: "yaml" | "toml" | "json";
18
18
  }>;
19
19
  export declare const askTinaSetupPrompts: (params: {
20
20
  frameworkName: string;
@@ -24,6 +24,6 @@ export declare const askTinaSetupPrompts: (params: {
24
24
  publicFolder?: string;
25
25
  }>;
26
26
  export declare const askIfUsingSelfHosted: () => Promise<{
27
- hosting: 'tina-cloud' | 'self-host';
27
+ hosting: "tina-cloud" | "self-host";
28
28
  }>;
29
29
  export declare const makeImportString: (imports?: ImportStatement[]) => string;
@@ -1,5 +1,5 @@
1
1
  import { Framework, GeneratedFileType } from '../';
2
- export declare type Config = {
2
+ export type Config = {
3
3
  typescript: boolean;
4
4
  publicFolder?: string;
5
5
  framework: Framework;
@@ -1,5 +1,5 @@
1
1
  import { Config } from '../prompts';
2
- export declare type ConfigTemplateArgs = {
2
+ export type ConfigTemplateArgs = {
3
3
  extraText?: string;
4
4
  publicFolder: string;
5
5
  collections?: string;
@@ -1,8 +1,8 @@
1
1
  import type { Config } from '../prompts';
2
- export declare type Variables = {
2
+ export type Variables = {
3
3
  isLocalEnvVarName: string;
4
4
  };
5
- export declare type DatabaseAdapterTypes = 'upstash-redis';
5
+ export type DatabaseAdapterTypes = 'upstash-redis';
6
6
  export declare const databaseTemplate: ({ config }: {
7
7
  config: Config;
8
8
  }) => string;
@@ -1,4 +1,4 @@
1
- export declare type NextTemplateTypes = 'demo-post-page';
1
+ export type NextTemplateTypes = 'demo-post-page';
2
2
  export declare const templates: {
3
3
  [key in NextTemplateTypes]: (opts?: {
4
4
  nextAuthCredentialsProviderName?: string;
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ module.exports = __toCommonJS(src_exports);
31
31
  var import_clipanion8 = require("clipanion");
32
32
 
33
33
  // package.json
34
- var version = "1.5.49";
34
+ var version = "1.5.50";
35
35
 
36
36
  // src/next/commands/dev-command/index.ts
37
37
  var import_clipanion2 = require("clipanion");
@@ -5511,7 +5511,6 @@ var makeImportsVisitor = (sourceFile, importMap) => (ctx) => (node) => {
5511
5511
  namedImports
5512
5512
  );
5513
5513
  const importDec = import_typescript3.default.factory.createImportDeclaration(
5514
- void 0,
5515
5514
  void 0,
5516
5515
  importClause,
5517
5516
  import_typescript3.default.factory.createStringLiteral(moduleName)
@@ -5535,7 +5534,6 @@ var makeImportsVisitor = (sourceFile, importMap) => (ctx) => (node) => {
5535
5534
  namedImports
5536
5535
  );
5537
5536
  const importDec = import_typescript3.default.factory.createImportDeclaration(
5538
- void 0,
5539
5537
  void 0,
5540
5538
  importClause,
5541
5539
  import_typescript3.default.factory.createStringLiteral(moduleName)
@@ -5604,7 +5602,9 @@ var makeAddExpressionToSchemaCollectionVisitor = (sourceFile, functionName, newE
5604
5602
  }
5605
5603
  return import_typescript3.default.visitEachChild(node, visit2, ctx);
5606
5604
  };
5607
- return visit2;
5605
+ return (sourceFile2) => {
5606
+ return import_typescript3.default.visitEachChild(sourceFile2, visit2, ctx);
5607
+ };
5608
5608
  };
5609
5609
  var makeUpdateObjectLiteralPropertyVisitor = (sourceFile, functionName, propertyName, propertyValueExpressionSourceFile, propertyValue) => (ctx) => {
5610
5610
  const visitor = (node) => {
@@ -5634,7 +5634,9 @@ var makeUpdateObjectLiteralPropertyVisitor = (sourceFile, functionName, property
5634
5634
  }
5635
5635
  return import_typescript3.default.visitEachChild(node, visitor, ctx);
5636
5636
  };
5637
- return visitor;
5637
+ return (sourceFile2) => {
5638
+ return import_typescript3.default.visitNode(sourceFile2, visitor);
5639
+ };
5638
5640
  };
5639
5641
  var addSelfHostedTinaAuthToConfig = async (config2, configFile) => {
5640
5642
  const pathToConfig = configFile.resolve(config2.typescript).path;
@@ -7,6 +7,6 @@ interface GetPathParams {
7
7
  allowedTypes: string[];
8
8
  errorMessage?: string;
9
9
  }
10
- export declare const fileExists: ({ projectDir, filename, allowedTypes, }: Omit<GetPathParams, 'errorMessage'>) => boolean;
10
+ export declare const fileExists: ({ projectDir, filename, allowedTypes, }: Omit<GetPathParams, "errorMessage">) => boolean;
11
11
  export declare const getPath: ({ projectDir, filename, allowedTypes, errorMessage, }: GetPathParams) => any;
12
12
  export {};
@@ -4,5 +4,5 @@
4
4
  import type { PluginFunction } from '@graphql-codegen/plugin-helpers';
5
5
  export declare const AddGeneratedClientFunc: (apiURL: string) => PluginFunction;
6
6
  export declare const AddGeneratedClient: (apiURL: string) => {
7
- plugin: PluginFunction<any, import("@graphql-codegen/plugin-helpers").Types.PluginOutput>;
7
+ plugin: PluginFunction;
8
8
  };
@@ -6,7 +6,7 @@ export declare const audit: ({ database, clean, useDefaultValues, noTelemetry, v
6
6
  noTelemetry?: boolean;
7
7
  verbose?: boolean;
8
8
  }) => Promise<void>;
9
- declare type AuditArgs = {
9
+ type AuditArgs = {
10
10
  collection: Collection<true>;
11
11
  database: Database;
12
12
  documents: {
@@ -28,7 +28,7 @@ export interface PathConfig {
28
28
  publicFolder: string;
29
29
  mediaRoot: string;
30
30
  }
31
- declare type SuccessRecord = {
31
+ type SuccessRecord = {
32
32
  ok: true;
33
33
  } | {
34
34
  ok: false;
@@ -28,6 +28,6 @@ export declare const createConfig: ({ configManager, database, apiURL, plugins,
28
28
  apiURL: string;
29
29
  noWatch: boolean;
30
30
  plugins?: Plugin[];
31
- rollupOptions?: BuildOptions['rollupOptions'];
31
+ rollupOptions?: BuildOptions["rollupOptions"];
32
32
  }) => Promise<InlineConfig>;
33
33
  export {};
@@ -22,7 +22,7 @@ export interface PathConfig {
22
22
  publicFolder: string;
23
23
  mediaRoot: string;
24
24
  }
25
- declare type SuccessRecord = {
25
+ type SuccessRecord = {
26
26
  ok: true;
27
27
  } | {
28
28
  ok: false;
@@ -1,6 +1,4 @@
1
1
  /**
2
2
 
3
3
  */
4
- /// <reference types="node" />
5
- import http from 'http';
6
- export declare const gqlServer: (database: any, verbose: boolean) => Promise<http.Server>;
4
+ export declare const gqlServer: (database: any, verbose: boolean) => Promise<any>;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import childProcess from 'child_process';
3
2
  export declare const startSubprocess2: ({ command }: {
4
3
  command: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "1.5.49",
3
+ "version": "1.5.50",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -40,7 +40,7 @@
40
40
  "@types/prompts": "^2.0.13",
41
41
  "@types/yup": "^0.29.11",
42
42
  "jest": "^29.5.0",
43
- "@tinacms/scripts": "1.1.5"
43
+ "@tinacms/scripts": "1.1.6"
44
44
  },
45
45
  "dependencies": {
46
46
  "@graphql-codegen/core": "^2.1.0",
@@ -52,7 +52,7 @@
52
52
  "@graphql-tools/graphql-file-loader": "^7.2.0",
53
53
  "@graphql-tools/load": "^7.3.2",
54
54
  "@rollup/pluginutils": "^5.0.2",
55
- "@svgr/core": "6.3.1",
55
+ "@svgr/core": "8.1.0",
56
56
  "@tailwindcss/aspect-ratio": "^0.4.2",
57
57
  "@tailwindcss/typography": "^0.5.13",
58
58
  "@vitejs/plugin-react": "3.1.0",
@@ -83,16 +83,16 @@
83
83
  "readable-stream": "^4.3.0",
84
84
  "tailwindcss": "^3.4.4",
85
85
  "typanion": "3.13.0",
86
- "typescript": "4.6.4",
86
+ "typescript": "^5.5.3",
87
87
  "vite": "^4.3.9",
88
88
  "yup": "^0.32.9",
89
89
  "zod": "^3.14.3",
90
- "@tinacms/graphql": "1.4.37",
91
- "@tinacms/metrics": "1.0.4",
92
- "@tinacms/schema-tools": "1.4.18",
93
- "@tinacms/app": "1.2.45",
94
- "@tinacms/search": "1.0.22",
95
- "tinacms": "1.6.7"
90
+ "@tinacms/app": "2.0.0",
91
+ "@tinacms/metrics": "1.0.5",
92
+ "@tinacms/graphql": "1.4.38",
93
+ "@tinacms/schema-tools": "1.4.19",
94
+ "@tinacms/search": "1.0.23",
95
+ "tinacms": "2.0.0"
96
96
  },
97
97
  "publishConfig": {
98
98
  "registry": "https://registry.npmjs.org"