@absolutejs/absolute 0.19.0-beta.674 → 0.19.0-beta.676

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.
@@ -11,6 +11,6 @@ type TypedCommandServiceConfig<TConfig, TSelf extends string> = Omit<CommandServ
11
11
  type TypedWorkspaceConfig<TConfig extends Record<string, unknown>> = {
12
12
  [K in keyof TConfig]: K extends string ? TypedAbsoluteServiceConfig<TConfig, K> | TypedCommandServiceConfig<TConfig, K> : never;
13
13
  };
14
- type ValidateConfig<TConfig extends Record<string, unknown>> = HasReservedConfigKeys<TConfig> extends true ? TConfig extends AbsoluteServiceConfig ? TConfig : never : TypedWorkspaceConfig<TConfig>;
14
+ type ValidateConfig<TConfig extends Record<string, unknown>> = HasReservedConfigKeys<TConfig> extends true ? AbsoluteServiceConfig : TypedWorkspaceConfig<TConfig>;
15
15
  export declare const defineConfig: <const TConfig extends Record<string, unknown>>(config: TConfig & ValidateConfig<TConfig>) => TConfig & ConfigInput;
16
16
  export {};
@@ -23,11 +23,34 @@ export type StaticConfig = {
23
23
  /** Revalidation interval in seconds. When set, stale pages are re-rendered in the background (ISR). */
24
24
  revalidate?: number;
25
25
  };
26
- export type ServiceHealthcheckConfig = string | {
27
- url: string;
26
+ export type HttpReadyConfig = {
27
+ type?: 'http';
28
+ path?: string;
29
+ url?: string;
30
+ method?: 'GET' | 'HEAD';
31
+ expectStatus?: number | number[];
32
+ headers?: Record<string, string>;
28
33
  intervalMs?: number;
29
34
  timeoutMs?: number;
30
35
  };
36
+ export type TcpReadyConfig = {
37
+ type: 'tcp';
38
+ host?: string;
39
+ port: number;
40
+ intervalMs?: number;
41
+ timeoutMs?: number;
42
+ };
43
+ export type CommandReadyConfig = {
44
+ type: 'command';
45
+ command: string[];
46
+ intervalMs?: number;
47
+ timeoutMs?: number;
48
+ };
49
+ export type DelayReadyConfig = {
50
+ type: 'delay';
51
+ ms: number;
52
+ };
53
+ export type ServiceReadyConfig = false | string | HttpReadyConfig | TcpReadyConfig | CommandReadyConfig | DelayReadyConfig;
31
54
  export type ServiceVisibility = 'public' | 'internal';
32
55
  export type BaseBuildConfig = {
33
56
  buildDirectory?: string;
@@ -72,7 +95,7 @@ export type AbsoluteServiceConfig = BaseBuildConfig & {
72
95
  dependsOn?: string[];
73
96
  entry?: string;
74
97
  env?: Record<string, string>;
75
- healthcheck?: ServiceHealthcheckConfig;
98
+ ready?: ServiceReadyConfig;
76
99
  port?: number;
77
100
  visibility?: ServiceVisibility;
78
101
  command?: never;
@@ -83,7 +106,7 @@ export type CommandServiceConfig = {
83
106
  cwd?: string;
84
107
  dependsOn?: string[];
85
108
  env?: Record<string, string>;
86
- healthcheck?: ServiceHealthcheckConfig;
109
+ ready?: ServiceReadyConfig;
87
110
  port?: number;
88
111
  visibility?: ServiceVisibility;
89
112
  entry?: never;
package/package.json CHANGED
@@ -302,5 +302,5 @@
302
302
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts"
303
303
  },
304
304
  "types": "./dist/src/index.d.ts",
305
- "version": "0.19.0-beta.674"
305
+ "version": "0.19.0-beta.676"
306
306
  }