sandstone-cli 0.6.4 → 0.6.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  sandstone-cli
2
2
  =============
3
3
 
4
- The CLI for Sandstone - the data pack creation library.
4
+ The CLI for Sandstone - the datapack creation library.
5
5
 
6
6
  [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
7
7
  [![Version](https://img.shields.io/npm/v/sandstone-cli.svg)](https://npmjs.org/package/sandstone-cli)
@@ -19,7 +19,7 @@ $ npm install -g sandstone-cli
19
19
  $ sand COMMAND
20
20
  running command...
21
21
  $ sand (-v|--version|version)
22
- sandstone-cli/0.6.4 linux-x64 node-v16.19.1
22
+ sandstone-cli/0.6.6 linux-x64 node-v16.19.1
23
23
  $ sand --help [COMMAND]
24
24
  USAGE
25
25
  $ sand COMMAND
@@ -52,30 +52,30 @@ OPTIONS
52
52
  -p, --production Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".
53
53
  -v, --verbose Log all resulting resources: functions, advancements...
54
54
 
55
- --autoReload=port Automatically reload your data pack in-game. Requires to open the world to LAN with
55
+ --autoReload=port Automatically reload your datapack in-game. Requires to open the world to LAN with
56
56
  cheats enabled, and to specify the port.
57
57
 
58
58
  --clientPath=clientPath Path of the client folder. Override the value specified in the configuration file.
59
59
 
60
- --description=description Description of the data pack. Override the value specified in the configuration file.
60
+ --description=description Description of the datapack. Override the value specified in the configuration file.
61
61
 
62
62
  --formatVersion=formatVersion Pack format version. Override the value specified in the configuration file.
63
63
 
64
64
  --fullTrace Show the full stack trace on errors.
65
65
 
66
- --name=name Name of the data pack. Override the value specified in the configuration file.
66
+ --name=name Name of the datapack. Override the value specified in the configuration file.
67
67
 
68
68
  --namespace=namespace The default namespace. Override the value specified in the configuration file.
69
69
 
70
- --root Save the data pack & resource pack in the .minecraft/datapacks &
70
+ --root Save the datapack & resource pack in the .minecraft/datapacks &
71
71
  .minecraft/resource_packs folders. Override the value specified in the configuration
72
72
  file.
73
73
 
74
74
  --serverPath=serverPath Path of the server folder. Override the value specified in the configuration file.
75
75
 
76
- --strictErrors Stop data pack compilation on type errors.
76
+ --strictErrors Stop datapack compilation on type errors.
77
77
 
78
- --world=world The world to save the data pack in. Override the value specified in the configuration
78
+ --world=world The world to save the datapack in. Override the value specified in the configuration
79
79
  file.
80
80
 
81
81
  EXAMPLES
@@ -84,7 +84,7 @@ EXAMPLES
84
84
  $ sand build --verbose --dry
85
85
  ```
86
86
 
87
- _See code: [src/commands/build.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.4/src/commands/build.ts)_
87
+ _See code: [src/commands/build.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.6/src/commands/build.ts)_
88
88
 
89
89
  ## `sand create PROJECT-NAME`
90
90
 
@@ -103,7 +103,7 @@ OPTIONS
103
103
  -h, --help show CLI help
104
104
  -n, --namespace=namespace The default namespace that will be used.
105
105
 
106
- -r, --save-root Save the data pack & resource pack in the .minecraft/datapacks &
106
+ -r, --save-root Save the datapack & resource pack in the .minecraft/datapacks &
107
107
  .minecraft/resource_packs folders. Not compatible with --world.
108
108
 
109
109
  -s, --server-path=server-path The server path to write the server-side packs at. Not compatible with --world.
@@ -122,7 +122,7 @@ EXAMPLE
122
122
  $ sand create my-pack
123
123
  ```
124
124
 
125
- _See code: [src/commands/create.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.4/src/commands/create.ts)_
125
+ _See code: [src/commands/create.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.6/src/commands/create.ts)_
126
126
 
127
127
  ## `sand help [COMMAND]`
128
128
 
@@ -164,7 +164,7 @@ EXAMPLES
164
164
  $ sand update --cli --sandstone --skip
165
165
  ```
166
166
 
167
- _See code: [src/commands/update.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.4/src/commands/update.ts)_
167
+ _See code: [src/commands/update.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.6/src/commands/update.ts)_
168
168
 
169
169
  ## `sand watch PATH CONFIG-PATH`
170
170
 
@@ -184,30 +184,30 @@ OPTIONS
184
184
  -p, --production Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".
185
185
  -v, --verbose Log all resulting resources: functions, advancements...
186
186
 
187
- --autoReload=port Automatically reload your data pack in-game. Requires to open the world to LAN with
187
+ --autoReload=port Automatically reload your datapack in-game. Requires to open the world to LAN with
188
188
  cheats enabled, and to specify the port.
189
189
 
190
190
  --clientPath=clientPath Path of the client folder. Override the value specified in the configuration file.
191
191
 
192
- --description=description Description of the data pack. Override the value specified in the configuration file.
192
+ --description=description Description of the datapack. Override the value specified in the configuration file.
193
193
 
194
194
  --formatVersion=formatVersion Pack format version. Override the value specified in the configuration file.
195
195
 
196
196
  --fullTrace Show the full stack trace on errors.
197
197
 
198
- --name=name Name of the data pack. Override the value specified in the configuration file.
198
+ --name=name Name of the datapack. Override the value specified in the configuration file.
199
199
 
200
200
  --namespace=namespace The default namespace. Override the value specified in the configuration file.
201
201
 
202
- --root Save the data pack & resource pack in the .minecraft/datapacks &
202
+ --root Save the datapack & resource pack in the .minecraft/datapacks &
203
203
  .minecraft/resource_packs folders. Override the value specified in the configuration
204
204
  file.
205
205
 
206
206
  --serverPath=serverPath Path of the server folder. Override the value specified in the configuration file.
207
207
 
208
- --strictErrors Stop data pack compilation on type errors.
208
+ --strictErrors Stop datapack compilation on type errors.
209
209
 
210
- --world=world The world to save the data pack in. Override the value specified in the configuration
210
+ --world=world The world to save the datapack in. Override the value specified in the configuration
211
211
  file.
212
212
 
213
213
  EXAMPLES
@@ -216,5 +216,5 @@ EXAMPLES
216
216
  $ sand watch --verbose --dry
217
217
  ```
218
218
 
219
- _See code: [src/commands/watch.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.4/src/commands/watch.ts)_
219
+ _See code: [src/commands/watch.ts](https://github.com/TheMrZZ/sandstone-cli/blob/v0.6.6/src/commands/watch.ts)_
220
220
  <!-- commandsstop -->
@@ -26,7 +26,6 @@ exports.buildProject = void 0;
26
26
  const path_1 = __importDefault(require("path"));
27
27
  const os = __importStar(require("os"));
28
28
  const crypto_1 = __importDefault(require("crypto"));
29
- const util_1 = require("util");
30
29
  const fs_extra_1 = __importDefault(require("fs-extra"));
31
30
  const pretty_error_1 = __importDefault(require("pretty-error"));
32
31
  const klaw_1 = __importDefault(require("klaw"));
@@ -401,16 +400,21 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
401
400
  }
402
401
  }
403
402
  async function archiveOutput(packType) {
404
- const outputPath = path_1.default.join(rootFolder, '.sandstone/output/archives', `${packName}_${packType.type}`);
405
- const archive = new adm_zip_1.default();
406
- await archive.addLocalFolderPromise(outputPath, {});
407
- await archive.writeZipPromise(`${outputPath}.zip`, { overwrite: true });
403
+ const input = path_1.default.join(outputFolder, packType.type);
404
+ if ((await fs_extra_1.default.readdir(input)).length !== 0) {
405
+ const archive = new adm_zip_1.default();
406
+ await archive.addLocalFolderPromise(input, {});
407
+ await archive.writeZipPromise(`${path_1.default.join(outputFolder, 'archives', `${packName}_${packType.type}`)}.zip`, { overwrite: true });
408
+ return true;
409
+ }
410
+ return false;
408
411
  }
409
412
  // TODO: implement linking to make the cache more useful when not archiving.
410
413
  if (!cliOptions.production) {
411
414
  for await (const _packType of packTypes) {
412
415
  const packType = _packType[1];
413
- const outputPath = path_1.default.join(rootFolder, '.sandstone/output', packType.type);
416
+ const outputPath = path_1.default.join(outputFolder, packType.type);
417
+ await fs_extra_1.default.ensureDir(outputPath);
414
418
  if (packType.handleOutput) {
415
419
  await packType.handleOutput('output', async (relativePath, encoding = 'utf8') => await fs_extra_1.default.readFile(path_1.default.join(outputPath, relativePath), encoding), async (relativePath, contents) => {
416
420
  if (contents === undefined) {
@@ -422,8 +426,9 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
422
426
  });
423
427
  }
424
428
  handleResources(packType.type);
429
+ let archivedOutput = false;
425
430
  if (packType.archiveOutput) {
426
- archiveOutput(packType);
431
+ archivedOutput = await archiveOutput(packType);
427
432
  }
428
433
  // Handle client
429
434
  if (!(server && packType.networkSides === 'server')) {
@@ -447,7 +452,9 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
447
452
  catch { }
448
453
  }
449
454
  if (packType.archiveOutput) {
450
- await fs_extra_1.default.copyFile(`${outputPath}.zip`, `${fullClientPath}.zip`);
455
+ if (archivedOutput) {
456
+ await fs_extra_1.default.copyFile(`${path_1.default.join(outputFolder, 'archives', `${packName}_${packType.type}`)}.zip`, `${fullClientPath}.zip`);
457
+ }
451
458
  }
452
459
  else {
453
460
  await fs_extra_1.default.remove(fullClientPath);
@@ -471,7 +478,7 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
471
478
  serverPath = serverPath.replace('$packName$', packName);
472
479
  }
473
480
  catch { }
474
- if (packType.archiveOutput) {
481
+ if (packType.archiveOutput && archivedOutput) {
475
482
  await server.writeFile(await fs_extra_1.default.readFile(`${outputPath}.zip`, 'utf8'), `${serverPath}.zip`);
476
483
  }
477
484
  else {
@@ -488,7 +495,7 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
488
495
  }
489
496
  else {
490
497
  for await (const packType of packTypes) {
491
- const outputPath = path_1.default.join(rootFolder, '.sandstone/output/archives', `${packName}_${packType.type}`);
498
+ const outputPath = path_1.default.join(outputFolder, packType.type);
492
499
  if (packType.handleOutput) {
493
500
  await packType.handleOutput('output', async (relativePath, encoding = 'utf8') => await fs_extra_1.default.readFile(path_1.default.join(outputPath, relativePath), encoding), async (relativePath, contents) => {
494
501
  if (contents === undefined) {
@@ -508,9 +515,9 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
508
515
  // Delete old files that aren't cached anymore
509
516
  const oldFilesNames = new Set(Object.keys(cache));
510
517
  Object.keys(newCache).forEach(name => oldFilesNames.delete(name));
511
- await Promise.allSettled([...oldFilesNames.values()].map(name => {
512
- return (0, util_1.promisify)(fs_extra_1.default.rm)(path_1.default.join(outputFolder, name));
513
- }));
518
+ for await (const name of oldFilesNames) {
519
+ await fs_extra_1.default.rm(path_1.default.join(outputFolder, name));
520
+ }
514
521
  await (0, delete_empty_1.default)(outputFolder);
515
522
  // Override old cache
516
523
  cache = newCache;
@@ -31,7 +31,7 @@ class Create extends command_1.Command {
31
31
  type: 'input',
32
32
  default: false,
33
33
  })) === true ? 'library' : 'pack';
34
- const versions = [['0.13.6', '0.5.4'], ['0.14.0-alpha.13', '0.5.4'], ['0.14.0-alpha.19', '0.6.2']];
34
+ const versions = [['0.13.6', '0.5.4'], ['0.14.0-alpha.13', '0.5.4'], ['0.14.0-alpha.20', '0.6.5']];
35
35
  const stableIndex = 0;
36
36
  const { sandstoneVersion } = await inquirer_1.default.prompt({
37
37
  name: 'sandstoneVersion',
@@ -121,15 +121,16 @@ class Create extends command_1.Command {
121
121
  message: 'What package manager do you want to use? >',
122
122
  type: 'list',
123
123
  choices: ['npm', 'yarn'],
124
- })).useYarn === 'yarn';
124
+ })).useYarn;
125
125
  }
126
+ console.log(useYarn);
126
127
  fs_extra_1.default.mkdirSync(projectPath);
127
128
  // Create project & install dependencies
128
129
  this.log((0, chalk_1.default) `Installing {rgb(229,193,0) sandstone@${sandstoneVersion[0]}}, {rgb(229,193,0) sandstone-cli@${sandstoneVersion[1]}} and {cyan typescript} using {cyan ${useYarn ? 'yarn' : 'npm'}}.`);
129
130
  const exec = (cmd) => (0, child_process_1.execSync)(cmd, { cwd: projectPath });
130
131
  exec('git clone https://github.com/sandstone-mc/sandstone-template.git .');
131
132
  exec(`git checkout ${projectType}-${sandstoneVersion[0]}`);
132
- exec('rm -rf .git');
133
+ exec('npx rimraf -rf .git');
133
134
  exec(`${useYarn ? 'yarn' : 'npm'} install`);
134
135
  // TODO: Make profiles for either packs or libraries
135
136
  const configPath = path_1.default.join(projectPath, `${projectType === 'library' ? 'test/' : ''}sandstone.config.ts`);
@@ -173,7 +174,7 @@ Create.flags = {
173
174
  version: command_1.flags.string({ char: 'v', env: 'SANDSTONE_VERSION', description: 'What version of Sandstone you\'d like to create a project for.' }),
174
175
  'pack-name': command_1.flags.string({ char: 'd', env: 'PACK_NAME', description: 'The name of the pack(s).' }),
175
176
  namespace: command_1.flags.string({ char: 'n', env: 'NAMESPACE', description: 'The default namespace that will be used.' }),
176
- 'save-root': command_1.flags.boolean({ char: 'r', env: 'SAVE_ROOT', description: 'Save the data pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Not compatible with --world.', exclusive: ['world'] }),
177
+ 'save-root': command_1.flags.boolean({ char: 'r', env: 'SAVE_ROOT', description: 'Save the datapack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Not compatible with --world.', exclusive: ['world'] }),
177
178
  world: command_1.flags.string({ char: 'w', env: 'WORLD', description: 'The world to save the packs in. Not compatible with --save-root or --server', exclusive: ['save-root', 'server'] }),
178
179
  'server-path': command_1.flags.string({ char: 's', env: 'SERVER_PATH', description: 'The server path to write the server-side packs at. Not compatible with --world.', exclusive: ['world'] }),
179
180
  'client-path': command_1.flags.string({ char: 'c', env: 'CLIENT_PATH', description: 'The client path to write packs at.' }),
@@ -25,7 +25,7 @@ class Watch extends command_1.Command {
25
25
  });
26
26
  }
27
27
  catch (e) {
28
- console.log(chalk_1.default.rgb(255, 204, 0) `Failed to connect to localhost:${flags.autoReload}. The data pack won't be auto reloaded.`);
28
+ console.log(chalk_1.default.rgb(255, 204, 0) `Failed to connect to localhost:${flags.autoReload}. The datapack won't be auto reloaded.`);
29
29
  }
30
30
  }
31
31
  const folders = (0, utils_1.getProjectFolders)(args.path);
@@ -84,18 +84,18 @@ Watch.flags = {
84
84
  dry: command_1.flags.boolean({ char: 'd', description: 'Do not save the pack. Mostly useful with `verbose`.' }),
85
85
  verbose: command_1.flags.boolean({ char: 'v', description: 'Log all resulting resources: functions, advancements...' }),
86
86
  namespace: command_1.flags.string({ description: 'The default namespace. Override the value specified in the configuration file.' }),
87
- world: command_1.flags.string({ description: 'The world to save the data pack in. Override the value specified in the configuration file.' }),
88
- root: command_1.flags.boolean({ description: 'Save the data pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.' }),
87
+ world: command_1.flags.string({ description: 'The world to save the datapack in. Override the value specified in the configuration file.' }),
88
+ root: command_1.flags.boolean({ description: 'Save the datapack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.' }),
89
89
  clientPath: command_1.flags.string({ name: 'client-path', description: 'Path of the client folder. Override the value specified in the configuration file.' }),
90
90
  serverPath: command_1.flags.string({ name: 'server-path', description: 'Path of the server folder. Override the value specified in the configuration file.' }),
91
91
  // TODO: ssh
92
- name: command_1.flags.string({ description: 'Name of the data pack. Override the value specified in the configuration file.' }),
93
- description: command_1.flags.string({ description: 'Description of the data pack. Override the value specified in the configuration file.' }),
92
+ name: command_1.flags.string({ description: 'Name of the datapack. Override the value specified in the configuration file.' }),
93
+ description: command_1.flags.string({ description: 'Description of the datapack. Override the value specified in the configuration file.' }),
94
94
  formatVersion: command_1.flags.integer({ name: 'format', description: 'Pack format version. Override the value specified in the configuration file.' }),
95
95
  fullTrace: command_1.flags.boolean({ name: 'full-trace', description: 'Show the full stack trace on errors.' }),
96
- strictErrors: command_1.flags.boolean({ description: 'Stop data pack compilation on type errors.', default: false }),
96
+ strictErrors: command_1.flags.boolean({ description: 'Stop datapack compilation on type errors.', default: false }),
97
97
  production: command_1.flags.boolean({ char: 'p', description: 'Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".', default: false }),
98
- autoReload: command_1.flags.integer({ description: 'Automatically reload your data pack in-game. Requires to open the world to LAN with cheats enabled, and to specify the port.', helpValue: 'port' }),
98
+ autoReload: command_1.flags.integer({ description: 'Automatically reload your datapack in-game. Requires to open the world to LAN with cheats enabled, and to specify the port.', helpValue: 'port' }),
99
99
  };
100
100
  Watch.args = [{
101
101
  name: 'path',
@@ -1 +1 @@
1
- {"version":"0.6.4","commands":{"build":{"id":"build","description":"Build the packs. ⛏","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand build","$ sand build --verbose","$ sand build --verbose --dry"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"dry":{"name":"dry","type":"boolean","char":"d","description":"Do not save the pack. Mostly useful with `verbose`.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Log all resulting resources: functions, advancements...","allowNo":false},"namespace":{"name":"namespace","type":"option","description":"The default namespace. Override the value specified in the configuration file."},"world":{"name":"world","type":"option","description":"The world to save the data pack in. Override the value specified in the configuration file."},"root":{"name":"root","type":"boolean","description":"Save the data pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.","allowNo":false},"clientPath":{"name":"clientPath","type":"option","description":"Path of the client folder. Override the value specified in the configuration file."},"serverPath":{"name":"serverPath","type":"option","description":"Path of the server folder. Override the value specified in the configuration file."},"name":{"name":"name","type":"option","description":"Name of the data pack. Override the value specified in the configuration file."},"description":{"name":"description","type":"option","description":"Description of the data pack. Override the value specified in the configuration file."},"formatVersion":{"name":"formatVersion","type":"option","description":"Pack format version. Override the value specified in the configuration file."},"fullTrace":{"name":"fullTrace","type":"boolean","description":"Show the full stack trace on errors.","allowNo":false},"strictErrors":{"name":"strictErrors","type":"boolean","description":"Stop data pack compilation on type errors.","allowNo":false},"production":{"name":"production","type":"boolean","char":"p","description":"Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to \"production\".","allowNo":false},"autoReload":{"name":"autoReload","type":"option","description":"Automatically reload your data pack in-game. Requires to open the world to LAN with cheats enabled, and to specify the port.","helpValue":"port"}},"args":[{"name":"path","description":"Path of the folder containing source files.","required":true,"default":"./src"},{"name":"config-path","description":"Path of the sandstone.config.ts folder.","required":true,"default":"."}]},"create":{"id":"create","description":"Create a new Sandstone project.","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand create my-pack"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"yarn":{"name":"yarn","type":"boolean","description":"Use yarn instead of npm.","allowNo":false},"npm":{"name":"npm","type":"boolean","description":"Use npm.","allowNo":false},"library":{"name":"library","type":"boolean","char":"t","description":"Whether the project will be a library for use in other Sandstone projects.","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"What version of Sandstone you'd like to create a project for."},"pack-name":{"name":"pack-name","type":"option","char":"d","description":"The name of the pack(s)."},"namespace":{"name":"namespace","type":"option","char":"n","description":"The default namespace that will be used."},"save-root":{"name":"save-root","type":"boolean","char":"r","description":"Save the data pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Not compatible with --world.","allowNo":false},"world":{"name":"world","type":"option","char":"w","description":"The world to save the packs in. Not compatible with --save-root or --server"},"server-path":{"name":"server-path","type":"option","char":"s","description":"The server path to write the server-side packs at. Not compatible with --world."},"client-path":{"name":"client-path","type":"option","char":"c","description":"The client path to write packs at."}},"args":[{"name":"project-name","description":"Name of the project folder. This is not the name of the output pack(s).","required":true}]},"update":{"id":"update","description":"Update Sandstone & Sandstone-CLI.","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand update","$ sand update --cli","$ sand update --sandstone","$ sand update --cli --sandstone --skip"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"cli":{"name":"cli","type":"boolean","description":"Update the Sandstone CLI without asking.","allowNo":false},"sandstone":{"name":"sandstone","type":"boolean","description":"Update the current Sandstone version without asking.","allowNo":false},"skip":{"name":"skip","type":"boolean","description":"Skip all interactive prompts and refuse them.","allowNo":false},"yarn":{"name":"yarn","type":"boolean","description":"Use yarn to install the updates.","allowNo":false},"npm":{"name":"npm","type":"boolean","description":"Use npm to install the updates.","allowNo":false}},"args":[]},"watch":{"id":"watch","description":"Build the packs, and rebuild them on file change. ⛏","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand watch","$ sand watch --verbose","$ sand watch --verbose --dry"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"dry":{"name":"dry","type":"boolean","char":"d","description":"Do not save the pack. Mostly useful with `verbose`.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Log all resulting resources: functions, advancements...","allowNo":false},"namespace":{"name":"namespace","type":"option","description":"The default namespace. Override the value specified in the configuration file."},"world":{"name":"world","type":"option","description":"The world to save the data pack in. Override the value specified in the configuration file."},"root":{"name":"root","type":"boolean","description":"Save the data pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.","allowNo":false},"clientPath":{"name":"clientPath","type":"option","description":"Path of the client folder. Override the value specified in the configuration file."},"serverPath":{"name":"serverPath","type":"option","description":"Path of the server folder. Override the value specified in the configuration file."},"name":{"name":"name","type":"option","description":"Name of the data pack. Override the value specified in the configuration file."},"description":{"name":"description","type":"option","description":"Description of the data pack. Override the value specified in the configuration file."},"formatVersion":{"name":"formatVersion","type":"option","description":"Pack format version. Override the value specified in the configuration file."},"fullTrace":{"name":"fullTrace","type":"boolean","description":"Show the full stack trace on errors.","allowNo":false},"strictErrors":{"name":"strictErrors","type":"boolean","description":"Stop data pack compilation on type errors.","allowNo":false},"production":{"name":"production","type":"boolean","char":"p","description":"Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to \"production\".","allowNo":false},"autoReload":{"name":"autoReload","type":"option","description":"Automatically reload your data pack in-game. Requires to open the world to LAN with cheats enabled, and to specify the port.","helpValue":"port"}},"args":[{"name":"path","description":"Path of the folder containing source files.","required":true,"default":"./src"},{"name":"config-path","description":"Path of the sandstone.config.ts folder.","required":true,"default":"."}]}}}
1
+ {"version":"0.6.6","commands":{"build":{"id":"build","description":"Build the packs. ⛏","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand build","$ sand build --verbose","$ sand build --verbose --dry"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"dry":{"name":"dry","type":"boolean","char":"d","description":"Do not save the pack. Mostly useful with `verbose`.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Log all resulting resources: functions, advancements...","allowNo":false},"namespace":{"name":"namespace","type":"option","description":"The default namespace. Override the value specified in the configuration file."},"world":{"name":"world","type":"option","description":"The world to save the datapack in. Override the value specified in the configuration file."},"root":{"name":"root","type":"boolean","description":"Save the datapack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.","allowNo":false},"clientPath":{"name":"clientPath","type":"option","description":"Path of the client folder. Override the value specified in the configuration file."},"serverPath":{"name":"serverPath","type":"option","description":"Path of the server folder. Override the value specified in the configuration file."},"name":{"name":"name","type":"option","description":"Name of the datapack. Override the value specified in the configuration file."},"description":{"name":"description","type":"option","description":"Description of the datapack. Override the value specified in the configuration file."},"formatVersion":{"name":"formatVersion","type":"option","description":"Pack format version. Override the value specified in the configuration file."},"fullTrace":{"name":"fullTrace","type":"boolean","description":"Show the full stack trace on errors.","allowNo":false},"strictErrors":{"name":"strictErrors","type":"boolean","description":"Stop datapack compilation on type errors.","allowNo":false},"production":{"name":"production","type":"boolean","char":"p","description":"Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to \"production\".","allowNo":false},"autoReload":{"name":"autoReload","type":"option","description":"Automatically reload your datapack in-game. Requires to open the world to LAN with cheats enabled, and to specify the port.","helpValue":"port"}},"args":[{"name":"path","description":"Path of the folder containing source files.","required":true,"default":"./src"},{"name":"config-path","description":"Path of the sandstone.config.ts folder.","required":true,"default":"."}]},"create":{"id":"create","description":"Create a new Sandstone project.","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand create my-pack"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"yarn":{"name":"yarn","type":"boolean","description":"Use yarn instead of npm.","allowNo":false},"npm":{"name":"npm","type":"boolean","description":"Use npm.","allowNo":false},"library":{"name":"library","type":"boolean","char":"t","description":"Whether the project will be a library for use in other Sandstone projects.","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"What version of Sandstone you'd like to create a project for."},"pack-name":{"name":"pack-name","type":"option","char":"d","description":"The name of the pack(s)."},"namespace":{"name":"namespace","type":"option","char":"n","description":"The default namespace that will be used."},"save-root":{"name":"save-root","type":"boolean","char":"r","description":"Save the datapack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Not compatible with --world.","allowNo":false},"world":{"name":"world","type":"option","char":"w","description":"The world to save the packs in. Not compatible with --save-root or --server"},"server-path":{"name":"server-path","type":"option","char":"s","description":"The server path to write the server-side packs at. Not compatible with --world."},"client-path":{"name":"client-path","type":"option","char":"c","description":"The client path to write packs at."}},"args":[{"name":"project-name","description":"Name of the project folder. This is not the name of the output pack(s).","required":true}]},"update":{"id":"update","description":"Update Sandstone & Sandstone-CLI.","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand update","$ sand update --cli","$ sand update --sandstone","$ sand update --cli --sandstone --skip"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"cli":{"name":"cli","type":"boolean","description":"Update the Sandstone CLI without asking.","allowNo":false},"sandstone":{"name":"sandstone","type":"boolean","description":"Update the current Sandstone version without asking.","allowNo":false},"skip":{"name":"skip","type":"boolean","description":"Skip all interactive prompts and refuse them.","allowNo":false},"yarn":{"name":"yarn","type":"boolean","description":"Use yarn to install the updates.","allowNo":false},"npm":{"name":"npm","type":"boolean","description":"Use npm to install the updates.","allowNo":false}},"args":[]},"watch":{"id":"watch","description":"Build the packs, and rebuild them on file change. ⛏","pluginName":"sandstone-cli","pluginType":"core","aliases":[],"examples":["$ sand watch","$ sand watch --verbose","$ sand watch --verbose --dry"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"dry":{"name":"dry","type":"boolean","char":"d","description":"Do not save the pack. Mostly useful with `verbose`.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Log all resulting resources: functions, advancements...","allowNo":false},"namespace":{"name":"namespace","type":"option","description":"The default namespace. Override the value specified in the configuration file."},"world":{"name":"world","type":"option","description":"The world to save the datapack in. Override the value specified in the configuration file."},"root":{"name":"root","type":"boolean","description":"Save the datapack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.","allowNo":false},"clientPath":{"name":"clientPath","type":"option","description":"Path of the client folder. Override the value specified in the configuration file."},"serverPath":{"name":"serverPath","type":"option","description":"Path of the server folder. Override the value specified in the configuration file."},"name":{"name":"name","type":"option","description":"Name of the datapack. Override the value specified in the configuration file."},"description":{"name":"description","type":"option","description":"Description of the datapack. Override the value specified in the configuration file."},"formatVersion":{"name":"formatVersion","type":"option","description":"Pack format version. Override the value specified in the configuration file."},"fullTrace":{"name":"fullTrace","type":"boolean","description":"Show the full stack trace on errors.","allowNo":false},"strictErrors":{"name":"strictErrors","type":"boolean","description":"Stop datapack compilation on type errors.","allowNo":false},"production":{"name":"production","type":"boolean","char":"p","description":"Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to \"production\".","allowNo":false},"autoReload":{"name":"autoReload","type":"option","description":"Automatically reload your datapack in-game. Requires to open the world to LAN with cheats enabled, and to specify the port.","helpValue":"port"}},"args":[{"name":"path","description":"Path of the folder containing source files.","required":true,"default":"./src"},{"name":"config-path","description":"Path of the sandstone.config.ts folder.","required":true,"default":"."}]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sandstone-cli",
3
- "description": "The CLI for Sandstone - the data pack creation library.",
4
- "version": "0.6.4",
3
+ "description": "The CLI for Sandstone - the datapack creation library.",
4
+ "version": "0.6.6",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "TheMrZZ - Florian ERNST",
@@ -24,7 +24,7 @@
24
24
  "@oclif/plugin-warn-if-update-available": "^1.7.0",
25
25
  "@types/adm-zip": "^0.5.0",
26
26
  "@types/delete-empty": "^3.0.2",
27
- "@types/node": "^18.14.2",
27
+ "@types/node": "^18.15.0",
28
28
  "@types/semver": "^7.3.4",
29
29
  "adm-zip": "^0.5.10",
30
30
  "chalk": "^4.1.0",