@pb33f/cowboy-components 0.5.8 → 0.6.1
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/dist/components/kv-view/kv-view.css.js +6 -0
- package/dist/components/kv-view/kv-view.d.ts +3 -0
- package/dist/components/kv-view/kv-view.js +23 -9
- package/dist/components/rodeo/rodeo.css.js +1 -0
- package/dist/components/rodeo/rodeo.d.ts +20 -0
- package/dist/components/rodeo/rodeo.js +124 -4
- package/dist/components/rodeo/roundup.css.d.ts +2 -0
- package/dist/components/rodeo/roundup.css.js +16 -0
- package/dist/components/rodeo/roundup.d.ts +17 -1
- package/dist/components/rodeo/roundup.js +83 -5
- package/dist/components/rodeo/statistic.css.d.ts +2 -0
- package/dist/components/rodeo/statistic.css.js +69 -0
- package/dist/components/rodeo/statistic.d.ts +10 -0
- package/dist/components/rodeo/statistic.js +59 -0
- package/dist/components/terminal-emulator/terminal-emulator.css.d.ts +2 -0
- package/dist/components/terminal-emulator/terminal-emulator.css.js +197 -0
- package/dist/components/terminal-emulator/terminal-emulator.d.ts +21 -0
- package/dist/components/terminal-emulator/terminal-emulator.js +95 -0
- package/dist/components/the-doctor/the-doctor.d.ts +1 -2
- package/dist/components/the-doctor/the-doctor.js +99 -94
- package/dist/controllers/auth.d.ts +8 -2
- package/dist/controllers/auth.js +55 -4
- package/dist/cowboy-components.umd.cjs +344 -338
- package/dist/model/channels.d.ts +3 -0
- package/dist/model/channels.js +4 -0
- package/dist/model/platform-events.d.ts +13 -0
- package/dist/model/platform-events.js +7 -0
- package/dist/model/roundup-stats.d.ts +10 -0
- package/dist/model/roundup-stats.js +1 -0
- package/dist/services/linting-service.js +1 -0
- package/dist/services/rodeo-service.d.ts +5 -0
- package/dist/services/rodeo-service.js +29 -0
- package/package.json +2 -2
package/dist/model/channels.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { PlatformEvent } from "./platform-events";
|
|
1
2
|
export declare const DoctorServiceChannel = "doctor-service";
|
|
2
3
|
export declare const SpecStreamChannel = "spec-stream";
|
|
3
4
|
export declare const CreditStreamChannel = "credit-stream";
|
|
5
|
+
export declare const RodeoServiceChannel = "rodeo";
|
|
4
6
|
export declare const TopicPrefix = "/t/";
|
|
5
7
|
export declare const QueuePrefix = "/q/";
|
|
6
8
|
export declare function isBrokerResponse(obj: any): obj is BrokerResponse;
|
|
9
|
+
export declare function isPlatformEvent(obj: any): obj is PlatformEvent;
|
|
7
10
|
export interface BrokerResponse {
|
|
8
11
|
broker: string;
|
|
9
12
|
}
|
package/dist/model/channels.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export const DoctorServiceChannel = "doctor-service";
|
|
2
2
|
export const SpecStreamChannel = "spec-stream";
|
|
3
3
|
export const CreditStreamChannel = "credit-stream";
|
|
4
|
+
export const RodeoServiceChannel = "rodeo";
|
|
4
5
|
export const TopicPrefix = "/t/";
|
|
5
6
|
export const QueuePrefix = "/q/";
|
|
6
7
|
export function isBrokerResponse(obj) {
|
|
7
8
|
return typeof obj === 'object' && obj !== null && typeof obj.broker === 'string';
|
|
8
9
|
}
|
|
10
|
+
export function isPlatformEvent(obj) {
|
|
11
|
+
return typeof obj === 'object' && obj !== null && typeof obj.event === 'string';
|
|
12
|
+
}
|
|
9
13
|
export var Command;
|
|
10
14
|
(function (Command) {
|
|
11
15
|
Command["WhoAmI"] = "whoami";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum PlatformEventType {
|
|
2
|
+
AssociateBroker = "broker-associated",
|
|
3
|
+
UserAuthenticated = "user-authenticated",
|
|
4
|
+
UserCreated = "user-created",
|
|
5
|
+
SessionStarted = "session-started"
|
|
6
|
+
}
|
|
7
|
+
export interface PlatformEvent {
|
|
8
|
+
id?: string;
|
|
9
|
+
event: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
userId?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var PlatformEventType;
|
|
2
|
+
(function (PlatformEventType) {
|
|
3
|
+
PlatformEventType["AssociateBroker"] = "broker-associated";
|
|
4
|
+
PlatformEventType["UserAuthenticated"] = "user-authenticated";
|
|
5
|
+
PlatformEventType["UserCreated"] = "user-created";
|
|
6
|
+
PlatformEventType["SessionStarted"] = "session-started";
|
|
7
|
+
})(PlatformEventType || (PlatformEventType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class RodeoService {
|
|
2
|
+
static async getRoundup() {
|
|
3
|
+
return new Promise(async (resolve, reject) => {
|
|
4
|
+
try {
|
|
5
|
+
const roundupStats = await fetch(RodeoService.doctorEndpoint + '/rodeo/roundup', {
|
|
6
|
+
method: 'GET',
|
|
7
|
+
credentials: 'include',
|
|
8
|
+
headers: {
|
|
9
|
+
'Content-Type': 'application/json'
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
const apiResult = await roundupStats.json();
|
|
13
|
+
if (!apiResult) {
|
|
14
|
+
reject({ details: 'unable to send feedback' });
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (apiResult?.type && apiResult?.title && apiResult?.status) {
|
|
18
|
+
reject(apiResult);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
resolve(apiResult);
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
reject({ details: 'unable to get roundup results: ' + e });
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
RodeoService.doctorEndpoint = 'https://doctor.pb33f.io';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Princess Beef Heavy Industries Cowboy Components",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.6.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/cowboy-components.umd.cjs",
|
|
9
9
|
"module": "./dist/cowboy-components.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@pb33f/ranch": "^0.
|
|
35
|
+
"@pb33f/ranch": "^0.5.0",
|
|
36
36
|
"@pb33f/saddlebag": "^0.2.1",
|
|
37
37
|
"@shoelace-style/shoelace": "^2.15.0",
|
|
38
38
|
"@vaadin/router": "^2.0.0",
|