@batijs/cli 0.0.445 → 0.0.447

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 (137) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +1 -1
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +1 -1
  3. package/dist/boilerplates/@batijs/authjs/files/$package.json.js +1 -1
  4. package/dist/boilerplates/@batijs/aws/files/$README.md.js +1 -1
  5. package/dist/boilerplates/@batijs/aws/files/$package.json.js +1 -1
  6. package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +1 -1
  7. package/dist/boilerplates/@batijs/biome/files/$package.json.js +1 -1
  8. package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +1 -1
  9. package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +1 -1
  10. package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +1 -1
  11. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +1 -1
  12. package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +1 -1
  13. package/dist/boilerplates/@batijs/d1/files/$README.md.js +1 -1
  14. package/dist/boilerplates/@batijs/d1/files/$package.json.js +1 -1
  15. package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +1 -1
  16. package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +1 -1
  17. package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +1 -1
  18. package/dist/boilerplates/@batijs/drizzle/files/$.env.js +1 -1
  19. package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +1 -1
  20. package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +1 -1
  21. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +1 -1
  22. package/dist/boilerplates/@batijs/eslint/files/eslint.config.ts +0 -2
  23. package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
  24. package/dist/boilerplates/@batijs/express/files/express-entry.ts +0 -11
  25. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +1 -1
  26. package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +0 -11
  27. package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +1 -1
  28. package/dist/boilerplates/@batijs/h3/files/$package.json.js +1 -1
  29. package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +0 -11
  30. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
  31. package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +0 -11
  32. package/dist/boilerplates/@batijs/hono/files/$package.json.js +1 -1
  33. package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +1 -1
  34. package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +0 -11
  35. package/dist/boilerplates/@batijs/mantine/files/$README.md.js +1 -1
  36. package/dist/boilerplates/@batijs/mantine/files/$package.json.js +1 -1
  37. package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +1 -1
  38. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +1 -1
  39. package/dist/boilerplates/@batijs/prettier/files/.prettierignore +0 -7
  40. package/dist/boilerplates/@batijs/prisma/files/$.env.js +1 -1
  41. package/dist/boilerplates/@batijs/prisma/files/$README.md.js +1 -1
  42. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  43. package/dist/boilerplates/@batijs/react/files/$README.md.js +1 -1
  44. package/dist/boilerplates/@batijs/react/files/$package.json.js +1 -3
  45. package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +1 -1
  46. package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +1 -1
  47. package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +12 -27
  48. package/dist/boilerplates/@batijs/react/files/pages/+config.ts +1 -1
  49. package/dist/boilerplates/@batijs/react/files/pages/index/+Page.tsx +2 -7
  50. package/dist/boilerplates/@batijs/react/files/pages/index/Counter.tsx +2 -15
  51. package/dist/boilerplates/@batijs/react/files/pages/todo/TodoList.tsx +4 -36
  52. package/dist/boilerplates/@batijs/react/types/layouts/LayoutDefault.d.ts +0 -1
  53. package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +1 -1
  54. package/dist/boilerplates/@batijs/sentry/files/$.env.js +1 -1
  55. package/dist/boilerplates/@batijs/sentry/files/$README.md.js +1 -1
  56. package/dist/boilerplates/@batijs/sentry/files/$package.json.js +1 -1
  57. package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +1 -1
  58. package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +1 -1
  59. package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +1 -1
  60. package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +1 -1
  61. package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +1 -1
  62. package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +1 -1
  63. package/dist/boilerplates/@batijs/shared/files/$README.md.js +1 -1
  64. package/dist/boilerplates/@batijs/shared/files/gitignore +0 -7
  65. package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +1 -1
  66. package/dist/boilerplates/@batijs/solid/files/$README.md.js +1 -1
  67. package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -3
  68. package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +1 -1
  69. package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +1 -1
  70. package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +12 -27
  71. package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +1 -1
  72. package/dist/boilerplates/@batijs/solid/files/pages/index/+Page.tsx +2 -7
  73. package/dist/boilerplates/@batijs/solid/files/pages/index/Counter.tsx +2 -15
  74. package/dist/boilerplates/@batijs/solid/files/pages/todo/TodoList.tsx +4 -36
  75. package/dist/boilerplates/@batijs/solid/types/layouts/LayoutDefault.d.ts +0 -1
  76. package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +1 -1
  77. package/dist/boilerplates/@batijs/sqlite/files/$.env.js +1 -1
  78. package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +1 -1
  79. package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +1 -1
  80. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
  81. package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +1 -1
  82. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  83. package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +1 -1
  84. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +1 -1
  85. package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +1 -1
  86. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +1 -1
  87. package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +1 -1
  88. package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +1 -1
  89. package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +1 -1
  90. package/dist/boilerplates/@batijs/vue/files/$README.md.js +1 -1
  91. package/dist/boilerplates/@batijs/vue/files/$package.json.js +1 -3
  92. package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +1 -1
  93. package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +1 -1
  94. package/dist/boilerplates/@batijs/vue/files/components/Content.vue +1 -9
  95. package/dist/boilerplates/@batijs/vue/files/components/Counter.vue +1 -22
  96. package/dist/boilerplates/@batijs/vue/files/components/Logo.vue +1 -10
  97. package/dist/boilerplates/@batijs/vue/files/components/Sidebar.vue +1 -20
  98. package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +0 -4
  99. package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +1 -1
  100. package/dist/boilerplates/@batijs/vue/files/pages/index/+Page.vue +1 -4
  101. package/dist/boilerplates/@batijs/vue/files/pages/todo/TodoList.vue +2 -34
  102. package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +1 -1
  103. package/dist/boilerplates/boilerplates.json +0 -70
  104. package/dist/{chunk-YO6CY4MA.js → chunk-RIWHL2V7.js} +9848 -9848
  105. package/dist/index.js +4 -36
  106. package/package.json +5 -5
  107. package/dist/boilerplates/@batijs/express/files/global.d.ts +0 -10
  108. package/dist/boilerplates/@batijs/fastify/files/global.d.ts +0 -10
  109. package/dist/boilerplates/@batijs/firebase-auth/files/$.env.js +0 -24
  110. package/dist/boilerplates/@batijs/firebase-auth/files/$README.md.js +0 -39
  111. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +0 -133
  112. package/dist/boilerplates/@batijs/firebase-auth/files/firebase/$service-account.json.js +0 -26
  113. package/dist/boilerplates/@batijs/firebase-auth/files/global.d.ts +0 -11
  114. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseAdmin.ts +0 -15
  115. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseUI.ts +0 -31
  116. package/dist/boilerplates/@batijs/firebase-auth/files/pages/+client.ts +0 -30
  117. package/dist/boilerplates/@batijs/firebase-auth/files/pages/login/+config.ts +0 -6
  118. package/dist/boilerplates/@batijs/firebase-auth/files/pages/login/+guard.ts +0 -11
  119. package/dist/boilerplates/@batijs/firebase-auth/files/server/firebase-auth-middleware.ts +0 -71
  120. package/dist/boilerplates/@batijs/firebase-auth/types/libs/firebaseAdmin.d.ts +0 -5
  121. package/dist/boilerplates/@batijs/firebase-auth/types/libs/firebaseUI.d.ts +0 -5
  122. package/dist/boilerplates/@batijs/firebase-auth/types/pages/+client.d.ts +0 -1
  123. package/dist/boilerplates/@batijs/firebase-auth/types/pages/login/+config.d.ts +0 -4
  124. package/dist/boilerplates/@batijs/firebase-auth/types/pages/login/+guard.d.ts +0 -3
  125. package/dist/boilerplates/@batijs/firebase-auth/types/server/firebase-auth-middleware.d.ts +0 -4
  126. package/dist/boilerplates/@batijs/h3/files/global.d.ts +0 -10
  127. package/dist/boilerplates/@batijs/hono/files/global.d.ts +0 -10
  128. package/dist/boilerplates/@batijs/panda-css/files/$package.json.js +0 -93
  129. package/dist/boilerplates/@batijs/panda-css/files/layouts/panda.css +0 -1
  130. package/dist/boilerplates/@batijs/panda-css/files/panda.config.ts +0 -32
  131. package/dist/boilerplates/@batijs/panda-css/files/postcss.config.js +0 -5
  132. package/dist/boilerplates/@batijs/panda-css/types/panda.config.d.ts +0 -4
  133. package/dist/boilerplates/@batijs/react-firebase-auth/files/pages/login/+Page.tsx +0 -52
  134. package/dist/boilerplates/@batijs/react-firebase-auth/types/pages/login/+Page.d.ts +0 -3
  135. package/dist/boilerplates/@batijs/solid-firebase-auth/files/pages/login/+Page.tsx +0 -52
  136. package/dist/boilerplates/@batijs/solid-firebase-auth/types/pages/login/+Page.d.ts +0 -3
  137. package/dist/boilerplates/@batijs/vue-firebase-auth/files/pages/login/+Page.vue +0 -51
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  cst,
10
10
  export_which,
11
11
  wds
12
- } from "./chunk-YO6CY4MA.js";
12
+ } from "./chunk-RIWHL2V7.js";
13
13
  import "./chunk-V7W2TXCE.js";
14
14
  import {
15
15
  __commonJS,
@@ -13808,7 +13808,7 @@ Please report this issue to https://github.com/vikejs/bati`
13808
13808
  }
13809
13809
  }
13810
13810
 
13811
- // ../features/dist/chunk-W7363Z3M.js
13811
+ // ../features/dist/chunk-MW3SDQV2.js
13812
13812
  var features = [
13813
13813
  // Vike
13814
13814
  {
@@ -13933,21 +13933,6 @@ var features = [
13933
13933
  }
13934
13934
  ]
13935
13935
  },
13936
- {
13937
- category: "CSS",
13938
- label: "PandaCSS",
13939
- flag: "panda-css",
13940
- image: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHNoYXBlLXJlbmRlcmluZz0nZ2VvbWV0cmljUHJlY2lzaW9uJyB0ZXh0LXJlbmRlcmluZz0nZ2VvbWV0cmljUHJlY2lzaW9uJyBpbWFnZS1yZW5kZXJpbmc9J29wdGltaXplUXVhb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MtNDIuMjQgNC41Mi0xNS44NSAxNC4yLTI3LjA0IDMwLjI1LTMxLjcxIDE0Ljc1LTQuMyAyOS43LTQuMjcgNDQuMzUuNDcgMTMuMDkgNC4yMyAyMS42MyAxMy4xNyAyNS4yNiAyNi41NiAyLjc4IDEwLjI3IDIuNzggMjAuNjYuNjcgMzEuMDItMS42MiA3Ljk4LTQuODkgMTUuMjYtMTAuNzcgMjEuMDktMTAuNTYgMTAuNDUtMjMuNzQgMTIuODUtMzcuODggMTIuMDUtMi41Mi0uMTQtNS4wMy0uNDItNy42MS0uNzEtMS4yMS0uMTMtMi40NC0uMjYtMy42OS0uMzkuMDQuNDEuMDUuNzcuMDggMS4xMi4wMy42OC4wNiAxLjI2LjIgMS44My42IDIuNDIgMS4xOCA0Ljg1IDEuNzUgNy4yOCAxLjM5IDUuODYgMi43NyAxMS43MiA0LjU1IDE3LjQ1IDMuNDkgMTEuMjcgNy41NSAyMi4yNSAxMi4xNiAzMi45OCAzMi44Mi0yLjU2IDYzLjA2LTEwLjcyIDk1LjE1LTI5Ljk4LjQ4LS4zLjkyLS41OCAxLjM2LS44NSAxMy43OS04LjU5IDI0Ljk0LTE5LjcyIDMyLjY0LTM0LjA5IDEyLjQ2LTIzLjI4IDE0Ljg5LTQ4LjE3IDExLjE4LTczLjg3LTMuODItMjYuNTItMTUuNzItNDguNzgtMzYuMi02Ni4yNC0xNC4yMS0xMi4xMS0zMC42NC0yMC4wNC00OC40Ny0yNS4xNnonLz48L2c+PC9zdmc+",
13941
- url: "https://panda-css.com/",
13942
- tagline: "Write type-safe styles with ease using panda",
13943
- repo: "chakra-ui/panda",
13944
- links: [
13945
- {
13946
- label: "Docs",
13947
- href: "https://panda-css.com/docs/overview/getting-started"
13948
- }
13949
- ]
13950
- },
13951
13936
  // UI Component Libraries
13952
13937
  {
13953
13938
  category: "UI Component Libraries",
@@ -14037,24 +14022,6 @@ var features = [
14037
14022
  }
14038
14023
  ]
14039
14024
  },
14040
- {
14041
- category: "Au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zQ1LjY0YTI0LjEyNiAyNC4xMjYgMCAwIDEtMjMuNTEyLS4wMDVMLjkzMSAyODIuMDE1bC0uOTMuOTgzbDExNS42MDcgNjQuNTQ4YTI0LjEyNiAyNC4xMjYgMCAwIDAgMjMuNTEzLjAwNWwxMTYuMjc1LTY0Ljg0N2wtLjI4NS0xLjc1MmwtMTE1Ljk5IDY0LjY4OVoiLz48L3N2Zz4=",
14045
- url: "https://firebase.google.com",
14046
- tagline: "Firebase Authentication aims to make building secure authentication systems easy, while improving the sign-in and onboarding experience for end users",
14047
- links: [
14048
- {
14049
- label: "Getting started",
14050
- href: "https://firebase.google.com/docs/web/setup"
14051
- },
14052
- {
14053
- label: "API",
14054
- href: "https://firebase.google.com/docs/reference"
14055
- }
14056
- ]
14057
- },
14058
14025
  // RPC
14059
14026
  {
14060
14027
  category: "Data fetching",
@@ -14129,6 +14096,7 @@ var features = [
14129
14096
  category: "Server",
14130
14097
  label: "h3",
14131
14098
  flag: "h3",
14099
+ image: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE3LjQyIDEzLjUxQzE3LjQyIDEzLjUxIDI0LjY2MjUgMS45MDc0OCAyNC44Mjc1IDEuNjE3NDhDMjQuOTkyNSAxLjMyNzQ4IDI1LjAyNzUgMC43OTQ5ODMgMjQuNTcyNSAwLjc5NDk4M0MyNC4xMTc1IDAuNzk0OTgzIDEyLjgzNSAxMi4zMTI1IDEyLjgzNSAxMi4zMTI1TDQuODIyNSAxNy4wNjI1QzQuODIyNSAxNy4wNjI1IDQuMjg1IDE3LjM5MjUgNC4zNjc1IDE3LjgwNUM0LjQ1IDE4LjIxNzUgNC44MSAxOC4yMzUgNC45NzUgMTguMjM1QzUuMTQgMTguMjM1IDEzLjY4NzUgMTguM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jgyMjUxIDE3LjA2MjUgMTAuODYgMTEuOTQgMTIuNjA1IDEwLjU2MjVDMTQuMzUgOS4xODQ5OCAyNC4yNCAwLjc5NDk4MyAyNC41NzI1IDAuNzk0OTgzQzI0LjkwNSAwLjc5NDk4MyAxNi4zNzc1IDEyLjI4IDE2LjE1MjUgMTIuNTg3NVoiIGZpbGw9IiNGRkM5MjciLz4KPHBhdGggZD0iTTE1Ljg2MjUgMTcuNjg3NUMxNi4zMTI1IDE3LjA0IDE2Ljc1NSAxNi45OTI1IDE3LjAyMjUgMTcuMTUyNUMxNy4zNjc1IDE3LjM2IDE3LjQwMjUgMTcuODM3NSAxNi45Njc1IDE4LjQxNUMxNi4yODI1IDE5LjMzIDExLjI0NzUgMjYuMDY3NSAxMS4wNTUgMjYuMzA1QzEwLjY5IDI2Ljc1NSAxMC4xNTI1IDI2LjU1NzUgMTAuNTAyNSAyNS45MDVDMTAuNzk1IDI1LjM2NSAxNS4zOTc1IDE4LjM1NzUgMTUuODYyNSAxNy42ODc1Wk04LjcwNzQ5IDE2LjM3MjVDNy44NDQ5OSAxNi45NSA3LjA0MjQ5IDE2LjA4NzUgNy42MTk5OSAxNS40NTVDOC4xOTc0OSAxNC44MjI1IDExLjk4NzUgMTEuNjY3NSAxMi43NTUgMTEuMDE1QzEzLjUyMjUgMTAuMzYyNSAxOC4wMDI1IDYuNDY1IDE4LjM1IDYuMTg1QzE4LjgxIDUuODE1IDE5LjA5NSA2LjE5IDE4LjgwNSA2LjU3NUMxOC41MTc1IDYuOTYgMTUuMzUgMTAuMTI1IDEzLjk1MjUgMTEuNDFDMTIuODcyNSAxMi40MDUgOS41Mjc0OSAxNS44MjI1IDguNzA3NDkgMTYuMzcyNVoiIGZpbGw9IiNGRkU1NjciLz4KPC9zdmc+",
14132
14100
  url: "https://github.com/unjs/h3",
14133
14101
  tagline: "Minimal H(TTP) framework built for high performance and portability",
14134
14102
  repo: "unjs/h3"
@@ -16961,7 +16929,7 @@ var createDefaultQueryTester = function(query, options) {
16961
16929
  // package.json
16962
16930
  var package_default = {
16963
16931
  name: "@batijs/cli",
16964
- version: "0.0.445",
16932
+ version: "0.0.447",
16965
16933
  type: "module",
16966
16934
  scripts: {
16967
16935
  "check-types": "tsc --noEmit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.445",
3
+ "version": "0.0.447",
4
4
  "type": "module",
5
5
  "keywords": [],
6
6
  "description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -20,12 +20,12 @@
20
20
  "typescript": "^5.8.3",
21
21
  "unplugin-purge-polyfills": "^0.1.0",
22
22
  "vite": "^6.3.5",
23
- "@batijs/build": "0.0.445",
24
- "@batijs/compile": "0.0.445"
23
+ "@batijs/build": "0.0.447",
24
+ "@batijs/compile": "0.0.447"
25
25
  },
26
26
  "dependencies": {
27
- "@batijs/features": "0.0.445",
28
- "@batijs/core": "0.0.445"
27
+ "@batijs/features": "0.0.447",
28
+ "@batijs/core": "0.0.447"
29
29
  },
30
30
  "bin": "./dist/index.js",
31
31
  "exports": {
@@ -1,10 +0,0 @@
1
- import type { UserRecord } from "firebase-admin/auth";
2
-
3
- //# BATI.has("firebase-auth")
4
- declare module "express" {
5
- interface Request {
6
- user?: UserRecord | null;
7
- }
8
- }
9
-
10
- export {};
@@ -1,10 +0,0 @@
1
- import type { UserRecord } from "firebase-admin/auth";
2
-
3
- //# BATI.has("firebase-auth")
4
- declare module "fastify" {
5
- interface FastifyRequest {
6
- user: UserRecord | null;
7
- }
8
- }
9
-
10
- export {};
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import {
6
- bta
7
- } from "../../../../chunk-YO6CY4MA.js";
8
- import "../../../../chunk-V7W2TXCE.js";
9
- import "../../../../chunk-DHZ7AZKP.js";
10
-
11
- // ../../boilerplates/firebase-auth/dist/files/$.env.js
12
- async function getEnv(props) {
13
- const envContent = await props.readfile?.();
14
- return bta(
15
- envContent,
16
- "GOOGLE_APPLICATION_CREDENTIALS",
17
- "firebase/service-account.json",
18
- `Location of Your Firebase service account (use for firebase-admin).
19
- Download the file from https://console.firebase.google.com/u/0/project/{firebase-project-id}/settings/serviceaccounts/adminsdk`
20
- );
21
- }
22
- export {
23
- getEnv as default
24
- };
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import {
6
- ita
7
- } from "../../../../chunk-YO6CY4MA.js";
8
- import "../../../../chunk-V7W2TXCE.js";
9
- import "../../../../chunk-DHZ7AZKP.js";
10
-
11
- // ../../boilerplates/firebase-auth/dist/files/$README.md.js
12
- async function getReadme(props) {
13
- const content = await ita(props);
14
- const todo = `
15
- ## *Firebase*
16
- - You first need to **[Create a Firebase project](https://firebase.google.com/docs/web/setup#create-project)**.
17
- - Then register your app in the firebase console. **[Register your app](https://firebase.google.com/docs/web/setup#register-app)**
18
- - Copy Your web app's Firebase configuration and paste in \`/pages/+client.ts\` Example :
19
- \`\`\`ts
20
- const firebaseConfig = {
21
- apiKey: "",
22
- authDomain: "",
23
- projectId: "",
24
- storageBucket: "",
25
- messagingSenderId: "",
26
- appId: "",
27
- };
28
- \`\`\`
29
- - Download Your Firebase service account from [Your Firebase Project Settings > Service accounts](https://console.firebase.google.com/u/0/project/{firebase-project-id}/settings/serviceaccounts/adminsdk)
30
- - Rename to service-account.json and move it to folder \`/firebase/\`.
31
- - Read more about Firebase Auth at official [firebase auth docs](https://firebase.google.com/docs/auth)
32
- - Read FirebaseUI at [firebaseui-web docs](https://github.com/firebase/firebaseui-web?tab=readme-ov-file#using-firebaseui-for-authentication)
33
- `;
34
- content.addMarkdownFeature(todo, "firebase-auth");
35
- return content;
36
- }
37
- export {
38
- getReadme as default
39
- };
@@ -1,133 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import {
6
- ata
7
- } from "../../../../chunk-YO6CY4MA.js";
8
- import "../../../../chunk-V7W2TXCE.js";
9
- import "../../../../chunk-DHZ7AZKP.js";
10
-
11
- // ../../boilerplates/firebase-auth/dist/files/$package.json.js
12
- var __create = Object.create;
13
- var __defProp = Object.defineProperty;
14
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
- var __getOwnPropNames = Object.getOwnPropertyNames;
16
- var __getProtoOf = Object.getPrototypeOf;
17
- var __hasOwnProp = Object.prototype.hasOwnProperty;
18
- var __commonJS = (cb, mod) => function __require() {
19
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
- };
21
- var __copyProps = (to, from, except, desc) => {
22
- if (from && typeof from === "object" || typeof from === "function") {
23
- for (let key of __getOwnPropNames(from))
24
- if (!__hasOwnProp.call(to, key) && key !== except)
25
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26
- }
27
- return to;
28
- };
29
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
- // If the importer is in node compatibility mode or this is not an ESM
31
- // file that has been converted to a CommonJS file using a Babel-
32
- // compatible transform (i.e. "__esModule" has not been set), then set
33
- // "default" to the CommonJS "module.exports" for node compatibility.
34
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
- mod
36
- ));
37
- var require_package = __commonJS({
38
- "package.json"(exports, module) {
39
- module.exports = {
40
- name: "@batijs/firebase-auth",
41
- private: true,
42
- version: "0.0.1",
43
- description: "",
44
- type: "module",
45
- scripts: {
46
- "check-types": "tsc --noEmit",
47
- build: "bati-compile-boilerplate"
48
- },
49
- keywords: [],
50
- author: "",
51
- license: "MIT",
52
- devDependencies: {
53
- "@batijs/compile": "workspace:*",
54
- "@types/node": "^18.19.111",
55
- "@universal-middleware/core": "^0.4.8",
56
- cookie: "^1.0.2",
57
- dotenv: "^16.5.0",
58
- firebase: "^11.9.1",
59
- "firebase-admin": "^12.7.0",
60
- firebaseui: "^6.1.0",
61
- vike: "^0.4.231",
62
- vite: "^6.3.5"
63
- },
64
- dependencies: {
65
- "@batijs/core": "workspace:*"
66
- },
67
- files: [
68
- "dist/"
69
- ],
70
- bati: {
71
- if: {
72
- flag: "firebase-auth"
73
- }
74
- },
75
- exports: {
76
- "./libs/firebaseAdmin": {
77
- types: "./dist/types/libs/firebaseAdmin.d.ts"
78
- },
79
- "./libs/firebaseUI": {
80
- types: "./dist/types/libs/firebaseUI.d.ts"
81
- },
82
- "./pages/+client": {
83
- types: "./dist/types/pages/+client.d.ts"
84
- },
85
- "./pages/login/+config": {
86
- types: "./dist/types/pages/login/+config.d.ts"
87
- },
88
- "./pages/login/+guard": {
89
- types: "./dist/types/pages/login/+guard.d.ts"
90
- },
91
- "./server/firebase-auth-middleware": {
92
- types: "./dist/types/server/firebase-auth-middleware.d.ts"
93
- }
94
- },
95
- typesVersions: {
96
- "*": {
97
- "libs/firebaseAdmin": [
98
- "./dist/types/libs/firebaseAdmin.d.ts"
99
- ],
100
- "libs/firebaseUI": [
101
- "./dist/types/libs/firebaseUI.d.ts"
102
- ],
103
- "pages/+client": [
104
- "./dist/types/pages/+client.d.ts"
105
- ],
106
- "pages/login/+config": [
107
- "./dist/types/pages/login/+config.d.ts"
108
- ],
109
- "pages/login/+guard": [
110
- "./dist/types/pages/login/+guard.d.ts"
111
- ],
112
- "server/firebase-auth-middleware": [
113
- "./dist/types/server/firebase-auth-middleware.d.ts"
114
- ]
115
- }
116
- }
117
- };
118
- }
119
- });
120
- async function getPackageJson(props) {
121
- const packageJson = await ata(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
122
- return packageJson.addDependencies([
123
- "firebase",
124
- "firebase-admin",
125
- "firebaseui",
126
- "cookie",
127
- "@universal-middleware/core",
128
- "dotenv"
129
- ]);
130
- }
131
- export {
132
- getPackageJson as default
133
- };
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import "../../../../../chunk-DHZ7AZKP.js";
6
-
7
- // ../../boilerplates/firebase-auth/dist/files/firebase/$service-account.json.js
8
- async function getPackageJson() {
9
- const firebaseAccountStringified = process.env.TEST_FIREBASE_ACCOUNT;
10
- return firebaseAccountStringified ? JSON.parse(firebaseAccountStringified) : {
11
- type: "",
12
- project_id: "",
13
- private_key_id: "",
14
- private_key: "",
15
- client_email: "",
16
- client_id: "",
17
- auth_uri: "",
18
- token_uri: "",
19
- auth_provider_x509_cert_url: "",
20
- client_x509_cert_url: "",
21
- universe_domain: ""
22
- };
23
- }
24
- export {
25
- getPackageJson as default
26
- };
@@ -1,11 +0,0 @@
1
- import type { UserRecord } from "firebase-admin/auth";
2
-
3
- declare global {
4
- namespace Vike {
5
- interface PageContext {
6
- user?: UserRecord | null;
7
- }
8
- }
9
- }
10
-
11
- export {};
@@ -1,15 +0,0 @@
1
- import "dotenv/config";
2
- import { applicationDefault, getApp, getApps, initializeApp, type App } from "firebase-admin/app";
3
- import { getAuth } from "firebase-admin/auth";
4
-
5
- let firebaseAdmin: App | undefined;
6
-
7
- if (!getApps().length) {
8
- firebaseAdmin = initializeApp({
9
- credential: applicationDefault(),
10
- });
11
- } else {
12
- firebaseAdmin = getApp();
13
- }
14
-
15
- export { firebaseAdmin, getAuth };
@@ -1,31 +0,0 @@
1
- import type { UserCredential } from "firebase/auth";
2
- import firebase from "firebase/compat/app";
3
- import * as firebaseui from "firebaseui";
4
-
5
- type SessionLogin = (authResult: UserCredential) => Promise<void>;
6
-
7
- function startFirebaseUI(ui: firebaseui.auth.AuthUI, sessionLogin?: SessionLogin) {
8
- // Please read firebaseui docs at https://github.com/firebase/firebaseui-web
9
- const uiCOnfig = {
10
- callbacks: {
11
- signInSuccessWithAuthResult(authResult: UserCredential) {
12
- if (sessionLogin) {
13
- sessionLogin(authResult);
14
- // Don't redirect after firebase client successfully sign-in, let vike handle the rest.
15
- return false;
16
- }
17
- return true;
18
- },
19
- },
20
- signInFlow: "popup",
21
- signInOptions: [
22
- // Disable "Email enumeration protection" to be able to login with registered email address
23
- // https://console.firebase.google.com/u/1/project/{project-id}/authentication/settings
24
- firebase.auth.EmailAuthProvider.PROVIDER_ID,
25
- firebase.auth.GoogleAuthProvider.PROVIDER_ID,
26
- ],
27
- };
28
- return ui.start("#firebaseui-auth-container", uiCOnfig);
29
- }
30
-
31
- export { startFirebaseUI };
@@ -1,30 +0,0 @@
1
- // Import the functions you need from the SDKs you need
2
- import { deleteApp, getApp, getApps, initializeApp, type FirebaseApp } from "firebase/app";
3
- import { getAuth, inMemoryPersistence } from "firebase/auth";
4
-
5
- // TODO: Fill your web app's Firebase configuration
6
- // See https://firebase.google.com/docs/web/learn-more?hl=fr#config-object
7
- const firebaseConfig = {
8
- apiKey: "",
9
- authDomain: "",
10
- projectId: "",
11
- storageBucket: "",
12
- messagingSenderId: "",
13
- appId: "",
14
- };
15
-
16
- let firebaseApp: FirebaseApp | undefined;
17
- // create a singleton client side firebaseApp
18
- if (!getApps().length) {
19
- firebaseApp = initializeApp(firebaseConfig);
20
- } else {
21
- firebaseApp = getApp();
22
- deleteApp(firebaseApp);
23
- firebaseApp = initializeApp(firebaseConfig);
24
- }
25
-
26
- const auth = getAuth(firebaseApp);
27
-
28
- // As httpOnly cookies are to be used, do not persist any state client side.
29
- // `inMemoryPersistence` is an implementation of Persistence of type 'NONE'.
30
- auth.setPersistence(inMemoryPersistence);
@@ -1,6 +0,0 @@
1
- const config = {
2
- // firebase-ui only supports client-side rendering
3
- ssr: false,
4
- };
5
-
6
- export default config;
@@ -1,11 +0,0 @@
1
- // https://vike.dev/guard
2
- import { redirect } from "vike/abort";
3
- import type { GuardAsync } from "vike/types";
4
-
5
- const guard: GuardAsync = async (pageContext): ReturnType<GuardAsync> => {
6
- if (pageContext.user) {
7
- throw redirect("/");
8
- }
9
- };
10
-
11
- export { guard };
@@ -1,71 +0,0 @@
1
- import { parse, serialize } from "cookie";
2
- import { getAuth } from "firebase-admin/auth";
3
- import { firebaseAdmin } from "../libs/firebaseAdmin";
4
- // TODO: stop using universal-middleware and directly integrate server middlewares instead and/or use vike-server https://vike.dev/server. (Bati generates boilerplates that use universal-middleware https://github.com/magne4000/universal-middleware to make Bati's internal logic easier. This is temporary and will be removed soon.)
5
- import type { Get, UniversalHandler, UniversalMiddleware } from "@universal-middleware/core";
6
-
7
- export const firebaseAuthMiddleware: Get<[], UniversalMiddleware> = () => async (request, context) => {
8
- if (!request.headers.has("cookie")) return;
9
-
10
- const cookies = parse(request.headers.get("cookie")!);
11
- const sessionCookie: string = cookies.__session || "";
12
-
13
- try {
14
- const auth = getAuth(firebaseAdmin);
15
- const decodedIdToken = await auth.verifySessionCookie(sessionCookie, true);
16
- const user = await auth.getUser(decodedIdToken.sub);
17
- return {
18
- ...context,
19
- user,
20
- };
21
- } catch (error) {
22
- console.debug("verifySessionCookie:", error);
23
- return {
24
- ...context,
25
- user: null,
26
- };
27
- }
28
- };
29
-
30
- export const firebaseAuthLoginHandler: Get<[], UniversalHandler> = () => async (request) => {
31
- const body = await request.json();
32
- const idToken: string = (body as { idToken?: string }).idToken || "";
33
-
34
- const expiresIn = 60 * 60 * 24 * 5 * 1000; // 5 days
35
-
36
- try {
37
- const sessionCookie = await getAuth(firebaseAdmin).createSessionCookie(idToken, { expiresIn });
38
-
39
- const options = { maxAge: expiresIn / 1000, httpOnly: true, secure: true, path: "/" };
40
-
41
- return new Response(JSON.stringify({ status: "success" }), {
42
- status: 200,
43
- headers: {
44
- "content-type": "application/json",
45
- "set-cookie": serialize("__session", sessionCookie, options),
46
- },
47
- });
48
- } catch (error) {
49
- console.error("createSessionCookie:", error);
50
-
51
- return new Response("Unauthorized Request", {
52
- status: 401,
53
- });
54
- }
55
- };
56
-
57
- export const firebaseAuthLogoutHandler: Get<[], UniversalHandler> = () => async () => {
58
- return new Response(JSON.stringify({ status: "success" }), {
59
- status: 200,
60
- headers: {
61
- "content-type": "application/json",
62
- "set-cookie": serialize("__session", "", {
63
- maxAge: 0,
64
- httpOnly: true,
65
- secure: true,
66
- expires: new Date(1),
67
- path: "/",
68
- }),
69
- },
70
- });
71
- };
@@ -1,5 +0,0 @@
1
- import "dotenv/config";
2
- import { type App } from "firebase-admin/app";
3
- import { getAuth } from "firebase-admin/auth";
4
- declare let firebaseAdmin: App | undefined;
5
- export { firebaseAdmin, getAuth };
@@ -1,5 +0,0 @@
1
- import type { UserCredential } from "firebase/auth";
2
- import * as firebaseui from "firebaseui";
3
- type SessionLogin = (authResult: UserCredential) => Promise<void>;
4
- declare function startFirebaseUI(ui: firebaseui.auth.AuthUI, sessionLogin?: SessionLogin): void;
5
- export { startFirebaseUI };
@@ -1,4 +0,0 @@
1
- declare const config: {
2
- ssr: boolean;
3
- };
4
- export default config;
@@ -1,3 +0,0 @@
1
- import type { GuardAsync } from "vike/types";
2
- declare const guard: GuardAsync;
3
- export { guard };
@@ -1,4 +0,0 @@
1
- import type { Get, UniversalHandler, UniversalMiddleware } from "@universal-middleware/core";
2
- export declare const firebaseAuthMiddleware: Get<[], UniversalMiddleware>;
3
- export declare const firebaseAuthLoginHandler: Get<[], UniversalHandler>;
4
- export declare const firebaseAuthLogoutHandler: Get<[], UniversalHandler>;
@@ -1,10 +0,0 @@
1
- import type { UserRecord } from "firebase-admin/auth";
2
-
3
- //# BATI.has("firebase-auth")
4
- declare module "h3" {
5
- interface H3EventContext {
6
- user: UserRecord | null;
7
- }
8
- }
9
-
10
- export {};
@@ -1,10 +0,0 @@
1
- import type { UserRecord } from "firebase-admin/auth";
2
-
3
- //# BATI.has("firebase-auth")
4
- declare module "hono" {
5
- interface ContextVariableMap {
6
- user?: UserRecord | null;
7
- }
8
- }
9
-
10
- export {};