clocktopus 1.10.2 → 1.10.3
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.
|
@@ -3,11 +3,11 @@ import { execSync } from 'child_process';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import { createRequire } from 'module';
|
|
6
|
+
import { IS_DEV } from '../../lib/constants.js';
|
|
6
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
8
|
const __dirname = path.dirname(__filename);
|
|
8
9
|
const SCRIPT_PATH = path.resolve(__dirname, '../../index.js');
|
|
9
|
-
const
|
|
10
|
-
const PM2_NAME = isDev ? 'clocktopus-monitor-dev' : 'clocktopus-monitor';
|
|
10
|
+
const PM2_NAME = IS_DEV ? 'clocktopus-monitor-dev' : 'clocktopus-monitor';
|
|
11
11
|
const pm2Bin = path.join(path.dirname(createRequire(import.meta.url).resolve('pm2')), 'bin', 'pm2');
|
|
12
12
|
const bunBin = (() => {
|
|
13
13
|
try {
|
package/dist/dashboard/views.js
CHANGED
|
@@ -13,9 +13,8 @@ export function indexPage() {
|
|
|
13
13
|
<style>
|
|
14
14
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
15
15
|
html.browser { background: #0d1117; }
|
|
16
|
-
html
|
|
17
|
-
|
|
18
|
-
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: transparent; color: #e1e4e8; padding: 2rem; }
|
|
16
|
+
html { border-radius: 12px; overflow: hidden; height: 100vh; background: transparent; }
|
|
17
|
+
body { border-radius: 12px; height: 100vh; overflow-y: auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: transparent; color: #e1e4e8; padding: 2rem; }
|
|
19
18
|
h1 { font-size: 1.8rem; margin-bottom: 0; color: #fff; }
|
|
20
19
|
h2 { font-size: 1.1rem; color: #fff; margin-bottom: 1rem; }
|
|
21
20
|
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { execSync } from 'child_process';
|
|
|
9
9
|
import { closeStaleOpenSessions, completeLatestSession, getLatestSession, setSessionJiraWorklogId } from './lib/db.js';
|
|
10
10
|
import { isClockifyEnabled } from './lib/credentials.js';
|
|
11
11
|
import { ensureNativeAddons } from './lib/ensure-native-addons.js';
|
|
12
|
-
import { DASHBOARD_PORT, DASHBOARD_URL } from './lib/constants.js';
|
|
12
|
+
import { DASHBOARD_PORT, DASHBOARD_URL, IS_DEV } from './lib/constants.js';
|
|
13
13
|
const __filename = fileURLToPath(import.meta.url);
|
|
14
14
|
const __dirname = path.dirname(__filename);
|
|
15
15
|
const program = new Command();
|
|
@@ -398,9 +398,8 @@ program
|
|
|
398
398
|
const { startDashboard } = await import('./dashboard/server.js');
|
|
399
399
|
startDashboard();
|
|
400
400
|
});
|
|
401
|
-
const
|
|
402
|
-
const
|
|
403
|
-
const DASH_PM2_NAME = isDev ? 'clocktopus-dash-dev' : 'clocktopus-dash';
|
|
401
|
+
const MONITOR_PM2_NAME = IS_DEV ? 'clocktopus-monitor-dev' : 'clocktopus-monitor';
|
|
402
|
+
const DASH_PM2_NAME = IS_DEV ? 'clocktopus-dash-dev' : 'clocktopus-dash';
|
|
404
403
|
const pm2Bin = path.join(path.dirname(createRequire(import.meta.url).resolve('pm2')), 'bin', 'pm2');
|
|
405
404
|
const bunBin = (() => {
|
|
406
405
|
try {
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
import * as path from 'path';
|
|
2
|
+
/**
|
|
3
|
+
* True only when running from the clocktopus source repo (e.g. `bun run`
|
|
4
|
+
* during local development). Bun-linked global installs live under
|
|
5
|
+
* `node_modules/` and must NOT be flagged as dev — otherwise PM2 names and
|
|
6
|
+
* data paths pick up the dev variants. Set CLOCKTOPUS_DEV=1 to force on.
|
|
7
|
+
*/
|
|
8
|
+
export const IS_DEV = (() => {
|
|
9
|
+
const override = process.env.CLOCKTOPUS_DEV;
|
|
10
|
+
if (override != null && override !== '') {
|
|
11
|
+
return override === '1' || override.toLowerCase() === 'true';
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const scriptDir = path.dirname(new URL(import.meta.url).pathname);
|
|
15
|
+
if (scriptDir.includes('/node_modules/'))
|
|
16
|
+
return false;
|
|
17
|
+
return scriptDir.includes('/Projects/') || scriptDir.includes('/src/');
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
})();
|
|
1
23
|
/**
|
|
2
24
|
* Dashboard HTTP port. Override via CLOCKTOPUS_PORT env var if 4001 is busy.
|
|
3
25
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clocktopus",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"description": "Time-tracking automation for Clockify with idle monitoring, Jira integration, Google Calendar sync, CLI, web dashboard, and desktop app.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|