@platformatic/globals 3.0.0-alpha.5 → 3.0.0-alpha.6

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +14 -14
  2. package/package.json +3 -4
package/lib/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface PlatformaticGlobalInterface {
21
21
  host: string
22
22
  port: number
23
23
  config: object
24
- serviceId: string
24
+ applicationId: string
25
25
  workerId: number | string
26
26
  root: string
27
27
  isEntrypoint: boolean
@@ -42,23 +42,23 @@ export interface PlatformaticGlobalInterface {
42
42
  clientSpansAls: AsyncLocalStorage
43
43
 
44
44
  // Caching
45
- onHttpCacheHit(key: string): void
46
- onHttpCacheMiss(key: string): void
47
- invalidateHttpCache(options: InvalidateHttpCacheOptions): void
45
+ onHttpCacheHit (key: string): void
46
+ onHttpCacheMiss (key: string): void
47
+ invalidateHttpCache (options: InvalidateHttpCacheOptions): void
48
48
 
49
49
  // Setters
50
- setBasePath(path: string): void
51
- setOpenapiSchema(schema: object): void
52
- setGraphqlSchema(schema: object): void
53
- setConnectionString(connection: string): void
54
- setCustomHealthCheck(
50
+ setBasePath (path: string): void
51
+ setOpenapiSchema (schema: object): void
52
+ setGraphqlSchema (schema: object): void
53
+ setConnectionString (connection: string): void
54
+ setCustomHealthCheck (
55
55
  healthCheck: () =>
56
56
  | boolean
57
57
  | Promise<boolean>
58
58
  | { status: boolean; statusCode?: number; body?: string }
59
59
  | Promise<{ status: boolean; statusCode?: number; body?: string }>
60
60
  ): void
61
- setCustomReadinessCheck(
61
+ setCustomReadinessCheck (
62
62
  readinessCheck: () =>
63
63
  | boolean
64
64
  | Promise<boolean>
@@ -68,12 +68,12 @@ export interface PlatformaticGlobalInterface {
68
68
 
69
69
  // Messaging
70
70
  messaging: {
71
- send(name: string, message: any, options?: Record<string, any>): Promise<any>
72
- handle(message: Record<string, Handler>): void
73
- handle(message: string, handler: Handler): void
71
+ send (name: string, message: any, options?: Record<string, any>): Promise<any>
72
+ handle (message: Record<string, Handler>): void
73
+ handle (message: string, handler: Handler): void
74
74
  }
75
75
  }
76
76
 
77
77
  export type PlatformaticGlobal = Optional<PlatformaticGlobalInterface>
78
- export declare function getGlobal<T = {}>(): PlatformaticGlobal & T
78
+ export declare function getGlobal<T = {}> (): PlatformaticGlobal & T
79
79
  export default getGlobal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/globals",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.0-alpha.6",
4
4
  "description": "Platformatic Global Object Getter",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -18,7 +18,7 @@
18
18
  "homepage": "https://github.com/platformatic/platformatic#readme",
19
19
  "devDependencies": {
20
20
  "@types/node": "^22.10.6",
21
- "borp": "^0.20.0",
21
+ "cleaner-spec-reporter": "^0.5.0",
22
22
  "eslint": "^9.18.0",
23
23
  "neostandard": "^0.12.0",
24
24
  "typescript": "^5.7.3"
@@ -31,8 +31,7 @@
31
31
  "node": ">=22.18.0"
32
32
  },
33
33
  "scripts": {
34
- "test": "npm run lint",
35
- "coverage": "npm run lint && borp -C -X test",
34
+ "test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
36
35
  "lint": "eslint"
37
36
  }
38
37
  }