@sanity/cli 3.36.4 → 3.36.5-canary.34

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 (116) hide show
  1. package/lib/_chunks-cjs/cli.js +1779 -1317
  2. package/lib/_chunks-cjs/cli.js.map +1 -1
  3. package/lib/_chunks-cjs/journeyConfig.js +11 -11
  4. package/lib/_chunks-cjs/journeyConfig.js.map +1 -1
  5. package/lib/_chunks-cjs/loadEnv.js +105 -2719
  6. package/lib/_chunks-cjs/loadEnv.js.map +1 -1
  7. package/lib/cli.d.ts +10 -0
  8. package/lib/index.d.ts +448 -0
  9. package/lib/index.esm.js +449 -5
  10. package/lib/index.esm.js.map +1 -1
  11. package/lib/index.js +3 -3
  12. package/lib/index.js.map +1 -1
  13. package/lib/index.mjs +452 -0
  14. package/lib/index.mjs.map +1 -0
  15. package/lib/run.d.ts +1 -0
  16. package/lib/workers/getAndWriteJourneySchema.d.ts +1 -0
  17. package/lib/workers/getCliConfig.d.ts +1 -0
  18. package/lib/workers/typegenGenerate.d.ts +37 -0
  19. package/lib/workers/typegenGenerate.js +6 -2
  20. package/lib/workers/typegenGenerate.js.map +1 -1
  21. package/package.json +18 -21
  22. package/src/actions/init-project/templates/shopify.ts +7 -0
  23. package/src/util/journeyConfig.ts +5 -5
  24. package/templates/ecommerce/plugins/barcode-input/BarcodeInput.js +1 -1
  25. package/templates/get-started/plugins/sanity-plugin-tutorial/GetStartedTutorial.tsx +1 -1
  26. package/templates/shared/tsconfig.json +2 -4
  27. package/templates/shopify/README.md +3 -3
  28. package/templates/shopify/components/hotspots/ProductTooltip.tsx +1 -1
  29. package/templates/shopify/components/icons/Shopify.tsx +1 -1
  30. package/templates/shopify/components/inputs/CollectionHidden.tsx +1 -1
  31. package/templates/shopify/components/media/ColorTheme.tsx +1 -1
  32. package/templates/shopify/components/studio/Navbar.tsx +29 -0
  33. package/templates/shopify/constants.ts +31 -1
  34. package/templates/shopify/docs/features.md +6 -7
  35. package/templates/shopify/schemaTypes/documents/collection.tsx +11 -47
  36. package/templates/shopify/schemaTypes/documents/colorTheme.tsx +2 -17
  37. package/templates/shopify/schemaTypes/documents/page.ts +10 -37
  38. package/templates/shopify/schemaTypes/documents/product.tsx +4 -27
  39. package/templates/shopify/schemaTypes/documents/productVariant.tsx +4 -13
  40. package/templates/shopify/schemaTypes/index.ts +97 -126
  41. package/templates/shopify/schemaTypes/objects/collection/{group.ts → collectionGroupType.ts} +7 -10
  42. package/templates/shopify/schemaTypes/objects/collection/{links.ts → collectionLinksType.ts} +4 -4
  43. package/templates/shopify/schemaTypes/objects/customProductOption/{colorObject.tsx → customProductOptionColorObjectType.tsx} +3 -6
  44. package/templates/shopify/schemaTypes/objects/customProductOption/{color.tsx → customProductOptionColorType.tsx} +2 -10
  45. package/templates/shopify/schemaTypes/objects/customProductOption/{sizeObject.ts → customProductOptionSizeObjectType.ts} +3 -7
  46. package/templates/shopify/schemaTypes/objects/customProductOption/{size.ts → customProductOptionSizeType.ts} +3 -12
  47. package/templates/shopify/schemaTypes/objects/global/footerType.ts +22 -0
  48. package/templates/shopify/schemaTypes/objects/global/menuLinksType.ts +21 -0
  49. package/templates/shopify/schemaTypes/objects/global/{menu.ts → menuType.ts} +2 -4
  50. package/templates/shopify/schemaTypes/objects/global/{notFoundPage.ts → notFoundPageType.ts} +1 -6
  51. package/templates/shopify/schemaTypes/objects/hotspot/{imageWithProductHotspots.ts → imageWithProductHotspotsType.ts} +4 -6
  52. package/templates/shopify/schemaTypes/objects/hotspot/{productHotspots.tsx → productHotspotsType.tsx} +3 -5
  53. package/templates/shopify/schemaTypes/objects/hotspot/{spot.tsx → spotType.tsx} +1 -3
  54. package/templates/shopify/schemaTypes/{annotations/linkEmail.tsx → objects/link/linkEmailType.tsx} +5 -13
  55. package/templates/shopify/schemaTypes/{annotations/linkExternal.tsx → objects/link/linkExternalType.tsx} +6 -13
  56. package/templates/shopify/schemaTypes/{annotations/linkInternal.tsx → objects/link/linkInternalType.tsx} +5 -12
  57. package/templates/shopify/schemaTypes/{annotations/product.tsx → objects/link/linkProductType.tsx} +4 -16
  58. package/templates/shopify/schemaTypes/objects/module/{accordionGroup.ts → accordionGroupType.ts} +6 -9
  59. package/templates/shopify/schemaTypes/objects/module/{accordion.ts → accordionType.ts} +4 -11
  60. package/templates/shopify/schemaTypes/objects/module/{callToAction.tsx → callToActionType.tsx} +10 -23
  61. package/templates/shopify/schemaTypes/objects/module/{callout.ts → calloutType.ts} +4 -10
  62. package/templates/shopify/schemaTypes/objects/module/{collection.tsx → collectionReferenceType.tsx} +4 -9
  63. package/templates/shopify/schemaTypes/objects/module/gridItemType.ts +41 -0
  64. package/templates/shopify/schemaTypes/objects/module/{grid.ts → gridType.ts} +7 -15
  65. package/templates/shopify/schemaTypes/objects/{hero/home.tsx → module/heroType.tsx} +14 -17
  66. package/templates/shopify/schemaTypes/objects/module/{imageCallToAction.tsx → imageCallToActionType.tsx} +6 -10
  67. package/templates/shopify/schemaTypes/objects/module/{image.ts → imageFeatureType.ts} +6 -18
  68. package/templates/shopify/schemaTypes/objects/module/{images.tsx → imageFeaturesType.tsx} +7 -25
  69. package/templates/shopify/schemaTypes/objects/module/{instagram.ts → instagramType.ts} +2 -2
  70. package/templates/shopify/schemaTypes/objects/module/{products.tsx → productFeaturesType.tsx} +6 -11
  71. package/templates/shopify/schemaTypes/objects/module/{product.tsx → productReferenceType.tsx} +6 -8
  72. package/templates/shopify/schemaTypes/objects/{seo/seo.ts → seoType.ts} +7 -6
  73. package/templates/shopify/schemaTypes/objects/shopify/{shopifyCollectionRule.tsx → collectionRuleType.tsx} +2 -10
  74. package/templates/shopify/schemaTypes/objects/shopify/{inventory.ts → inventoryType.ts} +7 -12
  75. package/templates/shopify/schemaTypes/objects/shopify/{option.tsx → optionType.tsx} +6 -12
  76. package/templates/shopify/schemaTypes/objects/shopify/{placeholderString.ts → placeholderStringType.ts} +3 -1
  77. package/templates/shopify/schemaTypes/objects/shopify/{priceRange.ts → priceRangeType.ts} +5 -7
  78. package/templates/shopify/schemaTypes/objects/shopify/{productWithVariant.tsx → productWithVariantType.tsx} +2 -2
  79. package/templates/shopify/schemaTypes/objects/shopify/{proxyString.ts → proxyStringType.ts} +1 -1
  80. package/templates/shopify/schemaTypes/objects/shopify/{shopifyCollection.ts → shopifyCollectionType.ts} +4 -25
  81. package/templates/shopify/schemaTypes/objects/shopify/{shopifyProduct.ts → shopifyProductType.ts} +5 -35
  82. package/templates/shopify/schemaTypes/objects/shopify/{shopifyProductVariant.ts → shopifyProductVariantType.ts} +1 -27
  83. package/templates/shopify/schemaTypes/portableText/portableTextSimpleType.tsx +45 -0
  84. package/templates/shopify/schemaTypes/portableText/portableTextType.tsx +52 -0
  85. package/templates/shopify/schemaTypes/singletons/homeType.ts +49 -0
  86. package/templates/shopify/schemaTypes/singletons/{settings.ts → settingsType.ts} +7 -9
  87. package/templates/shopify/utils/shopifyUrls.ts +3 -3
  88. package/templates/shopify/utils/validateSlug.ts +3 -7
  89. package/lib/_chunks-cjs/index.js +0 -547
  90. package/lib/_chunks-cjs/index.js.map +0 -1
  91. package/lib/_chunks-cjs/node.js +0 -213
  92. package/lib/_chunks-cjs/node.js.map +0 -1
  93. package/lib/_chunks-cjs/stegaEncodeSourceMap.js +0 -357
  94. package/lib/_chunks-cjs/stegaEncodeSourceMap.js.map +0 -1
  95. package/lib/_chunks-es/index.js +0 -3336
  96. package/lib/_chunks-es/index.js.map +0 -1
  97. package/lib/_chunks-es/node.js +0 -216
  98. package/lib/_chunks-es/node.js.map +0 -1
  99. package/lib/_chunks-es/stegaEncodeSourceMap.js +0 -358
  100. package/lib/_chunks-es/stegaEncodeSourceMap.js.map +0 -1
  101. package/lib/index.cjs.mjs +0 -7
  102. package/templates/shopify/schemaTypes/blocks/body.tsx +0 -70
  103. package/templates/shopify/schemaTypes/objects/global/footer.ts +0 -57
  104. package/templates/shopify/schemaTypes/objects/global/linkExternal.ts +0 -52
  105. package/templates/shopify/schemaTypes/objects/global/linkInternal.ts +0 -65
  106. package/templates/shopify/schemaTypes/objects/global/links.ts +0 -16
  107. package/templates/shopify/schemaTypes/objects/hero/collection.tsx +0 -42
  108. package/templates/shopify/schemaTypes/objects/hero/page.tsx +0 -35
  109. package/templates/shopify/schemaTypes/objects/module/accordionBody.ts +0 -45
  110. package/templates/shopify/schemaTypes/objects/module/gridItem.ts +0 -91
  111. package/templates/shopify/schemaTypes/objects/seo/description.tsx +0 -10
  112. package/templates/shopify/schemaTypes/objects/seo/home.tsx +0 -31
  113. package/templates/shopify/schemaTypes/objects/seo/page.tsx +0 -37
  114. package/templates/shopify/schemaTypes/objects/seo/shopify.tsx +0 -40
  115. package/templates/shopify/schemaTypes/singletons/home.ts +0 -62
  116. /package/lib/{dts/src/index.d.ts → index.d.mts} +0 -0
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- var fs = require("fs/promises"), path = require("path"), require$$1 = require("module"), require$$0 = require("url"), process3 = require("process"), require$$0$2 = require("os"), tty = require("tty"), require$$1$1 = require("assert"), require$$0$3 = require("fs"), v8 = require("v8"), require$$0$1 = require("util"), worker_threads = require("worker_threads"), cliWorker = require("./cliWorker.js"), _documentCurrentScript = typeof document < "u" ? document.currentScript : null;
2
+ var fs = require("fs/promises"), path = require("path"), require$$1 = require("module"), require$$0 = require("url"), process3 = require("process"), os = require("os"), tty = require("tty"), require$$1$1 = require("assert"), require$$0$2 = require("fs"), v8 = require("v8"), require$$0$1 = require("util"), worker_threads = require("worker_threads"), cliWorker = require("./cliWorker.js"), _documentCurrentScript = typeof document < "u" ? document.currentScript : null;
3
3
  function _interopDefaultCompat(e) {
4
4
  return e && typeof e == "object" && "default" in e ? e : { default: e };
5
5
  }
@@ -19,7 +19,7 @@ function _interopNamespaceCompat(e) {
19
19
  }
20
20
  }), n.default = e, Object.freeze(n);
21
21
  }
22
- var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), path__namespace = /* @__PURE__ */ _interopNamespaceCompat(path), require$$0__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$0), process3__default = /* @__PURE__ */ _interopDefaultCompat(process3), require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0$2), tty__default = /* @__PURE__ */ _interopDefaultCompat(tty), require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1$1), require$$0__default$2 = /* @__PURE__ */ _interopDefaultCompat(require$$0$3), v8__default = /* @__PURE__ */ _interopDefaultCompat(v8), __defProp$1 = Object.defineProperty, __export$1 = (target, all) => {
22
+ var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), path__namespace = /* @__PURE__ */ _interopNamespaceCompat(path), require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0), process3__default = /* @__PURE__ */ _interopDefaultCompat(process3), os__default = /* @__PURE__ */ _interopDefaultCompat(os), tty__default = /* @__PURE__ */ _interopDefaultCompat(tty), require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1$1), require$$0__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$0$2), v8__default = /* @__PURE__ */ _interopDefaultCompat(v8), __defProp$1 = Object.defineProperty, __export$1 = (target, all) => {
23
23
  for (var name in all)
24
24
  __defProp$1(target, name, { get: all[name], enumerable: !0 });
25
25
  }, public_exports$1 = {};
@@ -9244,7 +9244,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
9244
9244
  if (env.TERM === "dumb")
9245
9245
  return min;
9246
9246
  if (process3__default.default.platform === "win32") {
9247
- const osRelease = require$$0__default.default.release().split(".");
9247
+ const osRelease = os__default.default.release().split(".");
9248
9248
  return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
9249
9249
  }
9250
9250
  if ("CI" in env)
@@ -12146,7 +12146,7 @@ function read2(jsonPath, { base, specifier }) {
12146
12146
  return existing;
12147
12147
  let string;
12148
12148
  try {
12149
- string = require$$0__default$2.default.readFileSync(path__namespace.default.toNamespacedPath(jsonPath), "utf8");
12149
+ string = require$$0__default$1.default.readFileSync(path__namespace.default.toNamespacedPath(jsonPath), "utf8");
12150
12150
  } catch (error) {
12151
12151
  const exception2 = (
12152
12152
  /** @type {ErrnoException} */
@@ -12335,13 +12335,13 @@ Default "index" lookups for the main are deprecated for ES modules.`,
12335
12335
  }
12336
12336
  function tryStatSync(path13) {
12337
12337
  try {
12338
- return require$$0$3.statSync(path13);
12338
+ return require$$0$2.statSync(path13);
12339
12339
  } catch {
12340
- return new require$$0$3.Stats();
12340
+ return new require$$0$2.Stats();
12341
12341
  }
12342
12342
  }
12343
12343
  function fileExists(url2) {
12344
- const stats = require$$0$3.statSync(url2, { throwIfNoEntry: !1 }), isFile2 = stats ? stats.isFile() : void 0;
12344
+ const stats = require$$0$2.statSync(url2, { throwIfNoEntry: !1 }), isFile2 = stats ? stats.isFile() : void 0;
12345
12345
  return isFile2 ?? !1;
12346
12346
  }
12347
12347
  function legacyMainResolve(packageJsonUrl, packageConfig, base) {
@@ -12412,7 +12412,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
12412
12412
  throw error.url = String(resolved), error;
12413
12413
  }
12414
12414
  if (!preserveSymlinks) {
12415
- const real = require$$0$3.realpathSync(filePath), { search, hash } = resolved;
12415
+ const real = require$$0$2.realpathSync(filePath), { search, hash } = resolved;
12416
12416
  resolved = require$$0.pathToFileURL(real + (filePath.endsWith(path__namespace.default.sep) ? "/" : "")), resolved.search = search, resolved.hash = hash;
12417
12417
  }
12418
12418
  return resolved;
@@ -13074,7 +13074,7 @@ var stringReplaceAll2 = (isOptionalObject, original, pattern, replacement) => {
13074
13074
  "/"
13075
13075
  ) : (filePath) => filePath;
13076
13076
  function getRelativePath(file, ignoreFile) {
13077
- const ignoreFilePath = toPath(ignoreFile), filePath = isUrl(file) ? require$$0__default$1.default.fileURLToPath(file) : path__namespace.default.resolve(file);
13077
+ const ignoreFilePath = toPath(ignoreFile), filePath = isUrl(file) ? require$$0__default.default.fileURLToPath(file) : path__namespace.default.resolve(file);
13078
13078
  return path__namespace.default.relative(
13079
13079
  // If there's an ignore-path set, the filename must be relative to the
13080
13080
  // ignore path, not the current working directory.
@@ -13108,7 +13108,7 @@ var import_n_readlines = __toESM(require_readlines(), 1);
13108
13108
  function getInterpreter(file) {
13109
13109
  let fd;
13110
13110
  try {
13111
- fd = require$$0__default$2.default.openSync(file, "r");
13111
+ fd = require$$0__default$1.default.openSync(file, "r");
13112
13112
  } catch {
13113
13113
  return;
13114
13114
  }
@@ -13121,7 +13121,7 @@ function getInterpreter(file) {
13121
13121
  return m2[1];
13122
13122
  } finally {
13123
13123
  try {
13124
- require$$0__default$2.default.closeSync(fd);
13124
+ require$$0__default$1.default.closeSync(fd);
13125
13125
  } catch {
13126
13126
  }
13127
13127
  }