@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,34 +1,34 @@
1
- # SaaS Starter
2
-
3
- A minimal SaaS application template with Flight.
4
-
5
- ## Features
6
-
7
- - Auth ready (add your provider)
8
- - Dashboard layout
9
- - User settings page
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 # Landing page
23
- ├── login.page.tsx # Login
24
- ├── dashboard/
25
- │ ├── _middleware.ts # Auth guard
26
- │ ├── index.page.tsx # Dashboard home
27
- │ └── settings.page.tsx # User settings
28
- ```
29
-
30
- ## Customize
31
-
32
- - Connect authentication provider
33
- - Add database integration
34
- - Extend dashboard with your features
1
+ # SaaS Starter
2
+
3
+ A minimal SaaS application template with Flight.
4
+
5
+ ## Features
6
+
7
+ - Auth ready (add your provider)
8
+ - Dashboard layout
9
+ - User settings page
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 # Landing page
23
+ ├── login.page.tsx # Login
24
+ ├── dashboard/
25
+ │ ├── _middleware.ts # Auth guard
26
+ │ ├── index.page.tsx # Dashboard home
27
+ │ └── settings.page.tsx # User settings
28
+ ```
29
+
30
+ ## Customize
31
+
32
+ - Connect authentication provider
33
+ - Add database integration
34
+ - Extend dashboard with your features
@@ -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/auth": "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/auth": "latest"
14
+ }
15
+ }
@@ -1,9 +1,9 @@
1
- export default function LandingPage() {
2
- return (
3
- <main>
4
- <h1>{{PROJECT_NAME}}</h1>
5
- <p>Your SaaS application is ready.</p>
6
- <a href="/login">Get Started →</a>
7
- </main>
8
- );
9
- }
1
+ export default function LandingPage() {
2
+ return (
3
+ <main>
4
+ <h1>{{PROJECT_NAME}}</h1>
5
+ <p>Your SaaS application is ready.</p>
6
+ <a href="/login">Get Started →</a>
7
+ </main>
8
+ );
9
+ }
@@ -1,15 +1,15 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{PROJECT_NAME}}</title>
8
- </head>
9
-
10
- <body>
11
- <div id="root"></div>
12
- <script type="module" src="/src/main.ts"></script>
13
- </body>
14
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{PROJECT_NAME}}</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="root"></div>
12
+ <script type="module" src="/src/main.ts"></script>
13
+ </body>
14
+
15
15
  </html>
@@ -1,19 +1,19 @@
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": "^0.0.1",
13
- "{{BUNDLER_PACKAGE}}": "^0.0.1"
14
- },
15
- "devDependencies": {
16
- "typescript": "^5.7.0",
17
- "vite": "^6.0.0"
18
- }
19
- }
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": "^0.0.1",
13
+ "{{BUNDLER_PACKAGE}}": "^0.0.1"
14
+ },
15
+ "devDependencies": {
16
+ "typescript": "^5.7.0",
17
+ "vite": "^6.0.0"
18
+ }
19
+ }
@@ -1,10 +1,10 @@
1
- import './styles/global.css';
2
-
3
- const root = document.getElementById('root')!;
4
-
5
- root.innerHTML = `
6
- <main>
7
- <h1>Flight ✈️</h1>
8
- <p>Edit <code>src/main.ts</code> to get started.</p>
9
- </main>
10
- `;
1
+ import './styles/global.css';
2
+
3
+ const root = document.getElementById('root')!;
4
+
5
+ root.innerHTML = `
6
+ <main>
7
+ <h1>Flight ✈️</h1>
8
+ <p>Edit <code>src/main.ts</code> to get started.</p>
9
+ </main>
10
+ `;
@@ -1,17 +1,17 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": [
7
- "ES2022",
8
- "DOM"
9
- ],
10
- "strict": true,
11
- "noEmit": true,
12
- "skipLibCheck": true
13
- },
14
- "include": [
15
- "src"
16
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": [
7
+ "ES2022",
8
+ "DOM"
9
+ ],
10
+ "strict": true,
11
+ "noEmit": true,
12
+ "skipLibCheck": true
13
+ },
14
+ "include": [
15
+ "src"
16
+ ]
17
17
  }
@@ -1,6 +1,6 @@
1
- import { defineConfig } from 'vite';
2
-
3
- export default defineConfig({
4
- server: { port: 5173 },
5
- build: { target: 'es2022' },
6
- });
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ server: { port: 5173 },
5
+ build: { target: 'es2022' },
6
+ });
@@ -1,15 +1,15 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{PROJECT_NAME}}</title>
8
- </head>
9
-
10
- <body>
11
- <div id="root"><!--ssr-outlet--></div>
12
- <script type="module" src="/src/entry-client.ts"></script>
13
- </body>
14
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{PROJECT_NAME}}</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="root"><!--ssr-outlet--></div>
12
+ <script type="module" src="/src/entry-client.ts"></script>
13
+ </body>
14
+
15
15
  </html>
@@ -1,21 +1,21 @@
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": "^0.0.1",
13
- "{{BUNDLER_PACKAGE}}": "^0.0.1",
14
- "vue": "^3.5.0"
15
- },
16
- "devDependencies": {
17
- "@vitejs/plugin-vue": "^5.2.0",
18
- "typescript": "^5.7.0",
19
- "vite": "^6.0.0"
20
- }
21
- }
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": "^0.0.1",
13
+ "{{BUNDLER_PACKAGE}}": "^0.0.1",
14
+ "vue": "^3.5.0"
15
+ },
16
+ "devDependencies": {
17
+ "@vitejs/plugin-vue": "^5.2.0",
18
+ "typescript": "^5.7.0",
19
+ "vite": "^6.0.0"
20
+ }
21
+ }
@@ -1,6 +1,6 @@
1
- <template>
2
- <main>
3
- <h1>Flight ✈️</h1>
4
- <p>Edit <code>src/App.vue</code> to get started.</p>
5
- </main>
6
- </template>
1
+ <template>
2
+ <main>
3
+ <h1>Flight ✈️</h1>
4
+ <p>Edit <code>src/App.vue</code> to get started.</p>
5
+ </main>
6
+ </template>
@@ -1,12 +1,12 @@
1
- import { createApp, createSSRApp } from 'vue';
2
- import App from './App.vue';
3
- import './styles/global.css';
4
-
5
- const root = document.getElementById('root')!;
6
- const hasSSR = root.innerHTML.trim();
7
-
8
- if (hasSSR) {
9
- createSSRApp(App).mount('#root');
10
- } else {
11
- createApp(App).mount('#root');
12
- }
1
+ import { createApp, createSSRApp } from 'vue';
2
+ import App from './App.vue';
3
+ import './styles/global.css';
4
+
5
+ const root = document.getElementById('root')!;
6
+ const hasSSR = root.innerHTML.trim();
7
+
8
+ if (hasSSR) {
9
+ createSSRApp(App).mount('#root');
10
+ } else {
11
+ createApp(App).mount('#root');
12
+ }
@@ -1,8 +1,8 @@
1
- import { renderToString } from 'vue/server-renderer';
2
- import { createSSRApp } from 'vue';
3
- import App from './App.vue';
4
-
5
- export async function render(_url: string): Promise<string> {
6
- const app = createSSRApp(App);
7
- return await renderToString(app);
8
- }
1
+ import { renderToString } from 'vue/server-renderer';
2
+ import { createSSRApp } from 'vue';
3
+ import App from './App.vue';
4
+
5
+ export async function render(_url: string): Promise<string> {
6
+ const app = createSSRApp(App);
7
+ return await renderToString(app);
8
+ }
@@ -1,18 +1,18 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": [
7
- "ES2022",
8
- "DOM"
9
- ],
10
- "strict": true,
11
- "noEmit": true,
12
- "skipLibCheck": true
13
- },
14
- "include": [
15
- "src/**/*.ts",
16
- "src/**/*.vue"
17
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": [
7
+ "ES2022",
8
+ "DOM"
9
+ ],
10
+ "strict": true,
11
+ "noEmit": true,
12
+ "skipLibCheck": true
13
+ },
14
+ "include": [
15
+ "src/**/*.ts",
16
+ "src/**/*.vue"
17
+ ]
18
18
  }
@@ -1,8 +1,8 @@
1
- import { defineConfig } from 'vite';
2
- import vue from '@vitejs/plugin-vue';
3
-
4
- export default defineConfig({
5
- plugins: [vue()],
6
- server: { port: 5173 },
7
- build: { target: 'es2022' },
8
- });
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()],
6
+ server: { port: 5173 },
7
+ build: { target: 'es2022' },
8
+ });