Skip to content

Commit fb8bb9e

Browse files
committed
fix(api): proxy mode now() fallback
1 parent 94fe74e commit fb8bb9e

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

packages/api/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { PluginDescriptor, ExtractSettingsTypes, PluginSettingsItem } from './pl
66

77
export * from './api'
88
export * from './plugin'
9+
export * from './time'
910
export { PluginQueueItem } from './env'
1011

1112
// https://github.com/microsoft/TypeScript/issues/30680#issuecomment-752725353

packages/api/src/proxy.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Context, DevtoolsPluginApi, Hookable } from './api'
22
import { PluginDescriptor } from './plugin'
33
import { HOOK_PLUGIN_SETTINGS_SET } from './const'
4+
import { now } from './time'
45

56
interface QueueItem {
67
method: string
@@ -57,6 +58,9 @@ export class ApiProxy<TTarget extends DevtoolsPluginApi<any> = DevtoolsPluginApi
5758
}
5859
currentSettings = value
5960
},
61+
now () {
62+
return now()
63+
},
6064
}
6165

6266
if (hook) {
File renamed without changes.

packages/app-backend-api/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import {
2121
WithId,
2222
ComponentTreeNode,
2323
ComponentDevtoolsOptions,
24+
now,
2425
} from '@vue/devtools-api'
2526
import { DevtoolsHookable } from './hooks'
2627
import { BackendContext } from './backend-context'
2728
import { Plugin } from './plugin'
2829
import { DevtoolsBackend } from './backend'
2930
import { AppRecord } from './app-record'
30-
import { now } from './time.js'
3131

3232
const pluginOn: DevtoolsHookable[] = []
3333

packages/app-backend-api/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ export * from './backend-context'
55
export * from './global-hook'
66
export * from './hooks'
77
export * from './plugin'
8-
export * from './time'

0 commit comments

Comments
 (0)