@bueno-analytics/fleet-command 0.4.0 → 0.5.0
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/CHANGELOG.md +11 -0
- package/dist/fleetCommands.d.ts +6 -0
- package/dist/fleetCommands.js +5 -0
- package/dist/gatewayCommand.d.ts +21 -9
- package/dist/gatewayCommand.js +17 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/setUiPassword.d.ts +7 -0
- package/dist/setUiPassword.js +12 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0](https://github.com/copelandsoftware/bueno_js_sdk/compare/@bueno-analytics/fleet-command@0.4.0...@bueno-analytics/fleet-command@0.5.0) (2026-11-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **fleet-command:** SendGatewayCommandRequest is now a union keyed on command. Build the request with a literal command, or make the builder generic on the command name, so set-ui-password gets its payload.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **fleet-command:** add set-ui-password command and command payload ([6d3ee2e](https://github.com/copelandsoftware/bueno_js_sdk/commit/6d3ee2ec999757dbdb64bb3c72557f60d8e11acc))
|
|
13
|
+
|
|
3
14
|
## [0.4.0](https://github.com/copelandsoftware/bueno_js_sdk/compare/@bueno-analytics/fleet-command@0.3.0...@bueno-analytics/fleet-command@0.4.0) (2026-11-09)
|
|
4
15
|
|
|
5
16
|
|
package/dist/fleetCommands.d.ts
CHANGED
|
@@ -53,5 +53,11 @@ export declare const fleetCommands: {
|
|
|
53
53
|
queued: import("zod").ZodArray<import("zod").ZodString>;
|
|
54
54
|
}, import("zod/v4/core").$strip>;
|
|
55
55
|
};
|
|
56
|
+
readonly 'set-ui-password': {
|
|
57
|
+
readonly request: import("zod").ZodObject<{
|
|
58
|
+
password: import("zod").ZodString;
|
|
59
|
+
}, import("zod/v4/core").$strip>;
|
|
60
|
+
readonly reply: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
61
|
+
};
|
|
56
62
|
};
|
|
57
63
|
export type FleetCommandName = keyof typeof fleetCommands;
|
package/dist/fleetCommands.js
CHANGED
|
@@ -2,6 +2,7 @@ import { dnsCheckReply, dnsCheckRequest } from './dnsCheck.js';
|
|
|
2
2
|
import { gatewayInfoReply, gatewayInfoRequest } from './gatewayInfo.js';
|
|
3
3
|
import { listPluginsReply, listPluginsRequest } from './listPlugins.js';
|
|
4
4
|
import { publishStreamsReply, publishStreamsRequest } from './publishStreams.js';
|
|
5
|
+
import { setUiPasswordReply, setUiPasswordRequest } from './setUiPassword.js';
|
|
5
6
|
import { syncPluginsReply, syncPluginsRequest } from './syncPlugins.js';
|
|
6
7
|
export const fleetCommands = {
|
|
7
8
|
'list-plugins': {
|
|
@@ -24,4 +25,8 @@ export const fleetCommands = {
|
|
|
24
25
|
request: syncPluginsRequest,
|
|
25
26
|
reply: syncPluginsReply,
|
|
26
27
|
},
|
|
28
|
+
'set-ui-password': {
|
|
29
|
+
request: setUiPasswordRequest,
|
|
30
|
+
reply: setUiPasswordReply,
|
|
31
|
+
},
|
|
27
32
|
};
|
package/dist/gatewayCommand.d.ts
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const sendGatewayCommandRequest: z.ZodObject<{
|
|
3
|
-
command: z.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, z.core.$strip
|
|
2
|
+
export declare const sendGatewayCommandRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
command: z.ZodLiteral<"list-plugins">;
|
|
4
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
command: z.ZodLiteral<"publish-streams">;
|
|
7
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
command: z.ZodLiteral<"gateway-info">;
|
|
10
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
command: z.ZodLiteral<"dns-check">;
|
|
13
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
command: z.ZodLiteral<"sync-plugins">;
|
|
16
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
command: z.ZodLiteral<"set-ui-password">;
|
|
19
|
+
payload: z.ZodObject<{
|
|
20
|
+
password: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
}, z.core.$strip>], "command">;
|
|
11
23
|
export declare const gatewayCommandReply: z.ZodObject<{
|
|
12
24
|
messageId: z.ZodString;
|
|
13
25
|
correlationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/gatewayCommand.js
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { fleetCommands } from './fleetCommands.js';
|
|
3
3
|
import { fleetMessage } from './fleetMessage.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
// Typed per command; a bare fleetCommands[command] widens to every request schema.
|
|
5
|
+
const request = (command) => fleetCommands[command].request;
|
|
6
|
+
const withOptionalPayload = (command) => z.object({
|
|
7
|
+
command: z.literal(command),
|
|
8
|
+
payload: z.nullish(request(command)),
|
|
6
9
|
});
|
|
10
|
+
const withPayload = (command) => z.object({
|
|
11
|
+
command: z.literal(command),
|
|
12
|
+
payload: request(command),
|
|
13
|
+
});
|
|
14
|
+
export const sendGatewayCommandRequest = z.discriminatedUnion('command', [
|
|
15
|
+
withOptionalPayload('list-plugins'),
|
|
16
|
+
withOptionalPayload('publish-streams'),
|
|
17
|
+
withOptionalPayload('gateway-info'),
|
|
18
|
+
withOptionalPayload('dns-check'),
|
|
19
|
+
withOptionalPayload('sync-plugins'),
|
|
20
|
+
withPayload('set-ui-password'),
|
|
21
|
+
]);
|
|
7
22
|
// A refused command arrives as a successful response with error set and payload null.
|
|
8
23
|
export const gatewayCommandReply = fleetMessage
|
|
9
24
|
.omit({ replyTo: true })
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export { type GatewayCommandReply, gatewayCommandReply, type SendGatewayCommandR
|
|
|
5
5
|
export { type FleetError, fleetError, type FleetErrorCode, type FleetMessage, fleetMessage, type MessageType, } from './fleetMessage.js';
|
|
6
6
|
export { type ListPluginsReply, listPluginsReply, type ListPluginsRequest, listPluginsRequest, } from './listPlugins.js';
|
|
7
7
|
export { type PublishStreamsReply, publishStreamsReply, type PublishStreamsRequest, publishStreamsRequest, } from './publishStreams.js';
|
|
8
|
+
export { type SetUiPasswordReply, setUiPasswordReply, type SetUiPasswordRequest, setUiPasswordRequest, } from './setUiPassword.js';
|
|
8
9
|
export { type SyncPluginsReply, syncPluginsReply, type SyncPluginsRequest, syncPluginsRequest, } from './syncPlugins.js';
|
package/dist/index.js
CHANGED
|
@@ -5,4 +5,5 @@ export { gatewayCommandReply, sendGatewayCommandRequest, } from './gatewayComman
|
|
|
5
5
|
export { fleetError, fleetMessage, } from './fleetMessage.js';
|
|
6
6
|
export { listPluginsReply, listPluginsRequest, } from './listPlugins.js';
|
|
7
7
|
export { publishStreamsReply, publishStreamsRequest, } from './publishStreams.js';
|
|
8
|
+
export { setUiPasswordReply, setUiPasswordRequest, } from './setUiPassword.js';
|
|
8
9
|
export { syncPluginsReply, syncPluginsRequest, } from './syncPlugins.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const setUiPasswordRequest: z.ZodObject<{
|
|
3
|
+
password: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const setUiPasswordReply: z.ZodObject<{}, z.core.$strip>;
|
|
6
|
+
export type SetUiPasswordRequest = z.infer<typeof setUiPasswordRequest>;
|
|
7
|
+
export type SetUiPasswordReply = z.infer<typeof setUiPasswordReply>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const setUiPasswordRequest = z.object({
|
|
3
|
+
// Plaintext: relays must not log or persist it, or publish it retained.
|
|
4
|
+
// Length counts UTF-16 code units, like Kotlin String.length; zod's min/max count code points.
|
|
5
|
+
password: z
|
|
6
|
+
.string()
|
|
7
|
+
.refine(p => p.length >= 12 && p.length <= 128, {
|
|
8
|
+
message: 'Must be 12 to 128 UTF-16 code units',
|
|
9
|
+
})
|
|
10
|
+
.regex(/\S/, { message: 'Must not be only whitespace' }),
|
|
11
|
+
});
|
|
12
|
+
export const setUiPasswordReply = z.object({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bueno-analytics/fleet-command",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Zod schemas and types for the Bueno fleet command message contract",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"zod": "^4.6.7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tsconfig/node24": "^24.0.
|
|
42
|
-
"@tsconfig/strictest": "^2.0.
|
|
41
|
+
"@tsconfig/node24": "^24.0.6",
|
|
42
|
+
"@tsconfig/strictest": "^2.0.9",
|
|
43
43
|
"@types/node": "^24.19.2",
|
|
44
|
-
"@vitest/coverage-v8": "^5.0
|
|
45
|
-
"oxfmt": "^0.
|
|
46
|
-
"oxlint": "^1.
|
|
47
|
-
"oxlint-tsgolint": "^7.0.
|
|
48
|
-
"rimraf": "^6.1.
|
|
44
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
45
|
+
"oxfmt": "^0.78.0",
|
|
46
|
+
"oxlint": "^1.93.0",
|
|
47
|
+
"oxlint-tsgolint": "^7.0.2006",
|
|
48
|
+
"rimraf": "^6.1.4",
|
|
49
49
|
"typescript": "^7.0.2",
|
|
50
|
-
"vite": "^8.3.
|
|
51
|
-
"vitest": "^5.0
|
|
50
|
+
"vite": "^8.3.8",
|
|
51
|
+
"vitest": "^5.1.0"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=24.0.0"
|