Skip to content

Commit 3d2a3e9

Browse files
dxllivcursoragent
andcommitted
feat: align app-debug with 3.4 layout and fix CI/Pages workflows
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ca4269e commit 3d2a3e9

13 files changed

Lines changed: 203 additions & 239 deletions

File tree

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ci-${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
validate-and-build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout OWD client (workspace deps)
20+
uses: actions/checkout@v4
21+
with:
22+
repository: owdproject/client
23+
path: client
24+
submodules: recursive
25+
26+
- name: Checkout kit-tailwind
27+
uses: actions/checkout@v4
28+
with:
29+
repository: owdproject/kit-tailwind
30+
path: client/packages/kit-tailwind
31+
32+
- name: Checkout kit-primevue
33+
uses: actions/checkout@v4
34+
with:
35+
repository: owdproject/kit-primevue
36+
path: client/packages/kit-primevue
37+
38+
- name: Checkout module-fs
39+
uses: actions/checkout@v4
40+
with:
41+
repository: owdproject/module-fs
42+
path: client/packages/module-fs
43+
44+
- name: Checkout theme-nova
45+
uses: actions/checkout@v4
46+
with:
47+
repository: owdproject/theme-nova
48+
path: client/themes/theme-nova
49+
50+
- name: Overlay this app-debug repo
51+
uses: actions/checkout@v4
52+
with:
53+
path: client/apps/app-debug
54+
55+
- uses: actions/setup-node@v4
56+
with:
57+
node-version: 22
58+
59+
- run: npm i -g --force corepack@latest && corepack enable
60+
61+
- name: Install monorepo dependencies
62+
working-directory: client
63+
run: pnpm install --no-frozen-lockfile
64+
65+
- name: Prepare module and playground
66+
working-directory: client/apps/app-debug
67+
run: pnpm run dev:prepare
68+
69+
- name: Validate module layout
70+
working-directory: client/apps/app-debug
71+
run: pnpm run validate
72+
73+
- name: Generate static playground
74+
working-directory: client/apps/app-debug
75+
run: pnpm run dev:generate
76+
env:
77+
NUXT_APP_BASE_URL: /app-debug/

.github/workflows/pages.yml

Lines changed: 65 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,92 @@
11
name: Deploy playground to GitHub Pages
2+
23
on:
34
push:
4-
branches: [main]
5+
branches:
6+
- main
57
workflow_dispatch:
8+
69
permissions:
710
contents: read
811
pages: write
912
id-token: write
13+
1014
concurrency:
1115
group: pages
1216
cancel-in-progress: true
17+
1318
jobs:
1419
build:
1520
runs-on: ubuntu-latest
1621
steps:
17-
- uses: actions/checkout@v6
18-
- uses: actions/setup-node@v6
22+
- name: Checkout OWD client (workspace deps)
23+
uses: actions/checkout@v4
24+
with:
25+
repository: owdproject/client
26+
path: client
27+
submodules: recursive
28+
29+
- name: Checkout kit-tailwind
30+
uses: actions/checkout@v4
31+
with:
32+
repository: owdproject/kit-tailwind
33+
path: client/packages/kit-tailwind
34+
35+
- name: Checkout kit-primevue
36+
uses: actions/checkout@v4
37+
with:
38+
repository: owdproject/kit-primevue
39+
path: client/packages/kit-primevue
40+
41+
- name: Checkout module-fs
42+
uses: actions/checkout@v4
43+
with:
44+
repository: owdproject/module-fs
45+
path: client/packages/module-fs
46+
47+
- name: Checkout theme-nova
48+
uses: actions/checkout@v4
49+
with:
50+
repository: owdproject/theme-nova
51+
path: client/themes/theme-nova
52+
53+
- name: Overlay this app-debug repo
54+
uses: actions/checkout@v4
55+
with:
56+
path: client/apps/app-debug
57+
58+
- uses: actions/setup-node@v4
1959
with:
2060
node-version: 22
61+
2162
- run: npm i -g --force corepack@latest && corepack enable
22-
- run: npx nypm@latest i
23-
- run: npm run dev:prepare
24-
- run: npm run dev:generate
63+
64+
- name: Install monorepo dependencies
65+
working-directory: client
66+
run: pnpm install --no-frozen-lockfile
67+
68+
- name: Prepare module and playground
69+
working-directory: client/apps/app-debug
70+
run: pnpm run dev:prepare
71+
72+
- name: Generate static playground
73+
working-directory: client/apps/app-debug
74+
run: pnpm run dev:generate
2575
env:
2676
NUXT_APP_BASE_URL: /app-debug/
27-
- uses: actions/upload-pages-artifact@v3
77+
78+
- name: Upload Pages artifact
79+
uses: actions/upload-pages-artifact@v3
2880
with:
29-
path: playground/.output/public
81+
path: client/apps/app-debug/playground/.output/public
82+
3083
deploy:
3184
needs: build
32-
runs-on: ubuntu-latest
3385
environment:
3486
name: github-pages
3587
url: ${{ steps.deployment.outputs.page_url }}
88+
runs-on: ubuntu-latest
3689
steps:
37-
- uses: actions/deploy-pages@v4
90+
- name: Deploy to GitHub Pages
91+
id: deployment
92+
uses: actions/deploy-pages@v4

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"exports": {
1818
".": {
1919
"types": "./dist/types.d.mts",
20+
"development": "./src/module.ts",
2021
"import": "./dist/module.mjs",
2122
"default": "./dist/module.mjs"
2223
}
@@ -44,19 +45,18 @@
4445
"validate": "desktop validate ."
4546
},
4647
"dependencies": {
47-
"@nuxt/kit": "^4.3.0",
48-
"@owdproject/kit-tailwind": "workspace:*",
49-
"@owdproject/kit-primevue": "workspace:*"
48+
"@nuxt/kit": "^4.4.6",
49+
"@owdproject/kit-tailwind": "workspace:*"
50+
},
51+
"peerDependencies": {
52+
"@owdproject/core": "^3.4.0"
5053
},
5154
"devDependencies": {
5255
"@nuxt/module-builder": "^1.0.2",
53-
"@nuxt/schema": "^4.3.0",
56+
"@nuxt/schema": "^4.4.6",
5457
"@owdproject/core": "workspace:*",
5558
"@owdproject/theme-nova": "workspace:*",
56-
"nuxt": "^4.3.0",
57-
"typescript": "~5.9.3"
58-
},
59-
"peerDependencies": {
60-
"@owdproject/core": "^3.4.0"
59+
"nuxt": "^4.4.6",
60+
"typescript": "~6.0.3"
6161
}
6262
}
Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,11 @@
1-
import { nextTick } from 'vue'
21
import { defineNuxtPlugin } from 'nuxt/app'
3-
import { useApplicationManager } from '@owdproject/core/runtime/composables/useApplicationManager'
4-
5-
const APP_ID = 'org.owdproject.debug'
6-
const WINDOW_MODEL = 'main'
72

83
export default defineNuxtPlugin({
94
name: 'app-debug-playground-launch',
105
dependsOn: ['desktop-app-debug-register'],
11-
async setup(nuxtApp) {
12-
if (!import.meta.dev) return
13-
14-
const applicationManager = useApplicationManager()
15-
16-
async function surfaceWindow() {
17-
if (!applicationManager.isAppDefined(APP_ID)) return false
18-
const app = applicationManager.getAppById(APP_ID)!
19-
if (app.storeWindows.$persistedState) {
20-
await app.storeWindows.$persistedState.isReady()
21-
}
22-
app.closeAllWindows()
23-
app.storeWindows.windows = {}
24-
await applicationManager.execAppCommand(APP_ID, "debug")
25-
const window = app.getFirstWindowByModel(WINDOW_MODEL)
26-
if (window) {
27-
window.actions.setActive(true)
28-
window.actions.bringToFront()
29-
}
30-
return Boolean(window)
31-
}
32-
33-
nuxtApp.hook('app:mounted', async () => {
34-
await nextTick()
35-
await surfaceWindow()
36-
})
37-
38-
for (let attempt = 0; attempt < 80; attempt++) {
39-
if (await surfaceWindow()) return
40-
await new Promise((resolve) => setTimeout(resolve, 50))
41-
}
6+
setup(nuxtApp) {
7+
autoStartPlaygroundApps(nuxtApp, [
8+
{ id: 'org.owdproject.debug', entry: 'debug', windowModel: 'main' },
9+
])
4210
},
4311
})

playground/desktop.config.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,27 @@ import { defineDesktopConfig } from '@owdproject/core'
33
export default defineDesktopConfig({
44
theme: '@owdproject/theme-nova',
55
apps: ['@owdproject/app-debug'],
6-
systemBar: { enabled: true, startButton: true },
6+
systemBar: {
7+
enabled: true,
8+
startButton: true,
9+
},
10+
about: {
11+
title: 'Debug (playground)',
12+
subtitle: 'app-debug · theme-nova',
13+
href: 'https://github.com/owdproject/app-debug',
14+
versionText: 'Nuxt Desktop',
15+
icons: [
16+
{
17+
title: 'Open Web Desktop',
18+
name: 'mdi:hexagon-multiple-outline',
19+
size: 24,
20+
},
21+
{
22+
title: 'Nuxt.js',
23+
name: 'simple-icons:nuxt',
24+
size: 25,
25+
style: 'margin-top: -1px',
26+
},
27+
],
28+
},
729
})

playground/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"generate": "nuxt generate"
99
},
1010
"dependencies": {
11-
"@owdproject/core": "workspace:*",
1211
"@owdproject/app-debug": "workspace:*",
13-
"nuxt": "^4.4.4",
14-
"@owdproject/theme-nova": "workspace:*"
12+
"@owdproject/core": "workspace:*",
13+
"@owdproject/theme-nova": "workspace:*",
14+
"nuxt": "^4.4.6"
1515
}
1616
}

project.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "app-debug",
3+
"targets": {
4+
"build": {
5+
"executor": "nx:run-script",
6+
"options": {
7+
"script": "prepack"
8+
}
9+
}
10+
}
11+
}

runtime/app.config.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)