@somewhere-cloud/cli 0.38.181 → 0.38.183
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 +12 -0
- package/dist/commands/init.js +1 -1
- package/dist/lib/bundle.js +190 -146
- package/dist/lib/bundle.js.map +2 -2
- package/dist/types/lib/client.d.ts +6 -1
- package/dist/types/lib/test-control.d.ts +1 -1
- package/dist/types/lib/test-session.d.ts +3 -1
- package/dist/types/lib/testing-app.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/runtime/DECLARED-DATA-VENDOR.json +8 -8
- package/runtime/PLATFORM-SOURCE.json +1 -1
- package/runtime/declared-data.cjs +10 -4
|
@@ -12,15 +12,20 @@ type StreamResponse = Pick<Response, 'status' | 'ok' | 'headers' | 'body' | 'jso
|
|
|
12
12
|
};
|
|
13
13
|
type StreamBody = string | AsyncIterable<Uint8Array>;
|
|
14
14
|
export declare class ApiClient {
|
|
15
|
+
private readonly linkedProjectId?;
|
|
15
16
|
/** Mutable: the refresh-on-401 path swaps in a fresh access key in place so
|
|
16
17
|
* the retry (and every later call on this instance) uses the new token. */
|
|
17
18
|
/** null: an unauthenticated client (no Authorization header, never a
|
|
18
19
|
* stored-login refresh), for the public anonymous-deploy routes. */
|
|
19
20
|
private token;
|
|
20
21
|
private readonly temporaryConfig;
|
|
21
|
-
constructor(token: string | null);
|
|
22
|
+
constructor(token: string | null, linkedProjectId?: string | undefined);
|
|
22
23
|
private checkTemporaryExpiry;
|
|
23
24
|
private authHeader;
|
|
25
|
+
/** A refusal for a target selected from .somewhere.json may identify only
|
|
26
|
+
* the caller. Its status and code cannot distinguish a missing project
|
|
27
|
+
* from one the caller cannot access. Explicit project refs omit this context. */
|
|
28
|
+
private linkedProjectError;
|
|
24
29
|
/** Run a one-off script against the project's live DEV bindings via the
|
|
25
30
|
* dedicated runner worker. Same auth + `{ ok, data }` envelope as call(), but
|
|
26
31
|
* rooted at RUNNER_BASE_URL instead of the /v1 API (see that constant for the
|
|
@@ -44,7 +44,7 @@ export declare function productionControl(client: ApiClient, target: TestTarget,
|
|
|
44
44
|
liveInboxOnly?: boolean;
|
|
45
45
|
}): TestControl;
|
|
46
46
|
/** The production control the runner and fixtures always used: your sign-in, the live release. */
|
|
47
|
-
export declare function openProductionControl(projectId: string, target?: TestTarget): Promise<TestControl>;
|
|
47
|
+
export declare function openProductionControl(projectId: string, target?: TestTarget, fromProjectFile?: boolean): Promise<TestControl>;
|
|
48
48
|
export declare const PREVIEW_CLOSED_MESSAGE = "The preview is closed, promoted or expired, or its credential was revoked. Open or continue one with `somewhere preview`, then run the tests again.";
|
|
49
49
|
type ToolClient = ReturnType<typeof previewToolClient>;
|
|
50
50
|
/** A failure of the preview itself (closed, saved again): the run fails as a preview run. */
|
|
@@ -121,6 +121,7 @@ interface PwPage {
|
|
|
121
121
|
interface PwContext {
|
|
122
122
|
newPage(): Promise<PwPage>;
|
|
123
123
|
close(): Promise<void>;
|
|
124
|
+
setDefaultTimeout(ms: number): void;
|
|
124
125
|
}
|
|
125
126
|
/** One headless browser per test app, from the app folder's own Playwright install. */
|
|
126
127
|
export declare class Pages {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@somewhere-cloud/cli",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.183",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@somewhere-cloud/cli",
|
|
9
|
-
"version": "0.38.
|
|
9
|
+
"version": "0.38.183",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"bin": {
|
|
12
12
|
"somewhere": "bin/somewhere.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@somewhere-cloud/cli",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.183",
|
|
4
4
|
"description": "CLI for somewhere.cloud — auth, projects, deploy, pull, promote, db, logs, env, MCP bridge.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"somewhere",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
},
|
|
68
68
|
"bundleDependencies": [],
|
|
69
69
|
"bundledDependencies": [],
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "9664148fa602192ef5cf2b1f68994e3a39aa5aba"
|
|
71
71
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source_commit": "
|
|
2
|
+
"source_commit": "972168d1e4e8f43250a7a443292877bbdfe0d350",
|
|
3
3
|
"esbuild": "0.24.0",
|
|
4
4
|
"source_files": {
|
|
5
5
|
"shared/app-model-catalog.ts": "6896adf310f9cfe74bedc17c8ee7f9ed12695d5c397868041ffdb9a50ce5b658",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"shared/transient-read.ts": "c8887ae98ea241e7c8f53103f47c9ec4abe6c64ba4ce524289496a69beb7ae98",
|
|
12
12
|
"shared/types/placeholder-identity.ts": "089a46e2474a21193d3611eddd9c94b6bbe62441b3039ed80fc8499bada447ca",
|
|
13
13
|
"worker/containers/compile/checker-contract.cjs": "5ee58cd4e7d00e01fcbd0fc53f6999ed03cb0081ca92e89810946ddb2f13e86f",
|
|
14
|
-
"worker/containers/compile/consumer-contract.cjs": "
|
|
14
|
+
"worker/containers/compile/consumer-contract.cjs": "352d58185823ef2b8a3ea0d12b230d0699fc7845e02055cbe9a982ad017a3c52",
|
|
15
15
|
"worker/containers/compile/declared-data-contract.cjs": "ebdc7dbc12283a7218c28e0e912e736ac27a8e9d513b82c097ebff6df3c1dd91",
|
|
16
16
|
"worker/containers/compile/generated-declarations-render.cjs": "7ffdb34645cc9eccac6eba39dc86b646a41c4de8a1a038d2b5b46f42df9f1157",
|
|
17
17
|
"worker/containers/compile/generated-declarations.cjs": "6e9902e054c5c784fd9b3c3fafc1869e79954100a45014e1132247cd82833ec4",
|
|
18
18
|
"worker/containers/compile/groups-types.cjs": "7681d2adf0c7761a4971d7ba8287b238e464fd2768c878477e32794538675b33",
|
|
19
|
-
"worker/containers/compile/runtime-types.cjs": "
|
|
19
|
+
"worker/containers/compile/runtime-types.cjs": "334a11531fbbfff190e93adb95385cdf16507372c765a08c181a0c0b07b3cce7",
|
|
20
20
|
"worker/containers/compile/schema-types.cjs": "806147ad7224356734020c62441123db16b50ef6456db974c573b226d517e6cc",
|
|
21
21
|
"worker/containers/compile/typed-data.cjs": "1c8bec853fbee4ffd34c651076a4e1f4d8b18c0c2be5e99e31df7c9283207627",
|
|
22
22
|
"worker/containers/compile/typed-files.cjs": "f2568567a53994575ede91f9a0839965e64f94eb92ae11315650189b6de0f79c",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"worker/src/services/jobs/limits.ts": "2d0d73de8752ad4fb84d281bac6c3049bb34a7d0b08c7cda76634c19c303c529",
|
|
36
36
|
"worker/src/utils/alert-audit.ts": "318ce8cd45954f50a77bf0782efa4cc433016e923431e3a4042d2294f31610f8",
|
|
37
37
|
"worker/src/utils/alert-streak.ts": "cc15ff03920821cb4b2c6758fdd29508b24b29f258287e977c23a8ae28c14cbd",
|
|
38
|
-
"worker/src/utils/authority.ts": "
|
|
38
|
+
"worker/src/utils/authority.ts": "fa1b7d6ff48cac00a2b16a4a47897089e0ead9e625b1a36db7f38ec0cb586917",
|
|
39
39
|
"worker/src/utils/authority/client-contract-schema.ts": "c1b433d2b09d7c1e98adae70b5754fe704fabb2ecc8e20347518a633e31f99d0",
|
|
40
40
|
"worker/src/utils/authority/intake-bake.ts": "7216e288e40673819295d999b3bdbf5e4319e1e21608e3b81eda9d102ff8d636",
|
|
41
41
|
"worker/src/utils/authority/role-domain-map.ts": "dc1b6abba79278a970cc5a07c4eb7ea73acac262425b489670e90508b95a5ff1",
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"worker/src/utils/db-schema-deploy/schema-ownership.ts": "e6c811a87bc657707be3518dfe547c6d97718ac073108b126eb7f791c9c08202",
|
|
62
62
|
"worker/src/utils/dev-health-class.ts": "fd430f31b9c8469f3d90e118fd8c75d1836ebcf705c1f9e93915ffa53a4cb066",
|
|
63
63
|
"worker/src/utils/errors.ts": "f57505fc7cb515abb2e2e62fc8211f359200df1183689dc621dec10c8c7f03e3",
|
|
64
|
-
"worker/src/utils/event-log.ts": "
|
|
65
|
-
"worker/src/utils/feed-kinds.ts": "
|
|
64
|
+
"worker/src/utils/event-log.ts": "6224ef4e42e409f7cd9b96e02442d2c3e64cceacb21a2979d77431771eda9eff",
|
|
65
|
+
"worker/src/utils/feed-kinds.ts": "59f59a635d4da675d4e095eb0bb1391318bc4108f2a40a2877d1778ec49c23fb",
|
|
66
66
|
"worker/src/utils/journey-segment.ts": "623837dec9b24c211b1f3be4908f6780bb4cdba175f2dfa5f34ccccfe5a1a5fc",
|
|
67
67
|
"worker/src/utils/json-exact-integers.ts": "e2eb8d3b2e17da363eb14fb46d876208579e2e92bfac173fb27527e6c4fb575e",
|
|
68
68
|
"worker/src/utils/log-sanitize.ts": "f4591089c16a34e4cbc271ec22b48566b970a62e30d3e9856b7dcd9c479fb0e8",
|
|
69
69
|
"worker/src/utils/managed-groups/errors.ts": "18d952edd7f46bb7e459d4e6678226f4bd6e040ab40073ee5a8d0802be2f3721",
|
|
70
70
|
"worker/src/utils/managed-groups/policy.ts": "2c5b48479a2925bea9a820022c63ca5fa827e2ff5531fe1ab6c0b058b7212b39",
|
|
71
|
-
"worker/src/utils/operator-alert-format.ts": "
|
|
71
|
+
"worker/src/utils/operator-alert-format.ts": "1ceff0a5ca555c6f441b2d98cec9a5853e2fdd4b8d31eacd27356f7bef8a7dfc",
|
|
72
72
|
"worker/src/utils/platform-compile-failure.ts": "dd0a8edaf9958d6b29f44ece498470ee910a6ec866e9978ff1e6d46c000c872f",
|
|
73
73
|
"worker/src/utils/project-custom-hosts.ts": "f3bf13e78d4a23e41bf100cd38432456ce97058a8ac29c80abaf62b049371e3d",
|
|
74
74
|
"worker/src/utils/project-deletion-commit.ts": "aefb86dbd45def3813af200bee8732e4b4bdf20a781cf8dfe36516855cf87620",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"worker/src/utils/telegram.ts": "9aaaa2597c366da1eeee9e2252e9b73e611ea97ed9558f7e07e694d9b393f053",
|
|
79
79
|
"worker/src/utils/workers-ai-comparison.ts": "18b5d5ea96f817387a5ef49733ba611c99cbb14987143c28118b1c90f3b637d4"
|
|
80
80
|
},
|
|
81
|
-
"sha256": "
|
|
81
|
+
"sha256": "01f4e69fa8950a4f4d829e64626e69af252c87f749926d9673e032911a335d9e"
|
|
82
82
|
}
|
|
@@ -1143,7 +1143,7 @@ type SomewhereDbReadOptionsFor<T extends string, C extends readonly string[], I>
|
|
|
1143
1143
|
columns?: C | null;
|
|
1144
1144
|
include?: I | null;
|
|
1145
1145
|
} & NoInfer<string extends C[number] ? unknown
|
|
1146
|
-
: Exclude<C[number], SomewhereDbColumn<T>>
|
|
1146
|
+
: { [K in Exclude<C[number], SomewhereDbColumn<T>> as \`Unknown column \${K} on \${T}\`]: never }>;
|
|
1147
1147
|
type SomewhereDbIncrementFor<T extends string> = T extends keyof SomewhereDeclaredTables
|
|
1148
1148
|
? { readonly [K in __SomewhereDeclared<T, 'numeric', never>]?: number }
|
|
1149
1149
|
: SomewhereDbIncrement;
|
|
@@ -1206,9 +1206,11 @@ interface SomewhereServerDb {
|
|
|
1206
1206
|
tx(intents: readonly SomewhereDbWriteIntent[]): Promise<SomewhereDbWriteReceipt[]>;
|
|
1207
1207
|
}
|
|
1208
1208
|
interface SomewhereCallerDb extends Omit<SomewhereServerDb, 'from' | 'count' | 'insert' | 'update' | 'tx'> {
|
|
1209
|
+
// Insert returns the inserted rows in data. Read data[0] for a single row.
|
|
1209
1210
|
// The platform composes row identity from the verified user.
|
|
1210
1211
|
insert<T extends SomewhereDbTable>(table: T, values: __SomewhereDeclared<T, 'insert', SomewhereDbValues>, options?: SomewhereDbCallerInsertOptions<T> | null): Promise<SomewhereDbInsertResult<SomewhereDbRow<T>>>;
|
|
1211
1212
|
update<T extends SomewhereDbTable>(table: T, spec: SomewhereDbUpdateFor<T, 'set'>): Promise<SomewhereDbResult<SomewhereDbRow<T>>>;
|
|
1213
|
+
/** For an array declared separately, use satisfies readonly SomewhereDbCallerWriteIntent[]. */
|
|
1212
1214
|
tx(intents: readonly SomewhereDbCallerWriteIntent[]): Promise<SomewhereDbWriteReceipt[]>;
|
|
1213
1215
|
// can: true (signed-in callers only; never with asServer): each row also carries the row hints.
|
|
1214
1216
|
from<T extends SomewhereDbTable, const C extends readonly string[] = readonly SomewhereDbColumn<T>[], const I extends readonly SomewhereDbRelationName<T>[] = []>(
|
|
@@ -1583,11 +1585,15 @@ interface SomewhereAuthModerationRevoked { revoked_sessions: number; revoked_ref
|
|
|
1583
1585
|
// pages ordered by (created_at, id), limit 1-200 (default 50). Banned and
|
|
1584
1586
|
// agent accounts are not listed; absent ids are omitted.
|
|
1585
1587
|
interface SomewhereAuthDirectoryUser { id: string; email: string; display_name: string | null; email_verified: boolean; created_at: number | null; import_source_id?: string }
|
|
1588
|
+
/** With { roles: true }: the app role names the user holds now. */
|
|
1589
|
+
interface SomewhereAuthDirectoryUserWithRoles extends SomewhereAuthDirectoryUser { app_roles: string[] }
|
|
1586
1590
|
interface SomewhereServerRoleChanges { user_id: string; results: Array<{ user_id: string; role: string; revoked: boolean } | { user_id: string; role: string; granted_by: string; grant_source: 'platform_admin' | 'delegation' | 'email_domain'; created_at: number; created: boolean }> }
|
|
1587
1591
|
interface SomewhereRuntimeAuthServer {
|
|
1588
1592
|
/** Deployed production functions only. Validate the caller before assigning roles. */
|
|
1589
1593
|
setRoles(userId: string, changes: { add?: readonly string[]; remove?: readonly string[] }): Promise<SomewhereServerRoleChanges>;
|
|
1590
|
-
|
|
1594
|
+
/** Exact lookup with roles: each user also carries app_roles. Check the caller before returning roles. */
|
|
1595
|
+
listUsers(options: { includeImportSourceIds?: boolean; roles: true } & ({ ids: readonly string[]; emails?: never; limit?: never; cursor?: never } | { emails: readonly string[]; ids?: never; limit?: never; cursor?: never })): Promise<{ users: SomewhereAuthDirectoryUserWithRoles[]; next_cursor: null }>;
|
|
1596
|
+
listUsers(options?: { includeImportSourceIds?: boolean; roles?: false } & ({ ids: readonly string[]; emails?: never; limit?: never; cursor?: never } | { emails: readonly string[]; ids?: never; limit?: never; cursor?: never } | { ids?: never; emails?: never; limit?: number; cursor?: string })): Promise<{ users: SomewhereAuthDirectoryUser[]; next_cursor: string | null }>;
|
|
1591
1597
|
}
|
|
1592
1598
|
interface SomewhereAuthUserDeletion {
|
|
1593
1599
|
deleted: true;
|
|
@@ -4581,8 +4587,8 @@ var require_consumer_contract = __commonJS({
|
|
|
4581
4587
|
"worker/containers/compile/consumer-contract.cjs"(exports2, module2) {
|
|
4582
4588
|
"use strict";
|
|
4583
4589
|
var CONSUMER_CONTRACT2 = Object.freeze({
|
|
4584
|
-
version:
|
|
4585
|
-
digest: "
|
|
4590
|
+
version: 54,
|
|
4591
|
+
digest: "aeb4f2243c62424c9bc0c2cc45144fa82014d64b9371d680a38f99e899289dfb"
|
|
4586
4592
|
});
|
|
4587
4593
|
var MEMBERSHIPS = "memberships: table({ id: id(), team_id: text(), member_id: text() }, { scope: owner(), client: { read: true } }),";
|
|
4588
4594
|
var SHARES = "shares: table({ id: id(), grantee_id: text() }, { scope: owner(), client: { read: true, create: ['grantee_id'], delete: true }, unique: [['user_id', 'grantee_id']] }),";
|