vcpm 0.4.0 → 0.4.2
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 +8 -13
- package/dist/commands/build/index.js +21 -3
- package/oclif.manifest.json +1 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -20,22 +20,17 @@ new project and build it for release
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
### With NPM
|
|
23
|
+
|
|
23
24
|
```bash
|
|
24
25
|
npm i -g vcpm
|
|
25
26
|
```
|
|
26
|
-
### Standalone
|
|
27
|
-
#### Windows
|
|
28
|
-
- [Windows-arm64 (.exe)](https://github.com/TraumDE/vcpm/releases/download/0.4.0/vcpm-v0.4.0-ef8c1e4-arm64.exe)
|
|
29
|
-
- [Windows-x64 (.exe)](https://github.com/TraumDE/vcpm/releases/download/0.4.0/vcpm-v0.4.0-ef8c1e4-x64.exe)
|
|
30
|
-
#### Linux
|
|
31
|
-
- [Deb-amd64 (.deb)](https://github.com/TraumDE/vcpm/releases/download/0.4.0/vcpm_0.4.0.ef8c1e4-1_amd64.deb)
|
|
32
|
-
- [Deb-arm64 (.deb)](https://github.com/TraumDE/vcpm/releases/download/0.4.0/vcpm_0.4.0.ef8c1e4-1_arm64.deb)
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
### Installers
|
|
29
|
+
|
|
30
|
+
You can install vcpm with installer for your OS, find it in latest release
|
|
31
|
+
[Watch here](https://github.com/TraumDE/vcpm/releases/latest)
|
|
37
32
|
|
|
38
|
-
|
|
33
|
+
Standalone tarballs can be found in latest release [Watch here](https://github.com/TraumDE/vcpm/releases/latest)
|
|
39
34
|
|
|
40
35
|
## Usage
|
|
41
36
|
|
|
@@ -112,7 +107,6 @@ EXAMPLES
|
|
|
112
107
|
|
|
113
108
|
### Plans
|
|
114
109
|
|
|
115
|
-
- [ ] Made standalone verison
|
|
116
110
|
- [ ] Package management function
|
|
117
111
|
- [ ] Create new project command
|
|
118
112
|
- [ ] More features coming soon
|
|
@@ -120,6 +114,7 @@ EXAMPLES
|
|
|
120
114
|
|
|
121
115
|
### Ready
|
|
122
116
|
|
|
117
|
+
- [x] Made standalone verison
|
|
123
118
|
- [x] Building project for production and development
|
|
124
119
|
- [x] Autocomplete for crossplaforms
|
|
125
120
|
|
|
@@ -140,7 +135,7 @@ EXAMPLES
|
|
|
140
135
|
|
|
141
136
|
### Linux
|
|
142
137
|
|
|
143
|
-
- Arch Linux ✅ - 0.
|
|
138
|
+
- Arch Linux ✅ - 0.4.0
|
|
144
139
|
|
|
145
140
|
### MacOS
|
|
146
141
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { BlobWriter, Uint8ArrayReader, ZipWriter } from '@zip.js/zip.js';
|
|
3
3
|
import { glob } from 'glob';
|
|
4
4
|
import { Buffer } from 'node:buffer';
|
|
5
5
|
import { promises as fs } from 'node:fs';
|
|
@@ -13,7 +13,7 @@ export class Build extends Command {
|
|
|
13
13
|
}
|
|
14
14
|
async addFile(file, zipWriter) {
|
|
15
15
|
const relativePath = file.relative();
|
|
16
|
-
await zipWriter.add(relativePath, new
|
|
16
|
+
await zipWriter.add(relativePath, new Uint8ArrayReader(await fs.readFile(relativePath)));
|
|
17
17
|
}
|
|
18
18
|
async build() {
|
|
19
19
|
const packageInfo = await this.readPackage();
|
|
@@ -61,11 +61,29 @@ export class Build extends Command {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
const packageJsonParsed = JSON.parse(await fs.readFile('package.json', 'utf8'));
|
|
64
|
-
if (!packageJsonParsed.id
|
|
64
|
+
if (!packageJsonParsed.id || !packageJsonParsed.version) {
|
|
65
65
|
this.error('Its not voxel core content pack', {
|
|
66
66
|
code: 'EINVAL',
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
+
const validPackageId = () => {
|
|
70
|
+
const idRegex = /^[a-zA-Z_][a-zA-Z0-9_]{1,23}$/;
|
|
71
|
+
return idRegex.test(packageJsonParsed.id);
|
|
72
|
+
};
|
|
73
|
+
const validPackageVersion = () => {
|
|
74
|
+
const versionRegex = /^\d+\.\d+\.\d+$/;
|
|
75
|
+
return versionRegex.test(packageJsonParsed.version);
|
|
76
|
+
};
|
|
77
|
+
if (!validPackageId()) {
|
|
78
|
+
this.error('Package ID must start with a letter or underscore, contain only letters, numbers, and underscores, and be 2-24 characters long', {
|
|
79
|
+
code: 'EINVAL',
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (!validPackageVersion()) {
|
|
83
|
+
this.error('Version must be in the format X.Y.Z', {
|
|
84
|
+
code: 'EINVAL',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
69
87
|
return {
|
|
70
88
|
id: packageJsonParsed.id,
|
|
71
89
|
version: packageJsonParsed.version,
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vcpm",
|
|
3
3
|
"description": "VCPM - Voxel Core Project Manager",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"author": "Eugene301|TraumDE",
|
|
6
6
|
"bin": "./bin/run.js",
|
|
7
7
|
"bugs": "https://github.com/TraumDE/vcpm/issues",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@oclif/core": "^4",
|
|
10
|
-
"@oclif/plugin-autocomplete": "^3.2.
|
|
11
|
-
"@zip.js/zip.js": "^2.8.
|
|
12
|
-
"glob": "^13.0.
|
|
9
|
+
"@oclif/core": "^4.8.0",
|
|
10
|
+
"@oclif/plugin-autocomplete": "^3.2.40",
|
|
11
|
+
"@zip.js/zip.js": "^2.8.16",
|
|
12
|
+
"glob": "^13.0.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@eslint/compat": "^
|
|
15
|
+
"@eslint/compat": "^2.0.2",
|
|
16
16
|
"@oclif/prettier-config": "^0.2.1",
|
|
17
|
-
"@oclif/test": "^4",
|
|
18
|
-
"@types/chai": "^
|
|
19
|
-
"@types/mocha": "^10",
|
|
20
|
-
"@types/node": "^
|
|
21
|
-
"chai": "^
|
|
22
|
-
"eslint": "^9",
|
|
23
|
-
"eslint-config-oclif": "^6",
|
|
24
|
-
"eslint-config-prettier": "^10",
|
|
25
|
-
"mocha": "^
|
|
26
|
-
"oclif": "^4",
|
|
27
|
-
"shx": "^0.
|
|
28
|
-
"ts-node": "^10",
|
|
29
|
-
"typescript": "^5"
|
|
17
|
+
"@oclif/test": "^4.1.16",
|
|
18
|
+
"@types/chai": "^5.2.3",
|
|
19
|
+
"@types/mocha": "^10.0.10",
|
|
20
|
+
"@types/node": "^25.2.0",
|
|
21
|
+
"chai": "^6.2.2",
|
|
22
|
+
"eslint": "^9.39.2",
|
|
23
|
+
"eslint-config-oclif": "^6.0.137",
|
|
24
|
+
"eslint-config-prettier": "^10.1.8",
|
|
25
|
+
"mocha": "^11.7.5",
|
|
26
|
+
"oclif": "^4.22.73",
|
|
27
|
+
"shx": "^0.4.0",
|
|
28
|
+
"ts-node": "^10.9.2",
|
|
29
|
+
"typescript": "^5.9.3"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18.4.0"
|