@tinacms/graphql 0.0.0-20230516235218 → 0.0.0-20230517131653

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/index.es.js CHANGED
@@ -5429,13 +5429,24 @@ var Database = class {
5429
5429
  let nextLevel;
5430
5430
  return await this.indexStatusCallbackWrapper(
5431
5431
  async () => {
5432
- const lookup = lookupFromLockFile || JSON.parse(
5433
- await this.bridge.get(
5434
- normalizePath(
5435
- path3.join(this.getGeneratedFolder(), "_lookup.json")
5432
+ let lookup;
5433
+ try {
5434
+ lookup = lookupFromLockFile || JSON.parse(
5435
+ await this.bridge.get(
5436
+ normalizePath(
5437
+ path3.join(this.getGeneratedFolder(), "_lookup.json")
5438
+ )
5436
5439
  )
5437
- )
5438
- );
5440
+ );
5441
+ } catch (error) {
5442
+ console.error("Error: Unable to find generated lookup file");
5443
+ if (this.tinaDirectory === "tina") {
5444
+ console.error(
5445
+ 'If you are using the .tina folder. Please set {tinaDirectory: ".tina"} in your createDatabase options or migrate to the new tina folder: https://tina.io/blog/tina-config-rearrangements/'
5446
+ );
5447
+ }
5448
+ throw error;
5449
+ }
5439
5450
  let nextVersion;
5440
5451
  if (!this.config.version) {
5441
5452
  await this.level.clear();
@@ -5626,7 +5637,7 @@ This will be an error in the future. See https://tina.io/docs/errors/file-in-mut
5626
5637
  }
5627
5638
  return { warnings };
5628
5639
  };
5629
- this.tinaDirectory = config.tinaDirectory || ".tina";
5640
+ this.tinaDirectory = config.tinaDirectory || "tina";
5630
5641
  this.bridge = config.bridge;
5631
5642
  this.rootLevel = config.level && new LevelProxy(config.level);
5632
5643
  this.indexStatusCallback = config.indexStatusCallback || defaultStatusCallback;
package/dist/index.js CHANGED
@@ -5487,13 +5487,24 @@ var Database = class {
5487
5487
  let nextLevel;
5488
5488
  return await this.indexStatusCallbackWrapper(
5489
5489
  async () => {
5490
- const lookup = lookupFromLockFile || JSON.parse(
5491
- await this.bridge.get(
5492
- (0, import_schema_tools3.normalizePath)(
5493
- import_path3.default.join(this.getGeneratedFolder(), "_lookup.json")
5490
+ let lookup;
5491
+ try {
5492
+ lookup = lookupFromLockFile || JSON.parse(
5493
+ await this.bridge.get(
5494
+ (0, import_schema_tools3.normalizePath)(
5495
+ import_path3.default.join(this.getGeneratedFolder(), "_lookup.json")
5496
+ )
5494
5497
  )
5495
- )
5496
- );
5498
+ );
5499
+ } catch (error) {
5500
+ console.error("Error: Unable to find generated lookup file");
5501
+ if (this.tinaDirectory === "tina") {
5502
+ console.error(
5503
+ 'If you are using the .tina folder. Please set {tinaDirectory: ".tina"} in your createDatabase options or migrate to the new tina folder: https://tina.io/blog/tina-config-rearrangements/'
5504
+ );
5505
+ }
5506
+ throw error;
5507
+ }
5497
5508
  let nextVersion;
5498
5509
  if (!this.config.version) {
5499
5510
  await this.level.clear();
@@ -5684,7 +5695,7 @@ This will be an error in the future. See https://tina.io/docs/errors/file-in-mut
5684
5695
  }
5685
5696
  return { warnings };
5686
5697
  };
5687
- this.tinaDirectory = config.tinaDirectory || ".tina";
5698
+ this.tinaDirectory = config.tinaDirectory || "tina";
5688
5699
  this.bridge = config.bridge;
5689
5700
  this.rootLevel = config.level && new LevelProxy(config.level);
5690
5701
  this.indexStatusCallback = config.indexStatusCallback || defaultStatusCallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "0.0.0-20230516235218",
3
+ "version": "0.0.0-20230517131653",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "typings": "dist/index.d.ts",
@@ -25,6 +25,8 @@
25
25
  "dependencies": {
26
26
  "@graphql-tools/relay-operation-optimizer": "^6.4.1",
27
27
  "@iarna/toml": "^2.2.5",
28
+ "@tinacms/mdx": "1.3.10",
29
+ "@tinacms/schema-tools": "1.4.4",
28
30
  "abstract-level": "^1.0.3",
29
31
  "body-parser": "^1.19.0",
30
32
  "cors": "^2.8.5",
@@ -72,9 +74,7 @@
72
74
  "unist-util-visit": "^4.0.0",
73
75
  "vfile": "^4.2.0",
74
76
  "ws": "^7.3.1",
75
- "yup": "^0.32.9",
76
- "@tinacms/mdx": "1.3.10",
77
- "@tinacms/schema-tools": "1.4.4"
77
+ "yup": "^0.32.9"
78
78
  },
79
79
  "publishConfig": {
80
80
  "registry": "https://registry.npmjs.org"
@@ -84,6 +84,8 @@
84
84
  "directory": "packages/tina-graphql"
85
85
  },
86
86
  "devDependencies": {
87
+ "@tinacms/schema-tools": "1.4.4",
88
+ "@tinacms/scripts": "1.1.0",
87
89
  "@types/cors": "^2.8.7",
88
90
  "@types/estree": "^0.0.50",
89
91
  "@types/express": "^4.17.8",
@@ -106,9 +108,7 @@
106
108
  "jest-matcher-utils": "27.0.6",
107
109
  "memory-level": "^1.0.0",
108
110
  "nodemon": "2.0.19",
109
- "typescript": "4.3.5",
110
- "@tinacms/schema-tools": "1.4.4",
111
- "@tinacms/scripts": "1.1.0"
111
+ "typescript": "4.3.5"
112
112
  },
113
113
  "scripts": {
114
114
  "types": "pnpm tsc",