generated from christian-bromann/typescript-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconstants.ts
88 lines (79 loc) · 3.63 KB
/
constants.ts
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
85
86
87
88
import { colorItBold, colorIt } from './utils.js'
type PM = 'npm' | 'pnpm' | 'yarn' | 'bun';
export const DEFAULT_NPM_TAG = 'latest'
export const ASCII_ROBOT = `
-:...........................-:.
+ +
\`\` + \`...\` \`...\` + \`
./+/ + .:://:::\` \`::///::\` \` + ++/.
.+oo+ + /:+ooo+-/ /-+ooo+-/ ./ + +oo+.
-ooo+ + /-+ooo+-/ /-+ooo+-/ .: + +ooo.
-+o+ + \`::///:-\` \`::///::\` + +o+-
\`\`. /. \`\`\`\`\` \`\`\`\`\` .: .\`\`
.----------------------------.
\`-::::::::::::::::::::::::::::::::::::::::-\`
.+oooo/:------------------------------:/oooo+.
\`.--/oooo- :oooo/--.\`
.::-\`\`:oooo\` .oooo-\`\`-::.
./-\` -oooo\`--.: :.-- .oooo- \`-/.
-/\` \`-/oooo////////////////////////////////////oooo/.\` \`/-
\`+\` \`/+oooooooooooooooooooooooooooooooooooooooooooooooo+:\` .+\`
-/ +o/.:oooooooooooooooooooooooooooooooooooooooooooo:-/o/ +.
-/ .o+ -oooosoooososssssooooo------------------:oooo- \`oo\` +.
-/ .o+ -oooodooohyyssosshoooo\` .oooo- oo. +.
-/ .o+ -oooodooysdooooooyyooo\` \`.--.\`\` .:::-oooo- oo. +.
-/ .o+ -oooodoyyodsoooooyyooo.//-..-:/:.\`.//.\`./oooo- oo. +.
-/ .o+ -oooohsyoooyysssysoooo+-\` \`-:::. .oooo- oo. +.
-/ .o+ -ooooosooooooosooooooo+//////////////////oooo- oo. +.
-/ .o+ -oooooooooooooooooooooooooooooooooooooooooooo- oo. +.
-/ .o+ -oooooooooooooooooooooooooooooooooooooooooooo- oo. +.
-+////o+\` -oooo---:///:----://::------------------:oooo- \`oo////+-
+ooooooo/\`-oooo\`\`:-\`\`\`.:\`.:.\`.+/- .::::::::::\` .oooo-\`+ooooooo+
oooooooo+\`-oooo\`-- \`/\` .:+ -/-\`/\` .:::::::::: .oooo-.+oooooooo
+-/+://-/ -oooo-\`:\`.o-\`:.:-\`\`\`\`.: .///:\`\`\`\`\`\` -oooo-\`/-//:+:-+
: :..--:-:.+ooo+/://o+/-.-:////:-....-::::-....--/+ooo+.:.:--.-- /
- /./\`-:-\` .:///+/ooooo/+///////////////+++ooooo/+///:. .-:.\`+./ :
:-:/. :\`ooooo\`/\` .:.ooooo : ./---
:\`ooooo\`/\` .:.ooooo :
:\`ooooo./\` .:-ooooo :
:\`ooooo./\` .:-ooooo :
\`...:-+++++:/. ./:+++++-:...\`
:-.\`\`\`\`\`\`\`\`/../ /.-:\`\`\`\`\`\`\`\`.:-
-/::::::::://:/+ \`+/:+::::::::::+.
:oooooooooooo++/ +++oooooooooooo-
`
export const PROGRAM_TITLE = `
${colorItBold('Webdriver.IO')}
${colorIt('Next-gen browser and mobile automation')}
${colorIt('test framework for Node.js')}
`
export const UNSUPPORTED_NODE_VERSION = (
'⚠️ Unsupported Node.js Version Error ⚠️\n' +
`You are using Node.js ${process.version} which is too old to be used with WebdriverIO.\n` +
'Please update to Node.js v20 to continue.\n'
)
export const INSTALL_COMMAND: Record<PM, string> = {
npm: 'install',
pnpm: 'add',
yarn: 'add',
bun: 'install'
} as const
export const EXECUTER: Record<PM, string> = {
npm: 'npx',
pnpm: 'pnpm',
yarn: 'yarn',
bun: 'bunx'
} as const
export const EXECUTE_COMMAND: Record<PM, string> = {
npm: '',
pnpm: 'exec',
yarn: 'exec',
bun: ''
} as const
export const DEV_FLAG: Record<PM, string> = {
npm: '--save-dev',
pnpm: '--save-dev',
yarn: '--dev',
bun: '--dev'
} as const
export const PMs = Object.keys(INSTALL_COMMAND) as PM[]