@milesroxas/design-hub 0.13.0 → 0.15.0

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 (101) hide show
  1. package/README.md +38 -33
  2. package/core/catalog.test.ts +28 -1
  3. package/core/catalog.ts +21 -4
  4. package/core/prototype.test.ts +12 -1
  5. package/core/prototype.ts +21 -2
  6. package/core/review/model.ts +71 -6
  7. package/core/review/service.test.ts +536 -1
  8. package/core/review/service.ts +452 -25
  9. package/core/review/store.ts +45 -4
  10. package/dist/core/catalog.d.ts +8 -1
  11. package/dist/core/catalog.js +12 -3
  12. package/dist/core/prototype.d.ts +20 -2
  13. package/dist/core/prototype.js +17 -2
  14. package/dist/core/review/model.d.ts +42 -3
  15. package/dist/core/review/model.js +52 -3
  16. package/dist/core/review/service.d.ts +81 -7
  17. package/dist/core/review/service.js +407 -23
  18. package/dist/core/review/store.d.ts +29 -2
  19. package/dist/core/review/store.js +4 -0
  20. package/dist/scripts/client.d.ts +1 -1
  21. package/dist/scripts/client.js +1 -1
  22. package/dist/scripts/lib/catalog.d.ts +1 -1
  23. package/dist/scripts/lib/catalog.js +3 -3
  24. package/dist/scripts/lib/dns.d.ts +16 -2
  25. package/dist/scripts/lib/dns.js +66 -3
  26. package/dist/scripts/lib/fake-host.d.ts +16 -1
  27. package/dist/scripts/lib/fake-host.js +36 -1
  28. package/dist/scripts/lib/host.d.ts +2 -0
  29. package/dist/scripts/lib/resend.d.ts +36 -0
  30. package/dist/scripts/lib/resend.js +66 -0
  31. package/dist/scripts/lib/studio-deps.d.ts +7 -0
  32. package/dist/scripts/lib/studio-deps.js +6 -1
  33. package/dist/scripts/lib/studios.d.ts +2 -2
  34. package/dist/scripts/lib/studios.js +5 -5
  35. package/dist/scripts/lib/vercel-host.js +6 -0
  36. package/dist/scripts/new.d.ts +8 -3
  37. package/dist/scripts/new.js +15 -4
  38. package/dist/scripts/people.d.ts +16 -4
  39. package/dist/scripts/people.js +67 -17
  40. package/dist/scripts/preflight.js +1 -1
  41. package/dist/scripts/share.js +3 -3
  42. package/dist/scripts/studio.d.ts +19 -3
  43. package/dist/scripts/studio.js +327 -6
  44. package/dist/server/api.d.ts +25 -2
  45. package/dist/server/api.js +77 -17
  46. package/dist/server/dev-studio.d.ts +36 -0
  47. package/dist/server/dev-studio.js +181 -0
  48. package/dist/server/dev.d.ts +16 -1
  49. package/dist/server/dev.js +23 -3
  50. package/dist/server/gate.d.ts +26 -3
  51. package/dist/server/gate.js +323 -52
  52. package/dist/server/mailer.d.ts +60 -0
  53. package/dist/server/mailer.js +104 -0
  54. package/dist/server/mailers/fake.d.ts +8 -0
  55. package/dist/server/mailers/fake.js +16 -0
  56. package/dist/server/mailers/resend.d.ts +21 -0
  57. package/dist/server/mailers/resend.js +49 -0
  58. package/dist/server/session.js +4 -1
  59. package/dist/vercel/proxy.js +10 -3
  60. package/dist/vite/plugin.js +6 -1
  61. package/kit/ViewTools.tsx +9 -0
  62. package/kit/prefs.ts +3 -4
  63. package/kit/ui/Menu.tsx +29 -18
  64. package/kit/ui/layer.ts +41 -0
  65. package/package.json +1 -1
  66. package/shell/Command.tsx +142 -0
  67. package/shell/Index.tsx +902 -400
  68. package/shell/Milestone.tsx +302 -0
  69. package/shell/Sidebar.tsx +236 -0
  70. package/shell/index.css +224 -0
  71. package/shell/milestones.test.ts +157 -0
  72. package/shell/milestones.ts +144 -0
  73. package/shell/registry.ts +4 -3
  74. package/shell/review/Bar.tsx +1 -0
  75. package/shell/review/Card.tsx +17 -7
  76. package/shell/review/People.tsx +908 -134
  77. package/shell/review/Review.tsx +2 -2
  78. package/shell/review/anchor.ts +6 -1
  79. package/shell/review/client.ts +41 -7
  80. package/shell/review/menu-place.test.ts +41 -0
  81. package/shell/review/place.test.ts +26 -1
  82. package/shell/review/place.ts +17 -0
  83. package/shell/review/review.css +97 -11
  84. package/shell/review/view.test.ts +115 -1
  85. package/shell/review/view.ts +92 -2
  86. package/shell/shell.css +8 -175
  87. package/shell/sidebar.css +86 -0
  88. package/shell/studio/ClientHub.tsx +21 -10
  89. package/shell/studio/StudioHub.tsx +121 -45
  90. package/shell/studio/hub.css +118 -27
  91. package/shell/studio/page.tsx +28 -17
  92. package/shell/system.css +12 -0
  93. package/skills/miles-deploy/SKILL.md +25 -4
  94. package/skills/miles-new-feature/SKILL.md +2 -1
  95. package/skills/miles-prototype/SKILL.md +1 -1
  96. package/templates/app/README.md +1 -1
  97. package/templates/brand/README.md +1 -1
  98. package/templates/site/README.md +1 -1
  99. package/templates/space/README.md +1 -1
  100. package/templates/studio/.env.example +6 -0
  101. package/templates/studio/package.json +1 -1
@@ -3,13 +3,13 @@ import { type Args } from './lib/cli.ts';
3
3
  import { type ProjectDeps } from './lib/linked.ts';
4
4
  export declare const spec: {
5
5
  readonly name: 'people';
6
- readonly summary: 'List or add the people who comment on the deployed prototypes, give them sign-in links, sign them out, revoke them, and set how long they keep access.';
6
+ readonly summary: 'List or add the people who comment on the deployed prototypes, give them sign-in links, sign them out, revoke them, set how long they keep access, and set the address they sign in with by email.';
7
7
  readonly positionals: [{
8
8
  readonly name: 'action';
9
- readonly description: 'list (default): everyone. add: a new person and their link. link <id>: another one-time link, for another device. sign-out <id>: ends every session and unused link, and gives one new link. revoke <id>: ends their access everywhere. access [id]: with an id and --access, sets that person’s access from now; without an id, reads the default a new Client gets (in a project the client’s own, else the studio’s; in the studio folder or with --studio the studio’s), or sets it with --access.';
9
+ readonly description: 'list (default): everyone. add: a new person and their link. link <id>: another one-time link, for another device. sign-out <id>: ends every session and unused link, and gives one new link. revoke <id>: ends their access everywhere. email <id>: sets or changes their address with --email, or clears it with --clear. access [id]: with an id and --access, sets that person’s access from now; without an id, reads the default a new Client gets (in a project the client’s own, else the studio’s; in the studio folder or with --studio the studio’s), or sets it with --access.';
10
10
  }, {
11
11
  readonly name: 'id';
12
- readonly description: 'The person, for link, sign-out, revoke and access';
12
+ readonly description: 'The person, for link, sign-out, revoke, email and access';
13
13
  }];
14
14
  readonly flags: {
15
15
  readonly name: {
@@ -30,6 +30,18 @@ export declare const spec: {
30
30
  readonly choices: readonly ["3m", "6m", "open"];
31
31
  readonly description: 'How long they keep access: 3m, 6m or open. For add, absent means the client’s default for a client (people access reads it) and open for studio.';
32
32
  };
33
+ readonly email: {
34
+ readonly type: 'string';
35
+ readonly description: 'For add and email: the address they sign in with by email, kept lower case. Optional: without one they sign in by link only. Within one client, or the studio’s own people, one person holds an address.';
36
+ };
37
+ readonly clear: {
38
+ readonly type: 'boolean';
39
+ readonly description: 'For email: removes their address, so they sign in by link only.';
40
+ };
41
+ readonly 'no-mail': {
42
+ readonly type: 'boolean';
43
+ readonly description: 'For add: do not email them their link. Absent, a person with --email is mailed it when the studio sends mail (RESEND_API_KEY and MAIL_FROM in its .env), and mailed says how that went.';
44
+ };
33
45
  readonly studio: {
34
46
  readonly type: 'string';
35
47
  readonly description: 'The studio whose own people these are, by slug, from anywhere on this machine; in the studio folder it is that studio. Their links are on studio.<apex>. Client people are a project’s: run people in the project linked to their client.';
@@ -39,7 +51,7 @@ export declare const spec: {
39
51
  readonly description: 'Use this machine’s dev store, even in a project linked to a studio.';
40
52
  };
41
53
  };
42
- readonly output: '{ ok, store, studio?, people } or { ok, store, studio?, person, link, next?, notice? } or { ok, store, studio?, person } or { ok, store, studio?, access }; store is studio in a linked project, with studio: { studio, client, host, project }, and notice when a Studio person is added there; store is studio with studio: { studio, host } for the studio’s own people (the studio folder or --studio); local otherwise. A Studio person’s link is on studio.<apex> once it answers.';
54
+ readonly output: '{ ok, store, studio?, people } or { ok, store, studio?, person, link, mailed?, next?, notice? } or { ok, store, studio?, person } or { ok, store, studio?, access }; store is studio in a linked project, with studio: { studio, client, host, project }, and notice when a Studio person is added there; store is studio with studio: { studio, host } for the studio’s own people (the studio folder or --studio); local otherwise. A Studio person’s link is on studio.<apex> once it answers. mailed, on add: sent (Resend took the invite; have them check spam if it does not show), refused or down (it did not go: send the link yourself), or off (none was sent).';
43
55
  };
44
56
  export declare function run({ positionals: [action, id], flags }: Args<typeof spec>, deps: ProjectDeps): Promise<Record<string, unknown>>;
45
57
  export declare const main: (args: Args<typeof spec>) => Promise<Record<string, unknown>>;
@@ -10,9 +10,12 @@
10
10
  // person, the owner too, gets a new link without a session. Studio also adds
11
11
  // people from the People tab and the studio hub. Without a link to a studio,
12
12
  // and with --local, they are this machine's dev store's, whose links open
13
- // nothing anywhere.
13
+ // nothing anywhere. When the studio sends mail (its .env holds the site's
14
+ // RESEND_API_KEY and MAIL_FROM), add mails a person with an address their
15
+ // link, unless --no-mail: the flag is the yes the People tab asks for.
14
16
  import { ACCESS, PERSON_KINDS, STUDIO_SITE } from '../core/review/model.js';
15
17
  import { localStudio } from '../server/local.js';
18
+ import { sendInvite } from '../server/mailer.js';
16
19
  import { CliError } from './lib/cli.js';
17
20
  import { readLink, realProjectDeps } from './lib/linked.js';
18
21
  import { cliReview } from './lib/review.js';
@@ -20,13 +23,13 @@ import { openReview } from './lib/studio-deps.js';
20
23
  import { findStudio, isStudioFolder, studioHost } from './lib/studios.js';
21
24
  export const spec = {
22
25
  name: 'people',
23
- summary: 'List or add the people who comment on the deployed prototypes, give them sign-in links, sign them out, revoke them, and set how long they keep access.',
26
+ summary: 'List or add the people who comment on the deployed prototypes, give them sign-in links, sign them out, revoke them, set how long they keep access, and set the address they sign in with by email.',
24
27
  positionals: [
25
28
  {
26
29
  name: 'action',
27
- description: 'list (default): everyone. add: a new person and their link. link <id>: another one-time link, for another device. sign-out <id>: ends every session and unused link, and gives one new link. revoke <id>: ends their access everywhere. access [id]: with an id and --access, sets that person’s access from now; without an id, reads the default a new Client gets (in a project the client’s own, else the studio’s; in the studio folder or with --studio the studio’s), or sets it with --access.',
30
+ description: 'list (default): everyone. add: a new person and their link. link <id>: another one-time link, for another device. sign-out <id>: ends every session and unused link, and gives one new link. revoke <id>: ends their access everywhere. email <id>: sets or changes their address with --email, or clears it with --clear. access [id]: with an id and --access, sets that person’s access from now; without an id, reads the default a new Client gets (in a project the client’s own, else the studio’s; in the studio folder or with --studio the studio’s), or sets it with --access.',
28
31
  },
29
- { name: 'id', description: 'The person, for link, sign-out, revoke and access' },
32
+ { name: 'id', description: 'The person, for link, sign-out, revoke, email and access' },
30
33
  ],
31
34
  flags: {
32
35
  name: { type: 'string', description: 'For add: their name as it shows on comments.' },
@@ -44,6 +47,18 @@ export const spec = {
44
47
  choices: ACCESS,
45
48
  description: 'How long they keep access: 3m, 6m or open. For add, absent means the client’s default for a client (people access reads it) and open for studio.',
46
49
  },
50
+ email: {
51
+ type: 'string',
52
+ description: 'For add and email: the address they sign in with by email, kept lower case. Optional: without one they sign in by link only. Within one client, or the studio’s own people, one person holds an address.',
53
+ },
54
+ clear: {
55
+ type: 'boolean',
56
+ description: 'For email: removes their address, so they sign in by link only.',
57
+ },
58
+ 'no-mail': {
59
+ type: 'boolean',
60
+ description: 'For add: do not email them their link. Absent, a person with --email is mailed it when the studio sends mail (RESEND_API_KEY and MAIL_FROM in its .env), and mailed says how that went.',
61
+ },
47
62
  studio: {
48
63
  type: 'string',
49
64
  description: 'The studio whose own people these are, by slug, from anywhere on this machine; in the studio folder it is that studio. Their links are on studio.<apex>. Client people are a project’s: run people in the project linked to their client.',
@@ -53,7 +68,7 @@ export const spec = {
53
68
  description: 'Use this machine’s dev store, even in a project linked to a studio.',
54
69
  },
55
70
  },
56
- output: '{ ok, store, studio?, people } or { ok, store, studio?, person, link, next?, notice? } or { ok, store, studio?, person } or { ok, store, studio?, access }; store is studio in a linked project, with studio: { studio, client, host, project }, and notice when a Studio person is added there; store is studio with studio: { studio, host } for the studio’s own people (the studio folder or --studio); local otherwise. A Studio person’s link is on studio.<apex> once it answers.',
71
+ output: '{ ok, store, studio?, people } or { ok, store, studio?, person, link, mailed?, next?, notice? } or { ok, store, studio?, person } or { ok, store, studio?, access }; store is studio in a linked project, with studio: { studio, client, host, project }, and notice when a Studio person is added there; store is studio with studio: { studio, host } for the studio’s own people (the studio folder or --studio); local otherwise. A Studio person’s link is on studio.<apex> once it answers. mailed, on add: sent (Resend took the invite; have them check spam if it does not show), refused or down (it did not go: send the link yourself), or off (none was sent).',
57
72
  };
58
73
  /** A link on the host it signs in on; a local one is a path the dev server never asks for. */
59
74
  const linkFor = (token, host) => {
@@ -74,6 +89,18 @@ function needId(action, id) {
74
89
  async function withLink(r, c) {
75
90
  return { person: strip(r.person), ...linkFor(r.token, await c.hostFor(r.person)) };
76
91
  }
92
+ /**
93
+ * The invite to a new person with an address (email.md, E10), unless
94
+ * --no-mail or the studio has no mailer: their link, on the host they sign in
95
+ * on (homeFor), a Client's client's own, a Studio person's studio.<apex>.
96
+ */
97
+ async function invite(c, r) {
98
+ const { person, token } = r;
99
+ if (c.flags['no-mail'] || !c.mailer || !person.email)
100
+ return 'off';
101
+ const home = await c.homeFor(person);
102
+ return home ? sendInvite(c.mailer, c.review, { ...person, email: person.email }, token, home) : 'off';
103
+ }
77
104
  /** One person's access with an id, else the default for a new Client: read it, or set it with --access. */
78
105
  async function access({ review, at, actor, flags, id }) {
79
106
  if (id) {
@@ -93,23 +120,37 @@ async function access({ review, at, actor, flags, id }) {
93
120
  : await review.defaultAccess(at, actor),
94
121
  };
95
122
  }
123
+ /** Sets or changes one person's address with --email, or clears it with --clear; never both, never neither. */
124
+ async function email({ review, at, actor, flags, id }) {
125
+ const person = needId('email', id);
126
+ if ((flags.email === undefined) === !flags.clear)
127
+ throw new CliError('Give an address or clear it, one of the two.', {
128
+ fix: 'pnpm people email <id> --email name@example.com, or pnpm people email <id> --clear.',
129
+ });
130
+ return { person: strip(await review.setEmail(at, actor, person, flags.clear ? null : flags.email)) };
131
+ }
96
132
  /** What adding a Studio person from a linked project means, in plain words, with --kind studio or --studio alike. */
97
133
  const studioWide = ({ studio, client }, link) => `A Studio person sees every client of studio ${studio}, not only ${client}: every project, comment and person. This link signs them in on ${new URL(link).host}. For someone who should see ${client} alone, add them in this project with --kind client and no --studio.`;
98
134
  /** The actions that print a link: a run that cannot print one is refused before any of them writes. */
99
135
  const LINKING = new Set(['add', 'link', 'sign-out']);
100
136
  const ACTIONS = {
101
137
  list: async ({ review, at, actor }) => ({ people: (await review.listPeople(at, actor)).map(strip) }),
102
- add: async (c) => withLink(await c.review.addPerson(c.at, c.actor, {
103
- name: c.flags.name,
104
- team: c.flags.team,
105
- kind: c.flags.kind ?? (c.at === STUDIO_SITE ? 'studio' : 'client'),
106
- access: c.flags.access,
107
- }), c),
138
+ add: async (c) => {
139
+ const added = await c.review.addPerson(c.at, c.actor, {
140
+ name: c.flags.name,
141
+ team: c.flags.team,
142
+ kind: c.flags.kind ?? (c.at === STUDIO_SITE ? 'studio' : 'client'),
143
+ access: c.flags.access,
144
+ email: c.flags.email,
145
+ });
146
+ return { ...(await withLink(added, c)), mailed: await invite(c, added) };
147
+ },
108
148
  link: async (c) => withLink(await c.review.newLink(c.at, c.actor, needId('link', c.id)), c),
109
149
  'sign-out': async (c) => withLink(await c.review.signOutEverywhere(c.at, c.actor, needId('sign-out', c.id)), c),
110
150
  revoke: async ({ review, at, actor, id }) => ({
111
151
  person: strip(await review.revoke(at, actor, needId('revoke', id))),
112
152
  }),
153
+ email,
113
154
  access,
114
155
  };
115
156
  /**
@@ -148,6 +189,8 @@ async function studioPeople(flags, deps) {
148
189
  studio: { studio: slug, host: studioHost(apex) },
149
190
  // Checked before the action runs (canLink), so a person, a link or a sign out is never made for no link.
150
191
  hostFor: async () => studioHost(apex),
192
+ mailer: deps.mailer(studio),
193
+ homeFor: async () => studioHost(apex),
151
194
  async canLink() {
152
195
  if (await answeringStudioHost(review, actor, apex))
153
196
  return;
@@ -167,8 +210,11 @@ async function projectPeople(flags, deps) {
167
210
  const found = await cliReview(flags.local, deps);
168
211
  const { review, store, scope, actor } = found;
169
212
  const where = found.studio;
213
+ const none = async () => undefined;
170
214
  if (!where)
171
- return { review, store, at: scope, actor, hostFor: async () => undefined };
215
+ return { review, store, at: scope, actor, hostFor: none, mailer: null, homeFor: none };
216
+ const studio = findStudio(deps.home, where.studio, deps.cwd);
217
+ const studioHome = async () => answeringStudioHost(review, actor, studio.config.apex);
172
218
  return {
173
219
  review,
174
220
  store,
@@ -176,17 +222,21 @@ async function projectPeople(flags, deps) {
176
222
  actor,
177
223
  studio: where,
178
224
  async hostFor(person) {
179
- if (person.client !== null)
180
- return where.host;
181
- const { apex } = findStudio(deps.home, where.studio, deps.cwd).config;
182
- return (await answeringStudioHost(review, actor, apex)) ?? where.host;
225
+ return person.client !== null ? where.host : ((await studioHome()) ?? where.host);
226
+ },
227
+ mailer: deps.mailer(studio),
228
+ // A Studio person signs in by email on the studio's own host alone: until it answers, they are not mailed.
229
+ async homeFor(person) {
230
+ return person.client !== null ? where.host : ((await studioHome()) ?? undefined);
183
231
  },
184
232
  };
185
233
  }
186
234
  export async function run({ positionals: [action = 'list', id], flags }, deps) {
187
235
  const act = Object.hasOwn(ACTIONS, action) ? ACTIONS[action] : undefined;
188
236
  if (!act)
189
- throw new CliError(`Unknown action ${action}.`, { fix: 'list, add, link, sign-out, revoke or access' });
237
+ throw new CliError(`Unknown action ${action}.`, {
238
+ fix: 'list, add, link, sign-out, revoke, email or access',
239
+ });
190
240
  // The studio's own people: named by --studio, or the studio folder this runs in.
191
241
  const own = flags.studio !== undefined || (!flags.local && !readLink(deps.root) && isStudioFolder(deps.root));
192
242
  const found = own ? await studioPeople(flags, deps) : await projectPeople(flags, deps);
@@ -46,7 +46,7 @@ export const spec = {
46
46
  const MAX_CODE_CHARS = 12_000;
47
47
  const outcome = (step, run, fix) => run.ok ? { step, ok: true } : { step, ok: false, detail: run.output ?? run.error, fix };
48
48
  /** Prototypes a reviewer is sent to: live sprints and their alternates. */
49
- const reviewed = (all) => all.filter((p) => isLive(p) && p.kind !== 'exploration');
49
+ const reviewed = (all) => all.filter((p) => isLive(p) && (p.kind === 'sprint' || p.kind === 'alternate'));
50
50
  function guides(all) {
51
51
  const features = [
52
52
  ...new Set(reviewed(all)
@@ -9,7 +9,7 @@
9
9
  import { existsSync, mkdtempSync, rmSync } from 'node:fs';
10
10
  import { tmpdir } from 'node:os';
11
11
  import { join } from 'node:path';
12
- import { isLive } from '../core/catalog.js';
12
+ import { isOpen } from '../core/catalog.js';
13
13
  import { DOCS, ROOT } from '../server/paths.js';
14
14
  import { buildHub } from '../vite/plugin.js';
15
15
  import { KEEP_BUILDS, pruneBuilds, publishBuild } from './lib/builds.js';
@@ -30,10 +30,10 @@ export const spec = {
30
30
  },
31
31
  output: '{ ok, studio, client, project, build, files, address, open: [{ title, url, guide? }], removed, next } or { ok: false, stage, ... }',
32
32
  };
33
- /** Each live sprint and its walkthrough, by its path below the project. */
33
+ /** Each open sprint (not archived, not a presented take) and its walkthrough, by its path below the project. */
34
34
  function opens() {
35
35
  return prototypes()
36
- .filter((p) => isLive(p) && p.kind === 'sprint')
36
+ .filter((p) => isOpen(p) && p.kind === 'sprint')
37
37
  .map((p) => ({
38
38
  title: p.title,
39
39
  path: `${p.slug}/`,
@@ -7,7 +7,7 @@ export declare const spec: {
7
7
  readonly positionals: [{
8
8
  readonly name: 'action';
9
9
  readonly required: true;
10
- readonly description: 'create: scaffold --dir, install and build it here, set it up on --team, deploy, set up studio.<apex> (its DNS record and domain) and list it. deploy: install and build the studio folder here, so the site installs the package its package.json names, deploy it again, remove every older deployment, and set up studio.<apex> if it is not yet. link: list an existing studio folder (--dir) on this machine and link it to the studio’s project.';
10
+ readonly description: 'create: scaffold --dir, install and build it here, set it up on --team, deploy, set up studio.<apex> (its DNS record and domain) and list it. deploy: install and build the studio folder here, so the site installs the package its package.json names, deploy it again, remove every older deployment, and set up studio.<apex> if it is not yet. link: list an existing studio folder (--dir) on this machine and link it to the studio’s project. email: turn email sign-in on, in this order, each step safe to run again: the full Resend key into .env; the sender’s domain at Resend (one already verified, or a verified parent, is used as it is, with no DNS change); else the domain made and its records added (Cloudflare by its API; Vercel DNS and manual print them and stop) and verified; a new send-only key for that domain; a test mail to --test; only then RESEND_API_KEY and MAIL_FROM on the site, a deploy, and the earlier send-only key removed. With --off: take the two off the site and deploy; links work as before.';
11
11
  }];
12
12
  readonly flags: {
13
13
  readonly dir: {
@@ -72,10 +72,26 @@ export declare const spec: {
72
72
  };
73
73
  readonly studio: {
74
74
  readonly type: 'string';
75
- readonly description: 'For deploy: the studio’s slug. Absent, the studio folder this runs in.';
75
+ readonly description: 'For deploy and email: the studio’s slug. Absent, the studio folder this runs in.';
76
+ };
77
+ readonly from: {
78
+ readonly type: 'string';
79
+ readonly description: 'For email: who sign-in mail is from, "<Name> <address>", the address at the apex or below it, such as "North Studio <signin@mail.example.com>". The name is the studio’s in every mail.';
80
+ };
81
+ readonly 'resend-key-file': {
82
+ readonly type: 'string';
83
+ readonly description: 'For email: a file holding a full-access Resend API key, copied into the studio’s .env as RESEND_FULL_KEY; never pass a key itself. Absent, the one already in .env.';
84
+ };
85
+ readonly test: {
86
+ readonly type: 'string';
87
+ readonly description: 'For email: the address the test mail goes to.';
88
+ };
89
+ readonly off: {
90
+ readonly type: 'boolean';
91
+ readonly description: 'For email: turn email sign-in off. Takes RESEND_API_KEY and MAIL_FROM off the site and deploys it.';
76
92
  };
77
93
  };
78
- readonly output: 'create: { ok, studio, dir, folder, list, package, vercel, env: { GATE_SECRET: set | kept, database: created | connected | kept, files: created | kept, pulled }, mark: claimed | kept (the database marked as this studio’s), filesMark: claimed | kept (the file store, the same), dns, owner, deployment, removed, studioHost: { host, state: ready | waiting, error?, fix?, record? }, link? (the owner’s, on the studio’s host, the run it first answers), next }. deploy: { ok, studio, package, deployment, removed, studioHost, link? }. The deploy is done whatever studioHost says; while it is waiting, its fix says what to do (a record to add, a certificate still coming) and the next deploy finishes it. package is what the folder’s package.json names for @milesroxas/design-hub. link: { ok, studio, dir, list, env, warnings }';
94
+ readonly output: 'create: { ok, studio, dir, folder, list, package, vercel, env: { GATE_SECRET: set | kept, database: created | connected | kept, files: created | kept, pulled }, mark: claimed | kept (the database marked as this studio’s), filesMark: claimed | kept (the file store, the same), dns, owner, deployment, removed, studioHost: { host, state: ready | waiting, error?, fix?, record? }, link? (the owner’s, on the studio’s host, the run it first answers), next }. deploy: { ok, studio, package, deployment, removed, studioHost, link? }. The deploy is done whatever studioHost says; while it is waiting, its fix says what to do (a record to add, a certificate still coming) and the next deploy finishes it. package is what the folder’s package.json names for @milesroxas/design-hub. link: { ok, studio, dir, list, env, warnings }. email: { ok, studio, from, domain, dns: none (already verified) | added | exists | printed, key (the send-only key’s name at Resend), test: sent, secrets, package, deployment, removed, keysRemoved, next }; while a step waits on a person it stops with ok: false, what to do (records to add, a domain not verified yet) and “run this again”. email --off: { ok, studio, secrets, package, deployment, removed, next }';
79
95
  };
80
96
  export declare function run({ positionals: [action], flags }: Args<typeof spec>, deps: StudioDeps): Promise<Record<string, unknown>>;
81
97
  export declare const main: (args: Args<typeof spec>) => Promise<Record<string, unknown>>;