@storyblok/astro 2.0.5 → 2.0.6

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.
@@ -1,23 +0,0 @@
1
- import type {
2
- ErrorPayload,
3
- FullReloadPayload,
4
- PrunePayload,
5
- UpdatePayload,
6
- } from './hmrPayload'
7
-
8
- export interface CustomEventMap {
9
- 'vite:beforeUpdate': UpdatePayload
10
- 'vite:afterUpdate': UpdatePayload
11
- 'vite:beforePrune': PrunePayload
12
- 'vite:beforeFullReload': FullReloadPayload
13
- 'vite:error': ErrorPayload
14
- 'vite:invalidate': InvalidatePayload
15
- }
16
-
17
- export interface InvalidatePayload {
18
- path: string
19
- message: string | undefined
20
- }
21
-
22
- export type InferCustomEventPayload<T extends string> =
23
- T extends keyof CustomEventMap ? CustomEventMap[T] : any
@@ -1,61 +0,0 @@
1
- export type HMRPayload =
2
- | ConnectedPayload
3
- | UpdatePayload
4
- | FullReloadPayload
5
- | CustomPayload
6
- | ErrorPayload
7
- | PrunePayload
8
-
9
- export interface ConnectedPayload {
10
- type: 'connected'
11
- }
12
-
13
- export interface UpdatePayload {
14
- type: 'update'
15
- updates: Update[]
16
- }
17
-
18
- export interface Update {
19
- type: 'js-update' | 'css-update'
20
- path: string
21
- acceptedPath: string
22
- timestamp: number
23
- /**
24
- * @experimental internal
25
- */
26
- explicitImportRequired?: boolean | undefined
27
- }
28
-
29
- export interface PrunePayload {
30
- type: 'prune'
31
- paths: string[]
32
- }
33
-
34
- export interface FullReloadPayload {
35
- type: 'full-reload'
36
- path?: string
37
- }
38
-
39
- export interface CustomPayload {
40
- type: 'custom'
41
- event: string
42
- data?: any
43
- }
44
-
45
- export interface ErrorPayload {
46
- type: 'error'
47
- err: {
48
- [name: string]: any
49
- message: string
50
- stack: string
51
- id?: string
52
- frame?: string
53
- plugin?: string
54
- pluginCode?: string
55
- loc?: {
56
- file?: string
57
- line: number
58
- column: number
59
- }
60
- }
61
- }
@@ -1,32 +0,0 @@
1
- import type { InferCustomEventPayload } from './customEvent'
2
-
3
- export type ModuleNamespace = Record<string, any> & {
4
- [Symbol.toStringTag]: 'Module'
5
- }
6
-
7
- export interface ViteHotContext {
8
- readonly data: any
9
-
10
- accept(): void
11
- accept(cb: (mod: ModuleNamespace | undefined) => void): void
12
- accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void
13
- accept(
14
- deps: readonly string[],
15
- cb: (mods: Array<ModuleNamespace | undefined>) => void,
16
- ): void
17
-
18
- acceptExports(
19
- exportNames: string | readonly string[],
20
- cb?: (mod: ModuleNamespace | undefined) => void,
21
- ): void
22
-
23
- dispose(cb: (data: any) => void): void
24
- prune(cb: (data: any) => void): void
25
- invalidate(message?: string): void
26
-
27
- on<T extends string>(
28
- event: T,
29
- cb: (payload: InferCustomEventPayload<T>) => void,
30
- ): void
31
- send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
32
- }
@@ -1,97 +0,0 @@
1
- export interface ImportGlobOptions<
2
- Eager extends boolean,
3
- AsType extends string,
4
- > {
5
- /**
6
- * Import type for the import url.
7
- */
8
- as?: AsType
9
- /**
10
- * Import as static or dynamic
11
- *
12
- * @default false
13
- */
14
- eager?: Eager
15
- /**
16
- * Import only the specific named export. Set to `default` to import the default export.
17
- */
18
- import?: string
19
- /**
20
- * Custom queries
21
- */
22
- query?: string | Record<string, string | number | boolean>
23
- /**
24
- * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
25
- *
26
- * @default false
27
- */
28
- exhaustive?: boolean
29
- }
30
-
31
- export type GeneralImportGlobOptions = ImportGlobOptions<boolean, string>
32
-
33
- export interface KnownAsTypeMap {
34
- raw: string
35
- url: string
36
- worker: Worker
37
- }
38
-
39
- export interface ImportGlobFunction {
40
- /**
41
- * Import a list of files with a glob pattern.
42
- *
43
- * Overload 1: No generic provided, infer the type from `eager` and `as`
44
- */
45
- <
46
- Eager extends boolean,
47
- As extends string,
48
- T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
49
- >(
50
- glob: string | string[],
51
- options?: ImportGlobOptions<Eager, As>,
52
- ): (Eager extends true ? true : false) extends true
53
- ? Record<string, T>
54
- : Record<string, () => Promise<T>>
55
- /**
56
- * Import a list of files with a glob pattern.
57
- *
58
- * Overload 2: Module generic provided, infer the type from `eager: false`
59
- */
60
- <M>(
61
- glob: string | string[],
62
- options?: ImportGlobOptions<false, string>,
63
- ): Record<string, () => Promise<M>>
64
- /**
65
- * Import a list of files with a glob pattern.
66
- *
67
- * Overload 3: Module generic provided, infer the type from `eager: true`
68
- */
69
- <M>(
70
- glob: string | string[],
71
- options: ImportGlobOptions<true, string>,
72
- ): Record<string, M>
73
- }
74
-
75
- export interface ImportGlobEagerFunction {
76
- /**
77
- * Eagerly import a list of files with a glob pattern.
78
- *
79
- * Overload 1: No generic provided, infer the type from `as`
80
- */
81
- <
82
- As extends string,
83
- T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
84
- >(
85
- glob: string | string[],
86
- options?: Omit<ImportGlobOptions<boolean, As>, 'eager'>,
87
- ): Record<string, T>
88
- /**
89
- * Eagerly import a list of files with a glob pattern.
90
- *
91
- * Overload 2: Module generic provided
92
- */
93
- <M>(
94
- glob: string | string[],
95
- options?: Omit<ImportGlobOptions<boolean, string>, 'eager'>,
96
- ): Record<string, M>
97
- }
@@ -1,28 +0,0 @@
1
- // This file is an augmentation to the built-in ImportMeta interface
2
- // Thus cannot contain any top-level imports
3
- // <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
4
-
5
- /* eslint-disable @typescript-eslint/consistent-type-imports */
6
-
7
- interface ImportMetaEnv {
8
- [key: string]: any
9
- BASE_URL: string
10
- MODE: string
11
- DEV: boolean
12
- PROD: boolean
13
- SSR: boolean
14
- }
15
-
16
- interface ImportMeta {
17
- url: string
18
-
19
- readonly hot?: import('./hot').ViteHotContext
20
-
21
- readonly env: ImportMetaEnv
22
-
23
- glob: import('./importGlob').ImportGlobFunction
24
- /**
25
- * @deprecated Use `import.meta.glob('*', { eager: true })` instead
26
- */
27
- globEager: import('./importGlob').ImportGlobEagerFunction
28
- }