@dubusoft/toodo 0.0.0-stage → 1.3.2-dev.2
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/README.md +30 -2
- package/bin/toodo.js +44 -0
- package/package.json +22 -4
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @dubusoft/toodo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command line for [Toodo](https://github.com/dev-bokdong/toodo), a task planner that turns a plan into implemented, reviewed code. It installs `toodo-server` and the web app it serves.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx @dubusoft/toodo init
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
or install globally:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm i -g @dubusoft/toodo
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The development channel is `@dubusoft/toodo@dev`.
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
- `toodo init`: set up Toodo on this machine.
|
|
22
|
+
- `toodo start`: start the server.
|
|
23
|
+
- `toodo stop`: stop the server.
|
|
24
|
+
- `toodo status`: show whether the server is running.
|
|
25
|
+
- `toodo service install`: install the server as a user service.
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
Linux x64 or arm64 (glibc) only. Install with optional dependencies enabled (the default), because the binaries ship in the `@dubusoft/toodo-linux-<arch>` packages.
|
|
30
|
+
|
|
31
|
+
See https://github.com/dev-bokdong/toodo for documentation.
|
package/bin/toodo.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const SUPPORTED = 'Linux x64 and Linux arm64';
|
|
8
|
+
|
|
9
|
+
if (process.platform !== 'linux' || (process.arch !== 'x64' && process.arch !== 'arm64')) {
|
|
10
|
+
console.error(
|
|
11
|
+
`toodo: ${process.platform}/${process.arch} is not supported; only ${SUPPORTED} are. ` +
|
|
12
|
+
'Build toodo-server from source instead, following docs/server.md in https://github.com/dev-bokdong/toodo.'
|
|
13
|
+
);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const pkg = `@dubusoft/toodo-linux-${process.arch}`;
|
|
18
|
+
let pkgDir;
|
|
19
|
+
try {
|
|
20
|
+
pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
|
|
21
|
+
} catch {
|
|
22
|
+
console.error(
|
|
23
|
+
`toodo: the platform package ${pkg} is not installed. ` +
|
|
24
|
+
'Reinstall with optional dependencies enabled: npm install -g @dubusoft/toodo --include=optional ' +
|
|
25
|
+
'(--no-optional or --omit=optional skips it).'
|
|
26
|
+
);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const bin = path.join(pkgDir, 'bin', 'toodo');
|
|
31
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
32
|
+
|
|
33
|
+
if (result.error) {
|
|
34
|
+
console.error(
|
|
35
|
+
`toodo: could not run ${bin}: ${result.error.message}. ` +
|
|
36
|
+
'Reinstall with: npm install -g @dubusoft/toodo --include=optional'
|
|
37
|
+
);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
if (result.signal) {
|
|
41
|
+
process.kill(process.pid, result.signal);
|
|
42
|
+
} else {
|
|
43
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dubusoft/toodo",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.3.2-dev.2",
|
|
4
|
+
"description": "Toodo command line: task planning that turns a plan into reviewed code",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"homepage": "https://github.com/dev-bokdong/toodo",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/dev-bokdong/toodo.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"toodo": "bin/toodo.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"optionalDependencies": {
|
|
21
|
+
"@dubusoft/toodo-linux-x64": "1.3.2-dev.2",
|
|
22
|
+
"@dubusoft/toodo-linux-arm64": "1.3.2-dev.2"
|
|
23
|
+
}
|
|
24
|
+
}
|