@skillcdn/console 0.1.1 → 0.1.3
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 +15 -10
- package/dist/api.d.ts +6 -5
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +5 -4
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +3 -0
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +251 -44
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/directory.d.ts +14 -0
- package/dist/cli/directory.d.ts.map +1 -0
- package/dist/cli/directory.js +46 -0
- package/dist/cli/directory.js.map +1 -0
- package/dist/cli/format.d.ts +15 -3
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +84 -6
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +78 -9
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +2 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/client.d.ts +69 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +71 -33
- package/dist/client.js.map +1 -1
- package/dist/components/decision-list.d.ts +7 -1
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +21 -4
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/documents.d.ts +85 -0
- package/dist/components/documents.d.ts.map +1 -0
- package/dist/components/documents.js +103 -0
- package/dist/components/documents.js.map +1 -0
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +46 -14
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/markdown.d.ts +5 -2
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +8 -1
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/projects.d.ts +41 -0
- package/dist/components/projects.d.ts.map +1 -0
- package/dist/components/projects.js +81 -0
- package/dist/components/projects.js.map +1 -0
- package/dist/components/runs.d.ts +5 -2
- package/dist/components/runs.d.ts.map +1 -1
- package/dist/components/runs.js +4 -4
- package/dist/components/runs.js.map +1 -1
- package/dist/components/shell.d.ts +5 -0
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +1 -1
- package/dist/components/shell.js.map +1 -1
- package/dist/components/task-view.d.ts +9 -1
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +3 -2
- package/dist/components/task-view.js.map +1 -1
- package/dist/console.css +253 -1
- package/dist/console.d.ts +3 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +156 -58
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +44 -10
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +215 -81
- package/dist/data.js.map +1 -1
- package/dist/docs-page.d.ts +11 -0
- package/dist/docs-page.d.ts.map +1 -0
- package/dist/docs-page.js +146 -0
- package/dist/docs-page.js.map +1 -0
- package/dist/documents.d.ts +19 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +64 -0
- package/dist/documents.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +17 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +17 -0
- package/dist/limits.js.map +1 -1
- package/dist/router.d.ts +28 -7
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +52 -23
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +16 -12
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +31 -11
- package/dist/routes.js.map +1 -1
- package/dist/schemas.d.ts +414 -28
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +204 -27
- package/dist/schemas.js.map +1 -1
- package/dist/use-action.d.ts +8 -0
- package/dist/use-action.d.ts.map +1 -0
- package/dist/use-action.js +30 -0
- package/dist/use-action.js.map +1 -0
- package/dist/vocabulary.d.ts +10 -1
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +16 -0
- package/dist/vocabulary.js.map +1 -1
- package/package.json +1 -1
package/dist/routes.d.ts
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import type { ProviderKey } from "./vocabulary.js";
|
|
2
|
-
/** One prefix per resource; an id follows where one is needed. */
|
|
2
|
+
/** One prefix per resource of the workspace; an id follows where one is needed. */
|
|
3
3
|
export declare const REST_ROUTES: {
|
|
4
4
|
/** Who is signed in, what the workspace is called, and whether anyone can sign in. */
|
|
5
5
|
readonly me: "/api/v1/me";
|
|
6
6
|
/** The people of the workspace: everyone who has signed in. */
|
|
7
7
|
readonly people: "/api/v1/people";
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
/** The
|
|
8
|
+
/** The projects the asker may see; the board of each is under its key. */
|
|
9
|
+
readonly projects: "/api/v1/projects";
|
|
10
|
+
/** The workspace's own events, the ones about no project: who joined, who was made what. */
|
|
11
11
|
readonly events: "/api/v1/events";
|
|
12
12
|
/** The tokens of whoever asks: what their agents, scripts and consoles act as them with. */
|
|
13
13
|
readonly tokens: "/api/v1/tokens";
|
|
14
|
-
/** The runs: agents at work, and what they did. */
|
|
15
|
-
readonly runs: "/api/v1/runs";
|
|
16
|
-
/** The bytes of a file a run handed in: `/api/v1/files/<artifact id>`. */
|
|
17
|
-
readonly files: "/api/v1/files";
|
|
18
|
-
/** The organization's skills, as SkillCDN serves them at the console's address. */
|
|
19
|
-
readonly skills: "/api/v1/skills";
|
|
20
14
|
};
|
|
15
|
+
/** What a project holds, each under `/api/v1/projects/<key>/<collection>`. */
|
|
16
|
+
export declare const PROJECT_COLLECTIONS: readonly ["tasks", "decisions", "runs", "files", "events", "skills", "members", "docs"];
|
|
17
|
+
export type ProjectCollection = (typeof PROJECT_COLLECTIONS)[number];
|
|
21
18
|
/** Where a browser signs in and out. Signing in is per provider: `/auth/<provider>/...`. */
|
|
22
19
|
export declare const AUTH_ROUTES: {
|
|
23
20
|
/** Sends the browser to the provider to sign in, and afterwards to `return_to`. */
|
|
@@ -42,6 +39,13 @@ export declare function isSignInFailure(value: string | null | undefined): value
|
|
|
42
39
|
export declare function loginPath(provider: ProviderKey, returnTo: string): string;
|
|
43
40
|
/** A page of this origin, told why the sign-in it was waiting for did not complete. */
|
|
44
41
|
export declare function signInPath(page: string, failure: SignInFailure): string;
|
|
45
|
-
/** The REST path of one
|
|
46
|
-
export declare function restPath(collection: "
|
|
42
|
+
/** The REST path of one person, token or project: the collection, then the id or the key. */
|
|
43
|
+
export declare function restPath(collection: "people" | "tokens" | "projects", id: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* The REST path of a project, of one of its collections, or of one item in it: the tasks of
|
|
46
|
+
* `web` are at `projectPath("web", "tasks")`, task 7 at `projectPath("web", "tasks", "7")`.
|
|
47
|
+
* A document's path is one segment of the URL, its slashes encoded: `projectPath("web",
|
|
48
|
+
* "docs", "guides/onboarding")` is `/api/v1/projects/web/docs/guides%2Fonboarding`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function projectPath(key: string, collection?: ProjectCollection, id?: string): string;
|
|
47
51
|
//# sourceMappingURL=routes.d.ts.map
|
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,mFAAmF;AACnF,eAAO,MAAM,WAAW;IACtB,sFAAsF;aACtF,EAAE,EAAE,YAAY;IAChB,+DAA+D;aAC/D,MAAM,EAAE,gBAAgB;IACxB,0EAA0E;aAC1E,QAAQ,EAAE,kBAAkB;IAC5B,4FAA4F;aAC5F,MAAM,EAAE,gBAAgB;IACxB,4FAA4F;aAC5F,MAAM,EAAE,gBAAgB;CAChB,CAAC;AAEX,8EA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MAAM,GAAG,MAAM,CAQ5F"}
|
package/dist/routes.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
/** One prefix per resource; an id follows where one is needed. */
|
|
1
|
+
/** One prefix per resource of the workspace; an id follows where one is needed. */
|
|
2
2
|
export const REST_ROUTES = {
|
|
3
3
|
/** Who is signed in, what the workspace is called, and whether anyone can sign in. */
|
|
4
4
|
me: "/api/v1/me",
|
|
5
5
|
/** The people of the workspace: everyone who has signed in. */
|
|
6
6
|
people: "/api/v1/people",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** The
|
|
7
|
+
/** The projects the asker may see; the board of each is under its key. */
|
|
8
|
+
projects: "/api/v1/projects",
|
|
9
|
+
/** The workspace's own events, the ones about no project: who joined, who was made what. */
|
|
10
10
|
events: "/api/v1/events",
|
|
11
11
|
/** The tokens of whoever asks: what their agents, scripts and consoles act as them with. */
|
|
12
12
|
tokens: "/api/v1/tokens",
|
|
13
|
-
/** The runs: agents at work, and what they did. */
|
|
14
|
-
runs: "/api/v1/runs",
|
|
15
|
-
/** The bytes of a file a run handed in: `/api/v1/files/<artifact id>`. */
|
|
16
|
-
files: "/api/v1/files",
|
|
17
|
-
/** The organization's skills, as SkillCDN serves them at the console's address. */
|
|
18
|
-
skills: "/api/v1/skills",
|
|
19
13
|
};
|
|
14
|
+
/** What a project holds, each under `/api/v1/projects/<key>/<collection>`. */
|
|
15
|
+
export const PROJECT_COLLECTIONS = [
|
|
16
|
+
"tasks",
|
|
17
|
+
"decisions",
|
|
18
|
+
"runs",
|
|
19
|
+
"files",
|
|
20
|
+
"events",
|
|
21
|
+
"skills",
|
|
22
|
+
"members",
|
|
23
|
+
"docs",
|
|
24
|
+
];
|
|
20
25
|
/** Where a browser signs in and out. Signing in is per provider: `/auth/<provider>/...`. */
|
|
21
26
|
export const AUTH_ROUTES = {
|
|
22
27
|
/** Sends the browser to the provider to sign in, and afterwards to `return_to`. */
|
|
@@ -46,8 +51,23 @@ export function loginPath(provider, returnTo) {
|
|
|
46
51
|
export function signInPath(page, failure) {
|
|
47
52
|
return `${page}${page.includes("?") ? "&" : "?"}${SIGN_IN_PARAM}=${failure}`;
|
|
48
53
|
}
|
|
49
|
-
/** The REST path of one
|
|
54
|
+
/** The REST path of one person, token or project: the collection, then the id or the key. */
|
|
50
55
|
export function restPath(collection, id) {
|
|
51
56
|
return `${REST_ROUTES[collection]}/${encodeURIComponent(id)}`;
|
|
52
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* The REST path of a project, of one of its collections, or of one item in it: the tasks of
|
|
60
|
+
* `web` are at `projectPath("web", "tasks")`, task 7 at `projectPath("web", "tasks", "7")`.
|
|
61
|
+
* A document's path is one segment of the URL, its slashes encoded: `projectPath("web",
|
|
62
|
+
* "docs", "guides/onboarding")` is `/api/v1/projects/web/docs/guides%2Fonboarding`.
|
|
63
|
+
*/
|
|
64
|
+
export function projectPath(key, collection, id) {
|
|
65
|
+
const base = restPath("projects", key);
|
|
66
|
+
if (collection === undefined) {
|
|
67
|
+
return base;
|
|
68
|
+
}
|
|
69
|
+
return id === undefined
|
|
70
|
+
? `${base}/${collection}`
|
|
71
|
+
: `${base}/${collection}/${encodeURIComponent(id)}`;
|
|
72
|
+
}
|
|
53
73
|
//# sourceMappingURL=routes.js.map
|
package/dist/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAKA,mFAAmF;AACnF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,sFAAsF;IACtF,EAAE,EAAE,YAAY;IAChB,+DAA+D;IAC/D,MAAM,EAAE,gBAAgB;IACxB,0EAA0E;IAC1E,QAAQ,EAAE,kBAAkB;IAC5B,4FAA4F;IAC5F,MAAM,EAAE,gBAAgB;IACxB,4FAA4F;IAC5F,MAAM,EAAE,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