@elixir-cloud/service-registry 2.0.0-alpha.28
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/LICENSE +202 -0
- package/README.md +12 -0
- package/dist/chunks/chunk.2GTT6OBC.js +558 -0
- package/dist/chunks/chunk.422CUO5Q.js +329 -0
- package/dist/chunks/chunk.5EYXDARO.js +23 -0
- package/dist/chunks/chunk.EDOYU2FL.js +1 -0
- package/dist/chunks/chunk.FSZTY25R.js +10 -0
- package/dist/chunks/chunk.G7EXF7Y5.js +24 -0
- package/dist/chunks/chunk.KXF7UXMG.js +477 -0
- package/dist/chunks/chunk.L4ERSGP3.js +59 -0
- package/dist/chunks/chunk.P4Y7MKRA.js +1 -0
- package/dist/chunks/chunk.SWMR6FP7.js +97 -0
- package/dist/chunks/chunk.TWJOFBJX.js +517 -0
- package/dist/chunks/chunk.UMP3GNBP.js +10 -0
- package/dist/chunks/chunk.WHWUXFA2.js +12 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +10 -0
- package/dist/components/service/index.d.ts +8 -0
- package/dist/components/service/index.js +6 -0
- package/dist/components/service/service.d.ts +39 -0
- package/dist/components/service/service.js +5 -0
- package/dist/components/service/tw-styles.d.ts +1 -0
- package/dist/components/service/tw-styles.js +2 -0
- package/dist/components/services/index.d.ts +8 -0
- package/dist/components/services/index.js +6 -0
- package/dist/components/services/services.d.ts +46 -0
- package/dist/components/services/services.js +5 -0
- package/dist/components/services/tw-styles.d.ts +1 -0
- package/dist/components/services/tw-styles.js +2 -0
- package/dist/custom-elements.json +538 -0
- package/dist/events/ecc-service-changed.d.ts +6 -0
- package/dist/events/ecc-service-selected.d.ts +6 -0
- package/dist/events/ecc-services-changed.d.ts +6 -0
- package/dist/events/ecc-services-selected.d.ts +6 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/global.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -0
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.js +3 -0
- package/dist/providers/rest-sr-provider.d.ts +30 -0
- package/dist/providers/rest-sr-provider.js +2 -0
- package/dist/providers/sr-provider.d.ts +58 -0
- package/dist/providers/sr-provider.js +1 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +9 -0
- package/dist/react/service/index.d.ts +18 -0
- package/dist/react/service/index.js +6 -0
- package/dist/react/services/index.d.ts +23 -0
- package/dist/react/services/index.js +6 -0
- package/dist/vscode.html-custom-data.json +28 -0
- package/dist/web-types.json +105 -0
- package/package.json +76 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ServiceRegistryProvider, ExternalService, Service, ServiceType } from "./sr-provider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Implementation of the ServiceRegistryProvider interface using direct REST API calls
|
|
4
|
+
* This class combines the functionality of ServiceRegistryAPI and RestServiceRegistryProvider
|
|
5
|
+
*/
|
|
6
|
+
export declare class RestServiceRegistryProvider implements ServiceRegistryProvider {
|
|
7
|
+
readonly baseUrl: string;
|
|
8
|
+
constructor(baseUrl: string);
|
|
9
|
+
/**
|
|
10
|
+
* Fetch list of services from the registry
|
|
11
|
+
* @returns Promise resolving to array of services
|
|
12
|
+
*/
|
|
13
|
+
getServices(): Promise<ExternalService[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Fetch a specific service by ID
|
|
16
|
+
* @param serviceId ID of the service to fetch
|
|
17
|
+
* @returns Promise resolving to service details
|
|
18
|
+
*/
|
|
19
|
+
getServiceById(serviceId: string): Promise<ExternalService>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetch types of services exposed by the registry
|
|
22
|
+
* @returns Promise resolving to array of service types
|
|
23
|
+
*/
|
|
24
|
+
getServiceTypes(): Promise<ServiceType[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetch information about the registry
|
|
27
|
+
* @returns Promise resolving to service information
|
|
28
|
+
*/
|
|
29
|
+
getServiceInfo(): Promise<Service>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the GA4GH Service Registry API based on OpenAPI specification v1.0.0
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* ServiceType interface matching the Service Registry API schema
|
|
6
|
+
*/
|
|
7
|
+
export interface ServiceType {
|
|
8
|
+
group: string;
|
|
9
|
+
artifact: string;
|
|
10
|
+
version: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Organization interface matching the Service Registry API schema
|
|
14
|
+
*/
|
|
15
|
+
export interface Organization {
|
|
16
|
+
name: string;
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Service interface matching the Service Registry API schema
|
|
21
|
+
*/
|
|
22
|
+
export interface Service {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: ServiceType;
|
|
26
|
+
description?: string;
|
|
27
|
+
organization: Organization;
|
|
28
|
+
contactUrl?: string;
|
|
29
|
+
documentationUrl?: string;
|
|
30
|
+
createdAt?: string;
|
|
31
|
+
updatedAt?: string;
|
|
32
|
+
environment?: string;
|
|
33
|
+
version: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ExternalService interface extending Service with a URL
|
|
37
|
+
*/
|
|
38
|
+
export interface ExternalService extends Service {
|
|
39
|
+
url: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Error interface for API errors
|
|
43
|
+
*/
|
|
44
|
+
export interface Error {
|
|
45
|
+
status: number;
|
|
46
|
+
title: string;
|
|
47
|
+
detail?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Interface defining the operations required for Service Registry data providers
|
|
51
|
+
* Implementations could use REST API, GraphQL, or any other data source
|
|
52
|
+
*/
|
|
53
|
+
export interface ServiceRegistryProvider {
|
|
54
|
+
getServices(): Promise<ExternalService[]>;
|
|
55
|
+
getServiceById(id: string): Promise<ExternalService>;
|
|
56
|
+
getServiceTypes(): Promise<ServiceType[]>;
|
|
57
|
+
getServiceInfo(): Promise<Service>;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../chunks/chunk.P4Y7MKRA.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { service_default as ECCClientGa4ghServiceRegistryService } from '../chunks/chunk.5EYXDARO.js';
|
|
2
|
+
export { services_default as ECCClientGa4ghServiceRegistryServices } from '../chunks/chunk.G7EXF7Y5.js';
|
|
3
|
+
import '../chunks/chunk.422CUO5Q.js';
|
|
4
|
+
import '../chunks/chunk.2GTT6OBC.js';
|
|
5
|
+
import '../chunks/chunk.KXF7UXMG.js';
|
|
6
|
+
import '../chunks/chunk.TWJOFBJX.js';
|
|
7
|
+
import '../chunks/chunk.SWMR6FP7.js';
|
|
8
|
+
import '../chunks/chunk.L4ERSGP3.js';
|
|
9
|
+
import '../chunks/chunk.WHWUXFA2.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ECCClientGa4ghServiceRegistryService as Component } from "../../components/service/service.js";
|
|
2
|
+
import type { EventName } from "@lit/react";
|
|
3
|
+
import type { EccServiceChangedEvent } from "../../events/index.js";
|
|
4
|
+
export type { EccServiceChangedEvent } from "../../events/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @summary This component is used to display details for a single service from Service Registry API.
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
*
|
|
9
|
+
* @property {string} baseUrl - Base URL of the Service Registry instance
|
|
10
|
+
* @property {string} serviceId - ID of the service to display
|
|
11
|
+
* @property {ServiceRegistryProvider} provider - Custom data provider (optional, overrides baseUrl)
|
|
12
|
+
*
|
|
13
|
+
* @fires ecc-service-changed - Fired when service data changes
|
|
14
|
+
*/
|
|
15
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
16
|
+
onEccServiceChanged: EventName<EccServiceChangedEvent>;
|
|
17
|
+
}>;
|
|
18
|
+
export default reactWrapper;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { service_default as default } from '../../chunks/chunk.5EYXDARO.js';
|
|
2
|
+
import '../../chunks/chunk.KXF7UXMG.js';
|
|
3
|
+
import '../../chunks/chunk.TWJOFBJX.js';
|
|
4
|
+
import '../../chunks/chunk.SWMR6FP7.js';
|
|
5
|
+
import '../../chunks/chunk.L4ERSGP3.js';
|
|
6
|
+
import '../../chunks/chunk.WHWUXFA2.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ECCClientGa4ghServiceRegistryServices as Component } from "../../components/services/services.js";
|
|
2
|
+
import type { EventName } from "@lit/react";
|
|
3
|
+
import type { EccServicesChangedEvent } from "../../events/index.js";
|
|
4
|
+
import type { EccServiceSelectedEvent } from "../../events/index.js";
|
|
5
|
+
export type { EccServicesChangedEvent } from "../../events/index.js";
|
|
6
|
+
export type { EccServiceSelectedEvent } from "../../events/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* @summary This component is used to display data from Service Registry API.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
*
|
|
11
|
+
* @property {string} baseUrl - Base URL of the Service Registry instance
|
|
12
|
+
* @property {boolean} filter - Determines if the service filter field should be rendered
|
|
13
|
+
* @property {boolean} search - Determines if the search field should be rendered
|
|
14
|
+
* @property {ServiceRegistryProvider} provider - Custom data provider (optional, overrides baseUrl)
|
|
15
|
+
*
|
|
16
|
+
* @fires ecc-services-changed - Fired when services data changes
|
|
17
|
+
* @fires ecc-service-selected - Fired when a service is clicked
|
|
18
|
+
*/
|
|
19
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
20
|
+
onEccServicesChanged: EventName<EccServicesChangedEvent>;
|
|
21
|
+
onEccServiceSelected: EventName<EccServiceSelectedEvent>;
|
|
22
|
+
}>;
|
|
23
|
+
export default reactWrapper;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { services_default as default } from '../../chunks/chunk.G7EXF7Y5.js';
|
|
2
|
+
import '../../chunks/chunk.422CUO5Q.js';
|
|
3
|
+
import '../../chunks/chunk.2GTT6OBC.js';
|
|
4
|
+
import '../../chunks/chunk.SWMR6FP7.js';
|
|
5
|
+
import '../../chunks/chunk.L4ERSGP3.js';
|
|
6
|
+
import '../../chunks/chunk.WHWUXFA2.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
3
|
+
"version": 1.1,
|
|
4
|
+
"tags": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ecc-client-ga4gh-service-registry-service",
|
|
7
|
+
"description": "This component is used to display details for a single service from Service Registry API.\n---\n\n\n### **Events:**\n - **ecc-service-changed** - Fired when service data changes",
|
|
8
|
+
"attributes": [],
|
|
9
|
+
"references": [
|
|
10
|
+
{
|
|
11
|
+
"name": "Documentation",
|
|
12
|
+
"url": "https://elixir-cloud-components.vercel.app/design/components/ecc-client-ga4gh-service-registry-service.html"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "ecc-client-ga4gh-service-registry-services",
|
|
18
|
+
"description": "This component is used to display data from Service Registry API.\n---\n\n\n### **Events:**\n - **ecc-services-changed** - Fired when services data changes\n- **ecc-service-selected** - Fired when a service is clicked",
|
|
19
|
+
"attributes": [],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Documentation",
|
|
23
|
+
"url": "https://elixir-cloud-components.vercel.app/design/components/ecc-client-ga4gh-service-registry-services.html"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@elixir-cloud/service-registry",
|
|
4
|
+
"version": "2.0.0-alpha.28",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "ecc-client-ga4gh-service-registry-service",
|
|
11
|
+
"description": "This component is used to display details for a single service from Service Registry API.\n---\n\n\n### **Events:**\n - **ecc-service-changed** - Fired when service data changes",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [],
|
|
14
|
+
"events": [
|
|
15
|
+
{
|
|
16
|
+
"name": "ecc-service-changed",
|
|
17
|
+
"type": "CustomEvent",
|
|
18
|
+
"description": "Fired when service data changes"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"js": {
|
|
22
|
+
"properties": [
|
|
23
|
+
{
|
|
24
|
+
"name": "baseUrl",
|
|
25
|
+
"description": "Base URL of the Service Registry instance",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "serviceId",
|
|
30
|
+
"description": "ID of the service to display",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "provider",
|
|
35
|
+
"description": "Custom data provider (optional, overrides baseUrl)",
|
|
36
|
+
"type": "ServiceRegistryProvider"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"events": [
|
|
40
|
+
{
|
|
41
|
+
"name": "ecc-service-changed",
|
|
42
|
+
"type": "CustomEvent",
|
|
43
|
+
"description": "Fired when service data changes"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "ecc-client-ga4gh-service-registry-services",
|
|
50
|
+
"description": "This component is used to display data from Service Registry API.\n---\n\n\n### **Events:**\n - **ecc-services-changed** - Fired when services data changes\n- **ecc-service-selected** - Fired when a service is clicked",
|
|
51
|
+
"doc-url": "",
|
|
52
|
+
"attributes": [],
|
|
53
|
+
"events": [
|
|
54
|
+
{
|
|
55
|
+
"name": "ecc-services-changed",
|
|
56
|
+
"type": "CustomEvent",
|
|
57
|
+
"description": "Fired when services data changes"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "ecc-service-selected",
|
|
61
|
+
"type": "CustomEvent",
|
|
62
|
+
"description": "Fired when a service is clicked"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"js": {
|
|
66
|
+
"properties": [
|
|
67
|
+
{
|
|
68
|
+
"name": "baseUrl",
|
|
69
|
+
"description": "Base URL of the Service Registry instance",
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "filter",
|
|
74
|
+
"description": "Determines if the service filter field should be rendered",
|
|
75
|
+
"type": "boolean"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "search",
|
|
79
|
+
"description": "Determines if the search field should be rendered",
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "provider",
|
|
84
|
+
"description": "Custom data provider (optional, overrides baseUrl)",
|
|
85
|
+
"type": "ServiceRegistryProvider"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"events": [
|
|
89
|
+
{
|
|
90
|
+
"name": "ecc-services-changed",
|
|
91
|
+
"type": "CustomEvent",
|
|
92
|
+
"description": "Fired when services data changes"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "ecc-service-selected",
|
|
96
|
+
"type": "CustomEvent",
|
|
97
|
+
"description": "Fired when a service is clicked"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elixir-cloud/service-registry",
|
|
3
|
+
"description": "Web Component for interacting with GA4GH Service Registry Standard",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"version": "2.0.0-alpha.28",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./custom-elements.json": "./dist/custom-elements.json",
|
|
16
|
+
"./components/*": "./dist/components/*",
|
|
17
|
+
"./react": "./dist/react/index.js",
|
|
18
|
+
"./react/*": "./dist/react/*",
|
|
19
|
+
"./events": "./dist/events/index.js",
|
|
20
|
+
"./events/*": "./dist/events/*",
|
|
21
|
+
"./providers": "./dist/providers/index.js",
|
|
22
|
+
"./providers/*": "./dist/providers/*"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/elixir-cloud-aai/cloud-components.git"
|
|
27
|
+
},
|
|
28
|
+
"customElements": "dist/custom-elements.json",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"package.json",
|
|
33
|
+
"LICENSE"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"analyze": "cem analyze --litelement",
|
|
37
|
+
"build:tailwind": "node ../../scripts/tailwind/index.js",
|
|
38
|
+
"build": "node ../../scripts/tailwind/index.js && node ../../scripts/build.js -p ecc-client-ga4gh-service-registry-",
|
|
39
|
+
"dev": "concurrently -r \"node ../../scripts/tailwind/index.js --watch\" \"node ../../scripts/build.js -p ecc-client-ga4gh-service-registry- --watch\" \"wds\"",
|
|
40
|
+
"clean": "rm -rf dist node_modules custom-elements-manifest.config.js src/output.css src/tailwind.ts",
|
|
41
|
+
"test": "wtr --coverage",
|
|
42
|
+
"test:watch": "wtr --watch",
|
|
43
|
+
"lint": "npx eslint .",
|
|
44
|
+
"lint:fix": "npm run lint -- --fix",
|
|
45
|
+
"prepublish": "npm run build"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@lit/react": "^1.0.2",
|
|
49
|
+
"@elixir-cloud/design": "2.0.0-alpha.28",
|
|
50
|
+
"lit": "^2.8.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
54
|
+
"@elixir-cloud/eslint-config": "*",
|
|
55
|
+
"@open-wc/eslint-config": "^9.2.1",
|
|
56
|
+
"@open-wc/testing": "^3.1.6",
|
|
57
|
+
"@tailwindcss/cli": "4.1.4",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
59
|
+
"@typescript-eslint/parser": "^5.48.0",
|
|
60
|
+
"@web/dev-server": "^0.1.34",
|
|
61
|
+
"@web/dev-server-esbuild": "^0.3.0",
|
|
62
|
+
"@web/test-runner": "^0.19.0",
|
|
63
|
+
"commander": "*",
|
|
64
|
+
"concurrently": "^5.3.0",
|
|
65
|
+
"custom-element-jet-brains-integration": "*",
|
|
66
|
+
"custom-element-vs-code-integration": "*",
|
|
67
|
+
"eslint": "^8.31.0",
|
|
68
|
+
"eslint-config-prettier": "^8.3.0",
|
|
69
|
+
"react": "*",
|
|
70
|
+
"tailwindcss": "^4.1.4",
|
|
71
|
+
"tslib": "^2.3.1",
|
|
72
|
+
"tsup": "^7.2.0",
|
|
73
|
+
"tw-animate-css": "^1.2.6",
|
|
74
|
+
"typescript": "*"
|
|
75
|
+
}
|
|
76
|
+
}
|