ezship 0.1.12 → 0.1.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.
- package/commands.d.mts +45 -1
- package/commands.mjs +1381 -336
- package/connections.mjs +2 -2
- package/editor-types.json.gz +0 -0
- package/ez.mjs +2 -2
- package/package.json +1 -1
- package/types.d.mts +62 -1
package/connections.mjs
CHANGED
|
@@ -285,8 +285,8 @@ export function extractTarget(words) {
|
|
|
285
285
|
/** @type {Record<string, keyof typeof target>} */
|
|
286
286
|
const fields = { "--instance": "instance", "--site": "site", "--account": "account" };
|
|
287
287
|
for (let i = 0; i < words.length; i++) {
|
|
288
|
-
// `audit --site`
|
|
289
|
-
if (words[0] === "audit" && words[i] === "--site") {
|
|
288
|
+
// `audit --site` and `email list --site` are result filters, not a Working Copy target.
|
|
289
|
+
if ((words[0] === "audit" || words[0] === "email") && words[i] === "--site") {
|
|
290
290
|
args.push(words[i], words[++i]);
|
|
291
291
|
continue;
|
|
292
292
|
}
|
package/editor-types.json.gz
CHANGED
|
Binary file
|
package/ez.mjs
CHANGED
|
@@ -1019,7 +1019,7 @@ async function dev(creds, args, dir) {
|
|
|
1019
1019
|
*/
|
|
1020
1020
|
function needsSite(cmd, args) {
|
|
1021
1021
|
if (cmd === "site" && args[0] === "access") return true;
|
|
1022
|
-
if (cmd === "audit" || cmd === "db" || cmd === "support") return false;
|
|
1022
|
+
if (cmd === "audit" || cmd === "db" || cmd === "support" || cmd === "email") return false;
|
|
1023
1023
|
return !["instance", "builders", "builder", "users", "user", "site", "help", "asset"].includes(
|
|
1024
1024
|
cmd,
|
|
1025
1025
|
);
|
|
@@ -1187,7 +1187,7 @@ async function main() {
|
|
|
1187
1187
|
|
|
1188
1188
|
if (!COMMAND_NAMES.includes(cmd)) {
|
|
1189
1189
|
console.log(
|
|
1190
|
-
"Usage: ez login|logout|logins|switch|adopt|whoami|sites|use|clone|init|dev|instance|site or ez help|status|pull|push|deploy|versions|check|preview|ls|cat|put|edit|delete|mv|config|builders|builder|users|user|audit|db|support",
|
|
1190
|
+
"Usage: ez login|logout|logins|switch|adopt|whoami|sites|use|clone|init|dev|instance|site or ez help|status|pull|push|deploy|versions|check|preview|ls|cat|put|edit|delete|mv|config|builders|builder|users|user|audit|db|support|email",
|
|
1191
1191
|
);
|
|
1192
1192
|
process.exitCode = 1;
|
|
1193
1193
|
return;
|
package/package.json
CHANGED
package/types.d.mts
CHANGED
|
@@ -78,7 +78,27 @@ export type Site = {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
/** The Site row plus the shared files' version, its app URL and the caller's role (`ez config`, Workspace.remoteStatus). */
|
|
81
|
-
export type WorkspaceInfo = Site & {
|
|
81
|
+
export type WorkspaceInfo = Site & {
|
|
82
|
+
version: Version;
|
|
83
|
+
appUrl: string | null;
|
|
84
|
+
role: BuilderRole;
|
|
85
|
+
/**
|
|
86
|
+
* The Global Workspace's Version the Site's latest deploy compiled in (docs/adr/0141; 0 when Global was never
|
|
87
|
+
* pushed then), null when the Site has no recorded deploy. Absent from a Host older than the field.
|
|
88
|
+
*/
|
|
89
|
+
deployedGlobal?: number | null;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* What a Site's next deploy brings in from the Global Workspace (`ez status`, docs/adr/0141): the Version its
|
|
94
|
+
* live app was built with, the newest pushed one, and the files changed between them that reach an app only at
|
|
95
|
+
* a deploy (`pinnedGlobalPath`). `paths` is null when the live one is no longer retained.
|
|
96
|
+
*/
|
|
97
|
+
export type GlobalSinceDeploy = {
|
|
98
|
+
deployed: number;
|
|
99
|
+
current: number;
|
|
100
|
+
paths: { added: string[]; changed: string[]; removed: string[] } | null;
|
|
101
|
+
};
|
|
82
102
|
|
|
83
103
|
/**
|
|
84
104
|
* What a push did (Workspace.pushAll). A Global push also lists its Live changes (docs/adr/0096), which took
|
|
@@ -766,6 +786,47 @@ export type RenderRow = {
|
|
|
766
786
|
createdAt: number;
|
|
767
787
|
finishedAt: number | null;
|
|
768
788
|
};
|
|
789
|
+
/**
|
|
790
|
+
* An Email (docs/adr/0149): `queued` until the runner hands it on, `sending` while it does; `sent` (the mail
|
|
791
|
+
* service accepted it) and `logged` (a Host whose transport is the log) are delivered; `failed` was refused or
|
|
792
|
+
* never delivered within a day; `uncertain` was handed on but its answer was lost, and is never retried;
|
|
793
|
+
* `dropped` was never sent, `reason` says why.
|
|
794
|
+
*/
|
|
795
|
+
export type EmailStatus =
|
|
796
|
+
| "queued"
|
|
797
|
+
| "sending"
|
|
798
|
+
| "sent"
|
|
799
|
+
| "logged"
|
|
800
|
+
| "failed"
|
|
801
|
+
| "uncertain"
|
|
802
|
+
| "dropped";
|
|
803
|
+
/**
|
|
804
|
+
* One Email as Builders list it. `site` is the sending Site or `global` (a job); `sender` the entry, such as
|
|
805
|
+
* `functions/notify` or `jobs/digest`; `member` the recipient's MEMBER value when they are a Member.
|
|
806
|
+
*/
|
|
807
|
+
export type EmailRow = {
|
|
808
|
+
id: string;
|
|
809
|
+
site: string;
|
|
810
|
+
preview: boolean;
|
|
811
|
+
sender: string;
|
|
812
|
+
member: string | null;
|
|
813
|
+
recipient: string;
|
|
814
|
+
subject: string;
|
|
815
|
+
status: EmailStatus;
|
|
816
|
+
reason: string | null;
|
|
817
|
+
attempts: number;
|
|
818
|
+
createdAt: number;
|
|
819
|
+
finishedAt: number | null;
|
|
820
|
+
};
|
|
821
|
+
/** One Email with what it said: the Markdown body, its button, and the message as rendered. */
|
|
822
|
+
export type EmailInfo = EmailRow & {
|
|
823
|
+
body: string;
|
|
824
|
+
button: { label: string; href: string } | null;
|
|
825
|
+
text: string;
|
|
826
|
+
html: string;
|
|
827
|
+
};
|
|
828
|
+
/** `listEmails`: newest first, at most `limit` (default 50, at most 200), since an epoch-ms time. */
|
|
829
|
+
export type EmailFilter = { site?: string; status?: EmailStatus; since?: number; limit?: number };
|
|
769
830
|
/** What the Builder answers: errors (and warnings), or the Deployed Files with their manifest (empty for a check). */
|
|
770
831
|
export type BuildResult =
|
|
771
832
|
| { ok: false; diagnostics: Diagnostic[] }
|