happy-coder 0.7.1 → 0.7.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/dist/index.cjs +5 -6
- package/dist/index.mjs +5 -6
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +1 -0
- package/dist/lib.d.mts +1 -0
- package/dist/lib.mjs +1 -1
- package/dist/{types-CnqIfv9n.mjs → types-CJU8o8xd.mjs} +2 -0
- package/dist/{types-B4GgojGc.cjs → types-D8nxJTr8.cjs} +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var types$1 = require('./types-
|
|
4
|
+
var types$1 = require('./types-D8nxJTr8.cjs');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var node_child_process = require('node:child_process');
|
|
7
7
|
var node_path = require('node:path');
|
|
@@ -2364,7 +2364,7 @@ async function loop(opts) {
|
|
|
2364
2364
|
}
|
|
2365
2365
|
|
|
2366
2366
|
var name = "happy-coder";
|
|
2367
|
-
var version = "0.7.
|
|
2367
|
+
var version = "0.7.2";
|
|
2368
2368
|
var description = "Claude Code session sharing CLI";
|
|
2369
2369
|
var author = "Kirill Dubovitskiy";
|
|
2370
2370
|
var license = "MIT";
|
|
@@ -4042,7 +4042,7 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
4042
4042
|
const settings = await updateSettings(async (s) => {
|
|
4043
4043
|
if (!s.machineId) {
|
|
4044
4044
|
const newMachineId = node_crypto.randomUUID();
|
|
4045
|
-
|
|
4045
|
+
types$1.logger.debug(`[AUTH] No machine ID found, generating new one: ${newMachineId}; We will not create machine on startup since we don't have api client intialized`);
|
|
4046
4046
|
return {
|
|
4047
4047
|
...s,
|
|
4048
4048
|
machineId: node_crypto.randomUUID()
|
|
@@ -5201,9 +5201,8 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
|
|
|
5201
5201
|
const result = await authAndSetupMachineIfNeeded();
|
|
5202
5202
|
credentials = result.credentials;
|
|
5203
5203
|
}
|
|
5204
|
-
const isExperimentalEnabled = ["true", "1", "yes"].includes(process.env.HAPPY_EXPERIMENTAL?.toLowerCase() || "");
|
|
5205
5204
|
let settings = await readSettings();
|
|
5206
|
-
if (
|
|
5205
|
+
if (settings && settings.daemonAutoStartWhenRunningHappy === void 0) {
|
|
5207
5206
|
const shouldAutoStart = await new Promise((resolve) => {
|
|
5208
5207
|
let hasResolved = false;
|
|
5209
5208
|
const onSelect = (autoStart) => {
|
|
@@ -5229,7 +5228,7 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
|
|
|
5229
5228
|
console.log(chalk.yellow("\n You can enable this later by running: happy daemon install"));
|
|
5230
5229
|
}
|
|
5231
5230
|
}
|
|
5232
|
-
if (
|
|
5231
|
+
if (settings && settings.daemonAutoStartWhenRunningHappy) {
|
|
5233
5232
|
types$1.logger.debug("Starting Happy background service...");
|
|
5234
5233
|
if (!await isDaemonRunning()) {
|
|
5235
5234
|
const daemonProcess = spawnHappyCLI(["daemon", "start-sync"], {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { l as logger, b as backoff, d as delay, R as RawJSONLinesSchema, c as configuration, e as encodeBase64, f as encodeBase64Url, g as decodeBase64, A as ApiClient } from './types-
|
|
2
|
+
import { l as logger, b as backoff, d as delay, R as RawJSONLinesSchema, c as configuration, e as encodeBase64, f as encodeBase64Url, g as decodeBase64, A as ApiClient } from './types-CJU8o8xd.mjs';
|
|
3
3
|
import { randomUUID, randomBytes } from 'node:crypto';
|
|
4
4
|
import { spawn, execSync } from 'node:child_process';
|
|
5
5
|
import { resolve, join, dirname as dirname$1 } from 'node:path';
|
|
@@ -2343,7 +2343,7 @@ async function loop(opts) {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
|
|
2345
2345
|
var name = "happy-coder";
|
|
2346
|
-
var version = "0.7.
|
|
2346
|
+
var version = "0.7.2";
|
|
2347
2347
|
var description = "Claude Code session sharing CLI";
|
|
2348
2348
|
var author = "Kirill Dubovitskiy";
|
|
2349
2349
|
var license = "MIT";
|
|
@@ -4021,7 +4021,7 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
4021
4021
|
const settings = await updateSettings(async (s) => {
|
|
4022
4022
|
if (!s.machineId) {
|
|
4023
4023
|
const newMachineId = randomUUID();
|
|
4024
|
-
|
|
4024
|
+
logger.debug(`[AUTH] No machine ID found, generating new one: ${newMachineId}; We will not create machine on startup since we don't have api client intialized`);
|
|
4025
4025
|
return {
|
|
4026
4026
|
...s,
|
|
4027
4027
|
machineId: randomUUID()
|
|
@@ -5180,9 +5180,8 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
|
|
|
5180
5180
|
const result = await authAndSetupMachineIfNeeded();
|
|
5181
5181
|
credentials = result.credentials;
|
|
5182
5182
|
}
|
|
5183
|
-
const isExperimentalEnabled = ["true", "1", "yes"].includes(process.env.HAPPY_EXPERIMENTAL?.toLowerCase() || "");
|
|
5184
5183
|
let settings = await readSettings();
|
|
5185
|
-
if (
|
|
5184
|
+
if (settings && settings.daemonAutoStartWhenRunningHappy === void 0) {
|
|
5186
5185
|
const shouldAutoStart = await new Promise((resolve) => {
|
|
5187
5186
|
let hasResolved = false;
|
|
5188
5187
|
const onSelect = (autoStart) => {
|
|
@@ -5208,7 +5207,7 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
|
|
|
5208
5207
|
console.log(chalk.yellow("\n You can enable this later by running: happy daemon install"));
|
|
5209
5208
|
}
|
|
5210
5209
|
}
|
|
5211
|
-
if (
|
|
5210
|
+
if (settings && settings.daemonAutoStartWhenRunningHappy) {
|
|
5212
5211
|
logger.debug("Starting Happy background service...");
|
|
5213
5212
|
if (!await isDaemonRunning()) {
|
|
5214
5213
|
const daemonProcess = spawnHappyCLI(["daemon", "start-sync"], {
|
package/dist/lib.cjs
CHANGED
package/dist/lib.d.cts
CHANGED
|
@@ -746,6 +746,7 @@ declare class Configuration {
|
|
|
746
746
|
readonly settingsFile: string;
|
|
747
747
|
readonly privateKeyFile: string;
|
|
748
748
|
readonly daemonStateFile: string;
|
|
749
|
+
readonly isExperimentalEnabled: boolean;
|
|
749
750
|
constructor();
|
|
750
751
|
}
|
|
751
752
|
declare const configuration: Configuration;
|
package/dist/lib.d.mts
CHANGED
|
@@ -746,6 +746,7 @@ declare class Configuration {
|
|
|
746
746
|
readonly settingsFile: string;
|
|
747
747
|
readonly privateKeyFile: string;
|
|
748
748
|
readonly daemonStateFile: string;
|
|
749
|
+
readonly isExperimentalEnabled: boolean;
|
|
749
750
|
constructor();
|
|
750
751
|
}
|
|
751
752
|
declare const configuration: Configuration;
|
package/dist/lib.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-CJU8o8xd.mjs';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'chalk';
|
|
4
4
|
import 'fs';
|
|
@@ -22,6 +22,7 @@ class Configuration {
|
|
|
22
22
|
settingsFile;
|
|
23
23
|
privateKeyFile;
|
|
24
24
|
daemonStateFile;
|
|
25
|
+
isExperimentalEnabled;
|
|
25
26
|
constructor() {
|
|
26
27
|
this.serverUrl = process.env.HAPPY_SERVER_URL || "https://handy-api.korshakov.org";
|
|
27
28
|
const args = process.argv.slice(2);
|
|
@@ -37,6 +38,7 @@ class Configuration {
|
|
|
37
38
|
this.settingsFile = join(this.happyHomeDir, "settings.json");
|
|
38
39
|
this.privateKeyFile = join(this.happyHomeDir, "access.key");
|
|
39
40
|
this.daemonStateFile = join(this.happyHomeDir, "daemon.state.json");
|
|
41
|
+
this.isExperimentalEnabled = ["true", "1", "yes"].includes(process.env.HAPPY_EXPERIMENTAL?.toLowerCase() || "");
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
const configuration = new Configuration();
|
|
@@ -24,6 +24,7 @@ class Configuration {
|
|
|
24
24
|
settingsFile;
|
|
25
25
|
privateKeyFile;
|
|
26
26
|
daemonStateFile;
|
|
27
|
+
isExperimentalEnabled;
|
|
27
28
|
constructor() {
|
|
28
29
|
this.serverUrl = process.env.HAPPY_SERVER_URL || "https://handy-api.korshakov.org";
|
|
29
30
|
const args = process.argv.slice(2);
|
|
@@ -39,6 +40,7 @@ class Configuration {
|
|
|
39
40
|
this.settingsFile = node_path.join(this.happyHomeDir, "settings.json");
|
|
40
41
|
this.privateKeyFile = node_path.join(this.happyHomeDir, "access.key");
|
|
41
42
|
this.daemonStateFile = node_path.join(this.happyHomeDir, "daemon.state.json");
|
|
43
|
+
this.isExperimentalEnabled = ["true", "1", "yes"].includes(process.env.HAPPY_EXPERIMENTAL?.toLowerCase() || "");
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
const configuration = new Configuration();
|