create-evikit 2.5.0 → 2.6.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.
@@ -120,8 +120,8 @@ writeFileSync(
120
120
  writeFileSync(
121
121
  join(target, ".env"),
122
122
  `
123
- ORIGIN=http://localhost:8000
124
- PORT=8000
123
+ ORIGIN=http://localhost:5173
124
+ PORT=5173
125
125
  `.trimStart(),
126
126
  );
127
127
 
@@ -146,6 +146,7 @@ const pkg = {
146
146
  dependencies: {
147
147
  "accept-language": dependencies["accept-language"],
148
148
  classnames: dependencies.classnames,
149
+ "cross-env": dependencies["cross-env"],
149
150
  evikit: dependencies.evikit,
150
151
  express: dependencies.express,
151
152
  "file-type": dependencies["file-type"],
@@ -163,7 +164,6 @@ const pkg = {
163
164
  "@types/express": devDependencies["@types/express"],
164
165
  "@types/node": devDependencies["@types/node"],
165
166
  "@types/swagger-ui-express": devDependencies["@types/swagger-ui-express"],
166
- "cross-env": devDependencies["cross-env"],
167
167
  daisyui: devDependencies.daisyui,
168
168
  eslint: devDependencies.eslint,
169
169
  "eslint-config-prettier": devDependencies["eslint-config-prettier"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-evikit",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "type": "module",
5
5
  "bin": "bin/create-evikit.js",
6
6
  "scripts": {
@@ -21,7 +21,6 @@
21
21
  "@types/express": "^5.0.6",
22
22
  "@types/node": "^26.1.0",
23
23
  "@types/swagger-ui-express": "^4.1.8",
24
- "cross-env": "^10.1.0",
25
24
  "daisyui": "^5.6.14",
26
25
  "eslint": "^10.6.0",
27
26
  "eslint-config-prettier": "^10.1.8",
@@ -37,7 +36,8 @@
37
36
  "@speed-highlight/core": "^1.2.17",
38
37
  "accept-language": "^3.0.20",
39
38
  "classnames": "^2.5.1",
40
- "evikit": "^2.5.0",
39
+ "cross-env": "^10.1.0",
40
+ "evikit": "^2.6.0",
41
41
  "express": "^5.2.1",
42
42
  "file-type": "^22.0.1",
43
43
  "hoofd": "^1.7.3",
@@ -7,7 +7,7 @@ export const TodoServer = {
7
7
  get: endpoint(TodoGet, async () => json({ Todo: db.Todo.select() })),
8
8
 
9
9
  post: endpoint(TodoPost, async ({ input }) => {
10
- const todo = db.Todo.select().find(({ text }) => text == input.text);
10
+ const [todo] = db.Todo.select({ where: { text: input.text } });
11
11
  if (todo) {
12
12
  db.Todo.update({
13
13
  set: { doneAt: todo.doneAt ? undefined : Date.now() },
@@ -168,11 +168,22 @@ npm run dev
168
168
 
169
169
  h(
170
170
  Code,
171
- { file: data?.File["src/routes/todo/page.js"], lang: "js" },
171
+ {
172
+ class: "row-span-2",
173
+ file: data?.File["src/routes/todo/page.js"],
174
+ lang: "js",
175
+ },
172
176
  span(null, "src/routes/"),
173
177
  b(null, "todo/page.js"),
174
178
  ),
175
179
 
180
+ h(
181
+ Code,
182
+ { file: data?.File["src/lib/db/index.js"], lang: "js" },
183
+ span(null, "src/lib/"),
184
+ b(null, "db/index.js"),
185
+ ),
186
+
176
187
  h(
177
188
  Code,
178
189
  { file: data?.File["src/routes/error.js"], lang: "js" },
@@ -227,13 +238,6 @@ npm run dev
227
238
  b(null, "vite.config.js"),
228
239
  ),
229
240
 
230
- h(
231
- Code,
232
- { file: data?.File["src/lib/db/index.js"], lang: "js", tag: "details" },
233
- span(null, "src/lib/"),
234
- b(null, "db/index.js"),
235
- ),
236
-
237
241
  h(
238
242
  Code,
239
243
  { file: data?.File["index.html"], lang: "html", tag: "details" },
@@ -299,8 +303,8 @@ npm run dev
299
303
  );
300
304
  }
301
305
 
302
- /** @param {{ children?: any, lang: string, file: string | undefined, note?: string, tag?: string }} props */
303
- function Code({ children, file, lang, note, tag }) {
306
+ /** @param {{ children?: any, class?: string, lang: string, file: string | undefined, note?: string, tag?: string }} props */
307
+ function Code({ children, class: className, file, lang, note, tag }) {
304
308
  const inner = pre(
305
309
  { class: "mt-4 overflow-auto text-sm" },
306
310
  code(
@@ -319,7 +323,7 @@ function Code({ children, file, lang, note, tag }) {
319
323
  ),
320
324
  );
321
325
  const more = note ? p({ class: "mt-5", ...sanitize(note) }) : undefined;
322
- const style = `${darkBg} mb-4 mx-0 overflow-hidden p-4 rounded-xl`;
326
+ const style = `${className} ${darkBg} mb-4 mx-0 overflow-hidden p-4 rounded-xl`;
323
327
  return tag == "details"
324
328
  ? details({ class: style }, summary(null, children), inner, more)
325
329
  : figure({ class: style }, figcaption(null, children), inner, more);