@habeetat/cli 0.1.0-dev.20260618151825.d2eef59 → 0.1.0-dev.20260619123920.2f9dafc

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/bin.js CHANGED
@@ -13069,6 +13069,15 @@ async function composeRestart(opts) {
13069
13069
  stdio: opts.silent ? "pipe" : "inherit"
13070
13070
  });
13071
13071
  }
13072
+ var SYSTEM_APP_LOGTO_IDS = {
13073
+ launcher: "nhp-launcher",
13074
+ organizationManager: "nhp-org-manager",
13075
+ platformManager: "nhp-plat-mgr",
13076
+ analytics: "nhp-analytics",
13077
+ m2m: "nhp-m2m-config"
13078
+ };
13079
+
13080
+ // src/commands/init.ts
13072
13081
  var INITIALIZED_FILE = ".initialized";
13073
13082
  function isInitialized(projectDir) {
13074
13083
  return fs2__default.default.existsSync(path3__default.default.join(projectDir, INITIALIZED_FILE));
@@ -13159,7 +13168,7 @@ function buildSeedLogtoAppsSql(env2) {
13159
13168
  const platformManagerUrl = env2.PLATFORM_MANAGER_URL || `${protocol}://platform-manager.${domain}`;
13160
13169
  const analyticsUrl = env2.ANALYTICS_URL || `${protocol}://analytics.${domain}`;
13161
13170
  const apiResource = env2.IAM_AUDIENCE || `${protocol}://api.${domain}/api`;
13162
- const m2mAppId = "nhp-m2m-config";
13171
+ const m2mAppId = SYSTEM_APP_LOGTO_IDS.m2m;
13163
13172
  const m2mAppSecret = env2.LOGTO_M2M_APP_SECRET || "";
13164
13173
  return `BEGIN;
13165
13174
 
@@ -13187,7 +13196,7 @@ SET resource_id = EXCLUDED.resource_id, name = EXCLUDED.name, description = EXCL
13187
13196
  -- Launcher SPA
13188
13197
  INSERT INTO applications (tenant_id, id, name, secret, description, type, oidc_client_metadata, custom_client_metadata, is_third_party)
13189
13198
  VALUES (
13190
- 'default', 'nhp-launcher', 'Habeetat Launcher', 'spa-secret-nhp-launcher', 'Main launcher application', 'SPA',
13199
+ 'default', '${SYSTEM_APP_LOGTO_IDS.launcher}', 'Habeetat Launcher', 'spa-secret-nhp-launcher', 'Main launcher application', 'SPA',
13191
13200
  jsonb_build_object('redirectUris', ARRAY['${launcherUrl}', '${launcherUrl}/callback'], 'postLogoutRedirectUris', ARRAY['${launcherUrl}']),
13192
13201
  '{}'::jsonb, false
13193
13202
  ) ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name, description = EXCLUDED.description, type = EXCLUDED.type, oidc_client_metadata = EXCLUDED.oidc_client_metadata;
@@ -13195,7 +13204,7 @@ VALUES (
13195
13204
  -- Organization Manager SPA
13196
13205
  INSERT INTO applications (tenant_id, id, name, secret, description, type, oidc_client_metadata, custom_client_metadata, is_third_party)
13197
13206
  VALUES (
13198
- 'default', 'nhp-org-manager', 'Organization Manager', 'spa-secret-nhp-org-manager', 'Organization management application', 'SPA',
13207
+ 'default', '${SYSTEM_APP_LOGTO_IDS.organizationManager}', 'Organization Manager', 'spa-secret-nhp-org-manager', 'Organization management application', 'SPA',
13199
13208
  jsonb_build_object('redirectUris', ARRAY['${orgManagerUrl}', '${orgManagerUrl}/callback'], 'postLogoutRedirectUris', ARRAY['${orgManagerUrl}']),
13200
13209
  '{}'::jsonb, false
13201
13210
  ) ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name, description = EXCLUDED.description, type = EXCLUDED.type, oidc_client_metadata = EXCLUDED.oidc_client_metadata;
@@ -13203,7 +13212,7 @@ VALUES (
13203
13212
  -- Platform Manager SPA
13204
13213
  INSERT INTO applications (tenant_id, id, name, secret, description, type, oidc_client_metadata, custom_client_metadata, is_third_party)
13205
13214
  VALUES (
13206
- 'default', 'nhp-plat-mgr', 'Platform Manager', 'spa-secret-nhp-plat-mgr', 'Platform administration application', 'SPA',
13215
+ 'default', '${SYSTEM_APP_LOGTO_IDS.platformManager}', 'Platform Manager', 'spa-secret-nhp-plat-mgr', 'Platform administration application', 'SPA',
13207
13216
  jsonb_build_object('redirectUris', ARRAY['${platformManagerUrl}', '${platformManagerUrl}/callback'], 'postLogoutRedirectUris', ARRAY['${platformManagerUrl}']),
13208
13217
  '{}'::jsonb, false
13209
13218
  ) ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name, description = EXCLUDED.description, type = EXCLUDED.type, oidc_client_metadata = EXCLUDED.oidc_client_metadata;
@@ -13211,7 +13220,7 @@ VALUES (
13211
13220
  -- Analytics SPA
13212
13221
  INSERT INTO applications (tenant_id, id, name, secret, description, type, oidc_client_metadata, custom_client_metadata, is_third_party)
13213
13222
  VALUES (
13214
- 'default', 'nhp-analytics', 'Product Analytics', 'spa-secret-nhp-analytics', 'Product analytics dashboard', 'SPA',
13223
+ 'default', '${SYSTEM_APP_LOGTO_IDS.analytics}', 'Product Analytics', 'spa-secret-nhp-analytics', 'Product analytics dashboard', 'SPA',
13215
13224
  jsonb_build_object('redirectUris', ARRAY['${analyticsUrl}', '${analyticsUrl}/callback'], 'postLogoutRedirectUris', ARRAY['${analyticsUrl}']),
13216
13225
  '{}'::jsonb, false
13217
13226
  ) ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name, description = EXCLUDED.description, type = EXCLUDED.type, oidc_client_metadata = EXCLUDED.oidc_client_metadata;