@gameap/debug 0.2.9 → 0.2.11
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 +2 -2
- package/public/plugins.css +1 -0
- package/public/plugins.js +1 -0
- package/src/gameap-frontend.d.ts +9 -0
- package/src/main.ts +5 -0
- package/src/mocks/handlers.ts +1 -1
- package/vite.config.ts +2 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gameap/debug",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Debug harness for GameAP plugin development with mock API",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@gameap/plugin-sdk": "^0.2.0",
|
|
28
|
-
"@gameap/frontend": "4.1.0-
|
|
28
|
+
"@gameap/frontend": "4.1.0-dev5",
|
|
29
29
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
30
30
|
"@tailwindcss/postcss": "^4.1.0",
|
|
31
31
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Empty plugins CSS */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Empty plugins JS
|
package/src/main.ts
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* allowing plugin testing in a realistic environment.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
// Import frontend styles
|
|
9
|
+
import '@gameap/frontend/style.css'
|
|
10
|
+
|
|
8
11
|
import { startMockServiceWorker, setPluginContent, updateDebugState } from './mocks/browser'
|
|
9
12
|
|
|
10
13
|
// Declare window globals for plugin compatibility
|
|
@@ -15,6 +18,7 @@ declare global {
|
|
|
15
18
|
Pinia: typeof import('pinia')
|
|
16
19
|
axios: typeof import('axios').default
|
|
17
20
|
gameapLang: string
|
|
21
|
+
i18n: Record<string, string>
|
|
18
22
|
gameapDebug: {
|
|
19
23
|
updateDebugState: typeof updateDebugState
|
|
20
24
|
setPluginContent: typeof setPluginContent
|
|
@@ -23,6 +27,7 @@ declare global {
|
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
29
|
|
|
30
|
+
|
|
26
31
|
// Load plugin from dist directory (set via PLUGIN_PATH env var)
|
|
27
32
|
// Using glob imports to handle dynamic file names
|
|
28
33
|
const pluginJsFiles = import.meta.glob('@plugin/plugin.js', { query: '?raw', import: 'default', eager: true })
|
package/src/mocks/handlers.ts
CHANGED
|
@@ -570,7 +570,7 @@ export const handlers = [
|
|
|
570
570
|
|
|
571
571
|
http.get('/api/users/:id/servers', async () => {
|
|
572
572
|
await delay(debugState.networkDelay)
|
|
573
|
-
return HttpResponse.json(
|
|
573
|
+
return HttpResponse.json(mockServersList.map((s: ServerListItem) => ({ id: s.id, name: s.name })))
|
|
574
574
|
}),
|
|
575
575
|
|
|
576
576
|
http.get('/api/users/:id/servers/:serverId/permissions', async () => {
|
package/vite.config.ts
CHANGED
|
@@ -52,14 +52,8 @@ export default defineConfig({
|
|
|
52
52
|
port: 5174,
|
|
53
53
|
open: true,
|
|
54
54
|
fs: {
|
|
55
|
-
// Allow serving files from
|
|
56
|
-
|
|
57
|
-
__dirname,
|
|
58
|
-
resolvePluginPath(),
|
|
59
|
-
// Allow node_modules for npm packages
|
|
60
|
-
resolve(__dirname, 'node_modules'),
|
|
61
|
-
resolve(process.cwd(), 'node_modules'),
|
|
62
|
-
],
|
|
55
|
+
// Allow serving files from anywhere (needed for npm packages)
|
|
56
|
+
strict: false,
|
|
63
57
|
},
|
|
64
58
|
},
|
|
65
59
|
define: {
|