@somewhere-cloud/cli 0.38.132 → 0.38.134
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/CHANGELOG.md +19 -7
- package/dist/lib/bundle.js +109 -33
- package/dist/lib/bundle.js.map +3 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/runtime/DECLARED-DATA-VENDOR.json +9 -9
- package/runtime/PLATFORM-SOURCE.json +1 -1
- package/runtime/declared-data.cjs +82 -183
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.38.134
|
|
4
|
+
|
|
5
|
+
- somewhere typecheck checks db/schema.ts with the platform's current rules.
|
|
6
|
+
- The agent skills somewhere init writes match the platform's current pack.
|
|
7
|
+
|
|
8
|
+
## 0.38.133
|
|
9
|
+
|
|
10
|
+
- `somewhere deploy` no longer checks types again when no file changed since the folder's last deploy; it says so and the platform reports that nothing changed. A no-change deploy no longer waits on a TypeScript download.
|
|
11
|
+
- New starters list `typescript` 5.9.3 as a devDependency, so `somewhere init` installs it and deploys check types without fetching TypeScript with npx. In an older app, `npm install -D typescript@5.9.3` does the same; the npx notice now says so.
|
|
12
|
+
- The starter's `tests/app-check.mjs` finds the notes form and list by `data-testid` (`note-title`, `note-save`, `note-item`), which the starter's notes view now carries, so renaming a button or label no longer breaks the check.
|
|
13
|
+
- After a live deploy whose answer includes `checks`, the CLI reads the deploy log every 3 s for up to 45 s and prints the access check's sentence as `Checks: ...` (with `--json`, the result includes `access_check`). It never changes the exit code.
|
|
14
|
+
|
|
1
15
|
## 0.38.132
|
|
2
16
|
|
|
3
17
|
- `somewhere open --dashboard` opens the dashboard at https://somewhere.cloud/app, and the sign-up link the CLI prints is https://somewhere.cloud/app/sign-in?intent=signup.
|
|
@@ -119,28 +133,26 @@
|
|
|
119
133
|
- Emit a project_created JSON receipt before init installs dependencies.
|
|
120
134
|
- Document the existing one-step email-code sign-in policy.
|
|
121
135
|
|
|
122
|
-
|
|
136
|
+
## 0.38.107
|
|
123
137
|
|
|
124
138
|
- Bundle the TypeScript runtime dependency so a fresh production-only CLI install starts correctly, including deploy -m for version notes.
|
|
125
139
|
|
|
126
|
-
|
|
140
|
+
## 0.38.106
|
|
127
141
|
|
|
128
142
|
- Add deploy -m for user-supplied version notes; promotion quotes its submitted note as data. History shows notes stored on each release.
|
|
129
143
|
|
|
130
|
-
|
|
144
|
+
## 0.38.105
|
|
131
145
|
|
|
132
146
|
- Deploy and promote print the previous activation hint, naming somewhere rollback; JSON preserves its version and build availability.
|
|
133
147
|
|
|
134
|
-
|
|
148
|
+
## 0.38.104
|
|
135
149
|
|
|
136
150
|
- Remove the app login, tools, call and logout commands. Existing app tokens are left untouched at <SOMEWHERE_CONFIG_DIR or ~/.somewhere>/app-mcp/tokens.json; use the app MCP server as a custom connector in your AI client.
|
|
137
151
|
|
|
138
|
-
|
|
152
|
+
## 0.38.103
|
|
139
153
|
|
|
140
154
|
- Describe app MCP terminal commands as developer testing tools; register a neutral Terminal client name.
|
|
141
155
|
|
|
142
|
-
# Changelog
|
|
143
|
-
|
|
144
156
|
## 0.38.102
|
|
145
157
|
|
|
146
158
|
- `somewhere privacy` reads the active release privacy facts; deploy prints the same stored source facts when the platform supplies them.
|
package/dist/lib/bundle.js
CHANGED
|
@@ -38595,6 +38595,7 @@ var init_init_green_template = __esm({
|
|
|
38595
38595
|
"dist/lib/init-green-template.js"() {
|
|
38596
38596
|
"use strict";
|
|
38597
38597
|
init_version();
|
|
38598
|
+
init_typecheck_version();
|
|
38598
38599
|
init_scaffold();
|
|
38599
38600
|
init_init_scaffold();
|
|
38600
38601
|
init_init_agent_guide();
|
|
@@ -38616,7 +38617,8 @@ var init_init_green_template = __esm({
|
|
|
38616
38617
|
},
|
|
38617
38618
|
"devDependencies": {
|
|
38618
38619
|
"@types/react": "19.2.2",
|
|
38619
|
-
"@types/react-dom": "19.2.2"
|
|
38620
|
+
"@types/react-dom": "19.2.2",
|
|
38621
|
+
"typescript": "${TYPECHECK_TYPESCRIPT_VERSION}"
|
|
38620
38622
|
},
|
|
38621
38623
|
"allowScripts": {
|
|
38622
38624
|
"esbuild": true
|
|
@@ -38779,8 +38781,8 @@ var init_skills_pack_generated = __esm({
|
|
|
38779
38781
|
BUNDLED_SKILLS_PACK = {
|
|
38780
38782
|
"schema": 1,
|
|
38781
38783
|
"name": "somewhere-skills",
|
|
38782
|
-
"version": "1+
|
|
38783
|
-
"sha256": "
|
|
38784
|
+
"version": "1+1f34c974ae28",
|
|
38785
|
+
"sha256": "1f34c974ae2841bffb28d8eccb98fcee84bf5f98e15de6aaf453a9a050c95e4b",
|
|
38784
38786
|
"files": [
|
|
38785
38787
|
{
|
|
38786
38788
|
"path": "adopt/SKILL.md",
|
|
@@ -38814,8 +38816,8 @@ var init_skills_pack_generated = __esm({
|
|
|
38814
38816
|
},
|
|
38815
38817
|
{
|
|
38816
38818
|
"path": "email-and-test-inbox/SKILL.md",
|
|
38817
|
-
"sha256": "
|
|
38818
|
-
"content": "---\nname: email-and-test-inbox\ndescription: When the app sends email, or you need to test sign-up, magic-link, or reset mail without a real mailbox.\n---\n\n# Send email and read the test inbox\n\n## Notification after a save\n\nSave first, await durable job admission, then respond. Queued is not sent; the signed handler records the email outcome.\n\n## Send\n\n```ts\n// api/_lib/order-email.ts \u2014 call it from a handler that already checked who\n// receives this; the address comes from your saved order, never the request.\nexport function sendOrderShipped(\n sw: SomewhereRuntimeContext,\n order: { id: string; email: string; trackingNumber: string },\n): Promise<SomewhereEmailSendResult> {\n return sw.email.send({\n to: order.email,\n subject: 'Your order shipped',\n text: `Tracking: ${order.trackingNumber}`, // or html, or both\n idempotency_key: `order-shipped:${order.id}`,\n });\n}\n```\n\nIt can only email the project's owner and app users who have verified their email address with this project and signed in at least once; a pending sign-in or an unverified sign-up does not count. The platform adds a one-line unsubscribe footer and one-click unsubscribe headers; after a user unsubscribes, sends to them return `RECIPIENT_UNSUBSCRIBED`. Replies to the app's address are recorded in your project mailbox; read them with `sw.mail.project.list()`.\n\n## Test inbox\n\nAddresses `<anything>@<project-subdomain>.test.somewhere.site` never reach a real mailbox. Read it with `somewhere email test-inbox <address>` (or `sw.email.inbox(address)`) \u2192 `{ address, messages: [{ id, to, subject, text, html, magic_link, verification_code, created_at }] }
|
|
38819
|
+
"sha256": "4d4b119c597c53b1492a30d6558713de4a91feea28aa576f30c5f090e9164816",
|
|
38820
|
+
"content": "---\nname: email-and-test-inbox\ndescription: When the app sends email, or you need to test sign-up, magic-link, or reset mail without a real mailbox.\n---\n\n# Send email and read the test inbox\n\n## Notification after a save\n\nSave first, await durable job admission, then respond. Queued is not sent; the signed handler records the email outcome.\n\n## Send\n\n```ts\n// api/_lib/order-email.ts \u2014 call it from a handler that already checked who\n// receives this; the address comes from your saved order, never the request.\nexport function sendOrderShipped(\n sw: SomewhereRuntimeContext,\n order: { id: string; email: string; trackingNumber: string },\n): Promise<SomewhereEmailSendResult> {\n return sw.email.send({\n to: order.email,\n subject: 'Your order shipped',\n text: `Tracking: ${order.trackingNumber}`, // or html, or both\n idempotency_key: `order-shipped:${order.id}`,\n });\n}\n```\n\nIt can only email the project's owner and app users who have verified their email address with this project and signed in at least once; a pending sign-in or an unverified sign-up does not count. The platform adds a one-line unsubscribe footer and one-click unsubscribe headers; after a user unsubscribes, sends to them return `RECIPIENT_UNSUBSCRIBED`. Replies to the app's address are recorded in your project mailbox; read them with `sw.mail.project.list()`.\n\n## Test inbox\n\nAddresses `<anything>@<project-subdomain>.test.somewhere.site` never reach a real mailbox. Read it with `somewhere email test-inbox <address>` (or `sw.email.inbox(address)`) \u2192 `{ address, messages: [{ id, to, subject, text, html, magic_link, verification_code, attachments, created_at }] }`, `verification_code` is the code an auth message carries (the 6-digit email verification or sign-in code), or `null`.\n\n## Failure 1: MANAGED_SENDER_RECIPIENT_NOT_A_USER\n\nOther recipients return `MANAGED_SENDER_RECIPIENT_NOT_A_USER`; verify your own sender domain for outreach.\n\n## Failure 2: gating on status 'sent'\n\nDo not gate follow-up work on `status === 'sent'` alone: a captured test send and a replay of a delivered message are both successful sends.\n\nSources (`somewhere docs <topic>`): sw.email.\n"
|
|
38819
38821
|
},
|
|
38820
38822
|
{
|
|
38821
38823
|
"path": "design/SKILL.md",
|
|
@@ -41090,10 +41092,10 @@ try {
|
|
|
41090
41092
|
}, { requires: needsSignup });
|
|
41091
41093
|
${privateData ? ` await app.check('a note stays private to its owner', async (at) => {
|
|
41092
41094
|
const secret = 'private ' + crypto.randomUUID();
|
|
41093
|
-
at('Create the first person\u2019s note');
|
|
41094
|
-
await ana.page.
|
|
41095
|
-
await ana.page.
|
|
41096
|
-
await ana.page.
|
|
41095
|
+
at('Create the first person\u2019s note'); // found by data-testid, not words: keep note-title, note-save and note-item when renaming
|
|
41096
|
+
await ana.page.getByTestId('note-title').fill(secret);
|
|
41097
|
+
await ana.page.getByTestId('note-save').click();
|
|
41098
|
+
await ana.page.getByTestId('note-item').filter({ hasText: secret }).waitFor();
|
|
41097
41099
|
const seen = captureResponses(ben.page);
|
|
41098
41100
|
try {
|
|
41099
41101
|
await ben.page.reload();
|
|
@@ -42983,6 +42985,7 @@ var init_init_feature_template = __esm({
|
|
|
42983
42985
|
init_init_test_template();
|
|
42984
42986
|
init_scaffold();
|
|
42985
42987
|
init_version();
|
|
42988
|
+
init_typecheck_version();
|
|
42986
42989
|
init_init_asset_types();
|
|
42987
42990
|
init_init_scaffold();
|
|
42988
42991
|
init_init_agent_guide();
|
|
@@ -43004,7 +43007,8 @@ var init_init_feature_template = __esm({
|
|
|
43004
43007
|
},
|
|
43005
43008
|
"devDependencies": {
|
|
43006
43009
|
"@types/react": "19.2.2",
|
|
43007
|
-
"@types/react-dom": "19.2.2"
|
|
43010
|
+
"@types/react-dom": "19.2.2",
|
|
43011
|
+
"typescript": "${TYPECHECK_TYPESCRIPT_VERSION}"
|
|
43008
43012
|
},
|
|
43009
43013
|
"allowScripts": {
|
|
43010
43014
|
"esbuild": true
|
|
@@ -44949,7 +44953,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
|
|
|
44949
44953
|
<h1 id="note-form-title" className="panel__title">{editing ? 'Edit note' : 'New note'}</h1>
|
|
44950
44954
|
<div className="field">
|
|
44951
44955
|
<label htmlFor="note-title">Title</label>
|
|
44952
|
-
<input id="note-title" name="title" required value={draft.title}
|
|
44956
|
+
<input id="note-title" name="title" required value={draft.title} data-testid="note-title"
|
|
44953
44957
|
aria-invalid={draftErrors.title ? true : undefined}
|
|
44954
44958
|
aria-describedby={draftErrors.title ? 'note-title-error' : undefined}
|
|
44955
44959
|
onChange={(event) => notes.setDraft({ ...draft, title: event.target.value })} />
|
|
@@ -44964,7 +44968,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
|
|
|
44964
44968
|
{draftErrors.body ? <p id="note-body-error" className="error">{draftErrors.body}</p> : null}
|
|
44965
44969
|
</div>
|
|
44966
44970
|
<div className="actions">
|
|
44967
|
-
<button type="submit" className="button" disabled={!notes.canSave} aria-busy={notes.saving}>
|
|
44971
|
+
<button type="submit" className="button" disabled={!notes.canSave} aria-busy={notes.saving} data-testid="note-save">
|
|
44968
44972
|
{notes.saving ? 'Saving\u2026' : notes.retryingCreate ? 'Retry original save' : editing ? 'Save changes' : 'Add note'}
|
|
44969
44973
|
</button>
|
|
44970
44974
|
{editing ? <button type="button" className="button button--quiet" onClick={notes.cancelEdit} disabled={notes.saving}>Cancel</button> : null}
|
|
@@ -44986,7 +44990,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
|
|
|
44986
44990
|
{notes.status === 'ready' && notes.notes.length > 0 ? (
|
|
44987
44991
|
<ul className="note-list">
|
|
44988
44992
|
{notes.notes.map((note) => (
|
|
44989
|
-
<li key={note.id} className="note" aria-current={note.id === notes.editingId ? 'true' : undefined}>
|
|
44993
|
+
<li key={note.id} className="note" aria-current={note.id === notes.editingId ? 'true' : undefined} data-testid="note-item">
|
|
44990
44994
|
<div className="note__text">
|
|
44991
44995
|
<h3 className="note__title"><a {...linkTo('/things/' + note.id)}>{note.title}</a></h3>
|
|
44992
44996
|
{note.body ? <p className="note__body">{note.body}</p> : null}
|
|
@@ -45119,7 +45123,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
|
|
|
45119
45123
|
<form onSubmit={onSubmit} noValidate>
|
|
45120
45124
|
<p>
|
|
45121
45125
|
<label htmlFor="note-title">Title</label><br />
|
|
45122
|
-
<input id="note-title" name="title" required value={draft.title} aria-invalid={draftErrors.title ? true : undefined}
|
|
45126
|
+
<input id="note-title" name="title" required value={draft.title} data-testid="note-title" aria-invalid={draftErrors.title ? true : undefined}
|
|
45123
45127
|
onChange={(event) => notes.setDraft({ ...draft, title: event.target.value })} />
|
|
45124
45128
|
{draftErrors.title ? <span role="alert"> {draftErrors.title}</span> : null}
|
|
45125
45129
|
</p>
|
|
@@ -45129,7 +45133,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
|
|
|
45129
45133
|
onChange={(event) => notes.setDraft({ ...draft, body: event.target.value })} />
|
|
45130
45134
|
{draftErrors.body ? <span role="alert"> {draftErrors.body}</span> : null}
|
|
45131
45135
|
</p>
|
|
45132
|
-
<button type="submit" disabled={!notes.canSave} aria-busy={notes.saving}>
|
|
45136
|
+
<button type="submit" disabled={!notes.canSave} aria-busy={notes.saving} data-testid="note-save">
|
|
45133
45137
|
{notes.saving ? 'Saving\u2026' : notes.retryingCreate ? 'Retry original save' : editing ? 'Save changes' : 'Add note'}
|
|
45134
45138
|
</button>{' '}
|
|
45135
45139
|
{editing ? <button type="button" onClick={notes.cancelEdit}>Cancel</button> : null}
|
|
@@ -45141,7 +45145,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
|
|
|
45141
45145
|
{notes.status === 'ready' && notes.notes.length === 0 ? <EmptyState title="No notes yet." /> : null}
|
|
45142
45146
|
<ul>
|
|
45143
45147
|
{notes.notes.map((note) => (
|
|
45144
|
-
<li key={note.id}>
|
|
45148
|
+
<li key={note.id} data-testid="note-item">
|
|
45145
45149
|
<strong><a {...linkTo('/things/' + note.id)}>{note.title}</a></strong> {note.body}{' '}
|
|
45146
45150
|
<button type="button" onClick={() => notes.startEdit(note)} aria-label={'Edit ' + note.title}>Edit</button>{' '}
|
|
45147
45151
|
<button type="button" onClick={() => void notes.remove(note)} disabled={notes.removingId === note.id} aria-label={'Delete ' + note.title}>Delete</button>
|
|
@@ -73149,7 +73153,7 @@ function runTypecheck(projectDir, options2 = {}) {
|
|
|
73149
73153
|
return runTypecheckWith(projectDir, command, args, via, declaredData).then(withContract);
|
|
73150
73154
|
}
|
|
73151
73155
|
function announceNpxTypeScriptFetch(version2) {
|
|
73152
|
-
process.stderr.write(`TypeScript is not installed in this project; fetching typescript@${version2} with npx (needs the npm registry; npm keeps it in its cache). Nothing is installed into the project.
|
|
73156
|
+
process.stderr.write(`TypeScript is not installed in this project; fetching typescript@${version2} with npx (needs the npm registry; npm keeps it in its cache). Nothing is installed into the project. To skip this fetch on every check: npm install -D typescript@${version2}
|
|
73153
73157
|
`);
|
|
73154
73158
|
}
|
|
73155
73159
|
function typecheckCompilerSource(projectDir) {
|
|
@@ -76249,6 +76253,56 @@ var init_typecheck2 = __esm({
|
|
|
76249
76253
|
}
|
|
76250
76254
|
});
|
|
76251
76255
|
|
|
76256
|
+
// dist/lib/deploy-checks.js
|
|
76257
|
+
function parseChecksRead(read) {
|
|
76258
|
+
const match = /^GET\s+(\/\S+)$/.exec(read.trim());
|
|
76259
|
+
if (!match)
|
|
76260
|
+
return null;
|
|
76261
|
+
const url3 = new URL(match[1], "https://api.invalid");
|
|
76262
|
+
return { path: url3.pathname.replace(/^\/v1(?=\/)/, ""), query: Object.fromEntries(url3.searchParams) };
|
|
76263
|
+
}
|
|
76264
|
+
async function awaitDeployChecks(client, checks, opts = {}) {
|
|
76265
|
+
const target = typeof checks.read === "string" ? parseChecksRead(checks.read) : null;
|
|
76266
|
+
if (!target)
|
|
76267
|
+
return null;
|
|
76268
|
+
const now2 = opts.now ?? Date.now;
|
|
76269
|
+
const sleep3 = opts.sleep ?? ((ms2) => new Promise((r) => setTimeout(r, ms2)));
|
|
76270
|
+
const pollMs = opts.pollMs ?? DEPLOY_CHECKS_POLL_MS;
|
|
76271
|
+
const deadline = now2() + (opts.waitMs ?? DEPLOY_CHECKS_WAIT_MS);
|
|
76272
|
+
let last = null;
|
|
76273
|
+
for (; ; ) {
|
|
76274
|
+
try {
|
|
76275
|
+
const read = await client.call("GET", target.path, void 0, target.query, { timeoutMs: Math.max(1e3, deadline - now2()) });
|
|
76276
|
+
if (read?.access_check)
|
|
76277
|
+
last = read.access_check;
|
|
76278
|
+
if (last && last.status !== "pending")
|
|
76279
|
+
return last;
|
|
76280
|
+
} catch {
|
|
76281
|
+
}
|
|
76282
|
+
if (now2() + pollMs > deadline)
|
|
76283
|
+
return last;
|
|
76284
|
+
await sleep3(pollMs);
|
|
76285
|
+
}
|
|
76286
|
+
}
|
|
76287
|
+
function formatDeployChecksLine(check2) {
|
|
76288
|
+
if (!check2 || check2.status === "pending")
|
|
76289
|
+
return DEPLOY_CHECKS_STILL_RUNNING;
|
|
76290
|
+
return check2.sentence ? `Checks: ${check2.sentence}` : null;
|
|
76291
|
+
}
|
|
76292
|
+
var DEPLOY_CHECKS_WAIT_MS, DEPLOY_CHECKS_POLL_MS, DEPLOY_CHECKS_STILL_RUNNING;
|
|
76293
|
+
var init_deploy_checks = __esm({
|
|
76294
|
+
"dist/lib/deploy-checks.js"() {
|
|
76295
|
+
"use strict";
|
|
76296
|
+
init_cli_invocation();
|
|
76297
|
+
DEPLOY_CHECKS_WAIT_MS = 45e3;
|
|
76298
|
+
DEPLOY_CHECKS_POLL_MS = 3e3;
|
|
76299
|
+
__name(parseChecksRead, "parseChecksRead");
|
|
76300
|
+
__name(awaitDeployChecks, "awaitDeployChecks");
|
|
76301
|
+
DEPLOY_CHECKS_STILL_RUNNING = `Checks: still running; \`${cliInvocation()} call project_deploy_log '{}'\` shows the result.`;
|
|
76302
|
+
__name(formatDeployChecksLine, "formatDeployChecksLine");
|
|
76303
|
+
}
|
|
76304
|
+
});
|
|
76305
|
+
|
|
76252
76306
|
// dist/lib/base-files.js
|
|
76253
76307
|
import { createHash as createHash4 } from "node:crypto";
|
|
76254
76308
|
import { existsSync as existsSync17, mkdirSync as mkdirSync10, readFileSync as readFileSync18, rmSync as rmSync5, writeFileSync as writeFileSync13 } from "node:fs";
|
|
@@ -82141,6 +82195,16 @@ function findProjectConfigEntry(targetDir) {
|
|
|
82141
82195
|
return null;
|
|
82142
82196
|
return loadProjectConfigEntry();
|
|
82143
82197
|
}
|
|
82198
|
+
function unchangedSinceLastPublish(entry, targetDir, hashes) {
|
|
82199
|
+
if (!entry || resolve15(entry.dir) !== resolve15(targetDir))
|
|
82200
|
+
return false;
|
|
82201
|
+
const projectId = entry.config.project_id;
|
|
82202
|
+
const base = loadBaseFiles(targetDir, projectId, readSourceBase(entry.config, projectId)?.releaseId);
|
|
82203
|
+
if (!base)
|
|
82204
|
+
return false;
|
|
82205
|
+
const paths = Object.keys(hashes);
|
|
82206
|
+
return paths.length === Object.keys(base.files).length && paths.every((path3) => base.files[path3] === hashes[path3]);
|
|
82207
|
+
}
|
|
82144
82208
|
function temporarySessionExpired(session, nowMs = Date.now()) {
|
|
82145
82209
|
if (!session?.temp_expires_at)
|
|
82146
82210
|
return false;
|
|
@@ -82205,22 +82269,6 @@ Existing project: \`${cliInvocation()} init --link --project <ref>\` (see \`${cl
|
|
|
82205
82269
|
const runTestsAfter = Boolean(opts.test && !opts.dryRun);
|
|
82206
82270
|
if (runTestsAfter)
|
|
82207
82271
|
process.stderr.write("deploy --test: the documented form is `somewhere deploy && somewhere test`; --test still runs somewhere test once after a successful deploy.\n");
|
|
82208
|
-
let typecheckMs = 0;
|
|
82209
|
-
const typecheckStartedAt = performance.now();
|
|
82210
|
-
const hasTsconfig = existsSync28(join33(targetDir, "tsconfig.json"));
|
|
82211
|
-
const missingDependencies = hasTsconfig && missingProjectDependencies(targetDir).length > 0;
|
|
82212
|
-
const checkingTypes = hasTsconfig && !missingDependencies;
|
|
82213
|
-
if (checkingTypes && typecheckCompilerSource(targetDir) === "npx") {
|
|
82214
|
-
announceNpxTypeScriptFetch(TYPECHECK_TYPESCRIPT_VERSION);
|
|
82215
|
-
}
|
|
82216
|
-
const typecheckHeartbeat = checkingTypes && !opts.json ? setInterval(() => {
|
|
82217
|
-
process.stderr.write(`Still checking types before upload after ${formatDeployElapsed(performance.now() - typecheckStartedAt)}...
|
|
82218
|
-
`);
|
|
82219
|
-
}, deployHeartbeatMs()).unref() : void 0;
|
|
82220
|
-
const typecheck = checkingTypes ? runTypecheck(targetDir).then((value) => ({ value }), (error3) => ({ error: error3 })).finally(() => {
|
|
82221
|
-
clearInterval(typecheckHeartbeat);
|
|
82222
|
-
typecheckMs = performance.now() - typecheckStartedAt;
|
|
82223
|
-
}) : Promise.resolve(null);
|
|
82224
82272
|
const verifyFlow = opts.verify && !opts.dryRun ? loadVerifyFlow(typeof opts.verify === "string" ? opts.verify : void 0, targetDir) : void 0;
|
|
82225
82273
|
const collectionStartedAt = performance.now();
|
|
82226
82274
|
const collected = collectFiles(targetDir, {
|
|
@@ -82256,6 +82304,25 @@ Existing project: \`${cliInvocation()} init --link --project <ref>\` (see \`${cl
|
|
|
82256
82304
|
}
|
|
82257
82305
|
const storedConfig = loadConfig();
|
|
82258
82306
|
const foundProjectEntry = opts.new ? null : findProjectConfigEntry(targetDir);
|
|
82307
|
+
let typecheckMs = 0;
|
|
82308
|
+
const typecheckStartedAt = performance.now();
|
|
82309
|
+
const sourceUnchanged = !opts.project && !opts.temporary && unchangedSinceLastPublish(foundProjectEntry, targetDir, publishedHashes);
|
|
82310
|
+
if (sourceUnchanged)
|
|
82311
|
+
process.stderr.write("No file changed since this folder's last deploy; types were not checked again.\n");
|
|
82312
|
+
const hasTsconfig = !sourceUnchanged && existsSync28(join33(targetDir, "tsconfig.json"));
|
|
82313
|
+
const missingDependencies = hasTsconfig && missingProjectDependencies(targetDir).length > 0;
|
|
82314
|
+
const checkingTypes = hasTsconfig && !missingDependencies;
|
|
82315
|
+
if (checkingTypes && typecheckCompilerSource(targetDir) === "npx") {
|
|
82316
|
+
announceNpxTypeScriptFetch(TYPECHECK_TYPESCRIPT_VERSION);
|
|
82317
|
+
}
|
|
82318
|
+
const typecheckHeartbeat = checkingTypes && !opts.json ? setInterval(() => {
|
|
82319
|
+
process.stderr.write(`Still checking types before upload after ${formatDeployElapsed(performance.now() - typecheckStartedAt)}...
|
|
82320
|
+
`);
|
|
82321
|
+
}, deployHeartbeatMs()).unref() : void 0;
|
|
82322
|
+
const typecheck = checkingTypes ? runTypecheck(targetDir).then((value) => ({ value }), (error3) => ({ error: error3 })).finally(() => {
|
|
82323
|
+
clearInterval(typecheckHeartbeat);
|
|
82324
|
+
typecheckMs = performance.now() - typecheckStartedAt;
|
|
82325
|
+
}) : Promise.resolve(null);
|
|
82259
82326
|
if (storedConfig?.temporary && storedConfig.temp_expires_at && temporarySessionExpired(storedConfig) && (opts.project || foundProjectEntry)) {
|
|
82260
82327
|
const message3 = opts.project ? formatExpiredTemporaryProjectExplanation(storedConfig.temp_expires_at) : formatLinkedProjectAccessRefusal(false, dir);
|
|
82261
82328
|
if (opts.json) {
|
|
@@ -82757,6 +82824,8 @@ Existing project: \`${cliInvocation()} init --link --project <ref>\` (see \`${cl
|
|
|
82757
82824
|
if (postLive.kind === "timeout")
|
|
82758
82825
|
output.post_live_render = { status: "pending", note: POST_LIVE_RENDER_STILL_RUNNING };
|
|
82759
82826
|
const tests2 = await runReleaseTests();
|
|
82827
|
+
if (result.checks)
|
|
82828
|
+
output.access_check = await awaitDeployChecks(client, result.checks);
|
|
82760
82829
|
printJson(verification || verificationError || tests2 ? {
|
|
82761
82830
|
...output,
|
|
82762
82831
|
deployment_outcome: "live",
|
|
@@ -82904,6 +82973,11 @@ ${dim("Build")}`);
|
|
|
82904
82973
|
info(`Open ${link} to save the app to your account, then run \`${cliInvocation()} login\` to connect this terminal.`);
|
|
82905
82974
|
}
|
|
82906
82975
|
}
|
|
82976
|
+
if (result.checks) {
|
|
82977
|
+
const checksLine = formatDeployChecksLine(await awaitDeployChecks(client, result.checks));
|
|
82978
|
+
if (checksLine)
|
|
82979
|
+
info(checksLine);
|
|
82980
|
+
}
|
|
82907
82981
|
if (hasFunctionErrors) {
|
|
82908
82982
|
process.exit(1);
|
|
82909
82983
|
}
|
|
@@ -83324,6 +83398,7 @@ var init_deploy = __esm({
|
|
|
83324
83398
|
init_typecheck();
|
|
83325
83399
|
init_typecheck_version();
|
|
83326
83400
|
init_typecheck2();
|
|
83401
|
+
init_deploy_checks();
|
|
83327
83402
|
init_base_files();
|
|
83328
83403
|
init_verify_progress();
|
|
83329
83404
|
init_esm();
|
|
@@ -83404,6 +83479,7 @@ var init_deploy = __esm({
|
|
|
83404
83479
|
__name(resolveExplicitProjectId, "resolveExplicitProjectId");
|
|
83405
83480
|
__name(readExplicitProjectLiveBase, "readExplicitProjectLiveBase");
|
|
83406
83481
|
__name(findProjectConfigEntry, "findProjectConfigEntry");
|
|
83482
|
+
__name(unchangedSinceLastPublish, "unchangedSinceLastPublish");
|
|
83407
83483
|
__name(temporarySessionExpired, "temporarySessionExpired");
|
|
83408
83484
|
__name(isTempSessionLive, "isTempSessionLive");
|
|
83409
83485
|
__name(hasReusableTempCredential, "hasReusableTempCredential");
|