@dxos/cli 0.1.22 → 0.1.23
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 +3 -2
- package/dist/src/commands/app/create.d.ts +1 -0
- package/dist/src/commands/app/create.d.ts.map +1 -1
- package/dist/src/commands/app/create.js +28 -33
- package/dist/src/commands/app/create.js.map +1 -1
- package/dist/src/util/exec.d.ts +6 -0
- package/dist/src/util/exec.d.ts.map +1 -0
- package/dist/src/util/exec.js +42 -0
- package/dist/src/util/exec.js.map +1 -0
- package/dist/src/util/publish/build.d.ts.map +1 -1
- package/dist/src/util/publish/build.js +10 -6
- package/dist/src/util/publish/build.js.map +1 -1
- package/dist/src/util/publish/publish.d.ts.map +1 -1
- package/dist/src/util/publish/publish.js +10 -2
- 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 -13
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.23 linux-x64 node-v18.13.0
|
|
31
31
|
$ dx --help [COMMAND]
|
|
32
32
|
USAGE
|
|
33
33
|
$ dx COMMAND
|
|
@@ -73,7 +73,7 @@ Create a DXOS project.
|
|
|
73
73
|
|
|
74
74
|
```
|
|
75
75
|
USAGE
|
|
76
|
-
$ dx app create [NAME] [--config <value>] [--timeout <value>] [--tag <value>] [-t hello|bare|tasks] [-i]
|
|
76
|
+
$ dx app create [NAME] [--config <value>] [--timeout <value>] [--tag <value>] [-t hello|bare|tasks] [-i] [-v]
|
|
77
77
|
|
|
78
78
|
ARGUMENTS
|
|
79
79
|
NAME Name of the project
|
|
@@ -82,6 +82,7 @@ FLAGS
|
|
|
82
82
|
-i, --interactive Customize app template options via interactive prompt
|
|
83
83
|
-t, --template=<option> [default: hello] Template to use when creating the project.
|
|
84
84
|
<options: hello|bare|tasks>
|
|
85
|
+
-v, --verbose Verbose output
|
|
85
86
|
--config=<value> Specify config file
|
|
86
87
|
--tag=<value> Git tag or branch of the DXOS repo to checkout.
|
|
87
88
|
--timeout=<value> [default: 30] Timeout in seconds
|
|
@@ -11,6 +11,7 @@ export default class Create extends BaseCommand {
|
|
|
11
11
|
tag: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
12
|
template: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
13
13
|
interactive: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
config: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
15
16
|
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
16
17
|
};
|
|
@@ -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":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,eAAO,MAAM,aAAa,UAA6B,CAAC;AAYxD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW;IAC7C,OAAgB,WAAW,SAA4B;IAEvD,OAAgB,IAAI;;;;QAMlB;IAEF,OAAgB,KAAK;;;;;;;MAqBnB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CA0D1B"}
|
|
@@ -9,15 +9,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.APP_TEMPLATES = void 0;
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
11
|
const fs_1 = require("fs");
|
|
12
|
-
const node_child_process_1 = require("node:child_process");
|
|
13
|
-
const promises_1 = require("node:fs/promises");
|
|
14
|
-
const node_util_1 = require("node:util");
|
|
15
12
|
const process_1 = require("process");
|
|
16
|
-
const
|
|
13
|
+
const bare_template_1 = __importDefault(require("@dxos/bare-template"));
|
|
14
|
+
const hello_template_1 = __importDefault(require("@dxos/hello-template"));
|
|
17
15
|
const plate_1 = require("@dxos/plate");
|
|
16
|
+
const tasks_template_1 = __importDefault(require("@dxos/tasks-template"));
|
|
18
17
|
const base_command_1 = require("../../base-command");
|
|
18
|
+
const exec_1 = require("../../util/exec");
|
|
19
19
|
exports.APP_TEMPLATES = ['hello', 'bare', 'tasks'];
|
|
20
|
-
// TODO: factor this out into @dxos/fs or something (along with 'exists' from plate?)
|
|
20
|
+
// TODO(zhenyasav): factor this out into @dxos/fs or something (along with 'exists' from plate?)
|
|
21
21
|
const isDirEmpty = async (dirpath) => {
|
|
22
22
|
const dirIter = await fs_1.promises.opendir(dirpath);
|
|
23
23
|
const { done } = await dirIter[Symbol.asyncIterator]().next();
|
|
@@ -30,9 +30,7 @@ class Create extends base_command_1.BaseCommand {
|
|
|
30
30
|
async run() {
|
|
31
31
|
const { args, flags } = await this.parse(Create);
|
|
32
32
|
const { name } = args;
|
|
33
|
-
const {
|
|
34
|
-
const tmpDirectory = tempy_1.default.directory({ prefix: `dxos-app-create-${name}` });
|
|
35
|
-
const templateDirectory = `${tmpDirectory}/packages/apps/templates/${template}-template`;
|
|
33
|
+
const { template, interactive, verbose } = flags;
|
|
36
34
|
const outputDirectory = `${(0, process_1.cwd)()}/${name}`;
|
|
37
35
|
const outputDirExists = await (0, plate_1.exists)(outputDirectory);
|
|
38
36
|
const isOutputEmpty = outputDirExists && (await isDirEmpty(outputDirectory));
|
|
@@ -40,31 +38,22 @@ class Create extends base_command_1.BaseCommand {
|
|
|
40
38
|
this.error(`Output directory ${outputDirectory} is not empty`, { exit: 1 });
|
|
41
39
|
}
|
|
42
40
|
try {
|
|
43
|
-
await (0,
|
|
41
|
+
await (0, exec_1.exec)('which pnpm');
|
|
44
42
|
}
|
|
45
43
|
catch (_a) {
|
|
46
44
|
this.error('pnpm not found. Please run "npm i -g pnpm" first.', { exit: 1 });
|
|
47
45
|
}
|
|
48
46
|
try {
|
|
49
|
-
this.log('Cloning template from Github...');
|
|
50
|
-
await (0, node_util_1.promisify)(node_child_process_1.exec)(`
|
|
51
|
-
git clone --filter=blob:none --no-checkout git@github.com:dxos/dxos.git ${tmpDirectory} &&
|
|
52
|
-
cd ${tmpDirectory} &&
|
|
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)}
|
|
57
|
-
`);
|
|
58
|
-
// this.log('Preparing template...');
|
|
59
|
-
// Copy vite patch.
|
|
60
|
-
// await mkdir(`${templateDirectory}/patches`);
|
|
61
|
-
// await copyFile(`${tmpDirectory}/patches/vite@3.0.9.patch`, `${templateDirectory}/patches/vite@3.0.9.patch`);
|
|
62
47
|
this.log('Creating app...');
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
const plates = {
|
|
49
|
+
tasks: tasks_template_1.default,
|
|
50
|
+
bare: bare_template_1.default,
|
|
51
|
+
hello: hello_template_1.default
|
|
52
|
+
};
|
|
53
|
+
const result = await plates[template].execute({
|
|
66
54
|
outputDirectory,
|
|
67
55
|
interactive,
|
|
56
|
+
verbose,
|
|
68
57
|
input: interactive
|
|
69
58
|
? {
|
|
70
59
|
monorepo: false,
|
|
@@ -79,16 +68,17 @@ class Create extends base_command_1.BaseCommand {
|
|
|
79
68
|
pwa: true
|
|
80
69
|
}
|
|
81
70
|
});
|
|
82
|
-
await Promise.all(result.map((file) =>
|
|
83
|
-
|
|
71
|
+
await Promise.all(result.map(async (file) => {
|
|
72
|
+
const saved = await file.save();
|
|
73
|
+
if (verbose) {
|
|
74
|
+
console.log(saved ? 'wrote' : 'skip', file.shortDescription());
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
84
77
|
}
|
|
85
78
|
catch (err) {
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this.error(
|
|
89
|
-
}
|
|
90
|
-
finally {
|
|
91
|
-
await (0, promises_1.rm)(tmpDirectory, { recursive: true, force: true });
|
|
79
|
+
this.error(err);
|
|
80
|
+
this.error(err === null || err === void 0 ? void 0 : err.stack);
|
|
81
|
+
this.error('Unable to create application', { exit: 1 });
|
|
92
82
|
}
|
|
93
83
|
}
|
|
94
84
|
}
|
|
@@ -116,6 +106,11 @@ Create.flags = {
|
|
|
116
106
|
char: 'i',
|
|
117
107
|
description: 'Customize app template options via interactive prompt',
|
|
118
108
|
default: false
|
|
109
|
+
}),
|
|
110
|
+
verbose: core_1.Flags.boolean({
|
|
111
|
+
char: 'v',
|
|
112
|
+
description: 'Verbose output',
|
|
113
|
+
default: false
|
|
119
114
|
})
|
|
120
115
|
};
|
|
121
116
|
//# 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;;;;;;AAEF,sCAAoC;AACpC,2BAAoC;AACpC,
|
|
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,qCAA8B;AAE9B,wEAAuC;AACvC,0EAAyC;AACzC,uCAAqC;AACrC,0EAAyC;AAEzC,qDAAiD;AACjD,0CAAuC;AAE1B,QAAA,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD,gGAAgG;AAChG,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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;IACF,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../src/util/exec.ts"],"names":[],"mappings":"AAMA,oBAAY,WAAW,GAAG;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAGF,eAAO,MAAM,IAAI,YAAa,MAAM,YAAY,QAAQ,WAAW,CAAC,KAAG,QAAQ,MAAM,CA8BpF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.exec = void 0;
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
// TODO (zhenyasav): resolve with executors/.../exec.ts
|
|
9
|
+
const exec = (command, options) => {
|
|
10
|
+
const { verbose, cwd } = { verbose: false, cwd: process.cwd(), ...options };
|
|
11
|
+
if (verbose) {
|
|
12
|
+
console.log(command);
|
|
13
|
+
}
|
|
14
|
+
const [first, ...rest] = command.split(' ');
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
const subprocess = (0, node_child_process_1.spawn)(first, rest, {
|
|
17
|
+
shell: true,
|
|
18
|
+
cwd
|
|
19
|
+
});
|
|
20
|
+
const stdout = Buffer.from([]);
|
|
21
|
+
const stderr = Buffer.from([]);
|
|
22
|
+
subprocess.stdout.on('data', (chunk) => {
|
|
23
|
+
stdout.write(chunk.toString());
|
|
24
|
+
});
|
|
25
|
+
subprocess.stderr.on('data', (chunk) => {
|
|
26
|
+
stderr.write(chunk.toString());
|
|
27
|
+
});
|
|
28
|
+
subprocess.on('close', (code) => {
|
|
29
|
+
if (code === 0) {
|
|
30
|
+
resolve(stdout.toString());
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
reject(stderr.length ? stderr.toString() : stdout.length ? stdout.toString() : (code !== null && code !== void 0 ? code : '').toString());
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
subprocess.on('error', (error) => {
|
|
37
|
+
reject(error);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
exports.exec = exec;
|
|
42
|
+
//# sourceMappingURL=exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../../src/util/exec.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,2DAA2C;AAO3C,uDAAuD;AAChD,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,OAA8B,EAAmB,EAAE;IACvF,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;IAC5E,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,OAAO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,CAAC;QACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YAC/B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA9BW,QAAA,IAAI,QA8Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/build.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,KAAK,gBAAiB,SAAS,mBAAmB,WAAW,SAwBzE,CAAC"}
|
|
@@ -2,25 +2,29 @@
|
|
|
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 });
|
|
6
9
|
exports.build = void 0;
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
7
11
|
const child_process_1 = require("child_process");
|
|
8
12
|
const build = ({ verbose }, { log, module }) => {
|
|
9
|
-
log(`Building module ${module.name}...`);
|
|
13
|
+
log(`Building module ${chalk_1.default.bold(module.name)} ...`);
|
|
10
14
|
const [command, ...args] = module.build.command.split(' ');
|
|
11
15
|
// Build with configuration.
|
|
12
|
-
const { status } = (0, child_process_1.spawnSync)(command, args, {
|
|
16
|
+
const { status, error } = (0, child_process_1.spawnSync)(command, args, {
|
|
13
17
|
env: {
|
|
14
18
|
...process.env,
|
|
15
19
|
CONFIG_DYNAMIC: 'true'
|
|
16
20
|
},
|
|
17
21
|
stdio: verbose ? 'inherit' : undefined
|
|
18
22
|
});
|
|
19
|
-
if (status) {
|
|
20
|
-
log(`
|
|
21
|
-
process.exit(status);
|
|
23
|
+
if (error || status !== 0) {
|
|
24
|
+
log(`Module ${chalk_1.default.bold(module.name)} build failed${verbose ? ` with status: ${status}.${error ? '\n' + error : ''}` : '. Re-run with --verbose for more details.'}`);
|
|
25
|
+
process.exit(status === null ? 1 : status);
|
|
22
26
|
}
|
|
23
|
-
log(
|
|
27
|
+
log(`Module build ${chalk_1.default.bold(module.name)} succeeded.`);
|
|
24
28
|
};
|
|
25
29
|
exports.build = build;
|
|
26
30
|
//# 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
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../src/util/publish/build.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,kDAA0B;AAC1B,iDAA0C;AAanC,MAAM,KAAK,GAAG,CAAC,EAAE,OAAO,EAAa,EAAE,EAAE,GAAG,EAAE,MAAM,EAAe,EAAE,EAAE;IAC5E,GAAG,CAAC,mBAAmB,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEtD,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,KAAK,EAAE,GAAG,IAAA,yBAAS,EAAC,OAAO,EAAE,IAAI,EAAE;QACjD,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,KAAK,IAAI,MAAM,KAAK,CAAC,EAAE;QACzB,GAAG,CACD,UAAU,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAC/B,OAAO,CAAC,CAAC,CAAC,iBAAiB,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,2CACrE,EAAE,CACH,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;KAC5C;IAED,GAAG,CAAC,gBAAgB,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC5D,CAAC,CAAC;AAxBW,QAAA,KAAK,SAwBhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":"AAYA,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,4CA6BjH,CAAC"}
|
|
@@ -7,6 +7,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.publish = void 0;
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
10
11
|
const cli_progress_1 = __importDefault(require("cli-progress"));
|
|
11
12
|
const fs_1 = __importDefault(require("fs"));
|
|
12
13
|
const get_folder_size_1 = __importDefault(require("get-folder-size"));
|
|
@@ -25,11 +26,18 @@ const encodeName = (name) => name.replaceAll(':', '/');
|
|
|
25
26
|
const publish = async ({ verbose, timeout, path, pin }, { log, config, module }) => {
|
|
26
27
|
var _a, _b;
|
|
27
28
|
(0, node_assert_1.default)(module.name, 'Module name is required to publish.');
|
|
28
|
-
log(`
|
|
29
|
+
log(`Publishing module ${chalk_1.default.bold(module.name)} ...`);
|
|
29
30
|
const moduleOut = `out/${encodeName(module.name)}`;
|
|
30
31
|
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
32
|
const publishFolder = (0, path_1.join)(process.cwd(), outdir);
|
|
33
|
+
if (!fs_1.default.existsSync(publishFolder)) {
|
|
34
|
+
throw new Error(`Publish failed. Build output folder does not exist: ${publishFolder}.`);
|
|
35
|
+
}
|
|
32
36
|
const total = await getFolderSize(publishFolder);
|
|
37
|
+
if (verbose) {
|
|
38
|
+
log(`Publishing from: ${publishFolder}`);
|
|
39
|
+
}
|
|
40
|
+
log('Uploading ...');
|
|
33
41
|
const bar = new cli_progress_1.default.SingleBar({}, cli_progress_1.default.Presets.shades_classic);
|
|
34
42
|
verbose && bar.start(total, 0);
|
|
35
43
|
const cid = await (0, ipfs_upload_1.uploadToIPFS)(publishFolder, config, {
|
|
@@ -39,7 +47,7 @@ const publish = async ({ verbose, timeout, path, pin }, { log, config, module })
|
|
|
39
47
|
});
|
|
40
48
|
verbose && bar.update(total);
|
|
41
49
|
verbose && bar.stop();
|
|
42
|
-
log(`
|
|
50
|
+
log(`Published module ${chalk_1.default.bold(module.name)}. IPFS cid: ${cid.toString()}`);
|
|
43
51
|
return cid;
|
|
44
52
|
};
|
|
45
53
|
exports.publish = publish;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,gEAAuC;AACvC,4CAAoB;AACpB,sEAAyC;AACzC,8DAAiC;AACjC,+BAA4B;AAC5B,+BAAiC;AAKjC,+CAA6C;AAE7C,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B,MAAM,aAAa,GAAG,IAAA,gBAAS,EAAC,yBAAU,CAAC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAgBxD,MAAM,OAAO,GAAG,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAe,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAiB,EAAE,EAAE;;IACpH,IAAA,qBAAM,EAAC,MAAM,CAAC,IAAI,EAAE,qCAAqC,CAAC,CAAC;IAC3D,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":";AAAA,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",
|
|
6
6
|
"IPDATA_API_KEY": "ccc5f0cd66dd34a7c31c2ddc61c2bbca2db73892a993982bb3a5f0e2"
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.22","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"}}},"tunnel:list":{"id":"tunnel:list","description":"List tunnels.","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"}}},"tunnel:set":{"id":"tunnel:set","description":"Enable or disable tunnel.","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},"app":{"name":"app","type":"option","description":"Application name","required":true,"multiple":false},"enabled":{"name":"enabled","type":"boolean","description":"Enable tunnel.","allowNo":false},"disabled":{"name":"disabled","type":"boolean","description":"Disable tunnel.","allowNo":false}},"args":[],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}}}}
|
|
1
|
+
{"version":"0.1.23","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},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","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"}}},"tunnel:list":{"id":"tunnel:list","description":"List tunnels.","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"}}},"tunnel:set":{"id":"tunnel:set","description":"Enable or disable tunnel.","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},"app":{"name":"app","type":"option","description":"Application name","required":true,"multiple":false},"enabled":{"name":"enabled","type":"boolean","description":"Enable tunnel.","allowNo":false},"disabled":{"name":"disabled","type":"boolean","description":"Disable tunnel.","allowNo":false}},"args":[],"_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.23",
|
|
4
4
|
"description": "DXOS CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dxos",
|
|
@@ -45,18 +45,21 @@
|
|
|
45
45
|
"tempy": "^1.0.1",
|
|
46
46
|
"uuid": "^8.3.2",
|
|
47
47
|
"ws": "^7.4.4",
|
|
48
|
-
"@dxos/async": "0.1.
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/client
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
48
|
+
"@dxos/async": "0.1.23",
|
|
49
|
+
"@dxos/bare-template": "0.1.23",
|
|
50
|
+
"@dxos/client": "0.1.23",
|
|
51
|
+
"@dxos/client-services": "0.1.23",
|
|
52
|
+
"@dxos/config": "0.1.23",
|
|
53
|
+
"@dxos/debug": "0.1.23",
|
|
54
|
+
"@dxos/hello-template": "0.1.23",
|
|
55
|
+
"@dxos/keys": "0.1.23",
|
|
56
|
+
"@dxos/log": "0.1.23",
|
|
57
|
+
"@dxos/plate": "0.1.23",
|
|
58
|
+
"@dxos/protocols": "0.1.23",
|
|
59
|
+
"@dxos/rpc": "0.1.23",
|
|
60
|
+
"@dxos/sentry": "0.1.23",
|
|
61
|
+
"@dxos/tasks-template": "0.1.23",
|
|
62
|
+
"@dxos/telemetry": "0.1.23"
|
|
60
63
|
},
|
|
61
64
|
"devDependencies": {
|
|
62
65
|
"@oclif/test": "^2.1.1",
|