create-appystack 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/bin/index.js +14 -14
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -147,20 +147,6 @@ async function main() {
147
147
  if (isCancel(scopeResult)) { cancel('Cancelled.'); process.exit(0); }
148
148
  const packageScope = scopeResult.trim();
149
149
 
150
- // --- Server port ---
151
- const serverPortResult = await text({
152
- message: 'Server port',
153
- placeholder: '5501',
154
- initialValue: '5501',
155
- validate(value) {
156
- const port = Number(value);
157
- if (!Number.isInteger(port) || port < 1 || port > 65535)
158
- return 'Enter a valid port number (1–65535)';
159
- },
160
- });
161
- if (isCancel(serverPortResult)) { cancel('Cancelled.'); process.exit(0); }
162
- const serverPort = serverPortResult.trim();
163
-
164
150
  // --- Client port ---
165
151
  const clientPortResult = await text({
166
152
  message: 'Client port',
@@ -175,6 +161,20 @@ async function main() {
175
161
  if (isCancel(clientPortResult)) { cancel('Cancelled.'); process.exit(0); }
176
162
  const clientPort = clientPortResult.trim();
177
163
 
164
+ // --- Server port (defaults to client port + 1) ---
165
+ const serverPortResult = await text({
166
+ message: 'Server port',
167
+ placeholder: String(Number(clientPort) + 1),
168
+ initialValue: String(Number(clientPort) + 1),
169
+ validate(value) {
170
+ const port = Number(value);
171
+ if (!Number.isInteger(port) || port < 1 || port > 65535)
172
+ return 'Enter a valid port number (1–65535)';
173
+ },
174
+ });
175
+ if (isCancel(serverPortResult)) { cancel('Cancelled.'); process.exit(0); }
176
+ const serverPort = serverPortResult.trim();
177
+
178
178
  // --- Description ---
179
179
  const descResult = await text({
180
180
  message: 'Project description',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-appystack",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Scaffold a new AppyStack RVETS project — React, Vite, Express, TypeScript, Socket.io",
5
5
  "type": "module",
6
6
  "bin": {