@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.
@@ -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: slug,
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
  }
@@ -1139,5 +1139,5 @@
1139
1139
  ]
1140
1140
  }
1141
1141
  },
1142
- "version": "0.2.6"
1142
+ "version": "0.2.7"
1143
1143
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kradle/cli",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Kradle's CLI. Manage challenges, experiments, agents and more!",
5
5
  "keywords": [
6
6
  "cli"