@tinacms/cli 2.3.0 → 2.3.1

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -4
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { Cli, Builtins } from "clipanion";
3
3
 
4
4
  // package.json
5
- var version = "2.3.0";
5
+ var version = "2.3.1";
6
6
 
7
7
  // src/next/commands/dev-command/index.ts
8
8
  import path9 from "path";
@@ -565,6 +565,11 @@ var Codegen = class {
565
565
  this.configManager.generatedTypesTSFilePath,
566
566
  codeString
567
567
  );
568
+ const jsTypes = await transform(codeString, { loader: "ts" });
569
+ await fs.outputFile(
570
+ this.configManager.generatedTypesJSFilePath,
571
+ jsTypes.code
572
+ );
568
573
  await fs.outputFile(
569
574
  this.configManager.generatedClientTSFilePath,
570
575
  clientString
@@ -577,7 +582,6 @@ var Codegen = class {
577
582
  }
578
583
  await unlinkIfExists(this.configManager.generatedClientJSFilePath);
579
584
  await unlinkIfExists(this.configManager.generatedTypesDFilePath);
580
- await unlinkIfExists(this.configManager.generatedTypesJSFilePath);
581
585
  } else {
582
586
  await fs.outputFile(
583
587
  this.configManager.generatedTypesDFilePath,
@@ -684,7 +688,7 @@ var Codegen = class {
684
688
  import { resolve } from "@tinacms/datalayer";
685
689
  import type { TinaClient } from "tinacms/dist/client";
686
690
 
687
- import { queries } from "${this.configManager.isUsingTs() ? "./types" : "./types.js"}";
691
+ import { queries } from "./types.js";
688
692
  import database from "../database";
689
693
 
690
694
  export async function databaseRequest({ query, variables, user }) {
@@ -750,7 +754,7 @@ export default databaseClient;
750
754
  const errorPolicy = this.configManager.config?.client?.errorPolicy;
751
755
  const apiURL = this.getApiURL();
752
756
  const clientString = `import { createClient } from "tinacms/dist/client";
753
- import { queries } from "${this.configManager.isUsingTs() ? "./types" : "./types.js"}";
757
+ import { queries } from "./types.js";
754
758
  export const client = createClient({ ${this.noClientBuildCache === false ? `cacheDir: '${normalizePath(
755
759
  this.configManager.generatedCachePath
756
760
  )}', ` : ""}url: ${this.localContentBuild ? `process.env.TINA_LOCAL_URL || '${apiURL}'` : `'${apiURL}'`}, token: '${token}', queries, ${errorPolicy ? `errorPolicy: '${errorPolicy}'` : ""} });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
3
  "type": "module",
4
- "version": "2.3.0",
4
+ "version": "2.3.1",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "files": [
@@ -88,12 +88,12 @@
88
88
  "vite": "^4.5.9",
89
89
  "yup": "^1.6.1",
90
90
  "zod": "^3.24.2",
91
- "@tinacms/graphql": "2.4.0",
92
- "@tinacms/schema-tools": "2.7.4",
91
+ "@tinacms/app": "2.4.8",
93
92
  "@tinacms/metrics": "2.1.0",
94
- "@tinacms/search": "1.2.14",
95
- "@tinacms/app": "2.4.7",
96
- "tinacms": "3.8.0"
93
+ "@tinacms/graphql": "2.4.1",
94
+ "@tinacms/search": "1.2.15",
95
+ "@tinacms/schema-tools": "2.7.4",
96
+ "tinacms": "3.8.1"
97
97
  },
98
98
  "publishConfig": {
99
99
  "registry": "https://registry.npmjs.org"