@hostlink/hostlink-cli 1.0.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 +235 -0
- package/dist/bundle.js +32587 -0
- package/index.js +34 -0
- package/package.json +38 -0
package/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { Command } = require('commander');
|
|
4
|
+
const Conf = require('conf');
|
|
5
|
+
const clients = require('./src/clients');
|
|
6
|
+
const domains = require('./src/domains');
|
|
7
|
+
const quotations = require('./src/quotations');
|
|
8
|
+
const quotationItems = require('./src/quotation-items');
|
|
9
|
+
const me = require('./src/me');
|
|
10
|
+
|
|
11
|
+
const config = new Conf({ projectName: 'hostlink-cli' });
|
|
12
|
+
|
|
13
|
+
const program = new Command();
|
|
14
|
+
|
|
15
|
+
program
|
|
16
|
+
.name('hostlink')
|
|
17
|
+
.description('HostLink CLI')
|
|
18
|
+
.version('1.0.0');
|
|
19
|
+
|
|
20
|
+
program
|
|
21
|
+
.command('set-token <token>')
|
|
22
|
+
.description('Save your access token')
|
|
23
|
+
.action((token) => {
|
|
24
|
+
config.set('token', token);
|
|
25
|
+
console.log('Token saved.');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
me.register(program);
|
|
29
|
+
clients.register(program);
|
|
30
|
+
domains.register(program);
|
|
31
|
+
quotations.register(program);
|
|
32
|
+
quotationItems.register(program);
|
|
33
|
+
|
|
34
|
+
program.parse(process.argv);
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hostlink/hostlink-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool for the HostLink platform",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"hostlink": "dist/bundle.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/bundle.js"
|
|
11
|
+
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "esbuild index.js --bundle --platform=node --outfile=dist/bundle.js",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"hostlink",
|
|
21
|
+
"cli"
|
|
22
|
+
],
|
|
23
|
+
"author": "HostLink",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/HostLink/hostlink-cli"
|
|
28
|
+
},
|
|
29
|
+
"type": "commonjs",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"commander": "^14.0.3",
|
|
32
|
+
"conf": "^10.2.0",
|
|
33
|
+
"graphql-request": "^7.4.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"esbuild": "^0.27.4"
|
|
37
|
+
}
|
|
38
|
+
}
|