@wtfalch/foundry 0.51.0 → 0.51.2

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/dist/plan/diff.js CHANGED
@@ -600,8 +600,6 @@ export function computePlanDetail(org, live, recordedIds = {}, agoraHost = NO_AG
600
600
  (s.action.desired.homes ?? []).includes(DESKTOP_AUTH_HOME)),
601
601
  });
602
602
  claimed.add(resourceKey('coolify', 'desktop-auth', org.id));
603
- if (desktopAuth.step)
604
- plannedSteps.push(desktopAuth.step);
605
603
  // An own org's scheduler, before its registration below.
606
604
  const ownJobs = planOwnJobs({
607
605
  org,
@@ -714,6 +712,9 @@ export function computePlanDetail(org, live, recordedIds = {}, agoraHost = NO_AG
714
712
  plannedSteps.push(desktopCallbacks);
715
713
  // #444, last: a Postgres step that fails must not stop the zone, mail, app, Agora and Boule steps of a live company.
716
714
  plannedSteps.push(...orgPostgresSteps);
715
+ // After the org-postgres steps: the desktop sign-in service lives on a home they may create in this same plan.
716
+ if (desktopAuth.step)
717
+ plannedSteps.push(desktopAuth.step);
717
718
  plannedSteps.push(...orgPostgresMigration.steps);
718
719
  // #10 (resolved): "foundry manages only what the declared org names";
719
720
  // anything left unclaimed is listed, never proposed for deletion.
@@ -4006,7 +4006,7 @@ async function switchOnArchonIdTokenUserinfo(context, deps) {
4006
4006
  // The planner plans nothing without the method; a stale plan does nothing.
4007
4007
  if (!ownerSignIn || !zitadel?.updateOidcAppIdTokenUserinfoAssertion)
4008
4008
  return {};
4009
- const orgId = ownerSignIn.organisationId;
4009
+ const orgId = recorded[PLATFORM_ARCHON_CLIENT_ORG_SCOPE_KEY] ?? ownerSignIn.organisationId;
4010
4010
  const projectId = recorded[PLATFORM_ARCHON_ZITADEL_PROJECT_SCOPE_KEY];
4011
4011
  const appId = recorded[PLATFORM_ARCHON_ZITADEL_APP_SCOPE_KEY];
4012
4012
  if (!orgId || !projectId || !appId) {
@@ -4091,7 +4091,7 @@ async function registerArchonDesktopCallback(context, deps) {
4091
4091
  if (!ownerSignIn || !zitadel?.getOidcAppRedirectUris || !zitadel.updateOidcAppRedirectUris) {
4092
4092
  return {};
4093
4093
  }
4094
- const orgId = ownerSignIn.organisationId;
4094
+ const orgId = recorded[PLATFORM_ARCHON_CLIENT_ORG_SCOPE_KEY] ?? ownerSignIn.organisationId;
4095
4095
  const projectId = recorded[PLATFORM_ARCHON_ZITADEL_PROJECT_SCOPE_KEY];
4096
4096
  const appId = recorded[PLATFORM_ARCHON_ZITADEL_APP_SCOPE_KEY];
4097
4097
  const hostname = recorded[PLATFORM_ARCHON_CLIENT_HOSTNAME_SCOPE_KEY];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wtfalch/foundry",
3
- "version": "0.51.0",
3
+ "version": "0.51.2",
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",