cctally 1.2.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/CHANGELOG.md +169 -0
- package/LICENSE +204 -0
- package/README.md +144 -0
- package/bin/cctally +30164 -0
- package/bin/cctally-alerts +6 -0
- package/bin/cctally-dashboard +4 -0
- package/bin/cctally-dollar-per-percent +3 -0
- package/bin/cctally-five-hour-blocks +3 -0
- package/bin/cctally-five-hour-breakdown +3 -0
- package/bin/cctally-forecast +5 -0
- package/bin/cctally-npm-shim.js +37 -0
- package/bin/cctally-project +5 -0
- package/bin/cctally-refresh-usage +3 -0
- package/bin/cctally-release +3 -0
- package/bin/cctally-sync-week +3 -0
- package/bin/cctally-tui +4 -0
- package/dashboard/static/assets/index-BIql6NB3.js +12 -0
- package/dashboard/static/assets/index-ee87BMyX.css +1 -0
- package/dashboard/static/dashboard.html +13 -0
- package/dashboard/static/icons.svg +155 -0
- package/dashboard/static/placeholder.txt +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
|
|
8
|
+
const platform = process.env.CCTALLY_NPM_SHIM_TEST_PLATFORM || process.platform;
|
|
9
|
+
if (platform === 'win32') {
|
|
10
|
+
console.error('cctally: Windows is not supported. Use macOS or Linux.');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const scriptPath = path.join(__dirname, 'cctally');
|
|
15
|
+
if (!fs.existsSync(scriptPath)) {
|
|
16
|
+
console.error(`cctally: bundled script not found at ${scriptPath}`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const python = process.env.CCTALLY_PYTHON || 'python3';
|
|
21
|
+
const result = spawnSync(python, [scriptPath, ...process.argv.slice(2)], {
|
|
22
|
+
stdio: 'inherit',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (result.error) {
|
|
26
|
+
if (result.error.code === 'ENOENT') {
|
|
27
|
+
console.error(
|
|
28
|
+
`cctally: cannot find ${python}. Install Python 3.13+ ` +
|
|
29
|
+
'or set CCTALLY_PYTHON to its path.'
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
console.error(`cctally: ${result.error.message}`);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/bin/cctally-tui
ADDED