@screenly/edge-apps 0.0.2 → 0.0.4

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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/scripts/cli.ts +14 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screenly/edge-apps",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "A TypeScript library for interfacing with Screenly Edge Apps API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -77,13 +77,16 @@
77
77
  },
78
78
  "dependencies": {
79
79
  "@photostructure/tz-lookup": "^11.5.0",
80
- "dayjs": "^1.11.19",
81
80
  "@tailwindcss/vite": "^4.2.1",
82
81
  "country-locale-map": "^1.9.12",
82
+ "dayjs": "^1.11.19",
83
+ "jiti": "^2.6.1",
83
84
  "offline-geocode-city": "^1.0.2",
84
85
  "panic-overlay": "^1.0.51",
85
86
  "sharp": "^0.34.5",
86
- "tailwindcss": "^4.2.1"
87
+ "tailwindcss": "^4.2.1",
88
+ "vite": "^7.3.1",
89
+ "yaml": "^2.8.2"
87
90
  },
88
91
  "peerDependencies": {
89
92
  "@playwright/test": "^1.58.0"
@@ -101,12 +104,9 @@
101
104
  "@types/sharp": "^0.32.0",
102
105
  "bun-types": "^1.3.10",
103
106
  "eslint": "^10.0.3",
104
- "jiti": "^2.6.1",
105
107
  "jsdom": "^28.1.0",
106
108
  "prettier": "^3.8.1",
107
109
  "typescript": "^5.9.3",
108
- "typescript-eslint": "^8.57.0",
109
- "vite": "^7.3.1",
110
- "yaml": "^2.8.2"
110
+ "typescript-eslint": "^8.57.0"
111
111
  }
112
112
  }
package/scripts/cli.ts CHANGED
@@ -45,6 +45,16 @@ const commands = {
45
45
  },
46
46
  }
47
47
 
48
+ /**
49
+ * Helper: Resolve a binary from the app's node_modules first, falling back to the library's
50
+ */
51
+ function resolveBin(name: string): string {
52
+ const appBin = path.resolve(process.cwd(), 'node_modules', '.bin', name)
53
+ return fs.existsSync(appBin)
54
+ ? appBin
55
+ : path.resolve(libraryRoot, 'node_modules', '.bin', name)
56
+ }
57
+
48
58
  /**
49
59
  * Helper: Get NODE_PATH with library's node_modules included
50
60
  */
@@ -99,19 +109,14 @@ function spawnWithSignalHandling(
99
109
  */
100
110
  function getVitePaths(): { viteBin: string; configPath: string } {
101
111
  return {
102
- viteBin: path.resolve(libraryRoot, 'node_modules', '.bin', 'vite'),
112
+ viteBin: resolveBin('vite'),
103
113
  configPath: path.resolve(libraryRoot, 'vite.config.ts'),
104
114
  }
105
115
  }
106
116
 
107
117
  async function lintCommand(args: string[]) {
108
118
  try {
109
- const eslintBin = path.resolve(
110
- libraryRoot,
111
- 'node_modules',
112
- '.bin',
113
- 'eslint',
114
- )
119
+ const eslintBin = resolveBin('eslint')
115
120
 
116
121
  const eslintArgs = [
117
122
  '--config',
@@ -181,7 +186,7 @@ async function buildDevCommand(args: string[]) {
181
186
 
182
187
  async function typeCheckCommand(args: string[]) {
183
188
  try {
184
- const tscBin = path.resolve(libraryRoot, 'node_modules', '.bin', 'tsc')
189
+ const tscBin = resolveBin('tsc')
185
190
 
186
191
  const tscArgs = [
187
192
  '--noEmit',
@@ -215,12 +220,7 @@ async function convertPngsToWebP(screenshotsDir: string): Promise<void> {
215
220
 
216
221
  async function screenshotsCommand(_args: string[]) {
217
222
  try {
218
- const playwrightBin = path.resolve(
219
- process.cwd(),
220
- 'node_modules',
221
- '.bin',
222
- 'playwright',
223
- )
223
+ const playwrightBin = resolveBin('playwright')
224
224
  const playwrightConfig = path.resolve(
225
225
  libraryRoot,
226
226
  'configs',