@sanity/cli 3.44.1-mmm-canary.137 → 3.45.1-add-input-error-boundary.14

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.
@@ -31879,7 +31879,7 @@ while`), parts.push(" (", path2.call(print, "test"), ");"), (0, lines_1.concat)(
31879
31879
  var child = childPath.getValue();
31880
31880
  if (namedTypes2.Literal.check(child) && typeof child.value == "string") {
31881
31881
  if (/\S/.test(child.value))
31882
- return child.value.replace(/^\s+|\s+$/g, "");
31882
+ return child.value.replace(/^\s+/g, "");
31883
31883
  if (/\n/.test(child.value))
31884
31884
  return `
31885
31885
  `;
@@ -32340,7 +32340,7 @@ while`), parts.push(" (", path2.call(print, "test"), ");"), (0, lines_1.concat)(
32340
32340
  case "TSPropertySignature":
32341
32341
  return parts.push(printVariance(path2, print), n.readonly ? "readonly " : ""), n.computed ? parts.push("[", path2.call(print, "key"), "]") : parts.push(path2.call(print, "key")), parts.push(n.optional ? "?" : "", path2.call(print, "typeAnnotation")), (0, lines_1.concat)(parts);
32342
32342
  case "TSMethodSignature":
32343
- return n.computed ? parts.push("[", path2.call(print, "key"), "]") : parts.push(path2.call(print, "key")), n.optional && parts.push("?"), parts.push(path2.call(print, "typeParameters"), "(", printFunctionParams(path2, options2, print), ")", path2.call(print, "typeAnnotation")), (0, lines_1.concat)(parts);
32343
+ return n.kind === "get" ? parts.push("get ") : n.kind === "set" && parts.push("set "), n.computed ? parts.push("[", path2.call(print, "key"), "]") : parts.push(path2.call(print, "key")), n.optional && parts.push("?"), parts.push(path2.call(print, "typeParameters"), "(", printFunctionParams(path2, options2, print), ")", path2.call(print, "typeAnnotation")), (0, lines_1.concat)(parts);
32344
32344
  case "TSTypePredicate":
32345
32345
  return n.asserts && parts.push("asserts "), parts.push(path2.call(print, "parameterName")), n.typeAnnotation && parts.push(" is ", path2.call(print, "typeAnnotation", "typeAnnotation")), (0, lines_1.concat)(parts);
32346
32346
  case "TSCallSignatureDeclaration":
@@ -44422,7 +44422,13 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
44422
44422
  projectName: displayName || answers.projectName
44423
44423
  }
44424
44424
  }, shouldImport = !unattended && template.datasetUrl && await promptForDatasetImport(template.importPrompt);
44425
- trace.log({ step: "importTemplateDataset", selectedOption: shouldImport ? "yes" : "no" }), await bootstrapTemplate(templateOptions, context);
44425
+ trace.log({ step: "importTemplateDataset", selectedOption: shouldImport ? "yes" : "no" }), await bootstrapTemplate(templateOptions, context), apiClient({ api: { projectId } }).request({ uri: `/projects/${projectId}` }).then((project) => project?.metadata?.cliInitializedAt ? Promise.resolve() : apiClient({ api: { projectId } }).request({
44426
+ method: "PATCH",
44427
+ uri: `/projects/${projectId}`,
44428
+ body: { metadata: { cliInitializedAt: (/* @__PURE__ */ new Date()).toISOString() } }
44429
+ })).catch(() => {
44430
+ loadEnv.debug("Failed to update cliInitializedAt metadata");
44431
+ });
44426
44432
  let pkgManager;
44427
44433
  if (packageManager && ALLOWED_PACKAGE_MANAGERS.includes(packageManager) ? pkgManager = packageManager : (pkgManager = (await getPackageManagerChoice(outputPath, {
44428
44434
  prompt: prompt2,
@@ -44457,15 +44463,6 @@ ${chalk2.green("Success!")} Now, use this command to continue:
44457
44463
  ${chalk2.green("Success!")} Now, use these commands to continue:
44458
44464
  `), print(`First: ${chalk2.cyan(`cd ${outputPath}`)} - to enter project\u2019s directory`), print(`Then: ${chalk2.cyan(devCommand)} - to run Sanity Studio
44459
44465
  `)), await hasGlobalCli() && (print("Other helpful commands"), print("sanity docs - to open the documentation in a browser"), print("sanity manage - to open the project settings in a browser"), print("sanity help - to explore the CLI manual"));
44460
- try {
44461
- (await apiClient({ api: { projectId } }).request({ uri: `/projects/${projectId}` }))?.metadata?.cliInitializedAt || await apiClient({ api: { projectId } }).request({
44462
- method: "PATCH",
44463
- uri: `/projects/${projectId}`,
44464
- body: { metadata: { cliInitializedAt: (/* @__PURE__ */ new Date()).toISOString() } }
44465
- });
44466
- } catch {
44467
- loadEnv.debug("Failed to update cliInitializedAt metadata");
44468
- }
44469
44466
  const sendInvite = isFirstProject && await prompt2.single({
44470
44467
  type: "confirm",
44471
44468
  message: "We have an excellent developer community, would you like us to send you an invitation to join?",
@@ -44570,7 +44567,7 @@ ${err.message}`);
44570
44567
  displayName: projectName,
44571
44568
  organizationId: await getOrganizationId(organizations),
44572
44569
  subscription: selectedPlan ? { planId: selectedPlan } : void 0,
44573
- metadata: { coupon: intendedCoupon }
44570
+ metadata: { coupon: intendedCoupon, integration: "cli" }
44574
44571
  }).then((response) => ({
44575
44572
  ...response,
44576
44573
  isFirstProject: isUsersFirstProject,