@sanity/cli 3.93.1-bump-pkg-utils.34.5d0c0b3d22 → 3.93.1-next.0.3919f50978

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 (160) hide show
  1. package/lib/_chunks-cjs/cli.js +5 -5
  2. package/lib/_chunks-cjs/cli.js.map +1 -1
  3. package/lib/_chunks-cjs/cliWorker.js.map +1 -1
  4. package/lib/_chunks-cjs/generateAction.js.map +1 -1
  5. package/lib/_chunks-cjs/getCliConfig.js.map +1 -1
  6. package/lib/_chunks-cjs/journeyConfig.js.map +1 -1
  7. package/lib/_chunks-cjs/loadEnv.js.map +1 -1
  8. package/lib/index.js.map +1 -1
  9. package/lib/index.mjs.map +1 -1
  10. package/lib/run.js.map +1 -1
  11. package/lib/workers/getAndWriteJourneySchema.js.map +1 -1
  12. package/lib/workers/getCliConfig.js.map +1 -1
  13. package/lib/workers/typegenGenerate.js.map +1 -1
  14. package/package.json +7 -6
  15. package/src/CommandRunner.ts +219 -0
  16. package/src/__telemetry__/cli.telemetry.ts +29 -0
  17. package/src/__telemetry__/init.telemetry.ts +95 -0
  18. package/src/actions/codemod/codemodAction.ts +109 -0
  19. package/src/actions/codemod/mods/deskRename.ts +19 -0
  20. package/src/actions/codemod/mods/index.ts +9 -0
  21. package/src/actions/codemod/mods/partsTypeDirective.ts +28 -0
  22. package/src/actions/codemod/mods/reactIconsV3.ts +54 -0
  23. package/src/actions/codemod/types.ts +10 -0
  24. package/src/actions/init-plugin/bootstrapFromTemplate.ts +196 -0
  25. package/src/actions/init-project/bootstrapLocalTemplate.ts +201 -0
  26. package/src/actions/init-project/bootstrapRemoteTemplate.ts +118 -0
  27. package/src/actions/init-project/createAppCliConfig.ts +24 -0
  28. package/src/actions/init-project/createCliConfig.ts +31 -0
  29. package/src/actions/init-project/createPackageManifest.ts +102 -0
  30. package/src/actions/init-project/createStudioConfig.ts +53 -0
  31. package/src/actions/init-project/determineAppTemplate.ts +13 -0
  32. package/src/actions/init-project/fsUtils.ts +40 -0
  33. package/src/actions/init-project/git.ts +59 -0
  34. package/src/actions/init-project/initProject.ts +1708 -0
  35. package/src/actions/init-project/processTemplate.ts +55 -0
  36. package/src/actions/init-project/promptForDatasetName.ts +68 -0
  37. package/src/actions/init-project/prompts/index.ts +51 -0
  38. package/src/actions/init-project/prompts/nextjs.ts +59 -0
  39. package/src/actions/init-project/readPackageJson.ts +17 -0
  40. package/src/actions/init-project/templates/appQuickstart.ts +23 -0
  41. package/src/actions/init-project/templates/appSanityUi.ts +25 -0
  42. package/src/actions/init-project/templates/blog.ts +5 -0
  43. package/src/actions/init-project/templates/clean.ts +5 -0
  44. package/src/actions/init-project/templates/getStarted.ts +37 -0
  45. package/src/actions/init-project/templates/index.ts +24 -0
  46. package/src/actions/init-project/templates/moviedb.ts +35 -0
  47. package/src/actions/init-project/templates/nextjs/index.ts +238 -0
  48. package/src/actions/init-project/templates/nextjs/schemaTypes/blog.ts +252 -0
  49. package/src/actions/init-project/templates/quickstart.ts +5 -0
  50. package/src/actions/init-project/templates/shopify.ts +78 -0
  51. package/src/actions/init-project/templates/shopifyOnline.ts +50 -0
  52. package/src/actions/init-project/updateInitialTemplateMetadata.ts +24 -0
  53. package/src/actions/login/login.telemetry.ts +18 -0
  54. package/src/actions/login/login.ts +350 -0
  55. package/src/actions/login/types.ts +19 -0
  56. package/src/actions/project/createProject.ts +36 -0
  57. package/src/actions/telemetry/setTelemetryConsent.ts +101 -0
  58. package/src/actions/typegen/generate.telemetry.ts +20 -0
  59. package/src/actions/typegen/generateAction.ts +210 -0
  60. package/src/actions/versions/findSanityModuleVersions.ts +185 -0
  61. package/src/actions/yarn/events.ts +73 -0
  62. package/src/cli.ts +350 -0
  63. package/src/cliClient.ts +62 -0
  64. package/src/commands/blueprints/addBlueprintsCommand.ts +155 -0
  65. package/src/commands/blueprints/blueprintsGroup.ts +10 -0
  66. package/src/commands/blueprints/configBlueprintsCommand.ts +86 -0
  67. package/src/commands/blueprints/deployBlueprintsCommand.ts +63 -0
  68. package/src/commands/blueprints/destroyBlueprintsCommand.ts +78 -0
  69. package/src/commands/blueprints/infoBlueprintsCommand.ts +55 -0
  70. package/src/commands/blueprints/initBlueprintsCommand.ts +99 -0
  71. package/src/commands/blueprints/logsBlueprintsCommand.ts +66 -0
  72. package/src/commands/blueprints/planBlueprintsCommand.ts +51 -0
  73. package/src/commands/blueprints/stacksBlueprintsCommand.ts +66 -0
  74. package/src/commands/codemod/codemodCommand.ts +32 -0
  75. package/src/commands/debug/debugCommand.ts +26 -0
  76. package/src/commands/debug/printDebugInfo.ts +243 -0
  77. package/src/commands/docs/docsCommand.ts +20 -0
  78. package/src/commands/functions/devFunctionsCommand.ts +73 -0
  79. package/src/commands/functions/envFunctionsCommand.ts +105 -0
  80. package/src/commands/functions/functionsGroup.ts +10 -0
  81. package/src/commands/functions/logsFunctionsCommand.ts +94 -0
  82. package/src/commands/functions/testFunctionsCommand.ts +93 -0
  83. package/src/commands/help/helpCommand.ts +21 -0
  84. package/src/commands/help/showHelp.ts +58 -0
  85. package/src/commands/index.ts +72 -0
  86. package/src/commands/init/initCommand.ts +123 -0
  87. package/src/commands/install/installCommand.ts +38 -0
  88. package/src/commands/learn/learnCommand.ts +20 -0
  89. package/src/commands/login/loginCommand.ts +29 -0
  90. package/src/commands/logout/logoutCommand.ts +52 -0
  91. package/src/commands/manage/manageCommand.ts +24 -0
  92. package/src/commands/projects/listProjectsCommand.ts +62 -0
  93. package/src/commands/projects/projectsGroup.ts +10 -0
  94. package/src/commands/telemetry/disableTelemetryCommand.ts +19 -0
  95. package/src/commands/telemetry/enableTelemetryCommand.ts +19 -0
  96. package/src/commands/telemetry/telemetryGroup.ts +10 -0
  97. package/src/commands/telemetry/telemetryStatusCommand.ts +89 -0
  98. package/src/commands/typegen/generateTypesCommand.ts +56 -0
  99. package/src/commands/typegen/typegenGroup.ts +10 -0
  100. package/src/commands/versions/printVersionResult.ts +51 -0
  101. package/src/commands/versions/versionsCommand.ts +13 -0
  102. package/src/config.ts +14 -0
  103. package/src/debug.ts +3 -0
  104. package/src/index.ts +6 -0
  105. package/src/outputters/cliOutputter.ts +47 -0
  106. package/src/packageManager/getInstallCommand.ts +26 -0
  107. package/src/packageManager/getUpgradeCommand.ts +52 -0
  108. package/src/packageManager/index.ts +33 -0
  109. package/src/packageManager/installPackages.ts +99 -0
  110. package/src/packageManager/packageManagerChoice.ts +204 -0
  111. package/src/packageManager/uninstallPackages.ts +44 -0
  112. package/src/packageManager/yarnStub.ts +22 -0
  113. package/src/prompters/cliPrompter.ts +9 -0
  114. package/src/run.ts +8 -0
  115. package/src/studioDependencies.ts +25 -0
  116. package/src/types.ts +387 -0
  117. package/src/util/canLaunchBrowser.ts +12 -0
  118. package/src/util/cliWorker.ts +34 -0
  119. package/src/util/clientWrapper.ts +119 -0
  120. package/src/util/copy.ts +50 -0
  121. package/src/util/createExpiringConfig.ts +80 -0
  122. package/src/util/createTelemetryStore.ts +204 -0
  123. package/src/util/detectRuntime.ts +12 -0
  124. package/src/util/dynamicRequire.ts +17 -0
  125. package/src/util/frameworkPort.ts +63 -0
  126. package/src/util/generateCommandsDocumentation.ts +62 -0
  127. package/src/util/getCliConfig.ts +172 -0
  128. package/src/util/getCliVersion.ts +22 -0
  129. package/src/util/getLocalVersion.ts +35 -0
  130. package/src/util/getProjectDefaults.ts +103 -0
  131. package/src/util/getProviderName.ts +9 -0
  132. package/src/util/getUserConfig.ts +15 -0
  133. package/src/util/isCi.ts +7 -0
  134. package/src/util/isCommandGroup.ts +7 -0
  135. package/src/util/isInteractive.ts +3 -0
  136. package/src/util/isTrueish.ts +8 -0
  137. package/src/util/journeyConfig.ts +280 -0
  138. package/src/util/loadEnv.ts +110 -0
  139. package/src/util/mergeCommands.ts +78 -0
  140. package/src/util/neatStack.ts +30 -0
  141. package/src/util/noSuchCommandText.ts +91 -0
  142. package/src/util/parseArguments.ts +76 -0
  143. package/src/util/pathExists.ts +14 -0
  144. package/src/util/readJson.ts +6 -0
  145. package/src/util/readdirRecursive.ts +26 -0
  146. package/src/util/remoteTemplate.ts +320 -0
  147. package/src/util/resolveLatestVersions.ts +24 -0
  148. package/src/util/resolveRootDir.ts +59 -0
  149. package/src/util/telemetryDisclosure.ts +45 -0
  150. package/src/util/updateNotifier.ts +158 -0
  151. package/src/util/writeJson.ts +6 -0
  152. package/src/workers/getAndWriteJourneySchema.ts +7 -0
  153. package/src/workers/getCliConfig.ts +14 -0
  154. package/src/workers/typegenGenerate.ts +228 -0
  155. package/templates/blog/README.md +1 -1
  156. package/templates/clean/README.md +1 -1
  157. package/templates/ecommerce/README.md +1 -1
  158. package/templates/get-started/README.md +1 -1
  159. package/templates/moviedb/README.md +1 -1
  160. package/templates/quickstart/README.md +1 -1
@@ -19710,7 +19710,7 @@ function requireUtils$2() {
19710
19710
  exports2.isInteger = (num) => typeof num == "number" ? Number.isInteger(num) : typeof num == "string" && num.trim() !== "" ? Number.isInteger(Number(num)) : !1, exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2), exports2.exceedsLimit = (min2, max2, step = 1, limit) => limit === !1 || !exports2.isInteger(min2) || !exports2.isInteger(max2) ? !1 : (Number(max2) - Number(min2)) / Number(step) >= limit, exports2.escapeNode = (block, n = 0, type2) => {
19711
19711
  const node = block.nodes[n];
19712
19712
  node && (type2 && node.type === type2 || node.type === "open" || node.type === "close") && node.escaped !== !0 && (node.value = "\\" + node.value, node.escaped = !0);
19713
- }, exports2.encloseBrace = (node) => node.type !== "brace" ? !1 : node.commas >> 0 + node.ranges >> 0 === 0 ? (node.invalid = !0, !0) : !1, exports2.isInvalidBrace = (block) => block.type !== "brace" ? !1 : block.invalid === !0 || block.dollar ? !0 : block.commas >> 0 + block.ranges >> 0 === 0 || block.open !== !0 || block.close !== !0 ? (block.invalid = !0, !0) : !1, exports2.isOpenOrClose = (node) => node.type === "open" || node.type === "close" ? !0 : node.open === !0 || node.close === !0, exports2.reduce = (nodes) => nodes.reduce((acc, node) => (node.type === "text" && acc.push(node.value), node.type === "range" && (node.type = "text"), acc), []), exports2.flatten = (...args) => {
19713
+ }, exports2.encloseBrace = (node) => node.type !== "brace" || node.commas >> 0 + node.ranges >> 0 ? !1 : (node.invalid = !0, !0), exports2.isInvalidBrace = (block) => block.type !== "brace" ? !1 : block.invalid === !0 || block.dollar ? !0 : !(block.commas >> 0 + block.ranges >> 0) || block.open !== !0 || block.close !== !0 ? (block.invalid = !0, !0) : !1, exports2.isOpenOrClose = (node) => node.type === "open" || node.type === "close" ? !0 : node.open === !0 || node.close === !0, exports2.reduce = (nodes) => nodes.reduce((acc, node) => (node.type === "text" && acc.push(node.value), node.type === "range" && (node.type = "text"), acc), []), exports2.flatten = (...args) => {
19714
19714
  const result = [], flat = (arr) => {
19715
19715
  for (let i = 0; i < arr.length; i++) {
19716
19716
  const ele = arr[i];
@@ -50943,7 +50943,7 @@ class PathBase {
50943
50943
  * mutated.
50944
50944
  */
50945
50945
  async lstat() {
50946
- if ((this.#type & ENOENT) === 0)
50946
+ if (!(this.#type & ENOENT))
50947
50947
  try {
50948
50948
  return this.#applyStat(await this.#fs.promises.lstat(this.fullpath())), this;
50949
50949
  } catch (er) {
@@ -50954,7 +50954,7 @@ class PathBase {
50954
50954
  * synchronous {@link PathBase.lstat}
50955
50955
  */
50956
50956
  lstatSync() {
50957
- if ((this.#type & ENOENT) === 0)
50957
+ if (!(this.#type & ENOENT))
50958
50958
  try {
50959
50959
  return this.#applyStat(this.#fs.lstatSync(this.fullpath())), this;
50960
50960
  } catch (er) {
@@ -53785,7 +53785,7 @@ ${chalk2.bold("Next")}, configure the project(s) and dataset(s) your app should
53785
53785
  `Get started by running ${chalk2.cyan(devCommand)} to launch your Studio\u2019s development server`
53786
53786
  ), print(`
53787
53787
  `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity manage to open the project settings in a browser"), print("npx sanity help to explore the CLI manual")), isFirstProject && (trace.log({ step: "sendCommunityInvite", selectedOption: "yes" }), print(`
53788
- Join the Sanity community: ${chalk2.cyan("https://www.sanity.io/community/join")}`), print(`We look forward to seeing you there!
53788
+ Join our wonderful developer community as well: ${chalk2.cyan("https://snty.link/community")}`), print(`We look forward to seeing you there!
53789
53789
  `)), trace.complete();
53790
53790
  async function getOrCreateUser() {
53791
53791
  return warn("No authentication credentials found in your Sanity config"), print(""), await login({ extOptions: {} }, { ...context, telemetry: trace.newContext("login") }), getUserData(apiClient);
@@ -63501,7 +63501,7 @@ function requireUtf8() {
63501
63501
  det.fRawLength >= 3 && (input2[0] & 255) == 239 && (input2[1] & 255) == 187 && (input2[2] & 255) == 191 && (hasBOM = !0);
63502
63502
  for (var i = 0; i < det.fRawLength; i++) {
63503
63503
  var b = input2[i];
63504
- if ((b & 128) != 0) {
63504
+ if (b & 128) {
63505
63505
  if ((b & 224) == 192)
63506
63506
  trailBytes = 1;
63507
63507
  else if ((b & 240) == 224)