create-origo-app 0.1.0 → 0.1.1
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/README.md +315 -0
- package/dist/base/backend/express/.env +3 -0
- package/dist/base/backend/express/javascript/src/app.js +25 -0
- package/dist/base/backend/express/javascript/src/config/env.js +10 -0
- package/dist/base/backend/express/javascript/src/routes/index.js +18 -0
- package/dist/base/backend/express/javascript/src/server.js +28 -0
- package/dist/base/backend/express/manifest.js +61 -0
- package/dist/base/backend/express/typescript/src/app.ts +25 -0
- package/dist/base/backend/express/typescript/src/config/env.ts +10 -0
- package/dist/base/backend/express/typescript/src/routes/index.ts +18 -0
- package/dist/base/backend/express/typescript/src/server.ts +28 -0
- package/dist/base/backend/express/typescript/tsconfig.server.json +16 -0
- package/dist/base/backend/fastify/javascript/src/app.js +16 -0
- package/dist/base/backend/fastify/javascript/src/routes/index.js +18 -0
- package/dist/base/backend/fastify/javascript/src/server.js +27 -0
- package/dist/base/backend/fastify/manifest.js +61 -0
- package/dist/base/backend/fastify/typescript/src/app.ts +16 -0
- package/dist/base/backend/fastify/typescript/src/routes/index.ts +20 -0
- package/dist/base/backend/fastify/typescript/src/server.ts +27 -0
- package/dist/base/frontend/react/app/App.css +308 -0
- package/dist/base/frontend/react/app/App.tsx +59 -0
- package/dist/base/frontend/react/app/assets/react.svg +1 -0
- package/dist/base/frontend/react/app/assets/vite.svg +1 -0
- package/dist/base/frontend/react/app/components/Counter.tsx +16 -0
- package/dist/base/frontend/react/app/components/OrigoLogo.tsx +32 -0
- package/dist/base/frontend/react/app/components/PingButton.tsx +45 -0
- package/dist/base/frontend/react/app/index.css +27 -0
- package/dist/base/frontend/react/app/main.tsx +17 -0
- package/dist/base/frontend/react/app/vite-env.d.ts +2 -0
- package/dist/base/frontend/react/html/index.html +23 -0
- package/dist/base/frontend/react/manifest.js +180 -0
- package/dist/base/frontend/react/styles/bootstrap/App.tsx +61 -0
- package/dist/base/frontend/react/styles/bootstrap/Counter.tsx +16 -0
- package/dist/base/frontend/react/styles/bootstrap/PingButton.tsx +52 -0
- package/dist/base/frontend/react/styles/bootstrap/index.css +174 -0
- package/dist/base/frontend/react/styles/sass/App.scss +231 -0
- package/dist/base/frontend/react/styles/sass/App.tsx +59 -0
- package/dist/base/frontend/react/styles/sass/PingButton.scss +33 -0
- package/dist/base/frontend/react/styles/sass/PingButton.tsx +47 -0
- package/dist/base/frontend/react/styles/sass/index.scss +30 -0
- package/dist/base/frontend/react/styles/sass/main.tsx +17 -0
- package/dist/base/frontend/react/styles/tailwind/App.tsx +66 -0
- package/dist/base/frontend/react/styles/tailwind/Counter.tsx +16 -0
- package/dist/base/frontend/react/styles/tailwind/PingButton.tsx +52 -0
- package/dist/base/frontend/shared/favicon.ico +0 -0
- package/dist/base/frontend/shared/origo-logo.svg +6 -0
- package/dist/commands/create.js +195 -10
- package/dist/commands/index.js +6 -1
- package/dist/composer/ast/arrays.js +12 -0
- package/dist/composer/ast/config.js +13 -0
- package/dist/composer/ast/context.js +73 -0
- package/dist/composer/ast/expressions.js +6 -0
- package/dist/composer/ast/imports.js +33 -0
- package/dist/composer/ast/index.js +6 -0
- package/dist/composer/ast/objects.js +32 -0
- package/dist/config/architectures.js +5 -0
- package/dist/config/backend.js +9 -0
- package/dist/config/frontend.js +17 -0
- package/dist/config/fullstack.js +30 -0
- package/dist/core/copy-template.js +57 -0
- package/dist/core/dependency-resolver.js +43 -0
- package/dist/core/install-dependencies.js +10 -0
- package/dist/core/path-safety.js +22 -0
- package/dist/core/project-target.js +40 -0
- package/dist/core/version-resolver.js +137 -0
- package/dist/features/frontend/styling/tailwind/dependencies.js +10 -0
- package/dist/features/frontend/styling/tailwind/feature.js +11 -0
- package/dist/features/frontend/styling/tailwind/generator.js +13 -0
- package/dist/features/frontend/styling/tailwind/index.js +3 -0
- package/dist/features/frontend/styling/tailwind/integrations/index.js +11 -0
- package/dist/features/frontend/styling/tailwind/integrations/rsbuild.js +3 -0
- package/dist/features/frontend/styling/tailwind/integrations/vite.js +17 -0
- package/dist/features/frontend/styling/tailwind/integrations/webpack.js +3 -0
- package/dist/features/frontend/styling/tailwind/templates/tailwind-css.js +1 -0
- package/dist/features/frontend/styling/tailwind/templates/theme.js +39 -0
- package/dist/features/frontend/styling/tailwind/versions/v3.js +19 -0
- package/dist/features/frontend/styling/tailwind/versions/v4.js +11 -0
- package/dist/features/frontend/ui/shadcn/dependencies.js +8 -0
- package/dist/features/frontend/ui/shadcn/feature.js +11 -0
- package/dist/features/frontend/ui/shadcn/generator.js +13 -0
- package/dist/features/frontend/ui/shadcn/index.js +3 -0
- package/dist/features/frontend/ui/shadcn/patches/tsconfig.js +22 -0
- package/dist/features/frontend/ui/shadcn/patches/vite-config.js +35 -0
- package/dist/features/frontend/ui/shadcn/templates/components-json.js +23 -0
- package/dist/features/frontend/ui/shadcn/templates/lib-utils.js +14 -0
- package/dist/features/index.js +29 -0
- package/dist/generators/backend/base-loader.js +33 -0
- package/dist/generators/backend/context.js +54 -0
- package/dist/generators/backend/generate.js +72 -0
- package/dist/generators/backend/index.js +4 -0
- package/dist/generators/backend/resolvers/database.js +1277 -0
- package/dist/generators/frontend/base-loader.js +23 -0
- package/dist/generators/frontend/context.js +118 -0
- package/dist/generators/frontend/css.js +34 -0
- package/dist/generators/frontend/file-writer.js +37 -0
- package/dist/generators/frontend/generate.js +46 -0
- package/dist/generators/frontend/index.js +4 -0
- package/dist/generators/frontend/resolvers/base.js +24 -0
- package/dist/generators/frontend/resolvers/bundler.js +13 -0
- package/dist/generators/frontend/resolvers/index.js +5 -0
- package/dist/generators/frontend/resolvers/language.js +55 -0
- package/dist/generators/frontend/resolvers/profile.js +41 -0
- package/dist/generators/frontend/resolvers/typescript.js +29 -0
- package/dist/generators/frontend/template.js +3 -0
- package/dist/generators/frontend/validate.js +31 -0
- package/dist/generators/package-json/build-package-json.js +33 -0
- package/dist/generators/package-json/index.js +2 -0
- package/dist/generators/package-json/types.js +1 -0
- package/dist/generators/package-json/write-package-json.js +9 -0
- package/dist/prompts/architecture.js +5 -0
- package/dist/prompts/compatibility.js +18 -0
- package/dist/prompts/custom-fullstack.js +10 -0
- package/dist/prompts/custom-stack.js +12 -0
- package/dist/prompts/database-package.js +15 -0
- package/dist/prompts/project-name.js +25 -0
- package/dist/prompts/tech-stack.js +54 -0
- package/dist/registry/bundlers.js +4 -0
- package/dist/registry/databases.js +36 -0
- package/dist/registry/features/development.js +40 -0
- package/dist/registry/features/quality.js +33 -0
- package/dist/registry/features/testing.js +36 -0
- package/dist/registry/features/ui.js +37 -0
- package/dist/registry/frameworks.js +9 -0
- package/dist/registry/packages.js +231 -0
- package/dist/registry/routing.js +12 -0
- package/dist/registry/runtimes.js +7 -0
- package/dist/registry/styling.js +7 -0
- package/dist/types/project.js +1 -0
- package/dist/ui/banner.js +0 -1
- package/dist/ui/checkbox.js +51 -0
- package/package.json +36 -4
- package/dist/cli.js +0 -22
- package/dist/ui/multiselect.js +0 -22
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Counter from "./components/Counter";
|
|
2
|
+
{{PING_IMPORT}}
|
|
3
|
+
|
|
4
|
+
import "./App.scss";
|
|
5
|
+
|
|
6
|
+
function App() {
|
|
7
|
+
return (
|
|
8
|
+
<main className="app">
|
|
9
|
+
<div className="background-glow glow-top" />
|
|
10
|
+
<div className="background-glow glow-right" />
|
|
11
|
+
<div className="background-glow glow-bottom" />
|
|
12
|
+
|
|
13
|
+
<section className="welcome-container">
|
|
14
|
+
<header className="brand">
|
|
15
|
+
<img
|
|
16
|
+
src="/origo-logo.svg"
|
|
17
|
+
alt="Origo"
|
|
18
|
+
className="origo-logo"
|
|
19
|
+
/>
|
|
20
|
+
</header>
|
|
21
|
+
|
|
22
|
+
<section className="hero">
|
|
23
|
+
<h1>
|
|
24
|
+
{{HEADLINE_PREFIX}} <span>React</span>
|
|
25
|
+
</h1>
|
|
26
|
+
|
|
27
|
+
<p className="subtitle">
|
|
28
|
+
A modern starter template, out of the box.
|
|
29
|
+
</p>
|
|
30
|
+
</section>
|
|
31
|
+
|
|
32
|
+
<section className="counter-section">
|
|
33
|
+
<div className="api-actions">
|
|
34
|
+
<Counter />
|
|
35
|
+
{{PING_BUTTON}}
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<p className="instruction">
|
|
39
|
+
Edit <code>{{APP_FILE}}</code> and save to test HMR
|
|
40
|
+
</p>
|
|
41
|
+
</section>
|
|
42
|
+
|
|
43
|
+
<footer className="footer">
|
|
44
|
+
<span className="footer-line" />
|
|
45
|
+
|
|
46
|
+
<p>
|
|
47
|
+
Crafted with
|
|
48
|
+
<span className="heart">♥</span>
|
|
49
|
+
by <strong>Origo</strong>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
<span className="footer-line" />
|
|
53
|
+
</footer>
|
|
54
|
+
</section>
|
|
55
|
+
</main>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default App;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.ping-button {
|
|
2
|
+
padding: 10px 20px;
|
|
3
|
+
border: 1px solid rgba(130, 80, 255, 0.3);
|
|
4
|
+
border-radius: 999px;
|
|
5
|
+
color: #ffffff;
|
|
6
|
+
background: rgba(123, 48, 255, 0.15);
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
transition: all 0.2s ease;
|
|
11
|
+
|
|
12
|
+
&:hover:not(:disabled) {
|
|
13
|
+
border-color: #9b42ff;
|
|
14
|
+
background: rgba(123, 48, 255, 0.25);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:disabled {
|
|
18
|
+
cursor: wait;
|
|
19
|
+
opacity: 0.7;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.ping-ok {
|
|
23
|
+
border-color: rgba(32, 232, 121, 0.4);
|
|
24
|
+
color: #20e879;
|
|
25
|
+
background: rgba(32, 232, 121, 0.12);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.ping-error {
|
|
29
|
+
border-color: rgba(255, 92, 122, 0.4);
|
|
30
|
+
color: #ff5c7a;
|
|
31
|
+
background: rgba(255, 92, 122, 0.12);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import "./PingButton.scss";
|
|
4
|
+
|
|
5
|
+
const API_URL =
|
|
6
|
+
(import.meta as unknown as { env?: Record<string, string | undefined> }).env
|
|
7
|
+
?.VITE_API_URL ?? "http://localhost:3000/api";
|
|
8
|
+
|
|
9
|
+
type PingState = "idle" | "loading" | "ok" | "error";
|
|
10
|
+
|
|
11
|
+
const labels: Record<PingState, string> = {
|
|
12
|
+
idle: "Ping API",
|
|
13
|
+
loading: "Pinging...",
|
|
14
|
+
ok: "API OK",
|
|
15
|
+
error: "API Error",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default function PingButton() {
|
|
19
|
+
const [state, setState] = useState<PingState>("idle");
|
|
20
|
+
|
|
21
|
+
async function ping() {
|
|
22
|
+
setState("loading");
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const response = await fetch(`${API_URL}/health`);
|
|
26
|
+
|
|
27
|
+
if (!response.ok) {
|
|
28
|
+
throw new Error(`Request failed with ${response.status}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
setState("ok");
|
|
32
|
+
} catch {
|
|
33
|
+
setState("error");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<button
|
|
39
|
+
className={`ping-button ping-${state}`}
|
|
40
|
+
onClick={ping}
|
|
41
|
+
disabled={state === "loading"}
|
|
42
|
+
aria-live="polite"
|
|
43
|
+
>
|
|
44
|
+
{labels[state]}
|
|
45
|
+
</button>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
|
|
2
|
+
|
|
3
|
+
$font-stack: "Inter", sans-serif;
|
|
4
|
+
$background: #030309;
|
|
5
|
+
$text: #ffffff;
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
font-family: $font-stack;
|
|
9
|
+
color: $text;
|
|
10
|
+
background: $background;
|
|
11
|
+
font-synthesis: none;
|
|
12
|
+
text-rendering: optimizeLegibility;
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
* {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
min-width: 320px;
|
|
25
|
+
min-height: 100vh;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
button {
|
|
29
|
+
font: inherit;
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StrictMode } from "react";
|
|
2
|
+
import { createRoot } from "react-dom/client";
|
|
3
|
+
|
|
4
|
+
import App from "./App";
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
|
|
7
|
+
const rootElement = document.getElementById("root");
|
|
8
|
+
|
|
9
|
+
if (!rootElement) {
|
|
10
|
+
throw new Error("Root element not found");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
createRoot(rootElement).render(
|
|
14
|
+
<StrictMode>
|
|
15
|
+
<App />
|
|
16
|
+
</StrictMode>,
|
|
17
|
+
);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Counter from "./components/Counter";
|
|
2
|
+
{{PING_IMPORT}}
|
|
3
|
+
|
|
4
|
+
function App() {
|
|
5
|
+
return (
|
|
6
|
+
<main className="relative flex min-h-screen items-center justify-center overflow-hidden bg-[#030309] text-white">
|
|
7
|
+
<div className="pointer-events-none absolute -left-[300px] -top-[470px] h-[650px] w-[650px] rounded-full border-2 border-[#7018ff]/75 shadow-[0_0_80px_rgba(104,0,255,0.2)]" />
|
|
8
|
+
<div className="pointer-events-none absolute -right-[420px] top-[10%] h-[500px] w-[500px] rounded-full border-2 border-[#5d00dc]/20" />
|
|
9
|
+
<div className="pointer-events-none absolute -bottom-[750px] -right-[300px] h-[850px] w-[850px] rounded-full border-2 border-[#7018ff]/75 shadow-[0_0_90px_rgba(104,0,255,0.25)]" />
|
|
10
|
+
|
|
11
|
+
<section className="relative z-10 w-full max-w-[1500px] px-[7%] py-[90px] text-center">
|
|
12
|
+
<header className="mb-12 flex justify-center">
|
|
13
|
+
<img
|
|
14
|
+
src="/origo-logo.svg"
|
|
15
|
+
alt="Origo"
|
|
16
|
+
className="h-auto w-[420px] max-w-[85%] object-contain"
|
|
17
|
+
/>
|
|
18
|
+
</header>
|
|
19
|
+
|
|
20
|
+
<section className="hero">
|
|
21
|
+
<h1 className="text-[clamp(42px,5.5vw,82px)] font-extrabold tracking-[-3px]">
|
|
22
|
+
{{HEADLINE_PREFIX}}{" "}
|
|
23
|
+
<span className="bg-gradient-to-r from-[#9b42ff] via-[#6412ed] to-[#a65bff] bg-clip-text text-transparent">
|
|
24
|
+
React
|
|
25
|
+
</span>
|
|
26
|
+
</h1>
|
|
27
|
+
|
|
28
|
+
<p className="mt-3 text-[clamp(16px,2vw,30px)] text-[#b9b2d2]">
|
|
29
|
+
A modern starter template, out of the box.
|
|
30
|
+
</p>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
<section className="mt-10">
|
|
34
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
35
|
+
<Counter />
|
|
36
|
+
{{PING_BUTTON}}
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<p className="mt-6 text-[21px] text-[#c4bed8]">
|
|
40
|
+
Edit{" "}
|
|
41
|
+
<code className="rounded-lg bg-[#7b30ff]/10 px-2.5 py-1.5 font-mono text-[#ad69ff]">
|
|
42
|
+
{{APP_FILE}}
|
|
43
|
+
</code>{" "}
|
|
44
|
+
and save to test HMR
|
|
45
|
+
</p>
|
|
46
|
+
</section>
|
|
47
|
+
|
|
48
|
+
<footer className="mt-[85px] flex items-center justify-center gap-[30px] text-[#c4bddb]">
|
|
49
|
+
<span className="h-px w-[125px] bg-[#9b82c8]/30" />
|
|
50
|
+
|
|
51
|
+
<p className="flex items-center justify-center text-[19px]">
|
|
52
|
+
Crafted with
|
|
53
|
+
<span className="mx-3.5 inline-block text-[27px] text-[#8d32ff]">
|
|
54
|
+
♥
|
|
55
|
+
</span>
|
|
56
|
+
by <strong className="font-semibold text-[#a34cff]">Origo</strong>
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<span className="h-px w-[125px] bg-[#9b82c8]/30" />
|
|
60
|
+
</footer>
|
|
61
|
+
</section>
|
|
62
|
+
</main>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default App;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
export default function Counter() {
|
|
4
|
+
const [count, setCount] = useState<number>(0);
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<button
|
|
8
|
+
className="inline-flex items-center gap-[18px] rounded-full border border-[#8250ff]/20 bg-[#0f0c1b]/85 px-6 py-3.5 text-[21px] text-white transition duration-200 hover:-translate-y-0.5 hover:border-[#7625ff] hover:bg-[#5b19b4]/20 active:scale-95"
|
|
9
|
+
onClick={() => setCount((prev) => prev + 1)}
|
|
10
|
+
aria-label={`Counter: ${count}`}
|
|
11
|
+
>
|
|
12
|
+
<span className="h-[17px] w-[17px] rounded-full bg-[#20e879] shadow-[0_0_12px_rgba(32,232,121,0.3)]" />
|
|
13
|
+
<span>count is {count}</span>
|
|
14
|
+
</button>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
const API_URL =
|
|
4
|
+
(import.meta as unknown as { env?: Record<string, string | undefined> }).env
|
|
5
|
+
?.VITE_API_URL ?? "http://localhost:3000/api";
|
|
6
|
+
|
|
7
|
+
type PingState = "idle" | "loading" | "ok" | "error";
|
|
8
|
+
|
|
9
|
+
const labels: Record<PingState, string> = {
|
|
10
|
+
idle: "Ping API",
|
|
11
|
+
loading: "Pinging...",
|
|
12
|
+
ok: "API OK",
|
|
13
|
+
error: "API Error",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const stateClasses: Record<PingState, string> = {
|
|
17
|
+
idle: "border-[#8250ff]/30 bg-[#7b30ff]/15 text-white hover:border-[#9b42ff]",
|
|
18
|
+
loading: "border-[#b9b2d2]/30 bg-[#b9b2d2]/10 text-[#b9b2d2]",
|
|
19
|
+
ok: "border-[#20e879]/40 bg-[#20e879]/15 text-[#20e879]",
|
|
20
|
+
error: "border-[#ff5c7a]/40 bg-[#ff5c7a]/15 text-[#ff5c7a]",
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default function PingButton() {
|
|
24
|
+
const [state, setState] = useState<PingState>("idle");
|
|
25
|
+
|
|
26
|
+
async function ping() {
|
|
27
|
+
setState("loading");
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const response = await fetch(`${API_URL}/health`);
|
|
31
|
+
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
throw new Error(`Request failed with ${response.status}`);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
setState("ok");
|
|
37
|
+
} catch {
|
|
38
|
+
setState("error");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<button
|
|
44
|
+
className={`inline-flex items-center rounded-full border px-5 py-2.5 text-sm font-semibold transition ${stateClasses[state]}`}
|
|
45
|
+
onClick={ping}
|
|
46
|
+
disabled={state === "loading"}
|
|
47
|
+
aria-live="polite"
|
|
48
|
+
>
|
|
49
|
+
{labels[state]}
|
|
50
|
+
</button>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
+
viewBox="0 0 944 220" role="img" aria-labelledby="title">
|
|
3
|
+
<title id="title">Origo wordmark</title>
|
|
4
|
+
<path d="M 292.00,82.00 L 290.00,82.00 L 288.00,88.00 L 282.00,94.00 L 268.00,122.00 L 264.00,126.00 L 260.00,136.00 L 252.00,146.00 L 238.00,174.00 L 234.00,178.00 L 232.00,186.00 L 262.00,186.00 L 270.00,176.00 L 282.00,152.00 L 298.00,128.00 L 308.00,108.00 Z M 466.00,26.00 L 466.00,184.00 L 468.00,186.00 L 494.00,186.00 L 496.00,184.00 L 496.00,100.00 L 498.00,98.00 L 498.00,84.00 L 496.00,82.00 L 496.00,26.00 Z M 262.00,26.00 L 266.00,30.00 L 274.00,46.00 L 280.00,52.00 L 368.00,52.00 L 376.00,56.00 L 384.00,66.00 L 386.00,72.00 L 386.00,82.00 L 382.00,90.00 L 376.00,96.00 L 368.00,100.00 L 336.00,100.00 L 334.00,104.00 L 370.00,156.00 L 372.00,162.00 L 378.00,168.00 L 384.00,180.00 L 390.00,186.00 L 422.00,186.00 L 420.00,180.00 L 414.00,174.00 L 382.00,126.00 L 384.00,122.00 L 398.00,116.00 L 408.00,106.00 L 416.00,88.00 L 416.00,66.00 L 408.00,46.00 L 394.00,34.00 L 374.00,26.00 Z M 784.00,30.00 L 762.00,44.00 L 752.00,54.00 L 740.00,74.00 L 736.00,86.00 L 736.00,94.00 L 734.00,96.00 L 734.00,114.00 L 736.00,116.00 L 736.00,126.00 L 744.00,146.00 L 760.00,166.00 L 774.00,176.00 L 790.00,184.00 L 810.00,186.00 L 812.00,188.00 L 836.00,188.00 L 838.00,186.00 L 850.00,186.00 L 874.00,176.00 L 896.00,158.00 L 902.00,150.00 L 912.00,126.00 L 912.00,118.00 L 914.00,116.00 L 912.00,84.00 L 910.00,82.00 L 910.00,76.00 L 904.00,68.00 L 900.00,58.00 L 882.00,40.00 L 872.00,36.00 L 864.00,30.00 L 852.00,26.00 L 846.00,26.00 L 844.00,24.00 L 804.00,24.00 L 802.00,26.00 L 796.00,26.00 Z M 792.00,58.00 L 812.00,50.00 L 838.00,50.00 L 860.00,60.00 L 870.00,68.00 L 876.00,76.00 L 878.00,84.00 L 882.00,90.00 L 884.00,112.00 L 876.00,134.00 L 862.00,150.00 L 848.00,158.00 L 822.00,162.00 L 820.00,160.00 L 808.00,160.00 L 796.00,156.00 L 778.00,142.00 L 772.00,134.00 L 768.00,124.00 L 768.00,118.00 L 766.00,116.00 L 766.00,96.00 L 772.00,78.00 L 778.00,70.00 Z M 574.00,38.00 L 564.00,46.00 L 552.00,60.00 L 544.00,76.00 L 542.00,88.00 L 540.00,90.00 L 540.00,122.00 L 542.00,124.00 L 542.00,130.00 L 552.00,152.00 L 560.00,162.00 L 572.00,172.00 L 590.00,182.00 L 602.00,184.00 L 604.00,186.00 L 614.00,186.00 L 616.00,188.00 L 656.00,186.00 L 658.00,184.00 L 664.00,184.00 L 674.00,178.00 L 678.00,178.00 L 698.00,166.00 L 698.00,96.00 L 626.00,96.00 L 626.00,120.00 L 666.00,120.00 L 670.00,124.00 L 670.00,150.00 L 662.00,156.00 L 650.00,158.00 L 648.00,160.00 L 626.00,162.00 L 624.00,160.00 L 612.00,160.00 L 600.00,156.00 L 582.00,142.00 L 572.00,124.00 L 572.00,118.00 L 570.00,116.00 L 570.00,96.00 L 572.00,94.00 L 572.00,88.00 L 582.00,70.00 L 596.00,58.00 L 616.00,50.00 L 644.00,50.00 L 662.00,56.00 L 676.00,64.00 L 688.00,52.00 L 692.00,44.00 L 676.00,32.00 L 652.00,24.00 L 608.00,24.00 L 590.00,30.00 Z M 62.00,36.00 L 48.00,46.00 L 34.00,62.00 L 24.00,86.00 L 24.00,96.00 L 22.00,98.00 L 24.00,124.00 L 26.00,126.00 L 26.00,132.00 L 38.00,154.00 L 60.00,174.00 L 80.00,184.00 L 98.00,186.00 L 100.00,188.00 L 128.00,188.00 L 130.00,186.00 L 148.00,184.00 L 158.00,178.00 L 166.00,176.00 L 180.00,166.00 L 196.00,146.00 L 206.00,120.00 L 206.00,92.00 L 202.00,84.00 L 202.00,78.00 L 188.00,54.00 L 170.00,38.00 L 150.00,28.00 L 144.00,28.00 L 134.00,24.00 L 94.00,24.00 L 92.00,26.00 L 86.00,26.00 L 74.00,30.00 Z M 70.00,66.00 L 78.00,60.00 L 102.00,50.00 L 128.00,50.00 L 148.00,58.00 L 164.00,72.00 L 174.00,92.00 L 174.00,120.00 L 168.00,134.00 L 150.00,152.00 L 132.00,160.00 L 122.00,160.00 L 120.00,162.00 L 98.00,160.00 L 96.00,158.00 L 90.00,158.00 L 76.00,150.00 L 60.00,132.00 L 54.00,116.00 L 54.00,96.00 L 62.00,76.00 Z" fill="#F7F7FA" fill-rule="evenodd"/>
|
|
5
|
+
<path d="M 308.00,112.00 L 300.00,128.00 L 296.00,132.00 L 296.00,136.00 L 308.00,154.00 L 308.00,158.00 L 324.00,186.00 L 356.00,186.00 L 340.00,158.00 L 332.00,148.00 L 330.00,142.00 L 310.00,112.00 Z" fill="#741BFF" fill-rule="evenodd"/>
|
|
6
|
+
</svg>
|
package/dist/commands/create.js
CHANGED
|
@@ -1,11 +1,196 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { selectArchitecture } from "../prompts/architecture.js";
|
|
3
|
+
import { selectTechStack } from "../prompts/tech-stack.js";
|
|
4
|
+
import { selectCustomStack } from "../prompts/custom-stack.js";
|
|
5
|
+
import { selectCustomFullStack } from "../prompts/custom-fullstack.js";
|
|
6
|
+
import { selectDatabasePackages } from "../prompts/database-package.js";
|
|
7
|
+
import { promptProjectName } from "../prompts/project-name.js";
|
|
8
|
+
import { fullStackOptions } from "../config/fullstack.js";
|
|
9
|
+
import { resolveDependencies } from "../core/dependency-resolver.js";
|
|
10
|
+
import { installDependencies } from "../core/install-dependencies.js";
|
|
11
|
+
import { copyTemplate } from "../core/copy-template.js";
|
|
12
|
+
import { resolveProjectTarget } from "../core/project-target.js";
|
|
13
|
+
import { generateBackendProject } from "../generators/backend/index.js";
|
|
14
|
+
import { generateFrontendProject, writeGeneratedFiles, } from "../generators/frontend/index.js";
|
|
15
|
+
import { buildFullStackRootPackageJson, writePackageJson, } from "../generators/package-json/index.js";
|
|
16
|
+
import { frontendFrameworkOptions } from "../registry/frameworks.js";
|
|
17
|
+
import { DEFAULT_STYLING, stylingOptions } from "../registry/styling.js";
|
|
18
|
+
import { logger } from "../ui/logger.js";
|
|
19
|
+
function displayList(label, items, isLast) {
|
|
20
|
+
console.log(` ${isLast ? "└──" : "├──"} ${label}`);
|
|
21
|
+
if (!items.length) {
|
|
22
|
+
console.log(" └── None");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
items.forEach((item, index) => {
|
|
26
|
+
const last = index === items.length - 1;
|
|
27
|
+
console.log(` ${last ? "└──" : "├──"} ${item}`);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function displayProjectConfig(config) {
|
|
31
|
+
console.log("\n◆ Project Configuration");
|
|
32
|
+
displayList("Architecture", [config.architecture], false);
|
|
33
|
+
displayList("Tech Stack", config.techStacks, false);
|
|
34
|
+
}
|
|
35
|
+
function expandStacks(stacks) {
|
|
36
|
+
return stacks.flatMap((stack) => {
|
|
37
|
+
const preset = fullStackOptions.find((option) => option.value === stack);
|
|
38
|
+
return preset
|
|
39
|
+
? [stack, ...preset.frontend, ...preset.backend, ...preset.database]
|
|
40
|
+
: [stack];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function applyDefaultStyling(selectedStacks, active) {
|
|
44
|
+
const hasFrontendFramework = frontendFrameworkOptions.some((option) => active.has(option.value));
|
|
45
|
+
const hasStylingLibrary = stylingOptions.some((option) => active.has(option.value));
|
|
46
|
+
if (!hasFrontendFramework || hasStylingLibrary || active.has(DEFAULT_STYLING)) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
selectedStacks.push(DEFAULT_STYLING);
|
|
50
|
+
active.add(DEFAULT_STYLING);
|
|
51
|
+
}
|
|
52
|
+
export async function createCommand(projectInput, targetPathInput) {
|
|
53
|
+
const projectInputValue = projectInput ?? (await promptProjectName());
|
|
54
|
+
const { projectName, projectDirectory } = resolveProjectTarget(projectInputValue, targetPathInput);
|
|
55
|
+
const relativeDirectory = path.relative(process.cwd(), projectDirectory);
|
|
56
|
+
const displayDirectory = relativeDirectory || ".";
|
|
57
|
+
const architecture = await selectArchitecture();
|
|
58
|
+
const active = new Set();
|
|
59
|
+
let selectedStacks;
|
|
60
|
+
selectedStacks = await selectTechStack(architecture, active);
|
|
61
|
+
expandStacks(selectedStacks).forEach((stack) => active.add(stack));
|
|
62
|
+
const customStacks = !selectedStacks.includes("custom")
|
|
63
|
+
? []
|
|
64
|
+
: architecture === "full-stack"
|
|
65
|
+
? await selectCustomFullStack(active)
|
|
66
|
+
: await selectCustomStack();
|
|
67
|
+
customStacks.forEach((stack) => active.add(stack));
|
|
68
|
+
const databasePackages = await selectDatabasePackages(active);
|
|
69
|
+
applyDefaultStyling(selectedStacks, active);
|
|
70
|
+
const config = {
|
|
71
|
+
architecture,
|
|
72
|
+
techStacks: [
|
|
73
|
+
...selectedStacks.filter((stack) => stack !== "custom"),
|
|
74
|
+
...customStacks,
|
|
75
|
+
...databasePackages,
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
displayProjectConfig(config);
|
|
79
|
+
const technologies = [...config.techStacks];
|
|
80
|
+
const wantsFrontend = active.has("react");
|
|
81
|
+
const wantsBackend = active.has("express") || active.has("fastify");
|
|
82
|
+
const isFullStackLayout = architecture === "full-stack" && wantsFrontend && wantsBackend;
|
|
83
|
+
const dependencyTechnologies = [...technologies];
|
|
84
|
+
if (wantsBackend && active.has("typescript")) {
|
|
85
|
+
dependencyTechnologies.push(active.has("fastify") ? "fastify-typescript" : "express-typescript");
|
|
86
|
+
}
|
|
87
|
+
logger.info("Resolving package versions from npm...");
|
|
88
|
+
const { dependencies, devDependencies, scripts } = await resolveDependencies(dependencyTechnologies);
|
|
89
|
+
let rootDevDependencies = {};
|
|
90
|
+
if (isFullStackLayout) {
|
|
91
|
+
const rootPackages = await resolveDependencies(["fullstack-root"]);
|
|
92
|
+
rootDevDependencies = rootPackages.devDependencies;
|
|
93
|
+
}
|
|
94
|
+
const generatedFiles = [];
|
|
95
|
+
let frontendGenerated = false;
|
|
96
|
+
let backendGenerated = false;
|
|
97
|
+
if (wantsFrontend) {
|
|
98
|
+
try {
|
|
99
|
+
logger.info("Generating React frontend files...");
|
|
100
|
+
const generatedProject = await generateFrontendProject({
|
|
101
|
+
projectDirectory,
|
|
102
|
+
projectName,
|
|
103
|
+
technologies: [...active],
|
|
104
|
+
dependencies,
|
|
105
|
+
devDependencies,
|
|
106
|
+
scripts,
|
|
107
|
+
rootDirectory: isFullStackLayout ? "client" : "",
|
|
108
|
+
fullStack: isFullStackLayout,
|
|
109
|
+
});
|
|
110
|
+
generatedFiles.push(...generatedProject.files);
|
|
111
|
+
frontendGenerated = true;
|
|
112
|
+
logger.success(`Generated React + ${generatedProject.bundler} (${generatedProject.language}) frontend`);
|
|
113
|
+
if (generatedProject.appliedFeatures.length) {
|
|
114
|
+
logger.success(`Applied ${generatedProject.appliedFeatures.join(", ")}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
119
|
+
logger.warn(`Could not generate frontend: ${reason}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (wantsBackend) {
|
|
123
|
+
try {
|
|
124
|
+
logger.info("Generating Node.js backend files...");
|
|
125
|
+
const generatedProject = await generateBackendProject({
|
|
126
|
+
projectDirectory,
|
|
127
|
+
projectName,
|
|
128
|
+
technologies: [...active],
|
|
129
|
+
dependencies,
|
|
130
|
+
devDependencies,
|
|
131
|
+
scripts,
|
|
132
|
+
includePackageJson: !frontendGenerated,
|
|
133
|
+
rootDirectory: isFullStackLayout ? "server" : "",
|
|
134
|
+
standalone: !isFullStackLayout,
|
|
135
|
+
});
|
|
136
|
+
generatedFiles.push(...generatedProject.files);
|
|
137
|
+
backendGenerated = true;
|
|
138
|
+
logger.success(`Generated Node.js + ${generatedProject.framework} (${generatedProject.language}) backend`);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
142
|
+
if (!frontendGenerated) {
|
|
143
|
+
logger.error(`Could not generate backend: ${reason}`);
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
logger.warn(`Could not generate backend: ${reason}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (generatedFiles.length) {
|
|
150
|
+
await writeGeneratedFiles(projectDirectory, generatedFiles);
|
|
151
|
+
logger.success(`Generated ${generatedFiles.length} project files`);
|
|
152
|
+
}
|
|
153
|
+
const usesFullStackPackages = isFullStackLayout && frontendGenerated && backendGenerated;
|
|
154
|
+
if (usesFullStackPackages) {
|
|
155
|
+
await writePackageJson(projectDirectory, buildFullStackRootPackageJson(projectName, rootDevDependencies));
|
|
156
|
+
logger.success(`Created ${path.join(displayDirectory, "package.json")}`);
|
|
157
|
+
}
|
|
158
|
+
else if (!frontendGenerated && !backendGenerated) {
|
|
159
|
+
await writePackageJson(projectDirectory, {
|
|
160
|
+
name: projectName,
|
|
161
|
+
version: "1.0.0",
|
|
162
|
+
private: true,
|
|
163
|
+
type: "module",
|
|
164
|
+
scripts,
|
|
165
|
+
dependencies,
|
|
166
|
+
devDependencies,
|
|
167
|
+
});
|
|
168
|
+
logger.success(`Created ${path.join(displayDirectory, "package.json")}`);
|
|
169
|
+
try {
|
|
170
|
+
logger.info("Copying template files...");
|
|
171
|
+
await copyTemplate(projectDirectory, technologies);
|
|
172
|
+
logger.success("Copied React + Vite template");
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
176
|
+
logger.error(`Could not copy template: ${reason}`);
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
logger.info("Installing dependencies...");
|
|
182
|
+
const installDirectories = [projectDirectory];
|
|
183
|
+
if (usesFullStackPackages) {
|
|
184
|
+
installDirectories.push(path.join(projectDirectory, "client"), path.join(projectDirectory, "server"));
|
|
185
|
+
}
|
|
186
|
+
for (const directory of installDirectories) {
|
|
187
|
+
await installDependencies(directory);
|
|
188
|
+
}
|
|
189
|
+
logger.success("Generated package-lock.json files");
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
193
|
+
logger.warn(`Could not install dependencies: ${reason}`);
|
|
194
|
+
}
|
|
195
|
+
return config;
|
|
11
196
|
}
|
package/dist/commands/index.js
CHANGED
|
@@ -2,5 +2,10 @@ import { showBanner } from "../ui/banner.js";
|
|
|
2
2
|
import { createCommand } from "./create.js";
|
|
3
3
|
export async function runCLI() {
|
|
4
4
|
showBanner();
|
|
5
|
-
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
if (args.length > 2) {
|
|
7
|
+
throw new Error("Usage: origo <project-name> [project-path]");
|
|
8
|
+
}
|
|
9
|
+
const [projectName, projectPath] = args;
|
|
10
|
+
await createCommand(projectName, projectPath);
|
|
6
11
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function addArrayElement(array, element) {
|
|
2
|
+
const exists = array.getElements().some(item => item.getText() === element);
|
|
3
|
+
if (!exists) {
|
|
4
|
+
array.addElement(element);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export function removeArrayElement(array, element) {
|
|
8
|
+
const target = array.getElements().find(item => item.getText() === element);
|
|
9
|
+
if (target) {
|
|
10
|
+
array.removeElement(target);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Node } from "ts-morph";
|
|
2
|
+
import { findCallExpression } from "./expressions.js";
|
|
3
|
+
export function getDefineConfigObject(source) {
|
|
4
|
+
const config = findCallExpression(source, "defineConfig");
|
|
5
|
+
if (!config) {
|
|
6
|
+
throw new Error("defineConfig() not found");
|
|
7
|
+
}
|
|
8
|
+
const object = config.getArguments()[0];
|
|
9
|
+
if (!object || !Node.isObjectLiteralExpression(object)) {
|
|
10
|
+
throw new Error("Invalid Vite configuration");
|
|
11
|
+
}
|
|
12
|
+
return object;
|
|
13
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { Project } from "ts-morph";
|
|
3
|
+
import { resolveInsideRoot, toRootRelativePath, } from "../../core/path-safety.js";
|
|
4
|
+
export function createAstContext(projectDirectory) {
|
|
5
|
+
const root = path.resolve(projectDirectory);
|
|
6
|
+
const project = new Project({
|
|
7
|
+
skipAddingFilesFromTsConfig: true,
|
|
8
|
+
useInMemoryFileSystem: true,
|
|
9
|
+
});
|
|
10
|
+
const sourceFiles = new Map();
|
|
11
|
+
function normalize(relativePath) {
|
|
12
|
+
return toRootRelativePath(root, resolveInsideRoot(root, relativePath));
|
|
13
|
+
}
|
|
14
|
+
function absolute(relativePath) {
|
|
15
|
+
return resolveInsideRoot(root, relativePath);
|
|
16
|
+
}
|
|
17
|
+
function createSourceFile(relativePath, content) {
|
|
18
|
+
const normalized = normalize(relativePath);
|
|
19
|
+
const existing = project.getSourceFile(absolute(normalized));
|
|
20
|
+
if (existing) {
|
|
21
|
+
project.removeSourceFile(existing);
|
|
22
|
+
sourceFiles.delete(normalized);
|
|
23
|
+
}
|
|
24
|
+
const sourceFile = project.createSourceFile(absolute(normalized), content, {
|
|
25
|
+
overwrite: true,
|
|
26
|
+
});
|
|
27
|
+
sourceFiles.set(normalized, sourceFile);
|
|
28
|
+
return sourceFile;
|
|
29
|
+
}
|
|
30
|
+
function getSourceFileIfExists(relativePath) {
|
|
31
|
+
return project.getSourceFile(absolute(relativePath));
|
|
32
|
+
}
|
|
33
|
+
function getSourceFile(relativePath) {
|
|
34
|
+
const sourceFile = getSourceFileIfExists(relativePath);
|
|
35
|
+
if (!sourceFile) {
|
|
36
|
+
throw new Error(`Source file not found: ${relativePath}`);
|
|
37
|
+
}
|
|
38
|
+
return sourceFile;
|
|
39
|
+
}
|
|
40
|
+
function removeSourceFile(relativePath) {
|
|
41
|
+
const normalized = normalize(relativePath);
|
|
42
|
+
const sourceFile = getSourceFileIfExists(normalized);
|
|
43
|
+
if (sourceFile) {
|
|
44
|
+
project.removeSourceFile(sourceFile);
|
|
45
|
+
sourceFiles.delete(normalized);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function renameSourceFile(from, to) {
|
|
49
|
+
const normalizedFrom = normalize(from);
|
|
50
|
+
const normalizedTo = normalize(to);
|
|
51
|
+
const sourceFile = getSourceFile(normalizedFrom);
|
|
52
|
+
const content = sourceFile.getFullText();
|
|
53
|
+
removeSourceFile(normalizedFrom);
|
|
54
|
+
createSourceFile(normalizedTo, content);
|
|
55
|
+
}
|
|
56
|
+
function finalize() {
|
|
57
|
+
const output = new Map();
|
|
58
|
+
for (const [relativePath, sourceFile] of sourceFiles) {
|
|
59
|
+
sourceFile.formatText();
|
|
60
|
+
output.set(relativePath, sourceFile.getFullText());
|
|
61
|
+
}
|
|
62
|
+
return output;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
project,
|
|
66
|
+
createSourceFile,
|
|
67
|
+
getSourceFile,
|
|
68
|
+
getSourceFileIfExists,
|
|
69
|
+
renameSourceFile,
|
|
70
|
+
removeSourceFile,
|
|
71
|
+
finalize,
|
|
72
|
+
};
|
|
73
|
+
}
|