@tinacms/cli 1.5.6 → 1.5.7
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 +32 -18
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
31
31
|
var import_clipanion6 = require("clipanion");
|
|
32
32
|
|
|
33
33
|
// package.json
|
|
34
|
-
var version = "1.5.
|
|
34
|
+
var version = "1.5.7";
|
|
35
35
|
|
|
36
36
|
// src/next/commands/dev-command/index.ts
|
|
37
37
|
var import_clipanion = require("clipanion");
|
|
@@ -989,7 +989,7 @@ var devServerEndPointsPlugin = ({
|
|
|
989
989
|
name: "graphql-endpoints",
|
|
990
990
|
configureServer(server) {
|
|
991
991
|
server.middlewares.use((0, import_cors.default)());
|
|
992
|
-
server.middlewares.use(import_body_parser.default.json());
|
|
992
|
+
server.middlewares.use(import_body_parser.default.json({ limit: "5mb" }));
|
|
993
993
|
server.middlewares.use(async (req, res, next) => {
|
|
994
994
|
var _a;
|
|
995
995
|
const mediaPaths = (_a = configManager.config.media) == null ? void 0 : _a.tina;
|
|
@@ -2110,9 +2110,11 @@ var BuildCommand = class extends import_clipanion2.Command {
|
|
|
2110
2110
|
fragDoc
|
|
2111
2111
|
});
|
|
2112
2112
|
const apiURL = await codegen2.execute();
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2113
|
+
if (!configManager.hasSelfHostedConfig()) {
|
|
2114
|
+
await this.checkClientInfo(configManager, apiURL);
|
|
2115
|
+
await waitForDB(configManager.config, apiURL, false);
|
|
2116
|
+
await this.checkGraphqlSchema(configManager, database, apiURL);
|
|
2117
|
+
}
|
|
2116
2118
|
await buildProductionSpa(configManager, database, apiURL);
|
|
2117
2119
|
await import_fs_extra5.default.outputFile(
|
|
2118
2120
|
configManager.outputGitignorePath,
|
|
@@ -2248,22 +2250,34 @@ var BuildCommand = class extends import_clipanion2.Command {
|
|
|
2248
2250
|
const remoteGqlSchema = (0, import_graphql10.buildClientSchema)(remoteSchema);
|
|
2249
2251
|
const localSchemaDocument = await database.getGraphQLSchemaFromBridge();
|
|
2250
2252
|
const localGraphqlSchema = (0, import_graphql10.buildASTSchema)(localSchemaDocument);
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2253
|
+
try {
|
|
2254
|
+
const diffResult = await (0, import_core2.diff)(localGraphqlSchema, remoteGqlSchema);
|
|
2255
|
+
if (diffResult.length === 0) {
|
|
2256
|
+
bar2.tick({
|
|
2257
|
+
prog: "\u2705"
|
|
2258
|
+
});
|
|
2259
|
+
} else {
|
|
2260
|
+
bar2.tick({
|
|
2261
|
+
prog: "\u274C"
|
|
2262
|
+
});
|
|
2263
|
+
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.`;
|
|
2264
|
+
if (config3 == null ? void 0 : config3.branch) {
|
|
2265
|
+
errorMessage += `
|
|
2263
2266
|
|
|
2264
2267
|
Additional info: Branch: ${config3.branch}, Client ID: ${config3.clientId} `;
|
|
2268
|
+
}
|
|
2269
|
+
throw new Error(errorMessage);
|
|
2270
|
+
}
|
|
2271
|
+
} catch (e) {
|
|
2272
|
+
if (e.message.startsWith("Cannot use")) {
|
|
2273
|
+
logger.warn(
|
|
2274
|
+
`${warnText(
|
|
2275
|
+
"Skipping schema check due to conflicting GraphQL versions"
|
|
2276
|
+
)}`
|
|
2277
|
+
);
|
|
2278
|
+
} else {
|
|
2279
|
+
throw e;
|
|
2265
2280
|
}
|
|
2266
|
-
throw new Error(errorMessage);
|
|
2267
2281
|
}
|
|
2268
2282
|
}
|
|
2269
2283
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/cli",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"@tailwindcss/aspect-ratio": "^0.4.0",
|
|
59
59
|
"@tailwindcss/line-clamp": "^0.3.1",
|
|
60
60
|
"@tailwindcss/typography": "^0.5.9",
|
|
61
|
-
"@tinacms/app": "1.2.
|
|
62
|
-
"@tinacms/datalayer": "1.2.
|
|
63
|
-
"@tinacms/graphql": "1.4.
|
|
61
|
+
"@tinacms/app": "1.2.7",
|
|
62
|
+
"@tinacms/datalayer": "1.2.8",
|
|
63
|
+
"@tinacms/graphql": "1.4.8",
|
|
64
64
|
"@tinacms/metrics": "1.0.2",
|
|
65
|
-
"@tinacms/schema-tools": "1.4.
|
|
65
|
+
"@tinacms/schema-tools": "1.4.3",
|
|
66
66
|
"@vitejs/plugin-react": "3.1.0",
|
|
67
67
|
"ajv": "^6.12.3",
|
|
68
68
|
"altair-express-middleware": "4.0.6",
|