@tinacms/graphql 0.0.0-20240603083347 → 0.0.0-20240618022325
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.js +5 -4
- package/dist/index.mjs +5 -4
- package/dist/resolver/index.d.ts +1 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2874,7 +2874,7 @@ var validateField = async (field) => {
|
|
|
2874
2874
|
// package.json
|
|
2875
2875
|
var package_default = {
|
|
2876
2876
|
name: "@tinacms/graphql",
|
|
2877
|
-
version: "1.4.
|
|
2877
|
+
version: "1.4.35",
|
|
2878
2878
|
main: "dist/index.js",
|
|
2879
2879
|
module: "dist/index.mjs",
|
|
2880
2880
|
typings: "dist/index.d.ts",
|
|
@@ -4925,7 +4925,7 @@ var Resolver = class {
|
|
|
4925
4925
|
const collection = await this.tinaSchema.getCollection(collectionLookup);
|
|
4926
4926
|
let realPath = import_path3.default.join(collection == null ? void 0 : collection.path, args.relativePath);
|
|
4927
4927
|
if (isFolderCreation) {
|
|
4928
|
-
realPath = `${realPath}/.gitkeep`;
|
|
4928
|
+
realPath = `${realPath}/.gitkeep.${collection.format || "md"}`;
|
|
4929
4929
|
}
|
|
4930
4930
|
const alreadyExists = await this.database.documentExists(realPath);
|
|
4931
4931
|
if (isMutation) {
|
|
@@ -5864,7 +5864,6 @@ var Database = class {
|
|
|
5864
5864
|
this.put = async (filepath, data, collectionName) => {
|
|
5865
5865
|
var _a, _b;
|
|
5866
5866
|
await this.initLevel();
|
|
5867
|
-
const isGitKeep = filepath.endsWith(".gitkeep");
|
|
5868
5867
|
try {
|
|
5869
5868
|
if (SYSTEM_FILES.includes(filepath)) {
|
|
5870
5869
|
throw new Error(`Unexpected put for config file ${filepath}`);
|
|
@@ -5893,7 +5892,9 @@ var Database = class {
|
|
|
5893
5892
|
);
|
|
5894
5893
|
}
|
|
5895
5894
|
}
|
|
5896
|
-
const stringifiedFile =
|
|
5895
|
+
const stringifiedFile = filepath.endsWith(
|
|
5896
|
+
`.gitkeep.${collection.format || "md"}`
|
|
5897
|
+
) ? "" : await this.stringifyFile(filepath, dataFields, collection);
|
|
5897
5898
|
if (!(collection == null ? void 0 : collection.isDetached)) {
|
|
5898
5899
|
if (this.bridge) {
|
|
5899
5900
|
await this.bridge.put(normalizedPath, stringifiedFile);
|
package/dist/index.mjs
CHANGED
|
@@ -2807,7 +2807,7 @@ var validateField = async (field) => {
|
|
|
2807
2807
|
// package.json
|
|
2808
2808
|
var package_default = {
|
|
2809
2809
|
name: "@tinacms/graphql",
|
|
2810
|
-
version: "1.4.
|
|
2810
|
+
version: "1.4.35",
|
|
2811
2811
|
main: "dist/index.js",
|
|
2812
2812
|
module: "dist/index.mjs",
|
|
2813
2813
|
typings: "dist/index.d.ts",
|
|
@@ -4852,7 +4852,7 @@ var Resolver = class {
|
|
|
4852
4852
|
const collection = await this.tinaSchema.getCollection(collectionLookup);
|
|
4853
4853
|
let realPath = path3.join(collection?.path, args.relativePath);
|
|
4854
4854
|
if (isFolderCreation) {
|
|
4855
|
-
realPath = `${realPath}/.gitkeep`;
|
|
4855
|
+
realPath = `${realPath}/.gitkeep.${collection.format || "md"}`;
|
|
4856
4856
|
}
|
|
4857
4857
|
const alreadyExists = await this.database.documentExists(realPath);
|
|
4858
4858
|
if (isMutation) {
|
|
@@ -5785,7 +5785,6 @@ var Database = class {
|
|
|
5785
5785
|
};
|
|
5786
5786
|
this.put = async (filepath, data, collectionName) => {
|
|
5787
5787
|
await this.initLevel();
|
|
5788
|
-
const isGitKeep = filepath.endsWith(".gitkeep");
|
|
5789
5788
|
try {
|
|
5790
5789
|
if (SYSTEM_FILES.includes(filepath)) {
|
|
5791
5790
|
throw new Error(`Unexpected put for config file ${filepath}`);
|
|
@@ -5814,7 +5813,9 @@ var Database = class {
|
|
|
5814
5813
|
);
|
|
5815
5814
|
}
|
|
5816
5815
|
}
|
|
5817
|
-
const stringifiedFile =
|
|
5816
|
+
const stringifiedFile = filepath.endsWith(
|
|
5817
|
+
`.gitkeep.${collection.format || "md"}`
|
|
5818
|
+
) ? "" : await this.stringifyFile(filepath, dataFields, collection);
|
|
5818
5819
|
if (!collection?.isDetached) {
|
|
5819
5820
|
if (this.bridge) {
|
|
5820
5821
|
await this.bridge.put(normalizedPath, stringifiedFile);
|
package/dist/resolver/index.d.ts
CHANGED
|
@@ -52,9 +52,7 @@ export declare class Resolver {
|
|
|
52
52
|
constructor(init: ResolverConfig);
|
|
53
53
|
resolveCollection: (args: any, collectionName: string, hasDocuments?: boolean) => Promise<{
|
|
54
54
|
fields: TinaField<true>[];
|
|
55
|
-
templates?: undefined;
|
|
56
|
-
* createDocument, create<Collection>Document
|
|
57
|
-
*/
|
|
55
|
+
templates?: undefined;
|
|
58
56
|
label?: string;
|
|
59
57
|
name: string;
|
|
60
58
|
path: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/graphql",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20240618022325",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@iarna/toml": "^2.2.5",
|
|
27
|
-
"@tinacms/mdx": "
|
|
28
|
-
"@tinacms/schema-tools": "
|
|
27
|
+
"@tinacms/mdx": "1.3.25",
|
|
28
|
+
"@tinacms/schema-tools": "1.4.16",
|
|
29
29
|
"abstract-level": "^1.0.3",
|
|
30
30
|
"body-parser": "^1.19.0",
|
|
31
31
|
"cors": "^2.8.5",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"directory": "packages/tina-graphql"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@tinacms/schema-tools": "
|
|
62
|
-
"@tinacms/scripts": "
|
|
61
|
+
"@tinacms/schema-tools": "1.4.16",
|
|
62
|
+
"@tinacms/scripts": "1.1.4",
|
|
63
63
|
"@types/cors": "^2.8.7",
|
|
64
64
|
"@types/estree": "^0.0.50",
|
|
65
65
|
"@types/express": "^4.17.8",
|