@ever-teams/cli 0.0.0-stage → 0.1.0

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/dist/lookup.js ADDED
@@ -0,0 +1,105 @@
1
+ import { EverTeamsError } from '@ever-teams/api';
2
+ import { textOption } from './args.js';
3
+ import { Refusal } from './refusals.js';
4
+ // A name is a courtesy: when the member's projects or tasks cannot be read, the entry shows its ids, and the command,
5
+ // whose own call succeeded, does not fail for it.
6
+ async function quietly(read) {
7
+ try {
8
+ return await read();
9
+ }
10
+ catch (error) {
11
+ if (error instanceof EverTeamsError) {
12
+ return null;
13
+ }
14
+ throw error;
15
+ }
16
+ }
17
+ async function projectNamed(client, projectId) {
18
+ if (!projectId) {
19
+ return null;
20
+ }
21
+ const projects = await quietly(() => client.projects.list());
22
+ const found = projects?.find((project) => project.id === projectId);
23
+ return found ?? null;
24
+ }
25
+ async function taskNamed(client, log) {
26
+ if (!log.taskId) {
27
+ return null;
28
+ }
29
+ const projectId = log.projectId ?? undefined;
30
+ const tasks = await quietly(() => client.tasks.list({ projectId }));
31
+ const found = tasks?.find((task) => task.id === log.taskId);
32
+ return found ?? null;
33
+ }
34
+ const sameText = (a, b) => a.trim().toLocaleLowerCase() === b.trim().toLocaleLowerCase();
35
+ /** The member's project whose id or name `query` is. */
36
+ export async function findProject(client, query) {
37
+ const projects = await client.projects.list();
38
+ const byId = projects.find((project) => project.id === query);
39
+ if (byId) {
40
+ return byId;
41
+ }
42
+ const named = projects.filter((project) => sameText(project.name, query));
43
+ if (named.length === 1) {
44
+ return named[0];
45
+ }
46
+ if (named.length > 1) {
47
+ const count = named.length;
48
+ const message = `${count} of your projects are named ${query}: give the id of one, from ever-teams projects.`;
49
+ throw new Refusal('AMBIGUOUS_PROJECT', message);
50
+ }
51
+ const message = `None of your projects is named ${query}: run ever-teams projects to see their names and ids.`;
52
+ throw new Refusal('NO_SUCH_PROJECT', message);
53
+ }
54
+ // "12", "#12", or the number the app shows with its prefix ("WEB-12").
55
+ function hasNumber(task, query) {
56
+ const digits = query.trim().replace(/^#/, '');
57
+ const isNumber = /^\d+$/.test(digits);
58
+ const sameNumber = isNumber && task.number === Number(digits);
59
+ const sameTaskNumber = sameText(task.taskNumber ?? '', query);
60
+ return sameNumber || sameTaskNumber;
61
+ }
62
+ /** The member's task whose id or number `query` is, in `project` when one is given. */
63
+ export async function findTask(client, query, project) {
64
+ const tasks = await client.tasks.list({ projectId: project?.id });
65
+ const byId = tasks.find((task) => task.id === query);
66
+ if (byId) {
67
+ return byId;
68
+ }
69
+ const numbered = tasks.filter((task) => hasNumber(task, query));
70
+ if (numbered.length === 1) {
71
+ return numbered[0];
72
+ }
73
+ if (numbered.length > 1) {
74
+ const count = numbered.length;
75
+ const message = `${count} of your tasks have the number ${query}: add --project, or give the task's id.`;
76
+ throw new Refusal('AMBIGUOUS_TASK', message);
77
+ }
78
+ let place = '';
79
+ if (project) {
80
+ place = ` in ${project.name}`;
81
+ }
82
+ const message = `None of your tasks${place} has the number or id ${query}: check its number in the web app.`;
83
+ throw new Refusal('NO_SUCH_TASK', message);
84
+ }
85
+ /** What --project and --task name. A task given alone brings its own project. */
86
+ export async function workNamed(client, values) {
87
+ const projectQuery = textOption(values, 'project');
88
+ const taskQuery = textOption(values, 'task');
89
+ let project = null;
90
+ if (projectQuery !== undefined) {
91
+ project = await findProject(client, projectQuery);
92
+ }
93
+ let task = null;
94
+ if (taskQuery !== undefined) {
95
+ task = await findTask(client, taskQuery, project);
96
+ }
97
+ const projectId = project?.id ?? task?.projectId ?? undefined;
98
+ return { project, task, projectId, taskId: task?.id };
99
+ }
100
+ /** The project and task of a time log, read from the member's own; those already known are not read again. */
101
+ export async function namesOf(client, log, known = {}) {
102
+ const project = known.project ?? (await projectNamed(client, log.projectId));
103
+ const task = known.task ?? (await taskNamed(client, log));
104
+ return { project, task };
105
+ }
package/dist/output.js ADDED
@@ -0,0 +1,42 @@
1
+ const HIDDEN = '[hidden]';
2
+ function withoutSecrets(text, secrets) {
3
+ let shown = text;
4
+ for (const secret of secrets) {
5
+ shown = shown.split(secret).join(HIDDEN);
6
+ }
7
+ return shown;
8
+ }
9
+ const jsonText = (value) => `${JSON.stringify(value, null, 2)}\n`;
10
+ export function createOutput(io, json) {
11
+ const secrets = [];
12
+ const writeOut = (text) => io.writeOut(withoutSecrets(text, secrets));
13
+ const writeErr = (text) => io.writeErr(withoutSecrets(text, secrets));
14
+ function hide(secret) {
15
+ if (secret) {
16
+ secrets.push(secret);
17
+ }
18
+ }
19
+ function result(value, lines) {
20
+ if (json) {
21
+ writeOut(jsonText(value));
22
+ return;
23
+ }
24
+ for (const line of lines) {
25
+ writeOut(`${line}\n`);
26
+ }
27
+ }
28
+ function note(text) {
29
+ if (!json) {
30
+ writeErr(`${text}\n`);
31
+ }
32
+ }
33
+ function failure(reported) {
34
+ if (!json) {
35
+ writeErr(`${reported.message}\n`);
36
+ return;
37
+ }
38
+ const error = { code: reported.code, message: reported.message, status: reported.status };
39
+ writeErr(jsonText({ error }));
40
+ }
41
+ return { json, hide, result, data: writeOut, note, failure };
42
+ }
@@ -0,0 +1,120 @@
1
+ import { textOption } from './args.js';
2
+ import { dayOf } from './format.js';
3
+ import { UsageError } from './refusals.js';
4
+ const DAY = /^(\d{4})-(\d{2})-(\d{2})$/;
5
+ const CLOCK = /^([01]?\d|2[0-3]):([0-5]\d)$/;
6
+ const DURATION = /^(?:(\d+)h)?(?:(\d+)m)?$/;
7
+ /** Midnight of a YYYY-MM-DD, in the time zone the command line runs in; a day the calendar lacks is refused. */
8
+ export function localDayOf(text, option) {
9
+ const match = DAY.exec(text);
10
+ if (!match) {
11
+ throw new UsageError(`${option} takes a day as YYYY-MM-DD, such as 2026-11-18.`);
12
+ }
13
+ const year = Number(match[1]);
14
+ const month = Number(match[2]) - 1;
15
+ const day = Number(match[3]);
16
+ const date = new Date(0);
17
+ // setFullYear, not the Date constructor, which reads the years 0 to 99 as 1900 to 1999.
18
+ date.setFullYear(year, month, day);
19
+ date.setHours(0, 0, 0, 0);
20
+ const sameMonth = date.getMonth() === month;
21
+ const sameDay = date.getDate() === day;
22
+ if (!sameMonth || !sameDay) {
23
+ throw new UsageError(`${option} ${text} is not a day of the calendar.`);
24
+ }
25
+ return date;
26
+ }
27
+ // A time the clocks skip (the hour lost to daylight saving) is moved by Date to the next one that exists: the date it
28
+ // gives then shows another day, hour or minute than the ones asked.
29
+ function showsClock(date, day, hours, minutes) {
30
+ const sameDay = dayOf(date) === day;
31
+ const sameHour = date.getHours() === hours;
32
+ const sameMinute = date.getMinutes() === minutes;
33
+ return sameDay && sameHour && sameMinute;
34
+ }
35
+ function atClock(day, text, option) {
36
+ const match = CLOCK.exec(text);
37
+ if (!match) {
38
+ throw new UsageError(`${option} takes a time as HH:MM, such as 09:30.`);
39
+ }
40
+ const hours = Number(match[1]);
41
+ const minutes = Number(match[2]);
42
+ const date = new Date(day);
43
+ date.setHours(hours, minutes, 0, 0);
44
+ const dayText = dayOf(day);
45
+ if (!showsClock(date, dayText, hours, minutes)) {
46
+ throw new UsageError(`${option} ${text} does not exist on ${dayText} in this computer's time zone (the clocks skip it): pick ` +
47
+ 'another time.');
48
+ }
49
+ return date;
50
+ }
51
+ function durationOf(text) {
52
+ const usage = '--duration takes hours and minutes, such as 1h30m, 2h or 45m.';
53
+ const match = DURATION.exec(text);
54
+ if (!match) {
55
+ throw new UsageError(usage);
56
+ }
57
+ const [, hours, minutes] = match;
58
+ if (hours === undefined && minutes === undefined) {
59
+ throw new UsageError(usage);
60
+ }
61
+ const totalMinutes = Number(hours ?? 0) * 60 + Number(minutes ?? 0);
62
+ if (totalMinutes === 0) {
63
+ throw new UsageError('--duration must be longer than 0m.');
64
+ }
65
+ return totalMinutes * 60 * 1000;
66
+ }
67
+ function fromTo(day, from, to) {
68
+ if (from === undefined || to === undefined) {
69
+ throw new UsageError('Give --from and --to, or --duration.');
70
+ }
71
+ const start = atClock(day, from, '--from');
72
+ const end = atClock(day, to, '--to');
73
+ if (end.getTime() <= start.getTime()) {
74
+ throw new UsageError('--to must be after --from, on the same day.');
75
+ }
76
+ return { start, end };
77
+ }
78
+ // With --from it starts then; with --to it ends then; alone it ends now.
79
+ function withDuration(given, now) {
80
+ const { day, from, to, milliseconds } = given;
81
+ if (from !== undefined && to !== undefined) {
82
+ throw new UsageError('Give --duration with --from or with --to, not with both.');
83
+ }
84
+ if (from !== undefined) {
85
+ const start = atClock(day, from, '--from');
86
+ return { start, end: new Date(start.getTime() + milliseconds) };
87
+ }
88
+ if (to !== undefined) {
89
+ const end = atClock(day, to, '--to');
90
+ return { start: new Date(end.getTime() - milliseconds), end };
91
+ }
92
+ if (given.hasDate) {
93
+ throw new UsageError('With --date, give --from or --to as well.');
94
+ }
95
+ return { start: new Date(now.getTime() - milliseconds), end: now };
96
+ }
97
+ function dayGiven(date, now) {
98
+ if (date !== undefined) {
99
+ return localDayOf(date, '--date');
100
+ }
101
+ const today = new Date(now);
102
+ today.setHours(0, 0, 0, 0);
103
+ return today;
104
+ }
105
+ /**
106
+ * The range of a past entry: --from and --to on --date (today by default), or --duration with --from, with --to,
107
+ * or alone, ending now.
108
+ */
109
+ export function pastRangeOf(values, now) {
110
+ const from = textOption(values, 'from');
111
+ const to = textOption(values, 'to');
112
+ const date = textOption(values, 'date');
113
+ const duration = textOption(values, 'duration');
114
+ const day = dayGiven(date, now);
115
+ if (duration === undefined) {
116
+ return fromTo(day, from, to);
117
+ }
118
+ const milliseconds = durationOf(duration);
119
+ return withDuration({ day, hasDate: date !== undefined, from, to, milliseconds }, now);
120
+ }
package/dist/prompt.js ADDED
@@ -0,0 +1,84 @@
1
+ import { Refusal } from './refusals.js';
2
+ const ENTER = new Set(['\r', '\n', '\u0004']);
3
+ const ERASE = new Set(['\u007f', '\b']);
4
+ const INTERRUPT = '\u0003';
5
+ function bytesOf(chunk) {
6
+ if (Buffer.isBuffer(chunk)) {
7
+ return chunk;
8
+ }
9
+ return Buffer.from(String(chunk), 'utf8');
10
+ }
11
+ /** Everything piped in, without the spaces and line ends around it. */
12
+ export async function readPiped(input) {
13
+ const chunks = [];
14
+ for await (const chunk of input) {
15
+ chunks.push(bytesOf(chunk));
16
+ }
17
+ const text = Buffer.concat(chunks).toString('utf8');
18
+ return text.trim();
19
+ }
20
+ function nextTyped(typed, char) {
21
+ if (ERASE.has(char)) {
22
+ return typed.slice(0, -1);
23
+ }
24
+ const isControl = char < ' ';
25
+ if (isControl) {
26
+ return typed;
27
+ }
28
+ return typed + char;
29
+ }
30
+ /**
31
+ * A line typed in the terminal, never shown: the terminal does not echo it while it is typed. Ctrl+C cancels, and an
32
+ * input that ends, closes or fails before Enter is a cancelled sign-in too. Each way out gives the terminal back.
33
+ */
34
+ export function readHidden(input, write, question) {
35
+ write(question);
36
+ return new Promise((resolve, reject) => {
37
+ let typed = '';
38
+ let finished = false;
39
+ function finish() {
40
+ if (finished) {
41
+ return;
42
+ }
43
+ finished = true;
44
+ input.off('data', onData);
45
+ input.off('end', onEnd);
46
+ input.off('close', onEnd);
47
+ input.off('error', onError);
48
+ input.setRawMode?.(false);
49
+ input.pause();
50
+ write('\n');
51
+ }
52
+ function cancel(message) {
53
+ finish();
54
+ reject(new Refusal('CANCELLED', message));
55
+ }
56
+ function onEnd() {
57
+ cancel('Sign-in cancelled: the input ended before Enter, and nothing was stored.');
58
+ }
59
+ function onError(error) {
60
+ cancel(`Sign-in cancelled: the input failed (${error.message}), and nothing was stored.`);
61
+ }
62
+ function onData(chunk) {
63
+ for (const char of chunk) {
64
+ if (ENTER.has(char)) {
65
+ finish();
66
+ resolve(typed.trim());
67
+ return;
68
+ }
69
+ if (char === INTERRUPT) {
70
+ cancel('Sign-in cancelled: nothing was stored.');
71
+ return;
72
+ }
73
+ typed = nextTyped(typed, char);
74
+ }
75
+ }
76
+ input.setRawMode?.(true);
77
+ input.setEncoding('utf8');
78
+ input.on('data', onData);
79
+ input.on('end', onEnd);
80
+ input.on('close', onEnd);
81
+ input.on('error', onError);
82
+ input.resume();
83
+ });
84
+ }
@@ -0,0 +1,19 @@
1
+ export const EXIT_DONE = 0;
2
+ export const EXIT_FAILED = 1;
3
+ export const EXIT_USAGE = 2;
4
+ /** A command line that cannot be read: an unknown command or option, a value missing or not in its form. */
5
+ export class UsageError extends Error {
6
+ constructor(message) {
7
+ super(message);
8
+ this.name = 'UsageError';
9
+ }
10
+ }
11
+ /** What the command line refuses by itself: one sentence that says what to do next. */
12
+ export class Refusal extends Error {
13
+ code;
14
+ constructor(code, message) {
15
+ super(message);
16
+ this.name = 'Refusal';
17
+ this.code = code;
18
+ }
19
+ }
package/dist/run.js ADDED
@@ -0,0 +1,81 @@
1
+ import { flagOption, parseOptions } from './args.js';
2
+ import { COMMANDS } from './commands/index.js';
3
+ import { failureOf } from './failures.js';
4
+ import { commandHelp, generalHelp } from './help.js';
5
+ import { createOutput } from './output.js';
6
+ import { EXIT_DONE, UsageError } from './refusals.js';
7
+ import { VERSION } from './version.js';
8
+ const HELP_FLAGS = new Set(['--help', '-h']);
9
+ function commandNamed(name) {
10
+ if (name === undefined) {
11
+ throw new UsageError('Name a command, such as ever-teams status.');
12
+ }
13
+ if (name.startsWith('-')) {
14
+ throw new UsageError(`Put the command first, as in ever-teams status ${name}.`);
15
+ }
16
+ const command = COMMANDS.find((candidate) => candidate.name === name);
17
+ if (!command) {
18
+ throw new UsageError(`There is no command ${name}.`);
19
+ }
20
+ return command;
21
+ }
22
+ // The same text, as it is for a person, or in JSON with --json.
23
+ function writeHelp(text, output) {
24
+ if (output.json) {
25
+ output.result({ help: text }, []);
26
+ return;
27
+ }
28
+ output.data(text);
29
+ }
30
+ // "ever-teams help" and "ever-teams help <command>".
31
+ function showHelp(topic, output) {
32
+ if (topic === undefined) {
33
+ writeHelp(generalHelp(COMMANDS), output);
34
+ return;
35
+ }
36
+ writeHelp(commandHelp(commandNamed(topic)), output);
37
+ }
38
+ async function dispatch(io, output, trail) {
39
+ const [first, ...rest] = io.argv;
40
+ if (first !== undefined && HELP_FLAGS.has(first)) {
41
+ showHelp(undefined, output);
42
+ return;
43
+ }
44
+ if (first === 'help') {
45
+ // "help --json" asks for the general help, in JSON.
46
+ const topic = rest.find((argument) => !argument.startsWith('-'));
47
+ showHelp(topic, output);
48
+ return;
49
+ }
50
+ if (first === '--version') {
51
+ output.result({ version: VERSION }, [VERSION]);
52
+ return;
53
+ }
54
+ const command = commandNamed(first);
55
+ trail.command = command.name;
56
+ const values = parseOptions(command.name, rest, command.options);
57
+ if (flagOption(values, 'help')) {
58
+ writeHelp(commandHelp(command), output);
59
+ return;
60
+ }
61
+ await command.run({ io, values, output, trail });
62
+ }
63
+ /** Runs the command line `io.argv` and answers its exit code: 0 done, 1 refused or failed, 2 usage error. */
64
+ export async function run(io) {
65
+ const output = createOutput(io, io.argv.includes('--json'));
66
+ // Hidden before any argument is read: a usage error repeats the argument it refuses.
67
+ const environmentToken = io.env.EVER_TEAMS_TOKEN?.trim();
68
+ if (environmentToken) {
69
+ output.hide(environmentToken);
70
+ }
71
+ const trail = { command: '' };
72
+ try {
73
+ await dispatch(io, output, trail);
74
+ return EXIT_DONE;
75
+ }
76
+ catch (error) {
77
+ const failure = failureOf(error, trail);
78
+ output.failure(failure);
79
+ return failure.exitCode;
80
+ }
81
+ }
@@ -0,0 +1,116 @@
1
+ import { createClient } from '@ever-teams/api';
2
+ import { textOption } from './args.js';
3
+ import { readLogin } from './config.js';
4
+ import { Refusal, UsageError } from './refusals.js';
5
+ /** The hosted service's API, for a person who gives no other address. */
6
+ export const DEFAULT_API_URL = 'https://api.ever.team/api';
7
+ const EXCHANGE_PATH = '/auth/api-token/exchange';
8
+ const LOCAL_HOSTS = new Set(['localhost', '127.0.0.1', '[::1]']);
9
+ function withoutTrailingSlashes(url) {
10
+ let end = url.length;
11
+ while (end > 0 && url[end - 1] === '/') {
12
+ end -= 1;
13
+ }
14
+ return url.slice(0, end);
15
+ }
16
+ function addressOf(text, givenBy) {
17
+ const example = 'give the address of the API, such as https://api.example.com/api.';
18
+ let url;
19
+ try {
20
+ url = new URL(text);
21
+ }
22
+ catch {
23
+ throw new UsageError(`${givenBy} is not an address: ${example}`);
24
+ }
25
+ const isWebAddress = url.protocol === 'https:' || url.protocol === 'http:';
26
+ if (!isWebAddress) {
27
+ throw new UsageError(`${givenBy} is not a web address: ${example}`);
28
+ }
29
+ return withoutTrailingSlashes(text);
30
+ }
31
+ /** The address this run was given: --api-url, else EVER_TEAMS_API_URL; undefined when it was given neither. */
32
+ function givenApiUrl(context) {
33
+ // A flag given empty is refused as no address, never read as no flag: the run would go to another API.
34
+ const flag = textOption(context.values, 'api-url');
35
+ if (flag !== undefined) {
36
+ return addressOf(flag, '--api-url');
37
+ }
38
+ // An empty variable counts as unset, as a shell clears one with VAR=.
39
+ const fromEnvironment = context.io.env.EVER_TEAMS_API_URL;
40
+ if (fromEnvironment) {
41
+ return addressOf(fromEnvironment, 'EVER_TEAMS_API_URL');
42
+ }
43
+ return undefined;
44
+ }
45
+ function apiUrlFrom(given, stored) {
46
+ if (given !== undefined) {
47
+ return given;
48
+ }
49
+ if (stored) {
50
+ return stored.apiUrl;
51
+ }
52
+ return DEFAULT_API_URL;
53
+ }
54
+ /** The API to talk to: --api-url, else EVER_TEAMS_API_URL, else the stored login's, else the hosted service's. */
55
+ export function apiUrlOf(context, stored) {
56
+ return apiUrlFrom(givenApiUrl(context), stored);
57
+ }
58
+ /** Whether a token sent to `apiUrl` travels unencrypted over a network. */
59
+ export function isUnencrypted(apiUrl) {
60
+ const url = new URL(apiUrl);
61
+ const isLocal = LOCAL_HOSTS.has(url.hostname);
62
+ return url.protocol === 'http:' && !isLocal;
63
+ }
64
+ function urlOfRequest(input) {
65
+ if (typeof input === 'string') {
66
+ return input;
67
+ }
68
+ if (input instanceof URL) {
69
+ return input.href;
70
+ }
71
+ return input.url;
72
+ }
73
+ // The sentence of a failure tells a server that keeps personal API tokens off by the exchange's answer.
74
+ function watchedFetch(io, trail) {
75
+ return async (input, init) => {
76
+ const response = await io.fetch(input, init);
77
+ const { pathname } = new URL(urlOfRequest(input));
78
+ if (pathname.endsWith(EXCHANGE_PATH)) {
79
+ trail.exchangeStatus = response.status;
80
+ }
81
+ return response;
82
+ };
83
+ }
84
+ /** A client of the SDK for `apiUrl` and `token`, which the output of the command never shows. */
85
+ export function clientFor(context, apiUrl, token, tokenFrom) {
86
+ context.output.hide(token);
87
+ context.trail.apiUrl = apiUrl;
88
+ context.trail.tokenFrom = tokenFrom;
89
+ return createClient({ apiUrl, token, fetch: watchedFetch(context.io, context.trail) });
90
+ }
91
+ /**
92
+ * The client of a signed-in command: EVER_TEAMS_TOKEN when it is set, else the stored token, which is sent only to
93
+ * the API it was stored for.
94
+ */
95
+ export function openSession(context) {
96
+ const given = givenApiUrl(context);
97
+ const fromEnvironment = context.io.env.EVER_TEAMS_TOKEN?.trim();
98
+ // The settings file is read only when a value comes from it: a damaged one stops no run that does not need it.
99
+ if (fromEnvironment && given !== undefined) {
100
+ return clientFor(context, given, fromEnvironment, 'environment');
101
+ }
102
+ const stored = readLogin(context.io);
103
+ const apiUrl = apiUrlFrom(given, stored);
104
+ if (fromEnvironment) {
105
+ return clientFor(context, apiUrl, fromEnvironment, 'environment');
106
+ }
107
+ if (!stored) {
108
+ throw new Refusal('NOT_SIGNED_IN', 'You are not signed in: run ever-teams login, or set EVER_TEAMS_TOKEN.');
109
+ }
110
+ context.output.hide(stored.token);
111
+ if (stored.apiUrl !== apiUrl) {
112
+ throw new Refusal('OTHER_API', `You signed in to ${stored.apiUrl}, not ${apiUrl}: run ever-teams login --api-url ${apiUrl}, or set ` +
113
+ 'EVER_TEAMS_TOKEN.');
114
+ }
115
+ return clientFor(context, apiUrl, stored.token, 'login');
116
+ }
@@ -0,0 +1,4 @@
1
+ import { createRequire } from 'node:module';
2
+ const require = createRequire(import.meta.url);
3
+ const manifest = require('../package.json');
4
+ export const VERSION = manifest.version;
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
- "name": "@ever-teams/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@ever-teams/cli",
3
+ "version": "0.1.0",
4
+ "description": "The Ever Teams command line: start and stop your timer, add past time, export your time entries.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "ever-teams": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "engines": {
14
+ "node": ">=26"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/ever-co/ever-teams.git",
19
+ "directory": "apps/cli"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "build": "tsc -p tsconfig.json",
26
+ "prepack": "tsc -p tsconfig.json",
27
+ "pretest": "yarn --cwd ../../packages/toolkit-types build && yarn --cwd ../../packages/api build",
28
+ "test": "tsc -p tsconfig.json && node --test test/*.test.mjs"
29
+ },
30
+ "dependencies": {
31
+ "@ever-teams/api": "^0.3.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/node": "^26.6.5",
35
+ "typescript": "^5.6.3"
36
+ }
37
+ }