officedesk 0.0.5 → 0.0.9
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/bin/run.js +43 -0
- package/package.json +26 -18
- package/README.md +0 -24
- package/bin/officedesk-plugin-email.js +0 -3
- package/bin/officedesk-plugin-gmail.js +0 -3
- package/bin/officedesk-plugin-google-calendar.js +0 -3
- package/bin/officedesk-plugin-google-sheets.js +0 -3
- package/bin/officedesk-plugin-jira.js +0 -3
- package/bin/officedesk-plugin-odoo.js +0 -3
- package/bin/officedesk-plugin-xero.js +0 -3
package/bin/run.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { execFileSync } = require('child_process');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
|
|
7
|
+
const BIN_NAME = 'officedesk';
|
|
8
|
+
|
|
9
|
+
function getPlatformPkg() {
|
|
10
|
+
const platform = os.platform(); // 'linux', 'win32', 'darwin', ...
|
|
11
|
+
const arch = os.arch(); // 'x64', 'arm64', ...
|
|
12
|
+
|
|
13
|
+
if (platform === 'win32' && arch === 'x64') return 'officedesk-win32-x64';
|
|
14
|
+
if (platform === 'linux' && arch === 'x64') return 'officedesk-linux-x64';
|
|
15
|
+
|
|
16
|
+
throw new Error(
|
|
17
|
+
`officedesk: unsupported platform ${platform}/${arch}. ` +
|
|
18
|
+
`Supported: linux/x64, win32/x64.`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function resolveBin() {
|
|
23
|
+
const pkg = getPlatformPkg();
|
|
24
|
+
const ext = os.platform() === 'win32' ? '.exe' : '';
|
|
25
|
+
try {
|
|
26
|
+
// Resolve relative to this wrapper so it works after global install
|
|
27
|
+
return require.resolve(`${pkg}/bin/${BIN_NAME}${ext}`);
|
|
28
|
+
} catch {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`officedesk: could not find platform binary. ` +
|
|
31
|
+
`Try reinstalling: npm i -g officedesk`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const bin = resolveBin();
|
|
38
|
+
execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
39
|
+
} catch (err) {
|
|
40
|
+
if (err.status !== undefined) process.exit(err.status);
|
|
41
|
+
console.error(err.message);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,34 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "officedesk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "Master CLI for officedesk-ai — discovers and delegates to officedesk-plugin-* executables",
|
|
5
5
|
"bin": {
|
|
6
|
-
"officedesk
|
|
7
|
-
"officedesk-plugin-gmail": "bin/officedesk-plugin-gmail.js",
|
|
8
|
-
"officedesk-plugin-google-calendar": "bin/officedesk-plugin-google-calendar.js",
|
|
9
|
-
"officedesk-plugin-google-sheets": "bin/officedesk-plugin-google-sheets.js",
|
|
10
|
-
"officedesk-plugin-jira": "bin/officedesk-plugin-jira.js",
|
|
11
|
-
"officedesk-plugin-odoo": "bin/officedesk-plugin-odoo.js",
|
|
12
|
-
"officedesk-plugin-xero": "bin/officedesk-plugin-xero.js"
|
|
6
|
+
"officedesk": "bin/run.js"
|
|
13
7
|
},
|
|
14
8
|
"files": [
|
|
15
9
|
"bin"
|
|
16
10
|
],
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@officedesk/plugin-email": "*",
|
|
19
|
-
"@officedesk/plugin-gmail": "*",
|
|
20
|
-
"@officedesk/plugin-google-calendar": "*",
|
|
21
|
-
"@officedesk/plugin-google-sheets": "*",
|
|
22
|
-
"@officedesk/plugin-jira": "*",
|
|
23
|
-
"@officedesk/plugin-odoo": "*",
|
|
24
|
-
"@officedesk/plugin-xero": "*"
|
|
25
|
-
},
|
|
26
11
|
"publishConfig": {
|
|
27
12
|
"access": "public"
|
|
28
13
|
},
|
|
14
|
+
"optionalDependencies": {
|
|
15
|
+
"officedesk-linux-x64": "0.0.6",
|
|
16
|
+
"officedesk-win32-x64": "0.0.6"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"test": "tsc && node --test dist/__tests__/*.test.js",
|
|
22
|
+
"build:bin": "bun build src/index.ts --compile --outfile ../../dist/bin/officedesk",
|
|
23
|
+
"build:bin:linux": "bun build src/index.ts --compile --target=bun-linux-x64 --outfile ../../dist/bin/officedesk-linux",
|
|
24
|
+
"build:bin:windows": "bun build src/index.ts --compile --target=bun-windows-x64 --outfile ../../dist/bin/officedesk.exe"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"officedesk",
|
|
28
|
+
"cli",
|
|
29
|
+
"automation"
|
|
30
|
+
],
|
|
31
|
+
"author": "Mohammed Jibrail Bin",
|
|
29
32
|
"license": "ISC",
|
|
30
33
|
"repository": {
|
|
31
34
|
"type": "git",
|
|
32
35
|
"url": "git+https://github.com/initdsg/officedesk.ai-cli.git"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^25.0.10",
|
|
40
|
+
"typescript": "^5.9.3"
|
|
33
41
|
}
|
|
34
42
|
}
|
package/README.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# officedesk
|
|
2
|
-
|
|
3
|
-
Meta-package that installs all [officedesk](https://officedesk.ai) AI plugins in one command.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g officedesk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Included plugins
|
|
12
|
-
|
|
13
|
-
| Command | Package | Description |
|
|
14
|
-
|---|---|---|
|
|
15
|
-
| `officedesk-plugin-email` | [@officedesk/plugin-email](https://www.npmjs.com/package/@officedesk/plugin-email) | Email integration |
|
|
16
|
-
| `officedesk-plugin-gmail` | [@officedesk/plugin-gmail](https://www.npmjs.com/package/@officedesk/plugin-gmail) | Gmail integration |
|
|
17
|
-
| `officedesk-plugin-google-calendar` | [@officedesk/plugin-google-calendar](https://www.npmjs.com/package/@officedesk/plugin-google-calendar) | Google Calendar integration |
|
|
18
|
-
| `officedesk-plugin-google-sheets` | [@officedesk/plugin-google-sheets](https://www.npmjs.com/package/@officedesk/plugin-google-sheets) | Google Sheets integration |
|
|
19
|
-
| `officedesk-plugin-jira` | [@officedesk/plugin-jira](https://www.npmjs.com/package/@officedesk/plugin-jira) | Jira integration |
|
|
20
|
-
| `officedesk-plugin-odoo` | [@officedesk/plugin-odoo](https://www.npmjs.com/package/@officedesk/plugin-odoo) | Odoo integration |
|
|
21
|
-
| `officedesk-plugin-xero` | [@officedesk/plugin-xero](https://www.npmjs.com/package/@officedesk/plugin-xero) | Xero accounting integration |
|
|
22
|
-
|
|
23
|
-
Each plugin can also be installed individually via its own package.
|
|
24
|
-
|