@wixc3/app-core
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -114,2 +114,12 @@ import type React from 'react'; | ||
}; | ||
/** | ||
* can be called on the server or in a web worker | ||
* allows the app to call server methods | ||
*/ | ||
callServerMethod?: (options: ICallServerMethodOptions, filePath: string, methodName: string, args: unknown[]) => Promise<unknown>; | ||
/** | ||
* can be called on the server or in a web worker | ||
* allows codux to get the static routes for a given file path ( needed to allow navigation to a dynamic page ) | ||
*/ | ||
getStaticRoutes?: (options: ICallServerMethodOptions, forRouteAtFilePath: string) => Promise<unknown>; | ||
App: React.ComponentType<IReactAppProps<T>>; | ||
@@ -173,2 +183,3 @@ /** | ||
onCaughtError: ErrorReporter; | ||
callServerMethod: (filePath: string, methodName: string, args: unknown[]) => Promise<unknown>; | ||
} | ||
@@ -187,2 +198,6 @@ export type ErrorReporter = (errorBoundry: { | ||
} | ||
export interface ICallServerMethodOptions { | ||
fsApi: FSApi; | ||
importModule: DynamicImport; | ||
} | ||
export interface IGetNewPageInfoOptions<T> { | ||
@@ -189,0 +204,0 @@ fsApi: FSApi; |
{ | ||
"name": "@wixc3/app-core", | ||
"description": "Common types and helpers for building applications", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "exports": { |
@@ -132,2 +132,19 @@ import type React from 'react'; | ||
}; | ||
/** | ||
* can be called on the server or in a web worker | ||
* allows the app to call server methods | ||
*/ | ||
callServerMethod?: ( | ||
options: ICallServerMethodOptions, | ||
filePath: string, | ||
methodName: string, | ||
args: unknown[], | ||
) => Promise<unknown>; | ||
/** | ||
* can be called on the server or in a web worker | ||
* allows codux to get the static routes for a given file path ( needed to allow navigation to a dynamic page ) | ||
*/ | ||
getStaticRoutes?: (options: ICallServerMethodOptions, forRouteAtFilePath: string) => Promise<unknown>; | ||
App: React.ComponentType<IReactAppProps<T>>; | ||
@@ -196,2 +213,3 @@ /** | ||
onCaughtError: ErrorReporter; | ||
callServerMethod: (filePath: string, methodName: string, args: unknown[]) => Promise<unknown>; | ||
} | ||
@@ -214,2 +232,6 @@ | ||
} | ||
export interface ICallServerMethodOptions { | ||
fsApi: FSApi; | ||
importModule: DynamicImport; | ||
} | ||
export interface IGetNewPageInfoOptions<T> { | ||
@@ -216,0 +238,0 @@ fsApi: FSApi; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47423
675