@whatcode-ai/whatcode 1.10.0 → 1.11.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/README.md +1 -1
- package/dist/cli.js +9 -4
- package/dist/cli.js.map +1 -1
- package/dist/qrcode.d.ts.map +1 -1
- package/dist/qrcode.js +0 -2
- package/dist/qrcode.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npx @whatcode-ai/whatcode --tailscale
|
|
|
22
22
|
| `--hostname` | `-H` | `0.0.0.0` | Hostname to bind the opencode server to |
|
|
23
23
|
| `--port` | `-p` | `8192` | Port for the Whatcode server |
|
|
24
24
|
| `--opencode-port` | | `4096` | Port for the opencode server |
|
|
25
|
-
| `--
|
|
25
|
+
| `--log-level` | | `info` | Log verbosity: `none` \| `info` \| `debug` |
|
|
26
26
|
| `--help` | | | Show help |
|
|
27
27
|
|
|
28
28
|
## Programmatic usage
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createWhatcodeServer, resetWhatcodeServer } from '@whatcode-ai/sdk';
|
|
3
|
-
import { logger } from '@whatcode-ai/sdk/logger';
|
|
3
|
+
import { logger, logLevelSchema } from '@whatcode-ai/sdk/logger';
|
|
4
4
|
import { printQrCode } from "./qrcode.js";
|
|
5
5
|
import yargs from 'yargs';
|
|
6
6
|
import { hideBin } from 'yargs/helpers';
|
|
7
7
|
import updateNotifier from 'update-notifier';
|
|
8
8
|
import pkg from '../package.json' with { type: 'json' };
|
|
9
9
|
updateNotifier({ pkg }).notify();
|
|
10
|
-
const { tailscale, reset, port, opencodePort,
|
|
10
|
+
const { tailscale, reset, port, opencodePort, logLevel, password } = await yargs(hideBin(process.argv))
|
|
11
11
|
.scriptName('whatcode')
|
|
12
12
|
.help()
|
|
13
13
|
.strict()
|
|
@@ -17,7 +17,12 @@ const { tailscale, reset, port, opencodePort, debug, password } = await yargs(hi
|
|
|
17
17
|
.option('tailscale', { type: 'boolean', description: 'Expose opencode via Tailscale serve (HTTPS on your tailnet)' })
|
|
18
18
|
.option('port', { type: 'number', description: 'Port for the Whatcode server (default: 8192)' })
|
|
19
19
|
.option('opencode-port', { type: 'number', description: 'Port for the opencode server (default: 4096)' })
|
|
20
|
-
.option('
|
|
20
|
+
.option('log-level', {
|
|
21
|
+
type: 'string',
|
|
22
|
+
choices: ['none', 'info', 'debug'],
|
|
23
|
+
default: 'info',
|
|
24
|
+
description: 'Log level: none | info | debug (default: info)',
|
|
25
|
+
})
|
|
21
26
|
.option('password', { type: 'string', description: 'Password to protect the Whatcode and opencode servers (HTTP Basic Auth)' })
|
|
22
27
|
.parseAsync();
|
|
23
28
|
if (reset) {
|
|
@@ -27,7 +32,7 @@ const { url } = await createWhatcodeServer({
|
|
|
27
32
|
tailscale,
|
|
28
33
|
...(port !== undefined && { port }),
|
|
29
34
|
...(opencodePort !== undefined && { opencodePort }),
|
|
30
|
-
|
|
35
|
+
logLevel: await logLevelSchema.parseAsync(logLevel),
|
|
31
36
|
...(password !== undefined && { password }),
|
|
32
37
|
});
|
|
33
38
|
if (url) {
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KA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AC;IACV,MAAM,mBAAmB,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,oBAAoB,CAAC;IACzC,SAAS;IACT,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC;IACnC,GAAG,CAAC,YAAY,KAAK,SAAS,IAAI,EAAE,YAAY,EAAE,CAAC;IACnD,QAAQ,EAAE,MAAM,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC;IACnD,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,CAAC;CAC5C,CAAC,CAAC;AAEH,IAAI,GAAG,EAAE,CAAC;IACR,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,4BAA4B,GAAG,EAAE,CAAC,CAAC;IAC3D,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC;KAAM,CAAC;IACN,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,mGAAmG,CAAC,CAAC;AAC/H,CAAC"}
|
package/dist/qrcode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qrcode.d.ts","sourceRoot":"","sources":["../src/qrcode.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"qrcode.d.ts","sourceRoot":"","sources":["../src/qrcode.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM,KAAG,IAK5D,CAAC"}
|
package/dist/qrcode.js
CHANGED
|
@@ -4,8 +4,6 @@ export const printQrCode = (url, password) => {
|
|
|
4
4
|
const params = new URLSearchParams({ url });
|
|
5
5
|
if (password)
|
|
6
6
|
params.set('password', password);
|
|
7
|
-
// TODO [2026-05-01] we should handle this connection with url
|
|
8
|
-
// usefull if user try to scan the qr directly from the camera (outside our app)
|
|
9
7
|
const deepLink = `${CLIENT_URL}/connect?${params.toString()}`;
|
|
10
8
|
qrcode.generate(deepLink, { small: true });
|
|
11
9
|
};
|
package/dist/qrcode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qrcode.js","sourceRoot":"","sources":["../src/qrcode.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,QAAiB,EAAQ,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,IAAI,QAAQ;QAAE,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC/C,
|
|
1
|
+
{"version":3,"file":"qrcode.js","sourceRoot":"","sources":["../src/qrcode.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,QAAiB,EAAQ,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,IAAI,QAAQ;QAAE,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,GAAG,UAAU,YAAY,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC9D,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatcode-ai/whatcode",
|
|
3
3
|
"description": "SDK and CLI to start opencode and optionally expose it over HTTPS via Tailscale.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
7
7
|
"tailscale",
|
|
@@ -70,20 +70,20 @@
|
|
|
70
70
|
"README.md"
|
|
71
71
|
],
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@whatcode-ai/sdk": "1.
|
|
73
|
+
"@whatcode-ai/sdk": "1.11.0",
|
|
74
74
|
"qrcode-terminal": "^0.12.0",
|
|
75
75
|
"update-notifier": "^7.3.1",
|
|
76
76
|
"yargs": "^18.0.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@goatjs/node-monorepo-eslint": "^2.
|
|
80
|
-
"@goatjs/rimraf": "^2.
|
|
79
|
+
"@goatjs/node-monorepo-eslint": "^2.16.0",
|
|
80
|
+
"@goatjs/rimraf": "^2.4.0",
|
|
81
81
|
"@goatjs/typescript-config": "^2.1.0",
|
|
82
82
|
"@types/node": "^25.6.0",
|
|
83
83
|
"@types/qrcode-terminal": "^0.12.2",
|
|
84
84
|
"@types/update-notifier": "^6.0.8",
|
|
85
85
|
"@types/yargs": "^17.0.35",
|
|
86
|
-
"eslint": "^10.
|
|
86
|
+
"eslint": "^10.3.0",
|
|
87
87
|
"typescript": "^6.0.3"
|
|
88
88
|
}
|
|
89
89
|
}
|