@dxos/cli 0.1.17 → 0.1.19
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 +35 -11
- package/config/config-default.yml +22 -0
- package/config/config-local.yml +3 -1
- package/config/config-staging.yml +20 -0
- package/config/config.yml +2 -0
- package/dist/src/base-command.d.ts.map +1 -1
- package/dist/src/base-command.js +2 -2
- package/dist/src/base-command.js.map +1 -1
- package/dist/src/commands/app/create.d.ts +2 -0
- package/dist/src/commands/app/create.d.ts.map +1 -1
- package/dist/src/commands/app/create.js +57 -16
- package/dist/src/commands/app/create.js.map +1 -1
- package/dist/src/commands/app/publish.d.ts +1 -0
- package/dist/src/commands/app/publish.d.ts.map +1 -1
- package/dist/src/commands/app/publish.js +8 -6
- package/dist/src/commands/app/publish.js.map +1 -1
- package/dist/src/commands/kube/deploy.d.ts +14 -0
- package/dist/src/commands/kube/deploy.d.ts.map +1 -0
- package/dist/src/commands/kube/deploy.js +62 -0
- package/dist/src/commands/kube/deploy.js.map +1 -0
- package/dist/src/util/provider/digital-ocean.d.ts +14 -0
- package/dist/src/util/provider/digital-ocean.d.ts.map +1 -0
- package/dist/src/util/provider/digital-ocean.js +126 -0
- package/dist/src/util/provider/digital-ocean.js.map +1 -0
- package/dist/src/util/provider/index.d.ts +3 -0
- package/dist/src/util/provider/index.d.ts.map +1 -0
- package/dist/src/util/provider/index.js +22 -0
- package/dist/src/util/provider/index.js.map +1 -0
- package/dist/src/util/provider/provider.d.ts +26 -0
- package/dist/src/util/provider/provider.d.ts.map +1 -0
- package/dist/src/util/provider/provider.js +30 -0
- package/dist/src/util/provider/provider.js.map +1 -0
- package/dist/src/util/publish/build.js +3 -3
- package/dist/src/util/publish/build.js.map +1 -1
- package/dist/src/util/publish/publish.d.ts +3 -2
- package/dist/src/util/publish/publish.d.ts.map +1 -1
- package/dist/src/util/publish/publish.js +3 -3
- package/dist/src/util/publish/publish.js.map +1 -1
- package/dist/src/util/telemetryrc.json +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +16 -14
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ $ npm install -g @dxos/cli
|
|
|
27
27
|
$ dx COMMAND
|
|
28
28
|
running command...
|
|
29
29
|
$ dx (--version)
|
|
30
|
-
@dxos/cli/0.1.
|
|
30
|
+
@dxos/cli/0.1.19 linux-x64 node-v18.12.1
|
|
31
31
|
$ dx --help [COMMAND]
|
|
32
32
|
USAGE
|
|
33
33
|
$ dx COMMAND
|
|
@@ -46,6 +46,7 @@ USAGE
|
|
|
46
46
|
* [`dx halo create [DISPLAYNAME]`](#dx-halo-create-displayname)
|
|
47
47
|
* [`dx halo recover [SEEDPHRASE]`](#dx-halo-recover-seedphrase)
|
|
48
48
|
* [`dx help [COMMAND]`](#dx-help-command)
|
|
49
|
+
* [`dx kube deploy`](#dx-kube-deploy)
|
|
49
50
|
* [`dx plugins`](#dx-plugins)
|
|
50
51
|
* [`dx plugins:install PLUGIN...`](#dx-pluginsinstall-plugin)
|
|
51
52
|
* [`dx plugins:inspect PLUGIN...`](#dx-pluginsinspect-plugin)
|
|
@@ -70,14 +71,15 @@ Create a DXOS project.
|
|
|
70
71
|
|
|
71
72
|
```
|
|
72
73
|
USAGE
|
|
73
|
-
$ dx app create [NAME] [--config <value>] [--timeout <value>] [--tag <value>] [-t hello|bare]
|
|
74
|
+
$ dx app create [NAME] [--config <value>] [--timeout <value>] [--tag <value>] [-t hello|bare|tasks] [-i]
|
|
74
75
|
|
|
75
76
|
ARGUMENTS
|
|
76
77
|
NAME Name of the project
|
|
77
78
|
|
|
78
79
|
FLAGS
|
|
80
|
+
-i, --interactive Customize app template options via interactive prompt
|
|
79
81
|
-t, --template=<option> [default: hello] Template to use when creating the project.
|
|
80
|
-
<options: hello|bare>
|
|
82
|
+
<options: hello|bare|tasks>
|
|
81
83
|
--config=<value> Specify config file
|
|
82
84
|
--tag=<value> Git tag or branch of the DXOS repo to checkout.
|
|
83
85
|
--timeout=<value> [default: 30] Timeout in seconds
|
|
@@ -111,16 +113,17 @@ Publish apps.
|
|
|
111
113
|
|
|
112
114
|
```
|
|
113
115
|
USAGE
|
|
114
|
-
$ dx app publish [--config <value>] [--timeout <value>] [--configPath <value>] [--
|
|
115
|
-
[--version <value>]
|
|
116
|
+
$ dx app publish [--config <value>] [--timeout <value>] [--configPath <value>] [--accessToken <value>]
|
|
117
|
+
[--skipExisting] [--verbose] [--version <value>]
|
|
116
118
|
|
|
117
119
|
FLAGS
|
|
118
|
-
--
|
|
119
|
-
--
|
|
120
|
-
--
|
|
121
|
-
--
|
|
122
|
-
--
|
|
123
|
-
--
|
|
120
|
+
--accessToken=<value> Access token for publishing
|
|
121
|
+
--config=<value> Specify config file
|
|
122
|
+
--configPath=<value> Path to dx.yml
|
|
123
|
+
--skipExisting Do not update content on KUBE if version already exists
|
|
124
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
125
|
+
--verbose Verbose output
|
|
126
|
+
--version=<value> Version of modules to publish
|
|
124
127
|
|
|
125
128
|
DESCRIPTION
|
|
126
129
|
Publish apps.
|
|
@@ -222,6 +225,27 @@ DESCRIPTION
|
|
|
222
225
|
|
|
223
226
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.15/src/commands/help.ts)_
|
|
224
227
|
|
|
228
|
+
## `dx kube deploy`
|
|
229
|
+
|
|
230
|
+
Deploy KUBE.
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
USAGE
|
|
234
|
+
$ dx kube deploy --hostname <value> [--config <value>] [--timeout <value>] [--provider <value>] [--accessToken
|
|
235
|
+
<value>] [--dev]
|
|
236
|
+
|
|
237
|
+
FLAGS
|
|
238
|
+
--accessToken=<value> Access token for seeding admin identity
|
|
239
|
+
--config=<value> Specify config file
|
|
240
|
+
--dev Deploy latest version from dev channel
|
|
241
|
+
--hostname=<value> (required) Hostname
|
|
242
|
+
--provider=<value> [default: digitalocean] Cloud Provider
|
|
243
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
244
|
+
|
|
245
|
+
DESCRIPTION
|
|
246
|
+
Deploy KUBE.
|
|
247
|
+
```
|
|
248
|
+
|
|
225
249
|
## `dx plugins`
|
|
226
250
|
|
|
227
251
|
List installed plugins.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
|
|
3
|
+
runtime:
|
|
4
|
+
client:
|
|
5
|
+
storage:
|
|
6
|
+
persistent: true
|
|
7
|
+
path: '/tmp/dx/cli'
|
|
8
|
+
|
|
9
|
+
services:
|
|
10
|
+
ipfs:
|
|
11
|
+
server: "http://kube.dxos.org:5001/"
|
|
12
|
+
gateway: "http://kube.dxos.org:8888/ipfs"
|
|
13
|
+
signal:
|
|
14
|
+
server: 'wss://kube.dxos.org/.well-known/dx/signal'
|
|
15
|
+
ice:
|
|
16
|
+
- urls: 'turn:kube.dxos.org:3478'
|
|
17
|
+
username: 'dxos'
|
|
18
|
+
credential: 'dxos'
|
|
19
|
+
publisher:
|
|
20
|
+
server: ws://127.0.0.1/.well-known/dx/deploy
|
|
21
|
+
machine:
|
|
22
|
+
doAccessToken: ''
|
package/config/config-local.yml
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
|
|
3
|
+
runtime:
|
|
4
|
+
client:
|
|
5
|
+
storage:
|
|
6
|
+
persistent: true
|
|
7
|
+
path: '/tmp/dx/cli'
|
|
8
|
+
|
|
9
|
+
services:
|
|
10
|
+
ipfs:
|
|
11
|
+
server: "http://staging.kube.dxos.org:5001/"
|
|
12
|
+
gateway: "http://staging.kube.dxos.org:8888/ipfs"
|
|
13
|
+
signal:
|
|
14
|
+
server: 'wss://staging.kube.dxos.org/.well-known/dx/signal'
|
|
15
|
+
ice:
|
|
16
|
+
- urls: 'turn:staging.kube.dxos.org:3478'
|
|
17
|
+
username: 'dxos'
|
|
18
|
+
credential: 'dxos'
|
|
19
|
+
publisher:
|
|
20
|
+
server: 'wss://staging.kube.dxos.org/.well-known/dx/deploy'
|
package/config/config.yml
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAS,MAAM,aAAa,CAAC;AASpE,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAS,MAAM,aAAa,CAAC;AASpE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAY,MAAM,cAAc,CAAC;AAMxD,OAAO,EAIL,gBAAgB,EAEhB,gBAAgB,EAEjB,MAAM,QAAQ,CAAC;AAkBhB,8BAAsB,WAAY,SAAQ,OAAO;IAC/C,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,SAAS,CAAC,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;IAE/C,OAAgB,KAAK;;;MAWnB;gBAEU,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW;IAM/C,KAAK,EAAE,GAAG,CAAC;IAEX,IAAI,YAAY,uBAEf;IAED,EAAE;IAIF;;OAEG;IACY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAsErB,KAAK,CAAC,GAAG,EAAE,KAAK;IAOhB,OAAO;IActB;;OAEG;IACG,SAAS;IAYf;;OAEG;IACG,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAkBrG;;OAEG;IACG,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAyB/G,qBAAqB,CAAC,MAAM,EAAE,MAAM;CAUrC"}
|
package/dist/src/base-command.js
CHANGED
|
@@ -121,7 +121,7 @@ class BaseCommand extends core_1.Command {
|
|
|
121
121
|
const { flags } = await this.parse(this.constructor);
|
|
122
122
|
const { config: configFile } = flags;
|
|
123
123
|
const configExists = await exists(configFile);
|
|
124
|
-
const configContent = await (0, promises_1.readFile)(configExists ? configFile : (0, node_path_1.join)(__dirname, '../../config/config.yml'), 'utf-8');
|
|
124
|
+
const configContent = await (0, promises_1.readFile)(configExists ? configFile : (0, node_path_1.join)(__dirname, '../../config/config-default.yml'), 'utf-8');
|
|
125
125
|
if (!configExists) {
|
|
126
126
|
void (0, promises_1.writeFile)(configFile, configContent, 'utf-8');
|
|
127
127
|
}
|
|
@@ -160,7 +160,7 @@ class BaseCommand extends core_1.Command {
|
|
|
160
160
|
(0, node_assert_1.default)(this._clientConfig);
|
|
161
161
|
if (!this._client) {
|
|
162
162
|
(0, log_1.log)('Creating client...', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 182, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
163
|
-
this._client = new client_1.Client({ config: this._clientConfig });
|
|
163
|
+
this._client = new client_1.Client({ config: this._clientConfig, services: (0, client_1.fromHost)(this._clientConfig) });
|
|
164
164
|
await this._client.initialize();
|
|
165
165
|
(0, log_1.log)('Initialized', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 185, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
166
166
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,sCAAoE;AACpE,kDAA0B;AAC1B,sDAA2B;AAC3B,4DAA+B;AAC/B,8DAAiC;AACjC,+CAA6D;AAC7D,yCAAiC;AAEjC,uCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,sCAAoE;AACpE,kDAA0B;AAC1B,sDAA2B;AAC3B,4DAA+B;AAC/B,8DAAiC;AACjC,+CAA6D;AAC7D,yCAAiC;AAEjC,uCAAoC;AACpC,yCAAwD;AACxD,mCAAgC;AAChC,qDAAuC;AACvC,yCAAgD;AAChD,2DAA6C;AAE7C,iCAQgB;AAEhB,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,gCAAgC;AAChC,MAAM,MAAM,GAAG,KAAK,EAAE,GAAG,IAAc,EAAoB,EAAE;IAC3D,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,eAAI,EAAC,IAAA,gBAAI,EAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,CAAC,MAAM,CAAC;KACjB;IAAC,OAAO,GAAQ,EAAE;QACjB,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YAC9B,OAAO,KAAK,CAAC;SACd;aAAM;YACL,MAAM,GAAG,CAAC;SACX;KACF;AACH,CAAC,CAAC;AAEF,MAAsB,WAAY,SAAQ,cAAO;IAoB/C,YAAY,IAAc,EAAE,MAAmB;QAC7C,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAjBd,aAAQ,GAAG,KAAK,CAAC;QAmBvB,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AC,CAAC,CAAC;YAElH,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;YAElC,OAAO,KAAK,CAAC;SACd;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACjB;gBAAS;YACR,IAAI,GAAG,EAAE;gBACP,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;aACnB;SACF;IACH,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC3B,OAAO;SACR;QAED,IAAI,CAAC,iBAAiB,GAAG;YACvB,GAAG,IAAI,CAAC,iBAAiB;YACzB,GAAG,MAAM;SACV,CAAC;IACJ,CAAC;;AA3MH,kCA4MC;;AArMiB,iBAAK,GAAG;IACtB,MAAM,EAAE,YAAK,CAAC,MAAM,CAAC;QACnB,GAAG,EAAE,aAAa;QAClB,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,KAAK,EAAE,OAAY,EAAE,EAAE,CAAC,IAAA,gBAAI,EAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC;KAC9E,CAAC;IAEF,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,EAAE;KACZ,CAAC;CACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export declare const APP_TEMPLATES: string[];
|
|
2
3
|
export default class Create extends BaseCommand {
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
@@ -9,6 +10,7 @@ export default class Create extends BaseCommand {
|
|
|
9
10
|
static flags: {
|
|
10
11
|
tag: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
12
|
template: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
13
|
+
interactive: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
14
|
config: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
13
15
|
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
14
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/commands/app/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/commands/app/create.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,aAAa,UAA6B,CAAC;AAYxD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW;IAC7C,OAAgB,WAAW,SAA4B;IAEvD,OAAgB,IAAI;;;;QAMlB;IAEF,OAAgB,KAAK;;;;;;MAgBnB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAkF1B"}
|
|
@@ -2,53 +2,89 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2022 DXOS.org
|
|
4
4
|
//
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.APP_TEMPLATES = void 0;
|
|
6
10
|
const core_1 = require("@oclif/core");
|
|
11
|
+
const fs_1 = require("fs");
|
|
7
12
|
const node_child_process_1 = require("node:child_process");
|
|
8
13
|
const promises_1 = require("node:fs/promises");
|
|
9
14
|
const node_util_1 = require("node:util");
|
|
10
15
|
const process_1 = require("process");
|
|
16
|
+
const tempy_1 = __importDefault(require("tempy"));
|
|
11
17
|
const plate_1 = require("@dxos/plate");
|
|
12
18
|
const base_command_1 = require("../../base-command");
|
|
19
|
+
exports.APP_TEMPLATES = ['hello', 'bare', 'tasks'];
|
|
20
|
+
// TODO: factor this out into @dxos/fs or something (along with 'exists' from plate?)
|
|
21
|
+
const isDirEmpty = async (dirpath) => {
|
|
22
|
+
const dirIter = await fs_1.promises.opendir(dirpath);
|
|
23
|
+
const { done } = await dirIter[Symbol.asyncIterator]().next();
|
|
24
|
+
if (!done) {
|
|
25
|
+
await dirIter.close();
|
|
26
|
+
}
|
|
27
|
+
return !!done;
|
|
28
|
+
};
|
|
13
29
|
class Create extends base_command_1.BaseCommand {
|
|
14
30
|
async run() {
|
|
15
31
|
const { args, flags } = await this.parse(Create);
|
|
16
32
|
const { name } = args;
|
|
17
|
-
const { tag = `v${this.config.version}`, template } = flags;
|
|
18
|
-
|
|
19
|
-
const tmpDirectory = `/tmp/dxos-app-create-${Date.now()}`;
|
|
33
|
+
const { tag = `v${this.config.version}`, template, interactive } = flags;
|
|
34
|
+
const tmpDirectory = tempy_1.default.directory({ prefix: `dxos-app-create-${name}` });
|
|
20
35
|
const templateDirectory = `${tmpDirectory}/packages/apps/templates/${template}-template`;
|
|
21
36
|
const outputDirectory = `${(0, process_1.cwd)()}/${name}`;
|
|
37
|
+
const outputDirExists = await (0, plate_1.exists)(outputDirectory);
|
|
38
|
+
const isOutputEmpty = outputDirExists && (await isDirEmpty(outputDirectory));
|
|
39
|
+
if (outputDirExists && !isOutputEmpty) {
|
|
40
|
+
this.error(`Output directory ${outputDirectory} is not empty`, { exit: 1 });
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
await (0, node_util_1.promisify)(node_child_process_1.exec)('which pnpm');
|
|
44
|
+
}
|
|
45
|
+
catch (_a) {
|
|
46
|
+
this.error('pnpm not found. Please run "npm i -g pnpm" first.', { exit: 1 });
|
|
47
|
+
}
|
|
22
48
|
try {
|
|
23
49
|
this.log('Cloning template from Github...');
|
|
24
50
|
await (0, node_util_1.promisify)(node_child_process_1.exec)(`
|
|
25
51
|
git clone --filter=blob:none --no-checkout git@github.com:dxos/dxos.git ${tmpDirectory} &&
|
|
26
52
|
cd ${tmpDirectory} &&
|
|
27
|
-
git sparse-checkout set --cone tsconfig.json patches packages/apps/templates/${template}-template &&
|
|
28
|
-
git checkout ${tag}
|
|
53
|
+
git sparse-checkout set --cone tsconfig.json patches ${template !== 'bare' ? 'packages/apps/templates/bare-template ' : ''}packages/apps/templates/${template}-template &&
|
|
54
|
+
git checkout ${tag} && mkdir node_modules && pnpm link ${require
|
|
55
|
+
.resolve('@dxos/plate')
|
|
56
|
+
.slice(0, -'/dist/lib/node/index.cjs'.length)}
|
|
29
57
|
`);
|
|
30
|
-
this.log('Preparing template...');
|
|
58
|
+
// this.log('Preparing template...');
|
|
31
59
|
// Copy vite patch.
|
|
32
|
-
await
|
|
33
|
-
await
|
|
34
|
-
// Remove unneccessary files.
|
|
35
|
-
await (0, promises_1.rm)(`${templateDirectory}/project.json`);
|
|
36
|
-
await (0, promises_1.rm)(`${templateDirectory}/tsconfig.plate.json`);
|
|
60
|
+
// await mkdir(`${templateDirectory}/patches`);
|
|
61
|
+
// await copyFile(`${tmpDirectory}/patches/vite@3.0.9.patch`, `${templateDirectory}/patches/vite@3.0.9.patch`);
|
|
37
62
|
this.log('Creating app...');
|
|
38
63
|
// TS templating.
|
|
39
64
|
const result = await (0, plate_1.executeDirectoryTemplate)({
|
|
40
65
|
templateDirectory,
|
|
41
66
|
outputDirectory,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
67
|
+
interactive,
|
|
68
|
+
input: interactive
|
|
69
|
+
? {
|
|
70
|
+
monorepo: false,
|
|
71
|
+
name
|
|
72
|
+
}
|
|
73
|
+
: {
|
|
74
|
+
monorepo: false,
|
|
75
|
+
name,
|
|
76
|
+
react: true,
|
|
77
|
+
dxosUi: true,
|
|
78
|
+
storybook: false,
|
|
79
|
+
pwa: true
|
|
80
|
+
}
|
|
46
81
|
});
|
|
47
82
|
await Promise.all(result.map((file) => file.save()));
|
|
48
83
|
this.log(`App created. To get started run the following commands:\n\n cd ${name}\n pnpm install\n pnpm serve`);
|
|
49
84
|
}
|
|
50
85
|
catch (err) {
|
|
51
86
|
this.log(`Unable to create: ${err.message}`);
|
|
87
|
+
this.log(err === null || err === void 0 ? void 0 : err.stack);
|
|
52
88
|
this.error(err, { exit: 1 });
|
|
53
89
|
}
|
|
54
90
|
finally {
|
|
@@ -74,7 +110,12 @@ Create.flags = {
|
|
|
74
110
|
char: 't',
|
|
75
111
|
description: 'Template to use when creating the project.',
|
|
76
112
|
default: 'hello',
|
|
77
|
-
options:
|
|
113
|
+
options: exports.APP_TEMPLATES
|
|
114
|
+
}),
|
|
115
|
+
interactive: core_1.Flags.boolean({
|
|
116
|
+
char: 'i',
|
|
117
|
+
description: 'Customize app template options via interactive prompt',
|
|
118
|
+
default: false
|
|
78
119
|
})
|
|
79
120
|
};
|
|
80
121
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/app/create.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/app/create.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,sCAAoC;AACpC,2BAAoC;AACpC,2DAA0C;AAC1C,+CAAsC;AACtC,yCAAsC;AACtC,qCAA8B;AAC9B,kDAA0B;AAE1B,uCAA+D;AAE/D,qDAAiD;AAEpC,QAAA,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD,qFAAqF;AACrF,MAAM,UAAU,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IAC3C,MAAM,OAAO,GAAG,MAAM,aAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,EA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AC;YACrB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;SAC9B;gBAAS;YACR,MAAM,IAAA,aAAE,EAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;SAC1D;IACH,CAAC;;AA9GH,yBA+GC;AA9GiB,kBAAW,GAAG,wBAAwB,CAAC;AAEvC,WAAI,GAAG;IACrB;QACE,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,qBAAqB;KACnC;CACF,CAAC;AAEc,YAAK,GAAG;IACtB,GAAG,0BAAW,CAAC,KAAK;IACpB,GAAG,EAAE,YAAK,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,iDAAiD;KAC/D,CAAC;IACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,qBAAa;KACvB,CAAC;IACF,WAAW,EAAE,YAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAC"}
|
|
@@ -3,6 +3,7 @@ export default class Publish extends BaseCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
configPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
accessToken: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
7
|
skipExisting: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
8
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/commands/app/publish.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW;IAC9C,OAAgB,WAAW,SAAmB;IAC9C,OAAgB,KAAK
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/commands/app/publish.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW;IAC9C,OAAgB,WAAW,SAAmB;IAC9C,OAAgB,KAAK;;;;;;;;MAmBnB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAgD1B"}
|
|
@@ -15,14 +15,13 @@ class Publish extends base_command_1.BaseCommand {
|
|
|
15
15
|
async run() {
|
|
16
16
|
var _a, _b;
|
|
17
17
|
const { flags } = await this.parse(Publish);
|
|
18
|
-
const { configPath, skipExisting, verbose, version } = flags;
|
|
18
|
+
const { accessToken, configPath, skipExisting, verbose, version } = flags;
|
|
19
19
|
try {
|
|
20
20
|
const moduleConfig = await (0, util_1.loadConfig)(configPath);
|
|
21
21
|
(0, node_assert_1.default)(moduleConfig.values.package, 'Missing package definition in dx.yml');
|
|
22
22
|
for (const module of (_a = moduleConfig.values.package.modules) !== null && _a !== void 0 ? _a : []) {
|
|
23
|
-
this.log(`Building module ${module.name}...`);
|
|
24
23
|
await (0, util_1.build)({ verbose }, { log: (...args) => this.log(...args), module });
|
|
25
|
-
const cid = await (0, util_1.publish)({ verbose }, { module, config: this.clientConfig });
|
|
24
|
+
const cid = await (0, util_1.publish)({ verbose }, { log: (...args) => this.log(...args), module, config: this.clientConfig });
|
|
26
25
|
module.bundle = cid.bytes;
|
|
27
26
|
if (version) {
|
|
28
27
|
module.build = { ...module.build, version };
|
|
@@ -36,12 +35,12 @@ class Publish extends base_command_1.BaseCommand {
|
|
|
36
35
|
var _a;
|
|
37
36
|
const result = await publisher.rpc.publish({
|
|
38
37
|
package: moduleConfig.values.package,
|
|
39
|
-
skipExisting
|
|
38
|
+
skipExisting,
|
|
39
|
+
accessToken
|
|
40
40
|
});
|
|
41
41
|
(_a = result === null || result === void 0 ? void 0 : result.modules) === null || _a === void 0 ? void 0 : _a.forEach(({ module, urls }) => {
|
|
42
|
-
(urls === null || urls === void 0 ? void 0 : urls.length) && this.log(`Module ${module.name} published to ${urls.join(', ')}
|
|
42
|
+
(urls === null || urls === void 0 ? void 0 : urls.length) && this.log(`Module ${module.name} published to ${urls.join(', ')}.`);
|
|
43
43
|
});
|
|
44
|
-
this.log('Published to KUBE.');
|
|
45
44
|
});
|
|
46
45
|
}
|
|
47
46
|
catch (err) {
|
|
@@ -58,6 +57,9 @@ Publish.flags = {
|
|
|
58
57
|
configPath: core_1.Flags.string({
|
|
59
58
|
description: 'Path to dx.yml'
|
|
60
59
|
}),
|
|
60
|
+
accessToken: core_1.Flags.string({
|
|
61
|
+
description: 'Access token for publishing'
|
|
62
|
+
}),
|
|
61
63
|
skipExisting: core_1.Flags.boolean({
|
|
62
64
|
description: 'Do not update content on KUBE if version already exists',
|
|
63
65
|
default: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/commands/app/publish.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAoC;AACpC,8DAAiC;AAEjC,yCAAgD;AAEhD,qDAAiD;AACjD,qCAA0E;AAE1E,MAAqB,OAAQ,SAAQ,0BAAW;
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/commands/app/publish.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAoC;AACpC,8DAAiC;AAEjC,yCAAgD;AAEhD,qDAAiD;AACjD,qCAA0E;AAE1E,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gBAAgB;KAC9B,CAAC;IACF,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC;QACxB,WAAW,EAAE,6BAA6B;KAC3C,CAAC;IACF,YAAY,EAAE,YAAK,CAAC,OAAO,CAAC;QAC1B,WAAW,EAAE,yDAAyD;QACtE,OAAO,EAAE,KAAK;KACf,CAAC;IACF,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,KAAK;KACf,CAAC;IACF,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC;QACpB,WAAW,EAAE,+BAA+B;KAC7C,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class Deploy extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
hostname: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
provider: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
accessToken: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
dev: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
config: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
10
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/commands/kube/deploy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW;IAC7C,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,KAAK;;;;;;;MAiBnB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAiC1B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const base_command_1 = require("../../base-command");
|
|
8
|
+
const provider_1 = require("../../util/provider");
|
|
9
|
+
class Deploy extends base_command_1.BaseCommand {
|
|
10
|
+
async run() {
|
|
11
|
+
const { flags } = await this.parse(Deploy);
|
|
12
|
+
const { hostname, provider: providerName, dev, accessToken } = flags;
|
|
13
|
+
try {
|
|
14
|
+
return await this.execWithClient(async (client) => {
|
|
15
|
+
if (!client.halo.profile) {
|
|
16
|
+
throw new Error('Halo profile should be initialized first.');
|
|
17
|
+
}
|
|
18
|
+
// TODO(egorgripasov): HALO <-> KUBE integration.
|
|
19
|
+
let provider;
|
|
20
|
+
switch (providerName) {
|
|
21
|
+
case provider_1.DEFAULT_PROVIDER: {
|
|
22
|
+
provider = new provider_1.DigitalOceanProvider(this.clientConfig);
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
default: {
|
|
26
|
+
throw new Error(`Unknown provider: ${providerName}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const kube = await provider.deploy({
|
|
30
|
+
hostname,
|
|
31
|
+
dev,
|
|
32
|
+
accessToken
|
|
33
|
+
});
|
|
34
|
+
(0, provider_1.printKubes)([kube]);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
this.error(err, { exit: 1 });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = Deploy;
|
|
43
|
+
Deploy.description = 'Deploy KUBE.';
|
|
44
|
+
Deploy.flags = {
|
|
45
|
+
...base_command_1.BaseCommand.flags,
|
|
46
|
+
hostname: core_1.Flags.string({
|
|
47
|
+
description: 'Hostname',
|
|
48
|
+
required: true
|
|
49
|
+
}),
|
|
50
|
+
provider: core_1.Flags.string({
|
|
51
|
+
description: 'Cloud Provider',
|
|
52
|
+
default: provider_1.DEFAULT_PROVIDER
|
|
53
|
+
}),
|
|
54
|
+
accessToken: core_1.Flags.string({
|
|
55
|
+
description: 'Access token for seeding admin identity'
|
|
56
|
+
}),
|
|
57
|
+
dev: core_1.Flags.boolean({
|
|
58
|
+
description: 'Deploy latest version from dev channel',
|
|
59
|
+
default: false
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../../src/commands/kube/deploy.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,sCAAoC;AAIpC,qDAAiD;AACjD,kDAA4G;AAE5G,MAAqB,MAAO,SAAQ,0BAAW;IAqB7C,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;QAErE,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;gBACxD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE;oBACxB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;iBAC9D;gBACD,iDAAiD;gBACjD,IAAI,QAA2B,CAAC;gBAChC,QAAQ,YAAY,EAAE;oBACpB,KAAK,2BAAgB,CAAC,CAAC;wBACrB,QAAQ,GAAG,IAAI,+BAAoB,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;wBACxD,MAAM;qBACP;oBACD,OAAO,CAAC,CAAC;wBACP,MAAM,IAAI,KAAK,CAAC,qBAAqB,YAAY,EAAE,CAAC,CAAC;qBACtD;iBACF;gBAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;oBACjC,QAAQ;oBACR,GAAG;oBACH,WAAW;iBACZ,CAAC,CAAC;gBAEH,IAAA,qBAAU,EAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;SACJ;QAAC,OAAO,GAAQ,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;SAC9B;IACH,CAAC;;AArDH,yBAsDC;AArDiB,kBAAW,GAAG,cAAc,CAAC;AAC7B,YAAK,GAAG;IACtB,GAAG,0BAAW,CAAC,KAAK;IACpB,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,UAAU;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,2BAAgB;KAC1B,CAAC;IACF,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC;QACxB,WAAW,EAAE,yCAAyC;KACvD,CAAC;IACF,GAAG,EAAE,YAAK,CAAC,OAAO,CAAC;QACjB,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Config } from '@dxos/client';
|
|
2
|
+
import { KubeDeployOptions, MachineryProvider } from './provider';
|
|
3
|
+
export declare class DigitalOceanProvider implements MachineryProvider {
|
|
4
|
+
private _session;
|
|
5
|
+
constructor(config: Config);
|
|
6
|
+
getDropletIdFromName(name: string): Promise<any>;
|
|
7
|
+
getSshKeys(): Promise<any>;
|
|
8
|
+
deploy(options: KubeDeployOptions): Promise<{
|
|
9
|
+
hostname: any;
|
|
10
|
+
createdAt: any;
|
|
11
|
+
ipAddress: any;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=digital-ocean.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digital-ocean.d.ts","sourceRoot":"","sources":["../../../../src/util/provider/digital-ocean.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAY,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK5E,qBAAa,oBAAqB,YAAW,iBAAiB;IAC5D,OAAO,CAAC,QAAQ,CAAM;gBAEV,MAAM,EAAE,MAAM;IAOpB,oBAAoB,CAAC,IAAI,EAAE,MAAM;IAQjC,UAAU;IAKV,MAAM,CAAC,OAAO,EAAE,iBAAiB;;;;;CA0GxC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DigitalOceanProvider = void 0;
|
|
10
|
+
const assert_1 = __importDefault(require("assert"));
|
|
11
|
+
const do_wrapper_1 = __importDefault(require("do-wrapper"));
|
|
12
|
+
const async_1 = require("@dxos/async");
|
|
13
|
+
const provider_1 = require("./provider");
|
|
14
|
+
const DEFAULT_REGION = 'nyc3';
|
|
15
|
+
const DEFAULT_MEMORY = 4;
|
|
16
|
+
class DigitalOceanProvider {
|
|
17
|
+
constructor(config) {
|
|
18
|
+
const doAccessToken = config.get('runtime.services.machine.doAccessToken');
|
|
19
|
+
(0, assert_1.default)(doAccessToken, 'Invalid DigitalOcean Access Token.');
|
|
20
|
+
this._session = new do_wrapper_1.default(doAccessToken, 100);
|
|
21
|
+
}
|
|
22
|
+
async getDropletIdFromName(name) {
|
|
23
|
+
(0, assert_1.default)(name);
|
|
24
|
+
const result = await this._session.droplets.getAll();
|
|
25
|
+
const [targetDroplet] = result.droplets.filter((droplet) => droplet.name === name) || [];
|
|
26
|
+
return targetDroplet ? targetDroplet.id : undefined;
|
|
27
|
+
}
|
|
28
|
+
async getSshKeys() {
|
|
29
|
+
var _a;
|
|
30
|
+
const result = await this._session.keys.getAll();
|
|
31
|
+
return (_a = result.ssh_keys) === null || _a === void 0 ? void 0 : _a.map((key) => key.fingerprint);
|
|
32
|
+
}
|
|
33
|
+
async deploy(options) {
|
|
34
|
+
const { hostname: name, region = DEFAULT_REGION, memory = DEFAULT_MEMORY, dev, accessToken } = options;
|
|
35
|
+
const dropletId = await this.getDropletIdFromName(name);
|
|
36
|
+
if (dropletId) {
|
|
37
|
+
throw new Error(`${name} already exists.`);
|
|
38
|
+
}
|
|
39
|
+
const channel = dev ? 'dev' : 'latest';
|
|
40
|
+
const cloudConfigScript = `
|
|
41
|
+
#cloud-config
|
|
42
|
+
|
|
43
|
+
package_update: true
|
|
44
|
+
|
|
45
|
+
package_upgrade: true
|
|
46
|
+
|
|
47
|
+
packages:
|
|
48
|
+
- python
|
|
49
|
+
- build-essential
|
|
50
|
+
- docker-ce
|
|
51
|
+
- docker-ce-cli
|
|
52
|
+
|
|
53
|
+
apt:
|
|
54
|
+
sources:
|
|
55
|
+
docker.list:
|
|
56
|
+
source: deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable
|
|
57
|
+
keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
|
58
|
+
` +
|
|
59
|
+
(accessToken
|
|
60
|
+
? `
|
|
61
|
+
write_files:
|
|
62
|
+
- path: /root/.kube/acl/seed.yaml
|
|
63
|
+
content: |
|
|
64
|
+
- entity: "${accessToken}"
|
|
65
|
+
capabilities:
|
|
66
|
+
- 100
|
|
67
|
+
subject: "*"
|
|
68
|
+
`
|
|
69
|
+
: '') +
|
|
70
|
+
`
|
|
71
|
+
runcmd:
|
|
72
|
+
- curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
73
|
+
- chmod +x /usr/local/bin/docker-compose
|
|
74
|
+
- ch=${channel} bash -c "$(curl -fsSL https://dxos.nyc3.digitaloceanspaces.com/install.sh)"
|
|
75
|
+
- kube start
|
|
76
|
+
`;
|
|
77
|
+
let sizeSlug = 's-2vcpu-4gb';
|
|
78
|
+
switch (memory) {
|
|
79
|
+
case 1:
|
|
80
|
+
sizeSlug = 's-1vcpu-1gb';
|
|
81
|
+
break;
|
|
82
|
+
case 2:
|
|
83
|
+
sizeSlug = 's-2vcpu-2gb';
|
|
84
|
+
break;
|
|
85
|
+
case 4:
|
|
86
|
+
sizeSlug = 's-2vcpu-4gb';
|
|
87
|
+
break;
|
|
88
|
+
case 8:
|
|
89
|
+
sizeSlug = 's-4vcpu-8gb';
|
|
90
|
+
break;
|
|
91
|
+
case 16:
|
|
92
|
+
sizeSlug = 's-8vcpu-16gb';
|
|
93
|
+
break;
|
|
94
|
+
case 32:
|
|
95
|
+
sizeSlug = 's-8vcpu-32gb';
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
const sshKeys = await this.getSshKeys();
|
|
99
|
+
(0, assert_1.default)(sshKeys.length, 'No SSH keys found.');
|
|
100
|
+
const createParameters = {
|
|
101
|
+
name,
|
|
102
|
+
region,
|
|
103
|
+
size: sizeSlug,
|
|
104
|
+
image: 'ubuntu-22-10-x64',
|
|
105
|
+
ssh_keys: sshKeys,
|
|
106
|
+
user_data: cloudConfigScript,
|
|
107
|
+
tags: [provider_1.KUBE_TAG]
|
|
108
|
+
};
|
|
109
|
+
const result = await this._session.droplets.create(createParameters);
|
|
110
|
+
const droplet = await (0, async_1.waitForCondition)(async () => {
|
|
111
|
+
const { droplet } = await this._session.droplets.getById(result.droplet.id);
|
|
112
|
+
if (droplet === null || droplet === void 0 ? void 0 : droplet.networks.v4.find((net) => net.type === 'public').ip_address) {
|
|
113
|
+
return droplet;
|
|
114
|
+
}
|
|
115
|
+
return undefined;
|
|
116
|
+
}, 0, 1000);
|
|
117
|
+
const ipAddress = droplet.networks.v4.find((net) => net.type === 'public').ip_address;
|
|
118
|
+
return {
|
|
119
|
+
hostname: droplet.name,
|
|
120
|
+
createdAt: droplet.created_at,
|
|
121
|
+
ipAddress
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.DigitalOceanProvider = DigitalOceanProvider;
|
|
126
|
+
//# sourceMappingURL=digital-ocean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digital-ocean.js","sourceRoot":"","sources":["../../../../src/util/provider/digital-ocean.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAC5B,4DAAsC;AAEtC,uCAA+C;AAG/C,yCAA4E;AAE5E,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,MAAM,cAAc,GAAG,CAAC,CAAC;AAEzB,MAAa,oBAAoB;IAG/B,YAAY,MAAc;QACxB,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QAC3E,IAAA,gBAAM,EAAC,aAAa,EAAE,oCAAoC,CAAC,CAAC;QAE5D,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAY,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAY;QACrC,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC;QAEb,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrD,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAY,EAAE,EA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AG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,UAAU,CAAC;QAE3F,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,IAAI;YACtB,SAAS,EAAE,OAAO,CAAC,UAAU;YAC7B,SAAS;SACV,CAAC;IACJ,CAAC;CACF;AAjID,oDAiIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/provider/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./provider"), exports);
|
|
21
|
+
__exportStar(require("./digital-ocean"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/util/provider/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,6CAA2B;AAC3B,kDAAgC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const KUBE_TAG = "kube";
|
|
2
|
+
export declare const DEFAULT_PROVIDER = "digitalocean";
|
|
3
|
+
export interface KubeDeployOptions {
|
|
4
|
+
hostname: string;
|
|
5
|
+
region?: string;
|
|
6
|
+
memory?: number;
|
|
7
|
+
dev: boolean;
|
|
8
|
+
accessToken?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type KUBE = {
|
|
11
|
+
hostname: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
ipAddress: string;
|
|
14
|
+
};
|
|
15
|
+
export interface MachineryProvider {
|
|
16
|
+
/**
|
|
17
|
+
* Deploy KUBE to a Provider.
|
|
18
|
+
*/
|
|
19
|
+
deploy(options: KubeDeployOptions): Promise<KUBE>;
|
|
20
|
+
}
|
|
21
|
+
export declare const mapKubes: (kubes: KUBE[]) => {
|
|
22
|
+
key: string;
|
|
23
|
+
ipAddress: string;
|
|
24
|
+
}[];
|
|
25
|
+
export declare const printKubes: (kubes: KUBE[], flags?: {}) => void;
|
|
26
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/util/provider/provider.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,oBAAY,IAAI,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,QAAQ,UAAW,IAAI,EAAE;;;GAKrC,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,IAAI,EAAE,qBAevC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.printKubes = exports.mapKubes = exports.DEFAULT_PROVIDER = exports.KUBE_TAG = void 0;
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
|
+
exports.KUBE_TAG = 'kube';
|
|
9
|
+
exports.DEFAULT_PROVIDER = 'digitalocean';
|
|
10
|
+
const mapKubes = (kubes) => {
|
|
11
|
+
return kubes.map((kube) => ({
|
|
12
|
+
key: kube.hostname,
|
|
13
|
+
ipAddress: kube.ipAddress
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
exports.mapKubes = mapKubes;
|
|
17
|
+
const printKubes = (kubes, flags = {}) => {
|
|
18
|
+
core_1.CliUx.ux.table((0, exports.mapKubes)(kubes), {
|
|
19
|
+
key: {
|
|
20
|
+
header: 'Hostname'
|
|
21
|
+
},
|
|
22
|
+
ipAddress: {
|
|
23
|
+
header: 'IP Address'
|
|
24
|
+
}
|
|
25
|
+
}, {
|
|
26
|
+
...flags
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
exports.printKubes = printKubes;
|
|
30
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/util/provider/provider.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,sCAAoC;AAEvB,QAAA,QAAQ,GAAG,MAAM,CAAC;AAElB,QAAA,gBAAgB,GAAG,cAAc,CAAC;AAuBxC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,GAAG,EAAE,IAAI,CAAC,QAAQ;QAClB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AALW,QAAA,QAAQ,YAKnB;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACtD,YAAK,CAAC,EAAE,CAAC,KAAK,CACZ,IAAA,gBAAQ,EAAC,KAAK,CAAC,EACf;QACE,GAAG,EAAE;YACH,MAAM,EAAE,UAAU;SACnB;QACD,SAAS,EAAE;YACT,MAAM,EAAE,YAAY;SACrB;KACF,EACD;QACE,GAAG,KAAK;KACT,CACF,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.build = void 0;
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const build = ({ verbose }, { log, module }) => {
|
|
9
|
-
|
|
9
|
+
log(`Building module ${module.name}...`);
|
|
10
10
|
const [command, ...args] = module.build.command.split(' ');
|
|
11
11
|
// Build with configuration.
|
|
12
12
|
const { status } = (0, child_process_1.spawnSync)(command, args, {
|
|
@@ -17,10 +17,10 @@ const build = ({ verbose }, { log, module }) => {
|
|
|
17
17
|
stdio: verbose ? 'inherit' : undefined
|
|
18
18
|
});
|
|
19
19
|
if (status) {
|
|
20
|
-
verbose
|
|
20
|
+
log(`Build failed.${verbose ? '' : ' Re-run with --verbose for more details.'}`);
|
|
21
21
|
process.exit(status);
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
log('Build succeded.');
|
|
24
24
|
};
|
|
25
25
|
exports.build = build;
|
|
26
26
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../src/util/publish/build.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,iDAA0C;AAanC,MAAM,KAAK,GAAG,CAAC,EAAE,OAAO,EAAa,EAAE,EAAE,GAAG,EAAE,MAAM,EAAe,EAAE,EAAE;IAC5E,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../src/util/publish/build.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,iDAA0C;AAanC,MAAM,KAAK,GAAG,CAAC,EAAE,OAAO,EAAa,EAAE,EAAE,GAAG,EAAE,MAAM,EAAe,EAAE,EAAE;IAC5E,GAAG,CAAC,mBAAmB,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;IAEzC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,KAAM,CAAC,OAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE7D,4BAA4B;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,yBAAS,EAAC,OAAO,EAAE,IAAI,EAAE;QAC1C,GAAG,EAAE;YACH,GAAG,OAAO,CAAC,GAAG;YACd,cAAc,EAAE,MAAM;SACvB;QACD,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;KACvC,CAAC,CAAC;IAEH,IAAI,MAAM,EAAE;QACV,GAAG,CAAC,gBAAgB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,0CAA0C,EAAE,CAAC,CAAC;QACjF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACtB;IAED,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACzB,CAAC,CAAC;AApBW,QAAA,KAAK,SAoBhB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Config } from '@dxos/client';
|
|
2
|
-
import { PackageModule } from './common';
|
|
2
|
+
import { Logger, PackageModule } from './common';
|
|
3
3
|
export interface PublishParams {
|
|
4
4
|
config?: Config;
|
|
5
|
+
log: Logger;
|
|
5
6
|
module: PackageModule;
|
|
6
7
|
}
|
|
7
8
|
interface PublishArgs {
|
|
@@ -11,6 +12,6 @@ interface PublishArgs {
|
|
|
11
12
|
path?: string;
|
|
12
13
|
config?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const publish: ({ verbose, timeout, path, pin }: PublishArgs, { config, module }: PublishParams) => Promise<import("ipfs-http-client").CID>;
|
|
15
|
+
export declare const publish: ({ verbose, timeout, path, pin }: PublishArgs, { log, config, module }: PublishParams) => Promise<import("ipfs-http-client").CID>;
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAcjD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,oCAA2C,WAAW,2BAA2B,aAAa,4CAwBjH,CAAC"}
|
|
@@ -22,10 +22,10 @@ const getFolderSize = (0, util_1.promisify)(get_folder_size_1.default);
|
|
|
22
22
|
* Example: `example:app/braneframe` => `example/app/braneframe`
|
|
23
23
|
*/
|
|
24
24
|
const encodeName = (name) => name.replaceAll(':', '/');
|
|
25
|
-
const publish = async ({ verbose, timeout, path, pin }, { config, module }) => {
|
|
25
|
+
const publish = async ({ verbose, timeout, path, pin }, { log, config, module }) => {
|
|
26
26
|
var _a, _b;
|
|
27
27
|
(0, node_assert_1.default)(module.name, 'Module name is required to publish.');
|
|
28
|
-
|
|
28
|
+
log(`Uploading ${module.name}...`);
|
|
29
29
|
const moduleOut = `out/${encodeName(module.name)}`;
|
|
30
30
|
const outdir = (_b = path !== null && path !== void 0 ? path : (_a = module.build) === null || _a === void 0 ? void 0 : _a.outdir) !== null && _b !== void 0 ? _b : (fs_1.default.existsSync(moduleOut) ? moduleOut : DEFAULT_OUTDIR);
|
|
31
31
|
const publishFolder = (0, path_1.join)(process.cwd(), outdir);
|
|
@@ -39,7 +39,7 @@ const publish = async ({ verbose, timeout, path, pin }, { config, module }) => {
|
|
|
39
39
|
});
|
|
40
40
|
verbose && bar.update(total);
|
|
41
41
|
verbose && bar.stop();
|
|
42
|
-
|
|
42
|
+
log(`Uploaded ${module.name} to IPFS with cid ${cid.toString()}.`);
|
|
43
43
|
return cid;
|
|
44
44
|
};
|
|
45
45
|
exports.publish = publish;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mapp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4
|
"SENTRY_DESTINATION": "https://2647916221e643869965e78469479aa4@o4504012000067584.ingest.sentry.io/4504012027265029",
|
|
5
5
|
"TELEMETRY_API_KEY": "B00QG6PtJJrJ0VVFe0H5a6bcUUShKyZM",
|
|
6
6
|
"IPDATA_API_KEY": "ccc5f0cd66dd34a7c31c2ddc61c2bbca2db73892a993982bb3a5f0e2"
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.17","commands":{"app:create":{"id":"app:create","description":"Create a DXOS project.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"tag":{"name":"tag","type":"option","description":"Git tag or branch of the DXOS repo to checkout.","multiple":false},"template":{"name":"template","type":"option","char":"t","description":"Template to use when creating the project.","multiple":false,"options":["hello","bare"],"default":"hello"}},"args":[{"name":"name","description":"Name of the project","required":true}]},"app:list":{"id":"app:list","description":"List apps.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"app:publish":{"id":"app:publish","description":"Publish apps.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"configPath":{"name":"configPath","type":"option","description":"Path to dx.yml","multiple":false},"skipExisting":{"name":"skipExisting","type":"boolean","description":"Do not update content on KUBE if version already exists","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"option","description":"Version of modules to publish","multiple":false}},"args":[]},"config":{"id":"config","description":"Show config file.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"halo:create":{"id":"halo:create","description":"Create HALO.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[{"name":"displayName"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"halo":{"id":"halo","description":"Show HALO profile.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"halo:recover":{"id":"halo:recover","description":"Recover HALO.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[{"name":"seedphrase"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"reset":{"id":"reset","description":"Reset all data.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[]},"shell":{"id":"shell","description":"Interactive shell.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[]},"space:create":{"id":"space:create","description":"Create space.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[{"name":"name"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"space":{"id":"space","description":"List spaces.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[]},"space:invite":{"id":"space:invite","description":"Create space invitation.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[{"name":"key"}]},"space:join":{"id":"space:join","description":"Join space invitation","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"invitation":{"name":"invitation","type":"option","description":"Invitation code","multiple":false},"secret":{"name":"secret","type":"option","description":"Invitation secret","multiple":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"space:list":{"id":"space:list","description":"List spaces.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)","multiple":false,"exclusive":["extended"]},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)","multiple":false},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo","multiple":false},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false,"exclusive":["no-truncate"]},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","multiple":false,"options":["csv","json","yaml"],"exclusive":["no-truncate","csv"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false,"exclusive":["columns"]},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false,"exclusive":["csv"]},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false,"exclusive":["csv"]}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"space:members":{"id":"space:members","description":"List space members.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)","multiple":false,"exclusive":["extended"]},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)","multiple":false},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo","multiple":false},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false,"exclusive":["no-truncate"]},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","multiple":false,"options":["csv","json","yaml"],"exclusive":["no-truncate","csv"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false,"exclusive":["columns"]},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false,"exclusive":["csv"]},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false,"exclusive":["csv"]}},"args":[{"name":"key"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}}}}
|
|
1
|
+
{"version":"0.1.19","commands":{"app:create":{"id":"app:create","description":"Create a DXOS project.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"tag":{"name":"tag","type":"option","description":"Git tag or branch of the DXOS repo to checkout.","multiple":false},"template":{"name":"template","type":"option","char":"t","description":"Template to use when creating the project.","multiple":false,"options":["hello","bare","tasks"],"default":"hello"},"interactive":{"name":"interactive","type":"boolean","char":"i","description":"Customize app template options via interactive prompt","allowNo":false}},"args":[{"name":"name","description":"Name of the project","required":true}]},"app:list":{"id":"app:list","description":"List apps.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"app:publish":{"id":"app:publish","description":"Publish apps.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"configPath":{"name":"configPath","type":"option","description":"Path to dx.yml","multiple":false},"accessToken":{"name":"accessToken","type":"option","description":"Access token for publishing","multiple":false},"skipExisting":{"name":"skipExisting","type":"boolean","description":"Do not update content on KUBE if version already exists","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"Verbose output","allowNo":false},"version":{"name":"version","type":"option","description":"Version of modules to publish","multiple":false}},"args":[]},"config":{"id":"config","description":"Show config file.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"halo:create":{"id":"halo:create","description":"Create HALO.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[{"name":"displayName"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"halo":{"id":"halo","description":"Show HALO profile.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"halo:recover":{"id":"halo:recover","description":"Recover HALO.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[{"name":"seedphrase"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"kube:deploy":{"id":"kube:deploy","description":"Deploy KUBE.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"hostname":{"name":"hostname","type":"option","description":"Hostname","required":true,"multiple":false},"provider":{"name":"provider","type":"option","description":"Cloud Provider","multiple":false,"default":"digitalocean"},"accessToken":{"name":"accessToken","type":"option","description":"Access token for seeding admin identity","multiple":false},"dev":{"name":"dev","type":"boolean","description":"Deploy latest version from dev channel","allowNo":false}},"args":[]},"reset":{"id":"reset","description":"Reset all data.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[]},"shell":{"id":"shell","description":"Interactive shell.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[]},"space:create":{"id":"space:create","description":"Create space.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[{"name":"name"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"space":{"id":"space","description":"List spaces.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[]},"space:invite":{"id":"space:invite","description":"Create space invitation.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30}},"args":[{"name":"key"}]},"space:join":{"id":"space:join","description":"Join space invitation","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"invitation":{"name":"invitation","type":"option","description":"Invitation code","multiple":false},"secret":{"name":"secret","type":"option","description":"Invitation secret","multiple":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"space:list":{"id":"space:list","description":"List spaces.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)","multiple":false,"exclusive":["extended"]},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)","multiple":false},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo","multiple":false},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false,"exclusive":["no-truncate"]},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","multiple":false,"options":["csv","json","yaml"],"exclusive":["no-truncate","csv"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false,"exclusive":["columns"]},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false,"exclusive":["csv"]},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false,"exclusive":["csv"]}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"space:members":{"id":"space:members","description":"List space members.","strict":true,"pluginName":"@dxos/cli","pluginAlias":"@dxos/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","description":"Specify config file","multiple":false},"timeout":{"name":"timeout","type":"option","description":"Timeout in seconds","multiple":false,"default":30},"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)","multiple":false,"exclusive":["extended"]},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)","multiple":false},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo","multiple":false},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false,"exclusive":["no-truncate"]},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","multiple":false,"options":["csv","json","yaml"],"exclusive":["no-truncate","csv"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false,"exclusive":["columns"]},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false,"exclusive":["csv"]},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false,"exclusive":["csv"]}},"args":[{"name":"key"}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "DXOS CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dxos",
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
"chalk": "^4.1.0",
|
|
31
31
|
"cli-progress": "^3.11.2",
|
|
32
32
|
"debug": "^4.3.3",
|
|
33
|
+
"do-wrapper": "^4.5.1",
|
|
33
34
|
"faker": "^5.5.3",
|
|
34
35
|
"fs-extra": "^8.1.0",
|
|
35
36
|
"get-folder-size": "^2.0.1",
|
|
36
|
-
"inquirer": "
|
|
37
|
+
"inquirer": "^8.2.0",
|
|
37
38
|
"ipfs-http-client": "~56.0.1",
|
|
38
39
|
"isomorphic-ws": "^4.0.1",
|
|
39
40
|
"js-yaml": "^4.1.0",
|
|
@@ -41,20 +42,21 @@
|
|
|
41
42
|
"node-fetch": "^2.6.0",
|
|
42
43
|
"oclif": "^3.1.2",
|
|
43
44
|
"react": "^18.2.0",
|
|
45
|
+
"tempy": "^1.0.1",
|
|
44
46
|
"uuid": "^8.3.2",
|
|
45
47
|
"ws": "^7.4.4",
|
|
46
|
-
"@dxos/async": "0.1.
|
|
47
|
-
"@dxos/client": "0.1.
|
|
48
|
-
"@dxos/client-services": "0.1.
|
|
49
|
-
"@dxos/config": "0.1.
|
|
50
|
-
"@dxos/debug": "0.1.
|
|
51
|
-
"@dxos/keys": "0.1.
|
|
52
|
-
"@dxos/log": "0.1.
|
|
53
|
-
"@dxos/plate": "0.1.
|
|
54
|
-
"@dxos/protocols": "0.1.
|
|
55
|
-
"@dxos/rpc": "0.1.
|
|
56
|
-
"@dxos/sentry": "0.1.
|
|
57
|
-
"@dxos/telemetry": "0.1.
|
|
48
|
+
"@dxos/async": "0.1.19",
|
|
49
|
+
"@dxos/client": "0.1.19",
|
|
50
|
+
"@dxos/client-services": "0.1.19",
|
|
51
|
+
"@dxos/config": "0.1.19",
|
|
52
|
+
"@dxos/debug": "0.1.19",
|
|
53
|
+
"@dxos/keys": "0.1.19",
|
|
54
|
+
"@dxos/log": "0.1.19",
|
|
55
|
+
"@dxos/plate": "0.1.19",
|
|
56
|
+
"@dxos/protocols": "0.1.19",
|
|
57
|
+
"@dxos/rpc": "0.1.19",
|
|
58
|
+
"@dxos/sentry": "0.1.19",
|
|
59
|
+
"@dxos/telemetry": "0.1.19"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@oclif/test": "^2.1.1",
|