create-mantiq 0.7.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mantiq",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Scaffold a new MantiqJS application",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/templates.ts CHANGED
@@ -22,7 +22,7 @@ export function getTemplates(ctx: TemplateContext): Record<string, string> {
22
22
  dependencies: {
23
23
  '@mantiq/auth': '^0.2.0',
24
24
  '@mantiq/cli': '^0.1.6',
25
- '@mantiq/core': '^0.2.0',
25
+ '@mantiq/core': '^0.3.0',
26
26
  '@mantiq/database': '^0.1.4',
27
27
  '@mantiq/events': '^0.1.2',
28
28
  '@mantiq/filesystem': '^0.1.2',
@@ -108,7 +108,7 @@ storage/heartbeat/
108
108
 
109
109
  // ── Entry points ────────────────────────────────────────────────────────
110
110
 
111
- 'index.ts': `import { Application, CoreServiceProvider, HttpKernel, RouterImpl, CorsMiddleware, StartSession, EncryptCookies, VerifyCsrfToken } from '@mantiq/core'
111
+ 'index.ts': `import { Application, CoreServiceProvider, HttpKernel, RouterImpl, CorsMiddleware, StartSession, EncryptCookies, VerifyCsrfToken, RateLimiter, ThrottleRequests } from '@mantiq/core'
112
112
  import { AuthServiceProvider, Authenticate, RedirectIfAuthenticated, CheckAbilities, CheckForAnyAbility } from '@mantiq/auth'
113
113
  import { FilesystemServiceProvider } from '@mantiq/filesystem'
114
114
  import { LoggingServiceProvider } from '@mantiq/logging'
@@ -171,6 +171,7 @@ kernel.registerMiddleware('guest', RedirectIfAuthenticated)
171
171
  kernel.registerMiddleware('heartbeat', HeartbeatMiddleware)
172
172
  kernel.registerMiddleware('abilities', CheckAbilities)
173
173
  kernel.registerMiddleware('ability', CheckForAnyAbility)
174
+ kernel.registerMiddleware('throttle', new ThrottleRequests(new RateLimiter()))
174
175
 
175
176
  // Global middleware
176
177
  kernel.setGlobalMiddleware(['cors', 'encrypt.cookies', 'session', 'heartbeat'])
@@ -780,10 +781,10 @@ function applyKitOverrides(templates: Record<string, string>, ctx: TemplateConte
780
781
 
781
782
  // ── package.json ────────────────────────────────────────────────────────
782
783
  const frameworkDevDeps: Record<string, string> = kit === 'react'
783
- ? { 'react': '^19.0.0', 'react-dom': '^19.0.0', '@vitejs/plugin-react': '^4.0.0', '@types/react': '^19.0.0', '@types/react-dom': '^19.0.0' }
784
+ ? { 'react': '^19.0.0', 'react-dom': '^19.0.0', '@vitejs/plugin-react': '^6.0.0', '@types/react': '^19.0.0', '@types/react-dom': '^19.0.0' }
784
785
  : kit === 'vue'
785
- ? { 'vue': '^3.5.0', '@vitejs/plugin-vue': '^5.0.0' }
786
- : { 'svelte': '^5.0.0', '@sveltejs/vite-plugin-svelte': '^5.0.0' }
786
+ ? { 'vue': '^3.5.0', '@vitejs/plugin-vue': '^6.0.0' }
787
+ : { 'svelte': '^5.0.0', '@sveltejs/vite-plugin-svelte': '^7.0.0' }
787
788
 
788
789
  // UI library deps (shadcn + icons) — must match what the stubs actually import
789
790
  const uiDeps: Record<string, string> = kit === 'react'
@@ -798,7 +799,9 @@ function applyKitOverrides(templates: Record<string, string>, ctx: TemplateConte
798
799
  private: true,
799
800
  type: 'module',
800
801
  scripts: {
801
- dev: 'bun run --watch index.ts',
802
+ dev: 'bun run dev:backend & bun run dev:frontend & wait',
803
+ 'dev:backend': 'bun run --watch index.ts',
804
+ 'dev:frontend': 'bunx vite --clearScreen false',
802
805
  start: 'bun run index.ts',
803
806
  mantiq: 'bun run mantiq.ts',
804
807
  build: `vite build && vite build --ssr ${kit === 'react' ? 'src/ssr.tsx' : 'src/ssr.ts'} --outDir bootstrap/ssr`,
@@ -808,7 +811,7 @@ function applyKitOverrides(templates: Record<string, string>, ctx: TemplateConte
808
811
  dependencies: {
809
812
  '@mantiq/auth': '^0.2.0',
810
813
  '@mantiq/cli': '^0.1.6',
811
- '@mantiq/core': '^0.2.0',
814
+ '@mantiq/core': '^0.3.0',
812
815
  '@mantiq/database': '^0.1.4',
813
816
  '@mantiq/events': '^0.1.2',
814
817
  '@mantiq/filesystem': '^0.1.2',
@@ -828,7 +831,7 @@ function applyKitOverrides(templates: Record<string, string>, ctx: TemplateConte
828
831
  devDependencies: {
829
832
  'bun-types': 'latest',
830
833
  'typescript': '^5.7.0',
831
- 'vite': '^6.0.0',
834
+ 'vite': '^8.0.0',
832
835
  'tailwindcss': '^4.0.0',
833
836
  '@tailwindcss/vite': '^4.0.0',
834
837
  ...frameworkDevDeps,
@@ -887,7 +890,7 @@ bootstrap/
887
890
  `
888
891
 
889
892
  // ── index.ts ────────────────────────────────────────────────────────────
890
- templates['index.ts'] = `import { Application, CoreServiceProvider, HttpKernel, RouterImpl, CorsMiddleware, StartSession, EncryptCookies, VerifyCsrfToken } from '@mantiq/core'
893
+ templates['index.ts'] = `import { Application, CoreServiceProvider, HttpKernel, RouterImpl, CorsMiddleware, StartSession, EncryptCookies, VerifyCsrfToken, RateLimiter, ThrottleRequests } from '@mantiq/core'
891
894
  import { ViteServiceProvider, ServeStaticFiles } from '@mantiq/vite'
892
895
  import { AuthServiceProvider, Authenticate, RedirectIfAuthenticated, CheckAbilities, CheckForAnyAbility } from '@mantiq/auth'
893
896
  import { FilesystemServiceProvider } from '@mantiq/filesystem'
@@ -963,6 +966,7 @@ kernel.registerMiddleware('guest', RedirectIfAuthenticated)
963
966
  kernel.registerMiddleware('heartbeat', HeartbeatMiddleware)
964
967
  kernel.registerMiddleware('abilities', CheckAbilities)
965
968
  kernel.registerMiddleware('ability', CheckForAnyAbility)
969
+ kernel.registerMiddleware('throttle', new ThrottleRequests(new RateLimiter()))
966
970
 
967
971
  // Global middleware
968
972
  kernel.setGlobalMiddleware(['static', 'cors', 'encrypt.cookies', 'session', 'heartbeat'])
@@ -15,7 +15,7 @@ export default defineConfig({
15
15
  outDir: 'public/build',
16
16
  manifest: true,
17
17
  emptyOutDir: true,
18
- rollupOptions: {
18
+ rolldownOptions: {
19
19
  input: ['src/main.tsx', 'src/style.css'],
20
20
  },
21
21
  },
@@ -16,7 +16,7 @@ export default defineConfig({
16
16
  outDir: 'public/build',
17
17
  manifest: true,
18
18
  emptyOutDir: true,
19
- rollupOptions: {
19
+ rolldownOptions: {
20
20
  input: ['src/main.ts', 'src/style.css'],
21
21
  },
22
22
  },
@@ -15,7 +15,7 @@ export default defineConfig({
15
15
  outDir: 'public/build',
16
16
  manifest: true,
17
17
  emptyOutDir: true,
18
- rollupOptions: {
18
+ rolldownOptions: {
19
19
  input: ['src/main.ts', 'src/style.css'],
20
20
  },
21
21
  },