@qwik.dev/core 2.0.0-alpha.1 → 2.0.0-alpha.10

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 (105) hide show
  1. package/bindings/qwik.darwin-arm64.node +0 -0
  2. package/bindings/qwik.darwin-x64.node +0 -0
  3. package/bindings/qwik.linux-x64-gnu.node +0 -0
  4. package/bindings/qwik.wasm.cjs +259 -272
  5. package/bindings/qwik.wasm.mjs +259 -272
  6. package/bindings/qwik.win32-x64-msvc.node +0 -0
  7. package/bindings/qwik_wasm_bg.wasm +0 -0
  8. package/dist/build/index.cjs +3 -3
  9. package/dist/build/index.d.ts +22 -22
  10. package/dist/build/package.json +1 -1
  11. package/dist/cli.cjs +1453 -798
  12. package/dist/core-internal.d.ts +4368 -3895
  13. package/dist/core.cjs +6786 -6121
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.min.mjs +1 -1
  16. package/dist/core.mjs +6759 -6117
  17. package/dist/core.mjs.map +1 -1
  18. package/dist/core.prod.cjs +3568 -3206
  19. package/dist/core.prod.mjs +3916 -3586
  20. package/dist/insights/index.qwik.cjs +1 -751
  21. package/dist/insights/index.qwik.mjs +62 -741
  22. package/dist/insights/vite/index.cjs +1 -82
  23. package/dist/insights/vite/index.mjs +65 -37
  24. package/dist/insights/vite.d.ts +22 -0
  25. package/dist/{insights/insights.d.ts → insights.d.ts} +33 -22
  26. package/dist/loader/index.cjs +2 -2
  27. package/dist/loader/index.mjs +2 -2
  28. package/dist/loader/package.json +1 -1
  29. package/dist/optimizer.cjs +703 -5856
  30. package/dist/optimizer.d.ts +741 -707
  31. package/dist/optimizer.mjs +690 -6282
  32. package/dist/preloader.cjs +243 -0
  33. package/dist/preloader.mjs +183 -0
  34. package/dist/qwikloader.debug.js +211 -220
  35. package/dist/qwikloader.js +1 -3
  36. package/dist/server.cjs +1371 -7279
  37. package/dist/server.d.ts +467 -402
  38. package/dist/server.mjs +1339 -7230
  39. package/dist/starters/adapters/aws-lambda/serverless.yml +15 -0
  40. package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +0 -2
  41. package/dist/starters/adapters/azure-swa/public/staticwebapp.config.json +7 -0
  42. package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +1 -2
  43. package/dist/starters/adapters/bun/src/entry.bun.ts +3 -2
  44. package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +1 -3
  45. package/dist/starters/adapters/cloudflare-pages/public/_headers +2 -0
  46. package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +1 -2
  47. package/dist/starters/adapters/deno/src/entry.deno.ts +3 -2
  48. package/dist/starters/adapters/express/src/entry.express.tsx +5 -2
  49. package/dist/starters/adapters/fastify/src/entry.fastify.tsx +2 -1
  50. package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +11 -1
  51. package/dist/starters/adapters/firebase/firebase.json +12 -1
  52. package/dist/starters/adapters/firebase/functions/index.js +2 -3
  53. package/dist/starters/adapters/firebase/src/entry-firebase.tsx +1 -2
  54. package/dist/starters/adapters/netlify-edge/public/_headers +2 -0
  55. package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +1 -2
  56. package/dist/starters/adapters/node-server/src/entry.node-server.tsx +3 -2
  57. package/dist/starters/adapters/static/README.md +4 -0
  58. package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +1 -2
  59. package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
  60. package/dist/starters/features/auth/package.json +3 -1
  61. package/dist/starters/features/bootstrap/src/routes/bootstrap/layout.tsx +0 -11
  62. package/dist/starters/features/cypress/package.json +1 -1
  63. package/dist/starters/features/drizzle/drizzle/schema.ts +6 -18
  64. package/dist/starters/features/drizzle/drizzle.config.ts +5 -4
  65. package/dist/starters/features/drizzle/package.json +16 -12
  66. package/dist/starters/features/localize/src/entry.ssr.tsx +0 -2
  67. package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +1 -1
  68. package/dist/starters/features/pandacss/package.json +1 -1
  69. package/dist/starters/features/partytown/package.json +1 -1
  70. package/dist/starters/features/postcss/package.json +4 -1
  71. package/dist/starters/features/postcss/postcss.config.js +1 -1
  72. package/dist/starters/features/prisma/package.json +3 -2
  73. package/dist/starters/features/react/package.json +1 -1
  74. package/dist/starters/features/service-worker/package.json +13 -0
  75. package/dist/starters/features/service-worker/src/routes/service-worker.ts +14 -0
  76. package/dist/starters/features/storybook/package.json +1 -1
  77. package/dist/starters/features/styled-vanilla-extract/package.json +4 -2
  78. package/dist/starters/features/tailwind/package.json +19 -9
  79. package/dist/starters/features/tailwind/src/global.css +1 -7
  80. package/dist/starters/features/tailwind-v3/package.json +21 -0
  81. package/dist/starters/features/{tailwind → tailwind-v3}/postcss.config.cjs +1 -1
  82. package/dist/starters/features/tailwind-v3/src/global.css +7 -0
  83. package/dist/starters/features/{tailwind → tailwind-v3}/tailwind.config.js +1 -1
  84. package/dist/starters/features/turso/package.json +5 -2
  85. package/dist/starters/features/turso/src/utils/turso.ts +1 -1
  86. package/dist/starters/features/vitest/package.json +1 -1
  87. package/dist/testing/index.cjs +7562 -6858
  88. package/dist/testing/index.d.ts +141 -140
  89. package/dist/testing/index.mjs +7495 -6790
  90. package/dist/testing/package.json +1 -1
  91. package/handlers.mjs +9 -0
  92. package/package.json +25 -13
  93. package/public.d.ts +13 -0
  94. package/server.d.ts +1 -0
  95. package/dist/index.d.ts +0 -2
  96. package/dist/insights/index.d.ts +0 -1
  97. package/dist/insights/vite/index.d.ts +0 -1
  98. package/dist/insights/vite/insights-plugin.d.ts +0 -10
  99. package/dist/prefetch/index.cjs +0 -4
  100. package/dist/prefetch/index.d.ts +0 -2
  101. package/dist/prefetch/index.mjs +0 -3
  102. package/dist/prefetch/package.json +0 -8
  103. package/dist/qwik-prefetch.debug.js +0 -244
  104. package/dist/qwik-prefetch.js +0 -1
  105. /package/dist/starters/features/{tailwind → tailwind-v3}/.vscode/settings.json +0 -0
@@ -18,6 +18,21 @@ functions:
18
18
  custom:
19
19
  serverless-offline:
20
20
  httpPort: 4000
21
+ serverless-http:
22
+ # Make sure serverless-http serves files correctly
23
+ binary:
24
+ contentTypes:
25
+ - "application/javascript"
26
+ - "text/javascript"
27
+ - "application/json"
28
+ - "text/html"
29
+ - "text/css"
30
+ - "image/*"
31
+ - "font/*"
32
+ # the js files under build have hash names and are immutable
33
+ cacheControl:
34
+ - pattern: "build/**/*.js"
35
+ value: "public, max-age=31536000, immutable"
21
36
 
22
37
  package:
23
38
  excludeDevDependencies: true
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/aws/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -24,7 +23,6 @@ declare global {
24
23
  export const { handle } = createQwikRouter({
25
24
  render,
26
25
  qwikRouterConfig,
27
- manifest,
28
26
  });
29
27
 
30
28
  export const qwikApp = serverless({ handle }, { binary: true });
@@ -19,5 +19,12 @@
19
19
  },
20
20
  "platform": {
21
21
  "apiRuntime": "node:18"
22
+ },
23
+ "responseOverrides": {
24
+ "build/**/*.js": {
25
+ "headers": {
26
+ "Cache-Control": "public, max-age=31536000, immutable"
27
+ }
28
+ }
22
29
  }
23
30
  }
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/azure-swa/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -19,4 +18,4 @@ declare global {
19
18
  interface QwikRouterPlatform extends PlatformAzure {}
20
19
  }
21
20
 
22
- export default createQwikRouter({ render, qwikRouterConfig, manifest });
21
+ export default createQwikRouter({ render, qwikRouterConfig });
@@ -8,7 +8,6 @@
8
8
  * - https://bun.sh/docs/api/http
9
9
  *
10
10
  */
11
- import { manifest } from "@qwik-client-manifest";
12
11
  import qwikRouterConfig from "@qwik-router-config";
13
12
  import { createQwikRouter } from "@qwik.dev/router/middleware/bun";
14
13
  import render from "./entry.ssr";
@@ -17,7 +16,9 @@ import render from "./entry.ssr";
17
16
  const { router, notFound, staticFile } = createQwikRouter({
18
17
  render,
19
18
  qwikRouterConfig,
20
- manifest,
19
+ static: {
20
+ cacheControl: "public, max-age=31536000, immutable",
21
+ },
21
22
  });
22
23
 
23
24
  // Allow for dynamic port
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/gcp-cloud-run/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -52,9 +51,8 @@ const DEFAULT_HEADERS = {
52
51
  const { router, notFound, staticFile } = createQwikRouter({
53
52
  render,
54
53
  qwikRouterConfig,
55
- manifest,
56
54
  static: {
57
- cacheControl: "public, max-age=31557600",
55
+ cacheControl: "public, max-age=31536000, immutable",
58
56
  },
59
57
  getOrigin(req) {
60
58
  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
@@ -7,3 +7,5 @@
7
7
 
8
8
  /build/*
9
9
  Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable
10
+ /assets/*
11
+ Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/cloudflare-pages/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -19,6 +18,6 @@ declare global {
19
18
  interface QwikRouterPlatform extends PlatformCloudflarePages {}
20
19
  }
21
20
 
22
- const fetch = createQwikRouter({ render, qwikRouterConfig, manifest });
21
+ const fetch = createQwikRouter({ render, qwikRouterConfig });
23
22
 
24
23
  export { fetch };
@@ -8,7 +8,6 @@
8
8
  * - https://docs.deno.com/runtime/tutorials/http_server
9
9
  *
10
10
  */
11
- import { manifest } from "@qwik-client-manifest";
12
11
  import qwikRouterConfig from "@qwik-router-config";
13
12
  import { createQwikRouter } from "@qwik.dev/router/middleware/deno";
14
13
  import render from "./entry.ssr";
@@ -17,7 +16,9 @@ import render from "./entry.ssr";
17
16
  const { router, notFound, staticFile } = createQwikRouter({
18
17
  render,
19
18
  qwikRouterConfig,
20
- manifest,
19
+ static: {
20
+ cacheControl: "public, max-age=31536000, immutable",
21
+ },
21
22
  });
22
23
 
23
24
  // Allow for dynamic port
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/node/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -26,6 +25,7 @@ declare global {
26
25
  // Directories where the static assets are located
27
26
  const distDir = join(fileURLToPath(import.meta.url), "..", "..", "dist");
28
27
  const buildDir = join(distDir, "build");
28
+ const assetsDir = join(distDir, "assets");
29
29
 
30
30
  // Allow for dynamic port
31
31
  const PORT = process.env.PORT ?? 3000;
@@ -34,7 +34,6 @@ const PORT = process.env.PORT ?? 3000;
34
34
  const { router, notFound } = createQwikRouter({
35
35
  render,
36
36
  qwikRouterConfig,
37
- manifest,
38
37
  // getOrigin(req) {
39
38
  // // If deploying under a proxy, you may need to build the origin from the request headers
40
39
  // // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
@@ -55,6 +54,10 @@ const app = express();
55
54
  // Static asset handlers
56
55
  // https://expressjs.com/en/starter/static-files.html
57
56
  app.use(`/build`, express.static(buildDir, { immutable: true, maxAge: "1y" }));
57
+ app.use(
58
+ `/assets`,
59
+ express.static(assetsDir, { immutable: true, maxAge: "1y" }),
60
+ );
58
61
  app.use(express.static(distDir, { redirect: false }));
59
62
 
60
63
  // Use Qwik Router's page and endpoint request handler
@@ -21,6 +21,7 @@ declare global {
21
21
  // Directories where the static assets are located
22
22
  const distDir = join(fileURLToPath(import.meta.url), "..", "..", "dist");
23
23
  const buildDir = join(distDir, "build");
24
+ const assetsDir = join(distDir, "assets");
24
25
 
25
26
  // Allow for dynamic port and host
26
27
  const PORT = parseInt(process.env.PORT ?? "3000");
@@ -39,7 +40,7 @@ const start = async () => {
39
40
  // await fastify.register(import('@fastify/compress'))
40
41
 
41
42
  // Handle Qwik Router using a plugin
42
- await fastify.register(FastifyQwik, { distDir, buildDir });
43
+ await fastify.register(FastifyQwik, { distDir, buildDir, assetsDir });
43
44
 
44
45
  // Start the fastify server
45
46
  await fastify.listen({ port: PORT, host: HOST });
@@ -9,6 +9,7 @@ import render from "../entry.ssr";
9
9
  export interface FastifyQwikOptions {
10
10
  distDir: string;
11
11
  buildDir: string;
12
+ assetsDir: string;
12
13
  }
13
14
 
14
15
  const { router, notFound } = createQwikRouter({ render, qwikRouterConfig });
@@ -17,7 +18,7 @@ const qwikPlugin: FastifyPluginAsync<FastifyQwikOptions> = async (
17
18
  fastify,
18
19
  options,
19
20
  ) => {
20
- const { buildDir, distDir } = options;
21
+ const { buildDir, distDir, assetsDir } = options;
21
22
 
22
23
  fastify.register(fastifyStatic, {
23
24
  root: buildDir,
@@ -27,12 +28,21 @@ const qwikPlugin: FastifyPluginAsync<FastifyQwikOptions> = async (
27
28
  decorateReply: false,
28
29
  });
29
30
 
31
+ fastify.register(fastifyStatic, {
32
+ root: assetsDir,
33
+ prefix: "/assets",
34
+ immutable: true,
35
+ maxAge: "1y",
36
+ });
37
+
30
38
  fastify.register(fastifyStatic, {
31
39
  root: distDir,
32
40
  redirect: false,
33
41
  decorateReply: false,
34
42
  });
35
43
 
44
+ fastify.removeAllContentTypeParsers();
45
+
36
46
  fastify.setNotFoundHandler(async (request, response) => {
37
47
  await router(request.raw, response.raw, (err) => fastify.log.error(err));
38
48
  await notFound(request.raw, response.raw, (err) => fastify.log.error(err));
@@ -19,6 +19,17 @@
19
19
  "function": "app"
20
20
  }
21
21
  ],
22
- "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
22
+ "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
23
+ "headers": [
24
+ {
25
+ "source": "build/**/*.js",
26
+ "headers": [
27
+ {
28
+ "key": "Cache-Control",
29
+ "value": "public, max-age=31536000, s-maxage=31536000, immutable"
30
+ }
31
+ ]
32
+ }
33
+ ]
23
34
  }
24
35
  }
@@ -1,5 +1,4 @@
1
1
  import { https } from "firebase-functions";
2
- import qwikApp from './server/entry-firebase.mjs';
2
+ import qwikApp from "./server/entry-firebase.mjs";
3
3
 
4
-
5
- export const app = https.onRequest(qwikApp)
4
+ export const app = https.onRequest(qwikApp);
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/firebase/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -19,4 +18,4 @@ declare global {
19
18
  interface QwikRouterPlatform extends PlatformFirebase {}
20
19
  }
21
20
 
22
- export default createQwikRouter({ render, qwikRouterConfig, manifest });
21
+ export default createQwikRouter({ render, qwikRouterConfig });
@@ -1,2 +1,4 @@
1
+ /assets/*
2
+ Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable
1
3
  /build/*
2
4
  Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/netlify-edge/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -19,4 +18,4 @@ declare global {
19
18
  interface QwikRouterPlatform extends PlatformNetlify {}
20
19
  }
21
20
 
22
- export default createQwikRouter({ render, qwikRouterConfig, manifest });
21
+ export default createQwikRouter({ render, qwikRouterConfig });
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/node/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import { createQwikRouter } from "@qwik.dev/router/middleware/node";
13
12
  import { createServer } from "node:http";
@@ -20,7 +19,9 @@ const PORT = process.env.PORT ?? 3004;
20
19
  const { router, notFound, staticFile } = createQwikRouter({
21
20
  render,
22
21
  qwikRouterConfig,
23
- manifest,
22
+ static: {
23
+ cacheControl: "public, max-age=31536000, immutable",
24
+ },
24
25
  });
25
26
 
26
27
  const server = createServer();
@@ -1,5 +1,9 @@
1
1
  ## Static Site Generator (Node.js)
2
2
 
3
+ Be sure to configure your server to serve very long cache headers for the `build/**/*.js` files.
4
+
5
+ Typically you'd set the `Cache-Control` header for those files to `public, max-age=31536000, immutable`.
6
+
3
7
  ```shell
4
8
  npm run build.server
5
9
  ```
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/vercel-edge/
8
8
  *
9
9
  */
10
- import { manifest } from "@qwik-client-manifest";
11
10
  import qwikRouterConfig from "@qwik-router-config";
12
11
  import {
13
12
  createQwikRouter,
@@ -19,4 +18,4 @@ declare global {
19
18
  interface QwikRouterPlatform extends PlatformVercel {}
20
19
  }
21
20
 
22
- export default createQwikRouter({ render, qwikRouterConfig, manifest });
21
+ export default createQwikRouter({ render, qwikRouterConfig });
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  },
12
12
  {
13
- "source": "/build/(.*)",
13
+ "source": "/(assets|build)/.*",
14
14
  "headers": [
15
15
  {
16
16
  "key": "Cache-Control",
@@ -9,12 +9,14 @@
9
9
  ],
10
10
  "nextSteps": {
11
11
  "lines": [
12
+ " Please add `optimizeDeps: { include: ['@auth/qwik'] }`",
13
+ " to your vite.config.ts file.",
12
14
  " Have a look at the docs for more info: ",
13
15
  " https://qwik.dev/docs/integrations/authjs/"
14
16
  ]
15
17
  }
16
18
  },
17
19
  "devDependencies": {
18
- "@auth/qwik": "0.2.2"
20
+ "@auth/qwik": "0.5.4"
19
21
  }
20
22
  }
@@ -6,17 +6,6 @@ import { Navbar } from "~/components/bootstrap";
6
6
 
7
7
  import bootstrapStyles from "../../../node_modules/bootstrap/dist/css/bootstrap.min.css?inline";
8
8
 
9
- export const onGet: RequestHandler = async ({ cacheControl }) => {
10
- // Control caching for this request for best performance and to reduce hosting costs:
11
- // https://qwik.dev/docs/caching/
12
- cacheControl({
13
- // Always serve a cached response by default, up to a week stale
14
- staleWhileRevalidate: 60 * 60 * 24 * 7,
15
- // Max once every 5 seconds, revalidate on the server to get a fresh version of this page
16
- maxAge: 5,
17
- });
18
- };
19
-
20
9
  export default component$(() => {
21
10
  useStyles$(bootstrapStyles);
22
11
  return (
@@ -4,7 +4,7 @@
4
4
  "displayName": "Integration: Cypress",
5
5
  "priority": -10,
6
6
  "docs": [
7
- "https://qwik.dev/integrations/integration/cypress/",
7
+ "https://qwik.dev/integrations/cypress/",
8
8
  "https://docs.cypress.io/guides/getting-started/installing-cypress",
9
9
  "https://docs.cypress.io/guides/component-testing/overview",
10
10
  "https://github.com/qwikifiers/cypress-qwik"
@@ -1,22 +1,10 @@
1
- // // This is your drizzle schema file.
1
+ import { sqliteTable as table } from "drizzle-orm/sqlite-core";
2
+ import * as t from "drizzle-orm/sqlite-core";
2
3
 
3
- // import { pgTable, serial, text, timestamp } from "drizzle-orm/pg-core";
4
-
5
- // export const users = pgTable("users", {
6
- // id: serial("id").primaryKey(),
7
- // name: text("name").default("not_provided"),
8
- // email: text("email").notNull(),
9
- // });
10
-
11
- // export const schema = {
12
- // users,
13
- // };
14
- import { sqliteTable, integer, text } from "drizzle-orm/sqlite-core";
15
-
16
- export const users = sqliteTable("users", {
17
- id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }),
18
- name: text("name").default("not_provided"),
19
- email: text("email").notNull(),
4
+ export const users = table("users", {
5
+ id: t.int({ mode: "number" }).primaryKey({ autoIncrement: true }),
6
+ name: t.text().default("not_provided"),
7
+ email: t.text().notNull(),
20
8
  });
21
9
 
22
10
  export const schema = {
@@ -1,9 +1,10 @@
1
- import type { Config } from "drizzle-kit";
2
- export default {
1
+ import { defineConfig } from "drizzle-kit";
2
+
3
+ export default defineConfig({
4
+ dialect: "sqlite",
3
5
  schema: "./drizzle/schema.ts",
4
6
  out: "./drizzle/migrations/",
5
- driver: "better-sqlite",
6
7
  dbCredentials: {
7
8
  url: "./drizzle/db/db.sqlite",
8
9
  },
9
- } satisfies Config;
10
+ });
@@ -5,13 +5,14 @@
5
5
  "priority": -10,
6
6
  "viteConfig": {},
7
7
  "docs": [
8
- "https://qwik.dev/integrations/integration/drizzle/",
8
+ "https://qwik.dev/integrations/drizzle/",
9
9
  "https://orm.drizzle.team/docs/overview"
10
10
  ],
11
11
  "nextSteps": {
12
12
  "title": "Next Steps",
13
13
  "lines": [
14
14
  " Drizzle was installed with a simple DB schema and some demo routes,",
15
+ " now you need to run `npm run drizzle:migrate` to setup the database.",
15
16
  "",
16
17
  " better-sqlite3 was configured by default, but in production",
17
18
  " you'll want to use Postgres or MySQL.",
@@ -22,20 +23,23 @@
22
23
  " Check out the Drizzle docs for more info:",
23
24
  " - https://orm.drizzle.team/docs/overview"
24
25
  ]
25
- }
26
+ },
27
+ "alwaysInRoot": []
26
28
  },
27
29
  "devDependencies": {
28
- "@types/better-sqlite3": "^7.6.9",
29
- "drizzle-kit": "^0.20.14"
30
- },
31
- "dependencies": {
32
- "better-sqlite3": "^9.4.3",
33
- "drizzle-orm": "^0.29.4"
30
+ "@types/better-sqlite3": "^7.6.12",
31
+ "drizzle-kit": "^0.30.3",
32
+ "better-sqlite3": "^11.8.1",
33
+ "drizzle-orm": "^0.39.0"
34
34
  },
35
35
  "scripts": {
36
- "postinstall": "drizzle-kit generate:sqlite",
37
- "drizzle:generate": "drizzle-kit generate:sqlite",
38
- "drizzle:migrate": "drizzle-kit push:sqlite",
39
- "drizzle:studio": "drizzle-kit studio --host 127.0.0.1"
36
+ "drizzle:generate": "drizzle-kit generate",
37
+ "drizzle:migrate": "drizzle-kit migrate",
38
+ "drizzle:push": "drizzle-kit push",
39
+ "drizzle:pull": "drizzle-kit pull",
40
+ "drizzle:check": "drizzle-kit check",
41
+ "drizzle:up": "drizzle-kit up",
42
+ "drizzle:studio": "drizzle-kit studio",
43
+ "postinstall": "drizzle-kit generate"
40
44
  }
41
45
  }
@@ -10,7 +10,6 @@
10
10
  * - npm run build
11
11
  *
12
12
  */
13
- import { manifest } from "@qwik-client-manifest";
14
13
  import {
15
14
  renderToStream,
16
15
  type RenderToStreamOptions,
@@ -20,7 +19,6 @@ import { extractBase } from "./routes/[locale]/i18n-utils";
20
19
 
21
20
  export default function (opts: RenderToStreamOptions) {
22
21
  return renderToStream(<Root />, {
23
- manifest,
24
22
  ...opts,
25
23
  base: extractBase, // determine the base URL for the client code
26
24
  // Use container attributes to set attributes on the html tag.
@@ -83,7 +83,7 @@ export function extractBase({ serverData }: RenderOptions): string {
83
83
  export function useI18n() {
84
84
  if (import.meta.env.DEV) {
85
85
  // During development only, load all translations in memory when the app starts on the client.
86
- // eslint-disable-next-line
86
+
87
87
  useOnDocument("qinit", $(initTranslations));
88
88
  }
89
89
  }
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@builder.io/vite-plugin-macro": "~0.0.7",
26
- "@pandacss/dev": "^0.36.1"
26
+ "@pandacss/dev": "^0.51.1"
27
27
  },
28
28
  "scripts": {
29
29
  "prebuild.pandacss": "panda codegen --silent"
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "docs": [
26
26
  "https://partytown.builder.io/",
27
- "https://qwik.dev/integrations/integration/partytown/"
27
+ "https://qwik.dev/integrations/partytown/"
28
28
  ],
29
29
  "nextSteps": {
30
30
  "lines": [
@@ -5,8 +5,11 @@
5
5
  "priority": -10,
6
6
  "viteConfig": {},
7
7
  "docs": [
8
- "https://qwik.dev/integrations/integration/postcss/",
8
+ "https://qwik.dev/integrations/postcss/",
9
9
  "https://github.com/postcss/postcss-load-config"
10
+ ],
11
+ "alwaysInRoot": [
12
+ ".vscode"
10
13
  ]
11
14
  },
12
15
  "devDependencies": {
@@ -8,4 +8,4 @@ module.exports = {
8
8
  },
9
9
  },
10
10
  },
11
- }
11
+ };
@@ -5,7 +5,7 @@
5
5
  "priority": -10,
6
6
  "viteConfig": {},
7
7
  "docs": [
8
- "https://qwik.dev/integrations/integration/prisma/",
8
+ "https://qwik.dev/integrations/prisma/",
9
9
  "https://www.prisma.io/docs/concepts/overview/what-is-prisma"
10
10
  ],
11
11
  "postInstall": "prisma migrate dev --name initial",
@@ -20,7 +20,8 @@
20
20
  " Check out the Prisma docs for more info:",
21
21
  " - https://www.prisma.io/docs/getting-started"
22
22
  ]
23
- }
23
+ },
24
+ "alwaysInRoot": []
24
25
  },
25
26
  "devDependencies": {
26
27
  "@prisma/client": "5.3.1",
@@ -4,7 +4,7 @@
4
4
  "displayName": "Framework: React",
5
5
  "priority": -20,
6
6
  "docs": [
7
- "https://qwik.dev/integrations/integration/react/"
7
+ "https://qwik.dev/integrations/react/"
8
8
  ],
9
9
  "nextSteps": {
10
10
  "title": "New folders created!",
@@ -0,0 +1,13 @@
1
+ {
2
+ "description": "Add a service worker to your app",
3
+ "__qwik__": {
4
+ "displayName": "Feature: Service Worker",
5
+ "priority": 10,
6
+ "docs": [],
7
+ "nextSteps": {
8
+ "lines": [
9
+ "Now, make sure that you have `<ServiceWorkerRegister />` in your `src/root.tsx`. You can import it from `@qwik.dev/router`."
10
+ ]
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,14 @@
1
+ /*
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * Any file called "service-worker" is automatically bundled and registered with Qwik Router, as long as you add `<RegisterServiceWorker />` in your `root.tsx`.
5
+ *
6
+ * Here you register the events that your service worker will handle.
7
+ *
8
+ * MDN has documentation at https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
9
+ */
10
+ export declare const self: ServiceWorkerGlobalScope;
11
+
12
+ addEventListener("install", () => self.skipWaiting());
13
+
14
+ addEventListener("activate", () => self.clients.claim());
@@ -4,7 +4,7 @@
4
4
  "displayName": "Integration: Storybook",
5
5
  "priority": -10,
6
6
  "docs": [
7
- "https://qwik.dev/integrations/integration/storybook/",
7
+ "https://qwik.dev/integrations/storybook/",
8
8
  "https://storybook.js.org/docs/qwik/get-started/why-storybook"
9
9
  ]
10
10
  },