@somewhere-cloud/cli 0.38.180 → 0.38.181

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.
@@ -21,11 +21,16 @@ export interface ShowOptions {
21
21
  show?: boolean;
22
22
  }
23
23
  /** `['DELETE', '/api/comments/1']` or `['POST', '/api/tasks/1/comments', { body: 'x' }]`. */
24
- export type RefusedRequest = readonly [method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, body?: unknown];
24
+ /** A route: `['DELETE', '/api/comments/1']`, `['POST', '/api/tasks/1/comments', { body: 'x' }]`; or the app data
25
+ * endpoint: `['DATA', 'contacts', { operation: 'get', id }]`. */
26
+ export type RefusedRequest = readonly [method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, body?: unknown] | readonly [method: 'DATA', table: string, request: DataRequest];
27
+ /** `control`: a user who must be allowed the same reads (GET routes, data get and list), proving there was something
28
+ * to refuse. Writes are never sent as the control. */
25
29
  export interface RefuseOptions {
26
30
  status?: number | readonly number[];
27
31
  lacks?: string | readonly string[];
28
32
  label?: string;
33
+ control?: TestActor;
29
34
  }
30
35
  type Named<K extends string> = {
31
36
  [P in K]: TestActor;
@@ -65,9 +70,12 @@ export interface TestApp {
65
70
  cleanup(): Promise<void>;
66
71
  }
67
72
  /** Open the linked deployment or this folder's exact saved preview. */
73
+ /** `playwright`: where Playwright is installed when it is not in this folder, e.g. '/opt/tools/node_modules/playwright'
74
+ * (or the module itself). Only app.page() uses it. */
68
75
  export declare function openTestApp(options?: {
69
76
  preview?: boolean;
70
77
  projectDir?: string;
78
+ playwright?: string | object;
71
79
  }): Promise<TestApp>;
72
80
  /** An app's answer, already read: the status, the parsed JSON body (or null) and the raw text. */
73
81
  export interface Reply {
@@ -118,8 +126,9 @@ interface PwContext {
118
126
  export declare class Pages {
119
127
  private readonly root;
120
128
  private readonly origin;
129
+ private readonly playwright?;
121
130
  private browser?;
122
- constructor(root: string, origin: string);
131
+ constructor(root: string, origin: string, playwright?: string | object | undefined);
123
132
  open(state: PlaywrightStorageState, path: string): Promise<PwPage>;
124
133
  close(): Promise<void>;
125
134
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.180",
3
+ "version": "0.38.181",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@somewhere-cloud/cli",
9
- "version": "0.38.180",
9
+ "version": "0.38.181",
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.180",
3
+ "version": "0.38.181",
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": "3ba9dad3c46a40705c11412149b2877cec631ea8"
70
+ "gitHead": "66da9855920e084a5383106dc8217ebc027c56f1"
71
71
  }