@flight-framework/cli 0.0.1 → 0.0.2

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 (67) hide show
  1. package/dist/bin.js +97 -3076
  2. package/dist/bin.js.map +1 -1
  3. package/dist/index.js +97 -3076
  4. package/dist/index.js.map +1 -1
  5. package/package.json +53 -50
  6. package/templates/base/README.md.template +26 -0
  7. package/templates/base/_gitignore +25 -0
  8. package/templates/base/flight.config.ts.template +10 -0
  9. package/templates/base/styles/global.css +58 -0
  10. package/templates/htmx/index.html +19 -0
  11. package/templates/htmx/package.json.template +14 -0
  12. package/templates/htmx/vite.config.ts +6 -0
  13. package/templates/lit/index.html +15 -0
  14. package/templates/lit/package.json.template +19 -0
  15. package/templates/lit/src/app-root.ts +18 -0
  16. package/templates/lit/src/entry-client.ts +5 -0
  17. package/templates/lit/src/entry-server.ts +9 -0
  18. package/templates/lit/tsconfig.json +19 -0
  19. package/templates/lit/vite.config.ts +6 -0
  20. package/templates/preact/index.html +15 -0
  21. package/templates/preact/package.json.template +20 -0
  22. package/templates/preact/src/App.tsx +8 -0
  23. package/templates/preact/src/entry-client.tsx +11 -0
  24. package/templates/preact/src/entry-server.tsx +6 -0
  25. package/templates/preact/tsconfig.json +19 -0
  26. package/templates/preact/vite.config.ts +8 -0
  27. package/templates/qwik/index.html +15 -0
  28. package/templates/qwik/package.json.template +18 -0
  29. package/templates/qwik/src/App.tsx +10 -0
  30. package/templates/qwik/src/entry-client.tsx +4 -0
  31. package/templates/qwik/src/entry-server.tsx +9 -0
  32. package/templates/qwik/tsconfig.json +19 -0
  33. package/templates/qwik/vite.config.ts +8 -0
  34. package/templates/react/index.html +13 -0
  35. package/templates/react/package.json.template +22 -0
  36. package/templates/react/src/App.tsx +8 -0
  37. package/templates/react/src/entry-client.tsx +11 -0
  38. package/templates/react/src/entry-server.tsx +6 -0
  39. package/templates/react/tsconfig.json +20 -0
  40. package/templates/react/vite.config.ts +12 -0
  41. package/templates/solid/index.html +15 -0
  42. package/templates/solid/package.json.template +19 -0
  43. package/templates/solid/src/App.tsx +8 -0
  44. package/templates/solid/src/entry-client.tsx +11 -0
  45. package/templates/solid/src/entry-server.tsx +6 -0
  46. package/templates/solid/tsconfig.json +19 -0
  47. package/templates/solid/vite.config.ts +8 -0
  48. package/templates/svelte/index.html +15 -0
  49. package/templates/svelte/package.json.template +19 -0
  50. package/templates/svelte/src/App.svelte +4 -0
  51. package/templates/svelte/src/entry-client.ts +7 -0
  52. package/templates/svelte/src/entry-server.ts +7 -0
  53. package/templates/svelte/tsconfig.json +18 -0
  54. package/templates/svelte/vite.config.ts +8 -0
  55. package/templates/vanilla/index.html +15 -0
  56. package/templates/vanilla/package.json.template +15 -0
  57. package/templates/vanilla/src/main.ts +10 -0
  58. package/templates/vanilla/tsconfig.json +17 -0
  59. package/templates/vanilla/vite.config.ts +6 -0
  60. package/templates/vue/index.html +15 -0
  61. package/templates/vue/package.json.template +19 -0
  62. package/templates/vue/src/App.vue +6 -0
  63. package/templates/vue/src/entry-client.ts +12 -0
  64. package/templates/vue/src/entry-server.ts +8 -0
  65. package/templates/vue/tsconfig.json +18 -0
  66. package/templates/vue/vite.config.ts +8 -0
  67. package/LICENSE +0 -21
package/package.json CHANGED
@@ -1,51 +1,54 @@
1
- {
2
- "name": "@flight-framework/cli",
3
- "version": "0.0.1",
4
- "description": "Command-line interface for Flight Framework",
5
- "keywords": [
6
- "flight",
7
- "cli",
8
- "framework"
9
- ],
10
- "license": "MIT",
11
- "author": "Flight Contributors",
12
- "type": "module",
13
- "bin": {
14
- "flight": "./dist/bin.js"
15
- },
16
- "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "import": "./dist/index.js"
20
- }
21
- },
22
- "main": "./dist/index.js",
23
- "types": "./dist/index.d.ts",
24
- "files": [
25
- "dist"
26
- ],
27
- "dependencies": {
28
- "cac": "^6.7.14",
29
- "picocolors": "^1.1.0",
30
- "prompts": "^2.4.2",
31
- "@flight-framework/core": "0.0.1"
32
- },
33
- "devDependencies": {
34
- "@types/node": "^22.0.0",
35
- "@types/prompts": "^2.4.9",
36
- "rimraf": "^6.0.0",
37
- "tsup": "^8.0.0",
38
- "typescript": "^5.7.0",
39
- "vitest": "^2.0.0"
40
- },
41
- "peerDependencies": {
42
- "vite": "^6.0.0 || ^7.0.0"
43
- },
44
- "scripts": {
45
- "build": "tsup",
46
- "dev": "tsup --watch",
47
- "test": "vitest run",
48
- "lint": "eslint src/",
49
- "clean": "rimraf dist"
50
- }
1
+ {
2
+ "name": "@flight-framework/cli",
3
+ "version": "0.0.2",
4
+ "description": "Command-line interface for Flight Framework",
5
+ "keywords": [
6
+ "flight",
7
+ "cli",
8
+ "framework"
9
+ ],
10
+ "license": "MIT",
11
+ "author": "Flight Contributors",
12
+ "type": "module",
13
+ "bin": {
14
+ "flight": "./dist/bin.js"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ }
21
+ },
22
+ "main": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "files": [
25
+ "dist",
26
+ "templates"
27
+ ],
28
+ "scripts": {
29
+ "build": "tsup",
30
+ "dev": "tsup --watch",
31
+ "test": "vitest run",
32
+ "lint": "eslint src/",
33
+ "clean": "rimraf dist",
34
+ "typecheck": "tsc --noEmit"
35
+ },
36
+ "dependencies": {
37
+ "@flight-framework/core": "workspace:*",
38
+ "@flight-framework/http": "workspace:*",
39
+ "cac": "^6.7.14",
40
+ "picocolors": "^1.1.0",
41
+ "prompts": "^2.4.2"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^22.0.0",
45
+ "@types/prompts": "^2.4.9",
46
+ "rimraf": "^6.0.0",
47
+ "tsup": "^8.0.0",
48
+ "typescript": "^5.7.0",
49
+ "vitest": "^2.0.0"
50
+ },
51
+ "peerDependencies": {
52
+ "vite": "^6.0.0 || ^7.0.0"
53
+ }
51
54
  }
@@ -0,0 +1,26 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ A Flight application.
4
+
5
+ ## Development
6
+
7
+ ```bash
8
+ npm run dev
9
+ ```
10
+
11
+ ## Build
12
+
13
+ ```bash
14
+ npm run build
15
+ npm run preview
16
+ ```
17
+
18
+ ## Stack
19
+
20
+ - **UI**: {{UI_FRAMEWORK}}
21
+ - **Build**: Vite 6
22
+ - **Language**: {{LANGUAGE}}
23
+
24
+ ---
25
+
26
+ *Built with [Flight Framework](https://github.com/EliosLT/Flight-framework) - Maximum flexibility. Zero lock-in.*
@@ -0,0 +1,25 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build output
5
+ dist/
6
+ .output/
7
+
8
+ # Environment
9
+ .env
10
+ .env.*
11
+ !.env.example
12
+
13
+ # Logs
14
+ *.log
15
+ npm-debug.log*
16
+
17
+ # Editor
18
+ .vscode/
19
+ .idea/
20
+ *.swp
21
+ *.swo
22
+
23
+ # OS
24
+ .DS_Store
25
+ Thumbs.db
@@ -0,0 +1,10 @@
1
+ // Flight Framework Configuration
2
+
3
+ export default {
4
+ ui: {
5
+ framework: '{{UI_FRAMEWORK}}',
6
+ },
7
+ rendering: {
8
+ default: 'ssr',
9
+ },
10
+ };
@@ -0,0 +1,58 @@
1
+ /* Flight - Minimal CSS */
2
+
3
+ :root {
4
+ --color-bg: #0a0a0f;
5
+ --color-text: #f0f0f5;
6
+ --color-muted: #8888a0;
7
+ --color-primary: #6366f1;
8
+ --font-sans: system-ui, -apple-system, sans-serif;
9
+ --font-mono: 'Fira Code', monospace;
10
+ }
11
+
12
+ *, *::before, *::after {
13
+ box-sizing: border-box;
14
+ margin: 0;
15
+ padding: 0;
16
+ }
17
+
18
+ body {
19
+ font-family: var(--font-sans);
20
+ background: var(--color-bg);
21
+ color: var(--color-text);
22
+ line-height: 1.6;
23
+ min-height: 100vh;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ }
28
+
29
+ main {
30
+ text-align: center;
31
+ padding: 2rem;
32
+ }
33
+
34
+ h1 {
35
+ font-size: 2.5rem;
36
+ margin-bottom: 1rem;
37
+ }
38
+
39
+ p {
40
+ color: var(--color-muted);
41
+ margin-bottom: 0.5rem;
42
+ }
43
+
44
+ code {
45
+ font-family: var(--font-mono);
46
+ background: rgba(99, 102, 241, 0.1);
47
+ padding: 0.2rem 0.5rem;
48
+ border-radius: 4px;
49
+ color: var(--color-primary);
50
+ }
51
+
52
+ @media (prefers-color-scheme: light) {
53
+ :root {
54
+ --color-bg: #fafafa;
55
+ --color-text: #1a1a2e;
56
+ --color-muted: #64648a;
57
+ }
58
+ }
@@ -0,0 +1,19 @@
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
+ <link rel="stylesheet" href="/src/styles/global.css" />
9
+ <script src="https://unpkg.com/htmx.org@2.0.0"></script>
10
+ </head>
11
+
12
+ <body hx-boost="true">
13
+ <main>
14
+ <h1>Flight ✈️</h1>
15
+ <p>Edit <code>index.html</code> to get started.</p>
16
+ </main>
17
+ </body>
18
+
19
+ </html>
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "devDependencies": {
12
+ "vite": "^6.0.0"
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ server: { port: 5173 },
5
+ build: { target: 'es2022' },
6
+ });
@@ -0,0 +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
+
15
+ </html>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "lit": "^3.2.0"
13
+ },
14
+ "devDependencies": {
15
+ "@lit-labs/ssr": "^3.3.0",
16
+ "typescript": "^5.7.0",
17
+ "vite": "^6.0.0"
18
+ }
19
+ }
@@ -0,0 +1,18 @@
1
+ import { LitElement, html, css } from 'lit';
2
+ import { customElement } from 'lit/decorators.js';
3
+
4
+ @customElement('app-root')
5
+ export class AppRoot extends LitElement {
6
+ static styles = css`
7
+ :host { display: block; }
8
+ `;
9
+
10
+ render() {
11
+ return html`
12
+ <main>
13
+ <h1>Flight ✈️</h1>
14
+ <p>Edit <code>src/app-root.ts</code> to get started.</p>
15
+ </main>
16
+ `;
17
+ }
18
+ }
@@ -0,0 +1,5 @@
1
+ import './app-root.js';
2
+ import './styles/global.css';
3
+
4
+ // Lit Web Components are self-hydrating via Declarative Shadow DOM
5
+ console.log('Lit app ready');
@@ -0,0 +1,9 @@
1
+ import { render } from '@lit-labs/ssr';
2
+ import { html } from 'lit';
3
+ import { collectResult } from '@lit-labs/ssr/lib/render-result.js';
4
+ import './app-root.js';
5
+
6
+ export async function render(_url: string): Promise<string> {
7
+ const result = render(html`<app-root></app-root>`);
8
+ return collectResult(result);
9
+ }
@@ -0,0 +1,19 @@
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
+ "experimentalDecorators": true,
14
+ "useDefineForClassFields": false
15
+ },
16
+ "include": [
17
+ "src"
18
+ ]
19
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ server: { port: 5173 },
5
+ build: { target: 'es2022' },
6
+ });
@@ -0,0 +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.tsx"></script>
13
+ </body>
14
+
15
+ </html>
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "preact": "^10.25.0"
13
+ },
14
+ "devDependencies": {
15
+ "@preact/preset-vite": "^2.9.0",
16
+ "preact-render-to-string": "^6.5.0",
17
+ "typescript": "^5.7.0",
18
+ "vite": "^6.0.0"
19
+ }
20
+ }
@@ -0,0 +1,8 @@
1
+ export default function App() {
2
+ return (
3
+ <main>
4
+ <h1>Flight ✈️</h1>
5
+ <p>Edit <code>src/App.tsx</code> to get started.</p>
6
+ </main>
7
+ );
8
+ }
@@ -0,0 +1,11 @@
1
+ import { hydrate, render } from 'preact';
2
+ import App from './App';
3
+ import './styles/global.css';
4
+
5
+ const root = document.getElementById('root')!;
6
+
7
+ if (root.innerHTML.trim()) {
8
+ hydrate(<App />, root);
9
+ } else {
10
+ render(<App />, root);
11
+ }
@@ -0,0 +1,6 @@
1
+ import renderToString from 'preact-render-to-string';
2
+ import App from './App';
3
+
4
+ export function render(_url: string): string {
5
+ return renderToString(<App />);
6
+ }
@@ -0,0 +1,19 @@
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
+ "jsx": "react-jsx",
14
+ "jsxImportSource": "preact"
15
+ },
16
+ "include": [
17
+ "src"
18
+ ]
19
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vite';
2
+ import preact from '@preact/preset-vite';
3
+
4
+ export default defineConfig({
5
+ plugins: [preact()],
6
+ server: { port: 5173 },
7
+ build: { target: 'es2022' },
8
+ });
@@ -0,0 +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.tsx"></script>
13
+ </body>
14
+
15
+ </html>
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "@builder.io/qwik": "^2.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "typescript": "^5.7.0",
16
+ "vite": "^6.0.0"
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ import { component$ } from '@builder.io/qwik';
2
+
3
+ export default component$(() => {
4
+ return (
5
+ <main>
6
+ <h1>Flight ✈️</h1>
7
+ <p>Edit <code>src/App.tsx</code> to get started.</p>
8
+ </main>
9
+ );
10
+ });
@@ -0,0 +1,4 @@
1
+ import './styles/global.css';
2
+
3
+ // Qwik uses resumability - no hydration needed
4
+ console.log('Qwik app resumed');
@@ -0,0 +1,9 @@
1
+ import { renderToString } from '@builder.io/qwik/server';
2
+ import App from './App';
3
+
4
+ export async function render(_url: string): Promise<string> {
5
+ const { html } = await renderToString(<App />, {
6
+ containerTagName: 'div',
7
+ });
8
+ return html;
9
+ }
@@ -0,0 +1,19 @@
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
+ "jsx": "react-jsx",
14
+ "jsxImportSource": "@builder.io/qwik"
15
+ },
16
+ "include": [
17
+ "src"
18
+ ]
19
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vite';
2
+ import { qwikVite } from '@builder.io/qwik/optimizer';
3
+
4
+ export default defineConfig({
5
+ plugins: [qwikVite()],
6
+ server: { port: 5173 },
7
+ build: { target: 'es2022' },
8
+ });
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{PROJECT_NAME}}</title>
7
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
+ </head>
9
+ <body>
10
+ <div id="root"><!--ssr-outlet--></div>
11
+ <script type="module" src="/src/entry-client.tsx"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^19.0.0",
13
+ "react-dom": "^19.0.0"
14
+ },
15
+ "devDependencies": {
16
+ "@vitejs/plugin-react": "^4.3.0",
17
+ "@types/react": "^19.0.0",
18
+ "@types/react-dom": "^19.0.0",
19
+ "typescript": "^5.7.0",
20
+ "vite": "^6.0.0"
21
+ }
22
+ }
@@ -0,0 +1,8 @@
1
+ export default function App() {
2
+ return (
3
+ <main>
4
+ <h1>Flight ✈️</h1>
5
+ <p>Edit <code>src/App.tsx</code> to get started.</p>
6
+ </main>
7
+ );
8
+ }
@@ -0,0 +1,11 @@
1
+ import { hydrateRoot, createRoot } from 'react-dom/client';
2
+ import App from './App';
3
+ import './styles/global.css';
4
+
5
+ const root = document.getElementById('root')!;
6
+
7
+ if (root.innerHTML.trim()) {
8
+ hydrateRoot(root, <App />);
9
+ } else {
10
+ createRoot(root).render(<App />);
11
+ }
@@ -0,0 +1,6 @@
1
+ import { renderToString } from 'react-dom/server';
2
+ import App from './App';
3
+
4
+ export function render(_url: string): string {
5
+ return renderToString(<App />);
6
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": [
7
+ "ES2022",
8
+ "DOM",
9
+ "DOM.Iterable"
10
+ ],
11
+ "strict": true,
12
+ "noEmit": true,
13
+ "esModuleInterop": true,
14
+ "skipLibCheck": true,
15
+ "jsx": "react-jsx"
16
+ },
17
+ "include": [
18
+ "src"
19
+ ]
20
+ }