@wtfalch/foundry 0.22.5 → 0.23.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.
@@ -0,0 +1,20 @@
1
+ -- @wtfalch/foundry: the Coolify panel's address, added to the declared
2
+ -- platform so the platform's hostnames include it. Mirrors `src/store/schema.ts`'s
3
+ -- `foundryDeclaredPlatform` table additions. Foundry never deploys the panel:
4
+ -- `coolify_enabled` stays false and `coolify_git_ref` empty. Backfills
5
+ -- `coolify_hostname` the same way `0046_platform_hc.sql` backfilled
6
+ -- `hc_hostname`: the column must not be empty (`src/platform.ts`'s
7
+ -- `validatePlatform`), and the table already carries its one live row by the
8
+ -- time this runs.
9
+
10
+ alter table foundry_declared_platform
11
+ add column if not exists coolify_enabled boolean not null default false,
12
+ add column if not exists coolify_hostname text,
13
+ add column if not exists coolify_git_ref text not null default '';
14
+
15
+ update foundry_declared_platform
16
+ set coolify_hostname = 'coolify.' || apex
17
+ where coolify_hostname is null;
18
+
19
+ alter table foundry_declared_platform
20
+ alter column coolify_hostname set not null;
@@ -30,7 +30,7 @@ export interface PlatformMailService extends PlatformService {
30
30
  * holds the Cloudflare token `<username>.<org domain>` claims use, so no
31
31
  * hosting entry ever holds that credential itself.
32
32
  */
33
- export type PlatformServiceKey = 'auth' | 'mail' | 'sfu' | 'files' | 'ai' | 'jobs' | 'integrations' | 'archon' | 'edge' | 'hc';
33
+ export type PlatformServiceKey = 'auth' | 'mail' | 'sfu' | 'files' | 'ai' | 'jobs' | 'integrations' | 'archon' | 'edge' | 'hc' | 'coolify';
34
34
  export declare const PLATFORM_SERVICE_KEYS: readonly PlatformServiceKey[];
35
35
  /**
36
36
  * The one shared platform every org's services run on -- decided in #165 as
@@ -81,6 +81,12 @@ export interface DeclaredPlatform {
81
81
  * `plan/platform-diff.ts`'s `planHeartbeats`.
82
82
  */
83
83
  hc: PlatformService;
84
+ /**
85
+ * The Coolify panel. Its address is declared so the platform's hostnames
86
+ * include it; foundry never deploys it, so `enabled` stays false and
87
+ * `gitRef` empty.
88
+ */
89
+ coolify: PlatformService;
84
90
  }
85
91
  /** `<service>.<apex>` -- the default `hostname` for a platform service, before an operator overrides it. */
86
92
  export declare function defaultPlatformHostname(service: PlatformServiceKey, apex: string): string;
package/dist/platform.js CHANGED
@@ -11,6 +11,7 @@ export const PLATFORM_SERVICE_KEYS = [
11
11
  'archon',
12
12
  'edge',
13
13
  'hc',
14
+ 'coolify',
14
15
  ];
15
16
  /** `<service>.<apex>` -- the default `hostname` for a platform service, before an operator overrides it. */
16
17
  export function defaultPlatformHostname(service, apex) {
@@ -608,6 +608,11 @@ function rowToPlatform(row) {
608
608
  hostname: row.hcHostname,
609
609
  gitRef: row.hcGitRef,
610
610
  },
611
+ coolify: {
612
+ enabled: row.coolifyEnabled,
613
+ hostname: row.coolifyHostname,
614
+ gitRef: row.coolifyGitRef,
615
+ },
611
616
  };
612
617
  }
613
618
  function platformToRow(platform) {
@@ -647,6 +652,9 @@ function platformToRow(platform) {
647
652
  hcEnabled: platform.hc.enabled,
648
653
  hcHostname: platform.hc.hostname,
649
654
  hcGitRef: platform.hc.gitRef,
655
+ coolifyEnabled: platform.coolify.enabled,
656
+ coolifyHostname: platform.coolify.hostname,
657
+ coolifyGitRef: platform.coolify.gitRef,
650
658
  };
651
659
  }
652
660
  /**
@@ -1983,6 +1983,57 @@ export declare const foundryDeclaredPlatform: import("drizzle-orm/pg-core").PgTa
1983
1983
  identity: undefined;
1984
1984
  generated: undefined;
1985
1985
  }, {}, {}>;
1986
+ coolifyEnabled: import("drizzle-orm/pg-core").PgColumn<{
1987
+ name: "coolify_enabled";
1988
+ tableName: "foundry_declared_platform";
1989
+ dataType: "boolean";
1990
+ columnType: "PgBoolean";
1991
+ data: boolean;
1992
+ driverParam: boolean;
1993
+ notNull: true;
1994
+ hasDefault: true;
1995
+ isPrimaryKey: false;
1996
+ isAutoincrement: false;
1997
+ hasRuntimeDefault: false;
1998
+ enumValues: undefined;
1999
+ baseColumn: never;
2000
+ identity: undefined;
2001
+ generated: undefined;
2002
+ }, {}, {}>;
2003
+ coolifyHostname: import("drizzle-orm/pg-core").PgColumn<{
2004
+ name: "coolify_hostname";
2005
+ tableName: "foundry_declared_platform";
2006
+ dataType: "string";
2007
+ columnType: "PgText";
2008
+ data: string;
2009
+ driverParam: string;
2010
+ notNull: true;
2011
+ hasDefault: false;
2012
+ isPrimaryKey: false;
2013
+ isAutoincrement: false;
2014
+ hasRuntimeDefault: false;
2015
+ enumValues: [string, ...string[]];
2016
+ baseColumn: never;
2017
+ identity: undefined;
2018
+ generated: undefined;
2019
+ }, {}, {}>;
2020
+ coolifyGitRef: import("drizzle-orm/pg-core").PgColumn<{
2021
+ name: "coolify_git_ref";
2022
+ tableName: "foundry_declared_platform";
2023
+ dataType: "string";
2024
+ columnType: "PgText";
2025
+ data: string;
2026
+ driverParam: string;
2027
+ notNull: true;
2028
+ hasDefault: true;
2029
+ isPrimaryKey: false;
2030
+ isAutoincrement: false;
2031
+ hasRuntimeDefault: false;
2032
+ enumValues: [string, ...string[]];
2033
+ baseColumn: never;
2034
+ identity: undefined;
2035
+ generated: undefined;
2036
+ }, {}, {}>;
1986
2037
  serviceIds: import("drizzle-orm/pg-core").PgColumn<{
1987
2038
  name: "service_ids";
1988
2039
  tableName: "foundry_declared_platform";
@@ -186,6 +186,10 @@ export const foundryDeclaredPlatform = pgTable('foundry_declared_platform', {
186
186
  hcEnabled: boolean('hc_enabled').notNull().default(false),
187
187
  hcHostname: text('hc_hostname').notNull(),
188
188
  hcGitRef: text('hc_git_ref').notNull().default(''),
189
+ /** `migrations/0047_platform_coolify.sql`: the Coolify panel's declared address; foundry never deploys it. */
190
+ coolifyEnabled: boolean('coolify_enabled').notNull().default(false),
191
+ coolifyHostname: text('coolify_hostname').notNull(),
192
+ coolifyGitRef: text('coolify_git_ref').notNull().default(''),
189
193
  /** `migrations/0018_platform_apply.sql`: the platform's applied state, `system:kind:key` to provider id. */
190
194
  serviceIds: jsonb('service_ids').$type().notNull().default({}),
191
195
  createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wtfalch/foundry",
3
- "version": "0.22.5",
3
+ "version": "0.23.0",
4
4
  "description": "Foundry's SDK: the declared org's types, the plan and apply contracts, and the state store's interface.",
5
5
  "repository": {
6
6
  "type": "git",