@wwchen/stack-notify 0.10.1 → 0.11.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.
- package/README.md +5 -1
- package/blocks/AGENTS.md +1 -1
- package/blocks/CLAUDE.md +1 -1
- package/dist/stack.d.ts +12 -4
- package/dist/stack.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,5 +17,9 @@ await mailer.send({ to, subject, text });
|
|
|
17
17
|
| `countSinkLines(path)` | how many links the sink holds now |
|
|
18
18
|
| `waitForLink(path, afterLine, timeoutMs?)` | the first link after line `afterLine`, polling until the timeout |
|
|
19
19
|
|
|
20
|
-
`@wwchen/stack-notify/stack`
|
|
20
|
+
`@wwchen/stack-notify/stack`'s default export is mail's factory, which takes no settings; listing the package in the app's `package.json` composes it. It adds to the app:
|
|
21
|
+
|
|
22
|
+
- Blocks in `AGENTS.md`, `CLAUDE.md`, `.gitignore` and `.env.example`, written by `stack sync`, and its env fragment, `notifyEnv`, in the generated `src/stack/env.ts`.
|
|
23
|
+
- A `stack doctor` check: a warning when `RESEND_API_KEY` is one variable for Production and Preview.
|
|
24
|
+
- No commands, build steps or owned files.
|
|
21
25
|
|
package/blocks/AGENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Owned by @wwchen/stack-notify: `stack sync
|
|
1
|
+
<!-- Owned by @wwchen/stack-notify: `stack sync` rewrites everything between these markers. Put your own text outside them. -->
|
|
2
2
|
|
|
3
3
|
## Mail
|
|
4
4
|
|
package/blocks/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Owned by @wwchen/stack-notify: `stack sync
|
|
1
|
+
<!-- Owned by @wwchen/stack-notify: `stack sync` rewrites everything between these markers. Put your own text outside them. -->
|
|
2
2
|
|
|
3
3
|
## Mail
|
|
4
4
|
|
package/dist/stack.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/** The files `stack sync
|
|
1
|
+
/** The files `stack sync` writes mail's blocks into: the core's `BLOCK_FILES`. */
|
|
2
2
|
declare const BLOCK_FILES: readonly ["AGENTS.md", "CLAUDE.md", ".gitignore", ".env.example"];
|
|
3
|
-
/** A file `stack sync
|
|
3
|
+
/** A file `stack sync` writes a marked block into, and the URL of the file the block's text is read from. */
|
|
4
4
|
type Block = {
|
|
5
5
|
file: (typeof BLOCK_FILES)[number];
|
|
6
6
|
source: URL;
|
|
@@ -10,6 +10,11 @@ type Finding = {
|
|
|
10
10
|
severity: "error" | "warning" | "info";
|
|
11
11
|
message: string;
|
|
12
12
|
};
|
|
13
|
+
/** The core's `Export`: an import specifier and an export name. */
|
|
14
|
+
type Export = {
|
|
15
|
+
from: string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
13
18
|
type Facts = {
|
|
14
19
|
envs: {
|
|
15
20
|
key: string;
|
|
@@ -17,11 +22,14 @@ type Facts = {
|
|
|
17
22
|
}[];
|
|
18
23
|
};
|
|
19
24
|
/**
|
|
20
|
-
* Mail's package
|
|
25
|
+
* Mail's package, which takes no settings: its check for `stack doctor`, its agent rules, `.gitignore` entries and `.env.example` variables, written by `stack sync`, and its env fragment, for the app's generated env module. Its shape is the stack's `StackPackage`, written out here because this package imports no stack package.
|
|
21
26
|
*/
|
|
22
|
-
export
|
|
27
|
+
export default function notify(): {
|
|
23
28
|
name: string;
|
|
24
29
|
doctorChecks: ((facts: Facts) => Promise<Finding[]>)[];
|
|
25
30
|
blocks: Block[];
|
|
31
|
+
runtime: {
|
|
32
|
+
env: Export;
|
|
33
|
+
};
|
|
26
34
|
};
|
|
27
35
|
export {};
|
package/dist/stack.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The files `stack sync
|
|
1
|
+
/** The files `stack sync` writes mail's blocks into: the core's `BLOCK_FILES`. */
|
|
2
2
|
const BLOCK_FILES = ["AGENTS.md", "CLAUDE.md", ".gitignore", ".env.example"];
|
|
3
3
|
/** The core's `VERCEL_TARGET`, the two the check compares. */
|
|
4
4
|
const PRODUCTION = "production";
|
|
@@ -23,12 +23,13 @@ const block = (file) => ({
|
|
|
23
23
|
source: new URL(`../blocks/${file.replace(/^\./, "")}`, import.meta.url),
|
|
24
24
|
});
|
|
25
25
|
/**
|
|
26
|
-
* Mail's package
|
|
26
|
+
* Mail's package, which takes no settings: its check for `stack doctor`, its agent rules, `.gitignore` entries and `.env.example` variables, written by `stack sync`, and its env fragment, for the app's generated env module. Its shape is the stack's `StackPackage`, written out here because this package imports no stack package.
|
|
27
27
|
*/
|
|
28
|
-
export function notify() {
|
|
28
|
+
export default function notify() {
|
|
29
29
|
return {
|
|
30
30
|
name: "@wwchen/stack-notify",
|
|
31
31
|
doctorChecks: [sharedSecret],
|
|
32
32
|
blocks: BLOCK_FILES.map(block),
|
|
33
|
+
runtime: { env: { from: "@wwchen/stack-notify", name: "notifyEnv" } },
|
|
33
34
|
};
|
|
34
35
|
}
|