sst 2.0.0-rc.45 → 2.0.0-rc.47

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.
@@ -39,16 +39,18 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
39
39
  const colors = ["#01cdfe", "#ff71ce", "#05ffa1", "#b967ff"];
40
40
  let index = 0;
41
41
  const pending = new Map();
42
- function start(requestID) {
42
+ function prefix(requestID) {
43
+ const exists = pending.get(requestID);
44
+ if (exists) {
45
+ return Colors.hex(exists.color)(Colors.prefix);
46
+ }
43
47
  pending.set(requestID, {
44
48
  requestID,
45
49
  started: Date.now(),
46
50
  color: colors[index % colors.length],
47
51
  });
48
52
  index++;
49
- }
50
- function prefix(requestID) {
51
- return Colors.hex(pending.get(requestID).color)(Colors.prefix);
53
+ return prefix(requestID);
52
54
  }
53
55
  function end(requestID) {
54
56
  // index--;
@@ -56,10 +58,10 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
56
58
  pending.delete(requestID);
57
59
  }
58
60
  bus.subscribe("function.invoked", async (evt) => {
59
- start(evt.properties.requestID);
60
61
  Colors.line(prefix(evt.properties.requestID), Colors.dim.bold("Invoked"), Colors.dim(useFunctions().fromID(evt.properties.functionID).handler));
61
62
  });
62
63
  bus.subscribe("worker.stdout", async (evt) => {
64
+ prefix(evt.properties.requestID);
63
65
  const { started } = pending.get(evt.properties.requestID);
64
66
  for (let line of evt.properties.message.split("\n")) {
65
67
  Colors.line(prefix(evt.properties.requestID), Colors.dim(("+" + (Date.now() - started) + "ms").padEnd(7)), Colors.dim(line));
@@ -18,7 +18,6 @@ export const usePothosBuilder = Context.memo(() => {
18
18
  await fs.writeFile(route.output, schema);
19
19
  // bus.publish("pothos.extracted", { file: route.output });
20
20
  await Promise.all(route.commands.map((cmd) => execAsync(cmd)));
21
- Colors.line(Colors.prefix);
22
21
  Colors.line(Colors.success(`✔`), " Extracted pothos schema");
23
22
  }
24
23
  catch (ex) {
package/cli/ui/deploy.js CHANGED
@@ -4,13 +4,12 @@ import { useBus } from "../../bus.js";
4
4
  import { Stacks } from "../../stacks/index.js";
5
5
  import inkSpinner from "ink-spinner";
6
6
  import { Colors } from "../colors.js";
7
+ import { useProject } from "../../project.js";
7
8
  // @ts-ignore
8
9
  const { default: Spinner } = inkSpinner;
9
10
  export const DeploymentUI = (props) => {
10
11
  const [resources, setResources] = useState({});
11
12
  useEffect(() => {
12
- Colors.gap();
13
- Colors.line(`${Colors.primary(`➜`)} ${Colors.bold(`Deploying...`)}`);
14
13
  Colors.gap();
15
14
  const bus = useBus();
16
15
  const event = bus.subscribe("stack.event", (payload) => {
@@ -19,8 +18,10 @@ export const DeploymentUI = (props) => {
19
18
  return;
20
19
  setResources((previous) => {
21
20
  if (Stacks.isFinal(event.ResourceStatus)) {
22
- const readable = Stacks.logicalIdToCdkPath(props.assembly, event.StackName, event.LogicalResourceId);
23
- Colors.line(Colors.warning(Colors.prefix), Colors.dim(`${event.StackName} ${readable} ${event.ResourceType}`), Stacks.isFailed(event.ResourceStatus)
21
+ const readable = logicalIdToCdkPath(props.assembly, event.StackName, event.LogicalResourceId);
22
+ Colors.line(Colors.warning(Colors.prefix), readable
23
+ ? Colors.dim(`${stackNameToId(event.StackName)} ${readable} ${event.ResourceType}`)
24
+ : Colors.dim(`${stackNameToId(event.StackName)} ${event.ResourceType}`), Stacks.isFailed(event.ResourceStatus)
24
25
  ? Colors.danger(event.ResourceStatus)
25
26
  : Colors.dim(event.ResourceStatus));
26
27
  const { [event.LogicalResourceId]: _, ...next } = previous;
@@ -45,31 +46,29 @@ export const DeploymentUI = (props) => {
45
46
  }
46
47
  return (React.createElement(Box, { flexDirection: "column" },
47
48
  Object.entries(resources).map(([_, evt]) => {
48
- const readable = Stacks.logicalIdToCdkPath(props.assembly, evt.StackName, evt.LogicalResourceId);
49
+ const readable = logicalIdToCdkPath(props.assembly, evt.StackName, evt.LogicalResourceId);
49
50
  return (React.createElement(Box, { key: evt.LogicalResourceId },
50
51
  React.createElement(Text, null,
51
52
  React.createElement(Spinner, null),
52
53
  " ",
53
- evt.StackName,
54
- " ",
55
- readable,
56
- " ",
57
- evt.ResourceType,
54
+ readable
55
+ ? `${stackNameToId(evt.StackName)} ${readable} ${evt.ResourceType}`
56
+ : `${stackNameToId(evt.StackName)} ${evt.ResourceType}`,
58
57
  " "),
59
58
  React.createElement(Text, { color: color(evt.ResourceStatus || "") }, evt.ResourceStatus)));
60
59
  }),
61
60
  Object.entries(resources).length === 0 && (React.createElement(Box, null,
62
61
  React.createElement(Text, null,
63
62
  React.createElement(Spinner, null),
64
- " ")))));
63
+ " ",
64
+ React.createElement(Text, { dimColor: true }, "Deploying..."))))));
65
65
  };
66
66
  export function printDeploymentResults(assembly, results) {
67
67
  // Print success stacks
68
- const success = Object.entries(results)
69
- .filter(([_stack, result]) => Object.keys(result.errors).length === 0);
68
+ const success = Object.entries(results).filter(([_stack, result]) => Object.keys(result.errors).length === 0);
70
69
  if (success.length) {
71
70
  Colors.gap();
72
- Colors.line(Colors.success(`✔`), Colors.bold(` Deployed`));
71
+ Colors.line(Colors.success(`✔`), Colors.bold(` Deployed:`));
73
72
  for (const [stack, result] of success) {
74
73
  const outputs = Object.entries(result.outputs).filter(([key, _]) => {
75
74
  if (key.startsWith("Export"))
@@ -80,7 +79,7 @@ export function printDeploymentResults(assembly, results) {
80
79
  return false;
81
80
  return true;
82
81
  });
83
- Colors.line(` ${Colors.dim(stack)}`);
82
+ Colors.line(` ${Colors.dim(stackNameToId(stack))}`);
84
83
  if (outputs.length > 0) {
85
84
  for (const key of Object.keys(Object.fromEntries(outputs)).sort()) {
86
85
  const value = result.outputs[key];
@@ -90,18 +89,29 @@ export function printDeploymentResults(assembly, results) {
90
89
  }
91
90
  }
92
91
  // Print failed stacks
93
- const failed = Object.entries(results)
94
- .filter(([_stack, result]) => Object.keys(result.errors).length > 0);
92
+ const failed = Object.entries(results).filter(([_stack, result]) => Object.keys(result.errors).length > 0);
95
93
  if (failed.length) {
96
94
  Colors.gap();
97
95
  Colors.line(`${Colors.danger(`✖`)} ${Colors.bold.dim(`Errors`)}`);
98
96
  for (const [stack, result] of failed) {
99
- Colors.line(` ${Colors.dim(stack)}`);
97
+ Colors.line(` ${Colors.dim(stackNameToId(stack))}`);
100
98
  for (const [id, error] of Object.entries(result.errors)) {
101
- const readable = Stacks.logicalIdToCdkPath(assembly, stack, id);
99
+ const readable = logicalIdToCdkPath(assembly, stack, id) || id;
102
100
  Colors.line(` ${Colors.danger.bold(readable + ":")} ${error}`);
103
101
  }
104
102
  }
105
103
  Colors.gap();
106
104
  }
107
105
  }
106
+ function stackNameToId(stack) {
107
+ const project = useProject();
108
+ const prefix = `${project.config.stage}-${project.config.name}-`;
109
+ return stack.startsWith(prefix) ? stack.substring(prefix.length) : stack;
110
+ }
111
+ function logicalIdToCdkPath(assembly, stack, logicalId) {
112
+ const found = Object.entries(assembly.manifest.artifacts?.[stack].metadata || {}).find(([_key, value]) => value[0]?.type === "aws:cdk:logicalId" && value[0]?.data === logicalId)?.[0];
113
+ if (!found) {
114
+ return;
115
+ }
116
+ return found.split("/").filter(Boolean).slice(1, -1).join("/");
117
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.0.0-rc.45",
3
+ "version": "2.0.0-rc.47",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
package/sst.mjs CHANGED
@@ -1101,17 +1101,6 @@ async function loadAssembly(from) {
1101
1101
  const { CloudAssembly } = await import("aws-cdk-lib/cx-api");
1102
1102
  return new CloudAssembly(from);
1103
1103
  }
1104
- function logicalIdToCdkPath(assembly, stack, logicalId) {
1105
- const found = Object.entries(
1106
- assembly.manifest.artifacts?.[stack].metadata || {}
1107
- ).find(
1108
- ([_key, value]) => value[0]?.type === "aws:cdk:logicalId" && value[0]?.data === logicalId
1109
- )?.[0];
1110
- if (!found) {
1111
- return logicalId;
1112
- }
1113
- return found.split("/").filter(Boolean).slice(1, -1).join("/");
1114
- }
1115
1104
  var init_assembly = __esm({
1116
1105
  "src/stacks/assembly.ts"() {
1117
1106
  "use strict";
@@ -3872,7 +3861,7 @@ async function synth(opts) {
3872
3861
  if (missing && missing.length) {
3873
3862
  const next = missing.map((x) => x.key);
3874
3863
  if (next.length === previous2.size && next.every((x) => previous2.has(x)))
3875
- throw new VisibleError(`Could not resolve context values for ${next}`);
3864
+ throw new VisibleError(formatErrorMessage(next.join("")));
3876
3865
  Logger.debug("Looking up context for:", next, "Previous:", previous2);
3877
3866
  previous2 = new Set(next);
3878
3867
  await contextproviders.provideContextValues(
@@ -3889,6 +3878,21 @@ async function synth(opts) {
3889
3878
  return assembly;
3890
3879
  }
3891
3880
  }
3881
+ function formatErrorMessage(message) {
3882
+ return formatCustomDomainError(message) || `Could not resolve context values for ${message}`;
3883
+ }
3884
+ function formatCustomDomainError(message) {
3885
+ const ret = message.match(/hosted-zone:account=\d+:domainName=(\S+):/);
3886
+ if (!ret) {
3887
+ return;
3888
+ }
3889
+ const hostedZone = ret && ret[1];
3890
+ return [
3891
+ `It seems you are configuring custom domains for you URL.`,
3892
+ hostedZone ? `And SST is not able to find the hosted zone "${hostedZone}" in your AWS Route 53 account.` : `And SST is not able to find the hosted zone in your AWS Route 53 account.`,
3893
+ `Please double check and make sure the zone exists, or pass in a different zone.`
3894
+ ].join(" ");
3895
+ }
3892
3896
  var init_synth = __esm({
3893
3897
  "src/stacks/synth.ts"() {
3894
3898
  "use strict";
@@ -4004,7 +4008,6 @@ __export(stacks_exports, {
4004
4008
  isSuccess: () => isSuccess,
4005
4009
  load: () => load,
4006
4010
  loadAssembly: () => loadAssembly,
4007
- logicalIdToCdkPath: () => logicalIdToCdkPath,
4008
4011
  metadata: () => metadata,
4009
4012
  metadataForStack: () => metadataForStack,
4010
4013
  monitor: () => monitor,
@@ -5134,10 +5137,12 @@ import React, { useState, useEffect } from "react";
5134
5137
  import { Box, Text } from "ink";
5135
5138
  import inkSpinner from "ink-spinner";
5136
5139
  function printDeploymentResults(assembly, results) {
5137
- const success = Object.entries(results).filter(([_stack, result]) => Object.keys(result.errors).length === 0);
5140
+ const success = Object.entries(results).filter(
5141
+ ([_stack, result]) => Object.keys(result.errors).length === 0
5142
+ );
5138
5143
  if (success.length) {
5139
5144
  Colors.gap();
5140
- Colors.line(Colors.success(`\u2714`), Colors.bold(` Deployed`));
5145
+ Colors.line(Colors.success(`\u2714`), Colors.bold(` Deployed:`));
5141
5146
  for (const [stack, result] of success) {
5142
5147
  const outputs = Object.entries(result.outputs).filter(([key, _]) => {
5143
5148
  if (key.startsWith("Export"))
@@ -5148,7 +5153,7 @@ function printDeploymentResults(assembly, results) {
5148
5153
  return false;
5149
5154
  return true;
5150
5155
  });
5151
- Colors.line(` ${Colors.dim(stack)}`);
5156
+ Colors.line(` ${Colors.dim(stackNameToId(stack))}`);
5152
5157
  if (outputs.length > 0) {
5153
5158
  for (const key of Object.keys(Object.fromEntries(outputs)).sort()) {
5154
5159
  const value = result.outputs[key];
@@ -5157,20 +5162,38 @@ function printDeploymentResults(assembly, results) {
5157
5162
  }
5158
5163
  }
5159
5164
  }
5160
- const failed = Object.entries(results).filter(([_stack, result]) => Object.keys(result.errors).length > 0);
5165
+ const failed = Object.entries(results).filter(
5166
+ ([_stack, result]) => Object.keys(result.errors).length > 0
5167
+ );
5161
5168
  if (failed.length) {
5162
5169
  Colors.gap();
5163
5170
  Colors.line(`${Colors.danger(`\u2716`)} ${Colors.bold.dim(`Errors`)}`);
5164
5171
  for (const [stack, result] of failed) {
5165
- Colors.line(` ${Colors.dim(stack)}`);
5172
+ Colors.line(` ${Colors.dim(stackNameToId(stack))}`);
5166
5173
  for (const [id, error2] of Object.entries(result.errors)) {
5167
- const readable = stacks_exports.logicalIdToCdkPath(assembly, stack, id);
5174
+ const readable = logicalIdToCdkPath(assembly, stack, id) || id;
5168
5175
  Colors.line(` ${Colors.danger.bold(readable + ":")} ${error2}`);
5169
5176
  }
5170
5177
  }
5171
5178
  Colors.gap();
5172
5179
  }
5173
5180
  }
5181
+ function stackNameToId(stack) {
5182
+ const project = useProject();
5183
+ const prefix = `${project.config.stage}-${project.config.name}-`;
5184
+ return stack.startsWith(prefix) ? stack.substring(prefix.length) : stack;
5185
+ }
5186
+ function logicalIdToCdkPath(assembly, stack, logicalId) {
5187
+ const found = Object.entries(
5188
+ assembly.manifest.artifacts?.[stack].metadata || {}
5189
+ ).find(
5190
+ ([_key, value]) => value[0]?.type === "aws:cdk:logicalId" && value[0]?.data === logicalId
5191
+ )?.[0];
5192
+ if (!found) {
5193
+ return;
5194
+ }
5195
+ return found.split("/").filter(Boolean).slice(1, -1).join("/");
5196
+ }
5174
5197
  var Spinner, DeploymentUI;
5175
5198
  var init_deploy2 = __esm({
5176
5199
  "src/cli/ui/deploy.tsx"() {
@@ -5178,12 +5201,11 @@ var init_deploy2 = __esm({
5178
5201
  init_bus();
5179
5202
  init_stacks();
5180
5203
  init_colors();
5204
+ init_project();
5181
5205
  ({ default: Spinner } = inkSpinner);
5182
5206
  DeploymentUI = (props) => {
5183
5207
  const [resources, setResources] = useState({});
5184
5208
  useEffect(() => {
5185
- Colors.gap();
5186
- Colors.line(`${Colors.primary(`\u279C`)} ${Colors.bold(`Deploying...`)}`);
5187
5209
  Colors.gap();
5188
5210
  const bus = useBus();
5189
5211
  const event = bus.subscribe("stack.event", (payload) => {
@@ -5192,10 +5214,18 @@ var init_deploy2 = __esm({
5192
5214
  return;
5193
5215
  setResources((previous2) => {
5194
5216
  if (stacks_exports.isFinal(event2.ResourceStatus)) {
5195
- const readable = stacks_exports.logicalIdToCdkPath(props.assembly, event2.StackName, event2.LogicalResourceId);
5217
+ const readable = logicalIdToCdkPath(
5218
+ props.assembly,
5219
+ event2.StackName,
5220
+ event2.LogicalResourceId
5221
+ );
5196
5222
  Colors.line(
5197
5223
  Colors.warning(Colors.prefix),
5198
- Colors.dim(`${event2.StackName} ${readable} ${event2.ResourceType}`),
5224
+ readable ? Colors.dim(
5225
+ `${stackNameToId(event2.StackName)} ${readable} ${event2.ResourceType}`
5226
+ ) : Colors.dim(
5227
+ `${stackNameToId(event2.StackName)} ${event2.ResourceType}`
5228
+ ),
5199
5229
  stacks_exports.isFailed(event2.ResourceStatus) ? Colors.danger(event2.ResourceStatus) : Colors.dim(event2.ResourceStatus)
5200
5230
  );
5201
5231
  const { [event2.LogicalResourceId]: _, ...next } = previous2;
@@ -5219,9 +5249,13 @@ var init_deploy2 = __esm({
5219
5249
  return "yellow";
5220
5250
  }
5221
5251
  return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, Object.entries(resources).map(([_, evt]) => {
5222
- const readable = stacks_exports.logicalIdToCdkPath(props.assembly, evt.StackName, evt.LogicalResourceId);
5223
- return /* @__PURE__ */ React.createElement(Box, { key: evt.LogicalResourceId }, /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Spinner, null), " ", evt.StackName, " ", readable, " ", evt.ResourceType, " "), /* @__PURE__ */ React.createElement(Text, { color: color(evt.ResourceStatus || "") }, evt.ResourceStatus));
5224
- }), Object.entries(resources).length === 0 && /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Spinner, null), " ")));
5252
+ const readable = logicalIdToCdkPath(
5253
+ props.assembly,
5254
+ evt.StackName,
5255
+ evt.LogicalResourceId
5256
+ );
5257
+ return /* @__PURE__ */ React.createElement(Box, { key: evt.LogicalResourceId }, /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Spinner, null), " ", readable ? `${stackNameToId(evt.StackName)} ${readable} ${evt.ResourceType}` : `${stackNameToId(evt.StackName)} ${evt.ResourceType}`, " "), /* @__PURE__ */ React.createElement(Text, { color: color(evt.ResourceStatus || "") }, evt.ResourceStatus));
5258
+ }), Object.entries(resources).length === 0 && /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Spinner, null), " ", /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Deploying..."))));
5225
5259
  };
5226
5260
  }
5227
5261
  });
@@ -5416,7 +5450,6 @@ var init_pothos2 = __esm({
5416
5450
  });
5417
5451
  await fs15.writeFile(route.output, schema);
5418
5452
  await Promise.all(route.commands.map((cmd) => execAsync4(cmd)));
5419
- Colors.line(Colors.prefix);
5420
5453
  Colors.line(Colors.success(`\u2714`), " Extracted pothos schema");
5421
5454
  } catch (ex) {
5422
5455
  Colors.line(Colors.danger(`\u2716`), " Failed to extract schema from pothos:");
@@ -5981,22 +6014,23 @@ var dev = (program2) => program2.command(
5981
6014
  const colors = ["#01cdfe", "#ff71ce", "#05ffa1", "#b967ff"];
5982
6015
  let index = 0;
5983
6016
  const pending = /* @__PURE__ */ new Map();
5984
- function start(requestID) {
6017
+ function prefix(requestID) {
6018
+ const exists = pending.get(requestID);
6019
+ if (exists) {
6020
+ return Colors.hex(exists.color)(Colors.prefix);
6021
+ }
5985
6022
  pending.set(requestID, {
5986
6023
  requestID,
5987
6024
  started: Date.now(),
5988
6025
  color: colors[index % colors.length]
5989
6026
  });
5990
6027
  index++;
5991
- }
5992
- function prefix(requestID) {
5993
- return Colors.hex(pending.get(requestID).color)(Colors.prefix);
6028
+ return prefix(requestID);
5994
6029
  }
5995
6030
  function end(requestID) {
5996
6031
  pending.delete(requestID);
5997
6032
  }
5998
6033
  bus.subscribe("function.invoked", async (evt) => {
5999
- start(evt.properties.requestID);
6000
6034
  Colors.line(
6001
6035
  prefix(evt.properties.requestID),
6002
6036
  Colors.dim.bold("Invoked"),
@@ -6006,6 +6040,7 @@ var dev = (program2) => program2.command(
6006
6040
  );
6007
6041
  });
6008
6042
  bus.subscribe("worker.stdout", async (evt) => {
6043
+ prefix(evt.properties.requestID);
6009
6044
  const { started } = pending.get(evt.properties.requestID);
6010
6045
  for (let line of evt.properties.message.split("\n")) {
6011
6046
  Colors.line(
@@ -6123,9 +6158,7 @@ var dev = (program2) => program2.command(
6123
6158
  pending = void 0;
6124
6159
  if (lastDeployed)
6125
6160
  console.log();
6126
- const component = render(
6127
- /* @__PURE__ */ React2.createElement(DeploymentUI2, { assembly })
6128
- );
6161
+ const component = render(/* @__PURE__ */ React2.createElement(DeploymentUI2, { assembly }));
6129
6162
  const results = await Stacks.deployMany(assembly.stacks);
6130
6163
  component.clear();
6131
6164
  component.unmount();
@@ -1,3 +1 @@
1
- import type { CloudAssembly } from "aws-cdk-lib/cx-api";
2
- export declare function loadAssembly(from: string): Promise<CloudAssembly>;
3
- export declare function logicalIdToCdkPath(assembly: CloudAssembly, stack: string, logicalId: string): string;
1
+ export declare function loadAssembly(from: string): Promise<import("aws-cdk-lib/cx-api").CloudAssembly>;
@@ -2,14 +2,3 @@ export async function loadAssembly(from) {
2
2
  const { CloudAssembly } = await import("aws-cdk-lib/cx-api");
3
3
  return new CloudAssembly(from);
4
4
  }
5
- export function logicalIdToCdkPath(assembly, stack, logicalId) {
6
- const found = Object.entries(assembly.manifest.artifacts?.[stack].metadata || {}).find(([_key, value]) => value[0]?.type === "aws:cdk:logicalId" && value[0]?.data === logicalId)?.[0];
7
- if (!found) {
8
- return logicalId;
9
- }
10
- return found
11
- .split("/")
12
- .filter(Boolean)
13
- .slice(1, -1)
14
- .join("/");
15
- }
package/stacks/synth.js CHANGED
@@ -58,7 +58,7 @@ export async function synth(opts) {
58
58
  if (missing && missing.length) {
59
59
  const next = missing.map((x) => x.key);
60
60
  if (next.length === previous.size && next.every((x) => previous.has(x)))
61
- throw new VisibleError(`Could not resolve context values for ${next}`);
61
+ throw new VisibleError(formatErrorMessage(next.join("")));
62
62
  Logger.debug("Looking up context for:", next, "Previous:", previous);
63
63
  previous = new Set(next);
64
64
  await contextproviders.provideContextValues(missing, cfg.context, provider);
@@ -71,3 +71,21 @@ export async function synth(opts) {
71
71
  return assembly;
72
72
  }
73
73
  }
74
+ function formatErrorMessage(message) {
75
+ return formatCustomDomainError(message)
76
+ || `Could not resolve context values for ${message}`;
77
+ }
78
+ function formatCustomDomainError(message) {
79
+ const ret = message.match(/hosted-zone:account=\d+:domainName=(\S+):/);
80
+ if (!ret) {
81
+ return;
82
+ }
83
+ const hostedZone = ret && ret[1];
84
+ return [
85
+ `It seems you are configuring custom domains for you URL.`,
86
+ hostedZone
87
+ ? `And SST is not able to find the hosted zone "${hostedZone}" in your AWS Route 53 account.`
88
+ : `And SST is not able to find the hosted zone in your AWS Route 53 account.`,
89
+ `Please double check and make sure the zone exists, or pass in a different zone.`,
90
+ ].join(" ");
91
+ }