File tree 3 files changed +45
-1
lines changed
3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ $ npm install -g pontomais-mais
20
20
$ ppp COMMAND
21
21
running command...
22
22
$ ppp (-v| --version| version)
23
- pontomais-mais/0.0.15 linux-x64 node-v14.17.4
23
+ pontomais-mais/0.0.15 linux-x64 node-v15.1.0
24
24
$ ppp --help [COMMAND]
25
25
USAGE
26
26
$ ppp COMMAND
34
34
* [ ` ppp local ` ] ( #ppp-local )
35
35
* [ ` ppp login ` ] ( #ppp-login )
36
36
* [ ` ppp ponto ` ] ( #ppp-ponto )
37
+ * [ ` ppp pontos ` ] ( #ppp-pontos )
37
38
* [ ` ppp tempo ` ] ( #ppp-tempo )
38
39
39
40
## ` ppp banco `
@@ -100,6 +101,17 @@ USAGE
100
101
101
102
_ See code: [ src/commands/ponto.ts] ( https://github.com/fmilani/ppp/blob/v0.0.15/src/commands/ponto.ts ) _
102
103
104
+ ## ` ppp pontos `
105
+
106
+ Mostra os seus pontos de hoje
107
+
108
+ ```
109
+ USAGE
110
+ $ ppp pontos
111
+ ```
112
+
113
+ _ See code: [ src/commands/pontos.ts] ( https://github.com/fmilani/ppp/blob/v0.0.15/src/commands/pontos.ts ) _
114
+
103
115
## ` ppp tempo `
104
116
105
117
Quanto tempo você já trabalhou hoje
Original file line number Diff line number Diff line change
1
+ import { Command } from '@oclif/command'
2
+ var format = require ( 'date-fns/format' )
3
+ import getConfig from '../config'
4
+ import { time } from '../api'
5
+
6
+ export default class Pontos extends Command {
7
+ static description = 'Mostra os seus pontos de hoje'
8
+
9
+ async run ( ) {
10
+ const { credentials } = await getConfig ( this . config . configDir )
11
+ const date = format ( new Date ( ) , 'yyyy-MM-dd' )
12
+ const work_times = await time ( credentials , date )
13
+ work_times . forEach ( ( work_time : string ) => this . log ( work_time ) )
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ import { expect , test } from '@oclif/test'
2
+
3
+ describe ( 'pontos' , ( ) => {
4
+ test
5
+ . stdout ( )
6
+ . command ( [ 'pontos' ] )
7
+ . it ( 'runs hello' , ctx => {
8
+ expect ( ctx . stdout ) . to . contain ( 'hello world' )
9
+ } )
10
+
11
+ test
12
+ . stdout ( )
13
+ . command ( [ 'pontos' , '--name' , 'jeff' ] )
14
+ . it ( 'runs hello --name jeff' , ctx => {
15
+ expect ( ctx . stdout ) . to . contain ( 'hello jeff' )
16
+ } )
17
+ } )
You can’t perform that action at this time.
0 commit comments