Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENT-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ When you've connected, say **done**.
#### What Patchstack found
🔴 High **1** · 🟠 Medium **3** · 🔵 Low **1** · 12 packages outdated · 12 protection rules available

**Refresh your app's preview** to see the Patchstack widget.
**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.

_Patchstack is now part of your install and build. Your API key is in `.patchstackrc.local.json`: git ignores it, so never share it._
````
Expand All @@ -177,7 +177,7 @@ The parts always come in that order. Fill each from the output, and leave out a
2. **Headline.** What was checked and found, as the heading. When the output gives no counts, write "Patchstack is now watching your app." Never estimate a count the output did not print.
3. **What to do now.** The next step from the `Next:` line, as the heading, with its link or command written out in full on its own line. Only that step: the items under `To do` are yours to finish, not the person's. Then: "When you've connected, say **done**." (or "When that's done, say **done**." for any other step).
4. **What Patchstack found.** The severity counts, outdated packages and protection rules exactly as the output lists them. Leave it out when nothing was found: the headline already says so.
5. **Notes.** "**Refresh your app's preview** to see the Patchstack widget." when setup added the widget; any line the output marks `ℹ`, except the one about no server.
5. **Notes.** "**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page." when setup added the widget; any line the output marks `ℹ`, except the one about no server.
6. **What changed.** One line in italics: that Patchstack is now part of the install and build, and where the API key is (git ignores it; never share it).

### Commands for later
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ async function runWidget(args: ParsedArgs): Promise<number> {
console.log(` ${buildWidgetTag(state.siteUuid)}`);
break;
}
console.log(` ${paint('dim', 'Refresh your preview to see it. Your live site gets it with your next deploy.')}`);
console.log(` ${paint('dim', 'Reload your app\'s preview page to see it in a bottom corner of the page. Your live site gets it with your next deploy.')}`);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export function renderSummary(report: StatusReport, progress: Progress, context:
lines.push('#### What Patchstack found', parts.join(' · '), '');
}

if (options.widgetOnPage) lines.push("**Refresh your app's preview** to see the Patchstack widget.", '');
if (options.widgetOnPage) lines.push("**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.", '');
// A fact about the app, not a step: the ones that matter here are what protection does not cover.
for (const item of report.missing.filter((entry) => entry.note === true && entry.key !== 'runtime-protection')) {
lines.push(item.plain?.text ?? item.text, '');
Expand Down
2 changes: 1 addition & 1 deletion tests/bin-invocation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ describe.skipIf(!built)('the packaged bin, invoked as npm invokes it', () => {
// The summary is what sits between its heading and the closing line for the assistant.
const summary = setup.slice(setup.indexOf('──── Summary ────'), setup.lastIndexOf('\n\nYour reply to the person'));

expect(summary).toContain("**Refresh your app's preview** to see the Patchstack widget.");
expect(summary).toContain("**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.");
expect(summary).toContain('Your API key is in `.patchstackrc.local.json`: git ignores it, so never share it.');
expect(summary).toContain(`When you've connected, say **done**.`);
// Every file setup changed is still listed for the person, in the report above the summary.
Expand Down
2 changes: 1 addition & 1 deletion tests/install-prompt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('the install prompt', () => {
{ installCommand: 'npm install --save @patchstack/connect', siteUuid: 's', claimUrl: 'https://example.com/claim', environment: 'sandbox' },
{ widgetOnPage: true, dashboardUrl: null },
).join('\n');
expect(summary).toMatch(/Refresh your app's preview\*\* to see the Patchstack widget/);
expect(summary).toContain("**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.");
});

it('makes the widget part of the install rather than a question for the user', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/report.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ describe('renderSummary', () => {
'#### What Patchstack found',
'🔴 High **1** · 🟠 Medium **3** · 🔵 Low **1** · 12 packages outdated · 12 protection rules available',
'',
"**Refresh your app's preview** to see the Patchstack widget.",
"**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.",
]);
});

Expand All @@ -225,7 +225,7 @@ describe('renderSummary', () => {
'',
`When you've connected, say **done**.`,
'',
"**Refresh your app's preview** to see the Patchstack widget.",
"**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.",
'',
`_Patchstack is now part of your install and build. Your API key is in \`${SECRET_CONFIG_FILENAME}\`: git ignores it, so never share it._`,
]);
Expand Down