@screenly/edge-apps 0.0.12 → 0.0.14
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
2
|
import { createRequire } from 'module'
|
|
3
3
|
import { fileURLToPath } from 'url'
|
|
4
|
+
import { existsSync } from 'fs'
|
|
4
5
|
|
|
5
6
|
const PREVIEW_PORT = 4173
|
|
6
7
|
|
|
@@ -24,7 +25,10 @@ try {
|
|
|
24
25
|
|
|
25
26
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
26
27
|
const libraryRoot = path.dirname(__dirname)
|
|
27
|
-
const
|
|
28
|
+
const appViteBin = path.resolve(process.cwd(), 'node_modules', '.bin', 'vite')
|
|
29
|
+
const viteBin = existsSync(appViteBin)
|
|
30
|
+
? appViteBin
|
|
31
|
+
: path.resolve(libraryRoot, 'node_modules', '.bin', 'vite')
|
|
28
32
|
const viteConfig = path.resolve(libraryRoot, 'vite.config.ts')
|
|
29
33
|
|
|
30
34
|
export default defineConfig({
|
|
@@ -34,8 +38,6 @@ export default defineConfig({
|
|
|
34
38
|
...devices['Desktop Chrome'],
|
|
35
39
|
},
|
|
36
40
|
webServer: {
|
|
37
|
-
// Invoke vite directly so it always runs from the library's node_modules,
|
|
38
|
-
// ensuring packages like tailwindcss resolve correctly regardless of the app.
|
|
39
41
|
command: `"${viteBin}" build --config "${viteConfig}" && "${viteBin}" preview --config "${viteConfig}" --port ${PREVIEW_PORT} --strictPort`,
|
|
40
42
|
cwd: process.cwd(),
|
|
41
43
|
port: PREVIEW_PORT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@screenly/edge-apps",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "A TypeScript library for interfacing with Screenly Edge Apps API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"panic-overlay": "^1.0.51",
|
|
92
92
|
"sharp": "^0.34.5",
|
|
93
93
|
"tailwindcss": "^4.2.1",
|
|
94
|
+
"typescript": "^5.9.3",
|
|
94
95
|
"vite": "^7.3.1",
|
|
95
96
|
"yaml": "^2.8.2"
|
|
96
97
|
},
|
|
@@ -109,7 +110,6 @@
|
|
|
109
110
|
"@types/sharp": "^0.32.0",
|
|
110
111
|
"bun-types": "^1.3.10",
|
|
111
112
|
"jsdom": "^28.1.0",
|
|
112
|
-
"prettier": "^3.8.1"
|
|
113
|
-
"typescript": "^5.9.3"
|
|
113
|
+
"prettier": "^3.8.1"
|
|
114
114
|
}
|
|
115
115
|
}
|
package/scripts/cli.ts
CHANGED
|
@@ -224,9 +224,9 @@ async function screenshotsCommand(_args: string[]) {
|
|
|
224
224
|
const playwrightConfig = path.resolve(
|
|
225
225
|
libraryRoot,
|
|
226
226
|
'configs',
|
|
227
|
-
'playwright.
|
|
227
|
+
'playwright.mts',
|
|
228
228
|
)
|
|
229
|
-
execSync(`
|
|
229
|
+
execSync(`"${playwrightBin}" test --config "${playwrightConfig}"`, {
|
|
230
230
|
stdio: 'inherit',
|
|
231
231
|
cwd: process.cwd(),
|
|
232
232
|
env: {
|