@launch77/cli 1.2.0 ā 1.4.0
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 +22 -0
- package/dist/cli.js +8 -1
- package/dist/cli.js.map +1 -1
- package/dist/infrastructure/git.d.ts +37 -0
- package/dist/infrastructure/git.d.ts.map +1 -0
- package/dist/infrastructure/git.js +82 -0
- package/dist/infrastructure/git.js.map +1 -0
- package/dist/infrastructure/github.d.ts +43 -0
- package/dist/infrastructure/github.d.ts.map +1 -0
- package/dist/infrastructure/github.js +89 -0
- package/dist/infrastructure/github.js.map +1 -0
- package/dist/infrastructure/template-generator.d.ts +1 -1
- package/dist/infrastructure/template-generator.d.ts.map +1 -1
- package/dist/infrastructure/template.d.ts +5 -0
- package/dist/infrastructure/template.d.ts.map +1 -1
- package/dist/infrastructure/template.js +11 -0
- package/dist/infrastructure/template.js.map +1 -1
- package/dist/modules/app/commands/create-app.js +1 -1
- package/dist/modules/app/commands/create-app.js.map +1 -1
- package/dist/modules/app/commands/delete-app.js +1 -1
- package/dist/modules/app/commands/delete-app.js.map +1 -1
- package/dist/modules/app/services/app-svc.d.ts +1 -1
- package/dist/modules/app/services/app-svc.d.ts.map +1 -1
- package/dist/modules/app/services/manifest-svc.d.ts +1 -1
- package/dist/modules/app/services/manifest-svc.d.ts.map +1 -1
- package/dist/modules/catalog/config/catalog-config.test.js +1 -1
- package/dist/modules/catalog/config/catalog-config.test.js.map +1 -1
- package/dist/modules/catalog/schemas/catalog-ui-components.schema.json +2 -18
- package/dist/modules/git/commands/git-connect.d.ts +3 -0
- package/dist/modules/git/commands/git-connect.d.ts.map +1 -0
- package/dist/modules/git/commands/git-connect.js +156 -0
- package/dist/modules/git/commands/git-connect.js.map +1 -0
- package/dist/modules/git/errors/git-errors.d.ts +21 -0
- package/dist/modules/git/errors/git-errors.d.ts.map +1 -0
- package/dist/modules/git/errors/git-errors.js +41 -0
- package/dist/modules/git/errors/git-errors.js.map +1 -0
- package/dist/modules/git/index.d.ts +5 -0
- package/dist/modules/git/index.d.ts.map +1 -0
- package/dist/modules/git/index.js +8 -0
- package/dist/modules/git/index.js.map +1 -0
- package/dist/modules/git/services/git-service.d.ts +24 -0
- package/dist/modules/git/services/git-service.d.ts.map +1 -0
- package/dist/modules/git/services/git-service.js +56 -0
- package/dist/modules/git/services/git-service.js.map +1 -0
- package/dist/modules/git/services/github-service.d.ts +27 -0
- package/dist/modules/git/services/github-service.d.ts.map +1 -0
- package/dist/modules/git/services/github-service.js +45 -0
- package/dist/modules/git/services/github-service.js.map +1 -0
- package/dist/modules/plugin/commands/plugin-create.d.ts +3 -0
- package/dist/modules/plugin/commands/plugin-create.d.ts.map +1 -0
- package/dist/modules/plugin/commands/plugin-create.js +59 -0
- package/dist/modules/plugin/commands/plugin-create.js.map +1 -0
- package/dist/modules/plugin/commands/plugin-install.d.ts.map +1 -1
- package/dist/modules/plugin/commands/plugin-install.js +9 -24
- package/dist/modules/plugin/commands/plugin-install.js.map +1 -1
- package/dist/modules/plugin/errors/plugin-errors.d.ts +24 -1
- package/dist/modules/plugin/errors/plugin-errors.d.ts.map +1 -1
- package/dist/modules/plugin/errors/plugin-errors.js +79 -6
- package/dist/modules/plugin/errors/plugin-errors.js.map +1 -1
- package/dist/modules/plugin/index.d.ts +4 -2
- package/dist/modules/plugin/index.d.ts.map +1 -1
- package/dist/modules/plugin/index.js +4 -2
- package/dist/modules/plugin/index.js.map +1 -1
- package/dist/modules/plugin/lib/plugin-registry.d.ts +6 -12
- package/dist/modules/plugin/lib/plugin-registry.d.ts.map +1 -1
- package/dist/modules/plugin/lib/plugin-registry.js +13 -30
- package/dist/modules/plugin/lib/plugin-registry.js.map +1 -1
- package/dist/modules/plugin/lib/plugin-resolver.d.ts +76 -0
- package/dist/modules/plugin/lib/plugin-resolver.d.ts.map +1 -0
- package/dist/modules/plugin/lib/plugin-resolver.js +128 -0
- package/dist/modules/plugin/lib/plugin-resolver.js.map +1 -0
- package/dist/modules/plugin/lib/plugin-resolver.test.d.ts +2 -0
- package/dist/modules/plugin/lib/plugin-resolver.test.d.ts.map +1 -0
- package/dist/modules/plugin/lib/plugin-resolver.test.js +175 -0
- package/dist/modules/plugin/lib/plugin-resolver.test.js.map +1 -0
- package/dist/modules/plugin/services/plugin-create-service.d.ts +16 -0
- package/dist/modules/plugin/services/plugin-create-service.d.ts.map +1 -0
- package/dist/modules/plugin/services/plugin-create-service.js +47 -0
- package/dist/modules/plugin/services/plugin-create-service.js.map +1 -0
- package/dist/modules/plugin/services/plugin-svc.d.ts +8 -3
- package/dist/modules/plugin/services/plugin-svc.d.ts.map +1 -1
- package/dist/modules/plugin/services/plugin-svc.js +96 -15
- package/dist/modules/plugin/services/plugin-svc.js.map +1 -1
- package/dist/modules/release/commands/release-init.d.ts +3 -0
- package/dist/modules/release/commands/release-init.d.ts.map +1 -0
- package/dist/modules/release/commands/release-init.js +92 -0
- package/dist/modules/release/commands/release-init.js.map +1 -0
- package/dist/modules/release/errors/release-errors.d.ts +7 -0
- package/dist/modules/release/errors/release-errors.d.ts.map +1 -0
- package/dist/modules/release/errors/release-errors.js +13 -0
- package/dist/modules/release/errors/release-errors.js.map +1 -0
- package/dist/modules/release/index.d.ts +4 -0
- package/dist/modules/release/index.d.ts.map +1 -0
- package/dist/modules/release/index.js +7 -0
- package/dist/modules/release/index.js.map +1 -0
- package/dist/modules/release/services/release-service.d.ts +34 -0
- package/dist/modules/release/services/release-service.d.ts.map +1 -0
- package/dist/modules/release/services/release-service.js +154 -0
- package/dist/modules/release/services/release-service.js.map +1 -0
- package/dist/modules/workspace/commands/init-workspace.d.ts.map +1 -1
- package/dist/modules/workspace/commands/init-workspace.js +4 -5
- package/dist/modules/workspace/commands/init-workspace.js.map +1 -1
- package/dist/modules/workspace/services/workspace-service.d.ts +2 -1
- package/dist/modules/workspace/services/workspace-service.d.ts.map +1 -1
- package/dist/modules/workspace/services/workspace-service.js +27 -1
- package/dist/modules/workspace/services/workspace-service.js.map +1 -1
- package/dist/templates/plugin/README.md.hbs +39 -0
- package/dist/{plugins/theme/package.json ā templates/plugin/package.json.hbs} +5 -3
- package/dist/templates/plugin/plugin.json.hbs +7 -0
- package/dist/templates/plugin/src/generator.ts.hbs +64 -0
- package/dist/templates/plugin/templates/src/.gitkeep +0 -0
- package/dist/templates/plugin/tsconfig.json +10 -0
- package/dist/{plugins/theme ā templates/plugin}/tsup.config.ts +0 -1
- package/dist/templates/workspace/.github/workflows/ci.yml +102 -0
- package/dist/templates/workspace/package.json +16 -1
- package/dist/templates/workspace/turbo.json +5 -0
- package/dist/utils/launch77-context.d.ts +1 -1
- package/dist/utils/launch77-context.d.ts.map +1 -1
- package/dist/utils/launch77-context.js +25 -2
- package/dist/utils/launch77-context.js.map +1 -1
- package/dist/utils/launch77-validation.d.ts +1 -1
- package/dist/utils/launch77-validation.d.ts.map +1 -1
- package/dist/utils/string.d.ts +13 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +18 -0
- package/dist/utils/string.js.map +1 -0
- package/package.json +7 -10
- package/src/cli.ts +10 -1
- package/src/infrastructure/git.ts +86 -0
- package/src/infrastructure/github.ts +111 -0
- package/src/infrastructure/template-generator.ts +1 -1
- package/src/infrastructure/template.ts +14 -0
- package/src/modules/app/commands/create-app.ts +1 -1
- package/src/modules/app/commands/delete-app.ts +1 -1
- package/src/modules/app/services/app-svc.ts +1 -1
- package/src/modules/app/services/manifest-svc.ts +1 -1
- package/src/modules/catalog/config/catalog-config.test.ts +1 -1
- package/src/modules/git/commands/git-connect.ts +183 -0
- package/src/modules/git/errors/git-errors.ts +44 -0
- package/src/modules/git/index.ts +9 -0
- package/src/modules/git/services/git-service.ts +63 -0
- package/src/modules/git/services/github-service.ts +52 -0
- package/src/modules/plugin/commands/plugin-create.ts +68 -0
- package/src/modules/plugin/commands/plugin-install.ts +9 -26
- package/src/modules/plugin/errors/plugin-errors.ts +87 -6
- package/src/modules/plugin/index.ts +4 -2
- package/src/modules/plugin/lib/plugin-registry.ts +14 -37
- package/src/modules/plugin/lib/plugin-resolver.test.ts +215 -0
- package/src/modules/plugin/lib/plugin-resolver.ts +160 -0
- package/src/modules/plugin/services/plugin-create-service.ts +69 -0
- package/src/modules/plugin/services/plugin-svc.ts +108 -15
- package/src/modules/release/commands/release-init.ts +102 -0
- package/src/modules/release/errors/release-errors.ts +13 -0
- package/src/modules/release/index.ts +8 -0
- package/src/modules/release/services/release-service.ts +170 -0
- package/src/modules/workspace/commands/init-workspace.ts +4 -6
- package/src/modules/workspace/services/workspace-service.ts +30 -1
- package/src/utils/launch77-context.ts +29 -3
- package/src/utils/launch77-validation.ts +1 -1
- package/src/utils/string.ts +17 -0
- package/templates/plugin/README.md.hbs +39 -0
- package/templates/plugin/package.json.hbs +34 -0
- package/templates/plugin/plugin.json.hbs +7 -0
- package/templates/plugin/src/generator.ts.hbs +64 -0
- package/templates/plugin/templates/src/.gitkeep +0 -0
- package/templates/plugin/tsconfig.json +10 -0
- package/templates/plugin/tsup.config.ts +9 -0
- package/templates/workspace/.github/workflows/ci.yml +102 -0
- package/templates/workspace/package.json +5 -0
- package/templates/workspace/turbo.json +5 -0
- package/tests/integration/cli.test.ts +25 -0
- package/tests/integration/setup.ts +20 -0
- package/vitest.config.ts +9 -0
- package/vitest.integration.config.ts +9 -0
- package/dist/app-templates/webapp/.env.ci +0 -6
- package/dist/app-templates/webapp/.env.example +0 -9
- package/dist/app-templates/webapp/.eslintrc.json +0 -6
- package/dist/app-templates/webapp/README.md.hbs +0 -80
- package/dist/app-templates/webapp/app/about/page.tsx.hbs +0 -41
- package/dist/app-templates/webapp/app/dashboard/page.tsx.hbs +0 -51
- package/dist/app-templates/webapp/app/globals.css +0 -31
- package/dist/app-templates/webapp/app/layout.tsx.hbs +0 -26
- package/dist/app-templates/webapp/app/page.tsx.hbs +0 -30
- package/dist/app-templates/webapp/next.config.js +0 -99
- package/dist/app-templates/webapp/package.json.hbs +0 -30
- package/dist/app-templates/webapp/postcss.config.js +0 -6
- package/dist/app-templates/webapp/tailwind.config.ts +0 -24
- package/dist/app-templates/webapp/tsconfig.json +0 -29
- package/dist/app-templates/webapp/vercel.json.hbs +0 -7
- package/dist/modules/catalog/schemas/schemas/catalog-ui-components.schema.json +0 -145
- package/dist/plugins/theme/plugin.json +0 -9
- package/dist/plugins/theme/src/generator.ts +0 -92
- package/dist/plugins/theme/src/utils/config-modifier.ts +0 -142
- package/dist/plugins/theme/src/utils/css-modifier.ts +0 -89
- package/dist/plugins/theme/templates/app/theme-test/page.tsx +0 -156
- package/dist/plugins/theme/templates/src/modules/theme/README.md +0 -209
- package/dist/plugins/theme/templates/src/modules/theme/config/brand.css +0 -23
- package/dist/plugins/theme/tsconfig.json +0 -14
- package/dist/templates/templates/startup/apps/.gitkeep +0 -8
- package/dist/templates/templates/workspace/.launch77/workspace.json +0 -3
- package/dist/templates/templates/workspace/README.md +0 -62
- package/dist/templates/templates/workspace/app-templates/.gitkeep +0 -1
- package/dist/templates/templates/workspace/apps/.gitkeep +0 -1
- package/dist/templates/templates/workspace/libraries/.gitkeep +0 -1
- package/dist/templates/templates/workspace/package.json +0 -31
- package/dist/templates/templates/workspace/plugins/.gitkeep +0 -1
- package/dist/templates/templates/workspace/tsconfig.json +0 -22
- package/dist/templates/templates/workspace/turbo.json +0 -25
- package/launch77-cli-1.2.0.tgz +0 -0
- package/src/modules/plugin/lib/launch77-workspace.code-workspace +0 -14
- /package/dist/templates/{templates/workspace ā workspace}/.eslintignore +0 -0
- /package/dist/templates/{templates/workspace ā workspace}/.eslintrc.js +0 -0
- /package/dist/templates/{templates/workspace ā workspace}/.husky/pre-push +0 -0
- /package/dist/templates/{templates/workspace ā workspace}/.lintstagedrc.json +0 -0
- /package/dist/templates/{templates/workspace ā workspace}/.prettierrc +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import Link from 'next/link'
|
|
2
|
-
|
|
3
|
-
export default function DashboardPage() {
|
|
4
|
-
return (
|
|
5
|
-
<div className="min-h-screen bg-gray-50">
|
|
6
|
-
<nav className="border-b border-gray-200">
|
|
7
|
-
<div className="max-w-7xl mx-auto px-4 py-4">
|
|
8
|
-
<div className="flex items-center justify-between">
|
|
9
|
-
<h1 className="text-xl font-bold text-gray-900">{{appName}}</h1>
|
|
10
|
-
<Link
|
|
11
|
-
href="/"
|
|
12
|
-
className="px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100 rounded-md transition-colors"
|
|
13
|
-
>
|
|
14
|
-
Home
|
|
15
|
-
</Link>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</nav>
|
|
19
|
-
|
|
20
|
-
<main className="max-w-7xl mx-auto px-4 py-8">
|
|
21
|
-
<div className="mb-8">
|
|
22
|
-
<h2 className="text-3xl font-bold text-gray-900 mb-2">Dashboard</h2>
|
|
23
|
-
<p className="text-gray-600">
|
|
24
|
-
This is a protected page example. Add your authentication logic here.
|
|
25
|
-
</p>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
|
29
|
-
<div className="rounded-lg border border-gray-200 bg-white p-6">
|
|
30
|
-
<h3 className="font-semibold text-gray-900 mb-2">Card 1</h3>
|
|
31
|
-
<p className="text-sm text-gray-600">
|
|
32
|
-
Example content for your dashboard
|
|
33
|
-
</p>
|
|
34
|
-
</div>
|
|
35
|
-
<div className="rounded-lg border border-gray-200 bg-white p-6">
|
|
36
|
-
<h3 className="font-semibold text-gray-900 mb-2">Card 2</h3>
|
|
37
|
-
<p className="text-sm text-gray-600">
|
|
38
|
-
Example content for your dashboard
|
|
39
|
-
</p>
|
|
40
|
-
</div>
|
|
41
|
-
<div className="rounded-lg border border-gray-200 bg-white p-6">
|
|
42
|
-
<h3 className="font-semibold text-gray-900 mb-2">Card 3</h3>
|
|
43
|
-
<p className="text-sm text-gray-600">
|
|
44
|
-
Example content for your dashboard
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</main>
|
|
49
|
-
</div>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@tailwind base;
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
4
|
-
|
|
5
|
-
/* Base resets and accessibility styles */
|
|
6
|
-
@layer base {
|
|
7
|
-
html {
|
|
8
|
-
scroll-behavior: smooth;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
body {
|
|
12
|
-
@apply antialiased;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Focus styles for accessibility */
|
|
16
|
-
:focus-visible {
|
|
17
|
-
@apply outline-none ring-2 ring-blue-500 ring-offset-2;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/* Reduced motion support */
|
|
21
|
-
@media (prefers-reduced-motion: reduce) {
|
|
22
|
-
*,
|
|
23
|
-
*::before,
|
|
24
|
-
*::after {
|
|
25
|
-
animation-duration: 0.01ms !important;
|
|
26
|
-
animation-iteration-count: 1 !important;
|
|
27
|
-
transition-duration: 0.01ms !important;
|
|
28
|
-
scroll-behavior: auto !important;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Metadata } from 'next'
|
|
2
|
-
import { Inter } from 'next/font/google'
|
|
3
|
-
|
|
4
|
-
import './globals.css'
|
|
5
|
-
|
|
6
|
-
const inter = Inter({ subsets: ['latin'] })
|
|
7
|
-
|
|
8
|
-
export const metadata: Metadata = {
|
|
9
|
-
title: '{{appName}}',
|
|
10
|
-
description: '{{appName}} - Built with Launch77 Platform',
|
|
11
|
-
icons: {
|
|
12
|
-
icon: '/favicon.ico',
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default function RootLayout({
|
|
17
|
-
children,
|
|
18
|
-
}: {
|
|
19
|
-
children: React.ReactNode
|
|
20
|
-
}) {
|
|
21
|
-
return (
|
|
22
|
-
<html lang="en" className={`${inter.className} scroll-smooth`}>
|
|
23
|
-
<body>{children}</body>
|
|
24
|
-
</html>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import Link from 'next/link'
|
|
2
|
-
|
|
3
|
-
export default function HomePage() {
|
|
4
|
-
return (
|
|
5
|
-
<main className="min-h-screen flex items-center justify-center bg-gray-50">
|
|
6
|
-
<div className="max-w-2xl mx-auto px-4 py-16 text-center">
|
|
7
|
-
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
|
8
|
-
Welcome to {{appName}}
|
|
9
|
-
</h1>
|
|
10
|
-
<p className="text-lg text-gray-600 mb-8">
|
|
11
|
-
Built with the Launch77 Platform
|
|
12
|
-
</p>
|
|
13
|
-
<div className="flex gap-4 justify-center">
|
|
14
|
-
<Link
|
|
15
|
-
href="/dashboard"
|
|
16
|
-
className="inline-flex items-center justify-center px-6 py-3 text-base font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors"
|
|
17
|
-
>
|
|
18
|
-
Go to Dashboard
|
|
19
|
-
</Link>
|
|
20
|
-
<Link
|
|
21
|
-
href="/about"
|
|
22
|
-
className="inline-flex items-center justify-center px-6 py-3 text-base font-medium text-gray-700 bg-white hover:bg-gray-50 border border-gray-300 rounded-lg transition-colors"
|
|
23
|
-
>
|
|
24
|
-
Learn More
|
|
25
|
-
</Link>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</main>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// Load .env.ci in CI environments for build-time placeholder variables
|
|
2
|
-
// This allows static page generation to succeed without real env values
|
|
3
|
-
// Real values come from deployment platform (Vercel/Railway)
|
|
4
|
-
if (process.env.CI === 'true') {
|
|
5
|
-
const path = require('path')
|
|
6
|
-
require('dotenv').config({ path: path.join(__dirname, '.env.ci') })
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** @type {import('next').NextConfig} */
|
|
10
|
-
const nextConfig = {
|
|
11
|
-
reactStrictMode: true,
|
|
12
|
-
images: {
|
|
13
|
-
formats: ['image/avif', 'image/webp'],
|
|
14
|
-
deviceSizes: [640, 750, 1080, 1200, 1920],
|
|
15
|
-
imageSizes: [16, 32, 48, 64, 96, 128, 256],
|
|
16
|
-
minimumCacheTTL: 60 * 60 * 24 * 365, // 1 year
|
|
17
|
-
},
|
|
18
|
-
compress: true,
|
|
19
|
-
poweredByHeader: false,
|
|
20
|
-
swcMinify: true,
|
|
21
|
-
compiler: {
|
|
22
|
-
removeConsole: process.env.NODE_ENV === 'production',
|
|
23
|
-
},
|
|
24
|
-
headers: async () => [
|
|
25
|
-
{
|
|
26
|
-
source: '/:path*',
|
|
27
|
-
headers: [
|
|
28
|
-
{
|
|
29
|
-
key: 'X-DNS-Prefetch-Control',
|
|
30
|
-
value: 'on',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
key: 'X-Content-Type-Options',
|
|
34
|
-
value: 'nosniff',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
key: 'X-Frame-Options',
|
|
38
|
-
value: 'SAMEORIGIN',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
key: 'X-XSS-Protection',
|
|
42
|
-
value: '1; mode=block',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
key: 'Referrer-Policy',
|
|
46
|
-
value: 'origin-when-cross-origin',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
// Cache static assets aggressively
|
|
51
|
-
{
|
|
52
|
-
source: '/(.*).jpg',
|
|
53
|
-
headers: [
|
|
54
|
-
{
|
|
55
|
-
key: 'Cache-Control',
|
|
56
|
-
value: 'public, max-age=31536000, immutable',
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
source: '/(.*).png',
|
|
62
|
-
headers: [
|
|
63
|
-
{
|
|
64
|
-
key: 'Cache-Control',
|
|
65
|
-
value: 'public, max-age=31536000, immutable',
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
source: '/(.*).svg',
|
|
71
|
-
headers: [
|
|
72
|
-
{
|
|
73
|
-
key: 'Cache-Control',
|
|
74
|
-
value: 'public, max-age=31536000, immutable',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
source: '/(.*).webp',
|
|
80
|
-
headers: [
|
|
81
|
-
{
|
|
82
|
-
key: 'Cache-Control',
|
|
83
|
-
value: 'public, max-age=31536000, immutable',
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
source: '/_next/static/(.*)',
|
|
89
|
-
headers: [
|
|
90
|
-
{
|
|
91
|
-
key: 'Cache-Control',
|
|
92
|
-
value: 'public, max-age=31536000, immutable',
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
module.exports = nextConfig
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{#if startupName}}@{{startupName}}/{{appName}}{{else}}{{appName}}{{/if}}",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"description": "{{appName}}{{#if startupName}} ({{startupName}}){{/if}} - Built with Launch77 Platform",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "next dev{{#if port}} -p {{port}}{{/if}}",
|
|
8
|
-
"build": "next build",
|
|
9
|
-
"start": "next start{{#if port}} -p {{port}}{{/if}}",
|
|
10
|
-
"test": "echo \"No tests configured\" && exit 0",
|
|
11
|
-
"lint": "next lint",
|
|
12
|
-
"typecheck": "tsc --noEmit"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"next": "^14.2.0",
|
|
16
|
-
"react": "^18.3.1",
|
|
17
|
-
"react-dom": "^18.3.1"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/node": "^20.0.0",
|
|
21
|
-
"@types/react": "^18.2.79",
|
|
22
|
-
"@types/react-dom": "^18.2.25",
|
|
23
|
-
"autoprefixer": "^10.4.21",
|
|
24
|
-
"eslint": "^8.56.0",
|
|
25
|
-
"eslint-config-next": "^14.2.0",
|
|
26
|
-
"postcss": "^8.5.6",
|
|
27
|
-
"tailwindcss": "^3.4.17",
|
|
28
|
-
"typescript": "^5.3.0"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Config } from 'tailwindcss'
|
|
2
|
-
|
|
3
|
-
const config: Config = {
|
|
4
|
-
content: [
|
|
5
|
-
'./app/**/*.{js,ts,jsx,tsx,mdx}',
|
|
6
|
-
'./components/**/*.{js,ts,jsx,tsx,mdx}',
|
|
7
|
-
'./lib/**/*.{js,ts,jsx,tsx,mdx}',
|
|
8
|
-
],
|
|
9
|
-
theme: {
|
|
10
|
-
extend: {
|
|
11
|
-
// Add your custom theme extensions here
|
|
12
|
-
// Example:
|
|
13
|
-
// colors: {
|
|
14
|
-
// brand: {
|
|
15
|
-
// 500: '#FF5816',
|
|
16
|
-
// 600: '#F03D00',
|
|
17
|
-
// },
|
|
18
|
-
// },
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
plugins: [],
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default config
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
-
"allowJs": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noEmit": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"module": "esnext",
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"resolveJsonModule": true,
|
|
14
|
-
"isolatedModules": true,
|
|
15
|
-
"jsx": "preserve",
|
|
16
|
-
"incremental": true,
|
|
17
|
-
"plugins": [
|
|
18
|
-
{
|
|
19
|
-
"name": "next"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"paths": {
|
|
23
|
-
"@/*": ["./*"]
|
|
24
|
-
},
|
|
25
|
-
"baseUrl": "."
|
|
26
|
-
},
|
|
27
|
-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
28
|
-
"exclude": ["node_modules"]
|
|
29
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://launch77.io/schemas/catalog-ui-components.schema.json",
|
|
4
|
-
"title": "Launch77 UI Components Catalog",
|
|
5
|
-
"description": "Catalog metadata for UI component libraries. Generated during library build and consumed by Launch77 platform for component discovery.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["catalogType", "catalogVersion", "packageName", "packageVersion", "generatedAt", "components"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"catalogType": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"const": "ui-components",
|
|
13
|
-
"description": "Type of catalog - identifies this as a UI components catalog"
|
|
14
|
-
},
|
|
15
|
-
"catalogVersion": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
18
|
-
"description": "Semantic version of the catalog schema (e.g., 0.1.0)"
|
|
19
|
-
},
|
|
20
|
-
"packageName": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"pattern": "^@[a-z0-9-]+/[a-z0-9-]+$",
|
|
23
|
-
"description": "NPM package name (e.g., @launch77/ui)"
|
|
24
|
-
},
|
|
25
|
-
"packageVersion": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"description": "Version of the package containing these components"
|
|
28
|
-
},
|
|
29
|
-
"generatedAt": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"format": "date-time",
|
|
32
|
-
"description": "ISO 8601 timestamp when catalog was generated"
|
|
33
|
-
},
|
|
34
|
-
"components": {
|
|
35
|
-
"type": "array",
|
|
36
|
-
"description": "Array of UI component metadata",
|
|
37
|
-
"items": {
|
|
38
|
-
"$ref": "#/definitions/UiComponent"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"definitions": {
|
|
43
|
-
"UiComponent": {
|
|
44
|
-
"type": "object",
|
|
45
|
-
"description": "Metadata for a single UI component",
|
|
46
|
-
"required": ["id", "kind", "name", "packageName", "category", "description", "tags"],
|
|
47
|
-
"additionalProperties": false,
|
|
48
|
-
"properties": {
|
|
49
|
-
"id": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"pattern": "^@[a-z0-9-]+/[a-z0-9-]+#[A-Z][a-zA-Z0-9]*$",
|
|
52
|
-
"description": "Unique identifier: packageName#ComponentName (e.g., @launch77/ui#Button)"
|
|
53
|
-
},
|
|
54
|
-
"kind": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"const": "ui_component",
|
|
57
|
-
"description": "Component kind - always 'ui_component' for UI components"
|
|
58
|
-
},
|
|
59
|
-
"name": {
|
|
60
|
-
"type": "string",
|
|
61
|
-
"pattern": "^[A-Z][a-zA-Z0-9]*$",
|
|
62
|
-
"description": "Component name in PascalCase (e.g., Button, AlertDialog)"
|
|
63
|
-
},
|
|
64
|
-
"packageName": {
|
|
65
|
-
"type": "string",
|
|
66
|
-
"pattern": "^@[a-z0-9-]+/[a-z0-9-]+$",
|
|
67
|
-
"description": "NPM package containing this component"
|
|
68
|
-
},
|
|
69
|
-
"category": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"enum": ["actions", "forms", "feedback", "layout", "marketing", "typography", "infrastructure", "compliance"],
|
|
72
|
-
"description": "Component category for organization and discovery"
|
|
73
|
-
},
|
|
74
|
-
"description": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"minLength": 1,
|
|
77
|
-
"description": "Human-readable description of the component"
|
|
78
|
-
},
|
|
79
|
-
"tags": {
|
|
80
|
-
"type": "array",
|
|
81
|
-
"description": "Search tags for component discovery",
|
|
82
|
-
"items": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"minLength": 1
|
|
85
|
-
},
|
|
86
|
-
"minItems": 1
|
|
87
|
-
},
|
|
88
|
-
"props": {
|
|
89
|
-
"type": "array",
|
|
90
|
-
"description": "Component props (optional - extracted from TypeScript)",
|
|
91
|
-
"items": {
|
|
92
|
-
"type": "string"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"sourcePath": {
|
|
96
|
-
"type": "string",
|
|
97
|
-
"description": "Relative path to component source file from repository root (optional)"
|
|
98
|
-
},
|
|
99
|
-
"library": {
|
|
100
|
-
"type": "string",
|
|
101
|
-
"description": "Parent library package name (optional - typically same as packageName)"
|
|
102
|
-
},
|
|
103
|
-
"guidance": {
|
|
104
|
-
"type": "object",
|
|
105
|
-
"description": "Usage guidance for the component (optional)",
|
|
106
|
-
"additionalProperties": false,
|
|
107
|
-
"properties": {
|
|
108
|
-
"whenToUse": {
|
|
109
|
-
"type": "string",
|
|
110
|
-
"description": "When to use this component"
|
|
111
|
-
},
|
|
112
|
-
"whenNotToUse": {
|
|
113
|
-
"type": "string",
|
|
114
|
-
"description": "When NOT to use this component (anti-patterns)"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"example": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"description": "Code example showing component usage (optional)"
|
|
121
|
-
},
|
|
122
|
-
"examples": {
|
|
123
|
-
"type": "object",
|
|
124
|
-
"description": "Reference to examples module (optional)",
|
|
125
|
-
"required": ["module", "export", "sourcePath"],
|
|
126
|
-
"additionalProperties": false,
|
|
127
|
-
"properties": {
|
|
128
|
-
"module": {
|
|
129
|
-
"type": "string",
|
|
130
|
-
"description": "Module path to import examples (e.g., @launch77/ui/examples)"
|
|
131
|
-
},
|
|
132
|
-
"export": {
|
|
133
|
-
"type": "string",
|
|
134
|
-
"description": "Export name for examples (e.g., ButtonExamples)"
|
|
135
|
-
},
|
|
136
|
-
"sourcePath": {
|
|
137
|
-
"type": "string",
|
|
138
|
-
"description": "Relative path to examples source file from repository root"
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import * as path from 'path'
|
|
3
|
-
import chalk from 'chalk'
|
|
4
|
-
import { StandardGenerator } from '@launch77/plugin-runtime'
|
|
5
|
-
import type { GeneratorContext } from '@launch77/plugin-runtime'
|
|
6
|
-
import { addTailwindPreset } from './utils/config-modifier.js'
|
|
7
|
-
import { insertCssImports } from './utils/css-modifier.js'
|
|
8
|
-
|
|
9
|
-
export class ThemeGenerator extends StandardGenerator {
|
|
10
|
-
constructor(context: GeneratorContext) {
|
|
11
|
-
super(context)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
protected async injectCode(): Promise<void> {
|
|
15
|
-
console.log(chalk.cyan('š§ Configuring theme...\n'))
|
|
16
|
-
|
|
17
|
-
await this.updateGlobalsCss()
|
|
18
|
-
await this.updateTailwindConfig()
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private async updateGlobalsCss(): Promise<void> {
|
|
22
|
-
const globalsCssPath = path.join(this.context.appPath, 'app/globals.css')
|
|
23
|
-
|
|
24
|
-
const result = await insertCssImports(globalsCssPath, [
|
|
25
|
-
"@import '@launch77-shared/lib-theme/tokens.css';",
|
|
26
|
-
"@import '../src/modules/theme/config/brand.css';",
|
|
27
|
-
])
|
|
28
|
-
|
|
29
|
-
if (result.success) {
|
|
30
|
-
if (result.alreadyExists) {
|
|
31
|
-
console.log(chalk.gray(' ā CSS imports already exist in app/globals.css'))
|
|
32
|
-
} else {
|
|
33
|
-
console.log(chalk.green(' ā Added CSS imports to app/globals.css'))
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
console.log(chalk.yellow(` ā ļø Could not auto-configure app/globals.css: ${result.error}`))
|
|
37
|
-
console.log(chalk.gray(' You will need to add imports manually'))
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private async updateTailwindConfig(): Promise<void> {
|
|
42
|
-
const tailwindConfigPath = path.join(this.context.appPath, 'tailwind.config.ts')
|
|
43
|
-
|
|
44
|
-
const result = await addTailwindPreset(tailwindConfigPath, "require('@launch77-shared/lib-theme')")
|
|
45
|
-
|
|
46
|
-
if (result.success) {
|
|
47
|
-
if (result.alreadyExists) {
|
|
48
|
-
console.log(chalk.gray(' ā Theme preset already exists in tailwind.config.ts'))
|
|
49
|
-
} else {
|
|
50
|
-
console.log(chalk.green(' ā Added theme preset to tailwind.config.ts'))
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
console.log(chalk.yellow(` ā ļø Could not auto-configure tailwind.config.ts: ${result.error}`))
|
|
54
|
-
console.log(chalk.gray(' You will need to add preset manually'))
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
protected showNextSteps(): void {
|
|
59
|
-
console.log(chalk.white('Next Steps:\n'))
|
|
60
|
-
console.log(chalk.gray('1. Test your theme:'))
|
|
61
|
-
console.log(chalk.gray(' Visit http://localhost:3000/theme-test\n'))
|
|
62
|
-
console.log(chalk.gray('2. Customize your brand:'))
|
|
63
|
-
console.log(chalk.gray(' Edit src/modules/theme/config/brand.css\n'))
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// CLI entry point
|
|
68
|
-
async function main() {
|
|
69
|
-
const args = process.argv.slice(2)
|
|
70
|
-
const appPath = args.find((arg) => arg.startsWith('--appPath='))?.split('=')[1]
|
|
71
|
-
const appName = args.find((arg) => arg.startsWith('--appName='))?.split('=')[1]
|
|
72
|
-
const workspaceName = args.find((arg) => arg.startsWith('--workspaceName='))?.split('=')[1]
|
|
73
|
-
const pluginPath = args.find((arg) => arg.startsWith('--pluginPath='))?.split('=')[1]
|
|
74
|
-
|
|
75
|
-
if (!appPath || !appName || !workspaceName || !pluginPath) {
|
|
76
|
-
console.error(chalk.red('Error: Missing required arguments'))
|
|
77
|
-
console.error('Usage: generate --appPath=<path> --appName=<name> --workspaceName=<workspace> --pluginPath=<path>')
|
|
78
|
-
process.exit(1)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const generator = new ThemeGenerator({ appPath, appName, workspaceName, pluginPath })
|
|
82
|
-
await generator.run()
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Run if executed directly
|
|
86
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
87
|
-
main().catch((error) => {
|
|
88
|
-
console.error(chalk.red('\nā Error during theme setup:'))
|
|
89
|
-
console.error(error)
|
|
90
|
-
process.exit(1)
|
|
91
|
-
})
|
|
92
|
-
}
|