@tinacms/cli 1.5.28 → 1.5.30

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 (3) hide show
  1. package/LICENSE +1 -9
  2. package/dist/index.js +22 -13
  3. package/package.json +7 -7
package/LICENSE CHANGED
@@ -1,12 +1,4 @@
1
- Copyright (c) 2023-present Forestry.io Holdings Inc.
2
-
3
- Portions of the TinaCMS software are licensed as follows:
4
-
5
- * All software that resides under the "packages/@tinacms/datalayer/" and the "packages/@tinacms/graphql/" directories (the "Tina Data Layer"), is licensed under the license defined in "packages/@tinacms/datalayer/LICENSE".
6
-
7
- * All software outside of the above-mentioned directories is available under the "Apache 2.0" license as set forth below.
8
-
9
- Apache License
1
+ Apache License
10
2
  Version 2.0, January 2004
11
3
  http://www.apache.org/licenses/
12
4
 
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.5.28";
34
+ var version = "1.5.30";
35
35
 
36
36
  // src/next/commands/dev-command/index.ts
37
37
  var import_clipanion2 = require("clipanion");
@@ -1763,11 +1763,9 @@ var maybeWarnFragmentSize = async (filepath) => {
1763
1763
  );
1764
1764
  console.log(
1765
1765
  `const schema = defineSchema({
1766
- config: {
1767
- client: {
1768
- referenceDepth: 1,
1769
- },
1770
- }
1766
+ client: {
1767
+ referenceDepth: 1,
1768
+ },
1771
1769
  // ...
1772
1770
  })`
1773
1771
  );
@@ -2000,8 +1998,9 @@ var BaseCommand = class extends import_clipanion.Command {
2000
1998
  }
2001
1999
  }
2002
2000
  const lastSha = await database.getMetadata("lastSha");
2001
+ const exists = lastSha && await (0, import_graphql8.shaExists)({ fs: import_fs_extra5.default, dir: rootPath, sha: lastSha });
2003
2002
  let res;
2004
- if (partialReindex && lastSha && sha) {
2003
+ if (partialReindex && lastSha && exists && sha) {
2005
2004
  const pathFilter = {};
2006
2005
  if (configManager.isUsingLegacyFolder) {
2007
2006
  pathFilter[".tina/__generated__/_schema.json"] = {};
@@ -2128,14 +2127,24 @@ var DevCommand = class extends BaseCommand {
2128
2127
  const schemaObject = require(configManager.generatedSchemaJSONPath);
2129
2128
  const lookupObject = require(configManager.generatedLookupJSONPath);
2130
2129
  const graphqlSchemaObject = require(configManager.generatedGraphQLJSONPath);
2130
+ const tinaLockFilename = "tina-lock.json";
2131
+ const tinaLockContent = JSON.stringify({
2132
+ schema: schemaObject,
2133
+ lookup: lookupObject,
2134
+ graphql: graphqlSchemaObject
2135
+ });
2131
2136
  await import_fs_extra6.default.writeFileSync(
2132
- import_path7.default.join(configManager.tinaFolderPath, "tina-lock.json"),
2133
- JSON.stringify({
2134
- schema: schemaObject,
2135
- lookup: lookupObject,
2136
- graphql: graphqlSchemaObject
2137
- })
2137
+ import_path7.default.join(configManager.tinaFolderPath, tinaLockFilename),
2138
+ tinaLockContent
2138
2139
  );
2140
+ if (configManager.hasSeparateContentRoot()) {
2141
+ const rootPath = await configManager.getTinaFolderPath(
2142
+ configManager.contentRootPath
2143
+ );
2144
+ const filePath = import_path7.default.join(rootPath, tinaLockFilename);
2145
+ await import_fs_extra6.default.ensureFile(filePath);
2146
+ await import_fs_extra6.default.outputFile(filePath, tinaLockContent);
2147
+ }
2139
2148
  }
2140
2149
  if (!this.noWatch) {
2141
2150
  this.watchQueries(configManager, async () => await codegen2.execute());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "1.5.28",
3
+ "version": "1.5.30",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -58,13 +58,13 @@
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.26",
62
- "tinacms": "1.5.19",
63
- "@tinacms/datalayer": "1.2.24",
64
- "@tinacms/graphql": "1.4.24",
61
+ "@tinacms/app": "1.2.28",
62
+ "tinacms": "1.5.21",
63
+ "@tinacms/datalayer": "1.2.26",
64
+ "@tinacms/graphql": "1.4.26",
65
65
  "@tinacms/metrics": "1.0.2",
66
- "@tinacms/schema-tools": "1.4.11",
67
- "@tinacms/search": "1.0.9",
66
+ "@tinacms/schema-tools": "1.4.12",
67
+ "@tinacms/search": "1.0.11",
68
68
  "@vitejs/plugin-react": "3.1.0",
69
69
  "ajv": "^6.12.3",
70
70
  "altair-express-middleware": "4.0.6",