@platformatic/globals 3.67.0 → 4.0.0-new-config.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/lib/index.d.ts CHANGED
@@ -23,7 +23,26 @@ export interface SharedContext {
23
23
  update (contextUpdate: object, options?: { overwrite?: boolean }): any
24
24
  }
25
25
 
26
- export type Management = Record<string, (...args: any[]) => any>
26
+ export interface Management {
27
+ getRuntimeConfig (): Promise<Record<string, unknown>>
28
+ getRuntimeEnv (): Promise<Record<string, string>>
29
+ getApplicationsIds (): Promise<string[]>
30
+ getApplications (): Promise<{ production: boolean; applications: unknown[] }>
31
+ getWorkers (): Promise<Record<string, unknown>>
32
+ getApplicationDetails (id: string): Promise<unknown>
33
+ getApplicationConfig (id: string): Promise<Record<string, unknown>>
34
+ getApplicationEnv (id: string): Promise<Record<string, string>>
35
+ getApplicationOpenapiSchema (id: string): Promise<unknown>
36
+ getApplicationGraphqlSchema (id: string): Promise<unknown>
37
+ getMetrics (format?: string): Promise<{ metrics: unknown }>
38
+ startApplication (id: string): Promise<void>
39
+ stopApplication (id: string): Promise<void>
40
+ restartApplication (id: string): Promise<void>
41
+ restart (applications?: string[]): Promise<void>
42
+ addApplications (applications: unknown[], start?: boolean): Promise<unknown[]>
43
+ removeApplications (ids: string[]): Promise<unknown[]>
44
+ inject (id: string, injectParams: unknown): Promise<unknown>
45
+ }
27
46
 
28
47
  export interface GlobalGetterOptions {
29
48
  throwOnMissing?: boolean
@@ -79,7 +98,6 @@ export interface PlatformaticGlobal {
79
98
  applicationId: string
80
99
  workerId: number | string
81
100
  root: string
82
- isEntrypoint: boolean
83
101
  basePath: string | null
84
102
  runtimeBasePath: string | null
85
103
  wantsAbsoluteUrls: boolean
@@ -208,9 +226,6 @@ export declare function getWorkerId (options: GlobalGetterOptions): Platformatic
208
226
  export declare function getRoot (options?: RequiredGlobalGetterOptions): PlatformaticGlobal['root']
209
227
  export declare function getRoot (options: OptionalGlobalGetterOptions): PlatformaticGlobal['root'] | undefined
210
228
  export declare function getRoot (options: GlobalGetterOptions): PlatformaticGlobal['root'] | undefined
211
- export declare function isEntrypoint (options?: RequiredGlobalGetterOptions): PlatformaticGlobal['isEntrypoint']
212
- export declare function isEntrypoint (options: OptionalGlobalGetterOptions): PlatformaticGlobal['isEntrypoint'] | undefined
213
- export declare function isEntrypoint (options: GlobalGetterOptions): PlatformaticGlobal['isEntrypoint'] | undefined
214
229
  export declare function getBasePath (options?: RequiredGlobalGetterOptions): PlatformaticGlobal['basePath']
215
230
  export declare function getBasePath (options: OptionalGlobalGetterOptions): PlatformaticGlobal['basePath'] | undefined
216
231
  export declare function getBasePath (options: GlobalGetterOptions): PlatformaticGlobal['basePath'] | undefined
package/lib/index.js CHANGED
@@ -107,10 +107,6 @@ export function getRoot (options) {
107
107
  return getField('root', options)
108
108
  }
109
109
 
110
- export function isEntrypoint (options) {
111
- return getField('isEntrypoint', options)
112
- }
113
-
114
110
  export function getBasePath (options) {
115
111
  return getField('basePath', options)
116
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/globals",
3
- "version": "3.67.0",
3
+ "version": "4.0.0-new-config.0",
4
4
  "description": "Platformatic Global Object Getter",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",