create-efforge 0.1.0 → 0.2.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/README.md +44 -96
- package/dist/bin.js +7 -0
- package/dist/cli.js +21 -2
- package/dist/commands/add.js +233 -33
- package/dist/commands/create.js +189 -56
- package/dist/commands/list.js +80 -0
- package/dist/exec.js +16 -3
- package/dist/prompts/flow.js +16 -5
- package/dist/prompts/navigable.js +111 -15
- package/dist/rules.js +5 -2
- package/dist/slots.js +20 -0
- package/dist/write.js +3 -1
- package/package.json +1 -1
- package/templates/ai/effect-ai-byok/files/core/llm-crypto.test.ts +42 -37
- package/templates/ai/effect-ai-byok/files/routes/ai.tsx +5 -5
- package/templates/auth/better-auth/files/shared/components/user-menu.tsx +1 -1
- package/templates/auth/better-auth/files/shared/routes/sign-in.tsx +3 -3
- package/templates/auth/better-auth/files/shared/routes/sign-up.tsx +3 -3
- package/templates/auth/better-auth-orgs/files/components/org-switcher.tsx +1 -1
- package/templates/auth/better-auth-orgs/files/routes/accept-invite.$id.tsx +1 -1
- package/templates/auth/better-auth-orgs/files/routes/app/settings/members.tsx +11 -7
- package/templates/auth/better-auth-orgs/files/routes/onboarding.tsx +3 -3
- package/templates/base/addon.json +4 -0
- package/templates/base/files/AGENTS.md +12 -0
- package/templates/base/files/README.md +4 -0
- package/templates/base/files/root/lint/effect-tests.js +45 -0
- package/templates/base/files/root/vite.config.ts +25 -0
- package/templates/extras/realtime/files/realtime-demo.tsx +2 -2
|
@@ -16,10 +16,13 @@ export default defineConfig({
|
|
|
16
16
|
categories: { correctness: "error", suspicious: "error", perf: "error" },
|
|
17
17
|
// an explicit list replaces oxlint's defaults, so keep oxc/typescript/unicorn
|
|
18
18
|
plugins: ["oxc", "typescript", "unicorn", "react", "import", "effecttsgo"],
|
|
19
|
+
jsPlugins: ["./lint/effect-tests.js"],
|
|
19
20
|
options: { typeAware: true, typeCheck: true },
|
|
20
21
|
rules: {
|
|
21
22
|
"typescript/no-explicit-any": "error",
|
|
22
23
|
"typescript/no-floating-promises": "error",
|
|
24
|
+
"typescript/no-misused-promises": "error",
|
|
25
|
+
"typescript/no-deprecated": "error",
|
|
23
26
|
"no-unused-vars": "error",
|
|
24
27
|
"react/exhaustive-deps": "error",
|
|
25
28
|
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
@@ -30,8 +33,30 @@ export default defineConfig({
|
|
|
30
33
|
"react/react-in-jsx-scope": "off",
|
|
31
34
|
// exact pins make "unstable" Effect APIs safe; this flags it.effect itself
|
|
32
35
|
"effecttsgo/unstable-api-usage": "off",
|
|
36
|
+
// bindings reach code through effect-cf layers; cloudflare.ts is the one file that reads env
|
|
37
|
+
"no-restricted-imports": [
|
|
38
|
+
"error",
|
|
39
|
+
{
|
|
40
|
+
paths: [
|
|
41
|
+
{
|
|
42
|
+
name: "cloudflare:workers",
|
|
43
|
+
importNames: ["env"],
|
|
44
|
+
message:
|
|
45
|
+
"Read bindings through effect-cf layers; only server/cloudflare.ts reads env.",
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
33
50
|
},
|
|
34
51
|
overrides: [
|
|
52
|
+
{
|
|
53
|
+
files: ["**/*.test.ts", "**/*.test.tsx"],
|
|
54
|
+
rules: { "effect-tests/no-manual-runtime": "error" },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
files: ["apps/web/src/server/cloudflare.ts"],
|
|
58
|
+
rules: { "no-restricted-imports": "off" },
|
|
59
|
+
},
|
|
35
60
|
{
|
|
36
61
|
// entry points are where layers get provided: the server runtime and one-off scripts
|
|
37
62
|
files: ["apps/web/src/server/runtime.ts", "packages/*/scripts/**"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SubmitEvent, useState } from "react"
|
|
2
2
|
import { Button } from "@/components/ui/button"
|
|
3
3
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
|
4
4
|
import { Input } from "@/components/ui/input"
|
|
@@ -9,7 +9,7 @@ export function RealtimeDemo() {
|
|
|
9
9
|
const { messages, status, send } = useRoom("demo")
|
|
10
10
|
const [text, setText] = useState("")
|
|
11
11
|
|
|
12
|
-
const submit = (event:
|
|
12
|
+
const submit = (event: SubmitEvent) => {
|
|
13
13
|
event.preventDefault()
|
|
14
14
|
if (text.trim() === "") return
|
|
15
15
|
send(text)
|