@inglorious/create-app 1.7.1 → 1.8.1
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 +6 -2
- package/bin/index.js +19 -4
- package/bin/lib/app-jsx.js +0 -11
- package/bin/lib/app-lit.js +0 -5
- package/bin/lib/app-vue.js +0 -6
- package/bin/lib/app.js +121 -28
- package/bin/lib/cli.js +2 -2
- package/bin/lib/constants.js +3 -2
- package/bin/lib/features.js +103 -6
- package/bin/lib/firebase.js +177 -0
- package/bin/lib/imports.js +0 -9
- package/bin/lib/mobile.js +0 -5
- package/bin/lib/prompts.js +311 -0
- package/bin/lib/pwa.js +21 -16
- package/bin/lib/questions.js +29 -7
- package/bin/lib/skills.js +11 -2
- package/bin/lib/source.js +4 -11
- package/package.json +1 -1
- package/templates/features/analytics/scripts/analytics-off-native.mjs +31 -0
- package/templates/features/push/public/sw-push.js +23 -0
- package/templates/features/push/scripts/push-vault-secrets.mjs +60 -0
- package/templates/features/push/supabase/functions/deno.json +6 -0
- package/templates/features/push/supabase/functions/push-notify/index.ts +187 -0
- package/templates/features/push/supabase/migrations/push.sql +115 -0
- package/templates/features/push/supabase/seed.sql +20 -0
- package/templates/js/package.json +2 -2
- package/templates/js/vite.config.js +0 -1
- package/templates/js-jsx/package.json +2 -2
- package/templates/js-jsx/vite.config.js +0 -1
- package/templates/js-vue/package.json +2 -2
- package/templates/js-vue/vite.config.js +0 -1
- package/templates/ssx-js/package.json +2 -2
- package/templates/ssx-js/src/site.config.js +0 -1
- package/templates/ssx-js-jsx/package.json +2 -2
- package/templates/ssx-js-jsx/src/site.config.js +0 -1
- package/templates/ssx-js-vue/package.json +2 -2
- package/templates/ssx-js-vue/src/pages/about.js +0 -1
- package/templates/ssx-js-vue/src/pages/index.js +0 -1
- package/templates/ssx-js-vue/src/site.config.js +0 -1
- package/templates/ssx-ts/package.json +2 -2
- package/templates/ssx-ts/src/site.config.ts +0 -1
- package/templates/ssx-ts/types/index.d.ts +0 -7
- package/templates/ssx-ts-jsx/package.json +2 -2
- package/templates/ssx-ts-jsx/src/site.config.ts +0 -1
- package/templates/ssx-ts-jsx/types/index.d.ts +0 -7
- package/templates/ssx-ts-vue/package.json +2 -2
- package/templates/ssx-ts-vue/src/pages/about.ts +0 -1
- package/templates/ssx-ts-vue/src/pages/index.ts +0 -1
- package/templates/ssx-ts-vue/src/site.config.ts +0 -1
- package/templates/ssx-ts-vue/types/index.d.ts +0 -6
- package/templates/ts/package.json +3 -3
- package/templates/ts/types/index.d.ts +0 -7
- package/templates/ts/vite.config.ts +0 -2
- package/templates/ts-jsx/package.json +3 -3
- package/templates/ts-jsx/types/index.d.ts +0 -7
- package/templates/ts-jsx/vite.config.ts +0 -2
- package/templates/ts-vue/package.json +3 -3
- package/templates/ts-vue/types/index.d.ts +0 -6
- package/templates/ts-vue/vite.config.ts +0 -2
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@inglorious/eslint-config": "workspace:*",
|
|
22
22
|
"@inglorious/vite-plugin-hmr": "workspace:*",
|
|
23
|
-
"@types/node": "^
|
|
23
|
+
"@types/node": "^26.4.1",
|
|
24
24
|
"@typescript-eslint/eslint-plugin": "^8.72.0",
|
|
25
25
|
"@typescript-eslint/parser": "^8.72.0",
|
|
26
26
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"vite": "^8.3.4",
|
|
35
35
|
"vite-plugin-image-optimizer": "^2.0.3"
|
|
36
36
|
},
|
|
37
|
-
"packageManager": "pnpm@
|
|
37
|
+
"packageManager": "pnpm@12.15.0",
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
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()],
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@inglorious/jsx": "workspace:*",
|
|
23
23
|
"@inglorious/vite-plugin-hmr": "workspace:*",
|
|
24
24
|
"@inglorious/vite-plugin-jsx": "workspace:*",
|
|
25
|
-
"@types/node": "^
|
|
25
|
+
"@types/node": "^26.4.1",
|
|
26
26
|
"@typescript-eslint/eslint-plugin": "^8.72.0",
|
|
27
27
|
"@typescript-eslint/parser": "^8.72.0",
|
|
28
28
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"vite": "^8.3.4",
|
|
37
37
|
"vite-plugin-image-optimizer": "^2.0.3"
|
|
38
38
|
},
|
|
39
|
-
"packageManager": "pnpm@
|
|
39
|
+
"packageManager": "pnpm@12.15.0",
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
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()],
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@inglorious/eslint-config": "workspace:*",
|
|
22
22
|
"@inglorious/vite-plugin-hmr": "workspace:*",
|
|
23
23
|
"@inglorious/vite-plugin-vue": "workspace:*",
|
|
24
|
-
"@types/node": "^
|
|
24
|
+
"@types/node": "^26.4.1",
|
|
25
25
|
"@typescript-eslint/eslint-plugin": "^8.72.0",
|
|
26
26
|
"@typescript-eslint/parser": "^8.72.0",
|
|
27
27
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"vite": "^8.3.4",
|
|
36
36
|
"vite-plugin-image-optimizer": "^2.0.3"
|
|
37
37
|
},
|
|
38
|
-
"packageManager": "pnpm@
|
|
38
|
+
"packageManager": "pnpm@12.15.0",
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
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()],
|