spine-framework 0.3.102 → 0.3.104

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.
@@ -40,8 +40,15 @@ function App() {
40
40
  <Route path="/register" element={<RegisterPage />} />
41
41
  <Route path="/forgot-password" element={<ForgotPasswordPage />} />
42
42
  <Route path="/auth/confirm" element={<AuthConfirmPage />} />
43
- {/* / shows setup instructions when no user is logged in */}
44
- <Route path="/" element={<SetupPage />} />
43
+ {/* / shows setup instructions only when VITE_SETUP_MODE=true */}
44
+ <Route
45
+ path="/"
46
+ element={
47
+ import.meta.env.VITE_SETUP_MODE === 'true'
48
+ ? <SetupPage />
49
+ : <Navigate to="/login" replace />
50
+ }
51
+ />
45
52
  <Route path="*" element={<Navigate to="/login" replace />} />
46
53
  </Routes>
47
54
  ) : user.status === 'pending' ? (
@@ -148,7 +148,9 @@ export function AppsRegistryProvider({ children }: AppsRegistryProviderProps) {
148
148
  const appMatchesDomain = (app: AppRecord): boolean => {
149
149
  const domain = environment === 'preview' ? app.preview_domain : app.prod_domain
150
150
  if (!domain) return true
151
- return currentHost === domain.split(':')[0]
151
+ // Accept both "hostname.com" and "https://hostname.com" formats
152
+ const hostname = domain.includes('://') ? new URL(domain).hostname : domain.split(':')[0]
153
+ return currentHost === hostname
152
154
  }
153
155
 
154
156
  const routableApps = apps.filter(
@@ -73,7 +73,9 @@ export function useApps(): UseAppsResult {
73
73
  const appMatchesDomain = (app: AppRecord): boolean => {
74
74
  const domain = environment === 'preview' ? app.preview_domain : app.prod_domain
75
75
  if (!domain) return true
76
- return currentHost === domain.split(':')[0]
76
+ // Accept both "hostname.com" and "https://hostname.com" formats
77
+ const hostname = domain.includes('://') ? new URL(domain).hostname : domain.split(':')[0]
78
+ return currentHost === hostname
77
79
  }
78
80
 
79
81
  // Filter by user's roles: include app if user has any of the required_roles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.102",
3
+ "version": "0.3.104",
4
4
  "description": "Multi-tenant, modular application platform for modern SaaS systems",
5
5
  "type": "module",
6
6
  "bin": {