@hszrdm/create-commerce 1.0.0 → 1.0.2
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
CHANGED
|
@@ -14,7 +14,7 @@ The generator creates:
|
|
|
14
14
|
- Medusa + Core migrations;
|
|
15
15
|
- Store / Region / Sales Channel / Stock Location bootstrap;
|
|
16
16
|
- a publishable storefront API key linked to the Sales Channel;
|
|
17
|
-
- the first
|
|
17
|
+
- the first HSZRDM Commerce admin user;
|
|
18
18
|
- backend/storefront typecheck, test and build verification;
|
|
19
19
|
- Git initialization with generated build artifacts ignored.
|
|
20
20
|
|
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -191,7 +191,7 @@ async function collectSettings(projectName, flags) {
|
|
|
191
191
|
cookieSecret: secret(48),
|
|
192
192
|
integrationEncryptionKey: secret(48),
|
|
193
193
|
shippingWebhookSecret: secret(48),
|
|
194
|
-
coreVersion: clean(flags["core-version"] || "1.0.
|
|
194
|
+
coreVersion: clean(flags["core-version"] || "1.0.2"),
|
|
195
195
|
}
|
|
196
196
|
} finally {
|
|
197
197
|
rl?.close()
|
|
@@ -321,6 +321,7 @@ function configureBackend(root, settings) {
|
|
|
321
321
|
STORE_DEFAULT_CURRENCY: settings.currency,
|
|
322
322
|
STORE_DEFAULT_COUNTRY: settings.country,
|
|
323
323
|
VITE_ADMIN_BRAND_NAME: `${settings.storeName} – HSZRDM Commerce`,
|
|
324
|
+
PLUGIN_ADMIN_BRAND_NAME: `${settings.storeName} – HSZRDM Commerce`,
|
|
324
325
|
ORDER_EMAIL: settings.orderEmail,
|
|
325
326
|
SUPPORT_EMAIL: settings.supportEmail,
|
|
326
327
|
BILLING_EMAIL: settings.billingEmail,
|
|
@@ -373,7 +374,7 @@ function writeMetadata(root, settings) {
|
|
|
373
374
|
}
|
|
374
375
|
|
|
375
376
|
function createAdminUser(root, settings) {
|
|
376
|
-
console.log("\nElső
|
|
377
|
+
console.log("\nElső HSZRDM Commerce admin felhasználó létrehozása...")
|
|
377
378
|
run(
|
|
378
379
|
"npm",
|
|
379
380
|
["exec", "--workspace", "backend", "--", "medusa", "user", "-e", settings.adminEmail, "-p", settings.adminPassword],
|
|
@@ -479,7 +480,7 @@ function setEnvValue(source, key, value) {
|
|
|
479
480
|
const line = `${key}=${String(value)}`
|
|
480
481
|
const pattern = new RegExp(`^${escapeRegExp(key)}=.*$`, "m")
|
|
481
482
|
if (pattern.test(source)) return source.replace(pattern, line)
|
|
482
|
-
return `${source.replace(
|
|
483
|
+
return `${source.replace(/\s*$/, "")}\n${line}\n`
|
|
483
484
|
}
|
|
484
485
|
|
|
485
486
|
function escapeRegExp(value) {
|
|
@@ -581,5 +582,5 @@ function bool(value) {
|
|
|
581
582
|
}
|
|
582
583
|
|
|
583
584
|
function printHelp() {
|
|
584
|
-
console.log(`HSZRDM Commerce project generator\n\nHasználat:\n npx @hszrdm/create-commerce <project-name> [opciók]\n\nFő opciók:\n --name <név>\n --slug <slug>\n --locale hu-HU\n --country HU\n --currency HUF\n --backend-url http://localhost:9000\n --storefront-url http://localhost:3000\n --admin-email <email>\n --admin-password <password>\n --database-url postgres://...\n --redis-url redis://...\n --postgres-port <port>\n --redis-port <port>\n --core-version 1.0.
|
|
585
|
+
console.log(`HSZRDM Commerce project generator\n\nHasználat:\n npx @hszrdm/create-commerce <project-name> [opciók]\n\nFő opciók:\n --name <név>\n --slug <slug>\n --locale hu-HU\n --country HU\n --currency HUF\n --backend-url http://localhost:9000\n --storefront-url http://localhost:3000\n --admin-email <email>\n --admin-password <password>\n --database-url postgres://...\n --redis-url redis://...\n --postgres-port <port>\n --redis-port <port>\n --core-version 1.0.2\n --non-interactive\n --force\n\nInfrastruktúra:\n Ha --database-url és --redis-url meg van adva, a generátor Dockert nem használ.\n Ha nincsenek megadva, Docker Compose a fallback.\n\nFejlesztői kapcsolók:\n --skip-install\n --skip-docker\n --skip-bootstrap\n --skip-verify\n --skip-git\n\nLokális Core package teszthez:\n HSZRDM_CORE_PACKAGE=/abs/path/to/packages/core npx @hszrdm/create-commerce test-shop\n`)
|
|
585
586
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
|
-
#
|
|
2
|
+
# HSZRDM COMMERCE - environment
|
|
3
3
|
# -----------------------------------------------------------------------------
|
|
4
4
|
# APP_ENV is optional. Empty/unset means the Core follows NODE_ENV automatically.
|
|
5
5
|
# Use an explicit override only when you intentionally need it.
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
# -----------------------------------------------------------------------------
|
|
13
13
|
# Runtime / infrastructure
|
|
14
14
|
# -----------------------------------------------------------------------------
|
|
15
|
-
DATABASE_URL=postgres://postgres:postgres@localhost:5432/
|
|
15
|
+
DATABASE_URL=postgres://postgres:postgres@localhost:5432/hszrdm_commerce
|
|
16
16
|
REDIS_URL=redis://localhost:6379
|
|
17
17
|
MEDUSA_BACKEND_URL=http://localhost:9000
|
|
18
18
|
STOREFRONT_URL=http://localhost:3000
|
|
19
19
|
MEDUSA_ADMIN_PATH=/app
|
|
20
20
|
|
|
21
21
|
# Local development can leave this empty. Production requires an absolute,
|
|
22
|
-
# durable path, for example /var/lib/
|
|
22
|
+
# durable path, for example /var/lib/hszrdm-commerce/uploads.
|
|
23
23
|
FILE_UPLOAD_DIR=
|
|
24
24
|
RELEASE_SHA=development
|
|
25
25
|
|
|
@@ -52,7 +52,11 @@ STORE_SLUG=example-store
|
|
|
52
52
|
STORE_LOCALE=hu-HU
|
|
53
53
|
STORE_DEFAULT_CURRENCY=HUF
|
|
54
54
|
STORE_DEFAULT_COUNTRY=HU
|
|
55
|
-
|
|
55
|
+
# Direct/reference admin customization fallback.
|
|
56
|
+
VITE_ADMIN_BRAND_NAME=HSZRDM Commerce
|
|
57
|
+
# @hszrdm/core is a Medusa plugin, so plugin admin environment variables are
|
|
58
|
+
# provided by the host application with the PLUGIN_ prefix.
|
|
59
|
+
PLUGIN_ADMIN_BRAND_NAME=HSZRDM Commerce
|
|
56
60
|
|
|
57
61
|
ORDER_EMAIL=orders@example.com
|
|
58
62
|
SUPPORT_EMAIL=support@example.com
|
|
@@ -104,7 +108,7 @@ SEO_ROBOTS_DISALLOW=
|
|
|
104
108
|
# External integrations
|
|
105
109
|
# -----------------------------------------------------------------------------
|
|
106
110
|
# Do NOT copy every provider secret into the main .env.
|
|
107
|
-
# Configure integrations in
|
|
111
|
+
# Configure integrations in HSZRDM Commerce Admin: Settings -> Integrációk.
|
|
108
112
|
#
|
|
109
113
|
# Legacy/bootstrap/fallback variable reference:
|
|
110
114
|
# apps/backend/.env.integrations.example
|
|
@@ -46,7 +46,7 @@ export default async function RootLayout({ children }: Readonly<{ children: Reac
|
|
|
46
46
|
<main className="shell main">{children}</main>
|
|
47
47
|
<footer className="footer">
|
|
48
48
|
<div className="shell footer-inner">
|
|
49
|
-
<div><strong>{config.store.name}</strong><p className="muted small">
|
|
49
|
+
<div><strong>{config.store.name}</strong><p className="muted small">Powered by HSZRDM Commerce</p></div>
|
|
50
50
|
<nav className="footer-nav"><Link href="/legal">Jogi dokumentumok</Link><Link href="/account">Fiókom</Link><Link href={`/${config.seo.default_country_code}/products`}>Termékek</Link></nav>
|
|
51
51
|
</div>
|
|
52
52
|
</footer>
|