@milkio/stargate 1.0.0-alpha.50 → 1.0.0-alpha.52

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.
Files changed (2) hide show
  1. package/index.ts +4 -4
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { TSON } from '@southern-aurora/tson'
2
2
 
3
- export interface MilkioStargateOptions {
3
+ export type MilkioStargateOptions = {
4
4
  baseUrl: string | (() => string) | (() => Promise<string>)
5
5
  timeout?: number
6
6
  fetch?: typeof fetch
@@ -9,7 +9,7 @@ export interface MilkioStargateOptions {
9
9
 
10
10
  export type Mixin<T, U> = U & Omit<T, keyof U>
11
11
 
12
- export interface ExecuteOptions {
12
+ export type ExecuteOptions = {
13
13
  params?: Record<any, any>
14
14
  headers?: Record<string, string>
15
15
  timeout?: number
@@ -17,7 +17,7 @@ export interface ExecuteOptions {
17
17
  baseUrl?: string | (() => string) | (() => Promise<string>)
18
18
  }
19
19
 
20
- export interface ExecuteResultsOption { executeId: string }
20
+ export type ExecuteResultsOption = { executeId: string }
21
21
 
22
22
  export type Ping =
23
23
  | [
@@ -40,7 +40,7 @@ export async function createStargate<Generated extends { routeSchema: any, rejec
40
40
  const $fetch = stargateOptions.fetch ?? fetch
41
41
  const $abort = stargateOptions.abort ?? AbortController
42
42
 
43
- interface StargateEvents {
43
+ type StargateEvents = {
44
44
  'milkio:executeBefore': { path: string, options: Mixin<ExecuteOptions, { headers: Record<string, string>, baseUrl: string }> }
45
45
  'milkio:fetchBefore': { path: string, options: Mixin<ExecuteOptions, { headers: Record<string, string>, baseUrl: string }>, body: string }
46
46
  'milkio:executeError': {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@milkio/stargate",
3
3
  "type": "module",
4
- "version": "1.0.0-alpha.50",
4
+ "version": "1.0.0-alpha.52",
5
5
  "module": "index.ts",
6
6
  "dependencies": {
7
7
  "@southern-aurora/tson": "^2.0.2"