@uptrademedia/site-kit 1.0.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.
- package/README.md +305 -0
- package/dist/analytics/index.js +88 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/index.mjs +70 -0
- package/dist/analytics/index.mjs.map +1 -0
- package/dist/api-N35S3EES.js +57 -0
- package/dist/api-N35S3EES.js.map +1 -0
- package/dist/api-SYBTK7Z7.mjs +4 -0
- package/dist/api-SYBTK7Z7.mjs.map +1 -0
- package/dist/blog/index.js +200 -0
- package/dist/blog/index.js.map +1 -0
- package/dist/blog/index.mjs +194 -0
- package/dist/blog/index.mjs.map +1 -0
- package/dist/chunk-3MUOUXHV.js +3721 -0
- package/dist/chunk-3MUOUXHV.js.map +1 -0
- package/dist/chunk-4HVYXYQL 2.mjs +255 -0
- package/dist/chunk-4HVYXYQL.mjs +255 -0
- package/dist/chunk-4HVYXYQL.mjs.map +1 -0
- package/dist/chunk-7H6I3ECV.mjs +120 -0
- package/dist/chunk-7H6I3ECV.mjs.map +1 -0
- package/dist/chunk-COI6GOX2.mjs +3679 -0
- package/dist/chunk-COI6GOX2.mjs.map +1 -0
- package/dist/chunk-EQCVQC35.js +35 -0
- package/dist/chunk-EQCVQC35.js 2.map +1 -0
- package/dist/chunk-EQCVQC35.js.map +1 -0
- package/dist/chunk-FEBYQGY4 2.mjs +251 -0
- package/dist/chunk-FEBYQGY4.mjs +251 -0
- package/dist/chunk-FEBYQGY4.mjs.map +1 -0
- package/dist/chunk-FKVJOT2F.mjs +796 -0
- package/dist/chunk-FKVJOT2F.mjs.map +1 -0
- package/dist/chunk-GQ6ZOU2N.mjs +134 -0
- package/dist/chunk-GQ6ZOU2N.mjs.map +1 -0
- package/dist/chunk-HCFPU7TU.js +137 -0
- package/dist/chunk-HCFPU7TU.js.map +1 -0
- package/dist/chunk-NYKRE2FL 2.mjs +31 -0
- package/dist/chunk-NYKRE2FL.mjs +31 -0
- package/dist/chunk-NYKRE2FL.mjs 2.map +1 -0
- package/dist/chunk-NYKRE2FL.mjs.map +1 -0
- package/dist/chunk-QP5NCO2E.js +133 -0
- package/dist/chunk-QP5NCO2E.js.map +1 -0
- package/dist/chunk-RV7H3I6J.js +255 -0
- package/dist/chunk-RV7H3I6J.js 2.map +1 -0
- package/dist/chunk-RV7H3I6J.js.map +1 -0
- package/dist/chunk-SBVEYCSV.js +140 -0
- package/dist/chunk-SBVEYCSV.js.map +1 -0
- package/dist/chunk-TUKGA3UK.js +257 -0
- package/dist/chunk-TUKGA3UK.js 2.map +1 -0
- package/dist/chunk-TUKGA3UK.js.map +1 -0
- package/dist/chunk-V3F5J6CV.js +801 -0
- package/dist/chunk-V3F5J6CV.js.map +1 -0
- package/dist/chunk-WPSRS352.mjs +135 -0
- package/dist/chunk-WPSRS352.mjs.map +1 -0
- package/dist/commerce/index.js +157 -0
- package/dist/commerce/index.js.map +1 -0
- package/dist/commerce/index.mjs +4 -0
- package/dist/commerce/index.mjs.map +1 -0
- package/dist/commerce/server.js +186 -0
- package/dist/commerce/server.js.map +1 -0
- package/dist/commerce/server.mjs +176 -0
- package/dist/commerce/server.mjs.map +1 -0
- package/dist/engage/index.js +50 -0
- package/dist/engage/index.js.map +1 -0
- package/dist/engage/index.mjs +44 -0
- package/dist/engage/index.mjs.map +1 -0
- package/dist/forms/index.js +1053 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/index.mjs +1035 -0
- package/dist/forms/index.mjs.map +1 -0
- package/dist/generators-7Y5ABRYV 2.mjs +161 -0
- package/dist/generators-7Y5ABRYV.mjs +161 -0
- package/dist/generators-7Y5ABRYV.mjs 2.map +1 -0
- package/dist/generators-7Y5ABRYV.mjs.map +1 -0
- package/dist/generators-GWIYCA5M.js +171 -0
- package/dist/generators-GWIYCA5M.js 2.map +1 -0
- package/dist/generators-GWIYCA5M.js.map +1 -0
- package/dist/index 2.mjs +74 -0
- package/dist/index.js +326 -0
- package/dist/index.js 2.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +222 -0
- package/dist/index.mjs.map +1 -0
- package/dist/migrator-V6KS75EA 2.mjs +265 -0
- package/dist/migrator-V6KS75EA.mjs +265 -0
- package/dist/migrator-V6KS75EA.mjs 2.map +1 -0
- package/dist/migrator-V6KS75EA.mjs.map +1 -0
- package/dist/migrator-XKM7YQCY.js +272 -0
- package/dist/migrator-XKM7YQCY.js 2.map +1 -0
- package/dist/migrator-XKM7YQCY.js.map +1 -0
- package/dist/scanner-MF7P3CDE 2.mjs +14386 -0
- package/dist/scanner-MF7P3CDE.mjs +14386 -0
- package/dist/scanner-MF7P3CDE.mjs 2.map +1 -0
- package/dist/scanner-MF7P3CDE.mjs.map +1 -0
- package/dist/scanner-NT6YG4TD 2.js +14397 -0
- package/dist/scanner-NT6YG4TD.js +14397 -0
- package/dist/scanner-NT6YG4TD.js 2.map +1 -0
- package/dist/scanner-NT6YG4TD.js.map +1 -0
- package/dist/seo/index.js +447 -0
- package/dist/seo/index.js.map +1 -0
- package/dist/seo/index.mjs +411 -0
- package/dist/seo/index.mjs.map +1 -0
- package/dist/seo/server.js +66 -0
- package/dist/seo/server.js.map +1 -0
- package/dist/seo/server.mjs +5 -0
- package/dist/seo/server.mjs.map +1 -0
- package/dist/setup/index.js +1050 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/index.mjs +1046 -0
- package/dist/setup/index.mjs.map +1 -0
- package/dist/sitemap/index.js +212 -0
- package/dist/sitemap/index.js.map +1 -0
- package/dist/sitemap/index.mjs +206 -0
- package/dist/sitemap/index.mjs.map +1 -0
- package/dist/web-vitals-BH55V7EJ.js +252 -0
- package/dist/web-vitals-BH55V7EJ.js 2.map +1 -0
- package/dist/web-vitals-BH55V7EJ.js.map +1 -0
- package/dist/web-vitals-RJYPWAR3 2.mjs +241 -0
- package/dist/web-vitals-RJYPWAR3.mjs +241 -0
- package/dist/web-vitals-RJYPWAR3.mjs 2.map +1 -0
- package/dist/web-vitals-RJYPWAR3.mjs.map +1 -0
- package/package.json +118 -0
|
@@ -0,0 +1,1050 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../chunk-EQCVQC35.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var server = require('next/server');
|
|
7
|
+
|
|
8
|
+
function SetupWizard({ config } = {}) {
|
|
9
|
+
const [step, setStep] = react.useState("welcome");
|
|
10
|
+
const [isLoading, setIsLoading] = react.useState(false);
|
|
11
|
+
const [error, setError] = react.useState(null);
|
|
12
|
+
const [isAuthenticated, setIsAuthenticated] = react.useState(false);
|
|
13
|
+
const [userEmail, setUserEmail] = react.useState(null);
|
|
14
|
+
const [accessToken, setAccessToken] = react.useState(null);
|
|
15
|
+
const [organizations, setOrganizations] = react.useState([]);
|
|
16
|
+
const [selectedOrg, setSelectedOrg] = react.useState(null);
|
|
17
|
+
const [selectedProject, setSelectedProject] = react.useState(null);
|
|
18
|
+
const [newProjectName, setNewProjectName] = react.useState("");
|
|
19
|
+
const [newProjectDomain, setNewProjectDomain] = react.useState("");
|
|
20
|
+
const [scanResults, setScanResults] = react.useState(null);
|
|
21
|
+
const [migrationProgress, setMigrationProgress] = react.useState(0);
|
|
22
|
+
const [migrationLog, setMigrationLog] = react.useState([]);
|
|
23
|
+
const portalApiUrl = config?.portalApiUrl || "http://localhost:3002";
|
|
24
|
+
react.useCallback(async (path, options = {}) => {
|
|
25
|
+
const headers = {
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
...options.headers || {}
|
|
28
|
+
};
|
|
29
|
+
if (accessToken) {
|
|
30
|
+
headers["Authorization"] = `Bearer ${accessToken}`;
|
|
31
|
+
}
|
|
32
|
+
return fetch(`${portalApiUrl}${path}`, {
|
|
33
|
+
...options,
|
|
34
|
+
headers
|
|
35
|
+
});
|
|
36
|
+
}, [portalApiUrl, accessToken]);
|
|
37
|
+
react.useEffect(() => {
|
|
38
|
+
checkExistingConfig();
|
|
39
|
+
}, []);
|
|
40
|
+
async function checkExistingConfig() {
|
|
41
|
+
try {
|
|
42
|
+
const localRes = await fetch("/_uptrade/api/status");
|
|
43
|
+
const localData = await localRes.json();
|
|
44
|
+
if (localData.configured) {
|
|
45
|
+
setStep("complete");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const storedToken = localStorage.getItem("uptrade_access_token");
|
|
49
|
+
if (storedToken) {
|
|
50
|
+
setAccessToken(storedToken);
|
|
51
|
+
const res = await fetch(`${portalApiUrl}/setup/session`, {
|
|
52
|
+
headers: { "Authorization": `Bearer ${storedToken}` }
|
|
53
|
+
});
|
|
54
|
+
const data = await res.json();
|
|
55
|
+
if (data.authenticated) {
|
|
56
|
+
setIsAuthenticated(true);
|
|
57
|
+
setUserEmail(data.email);
|
|
58
|
+
setStep("project");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function WelcomeStep() {
|
|
65
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-6xl mb-4", children: "\u{1F680}" }),
|
|
68
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold mb-2", children: "Welcome to Uptrade Site-Kit" }),
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400 text-lg", children: "Let's set up your project in just a few steps" })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-4 my-8", children: [
|
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
+
FeatureCard,
|
|
74
|
+
{
|
|
75
|
+
icon: "\u{1F4CA}",
|
|
76
|
+
title: "Analytics",
|
|
77
|
+
description: "Track page views, events, and user sessions"
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
+
FeatureCard,
|
|
82
|
+
{
|
|
83
|
+
icon: "\u{1F4DD}",
|
|
84
|
+
title: "Forms",
|
|
85
|
+
description: "Managed forms with validation and submissions"
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
FeatureCard,
|
|
90
|
+
{
|
|
91
|
+
icon: "\u{1F4AC}",
|
|
92
|
+
title: "Engage",
|
|
93
|
+
description: "Popups, nudges, and live chat widgets"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => setStep("auth"), children: "Get Started \u2192" }) })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
function AuthStep() {
|
|
101
|
+
const [email, setEmail] = react.useState("");
|
|
102
|
+
const [password, setPassword] = react.useState("");
|
|
103
|
+
const [authMode, setAuthMode] = react.useState("login");
|
|
104
|
+
async function handleLogin() {
|
|
105
|
+
if (!email.trim() || !password.trim()) return;
|
|
106
|
+
setIsLoading(true);
|
|
107
|
+
setError(null);
|
|
108
|
+
try {
|
|
109
|
+
const supabaseUrl = config?.url || "https://mwcjtnoqxolplwpkxnfe.supabase.co";
|
|
110
|
+
const supabaseKey = config?.anonKey || "";
|
|
111
|
+
const authRes = await fetch(`${supabaseUrl}/auth/v1/token?grant_type=password`, {
|
|
112
|
+
method: "POST",
|
|
113
|
+
headers: {
|
|
114
|
+
"Content-Type": "application/json",
|
|
115
|
+
"apikey": supabaseKey
|
|
116
|
+
},
|
|
117
|
+
body: JSON.stringify({ email, password })
|
|
118
|
+
});
|
|
119
|
+
if (!authRes.ok) {
|
|
120
|
+
const errData = await authRes.json();
|
|
121
|
+
throw new Error(errData.error_description || errData.msg || "Login failed");
|
|
122
|
+
}
|
|
123
|
+
const authData = await authRes.json();
|
|
124
|
+
const token = authData.access_token;
|
|
125
|
+
localStorage.setItem("uptrade_access_token", token);
|
|
126
|
+
setAccessToken(token);
|
|
127
|
+
const sessionRes = await fetch(`${portalApiUrl}/setup/session`, {
|
|
128
|
+
headers: { "Authorization": `Bearer ${token}` }
|
|
129
|
+
});
|
|
130
|
+
const session = await sessionRes.json();
|
|
131
|
+
if (session.authenticated) {
|
|
132
|
+
setIsAuthenticated(true);
|
|
133
|
+
setUserEmail(session.email);
|
|
134
|
+
await loadOrganizations(token);
|
|
135
|
+
setStep("project");
|
|
136
|
+
} else {
|
|
137
|
+
throw new Error("Authentication failed - user not found in Portal");
|
|
138
|
+
}
|
|
139
|
+
} catch (err) {
|
|
140
|
+
setError(err.message);
|
|
141
|
+
} finally {
|
|
142
|
+
setIsLoading(false);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
async function handleMagicLink() {
|
|
146
|
+
if (!email.trim()) return;
|
|
147
|
+
setIsLoading(true);
|
|
148
|
+
setError(null);
|
|
149
|
+
try {
|
|
150
|
+
const supabaseUrl = config?.url || "https://mwcjtnoqxolplwpkxnfe.supabase.co";
|
|
151
|
+
const supabaseKey = config?.anonKey || "";
|
|
152
|
+
const res = await fetch(`${supabaseUrl}/auth/v1/magiclink`, {
|
|
153
|
+
method: "POST",
|
|
154
|
+
headers: {
|
|
155
|
+
"Content-Type": "application/json",
|
|
156
|
+
"apikey": supabaseKey
|
|
157
|
+
},
|
|
158
|
+
body: JSON.stringify({
|
|
159
|
+
email,
|
|
160
|
+
options: {
|
|
161
|
+
redirectTo: window.location.href
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
if (!res.ok) throw new Error("Failed to send magic link");
|
|
166
|
+
setError(null);
|
|
167
|
+
alert("Check your email for a login link!");
|
|
168
|
+
} catch (err) {
|
|
169
|
+
setError(err.message);
|
|
170
|
+
} finally {
|
|
171
|
+
setIsLoading(false);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
176
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold mb-2", children: "Connect to Uptrade" }),
|
|
177
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400", children: "Sign in with your Uptrade Portal account" })
|
|
178
|
+
] }),
|
|
179
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 justify-center mb-6", children: [
|
|
180
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
181
|
+
"button",
|
|
182
|
+
{
|
|
183
|
+
className: `px-4 py-2 rounded-lg ${authMode === "login" ? "bg-blue-600" : "bg-gray-700"}`,
|
|
184
|
+
onClick: () => setAuthMode("login"),
|
|
185
|
+
children: "Email & Password"
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
189
|
+
"button",
|
|
190
|
+
{
|
|
191
|
+
className: `px-4 py-2 rounded-lg ${authMode === "magic" ? "bg-blue-600" : "bg-gray-700"}`,
|
|
192
|
+
onClick: () => setAuthMode("magic"),
|
|
193
|
+
children: "Magic Link"
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
] }),
|
|
197
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm text-gray-400 mb-2", children: "Email" }),
|
|
200
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
201
|
+
"input",
|
|
202
|
+
{
|
|
203
|
+
type: "email",
|
|
204
|
+
value: email,
|
|
205
|
+
onChange: (e) => setEmail(e.target.value),
|
|
206
|
+
placeholder: "you@example.com",
|
|
207
|
+
className: "w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:border-blue-500"
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
] }),
|
|
211
|
+
authMode === "login" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
212
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm text-gray-400 mb-2", children: "Password" }),
|
|
213
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
+
"input",
|
|
215
|
+
{
|
|
216
|
+
type: "password",
|
|
217
|
+
value: password,
|
|
218
|
+
onChange: (e) => setPassword(e.target.value),
|
|
219
|
+
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
220
|
+
className: "w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:border-blue-500"
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] }),
|
|
224
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
225
|
+
Button,
|
|
226
|
+
{
|
|
227
|
+
onClick: authMode === "login" ? handleLogin : handleMagicLink,
|
|
228
|
+
loading: isLoading,
|
|
229
|
+
disabled: !email.trim() || authMode === "login" && !password.trim(),
|
|
230
|
+
children: authMode === "login" ? "Sign In \u2192" : "Send Magic Link \u2192"
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-gray-500 text-sm text-center", children: [
|
|
234
|
+
"Don't have an account?",
|
|
235
|
+
" ",
|
|
236
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
237
|
+
"a",
|
|
238
|
+
{
|
|
239
|
+
href: "https://portal.uptrademedia.com/signup",
|
|
240
|
+
target: "_blank",
|
|
241
|
+
className: "text-blue-400 hover:underline",
|
|
242
|
+
children: "Sign up at Portal"
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
] })
|
|
246
|
+
] }),
|
|
247
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-red-500/10 border border-red-500/30 text-red-400 px-4 py-3 rounded-lg text-center", children: error })
|
|
248
|
+
] });
|
|
249
|
+
}
|
|
250
|
+
async function loadOrganizations(token) {
|
|
251
|
+
try {
|
|
252
|
+
const authToken = token || accessToken;
|
|
253
|
+
const res = await fetch(`${portalApiUrl}/setup/organizations`, {
|
|
254
|
+
headers: authToken ? { "Authorization": `Bearer ${authToken}` } : {}
|
|
255
|
+
});
|
|
256
|
+
const data = await res.json();
|
|
257
|
+
setOrganizations(Array.isArray(data) ? data : []);
|
|
258
|
+
} catch (err) {
|
|
259
|
+
setError("Failed to load organizations");
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function ProjectStep() {
|
|
263
|
+
const [createNew, setCreateNew] = react.useState(false);
|
|
264
|
+
const [creating, setCreating] = react.useState(false);
|
|
265
|
+
const [creatingOrg, setCreatingOrg] = react.useState(false);
|
|
266
|
+
const [newOrgName, setNewOrgName] = react.useState("");
|
|
267
|
+
async function handleCreateProject2() {
|
|
268
|
+
if (!selectedOrg || !newProjectName.trim()) return;
|
|
269
|
+
setCreating(true);
|
|
270
|
+
try {
|
|
271
|
+
const res = await fetch(`${portalApiUrl}/setup/projects`, {
|
|
272
|
+
method: "POST",
|
|
273
|
+
headers: {
|
|
274
|
+
"Content-Type": "application/json",
|
|
275
|
+
...accessToken ? { "Authorization": `Bearer ${accessToken}` } : {}
|
|
276
|
+
},
|
|
277
|
+
body: JSON.stringify({
|
|
278
|
+
orgId: selectedOrg.id,
|
|
279
|
+
name: newProjectName,
|
|
280
|
+
domain: newProjectDomain || window.location.hostname
|
|
281
|
+
})
|
|
282
|
+
});
|
|
283
|
+
if (!res.ok) throw new Error("Failed to create project");
|
|
284
|
+
const project = await res.json();
|
|
285
|
+
setSelectedProject(project);
|
|
286
|
+
setStep("scan");
|
|
287
|
+
} catch (err) {
|
|
288
|
+
setError(err.message);
|
|
289
|
+
} finally {
|
|
290
|
+
setCreating(false);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
async function handleSelectProject(project) {
|
|
294
|
+
setSelectedProject(project);
|
|
295
|
+
setStep("scan");
|
|
296
|
+
}
|
|
297
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
298
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
299
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold mb-2", children: "Select Your Project" }),
|
|
300
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400", children: "Choose an existing project or create a new one" })
|
|
301
|
+
] }),
|
|
302
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-lg mx-auto", children: [
|
|
303
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm text-gray-400 mb-2", children: "Organization" }),
|
|
304
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
305
|
+
"select",
|
|
306
|
+
{
|
|
307
|
+
value: selectedOrg?.id || "",
|
|
308
|
+
onChange: (e) => setSelectedOrg(organizations.find((o) => o.id === e.target.value) || null),
|
|
309
|
+
className: "w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg",
|
|
310
|
+
children: [
|
|
311
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "Select organization..." }),
|
|
312
|
+
organizations.map((org) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: org.id, children: org.name }, org.id))
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
)
|
|
316
|
+
] }),
|
|
317
|
+
selectedOrg && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-lg mx-auto space-y-4", children: [
|
|
318
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
319
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm text-gray-400", children: "Projects" }),
|
|
320
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
321
|
+
"button",
|
|
322
|
+
{
|
|
323
|
+
className: "text-sm text-blue-400 hover:underline",
|
|
324
|
+
onClick: () => setCreateNew(!createNew),
|
|
325
|
+
children: createNew ? "Select existing" : "+ Create new"
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
] }),
|
|
329
|
+
createNew ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4 bg-gray-800/50 rounded-lg border border-gray-700", children: [
|
|
330
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
331
|
+
"input",
|
|
332
|
+
{
|
|
333
|
+
type: "text",
|
|
334
|
+
value: newProjectName,
|
|
335
|
+
onChange: (e) => setNewProjectName(e.target.value),
|
|
336
|
+
placeholder: "Project name",
|
|
337
|
+
className: "w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg"
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
341
|
+
"input",
|
|
342
|
+
{
|
|
343
|
+
type: "text",
|
|
344
|
+
value: newProjectDomain,
|
|
345
|
+
onChange: (e) => setNewProjectDomain(e.target.value),
|
|
346
|
+
placeholder: window.location.hostname,
|
|
347
|
+
className: "w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg"
|
|
348
|
+
}
|
|
349
|
+
),
|
|
350
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
351
|
+
Button,
|
|
352
|
+
{
|
|
353
|
+
onClick: handleCreateProject2,
|
|
354
|
+
loading: creating,
|
|
355
|
+
disabled: !newProjectName.trim(),
|
|
356
|
+
children: "Create Project"
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: selectedOrg.projects.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-gray-500 text-center py-8", children: [
|
|
360
|
+
"No projects yet.",
|
|
361
|
+
" ",
|
|
362
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
363
|
+
"button",
|
|
364
|
+
{
|
|
365
|
+
className: "text-blue-400 hover:underline",
|
|
366
|
+
onClick: () => setCreateNew(true),
|
|
367
|
+
children: "Create one"
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
] }) : selectedOrg.projects.map((project) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
371
|
+
"button",
|
|
372
|
+
{
|
|
373
|
+
onClick: () => handleSelectProject(project),
|
|
374
|
+
className: "w-full text-left px-4 py-3 bg-gray-800/50 hover:bg-gray-800 border border-gray-700 rounded-lg transition-colors",
|
|
375
|
+
children: [
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: project.name }),
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-400", children: project.domain })
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
project.id
|
|
381
|
+
)) })
|
|
382
|
+
] })
|
|
383
|
+
] });
|
|
384
|
+
}
|
|
385
|
+
const handleScan2 = react.useCallback(async () => {
|
|
386
|
+
setIsLoading(true);
|
|
387
|
+
setError(null);
|
|
388
|
+
try {
|
|
389
|
+
const res = await fetch("/_uptrade/api/scan", { method: "POST" });
|
|
390
|
+
const data = await res.json();
|
|
391
|
+
setScanResults({
|
|
392
|
+
forms: data.forms.map((f) => ({ ...f, selected: true })),
|
|
393
|
+
widgets: data.widgets.map((w) => ({ ...w, selected: true })),
|
|
394
|
+
metadata: data.metadata.map((m) => ({ ...m, selected: false }))
|
|
395
|
+
});
|
|
396
|
+
setStep("migrate");
|
|
397
|
+
} catch (err) {
|
|
398
|
+
setError(err.message);
|
|
399
|
+
} finally {
|
|
400
|
+
setIsLoading(false);
|
|
401
|
+
}
|
|
402
|
+
}, []);
|
|
403
|
+
function ScanStep() {
|
|
404
|
+
react.useEffect(() => {
|
|
405
|
+
handleScan2();
|
|
406
|
+
}, []);
|
|
407
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 text-center", children: [
|
|
408
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-6xl animate-pulse", children: "\u{1F50D}" }),
|
|
409
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold", children: "Scanning Your Codebase" }),
|
|
410
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400", children: "Looking for forms, widgets, and metadata to migrate..." }),
|
|
411
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }) })
|
|
412
|
+
] });
|
|
413
|
+
}
|
|
414
|
+
function MigrateStep() {
|
|
415
|
+
if (!scanResults) return null;
|
|
416
|
+
const totalItems = [
|
|
417
|
+
...scanResults.forms,
|
|
418
|
+
...scanResults.widgets,
|
|
419
|
+
...scanResults.metadata
|
|
420
|
+
];
|
|
421
|
+
const selectedItems = totalItems.filter((i) => i.selected);
|
|
422
|
+
function toggleItem(type, index) {
|
|
423
|
+
setScanResults((prev) => {
|
|
424
|
+
if (!prev) return prev;
|
|
425
|
+
const updated = { ...prev };
|
|
426
|
+
updated[type] = [...prev[type]];
|
|
427
|
+
updated[type][index] = { ...updated[type][index], selected: !updated[type][index].selected };
|
|
428
|
+
return updated;
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
async function handleMigrate2() {
|
|
432
|
+
setIsLoading(true);
|
|
433
|
+
setMigrationLog([]);
|
|
434
|
+
setMigrationProgress(0);
|
|
435
|
+
const items = selectedItems;
|
|
436
|
+
for (let i = 0; i < items.length; i++) {
|
|
437
|
+
const item = items[i];
|
|
438
|
+
setMigrationLog((prev) => [...prev, `Migrating ${item.type} in ${item.file}...`]);
|
|
439
|
+
try {
|
|
440
|
+
await fetch("/_uptrade/api/migrate", {
|
|
441
|
+
method: "POST",
|
|
442
|
+
headers: { "Content-Type": "application/json" },
|
|
443
|
+
body: JSON.stringify({ item, projectId: selectedProject?.id })
|
|
444
|
+
});
|
|
445
|
+
setMigrationLog((prev) => [...prev, `\u2713 Migrated ${item.type}`]);
|
|
446
|
+
} catch {
|
|
447
|
+
setMigrationLog((prev) => [...prev, `\u2717 Failed to migrate ${item.type}`]);
|
|
448
|
+
}
|
|
449
|
+
setMigrationProgress(Math.round((i + 1) / items.length * 100));
|
|
450
|
+
}
|
|
451
|
+
setIsLoading(false);
|
|
452
|
+
setStep("configure");
|
|
453
|
+
}
|
|
454
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
455
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
456
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold mb-2", children: "Review & Migrate" }),
|
|
457
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400", children: "Select what you'd like to migrate to Site-Kit" })
|
|
458
|
+
] }),
|
|
459
|
+
scanResults.forms.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Section, { title: "\u{1F4DD} Forms", count: scanResults.forms.filter((f) => f.selected).length, children: scanResults.forms.map((form, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
460
|
+
ItemRow,
|
|
461
|
+
{
|
|
462
|
+
item: form,
|
|
463
|
+
onToggle: () => toggleItem("forms", i)
|
|
464
|
+
},
|
|
465
|
+
i
|
|
466
|
+
)) }),
|
|
467
|
+
scanResults.widgets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Section, { title: "\u{1F4AC} Chat Widgets", count: scanResults.widgets.filter((w) => w.selected).length, children: scanResults.widgets.map((widget, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
468
|
+
ItemRow,
|
|
469
|
+
{
|
|
470
|
+
item: widget,
|
|
471
|
+
onToggle: () => toggleItem("widgets", i)
|
|
472
|
+
},
|
|
473
|
+
i
|
|
474
|
+
)) }),
|
|
475
|
+
scanResults.metadata.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Section, { title: "\u{1F3F7}\uFE0F Metadata", count: scanResults.metadata.filter((m) => m.selected).length, children: scanResults.metadata.map((meta, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
476
|
+
ItemRow,
|
|
477
|
+
{
|
|
478
|
+
item: meta,
|
|
479
|
+
onToggle: () => toggleItem("metadata", i)
|
|
480
|
+
},
|
|
481
|
+
i
|
|
482
|
+
)) }),
|
|
483
|
+
totalItems.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-gray-400", children: [
|
|
484
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl mb-4", children: "\u2728" }),
|
|
485
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No existing forms or widgets detected." }),
|
|
486
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: "You're starting fresh!" })
|
|
487
|
+
] }),
|
|
488
|
+
migrationLog.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-gray-900 rounded-lg p-4 font-mono text-sm max-h-48 overflow-y-auto", children: migrationLog.map((log, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: log.startsWith("\u2717") ? "text-red-400" : "text-green-400", children: log }, i)) }),
|
|
489
|
+
isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2 bg-gray-700 rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
490
|
+
"div",
|
|
491
|
+
{
|
|
492
|
+
className: "h-full bg-blue-500 transition-all duration-300",
|
|
493
|
+
style: { width: `${migrationProgress}%` }
|
|
494
|
+
}
|
|
495
|
+
) }),
|
|
496
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-center gap-4", children: [
|
|
497
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "secondary", onClick: () => setStep("configure"), children: "Skip Migration" }),
|
|
498
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { onClick: handleMigrate2, loading: isLoading, children: [
|
|
499
|
+
"Migrate ",
|
|
500
|
+
selectedItems.length,
|
|
501
|
+
" Items \u2192"
|
|
502
|
+
] })
|
|
503
|
+
] })
|
|
504
|
+
] });
|
|
505
|
+
}
|
|
506
|
+
function ConfigureStep() {
|
|
507
|
+
const [configuring, setConfiguring] = react.useState(false);
|
|
508
|
+
async function handleConfigure2() {
|
|
509
|
+
setConfiguring(true);
|
|
510
|
+
try {
|
|
511
|
+
await fetch("/_uptrade/api/configure", {
|
|
512
|
+
method: "POST",
|
|
513
|
+
headers: { "Content-Type": "application/json" },
|
|
514
|
+
body: JSON.stringify({ projectId: selectedProject?.id })
|
|
515
|
+
});
|
|
516
|
+
setStep("complete");
|
|
517
|
+
} catch (err) {
|
|
518
|
+
setError(err.message);
|
|
519
|
+
} finally {
|
|
520
|
+
setConfiguring(false);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
525
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold mb-2", children: "Configure Site-Kit" }),
|
|
526
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400", children: "We'll add the SiteKitProvider to your layout and set up environment variables" })
|
|
527
|
+
] }),
|
|
528
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-lg mx-auto space-y-4", children: [
|
|
529
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
530
|
+
ConfigPreview,
|
|
531
|
+
{
|
|
532
|
+
title: "Environment Variables",
|
|
533
|
+
description: ".env.local",
|
|
534
|
+
content: `NEXT_PUBLIC_UPTRADE_PROJECT_ID=${selectedProject?.id || "xxx"}
|
|
535
|
+
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
|
|
536
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=xxx
|
|
537
|
+
UPTRADE_API_KEY=ut_xxx`
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
541
|
+
ConfigPreview,
|
|
542
|
+
{
|
|
543
|
+
title: "Layout Provider",
|
|
544
|
+
description: "app/layout.tsx",
|
|
545
|
+
content: `<SiteKitProvider
|
|
546
|
+
projectId={process.env.NEXT_PUBLIC_UPTRADE_PROJECT_ID!}
|
|
547
|
+
supabaseUrl={process.env.NEXT_PUBLIC_SUPABASE_URL!}
|
|
548
|
+
supabaseAnonKey={process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!}
|
|
549
|
+
>
|
|
550
|
+
{children}
|
|
551
|
+
</SiteKitProvider>`
|
|
552
|
+
}
|
|
553
|
+
)
|
|
554
|
+
] }),
|
|
555
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleConfigure2, loading: configuring, children: "Apply Configuration \u2192" }) })
|
|
556
|
+
] });
|
|
557
|
+
}
|
|
558
|
+
function CompleteStep() {
|
|
559
|
+
const [removing, setRemoving] = react.useState(false);
|
|
560
|
+
async function handleRemoveSetup() {
|
|
561
|
+
setRemoving(true);
|
|
562
|
+
try {
|
|
563
|
+
await fetch("/_uptrade/api/self-destruct", { method: "POST" });
|
|
564
|
+
window.location.href = "/";
|
|
565
|
+
} catch (err) {
|
|
566
|
+
setError(err.message);
|
|
567
|
+
setRemoving(false);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 text-center", children: [
|
|
571
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-6xl", children: "\u{1F389}" }),
|
|
572
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold", children: "You're All Set!" }),
|
|
573
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400 text-lg", children: "Site-Kit is now configured and ready to use" }),
|
|
574
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4 max-w-lg mx-auto my-8", children: [
|
|
575
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
576
|
+
QuickLink,
|
|
577
|
+
{
|
|
578
|
+
icon: "\u{1F4CA}",
|
|
579
|
+
title: "View Dashboard",
|
|
580
|
+
href: "https://portal.uptrademedia.com/dashboard"
|
|
581
|
+
}
|
|
582
|
+
),
|
|
583
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
584
|
+
QuickLink,
|
|
585
|
+
{
|
|
586
|
+
icon: "\u{1F4DD}",
|
|
587
|
+
title: "Create Form",
|
|
588
|
+
href: "https://portal.uptrademedia.com/forms/new"
|
|
589
|
+
}
|
|
590
|
+
),
|
|
591
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
592
|
+
QuickLink,
|
|
593
|
+
{
|
|
594
|
+
icon: "\u{1F4D6}",
|
|
595
|
+
title: "Documentation",
|
|
596
|
+
href: "https://docs.uptrademedia.com/site-kit"
|
|
597
|
+
}
|
|
598
|
+
),
|
|
599
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
600
|
+
QuickLink,
|
|
601
|
+
{
|
|
602
|
+
icon: "\u{1F4AC}",
|
|
603
|
+
title: "Get Help",
|
|
604
|
+
href: "https://portal.uptrademedia.com/support"
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
] }),
|
|
608
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-8 border-t border-gray-700", children: [
|
|
609
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-400 mb-4", children: "Remove this setup wizard from your project?" }),
|
|
610
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "danger", onClick: handleRemoveSetup, loading: removing, children: "Remove Setup Wizard" }),
|
|
611
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-500 text-sm mt-2", children: "This will delete the /_uptrade route" })
|
|
612
|
+
] })
|
|
613
|
+
] });
|
|
614
|
+
}
|
|
615
|
+
const steps = {
|
|
616
|
+
welcome: WelcomeStep,
|
|
617
|
+
auth: AuthStep,
|
|
618
|
+
project: ProjectStep,
|
|
619
|
+
scan: ScanStep,
|
|
620
|
+
migrate: MigrateStep,
|
|
621
|
+
configure: ConfigureStep,
|
|
622
|
+
complete: CompleteStep
|
|
623
|
+
};
|
|
624
|
+
const CurrentStep = steps[step];
|
|
625
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-gradient-to-br from-gray-900 via-gray-900 to-gray-800 text-white", children: [
|
|
626
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed top-0 left-0 right-0 h-1 bg-gray-800", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
627
|
+
"div",
|
|
628
|
+
{
|
|
629
|
+
className: "h-full bg-gradient-to-r from-blue-500 to-purple-500 transition-all duration-500",
|
|
630
|
+
style: { width: `${Object.keys(steps).indexOf(step) / (Object.keys(steps).length - 1) * 100}%` }
|
|
631
|
+
}
|
|
632
|
+
) }),
|
|
633
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "px-8 py-6 flex justify-between items-center", children: [
|
|
634
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
635
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg" }),
|
|
636
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "Uptrade Site-Kit" })
|
|
637
|
+
] }),
|
|
638
|
+
userEmail && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-400 text-sm", children: userEmail })
|
|
639
|
+
] }),
|
|
640
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "max-w-3xl mx-auto px-8 py-16", children: /* @__PURE__ */ jsxRuntime.jsx(CurrentStep, {}) }),
|
|
641
|
+
/* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "fixed bottom-0 left-0 right-0 px-8 py-4 text-center text-gray-500 text-sm", children: [
|
|
642
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://uptrademedia.com", target: "_blank", className: "hover:text-gray-300", children: "Uptrade Media" }),
|
|
643
|
+
" \xB7 ",
|
|
644
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://docs.uptrademedia.com", target: "_blank", className: "hover:text-gray-300", children: "Docs" }),
|
|
645
|
+
" \xB7 ",
|
|
646
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://github.com/uptrademedia/site-kit", target: "_blank", className: "hover:text-gray-300", children: "GitHub" })
|
|
647
|
+
] })
|
|
648
|
+
] });
|
|
649
|
+
}
|
|
650
|
+
function Button({
|
|
651
|
+
children,
|
|
652
|
+
onClick,
|
|
653
|
+
loading,
|
|
654
|
+
disabled,
|
|
655
|
+
variant = "primary"
|
|
656
|
+
}) {
|
|
657
|
+
const variants = {
|
|
658
|
+
primary: "bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700",
|
|
659
|
+
secondary: "bg-gray-700 hover:bg-gray-600",
|
|
660
|
+
danger: "bg-red-600/20 border border-red-500/30 text-red-400 hover:bg-red-600/30"
|
|
661
|
+
};
|
|
662
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
663
|
+
"button",
|
|
664
|
+
{
|
|
665
|
+
onClick,
|
|
666
|
+
disabled: loading || disabled,
|
|
667
|
+
className: `px-6 py-3 rounded-lg font-medium transition-all disabled:opacity-50 disabled:cursor-not-allowed ${variants[variant]}`,
|
|
668
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
669
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" }),
|
|
670
|
+
"Loading..."
|
|
671
|
+
] }) : children
|
|
672
|
+
}
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
function FeatureCard({ icon, title, description }) {
|
|
676
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 bg-gray-800/50 rounded-xl border border-gray-700 text-center", children: [
|
|
677
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-3xl mb-3", children: icon }),
|
|
678
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold mb-1", children: title }),
|
|
679
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-400", children: description })
|
|
680
|
+
] });
|
|
681
|
+
}
|
|
682
|
+
function Section({ title, count, children }) {
|
|
683
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gray-800/30 rounded-xl border border-gray-700 overflow-hidden", children: [
|
|
684
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-3 bg-gray-800/50 flex justify-between items-center", children: [
|
|
685
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: title }),
|
|
686
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-400", children: [
|
|
687
|
+
count,
|
|
688
|
+
" selected"
|
|
689
|
+
] })
|
|
690
|
+
] }),
|
|
691
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-700", children })
|
|
692
|
+
] });
|
|
693
|
+
}
|
|
694
|
+
function ItemRow({ item, onToggle }) {
|
|
695
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4 px-4 py-3 hover:bg-gray-800/30 transition-colors", children: [
|
|
696
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
697
|
+
"input",
|
|
698
|
+
{
|
|
699
|
+
type: "checkbox",
|
|
700
|
+
checked: item.selected,
|
|
701
|
+
onChange: onToggle,
|
|
702
|
+
className: "w-5 h-5 rounded border-gray-600 bg-gray-700 text-blue-500 focus:ring-blue-500"
|
|
703
|
+
}
|
|
704
|
+
),
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
706
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium truncate", children: item.type }),
|
|
707
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-gray-400 truncate", children: [
|
|
708
|
+
item.file,
|
|
709
|
+
":",
|
|
710
|
+
item.line
|
|
711
|
+
] })
|
|
712
|
+
] })
|
|
713
|
+
] });
|
|
714
|
+
}
|
|
715
|
+
function ConfigPreview({ title, description, content }) {
|
|
716
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gray-800/50 rounded-lg border border-gray-700 overflow-hidden", children: [
|
|
717
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 bg-gray-800 flex justify-between items-center", children: [
|
|
718
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: title }),
|
|
719
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-400", children: description })
|
|
720
|
+
] }),
|
|
721
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "p-4 text-sm overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: "text-green-400", children: content }) })
|
|
722
|
+
] });
|
|
723
|
+
}
|
|
724
|
+
function QuickLink({ icon, title, href }) {
|
|
725
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
726
|
+
"a",
|
|
727
|
+
{
|
|
728
|
+
href,
|
|
729
|
+
target: "_blank",
|
|
730
|
+
className: "flex items-center gap-3 p-4 bg-gray-800/50 rounded-lg border border-gray-700 hover:bg-gray-800 transition-colors",
|
|
731
|
+
children: [
|
|
732
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", children: icon }),
|
|
733
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: title })
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
}
|
|
738
|
+
var PORTAL_URL = process.env.UPTRADE_PORTAL_URL || "https://portal.uptrademedia.com";
|
|
739
|
+
var API_URL = process.env.UPTRADE_API_URL || "https://api.uptrademedia.com";
|
|
740
|
+
var authSession = {};
|
|
741
|
+
async function handleStatus() {
|
|
742
|
+
const configured = !!(process.env.NEXT_PUBLIC_UPTRADE_PROJECT_ID && process.env.NEXT_PUBLIC_SUPABASE_URL);
|
|
743
|
+
return server.NextResponse.json({
|
|
744
|
+
configured,
|
|
745
|
+
authenticated: !!authSession.accessToken,
|
|
746
|
+
email: authSession.email
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
async function handleAuthStart() {
|
|
750
|
+
const state = Math.random().toString(36).substring(7);
|
|
751
|
+
const redirectUri = "http://localhost:3000/_uptrade/api/auth/callback";
|
|
752
|
+
const authUrl = `${PORTAL_URL}/auth/cli?` + new URLSearchParams({
|
|
753
|
+
redirect_uri: redirectUri,
|
|
754
|
+
state
|
|
755
|
+
});
|
|
756
|
+
return server.NextResponse.json({ authUrl, state });
|
|
757
|
+
}
|
|
758
|
+
async function handleAuthCallback(req) {
|
|
759
|
+
const { searchParams } = new URL(req.url);
|
|
760
|
+
const code = searchParams.get("code");
|
|
761
|
+
const error = searchParams.get("error");
|
|
762
|
+
if (error) {
|
|
763
|
+
return new server.NextResponse(errorHtml("Authentication Failed", error), {
|
|
764
|
+
headers: { "Content-Type": "text/html" }
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
if (!code) {
|
|
768
|
+
return new server.NextResponse(errorHtml("Missing Code", "No authorization code received"), {
|
|
769
|
+
headers: { "Content-Type": "text/html" }
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
try {
|
|
773
|
+
const tokenResponse = await fetch(`${API_URL}/auth/cli-token`, {
|
|
774
|
+
method: "POST",
|
|
775
|
+
headers: { "Content-Type": "application/json" },
|
|
776
|
+
body: JSON.stringify({
|
|
777
|
+
code,
|
|
778
|
+
redirect_uri: "http://localhost:3000/_uptrade/api/auth/callback"
|
|
779
|
+
})
|
|
780
|
+
});
|
|
781
|
+
if (!tokenResponse.ok) {
|
|
782
|
+
throw new Error("Failed to exchange code for token");
|
|
783
|
+
}
|
|
784
|
+
const { access_token, user_id, email } = await tokenResponse.json();
|
|
785
|
+
authSession = {
|
|
786
|
+
accessToken: access_token,
|
|
787
|
+
userId: user_id,
|
|
788
|
+
email
|
|
789
|
+
};
|
|
790
|
+
return new server.NextResponse(successHtml(), {
|
|
791
|
+
headers: { "Content-Type": "text/html" }
|
|
792
|
+
});
|
|
793
|
+
} catch (err) {
|
|
794
|
+
return new server.NextResponse(errorHtml("Token Exchange Failed", err.message), {
|
|
795
|
+
headers: { "Content-Type": "text/html" }
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
async function handleAuthStatus() {
|
|
800
|
+
return server.NextResponse.json({
|
|
801
|
+
authenticated: !!authSession.accessToken,
|
|
802
|
+
email: authSession.email
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
async function handleApiKeyAuth(req) {
|
|
806
|
+
const { apiKey } = await req.json();
|
|
807
|
+
try {
|
|
808
|
+
const response = await fetch(`${API_URL}/auth/verify-api-key`, {
|
|
809
|
+
headers: { "Authorization": `Bearer ${apiKey}` }
|
|
810
|
+
});
|
|
811
|
+
if (!response.ok) {
|
|
812
|
+
return server.NextResponse.json({ error: "Invalid API key" }, { status: 401 });
|
|
813
|
+
}
|
|
814
|
+
const { user_id, email } = await response.json();
|
|
815
|
+
authSession = {
|
|
816
|
+
accessToken: apiKey,
|
|
817
|
+
userId: user_id,
|
|
818
|
+
email
|
|
819
|
+
};
|
|
820
|
+
return server.NextResponse.json({ email });
|
|
821
|
+
} catch {
|
|
822
|
+
return server.NextResponse.json({ error: "Authentication failed" }, { status: 500 });
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
async function handleGetOrganizations() {
|
|
826
|
+
if (!authSession.accessToken) {
|
|
827
|
+
return server.NextResponse.json({ error: "Not authenticated" }, { status: 401 });
|
|
828
|
+
}
|
|
829
|
+
try {
|
|
830
|
+
const response = await fetch(`${API_URL}/organizations`, {
|
|
831
|
+
headers: { "Authorization": `Bearer ${authSession.accessToken}` }
|
|
832
|
+
});
|
|
833
|
+
if (!response.ok) {
|
|
834
|
+
throw new Error("Failed to fetch organizations");
|
|
835
|
+
}
|
|
836
|
+
const organizations = await response.json();
|
|
837
|
+
return server.NextResponse.json({ organizations });
|
|
838
|
+
} catch (err) {
|
|
839
|
+
return server.NextResponse.json({ error: err.message }, { status: 500 });
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
async function handleCreateProject(req) {
|
|
843
|
+
if (!authSession.accessToken) {
|
|
844
|
+
return server.NextResponse.json({ error: "Not authenticated" }, { status: 401 });
|
|
845
|
+
}
|
|
846
|
+
const { orgId, name, domain } = await req.json();
|
|
847
|
+
try {
|
|
848
|
+
const response = await fetch(`${API_URL}/organizations/${orgId}/projects`, {
|
|
849
|
+
method: "POST",
|
|
850
|
+
headers: {
|
|
851
|
+
"Authorization": `Bearer ${authSession.accessToken}`,
|
|
852
|
+
"Content-Type": "application/json"
|
|
853
|
+
},
|
|
854
|
+
body: JSON.stringify({ name, domain })
|
|
855
|
+
});
|
|
856
|
+
if (!response.ok) {
|
|
857
|
+
throw new Error("Failed to create project");
|
|
858
|
+
}
|
|
859
|
+
const project = await response.json();
|
|
860
|
+
return server.NextResponse.json(project);
|
|
861
|
+
} catch (err) {
|
|
862
|
+
return server.NextResponse.json({ error: err.message }, { status: 500 });
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
async function handleScan() {
|
|
866
|
+
const { scanCodebase } = await import('../scanner-NT6YG4TD.js');
|
|
867
|
+
try {
|
|
868
|
+
const results = await scanCodebase(process.cwd());
|
|
869
|
+
return server.NextResponse.json({
|
|
870
|
+
forms: results.forms.map((f) => ({
|
|
871
|
+
type: f.type,
|
|
872
|
+
file: f.file,
|
|
873
|
+
line: f.line,
|
|
874
|
+
details: {
|
|
875
|
+
fields: f.fields
|
|
876
|
+
}
|
|
877
|
+
})),
|
|
878
|
+
widgets: results.widgets.map((w) => ({
|
|
879
|
+
type: w.type,
|
|
880
|
+
file: w.file,
|
|
881
|
+
line: w.line,
|
|
882
|
+
details: {}
|
|
883
|
+
})),
|
|
884
|
+
metadata: results.metadata.map((m) => ({
|
|
885
|
+
type: m.type,
|
|
886
|
+
file: m.file,
|
|
887
|
+
line: m.line,
|
|
888
|
+
details: {}
|
|
889
|
+
}))
|
|
890
|
+
});
|
|
891
|
+
} catch (err) {
|
|
892
|
+
return server.NextResponse.json({ error: err.message }, { status: 500 });
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
async function handleMigrate(req) {
|
|
896
|
+
if (!authSession.accessToken) {
|
|
897
|
+
return server.NextResponse.json({ error: "Not authenticated" }, { status: 401 });
|
|
898
|
+
}
|
|
899
|
+
const { item, projectId } = await req.json();
|
|
900
|
+
const { migrateFiles } = await import('../migrator-XKM7YQCY.js');
|
|
901
|
+
try {
|
|
902
|
+
await migrateFiles([item], projectId, authSession.accessToken);
|
|
903
|
+
return server.NextResponse.json({ success: true });
|
|
904
|
+
} catch (err) {
|
|
905
|
+
return server.NextResponse.json({ error: err.message }, { status: 500 });
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
async function handleConfigure(req) {
|
|
909
|
+
if (!authSession.accessToken) {
|
|
910
|
+
return server.NextResponse.json({ error: "Not authenticated" }, { status: 401 });
|
|
911
|
+
}
|
|
912
|
+
const { projectId } = await req.json();
|
|
913
|
+
const { generateEnvFile, generateProvider } = await import('../generators-GWIYCA5M.js');
|
|
914
|
+
try {
|
|
915
|
+
const configResponse = await fetch(`${API_URL}/projects/${projectId}/config`, {
|
|
916
|
+
headers: { "Authorization": `Bearer ${authSession.accessToken}` }
|
|
917
|
+
});
|
|
918
|
+
if (!configResponse.ok) {
|
|
919
|
+
throw new Error("Failed to fetch project config");
|
|
920
|
+
}
|
|
921
|
+
const config = await configResponse.json();
|
|
922
|
+
const keyResponse = await fetch(`${API_URL}/projects/${projectId}/api-keys`, {
|
|
923
|
+
method: "POST",
|
|
924
|
+
headers: {
|
|
925
|
+
"Authorization": `Bearer ${authSession.accessToken}`,
|
|
926
|
+
"Content-Type": "application/json"
|
|
927
|
+
},
|
|
928
|
+
body: JSON.stringify({ name: "Site-Kit Setup" })
|
|
929
|
+
});
|
|
930
|
+
const { api_key } = keyResponse.ok ? await keyResponse.json() : { api_key: "ut_xxx" };
|
|
931
|
+
await generateEnvFile({
|
|
932
|
+
projectId,
|
|
933
|
+
supabaseUrl: config.supabase_url,
|
|
934
|
+
supabaseAnonKey: config.supabase_anon_key,
|
|
935
|
+
apiKey: api_key
|
|
936
|
+
});
|
|
937
|
+
await generateProvider({ projectId });
|
|
938
|
+
return server.NextResponse.json({ success: true });
|
|
939
|
+
} catch (err) {
|
|
940
|
+
return server.NextResponse.json({ error: err.message }, { status: 500 });
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
async function handleSelfDestruct() {
|
|
944
|
+
const { selfDestruct } = await import('../generators-GWIYCA5M.js');
|
|
945
|
+
try {
|
|
946
|
+
await selfDestruct();
|
|
947
|
+
return server.NextResponse.json({ success: true });
|
|
948
|
+
} catch (err) {
|
|
949
|
+
return server.NextResponse.json({ error: err.message }, { status: 500 });
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
function successHtml() {
|
|
953
|
+
return `<!DOCTYPE html>
|
|
954
|
+
<html>
|
|
955
|
+
<head>
|
|
956
|
+
<title>Uptrade - Authenticated</title>
|
|
957
|
+
<style>
|
|
958
|
+
body {
|
|
959
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
960
|
+
display: flex; justify-content: center; align-items: center;
|
|
961
|
+
height: 100vh; margin: 0;
|
|
962
|
+
background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
|
|
963
|
+
color: white;
|
|
964
|
+
}
|
|
965
|
+
.container {
|
|
966
|
+
text-align: center; padding: 3rem;
|
|
967
|
+
background: rgba(255, 255, 255, 0.05);
|
|
968
|
+
border-radius: 1rem; border: 1px solid rgba(255, 255, 255, 0.1);
|
|
969
|
+
}
|
|
970
|
+
.icon { font-size: 4rem; margin-bottom: 1rem; }
|
|
971
|
+
h1 { margin: 0 0 0.5rem; }
|
|
972
|
+
p { color: rgba(255, 255, 255, 0.7); margin: 0; }
|
|
973
|
+
</style>
|
|
974
|
+
<script>setTimeout(() => window.close(), 2000)</script>
|
|
975
|
+
</head>
|
|
976
|
+
<body>
|
|
977
|
+
<div class="container">
|
|
978
|
+
<div class="icon">\u2713</div>
|
|
979
|
+
<h1>Authenticated!</h1>
|
|
980
|
+
<p>This window will close automatically...</p>
|
|
981
|
+
</div>
|
|
982
|
+
</body>
|
|
983
|
+
</html>`;
|
|
984
|
+
}
|
|
985
|
+
function errorHtml(title, message) {
|
|
986
|
+
return `<!DOCTYPE html>
|
|
987
|
+
<html>
|
|
988
|
+
<head>
|
|
989
|
+
<title>Uptrade - Error</title>
|
|
990
|
+
<style>
|
|
991
|
+
body {
|
|
992
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
993
|
+
display: flex; justify-content: center; align-items: center;
|
|
994
|
+
height: 100vh; margin: 0;
|
|
995
|
+
background: linear-gradient(135deg, #2e1a1a 0%, #1a0f0f 100%);
|
|
996
|
+
color: white;
|
|
997
|
+
}
|
|
998
|
+
.container {
|
|
999
|
+
text-align: center; padding: 3rem;
|
|
1000
|
+
background: rgba(255, 255, 255, 0.05);
|
|
1001
|
+
border-radius: 1rem; border: 1px solid rgba(255, 100, 100, 0.2);
|
|
1002
|
+
}
|
|
1003
|
+
.icon { font-size: 4rem; margin-bottom: 1rem; }
|
|
1004
|
+
h1 { margin: 0 0 0.5rem; color: #ff6b6b; }
|
|
1005
|
+
p { color: rgba(255, 255, 255, 0.7); margin: 0; }
|
|
1006
|
+
</style>
|
|
1007
|
+
</head>
|
|
1008
|
+
<body>
|
|
1009
|
+
<div class="container">
|
|
1010
|
+
<div class="icon">\u2717</div>
|
|
1011
|
+
<h1>${title}</h1>
|
|
1012
|
+
<p>${message}</p>
|
|
1013
|
+
</div>
|
|
1014
|
+
</body>
|
|
1015
|
+
</html>`;
|
|
1016
|
+
}
|
|
1017
|
+
async function handleRequest(req, route) {
|
|
1018
|
+
switch (route) {
|
|
1019
|
+
case "status":
|
|
1020
|
+
return handleStatus();
|
|
1021
|
+
case "auth/start":
|
|
1022
|
+
return handleAuthStart();
|
|
1023
|
+
case "auth/callback":
|
|
1024
|
+
return handleAuthCallback(req);
|
|
1025
|
+
case "auth/status":
|
|
1026
|
+
return handleAuthStatus();
|
|
1027
|
+
case "auth/apikey":
|
|
1028
|
+
return handleApiKeyAuth(req);
|
|
1029
|
+
case "organizations":
|
|
1030
|
+
return handleGetOrganizations();
|
|
1031
|
+
case "projects":
|
|
1032
|
+
return handleCreateProject(req);
|
|
1033
|
+
case "scan":
|
|
1034
|
+
return handleScan();
|
|
1035
|
+
case "migrate":
|
|
1036
|
+
return handleMigrate(req);
|
|
1037
|
+
case "configure":
|
|
1038
|
+
return handleConfigure(req);
|
|
1039
|
+
case "self-destruct":
|
|
1040
|
+
return handleSelfDestruct();
|
|
1041
|
+
default:
|
|
1042
|
+
return server.NextResponse.json({ error: "Not found" }, { status: 404 });
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
exports.SetupWizard = SetupWizard;
|
|
1047
|
+
exports.UptradeSetup = SetupWizard;
|
|
1048
|
+
exports.handleRequest = handleRequest;
|
|
1049
|
+
//# sourceMappingURL=index.js.map
|
|
1050
|
+
//# sourceMappingURL=index.js.map
|