File tree 2 files changed +26
-6
lines changed
2 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ export function createRemoteFileNode(
12
12
args : CreateRemoteFileNodeArgs
13
13
) : Promise < FileSystemNode >
14
14
15
+ /**
16
+ * @see https://www.gatsbyjs.org/packages/gatsby-source-filesystem/?=files#createfilenodefrombuffer
17
+ */
18
+ export function createFileNodeFromBuffer (
19
+ args : CreateFileNodeFromBufferArgs
20
+ ) : Promise < FileSystemNode >
21
+
15
22
export interface CreateFilePathArgs {
16
23
node : Node
17
24
getNode : Function
@@ -22,7 +29,7 @@ export interface CreateFilePathArgs {
22
29
export interface CreateRemoteFileNodeArgs {
23
30
url : string
24
31
store : Store
25
- cache : Cache
32
+ cache : Cache [ "cache" ]
26
33
createNode : Function
27
34
createNodeId : Function
28
35
parentNodeId ?: string
@@ -36,6 +43,18 @@ export interface CreateRemoteFileNodeArgs {
36
43
reporter : object
37
44
}
38
45
46
+ export interface CreateFileNodeFromBufferArgs {
47
+ buffer : Buffer
48
+ store : Store
49
+ cache : Cache [ "cache" ]
50
+ createNode : Function
51
+ createNodeId : Function
52
+ parentNodeId ?: string
53
+ hash ?: string
54
+ ext ?: string
55
+ name ?: string
56
+ }
57
+
39
58
export interface FileSystemNode extends Node {
40
59
absolutePath : string
41
60
accessTime : string
Original file line number Diff line number Diff line change @@ -798,7 +798,7 @@ export interface Actions {
798
798
createNode ( node : Node , plugin ?: ActionPlugin , options ?: ActionOptions ) : void
799
799
800
800
/** @see https://www.gatsbyjs.org/docs/actions/#touchNode */
801
- touchNode ( node : { nodeId : string ; plugin ?: ActionPlugin } ) : void
801
+ touchNode ( node : { nodeId : string } , plugin ?: ActionPlugin ) : void
802
802
803
803
/** @see https://www.gatsbyjs.org/docs/actions/#createNodeField */
804
804
createNodeField (
@@ -862,11 +862,12 @@ export interface Actions {
862
862
createRedirect (
863
863
redirect : {
864
864
fromPath : string
865
- isPermanent : boolean
865
+ isPermanent ? : boolean
866
866
toPath : string
867
- redirectInBrowser : boolean
868
- force : boolean
869
- statusCode : number
867
+ redirectInBrowser ?: boolean
868
+ force ?: boolean
869
+ statusCode ?: number
870
+ [ key : string ] : unknown
870
871
} ,
871
872
plugin ?: ActionPlugin
872
873
) : void
You can’t perform that action at this time.
0 commit comments