vyriy 0.5.3 → 0.5.4
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 +34 -27
- package/args.js +5 -29
- package/cli.js +10 -9
- package/package.json +6 -6
- package/types.d.ts +3 -11
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ yarn global add vyriy
|
|
|
28
28
|
vyriy create [name] Create a new Vyriy project
|
|
29
29
|
vyriy create . Initialise a new Vyriy project in the current directory
|
|
30
30
|
vyriy dist Prepare dist package metadata without publishing to npm
|
|
31
|
-
vyriy static [dir] Serve a static directory (defaults to
|
|
31
|
+
vyriy static [dir] Serve a static directory (defaults to .)
|
|
32
32
|
vyriy check Check local environment (Node.js and Yarn versions)
|
|
33
33
|
vyriy --help, -h Show help
|
|
34
34
|
vyriy --version, -v Show version
|
|
@@ -71,6 +71,12 @@ vyriy create --no-verify Install dependencies without running checks
|
|
|
71
71
|
Validates Node.js and Yarn versions against the engine requirements declared in
|
|
72
72
|
`package.json`.
|
|
73
73
|
|
|
74
|
+
```bash
|
|
75
|
+
vyriy check
|
|
76
|
+
vyriy check --help
|
|
77
|
+
vyriy check --version
|
|
78
|
+
```
|
|
79
|
+
|
|
74
80
|
### `dist`
|
|
75
81
|
|
|
76
82
|
Prepares every package inside the `dist/` directory for npm publishing:
|
|
@@ -80,44 +86,45 @@ Prepares every package inside the `dist/` directory for npm publishing:
|
|
|
80
86
|
- Copies README, LICENSE, and AGENTS.md
|
|
81
87
|
- Makes bin files executable
|
|
82
88
|
|
|
89
|
+
```bash
|
|
90
|
+
vyriy dist
|
|
91
|
+
vyriy dist --help
|
|
92
|
+
vyriy dist --version
|
|
93
|
+
```
|
|
94
|
+
|
|
83
95
|
### `static`
|
|
84
96
|
|
|
85
|
-
Starts the static server command
|
|
86
|
-
|
|
97
|
+
Starts the reusable `@vyriy/static` server command:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
vyriy static
|
|
101
|
+
vyriy static public
|
|
102
|
+
vyriy static --port 3000 dist
|
|
103
|
+
vyriy static --help
|
|
104
|
+
vyriy static --version
|
|
105
|
+
```
|
|
87
106
|
|
|
88
107
|
## Presets
|
|
89
108
|
|
|
90
109
|
Registered presets:
|
|
91
110
|
|
|
92
|
-
| Key
|
|
93
|
-
|
|
|
94
|
-
| `base`
|
|
95
|
-
| `library`
|
|
96
|
-
| `api`
|
|
97
|
-
| `ssr`
|
|
98
|
-
| `ssg`
|
|
99
|
-
| `spa`
|
|
100
|
-
| `rest`
|
|
101
|
-
| `gql`
|
|
102
|
-
| `mfe`
|
|
111
|
+
| Key | Description |
|
|
112
|
+
| ----------- | ------------------------------------------------- |
|
|
113
|
+
| `base` | Preset to create minimal monorepo with configs |
|
|
114
|
+
| `library` | Preset to create js/react library |
|
|
115
|
+
| `api` | Preset to create simple API |
|
|
116
|
+
| `ssr` | Preset to create Server Side Rendering (SSR) API |
|
|
117
|
+
| `ssg` | Preset to create Static site generation (SSG) |
|
|
118
|
+
| `spa` | Preset to create Single-page application (SPA) |
|
|
119
|
+
| `rest` | Preset to create simple REST API |
|
|
120
|
+
| `gql` | Preset to create GraphQL API |
|
|
121
|
+
| `mfe` | Preset to create Micro-frontend (MFE) application |
|
|
122
|
+
| `fullstack` | Preset to create Fullstack React app with SSR |
|
|
103
123
|
|
|
104
124
|
Registered presets are selectable by the wizard. In-progress presets exist as
|
|
105
125
|
source modules and are expected to become selectable as their generated project
|
|
106
126
|
shape is finalized.
|
|
107
127
|
|
|
108
|
-
## Providers
|
|
109
|
-
|
|
110
|
-
Provider selections add files to the generated project.
|
|
111
|
-
|
|
112
|
-
| Preset | CI/CD providers | Deploy providers |
|
|
113
|
-
| --------- | ------------------ | ---------------- |
|
|
114
|
-
| `base` | `gitlab`, `github` | none |
|
|
115
|
-
| `library` | `gitlab`, `github` | none |
|
|
116
|
-
| `api` | `gitlab`, `github` | none |
|
|
117
|
-
| `ssr` | `gitlab`, `github` | none |
|
|
118
|
-
| `ssg` | `gitlab`, `github` | none |
|
|
119
|
-
| `spa` | `gitlab`, `github` | none |
|
|
120
|
-
|
|
121
128
|
## API
|
|
122
129
|
|
|
123
130
|
```ts
|
package/args.js
CHANGED
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
export const parseArgs = (args) => {
|
|
2
|
+
const [command = '', ...commandArgs] = args;
|
|
3
|
+
if (command === 'check' || command === 'create' || command === 'dist' || command === 'static') {
|
|
4
|
+
return { type: command, args: commandArgs };
|
|
5
|
+
}
|
|
2
6
|
if (args.includes('--help') || args.includes('-h')) {
|
|
3
7
|
return { type: 'help' };
|
|
4
8
|
}
|
|
5
9
|
if (args.includes('--version') || args.includes('-v')) {
|
|
6
10
|
return { type: 'version' };
|
|
7
11
|
}
|
|
8
|
-
const [command = '', ...commandArgs] = args;
|
|
9
12
|
if (!command) {
|
|
10
13
|
return { type: 'help' };
|
|
11
14
|
}
|
|
12
|
-
|
|
13
|
-
return { type: 'dist' };
|
|
14
|
-
}
|
|
15
|
-
if (command === 'check') {
|
|
16
|
-
return { type: 'check' };
|
|
17
|
-
}
|
|
18
|
-
if (command === 'static') {
|
|
19
|
-
const directory = commandArgs.find((arg) => !arg.startsWith('-')) ?? 'dist';
|
|
20
|
-
return { type: 'static', directory };
|
|
21
|
-
}
|
|
22
|
-
if (command !== 'create') {
|
|
23
|
-
return { type: 'unknown', command };
|
|
24
|
-
}
|
|
25
|
-
const dryRun = commandArgs.includes('--dry-run');
|
|
26
|
-
const overwrite = commandArgs.includes('--overwrite');
|
|
27
|
-
const skipExisting = commandArgs.includes('--skip-existing');
|
|
28
|
-
const install = !commandArgs.includes('--no-install');
|
|
29
|
-
const verify = install && !commandArgs.includes('--no-verify');
|
|
30
|
-
const directory = commandArgs.find((arg) => !arg.startsWith('-')) ?? '';
|
|
31
|
-
return {
|
|
32
|
-
type: 'create',
|
|
33
|
-
directory,
|
|
34
|
-
dryRun,
|
|
35
|
-
overwrite,
|
|
36
|
-
skipExisting,
|
|
37
|
-
install,
|
|
38
|
-
verify,
|
|
39
|
-
};
|
|
15
|
+
return { type: 'unknown', command };
|
|
40
16
|
};
|
package/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ Usage:
|
|
|
6
6
|
vyriy create [name] Create a new Vyriy project
|
|
7
7
|
vyriy create . Initialize a new Vyriy project in the current directory
|
|
8
8
|
vyriy dist Prepare dist package metadata without publishing to npm
|
|
9
|
-
vyriy static [dir] Serve a static directory (defaults to
|
|
9
|
+
vyriy static [dir] Serve a static directory (defaults to .)
|
|
10
10
|
vyriy check Check local environment
|
|
11
11
|
vyriy --help, -h Show help
|
|
12
12
|
vyriy --version, -v Show version
|
|
@@ -25,6 +25,7 @@ Examples:
|
|
|
25
25
|
vyriy create . --no-verify
|
|
26
26
|
vyriy dist
|
|
27
27
|
vyriy static
|
|
28
|
+
vyriy static --port 3000 dist
|
|
28
29
|
vyriy static dist
|
|
29
30
|
vyriy check`;
|
|
30
31
|
export const cli = async (args = []) => {
|
|
@@ -39,23 +40,23 @@ export const cli = async (args = []) => {
|
|
|
39
40
|
process.exitCode = 0;
|
|
40
41
|
break;
|
|
41
42
|
case 'dist': {
|
|
42
|
-
const {
|
|
43
|
-
|
|
43
|
+
const { runDistCli } = await import('@vyriy/dist');
|
|
44
|
+
await runDistCli(command.args, 'vyriy dist', false);
|
|
44
45
|
break;
|
|
45
46
|
}
|
|
46
47
|
case 'check': {
|
|
47
|
-
const {
|
|
48
|
-
|
|
48
|
+
const { runCheckCli } = await import('@vyriy/check');
|
|
49
|
+
await runCheckCli(command.args, 'vyriy check', false);
|
|
49
50
|
break;
|
|
50
51
|
}
|
|
51
52
|
case 'static': {
|
|
52
|
-
const {
|
|
53
|
-
|
|
53
|
+
const { runStaticCli } = await import('@vyriy/static');
|
|
54
|
+
await runStaticCli(command.args, 'vyriy static', false);
|
|
54
55
|
break;
|
|
55
56
|
}
|
|
56
57
|
case 'create': {
|
|
57
|
-
const {
|
|
58
|
-
|
|
58
|
+
const { runCreateCli } = await import('@vyriy/create');
|
|
59
|
+
await runCreateCli(command.args, 'vyriy create', false);
|
|
59
60
|
break;
|
|
60
61
|
}
|
|
61
62
|
default:
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vyriy",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Interactive project master for calm cloud-ready applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./bin/vyriy.js",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=24.0.0"
|
|
9
9
|
},
|
|
10
|
-
"packageManager": "yarn@4.
|
|
10
|
+
"packageManager": "yarn@4.16.0",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@vyriy/check": "0.5.
|
|
13
|
-
"@vyriy/create": "0.5.
|
|
14
|
-
"@vyriy/dist": "0.5.
|
|
15
|
-
"@vyriy/static": "0.5.
|
|
12
|
+
"@vyriy/check": "0.5.4",
|
|
13
|
+
"@vyriy/create": "0.5.4",
|
|
14
|
+
"@vyriy/dist": "0.5.4",
|
|
15
|
+
"@vyriy/static": "0.5.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@testing-library/dom": "^10.4.1",
|
package/types.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
export type Command = {
|
|
2
|
-
readonly type: 'help' | 'version'
|
|
2
|
+
readonly type: 'help' | 'version';
|
|
3
3
|
} | {
|
|
4
|
-
readonly type: 'static';
|
|
5
|
-
readonly
|
|
6
|
-
} | {
|
|
7
|
-
readonly type: 'create';
|
|
8
|
-
readonly directory: string;
|
|
9
|
-
readonly dryRun: boolean;
|
|
10
|
-
readonly overwrite: boolean;
|
|
11
|
-
readonly skipExisting: boolean;
|
|
12
|
-
readonly install: boolean;
|
|
13
|
-
readonly verify: boolean;
|
|
4
|
+
readonly type: 'check' | 'create' | 'dist' | 'static';
|
|
5
|
+
readonly args: readonly string[];
|
|
14
6
|
} | {
|
|
15
7
|
readonly type: 'unknown';
|
|
16
8
|
readonly command: string;
|