@idevconn/create-icore 0.7.2 → 0.9.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.
- package/README.md +44 -9
- package/dist/cli.js +689 -363
- package/dist/index.cjs +806 -358
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +798 -351
- package/dist/manifest/audit.js +122 -0
- package/package.json +1 -1
- package/templates/apps/api/src/app/app.module.ts +2 -6
- package/templates/apps/api/src/app/features.module.ts +9 -0
- package/templates/apps/api/src/app/gateway-services.ts +7 -0
- package/templates/apps/api/src/main.ts +1 -5
- package/templates/apps/microservices/auth/src/app/app.module.ts +4 -93
- package/templates/apps/microservices/auth/src/app/auth.provider.ts +9 -0
- package/templates/apps/microservices/notes/src/app/app.module.ts +4 -86
- package/templates/apps/microservices/notes/src/app/db.provider.ts +9 -0
- package/templates/apps/microservices/upload/src/app/app.module.ts +4 -140
- package/templates/apps/microservices/upload/src/app/storage.provider.ts +9 -0
- package/templates/apps/templates/client-antd/src/components/layout/LayoutSider.tsx +15 -23
- package/templates/apps/templates/client-antd/src/nav.config.ts +17 -0
- package/templates/apps/templates/client-mui/src/components/layout/LayoutSider.tsx +19 -20
- package/templates/apps/templates/client-mui/src/nav.config.ts +17 -0
- package/templates/apps/templates/client-shadcn/src/components/layout/LayoutSider.tsx +20 -16
- package/templates/apps/templates/client-shadcn/src/nav.config.ts +17 -0
- package/templates/libs/auth-strategies/firebase/eslint.config.mjs +1 -0
- package/templates/libs/auth-strategies/firebase/package.json +4 -0
- package/templates/libs/auth-strategies/firebase/src/index.ts +1 -0
- package/templates/libs/auth-strategies/firebase/src/lib/__tests__/firebase-auth.module.unit.test.ts +49 -0
- package/templates/libs/auth-strategies/firebase/src/lib/firebase-auth.module.ts +41 -0
- package/templates/libs/auth-strategies/firebase/tsconfig.json +2 -0
- package/templates/libs/auth-strategies/mongodb/package.json +8 -1
- package/templates/libs/auth-strategies/mongodb/src/index.ts +1 -0
- package/templates/libs/auth-strategies/mongodb/src/lib/__tests__/mongodb-auth.module.unit.test.ts +16 -0
- package/templates/libs/auth-strategies/mongodb/src/lib/mongodb-auth.module.ts +45 -0
- package/templates/libs/auth-strategies/mongodb/tsconfig.json +2 -0
- package/templates/libs/auth-strategies/supabase/eslint.config.mjs +1 -0
- package/templates/libs/auth-strategies/supabase/package.json +3 -0
- package/templates/libs/auth-strategies/supabase/src/index.ts +1 -0
- package/templates/libs/auth-strategies/supabase/src/lib/__tests__/supabase-auth.module.unit.test.ts +43 -0
- package/templates/libs/auth-strategies/supabase/src/lib/supabase-auth.module.ts +41 -0
- package/templates/libs/auth-strategies/supabase/tsconfig.json +2 -0
- package/templates/libs/db-strategies/firestore/eslint.config.mjs +1 -1
- package/templates/libs/db-strategies/firestore/package.json +4 -0
- package/templates/libs/db-strategies/firestore/src/index.ts +1 -0
- package/templates/libs/db-strategies/firestore/src/lib/__tests__/firestore-db.module.unit.test.ts +37 -0
- package/templates/libs/db-strategies/firestore/src/lib/firestore-db.module.ts +41 -0
- package/templates/libs/db-strategies/firestore/tsconfig.json +2 -0
- package/templates/libs/db-strategies/mongodb/package.json +4 -1
- package/templates/libs/db-strategies/mongodb/src/index.ts +1 -0
- package/templates/libs/db-strategies/mongodb/src/lib/__tests__/mongodb-db.module.unit.test.ts +14 -0
- package/templates/libs/db-strategies/mongodb/src/lib/mongodb-db.module.ts +41 -0
- package/templates/libs/db-strategies/mongodb/tsconfig.json +2 -0
- package/templates/libs/db-strategies/supabase/eslint.config.mjs +6 -1
- package/templates/libs/db-strategies/supabase/package.json +3 -0
- package/templates/libs/db-strategies/supabase/src/index.ts +1 -0
- package/templates/libs/db-strategies/supabase/src/lib/__tests__/supabase-db.module.unit.test.ts +32 -0
- package/templates/libs/db-strategies/supabase/src/lib/supabase-db.module.ts +41 -0
- package/templates/libs/db-strategies/supabase/tsconfig.json +2 -0
- package/templates/libs/shared/src/strategies/__tests__/provide-strategy.unit.test.ts +73 -0
- package/templates/libs/shared/src/strategies/index.ts +1 -0
- package/templates/libs/shared/src/strategies/provide-strategy.ts +44 -0
- package/templates/libs/storage-strategies/cloudinary/eslint.config.mjs +1 -1
- package/templates/libs/storage-strategies/cloudinary/package.json +4 -0
- package/templates/libs/storage-strategies/cloudinary/src/index.ts +1 -0
- package/templates/libs/storage-strategies/cloudinary/src/lib/__tests__/cloudinary-storage.module.unit.test.ts +40 -0
- package/templates/libs/storage-strategies/cloudinary/src/lib/cloudinary-storage.module.ts +85 -0
- package/templates/libs/storage-strategies/cloudinary/tsconfig.json +2 -0
- package/templates/libs/storage-strategies/firebase/eslint.config.mjs +1 -1
- package/templates/libs/storage-strategies/firebase/package.json +4 -0
- package/templates/libs/storage-strategies/firebase/src/index.ts +1 -0
- package/templates/libs/storage-strategies/firebase/src/lib/__tests__/firebase-storage.module.unit.test.ts +42 -0
- package/templates/libs/storage-strategies/firebase/src/lib/firebase-storage.module.ts +46 -0
- package/templates/libs/storage-strategies/firebase/tsconfig.json +2 -0
- package/templates/libs/storage-strategies/mongodb/package.json +4 -1
- package/templates/libs/storage-strategies/mongodb/src/index.ts +1 -0
- package/templates/libs/storage-strategies/mongodb/src/lib/__tests__/mongodb-storage.module.unit.test.ts +14 -0
- package/templates/libs/storage-strategies/mongodb/src/lib/mongodb-storage.module.ts +41 -0
- package/templates/libs/storage-strategies/mongodb/tsconfig.json +2 -0
- package/templates/libs/storage-strategies/supabase/eslint.config.mjs +1 -0
- package/templates/libs/storage-strategies/supabase/package.json +3 -0
- package/templates/libs/storage-strategies/supabase/src/index.ts +1 -0
- package/templates/libs/storage-strategies/supabase/src/lib/__tests__/supabase-storage.module.unit.test.ts +46 -0
- package/templates/libs/storage-strategies/supabase/src/lib/supabase-storage.module.ts +46 -0
- package/templates/libs/storage-strategies/supabase/tsconfig.json +2 -0
- package/templates/package.json +1 -1
- package/templates/tools/create-icore/_template-shell/package.json +1 -1
- package/templates/tsconfig.base.json +1 -1
package/README.md
CHANGED
|
@@ -19,15 +19,16 @@ npm i -g @idevconn/create-icore && create-icore my-saas
|
|
|
19
19
|
|
|
20
20
|
## Flags
|
|
21
21
|
|
|
22
|
-
| Flag | Values | Default | Notes
|
|
23
|
-
| -------------- | -------------------------------------------------- | --------------- |
|
|
24
|
-
| `--auth` | `supabase` \| `firebase`
|
|
25
|
-
| `--db` | `supabase` \| `firebase`
|
|
26
|
-
| `--upload` | `supabase` \| `firebase` \| `cloudinary` \| `none` | prompted | File upload provider. Use `none` to remove the upload microservice entirely.
|
|
27
|
-
| `--ui` | `shadcn` \| `antd` \| `mui` | `shadcn` | UI library. All three are fully implemented: `shadcn` (Tailwind 4 + shadcn/ui), `antd` (Ant Design 6), `mui` (MUI 6 / Material Design).
|
|
28
|
-
| `--transport` | `tcp` \| `redis` \| `nats` | `tcp` | Microservice transport
|
|
29
|
-
| `--no-git` | — | git enabled | Skip `git init`
|
|
30
|
-
| `--no-install` | — | install enabled | Skip `yarn install`
|
|
22
|
+
| Flag | Values | Default | Notes |
|
|
23
|
+
| -------------- | -------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| `--auth` | `supabase` \| `firebase` \| `mongodb` \| `none` | prompted | Auth provider. Use `none` for a minimal SPA with no login system — skips db, example, and transport questions. |
|
|
25
|
+
| `--db` | `supabase` \| `firebase` \| `mongodb` \| `none` | prompted | Database backend. Fully independent of `--auth` — mix-and-match combos like `--auth=firebase --db=supabase` are first-class. Use `none` when `--auth=none` (set automatically). |
|
|
26
|
+
| `--upload` | `supabase` \| `firebase` \| `cloudinary` \| `none` | prompted | File upload provider. Use `none` to remove the upload microservice entirely. |
|
|
27
|
+
| `--ui` | `shadcn` \| `antd` \| `mui` | `shadcn` | UI library. All three are fully implemented: `shadcn` (Tailwind 4 + shadcn/ui), `antd` (Ant Design 6), `mui` (MUI 6 / Material Design). |
|
|
28
|
+
| `--transport` | `tcp` \| `redis` \| `nats` | `tcp` | Microservice transport |
|
|
29
|
+
| `--no-git` | — | git enabled | Skip `git init` |
|
|
30
|
+
| `--no-install` | — | install enabled | Skip `yarn install` |
|
|
31
|
+
| `--config` | path to `.json` file | — | Pre-fill any wizard answer from a JSON file. Missing fields still prompt interactively. CLI flags override config values. See **Non-interactive / CI mode** below. |
|
|
31
32
|
|
|
32
33
|
> **Deprecated:** `--storage` is a deprecated alias for `--upload`. A warning is printed to stderr and the value is forwarded to `--upload`. Remove `--storage` from your scripts.
|
|
33
34
|
|
|
@@ -52,10 +53,44 @@ npm init @idevconn/icore my-app -- --auth=firebase --db=firebase --upload=cloudi
|
|
|
52
53
|
# Skip the upload microservice entirely (--upload=none)
|
|
53
54
|
npm init @idevconn/icore api-only -- --auth=supabase --db=supabase --upload=none --no-install
|
|
54
55
|
|
|
56
|
+
# No auth — simple SPA (no login system, no auth microservice)
|
|
57
|
+
npm init @idevconn/icore spa-app -- --auth=none --upload=none --no-install
|
|
58
|
+
|
|
55
59
|
# NATS transport
|
|
56
60
|
npm init @idevconn/icore my-app -- --auth=supabase --db=supabase --upload=supabase --transport=nats
|
|
57
61
|
```
|
|
58
62
|
|
|
63
|
+
## Non-interactive / CI mode
|
|
64
|
+
|
|
65
|
+
Pass `--config <path>` to skip individual prompts using a JSON file. Any field omitted from the file is still asked interactively. Individual CLI flags always override config file values.
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"projectName": "demo-saas",
|
|
70
|
+
"authProvider": "supabase",
|
|
71
|
+
"dbProvider": "supabase",
|
|
72
|
+
"upload": "cloudinary",
|
|
73
|
+
"payment": "none",
|
|
74
|
+
"jobs": "bullmq",
|
|
75
|
+
"example": "notes",
|
|
76
|
+
"ui": "shadcn",
|
|
77
|
+
"transport": "nats",
|
|
78
|
+
"packageManager": "yarn",
|
|
79
|
+
"initGit": true,
|
|
80
|
+
"install": false
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Fully non-interactive — all fields in config, no prompts
|
|
86
|
+
npx @idevconn/create-icore --config ./my-config.json
|
|
87
|
+
|
|
88
|
+
# CLI flag overrides config value (firebase wins over supabase in the file)
|
|
89
|
+
npx @idevconn/create-icore --auth firebase --config ./my-config.json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Field names mirror the TypeScript `CreateIcoreOptions` type. Unknown fields are silently ignored. `targetDir` is always derived from `projectName` + the working directory and is ignored if present.
|
|
93
|
+
|
|
59
94
|
## Building
|
|
60
95
|
|
|
61
96
|
Run `nx build create-icore` to build the library.
|