sniff-qa 0.3.0 → 0.5.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 +75 -5
- package/dist/classifier-MWQMQ727.js +1701 -0
- package/dist/classifier-MWQMQ727.js.map +1 -0
- package/dist/cli/index.js +92 -27
- package/dist/cli/index.js.map +1 -1
- package/dist/dev-server-detector-XQ5AYPDT.js +319 -0
- package/dist/dev-server-detector-XQ5AYPDT.js.map +1 -0
- package/dist/discover-JRU5E4FR.js +327 -0
- package/dist/discover-JRU5E4FR.js.map +1 -0
- package/dist/domain-UQ34YE4B.js +1817 -0
- package/dist/domain-UQ34YE4B.js.map +1 -0
- package/dist/edge-cases-ZADKDZHL.js +246 -0
- package/dist/edge-cases-ZADKDZHL.js.map +1 -0
- package/dist/ensure-browsers-ACHCEQCT.js +60 -0
- package/dist/ensure-browsers-ACHCEQCT.js.map +1 -0
- package/dist/flakiness-OLJAY7CS.js +53 -0
- package/dist/flakiness-OLJAY7CS.js.map +1 -0
- package/dist/init-IQKT4ANC.js +148 -0
- package/dist/init-IQKT4ANC.js.map +1 -0
- package/dist/llm-VJAI6H6G.js +126 -0
- package/dist/llm-VJAI6H6G.js.map +1 -0
- package/dist/mcp/server.js +219 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/persistence-KTCRIGHU.js +270 -0
- package/dist/persistence-KTCRIGHU.js.map +1 -0
- package/dist/{repo-analyzer-WK5WP7NT.js → repo-analyzer-4OURSITY.js} +1 -1
- package/dist/{report-WLDV72FM.js → report-IKRVVIW4.js} +1 -1
- package/dist/report-SDZWX25B.js +280 -0
- package/dist/report-SDZWX25B.js.map +1 -0
- package/dist/runner-OYTN2NFD.js +996 -0
- package/dist/runner-OYTN2NFD.js.map +1 -0
- package/dist/scenarios-I7YYVTD2.js +987 -0
- package/dist/scenarios-I7YYVTD2.js.map +1 -0
- package/dist/tiebreak-L5UFNKU2.js +60 -0
- package/dist/tiebreak-L5UFNKU2.js.map +1 -0
- package/dist/{unified-7RKNG3EI.js → unified-JCUBP6UO.js} +2 -2
- package/package.json +2 -2
- package/dist/dev-server-detector-NJ5RN4IC.js +0 -150
- package/dist/dev-server-detector-NJ5RN4IC.js.map +0 -1
- package/dist/init-75MMIW4A.js +0 -66
- package/dist/init-75MMIW4A.js.map +0 -1
- /package/dist/{repo-analyzer-WK5WP7NT.js.map → repo-analyzer-4OURSITY.js.map} +0 -0
- /package/dist/{report-WLDV72FM.js.map → report-IKRVVIW4.js.map} +0 -0
- /package/dist/{unified-7RKNG3EI.js.map → unified-JCUBP6UO.js.map} +0 -0
|
@@ -0,0 +1,1701 @@
|
|
|
1
|
+
// src/discovery/classifier/signatures/ecommerce.ts
|
|
2
|
+
var ecommerce = {
|
|
3
|
+
type: "ecommerce",
|
|
4
|
+
routes: {
|
|
5
|
+
cart: 5,
|
|
6
|
+
checkout: 8,
|
|
7
|
+
product: 4,
|
|
8
|
+
products: 4,
|
|
9
|
+
category: 2,
|
|
10
|
+
categories: 2,
|
|
11
|
+
orders: 3,
|
|
12
|
+
order: 3,
|
|
13
|
+
shop: 3,
|
|
14
|
+
store: 3,
|
|
15
|
+
collection: 2,
|
|
16
|
+
collections: 2,
|
|
17
|
+
wishlist: 2
|
|
18
|
+
},
|
|
19
|
+
elements: {
|
|
20
|
+
"add to cart": 5,
|
|
21
|
+
"add to bag": 5,
|
|
22
|
+
"buy now": 5,
|
|
23
|
+
checkout: 4,
|
|
24
|
+
quantity: 2,
|
|
25
|
+
price: 1,
|
|
26
|
+
sku: 3,
|
|
27
|
+
"place order": 5,
|
|
28
|
+
cart: 2,
|
|
29
|
+
"in stock": 2
|
|
30
|
+
},
|
|
31
|
+
deps: {
|
|
32
|
+
stripe: 6,
|
|
33
|
+
"@stripe/stripe-js": 6,
|
|
34
|
+
"@stripe/react-stripe-js": 6,
|
|
35
|
+
shopify: 8,
|
|
36
|
+
"@shopify/hydrogen": 8,
|
|
37
|
+
"@shopify/polaris": 6,
|
|
38
|
+
"commerce.js": 6,
|
|
39
|
+
"@commerce/core": 6,
|
|
40
|
+
medusa: 6,
|
|
41
|
+
"@medusajs/medusa": 6,
|
|
42
|
+
"use-shopping-cart": 5,
|
|
43
|
+
braintree: 5,
|
|
44
|
+
"braintree-web": 5,
|
|
45
|
+
paypal: 4,
|
|
46
|
+
"@paypal/react-paypal-js": 5
|
|
47
|
+
},
|
|
48
|
+
schema: {
|
|
49
|
+
product: 6,
|
|
50
|
+
products: 5,
|
|
51
|
+
order: 6,
|
|
52
|
+
orders: 5,
|
|
53
|
+
orderitem: 5,
|
|
54
|
+
cart: 5,
|
|
55
|
+
cartitem: 4,
|
|
56
|
+
invoice: 3,
|
|
57
|
+
customer: 3,
|
|
58
|
+
inventory: 3,
|
|
59
|
+
sku: 3,
|
|
60
|
+
payment: 4
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// src/discovery/classifier/signatures/booking.ts
|
|
65
|
+
var booking = {
|
|
66
|
+
type: "booking",
|
|
67
|
+
routes: {
|
|
68
|
+
booking: 6,
|
|
69
|
+
bookings: 6,
|
|
70
|
+
book: 6,
|
|
71
|
+
reserve: 5,
|
|
72
|
+
reservation: 6,
|
|
73
|
+
reservations: 6,
|
|
74
|
+
reschedule: 4,
|
|
75
|
+
availability: 5,
|
|
76
|
+
listing: 5,
|
|
77
|
+
listings: 5,
|
|
78
|
+
appointment: 6,
|
|
79
|
+
appointments: 6,
|
|
80
|
+
schedule: 4,
|
|
81
|
+
calendar: 3,
|
|
82
|
+
stay: 3,
|
|
83
|
+
stays: 3,
|
|
84
|
+
room: 2,
|
|
85
|
+
rooms: 2
|
|
86
|
+
},
|
|
87
|
+
elements: {
|
|
88
|
+
"book now": 6,
|
|
89
|
+
"reserve now": 5,
|
|
90
|
+
"check in": 4,
|
|
91
|
+
"check out": 4,
|
|
92
|
+
"select dates": 4,
|
|
93
|
+
"confirm booking": 5,
|
|
94
|
+
availability: 4,
|
|
95
|
+
"per night": 3,
|
|
96
|
+
guests: 3,
|
|
97
|
+
"date range": 3
|
|
98
|
+
},
|
|
99
|
+
deps: {
|
|
100
|
+
fullcalendar: 6,
|
|
101
|
+
"@fullcalendar/core": 6,
|
|
102
|
+
"@fullcalendar/react": 6,
|
|
103
|
+
calendly: 5,
|
|
104
|
+
"react-day-picker": 4,
|
|
105
|
+
"react-calendar": 4,
|
|
106
|
+
"date-fns": 2,
|
|
107
|
+
"mapbox-gl": 3,
|
|
108
|
+
leaflet: 3,
|
|
109
|
+
"react-leaflet": 3,
|
|
110
|
+
"airbnb-js-shims": 5
|
|
111
|
+
},
|
|
112
|
+
schema: {
|
|
113
|
+
reservation: 6,
|
|
114
|
+
reservations: 5,
|
|
115
|
+
booking: 6,
|
|
116
|
+
bookings: 5,
|
|
117
|
+
listing: 6,
|
|
118
|
+
listings: 5,
|
|
119
|
+
appointment: 6,
|
|
120
|
+
appointments: 5,
|
|
121
|
+
slot: 4,
|
|
122
|
+
slots: 4,
|
|
123
|
+
availability: 4,
|
|
124
|
+
host: 4,
|
|
125
|
+
guest: 3,
|
|
126
|
+
property: 3,
|
|
127
|
+
stay: 3,
|
|
128
|
+
room: 3
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// src/discovery/classifier/signatures/social.ts
|
|
133
|
+
var social = {
|
|
134
|
+
type: "social",
|
|
135
|
+
routes: {
|
|
136
|
+
feed: 6,
|
|
137
|
+
post: 5,
|
|
138
|
+
posts: 5,
|
|
139
|
+
profile: 4,
|
|
140
|
+
profiles: 4,
|
|
141
|
+
friends: 5,
|
|
142
|
+
followers: 5,
|
|
143
|
+
following: 5,
|
|
144
|
+
messages: 5,
|
|
145
|
+
message: 4,
|
|
146
|
+
chat: 4,
|
|
147
|
+
chats: 4,
|
|
148
|
+
notifications: 4,
|
|
149
|
+
timeline: 5,
|
|
150
|
+
comments: 4,
|
|
151
|
+
likes: 4,
|
|
152
|
+
explore: 4,
|
|
153
|
+
groups: 3,
|
|
154
|
+
community: 3
|
|
155
|
+
},
|
|
156
|
+
elements: {
|
|
157
|
+
like: 3,
|
|
158
|
+
comment: 3,
|
|
159
|
+
share: 3,
|
|
160
|
+
follow: 4,
|
|
161
|
+
unfollow: 4,
|
|
162
|
+
"send message": 4,
|
|
163
|
+
post: 2,
|
|
164
|
+
repost: 4,
|
|
165
|
+
"add friend": 5,
|
|
166
|
+
retweet: 5,
|
|
167
|
+
mention: 3
|
|
168
|
+
},
|
|
169
|
+
deps: {
|
|
170
|
+
"socket.io": 4,
|
|
171
|
+
"socket.io-client": 4,
|
|
172
|
+
"stream-chat-react": 6,
|
|
173
|
+
"getstream.io": 5,
|
|
174
|
+
pusher: 4,
|
|
175
|
+
"pusher-js": 4,
|
|
176
|
+
emoji: 2,
|
|
177
|
+
"emoji-mart": 3
|
|
178
|
+
},
|
|
179
|
+
schema: {
|
|
180
|
+
post: 6,
|
|
181
|
+
posts: 5,
|
|
182
|
+
comment: 5,
|
|
183
|
+
comments: 4,
|
|
184
|
+
like: 4,
|
|
185
|
+
likes: 3,
|
|
186
|
+
follow: 5,
|
|
187
|
+
follows: 5,
|
|
188
|
+
friend: 4,
|
|
189
|
+
message: 4,
|
|
190
|
+
notification: 3,
|
|
191
|
+
reaction: 4,
|
|
192
|
+
profile: 3
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// src/discovery/classifier/signatures/saas.ts
|
|
197
|
+
var saas = {
|
|
198
|
+
type: "saas",
|
|
199
|
+
routes: {
|
|
200
|
+
dashboard: 6,
|
|
201
|
+
settings: 5,
|
|
202
|
+
billing: 6,
|
|
203
|
+
subscription: 5,
|
|
204
|
+
subscriptions: 5,
|
|
205
|
+
onboarding: 5,
|
|
206
|
+
workspace: 5,
|
|
207
|
+
workspaces: 5,
|
|
208
|
+
team: 4,
|
|
209
|
+
teams: 4,
|
|
210
|
+
members: 4,
|
|
211
|
+
invites: 4,
|
|
212
|
+
integrations: 4,
|
|
213
|
+
usage: 3,
|
|
214
|
+
api: 2,
|
|
215
|
+
app: 2
|
|
216
|
+
},
|
|
217
|
+
elements: {
|
|
218
|
+
"invite team": 4,
|
|
219
|
+
"create workspace": 5,
|
|
220
|
+
"upgrade plan": 5,
|
|
221
|
+
"start trial": 5,
|
|
222
|
+
"connect integration": 4,
|
|
223
|
+
"api key": 4,
|
|
224
|
+
"manage billing": 5,
|
|
225
|
+
plan: 3,
|
|
226
|
+
seats: 4
|
|
227
|
+
},
|
|
228
|
+
deps: {
|
|
229
|
+
"next-auth": 4,
|
|
230
|
+
"@auth/core": 4,
|
|
231
|
+
clerk: 5,
|
|
232
|
+
"@clerk/nextjs": 5,
|
|
233
|
+
"@clerk/clerk-react": 5,
|
|
234
|
+
supabase: 3,
|
|
235
|
+
"@supabase/supabase-js": 3,
|
|
236
|
+
"@supabase/auth-helpers-nextjs": 4,
|
|
237
|
+
stripe: 4,
|
|
238
|
+
"@stripe/stripe-js": 4,
|
|
239
|
+
auth0: 5,
|
|
240
|
+
"@auth0/nextjs-auth0": 5,
|
|
241
|
+
posthog: 3,
|
|
242
|
+
"posthog-js": 3,
|
|
243
|
+
launchdarkly: 3,
|
|
244
|
+
"launchdarkly-react-client-sdk": 4,
|
|
245
|
+
sentry: 2,
|
|
246
|
+
"@sentry/nextjs": 3
|
|
247
|
+
},
|
|
248
|
+
schema: {
|
|
249
|
+
workspace: 6,
|
|
250
|
+
workspaces: 5,
|
|
251
|
+
subscription: 6,
|
|
252
|
+
subscriptions: 5,
|
|
253
|
+
plan: 5,
|
|
254
|
+
user: 3,
|
|
255
|
+
users: 3,
|
|
256
|
+
team: 4,
|
|
257
|
+
teams: 4,
|
|
258
|
+
membership: 4,
|
|
259
|
+
invite: 4,
|
|
260
|
+
apikey: 4,
|
|
261
|
+
apitoken: 4,
|
|
262
|
+
organization: 4,
|
|
263
|
+
org: 3
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// src/discovery/classifier/signatures/content.ts
|
|
268
|
+
var content = {
|
|
269
|
+
type: "content",
|
|
270
|
+
routes: {
|
|
271
|
+
articles: 5,
|
|
272
|
+
article: 5,
|
|
273
|
+
blog: 6,
|
|
274
|
+
post: 4,
|
|
275
|
+
posts: 4,
|
|
276
|
+
read: 4,
|
|
277
|
+
author: 3,
|
|
278
|
+
authors: 3,
|
|
279
|
+
tag: 3,
|
|
280
|
+
tags: 3,
|
|
281
|
+
topic: 3,
|
|
282
|
+
topics: 3,
|
|
283
|
+
category: 3,
|
|
284
|
+
rss: 3,
|
|
285
|
+
feed: 2,
|
|
286
|
+
newsletter: 4,
|
|
287
|
+
search: 2
|
|
288
|
+
},
|
|
289
|
+
elements: {
|
|
290
|
+
"read more": 4,
|
|
291
|
+
"read article": 4,
|
|
292
|
+
subscribe: 3,
|
|
293
|
+
"newsletter signup": 5,
|
|
294
|
+
"share article": 3,
|
|
295
|
+
"estimated reading time": 4,
|
|
296
|
+
"by author": 3,
|
|
297
|
+
"published on": 3
|
|
298
|
+
},
|
|
299
|
+
deps: {
|
|
300
|
+
contentful: 6,
|
|
301
|
+
"@contentful/rich-text-react-renderer": 5,
|
|
302
|
+
sanity: 6,
|
|
303
|
+
"@sanity/client": 6,
|
|
304
|
+
"next-sanity": 6,
|
|
305
|
+
ghost: 5,
|
|
306
|
+
"@tryghost/content-api": 6,
|
|
307
|
+
"gray-matter": 4,
|
|
308
|
+
"remark": 3,
|
|
309
|
+
"remark-gfm": 3,
|
|
310
|
+
"rehype": 3,
|
|
311
|
+
"mdx-bundler": 5,
|
|
312
|
+
"@next/mdx": 5,
|
|
313
|
+
"next-mdx-remote": 5,
|
|
314
|
+
prismic: 5,
|
|
315
|
+
"@prismicio/client": 5,
|
|
316
|
+
strapi: 5
|
|
317
|
+
},
|
|
318
|
+
schema: {
|
|
319
|
+
post: 4,
|
|
320
|
+
posts: 4,
|
|
321
|
+
article: 5,
|
|
322
|
+
articles: 4,
|
|
323
|
+
author: 4,
|
|
324
|
+
category: 3,
|
|
325
|
+
tag: 3,
|
|
326
|
+
comment: 2
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
// src/discovery/classifier/signatures/crm.ts
|
|
331
|
+
var crm = {
|
|
332
|
+
type: "crm",
|
|
333
|
+
routes: {
|
|
334
|
+
contacts: 6,
|
|
335
|
+
contact: 5,
|
|
336
|
+
leads: 6,
|
|
337
|
+
lead: 5,
|
|
338
|
+
deals: 6,
|
|
339
|
+
deal: 5,
|
|
340
|
+
pipeline: 6,
|
|
341
|
+
pipelines: 5,
|
|
342
|
+
accounts: 4,
|
|
343
|
+
account: 3,
|
|
344
|
+
opportunities: 6,
|
|
345
|
+
opportunity: 5,
|
|
346
|
+
tasks: 3,
|
|
347
|
+
task: 3,
|
|
348
|
+
reports: 3,
|
|
349
|
+
activities: 4
|
|
350
|
+
},
|
|
351
|
+
elements: {
|
|
352
|
+
"add contact": 5,
|
|
353
|
+
"create deal": 5,
|
|
354
|
+
"assign to": 3,
|
|
355
|
+
"log activity": 4,
|
|
356
|
+
"next step": 3,
|
|
357
|
+
"close deal": 5,
|
|
358
|
+
"move to": 3,
|
|
359
|
+
pipeline: 3,
|
|
360
|
+
"follow up": 4
|
|
361
|
+
},
|
|
362
|
+
deps: {
|
|
363
|
+
"@hubspot/api-client": 6,
|
|
364
|
+
"salesforce-jsforce": 6,
|
|
365
|
+
jsforce: 6,
|
|
366
|
+
"pipedrive": 6,
|
|
367
|
+
"@sendgrid/mail": 3,
|
|
368
|
+
mailgun: 2
|
|
369
|
+
},
|
|
370
|
+
schema: {
|
|
371
|
+
contact: 6,
|
|
372
|
+
contacts: 5,
|
|
373
|
+
lead: 6,
|
|
374
|
+
leads: 5,
|
|
375
|
+
deal: 6,
|
|
376
|
+
deals: 5,
|
|
377
|
+
opportunity: 6,
|
|
378
|
+
opportunities: 5,
|
|
379
|
+
account: 4,
|
|
380
|
+
pipeline: 5,
|
|
381
|
+
stage: 4,
|
|
382
|
+
activity: 4,
|
|
383
|
+
task: 3
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
// src/discovery/classifier/signatures/auth-only.ts
|
|
388
|
+
var authOnly = {
|
|
389
|
+
type: "auth-only",
|
|
390
|
+
routes: {
|
|
391
|
+
login: 6,
|
|
392
|
+
signin: 6,
|
|
393
|
+
signup: 6,
|
|
394
|
+
register: 6,
|
|
395
|
+
logout: 4,
|
|
396
|
+
"forgot-password": 5,
|
|
397
|
+
"reset-password": 5,
|
|
398
|
+
verify: 4,
|
|
399
|
+
auth: 4,
|
|
400
|
+
profile: 3,
|
|
401
|
+
account: 2
|
|
402
|
+
},
|
|
403
|
+
elements: {
|
|
404
|
+
"sign in": 5,
|
|
405
|
+
"log in": 5,
|
|
406
|
+
"sign up": 5,
|
|
407
|
+
register: 5,
|
|
408
|
+
"create account": 5,
|
|
409
|
+
"forgot password": 5,
|
|
410
|
+
"reset password": 5,
|
|
411
|
+
password: 2,
|
|
412
|
+
email: 1
|
|
413
|
+
},
|
|
414
|
+
deps: {
|
|
415
|
+
"next-auth": 5,
|
|
416
|
+
"@auth/core": 5,
|
|
417
|
+
clerk: 5,
|
|
418
|
+
"@clerk/nextjs": 5,
|
|
419
|
+
auth0: 5,
|
|
420
|
+
"@auth0/nextjs-auth0": 5,
|
|
421
|
+
"@supabase/auth-helpers-nextjs": 5,
|
|
422
|
+
"firebase-auth": 5,
|
|
423
|
+
"firebase/auth": 5,
|
|
424
|
+
lucia: 5,
|
|
425
|
+
"lucia-auth": 5
|
|
426
|
+
},
|
|
427
|
+
schema: {
|
|
428
|
+
user: 3,
|
|
429
|
+
users: 3,
|
|
430
|
+
session: 3,
|
|
431
|
+
sessions: 3,
|
|
432
|
+
account: 2,
|
|
433
|
+
verification: 3
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// src/discovery/classifier/signatures/marketing.ts
|
|
438
|
+
var marketing = {
|
|
439
|
+
type: "marketing",
|
|
440
|
+
routes: {
|
|
441
|
+
pricing: 6,
|
|
442
|
+
features: 5,
|
|
443
|
+
about: 4,
|
|
444
|
+
contact: 4,
|
|
445
|
+
home: 2,
|
|
446
|
+
faq: 4,
|
|
447
|
+
testimonials: 4,
|
|
448
|
+
customers: 3,
|
|
449
|
+
partners: 3,
|
|
450
|
+
careers: 3,
|
|
451
|
+
"case-studies": 4,
|
|
452
|
+
demo: 4,
|
|
453
|
+
"get-started": 3
|
|
454
|
+
},
|
|
455
|
+
elements: {
|
|
456
|
+
"get started": 4,
|
|
457
|
+
"request demo": 5,
|
|
458
|
+
"book a demo": 5,
|
|
459
|
+
"contact sales": 5,
|
|
460
|
+
"start free trial": 5,
|
|
461
|
+
"learn more": 2,
|
|
462
|
+
"see pricing": 4,
|
|
463
|
+
testimonial: 3,
|
|
464
|
+
"our customers": 3
|
|
465
|
+
},
|
|
466
|
+
deps: {
|
|
467
|
+
"@vercel/analytics": 2,
|
|
468
|
+
"react-hubspot-form": 4,
|
|
469
|
+
hubspot: 3,
|
|
470
|
+
mailchimp: 3,
|
|
471
|
+
intercom: 4,
|
|
472
|
+
"@intercom/messenger-js-sdk": 4,
|
|
473
|
+
calendly: 3,
|
|
474
|
+
typeform: 3,
|
|
475
|
+
"react-typeform-embed": 4
|
|
476
|
+
},
|
|
477
|
+
schema: {
|
|
478
|
+
lead: 3,
|
|
479
|
+
subscriber: 4,
|
|
480
|
+
feedback: 2
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// src/discovery/classifier/signatures/admin.ts
|
|
485
|
+
var admin = {
|
|
486
|
+
type: "admin",
|
|
487
|
+
routes: {
|
|
488
|
+
admin: 6,
|
|
489
|
+
dashboard: 3,
|
|
490
|
+
users: 4,
|
|
491
|
+
roles: 4,
|
|
492
|
+
permissions: 5,
|
|
493
|
+
audit: 4,
|
|
494
|
+
logs: 4,
|
|
495
|
+
reports: 3,
|
|
496
|
+
exports: 3,
|
|
497
|
+
moderation: 5,
|
|
498
|
+
settings: 2
|
|
499
|
+
},
|
|
500
|
+
elements: {
|
|
501
|
+
"edit row": 4,
|
|
502
|
+
"delete row": 4,
|
|
503
|
+
"export csv": 5,
|
|
504
|
+
"bulk actions": 5,
|
|
505
|
+
"assign role": 4,
|
|
506
|
+
"revoke access": 4,
|
|
507
|
+
"view logs": 3
|
|
508
|
+
},
|
|
509
|
+
deps: {
|
|
510
|
+
"react-admin": 7,
|
|
511
|
+
refine: 6,
|
|
512
|
+
"@refinedev/core": 6,
|
|
513
|
+
"ant-design/pro-components": 5,
|
|
514
|
+
"mui-datatables": 5,
|
|
515
|
+
"@tanstack/react-table": 4,
|
|
516
|
+
agGrid: 4,
|
|
517
|
+
"ag-grid-react": 5,
|
|
518
|
+
keystonejs: 5,
|
|
519
|
+
"@keystone-6/core": 5
|
|
520
|
+
},
|
|
521
|
+
schema: {
|
|
522
|
+
user: 2,
|
|
523
|
+
role: 4,
|
|
524
|
+
permission: 5,
|
|
525
|
+
audit: 4,
|
|
526
|
+
log: 3,
|
|
527
|
+
auditlog: 5
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
// src/discovery/classifier/signatures/blank.ts
|
|
532
|
+
var blank = {
|
|
533
|
+
type: "blank",
|
|
534
|
+
routes: {},
|
|
535
|
+
elements: {},
|
|
536
|
+
deps: {},
|
|
537
|
+
schema: {}
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
// src/discovery/classifier/signatures/index.ts
|
|
541
|
+
var SIGNATURES = [
|
|
542
|
+
ecommerce,
|
|
543
|
+
booking,
|
|
544
|
+
social,
|
|
545
|
+
saas,
|
|
546
|
+
content,
|
|
547
|
+
crm,
|
|
548
|
+
authOnly,
|
|
549
|
+
marketing,
|
|
550
|
+
admin,
|
|
551
|
+
blank
|
|
552
|
+
];
|
|
553
|
+
|
|
554
|
+
// src/discovery/classifier/signatures/i18n.ts
|
|
555
|
+
var ROUTE_LOCALE_ALIASES = {
|
|
556
|
+
// --- SaaS ---
|
|
557
|
+
dashboard: [
|
|
558
|
+
"tableau",
|
|
559
|
+
"accueil",
|
|
560
|
+
// FR: tableau-de-bord
|
|
561
|
+
"panel",
|
|
562
|
+
"escritorio",
|
|
563
|
+
"inicio",
|
|
564
|
+
// ES
|
|
565
|
+
"ubersicht",
|
|
566
|
+
"uebersicht",
|
|
567
|
+
// DE
|
|
568
|
+
"painel",
|
|
569
|
+
// PT
|
|
570
|
+
"cruscotto",
|
|
571
|
+
"pannello"
|
|
572
|
+
// IT
|
|
573
|
+
],
|
|
574
|
+
settings: [
|
|
575
|
+
"parametres",
|
|
576
|
+
"reglages",
|
|
577
|
+
"preferences",
|
|
578
|
+
// FR
|
|
579
|
+
"ajustes",
|
|
580
|
+
"configuracion",
|
|
581
|
+
// ES
|
|
582
|
+
"einstellungen",
|
|
583
|
+
// DE
|
|
584
|
+
"configuracoes",
|
|
585
|
+
"definicoes",
|
|
586
|
+
// PT-BR / PT
|
|
587
|
+
"impostazioni"
|
|
588
|
+
// IT
|
|
589
|
+
],
|
|
590
|
+
billing: [
|
|
591
|
+
"facturation",
|
|
592
|
+
// FR
|
|
593
|
+
"facturacion",
|
|
594
|
+
"facturas",
|
|
595
|
+
// ES
|
|
596
|
+
"abrechnung",
|
|
597
|
+
"rechnungen",
|
|
598
|
+
// DE
|
|
599
|
+
"cobranca",
|
|
600
|
+
"faturamento",
|
|
601
|
+
"faturacao",
|
|
602
|
+
// PT-BR / PT
|
|
603
|
+
"fatturazione",
|
|
604
|
+
"fatture"
|
|
605
|
+
// IT
|
|
606
|
+
],
|
|
607
|
+
subscription: [
|
|
608
|
+
"abonnement",
|
|
609
|
+
// FR + DE (loan)
|
|
610
|
+
"suscripcion",
|
|
611
|
+
// ES
|
|
612
|
+
"mitgliedschaft",
|
|
613
|
+
// DE
|
|
614
|
+
"assinatura",
|
|
615
|
+
// PT
|
|
616
|
+
"abbonamento"
|
|
617
|
+
// IT
|
|
618
|
+
],
|
|
619
|
+
subscriptions: [
|
|
620
|
+
"abonnements",
|
|
621
|
+
"suscripciones",
|
|
622
|
+
"abonnements",
|
|
623
|
+
"assinaturas",
|
|
624
|
+
"abbonamenti"
|
|
625
|
+
],
|
|
626
|
+
onboarding: [
|
|
627
|
+
"bienvenue",
|
|
628
|
+
// FR
|
|
629
|
+
"bienvenida",
|
|
630
|
+
"bienvenido",
|
|
631
|
+
// ES
|
|
632
|
+
"willkommen",
|
|
633
|
+
"einrichtung",
|
|
634
|
+
// DE
|
|
635
|
+
"benvenuto"
|
|
636
|
+
// IT
|
|
637
|
+
],
|
|
638
|
+
workspace: [
|
|
639
|
+
"workspace",
|
|
640
|
+
// loanword across all
|
|
641
|
+
"espace",
|
|
642
|
+
// FR: espace-de-travail → 'espace'
|
|
643
|
+
"espacio",
|
|
644
|
+
// ES: espacio-de-trabajo → 'espacio'
|
|
645
|
+
"arbeitsbereich",
|
|
646
|
+
// DE
|
|
647
|
+
"espaco",
|
|
648
|
+
// PT
|
|
649
|
+
"spazio"
|
|
650
|
+
// IT
|
|
651
|
+
],
|
|
652
|
+
workspaces: ["arbeitsbereiche"],
|
|
653
|
+
team: [
|
|
654
|
+
"equipe",
|
|
655
|
+
// FR + PT-BR
|
|
656
|
+
"equipo",
|
|
657
|
+
// ES
|
|
658
|
+
"equipa",
|
|
659
|
+
// PT
|
|
660
|
+
"squadra"
|
|
661
|
+
// IT
|
|
662
|
+
// DE 'team' is loanword (dominant)
|
|
663
|
+
],
|
|
664
|
+
teams: ["equipes", "equipos", "equipas", "squadre"],
|
|
665
|
+
members: [
|
|
666
|
+
"membres",
|
|
667
|
+
"miembros",
|
|
668
|
+
"mitglieder",
|
|
669
|
+
"membros",
|
|
670
|
+
"membri"
|
|
671
|
+
],
|
|
672
|
+
invites: [
|
|
673
|
+
"invitations",
|
|
674
|
+
"invitar",
|
|
675
|
+
// FR / ES
|
|
676
|
+
"einladungen",
|
|
677
|
+
// DE
|
|
678
|
+
"convites",
|
|
679
|
+
// PT
|
|
680
|
+
"inviti"
|
|
681
|
+
// IT
|
|
682
|
+
],
|
|
683
|
+
integrations: [
|
|
684
|
+
"integraciones",
|
|
685
|
+
"integrationen",
|
|
686
|
+
"integracoes",
|
|
687
|
+
"integrazioni"
|
|
688
|
+
],
|
|
689
|
+
usage: [
|
|
690
|
+
"utilisation",
|
|
691
|
+
"consommation",
|
|
692
|
+
// FR
|
|
693
|
+
"uso",
|
|
694
|
+
"consumo",
|
|
695
|
+
// ES / PT
|
|
696
|
+
"nutzung",
|
|
697
|
+
"verbrauch",
|
|
698
|
+
// DE
|
|
699
|
+
"utilizzo"
|
|
700
|
+
// IT
|
|
701
|
+
],
|
|
702
|
+
// --- Auth ---
|
|
703
|
+
login: [
|
|
704
|
+
"connexion",
|
|
705
|
+
// FR
|
|
706
|
+
"sesion",
|
|
707
|
+
"iniciar",
|
|
708
|
+
"entrar",
|
|
709
|
+
"acceder",
|
|
710
|
+
// ES / PT
|
|
711
|
+
"anmelden",
|
|
712
|
+
// DE
|
|
713
|
+
"accedi"
|
|
714
|
+
// IT
|
|
715
|
+
],
|
|
716
|
+
signin: [
|
|
717
|
+
"connexion",
|
|
718
|
+
"anmelden",
|
|
719
|
+
"accedi"
|
|
720
|
+
],
|
|
721
|
+
signup: [
|
|
722
|
+
"inscription",
|
|
723
|
+
"s-inscrire",
|
|
724
|
+
"creer",
|
|
725
|
+
// FR
|
|
726
|
+
"registro",
|
|
727
|
+
"registrarse",
|
|
728
|
+
"alta",
|
|
729
|
+
// ES
|
|
730
|
+
"registrieren",
|
|
731
|
+
"anmeldung",
|
|
732
|
+
// DE
|
|
733
|
+
"cadastro",
|
|
734
|
+
"registo",
|
|
735
|
+
"criar",
|
|
736
|
+
// PT-BR / PT
|
|
737
|
+
"registrati",
|
|
738
|
+
"iscriviti"
|
|
739
|
+
// IT
|
|
740
|
+
],
|
|
741
|
+
register: [
|
|
742
|
+
"inscription",
|
|
743
|
+
"registro",
|
|
744
|
+
"registrieren",
|
|
745
|
+
"cadastro",
|
|
746
|
+
"registo",
|
|
747
|
+
"registrati"
|
|
748
|
+
],
|
|
749
|
+
logout: [
|
|
750
|
+
"deconnexion",
|
|
751
|
+
"deconnecter",
|
|
752
|
+
// FR
|
|
753
|
+
"salir",
|
|
754
|
+
// ES
|
|
755
|
+
"abmelden",
|
|
756
|
+
"ausloggen",
|
|
757
|
+
// DE
|
|
758
|
+
"sair",
|
|
759
|
+
// PT
|
|
760
|
+
"esci",
|
|
761
|
+
"disconnetti"
|
|
762
|
+
// IT
|
|
763
|
+
],
|
|
764
|
+
"forgot-password": [
|
|
765
|
+
"oublie",
|
|
766
|
+
// FR: mot-de-passe-oublie
|
|
767
|
+
"olvide",
|
|
768
|
+
// ES
|
|
769
|
+
"vergessen",
|
|
770
|
+
// DE
|
|
771
|
+
"esqueci",
|
|
772
|
+
// PT
|
|
773
|
+
"dimenticata"
|
|
774
|
+
// IT
|
|
775
|
+
],
|
|
776
|
+
"reset-password": [
|
|
777
|
+
"reinitialiser",
|
|
778
|
+
"restablecer",
|
|
779
|
+
"zuruecksetzen",
|
|
780
|
+
"redefinir",
|
|
781
|
+
"ripristina"
|
|
782
|
+
],
|
|
783
|
+
verify: [
|
|
784
|
+
"verifier",
|
|
785
|
+
"verificar",
|
|
786
|
+
"bestaetigen",
|
|
787
|
+
"verificare"
|
|
788
|
+
],
|
|
789
|
+
account: [
|
|
790
|
+
"compte",
|
|
791
|
+
// FR: mon-compte → 'compte'
|
|
792
|
+
"cuenta",
|
|
793
|
+
// ES
|
|
794
|
+
"konto",
|
|
795
|
+
// DE
|
|
796
|
+
"conta"
|
|
797
|
+
// PT
|
|
798
|
+
// IT uses 'account' (loanword)
|
|
799
|
+
],
|
|
800
|
+
profile: [
|
|
801
|
+
"profil",
|
|
802
|
+
// FR + DE
|
|
803
|
+
"perfil",
|
|
804
|
+
// ES + PT
|
|
805
|
+
"profilo"
|
|
806
|
+
// IT
|
|
807
|
+
],
|
|
808
|
+
notifications: [
|
|
809
|
+
"notificaciones",
|
|
810
|
+
"avisos",
|
|
811
|
+
// ES
|
|
812
|
+
"benachrichtigungen",
|
|
813
|
+
// DE
|
|
814
|
+
"notificacoes",
|
|
815
|
+
// PT
|
|
816
|
+
"notifiche"
|
|
817
|
+
// IT
|
|
818
|
+
],
|
|
819
|
+
admin: [
|
|
820
|
+
"administration",
|
|
821
|
+
// FR
|
|
822
|
+
"administracion",
|
|
823
|
+
// ES
|
|
824
|
+
"verwaltung",
|
|
825
|
+
// DE
|
|
826
|
+
"administracao",
|
|
827
|
+
// PT
|
|
828
|
+
"amministrazione"
|
|
829
|
+
// IT
|
|
830
|
+
],
|
|
831
|
+
users: [
|
|
832
|
+
"utilisateurs",
|
|
833
|
+
// FR
|
|
834
|
+
"usuarios",
|
|
835
|
+
// ES + PT
|
|
836
|
+
"benutzer",
|
|
837
|
+
"nutzer",
|
|
838
|
+
// DE
|
|
839
|
+
"utenti"
|
|
840
|
+
// IT
|
|
841
|
+
],
|
|
842
|
+
organization: [
|
|
843
|
+
"organisation",
|
|
844
|
+
// FR + DE
|
|
845
|
+
"organizacion",
|
|
846
|
+
// ES
|
|
847
|
+
"organizacao",
|
|
848
|
+
// PT
|
|
849
|
+
"organizzazione"
|
|
850
|
+
// IT
|
|
851
|
+
],
|
|
852
|
+
// --- E-commerce ---
|
|
853
|
+
cart: [
|
|
854
|
+
"panier",
|
|
855
|
+
// FR
|
|
856
|
+
"cesta",
|
|
857
|
+
"carrito",
|
|
858
|
+
// ES-Spain / ES-LatAm
|
|
859
|
+
"warenkorb",
|
|
860
|
+
// DE
|
|
861
|
+
"carrinho",
|
|
862
|
+
"cesto",
|
|
863
|
+
// PT
|
|
864
|
+
"carrello"
|
|
865
|
+
// IT
|
|
866
|
+
],
|
|
867
|
+
checkout: [
|
|
868
|
+
"commander",
|
|
869
|
+
"caisse",
|
|
870
|
+
"paiement",
|
|
871
|
+
// FR
|
|
872
|
+
"pagar",
|
|
873
|
+
"finalizar",
|
|
874
|
+
// ES / PT
|
|
875
|
+
"kasse",
|
|
876
|
+
// DE
|
|
877
|
+
"cassa",
|
|
878
|
+
"pagamento"
|
|
879
|
+
// IT / PT
|
|
880
|
+
],
|
|
881
|
+
product: [
|
|
882
|
+
"produit",
|
|
883
|
+
"article",
|
|
884
|
+
// FR
|
|
885
|
+
"producto",
|
|
886
|
+
"articulo",
|
|
887
|
+
// ES
|
|
888
|
+
"produkt",
|
|
889
|
+
"artikel",
|
|
890
|
+
// DE
|
|
891
|
+
"produto",
|
|
892
|
+
// PT
|
|
893
|
+
"prodotto",
|
|
894
|
+
"articolo"
|
|
895
|
+
// IT
|
|
896
|
+
],
|
|
897
|
+
products: [
|
|
898
|
+
"produits",
|
|
899
|
+
"productos",
|
|
900
|
+
"produkte",
|
|
901
|
+
"produtos",
|
|
902
|
+
"prodotti"
|
|
903
|
+
],
|
|
904
|
+
category: [
|
|
905
|
+
"categorie",
|
|
906
|
+
// FR
|
|
907
|
+
"categoria",
|
|
908
|
+
// ES + PT + IT
|
|
909
|
+
"kategorie",
|
|
910
|
+
// DE
|
|
911
|
+
"rayon"
|
|
912
|
+
// FR (dept store)
|
|
913
|
+
],
|
|
914
|
+
categories: ["categories", "categorias", "kategorien"],
|
|
915
|
+
orders: [
|
|
916
|
+
"commandes",
|
|
917
|
+
// FR
|
|
918
|
+
"pedidos",
|
|
919
|
+
// ES + PT
|
|
920
|
+
"bestellungen",
|
|
921
|
+
// DE
|
|
922
|
+
"encomendas",
|
|
923
|
+
// PT
|
|
924
|
+
"ordini"
|
|
925
|
+
// IT
|
|
926
|
+
],
|
|
927
|
+
order: [
|
|
928
|
+
"commande",
|
|
929
|
+
"pedido",
|
|
930
|
+
"bestellung",
|
|
931
|
+
"encomenda",
|
|
932
|
+
"ordine"
|
|
933
|
+
],
|
|
934
|
+
shop: [
|
|
935
|
+
"boutique",
|
|
936
|
+
"tienda",
|
|
937
|
+
"loja",
|
|
938
|
+
"negozio"
|
|
939
|
+
// DE 'shop' is loanword
|
|
940
|
+
],
|
|
941
|
+
store: [
|
|
942
|
+
"boutique",
|
|
943
|
+
"tienda",
|
|
944
|
+
"laden",
|
|
945
|
+
"loja",
|
|
946
|
+
"negozio"
|
|
947
|
+
],
|
|
948
|
+
collection: ["collection", "coleccion", "kollektion", "colecao", "collezione"],
|
|
949
|
+
collections: ["collections", "colecciones", "kollektionen", "colecoes", "collezioni"],
|
|
950
|
+
wishlist: [
|
|
951
|
+
"favoris",
|
|
952
|
+
// FR
|
|
953
|
+
"favoritos",
|
|
954
|
+
// ES + PT
|
|
955
|
+
"wunschliste",
|
|
956
|
+
"favoriten",
|
|
957
|
+
"merkliste",
|
|
958
|
+
// DE
|
|
959
|
+
"preferiti",
|
|
960
|
+
"desideri",
|
|
961
|
+
// IT
|
|
962
|
+
"desejos"
|
|
963
|
+
// PT
|
|
964
|
+
],
|
|
965
|
+
// --- Booking ---
|
|
966
|
+
booking: [
|
|
967
|
+
"reservation",
|
|
968
|
+
"reserva",
|
|
969
|
+
"buchung",
|
|
970
|
+
"prenotazione"
|
|
971
|
+
],
|
|
972
|
+
bookings: ["reservations", "reservas", "buchungen", "prenotazioni"],
|
|
973
|
+
book: [
|
|
974
|
+
"reserver",
|
|
975
|
+
// FR (also a verb)
|
|
976
|
+
"reservar",
|
|
977
|
+
// ES + PT
|
|
978
|
+
"buchen",
|
|
979
|
+
// DE
|
|
980
|
+
"prenota",
|
|
981
|
+
"prenotare"
|
|
982
|
+
// IT
|
|
983
|
+
],
|
|
984
|
+
reserve: [
|
|
985
|
+
"reserver",
|
|
986
|
+
"reservar",
|
|
987
|
+
"buchen",
|
|
988
|
+
"prenota"
|
|
989
|
+
],
|
|
990
|
+
reservation: [
|
|
991
|
+
"reservation",
|
|
992
|
+
"reserva",
|
|
993
|
+
"reservierung",
|
|
994
|
+
"prenotazione"
|
|
995
|
+
],
|
|
996
|
+
reservations: [
|
|
997
|
+
"reservations",
|
|
998
|
+
"reservas",
|
|
999
|
+
"reservierungen",
|
|
1000
|
+
"prenotazioni"
|
|
1001
|
+
],
|
|
1002
|
+
availability: [
|
|
1003
|
+
"disponibilites",
|
|
1004
|
+
"disponibilite",
|
|
1005
|
+
// FR
|
|
1006
|
+
"disponibilidad",
|
|
1007
|
+
"horarios",
|
|
1008
|
+
// ES
|
|
1009
|
+
"verfuegbarkeit",
|
|
1010
|
+
"verfugbarkeit",
|
|
1011
|
+
"termine",
|
|
1012
|
+
// DE
|
|
1013
|
+
"disponibilidade",
|
|
1014
|
+
// PT
|
|
1015
|
+
"disponibilita",
|
|
1016
|
+
"orari"
|
|
1017
|
+
// IT
|
|
1018
|
+
],
|
|
1019
|
+
appointment: [
|
|
1020
|
+
"rendez-vous",
|
|
1021
|
+
"rdv",
|
|
1022
|
+
// FR (hyphenated; 'rendez' + 'vous' tokens)
|
|
1023
|
+
"rendez",
|
|
1024
|
+
"vous",
|
|
1025
|
+
// tokenized forms
|
|
1026
|
+
"cita",
|
|
1027
|
+
// ES
|
|
1028
|
+
"termin",
|
|
1029
|
+
// DE
|
|
1030
|
+
"agendamento",
|
|
1031
|
+
"marcacao",
|
|
1032
|
+
// PT-BR / PT
|
|
1033
|
+
"appuntamento"
|
|
1034
|
+
// IT
|
|
1035
|
+
],
|
|
1036
|
+
appointments: [
|
|
1037
|
+
"citas",
|
|
1038
|
+
"termine",
|
|
1039
|
+
"agendamentos",
|
|
1040
|
+
"marcacoes",
|
|
1041
|
+
"appuntamenti"
|
|
1042
|
+
],
|
|
1043
|
+
schedule: [
|
|
1044
|
+
"horaire",
|
|
1045
|
+
"agenda",
|
|
1046
|
+
"terminplan",
|
|
1047
|
+
"agenda",
|
|
1048
|
+
"calendario"
|
|
1049
|
+
],
|
|
1050
|
+
calendar: ["calendrier", "agenda", "kalender", "calendario"],
|
|
1051
|
+
// --- Content ---
|
|
1052
|
+
articles: ["articles", "articulos", "artikel", "artigos", "articoli"],
|
|
1053
|
+
article: ["article", "articulo", "artikel", "artigo", "articolo"],
|
|
1054
|
+
post: ["publicacion", "beitrag", "postagem", "articolo"],
|
|
1055
|
+
posts: ["publicaciones", "beitraege", "postagens"],
|
|
1056
|
+
author: ["auteur", "autor", "autor", "autore"],
|
|
1057
|
+
authors: ["auteurs", "autores", "autoren", "autori"],
|
|
1058
|
+
tag: ["etiquette", "etiqueta", "tag", "etichetta"],
|
|
1059
|
+
tags: ["etiquettes", "etiquetas", "etichette"],
|
|
1060
|
+
topic: ["sujet", "tema", "thema", "argomento"],
|
|
1061
|
+
topics: ["sujets", "temas", "themen", "argomenti"],
|
|
1062
|
+
newsletter: ["bulletin", "boletin", "newsletter", "newsletter"],
|
|
1063
|
+
search: ["recherche", "busqueda", "busca", "pesquisa", "suche", "ricerca"],
|
|
1064
|
+
// --- Marketing ---
|
|
1065
|
+
pricing: [
|
|
1066
|
+
"tarifs",
|
|
1067
|
+
"prix",
|
|
1068
|
+
// FR
|
|
1069
|
+
"precios",
|
|
1070
|
+
"tarifa",
|
|
1071
|
+
"planes",
|
|
1072
|
+
// ES
|
|
1073
|
+
"preise",
|
|
1074
|
+
"tarif",
|
|
1075
|
+
// DE
|
|
1076
|
+
"precos",
|
|
1077
|
+
"planos",
|
|
1078
|
+
// PT
|
|
1079
|
+
"prezzi",
|
|
1080
|
+
"costo",
|
|
1081
|
+
"piani"
|
|
1082
|
+
// IT
|
|
1083
|
+
],
|
|
1084
|
+
features: [
|
|
1085
|
+
"fonctionnalites",
|
|
1086
|
+
// FR
|
|
1087
|
+
"funcionalidades",
|
|
1088
|
+
"caracteristicas",
|
|
1089
|
+
// ES + PT
|
|
1090
|
+
"funktionen",
|
|
1091
|
+
// DE
|
|
1092
|
+
"funzionalita",
|
|
1093
|
+
"caratteristiche"
|
|
1094
|
+
// IT
|
|
1095
|
+
],
|
|
1096
|
+
about: [
|
|
1097
|
+
"apropos",
|
|
1098
|
+
"propos",
|
|
1099
|
+
// FR: a-propos
|
|
1100
|
+
"sobre",
|
|
1101
|
+
"nosotros",
|
|
1102
|
+
// ES + PT
|
|
1103
|
+
"uber",
|
|
1104
|
+
"ueber",
|
|
1105
|
+
// DE
|
|
1106
|
+
"chisiamo"
|
|
1107
|
+
// IT (chi-siamo → one token after dedash)
|
|
1108
|
+
],
|
|
1109
|
+
contact: ["contact", "contacto", "kontakt", "contato", "contatto", "contatti"],
|
|
1110
|
+
faq: ["faq"],
|
|
1111
|
+
// universal
|
|
1112
|
+
testimonials: ["temoignages", "testimonios", "stimmen", "depoimentos", "testimonianze"],
|
|
1113
|
+
customers: ["clients", "clientes", "kunden", "clienti"],
|
|
1114
|
+
careers: ["carrieres", "empleo", "karriere", "carreiras", "lavora"],
|
|
1115
|
+
"case-studies": ["etudes", "casos", "fallstudien", "casi"],
|
|
1116
|
+
demo: ["demo"],
|
|
1117
|
+
// universal
|
|
1118
|
+
"get-started": [
|
|
1119
|
+
"commencer",
|
|
1120
|
+
// FR
|
|
1121
|
+
"empezar",
|
|
1122
|
+
"comenzar",
|
|
1123
|
+
// ES
|
|
1124
|
+
"starten",
|
|
1125
|
+
"loslegen",
|
|
1126
|
+
// DE
|
|
1127
|
+
"comecar",
|
|
1128
|
+
"iniciar",
|
|
1129
|
+
// PT
|
|
1130
|
+
"inizia",
|
|
1131
|
+
"iniziare"
|
|
1132
|
+
// IT
|
|
1133
|
+
],
|
|
1134
|
+
// --- Admin ---
|
|
1135
|
+
roles: ["roles", "roles", "rollen", "papeis", "ruoli"],
|
|
1136
|
+
permissions: ["permissions", "permisos", "berechtigungen", "permissoes", "permessi"],
|
|
1137
|
+
audit: ["audit", "auditoria", "pruefung", "auditoria", "verifica"],
|
|
1138
|
+
logs: ["journaux", "registros", "protokolle", "registros", "registri"],
|
|
1139
|
+
reports: ["rapports", "informes", "berichte", "relatorios", "rapporti"],
|
|
1140
|
+
moderation: ["moderation", "moderacion", "moderation", "moderacao", "moderazione"],
|
|
1141
|
+
// --- Social ---
|
|
1142
|
+
feed: ["flux"],
|
|
1143
|
+
friends: ["amis", "amigos", "freunde", "amici"],
|
|
1144
|
+
messages: ["messages", "mensajes", "nachrichten", "mensagens", "messaggi"],
|
|
1145
|
+
message: ["message", "mensaje", "nachricht", "mensagem", "messaggio"],
|
|
1146
|
+
chat: ["chat", "chat", "chat", "chat", "chat"],
|
|
1147
|
+
comments: ["commentaires", "comentarios", "kommentare", "comentarios", "commenti"],
|
|
1148
|
+
likes: ["likes", "megusta", "likes", "curtidas", "likes"],
|
|
1149
|
+
explore: ["explorer", "explorar", "erkunden", "explorar", "esplora"],
|
|
1150
|
+
// --- CRM ---
|
|
1151
|
+
contacts: ["contacts", "contactos", "kontakte", "contatos", "contatti"],
|
|
1152
|
+
leads: ["prospects", "leads", "leads", "leads", "leads"],
|
|
1153
|
+
deals: ["affaires", "negocios", "deals", "negocios", "affari"],
|
|
1154
|
+
pipeline: ["pipeline", "tuberia", "pipeline", "pipeline", "pipeline"],
|
|
1155
|
+
opportunities: ["opportunites", "oportunidades", "chancen", "oportunidades", "opportunita"],
|
|
1156
|
+
tasks: ["taches", "tareas", "aufgaben", "tarefas", "compiti"],
|
|
1157
|
+
activities: ["activites", "actividades", "aktivitaeten", "atividades", "attivita"]
|
|
1158
|
+
};
|
|
1159
|
+
for (const key of Object.keys(ROUTE_LOCALE_ALIASES)) {
|
|
1160
|
+
const cleaned = ROUTE_LOCALE_ALIASES[key].filter((a) => a && a.length > 1);
|
|
1161
|
+
if (cleaned.length === 0) {
|
|
1162
|
+
delete ROUTE_LOCALE_ALIASES[key];
|
|
1163
|
+
} else {
|
|
1164
|
+
ROUTE_LOCALE_ALIASES[key] = Array.from(new Set(cleaned));
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
var ELEMENT_LOCALE_ALIASES = {
|
|
1168
|
+
"sign in": [
|
|
1169
|
+
"se connecter",
|
|
1170
|
+
"connexion",
|
|
1171
|
+
"iniciar sesion",
|
|
1172
|
+
"entrar",
|
|
1173
|
+
"anmelden",
|
|
1174
|
+
"einloggen",
|
|
1175
|
+
"accedi"
|
|
1176
|
+
],
|
|
1177
|
+
"log in": [
|
|
1178
|
+
"connexion",
|
|
1179
|
+
"se connecter",
|
|
1180
|
+
"iniciar sesion",
|
|
1181
|
+
"acceder",
|
|
1182
|
+
"anmelden",
|
|
1183
|
+
"einloggen",
|
|
1184
|
+
"accedi",
|
|
1185
|
+
"login"
|
|
1186
|
+
],
|
|
1187
|
+
"sign up": [
|
|
1188
|
+
"inscription",
|
|
1189
|
+
"s inscrire",
|
|
1190
|
+
"creer un compte",
|
|
1191
|
+
"registrarse",
|
|
1192
|
+
"crear cuenta",
|
|
1193
|
+
"darse de alta",
|
|
1194
|
+
"registrieren",
|
|
1195
|
+
"konto erstellen",
|
|
1196
|
+
"cadastrar",
|
|
1197
|
+
"criar conta",
|
|
1198
|
+
"registrati",
|
|
1199
|
+
"iscriviti"
|
|
1200
|
+
],
|
|
1201
|
+
register: [
|
|
1202
|
+
"inscription",
|
|
1203
|
+
"registro",
|
|
1204
|
+
"registrieren",
|
|
1205
|
+
"cadastro",
|
|
1206
|
+
"registrati"
|
|
1207
|
+
],
|
|
1208
|
+
"create account": [
|
|
1209
|
+
"creer un compte",
|
|
1210
|
+
"crear cuenta",
|
|
1211
|
+
"konto erstellen",
|
|
1212
|
+
"criar conta",
|
|
1213
|
+
"crea account"
|
|
1214
|
+
],
|
|
1215
|
+
"forgot password": [
|
|
1216
|
+
"mot de passe oublie",
|
|
1217
|
+
"olvide mi contrasena",
|
|
1218
|
+
"contrasena olvidada",
|
|
1219
|
+
"passwort vergessen",
|
|
1220
|
+
"esqueci minha senha",
|
|
1221
|
+
"password dimenticata"
|
|
1222
|
+
],
|
|
1223
|
+
"reset password": [
|
|
1224
|
+
"reinitialiser le mot de passe",
|
|
1225
|
+
"restablecer contrasena",
|
|
1226
|
+
"passwort zuruecksetzen",
|
|
1227
|
+
"redefinir senha",
|
|
1228
|
+
"reimposta password"
|
|
1229
|
+
],
|
|
1230
|
+
// --- SaaS ---
|
|
1231
|
+
"invite team": [
|
|
1232
|
+
"inviter equipe",
|
|
1233
|
+
"invitar equipo",
|
|
1234
|
+
"team einladen",
|
|
1235
|
+
"convidar equipe",
|
|
1236
|
+
"invita team"
|
|
1237
|
+
],
|
|
1238
|
+
"create workspace": [
|
|
1239
|
+
"creer espace",
|
|
1240
|
+
"crear espacio",
|
|
1241
|
+
"arbeitsbereich erstellen",
|
|
1242
|
+
"criar espaco",
|
|
1243
|
+
"crea spazio"
|
|
1244
|
+
],
|
|
1245
|
+
"upgrade plan": [
|
|
1246
|
+
"mettre a niveau",
|
|
1247
|
+
"passer au plan superieur",
|
|
1248
|
+
"mejorar plan",
|
|
1249
|
+
"actualizar plan",
|
|
1250
|
+
"plan upgraden",
|
|
1251
|
+
"tarif wechseln",
|
|
1252
|
+
"fazer upgrade",
|
|
1253
|
+
"atualizar plano",
|
|
1254
|
+
"aggiorna piano",
|
|
1255
|
+
"passa a"
|
|
1256
|
+
],
|
|
1257
|
+
"start trial": [
|
|
1258
|
+
"commencer essai",
|
|
1259
|
+
"essai gratuit",
|
|
1260
|
+
"iniciar prueba",
|
|
1261
|
+
"prueba gratis",
|
|
1262
|
+
"testversion starten",
|
|
1263
|
+
"kostenlos testen",
|
|
1264
|
+
"comecar teste",
|
|
1265
|
+
"teste gratis",
|
|
1266
|
+
"inizia prova",
|
|
1267
|
+
"prova gratuita"
|
|
1268
|
+
],
|
|
1269
|
+
"connect integration": [
|
|
1270
|
+
"connecter integration",
|
|
1271
|
+
"conectar integracion",
|
|
1272
|
+
"integration verbinden",
|
|
1273
|
+
"conectar integracao",
|
|
1274
|
+
"connetti integrazione"
|
|
1275
|
+
],
|
|
1276
|
+
"api key": [
|
|
1277
|
+
"cle api",
|
|
1278
|
+
"clave api",
|
|
1279
|
+
"api schluessel",
|
|
1280
|
+
"chave api",
|
|
1281
|
+
"chiave api"
|
|
1282
|
+
],
|
|
1283
|
+
"manage billing": [
|
|
1284
|
+
"gerer facturation",
|
|
1285
|
+
"gestionar facturacion",
|
|
1286
|
+
"abrechnung verwalten",
|
|
1287
|
+
"gerenciar cobranca",
|
|
1288
|
+
"gestisci fatturazione"
|
|
1289
|
+
],
|
|
1290
|
+
// --- E-commerce ---
|
|
1291
|
+
"add to cart": [
|
|
1292
|
+
"ajouter au panier",
|
|
1293
|
+
"anadir a la cesta",
|
|
1294
|
+
"anadir al carrito",
|
|
1295
|
+
"agregar al carrito",
|
|
1296
|
+
"in den warenkorb",
|
|
1297
|
+
"zum warenkorb hinzufuegen",
|
|
1298
|
+
"adicionar ao carrinho",
|
|
1299
|
+
"aggiungi al carrello"
|
|
1300
|
+
],
|
|
1301
|
+
"add to bag": [
|
|
1302
|
+
"ajouter au sac",
|
|
1303
|
+
"anadir a la bolsa",
|
|
1304
|
+
"zur tasche"
|
|
1305
|
+
],
|
|
1306
|
+
"buy now": [
|
|
1307
|
+
"acheter maintenant",
|
|
1308
|
+
"comprar ahora",
|
|
1309
|
+
"jetzt kaufen",
|
|
1310
|
+
"comprar agora",
|
|
1311
|
+
"compra ora",
|
|
1312
|
+
"acquista ora"
|
|
1313
|
+
],
|
|
1314
|
+
checkout: [
|
|
1315
|
+
"commander",
|
|
1316
|
+
"passer commande",
|
|
1317
|
+
"finalizar compra",
|
|
1318
|
+
"pagar",
|
|
1319
|
+
"zur kasse",
|
|
1320
|
+
"kasse",
|
|
1321
|
+
"finalizar compra",
|
|
1322
|
+
"vai alla cassa",
|
|
1323
|
+
"procedi al checkout"
|
|
1324
|
+
],
|
|
1325
|
+
"place order": [
|
|
1326
|
+
"passer la commande",
|
|
1327
|
+
"realizar pedido",
|
|
1328
|
+
"bestellung aufgeben",
|
|
1329
|
+
"fazer pedido",
|
|
1330
|
+
"effettua ordine"
|
|
1331
|
+
],
|
|
1332
|
+
"in stock": [
|
|
1333
|
+
"en stock",
|
|
1334
|
+
"en stock",
|
|
1335
|
+
"disponible",
|
|
1336
|
+
"auf lager",
|
|
1337
|
+
"em estoque",
|
|
1338
|
+
"disponibile"
|
|
1339
|
+
],
|
|
1340
|
+
// --- Booking ---
|
|
1341
|
+
"book now": [
|
|
1342
|
+
"reserver maintenant",
|
|
1343
|
+
"reservar ahora",
|
|
1344
|
+
"jetzt buchen",
|
|
1345
|
+
"reservar agora",
|
|
1346
|
+
"prenota ora"
|
|
1347
|
+
],
|
|
1348
|
+
"reserve now": [
|
|
1349
|
+
"reserver maintenant",
|
|
1350
|
+
"reservar ahora",
|
|
1351
|
+
"jetzt reservieren",
|
|
1352
|
+
"reservar agora",
|
|
1353
|
+
"prenota ora"
|
|
1354
|
+
],
|
|
1355
|
+
"check in": [
|
|
1356
|
+
"arrivee",
|
|
1357
|
+
"check in",
|
|
1358
|
+
"entrada",
|
|
1359
|
+
"registrarse",
|
|
1360
|
+
"check in",
|
|
1361
|
+
"anreise",
|
|
1362
|
+
"entrada",
|
|
1363
|
+
"check in"
|
|
1364
|
+
],
|
|
1365
|
+
"check out": [
|
|
1366
|
+
"depart",
|
|
1367
|
+
"check out",
|
|
1368
|
+
"salida",
|
|
1369
|
+
"abreise",
|
|
1370
|
+
"check out",
|
|
1371
|
+
"saida",
|
|
1372
|
+
"check out"
|
|
1373
|
+
],
|
|
1374
|
+
"select dates": [
|
|
1375
|
+
"selectionner les dates",
|
|
1376
|
+
"choisir dates",
|
|
1377
|
+
"seleccionar fechas",
|
|
1378
|
+
"elegir fechas",
|
|
1379
|
+
"daten auswaehlen",
|
|
1380
|
+
"datum waehlen",
|
|
1381
|
+
"selecionar datas",
|
|
1382
|
+
"escolher datas",
|
|
1383
|
+
"seleziona date",
|
|
1384
|
+
"scegli date"
|
|
1385
|
+
],
|
|
1386
|
+
"confirm booking": [
|
|
1387
|
+
"confirmer reservation",
|
|
1388
|
+
"confirmar reserva",
|
|
1389
|
+
"buchung bestaetigen",
|
|
1390
|
+
"confirmar reserva",
|
|
1391
|
+
"conferma prenotazione"
|
|
1392
|
+
],
|
|
1393
|
+
"per night": [
|
|
1394
|
+
"par nuit",
|
|
1395
|
+
"por noche",
|
|
1396
|
+
"pro nacht",
|
|
1397
|
+
"por noite",
|
|
1398
|
+
"a notte"
|
|
1399
|
+
],
|
|
1400
|
+
guests: [
|
|
1401
|
+
"invites",
|
|
1402
|
+
"voyageurs",
|
|
1403
|
+
"huespedes",
|
|
1404
|
+
"gaeste",
|
|
1405
|
+
"hospedes",
|
|
1406
|
+
"ospiti"
|
|
1407
|
+
],
|
|
1408
|
+
// --- Marketing ---
|
|
1409
|
+
"get started": [
|
|
1410
|
+
"commencer",
|
|
1411
|
+
"demarrer",
|
|
1412
|
+
"empezar",
|
|
1413
|
+
"comenzar",
|
|
1414
|
+
"loslegen",
|
|
1415
|
+
"jetzt starten",
|
|
1416
|
+
"comecar",
|
|
1417
|
+
"iniciar",
|
|
1418
|
+
"inizia",
|
|
1419
|
+
"iniziare"
|
|
1420
|
+
],
|
|
1421
|
+
"request demo": [
|
|
1422
|
+
"demander demo",
|
|
1423
|
+
"solicitar demo",
|
|
1424
|
+
"demo anfragen",
|
|
1425
|
+
"solicitar demonstracao",
|
|
1426
|
+
"richiedi demo"
|
|
1427
|
+
],
|
|
1428
|
+
"book a demo": [
|
|
1429
|
+
"reserver demo",
|
|
1430
|
+
"reservar demo",
|
|
1431
|
+
"demo buchen",
|
|
1432
|
+
"agendar demo",
|
|
1433
|
+
"prenota demo"
|
|
1434
|
+
],
|
|
1435
|
+
"contact sales": [
|
|
1436
|
+
"contacter ventes",
|
|
1437
|
+
"contacter commercial",
|
|
1438
|
+
"contactar ventas",
|
|
1439
|
+
"vertrieb kontaktieren",
|
|
1440
|
+
"contato vendas",
|
|
1441
|
+
"contactar vendas",
|
|
1442
|
+
"contatta vendite"
|
|
1443
|
+
],
|
|
1444
|
+
"start free trial": [
|
|
1445
|
+
"commencer essai gratuit",
|
|
1446
|
+
"iniciar prueba gratis",
|
|
1447
|
+
"kostenlos testen",
|
|
1448
|
+
"teste gratis",
|
|
1449
|
+
"prova gratuita"
|
|
1450
|
+
],
|
|
1451
|
+
"see pricing": [
|
|
1452
|
+
"voir tarifs",
|
|
1453
|
+
"ver precios",
|
|
1454
|
+
"preise ansehen",
|
|
1455
|
+
"ver precos",
|
|
1456
|
+
"vedi prezzi"
|
|
1457
|
+
],
|
|
1458
|
+
// --- Social ---
|
|
1459
|
+
"send message": [
|
|
1460
|
+
"envoyer message",
|
|
1461
|
+
"enviar mensaje",
|
|
1462
|
+
"nachricht senden",
|
|
1463
|
+
"enviar mensagem",
|
|
1464
|
+
"invia messaggio"
|
|
1465
|
+
],
|
|
1466
|
+
"add friend": [
|
|
1467
|
+
"ajouter ami",
|
|
1468
|
+
"anadir amigo",
|
|
1469
|
+
"agregar amigo",
|
|
1470
|
+
"freund hinzufuegen",
|
|
1471
|
+
"adicionar amigo",
|
|
1472
|
+
"aggiungi amico"
|
|
1473
|
+
],
|
|
1474
|
+
// --- Admin ---
|
|
1475
|
+
"edit row": [
|
|
1476
|
+
"modifier ligne",
|
|
1477
|
+
"editar fila",
|
|
1478
|
+
"zeile bearbeiten",
|
|
1479
|
+
"editar linha",
|
|
1480
|
+
"modifica riga"
|
|
1481
|
+
],
|
|
1482
|
+
"delete row": [
|
|
1483
|
+
"supprimer ligne",
|
|
1484
|
+
"eliminar fila",
|
|
1485
|
+
"zeile loeschen",
|
|
1486
|
+
"excluir linha",
|
|
1487
|
+
"elimina riga"
|
|
1488
|
+
],
|
|
1489
|
+
"export csv": [
|
|
1490
|
+
"exporter csv",
|
|
1491
|
+
"exportar csv",
|
|
1492
|
+
"csv exportieren",
|
|
1493
|
+
"exportar csv",
|
|
1494
|
+
"esporta csv"
|
|
1495
|
+
],
|
|
1496
|
+
"bulk actions": [
|
|
1497
|
+
"actions groupees",
|
|
1498
|
+
"acciones en masa",
|
|
1499
|
+
"massenaktionen",
|
|
1500
|
+
"acoes em massa",
|
|
1501
|
+
"azioni in blocco"
|
|
1502
|
+
],
|
|
1503
|
+
"assign role": [
|
|
1504
|
+
"attribuer role",
|
|
1505
|
+
"asignar rol",
|
|
1506
|
+
"rolle zuweisen",
|
|
1507
|
+
"atribuir papel",
|
|
1508
|
+
"assegna ruolo"
|
|
1509
|
+
]
|
|
1510
|
+
};
|
|
1511
|
+
for (const key of Object.keys(ELEMENT_LOCALE_ALIASES)) {
|
|
1512
|
+
ELEMENT_LOCALE_ALIASES[key] = Array.from(new Set(ELEMENT_LOCALE_ALIASES[key]));
|
|
1513
|
+
}
|
|
1514
|
+
function getRouteMatchTokens(englishKey) {
|
|
1515
|
+
const aliases = ROUTE_LOCALE_ALIASES[englishKey];
|
|
1516
|
+
if (!aliases || aliases.length === 0) return [englishKey];
|
|
1517
|
+
return [englishKey, ...aliases];
|
|
1518
|
+
}
|
|
1519
|
+
function getElementMatchPhrases(englishKey) {
|
|
1520
|
+
const aliases = ELEMENT_LOCALE_ALIASES[englishKey];
|
|
1521
|
+
if (!aliases || aliases.length === 0) return [englishKey];
|
|
1522
|
+
return [englishKey, ...aliases];
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
// src/discovery/classifier/index.ts
|
|
1526
|
+
var MIN_CONFIDENCE_TO_KEEP = 0.1;
|
|
1527
|
+
var STOPWORDS = /* @__PURE__ */ new Set([
|
|
1528
|
+
"a",
|
|
1529
|
+
"an",
|
|
1530
|
+
"the",
|
|
1531
|
+
"and",
|
|
1532
|
+
"or",
|
|
1533
|
+
"to",
|
|
1534
|
+
"for",
|
|
1535
|
+
"of",
|
|
1536
|
+
"in",
|
|
1537
|
+
"on",
|
|
1538
|
+
"at"
|
|
1539
|
+
]);
|
|
1540
|
+
function tokenize(s) {
|
|
1541
|
+
return s.toLowerCase().split(/[^a-z0-9]+/).filter((t) => t.length >= 2 && !STOPWORDS.has(t));
|
|
1542
|
+
}
|
|
1543
|
+
function signatureTotalWeight(signature) {
|
|
1544
|
+
let total = 0;
|
|
1545
|
+
for (const weight of Object.values(signature.routes)) total += weight;
|
|
1546
|
+
for (const weight of Object.values(signature.elements)) total += weight;
|
|
1547
|
+
for (const weight of Object.values(signature.deps)) total += weight;
|
|
1548
|
+
for (const weight of Object.values(signature.schema)) total += weight;
|
|
1549
|
+
return total;
|
|
1550
|
+
}
|
|
1551
|
+
function scoreRoutes(signature, routeTokens) {
|
|
1552
|
+
let score = 0;
|
|
1553
|
+
const evidence = [];
|
|
1554
|
+
for (const [token, weight] of Object.entries(signature.routes)) {
|
|
1555
|
+
const candidates = getRouteMatchTokens(token);
|
|
1556
|
+
let matched;
|
|
1557
|
+
for (const c of candidates) {
|
|
1558
|
+
if (routeTokens.has(c)) {
|
|
1559
|
+
matched = c;
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
if (matched) {
|
|
1564
|
+
score += weight;
|
|
1565
|
+
evidence.push({
|
|
1566
|
+
signal: "route",
|
|
1567
|
+
value: matched === token ? token : `${token} (i18n: ${matched})`,
|
|
1568
|
+
weight
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
return { score, evidence };
|
|
1573
|
+
}
|
|
1574
|
+
function scoreElements(signature, elementTokens) {
|
|
1575
|
+
let score = 0;
|
|
1576
|
+
const evidence = [];
|
|
1577
|
+
for (const [phrase, weight] of Object.entries(signature.elements)) {
|
|
1578
|
+
const candidates = getElementMatchPhrases(phrase);
|
|
1579
|
+
let matchedPhrase;
|
|
1580
|
+
for (const c of candidates) {
|
|
1581
|
+
const phraseTokens = tokenize(c);
|
|
1582
|
+
if (phraseTokens.length === 0) continue;
|
|
1583
|
+
if (phraseTokens.every((t) => elementTokens.has(t))) {
|
|
1584
|
+
matchedPhrase = c;
|
|
1585
|
+
break;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
if (matchedPhrase) {
|
|
1589
|
+
score += weight;
|
|
1590
|
+
evidence.push({
|
|
1591
|
+
signal: "element",
|
|
1592
|
+
value: matchedPhrase === phrase ? phrase : `${phrase} (i18n: ${matchedPhrase})`,
|
|
1593
|
+
weight
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
return { score, evidence };
|
|
1598
|
+
}
|
|
1599
|
+
function scoreDeps(signature, deps) {
|
|
1600
|
+
let score = 0;
|
|
1601
|
+
const evidence = [];
|
|
1602
|
+
for (const [dep, weight] of Object.entries(signature.deps)) {
|
|
1603
|
+
if (deps.has(dep)) {
|
|
1604
|
+
score += weight;
|
|
1605
|
+
evidence.push({ signal: "dep", value: dep, weight });
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
return { score, evidence };
|
|
1609
|
+
}
|
|
1610
|
+
function scoreSchema(signature, entityNames) {
|
|
1611
|
+
let score = 0;
|
|
1612
|
+
const evidence = [];
|
|
1613
|
+
for (const [entityKey, weight] of Object.entries(signature.schema)) {
|
|
1614
|
+
if (entityNames.has(entityKey)) {
|
|
1615
|
+
score += weight;
|
|
1616
|
+
evidence.push({ signal: "schema", value: entityKey, weight });
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
return { score, evidence };
|
|
1620
|
+
}
|
|
1621
|
+
function scoreSignature(signature, snapshot) {
|
|
1622
|
+
const routeTokens = new Set(snapshot.vocabulary.routes);
|
|
1623
|
+
const elementTokens = new Set(snapshot.vocabulary.elements);
|
|
1624
|
+
const deps = new Set(snapshot.vocabulary.deps);
|
|
1625
|
+
const entityNames = new Set(snapshot.entities.map((e) => e.name.toLowerCase()));
|
|
1626
|
+
const r = scoreRoutes(signature, routeTokens);
|
|
1627
|
+
const el = scoreElements(signature, elementTokens);
|
|
1628
|
+
const d = scoreDeps(signature, deps);
|
|
1629
|
+
const s = scoreSchema(signature, entityNames);
|
|
1630
|
+
const rawScore = r.score + el.score + d.score + s.score;
|
|
1631
|
+
const evidence = [...r.evidence, ...el.evidence, ...d.evidence, ...s.evidence];
|
|
1632
|
+
const totalWeight = signatureTotalWeight(signature);
|
|
1633
|
+
const confidence = totalWeight > 0 ? Math.min(rawScore / totalWeight, 1) : 0;
|
|
1634
|
+
return {
|
|
1635
|
+
type: signature.type,
|
|
1636
|
+
confidence,
|
|
1637
|
+
evidence,
|
|
1638
|
+
rawScore
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
function applyBlankFallback(guesses) {
|
|
1642
|
+
const nonBlank = guesses.filter((g) => g.type !== "blank");
|
|
1643
|
+
const topNonBlank = nonBlank.reduce(
|
|
1644
|
+
(max, g) => g.confidence > max ? g.confidence : max,
|
|
1645
|
+
0
|
|
1646
|
+
);
|
|
1647
|
+
if (topNonBlank >= MIN_CONFIDENCE_TO_KEEP) {
|
|
1648
|
+
return guesses.filter((g) => g.type !== "blank" || topNonBlank < 0.05);
|
|
1649
|
+
}
|
|
1650
|
+
return guesses.map(
|
|
1651
|
+
(g) => g.type === "blank" ? { ...g, confidence: 1, rawScore: 0, evidence: [{ signal: "pkg", value: "no signals matched any signature", weight: 0 }] } : g
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
function classifyApp(snapshot) {
|
|
1655
|
+
const raw = SIGNATURES.map((signature) => scoreSignature(signature, snapshot));
|
|
1656
|
+
const withBlank = applyBlankFallback(raw);
|
|
1657
|
+
return withBlank.filter((g) => g.confidence >= MIN_CONFIDENCE_TO_KEEP).sort((a, b) => b.confidence - a.confidence);
|
|
1658
|
+
}
|
|
1659
|
+
function scoreAllSignatures(snapshot) {
|
|
1660
|
+
return SIGNATURES.map((signature) => scoreSignature(signature, snapshot)).sort((a, b) => b.rawScore - a.rawScore);
|
|
1661
|
+
}
|
|
1662
|
+
function buildClassificationBreakdown(allGuesses) {
|
|
1663
|
+
const sorted = [...allGuesses].sort((a, b) => b.rawScore - a.rawScore);
|
|
1664
|
+
const top3 = sorted.slice(0, 3).map((g) => ({
|
|
1665
|
+
type: g.type,
|
|
1666
|
+
confidence: g.confidence,
|
|
1667
|
+
rawScore: g.rawScore
|
|
1668
|
+
}));
|
|
1669
|
+
const matchedSignals = {
|
|
1670
|
+
routes: [],
|
|
1671
|
+
elements: [],
|
|
1672
|
+
deps: [],
|
|
1673
|
+
schema: []
|
|
1674
|
+
};
|
|
1675
|
+
for (const guess of allGuesses) {
|
|
1676
|
+
if (guess.type === "blank") continue;
|
|
1677
|
+
for (const ev of guess.evidence) {
|
|
1678
|
+
const entry = {
|
|
1679
|
+
value: ev.value,
|
|
1680
|
+
weight: ev.weight,
|
|
1681
|
+
appType: guess.type
|
|
1682
|
+
};
|
|
1683
|
+
if (ev.signal === "route") matchedSignals.routes.push(entry);
|
|
1684
|
+
else if (ev.signal === "element") matchedSignals.elements.push(entry);
|
|
1685
|
+
else if (ev.signal === "dep") matchedSignals.deps.push(entry);
|
|
1686
|
+
else if (ev.signal === "schema") matchedSignals.schema.push(entry);
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
return { top3, matchedSignals };
|
|
1690
|
+
}
|
|
1691
|
+
function topAppType(snapshot) {
|
|
1692
|
+
const ranked = classifyApp(snapshot);
|
|
1693
|
+
return ranked[0]?.type ?? "blank";
|
|
1694
|
+
}
|
|
1695
|
+
export {
|
|
1696
|
+
buildClassificationBreakdown,
|
|
1697
|
+
classifyApp,
|
|
1698
|
+
scoreAllSignatures,
|
|
1699
|
+
topAppType
|
|
1700
|
+
};
|
|
1701
|
+
//# sourceMappingURL=classifier-MWQMQ727.js.map
|