screw-bugs 0.1.8 → 0.1.10
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 +49 -34
- package/dist/browser-playwright/capture.js +1 -1
- package/dist/browser-playwright/launch.js +27 -10
- package/dist/browser-playwright/page.d.ts +48 -26
- package/dist/browser-playwright/page.js +86 -89
- package/dist/browser-playwright/recorder.d.ts +154 -0
- package/dist/browser-playwright/recorder.js +382 -0
- package/dist/build-info.json +3 -3
- package/dist/cli/app.js +6 -2
- package/dist/cli/commands.js +4 -3
- package/dist/cli/doctor.d.ts +17 -2
- package/dist/cli/doctor.js +62 -4
- package/dist/cli/mcp.js +2 -2
- package/dist/cli/report-server.d.ts +19 -10
- package/dist/cli/report-server.js +43 -18
- package/dist/cli/share.js +2 -2
- package/dist/cli/sign-in.d.ts +9 -3
- package/dist/cli/sign-in.js +12 -9
- package/dist/cli/tailnet.d.ts +57 -0
- package/dist/cli/tailnet.js +82 -0
- package/dist/core/index.d.ts +1 -14
- package/dist/core/index.js +3 -14
- package/dist/report/index.d.ts +1 -10
- package/dist/report/index.js +3 -10
- package/dist/schema/index.d.ts +1 -9
- package/dist/schema/index.js +3 -9
- package/package.json +14 -14
- package/dist/core/accounts.d.ts +0 -40
- package/dist/core/accounts.js +0 -95
- package/dist/core/css.d.ts +0 -95
- package/dist/core/css.js +0 -436
- package/dist/core/engine.d.ts +0 -75
- package/dist/core/engine.js +0 -554
- package/dist/core/errors.d.ts +0 -85
- package/dist/core/errors.js +0 -36
- package/dist/core/evidence.d.ts +0 -14
- package/dist/core/evidence.js +0 -131
- package/dist/core/labels.d.ts +0 -47
- package/dist/core/labels.js +0 -199
- package/dist/core/liveness.d.ts +0 -45
- package/dist/core/liveness.js +0 -66
- package/dist/core/marks.d.ts +0 -63
- package/dist/core/marks.js +0 -410
- package/dist/core/services.d.ts +0 -574
- package/dist/core/services.js +0 -25
- package/dist/core/share.d.ts +0 -68
- package/dist/core/share.js +0 -318
- package/dist/core/steps.d.ts +0 -106
- package/dist/core/steps.js +0 -722
- package/dist/core/uploads.d.ts +0 -49
- package/dist/core/uploads.js +0 -133
- package/dist/core/video.d.ts +0 -47
- package/dist/core/video.js +0 -233
- package/dist/core/viewport.d.ts +0 -28
- package/dist/core/viewport.js +0 -50
- package/dist/report/assets.d.ts +0 -34
- package/dist/report/assets.js +0 -105
- package/dist/report/bug.d.ts +0 -11
- package/dist/report/bug.js +0 -20
- package/dist/report/html.d.ts +0 -47
- package/dist/report/html.js +0 -923
- package/dist/report/icons.d.ts +0 -51
- package/dist/report/icons.js +0 -93
- package/dist/report/live.d.ts +0 -7
- package/dist/report/live.js +0 -135
- package/dist/report/logos.d.ts +0 -4
- package/dist/report/logos.js +0 -19
- package/dist/report/markup.d.ts +0 -50
- package/dist/report/markup.js +0 -156
- package/dist/report/menu-bar.d.ts +0 -60
- package/dist/report/menu-bar.js +0 -157
- package/dist/report/player.d.ts +0 -102
- package/dist/report/player.js +0 -315
- package/dist/report/pr-summary.d.ts +0 -11
- package/dist/report/pr-summary.js +0 -119
- package/dist/report/sha256.d.ts +0 -9
- package/dist/report/sha256.js +0 -97
- package/dist/report/share-page.d.ts +0 -48
- package/dist/report/share-page.js +0 -291
- package/dist/report/shots.d.ts +0 -59
- package/dist/report/shots.js +0 -280
- package/dist/report/sign-in.d.ts +0 -41
- package/dist/report/sign-in.js +0 -568
- package/dist/report/styles.d.ts +0 -3
- package/dist/report/styles.js +0 -274
- package/dist/report/view.d.ts +0 -296
- package/dist/report/view.js +0 -702
- package/dist/report/walkthrough.d.ts +0 -93
- package/dist/report/walkthrough.js +0 -716
- package/dist/schema/accounts.d.ts +0 -137
- package/dist/schema/accounts.js +0 -121
- package/dist/schema/config.d.ts +0 -7
- package/dist/schema/config.js +0 -6
- package/dist/schema/doctor.d.ts +0 -46
- package/dist/schema/doctor.js +0 -30
- package/dist/schema/evidence.d.ts +0 -1115
- package/dist/schema/evidence.js +0 -565
- package/dist/schema/findings.d.ts +0 -161
- package/dist/schema/findings.js +0 -82
- package/dist/schema/job.d.ts +0 -1905
- package/dist/schema/job.js +0 -577
- package/dist/schema/ledger.d.ts +0 -1124
- package/dist/schema/ledger.js +0 -285
- package/dist/schema/share.d.ts +0 -55
- package/dist/schema/share.js +0 -64
- package/dist/schema/status.d.ts +0 -7
- package/dist/schema/status.js +0 -11
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
/** At most this long, the `about` of an account (one line). */
|
|
3
|
-
export declare const ACCOUNT_ABOUT_MAX = 200;
|
|
4
|
-
/** A label such as `trial-user`: lower-case letters, digits and dashes, also a file name. */
|
|
5
|
-
export declare const AccountLabel: Schema.String;
|
|
6
|
-
/** What kind of user an account is, for the agent picking one: one line. */
|
|
7
|
-
export declare const AccountAbout: Schema.String;
|
|
8
|
-
/** A job's account: its label, or the label with what it is and whether to sign in again. */
|
|
9
|
-
export declare const JobAccount: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
10
|
-
readonly label: Schema.String;
|
|
11
|
-
readonly about: Schema.optionalKey<Schema.String>;
|
|
12
|
-
readonly renew: Schema.optionalKey<Schema.Boolean>;
|
|
13
|
-
}>]>;
|
|
14
|
-
export type JobAccount = typeof JobAccount.Type;
|
|
15
|
-
/** The label of a job's account. */
|
|
16
|
-
export declare const accountLabel: (account: JobAccount) => string;
|
|
17
|
-
/** The `about` a job gave its account, if any. */
|
|
18
|
-
export declare const accountAboutOf: (account: JobAccount) => string | undefined;
|
|
19
|
-
/** One saved account in `accounts.json`. Never a secret: the session is a file of its own. */
|
|
20
|
-
export declare const AccountEntry: Schema.Struct<{
|
|
21
|
-
readonly label: Schema.String;
|
|
22
|
-
readonly about: Schema.optionalKey<Schema.String>;
|
|
23
|
-
/** The origin it was signed in on, such as `http://localhost:3000`; runs elsewhere sign in again. */
|
|
24
|
-
readonly origin: Schema.String;
|
|
25
|
-
/** When the session was saved, as an ISO time. */
|
|
26
|
-
readonly savedAt: Schema.String;
|
|
27
|
-
}>;
|
|
28
|
-
export type AccountEntry = typeof AccountEntry.Type;
|
|
29
|
-
/** `.screw-bugs/accounts.json`: the saved accounts, for agents to pick from. */
|
|
30
|
-
export declare const AccountsFile: Schema.Struct<{
|
|
31
|
-
readonly version: Schema.Literal<1>;
|
|
32
|
-
readonly accounts: Schema.$Array<Schema.Struct<{
|
|
33
|
-
readonly label: Schema.String;
|
|
34
|
-
readonly about: Schema.optionalKey<Schema.String>;
|
|
35
|
-
/** The origin it was signed in on, such as `http://localhost:3000`; runs elsewhere sign in again. */
|
|
36
|
-
readonly origin: Schema.String;
|
|
37
|
-
/** When the session was saved, as an ISO time. */
|
|
38
|
-
readonly savedAt: Schema.String;
|
|
39
|
-
}>>;
|
|
40
|
-
}>;
|
|
41
|
-
export type AccountsFile = typeof AccountsFile.Type;
|
|
42
|
-
/**
|
|
43
|
-
* The parts of a saved session (Playwright's storage state) read to tell whether it may still
|
|
44
|
-
* work. Everything else in the file is only for the browser.
|
|
45
|
-
*/
|
|
46
|
-
export declare const SavedSession: Schema.Struct<{
|
|
47
|
-
/**
|
|
48
|
-
* Where and when this session was signed in, written in the same file (one atomic rename) so a
|
|
49
|
-
* run never pairs a session with another one's origin; `accounts.json` only lists it.
|
|
50
|
-
*/
|
|
51
|
-
readonly account: Schema.Struct<{
|
|
52
|
-
readonly label: Schema.String;
|
|
53
|
-
readonly origin: Schema.String;
|
|
54
|
-
readonly savedAt: Schema.String;
|
|
55
|
-
}>;
|
|
56
|
-
readonly cookies: Schema.$Array<Schema.Struct<{
|
|
57
|
-
readonly name: Schema.String;
|
|
58
|
-
readonly domain: Schema.String;
|
|
59
|
-
/** Seconds since the epoch; -1 for a cookie that lasts as long as the browser. */
|
|
60
|
-
readonly expires: Schema.Number;
|
|
61
|
-
}>>;
|
|
62
|
-
readonly origins: Schema.$Array<Schema.Struct<{
|
|
63
|
-
readonly origin: Schema.String;
|
|
64
|
-
}>>;
|
|
65
|
-
}>;
|
|
66
|
-
export type SavedSession = typeof SavedSession.Type;
|
|
67
|
-
/** Why a job's account needs a person to sign in before it can run. */
|
|
68
|
-
export type SignInWhy = {
|
|
69
|
-
readonly _tag: 'none';
|
|
70
|
-
} | {
|
|
71
|
-
readonly _tag: 'origin';
|
|
72
|
-
readonly saved: string;
|
|
73
|
-
} | {
|
|
74
|
-
readonly _tag: 'expired';
|
|
75
|
-
} | {
|
|
76
|
-
readonly _tag: 'renew';
|
|
77
|
-
};
|
|
78
|
-
export declare const SignInInput: Schema.Union<readonly [Schema.Struct<{
|
|
79
|
-
readonly type: Schema.Literal<"mouse">;
|
|
80
|
-
readonly kind: Schema.Literals<readonly ["move", "down", "up"]>;
|
|
81
|
-
readonly x: Schema.Number;
|
|
82
|
-
readonly y: Schema.Number;
|
|
83
|
-
readonly button: Schema.optionalKey<Schema.Literals<readonly ["left", "middle", "right"]>>;
|
|
84
|
-
readonly clickCount: Schema.optionalKey<Schema.Int>;
|
|
85
|
-
}>, Schema.Struct<{
|
|
86
|
-
readonly type: Schema.Literal<"wheel">;
|
|
87
|
-
readonly x: Schema.Number;
|
|
88
|
-
readonly y: Schema.Number;
|
|
89
|
-
readonly dx: Schema.Number;
|
|
90
|
-
readonly dy: Schema.Number;
|
|
91
|
-
}>, Schema.Struct<{
|
|
92
|
-
readonly type: Schema.Literal<"key">;
|
|
93
|
-
/** A `KeyboardEvent.key`, such as `Enter`, `ArrowLeft` or `a`. */
|
|
94
|
-
readonly key: Schema.String;
|
|
95
|
-
readonly modifiers: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["Alt", "Control", "Meta", "Shift"]>>>;
|
|
96
|
-
}>, Schema.Struct<{
|
|
97
|
-
readonly type: Schema.Literal<"text">;
|
|
98
|
-
readonly text: Schema.String;
|
|
99
|
-
}>, Schema.Struct<{
|
|
100
|
-
readonly type: Schema.Literal<"nav">;
|
|
101
|
-
readonly kind: Schema.Literals<readonly ["back", "forward", "reload"]>;
|
|
102
|
-
}>, Schema.Struct<{
|
|
103
|
-
readonly type: Schema.Literal<"viewport">;
|
|
104
|
-
readonly width: Schema.Int;
|
|
105
|
-
readonly height: Schema.Int;
|
|
106
|
-
}>]>;
|
|
107
|
-
export type SignInInput = typeof SignInInput.Type;
|
|
108
|
-
/** What the live view posts: a few inputs at a time. */
|
|
109
|
-
export declare const SignInInputs: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
110
|
-
readonly type: Schema.Literal<"mouse">;
|
|
111
|
-
readonly kind: Schema.Literals<readonly ["move", "down", "up"]>;
|
|
112
|
-
readonly x: Schema.Number;
|
|
113
|
-
readonly y: Schema.Number;
|
|
114
|
-
readonly button: Schema.optionalKey<Schema.Literals<readonly ["left", "middle", "right"]>>;
|
|
115
|
-
readonly clickCount: Schema.optionalKey<Schema.Int>;
|
|
116
|
-
}>, Schema.Struct<{
|
|
117
|
-
readonly type: Schema.Literal<"wheel">;
|
|
118
|
-
readonly x: Schema.Number;
|
|
119
|
-
readonly y: Schema.Number;
|
|
120
|
-
readonly dx: Schema.Number;
|
|
121
|
-
readonly dy: Schema.Number;
|
|
122
|
-
}>, Schema.Struct<{
|
|
123
|
-
readonly type: Schema.Literal<"key">;
|
|
124
|
-
/** A `KeyboardEvent.key`, such as `Enter`, `ArrowLeft` or `a`. */
|
|
125
|
-
readonly key: Schema.String;
|
|
126
|
-
readonly modifiers: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["Alt", "Control", "Meta", "Shift"]>>>;
|
|
127
|
-
}>, Schema.Struct<{
|
|
128
|
-
readonly type: Schema.Literal<"text">;
|
|
129
|
-
readonly text: Schema.String;
|
|
130
|
-
}>, Schema.Struct<{
|
|
131
|
-
readonly type: Schema.Literal<"nav">;
|
|
132
|
-
readonly kind: Schema.Literals<readonly ["back", "forward", "reload"]>;
|
|
133
|
-
}>, Schema.Struct<{
|
|
134
|
-
readonly type: Schema.Literal<"viewport">;
|
|
135
|
-
readonly width: Schema.Int;
|
|
136
|
-
readonly height: Schema.Int;
|
|
137
|
-
}>]>>;
|
package/dist/schema/accounts.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
/*
|
|
3
|
-
* Test accounts: sessions a person signed in to once, which runs start from. The agent picks an
|
|
4
|
-
* account by label for what its cases need (`about` says what kind of user it is); a person signs
|
|
5
|
-
* in to it in the live view, where what they type goes to that browser only: never logged, recorded
|
|
6
|
-
* or saved. Only the session is kept.
|
|
7
|
-
*/
|
|
8
|
-
/** At most this long, the `about` of an account (one line). */
|
|
9
|
-
export const ACCOUNT_ABOUT_MAX = 200;
|
|
10
|
-
/** A label such as `trial-user`: lower-case letters, digits and dashes, also a file name. */
|
|
11
|
-
export const AccountLabel = Schema.String.check(Schema.isPattern(/^[a-z0-9][a-z0-9-]{0,39}$/, {
|
|
12
|
-
message: 'Use 1-40 lower-case letters, digits or dashes, starting with a letter or digit',
|
|
13
|
-
// Effect leaves isPattern out of JSON Schema; this puts it in.
|
|
14
|
-
toJsonSchema: () => ({ pattern: '^[a-z0-9][a-z0-9-]{0,39}$' }),
|
|
15
|
-
})).annotate({ description: 'Label of a test account, such as trial-user.' });
|
|
16
|
-
/** What kind of user an account is, for the agent picking one: one line. */
|
|
17
|
-
export const AccountAbout = Schema.String.check(Schema.makeFilter((text) => !text.trim()
|
|
18
|
-
? 'Must not be blank'
|
|
19
|
-
: text.length > ACCOUNT_ABOUT_MAX
|
|
20
|
-
? `At most ${ACCOUNT_ABOUT_MAX} characters`
|
|
21
|
-
: /[\r\n]/.test(text)
|
|
22
|
-
? 'Must be one line'
|
|
23
|
-
: undefined, {
|
|
24
|
-
// Approximate (looser): JSON Schema's maxLength counts characters, the filter counts
|
|
25
|
-
// UTF-16 code units, where an emoji can count as 2.
|
|
26
|
-
toJsonSchema: () => [
|
|
27
|
-
{ maxLength: ACCOUNT_ABOUT_MAX, pattern: '^[^\\r\\n]*\\S[^\\r\\n]*$' },
|
|
28
|
-
true,
|
|
29
|
-
],
|
|
30
|
-
})).annotate({
|
|
31
|
-
description: 'What kind of user this is, such as "On a 14-day trial, no card on file".',
|
|
32
|
-
});
|
|
33
|
-
/** A job's account: its label, or the label with what it is and whether to sign in again. */
|
|
34
|
-
export const JobAccount = Schema.Union([
|
|
35
|
-
AccountLabel,
|
|
36
|
-
Schema.Struct({
|
|
37
|
-
label: AccountLabel,
|
|
38
|
-
about: Schema.optionalKey(AccountAbout),
|
|
39
|
-
renew: Schema.optionalKey(Schema.Boolean.annotate({
|
|
40
|
-
description: 'Ask the user to sign in to it again (its saved session no longer works), unless that ' +
|
|
41
|
-
'happened in the last 10 minutes.',
|
|
42
|
-
})),
|
|
43
|
-
}),
|
|
44
|
-
]);
|
|
45
|
-
/** The label of a job's account. */
|
|
46
|
-
export const accountLabel = (account) => typeof account === 'string' ? account : account.label;
|
|
47
|
-
/** The `about` a job gave its account, if any. */
|
|
48
|
-
export const accountAboutOf = (account) => typeof account === 'string' ? undefined : account.about;
|
|
49
|
-
/** One saved account in `accounts.json`. Never a secret: the session is a file of its own. */
|
|
50
|
-
export const AccountEntry = Schema.Struct({
|
|
51
|
-
label: AccountLabel,
|
|
52
|
-
about: Schema.optionalKey(Schema.String),
|
|
53
|
-
/** The origin it was signed in on, such as `http://localhost:3000`; runs elsewhere sign in again. */
|
|
54
|
-
origin: Schema.String,
|
|
55
|
-
/** When the session was saved, as an ISO time. */
|
|
56
|
-
savedAt: Schema.String,
|
|
57
|
-
});
|
|
58
|
-
/** `.screw-bugs/accounts.json`: the saved accounts, for agents to pick from. */
|
|
59
|
-
export const AccountsFile = Schema.Struct({
|
|
60
|
-
version: Schema.Literal(1),
|
|
61
|
-
accounts: Schema.Array(AccountEntry),
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
|
-
* The parts of a saved session (Playwright's storage state) read to tell whether it may still
|
|
65
|
-
* work. Everything else in the file is only for the browser.
|
|
66
|
-
*/
|
|
67
|
-
export const SavedSession = Schema.Struct({
|
|
68
|
-
/**
|
|
69
|
-
* Where and when this session was signed in, written in the same file (one atomic rename) so a
|
|
70
|
-
* run never pairs a session with another one's origin; `accounts.json` only lists it.
|
|
71
|
-
*/
|
|
72
|
-
account: Schema.Struct({ label: Schema.String, origin: Schema.String, savedAt: Schema.String }),
|
|
73
|
-
cookies: Schema.Array(Schema.Struct({
|
|
74
|
-
name: Schema.String,
|
|
75
|
-
domain: Schema.String,
|
|
76
|
-
/** Seconds since the epoch; -1 for a cookie that lasts as long as the browser. */
|
|
77
|
-
expires: Schema.Number,
|
|
78
|
-
})),
|
|
79
|
-
origins: Schema.Array(Schema.Struct({ origin: Schema.String })),
|
|
80
|
-
});
|
|
81
|
-
/** One input the live view sends for the person signing in, in viewport CSS pixels. */
|
|
82
|
-
const Coordinate = Schema.Number.check(Schema.isBetween({ minimum: -10_000, maximum: 10_000 }));
|
|
83
|
-
const Modifiers = Schema.Array(Schema.Literals(['Alt', 'Control', 'Meta', 'Shift'])).check(Schema.isMaxLength(4));
|
|
84
|
-
export const SignInInput = Schema.Union([
|
|
85
|
-
Schema.Struct({
|
|
86
|
-
type: Schema.Literal('mouse'),
|
|
87
|
-
kind: Schema.Literals(['move', 'down', 'up']),
|
|
88
|
-
x: Coordinate,
|
|
89
|
-
y: Coordinate,
|
|
90
|
-
button: Schema.optionalKey(Schema.Literals(['left', 'middle', 'right'])),
|
|
91
|
-
clickCount: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 3 }))),
|
|
92
|
-
}),
|
|
93
|
-
Schema.Struct({
|
|
94
|
-
type: Schema.Literal('wheel'),
|
|
95
|
-
x: Coordinate,
|
|
96
|
-
y: Coordinate,
|
|
97
|
-
dx: Coordinate,
|
|
98
|
-
dy: Coordinate,
|
|
99
|
-
}),
|
|
100
|
-
Schema.Struct({
|
|
101
|
-
type: Schema.Literal('key'),
|
|
102
|
-
/** A `KeyboardEvent.key`, such as `Enter`, `ArrowLeft` or `a`. */
|
|
103
|
-
key: Schema.String.check(Schema.isPattern(/^(?:[A-Za-z0-9]{1,20}|[^\s]|\s)$/u)),
|
|
104
|
-
modifiers: Schema.optionalKey(Modifiers),
|
|
105
|
-
}),
|
|
106
|
-
Schema.Struct({
|
|
107
|
-
type: Schema.Literal('text'),
|
|
108
|
-
text: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(2_000)),
|
|
109
|
-
}),
|
|
110
|
-
Schema.Struct({
|
|
111
|
-
type: Schema.Literal('nav'),
|
|
112
|
-
kind: Schema.Literals(['back', 'forward', 'reload']),
|
|
113
|
-
}),
|
|
114
|
-
Schema.Struct({
|
|
115
|
-
type: Schema.Literal('viewport'),
|
|
116
|
-
width: Schema.Int,
|
|
117
|
-
height: Schema.Int,
|
|
118
|
-
}),
|
|
119
|
-
]);
|
|
120
|
-
/** What the live view posts: a few inputs at a time. */
|
|
121
|
-
export const SignInInputs = Schema.Array(SignInInput).check(Schema.isMaxLength(100));
|
package/dist/schema/config.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
/** Project config, committed as `screw-bugs.json` at the project root. */
|
|
3
|
-
export declare const ProjectConfig: Schema.Struct<{
|
|
4
|
-
readonly version: Schema.Literal<1>;
|
|
5
|
-
readonly baseUrl: Schema.optionalKey<Schema.NonEmptyString>;
|
|
6
|
-
}>;
|
|
7
|
-
export type ProjectConfig = typeof ProjectConfig.Type;
|
package/dist/schema/config.js
DELETED
package/dist/schema/doctor.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
export declare const DoctorCheckId: Schema.Literals<readonly ["version", "node", "browser", "video", "disk", "update"]>;
|
|
3
|
-
export type DoctorCheckId = typeof DoctorCheckId.Type;
|
|
4
|
-
/** How to fix a failed check. Doctor only suggests; it never runs the command itself. */
|
|
5
|
-
export declare const DoctorFix: Schema.Struct<{
|
|
6
|
-
/** What to do, in plain language. */
|
|
7
|
-
readonly action: Schema.String;
|
|
8
|
-
/** The command to run, when there is one. */
|
|
9
|
-
readonly command: Schema.optionalKey<Schema.String>;
|
|
10
|
-
readonly why: Schema.String;
|
|
11
|
-
}>;
|
|
12
|
-
export type DoctorFix = typeof DoctorFix.Type;
|
|
13
|
-
export declare const DoctorCheck: Schema.Struct<{
|
|
14
|
-
readonly id: Schema.Literals<readonly ["version", "node", "browser", "video", "disk", "update"]>;
|
|
15
|
-
readonly ok: Schema.Boolean;
|
|
16
|
-
readonly detail: Schema.String;
|
|
17
|
-
readonly fix: Schema.optionalKey<Schema.Struct<{
|
|
18
|
-
/** What to do, in plain language. */
|
|
19
|
-
readonly action: Schema.String;
|
|
20
|
-
/** The command to run, when there is one. */
|
|
21
|
-
readonly command: Schema.optionalKey<Schema.String>;
|
|
22
|
-
readonly why: Schema.String;
|
|
23
|
-
}>>;
|
|
24
|
-
/** A failed warning does not make the report fail: screw-bugs still runs, with less. */
|
|
25
|
-
readonly severity: Schema.optionalKey<Schema.Literal<"warning">>;
|
|
26
|
-
}>;
|
|
27
|
-
export type DoctorCheck = typeof DoctorCheck.Type;
|
|
28
|
-
export declare const DoctorReport: Schema.Struct<{
|
|
29
|
-
/** True when every check is ok or only a warning. */
|
|
30
|
-
readonly ok: Schema.Boolean;
|
|
31
|
-
readonly checks: Schema.$Array<Schema.Struct<{
|
|
32
|
-
readonly id: Schema.Literals<readonly ["version", "node", "browser", "video", "disk", "update"]>;
|
|
33
|
-
readonly ok: Schema.Boolean;
|
|
34
|
-
readonly detail: Schema.String;
|
|
35
|
-
readonly fix: Schema.optionalKey<Schema.Struct<{
|
|
36
|
-
/** What to do, in plain language. */
|
|
37
|
-
readonly action: Schema.String;
|
|
38
|
-
/** The command to run, when there is one. */
|
|
39
|
-
readonly command: Schema.optionalKey<Schema.String>;
|
|
40
|
-
readonly why: Schema.String;
|
|
41
|
-
}>>;
|
|
42
|
-
/** A failed warning does not make the report fail: screw-bugs still runs, with less. */
|
|
43
|
-
readonly severity: Schema.optionalKey<Schema.Literal<"warning">>;
|
|
44
|
-
}>>;
|
|
45
|
-
}>;
|
|
46
|
-
export type DoctorReport = typeof DoctorReport.Type;
|
package/dist/schema/doctor.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
export const DoctorCheckId = Schema.Literals([
|
|
3
|
-
'version',
|
|
4
|
-
'node',
|
|
5
|
-
'browser',
|
|
6
|
-
'video',
|
|
7
|
-
'disk',
|
|
8
|
-
'update',
|
|
9
|
-
]);
|
|
10
|
-
/** How to fix a failed check. Doctor only suggests; it never runs the command itself. */
|
|
11
|
-
export const DoctorFix = Schema.Struct({
|
|
12
|
-
/** What to do, in plain language. */
|
|
13
|
-
action: Schema.String,
|
|
14
|
-
/** The command to run, when there is one. */
|
|
15
|
-
command: Schema.optionalKey(Schema.String),
|
|
16
|
-
why: Schema.String,
|
|
17
|
-
});
|
|
18
|
-
export const DoctorCheck = Schema.Struct({
|
|
19
|
-
id: DoctorCheckId,
|
|
20
|
-
ok: Schema.Boolean,
|
|
21
|
-
detail: Schema.String,
|
|
22
|
-
fix: Schema.optionalKey(DoctorFix),
|
|
23
|
-
/** A failed warning does not make the report fail: screw-bugs still runs, with less. */
|
|
24
|
-
severity: Schema.optionalKey(Schema.Literal('warning')),
|
|
25
|
-
});
|
|
26
|
-
export const DoctorReport = Schema.Struct({
|
|
27
|
-
/** True when every check is ok or only a warning. */
|
|
28
|
-
ok: Schema.Boolean,
|
|
29
|
-
checks: Schema.Array(DoctorCheck),
|
|
30
|
-
});
|