create-mercato-app 0.5.1-develop.2709.b6bdd776ac → 0.5.1-develop.2744.9c8be0dd93

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-mercato-app",
3
- "version": "0.5.1-develop.2709.b6bdd776ac",
3
+ "version": "0.5.1-develop.2744.9c8be0dd93",
4
4
  "type": "module",
5
5
  "description": "Create a new Open Mercato application",
6
6
  "main": "./dist/index.js",
@@ -217,6 +217,11 @@ TENANT_DATA_ENCRYPTION_KEY=
217
217
  # Embedding Provider Configuration (for vector search)
218
218
  # ============================================================================
219
219
  # Vector search requires ONE embedding provider to be configured.
220
+ # Automatic vector indexing ships disabled by default in this example env.
221
+ # Enable it by setting OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING=false or removing this line,
222
+ # then trigger a vector reindex from Settings > Search or the CLI.
223
+ OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING=true
224
+ # Legacy alias still supported: DISABLE_VECTOR_SEARCH_AUTOINDEXING=1
220
225
  # OpenAI is the default provider if no explicit configuration is set.
221
226
 
222
227
  # OpenAI (default embedding provider)
@@ -13,6 +13,8 @@ import { createRequestContainer } from '@open-mercato/shared/lib/di/container'
13
13
  import type { EntityManager } from '@mikro-orm/postgresql'
14
14
  import { User } from '@open-mercato/core/modules/auth/data/entities'
15
15
  import { Tenant, Organization } from '@open-mercato/core/modules/directory/data/entities'
16
+ import { buildHomeQuickLinks } from '@/lib/homeQuickLinks'
17
+ import { Fragment } from 'react'
16
18
 
17
19
  function FeatureBadge({ label }: { label: string }) {
18
20
  return (
@@ -48,6 +50,7 @@ for (const route of apiRoutes) {
48
50
 
49
51
  export default async function Home() {
50
52
  const { t } = await resolveTranslations()
53
+ const quickLinks = buildHomeQuickLinks(modules)
51
54
 
52
55
  // Check if user wants to see the start page
53
56
  const cookieStore = await cookies()
@@ -143,15 +146,14 @@ export default async function Home() {
143
146
  <section className="rounded-lg border bg-card p-4">
144
147
  <div className="text-sm font-medium mb-2">{t('app.page.quickLinks.title', 'Quick Links')}</div>
145
148
  <div className="flex flex-wrap items-center gap-3 text-sm">
146
- <Link className="underline hover:text-primary transition-colors" href="/login">{t('app.page.quickLinks.login', 'Login')}</Link>
147
- <span className="text-muted-foreground">·</span>
148
- <Link className="underline hover:text-primary transition-colors" href="/example">{t('app.page.quickLinks.examplePage', 'Example Page')}</Link>
149
- <span className="text-muted-foreground">·</span>
150
- <Link className="underline hover:text-primary transition-colors" href="/backend/example">{t('app.page.quickLinks.exampleAdmin', 'Example Admin')}</Link>
151
- <span className="text-muted-foreground">·</span>
152
- <Link className="underline hover:text-primary transition-colors" href="/backend/todos">{t('app.page.quickLinks.exampleTodos', 'Example Todos with Custom Fields')}</Link>
153
- <span className="text-muted-foreground">·</span>
154
- <Link className="underline hover:text-primary transition-colors" href="/blog/123">{t('app.page.quickLinks.exampleBlog', 'Example Blog Post')}</Link>
149
+ {quickLinks.map((link, index) => (
150
+ <Fragment key={link.href}>
151
+ {index > 0 ? <span className="text-muted-foreground">·</span> : null}
152
+ <Link className="underline hover:text-primary transition-colors" href={link.href}>
153
+ {t(link.translationKey, link.fallbackLabel)}
154
+ </Link>
155
+ </Fragment>
156
+ ))}
155
157
  </div>
156
158
  </section>
157
159
 
@@ -912,7 +912,7 @@
912
912
  "upgrades.v042.message": "Version {{version}} wurde installiert. Analytics-Widgets für Admin- und Mitarbeiter-Rollen aktivieren.",
913
913
  "upgrades.v042.success": "Analytics-Widgets für Admin- und Mitarbeiter-Rollen aktiviert.",
914
914
  "upgrades.versionLabel": "Version {{version}}",
915
- "vector.api.errors.autoIndexingDisabled": "Auto-Indexierung ist über DISABLE_VECTOR_SEARCH_AUTOINDEXING deaktiviert.",
915
+ "vector.api.errors.autoIndexingDisabled": "Die Auto-Indizierung ist über OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING deaktiviert (Legacy-Alias: DISABLE_VECTOR_SEARCH_AUTOINDEXING).",
916
916
  "vector.api.errors.configUnavailable": "Konfigurationsdienst nicht verfügbar",
917
917
  "vector.api.errors.indexFetchFailed": "Vektor-Index-Abruf fehlgeschlagen",
918
918
  "vector.api.errors.indexUnavailable": "Vektor-Index nicht verfügbar",
@@ -912,7 +912,7 @@
912
912
  "upgrades.v042.message": "Version {{version}} has been installed. Enable analytics widgets for admin and employee roles.",
913
913
  "upgrades.v042.success": "Analytics widgets enabled for admin and employee roles.",
914
914
  "upgrades.versionLabel": "Version {{version}}",
915
- "vector.api.errors.autoIndexingDisabled": "Auto-indexing is disabled via DISABLE_VECTOR_SEARCH_AUTOINDEXING.",
915
+ "vector.api.errors.autoIndexingDisabled": "Auto-indexing is disabled via OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING (legacy alias: DISABLE_VECTOR_SEARCH_AUTOINDEXING).",
916
916
  "vector.api.errors.configUnavailable": "Configuration service unavailable",
917
917
  "vector.api.errors.indexFetchFailed": "Vector index fetch failed",
918
918
  "vector.api.errors.indexUnavailable": "Vector index unavailable",
@@ -912,7 +912,7 @@
912
912
  "upgrades.v042.message": "La versión {{version}} se ha instalado. Habilita los widgets de analíticas para los roles admin y empleado.",
913
913
  "upgrades.v042.success": "Widgets de analíticas habilitados para admin y empleado.",
914
914
  "upgrades.versionLabel": "Versión {{version}}",
915
- "vector.api.errors.autoIndexingDisabled": "La indexación automática está deshabilitada mediante DISABLE_VECTOR_SEARCH_AUTOINDEXING.",
915
+ "vector.api.errors.autoIndexingDisabled": "La indexación automática está deshabilitada mediante OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING (alias heredado: DISABLE_VECTOR_SEARCH_AUTOINDEXING).",
916
916
  "vector.api.errors.configUnavailable": "Servicio de configuración no disponible",
917
917
  "vector.api.errors.indexFetchFailed": "Error al obtener el índice vectorial",
918
918
  "vector.api.errors.indexUnavailable": "Índice vectorial no disponible",
@@ -912,7 +912,7 @@
912
912
  "upgrades.v042.message": "Wersja {{version}} została zainstalowana. Włącz widżety analityczne dla ról admin i pracownik.",
913
913
  "upgrades.v042.success": "Widżety analityczne włączone dla ról admin i pracownik.",
914
914
  "upgrades.versionLabel": "Wersja {{version}}",
915
- "vector.api.errors.autoIndexingDisabled": "Automatyczne indeksowanie jest wyłączone przez DISABLE_VECTOR_SEARCH_AUTOINDEXING.",
915
+ "vector.api.errors.autoIndexingDisabled": "Automatyczne indeksowanie jest wyłączone przez OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING (stary alias: DISABLE_VECTOR_SEARCH_AUTOINDEXING).",
916
916
  "vector.api.errors.configUnavailable": "Usługa konfiguracji niedostępna",
917
917
  "vector.api.errors.indexFetchFailed": "Pobieranie indeksu wektorowego nie powiodło się",
918
918
  "vector.api.errors.indexUnavailable": "Indeks wektorowy niedostępny",
@@ -0,0 +1,28 @@
1
+ type ModuleLike = { id: string }
2
+
3
+ export type HomeQuickLink = {
4
+ href: string
5
+ translationKey: string
6
+ fallbackLabel: string
7
+ }
8
+
9
+ const EXAMPLE_MODULE_ID = 'example'
10
+
11
+ const BASE_LINKS: HomeQuickLink[] = [
12
+ { href: '/login', translationKey: 'app.page.quickLinks.login', fallbackLabel: 'Login' },
13
+ ]
14
+
15
+ const EXAMPLE_LINKS: HomeQuickLink[] = [
16
+ { href: '/example', translationKey: 'app.page.quickLinks.examplePage', fallbackLabel: 'Example Page' },
17
+ { href: '/backend/example', translationKey: 'app.page.quickLinks.exampleAdmin', fallbackLabel: 'Example Admin' },
18
+ { href: '/backend/todos', translationKey: 'app.page.quickLinks.exampleTodos', fallbackLabel: 'Example Todos with Custom Fields' },
19
+ { href: '/blog/123', translationKey: 'app.page.quickLinks.exampleBlog', fallbackLabel: 'Example Blog Post' },
20
+ ]
21
+
22
+ export function buildHomeQuickLinks(modules: readonly ModuleLike[]): HomeQuickLink[] {
23
+ if (modules.some((module) => module.id === EXAMPLE_MODULE_ID)) {
24
+ return [...BASE_LINKS, ...EXAMPLE_LINKS]
25
+ }
26
+
27
+ return BASE_LINKS
28
+ }