@tinacms/graphql 0.63.6 → 0.63.9

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.d.ts CHANGED
@@ -10,6 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
+ import { buildDotTinaFiles } from './build';
13
14
  export { resolve } from './resolve';
14
15
  export * from './resolver/error';
15
16
  export { createDatabase } from './database';
@@ -20,6 +21,8 @@ export type { Store } from '@tinacms/datalayer';
20
21
  export type { Bridge } from './database/bridge';
21
22
  export { sequential, assertShape } from './util';
22
23
  export { stringifyFile, parseFile } from './database/util';
24
+ export { createSchema } from './schema';
25
+ export { buildDotTinaFiles };
23
26
  export declare type DummyType = unknown;
24
27
  export declare const buildSchema: (rootPath: string, database: Database, flags?: string[]) => Promise<{
25
28
  graphQLSchema: import("graphql").DocumentNode;
package/dist/index.js CHANGED
@@ -58,8 +58,10 @@ __export(exports, {
58
58
  TinaParseDocumentError: () => TinaParseDocumentError,
59
59
  TinaQueryError: () => TinaQueryError,
60
60
  assertShape: () => assertShape,
61
+ buildDotTinaFiles: () => buildDotTinaFiles,
61
62
  buildSchema: () => buildSchema,
62
63
  createDatabase: () => createDatabase,
64
+ createSchema: () => createSchema,
63
65
  getASTSchema: () => getASTSchema,
64
66
  handleFetchErrorError: () => handleFetchErrorError,
65
67
  parseFile: () => parseFile,
@@ -2437,7 +2439,7 @@ var validateField = async (field) => {
2437
2439
 
2438
2440
  // package.json
2439
2441
  var name = "@tinacms/graphql";
2440
- var version = "0.63.6";
2442
+ var version = "0.63.9";
2441
2443
  var main = "dist/index.js";
2442
2444
  var typings = "dist/index.d.ts";
2443
2445
  var files = [
@@ -2670,7 +2672,7 @@ var TinaSchema = class {
2670
2672
  };
2671
2673
  this.getCollectionByFullPath = (filepath) => {
2672
2674
  const collection = this.getCollections().find((collection2) => {
2673
- return filepath.replace("\\", "/").startsWith(collection2.path.replace(/\/?$/, "/"));
2675
+ return filepath.replace(/\\/g, "/").startsWith(collection2.path.replace(/\/?$/, "/"));
2674
2676
  });
2675
2677
  if (!collection) {
2676
2678
  throw new Error(`Unable to find collection for file at ${filepath}`);
@@ -3081,7 +3083,7 @@ var Resolver = class {
3081
3083
  ext: extension,
3082
3084
  name: filename
3083
3085
  } = import_path2.default.parse(fullPath);
3084
- const relativePath = fullPath.replace("\\", "/").replace(collection.path, "").replace(/^\/|\/$/g, "");
3086
+ const relativePath = fullPath.replace(/\\/g, "/").replace(collection.path, "").replace(/^\/|\/$/g, "");
3085
3087
  const breadcrumbs = relativePath.replace(extension, "").split("/");
3086
3088
  const data = {
3087
3089
  _collection: rawData._collection,
@@ -4326,8 +4328,10 @@ var getASTSchema = async (database) => {
4326
4328
  TinaParseDocumentError,
4327
4329
  TinaQueryError,
4328
4330
  assertShape,
4331
+ buildDotTinaFiles,
4329
4332
  buildSchema,
4330
4333
  createDatabase,
4334
+ createSchema,
4331
4335
  getASTSchema,
4332
4336
  handleFetchErrorError,
4333
4337
  parseFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "0.63.6",
3
+ "version": "0.63.9",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  "dependencies": {
21
21
  "@graphql-tools/relay-operation-optimizer": "^6.4.1",
22
22
  "@tinacms/datalayer": "0.2.3",
23
- "@tinacms/schema-tools": "0.1.1",
24
- "@tinacms/mdx": "0.61.5",
23
+ "@tinacms/schema-tools": "0.1.3",
24
+ "@tinacms/mdx": "0.61.7",
25
25
  "body-parser": "^1.19.0",
26
26
  "cors": "^2.8.5",
27
27
  "dataloader": "^2.0.0",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@tinacms/datalayer": "0.2.3",
75
- "@tinacms/schema-tools": "0.1.1",
75
+ "@tinacms/schema-tools": "0.1.3",
76
76
  "@tinacms/scripts": "0.51.1",
77
77
  "@types/cors": "^2.8.7",
78
78
  "@types/estree": "^0.0.50",