File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ export function createRemoteFileNode(
1212 args : CreateRemoteFileNodeArgs
1313) : Promise < FileSystemNode >
1414
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+
1522export interface CreateFilePathArgs {
1623 node : Node
1724 getNode : Function
@@ -22,7 +29,7 @@ export interface CreateFilePathArgs {
2229export interface CreateRemoteFileNodeArgs {
2330 url : string
2431 store : Store
25- cache : Cache
32+ cache : Cache [ "cache" ]
2633 createNode : Function
2734 createNodeId : Function
2835 parentNodeId ?: string
@@ -36,6 +43,18 @@ export interface CreateRemoteFileNodeArgs {
3643 reporter : object
3744}
3845
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+
3958export interface FileSystemNode extends Node {
4059 absolutePath : string
4160 accessTime : string
Original file line number Diff line number Diff line change @@ -798,7 +798,7 @@ export interface Actions {
798798 createNode ( node : Node , plugin ?: ActionPlugin , options ?: ActionOptions ) : void
799799
800800 /** @see https://www.gatsbyjs.org/docs/actions/#touchNode */
801- touchNode ( node : { nodeId : string ; plugin ?: ActionPlugin } ) : void
801+ touchNode ( node : { nodeId : string } , plugin ?: ActionPlugin ) : void
802802
803803 /** @see https://www.gatsbyjs.org/docs/actions/#createNodeField */
804804 createNodeField (
@@ -862,11 +862,12 @@ export interface Actions {
862862 createRedirect (
863863 redirect : {
864864 fromPath : string
865- isPermanent : boolean
865+ isPermanent ? : boolean
866866 toPath : string
867- redirectInBrowser : boolean
868- force : boolean
869- statusCode : number
867+ redirectInBrowser ?: boolean
868+ force ?: boolean
869+ statusCode ?: number
870+ [ key : string ] : unknown
870871 } ,
871872 plugin ?: ActionPlugin
872873 ) : void
You can’t perform that action at this time.
0 commit comments