para-cli 1.21.10 → 1.22.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/LICENSE +1 -1
- package/index.js +9 -2
- package/package.json +4 -4
- package/para-cli.js +10 -3
package/LICENSE
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
|
188
188
|
identification within third-party archives.
|
|
189
189
|
|
|
190
|
-
Copyright
|
|
190
|
+
Copyright 2026 Erudika LTD, https://erudika.com
|
|
191
191
|
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
193
|
you may not use this file except in compliance with the License.
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2026 Erudika. https://erudika.com
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -36,7 +36,6 @@ import jsonwebtoken from 'jsonwebtoken';
|
|
|
36
36
|
import { lookup } from 'mime-types';
|
|
37
37
|
import { globbySync } from 'globby';
|
|
38
38
|
import chalk from 'chalk';
|
|
39
|
-
import { Promise } from 'rsvp';
|
|
40
39
|
import apiClient from 'superagent';
|
|
41
40
|
import { URL } from 'url';
|
|
42
41
|
import { ParaClient, ParaObject, Pager } from 'para-client-js';
|
|
@@ -357,6 +356,14 @@ export function me(pc, config) {
|
|
|
357
356
|
});
|
|
358
357
|
}
|
|
359
358
|
|
|
359
|
+
export function types(pc, config) {
|
|
360
|
+
const types = pc.getEntity(pc.invokeGet("_types")).then(function (data) {
|
|
361
|
+
console.log(JSON.stringify(data, null, 2));
|
|
362
|
+
}).catch(function () {
|
|
363
|
+
fail('Connection failed. Server might be down. Check the configuration file', yellow(config.path));
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
360
367
|
export function exportData(pc, config) {
|
|
361
368
|
pc.invokeGet('/_export').then(function (data) {
|
|
362
369
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "para-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Command-line tool for Para backend servers",
|
|
6
6
|
"homepage": "https://paraio.org",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"api"
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"eslint": "^9.39.
|
|
29
|
+
"eslint": "^9.39.2"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"exit": "^0.1.2",
|
|
40
40
|
"figlet": "^1.9.4",
|
|
41
41
|
"get-stdin": "^9.0.0",
|
|
42
|
-
"globby": "^16.
|
|
42
|
+
"globby": "^16.1.0",
|
|
43
43
|
"htmlparser2": "^10.0.0",
|
|
44
44
|
"jsonwebtoken": "^9.0.3",
|
|
45
45
|
"meow": "^14.0.0",
|
|
46
46
|
"mime-types": "^3.0.2",
|
|
47
|
-
"para-client-js": "^1.
|
|
47
|
+
"para-client-js": "^1.40.0",
|
|
48
48
|
"resolve": "^1.22.11",
|
|
49
49
|
"striptags": "^3.2.0",
|
|
50
50
|
"update-notifier": "^7.3.1",
|
package/para-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
* Copyright 2013-
|
|
4
|
+
* Copyright 2013-2026 Erudika. https://erudika.com
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -28,8 +28,9 @@ import figlet from 'figlet';
|
|
|
28
28
|
import chalk from 'chalk';
|
|
29
29
|
import meow from 'meow';
|
|
30
30
|
import {
|
|
31
|
-
defaultConfig, setup, listApps, parseEndpoint, selectEndpoint, addEndpoint, removeEndpoint,
|
|
32
|
-
updateAll, deleteAll, search, newKeys, newJWT, newApp, deleteApp,
|
|
31
|
+
defaultConfig, setup, listApps, parseEndpoint, selectEndpoint, addEndpoint, removeEndpoint,
|
|
32
|
+
selectApp, createAll, readAll, updateAll, deleteAll, search, newKeys, newJWT, newApp, deleteApp,
|
|
33
|
+
ping, me, appSettings, rebuildIndex, exportData, importData, types
|
|
33
34
|
} from './index.js';
|
|
34
35
|
|
|
35
36
|
const { red, green, blue } = chalk;
|
|
@@ -42,6 +43,7 @@ var cli = meow(`
|
|
|
42
43
|
Commands:
|
|
43
44
|
setup Initial setup, prompts you to enter your Para API keys and endpoint
|
|
44
45
|
apps Returns a list of all Para apps
|
|
46
|
+
types Returns an object containing all currently defined data types in Para
|
|
45
47
|
select <appid> Selects a Para app as a target for all subsequent read/write requests.
|
|
46
48
|
endpoints [add|remove] List and select Para server endpoints, add new or remove an exiting one.
|
|
47
49
|
create <file|glob> [--id] [--type] Persists files as Para objects and makes them searchable
|
|
@@ -88,6 +90,7 @@ var cli = meow(`
|
|
|
88
90
|
$ para-cli new-key
|
|
89
91
|
$ para-cli new-app "mynewapp" --name "Full app name"
|
|
90
92
|
$ para-cli apps
|
|
93
|
+
$ para-cli types
|
|
91
94
|
$ para-cli select scoold
|
|
92
95
|
$ para-cli endpoints
|
|
93
96
|
`, {
|
|
@@ -212,5 +215,9 @@ if (!input[0]) {
|
|
|
212
215
|
if (input[0] === 'import') {
|
|
213
216
|
importData(pc, input, config);
|
|
214
217
|
}
|
|
218
|
+
|
|
219
|
+
if (input[0] === 'types') {
|
|
220
|
+
types(pc, config);
|
|
221
|
+
}
|
|
215
222
|
}
|
|
216
223
|
|