@flight-framework/cli 0.0.1 → 0.0.3

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
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ server: {
7
+ port: 5173,
8
+ },
9
+ build: {
10
+ target: 'es2022',
11
+ },
12
+ });
@@ -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,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
+ "solid-js": "^1.9.0"
13
+ },
14
+ "devDependencies": {
15
+ "vite-plugin-solid": "^2.10.0",
16
+ "typescript": "^5.7.0",
17
+ "vite": "^6.0.0"
18
+ }
19
+ }
@@ -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 'solid-js/web';
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 'solid-js/web';
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": "preserve",
14
+ "jsxImportSource": "solid-js"
15
+ },
16
+ "include": [
17
+ "src"
18
+ ]
19
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vite';
2
+ import solid from 'vite-plugin-solid';
3
+
4
+ export default defineConfig({
5
+ plugins: [solid()],
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.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
+ "svelte": "^5.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "@sveltejs/vite-plugin-svelte": "^4.0.0",
16
+ "typescript": "^5.7.0",
17
+ "vite": "^6.0.0"
18
+ }
19
+ }
@@ -0,0 +1,4 @@
1
+ <main>
2
+ <h1>Flight ✈️</h1>
3
+ <p>Edit <code>src/App.svelte</code> to get started.</p>
4
+ </main>
@@ -0,0 +1,7 @@
1
+ import App from './App.svelte';
2
+ import './styles/global.css';
3
+
4
+ const target = document.getElementById('root')!;
5
+ const hasSSR = target.innerHTML.trim() !== '';
6
+
7
+ new App({ target, hydrate: hasSSR });
@@ -0,0 +1,7 @@
1
+ import { render } from 'svelte/server';
2
+ import App from './App.svelte';
3
+
4
+ export function render(_url: string): string {
5
+ const { body } = render(App, { props: {} });
6
+ return body;
7
+ }
@@ -0,0 +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/**/*.svelte"
17
+ ]
18
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vite';
2
+ import { svelte } from '@sveltejs/vite-plugin-svelte';
3
+
4
+ export default defineConfig({
5
+ plugins: [svelte()],
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"></div>
12
+ <script type="module" src="/src/main.ts"></script>
13
+ </body>
14
+
15
+ </html>
@@ -0,0 +1,15 @@
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
+ "typescript": "^5.7.0",
13
+ "vite": "^6.0.0"
14
+ }
15
+ }
@@ -0,0 +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
+ `;
@@ -0,0 +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
+ ]
17
+ }
@@ -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
+ "vue": "^3.5.0"
13
+ },
14
+ "devDependencies": {
15
+ "@vitejs/plugin-vue": "^5.2.0",
16
+ "typescript": "^5.7.0",
17
+ "vite": "^6.0.0"
18
+ }
19
+ }
@@ -0,0 +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>
@@ -0,0 +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
+ }
@@ -0,0 +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
+ }
@@ -0,0 +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
+ ]
18
+ }
@@ -0,0 +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
+ });
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-2026 Flight Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.