@protontech/autofill 0.0.33835493 → 0.0.35481761
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/features/feature.d.ts +13 -2
- package/features/feature.js +37 -17
- package/features/feature.spec.js +56 -3
- package/features/v1/abstract.field.d.ts +8377 -406
- package/features/v1/abstract.field.js +23 -23
- package/features/v1/abstract.form.d.ts +3428 -626
- package/features/v1/abstract.form.js +198 -199
- package/features/v1/field.email.d.ts +3421 -0
- package/features/v1/field.email.js +7 -7
- package/features/v1/field.otp.d.ts +71178 -0
- package/features/v1/field.otp.js +42 -42
- package/features/v1/field.password.d.ts +99166 -0
- package/features/v1/field.password.js +42 -42
- package/features/v1/field.username-hidden.d.ts +908 -0
- package/features/v1/field.username-hidden.js +7 -7
- package/features/v1/field.username.d.ts +42382 -0
- package/features/v1/field.username.js +11 -11
- package/features/v1/fields.sorted.gen.d.ts +1441 -0
- package/features/v1/fields.sorted.gen.js +344 -0
- package/features/v1/forms.sorted.gen.d.ts +734 -0
- package/features/v1/forms.sorted.gen.js +334 -0
- package/features/v1/index.d.ts +964 -84
- package/features/v1/index.js +9 -15
- package/features/v1/index.spec.js +34 -20
- package/models/perceptron/params/login-model.json +91 -91
- package/models/perceptron/params/new-password-model.json +21 -21
- package/models/perceptron/params/otp-model.json +29 -29
- package/models/perceptron/params/password-change-model.json +72 -72
- package/models/perceptron/params/password-model.json +23 -23
- package/models/perceptron/params/recovery-model.json +81 -81
- package/models/perceptron/params/register-model.json +99 -99
- package/models/perceptron/params/username-hidden-model.json +10 -10
- package/models/perceptron/params/username-model.json +7 -7
- package/models/random_forest/params/otp-model.json +306 -366
- package/package.json +3 -3
- package/rules/v1/index.js +2 -2
- package/scripts/gen-sorted-features.d.ts +1 -0
- package/scripts/gen-sorted-features.js +128 -0
- package/types/index.d.ts +2 -1
- package/utils/fathom.d.ts +1 -2
- package/utils/fathom.js +2 -2
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { getComputerForFeatures } from "@protontech/autofill/features/feature";
|
|
2
|
+
import { parentFormFnode, field, parentFormFeatures, formClassification, type, fieldHaystacks, autocomplete, parentFormInputIterator, isFormRegister, isFormRecovery, isFormPasswordChange, isFormNoop, isFormLogin, typeValid, text, label, attrs, visible, prevInput, prevField, nextField, flagHiddenFieldsSideEffect, isCC, searchField, isIdentity, fieldFeats, fieldText, fieldAutocomplete, fieldAttrs, fieldLabel, fieldSearch, fieldIdentity, fieldCC, placeholder, fieldAutocompleteOff, fieldAutocompleteEmail, fieldAttrEmail, pattern, maxLength, fieldFormFeats, fieldNext, fieldPrev, fieldForm, fieldRegister, fieldLogin, fieldExotic, fieldPrevInput, fieldEmailMatch, fieldAttrUsername, fieldAutocompleteUsername, readonly, value, } from "./abstract.field";
|
|
3
|
+
import { exactAttrEmail, textEmail, mfaOutlier, labelEmail, typeEmail, placeholderEmailValue, placeholderEmail } from "./field.email";
|
|
4
|
+
import { rect, numericMode, nameMatch, idMatch, maxLen, patternOTP, textMFA, textAuthenticator, textOTP, mfaCandidates, searchForm, outlierLink, outlierHeadings, outlierForm, formMFA, formComplexity, formAuthenticator, similarAfter, similarBefore, labelOutlier, labelOTP, labelMFA, labelAuthenticator, attrOutlier, attrOTP, attrMFA, autocompleteOff, autocompleteOTC, outlierMaxLength, singleInput, outlierInputCount, outlierSearch, siblingOfInterest, outlierField, otp, mfa, outlierCandidate, outlierEmailMatchRaw, outlierAutocomplete, outlierEmailMatchScaled, } from "./field.otp";
|
|
5
|
+
import { labelReset, labelCurrent, labelCreate, labelConfirm, textReset, textCurrent, textCreate, textConfirm, prevPwFieldEl, passwordOutlier, attrReset, attrCurrent, attrCreate, attrConfirm, nextPwFieldEl, prevPwHaystack, prevPwAutocomplete, prevPwField, outlier as outlier_field_password, reset, current, create, confirm, nextPwHaystack, nextPwAutocomplete, nextPwField, prevPwNew, prevPwCurrent, autocompleteGated, maybeCurrent, maybeNew, nextPwConfirm, nextPwNew, nextPwCurrent, autocompleteOTP, autocompleteNew, autocompleteCurrent, fieldRegister_maybeCurrent, fieldLogin_maybeNew, prevPwCurrent_nextPwNew, fieldLogin_autocompleteNew, fieldRegister_autocompleteCurrent, } from "./field.password";
|
|
6
|
+
import { textUsername, outlierText, outlierLabel, labelUsername, outlierAttrs, firstFormField, username, outlierEmail, outlier as outlier_field_username, maybeCandidate, firstLoginFormField } from "./field.username";
|
|
7
|
+
import { attrMatch, autocompleteUsername, valueCandidate, visibleReadonly, valueUsername, valueTel, valueEmail } from "./field.username-hidden";
|
|
8
|
+
export const fieldFeaturesComputer = getComputerForFeatures({
|
|
9
|
+
sorted: [
|
|
10
|
+
parentFormFnode,
|
|
11
|
+
field,
|
|
12
|
+
parentFormFeatures,
|
|
13
|
+
formClassification,
|
|
14
|
+
type,
|
|
15
|
+
fieldHaystacks,
|
|
16
|
+
autocomplete,
|
|
17
|
+
parentFormInputIterator,
|
|
18
|
+
isFormRegister,
|
|
19
|
+
isFormRecovery,
|
|
20
|
+
isFormPasswordChange,
|
|
21
|
+
isFormNoop,
|
|
22
|
+
isFormLogin,
|
|
23
|
+
typeValid,
|
|
24
|
+
text,
|
|
25
|
+
label,
|
|
26
|
+
attrs,
|
|
27
|
+
visible,
|
|
28
|
+
prevInput,
|
|
29
|
+
prevField,
|
|
30
|
+
nextField,
|
|
31
|
+
flagHiddenFieldsSideEffect,
|
|
32
|
+
isCC,
|
|
33
|
+
searchField,
|
|
34
|
+
isIdentity,
|
|
35
|
+
],
|
|
36
|
+
features: [
|
|
37
|
+
"attrs",
|
|
38
|
+
"autocomplete",
|
|
39
|
+
"isCC",
|
|
40
|
+
"isFormLogin",
|
|
41
|
+
"isFormNoop",
|
|
42
|
+
"isFormPasswordChange",
|
|
43
|
+
"isFormRecovery",
|
|
44
|
+
"isFormRegister",
|
|
45
|
+
"isIdentity",
|
|
46
|
+
"label",
|
|
47
|
+
"nextField",
|
|
48
|
+
"parentFormFeatures",
|
|
49
|
+
"parentFormFnode",
|
|
50
|
+
"prevField",
|
|
51
|
+
"prevInput",
|
|
52
|
+
"searchField",
|
|
53
|
+
"text",
|
|
54
|
+
"visible",
|
|
55
|
+
],
|
|
56
|
+
private: [],
|
|
57
|
+
});
|
|
58
|
+
export const emailFeaturesComputer = getComputerForFeatures({
|
|
59
|
+
sorted: [
|
|
60
|
+
fieldFeats,
|
|
61
|
+
field,
|
|
62
|
+
fieldText,
|
|
63
|
+
fieldAutocomplete,
|
|
64
|
+
fieldAttrs,
|
|
65
|
+
fieldLabel,
|
|
66
|
+
fieldSearch,
|
|
67
|
+
fieldIdentity,
|
|
68
|
+
fieldCC,
|
|
69
|
+
type,
|
|
70
|
+
placeholder,
|
|
71
|
+
exactAttrEmail,
|
|
72
|
+
textEmail,
|
|
73
|
+
fieldAutocompleteOff,
|
|
74
|
+
fieldAutocompleteEmail,
|
|
75
|
+
mfaOutlier,
|
|
76
|
+
fieldAttrEmail,
|
|
77
|
+
labelEmail,
|
|
78
|
+
typeEmail,
|
|
79
|
+
placeholderEmailValue,
|
|
80
|
+
placeholderEmail,
|
|
81
|
+
],
|
|
82
|
+
features: ["exactAttrEmail", "attrEmail", "autocompleteEmail", "autocompleteOff", "fieldCC", "fieldIdentity", "isSearchField", "labelEmail", "mfaOutlier", "placeholderEmail", "textEmail", "typeEmail"],
|
|
83
|
+
private: [],
|
|
84
|
+
});
|
|
85
|
+
export const otpFeaturesComputer = getComputerForFeatures({
|
|
86
|
+
sorted: [
|
|
87
|
+
field,
|
|
88
|
+
fieldFeats,
|
|
89
|
+
rect,
|
|
90
|
+
type,
|
|
91
|
+
pattern,
|
|
92
|
+
maxLength,
|
|
93
|
+
placeholder,
|
|
94
|
+
numericMode,
|
|
95
|
+
nameMatch,
|
|
96
|
+
idMatch,
|
|
97
|
+
fieldText,
|
|
98
|
+
fieldFormFeats,
|
|
99
|
+
fieldNext,
|
|
100
|
+
fieldPrev,
|
|
101
|
+
fieldSearch,
|
|
102
|
+
fieldLabel,
|
|
103
|
+
fieldAttrs,
|
|
104
|
+
fieldForm,
|
|
105
|
+
fieldAutocomplete,
|
|
106
|
+
fieldIdentity,
|
|
107
|
+
fieldCC,
|
|
108
|
+
maxLen,
|
|
109
|
+
patternOTP,
|
|
110
|
+
textMFA,
|
|
111
|
+
textAuthenticator,
|
|
112
|
+
textOTP,
|
|
113
|
+
mfaCandidates,
|
|
114
|
+
searchForm,
|
|
115
|
+
outlierLink,
|
|
116
|
+
outlierHeadings,
|
|
117
|
+
outlierForm,
|
|
118
|
+
formMFA,
|
|
119
|
+
formComplexity,
|
|
120
|
+
formAuthenticator,
|
|
121
|
+
similarAfter,
|
|
122
|
+
similarBefore,
|
|
123
|
+
labelOutlier,
|
|
124
|
+
labelOTP,
|
|
125
|
+
labelMFA,
|
|
126
|
+
labelAuthenticator,
|
|
127
|
+
attrOutlier,
|
|
128
|
+
attrOTP,
|
|
129
|
+
attrMFA,
|
|
130
|
+
autocompleteOff,
|
|
131
|
+
autocompleteOTC,
|
|
132
|
+
outlierMaxLength,
|
|
133
|
+
singleInput,
|
|
134
|
+
outlierInputCount,
|
|
135
|
+
outlierSearch,
|
|
136
|
+
siblingOfInterest,
|
|
137
|
+
outlierField,
|
|
138
|
+
otp,
|
|
139
|
+
mfa,
|
|
140
|
+
outlierCandidate,
|
|
141
|
+
outlierEmailMatchRaw,
|
|
142
|
+
outlierAutocomplete,
|
|
143
|
+
outlierEmailMatchScaled,
|
|
144
|
+
],
|
|
145
|
+
features: [
|
|
146
|
+
"attrMFA",
|
|
147
|
+
"attrOTP",
|
|
148
|
+
"autocompleteOTC",
|
|
149
|
+
"fieldCC",
|
|
150
|
+
"fieldIdentity",
|
|
151
|
+
"formAuthenticator",
|
|
152
|
+
"formComplexity",
|
|
153
|
+
"formMFA",
|
|
154
|
+
"idMatch",
|
|
155
|
+
"labelAuthenticator",
|
|
156
|
+
"labelMFA",
|
|
157
|
+
"labelOTP",
|
|
158
|
+
"nameMatch",
|
|
159
|
+
"numericMode",
|
|
160
|
+
"outlierAutocomplete",
|
|
161
|
+
"outlierEmailMatchScaled",
|
|
162
|
+
"outlierField",
|
|
163
|
+
"outlierForm",
|
|
164
|
+
"outlierHeadings",
|
|
165
|
+
"outlierInputCount",
|
|
166
|
+
"outlierLink",
|
|
167
|
+
"outlierMaxLength",
|
|
168
|
+
"outlierSearch",
|
|
169
|
+
"patternOTP",
|
|
170
|
+
"siblingOfInterest",
|
|
171
|
+
"singleInput",
|
|
172
|
+
"textAuthenticator",
|
|
173
|
+
"textMFA",
|
|
174
|
+
],
|
|
175
|
+
private: [],
|
|
176
|
+
});
|
|
177
|
+
export const passwordFeaturesComputer = getComputerForFeatures({
|
|
178
|
+
sorted: [
|
|
179
|
+
fieldFeats,
|
|
180
|
+
fieldLabel,
|
|
181
|
+
fieldText,
|
|
182
|
+
fieldPrev,
|
|
183
|
+
fieldAttrs,
|
|
184
|
+
fieldNext,
|
|
185
|
+
fieldRegister,
|
|
186
|
+
fieldLogin,
|
|
187
|
+
fieldIdentity,
|
|
188
|
+
fieldExotic,
|
|
189
|
+
fieldCC,
|
|
190
|
+
fieldAutocomplete,
|
|
191
|
+
labelReset,
|
|
192
|
+
labelCurrent,
|
|
193
|
+
labelCreate,
|
|
194
|
+
labelConfirm,
|
|
195
|
+
textReset,
|
|
196
|
+
textCurrent,
|
|
197
|
+
textCreate,
|
|
198
|
+
textConfirm,
|
|
199
|
+
prevPwFieldEl,
|
|
200
|
+
passwordOutlier,
|
|
201
|
+
attrReset,
|
|
202
|
+
attrCurrent,
|
|
203
|
+
attrCreate,
|
|
204
|
+
attrConfirm,
|
|
205
|
+
nextPwFieldEl,
|
|
206
|
+
fieldAutocompleteOff,
|
|
207
|
+
prevPwHaystack,
|
|
208
|
+
prevPwAutocomplete,
|
|
209
|
+
prevPwField,
|
|
210
|
+
outlier_field_password,
|
|
211
|
+
reset,
|
|
212
|
+
current,
|
|
213
|
+
create,
|
|
214
|
+
confirm,
|
|
215
|
+
nextPwHaystack,
|
|
216
|
+
nextPwAutocomplete,
|
|
217
|
+
nextPwField,
|
|
218
|
+
prevPwNew,
|
|
219
|
+
prevPwCurrent,
|
|
220
|
+
autocompleteGated,
|
|
221
|
+
maybeCurrent,
|
|
222
|
+
maybeNew,
|
|
223
|
+
nextPwConfirm,
|
|
224
|
+
nextPwNew,
|
|
225
|
+
nextPwCurrent,
|
|
226
|
+
autocompleteOTP,
|
|
227
|
+
autocompleteNew,
|
|
228
|
+
autocompleteCurrent,
|
|
229
|
+
fieldRegister_maybeCurrent,
|
|
230
|
+
fieldLogin_maybeNew,
|
|
231
|
+
prevPwCurrent_nextPwNew,
|
|
232
|
+
fieldLogin_autocompleteNew,
|
|
233
|
+
fieldRegister_autocompleteCurrent,
|
|
234
|
+
],
|
|
235
|
+
features: [
|
|
236
|
+
"attrConfirm",
|
|
237
|
+
"attrCreate",
|
|
238
|
+
"attrCurrent",
|
|
239
|
+
"attrReset",
|
|
240
|
+
"autocompleteCurrent",
|
|
241
|
+
"autocompleteNew",
|
|
242
|
+
"autocompleteOTP",
|
|
243
|
+
"autocompleteOff",
|
|
244
|
+
"fieldCC",
|
|
245
|
+
"fieldExotic",
|
|
246
|
+
"fieldIdentity",
|
|
247
|
+
"fieldLogin",
|
|
248
|
+
"fieldRegister",
|
|
249
|
+
"labelConfirm",
|
|
250
|
+
"labelCreate",
|
|
251
|
+
"labelCurrent",
|
|
252
|
+
"nextPwConfirm",
|
|
253
|
+
"nextPwCurrent",
|
|
254
|
+
"nextPwField",
|
|
255
|
+
"nextPwNew",
|
|
256
|
+
"passwordOutlier",
|
|
257
|
+
"prevPwCurrent",
|
|
258
|
+
"prevPwField",
|
|
259
|
+
"prevPwNew",
|
|
260
|
+
"textConfirm",
|
|
261
|
+
"textCreate",
|
|
262
|
+
"textCurrent",
|
|
263
|
+
"fieldLogin,autocompleteNew",
|
|
264
|
+
"fieldLogin,maybeNew",
|
|
265
|
+
"fieldRegister,autocompleteCurrent",
|
|
266
|
+
"fieldRegister,maybeCurrent",
|
|
267
|
+
"prevPwCurrent,nextPwNew",
|
|
268
|
+
],
|
|
269
|
+
private: [],
|
|
270
|
+
});
|
|
271
|
+
export const usernameFeaturesComputer = getComputerForFeatures({
|
|
272
|
+
sorted: [
|
|
273
|
+
field,
|
|
274
|
+
fieldFeats,
|
|
275
|
+
fieldText,
|
|
276
|
+
fieldLabel,
|
|
277
|
+
fieldAttrs,
|
|
278
|
+
fieldPrevInput,
|
|
279
|
+
fieldSearch,
|
|
280
|
+
fieldIdentity,
|
|
281
|
+
fieldCC,
|
|
282
|
+
fieldAutocomplete,
|
|
283
|
+
textUsername,
|
|
284
|
+
outlierText,
|
|
285
|
+
outlierLabel,
|
|
286
|
+
labelUsername,
|
|
287
|
+
fieldEmailMatch,
|
|
288
|
+
outlierAttrs,
|
|
289
|
+
fieldAttrUsername,
|
|
290
|
+
firstFormField,
|
|
291
|
+
fieldAutocompleteOff,
|
|
292
|
+
fieldAutocompleteEmail,
|
|
293
|
+
fieldAutocompleteUsername,
|
|
294
|
+
username,
|
|
295
|
+
outlierEmail,
|
|
296
|
+
outlier_field_username,
|
|
297
|
+
maybeCandidate,
|
|
298
|
+
firstLoginFormField,
|
|
299
|
+
],
|
|
300
|
+
features: [
|
|
301
|
+
"attrUsername",
|
|
302
|
+
"autocompleteEmail",
|
|
303
|
+
"autocompleteOff",
|
|
304
|
+
"autocompleteUsername",
|
|
305
|
+
"fieldCC",
|
|
306
|
+
"fieldIdentity",
|
|
307
|
+
"isSearchField",
|
|
308
|
+
"firstLoginFormField",
|
|
309
|
+
"labelUsername",
|
|
310
|
+
"outlierAttrs",
|
|
311
|
+
"outlierEmail",
|
|
312
|
+
"outlierLabel",
|
|
313
|
+
"outlierText",
|
|
314
|
+
"textUsername",
|
|
315
|
+
],
|
|
316
|
+
private: [],
|
|
317
|
+
});
|
|
318
|
+
export const usernameHiddenFeaturesComputer = getComputerForFeatures({
|
|
319
|
+
sorted: [
|
|
320
|
+
fieldFeats,
|
|
321
|
+
field,
|
|
322
|
+
fieldIdentity,
|
|
323
|
+
fieldExotic,
|
|
324
|
+
fieldCC,
|
|
325
|
+
fieldAutocomplete,
|
|
326
|
+
fieldAttrs,
|
|
327
|
+
readonly,
|
|
328
|
+
type,
|
|
329
|
+
value,
|
|
330
|
+
attrMatch,
|
|
331
|
+
fieldAutocompleteEmail,
|
|
332
|
+
autocompleteUsername,
|
|
333
|
+
fieldAttrUsername,
|
|
334
|
+
fieldAttrEmail,
|
|
335
|
+
typeValid,
|
|
336
|
+
valueCandidate,
|
|
337
|
+
visibleReadonly,
|
|
338
|
+
valueUsername,
|
|
339
|
+
valueTel,
|
|
340
|
+
valueEmail,
|
|
341
|
+
],
|
|
342
|
+
features: ["attrMatch", "autocompleteUsername", "attrEmail", "attrUsername", "autocompleteEmail", "fieldCC", "fieldExotic", "fieldIdentity", "valueEmail", "valueTel", "valueUsername", "visibleReadonly"],
|
|
343
|
+
private: [],
|
|
344
|
+
});
|