pomotty 1.0.1 → 1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 iririn1998
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.ja.md CHANGED
@@ -31,13 +31,13 @@ pomotty --work 30 --break 10
31
31
  pomotty --work=45 --break=15
32
32
  ```
33
33
 
34
- `--roop`で作業・休憩の繰り返し回数を指定できます。既定値は3で、1以上の整数
34
+ `--loop`で作業・休憩の繰り返し回数を指定できます。既定値は3で、1以上の整数
35
35
  (最大9007199254740991)を受け付けます。開始確認は最初の1回だけで、最後の休憩が
36
36
  完了すると終了します。
37
37
 
38
38
  ```shell
39
- pomotty --roop 5
40
- pomotty --work=25 --break=5 --roop=2
39
+ pomotty --loop 5
40
+ pomotty --work=25 --break=5 --loop=2
41
41
  ```
42
42
 
43
43
  利用可能なオプションは、次のコマンドで確認できます。
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [日本語](./README.ja.md)
4
4
 
5
- A Pomodoro timer for the terminal, available on Node.js 22 or later.
5
+ A Pomodoro timer for the terminal, available on Node.js `^22.18.0 || >=24.11.0`.
6
6
 
7
7
  ```shell
8
8
  npx pomotty
@@ -31,13 +31,13 @@ pomotty --work 30 --break 10
31
31
  pomotty --work=45 --break=15
32
32
  ```
33
33
 
34
- Use `--roop` to set the number of work and break cycles. It defaults to 3 and
34
+ Use `--loop` to set the number of work and break cycles. It defaults to 3 and
35
35
  accepts whole numbers from 1 to 9007199254740991. The start confirmation appears
36
36
  only once, and the timer exits after the final break finishes.
37
37
 
38
38
  ```shell
39
- pomotty --roop 5
40
- pomotty --work=25 --break=5 --roop=2
39
+ pomotty --loop 5
40
+ pomotty --work=25 --break=5 --loop=2
41
41
  ```
42
42
 
43
43
  To see the available options, run:
@@ -52,3 +52,7 @@ Windows. If audio playback is unavailable, the timer falls back to different
52
52
  numbers of terminal bells for work and break notifications.
53
53
 
54
54
  For development and npm publishing instructions, see the [development guide](./DEVELOPMENT.md).
55
+
56
+ ## License
57
+
58
+ MIT
@@ -30,7 +30,7 @@ const OPTIONS = [
30
30
  },
31
31
  {
32
32
  description: `Work-break repetitions (positive integer, default: 3)`,
33
- name: "--roop",
33
+ name: "--loop",
34
34
  valueName: "<count>"
35
35
  },
36
36
  {
@@ -236,12 +236,12 @@ const EQUALS_SIGN_NOT_FOUND = -1;
236
236
  const HELP_OPTIONS = ["--help", "-h"];
237
237
  const MAXIMUM_DURATION_MINUTES = 1440;
238
238
  const NEXT_ARGUMENT_OFFSET = 1;
239
- const ROOP_PATTERN = /^[1-9][0-9]*$/u;
240
- const isNumericOption = (value) => value === "--break" || value === "--work" || value === "--roop";
239
+ const LOOP_PATTERN = /^[1-9][0-9]*$/u;
240
+ const isNumericOption = (value) => value === "--break" || value === "--work" || value === "--loop";
241
241
  const isHelpOption = (value) => HELP_OPTIONS.some((option) => option === value);
242
242
  const createValueError = (option) => {
243
243
  let maximum = MAXIMUM_DURATION_MINUTES;
244
- if (option === "--roop") maximum = Number.MAX_SAFE_INTEGER;
244
+ if (option === "--loop") maximum = Number.MAX_SAFE_INTEGER;
245
245
  return {
246
246
  kind: "error",
247
247
  message: `Error: ${option} requires an integer from 1 to ${maximum}.\n`
@@ -253,8 +253,8 @@ const createDuplicateError = (option) => ({
253
253
  });
254
254
  const parseNumericValue = (option, value) => {
255
255
  let pattern = DURATION_PATTERN, maximum = MAXIMUM_DURATION_MINUTES;
256
- if (option === "--roop") {
257
- pattern = ROOP_PATTERN;
256
+ if (option === "--loop") {
257
+ pattern = LOOP_PATTERN;
258
258
  maximum = Number.MAX_SAFE_INTEGER;
259
259
  }
260
260
  if (typeof value !== "string" || !pattern.test(value)) return;
@@ -278,7 +278,7 @@ const parseNumericArgument = (argument, nextArgument) => {
278
278
  const parseCliArguments = (arguments_) => {
279
279
  if (arguments_.some((argument) => isHelpOption(argument))) return { kind: "help" };
280
280
  const specifiedOptions = /* @__PURE__ */ new Set();
281
- let breakDurationMinutes = 5, roopCount = 3, workDurationMinutes = 15;
281
+ let breakDurationMinutes = 5, loopCount = 3, workDurationMinutes = 15;
282
282
  for (let argumentIndex = ARGUMENTS_START_INDEX; argumentIndex < arguments_.length; argumentIndex += ARGUMENT_INDEX_INCREMENT) {
283
283
  const argument = arguments_[argumentIndex] ?? "", { consumesNextArgument, optionName, value } = parseNumericArgument(argument, arguments_[argumentIndex + NEXT_ARGUMENT_OFFSET]);
284
284
  if (!isNumericOption(optionName)) return {
@@ -291,13 +291,13 @@ const parseCliArguments = (arguments_) => {
291
291
  specifiedOptions.add(optionName);
292
292
  if (consumesNextArgument) argumentIndex += NEXT_ARGUMENT_OFFSET;
293
293
  if (optionName === "--work") workDurationMinutes = numericValue;
294
- else if (optionName === "--roop") roopCount = numericValue;
294
+ else if (optionName === "--loop") loopCount = numericValue;
295
295
  else breakDurationMinutes = numericValue;
296
296
  }
297
297
  return {
298
298
  breakDurationMinutes,
299
299
  kind: "run",
300
- roopCount,
300
+ loopCount,
301
301
  workDurationMinutes
302
302
  };
303
303
  };
@@ -454,7 +454,7 @@ const runCli = async ({ arguments_ = process$1.argv.slice(CLI_ARGUMENTS_START_IN
454
454
  writeOutput("⏹️ Work was not started.\n");
455
455
  return SUCCESS_EXIT_CODE;
456
456
  }
457
- for (let cycleIndex = 0; cycleIndex < parsedArguments.roopCount; cycleIndex += COUNT_INCREMENT) await runPomodoroCycle({
457
+ for (let cycleIndex = 0; cycleIndex < parsedArguments.loopCount; cycleIndex += COUNT_INCREMENT) await runPomodoroCycle({
458
458
  breakDurationMs: parsedArguments.breakDurationMinutes * MILLISECONDS_PER_MINUTE,
459
459
  onPhaseCompleted: (phase) => {
460
460
  writeOutput(`✅ ${PHASE_NAMES[phase]} complete.\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pomotty",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "An interactive terminal Pomodoro timer with configurable work and break sessions and sound notifications.",
5
5
  "keywords": [
6
6
  "cli",
@@ -12,8 +12,8 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/iririn1998/pomotty/issues"
14
14
  },
15
- "license": "ISC",
16
- "author": "",
15
+ "license": "MIT",
16
+ "author": "iririn1998",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/iririn1998/pomotty.git"
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "engines": {
48
- "node": ">=22"
48
+ "node": "^22.18.0 || >=24.11.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "rolldown -c rolldown.config.mjs",