Comparing version 1.16.9 to 1.17.0
@@ -53,2 +53,3 @@ #!/usr/bin/env node | ||
.option('-d, --datadir <path>') | ||
.option('-t, --type <value>', 'use latest of type instead of stamp') | ||
.option('-m, --message <value>') | ||
@@ -237,3 +238,18 @@ .action(stop) | ||
clocker.stop(stamp, data, nil) | ||
if (cmd.type) { | ||
if (stamp) { | ||
ifError(new Error(`stamp can't be used together with '--type' option`)) | ||
} | ||
var filter = getFilter(cmd) | ||
clocker.data(filter, function (err, entries) { | ||
ifError(err) | ||
if (entries.length === 0) { | ||
ifError(new Error(`no matching entries found`)) | ||
} | ||
stamp = entries[entries.length - 1].key | ||
clocker.stop(stamp, data, nil) | ||
}) | ||
} else { | ||
clocker.stop(stamp, data, nil) | ||
} | ||
} | ||
@@ -240,0 +256,0 @@ |
{ | ||
"name": "clocker", | ||
"version": "1.16.9", | ||
"version": "1.17.0", | ||
"description": "track project hours", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121380
2148