create-velox-app 0.6.57 → 0.6.59
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/CHANGELOG.md +12 -0
- package/dist/cli.d.ts +11 -1
- package/dist/cli.js +2 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.js +10 -5
- package/package.json +1 -1
- package/src/templates/source/rsc/app.config.ts +2 -2
- package/src/templates/source/rsc-auth/app.config.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# create-velox-app
|
|
2
2
|
|
|
3
|
+
## 0.6.59
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- refactor(ecosystem): Laravel-style API refinements & added missing unit tests
|
|
8
|
+
|
|
9
|
+
## 0.6.58
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- feat(router): add OpenAPI 3.0.3 specification generator
|
|
14
|
+
|
|
3
15
|
## 0.6.57
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cli.d.ts
CHANGED
|
@@ -5,4 +5,14 @@
|
|
|
5
5
|
* Executable entry point for the project scaffolder.
|
|
6
6
|
* Handles command-line arguments and initiates the scaffolding process.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
import type { DatabaseType, TemplateType } from './templates/index.js';
|
|
9
|
+
/** @internal Exported for testing */
|
|
10
|
+
export interface ParsedArgs {
|
|
11
|
+
projectName?: string;
|
|
12
|
+
template?: TemplateType;
|
|
13
|
+
database?: DatabaseType;
|
|
14
|
+
help: boolean;
|
|
15
|
+
version: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** @internal Exported for testing */
|
|
18
|
+
export declare function parseArgs(args: string[]): ParsedArgs;
|
package/dist/cli.js
CHANGED
|
@@ -64,7 +64,8 @@ Examples:
|
|
|
64
64
|
npx create-velox-app my-app -t rsc -d postgresql # RSC with PostgreSQL
|
|
65
65
|
npx create-velox-app # Prompt for name
|
|
66
66
|
`;
|
|
67
|
-
|
|
67
|
+
/** @internal Exported for testing */
|
|
68
|
+
export function parseArgs(args) {
|
|
68
69
|
const result = {
|
|
69
70
|
help: false,
|
|
70
71
|
version: false,
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,26 @@
|
|
|
7
7
|
import type { DatabaseType, TemplateType } from './templates/index.js';
|
|
8
8
|
/** Create-velox-app package version */
|
|
9
9
|
export declare const CREATE_VERSION: string;
|
|
10
|
+
/** Reserved project names that could cause issues
|
|
11
|
+
* @internal Exported for testing
|
|
12
|
+
*/
|
|
13
|
+
export declare const RESERVED_NAMES: Set<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a file path is safe (no path traversal attacks)
|
|
16
|
+
* @internal Exported for testing
|
|
17
|
+
*/
|
|
18
|
+
export declare function isPathSafe(baseDir: string, targetPath: string): boolean;
|
|
10
19
|
/**
|
|
11
20
|
* Main scaffolding function that creates a new VeloxTS project
|
|
12
21
|
*/
|
|
13
22
|
export declare function createVeloxApp(initialProjectName?: string, initialTemplate?: TemplateType, initialDatabase?: DatabaseType): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Detect which package manager is being used
|
|
25
|
+
* @internal Exported for testing
|
|
26
|
+
*/
|
|
27
|
+
export declare function detectPackageManager(): 'npm' | 'pnpm' | 'yarn';
|
|
28
|
+
/**
|
|
29
|
+
* Get the install command for the package manager
|
|
30
|
+
* @internal Exported for testing
|
|
31
|
+
*/
|
|
32
|
+
export declare function getInstallCommand(packageManager: string): string;
|
package/dist/index.js
CHANGED
|
@@ -24,8 +24,10 @@ const packageJson = require('../package.json');
|
|
|
24
24
|
export const CREATE_VERSION = packageJson.version ?? '0.0.0-unknown';
|
|
25
25
|
/** Timeout for exec commands (5 minutes) */
|
|
26
26
|
const EXEC_TIMEOUT_MS = 5 * 60 * 1000;
|
|
27
|
-
/** Reserved project names that could cause issues
|
|
28
|
-
|
|
27
|
+
/** Reserved project names that could cause issues
|
|
28
|
+
* @internal Exported for testing
|
|
29
|
+
*/
|
|
30
|
+
export const RESERVED_NAMES = new Set([
|
|
29
31
|
'node_modules',
|
|
30
32
|
'test',
|
|
31
33
|
'tests',
|
|
@@ -44,8 +46,9 @@ const RESERVED_NAMES = new Set([
|
|
|
44
46
|
// ============================================================================
|
|
45
47
|
/**
|
|
46
48
|
* Check if a file path is safe (no path traversal attacks)
|
|
49
|
+
* @internal Exported for testing
|
|
47
50
|
*/
|
|
48
|
-
function isPathSafe(baseDir, targetPath) {
|
|
51
|
+
export function isPathSafe(baseDir, targetPath) {
|
|
49
52
|
const resolved = path.resolve(baseDir, targetPath);
|
|
50
53
|
const normalizedBase = path.normalize(baseDir);
|
|
51
54
|
return resolved.startsWith(normalizedBase);
|
|
@@ -222,8 +225,9 @@ async function promptProjectConfig(initialName, initialTemplate, initialDatabase
|
|
|
222
225
|
}
|
|
223
226
|
/**
|
|
224
227
|
* Detect which package manager is being used
|
|
228
|
+
* @internal Exported for testing
|
|
225
229
|
*/
|
|
226
|
-
function detectPackageManager() {
|
|
230
|
+
export function detectPackageManager() {
|
|
227
231
|
const userAgent = process.env.npm_config_user_agent || '';
|
|
228
232
|
if (userAgent.includes('pnpm'))
|
|
229
233
|
return 'pnpm';
|
|
@@ -329,8 +333,9 @@ async function installDependencies(config) {
|
|
|
329
333
|
}
|
|
330
334
|
/**
|
|
331
335
|
* Get the install command for the package manager
|
|
336
|
+
* @internal Exported for testing
|
|
332
337
|
*/
|
|
333
|
-
function getInstallCommand(packageManager) {
|
|
338
|
+
export function getInstallCommand(packageManager) {
|
|
334
339
|
switch (packageManager) {
|
|
335
340
|
case 'pnpm':
|
|
336
341
|
return 'pnpm install';
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* All options have sensible defaults - only specify what you need to change.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { createVeloxApp } from '@veloxts/web';
|
|
9
9
|
|
|
10
|
-
export default
|
|
10
|
+
export default createVeloxApp({
|
|
11
11
|
port: __API_PORT__,
|
|
12
12
|
});
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* All options have sensible defaults - only specify what you need to change.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { createVeloxApp } from '@veloxts/web';
|
|
9
9
|
|
|
10
|
-
export default
|
|
10
|
+
export default createVeloxApp({
|
|
11
11
|
port: __API_PORT__,
|
|
12
12
|
});
|