@tinacms/cli 0.61.25 → 0.61.27

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -17
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -302,7 +302,7 @@ var commander = __toModule(require("commander"));
302
302
 
303
303
  // package.json
304
304
  var name = "@tinacms/cli";
305
- var version = "0.61.25";
305
+ var version = "0.61.27";
306
306
 
307
307
  // src/cmds/audit/audit.ts
308
308
  var import_graphql = __toModule(require("@tinacms/graphql"));
@@ -1391,17 +1391,6 @@ var compileFile = async (options, fileName) => {
1391
1391
  if (!schemaFileType2) {
1392
1392
  throw new Error(`Requested schema file type '${requestedSchemaFileType}' is not valid. Supported schema file types: 'ts, js, tsx, jsx'`);
1393
1393
  }
1394
- let schemaExists = true;
1395
- try {
1396
- getPath({
1397
- projectDir: tinaPath,
1398
- filename: fileName,
1399
- allowedTypes: ["js", "jsx", "tsx", "ts"],
1400
- errorMessage: `Must provide a ${fileName}.{js,jsx,tsx,ts}`
1401
- });
1402
- } catch {
1403
- schemaExists = false;
1404
- }
1405
1394
  try {
1406
1395
  const define = {};
1407
1396
  if (!process.env.NODE_ENV) {
@@ -1444,7 +1433,7 @@ var compileSchema = async (options) => {
1444
1433
  const tinaPath = import_path5.default.join(root2, ".tina");
1445
1434
  const tinaGeneratedPath = import_path5.default.join(tinaPath, "__generated__");
1446
1435
  const tinaConfigPath = import_path5.default.join(tinaGeneratedPath, "config");
1447
- let schemaExists = fileExists({
1436
+ const schemaExists = fileExists({
1448
1437
  projectDir: tinaPath,
1449
1438
  filename: "schema",
1450
1439
  allowedTypes: ["js", "jsx", "tsx", "ts"]
@@ -1458,7 +1447,9 @@ var compileSchema = async (options) => {
1458
1447
  throw new Error("No schema or config file found in .tina folder. Please run `npx @tinacms/cli@latest init` to generate a schema file.");
1459
1448
  }
1460
1449
  let schema;
1461
- if (schemaExists) {
1450
+ if (schemaExists && !configExists) {
1451
+ console.warn(`schema.{ts,tsx,js,jsx} will soon be deprecated, in favor of the new config.{ts,tsx,js,jsx}
1452
+ See here for migration steps, see here: https://tina.io/blog/upgrading-to-iframe`);
1462
1453
  schema = await compileFile(options, "schema");
1463
1454
  }
1464
1455
  if (configExists) {
@@ -2295,7 +2286,7 @@ var IndexFailedError = class extends Error {
2295
2286
  };
2296
2287
  var waitForDB = async (ctx, next, options) => {
2297
2288
  if (!ctx.client) {
2298
- throw new Error("No Tina Cloud found. For more information on how to setup the tina cloud see https://tina.io/docs/features/data-fetching/#making-requests-with-the-tina-client");
2289
+ throw new Error("No Tina Cloud found. For more information on how to setup the Tina Cloud see https://tina.io/docs/features/data-fetching/#making-requests-with-the-tina-client");
2299
2290
  }
2300
2291
  const client = ctx.client;
2301
2292
  const { host, clientId, branch, isLocalClient } = client.parseURL();
@@ -2330,9 +2321,9 @@ var waitForDB = async (ctx, next, options) => {
2330
2321
  }
2331
2322
  setTimeout(pollForStatus, POLLING_INTERVAL);
2332
2323
  } else if (status === STATUS_FAILED) {
2333
- throw new IndexFailedError(`Attempting to index but responded with status 'failed', ${error}`);
2324
+ throw new IndexFailedError(`Attempting to index but responded with status 'failed', To retry the indexing process, click \u201CReset Repository Cache\u201D in tina cloud advance settings. ${error}`);
2334
2325
  } else {
2335
- throw new IndexFailedError(`Attempting to index but responded with status 'unknown', ${error}`);
2326
+ throw new IndexFailedError(`Attempting to index but responded with status 'unknown', To retry the indexing process, click \u201CReset Repository Cache\u201D in tina cloud advance settings. ${error}`);
2336
2327
  }
2337
2328
  } catch (e) {
2338
2329
  if (e instanceof IndexFailedError) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "0.61.25",
3
+ "version": "0.61.27",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -52,9 +52,9 @@
52
52
  "@graphql-codegen/visitor-plugin-common": "^2.4.0",
53
53
  "@graphql-tools/graphql-file-loader": "^7.2.0",
54
54
  "@graphql-tools/load": "^7.3.2",
55
- "@tinacms/app": "0.0.24",
55
+ "@tinacms/app": "0.0.25",
56
56
  "@tinacms/datalayer": "0.2.4",
57
- "@tinacms/graphql": "0.63.16",
57
+ "@tinacms/graphql": "0.63.17",
58
58
  "@tinacms/metrics": "0.0.3",
59
59
  "@tinacms/schema-tools": "0.1.9",
60
60
  "add": "^2.0.6",