astro-tractstack 2.0.33 → 2.0.34

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/index.js CHANGED
@@ -839,10 +839,6 @@ async function w(t, e, c) {
839
839
  src: t("../templates/src/pages/storykeep.astro"),
840
840
  dest: "src/pages/storykeep.astro"
841
841
  },
842
- {
843
- src: t("../templates/src/pages/storykeep/init.astro"),
844
- dest: "src/pages/storykeep/init.astro"
845
- },
846
842
  {
847
843
  src: t("../templates/src/pages/storykeep/content.astro"),
848
844
  dest: "src/pages/storykeep/content.astro"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-tractstack",
3
- "version": "2.0.33",
3
+ "version": "2.0.34",
4
4
  "description": "Astro integration for TractStack - redeeming the web from boring experiences",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -848,10 +848,6 @@ export async function injectTemplateFiles(
848
848
  src: resolve('../templates/src/pages/storykeep.astro'),
849
849
  dest: 'src/pages/storykeep.astro',
850
850
  },
851
- {
852
- src: resolve('../templates/src/pages/storykeep/init.astro'),
853
- dest: 'src/pages/storykeep/init.astro',
854
- },
855
851
  {
856
852
  src: resolve('../templates/src/pages/storykeep/content.astro'),
857
853
  dest: 'src/pages/storykeep/content.astro',
@@ -1,75 +0,0 @@
1
- ---
2
- import { freshInstallStore } from '@/stores/backend';
3
- import { preHealthCheck } from '@/utils/backend';
4
- import RegistrationForm from '@/components/tenant/RegistrationForm';
5
-
6
- const tenantId =
7
- Astro.locals.tenant?.id || import.meta.env.PUBLIC_TENANTID || 'default';
8
- await preHealthCheck(tenantId);
9
-
10
- const { needsSetup } = freshInstallStore.get();
11
-
12
- if (!needsSetup) {
13
- return Astro.redirect('/storykeep');
14
- }
15
-
16
- const isDev = import.meta.env.DEV;
17
- const isInitialized = !freshInstallStore.get().needsSetup;
18
- const cssBasePath = isInitialized ? '/media/css' : '/styles';
19
- const mainStylesUrl = isDev
20
- ? `${cssBasePath}/storykeep.css`
21
- : `${cssBasePath}/frontend.css`;
22
- ---
23
-
24
- <!doctype html>
25
- <html lang="en" class="h-full bg-gray-50">
26
- <head>
27
- <meta charset="UTF-8" />
28
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
29
- <title>Initialize TractStack</title>
30
- <link rel="stylesheet" href={`${cssBasePath}/custom.css`} />
31
- <link rel="stylesheet" href={mainStylesUrl} />
32
- </head>
33
- <body class="h-full">
34
- <div class="max-w-5xl p-3.5 md:p-8">
35
- <RegistrationForm client:load isInitMode={true} />
36
- </div>
37
-
38
- <script>
39
- // Ensure clean slate for fresh installation
40
- (function initCleanSlate() {
41
- try {
42
- // Clear admin/editor auth cookies
43
- document.cookie =
44
- 'admin_auth=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax';
45
- document.cookie =
46
- 'editor_auth=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax';
47
-
48
- // Clear all TractStack localStorage items
49
- const tractStackKeys = [];
50
- for (let i = 0; i < localStorage.length; i++) {
51
- const key = localStorage.key(i);
52
- if (key && key.startsWith('tractstack_')) {
53
- tractStackKeys.push(key);
54
- }
55
- }
56
- tractStackKeys.forEach((key) => localStorage.removeItem(key));
57
-
58
- // Clear session-related items
59
- localStorage.removeItem('tractstack_session_id');
60
- localStorage.removeItem('tractstack_fingerprint');
61
- localStorage.removeItem('tractstack_visit');
62
- localStorage.removeItem('tractstack_entered_tracked');
63
-
64
- // Clear session cookie
65
- document.cookie =
66
- 'tractstack_session_id=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax';
67
-
68
- console.log('TractStack: Clean slate initialization complete');
69
- } catch (error) {
70
- console.warn('TractStack: Error during clean slate init:', error);
71
- }
72
- })();
73
- </script>
74
- </body>
75
- </html>