@flight-framework/cli 0.3.2 → 0.3.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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +544 -544
  3. package/dist/bin.js +0 -0
  4. package/dist/bin.js.map +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/package.json +51 -51
  7. package/templates/angular/index.html +13 -13
  8. package/templates/angular/package.json.template +25 -25
  9. package/templates/angular/src/app.component.ts +13 -13
  10. package/templates/angular/src/main.server.ts +11 -11
  11. package/templates/angular/src/main.ts +4 -4
  12. package/templates/angular/tsconfig.json +16 -16
  13. package/templates/base/README.md.template +26 -26
  14. package/templates/base/_gitignore +25 -25
  15. package/templates/base/flight.config.ts.template +15 -15
  16. package/templates/base/styles/global.css +58 -58
  17. package/templates/htmx/index.html +18 -18
  18. package/templates/htmx/package.json.template +18 -18
  19. package/templates/htmx/vite.config.ts +6 -6
  20. package/templates/lit/index.html +14 -14
  21. package/templates/lit/package.json.template +21 -21
  22. package/templates/lit/src/app-root.ts +18 -18
  23. package/templates/lit/src/entry-client.ts +5 -5
  24. package/templates/lit/src/entry-server.ts +9 -9
  25. package/templates/lit/tsconfig.json +18 -18
  26. package/templates/lit/vite.config.ts +6 -6
  27. package/templates/preact/index.html +14 -14
  28. package/templates/preact/package.json.template +22 -22
  29. package/templates/preact/src/App.tsx +8 -8
  30. package/templates/preact/src/entry-client.tsx +11 -11
  31. package/templates/preact/src/entry-server.tsx +6 -6
  32. package/templates/preact/tsconfig.json +18 -18
  33. package/templates/preact/vite.config.ts +8 -8
  34. package/templates/qwik/index.html +14 -14
  35. package/templates/qwik/package.json.template +20 -20
  36. package/templates/qwik/src/App.tsx +10 -10
  37. package/templates/qwik/src/entry-client.tsx +4 -4
  38. package/templates/qwik/src/entry-server.tsx +9 -9
  39. package/templates/qwik/tsconfig.json +18 -18
  40. package/templates/qwik/vite.config.ts +8 -8
  41. package/templates/react/index.html +13 -13
  42. package/templates/react/package.json.template +24 -24
  43. package/templates/react/src/App.tsx +13 -13
  44. package/templates/react/src/context/RouterContext.tsx +63 -63
  45. package/templates/react/src/entry-client.tsx +19 -19
  46. package/templates/react/src/entry-server.tsx +17 -17
  47. package/templates/react/tsconfig.json +19 -19
  48. package/templates/react/vite.config.ts +12 -12
  49. package/templates/solid/index.html +14 -14
  50. package/templates/solid/package.json.template +21 -21
  51. package/templates/solid/src/App.tsx +8 -8
  52. package/templates/solid/src/entry-client.tsx +11 -11
  53. package/templates/solid/src/entry-server.tsx +6 -6
  54. package/templates/solid/tsconfig.json +18 -18
  55. package/templates/solid/vite.config.ts +8 -8
  56. package/templates/svelte/index.html +14 -14
  57. package/templates/svelte/package.json.template +21 -21
  58. package/templates/svelte/src/App.svelte +4 -4
  59. package/templates/svelte/src/entry-client.ts +7 -7
  60. package/templates/svelte/src/entry-server.ts +7 -7
  61. package/templates/svelte/tsconfig.json +17 -17
  62. package/templates/svelte/vite.config.ts +8 -8
  63. package/templates/use-cases/api/README.md +41 -41
  64. package/templates/use-cases/api/package.json.template +14 -14
  65. package/templates/use-cases/api/src/routes/api/health.get.ts.template +3 -3
  66. package/templates/use-cases/blog/README.md +47 -47
  67. package/templates/use-cases/blog/flight.config.ts.template +11 -11
  68. package/templates/use-cases/blog/package.json.template +15 -15
  69. package/templates/use-cases/blog/src/routes/blog/[slug].page.tsx.template +23 -23
  70. package/templates/use-cases/blog/src/routes/index.page.tsx.template +9 -9
  71. package/templates/use-cases/docs/README.md +49 -49
  72. package/templates/use-cases/docs/package.json.template +15 -15
  73. package/templates/use-cases/docs/src/content/index.md.template +16 -16
  74. package/templates/use-cases/ecommerce/README.md +32 -32
  75. package/templates/use-cases/ecommerce/package.json.template +16 -16
  76. package/templates/use-cases/ecommerce/src/routes/index.page.tsx.template +9 -9
  77. package/templates/use-cases/saas/README.md +34 -34
  78. package/templates/use-cases/saas/package.json.template +15 -15
  79. package/templates/use-cases/saas/src/routes/index.page.tsx.template +9 -9
  80. package/templates/vanilla/index.html +14 -14
  81. package/templates/vanilla/package.json.template +19 -19
  82. package/templates/vanilla/src/main.ts +10 -10
  83. package/templates/vanilla/tsconfig.json +16 -16
  84. package/templates/vanilla/vite.config.ts +6 -6
  85. package/templates/vue/index.html +14 -14
  86. package/templates/vue/package.json.template +21 -21
  87. package/templates/vue/src/App.vue +6 -6
  88. package/templates/vue/src/entry-client.ts +12 -12
  89. package/templates/vue/src/entry-server.ts +8 -8
  90. package/templates/vue/tsconfig.json +17 -17
  91. package/templates/vue/vite.config.ts +8 -8
@@ -1,41 +1,41 @@
1
- # API Starter
2
-
3
- A minimal API-only template with Flight. No UI framework.
4
-
5
- ## Features
6
-
7
- - REST API routes
8
- - OpenAPI ready
9
- - Database integration ready
10
-
11
- ## Getting Started
12
-
13
- ```bash
14
- npm install
15
- npm run dev
16
- ```
17
-
18
- ## Structure
19
-
20
- ```
21
- src/routes/api/
22
- ├── health.get.ts # Health check
23
- ├── users.get.ts # List users
24
- ├── users.post.ts # Create user
25
- └── users/[id].get.ts # Get user by ID
26
- ```
27
-
28
- ## Example
29
-
30
- ```typescript
31
- // src/routes/api/users.get.ts
32
- export function GET() {
33
- return Response.json({ users: [] });
34
- }
35
- ```
36
-
37
- ## Customize
38
-
39
- - Add your database driver
40
- - Generate OpenAPI docs
41
- - Add authentication middleware
1
+ # API Starter
2
+
3
+ A minimal API-only template with Flight. No UI framework.
4
+
5
+ ## Features
6
+
7
+ - REST API routes
8
+ - OpenAPI ready
9
+ - Database integration ready
10
+
11
+ ## Getting Started
12
+
13
+ ```bash
14
+ npm install
15
+ npm run dev
16
+ ```
17
+
18
+ ## Structure
19
+
20
+ ```
21
+ src/routes/api/
22
+ ├── health.get.ts # Health check
23
+ ├── users.get.ts # List users
24
+ ├── users.post.ts # Create user
25
+ └── users/[id].get.ts # Get user by ID
26
+ ```
27
+
28
+ ## Example
29
+
30
+ ```typescript
31
+ // src/routes/api/users.get.ts
32
+ export function GET() {
33
+ return Response.json({ users: [] });
34
+ }
35
+ ```
36
+
37
+ ## Customize
38
+
39
+ - Add your database driver
40
+ - Generate OpenAPI docs
41
+ - Add authentication middleware
@@ -1,14 +1,14 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "start": "flight start"
10
- },
11
- "dependencies": {
12
- "@flight-framework/http": "latest"
13
- }
14
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "start": "flight start"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/http": "latest"
13
+ }
14
+ }
@@ -1,3 +1,3 @@
1
- export function GET() {
2
- return Response.json({ status: 'ok', timestamp: Date.now() });
3
- }
1
+ export function GET() {
2
+ return Response.json({ status: 'ok', timestamp: Date.now() });
3
+ }
@@ -1,47 +1,47 @@
1
- # Blog Starter
2
-
3
- A minimal blog template with Flight.
4
-
5
- ## Features
6
-
7
- - File-based blog posts
8
- - SEO optimized
9
- - RSS feed ready
10
-
11
- ## Getting Started
12
-
13
- ```bash
14
- npm install
15
- npm run dev
16
- ```
17
-
18
- ## Structure
19
-
20
- ```
21
- src/
22
- ├── routes/
23
- │ ├── index.page.tsx # Home page
24
- │ └── blog/
25
- │ └── [slug].page.tsx # Blog post
26
- └── content/
27
- └── posts/ # Add .md files here
28
- ```
29
-
30
- ## Add Posts
31
-
32
- Create markdown files in `src/content/posts/`:
33
-
34
- ```markdown
35
- ---
36
- title: My First Post
37
- date: 2026-01-13
38
- ---
39
-
40
- Your content here.
41
- ```
42
-
43
- ## Customize
44
-
45
- - Edit `flight.config.ts` for SEO defaults
46
- - Add components in `src/components/`
47
- - Modify layout in `src/routes/_layout.tsx`
1
+ # Blog Starter
2
+
3
+ A minimal blog template with Flight.
4
+
5
+ ## Features
6
+
7
+ - File-based blog posts
8
+ - SEO optimized
9
+ - RSS feed ready
10
+
11
+ ## Getting Started
12
+
13
+ ```bash
14
+ npm install
15
+ npm run dev
16
+ ```
17
+
18
+ ## Structure
19
+
20
+ ```
21
+ src/
22
+ ├── routes/
23
+ │ ├── index.page.tsx # Home page
24
+ │ └── blog/
25
+ │ └── [slug].page.tsx # Blog post
26
+ └── content/
27
+ └── posts/ # Add .md files here
28
+ ```
29
+
30
+ ## Add Posts
31
+
32
+ Create markdown files in `src/content/posts/`:
33
+
34
+ ```markdown
35
+ ---
36
+ title: My First Post
37
+ date: 2026-01-13
38
+ ---
39
+
40
+ Your content here.
41
+ ```
42
+
43
+ ## Customize
44
+
45
+ - Edit `flight.config.ts` for SEO defaults
46
+ - Add components in `src/components/`
47
+ - Modify layout in `src/routes/_layout.tsx`
@@ -1,11 +1,11 @@
1
- import { defineConfig } from '@flight-framework/core';
2
-
3
- export default defineConfig({
4
- seo: {
5
- titleTemplate: '%s | {{PROJECT_NAME}}',
6
- },
7
- routeRules: {
8
- '/': { prerender: true },
9
- '/blog/**': { isr: 3600 },
10
- },
11
- });
1
+ import { defineConfig } from '@flight-framework/core';
2
+
3
+ export default defineConfig({
4
+ seo: {
5
+ titleTemplate: '%s | {{PROJECT_NAME}}',
6
+ },
7
+ routeRules: {
8
+ '/': { prerender: true },
9
+ '/blog/**': { isr: 3600 },
10
+ },
11
+ });
@@ -1,15 +1,15 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "preview": "flight preview"
10
- },
11
- "dependencies": {
12
- "@flight-framework/core": "latest",
13
- "@flight-framework/seo": "latest"
14
- }
15
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "preview": "flight preview"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/core": "latest",
13
+ "@flight-framework/seo": "latest"
14
+ }
15
+ }
@@ -1,23 +1,23 @@
1
- import { notFound } from '@flight-framework/core';
2
-
3
- export async function loader({ params }) {
4
- // Replace with your content loading logic
5
- const post = await getPost(params.slug);
6
- if (!post) notFound();
7
- return { post };
8
- }
9
-
10
- export default function BlogPost({ data }) {
11
- return (
12
- <article>
13
- <h1>{data.post.title}</h1>
14
- <time>{data.post.date}</time>
15
- <div dangerouslySetInnerHTML={{ __html: data.post.content }} />
16
- </article>
17
- );
18
- }
19
-
20
- // Placeholder - implement your own content loading
21
- async function getPost(slug: string) {
22
- return null; // Load from filesystem, CMS, or database
23
- }
1
+ import { notFound } from '@flight-framework/core';
2
+
3
+ export async function loader({ params }) {
4
+ // Replace with your content loading logic
5
+ const post = await getPost(params.slug);
6
+ if (!post) notFound();
7
+ return { post };
8
+ }
9
+
10
+ export default function BlogPost({ data }) {
11
+ return (
12
+ <article>
13
+ <h1>{data.post.title}</h1>
14
+ <time>{data.post.date}</time>
15
+ <div dangerouslySetInnerHTML={{ __html: data.post.content }} />
16
+ </article>
17
+ );
18
+ }
19
+
20
+ // Placeholder - implement your own content loading
21
+ async function getPost(slug: string) {
22
+ return null; // Load from filesystem, CMS, or database
23
+ }
@@ -1,9 +1,9 @@
1
- export default function HomePage() {
2
- return (
3
- <main>
4
- <h1>Welcome to {{PROJECT_NAME}}</h1>
5
- <p>Your blog is ready. Add posts in <code>src/content/posts/</code></p>
6
- <a href="/blog">View Posts →</a>
7
- </main>
8
- );
9
- }
1
+ export default function HomePage() {
2
+ return (
3
+ <main>
4
+ <h1>Welcome to {{PROJECT_NAME}}</h1>
5
+ <p>Your blog is ready. Add posts in <code>src/content/posts/</code></p>
6
+ <a href="/blog">View Posts →</a>
7
+ </main>
8
+ );
9
+ }
@@ -1,49 +1,49 @@
1
- # Documentation Starter
2
-
3
- A minimal documentation site template with Flight.
4
-
5
- ## Features
6
-
7
- - Markdown content
8
- - Auto-navigation
9
- - SEO optimized
10
-
11
- ## Getting Started
12
-
13
- ```bash
14
- npm install
15
- npm run dev
16
- ```
17
-
18
- ## Structure
19
-
20
- ```
21
- src/
22
- ├── content/
23
- │ ├── index.md # Home
24
- │ ├── getting-started.md
25
- │ └── api/
26
- │ └── reference.md
27
- └── routes/
28
- └── [...slug].page.tsx # Renders markdown
29
- ```
30
-
31
- ## Add Pages
32
-
33
- Create markdown files in `src/content/`:
34
-
35
- ```markdown
36
- ---
37
- title: My Page
38
- ---
39
-
40
- # My Page
41
-
42
- Content here.
43
- ```
44
-
45
- ## Customize
46
-
47
- - Add sidebar navigation
48
- - Customize layout
49
- - Add search functionality
1
+ # Documentation Starter
2
+
3
+ A minimal documentation site template with Flight.
4
+
5
+ ## Features
6
+
7
+ - Markdown content
8
+ - Auto-navigation
9
+ - SEO optimized
10
+
11
+ ## Getting Started
12
+
13
+ ```bash
14
+ npm install
15
+ npm run dev
16
+ ```
17
+
18
+ ## Structure
19
+
20
+ ```
21
+ src/
22
+ ├── content/
23
+ │ ├── index.md # Home
24
+ │ ├── getting-started.md
25
+ │ └── api/
26
+ │ └── reference.md
27
+ └── routes/
28
+ └── [...slug].page.tsx # Renders markdown
29
+ ```
30
+
31
+ ## Add Pages
32
+
33
+ Create markdown files in `src/content/`:
34
+
35
+ ```markdown
36
+ ---
37
+ title: My Page
38
+ ---
39
+
40
+ # My Page
41
+
42
+ Content here.
43
+ ```
44
+
45
+ ## Customize
46
+
47
+ - Add sidebar navigation
48
+ - Customize layout
49
+ - Add search functionality
@@ -1,15 +1,15 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "preview": "flight preview"
10
- },
11
- "dependencies": {
12
- "@flight-framework/core": "latest",
13
- "@flight-framework/seo": "latest"
14
- }
15
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "preview": "flight preview"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/core": "latest",
13
+ "@flight-framework/seo": "latest"
14
+ }
15
+ }
@@ -1,16 +1,16 @@
1
- ---
2
- title: Welcome
3
- ---
4
-
5
- # {{PROJECT_NAME}} Documentation
6
-
7
- Welcome to your documentation site.
8
-
9
- ## Getting Started
10
-
11
- Add markdown files to `src/content/` to create pages.
12
-
13
- ## Next Steps
14
-
15
- - [Getting Started](./getting-started.md)
16
- - [API Reference](./api/reference.md)
1
+ ---
2
+ title: Welcome
3
+ ---
4
+
5
+ # {{PROJECT_NAME}} Documentation
6
+
7
+ Welcome to your documentation site.
8
+
9
+ ## Getting Started
10
+
11
+ Add markdown files to `src/content/` to create pages.
12
+
13
+ ## Next Steps
14
+
15
+ - [Getting Started](./getting-started.md)
16
+ - [API Reference](./api/reference.md)
@@ -1,32 +1,32 @@
1
- # E-commerce Starter
2
-
3
- A minimal e-commerce template with Flight.
4
-
5
- ## Features
6
-
7
- - Product catalog
8
- - Cart ready (implement your logic)
9
- - Payment integration ready
10
-
11
- ## Getting Started
12
-
13
- ```bash
14
- npm install
15
- npm run dev
16
- ```
17
-
18
- ## Structure
19
-
20
- ```
21
- src/routes/
22
- ├── index.page.tsx # Home
23
- ├── products/
24
- │ └── [id].page.tsx # Product detail
25
- └── cart.page.tsx # Shopping cart
26
- ```
27
-
28
- ## Customize
29
-
30
- - Add your database logic in route loaders
31
- - Connect your payment provider
32
- - Extend with authentication
1
+ # E-commerce Starter
2
+
3
+ A minimal e-commerce template with Flight.
4
+
5
+ ## Features
6
+
7
+ - Product catalog
8
+ - Cart ready (implement your logic)
9
+ - Payment integration ready
10
+
11
+ ## Getting Started
12
+
13
+ ```bash
14
+ npm install
15
+ npm run dev
16
+ ```
17
+
18
+ ## Structure
19
+
20
+ ```
21
+ src/routes/
22
+ ├── index.page.tsx # Home
23
+ ├── products/
24
+ │ └── [id].page.tsx # Product detail
25
+ └── cart.page.tsx # Shopping cart
26
+ ```
27
+
28
+ ## Customize
29
+
30
+ - Add your database logic in route loaders
31
+ - Connect your payment provider
32
+ - Extend with authentication
@@ -1,16 +1,16 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "preview": "flight preview"
10
- },
11
- "dependencies": {
12
- "@flight-framework/core": "latest",
13
- "@flight-framework/seo": "latest",
14
- "@flight-framework/image": "latest"
15
- }
16
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "preview": "flight preview"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/core": "latest",
13
+ "@flight-framework/seo": "latest",
14
+ "@flight-framework/image": "latest"
15
+ }
16
+ }
@@ -1,9 +1,9 @@
1
- export default function HomePage() {
2
- return (
3
- <main>
4
- <h1>{{PROJECT_NAME}}</h1>
5
- <p>Your store is ready.</p>
6
- <a href="/products">Browse Products →</a>
7
- </main>
8
- );
9
- }
1
+ export default function HomePage() {
2
+ return (
3
+ <main>
4
+ <h1>{{PROJECT_NAME}}</h1>
5
+ <p>Your store is ready.</p>
6
+ <a href="/products">Browse Products →</a>
7
+ </main>
8
+ );
9
+ }