@nordcraft/core 1.0.12 → 1.0.14
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.
|
@@ -55,6 +55,7 @@ export declare class ToddleApiV2<Handler> implements ApiRequest {
|
|
|
55
55
|
onFailed?: import("../component/component.types").EventModel | null;
|
|
56
56
|
onMessage?: import("../component/component.types").EventModel | null;
|
|
57
57
|
parserMode: import("./apiTypes").ApiParserMode;
|
|
58
|
+
credentials?: "include" | "same-origin" | "omit";
|
|
58
59
|
} | undefined;
|
|
59
60
|
get redirectRules(): Record<string, {
|
|
60
61
|
formula: Formula;
|
package/dist/api/apiTypes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formulaTypes.js","sourceRoot":"","sources":["../../src/formula/formulaTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formulaTypes.js","sourceRoot":"","sources":["../../src/formula/formulaTypes.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,OAA+B,EACL,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA"}
|
package/package.json
CHANGED
package/src/api/apiTypes.ts
CHANGED
|
@@ -95,6 +95,8 @@ export interface ApiRequest extends ApiBase {
|
|
|
95
95
|
// auto: The response will be handled based on the content type of the response
|
|
96
96
|
// stream: The response will be handled as a stream
|
|
97
97
|
parserMode: ApiParserMode
|
|
98
|
+
// Whether to include credentials (cookies) in the request or not. Default is 'same-origin'
|
|
99
|
+
credentials?: 'include' | 'same-origin' | 'omit'
|
|
98
100
|
}
|
|
99
101
|
// Shared logic for client/server 👇
|
|
100
102
|
// The user could distinguish using an environment
|
|
@@ -20,13 +20,11 @@ export interface ToddleFormula extends BaseFormula {
|
|
|
20
20
|
/**
|
|
21
21
|
* The Handler generic is a string server side, but a function client side
|
|
22
22
|
*/
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
24
23
|
export interface CodeFormula<Handler = string | Function> extends BaseFormula {
|
|
25
24
|
version?: 2 | never
|
|
26
25
|
handler: Handler
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
30
28
|
export type PluginFormula<Handler = string | Function> =
|
|
31
29
|
| ToddleFormula
|
|
32
30
|
| CodeFormula<Handler>
|
|
@@ -35,7 +33,6 @@ export const isToddleFormula = <Handler>(
|
|
|
35
33
|
formula: PluginFormula<Handler>,
|
|
36
34
|
): formula is ToddleFormula => Object.hasOwn(formula, 'formula')
|
|
37
35
|
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
39
36
|
export interface GlobalFormulas<Handler = string | Function> {
|
|
40
37
|
formulas?: Record<string, PluginFormula<Handler>>
|
|
41
38
|
packages?: Partial<
|
package/src/types.ts
CHANGED