@dxos/cli 0.6.14-main.7bd9c89 → 0.6.14-staging.3e2eaca
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/dev.js +26 -0
- package/bin/dx.js +17 -0
- package/dist/src/base.js +11 -16
- package/dist/src/base.js.map +1 -1
- package/dist/src/commands/agent/agent.node.test.js +54 -59
- package/dist/src/commands/agent/agent.node.test.js.map +1 -1
- package/dist/src/commands/agent/invitations.d.ts +11 -11
- package/dist/src/commands/agent/invitations.js +19 -24
- package/dist/src/commands/agent/invitations.js.map +1 -1
- package/dist/src/commands/agent/list.d.ts +12 -12
- package/dist/src/commands/agent/list.js +11 -13
- package/dist/src/commands/agent/list.js.map +1 -1
- package/dist/src/commands/agent/restart.d.ts +12 -12
- package/dist/src/commands/agent/restart.js +7 -9
- package/dist/src/commands/agent/restart.js.map +1 -1
- package/dist/src/commands/agent/start.d.ts +15 -15
- package/dist/src/commands/agent/start.js +38 -43
- package/dist/src/commands/agent/start.js.map +1 -1
- package/dist/src/commands/agent/status.d.ts +10 -10
- package/dist/src/commands/agent/status.js +7 -9
- package/dist/src/commands/agent/status.js.map +1 -1
- package/dist/src/commands/agent/stop.d.ts +13 -13
- package/dist/src/commands/agent/stop.js +10 -15
- package/dist/src/commands/agent/stop.js.map +1 -1
- package/dist/src/commands/app/app.node.test.js +11 -16
- package/dist/src/commands/app/app.node.test.js.map +1 -1
- package/dist/src/commands/app/create.d.ts +14 -14
- package/dist/src/commands/app/create.js +23 -52
- package/dist/src/commands/app/create.js.map +1 -1
- package/dist/src/commands/app/list.d.ts +10 -10
- package/dist/src/commands/app/list.js +10 -12
- package/dist/src/commands/app/list.js.map +1 -1
- package/dist/src/commands/app/open.d.ts +13 -13
- package/dist/src/commands/app/open.js +23 -28
- package/dist/src/commands/app/open.js.map +1 -1
- package/dist/src/commands/app/publish.d.ts +14 -14
- package/dist/src/commands/app/publish.js +19 -24
- package/dist/src/commands/app/publish.js.map +1 -1
- package/dist/src/commands/config/index.js +3 -5
- package/dist/src/commands/config/index.js.map +1 -1
- package/dist/src/commands/config/index.node.test.js +11 -39
- package/dist/src/commands/config/index.node.test.js.map +1 -1
- package/dist/src/commands/debug/diagnostics.d.ts +12 -12
- package/dist/src/commands/debug/diagnostics.js +15 -20
- package/dist/src/commands/debug/diagnostics.js.map +1 -1
- package/dist/src/commands/debug/error.js +5 -7
- package/dist/src/commands/debug/error.js.map +1 -1
- package/dist/src/commands/debug/generate.d.ts +16 -16
- package/dist/src/commands/debug/generate.js +20 -22
- package/dist/src/commands/debug/generate.js.map +1 -1
- package/dist/src/commands/debug/metrics.d.ts +1 -1
- package/dist/src/commands/debug/metrics.js +5 -7
- package/dist/src/commands/debug/metrics.js.map +1 -1
- package/dist/src/commands/debug/status.d.ts +11 -11
- package/dist/src/commands/debug/status.js +10 -15
- package/dist/src/commands/debug/status.js.map +1 -1
- package/dist/src/commands/device/info.js +11 -16
- package/dist/src/commands/device/info.js.map +1 -1
- package/dist/src/commands/device/list.d.ts +10 -10
- package/dist/src/commands/device/list.js +9 -11
- package/dist/src/commands/device/list.js.map +1 -1
- package/dist/src/commands/device/update.d.ts +11 -11
- package/dist/src/commands/device/update.js +11 -13
- package/dist/src/commands/device/update.js.map +1 -1
- package/dist/src/commands/function/list.js +15 -19
- package/dist/src/commands/function/list.js.map +1 -1
- package/dist/src/commands/function/logs.d.ts +1 -1
- package/dist/src/commands/function/logs.js +5 -7
- package/dist/src/commands/function/logs.js.map +1 -1
- package/dist/src/commands/function/trigger/list.d.ts +14 -14
- package/dist/src/commands/function/trigger/list.js +21 -28
- package/dist/src/commands/function/trigger/list.js.map +1 -1
- package/dist/src/commands/halo/create.d.ts +13 -13
- package/dist/src/commands/halo/create.js +10 -12
- package/dist/src/commands/halo/create.js.map +1 -1
- package/dist/src/commands/halo/credential/add.d.ts +1 -1
- package/dist/src/commands/halo/credential/add.js +9 -11
- package/dist/src/commands/halo/credential/add.js.map +1 -1
- package/dist/src/commands/halo/credential/list.d.ts +12 -12
- package/dist/src/commands/halo/credential/list.js +15 -17
- package/dist/src/commands/halo/credential/list.js.map +1 -1
- package/dist/src/commands/halo/identity.js +5 -10
- package/dist/src/commands/halo/identity.js.map +1 -1
- package/dist/src/commands/halo/join.d.ts +14 -14
- package/dist/src/commands/halo/join.d.ts.map +1 -1
- package/dist/src/commands/halo/join.js +34 -37
- package/dist/src/commands/halo/join.js.map +1 -1
- package/dist/src/commands/halo/keys.js +3 -5
- package/dist/src/commands/halo/keys.js.map +1 -1
- package/dist/src/commands/halo/recovery/generate.js +3 -5
- package/dist/src/commands/halo/recovery/generate.js.map +1 -1
- package/dist/src/commands/halo/recovery/use.d.ts +11 -11
- package/dist/src/commands/halo/recovery/use.js +6 -8
- package/dist/src/commands/halo/recovery/use.js.map +1 -1
- package/dist/src/commands/halo/share.d.ts +15 -15
- package/dist/src/commands/halo/share.js +27 -32
- package/dist/src/commands/halo/share.js.map +1 -1
- package/dist/src/commands/halo/update.d.ts +11 -11
- package/dist/src/commands/halo/update.js +11 -16
- package/dist/src/commands/halo/update.js.map +1 -1
- package/dist/src/commands/info.d.ts +10 -10
- package/dist/src/commands/info.d.ts.map +1 -1
- package/dist/src/commands/info.js +8 -13
- package/dist/src/commands/info.js.map +1 -1
- package/dist/src/commands/profile/import.d.ts +12 -12
- package/dist/src/commands/profile/import.js +20 -48
- package/dist/src/commands/profile/import.js.map +1 -1
- package/dist/src/commands/profile/inspect.d.ts +12 -12
- package/dist/src/commands/profile/inspect.js +14 -39
- package/dist/src/commands/profile/inspect.js.map +1 -1
- package/dist/src/commands/reset/index.d.ts +12 -12
- package/dist/src/commands/reset/index.js +22 -27
- package/dist/src/commands/reset/index.js.map +1 -1
- package/dist/src/commands/shell/index.d.ts.map +1 -1
- package/dist/src/commands/shell/index.js +11 -12
- package/dist/src/commands/shell/index.js.map +1 -1
- package/dist/src/commands/space/close.d.ts +1 -1
- package/dist/src/commands/space/close.js +5 -7
- package/dist/src/commands/space/close.js.map +1 -1
- package/dist/src/commands/space/create.d.ts +1 -1
- package/dist/src/commands/space/create.js +9 -14
- package/dist/src/commands/space/create.js.map +1 -1
- package/dist/src/commands/space/epoch.d.ts +1 -1
- package/dist/src/commands/space/epoch.js +5 -7
- package/dist/src/commands/space/epoch.js.map +1 -1
- package/dist/src/commands/space/info.d.ts +1 -1
- package/dist/src/commands/space/info.js +5 -7
- package/dist/src/commands/space/info.js.map +1 -1
- package/dist/src/commands/space/join.d.ts +12 -12
- package/dist/src/commands/space/join.d.ts.map +1 -1
- package/dist/src/commands/space/join.js +22 -25
- package/dist/src/commands/space/join.js.map +1 -1
- package/dist/src/commands/space/list.d.ts +11 -11
- package/dist/src/commands/space/list.js +16 -18
- package/dist/src/commands/space/list.js.map +1 -1
- package/dist/src/commands/space/members.d.ts +11 -11
- package/dist/src/commands/space/members.js +9 -11
- package/dist/src/commands/space/members.js.map +1 -1
- package/dist/src/commands/space/open.d.ts +1 -1
- package/dist/src/commands/space/open.js +5 -7
- package/dist/src/commands/space/open.js.map +1 -1
- package/dist/src/commands/space/query.d.ts +12 -12
- package/dist/src/commands/space/query.js +15 -17
- package/dist/src/commands/space/query.js.map +1 -1
- package/dist/src/commands/space/schema/list.d.ts +12 -12
- package/dist/src/commands/space/schema/list.js +12 -14
- package/dist/src/commands/space/schema/list.js.map +1 -1
- package/dist/src/commands/space/share.d.ts +17 -17
- package/dist/src/commands/space/share.js +30 -35
- package/dist/src/commands/space/share.js.map +1 -1
- package/dist/src/commands/tunnel/index.d.ts +11 -11
- package/dist/src/commands/tunnel/index.js +16 -18
- package/dist/src/commands/tunnel/index.js.map +1 -1
- package/dist/src/commands/tunnel/list.d.ts +10 -10
- package/dist/src/commands/tunnel/list.js +8 -10
- package/dist/src/commands/tunnel/list.js.map +1 -1
- package/dist/src/commands/userfunction/upload.d.ts +15 -15
- package/dist/src/commands/userfunction/upload.js +29 -34
- package/dist/src/commands/userfunction/upload.js.map +1 -1
- package/dist/src/components/App.js +11 -18
- package/dist/src/components/App.js.map +1 -1
- package/dist/src/components/SpaceTable.js +8 -38
- package/dist/src/components/SpaceTable.js.map +1 -1
- package/dist/src/components/SystemTable.js +6 -36
- package/dist/src/components/SystemTable.js.map +1 -1
- package/dist/src/components/index.js +3 -19
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/help.js +8 -15
- package/dist/src/help.js.map +1 -1
- package/dist/src/hooks/command-not-found.js +4 -9
- package/dist/src/hooks/command-not-found.js.map +1 -1
- package/dist/src/index.js +2 -20
- package/dist/src/index.js.map +1 -1
- package/dist/src/util/index.js +4 -20
- package/dist/src/util/index.js.map +1 -1
- package/dist/src/util/provider/digital-ocean.js +11 -18
- package/dist/src/util/provider/digital-ocean.js.map +1 -1
- package/dist/src/util/provider/index.js +2 -18
- package/dist/src/util/provider/index.js.map +1 -1
- package/dist/src/util/provider/provider.js +7 -12
- package/dist/src/util/provider/provider.js.map +1 -1
- package/dist/src/util/publish/build.js +7 -14
- package/dist/src/util/publish/build.js.map +1 -1
- package/dist/src/util/publish/common.js +6 -34
- package/dist/src/util/publish/common.js.map +1 -1
- package/dist/src/util/publish/config.js +14 -21
- package/dist/src/util/publish/config.js.map +1 -1
- package/dist/src/util/publish/index.js +6 -22
- package/dist/src/util/publish/index.js.map +1 -1
- package/dist/src/util/publish/ipfs-upload.js +11 -18
- package/dist/src/util/publish/ipfs-upload.js.map +1 -1
- package/dist/src/util/publish/publish.js +20 -27
- package/dist/src/util/publish/publish.js.map +1 -1
- package/dist/src/util/publish/publisher-rpc-peer.js +16 -23
- package/dist/src/util/publish/publisher-rpc-peer.js.map +1 -1
- package/dist/src/util/supervisor/index.js +1 -17
- package/dist/src/util/supervisor/index.js.map +1 -1
- package/dist/src/util/supervisor/supervisor-rpc-peer.js +16 -23
- package/dist/src/util/supervisor/supervisor-rpc-peer.js.map +1 -1
- package/dist/src/util/tunnel/common.js +5 -10
- package/dist/src/util/tunnel/common.js.map +1 -1
- package/dist/src/util/tunnel/index.js +2 -18
- package/dist/src/util/tunnel/index.js.map +1 -1
- package/dist/src/util/tunnel/tunnel-rpc-peer.js +16 -23
- package/dist/src/util/tunnel/tunnel-rpc-peer.js.map +1 -1
- package/oclif.manifest.json +53 -53
- package/package.json +43 -41
- package/bin/dev +0 -22
- package/bin/dx +0 -8
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Query extends base_1.BaseCommand {
|
|
4
|
+
import { Flags, ux } from '@oclif/core';
|
|
5
|
+
import { table, TABLE_FLAGS } from '@dxos/cli-base';
|
|
6
|
+
import { ARG_SPACE_KEYS } from '@dxos/cli-base';
|
|
7
|
+
import { Filter } from '@dxos/client/echo';
|
|
8
|
+
import { getTypename } from '@dxos/echo-schema';
|
|
9
|
+
import { BaseCommand } from '../../base';
|
|
10
|
+
class Query extends BaseCommand {
|
|
13
11
|
async run() {
|
|
14
12
|
return await this.execWithClient(async ({ client }) => {
|
|
15
13
|
var _a;
|
|
16
14
|
const space = await this.getSpace(client, this.args.key);
|
|
17
|
-
const filter = ((_a = this.flags.typename) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
15
|
+
const filter = ((_a = this.flags.typename) === null || _a === void 0 ? void 0 : _a.length) ? Filter.typename(this.flags.typename) : undefined;
|
|
18
16
|
const { objects } = await space.db.query(filter).run();
|
|
19
17
|
this.log('Objects:', objects.length);
|
|
20
18
|
this._printObjects(objects, { extended: this.flags.extended });
|
|
@@ -22,12 +20,12 @@ class Query extends base_1.BaseCommand {
|
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
_printObjects(objects, flags = {}) {
|
|
25
|
-
|
|
23
|
+
ux.stdout(table(objects, {
|
|
26
24
|
id: {
|
|
27
25
|
truncate: true,
|
|
28
26
|
},
|
|
29
27
|
type: {
|
|
30
|
-
get: (row) =>
|
|
28
|
+
get: (row) => getTypename(row),
|
|
31
29
|
},
|
|
32
30
|
data: {
|
|
33
31
|
extended: true,
|
|
@@ -39,10 +37,10 @@ class Query extends base_1.BaseCommand {
|
|
|
39
37
|
Query.enableJsonFlag = true;
|
|
40
38
|
Query.description = 'Query database.';
|
|
41
39
|
Query.flags = {
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
typename:
|
|
40
|
+
...BaseCommand.flags,
|
|
41
|
+
...TABLE_FLAGS,
|
|
42
|
+
typename: Flags.string({ default: undefined, description: 'Filter objects by typename.' }),
|
|
45
43
|
};
|
|
46
|
-
Query.args =
|
|
47
|
-
|
|
44
|
+
Query.args = ARG_SPACE_KEYS;
|
|
45
|
+
export default Query;
|
|
48
46
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/space/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/space/query.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAqB,KAAM,SAAQ,WAAyB;IAY1D,KAAK,CAAC,GAAG;QACP,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;;YACpD,MAAM,KAA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CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;CAC3F,CAAC;AAEc,UAAI,GAAG,cAAc,CAAC;eAVnB,KAAK"}
|
|
@@ -2,19 +2,19 @@ import { BaseCommand } from '../../../base';
|
|
|
2
2
|
export default class List extends BaseCommand<typeof List> {
|
|
3
3
|
static enableJsonFlag: boolean;
|
|
4
4
|
static flags: {
|
|
5
|
-
typename: import("@oclif/core/
|
|
6
|
-
key: import("@oclif/core/
|
|
5
|
+
typename: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
key: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
extended: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
json: import("@oclif/core/
|
|
9
|
-
verbose: import("@oclif/core/
|
|
10
|
-
'dry-run': import("@oclif/core/
|
|
11
|
-
profile: import("@oclif/core/
|
|
12
|
-
config: import("@oclif/core/
|
|
13
|
-
timeout: import("@oclif/core/
|
|
14
|
-
target: import("@oclif/core/
|
|
15
|
-
agent: import("@oclif/core/
|
|
16
|
-
'json-log': import("@oclif/core/
|
|
17
|
-
'json-logfile': import("@oclif/core/
|
|
8
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
agent: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
'json-log': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'json-logfile': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
};
|
|
19
19
|
run(): Promise<any>;
|
|
20
20
|
}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2022 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
var _a;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const base_1 = require("../../../base");
|
|
5
|
+
import { Flags, ux } from '@oclif/core';
|
|
6
|
+
import { FLAG_SPACE_KEYS } from '@dxos/cli-base';
|
|
7
|
+
import { table, TABLE_FLAGS } from '@dxos/cli-base';
|
|
8
|
+
import { BaseCommand } from '../../../base';
|
|
11
9
|
// TODO(burdon): Option to output JSON schema.
|
|
12
|
-
class List extends
|
|
10
|
+
class List extends BaseCommand {
|
|
13
11
|
async run() {
|
|
14
12
|
const { key } = this.args;
|
|
15
13
|
return await this.execWithClient(async ({ client }) => {
|
|
16
14
|
const space = await this.getSpace(client, key);
|
|
17
15
|
const typenameFilter = createTypenameFilter(this.flags.typename);
|
|
18
|
-
const schemas = (await space.db.
|
|
16
|
+
const schemas = (await space.db.schemaRegistry.listAll()).filter(typenameFilter);
|
|
19
17
|
printSchema(schemas, this.flags);
|
|
20
18
|
});
|
|
21
19
|
}
|
|
@@ -26,12 +24,12 @@ List.enableJsonFlag = true;
|
|
|
26
24
|
_a.description = 'List schema.';
|
|
27
25
|
})();
|
|
28
26
|
List.flags = {
|
|
29
|
-
...
|
|
30
|
-
...
|
|
31
|
-
...
|
|
32
|
-
typename:
|
|
27
|
+
...BaseCommand.flags,
|
|
28
|
+
...TABLE_FLAGS,
|
|
29
|
+
...FLAG_SPACE_KEYS,
|
|
30
|
+
typename: Flags.string({ default: undefined, description: 'Filter objects by typename.' }),
|
|
33
31
|
};
|
|
34
|
-
|
|
32
|
+
export default List;
|
|
35
33
|
const createTypenameFilter = (typenameFilter) => {
|
|
36
34
|
if (!typenameFilter) {
|
|
37
35
|
return () => true;
|
|
@@ -40,7 +38,7 @@ const createTypenameFilter = (typenameFilter) => {
|
|
|
40
38
|
};
|
|
41
39
|
// TODO(burdon): Static vs. dynamic.
|
|
42
40
|
const printSchema = (schemas, flags = {}) => {
|
|
43
|
-
|
|
41
|
+
ux.stdout(table(schemas, {
|
|
44
42
|
id: {
|
|
45
43
|
truncate: true,
|
|
46
44
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/space/schema/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/space/schema/list.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAmB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,8CAA8C;AAE9C,MAAqB,IAAK,SAAQ,WAAwB;IAcxD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC1B,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC/C,MAAM,cAAc,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,QA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
|
3
3
|
static description: string;
|
|
4
4
|
static args: {
|
|
5
|
-
key: import("@oclif/core/
|
|
5
|
+
key: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
6
|
};
|
|
7
7
|
static flags: {
|
|
8
|
-
multiple: import("@oclif/core/
|
|
9
|
-
lifetime: import("@oclif/core/
|
|
10
|
-
persistent: import("@oclif/core/
|
|
11
|
-
open: import("@oclif/core/
|
|
12
|
-
host: import("@oclif/core/
|
|
13
|
-
auth: import("@oclif/core/
|
|
14
|
-
json: import("@oclif/core/
|
|
15
|
-
verbose: import("@oclif/core/
|
|
16
|
-
'dry-run': import("@oclif/core/
|
|
17
|
-
profile: import("@oclif/core/
|
|
18
|
-
config: import("@oclif/core/
|
|
19
|
-
timeout: import("@oclif/core/
|
|
20
|
-
target: import("@oclif/core/
|
|
21
|
-
agent: import("@oclif/core/
|
|
22
|
-
'json-log': import("@oclif/core/
|
|
23
|
-
'json-logfile': import("@oclif/core/
|
|
8
|
+
multiple: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
lifetime: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
persistent: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
open: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
host: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
auth: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
agent: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
'json-log': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
'json-logfile': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
24
|
};
|
|
25
25
|
run(): Promise<any>;
|
|
26
26
|
}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2022 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const invitations_1 = require("@dxos/client/invitations");
|
|
15
|
-
const services_1 = require("@dxos/protocols/proto/dxos/client/services");
|
|
16
|
-
const base_1 = require("../../base");
|
|
17
|
-
class Share extends base_1.BaseCommand {
|
|
4
|
+
import { Flags, ux } from '@oclif/core';
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import clipboard from 'node-clipboardy';
|
|
7
|
+
import { spawn } from 'node:child_process';
|
|
8
|
+
import { hostInvitation, ARG_SPACE_KEYS } from '@dxos/cli-base';
|
|
9
|
+
import { InvitationEncoder } from '@dxos/client/invitations';
|
|
10
|
+
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
|
+
import { BaseCommand } from '../../base';
|
|
12
|
+
class Share extends BaseCommand {
|
|
18
13
|
async run() {
|
|
19
14
|
const { key } = this.args;
|
|
20
15
|
return await this.execWithClient(async ({ client }) => {
|
|
21
16
|
const space = await this.getSpace(client, key);
|
|
22
|
-
const authMethod = this.flags.auth ?
|
|
17
|
+
const authMethod = this.flags.auth ? Invitation.AuthMethod.SHARED_SECRET : Invitation.AuthMethod.NONE;
|
|
23
18
|
const observable = space.share({
|
|
24
19
|
authMethod,
|
|
25
20
|
timeout: this.flags.timeout,
|
|
@@ -27,60 +22,60 @@ class Share extends base_1.BaseCommand {
|
|
|
27
22
|
lifetime: this.flags.lifetime,
|
|
28
23
|
multiUse: this.flags.multiple,
|
|
29
24
|
});
|
|
30
|
-
|
|
31
|
-
await
|
|
25
|
+
ux.action.start('Waiting for peer to connect');
|
|
26
|
+
await hostInvitation({
|
|
32
27
|
observable,
|
|
33
28
|
callbacks: {
|
|
34
29
|
onConnecting: async () => {
|
|
35
|
-
|
|
30
|
+
ux.action.stop();
|
|
36
31
|
const invitation = observable.get();
|
|
37
|
-
const invitationCode =
|
|
38
|
-
if (authMethod !==
|
|
39
|
-
|
|
40
|
-
this.log(
|
|
32
|
+
const invitationCode = InvitationEncoder.encode(invitation);
|
|
33
|
+
if (authMethod !== Invitation.AuthMethod.NONE) {
|
|
34
|
+
clipboard.write(invitation.authCode);
|
|
35
|
+
this.log(chalk `\n{red Secret}: ${observable.get().authCode} (copied to clipboard)\n`);
|
|
41
36
|
}
|
|
42
37
|
if (this.flags.open) {
|
|
43
38
|
const url = new URL(this.flags.host);
|
|
44
|
-
url.searchParams.append('spaceInvitationCode',
|
|
45
|
-
|
|
39
|
+
url.searchParams.append('spaceInvitationCode', InvitationEncoder.encode(invitation));
|
|
40
|
+
spawn('open', [url.toString()]);
|
|
46
41
|
}
|
|
47
42
|
else {
|
|
48
|
-
this.log(
|
|
43
|
+
this.log(chalk `\n{blue Invitation}: ${invitationCode}`);
|
|
49
44
|
}
|
|
50
45
|
},
|
|
51
46
|
},
|
|
52
47
|
});
|
|
53
|
-
|
|
48
|
+
ux.stdout(chalk `{green OK}`);
|
|
54
49
|
});
|
|
55
50
|
}
|
|
56
51
|
}
|
|
57
52
|
Share.description = 'Create space invitation.';
|
|
58
|
-
Share.args =
|
|
53
|
+
Share.args = ARG_SPACE_KEYS;
|
|
59
54
|
Share.flags = {
|
|
60
|
-
...
|
|
61
|
-
multiple:
|
|
55
|
+
...BaseCommand.flags,
|
|
56
|
+
multiple: Flags.boolean({
|
|
62
57
|
description: 'Multiple use.',
|
|
63
58
|
}),
|
|
64
|
-
lifetime:
|
|
59
|
+
lifetime: Flags.integer({
|
|
65
60
|
description: 'Lifetime of the invitation in seconds',
|
|
66
61
|
default: 86400,
|
|
67
62
|
}),
|
|
68
|
-
persistent:
|
|
63
|
+
persistent: Flags.boolean({
|
|
69
64
|
description: 'Invitation should resume if client restarts',
|
|
70
65
|
default: true,
|
|
71
66
|
}),
|
|
72
|
-
open:
|
|
67
|
+
open: Flags.boolean({
|
|
73
68
|
description: 'Open browser with invitation.',
|
|
74
69
|
}),
|
|
75
|
-
host:
|
|
70
|
+
host: Flags.string({
|
|
76
71
|
description: 'Application Host URL.',
|
|
77
72
|
default: 'https://composer.space',
|
|
78
73
|
}),
|
|
79
|
-
auth:
|
|
74
|
+
auth: Flags.boolean({
|
|
80
75
|
description: 'Skip authentication challenge.',
|
|
81
76
|
default: true,
|
|
82
77
|
allowNo: true,
|
|
83
78
|
}),
|
|
84
79
|
};
|
|
85
|
-
|
|
80
|
+
export default Share;
|
|
86
81
|
//# sourceMappingURL=share.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/commands/space/share.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/commands/space/share.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,cAA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EAAE,IAAI;KACd,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,+BAA+B;KAC7C,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,uBAAuB;QACpC,OAAO,EAAE,wBAAwB;KAClC,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd,CAAC;CACH,CAAC;eA5BiB,KAAK"}
|
|
@@ -4,18 +4,18 @@ import { BaseCommand } from '../../base';
|
|
|
4
4
|
*/
|
|
5
5
|
export default class Tunnel extends BaseCommand<typeof Tunnel> {
|
|
6
6
|
static flags: {
|
|
7
|
-
name: import("@oclif/core/
|
|
7
|
+
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
extended: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
json: import("@oclif/core/
|
|
10
|
-
verbose: import("@oclif/core/
|
|
11
|
-
'dry-run': import("@oclif/core/
|
|
12
|
-
profile: import("@oclif/core/
|
|
13
|
-
config: import("@oclif/core/
|
|
14
|
-
timeout: import("@oclif/core/
|
|
15
|
-
target: import("@oclif/core/
|
|
16
|
-
agent: import("@oclif/core/
|
|
17
|
-
'json-log': import("@oclif/core/
|
|
18
|
-
'json-logfile': import("@oclif/core/
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
agent: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'json-log': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'json-logfile': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
19
|
};
|
|
20
20
|
run(): Promise<any>;
|
|
21
21
|
}
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
var _a;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const util_2 = require("../../util");
|
|
5
|
+
import { Args, Flags } from '@oclif/core';
|
|
6
|
+
import { TABLE_FLAGS } from '@dxos/cli-base';
|
|
7
|
+
import { invariant } from '@dxos/invariant';
|
|
8
|
+
import { PublicKey } from '@dxos/keys';
|
|
9
|
+
import { humanize } from '@dxos/util';
|
|
10
|
+
import { BaseCommand } from '../../base';
|
|
11
|
+
import { printTunnels } from '../../util';
|
|
14
12
|
/**
|
|
15
13
|
* @deprecated
|
|
16
14
|
*/
|
|
17
|
-
class Tunnel extends
|
|
15
|
+
class Tunnel extends BaseCommand {
|
|
18
16
|
async run() {
|
|
19
17
|
return await this.execWithTunneling(async (tunnel) => {
|
|
20
18
|
const { command } = this.args;
|
|
21
19
|
const { name } = this.flags;
|
|
22
20
|
const response = await tunnel.rpc.tunnel({ name, enabled: command === 'start' });
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
invariant(response, 'Unable to set tunnel.');
|
|
22
|
+
printTunnels([response], this.flags);
|
|
25
23
|
});
|
|
26
24
|
}
|
|
27
25
|
}
|
|
@@ -31,18 +29,18 @@ _a = Tunnel;
|
|
|
31
29
|
_a.enableJsonFlag = true;
|
|
32
30
|
_a.description = 'Enable or disable tunnel (deprecated).';
|
|
33
31
|
_a.args = {
|
|
34
|
-
command:
|
|
32
|
+
command: Args.string({ description: 'Start.', values: ['start', 'stop'], required: true }),
|
|
35
33
|
};
|
|
36
34
|
})();
|
|
37
35
|
Tunnel.flags = {
|
|
38
|
-
...
|
|
39
|
-
...
|
|
40
|
-
name:
|
|
36
|
+
...BaseCommand.flags,
|
|
37
|
+
...TABLE_FLAGS,
|
|
38
|
+
name: Flags.string({
|
|
41
39
|
description: 'Tunnel name',
|
|
42
40
|
async default() {
|
|
43
|
-
return
|
|
41
|
+
return humanize(PublicKey.random());
|
|
44
42
|
},
|
|
45
43
|
}),
|
|
46
44
|
};
|
|
47
|
-
|
|
45
|
+
export default Tunnel;
|
|
48
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAsB,MAAM,YAAY,CAAC;AAE9D;;GAEG;AACH,MAAqB,MAAO,SAAQ,WAA0B;IAqB5D,KAAK,CAAC,GAAG;QACP,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAqB,EAAE,EAAE;YAClE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;YAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,EAAE,CAAC,CAAC;YACjF,SAAS,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC;YAC7C,YAAY,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,KAAY,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC;;;AA5BD;IACE,GAAK,KAAK,GAAG,YAAY,CAAC;IAC1B,GAAK,cAAc,GAAG,IAAI,CAAC;IAC3B,GAAK,WAAW,GAAG,wCAAwC,CAAC;IAC5D,GAAK,IAAI,GAAG;QACV,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC3F,CAAC;AACJ,CAAC,GAAA,CAAA;AAEe,YAAK,GAAG;IACtB,GAAG,WAAW,CAAC,KAAK;IACpB,GAAG,WAAW;IACd,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,aAAa;QAC1B,KAAK,CAAC,OAAO;YACX,OAAO,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;CACH,AAToB,CASnB;eAnBiB,MAAM"}
|
|
@@ -5,16 +5,16 @@ import { BaseCommand } from '../../base';
|
|
|
5
5
|
export default class List extends BaseCommand<typeof List> {
|
|
6
6
|
static flags: {
|
|
7
7
|
extended: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
json: import("@oclif/core/
|
|
9
|
-
verbose: import("@oclif/core/
|
|
10
|
-
'dry-run': import("@oclif/core/
|
|
11
|
-
profile: import("@oclif/core/
|
|
12
|
-
config: import("@oclif/core/
|
|
13
|
-
timeout: import("@oclif/core/
|
|
14
|
-
target: import("@oclif/core/
|
|
15
|
-
agent: import("@oclif/core/
|
|
16
|
-
'json-log': import("@oclif/core/
|
|
17
|
-
'json-logfile': import("@oclif/core/
|
|
8
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
agent: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
'json-log': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'json-logfile': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
};
|
|
19
19
|
run(): Promise<any>;
|
|
20
20
|
}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
var _a;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const util_1 = require("../../util");
|
|
5
|
+
import { TABLE_FLAGS } from '@dxos/cli-base';
|
|
6
|
+
import { BaseCommand } from '../../base';
|
|
7
|
+
import { printTunnels } from '../../util';
|
|
10
8
|
/**
|
|
11
9
|
* @deprecated
|
|
12
10
|
*/
|
|
13
|
-
class List extends
|
|
11
|
+
class List extends BaseCommand {
|
|
14
12
|
async run() {
|
|
15
13
|
return await this.execWithTunneling(async (tunnel) => {
|
|
16
14
|
const response = await tunnel.rpc.listTunnels();
|
|
17
15
|
if (response.tunnels) {
|
|
18
|
-
|
|
16
|
+
printTunnels(response.tunnels, this.flags);
|
|
19
17
|
}
|
|
20
18
|
});
|
|
21
19
|
}
|
|
@@ -27,8 +25,8 @@ _a = List;
|
|
|
27
25
|
_a.description = 'List tunnels.';
|
|
28
26
|
})();
|
|
29
27
|
List.flags = {
|
|
30
|
-
...
|
|
31
|
-
...
|
|
28
|
+
...BaseCommand.flags,
|
|
29
|
+
...TABLE_FLAGS,
|
|
32
30
|
};
|
|
33
|
-
|
|
31
|
+
export default List;
|
|
34
32
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/list.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAsB,MAAM,YAAY,CAAC;AAE9D;;GAEG;AACH,MAAqB,IAAK,SAAQ,WAAwB;IAYxD,KAAK,CAAC,GAAG;QACP,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAqB,EAAE,EAAE;YAClE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;YAChD,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACrB,YAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,KAAY,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;;AAlBD;IACE,GAAK,KAAK,GAAG,YAAY,CAAC;IAC1B,GAAK,cAAc,GAAG,IAAI,CAAC;IAC3B,GAAK,WAAW,GAAG,eAAe,CAAC;AACrC,CAAC,GAAA,CAAA;AAEe,UAAK,GAAG;IACtB,GAAG,WAAW,CAAC,KAAK;IACpB,GAAG,WAAW;CACf,AAHoB,CAGnB;eAViB,IAAI"}
|
|
@@ -3,23 +3,23 @@ export default class Upload extends BaseCommand<typeof Upload> {
|
|
|
3
3
|
static enableJsonFlag: boolean;
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
-
name: import("@oclif/core/
|
|
7
|
-
spaceKey: import("@oclif/core/
|
|
8
|
-
objectId: import("@oclif/core/
|
|
9
|
-
functionId: import("@oclif/core/
|
|
10
|
-
json: import("@oclif/core/
|
|
11
|
-
verbose: import("@oclif/core/
|
|
12
|
-
'dry-run': import("@oclif/core/
|
|
13
|
-
profile: import("@oclif/core/
|
|
14
|
-
config: import("@oclif/core/
|
|
15
|
-
timeout: import("@oclif/core/
|
|
16
|
-
target: import("@oclif/core/
|
|
17
|
-
agent: import("@oclif/core/
|
|
18
|
-
'json-log': import("@oclif/core/
|
|
19
|
-
'json-logfile': import("@oclif/core/
|
|
6
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
spaceKey: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
objectId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
functionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
agent: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'json-log': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
'json-logfile': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
20
|
};
|
|
21
21
|
static args: {
|
|
22
|
-
file: import("@oclif/core/
|
|
22
|
+
file: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
23
23
|
};
|
|
24
24
|
run(): Promise<any>;
|
|
25
25
|
}
|