@kradle/cli 0.2.6 → 0.2.7
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/dist/commands/world/import.js +11 -5
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -64,8 +64,9 @@ export default class Import extends Command {
|
|
|
64
64
|
title: "Creating world directory",
|
|
65
65
|
enabled: () => !isReimport,
|
|
66
66
|
task: async (_ctx, task) => {
|
|
67
|
+
const name = path.basename(sourcePath);
|
|
67
68
|
const config = {
|
|
68
|
-
name:
|
|
69
|
+
name: name,
|
|
69
70
|
description: "no description",
|
|
70
71
|
visibility: "private",
|
|
71
72
|
domain: "minecraft",
|
|
@@ -99,18 +100,23 @@ export default class Import extends Command {
|
|
|
99
100
|
task.title = "Created world in cloud";
|
|
100
101
|
},
|
|
101
102
|
},
|
|
103
|
+
{
|
|
104
|
+
title: "Uploading world to cloud",
|
|
105
|
+
task: async (_ctx, task) => {
|
|
106
|
+
await api.uploadWorldFile(slug, world.tarballPath);
|
|
107
|
+
task.title = "Uploaded world to cloud";
|
|
108
|
+
},
|
|
109
|
+
},
|
|
102
110
|
]);
|
|
103
111
|
await tasks.run();
|
|
104
112
|
if (isReimport) {
|
|
105
|
-
this.log(pc.green(`\n✓ World re-imported: ${slug}`));
|
|
113
|
+
this.log(pc.green(`\n✓ World re-imported & uploaded: ${slug}`));
|
|
106
114
|
this.log(pc.dim(` → world.tar.gz updated (config.ts preserved)`));
|
|
107
|
-
this.log(pc.dim(`\nRun ${pc.cyan(`kradle world push ${slug}`)} to upload to cloud.`));
|
|
108
115
|
}
|
|
109
116
|
else {
|
|
110
|
-
this.log(pc.green(`\n✓ World imported: ${slug}`));
|
|
117
|
+
this.log(pc.green(`\n✓ World imported & uploaded: ${slug}`));
|
|
111
118
|
this.log(pc.dim(` → config.ts: ${world.configPath}`));
|
|
112
119
|
this.log(pc.dim(` → world.tar.gz: ${world.tarballPath}`));
|
|
113
|
-
this.log(pc.dim(`\nRun ${pc.cyan(`kradle world push ${slug}`)} to upload to cloud.`));
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
122
|
}
|
package/oclif.manifest.json
CHANGED