@tinacms/cli 0.0.0-8a702b8-20241010053417 → 0.0.0-9d5e351-20241023053720

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,12 +31,12 @@ module.exports = __toCommonJS(src_exports);
31
31
  var import_clipanion8 = require("clipanion");
32
32
 
33
33
  // package.json
34
- var version = "1.6.9";
34
+ var version = "1.6.10";
35
35
 
36
36
  // src/next/commands/dev-command/index.ts
37
37
  var import_clipanion2 = require("clipanion");
38
38
  var import_fs_extra6 = __toESM(require("fs-extra"));
39
- var import_path6 = __toESM(require("path"));
39
+ var import_path5 = __toESM(require("path"));
40
40
  var import_chokidar = __toESM(require("chokidar"));
41
41
  var import_graphql10 = require("@tinacms/graphql");
42
42
 
@@ -612,18 +612,19 @@ var CONFIRMATION_TEXT = import_chalk3.default.dim("enter to confirm");
612
612
  var import_vite3 = require("vite");
613
613
 
614
614
  // src/next/vite/index.ts
615
- var import_path2 = __toESM(require("path"));
615
+ var import_node_path2 = __toESM(require("path"));
616
+ var import_plugin_react = __toESM(require("@vitejs/plugin-react"));
616
617
  var import_fs_extra2 = __toESM(require("fs-extra"));
618
+ var import_normalize_path2 = __toESM(require("normalize-path"));
617
619
  var import_vite = require("vite");
618
- var import_plugin_react = __toESM(require("@vitejs/plugin-react"));
619
620
 
620
621
  // src/next/vite/tailwind.ts
621
- var import_tailwindcss = __toESM(require("tailwindcss"));
622
- var import_defaultTheme = __toESM(require("tailwindcss/defaultTheme.js"));
623
- var import_typography = __toESM(require("@tailwindcss/typography"));
624
- var import_aspect_ratio = __toESM(require("@tailwindcss/aspect-ratio"));
625
622
  var import_node_path = __toESM(require("path"));
623
+ var import_aspect_ratio = __toESM(require("@tailwindcss/aspect-ratio"));
626
624
  var import_container_queries = __toESM(require("@tailwindcss/container-queries"));
625
+ var import_typography = __toESM(require("@tailwindcss/typography"));
626
+ var import_tailwindcss = __toESM(require("tailwindcss"));
627
+ var import_defaultTheme = __toESM(require("tailwindcss/defaultTheme.js"));
627
628
  var tinaTailwind = (spaPath, prebuildFilePath) => {
628
629
  return {
629
630
  name: "vite-plugin-tina",
@@ -886,13 +887,12 @@ var tinaTailwind = (spaPath, prebuildFilePath) => {
886
887
  };
887
888
 
888
889
  // src/next/vite/index.ts
889
- var import_normalize_path2 = __toESM(require("normalize-path"));
890
890
  async function listFilesRecursively({
891
891
  directoryPath,
892
892
  config: config2,
893
893
  roothPath
894
894
  }) {
895
- const fullDirectoryPath = import_path2.default.join(
895
+ const fullDirectoryPath = import_node_path2.default.join(
896
896
  roothPath,
897
897
  config2.publicFolder,
898
898
  directoryPath
@@ -904,23 +904,23 @@ async function listFilesRecursively({
904
904
  const items = await import_fs_extra2.default.readdir(fullDirectoryPath);
905
905
  const staticMediaItems = [];
906
906
  for (const item of items) {
907
- const itemPath = import_path2.default.join(fullDirectoryPath, item);
907
+ const itemPath = import_node_path2.default.join(fullDirectoryPath, item);
908
908
  const stats = await import_fs_extra2.default.promises.lstat(itemPath);
909
909
  const staticMediaItem = {
910
910
  id: item,
911
911
  filename: item,
912
912
  type: stats.isDirectory() ? "dir" : "file",
913
913
  directory: `${directoryPath.replace(config2.mediaRoot, "")}`,
914
- src: `/${import_path2.default.join(directoryPath, item)}`,
914
+ src: `/${import_node_path2.default.join(directoryPath, item)}`,
915
915
  thumbnails: {
916
- "75x75": `/${import_path2.default.join(directoryPath, item)}`,
917
- "400x400": `/${import_path2.default.join(directoryPath, item)}`,
918
- "1000x1000": `/${import_path2.default.join(directoryPath, item)}`
916
+ "75x75": `/${import_node_path2.default.join(directoryPath, item)}`,
917
+ "400x400": `/${import_node_path2.default.join(directoryPath, item)}`,
918
+ "1000x1000": `/${import_node_path2.default.join(directoryPath, item)}`
919
919
  }
920
920
  };
921
921
  if (stats.isDirectory()) {
922
922
  staticMediaItem.children = await listFilesRecursively({
923
- directoryPath: import_path2.default.join(directoryPath, item),
923
+ directoryPath: import_node_path2.default.join(directoryPath, item),
924
924
  config: config2,
925
925
  roothPath
926
926
  });
@@ -963,7 +963,7 @@ var createConfig = async ({
963
963
  }
964
964
  }
965
965
  });
966
- const staticMediaPath = import_path2.default.join(
966
+ const staticMediaPath = import_node_path2.default.join(
967
967
  configManager.generatedFolderPath,
968
968
  "static-media.json"
969
969
  );
@@ -981,13 +981,13 @@ var createConfig = async ({
981
981
  TINA_IMPORT: configManager.prebuildFilePath,
982
982
  SCHEMA_IMPORT: configManager.generatedGraphQLJSONPath,
983
983
  STATIC_MEDIA_IMPORT: staticMediaPath,
984
- crypto: import_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts"),
985
- fs: import_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts"),
986
- os: import_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts"),
987
- path: import_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts")
984
+ crypto: import_node_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts"),
985
+ fs: import_node_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts"),
986
+ os: import_node_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts"),
987
+ path: import_node_path2.default.join(configManager.spaRootPath, "src", "dummy-client.ts")
988
988
  };
989
989
  if (configManager.shouldSkipSDK()) {
990
- alias["CLIENT_IMPORT"] = import_path2.default.join(
990
+ alias["CLIENT_IMPORT"] = import_node_path2.default.join(
991
991
  configManager.spaRootPath,
992
992
  "src",
993
993
  "dummy-client.ts"
@@ -1059,17 +1059,17 @@ var import_pluginutils = require("@rollup/pluginutils");
1059
1059
  var import_fs = __toESM(require("fs"));
1060
1060
  var import_vite2 = require("vite");
1061
1061
  var import_esbuild = require("esbuild");
1062
- var import_path4 = __toESM(require("path"));
1062
+ var import_path3 = __toESM(require("path"));
1063
1063
  var import_body_parser = __toESM(require("body-parser"));
1064
1064
  var import_cors = __toESM(require("cors"));
1065
1065
  var import_graphql = require("@tinacms/graphql");
1066
1066
 
1067
1067
  // src/next/commands/dev-command/server/media.ts
1068
1068
  var import_fs_extra3 = __toESM(require("fs-extra"));
1069
- var import_path3 = __toESM(require("path"));
1069
+ var import_path2 = __toESM(require("path"));
1070
1070
  var import_busboy = __toESM(require("busboy"));
1071
1071
  var createMediaRouter = (config2) => {
1072
- const mediaFolder = import_path3.default.join(
1072
+ const mediaFolder = import_path2.default.join(
1073
1073
  config2.rootPath,
1074
1074
  config2.publicFolder,
1075
1075
  config2.mediaRoot
@@ -1097,8 +1097,8 @@ var createMediaRouter = (config2) => {
1097
1097
  bb.on("file", async (_name, file, _info) => {
1098
1098
  var _a;
1099
1099
  const fullPath = decodeURI((_a = req.url) == null ? void 0 : _a.slice("/media/upload/".length));
1100
- const saveTo = import_path3.default.join(mediaFolder, ...fullPath.split("/"));
1101
- await import_fs_extra3.default.ensureDir(import_path3.default.dirname(saveTo));
1100
+ const saveTo = import_path2.default.join(mediaFolder, ...fullPath.split("/"));
1101
+ await import_fs_extra3.default.ensureDir(import_path2.default.dirname(saveTo));
1102
1102
  file.pipe(import_fs_extra3.default.createWriteStream(saveTo));
1103
1103
  });
1104
1104
  bb.on("error", (error) => {
@@ -1133,7 +1133,7 @@ var MediaModel = class {
1133
1133
  }
1134
1134
  async listMedia(args) {
1135
1135
  try {
1136
- const folderPath = (0, import_path3.join)(
1136
+ const folderPath = (0, import_path2.join)(
1137
1137
  this.rootPath,
1138
1138
  this.publicFolder,
1139
1139
  this.mediaRoot,
@@ -1148,7 +1148,7 @@ var MediaModel = class {
1148
1148
  }
1149
1149
  const filesStr = await import_fs_extra3.default.readdir(folderPath);
1150
1150
  const filesProm = filesStr.map(async (file) => {
1151
- const filePath = (0, import_path3.join)(folderPath, file);
1151
+ const filePath = (0, import_path2.join)(folderPath, file);
1152
1152
  const stat = await import_fs_extra3.default.stat(filePath);
1153
1153
  let src = `/${file}`;
1154
1154
  const isFile = stat.isFile();
@@ -1205,7 +1205,7 @@ var MediaModel = class {
1205
1205
  }
1206
1206
  async deleteMedia(args) {
1207
1207
  try {
1208
- const file = (0, import_path3.join)(
1208
+ const file = (0, import_path2.join)(
1209
1209
  this.rootPath,
1210
1210
  this.publicFolder,
1211
1211
  this.mediaRoot,
@@ -1270,7 +1270,7 @@ var transformTsxPlugin = ({
1270
1270
  const plug = {
1271
1271
  name: "transform-tsx",
1272
1272
  async transform(code, id) {
1273
- const extName = import_path4.default.extname(id);
1273
+ const extName = import_path3.default.extname(id);
1274
1274
  if (extName.startsWith(".tsx") || extName.startsWith(".ts")) {
1275
1275
  const result = await (0, import_esbuild.transform)(code, { loader: "tsx" });
1276
1276
  return {
@@ -1422,7 +1422,7 @@ var createDevServer = async (configManager, database, searchIndex, apiURL, noWat
1422
1422
 
1423
1423
  // src/next/codegen/index.ts
1424
1424
  var import_fs_extra4 = __toESM(require("fs-extra"));
1425
- var import_path5 = __toESM(require("path"));
1425
+ var import_path4 = __toESM(require("path"));
1426
1426
  var import_graphql6 = require("graphql");
1427
1427
 
1428
1428
  // src/next/codegen/codegen/index.ts
@@ -1668,11 +1668,11 @@ var Codegen = class {
1668
1668
  this.noClientBuildCache = noClientBuildCache;
1669
1669
  }
1670
1670
  async writeConfigFile(fileName, data) {
1671
- const filePath = import_path5.default.join(this.configManager.generatedFolderPath, fileName);
1671
+ const filePath = import_path4.default.join(this.configManager.generatedFolderPath, fileName);
1672
1672
  await import_fs_extra4.default.ensureFile(filePath);
1673
1673
  await import_fs_extra4.default.outputFile(filePath, data);
1674
1674
  if (this.configManager.hasSeparateContentRoot()) {
1675
- const filePath2 = import_path5.default.join(
1675
+ const filePath2 = import_path4.default.join(
1676
1676
  this.configManager.generatedFolderPathContentRepo,
1677
1677
  fileName
1678
1678
  );
@@ -2324,14 +2324,14 @@ var DevCommand = class extends BaseCommand {
2324
2324
  graphql: graphqlSchemaObject
2325
2325
  });
2326
2326
  import_fs_extra6.default.writeFileSync(
2327
- import_path6.default.join(configManager.tinaFolderPath, tinaLockFilename),
2327
+ import_path5.default.join(configManager.tinaFolderPath, tinaLockFilename),
2328
2328
  tinaLockContent
2329
2329
  );
2330
2330
  if (configManager.hasSeparateContentRoot()) {
2331
2331
  const rootPath = await configManager.getTinaFolderPath(
2332
2332
  configManager.contentRootPath
2333
2333
  );
2334
- const filePath = import_path6.default.join(rootPath, tinaLockFilename);
2334
+ const filePath = import_path5.default.join(rootPath, tinaLockFilename);
2335
2335
  await import_fs_extra6.default.ensureFile(filePath);
2336
2336
  await import_fs_extra6.default.outputFile(filePath, tinaLockContent);
2337
2337
  }
@@ -2478,7 +2478,7 @@ ${dangerText(e.message)}
2478
2478
  watchContentFiles(configManager, database, searchIndexer) {
2479
2479
  const collectionContentFiles = [];
2480
2480
  configManager.config.schema.collections.forEach((collection) => {
2481
- const collectionGlob = `${import_path6.default.join(
2481
+ const collectionGlob = `${import_path5.default.join(
2482
2482
  configManager.contentRootPath,
2483
2483
  collection.path
2484
2484
  )}/**/*.${collection.format || "md"}`;
@@ -3469,25 +3469,25 @@ var import_clipanion6 = require("clipanion");
3469
3469
 
3470
3470
  // src/cmds/init/detectEnvironment.ts
3471
3471
  var import_fs_extra8 = __toESM(require("fs-extra"));
3472
- var import_path7 = __toESM(require("path"));
3472
+ var import_path6 = __toESM(require("path"));
3473
3473
  var checkGitignoreForItem = async ({
3474
3474
  baseDir,
3475
3475
  line
3476
3476
  }) => {
3477
- const gitignoreContent = import_fs_extra8.default.readFileSync(import_path7.default.join(baseDir, ".gitignore")).toString();
3477
+ const gitignoreContent = import_fs_extra8.default.readFileSync(import_path6.default.join(baseDir, ".gitignore")).toString();
3478
3478
  return gitignoreContent.split("\n").some((item) => item === line);
3479
3479
  };
3480
3480
  var makeGeneratedFile = async (name2, generatedFileType, parentPath, opts) => {
3481
3481
  const result = {
3482
- fullPathTS: import_path7.default.join(
3482
+ fullPathTS: import_path6.default.join(
3483
3483
  parentPath,
3484
3484
  `${name2}.${(opts == null ? void 0 : opts.typescriptSuffix) || (opts == null ? void 0 : opts.extensionOverride) || "ts"}`
3485
3485
  ),
3486
- fullPathJS: import_path7.default.join(
3486
+ fullPathJS: import_path6.default.join(
3487
3487
  parentPath,
3488
3488
  `${name2}.${(opts == null ? void 0 : opts.extensionOverride) || "js"}`
3489
3489
  ),
3490
- fullPathOverride: (opts == null ? void 0 : opts.extensionOverride) ? import_path7.default.join(parentPath, `${name2}.${opts == null ? void 0 : opts.extensionOverride}`) : "",
3490
+ fullPathOverride: (opts == null ? void 0 : opts.extensionOverride) ? import_path6.default.join(parentPath, `${name2}.${opts == null ? void 0 : opts.extensionOverride}`) : "",
3491
3491
  generatedFileType,
3492
3492
  name: name2,
3493
3493
  parentPath,
@@ -3517,16 +3517,16 @@ var detectEnvironment = async ({
3517
3517
  }) => {
3518
3518
  var _a;
3519
3519
  const hasForestryConfig = await import_fs_extra8.default.pathExists(
3520
- import_path7.default.join(pathToForestryConfig, ".forestry", "settings.yml")
3520
+ import_path6.default.join(pathToForestryConfig, ".forestry", "settings.yml")
3521
3521
  );
3522
- const sampleContentPath = import_path7.default.join(
3522
+ const sampleContentPath = import_path6.default.join(
3523
3523
  baseDir,
3524
3524
  "content",
3525
3525
  "posts",
3526
3526
  "hello-world.md"
3527
3527
  );
3528
- const usingSrc = import_fs_extra8.default.pathExistsSync(import_path7.default.join(baseDir, "src")) && (import_fs_extra8.default.pathExistsSync(import_path7.default.join(baseDir, "src", "app")) || import_fs_extra8.default.pathExistsSync(import_path7.default.join(baseDir, "src", "pages")));
3529
- const tinaFolder = import_path7.default.join(baseDir, "tina");
3528
+ const usingSrc = import_fs_extra8.default.pathExistsSync(import_path6.default.join(baseDir, "src")) && (import_fs_extra8.default.pathExistsSync(import_path6.default.join(baseDir, "src", "app")) || import_fs_extra8.default.pathExistsSync(import_path6.default.join(baseDir, "src", "pages")));
3529
+ const tinaFolder = import_path6.default.join(baseDir, "tina");
3530
3530
  const tinaConfigExists = Boolean(
3531
3531
  await import_fs_extra8.default.pathExists(tinaFolder) && (await import_fs_extra8.default.readdir(tinaFolder)).find((x) => x.includes("config"))
3532
3532
  );
@@ -3540,12 +3540,12 @@ var detectEnvironment = async ({
3540
3540
  "next-api-handler": await makeGeneratedFile(
3541
3541
  "[...routes]",
3542
3542
  "next-api-handler",
3543
- import_path7.default.join(...pagesDir, "api", "tina")
3543
+ import_path6.default.join(...pagesDir, "api", "tina")
3544
3544
  ),
3545
3545
  "reactive-example": await makeGeneratedFile(
3546
3546
  "[filename]",
3547
3547
  "reactive-example",
3548
- import_path7.default.join(...pagesDir, "demo", "blog"),
3548
+ import_path6.default.join(...pagesDir, "demo", "blog"),
3549
3549
  {
3550
3550
  typescriptSuffix: "tsx"
3551
3551
  }
@@ -3553,13 +3553,13 @@ var detectEnvironment = async ({
3553
3553
  "users-json": await makeGeneratedFile(
3554
3554
  "index",
3555
3555
  "users-json",
3556
- import_path7.default.join(baseDir, "content", "users"),
3556
+ import_path6.default.join(baseDir, "content", "users"),
3557
3557
  { extensionOverride: "json" }
3558
3558
  ),
3559
3559
  "sample-content": await makeGeneratedFile(
3560
3560
  "hello-world",
3561
3561
  "sample-content",
3562
- import_path7.default.join(baseDir, "content", "posts"),
3562
+ import_path6.default.join(baseDir, "content", "posts"),
3563
3563
  { extensionOverride: "md" }
3564
3564
  )
3565
3565
  };
@@ -3585,13 +3585,13 @@ var detectEnvironment = async ({
3585
3585
  );
3586
3586
  }
3587
3587
  }
3588
- const hasGitIgnore = await import_fs_extra8.default.pathExists(import_path7.default.join(".gitignore"));
3588
+ const hasGitIgnore = await import_fs_extra8.default.pathExists(import_path6.default.join(".gitignore"));
3589
3589
  const hasGitIgnoreNodeModules = hasGitIgnore && await checkGitignoreForItem({ baseDir, line: "node_modules" });
3590
3590
  const hasEnvTina = hasGitIgnore && await checkGitignoreForItem({ baseDir, line: ".env.tina" });
3591
3591
  const hasGitIgnoreEnv = hasGitIgnore && await checkGitignoreForItem({ baseDir, line: ".env" });
3592
3592
  let frontMatterFormat;
3593
3593
  if (hasForestryConfig) {
3594
- const hugoConfigPath = import_path7.default.join(rootPath, "config.toml");
3594
+ const hugoConfigPath = import_path6.default.join(rootPath, "config.toml");
3595
3595
  if (await import_fs_extra8.default.pathExists(hugoConfigPath)) {
3596
3596
  const hugoConfig = await import_fs_extra8.default.readFile(hugoConfigPath, "utf8");
3597
3597
  const metaDataFormat = (_a = hugoConfig.match(/metaDataFormat = "(.*)"/)) == null ? void 0 : _a[1];
@@ -4199,18 +4199,18 @@ var CLICommand = class {
4199
4199
  };
4200
4200
 
4201
4201
  // src/cmds/init/apply.ts
4202
- var import_path11 = __toESM(require("path"));
4202
+ var import_path10 = __toESM(require("path"));
4203
4203
 
4204
4204
  // src/cmds/forestry-migrate/index.ts
4205
4205
  var import_fs_extra10 = __toESM(require("fs-extra"));
4206
- var import_path9 = __toESM(require("path"));
4206
+ var import_path8 = __toESM(require("path"));
4207
4207
  var import_js_yaml2 = __toESM(require("js-yaml"));
4208
4208
  var import_minimatch = __toESM(require("minimatch"));
4209
4209
  var import_graphql16 = require("@tinacms/graphql");
4210
4210
 
4211
4211
  // src/cmds/forestry-migrate/util/index.ts
4212
4212
  var import_fs_extra9 = __toESM(require("fs-extra"));
4213
- var import_path8 = __toESM(require("path"));
4213
+ var import_path7 = __toESM(require("path"));
4214
4214
  var import_js_yaml = __toESM(require("js-yaml"));
4215
4215
  var import_zod = __toESM(require("zod"));
4216
4216
 
@@ -4621,7 +4621,7 @@ var transformForestryFieldsToTinaFields = ({
4621
4621
  return tinaFields;
4622
4622
  };
4623
4623
  var getFieldsFromTemplates = ({ tem, pathToForestryConfig, skipBlocks = false }) => {
4624
- const templatePath = import_path8.default.join(
4624
+ const templatePath = import_path7.default.join(
4625
4625
  pathToForestryConfig,
4626
4626
  ".forestry",
4627
4627
  "front_matter",
@@ -4696,8 +4696,8 @@ var generateAllTemplates = async ({
4696
4696
  pathToForestryConfig
4697
4697
  }) => {
4698
4698
  const allTemplates = (await import_fs_extra10.default.readdir(
4699
- import_path9.default.join(pathToForestryConfig, ".forestry", "front_matter", "templates")
4700
- )).map((tem) => import_path9.default.basename(tem, ".yml"));
4699
+ import_path8.default.join(pathToForestryConfig, ".forestry", "front_matter", "templates")
4700
+ )).map((tem) => import_path8.default.basename(tem, ".yml"));
4701
4701
  const templateMap = /* @__PURE__ */ new Map();
4702
4702
  const proms = allTemplates.map(async (tem) => {
4703
4703
  try {
@@ -4839,9 +4839,9 @@ var generateCollectionFromForestrySection = (args) => {
4839
4839
  return c;
4840
4840
  } else if (section.type === "document") {
4841
4841
  const filePath = section.path;
4842
- const extname = import_path9.default.extname(filePath);
4843
- const fileName = import_path9.default.basename(filePath, extname);
4844
- const dir = import_path9.default.dirname(filePath);
4842
+ const extname = import_path8.default.extname(filePath);
4843
+ const fileName = import_path8.default.basename(filePath, extname);
4844
+ const dir = import_path8.default.dirname(filePath);
4845
4845
  const ext = checkExt(extname);
4846
4846
  if (ext) {
4847
4847
  const fields = [];
@@ -4904,7 +4904,7 @@ var generateCollections = async ({
4904
4904
  usingTypescript
4905
4905
  });
4906
4906
  const forestryConfig = await import_fs_extra10.default.readFile(
4907
- import_path9.default.join(pathToForestryConfig, ".forestry", "settings.yml")
4907
+ import_path8.default.join(pathToForestryConfig, ".forestry", "settings.yml")
4908
4908
  );
4909
4909
  rewriteTemplateKeysInDocs({
4910
4910
  templateMap,
@@ -4935,11 +4935,11 @@ var rewriteTemplateKeysInDocs = (args) => {
4935
4935
  const { templateObj } = templateMap.get(templateKey);
4936
4936
  (_a = templateObj == null ? void 0 : templateObj.pages) == null ? void 0 : _a.forEach((page) => {
4937
4937
  try {
4938
- const filePath = import_path9.default.join(page);
4938
+ const filePath = import_path8.default.join(page);
4939
4939
  if (import_fs_extra10.default.lstatSync(filePath).isDirectory()) {
4940
4940
  return;
4941
4941
  }
4942
- const extname = import_path9.default.extname(filePath);
4942
+ const extname = import_path8.default.extname(filePath);
4943
4943
  const fileContent = import_fs_extra10.default.readFileSync(filePath).toString();
4944
4944
  const content = (0, import_graphql16.parseFile)(
4945
4945
  fileContent,
@@ -4971,7 +4971,7 @@ var import_fs_extra13 = __toESM(require("fs-extra"));
4971
4971
  // src/next/commands/codemod-command/index.ts
4972
4972
  var import_clipanion5 = require("clipanion");
4973
4973
  var import_fs_extra11 = __toESM(require("fs-extra"));
4974
- var import_path10 = __toESM(require("path"));
4974
+ var import_path9 = __toESM(require("path"));
4975
4975
  var CodemodCommand = class extends import_clipanion5.Command {
4976
4976
  constructor() {
4977
4977
  super(...arguments);
@@ -5015,7 +5015,7 @@ var moveTinaFolder = async (rootPath = process.cwd()) => {
5015
5015
  logger.error(e.message);
5016
5016
  process.exit(1);
5017
5017
  }
5018
- const tinaDestination = import_path10.default.join(configManager.rootPath, "tina");
5018
+ const tinaDestination = import_path9.default.join(configManager.rootPath, "tina");
5019
5019
  if (await import_fs_extra11.default.existsSync(tinaDestination)) {
5020
5020
  logger.info(
5021
5021
  `Folder already exists at ${tinaDestination}. Either delete this folder to complete the codemod, or ensure you have properly copied your config from the ".tina" folder.`
@@ -5030,7 +5030,7 @@ var moveTinaFolder = async (rootPath = process.cwd()) => {
5030
5030
  };
5031
5031
  var writeGitignore = async (rootPath) => {
5032
5032
  await import_fs_extra11.default.outputFileSync(
5033
- import_path10.default.join(rootPath, "tina", ".gitignore"),
5033
+ import_path9.default.join(rootPath, "tina", ".gitignore"),
5034
5034
  "__generated__"
5035
5035
  );
5036
5036
  };
@@ -5868,8 +5868,8 @@ async function apply({
5868
5868
  await addConfigFile({
5869
5869
  configArgs: {
5870
5870
  config: config2,
5871
- publicFolder: import_path11.default.join(
5872
- import_path11.default.relative(process.cwd(), pathToForestryConfig),
5871
+ publicFolder: import_path10.default.join(
5872
+ import_path10.default.relative(process.cwd(), pathToForestryConfig),
5873
5873
  config2.publicFolder
5874
5874
  ),
5875
5875
  collections,
@@ -5936,18 +5936,18 @@ var createPackageJSON = async () => {
5936
5936
  };
5937
5937
  var createGitignore = async ({ baseDir }) => {
5938
5938
  logger.info(logText("No .gitignore found, creating one"));
5939
- import_fs_extra13.default.outputFileSync(import_path11.default.join(baseDir, ".gitignore"), "node_modules");
5939
+ import_fs_extra13.default.outputFileSync(import_path10.default.join(baseDir, ".gitignore"), "node_modules");
5940
5940
  };
5941
5941
  var updateGitIgnore = async ({
5942
5942
  baseDir,
5943
5943
  items
5944
5944
  }) => {
5945
5945
  logger.info(logText(`Adding ${items.join(",")} to .gitignore`));
5946
- const gitignoreContent = import_fs_extra13.default.readFileSync(import_path11.default.join(baseDir, ".gitignore")).toString();
5946
+ const gitignoreContent = import_fs_extra13.default.readFileSync(import_path10.default.join(baseDir, ".gitignore")).toString();
5947
5947
  const newGitignoreContent = [...gitignoreContent.split("\n"), ...items].join(
5948
5948
  "\n"
5949
5949
  );
5950
- await import_fs_extra13.default.writeFile(import_path11.default.join(baseDir, ".gitignore"), newGitignoreContent);
5950
+ await import_fs_extra13.default.writeFile(import_path10.default.join(baseDir, ".gitignore"), newGitignoreContent);
5951
5951
  };
5952
5952
  var addDependencies = async (config2, env, params) => {
5953
5953
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -6115,7 +6115,7 @@ var addContentFile = async ({
6115
6115
  return () => ({
6116
6116
  exists: env.sampleContentExists,
6117
6117
  path: env.sampleContentPath,
6118
- parentPath: import_path11.default.dirname(env.sampleContentPath)
6118
+ parentPath: import_path10.default.dirname(env.sampleContentPath)
6119
6119
  });
6120
6120
  }
6121
6121
  },
@@ -6138,7 +6138,7 @@ ${titleText(" TinaCMS ")} backend initialized!`));
6138
6138
  return `${x.key}=${x.value || "***"}`;
6139
6139
  }).join("\n") + `
6140
6140
  TINA_PUBLIC_IS_LOCAL=true`;
6141
- const envFile = import_path11.default.join(process.cwd(), ".env");
6141
+ const envFile = import_path10.default.join(process.cwd(), ".env");
6142
6142
  if (!import_fs_extra13.default.existsSync(envFile)) {
6143
6143
  logger.info(`Adding .env file to your project... \u2705`);
6144
6144
  import_fs_extra13.default.writeFileSync(envFile, envFileText);
@@ -6202,7 +6202,7 @@ var addReactiveFile = {
6202
6202
  dataLayer
6203
6203
  }) => {
6204
6204
  var _a, _b;
6205
- const packageJsonPath = import_path11.default.join(baseDir, "package.json");
6205
+ const packageJsonPath = import_path10.default.join(baseDir, "package.json");
6206
6206
  await writeGeneratedFile({
6207
6207
  generatedFile,
6208
6208
  typescript: config2.typescript,
@@ -1,6 +1,6 @@
1
- import { BuildOptions, InlineConfig, Plugin } from 'vite';
2
- import { Database } from '@tinacms/graphql';
3
- import { ConfigManager } from '../config-manager';
1
+ import type { Database } from '@tinacms/graphql';
2
+ import { type BuildOptions, type InlineConfig, type Plugin } from 'vite';
3
+ import type { ConfigManager } from '../config-manager';
4
4
  /**
5
5
  * This type is duplicated in he `TinaMediaStore`
6
6
  * It represents the files that are available at build time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "0.0.0-8a702b8-20241010053417",
3
+ "version": "0.0.0-9d5e351-20241023053720",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -38,7 +38,7 @@
38
38
  "@types/prompts": "^2.4.9",
39
39
  "@types/yup": "^0.29.14",
40
40
  "jest": "^29.7.0",
41
- "@tinacms/scripts": "0.0.0-8a702b8-20241010053417"
41
+ "@tinacms/scripts": "1.3.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@graphql-codegen/core": "^2.6.8",
@@ -85,12 +85,12 @@
85
85
  "vite": "^4.5.5",
86
86
  "yup": "^0.32.11",
87
87
  "zod": "^3.23.8",
88
- "@tinacms/app": "0.0.0-8a702b8-20241010053417",
88
+ "@tinacms/app": "0.0.0-9d5e351-20241023053720",
89
89
  "@tinacms/metrics": "1.0.7",
90
- "@tinacms/schema-tools": "1.6.5",
91
- "@tinacms/search": "0.0.0-8a702b8-20241010053417",
92
- "tinacms": "0.0.0-8a702b8-20241010053417",
93
- "@tinacms/graphql": "0.0.0-8a702b8-20241010053417"
90
+ "@tinacms/graphql": "1.5.6",
91
+ "@tinacms/search": "1.0.33",
92
+ "tinacms": "0.0.0-9d5e351-20241023053720",
93
+ "@tinacms/schema-tools": "1.6.6"
94
94
  },
95
95
  "publishConfig": {
96
96
  "registry": "https://registry.npmjs.org"