@jeffusion/bungee-types 4.3.0 → 4.4.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/dist/index.d.ts CHANGED
@@ -1 +1,4 @@
1
- export * from './types';
1
+ export * from './types.js';
2
+ export * from './config-v2.js';
3
+ export * from './rate-limit.js';
4
+ export * from './daemon-control.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './types.js';
2
+ export * from './config-v2.js';
3
+ export * from './rate-limit.js';
4
+ export * from './daemon-control.js';
@@ -0,0 +1,3 @@
1
+ /** Shared configuration bounds; runtime protocol enforces the same contract. */
2
+ export declare const RATE_LIMIT_MAX_RPS = 1000000;
3
+ export declare const RATE_LIMIT_MAX_BURST = 1000000;
@@ -0,0 +1,3 @@
1
+ /** Shared configuration bounds; runtime protocol enforces the same contract. */
2
+ export const RATE_LIMIT_MAX_RPS = 1000000;
3
+ export const RATE_LIMIT_MAX_BURST = 1000000;
package/dist/types.d.ts CHANGED
@@ -212,6 +212,8 @@ export interface RetryConfig {
212
212
  per_retry_timeout_ms?: number;
213
213
  }
214
214
  export interface RouteConfig extends ModificationRules {
215
+ /** Stable logical route identity, present only in compiled runtime config. */
216
+ id?: string;
215
217
  path: string;
216
218
  service?: string;
217
219
  endpoints?: Endpoint[];
@@ -241,6 +243,8 @@ export interface LoggingConfig {
241
243
  * 2. 通过 path 引用(高级):手动指定插件文件路径
242
244
  */
243
245
  export interface PluginConfig {
246
+ /** Persisted plugin binding identity, when materialized from V2 configuration. */
247
+ id?: string;
244
248
  /**
245
249
  * Plugin 名称(唯一标识符)
246
250
  * 这是插件的唯一标识,用于引用和管理插件
@@ -293,3 +297,4 @@ export interface AppConfig {
293
297
  services?: Service[];
294
298
  routes: RouteConfig[];
295
299
  }
300
+ export { decodeDaemonMetadataV1, encodeDaemonMetadataV1, parseDaemonMetadataV1, validateDaemonMetadataV1, } from './daemon-control.js';
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ // --- Type Definitions ---
2
+ export { decodeDaemonMetadataV1, encodeDaemonMetadataV1, parseDaemonMetadataV1, validateDaemonMetadataV1, } from './daemon-control.js';
package/package.json CHANGED
@@ -1,20 +1,30 @@
1
1
  {
2
2
  "name": "@jeffusion/bungee-types",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "TypeScript type definitions for Bungee",
5
- "main": "./dist/index.d.ts",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
6
7
  "types": "./dist/index.d.ts",
7
8
  "scripts": {
8
9
  "build": "tsc",
9
10
  "prepublishOnly": "bun run build",
10
- "test": "echo 'No tests for types package yet'"
11
+ "test": "bun run build && bun test tests/published-runtime.test.ts"
11
12
  },
12
13
  "exports": {
13
14
  ".": {
14
- "types": "./dist/index.d.ts"
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "default": "./dist/index.js"
15
18
  },
16
19
  "./types": {
17
- "types": "./dist/types.d.ts"
20
+ "types": "./dist/types.d.ts",
21
+ "import": "./dist/types.js",
22
+ "default": "./dist/types.js"
23
+ },
24
+ "./daemon-file": {
25
+ "types": "./dist/daemon-file.d.ts",
26
+ "import": "./dist/daemon-file.js",
27
+ "default": "./dist/daemon-file.js"
18
28
  }
19
29
  },
20
30
  "keywords": [