feat: add mock adapter data for ArkTS shell demo flow
This commit is contained in:
1 parent
7fb4e6117a
commit
04cb1178dd
6 files changed
+100
-11
No files matched your search
@@ -8,6 +8,19 @@ export interface NativeInstalledAppDTO {
|
||||
|
||||
export class NativeAppAdapter {
|
||||
async listInstalledApps(): Promise<NativeInstalledAppDTO[]> {
|
||||
return []
|
||||
return [
|
||||
{
|
||||
appId: 'demo.app.001',
|
||||
name: 'Demo MRP App',
|
||||
version: '1.0.0',
|
||||
runnable: true
|
||||
},
|
||||
{
|
||||
appId: 'demo.app.002',
|
||||
name: 'Broken Sample',
|
||||
version: '0.9.1',
|
||||
runnable: false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,19 @@ export interface NativePackagePreviewDTO {
|
||||
|
||||
export class NativeImportAdapter {
|
||||
async pickFile(): Promise<string | null> {
|
||||
return null
|
||||
return 'file://mock/demo.mrp'
|
||||
}
|
||||
|
||||
async inspectPackage(_fileUri: string): Promise<NativePackagePreviewDTO> {
|
||||
return { name: '', valid: false }
|
||||
return {
|
||||
name: 'Imported Demo App',
|
||||
version: '1.0.0',
|
||||
size: 204800,
|
||||
valid: true
|
||||
}
|
||||
}
|
||||
|
||||
async importPackage(_fileUri: string): Promise<{ appId: string }> {
|
||||
return { appId: '' }
|
||||
return { appId: 'demo.imported.001' }
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,21 @@
|
||||
export class NativeRuntimeAdapter {
|
||||
async startSession(_appId: string): Promise<void> {}
|
||||
async restartSession(_appId: string): Promise<void> {}
|
||||
async stopSession(): Promise<void> {}
|
||||
async notifyPageShow(): Promise<void> {}
|
||||
async notifyPageHide(): Promise<void> {}
|
||||
async startSession(_appId: string): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
async restartSession(_appId: string): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
async stopSession(): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
async notifyPageShow(): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
async notifyPageHide(): Promise<void> {
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user