@absolutejs/absolute 0.19.0-beta.671 → 0.19.0-beta.672

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.
@@ -1,11 +1,11 @@
1
- import type { WorkspaceServiceVisibility } from '../../types/build';
1
+ import type { ServiceVisibility } from '../../types/build';
2
2
  type WorkspaceTuiStatus = 'pending' | 'starting' | 'ready' | 'paused' | 'restarting' | 'stopped' | 'error';
3
3
  type WorkspaceTuiLogLevel = 'info' | 'warn' | 'error' | 'success';
4
4
  type WorkspaceTuiService = {
5
5
  name: string;
6
6
  port?: number;
7
7
  url?: string | null;
8
- visibility: WorkspaceServiceVisibility;
8
+ visibility: ServiceVisibility;
9
9
  };
10
10
  type WorkspaceTuiActions = {
11
11
  open: () => void | Promise<void>;
@@ -1 +1,2 @@
1
- export declare const loadConfig: (configPath?: string) => Promise<any>;
1
+ import type { BuildConfig } from '../../types/build';
2
+ export declare const loadConfig: (configPath?: string) => Promise<BuildConfig>;
@@ -23,38 +23,13 @@ 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 WorkspaceHealthcheckConfig = string | {
26
+ export type ServiceHealthcheckConfig = string | {
27
27
  url: string;
28
28
  intervalMs?: number;
29
29
  timeoutMs?: number;
30
30
  };
31
- export type WorkspaceServiceVisibility = 'public' | 'internal';
32
- export type WorkspaceAbsoluteServiceConfig = {
33
- kind: 'absolute';
34
- cwd?: string;
35
- entry?: string;
36
- config?: string;
37
- dependsOn?: string[];
38
- env?: Record<string, string>;
39
- healthcheck?: WorkspaceHealthcheckConfig;
40
- port?: number;
41
- visibility?: WorkspaceServiceVisibility;
42
- };
43
- export type WorkspaceCommandServiceConfig = {
44
- kind: 'command';
45
- command: string[];
46
- cwd?: string;
47
- dependsOn?: string[];
48
- env?: Record<string, string>;
49
- healthcheck?: WorkspaceHealthcheckConfig;
50
- port?: number;
51
- visibility?: WorkspaceServiceVisibility;
52
- };
53
- export type WorkspaceServiceConfig = WorkspaceAbsoluteServiceConfig | WorkspaceCommandServiceConfig;
54
- export type WorkspaceConfig = {
55
- services: Record<string, WorkspaceServiceConfig>;
56
- };
57
- export type BuildConfig = {
31
+ export type ServiceVisibility = 'public' | 'internal';
32
+ export type BaseBuildConfig = {
58
33
  buildDirectory?: string;
59
34
  assetsDirectory?: string;
60
35
  publicDirectory?: string;
@@ -89,7 +64,34 @@ export type BuildConfig = {
89
64
  static?: StaticConfig;
90
65
  images?: ImageConfig;
91
66
  sitemap?: SitemapConfig;
92
- workspace?: WorkspaceConfig;
67
+ };
68
+ export type AbsoluteServiceConfig = BaseBuildConfig & {
69
+ kind?: 'absolute';
70
+ cwd?: string;
71
+ config?: string;
72
+ dependsOn?: string[];
73
+ entry?: string;
74
+ env?: Record<string, string>;
75
+ healthcheck?: ServiceHealthcheckConfig;
76
+ port?: number;
77
+ visibility?: ServiceVisibility;
78
+ command?: never;
79
+ };
80
+ export type CommandServiceConfig = {
81
+ kind: 'command';
82
+ command: string[];
83
+ cwd?: string;
84
+ dependsOn?: string[];
85
+ env?: Record<string, string>;
86
+ healthcheck?: ServiceHealthcheckConfig;
87
+ port?: number;
88
+ visibility?: ServiceVisibility;
89
+ entry?: never;
90
+ config?: never;
91
+ };
92
+ export type ServiceConfig = AbsoluteServiceConfig | CommandServiceConfig;
93
+ export type BuildConfig = BaseBuildConfig & {
94
+ services?: Record<string, ServiceConfig>;
93
95
  };
94
96
  export type BuildResult = ReturnType<typeof build>;
95
97
  export type DevBuildResult = ReturnType<typeof devBuild>;
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.671"
305
+ "version": "0.19.0-beta.672"
306
306
  }