sandstone-cli 0.6.5 → 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 +5 -5
- package/lib/build/buildProject.js +3 -4
- package/lib/commands/create.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -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.
|
|
22
|
+
sandstone-cli/0.6.6 linux-x64 node-v16.19.1
|
|
23
23
|
$ sand --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ sand COMMAND
|
|
@@ -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.
|
|
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
|
|
|
@@ -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.
|
|
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.
|
|
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
|
|
|
@@ -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.
|
|
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"));
|
|
@@ -516,9 +515,9 @@ async function _buildProject(cliOptions, { absProjectFolder, rootFolder, sandsto
|
|
|
516
515
|
// Delete old files that aren't cached anymore
|
|
517
516
|
const oldFilesNames = new Set(Object.keys(cache));
|
|
518
517
|
Object.keys(newCache).forEach(name => oldFilesNames.delete(name));
|
|
519
|
-
await
|
|
520
|
-
|
|
521
|
-
}
|
|
518
|
+
for await (const name of oldFilesNames) {
|
|
519
|
+
await fs_extra_1.default.rm(path_1.default.join(outputFolder, name));
|
|
520
|
+
}
|
|
522
521
|
await (0, delete_empty_1.default)(outputFolder);
|
|
523
522
|
// Override old cache
|
|
524
523
|
cache = newCache;
|
package/lib/commands/create.js
CHANGED
|
@@ -121,8 +121,9 @@ 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
|
|
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'}}.`);
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.6.
|
|
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
3
|
"description": "The CLI for Sandstone - the datapack creation library.",
|
|
4
|
-
"version": "0.6.
|
|
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.
|
|
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",
|