@tinacms/cli 1.6.3 → 1.6.5

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.
@@ -76,8 +76,8 @@ declare const forestryFieldWithoutField: z.ZodObject<{
76
76
  };
77
77
  name?: string;
78
78
  label?: string;
79
- template_types?: string[];
80
79
  template?: string;
80
+ template_types?: string[];
81
81
  }, {
82
82
  type?: "number" | "boolean" | "file" | "color" | "text" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
83
83
  default?: any;
@@ -96,8 +96,8 @@ declare const forestryFieldWithoutField: z.ZodObject<{
96
96
  };
97
97
  name?: string;
98
98
  label?: string;
99
- template_types?: string[];
100
99
  template?: string;
100
+ template_types?: string[];
101
101
  }>;
102
102
  type ForestryFieldWithoutFieldType = z.infer<typeof forestryFieldWithoutField>;
103
103
  interface ForestryFieldType extends ForestryFieldWithoutFieldType {
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.6.3";
34
+ var version = "1.6.5";
35
35
 
36
36
  // src/next/commands/dev-command/index.ts
37
37
  var import_clipanion2 = require("clipanion");
@@ -1633,6 +1633,7 @@ var loadGraphQLDocuments = async (globPath) => {
1633
1633
  // src/next/codegen/index.ts
1634
1634
  var import_esbuild2 = require("esbuild");
1635
1635
  var import_graphql7 = require("@tinacms/graphql");
1636
+ var import_normalize_path3 = __toESM(require("normalize-path"));
1636
1637
  var TINA_HOST = "content.tinajs.io";
1637
1638
  var Codegen = class {
1638
1639
  constructor({
@@ -1905,7 +1906,9 @@ export default databaseClient;
1905
1906
  const apiURL = this.getApiURL();
1906
1907
  const clientString = `import { createClient } from "tinacms/dist/client";
1907
1908
  import { queries } from "./types";
1908
- export const client = createClient({ ${this.noClientBuildCache === false ? `cacheDir: '${this.configManager.generatedCachePath}', ` : ""}url: '${apiURL}', token: '${token}', queries, ${errorPolicy ? `errorPolicy: '${errorPolicy}'` : ""} });
1909
+ export const client = createClient({ ${this.noClientBuildCache === false ? `cacheDir: '${(0, import_normalize_path3.default)(
1910
+ this.configManager.generatedCachePath
1911
+ )}', ` : ""}url: '${apiURL}', token: '${token}', queries, ${errorPolicy ? `errorPolicy: '${errorPolicy}'` : ""} });
1909
1912
  export default client;
1910
1913
  `;
1911
1914
  return { apiURL, clientString };
@@ -5277,7 +5280,10 @@ var generateCollectionString = (args) => {
5277
5280
  if (args.collections) {
5278
5281
  return args.collections;
5279
5282
  }
5280
- const extraTinaCollections = (_b = (_a = args.config.authProvider) == null ? void 0 : _a.extraTinaCollections) == null ? void 0 : _b.join(",\n");
5283
+ let extraTinaCollections = (_b = (_a = args.config.authProvider) == null ? void 0 : _a.extraTinaCollections) == null ? void 0 : _b.join(",\n");
5284
+ if (extraTinaCollections) {
5285
+ extraTinaCollections = extraTinaCollections + ",";
5286
+ }
5281
5287
  const baseCollections = `[
5282
5288
  ${extraTinaCollections || ""}
5283
5289
  {
@@ -5290,7 +5296,6 @@ var generateCollectionString = (args) => {
5290
5296
  const nextExampleCollection = `[
5291
5297
  ${extraTinaCollections || ""}
5292
5298
  {
5293
- ${extraTinaCollections ? `${extraTinaCollections},` : ""}
5294
5299
  name: 'post',
5295
5300
  label: 'Posts',
5296
5301
  path: 'content/posts',
@@ -5528,7 +5533,7 @@ var makeVariableStatementVisitor = (sourceFile, variableStmtSourceFile, variable
5528
5533
  var makeImportsVisitor = (sourceFile, importMap) => (ctx) => (node) => {
5529
5534
  var _a;
5530
5535
  if (import_typescript3.default.isSourceFile(node)) {
5531
- let newStatements = [...node.statements];
5536
+ const newStatements = [...node.statements];
5532
5537
  let changed = false;
5533
5538
  for (const [moduleName, imports] of Object.entries(importMap)) {
5534
5539
  let foundImportStatement = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -85,12 +85,12 @@
85
85
  "vite": "^4.3.9",
86
86
  "yup": "^0.32.9",
87
87
  "zod": "^3.14.3",
88
- "@tinacms/app": "2.1.3",
88
+ "@tinacms/app": "2.1.5",
89
89
  "@tinacms/graphql": "1.5.2",
90
90
  "@tinacms/metrics": "1.0.5",
91
91
  "@tinacms/schema-tools": "1.6.2",
92
- "@tinacms/search": "1.0.28",
93
- "tinacms": "2.2.3"
92
+ "@tinacms/search": "1.0.29",
93
+ "tinacms": "2.2.5"
94
94
  },
95
95
  "publishConfig": {
96
96
  "registry": "https://registry.npmjs.org"