-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathake
executable file
·84 lines (66 loc) · 1.87 KB
/
ake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env nu
use utils.nu *
alias password-manager-tools = bun run cli
def help [] {
$'
ake t all
ake t exported
ake t requirefix
ake t remaining
ake t password
'
| str trim
}
def main [
-h
...args: string
] {
help | less --RAW-CONTROL-CHARS
}
def 'main l' [] {
bun run lint
}
def 'main t' [...args: string] {
main l
bun run test ...$args
}
def 'main edit' [path: string] {
vi -u NONE -U NONE $path
}
def 'main t watch' [...args: string] {
bun run test --watch ...$args
}
def 'main t reset' [] {
cp src/__tests__/fixtures/bitwarden.json data
cp src/__tests__/fixtures/bitwardenEncrypted.json data
}
def 'main t manual' [] {
password-manager-tools convert bitwarden-to-apple src/__tests__/fixtures/bitwarden.json data/output.csv --skip-fields skip
}
# Summary: exported + requirefix + remaining
def 'main t all' [] {
password-manager-tools convert bitwarden-to-apple src/__tests__/fixtures/bitwarden.json data/output.csv --include-types login
}
# Summary: exported
def 'main t exported' [] {
password-manager-tools convert bitwarden-to-apple src/__tests__/fixtures/bitwarden.json data/output.csv
}
# Summary: exported + requirefix
def 'main t requirefix' [] {
password-manager-tools convert bitwarden-to-apple src/__tests__/fixtures/bitwarden.json data/output.csv
}
# Summary: exported + reamining
def 'main t remaining' [] {
password-manager-tools convert bitwarden-to-apple src/__tests__/fixtures/bitwarden.json data/output.csv --include-uris foo.com
}
def 'main t password' [] {
password-manager-tools convert bitwarden-to-apple src/__tests__/fixtures/bitwardenEncrypted.json data/output.csv
}
def 'main convert' [includeUris: string] {
let cmd = "password-manager-tools convert bitwarden-to-apple data/bitwarden.json data/output.csv"
if $includeUris != null {
run-cmd $'($cmd) --include-uris ($includeUris)'
} else {
run-cmd $cmd
}
}