@jeffusion/bungee-types 6.5.1 → 6.7.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.
@@ -36,21 +36,14 @@ export interface ConfigurationService extends ConfigurationServicePolicy {
36
36
  readonly plugins: readonly PluginBinding[];
37
37
  }
38
38
  type ConfigurationRoutePolicy = Omit<RouteConfig, 'path' | 'service_references' | 'endpoints' | 'plugins'>;
39
- interface ConfigurationRouteBase extends ConfigurationRoutePolicy {
39
+ export interface ConfigurationRoute extends ConfigurationRoutePolicy {
40
40
  readonly id: ConfigurationId;
41
41
  readonly position: number;
42
42
  readonly path: string;
43
43
  readonly plugins: readonly PluginBinding[];
44
+ readonly service_references?: readonly [ServiceReference, ...ServiceReference[]];
45
+ readonly endpoints?: readonly ConfigurationUpstream[];
44
46
  }
45
- export interface ConfigurationServiceRoute extends ConfigurationRouteBase {
46
- readonly service_references: readonly [ServiceReference, ...ServiceReference[]];
47
- readonly endpoints?: never;
48
- }
49
- export interface ConfigurationDirectRoute extends ConfigurationRouteBase {
50
- readonly service_references?: never;
51
- readonly endpoints: readonly ConfigurationUpstream[];
52
- }
53
- export type ConfigurationRoute = ConfigurationServiceRoute | ConfigurationDirectRoute;
54
47
  type ConfigurationGlobalPolicy = Omit<AppConfig, 'config_version' | 'plugins' | 'services' | 'routes'>;
55
48
  export interface LogicalConfiguration extends ConfigurationGlobalPolicy {
56
49
  readonly services: readonly ConfigurationService[];
@@ -7,6 +7,7 @@ export declare const DAEMON_BOOT_HEADER: "x-bungee-daemon-boot";
7
7
  export declare const DAEMON_INSTANCE_HEADER: "x-bungee-daemon-instance";
8
8
  export declare const DAEMON_PID_HEADER: "x-bungee-daemon-pid";
9
9
  export declare const DAEMON_PROCESS_IDENTITY_MARKER_PREFIX: "--bungee-process-identity=";
10
+ export declare const DAEMON_UPDATES_PATH: "/__bungee/internal/daemon/updates";
10
11
  type DaemonMetadataBase = {
11
12
  readonly schema: typeof DAEMON_METADATA_SCHEMA;
12
13
  readonly launcher_pid: number;
@@ -7,6 +7,7 @@ export const DAEMON_BOOT_HEADER = 'x-bungee-daemon-boot';
7
7
  export const DAEMON_INSTANCE_HEADER = 'x-bungee-daemon-instance';
8
8
  export const DAEMON_PID_HEADER = 'x-bungee-daemon-pid';
9
9
  export const DAEMON_PROCESS_IDENTITY_MARKER_PREFIX = '--bungee-process-identity=';
10
+ export const DAEMON_UPDATES_PATH = '/__bungee/internal/daemon/updates';
10
11
  export class DaemonMetadataCodecError extends Error {
11
12
  constructor(code, message = code) {
12
13
  super(message);
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './publication-policy.js';
6
6
  export * from './sse-log.js';
7
7
  export * from './plugin-config-contract.js';
8
8
  export * from './menus.js';
9
+ export * from './system-updates.js';
package/dist/index.js CHANGED
@@ -6,3 +6,4 @@ export * from './publication-policy.js';
6
6
  export * from './sse-log.js';
7
7
  export * from './plugin-config-contract.js';
8
8
  export * from './menus.js';
9
+ export * from './system-updates.js';
@@ -0,0 +1,25 @@
1
+ export type UpdateOperation = {
2
+ id: string;
3
+ source_version: string;
4
+ target_version: string;
5
+ phase: 'downloading' | 'verifying' | 'awaiting_confirmation' | 'stopping' | 'restarting' | 'succeeded' | 'failed' | 'cancelled';
6
+ error: string | null;
7
+ started_at: number;
8
+ updated_at: number;
9
+ };
10
+ export type SystemUpdateStatus = {
11
+ running_version: string;
12
+ selected_version: string | null;
13
+ latest: {
14
+ version: string;
15
+ published_at: string;
16
+ url: string;
17
+ asset_ready: boolean;
18
+ } | null;
19
+ checked_at: number | null;
20
+ check_error: string | null;
21
+ checking: boolean;
22
+ can_upgrade: boolean;
23
+ unavailable_reason: string | null;
24
+ operation: UpdateOperation | null;
25
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeffusion/bungee-types",
3
- "version": "6.5.1",
3
+ "version": "6.7.0",
4
4
  "description": "TypeScript type definitions for Bungee",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",