@inglorious/create-app 1.7.1 → 1.8.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.
Files changed (59) hide show
  1. package/README.md +6 -2
  2. package/bin/index.js +19 -4
  3. package/bin/lib/app-jsx.js +0 -11
  4. package/bin/lib/app-lit.js +0 -5
  5. package/bin/lib/app-vue.js +0 -6
  6. package/bin/lib/app.js +121 -28
  7. package/bin/lib/cli.js +2 -2
  8. package/bin/lib/constants.js +3 -2
  9. package/bin/lib/features.js +103 -6
  10. package/bin/lib/firebase.js +177 -0
  11. package/bin/lib/imports.js +0 -9
  12. package/bin/lib/mobile.js +0 -5
  13. package/bin/lib/prompts.js +311 -0
  14. package/bin/lib/pwa.js +21 -16
  15. package/bin/lib/questions.js +29 -7
  16. package/bin/lib/skills.js +11 -2
  17. package/bin/lib/source.js +4 -11
  18. package/package.json +1 -1
  19. package/templates/features/analytics/scripts/analytics-off-native.mjs +31 -0
  20. package/templates/features/push/public/sw-push.js +23 -0
  21. package/templates/features/push/scripts/push-vault-secrets.mjs +60 -0
  22. package/templates/features/push/supabase/functions/deno.json +6 -0
  23. package/templates/features/push/supabase/functions/push-notify/index.ts +187 -0
  24. package/templates/features/push/supabase/migrations/push.sql +115 -0
  25. package/templates/features/push/supabase/seed.sql +20 -0
  26. package/templates/js/package.json +1 -1
  27. package/templates/js/vite.config.js +0 -1
  28. package/templates/js-jsx/package.json +1 -1
  29. package/templates/js-jsx/vite.config.js +0 -1
  30. package/templates/js-vue/package.json +1 -1
  31. package/templates/js-vue/vite.config.js +0 -1
  32. package/templates/ssx-js/package.json +1 -1
  33. package/templates/ssx-js/src/site.config.js +0 -1
  34. package/templates/ssx-js-jsx/package.json +1 -1
  35. package/templates/ssx-js-jsx/src/site.config.js +0 -1
  36. package/templates/ssx-js-vue/package.json +1 -1
  37. package/templates/ssx-js-vue/src/pages/about.js +0 -1
  38. package/templates/ssx-js-vue/src/pages/index.js +0 -1
  39. package/templates/ssx-js-vue/src/site.config.js +0 -1
  40. package/templates/ssx-ts/package.json +1 -1
  41. package/templates/ssx-ts/src/site.config.ts +0 -1
  42. package/templates/ssx-ts/types/index.d.ts +0 -7
  43. package/templates/ssx-ts-jsx/package.json +1 -1
  44. package/templates/ssx-ts-jsx/src/site.config.ts +0 -1
  45. package/templates/ssx-ts-jsx/types/index.d.ts +0 -7
  46. package/templates/ssx-ts-vue/package.json +1 -1
  47. package/templates/ssx-ts-vue/src/pages/about.ts +0 -1
  48. package/templates/ssx-ts-vue/src/pages/index.ts +0 -1
  49. package/templates/ssx-ts-vue/src/site.config.ts +0 -1
  50. package/templates/ssx-ts-vue/types/index.d.ts +0 -6
  51. package/templates/ts/package.json +1 -1
  52. package/templates/ts/types/index.d.ts +0 -7
  53. package/templates/ts/vite.config.ts +0 -2
  54. package/templates/ts-jsx/package.json +1 -1
  55. package/templates/ts-jsx/types/index.d.ts +0 -7
  56. package/templates/ts-jsx/vite.config.ts +0 -2
  57. package/templates/ts-vue/package.json +1 -1
  58. package/templates/ts-vue/types/index.d.ts +0 -6
  59. package/templates/ts-vue/vite.config.ts +0 -2
@@ -8,7 +8,6 @@ export default {
8
8
  description: "Built with @inglorious/ssx",
9
9
  viewport: "width=device-width, initial-scale=1.0, viewport-fit=cover",
10
10
  },
11
- // SSX includes image optimization by default
12
11
  vite: {
13
12
  plugins: [jsx()],
14
13
  server: {
@@ -33,6 +33,6 @@
33
33
  },
34
34
  "packageManager": "pnpm@10.15.0",
35
35
  "engines": {
36
- "node": ">= 22"
36
+ "node": ">= 26"
37
37
  }
38
38
  }
@@ -1,4 +1,3 @@
1
- // SSX routes this module; the page's template is in its .vue file.
2
1
  export { About } from "./about.vue"
3
2
 
4
3
  export const metadata = {
@@ -1,4 +1,3 @@
1
- // SSX routes this module; the page's template is in its .vue file.
2
1
  export { Index } from "./index.vue"
3
2
 
4
3
  export const metadata = {
@@ -8,7 +8,6 @@ export default {
8
8
  description: "Built with @inglorious/ssx",
9
9
  viewport: "width=device-width, initial-scale=1.0, viewport-fit=cover",
10
10
  },
11
- // SSX includes image optimization by default
12
11
  vite: {
13
12
  plugins: [vue()],
14
13
  server: {
@@ -36,6 +36,6 @@
36
36
  },
37
37
  "packageManager": "pnpm@10.15.0",
38
38
  "engines": {
39
- "node": ">= 22"
39
+ "node": ">= 26"
40
40
  }
41
41
  }
@@ -7,7 +7,6 @@ const siteConfig: SiteConfig = {
7
7
  description: "Built with @inglorious/ssx",
8
8
  viewport: "width=device-width, initial-scale=1.0, viewport-fit=cover",
9
9
  },
10
- // SSX includes image optimization by default
11
10
  vite: {
12
11
  server: {
13
12
  port: 3000,
@@ -1,29 +1,22 @@
1
1
  import type { BaseEntity, EntitiesState, EntityType } from "@inglorious/store"
2
2
  import type { Api, TemplateResult } from "@inglorious/web"
3
3
 
4
- // Define your entity types
5
4
  export interface AboutEntity extends BaseEntity {
6
5
  type: "About"
7
6
  name: string
8
7
  }
9
8
 
10
- // Union type of all entities
11
9
  export type AppEntity = AboutEntity
12
10
 
13
- // State type with known entity IDs
14
11
  export interface AppState extends EntitiesState<AppEntity> {
15
12
  about: AboutEntity
16
13
  }
17
14
 
18
15
  export type AppApi = Api<AppEntity, AppState>
19
16
 
20
- // Each type's events and their payloads. Declare types with `type`, not
21
- // `interface`: an interface does not fit the store's `types`.
22
17
  export type AboutType = {
23
18
  click: (entity: AboutEntity) => void
24
19
  render: (entity: AboutEntity, api: AppApi) => TemplateResult
25
20
  }
26
21
 
27
- // A shorthand for a type: `{ ... } satisfies AppType<AboutEntity>` infers
28
- // its handlers' parameters, but neither lists its events nor types payloads.
29
22
  export type AppType<TEntity extends AppEntity> = EntityType<TEntity, AppApi>
@@ -38,6 +38,6 @@
38
38
  },
39
39
  "packageManager": "pnpm@10.15.0",
40
40
  "engines": {
41
- "node": ">= 22"
41
+ "node": ">= 26"
42
42
  }
43
43
  }
@@ -8,7 +8,6 @@ const siteConfig: SiteConfig = {
8
8
  description: "Built with @inglorious/ssx",
9
9
  viewport: "width=device-width, initial-scale=1.0, viewport-fit=cover",
10
10
  },
11
- // SSX includes image optimization by default
12
11
  vite: {
13
12
  plugins: [jsx()],
14
13
  server: {
@@ -3,29 +3,22 @@
3
3
  import type { BaseEntity, EntitiesState, EntityType } from "@inglorious/store"
4
4
  import type { Api, TemplateResult } from "@inglorious/web"
5
5
 
6
- // Define your entity types
7
6
  export interface AboutEntity extends BaseEntity {
8
7
  type: "About"
9
8
  name: string
10
9
  }
11
10
 
12
- // Union type of all entities
13
11
  export type AppEntity = AboutEntity
14
12
 
15
- // State type with known entity IDs
16
13
  export interface AppState extends EntitiesState<AppEntity> {
17
14
  about: AboutEntity
18
15
  }
19
16
 
20
17
  export type AppApi = Api<AppEntity, AppState>
21
18
 
22
- // Each type's events and their payloads. Declare types with `type`, not
23
- // `interface`: an interface does not fit the store's `types`.
24
19
  export type AboutType = {
25
20
  click: (entity: AboutEntity) => void
26
21
  render: (entity: AboutEntity, api: AppApi) => TemplateResult
27
22
  }
28
23
 
29
- // A shorthand for a type: `{ ... } satisfies AppType<AboutEntity>` infers
30
- // its handlers' parameters, but neither lists its events nor types payloads.
31
24
  export type AppType<TEntity extends AppEntity> = EntityType<TEntity, AppApi>
@@ -37,6 +37,6 @@
37
37
  },
38
38
  "packageManager": "pnpm@10.15.0",
39
39
  "engines": {
40
- "node": ">= 22"
40
+ "node": ">= 26"
41
41
  }
42
42
  }
@@ -1,4 +1,3 @@
1
- // SSX routes this module; the page's template is in its .vue file.
2
1
  // @ts-expect-error - Handled by @inglorious/vite-plugin-vue
3
2
  export { About } from "./about.vue"
4
3
 
@@ -1,4 +1,3 @@
1
- // SSX routes this module; the page's template is in its .vue file.
2
1
  // @ts-expect-error - Handled by @inglorious/vite-plugin-vue
3
2
  export { Index } from "./index.vue"
4
3
 
@@ -8,7 +8,6 @@ const siteConfig: SiteConfig = {
8
8
  description: "Built with @inglorious/ssx",
9
9
  viewport: "width=device-width, initial-scale=1.0, viewport-fit=cover",
10
10
  },
11
- // SSX includes image optimization by default
12
11
  vite: {
13
12
  plugins: [vue()],
14
13
  server: {
@@ -1,23 +1,17 @@
1
1
  import type { BaseEntity, EntitiesState, EntityType } from "@inglorious/store"
2
2
  import type { Api } from "@inglorious/web"
3
3
 
4
- // Define your entity types
5
4
  export interface AboutEntity extends BaseEntity {
6
5
  type: "About"
7
6
  name: string
8
7
  }
9
8
 
10
- // Union type of all entities
11
9
  export type AppEntity = AboutEntity
12
10
 
13
- // State type with known entity IDs
14
11
  export interface AppState extends EntitiesState<AppEntity> {
15
12
  about: AboutEntity
16
13
  }
17
14
 
18
15
  export type AppApi = Api<AppEntity, AppState>
19
16
 
20
- // A type for one of the app's entities. For rigour, declare a type alias
21
- // listing its events and payloads; this shorthand infers its handlers'
22
- // parameters with `{ ... } satisfies AppType<AboutEntity>`.
23
17
  export type AppType<TEntity extends AppEntity> = EntityType<TEntity, AppApi>
@@ -36,6 +36,6 @@
36
36
  },
37
37
  "packageManager": "pnpm@10.15.0",
38
38
  "engines": {
39
- "node": ">= 22"
39
+ "node": ">= 26"
40
40
  }
41
41
  }
@@ -3,17 +3,14 @@ import "./vite-end"
3
3
  import type { BaseEntity, EntitiesState, EntityType } from "@inglorious/store"
4
4
  import type { Api, TemplateResult } from "@inglorious/web"
5
5
 
6
- // Define your entity types
7
6
  export interface MessageEntity extends BaseEntity {
8
7
  type: "Message"
9
8
  who: string
10
9
  isUpperCase?: boolean
11
10
  }
12
11
 
13
- // Union type of all entities
14
12
  export type AppEntity = MessageEntity
15
13
 
16
- // State type with known entity IDs
17
14
  export interface AppState extends EntitiesState<AppEntity> {
18
15
  message1: MessageEntity
19
16
  message2: MessageEntity
@@ -22,13 +19,9 @@ export interface AppState extends EntitiesState<AppEntity> {
22
19
 
23
20
  export type AppApi = Api<AppEntity, AppState>
24
21
 
25
- // Each type's events and their payloads. Declare types with `type`, not
26
- // `interface`: an interface does not fit the store's `types`.
27
22
  export type MessageType = {
28
23
  click: (entity: MessageEntity) => void
29
24
  render: (entity: MessageEntity, api: AppApi) => TemplateResult
30
25
  }
31
26
 
32
- // A shorthand for a type: `{ ... } satisfies AppType<MessageEntity>` infers
33
- // its handlers' parameters, but neither lists its events nor types payloads.
34
27
  export type AppType<TEntity extends AppEntity> = EntityType<TEntity, AppApi>
@@ -9,9 +9,7 @@ import { ViteImageOptimizer } from "vite-plugin-image-optimizer"
9
9
  const __filename = fileURLToPath(import.meta.url)
10
10
  const __dirname = path.dirname(__filename)
11
11
 
12
- // https://vite.dev/config/
13
12
  export default defineConfig({
14
- // @see https://github.com/vitejs/vite/issues/1973
15
13
  define: { "process.env": {} },
16
14
 
17
15
  plugins: [ViteImageOptimizer(), hmr()],
@@ -38,6 +38,6 @@
38
38
  },
39
39
  "packageManager": "pnpm@10.15.0",
40
40
  "engines": {
41
- "node": ">= 22"
41
+ "node": ">= 26"
42
42
  }
43
43
  }
@@ -3,17 +3,14 @@ import "./vite-end"
3
3
  import type { BaseEntity, EntitiesState, EntityType } from "@inglorious/store"
4
4
  import type { Api, TemplateResult } from "@inglorious/web"
5
5
 
6
- // Define your entity types
7
6
  export interface MessageEntity extends BaseEntity {
8
7
  type: "Message"
9
8
  who: string
10
9
  isUpperCase?: boolean
11
10
  }
12
11
 
13
- // Union type of all entities
14
12
  export type AppEntity = MessageEntity
15
13
 
16
- // State type with known entity IDs
17
14
  export interface AppState extends EntitiesState<AppEntity> {
18
15
  message1: MessageEntity
19
16
  message2: MessageEntity
@@ -22,13 +19,9 @@ export interface AppState extends EntitiesState<AppEntity> {
22
19
 
23
20
  export type AppApi = Api<AppEntity, AppState>
24
21
 
25
- // Each type's events and their payloads. Declare types with `type`, not
26
- // `interface`: an interface does not fit the store's `types`.
27
22
  export type MessageType = {
28
23
  click: (entity: MessageEntity) => void
29
24
  render: (entity: MessageEntity, api: AppApi) => TemplateResult
30
25
  }
31
26
 
32
- // A shorthand for a type: `{ ... } satisfies AppType<MessageEntity>` infers
33
- // its handlers' parameters, but neither lists its events nor types payloads.
34
27
  export type AppType<TEntity extends AppEntity> = EntityType<TEntity, AppApi>
@@ -10,9 +10,7 @@ import { ViteImageOptimizer } from "vite-plugin-image-optimizer"
10
10
  const __filename = fileURLToPath(import.meta.url)
11
11
  const __dirname = path.dirname(__filename)
12
12
 
13
- // https://vite.dev/config/
14
13
  export default defineConfig({
15
- // @see https://github.com/vitejs/vite/issues/1973
16
14
  define: { "process.env": {} },
17
15
 
18
16
  plugins: [ViteImageOptimizer(), jsx(), hmr()],
@@ -37,6 +37,6 @@
37
37
  },
38
38
  "packageManager": "pnpm@10.15.0",
39
39
  "engines": {
40
- "node": ">= 22"
40
+ "node": ">= 26"
41
41
  }
42
42
  }
@@ -3,17 +3,14 @@ import "./vite-end"
3
3
  import type { BaseEntity, EntitiesState, EntityType } from "@inglorious/store"
4
4
  import type { Api } from "@inglorious/web"
5
5
 
6
- // Define your entity types
7
6
  export interface MessageEntity extends BaseEntity {
8
7
  type: "Message"
9
8
  who: string
10
9
  isUpperCase?: boolean
11
10
  }
12
11
 
13
- // Union type of all entities
14
12
  export type AppEntity = MessageEntity
15
13
 
16
- // State type with known entity IDs
17
14
  export interface AppState extends EntitiesState<AppEntity> {
18
15
  message1: MessageEntity
19
16
  message2: MessageEntity
@@ -22,7 +19,4 @@ export interface AppState extends EntitiesState<AppEntity> {
22
19
 
23
20
  export type AppApi = Api<AppEntity, AppState>
24
21
 
25
- // A type for one of the app's entities. For rigour, declare a type alias
26
- // listing its events and payloads; this shorthand infers its handlers'
27
- // parameters with `{ ... } satisfies AppType<MessageEntity>`.
28
22
  export type AppType<TEntity extends AppEntity> = EntityType<TEntity, AppApi>
@@ -10,9 +10,7 @@ import { ViteImageOptimizer } from "vite-plugin-image-optimizer"
10
10
  const __filename = fileURLToPath(import.meta.url)
11
11
  const __dirname = path.dirname(__filename)
12
12
 
13
- // https://vite.dev/config/
14
13
  export default defineConfig({
15
- // @see https://github.com/vitejs/vite/issues/1973
16
14
  define: { "process.env": {} },
17
15
 
18
16
  plugins: [ViteImageOptimizer(), vue(), hmr()],