ft-scout 8.0.5 → 8.0.7

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.
@@ -0,0 +1,136 @@
1
+ import Razorpay from 'razorpay';
2
+ import crypto from 'crypto';
3
+ import dotenv from 'dotenv';
4
+ import { loadAuthConfig, saveAuthConfig } from './auth.js';
5
+ dotenv.config();
6
+ export function getRazorpayKeyId() {
7
+ return process.env.RAZORPAY_KEY_ID || '';
8
+ }
9
+ export function getRazorpayKeySecret() {
10
+ return process.env.RAZORPAY_KEY_SECRET || '';
11
+ }
12
+ export function getRazorpayInstance() {
13
+ const key_id = getRazorpayKeyId();
14
+ const key_secret = getRazorpayKeySecret();
15
+ if (!key_id || !key_secret) {
16
+ const err = new Error('Razorpay credentials missing: RAZORPAY_KEY_ID and RAZORPAY_KEY_SECRET must be configured in environment variables.');
17
+ err.statusCode = 401;
18
+ throw err;
19
+ }
20
+ return new Razorpay({
21
+ key_id,
22
+ key_secret,
23
+ });
24
+ }
25
+ /**
26
+ * STEP 1: BACKEND - Create Razorpay Order
27
+ * Endpoint: POST /api/create-order
28
+ * Validates amount >= 100 paise and creates order via Razorpay API.
29
+ */
30
+ export async function createRazorpayOrder(params) {
31
+ const amount = Number(params.amount);
32
+ if (isNaN(amount) || amount < 100) {
33
+ const err = new Error('Validation Error: Minimum amount must be at least 100 paise.');
34
+ err.statusCode = 400;
35
+ throw err;
36
+ }
37
+ const currency = (params.currency || 'INR').toUpperCase();
38
+ const receipt = params.receipt || `rcpt_${Date.now()}_${Math.floor(Math.random() * 1000)}`;
39
+ const razorpay = getRazorpayInstance();
40
+ try {
41
+ const order = await razorpay.orders.create({
42
+ amount,
43
+ currency,
44
+ receipt,
45
+ notes: params.notes || {},
46
+ });
47
+ return {
48
+ order_id: order.id,
49
+ amount: Number(order.amount),
50
+ currency: order.currency,
51
+ receipt: order.receipt || receipt,
52
+ };
53
+ }
54
+ catch (err) {
55
+ if (err.statusCode === 401 || (err.error && err.error.code === 'BAD_REQUEST_ERROR' && err.error.description?.toLowerCase().includes('auth'))) {
56
+ const authErr = new Error(`Razorpay authentication failed: ${err.error?.description || err.message}`);
57
+ authErr.statusCode = 401;
58
+ throw authErr;
59
+ }
60
+ const apiErr = new Error(`Razorpay API Error: ${err.error?.description || err.message || 'Failed to create order'}`);
61
+ apiErr.statusCode = 500;
62
+ throw apiErr;
63
+ }
64
+ }
65
+ /**
66
+ * STEP 3: BACKEND - Verify Signature
67
+ * Endpoint: POST /api/verify-payment
68
+ * Algorithm: HMAC-SHA256(order_id + "|" + payment_id, KEY_SECRET)
69
+ * Returns success only if generated signature strictly matches.
70
+ */
71
+ export function verifyRazorpaySignature(params) {
72
+ const order_id = (params.order_id || '').trim();
73
+ const payment_id = (params.payment_id || '').trim();
74
+ const signature = (params.signature || '').trim();
75
+ // Validate missing fields: return 400
76
+ if (!order_id || !payment_id || !signature) {
77
+ const err = new Error('Missing required fields: order_id, payment_id, and signature are required.');
78
+ err.statusCode = 400;
79
+ throw err;
80
+ }
81
+ const secret = getRazorpayKeySecret();
82
+ if (!secret) {
83
+ const err = new Error('Razorpay Key Secret is not configured.');
84
+ err.statusCode = 500;
85
+ throw err;
86
+ }
87
+ // Generate HMAC-SHA256 signature
88
+ const body = `${order_id}|${payment_id}`;
89
+ const expectedSignature = crypto
90
+ .createHmac('sha256', secret)
91
+ .update(body)
92
+ .digest('hex');
93
+ let isValid = false;
94
+ try {
95
+ isValid = crypto.timingSafeEqual(Buffer.from(expectedSignature, 'utf-8'), Buffer.from(signature, 'utf-8'));
96
+ }
97
+ catch {
98
+ isValid = false;
99
+ }
100
+ if (!isValid) {
101
+ const err = new Error('Payment signature verification failed. Signature mismatch.');
102
+ err.statusCode = 400;
103
+ throw err;
104
+ }
105
+ // Provision tier upgrade and persist to auth configuration
106
+ const tier = params.tier || 'pro';
107
+ const totalCredits = tier === 'enterprise' ? 10000 : (tier === 'pro' ? 1000 : 100);
108
+ const renewAt = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString();
109
+ let updatedAuth;
110
+ try {
111
+ const existing = loadAuthConfig();
112
+ const updated = {
113
+ ...existing,
114
+ currentTier: tier,
115
+ creditsTotal: totalCredits,
116
+ creditsUsed: 0,
117
+ renewAt,
118
+ lastPaymentId: payment_id,
119
+ lastOrderId: order_id,
120
+ paymentProvider: 'razorpay',
121
+ };
122
+ saveAuthConfig(updated);
123
+ updatedAuth = updated;
124
+ }
125
+ catch { }
126
+ return {
127
+ success: true,
128
+ order_id,
129
+ payment_id,
130
+ tier,
131
+ totalCredits,
132
+ renewAt,
133
+ auth: updatedAuth,
134
+ };
135
+ }
136
+ //# sourceMappingURL=razorpay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"razorpay.js","sourceRoot":"","sources":["razorpay.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAC;AAE5E,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,UAAU,gBAAgB;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,oBAAoB;IAChC,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,mBAAmB;IAC/B,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAE1C,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACzB,MAAM,GAAG,GAAQ,IAAI,KAAK,CAAC,oHAAoH,CAAC,CAAC;QACjJ,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC;QACrB,MAAM,GAAG,CAA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E,IAAI,WAAmC,CAAC;IACxC,IAAI,CAAC;QACD,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;QAClC,MAAM,OAAO,GAAe;YACxB,GAAG,QAAQ;YACX,WAAW,EAAE,IAAW;YACxB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,CAAC;YACd,OAAO;YACP,aAAa,EAAE,UAAU;YACzB,WAAW,EAAE,QAAQ;YACrB,eAAe,EAAE,UAAU;SAC9B,CAAC;QACF,cAAc,CAAC,OAAO,CAAC,CAAC;QACxB,WAAW,GAAG,OAAO,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC,CAAC,CAAC;IAEX,OAAO;QACH,OAAO,EAAE,IAAI;QACb,QAAQ;QACR,UAAU;QACV,IAAI;QACJ,YAAY;QACZ,OAAO;QACP,IAAI,EAAE,WAAW;KACpB,CAAC;AACN,CAAC"}
@@ -0,0 +1,103 @@
1
+ [debug] [2026-09-11T13:38:39.856Z] ----------------------------------------------------------------------
2
+ [debug] [2026-09-11T13:38:39.860Z] Command: C:\Program Files\nodejs\node.exe C:\Users\rishi\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js deploy --only hosting
3
+ [debug] [2026-09-11T13:38:39.860Z] CLI Version: 15.30.0
4
+ [debug] [2026-09-11T13:38:39.860Z] Platform: win32
5
+ [debug] [2026-09-11T13:38:39.861Z] Node Version: v22.20.0
6
+ [debug] [2026-09-11T13:38:39.861Z] Detected Agent: unknown
7
+ [debug] [2026-09-11T13:38:39.861Z] Time: Fri Sep 11 2026 19:08:39 GMT+0530 (India Standard Time)
8
+ [debug] [2026-09-11T13:38:39.861Z] ----------------------------------------------------------------------
9
+ [debug]
10
+ [debug] [2026-09-11T13:38:44.368Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
11
+ [debug] [2026-09-11T13:38:44.369Z] > authorizing via signed-in user (rishishandilya40@gmail.com)
12
+ [debug] [2026-09-11T13:38:44.369Z] [iam] checking project frontterrain for permissions ["firebase.projects.get","firebasehosting.sites.update"]
13
+ [debug] [2026-09-11T13:38:44.390Z] Checked if tokens are valid: true, expires at: 1789136234965
14
+ [debug] [2026-09-11T13:38:44.391Z] Checked if tokens are valid: true, expires at: 1789136234965
15
+ [debug] [2026-09-11T13:38:44.392Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions [none]
16
+ [debug] [2026-09-11T13:38:44.393Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions x-goog-user-project=frontterrain
17
+ [debug] [2026-09-11T13:38:44.393Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
18
+ [debug] [2026-09-11T13:39:05.264Z] ----------------------------------------------------------------------
19
+ [debug] [2026-09-11T13:39:05.268Z] Command: C:\Program Files\nodejs\node.exe C:\Users\rishi\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js deploy --only hosting
20
+ [debug] [2026-09-11T13:39:05.269Z] CLI Version: 15.30.0
21
+ [debug] [2026-09-11T13:39:05.269Z] Platform: win32
22
+ [debug] [2026-09-11T13:39:05.269Z] Node Version: v22.20.0
23
+ [debug] [2026-09-11T13:39:05.270Z] Detected Agent: unknown
24
+ [debug] [2026-09-11T13:39:05.270Z] Time: Fri Sep 11 2026 19:09:05 GMT+0530 (India Standard Time)
25
+ [debug] [2026-09-11T13:39:05.270Z] ----------------------------------------------------------------------
26
+ [debug]
27
+ [debug] [2026-09-11T13:39:08.785Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
28
+ [debug] [2026-09-11T13:39:08.786Z] > authorizing via signed-in user (rishishandilya40@gmail.com)
29
+ [debug] [2026-09-11T13:39:08.786Z] [iam] checking project frontterrain for permissions ["firebase.projects.get","firebasehosting.sites.update"]
30
+ [debug] [2026-09-11T13:39:08.804Z] Checked if tokens are valid: true, expires at: 1789136234965
31
+ [debug] [2026-09-11T13:39:08.804Z] Checked if tokens are valid: true, expires at: 1789136234965
32
+ [debug] [2026-09-11T13:39:08.807Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions [none]
33
+ [debug] [2026-09-11T13:39:08.807Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions x-goog-user-project=frontterrain
34
+ [debug] [2026-09-11T13:39:08.808Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
35
+ [debug] [2026-09-11T13:39:10.817Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions 200
36
+ [debug] [2026-09-11T13:39:10.817Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/frontterrain:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
37
+ [debug] [2026-09-11T13:39:10.818Z] Checked if tokens are valid: true, expires at: 1789136234965
38
+ [debug] [2026-09-11T13:39:10.818Z] Checked if tokens are valid: true, expires at: 1789136234965
39
+ [debug] [2026-09-11T13:39:10.819Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/frontterrain [none]
40
+ [debug] [2026-09-11T13:39:11.602Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/frontterrain 200
41
+ [debug] [2026-09-11T13:39:11.602Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/frontterrain {"projectId":"frontterrain","projectNumber":"443977559241","displayName":"frontterrain","name":"projects/frontterrain","resources":{"hostingSite":"frontterrain","realtimeDatabaseInstance":"frontterrain-default-rtdb"},"state":"ACTIVE","labels":{"firebase":"enabled","firebase/storage-default-bucket":"created","firebaseworkflows/environment":"production"},"etag":"1_78a6722f-2aff-4818-b8b5-030f66204476"}
42
+ [info]
43
+ [info] === Deploying to 'frontterrain'...
44
+ [info]
45
+ [info] i deploying hosting
46
+ [debug] [2026-09-11T13:39:11.607Z] Checked if tokens are valid: true, expires at: 1789136234965
47
+ [debug] [2026-09-11T13:39:11.607Z] Checked if tokens are valid: true, expires at: 1789136234965
48
+ [debug] [2026-09-11T13:39:11.607Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/frontterrain/sites/tryscout [none]
49
+ [debug] [2026-09-11T13:39:13.065Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/frontterrain/sites/tryscout 200
50
+ [debug] [2026-09-11T13:39:13.065Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/frontterrain/sites/tryscout {"name":"projects/frontterrain/sites/tryscout","defaultUrl":"https://tryscout.web.app","type":"USER_SITE"}
51
+ [debug] [2026-09-11T13:39:13.069Z] Checked if tokens are valid: true, expires at: 1789136234965
52
+ [debug] [2026-09-11T13:39:13.069Z] Checked if tokens are valid: true, expires at: 1789136234965
53
+ [debug] [2026-09-11T13:39:13.069Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/tryscout/versions [none]
54
+ [debug] [2026-09-11T13:39:13.069Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/tryscout/versions {"status":"CREATED","labels":{"deployment-tool":"cli-firebase"}}
55
+ [debug] [2026-09-11T13:39:14.161Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/tryscout/versions 200
56
+ [debug] [2026-09-11T13:39:14.161Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/tryscout/versions {"name":"projects/443977559241/sites/tryscout/versions/4bdc9aa79fd6b3f1","status":"CREATED","config":{},"labels":{"deployment-tool":"cli-firebase"}}
57
+ [info] i hosting[tryscout]: beginning deploy...
58
+ [info] i hosting[tryscout]: found 7 files in web
59
+ [debug] [2026-09-11T13:39:14.179Z] [hosting] uploading with 200 concurrency
60
+ [debug] [2026-09-11T13:39:14.212Z] Checked if tokens are valid: true, expires at: 1789136234965
61
+ [debug] [2026-09-11T13:39:14.213Z] Checked if tokens are valid: true, expires at: 1789136234965
62
+ [debug] [2026-09-11T13:39:14.214Z] [hosting] hash cache [d2Vi] stored for 7 files
63
+ [debug] [2026-09-11T13:39:14.215Z] [hosting][hash queue][FINAL] {"max":26,"min":1,"avg":20.714285714285715,"active":0,"complete":7,"success":7,"errored":0,"retried":0,"total":7,"elapsed":32}
64
+ [debug] [2026-09-11T13:39:14.216Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/443977559241/sites/tryscout/versions/4bdc9aa79fd6b3f1:populateFiles [none]
65
+ [debug] [2026-09-11T13:39:14.216Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/443977559241/sites/tryscout/versions/4bdc9aa79fd6b3f1:populateFiles {"files":{"/ScoutFavicon.png":"41a9ca9abf7acd2976e78c72a72285b49cc0e64b2b5eeb2c2b88c69628fc618a","/paid_plans.html":"4575f51ff7a5d36601fe9a1aa2f0e164d1621daa4befca152c97338ef6b802b3","/styles.css":"802a23ff4b01e6897011490ebe76ad7943e2ec4e7a0e0d31a0fb8277ece237ee","/authentication.html":"8c072cd5ef13845d7eea447685fc4cf1ca5c34ff1e8b8ebf1ae2b9e69c6c8b8c","/web_cli.html":"1257e1531714ba94225ad9d61fd469ba3c224052b16b2f15a93be930712e09f2","/index.html":"2ebcbf5fffc488928cef4ed75745a81314776e005560e33c3870bb4d14068c61","/app.js":"ff780163c1af103d5c054e226db5bee558df5e08d8684b97ae9dcfaf8f94a1d0"}}
66
+ [debug] [2026-09-11T13:39:15.164Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/443977559241/sites/tryscout/versions/4bdc9aa79fd6b3f1:populateFiles 200
67
+ [debug] [2026-09-11T13:39:15.164Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/443977559241/sites/tryscout/versions/4bdc9aa79fd6b3f1:populateFiles {"uploadRequiredHashes":["4575f51ff7a5d36601fe9a1aa2f0e164d1621daa4befca152c97338ef6b802b3","802a23ff4b01e6897011490ebe76ad7943e2ec4e7a0e0d31a0fb8277ece237ee","8c072cd5ef13845d7eea447685fc4cf1ca5c34ff1e8b8ebf1ae2b9e69c6c8b8c","1257e1531714ba94225ad9d61fd469ba3c224052b16b2f15a93be930712e09f2","2ebcbf5fffc488928cef4ed75745a81314776e005560e33c3870bb4d14068c61","ff780163c1af103d5c054e226db5bee558df5e08d8684b97ae9dcfaf8f94a1d0"],"uploadUrl":"https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files"}
68
+ [debug] [2026-09-11T13:39:15.165Z] Checked if tokens are valid: true, expires at: 1789136234965
69
+ [debug] [2026-09-11T13:39:15.165Z] Checked if tokens are valid: true, expires at: 1789136234965
70
+ [debug] [2026-09-11T13:39:15.165Z] Checked if tokens are valid: true, expires at: 1789136234965
71
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
72
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
73
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
74
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
75
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
76
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
77
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
78
+ [debug] [2026-09-11T13:39:15.166Z] Checked if tokens are valid: true, expires at: 1789136234965
79
+ [debug] [2026-09-11T13:39:15.167Z] Checked if tokens are valid: true, expires at: 1789136234965
80
+ [debug] [2026-09-11T13:39:15.167Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/4575f51ff7a5d36601fe9a1aa2f0e164d1621daa4befca152c97338ef6b802b3 [none]
81
+ [debug] [2026-09-11T13:39:15.167Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/4575f51ff7a5d36601fe9a1aa2f0e164d1621daa4befca152c97338ef6b802b3 [stream]
82
+ [debug] [2026-09-11T13:39:15.169Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/802a23ff4b01e6897011490ebe76ad7943e2ec4e7a0e0d31a0fb8277ece237ee [none]
83
+ [debug] [2026-09-11T13:39:15.169Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/802a23ff4b01e6897011490ebe76ad7943e2ec4e7a0e0d31a0fb8277ece237ee [stream]
84
+ [debug] [2026-09-11T13:39:15.170Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/8c072cd5ef13845d7eea447685fc4cf1ca5c34ff1e8b8ebf1ae2b9e69c6c8b8c [none]
85
+ [debug] [2026-09-11T13:39:15.170Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/8c072cd5ef13845d7eea447685fc4cf1ca5c34ff1e8b8ebf1ae2b9e69c6c8b8c [stream]
86
+ [debug] [2026-09-11T13:39:15.171Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/1257e1531714ba94225ad9d61fd469ba3c224052b16b2f15a93be930712e09f2 [none]
87
+ [debug] [2026-09-11T13:39:15.171Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/1257e1531714ba94225ad9d61fd469ba3c224052b16b2f15a93be930712e09f2 [stream]
88
+ [debug] [2026-09-11T13:39:15.172Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/2ebcbf5fffc488928cef4ed75745a81314776e005560e33c3870bb4d14068c61 [none]
89
+ [debug] [2026-09-11T13:39:15.172Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/2ebcbf5fffc488928cef4ed75745a81314776e005560e33c3870bb4d14068c61 [stream]
90
+ [debug] [2026-09-11T13:39:15.173Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/ff780163c1af103d5c054e226db5bee558df5e08d8684b97ae9dcfaf8f94a1d0 [none]
91
+ [debug] [2026-09-11T13:39:15.173Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/ff780163c1af103d5c054e226db5bee558df5e08d8684b97ae9dcfaf8f94a1d0 [stream]
92
+ [debug] [2026-09-11T13:39:15.180Z] [hosting][populate queue][FINAL] {"max":955,"min":955,"avg":955,"active":0,"complete":1,"success":1,"errored":0,"retried":0,"total":1,"elapsed":968}
93
+ [debug] [2026-09-11T13:39:15.181Z] [hosting] uploads queued: 6
94
+ [debug] [2026-09-11T13:39:17.113Z] <<< [apiv2][status] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/802a23ff4b01e6897011490ebe76ad7943e2ec4e7a0e0d31a0fb8277ece237ee 200
95
+ [debug] [2026-09-11T13:39:17.113Z] <<< [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/802a23ff4b01e6897011490ebe76ad7943e2ec4e7a0e0d31a0fb8277ece237ee [stream]
96
+ [debug] [2026-09-11T13:39:17.560Z] <<< [apiv2][status] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/1257e1531714ba94225ad9d61fd469ba3c224052b16b2f15a93be930712e09f2 200
97
+ [debug] [2026-09-11T13:39:17.560Z] <<< [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/1257e1531714ba94225ad9d61fd469ba3c224052b16b2f15a93be930712e09f2 [stream]
98
+ [debug] [2026-09-11T13:39:17.789Z] <<< [apiv2][status] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/2ebcbf5fffc488928cef4ed75745a81314776e005560e33c3870bb4d14068c61 200
99
+ [debug] [2026-09-11T13:39:17.789Z] <<< [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/2ebcbf5fffc488928cef4ed75745a81314776e005560e33c3870bb4d14068c61 [stream]
100
+ [debug] [2026-09-11T13:39:17.795Z] <<< [apiv2][status] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/8c072cd5ef13845d7eea447685fc4cf1ca5c34ff1e8b8ebf1ae2b9e69c6c8b8c 200
101
+ [debug] [2026-09-11T13:39:17.795Z] <<< [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/8c072cd5ef13845d7eea447685fc4cf1ca5c34ff1e8b8ebf1ae2b9e69c6c8b8c [stream]
102
+ [debug] [2026-09-11T13:39:17.911Z] <<< [apiv2][status] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/4575f51ff7a5d36601fe9a1aa2f0e164d1621daa4befca152c97338ef6b802b3 200
103
+ [debug] [2026-09-11T13:39:17.911Z] <<< [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/tryscout/versions/4bdc9aa79fd6b3f1/files/4575f51ff7a5d36601fe9a1aa2f0e164d1621daa4befca152c97338ef6b802b3 [stream]
package/firebase.json CHANGED
@@ -9,6 +9,21 @@
9
9
  ],
10
10
  "cleanUrls": true,
11
11
  "trailingSlash": false,
12
+ "headers": [
13
+ {
14
+ "source": "/**",
15
+ "headers": [
16
+ {
17
+ "key": "Content-Security-Policy",
18
+ "value": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com https://www.paypal.com https://www.sandbox.paypal.com https://*.paypalobjects.com https://apis.google.com https://static.cloudflareinsights.com https://checkout.razorpay.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdnjs.cloudflare.com; font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com data:; img-src 'self' data: blob: https: https://*.paypalobjects.com https://cdn.razorpay.com; connect-src 'self' http://localhost:* http://127.0.0.1:* https://localhost:* https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://*.paypal.com https://*.paypalobjects.com https://api.razorpay.com https://lumberjack.razorpay.com https://lumberjack-rzp.razorpay.com https://api.openai.com https://api.groq.com https://integrate.api.nvidia.com https://generativelanguage.googleapis.com https://*.firebaseio.com https://*.googleapis.com https://cloudflareinsights.com https://static.cloudflareinsights.com; frame-src 'self' https://www.paypal.com https://www.sandbox.paypal.com https://*.firebaseapp.com https://api.razorpay.com https://checkout.razorpay.com; object-src 'none'; base-uri 'self';"
19
+ },
20
+ {
21
+ "key": "Cache-Control",
22
+ "value": "no-cache, no-store, must-revalidate"
23
+ }
24
+ ]
25
+ }
26
+ ],
12
27
  "rewrites": [
13
28
  {
14
29
  "source": "/auth",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ft-scout",
3
- "version": "8.0.5",
3
+ "version": "8.0.7",
4
4
  "type": "module",
5
5
  "description": "FrontTerrain — The Onboarding Co-Pilot for New Codebases",
6
6
  "main": "index.js",
@@ -40,6 +40,7 @@
40
40
  "dotenv": "^17.4.2",
41
41
  "nodemailer": "^9.0.4",
42
42
  "openai": "^7.1.0",
43
+ "razorpay": "^2.9.8",
43
44
  "simple-git": "^3.36.0"
44
45
  },
45
46
  "devDependencies": {
@@ -47,4 +48,4 @@
47
48
  "tsx": "^4.23.1",
48
49
  "typescript": "^7.0.2"
49
50
  }
50
- }
51
+ }