@stoker-platform/web-app 0.5.9 → 0.5.10
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/CHANGELOG.md +6 -0
- package/bin/build.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/bin/build.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --no-warnings
|
|
2
2
|
|
|
3
3
|
import { runChildProcess, tryPromise } from "@stoker-platform/node-client"
|
|
4
|
-
import { fileURLToPath } from "url"
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "url"
|
|
5
5
|
import { dirname, join } from "path"
|
|
6
6
|
import { cpSync, existsSync, rmSync, readFileSync, writeFileSync, readdirSync, statSync } from "fs"
|
|
7
7
|
import { readFile, writeFile } from "fs/promises"
|
|
8
|
-
import dotenv from "dotenv"
|
|
9
8
|
|
|
10
9
|
try {
|
|
11
10
|
const __filename = fileURLToPath(import.meta.url)
|
|
@@ -402,7 +401,9 @@ try {
|
|
|
402
401
|
cpSync(join(process.cwd(), "icons", "logo-large.png"), join(__dirname, "..", "src", "assets", "logo-large.png"))
|
|
403
402
|
await runChildProcess("npm", ["run", "generate-pwa-assets"], join(__dirname, ".."))
|
|
404
403
|
|
|
405
|
-
const
|
|
404
|
+
const path = join(process.cwd(), "lib", "main.js")
|
|
405
|
+
const url = pathToFileURL(path).href
|
|
406
|
+
const globalConfigModule = await import(url)
|
|
406
407
|
const globalConfig = globalConfigModule.default("node")
|
|
407
408
|
const appName = await tryPromise(globalConfig.appName)
|
|
408
409
|
const description = await tryPromise(globalConfig.admin?.meta?.description)
|