@bsb/registry 1.0.4 → 1.1.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/README.md +1 -1
- package/lib/.bsb/clients/service-bsb-registry.d.ts +348 -982
- package/lib/.bsb/clients/service-bsb-registry.d.ts.map +1 -1
- package/lib/.bsb/clients/service-bsb-registry.js +287 -291
- package/lib/.bsb/clients/service-bsb-registry.js.map +1 -1
- package/lib/plugins/service-bsb-registry/auth.d.ts +2 -2
- package/lib/plugins/service-bsb-registry/auth.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry/auth.js +5 -9
- package/lib/plugins/service-bsb-registry/auth.js.map +1 -1
- package/lib/plugins/service-bsb-registry/db/file.d.ts +2 -2
- package/lib/plugins/service-bsb-registry/db/file.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry/db/file.js +3 -40
- package/lib/plugins/service-bsb-registry/db/file.js.map +1 -1
- package/lib/plugins/service-bsb-registry/db/index.d.ts +1 -1
- package/lib/plugins/service-bsb-registry/db/index.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry/db/index.js +3 -6
- package/lib/plugins/service-bsb-registry/db/index.js.map +1 -1
- package/lib/plugins/service-bsb-registry/index.d.ts +377 -1020
- package/lib/plugins/service-bsb-registry/index.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry/index.js +58 -95
- package/lib/plugins/service-bsb-registry/index.js.map +1 -1
- package/lib/plugins/service-bsb-registry/types.d.ts +197 -517
- package/lib/plugins/service-bsb-registry/types.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry/types.js +164 -167
- package/lib/plugins/service-bsb-registry/types.js.map +1 -1
- package/lib/plugins/service-bsb-registry-ui/http-server.d.ts +2 -2
- package/lib/plugins/service-bsb-registry-ui/http-server.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry-ui/http-server.js +229 -181
- package/lib/plugins/service-bsb-registry-ui/http-server.js.map +1 -1
- package/lib/plugins/service-bsb-registry-ui/index.d.ts +27 -27
- package/lib/plugins/service-bsb-registry-ui/index.d.ts.map +1 -1
- package/lib/plugins/service-bsb-registry-ui/index.js +22 -26
- package/lib/plugins/service-bsb-registry-ui/index.js.map +1 -1
- package/lib/schemas/service-bsb-registry-ui.json +1 -46
- package/lib/schemas/service-bsb-registry-ui.plugin.json +2 -47
- package/lib/schemas/service-bsb-registry.json +1903 -1693
- package/lib/schemas/service-bsb-registry.plugin.json +1 -47
- package/package.json +4 -7
|
@@ -1,342 +1,339 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BsbRegistryClient = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Auto-generated BSB virtual client for BSB Registry Core
|
|
6
3
|
* DO NOT EDIT - Regenerated on every build
|
|
7
4
|
* @version 1.0.0
|
|
8
5
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const _registryPluginPublishSchema =
|
|
12
|
-
org:
|
|
13
|
-
name:
|
|
14
|
-
version:
|
|
15
|
-
language:
|
|
16
|
-
metadata:
|
|
17
|
-
displayName:
|
|
18
|
-
description:
|
|
19
|
-
category:
|
|
20
|
-
tags:
|
|
21
|
-
author:
|
|
22
|
-
name:
|
|
23
|
-
email:
|
|
24
|
-
url:
|
|
6
|
+
import { ServiceClient, bsb, optional } from "@bsb/base";
|
|
7
|
+
import { createReturnableEvent, createEventSchemas } from "@bsb/base";
|
|
8
|
+
const _registryPluginPublishSchema = bsb.object({
|
|
9
|
+
org: bsb.string({ min: 1, max: 100, description: "Organization name" }),
|
|
10
|
+
name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
|
|
11
|
+
version: bsb.string({ min: 1, max: 50, description: "Semantic version" }),
|
|
12
|
+
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
|
|
13
|
+
metadata: bsb.object({
|
|
14
|
+
displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
|
|
15
|
+
description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
|
|
16
|
+
category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
|
|
17
|
+
tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
|
|
18
|
+
author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
|
|
19
|
+
name: bsb.string({ max: 200, description: "Author name" }),
|
|
20
|
+
email: optional(bsb.string({ max: 200, description: "Author email" })),
|
|
21
|
+
url: optional(bsb.uri("Author homepage"))
|
|
25
22
|
}, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
|
|
26
|
-
license:
|
|
27
|
-
homepage:
|
|
28
|
-
repository:
|
|
23
|
+
license: optional(bsb.string({ max: 50 })),
|
|
24
|
+
homepage: optional(bsb.uri()),
|
|
25
|
+
repository: optional(bsb.uri())
|
|
29
26
|
}, "Plugin metadata"),
|
|
30
|
-
eventSchema:
|
|
31
|
-
capabilities:
|
|
32
|
-
configSchema:
|
|
33
|
-
typeDefinitions:
|
|
34
|
-
nodejs:
|
|
35
|
-
csharp:
|
|
36
|
-
go:
|
|
37
|
-
java:
|
|
27
|
+
eventSchema: bsb.unknown("EventSchemaExport object (parsed at HTTP boundary, transported as object)"),
|
|
28
|
+
capabilities: optional(bsb.unknown("Plugin capabilities object (parsed at HTTP boundary, optional top-level override)")),
|
|
29
|
+
configSchema: optional(bsb.unknown("Configuration JSON Schema object (parsed at HTTP boundary)")),
|
|
30
|
+
typeDefinitions: optional(bsb.object({
|
|
31
|
+
nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
|
|
32
|
+
csharp: optional(bsb.string({ description: "C# interface definitions" })),
|
|
33
|
+
go: optional(bsb.string({ description: "Go type definitions" })),
|
|
34
|
+
java: optional(bsb.string({ description: "Java interface definitions" }))
|
|
38
35
|
}, "Language-specific type definitions")),
|
|
39
|
-
documentation:
|
|
40
|
-
dependencies:
|
|
41
|
-
id:
|
|
42
|
-
version:
|
|
36
|
+
documentation: bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" }),
|
|
37
|
+
dependencies: optional(bsb.array(bsb.object({
|
|
38
|
+
id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
|
|
39
|
+
version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
|
|
43
40
|
}, "Plugin dependency declaration"), { description: "Plugin dependencies" })),
|
|
44
|
-
package:
|
|
45
|
-
nodejs:
|
|
46
|
-
csharp:
|
|
47
|
-
go:
|
|
48
|
-
java:
|
|
49
|
-
python:
|
|
41
|
+
package: optional(bsb.object({
|
|
42
|
+
nodejs: optional(bsb.string({ description: "NPM package name" })),
|
|
43
|
+
csharp: optional(bsb.string({ description: "NuGet package name" })),
|
|
44
|
+
go: optional(bsb.string({ description: "Go module path" })),
|
|
45
|
+
java: optional(bsb.string({ description: "Maven coordinates" })),
|
|
46
|
+
python: optional(bsb.string({ description: "PyPI package name" }))
|
|
50
47
|
}, "Language-specific package information")),
|
|
51
|
-
runtime:
|
|
52
|
-
nodejs:
|
|
53
|
-
dotnet:
|
|
54
|
-
go:
|
|
55
|
-
java:
|
|
56
|
-
python:
|
|
48
|
+
runtime: optional(bsb.object({
|
|
49
|
+
nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
|
|
50
|
+
dotnet: optional(bsb.string({ description: ".NET version requirement" })),
|
|
51
|
+
go: optional(bsb.string({ description: "Go version requirement" })),
|
|
52
|
+
java: optional(bsb.string({ description: "Java version requirement" })),
|
|
53
|
+
python: optional(bsb.string({ description: "Python version requirement" }))
|
|
57
54
|
}, "Runtime version requirements")),
|
|
58
|
-
visibility:
|
|
59
|
-
publishedBy:
|
|
55
|
+
visibility: optional(bsb.enum(["public", "private"], "Visibility level (default: public)")),
|
|
56
|
+
publishedBy: optional(bsb.string({ max: 200, description: "User ID of the publisher (set by HTTP layer)" }))
|
|
60
57
|
}, "Request body for publishing a plugin");
|
|
61
|
-
const _registryPluginPublishOutputSchema =
|
|
62
|
-
success:
|
|
63
|
-
pluginId:
|
|
64
|
-
version:
|
|
65
|
-
message:
|
|
58
|
+
const _registryPluginPublishOutputSchema = bsb.object({
|
|
59
|
+
success: bsb.boolean("Operation success status"),
|
|
60
|
+
pluginId: bsb.string({ description: "Full plugin ID (org/name)" }),
|
|
61
|
+
version: bsb.string({ description: "Published version" }),
|
|
62
|
+
message: optional(bsb.string({ description: "Success or error message" }))
|
|
66
63
|
}, "Response for publish operation");
|
|
67
|
-
const _registryPluginGetSchema =
|
|
68
|
-
org:
|
|
69
|
-
name:
|
|
70
|
-
version:
|
|
64
|
+
const _registryPluginGetSchema = bsb.object({
|
|
65
|
+
org: bsb.string({ description: "Organization name" }),
|
|
66
|
+
name: bsb.string({ description: "Plugin name" }),
|
|
67
|
+
version: optional(bsb.string({ description: "Version (defaults to latest)" }))
|
|
71
68
|
});
|
|
72
|
-
const _registryPluginGetOutputSchema =
|
|
73
|
-
id:
|
|
74
|
-
org:
|
|
75
|
-
name:
|
|
76
|
-
displayName:
|
|
77
|
-
description:
|
|
78
|
-
version:
|
|
79
|
-
majorMinor:
|
|
80
|
-
language:
|
|
81
|
-
package:
|
|
82
|
-
nodejs:
|
|
83
|
-
csharp:
|
|
84
|
-
go:
|
|
85
|
-
java:
|
|
86
|
-
python:
|
|
69
|
+
const _registryPluginGetOutputSchema = bsb.object({
|
|
70
|
+
id: bsb.string({ min: 1, max: 200, description: "Full ID: org/plugin-name" }),
|
|
71
|
+
org: bsb.string({ min: 1, max: 100, description: "Organization or user name" }),
|
|
72
|
+
name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
|
|
73
|
+
displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
|
|
74
|
+
description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
|
|
75
|
+
version: bsb.string({ min: 1, max: 50, description: "Semantic version (1.0.0)" }),
|
|
76
|
+
majorMinor: bsb.string({ min: 1, max: 20, description: "Major.minor only (1.0)" }),
|
|
77
|
+
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
|
|
78
|
+
package: optional(bsb.object({
|
|
79
|
+
nodejs: optional(bsb.string({ description: "NPM package name" })),
|
|
80
|
+
csharp: optional(bsb.string({ description: "NuGet package name" })),
|
|
81
|
+
go: optional(bsb.string({ description: "Go module path" })),
|
|
82
|
+
java: optional(bsb.string({ description: "Maven coordinates" })),
|
|
83
|
+
python: optional(bsb.string({ description: "PyPI package name" }))
|
|
87
84
|
}, "Language-specific package information")),
|
|
88
|
-
category:
|
|
89
|
-
tags:
|
|
90
|
-
author:
|
|
91
|
-
name:
|
|
92
|
-
email:
|
|
93
|
-
url:
|
|
85
|
+
category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
|
|
86
|
+
tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
|
|
87
|
+
author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
|
|
88
|
+
name: bsb.string({ max: 200, description: "Author name" }),
|
|
89
|
+
email: optional(bsb.string({ max: 200, description: "Author email" })),
|
|
90
|
+
url: optional(bsb.uri("Author homepage"))
|
|
94
91
|
}, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
|
|
95
|
-
license:
|
|
96
|
-
homepage:
|
|
97
|
-
repository:
|
|
98
|
-
visibility:
|
|
99
|
-
eventSchema:
|
|
100
|
-
capabilities:
|
|
101
|
-
configSchema:
|
|
102
|
-
typeDefinitions:
|
|
103
|
-
nodejs:
|
|
104
|
-
csharp:
|
|
105
|
-
go:
|
|
106
|
-
java:
|
|
92
|
+
license: optional(bsb.string({ max: 50, description: "License identifier" })),
|
|
93
|
+
homepage: optional(bsb.uri("Documentation URL")),
|
|
94
|
+
repository: optional(bsb.uri("Source repository URL")),
|
|
95
|
+
visibility: bsb.enum(["public", "private"], "Visibility level"),
|
|
96
|
+
eventSchema: bsb.unknown("Events map (Record<eventName, EventExportEntry>)"),
|
|
97
|
+
capabilities: optional(bsb.unknown("Plugin capabilities object")),
|
|
98
|
+
configSchema: optional(bsb.unknown("Configuration JSON Schema object")),
|
|
99
|
+
typeDefinitions: optional(bsb.object({
|
|
100
|
+
nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
|
|
101
|
+
csharp: optional(bsb.string({ description: "C# interface definitions" })),
|
|
102
|
+
go: optional(bsb.string({ description: "Go type definitions" })),
|
|
103
|
+
java: optional(bsb.string({ description: "Java interface definitions" }))
|
|
107
104
|
}, "Language-specific type definitions")),
|
|
108
|
-
documentation:
|
|
109
|
-
dependencies:
|
|
110
|
-
id:
|
|
111
|
-
version:
|
|
105
|
+
documentation: optional(bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" })),
|
|
106
|
+
dependencies: optional(bsb.array(bsb.object({
|
|
107
|
+
id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
|
|
108
|
+
version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
|
|
112
109
|
}, "Plugin dependency declaration"), { description: "Plugins this plugin depends on" })),
|
|
113
|
-
permissions:
|
|
114
|
-
userId:
|
|
115
|
-
permission:
|
|
110
|
+
permissions: optional(bsb.array(bsb.object({
|
|
111
|
+
userId: bsb.uuid("User ID"),
|
|
112
|
+
permission: bsb.enum(["read", "write"], "Resource-level permission")
|
|
116
113
|
}, "Per-package permission entry (overrides org-level)"), { description: "Per-package user permissions" })),
|
|
117
|
-
eventCount:
|
|
118
|
-
emitEventCount:
|
|
119
|
-
onEventCount:
|
|
120
|
-
returnableEventCount:
|
|
121
|
-
broadcastEventCount:
|
|
122
|
-
publishedBy:
|
|
123
|
-
publishedAt:
|
|
124
|
-
updatedAt:
|
|
125
|
-
downloads:
|
|
126
|
-
runtime:
|
|
127
|
-
nodejs:
|
|
128
|
-
dotnet:
|
|
129
|
-
go:
|
|
130
|
-
java:
|
|
131
|
-
python:
|
|
114
|
+
eventCount: bsb.int32({ description: "Total event count" }),
|
|
115
|
+
emitEventCount: bsb.int32({ description: "Fire-and-forget emit events" }),
|
|
116
|
+
onEventCount: bsb.int32({ description: "Fire-and-forget on events" }),
|
|
117
|
+
returnableEventCount: bsb.int32({ description: "Returnable events" }),
|
|
118
|
+
broadcastEventCount: bsb.int32({ description: "Broadcast events" }),
|
|
119
|
+
publishedBy: bsb.string({ max: 200, description: "User ID who published" }),
|
|
120
|
+
publishedAt: bsb.datetime("First publish timestamp"),
|
|
121
|
+
updatedAt: bsb.datetime("Last update timestamp"),
|
|
122
|
+
downloads: optional(bsb.int32({ description: "Download count" })),
|
|
123
|
+
runtime: optional(bsb.object({
|
|
124
|
+
nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
|
|
125
|
+
dotnet: optional(bsb.string({ description: ".NET version requirement" })),
|
|
126
|
+
go: optional(bsb.string({ description: "Go version requirement" })),
|
|
127
|
+
java: optional(bsb.string({ description: "Java version requirement" })),
|
|
128
|
+
python: optional(bsb.string({ description: "Python version requirement" }))
|
|
132
129
|
}, "Runtime version requirements"))
|
|
133
130
|
}, "Registry entry for a plugin");
|
|
134
|
-
const _registryPluginListSchema =
|
|
135
|
-
org:
|
|
136
|
-
language:
|
|
137
|
-
category:
|
|
138
|
-
limit:
|
|
139
|
-
offset:
|
|
131
|
+
const _registryPluginListSchema = bsb.object({
|
|
132
|
+
org: optional(bsb.string({ max: 100, description: "Filter by organization" })),
|
|
133
|
+
language: optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Filter by language")),
|
|
134
|
+
category: optional(bsb.enum(["service", "observable", "events", "config"], "Filter by category")),
|
|
135
|
+
limit: optional(bsb.int32({ description: "Results per page (default: 50)" })),
|
|
136
|
+
offset: optional(bsb.int32({ description: "Pagination offset (default: 0)" }))
|
|
140
137
|
}, "Query parameters for listing plugins");
|
|
141
|
-
const _registryPluginListOutputSchema =
|
|
142
|
-
results:
|
|
143
|
-
id:
|
|
144
|
-
org:
|
|
145
|
-
name:
|
|
146
|
-
displayName:
|
|
147
|
-
description:
|
|
148
|
-
version:
|
|
149
|
-
majorMinor:
|
|
150
|
-
language:
|
|
151
|
-
package:
|
|
152
|
-
nodejs:
|
|
153
|
-
csharp:
|
|
154
|
-
go:
|
|
155
|
-
java:
|
|
156
|
-
python:
|
|
138
|
+
const _registryPluginListOutputSchema = bsb.object({
|
|
139
|
+
results: bsb.array(bsb.object({
|
|
140
|
+
id: bsb.string({ min: 1, max: 200, description: "Full ID: org/plugin-name" }),
|
|
141
|
+
org: bsb.string({ min: 1, max: 100, description: "Organization or user name" }),
|
|
142
|
+
name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
|
|
143
|
+
displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
|
|
144
|
+
description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
|
|
145
|
+
version: bsb.string({ min: 1, max: 50, description: "Semantic version (1.0.0)" }),
|
|
146
|
+
majorMinor: bsb.string({ min: 1, max: 20, description: "Major.minor only (1.0)" }),
|
|
147
|
+
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
|
|
148
|
+
package: optional(bsb.object({
|
|
149
|
+
nodejs: optional(bsb.string({ description: "NPM package name" })),
|
|
150
|
+
csharp: optional(bsb.string({ description: "NuGet package name" })),
|
|
151
|
+
go: optional(bsb.string({ description: "Go module path" })),
|
|
152
|
+
java: optional(bsb.string({ description: "Maven coordinates" })),
|
|
153
|
+
python: optional(bsb.string({ description: "PyPI package name" }))
|
|
157
154
|
}, "Language-specific package information")),
|
|
158
|
-
category:
|
|
159
|
-
tags:
|
|
160
|
-
author:
|
|
161
|
-
name:
|
|
162
|
-
email:
|
|
163
|
-
url:
|
|
155
|
+
category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
|
|
156
|
+
tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
|
|
157
|
+
author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
|
|
158
|
+
name: bsb.string({ max: 200, description: "Author name" }),
|
|
159
|
+
email: optional(bsb.string({ max: 200, description: "Author email" })),
|
|
160
|
+
url: optional(bsb.uri("Author homepage"))
|
|
164
161
|
}, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
|
|
165
|
-
license:
|
|
166
|
-
homepage:
|
|
167
|
-
repository:
|
|
168
|
-
visibility:
|
|
169
|
-
eventSchema:
|
|
170
|
-
capabilities:
|
|
171
|
-
configSchema:
|
|
172
|
-
typeDefinitions:
|
|
173
|
-
nodejs:
|
|
174
|
-
csharp:
|
|
175
|
-
go:
|
|
176
|
-
java:
|
|
162
|
+
license: optional(bsb.string({ max: 50, description: "License identifier" })),
|
|
163
|
+
homepage: optional(bsb.uri("Documentation URL")),
|
|
164
|
+
repository: optional(bsb.uri("Source repository URL")),
|
|
165
|
+
visibility: bsb.enum(["public", "private"], "Visibility level"),
|
|
166
|
+
eventSchema: bsb.unknown("Events map (Record<eventName, EventExportEntry>)"),
|
|
167
|
+
capabilities: optional(bsb.unknown("Plugin capabilities object")),
|
|
168
|
+
configSchema: optional(bsb.unknown("Configuration JSON Schema object")),
|
|
169
|
+
typeDefinitions: optional(bsb.object({
|
|
170
|
+
nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
|
|
171
|
+
csharp: optional(bsb.string({ description: "C# interface definitions" })),
|
|
172
|
+
go: optional(bsb.string({ description: "Go type definitions" })),
|
|
173
|
+
java: optional(bsb.string({ description: "Java interface definitions" }))
|
|
177
174
|
}, "Language-specific type definitions")),
|
|
178
|
-
documentation:
|
|
179
|
-
dependencies:
|
|
180
|
-
id:
|
|
181
|
-
version:
|
|
175
|
+
documentation: optional(bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" })),
|
|
176
|
+
dependencies: optional(bsb.array(bsb.object({
|
|
177
|
+
id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
|
|
178
|
+
version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
|
|
182
179
|
}, "Plugin dependency declaration"), { description: "Plugins this plugin depends on" })),
|
|
183
|
-
permissions:
|
|
184
|
-
userId:
|
|
185
|
-
permission:
|
|
180
|
+
permissions: optional(bsb.array(bsb.object({
|
|
181
|
+
userId: bsb.uuid("User ID"),
|
|
182
|
+
permission: bsb.enum(["read", "write"], "Resource-level permission")
|
|
186
183
|
}, "Per-package permission entry (overrides org-level)"), { description: "Per-package user permissions" })),
|
|
187
|
-
eventCount:
|
|
188
|
-
emitEventCount:
|
|
189
|
-
onEventCount:
|
|
190
|
-
returnableEventCount:
|
|
191
|
-
broadcastEventCount:
|
|
192
|
-
publishedBy:
|
|
193
|
-
publishedAt:
|
|
194
|
-
updatedAt:
|
|
195
|
-
downloads:
|
|
196
|
-
runtime:
|
|
197
|
-
nodejs:
|
|
198
|
-
dotnet:
|
|
199
|
-
go:
|
|
200
|
-
java:
|
|
201
|
-
python:
|
|
184
|
+
eventCount: bsb.int32({ description: "Total event count" }),
|
|
185
|
+
emitEventCount: bsb.int32({ description: "Fire-and-forget emit events" }),
|
|
186
|
+
onEventCount: bsb.int32({ description: "Fire-and-forget on events" }),
|
|
187
|
+
returnableEventCount: bsb.int32({ description: "Returnable events" }),
|
|
188
|
+
broadcastEventCount: bsb.int32({ description: "Broadcast events" }),
|
|
189
|
+
publishedBy: bsb.string({ max: 200, description: "User ID who published" }),
|
|
190
|
+
publishedAt: bsb.datetime("First publish timestamp"),
|
|
191
|
+
updatedAt: bsb.datetime("Last update timestamp"),
|
|
192
|
+
downloads: optional(bsb.int32({ description: "Download count" })),
|
|
193
|
+
runtime: optional(bsb.object({
|
|
194
|
+
nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
|
|
195
|
+
dotnet: optional(bsb.string({ description: ".NET version requirement" })),
|
|
196
|
+
go: optional(bsb.string({ description: "Go version requirement" })),
|
|
197
|
+
java: optional(bsb.string({ description: "Java version requirement" })),
|
|
198
|
+
python: optional(bsb.string({ description: "Python version requirement" }))
|
|
202
199
|
}, "Runtime version requirements"))
|
|
203
200
|
}, "Registry entry for a plugin"), { description: "Plugin list" }),
|
|
204
|
-
total:
|
|
205
|
-
page:
|
|
201
|
+
total: bsb.int32({ description: "Total count" }),
|
|
202
|
+
page: bsb.int32({ description: "Current page number" })
|
|
206
203
|
}, "List results response");
|
|
207
|
-
const _registryPluginSearchSchema =
|
|
208
|
-
query:
|
|
209
|
-
language:
|
|
210
|
-
category:
|
|
211
|
-
limit:
|
|
212
|
-
offset:
|
|
204
|
+
const _registryPluginSearchSchema = bsb.object({
|
|
205
|
+
query: bsb.string({ min: 1, max: 200, description: "Search query string" }),
|
|
206
|
+
language: optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Filter by language")),
|
|
207
|
+
category: optional(bsb.enum(["service", "observable", "events", "config"], "Filter by category")),
|
|
208
|
+
limit: optional(bsb.int32({ description: "Results per page (default: 20)" })),
|
|
209
|
+
offset: optional(bsb.int32({ description: "Pagination offset (default: 0)" }))
|
|
213
210
|
}, "Query parameters for searching plugins");
|
|
214
|
-
const _registryPluginSearchOutputSchema =
|
|
215
|
-
results:
|
|
216
|
-
id:
|
|
217
|
-
org:
|
|
218
|
-
name:
|
|
219
|
-
displayName:
|
|
220
|
-
description:
|
|
221
|
-
version:
|
|
222
|
-
majorMinor:
|
|
223
|
-
language:
|
|
224
|
-
package:
|
|
225
|
-
nodejs:
|
|
226
|
-
csharp:
|
|
227
|
-
go:
|
|
228
|
-
java:
|
|
229
|
-
python:
|
|
211
|
+
const _registryPluginSearchOutputSchema = bsb.object({
|
|
212
|
+
results: bsb.array(bsb.object({
|
|
213
|
+
id: bsb.string({ min: 1, max: 200, description: "Full ID: org/plugin-name" }),
|
|
214
|
+
org: bsb.string({ min: 1, max: 100, description: "Organization or user name" }),
|
|
215
|
+
name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
|
|
216
|
+
displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
|
|
217
|
+
description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
|
|
218
|
+
version: bsb.string({ min: 1, max: 50, description: "Semantic version (1.0.0)" }),
|
|
219
|
+
majorMinor: bsb.string({ min: 1, max: 20, description: "Major.minor only (1.0)" }),
|
|
220
|
+
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
|
|
221
|
+
package: optional(bsb.object({
|
|
222
|
+
nodejs: optional(bsb.string({ description: "NPM package name" })),
|
|
223
|
+
csharp: optional(bsb.string({ description: "NuGet package name" })),
|
|
224
|
+
go: optional(bsb.string({ description: "Go module path" })),
|
|
225
|
+
java: optional(bsb.string({ description: "Maven coordinates" })),
|
|
226
|
+
python: optional(bsb.string({ description: "PyPI package name" }))
|
|
230
227
|
}, "Language-specific package information")),
|
|
231
|
-
category:
|
|
232
|
-
tags:
|
|
233
|
-
author:
|
|
234
|
-
name:
|
|
235
|
-
email:
|
|
236
|
-
url:
|
|
228
|
+
category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
|
|
229
|
+
tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
|
|
230
|
+
author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
|
|
231
|
+
name: bsb.string({ max: 200, description: "Author name" }),
|
|
232
|
+
email: optional(bsb.string({ max: 200, description: "Author email" })),
|
|
233
|
+
url: optional(bsb.uri("Author homepage"))
|
|
237
234
|
}, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
|
|
238
|
-
license:
|
|
239
|
-
homepage:
|
|
240
|
-
repository:
|
|
241
|
-
visibility:
|
|
242
|
-
eventSchema:
|
|
243
|
-
capabilities:
|
|
244
|
-
configSchema:
|
|
245
|
-
typeDefinitions:
|
|
246
|
-
nodejs:
|
|
247
|
-
csharp:
|
|
248
|
-
go:
|
|
249
|
-
java:
|
|
235
|
+
license: optional(bsb.string({ max: 50, description: "License identifier" })),
|
|
236
|
+
homepage: optional(bsb.uri("Documentation URL")),
|
|
237
|
+
repository: optional(bsb.uri("Source repository URL")),
|
|
238
|
+
visibility: bsb.enum(["public", "private"], "Visibility level"),
|
|
239
|
+
eventSchema: bsb.unknown("Events map (Record<eventName, EventExportEntry>)"),
|
|
240
|
+
capabilities: optional(bsb.unknown("Plugin capabilities object")),
|
|
241
|
+
configSchema: optional(bsb.unknown("Configuration JSON Schema object")),
|
|
242
|
+
typeDefinitions: optional(bsb.object({
|
|
243
|
+
nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
|
|
244
|
+
csharp: optional(bsb.string({ description: "C# interface definitions" })),
|
|
245
|
+
go: optional(bsb.string({ description: "Go type definitions" })),
|
|
246
|
+
java: optional(bsb.string({ description: "Java interface definitions" }))
|
|
250
247
|
}, "Language-specific type definitions")),
|
|
251
|
-
documentation:
|
|
252
|
-
dependencies:
|
|
253
|
-
id:
|
|
254
|
-
version:
|
|
248
|
+
documentation: optional(bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" })),
|
|
249
|
+
dependencies: optional(bsb.array(bsb.object({
|
|
250
|
+
id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
|
|
251
|
+
version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
|
|
255
252
|
}, "Plugin dependency declaration"), { description: "Plugins this plugin depends on" })),
|
|
256
|
-
permissions:
|
|
257
|
-
userId:
|
|
258
|
-
permission:
|
|
253
|
+
permissions: optional(bsb.array(bsb.object({
|
|
254
|
+
userId: bsb.uuid("User ID"),
|
|
255
|
+
permission: bsb.enum(["read", "write"], "Resource-level permission")
|
|
259
256
|
}, "Per-package permission entry (overrides org-level)"), { description: "Per-package user permissions" })),
|
|
260
|
-
eventCount:
|
|
261
|
-
emitEventCount:
|
|
262
|
-
onEventCount:
|
|
263
|
-
returnableEventCount:
|
|
264
|
-
broadcastEventCount:
|
|
265
|
-
publishedBy:
|
|
266
|
-
publishedAt:
|
|
267
|
-
updatedAt:
|
|
268
|
-
downloads:
|
|
269
|
-
runtime:
|
|
270
|
-
nodejs:
|
|
271
|
-
dotnet:
|
|
272
|
-
go:
|
|
273
|
-
java:
|
|
274
|
-
python:
|
|
257
|
+
eventCount: bsb.int32({ description: "Total event count" }),
|
|
258
|
+
emitEventCount: bsb.int32({ description: "Fire-and-forget emit events" }),
|
|
259
|
+
onEventCount: bsb.int32({ description: "Fire-and-forget on events" }),
|
|
260
|
+
returnableEventCount: bsb.int32({ description: "Returnable events" }),
|
|
261
|
+
broadcastEventCount: bsb.int32({ description: "Broadcast events" }),
|
|
262
|
+
publishedBy: bsb.string({ max: 200, description: "User ID who published" }),
|
|
263
|
+
publishedAt: bsb.datetime("First publish timestamp"),
|
|
264
|
+
updatedAt: bsb.datetime("Last update timestamp"),
|
|
265
|
+
downloads: optional(bsb.int32({ description: "Download count" })),
|
|
266
|
+
runtime: optional(bsb.object({
|
|
267
|
+
nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
|
|
268
|
+
dotnet: optional(bsb.string({ description: ".NET version requirement" })),
|
|
269
|
+
go: optional(bsb.string({ description: "Go version requirement" })),
|
|
270
|
+
java: optional(bsb.string({ description: "Java version requirement" })),
|
|
271
|
+
python: optional(bsb.string({ description: "Python version requirement" }))
|
|
275
272
|
}, "Runtime version requirements"))
|
|
276
273
|
}, "Registry entry for a plugin"), { description: "Matching plugins" }),
|
|
277
|
-
total:
|
|
278
|
-
query:
|
|
274
|
+
total: bsb.int32({ description: "Total result count" }),
|
|
275
|
+
query: bsb.string({ description: "Search query used" })
|
|
279
276
|
}, "Search results response");
|
|
280
|
-
const _registryPluginDeleteSchema =
|
|
281
|
-
org:
|
|
282
|
-
name:
|
|
283
|
-
version:
|
|
277
|
+
const _registryPluginDeleteSchema = bsb.object({
|
|
278
|
+
org: bsb.string({ description: "Organization name" }),
|
|
279
|
+
name: bsb.string({ description: "Plugin name" }),
|
|
280
|
+
version: optional(bsb.string({ description: "Version (or all if not provided)" }))
|
|
284
281
|
});
|
|
285
|
-
const _registryPluginDeleteOutputSchema =
|
|
286
|
-
success:
|
|
287
|
-
deleted:
|
|
282
|
+
const _registryPluginDeleteOutputSchema = bsb.object({
|
|
283
|
+
success: bsb.boolean("Success status"),
|
|
284
|
+
deleted: bsb.int32({ description: "Number of versions deleted" })
|
|
288
285
|
});
|
|
289
|
-
const _registryPluginVersionsSchema =
|
|
290
|
-
org:
|
|
291
|
-
name:
|
|
292
|
-
majorMinor:
|
|
286
|
+
const _registryPluginVersionsSchema = bsb.object({
|
|
287
|
+
org: bsb.string({ description: "Organization name" }),
|
|
288
|
+
name: bsb.string({ description: "Plugin name" }),
|
|
289
|
+
majorMinor: optional(bsb.string({ description: "Filter by major.minor" }))
|
|
293
290
|
});
|
|
294
|
-
const _registryPluginVersionsOutputSchema =
|
|
295
|
-
versions:
|
|
296
|
-
version:
|
|
297
|
-
majorMinor:
|
|
298
|
-
publishedAt:
|
|
291
|
+
const _registryPluginVersionsOutputSchema = bsb.object({
|
|
292
|
+
versions: bsb.array(bsb.object({
|
|
293
|
+
version: bsb.string({ description: "Full semantic version" }),
|
|
294
|
+
majorMinor: bsb.string({ description: "Major.minor version" }),
|
|
295
|
+
publishedAt: bsb.datetime("Publication timestamp")
|
|
299
296
|
}, "Version information"), { description: "All available versions" }),
|
|
300
|
-
latest:
|
|
301
|
-
latestForMajorMinor:
|
|
297
|
+
latest: bsb.string({ description: "Latest version" }),
|
|
298
|
+
latestForMajorMinor: bsb.string({ description: "JSON map of major.minor to latest patch" })
|
|
302
299
|
}, "Version list response");
|
|
303
|
-
const _registryStatsGetSchema =
|
|
304
|
-
const _registryStatsGetOutputSchema =
|
|
305
|
-
totalPlugins:
|
|
306
|
-
byLanguage:
|
|
307
|
-
byCategory:
|
|
308
|
-
totalDownloads:
|
|
300
|
+
const _registryStatsGetSchema = bsb.object({}, '');
|
|
301
|
+
const _registryStatsGetOutputSchema = bsb.object({
|
|
302
|
+
totalPlugins: bsb.int32({ description: "Total plugin count" }),
|
|
303
|
+
byLanguage: bsb.string({ description: "JSON map of language to count" }),
|
|
304
|
+
byCategory: bsb.string({ description: "JSON map of category to count" }),
|
|
305
|
+
totalDownloads: bsb.int32({ description: "Total downloads across all plugins" })
|
|
309
306
|
}, "Registry statistics");
|
|
310
|
-
const _registryAuthLoginSchema =
|
|
311
|
-
username:
|
|
312
|
-
password:
|
|
307
|
+
const _registryAuthLoginSchema = bsb.object({
|
|
308
|
+
username: bsb.string({ description: "Username" }),
|
|
309
|
+
password: bsb.string({ description: "Encrypted password" })
|
|
313
310
|
});
|
|
314
|
-
const _registryAuthLoginOutputSchema =
|
|
315
|
-
success:
|
|
316
|
-
token:
|
|
317
|
-
expiresAt:
|
|
318
|
-
message:
|
|
311
|
+
const _registryAuthLoginOutputSchema = bsb.object({
|
|
312
|
+
success: bsb.boolean("Login success"),
|
|
313
|
+
token: optional(bsb.string({ description: "Auth token" })),
|
|
314
|
+
expiresAt: optional(bsb.datetime("Expiration")),
|
|
315
|
+
message: optional(bsb.string({ description: "Error message" }))
|
|
319
316
|
});
|
|
320
|
-
const _registryAuthVerifySchema =
|
|
321
|
-
token:
|
|
317
|
+
const _registryAuthVerifySchema = bsb.object({
|
|
318
|
+
token: bsb.string({ description: "Token to verify" })
|
|
322
319
|
});
|
|
323
|
-
const _registryAuthVerifyOutputSchema =
|
|
324
|
-
valid:
|
|
325
|
-
userId:
|
|
326
|
-
permissions:
|
|
320
|
+
const _registryAuthVerifyOutputSchema = bsb.object({
|
|
321
|
+
valid: bsb.boolean("Token validity"),
|
|
322
|
+
userId: optional(bsb.string({ description: "User ID" })),
|
|
323
|
+
permissions: optional(bsb.array(bsb.string()))
|
|
327
324
|
});
|
|
328
325
|
// --- Event Schemas (typed, follows ServiceClientEventSchemas flip) ---
|
|
329
|
-
const _EventSchemas =
|
|
326
|
+
const _EventSchemas = createEventSchemas({
|
|
330
327
|
onReturnableEvents: {
|
|
331
|
-
'registry.plugin.publish':
|
|
332
|
-
'registry.plugin.get':
|
|
333
|
-
'registry.plugin.list':
|
|
334
|
-
'registry.plugin.search':
|
|
335
|
-
'registry.plugin.delete':
|
|
336
|
-
'registry.plugin.versions':
|
|
337
|
-
'registry.stats.get':
|
|
338
|
-
'registry.auth.login':
|
|
339
|
-
'registry.auth.verify':
|
|
328
|
+
'registry.plugin.publish': createReturnableEvent(_registryPluginPublishSchema, _registryPluginPublishOutputSchema, "Publish a new plugin or version"),
|
|
329
|
+
'registry.plugin.get': createReturnableEvent(_registryPluginGetSchema, _registryPluginGetOutputSchema, "Get plugin details by org/name"),
|
|
330
|
+
'registry.plugin.list': createReturnableEvent(_registryPluginListSchema, _registryPluginListOutputSchema, "List plugins with filtering"),
|
|
331
|
+
'registry.plugin.search': createReturnableEvent(_registryPluginSearchSchema, _registryPluginSearchOutputSchema, "Search plugins by query"),
|
|
332
|
+
'registry.plugin.delete': createReturnableEvent(_registryPluginDeleteSchema, _registryPluginDeleteOutputSchema, "Delete a plugin or specific version"),
|
|
333
|
+
'registry.plugin.versions': createReturnableEvent(_registryPluginVersionsSchema, _registryPluginVersionsOutputSchema, "Get all versions of a plugin"),
|
|
334
|
+
'registry.stats.get': createReturnableEvent(_registryStatsGetSchema, _registryStatsGetOutputSchema, "Get registry statistics"),
|
|
335
|
+
'registry.auth.login': createReturnableEvent(_registryAuthLoginSchema, _registryAuthLoginOutputSchema, "Authenticate user and get token"),
|
|
336
|
+
'registry.auth.verify': createReturnableEvent(_registryAuthVerifySchema, _registryAuthVerifyOutputSchema, "Verify authentication token"),
|
|
340
337
|
},
|
|
341
338
|
});
|
|
342
339
|
// --- Internal: Plugin reference for ServiceClient wiring ---
|
|
@@ -347,7 +344,7 @@ class _PluginRef {
|
|
|
347
344
|
static PLUGIN_CLIENT = _PLUGIN_CLIENT;
|
|
348
345
|
}
|
|
349
346
|
// --- Exported Client ---
|
|
350
|
-
class BsbRegistryClient extends
|
|
347
|
+
export default class BsbRegistryClient extends ServiceClient {
|
|
351
348
|
constructor(context) {
|
|
352
349
|
super(_PluginRef, context);
|
|
353
350
|
}
|
|
@@ -388,6 +385,5 @@ class BsbRegistryClient extends base_1.ServiceClient {
|
|
|
388
385
|
return this.events.emitEventAndReturn("registry.auth.verify", obs, input, timeout);
|
|
389
386
|
}
|
|
390
387
|
}
|
|
391
|
-
|
|
392
|
-
exports.BsbRegistryClient = BsbRegistryClient;
|
|
388
|
+
export { BsbRegistryClient };
|
|
393
389
|
//# sourceMappingURL=service-bsb-registry.js.map
|