@tinacms/cli 1.6.12 → 1.6.13
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
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.
|
|
34
|
+
var version = "1.6.13";
|
|
35
35
|
|
|
36
36
|
// src/next/commands/dev-command/index.ts
|
|
37
37
|
var import_clipanion2 = require("clipanion");
|
|
@@ -2811,7 +2811,7 @@ ${dangerText(e.message)}
|
|
|
2811
2811
|
}
|
|
2812
2812
|
const skipCloudChecks = this.skipCloudChecks || configManager.hasSelfHostedConfig();
|
|
2813
2813
|
if (!skipCloudChecks) {
|
|
2814
|
-
const { hasUpstream } = await this.checkClientInfo(
|
|
2814
|
+
const { hasUpstream, timestamp } = await this.checkClientInfo(
|
|
2815
2815
|
configManager,
|
|
2816
2816
|
codegen2.productionUrl,
|
|
2817
2817
|
this.previewBaseBranch
|
|
@@ -2839,14 +2839,16 @@ ${dangerText(e.message)}
|
|
|
2839
2839
|
await this.checkGraphqlSchema(
|
|
2840
2840
|
configManager,
|
|
2841
2841
|
database,
|
|
2842
|
-
codegen2.productionUrl
|
|
2842
|
+
codegen2.productionUrl,
|
|
2843
|
+
timestamp
|
|
2843
2844
|
);
|
|
2844
2845
|
await this.checkTinaSchema(
|
|
2845
2846
|
configManager,
|
|
2846
2847
|
database,
|
|
2847
2848
|
codegen2.productionUrl,
|
|
2848
2849
|
this.previewName,
|
|
2849
|
-
this.verbose
|
|
2850
|
+
this.verbose,
|
|
2851
|
+
timestamp
|
|
2850
2852
|
);
|
|
2851
2853
|
}
|
|
2852
2854
|
await buildProductionSpa(configManager, database, codegen2.productionUrl);
|
|
@@ -2965,11 +2967,13 @@ ${dangerText(e.message)}
|
|
|
2965
2967
|
const bar2 = new import_progress2.default("Checking clientId and token. :prog", 1);
|
|
2966
2968
|
let branchKnown = false;
|
|
2967
2969
|
let hasUpstream = false;
|
|
2970
|
+
let timestamp;
|
|
2968
2971
|
try {
|
|
2969
2972
|
const res = await request({
|
|
2970
2973
|
token,
|
|
2971
2974
|
url
|
|
2972
2975
|
});
|
|
2976
|
+
timestamp = res.timestamp || 0;
|
|
2973
2977
|
bar2.tick({
|
|
2974
2978
|
prog: "\u2705"
|
|
2975
2979
|
});
|
|
@@ -3011,7 +3015,8 @@ ${dangerText(e.message)}
|
|
|
3011
3015
|
prog: "\u2705"
|
|
3012
3016
|
});
|
|
3013
3017
|
return {
|
|
3014
|
-
hasUpstream
|
|
3018
|
+
hasUpstream,
|
|
3019
|
+
timestamp
|
|
3015
3020
|
};
|
|
3016
3021
|
}
|
|
3017
3022
|
for (let i = 0; i <= 5; i++) {
|
|
@@ -3101,14 +3106,14 @@ ${dangerText(e.message)}
|
|
|
3101
3106
|
throw e;
|
|
3102
3107
|
}
|
|
3103
3108
|
}
|
|
3104
|
-
async checkGraphqlSchema(configManager, database, apiURL) {
|
|
3109
|
+
async checkGraphqlSchema(configManager, database, apiURL, timestamp) {
|
|
3105
3110
|
const bar2 = new import_progress2.default(
|
|
3106
3111
|
"Checking local GraphQL Schema matches server. :prog",
|
|
3107
3112
|
1
|
|
3108
3113
|
);
|
|
3109
3114
|
const { config: config2 } = configManager;
|
|
3110
3115
|
const token = config2.token;
|
|
3111
|
-
const remoteSchema = await fetchRemoteGraphqlSchema({
|
|
3116
|
+
const { remoteSchema, remoteVersion } = await fetchRemoteGraphqlSchema({
|
|
3112
3117
|
url: apiURL,
|
|
3113
3118
|
token
|
|
3114
3119
|
});
|
|
@@ -3138,11 +3143,21 @@ Additional info: Branch: ${config2.branch}, Client ID: ${config2.clientId} `;
|
|
|
3138
3143
|
prog: "\u274C"
|
|
3139
3144
|
});
|
|
3140
3145
|
let errorMessage = `The local GraphQL schema doesn't match the remote GraphQL schema. Please push up your changes to GitHub to update your remote GraphQL schema.`;
|
|
3141
|
-
|
|
3142
|
-
errorMessage += `
|
|
3146
|
+
errorMessage += `
|
|
3143
3147
|
|
|
3144
|
-
Additional info:
|
|
3148
|
+
Additional info:
|
|
3149
|
+
|
|
3150
|
+
`;
|
|
3151
|
+
if (config2 == null ? void 0 : config2.branch) {
|
|
3152
|
+
errorMessage += ` Branch: ${config2.branch}, Client ID: ${config2.clientId}
|
|
3153
|
+
`;
|
|
3145
3154
|
}
|
|
3155
|
+
errorMessage += ` Local GraphQL version: ${configManager.getTinaGraphQLVersion()} / Remote GraphQL version: ${remoteVersion}
|
|
3156
|
+
`;
|
|
3157
|
+
errorMessage += ` Last indexed at: ${new Date(
|
|
3158
|
+
timestamp
|
|
3159
|
+
).toUTCString()}
|
|
3160
|
+
`;
|
|
3146
3161
|
throw new Error(errorMessage);
|
|
3147
3162
|
}
|
|
3148
3163
|
} catch (e) {
|
|
@@ -3157,7 +3172,7 @@ Additional info: Branch: ${config2.branch}, Client ID: ${config2.clientId} `;
|
|
|
3157
3172
|
}
|
|
3158
3173
|
}
|
|
3159
3174
|
}
|
|
3160
|
-
async checkTinaSchema(configManager, database, apiURL, previewName, verbose) {
|
|
3175
|
+
async checkTinaSchema(configManager, database, apiURL, previewName, verbose, timestamp) {
|
|
3161
3176
|
const bar2 = new import_progress2.default(
|
|
3162
3177
|
"Checking local Tina Schema matches server. :prog",
|
|
3163
3178
|
1
|
|
@@ -3206,11 +3221,19 @@ Additional info: Branch: ${config2.branch}, Client ID: ${config2.clientId} `;
|
|
|
3206
3221
|
prog: "\u274C"
|
|
3207
3222
|
});
|
|
3208
3223
|
let errorMessage = `The local Tina schema doesn't match the remote Tina schema. Please push up your changes to GitHub to update your remote tina schema.`;
|
|
3209
|
-
|
|
3210
|
-
errorMessage += `
|
|
3224
|
+
errorMessage += `
|
|
3211
3225
|
|
|
3212
|
-
Additional info:
|
|
3226
|
+
Additional info:
|
|
3227
|
+
|
|
3228
|
+
`;
|
|
3229
|
+
if (config2 == null ? void 0 : config2.branch) {
|
|
3230
|
+
errorMessage += ` Branch: ${config2.branch}, Client ID: ${config2.clientId}
|
|
3231
|
+
`;
|
|
3213
3232
|
}
|
|
3233
|
+
errorMessage += ` Last indexed at: ${new Date(
|
|
3234
|
+
timestamp
|
|
3235
|
+
).toUTCString()}
|
|
3236
|
+
`;
|
|
3214
3237
|
throw new Error(errorMessage);
|
|
3215
3238
|
}
|
|
3216
3239
|
}
|
|
@@ -3280,7 +3303,10 @@ var fetchRemoteGraphqlSchema = async ({
|
|
|
3280
3303
|
body
|
|
3281
3304
|
});
|
|
3282
3305
|
const data = await res.json();
|
|
3283
|
-
return
|
|
3306
|
+
return {
|
|
3307
|
+
remoteSchema: data == null ? void 0 : data.data,
|
|
3308
|
+
remoteVersion: res.headers.get("tinacms-grapqhl-version")
|
|
3309
|
+
};
|
|
3284
3310
|
};
|
|
3285
3311
|
var fetchSchemaSha = async ({
|
|
3286
3312
|
url,
|
|
@@ -21,19 +21,23 @@ export declare class BuildCommand extends BaseCommand {
|
|
|
21
21
|
execute(): Promise<number | void>;
|
|
22
22
|
checkClientInfo(configManager: ConfigManager, apiURL: string, previewBaseBranch?: string): Promise<{
|
|
23
23
|
hasUpstream: boolean;
|
|
24
|
+
timestamp: number;
|
|
24
25
|
}>;
|
|
25
26
|
syncProject(configManager: ConfigManager, apiURL: string, options?: {
|
|
26
27
|
upstreamBranch?: string;
|
|
27
28
|
previewBaseBranch?: string;
|
|
28
29
|
previewName?: string;
|
|
29
30
|
}): Promise<void>;
|
|
30
|
-
checkGraphqlSchema(configManager: ConfigManager, database: Database, apiURL: string): Promise<void>;
|
|
31
|
-
checkTinaSchema(configManager: ConfigManager, database: Database, apiURL: string, previewName: string, verbose: boolean): Promise<void>;
|
|
31
|
+
checkGraphqlSchema(configManager: ConfigManager, database: Database, apiURL: string, timestamp: number): Promise<void>;
|
|
32
|
+
checkTinaSchema(configManager: ConfigManager, database: Database, apiURL: string, previewName: string, verbose: boolean, timestamp: number): Promise<void>;
|
|
32
33
|
}
|
|
33
34
|
export declare const fetchRemoteGraphqlSchema: ({ url, token, }: {
|
|
34
35
|
url: string;
|
|
35
36
|
token?: string;
|
|
36
|
-
}) => Promise<
|
|
37
|
+
}) => Promise<{
|
|
38
|
+
remoteSchema: any;
|
|
39
|
+
remoteVersion: string;
|
|
40
|
+
}>;
|
|
37
41
|
export declare const fetchSchemaSha: ({ url, token, }: {
|
|
38
42
|
url: string;
|
|
39
43
|
token?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.13",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
"yup": "^1.4.0",
|
|
86
86
|
"zod": "^3.23.8",
|
|
87
87
|
"@tinacms/graphql": "1.5.8",
|
|
88
|
-
"@tinacms/app": "2.1.
|
|
89
|
-
"@tinacms/schema-tools": "1.6.8",
|
|
88
|
+
"@tinacms/app": "2.1.13",
|
|
90
89
|
"@tinacms/metrics": "1.0.8",
|
|
91
|
-
"tinacms": "
|
|
92
|
-
"@tinacms/search": "1.0.35"
|
|
90
|
+
"@tinacms/schema-tools": "1.6.8",
|
|
91
|
+
"@tinacms/search": "1.0.35",
|
|
92
|
+
"tinacms": "2.5.1"
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"registry": "https://registry.npmjs.org"
|