@modern-js/bff-core 3.9.0 → 3.9.1

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.
@@ -1,5 +1,5 @@
1
1
  import 'reflect-metadata';
2
- import type { ApiRunner, ArrayToObject, ExtractInputType, ExtractOuputType, MaybeAsync, Operator } from './types';
2
+ import type { ApiRunner, ArrayToObject, ExtractInputType, ExtractOuputType, MaybeAsync, Operator } from './types.js';
3
3
  export declare function Api<Operators extends Operator<any, any>[], Res extends MaybeAsync<any>>(...args: [
4
4
  ...operators: Operators,
5
5
  handler: (arg: ArrayToObject<ExtractOuputType<Operators>>) => Res
@@ -1,5 +1,5 @@
1
1
  import type { HttpMethodDecider } from '@modern-js/types';
2
- import { type Result } from './result';
2
+ import { type Result } from './result.js';
3
3
  export type GenClientResult = Result<string>;
4
4
  export type GenClientOptions = {
5
5
  resourcePath: string;
@@ -1 +1 @@
1
- export * from './generateClient';
1
+ export * from './generateClient.js';
@@ -1,8 +1,8 @@
1
- export { Api } from './api';
2
- export { HttpError, ValidationError } from './errors/http';
3
- export * from './router';
4
- export * from './types';
5
- export * from './client';
6
- export * from './operators/http';
7
- export { getRelativeRuntimePath, HANDLER_WITH_META, isWithMetaHandler, INPUT_PARAMS_DECIDER, isInputParamsDeciderHandler, createStorage, registerPaths, } from './utils';
8
- export type * from './compatible';
1
+ export { Api } from './api.js';
2
+ export { HttpError, ValidationError } from './errors/http.js';
3
+ export * from './router/index.js';
4
+ export * from './types.js';
5
+ export * from './client/index.js';
6
+ export * from './operators/http.js';
7
+ export { getRelativeRuntimePath, HANDLER_WITH_META, isWithMetaHandler, INPUT_PARAMS_DECIDER, isInputParamsDeciderHandler, createStorage, registerPaths, } from './utils/index.js';
8
+ export type * from './compatible.js';
@@ -1,5 +1,5 @@
1
1
  import type { z } from 'zod';
2
- import { HttpMethod, type Operator, ResponseMetaType } from '../types';
2
+ import { HttpMethod, type Operator, ResponseMetaType } from '../types.js';
3
3
  export interface ResponseMeta {
4
4
  type: ResponseMetaType;
5
5
  value: unknown;
@@ -1,9 +1,9 @@
1
1
  import 'reflect-metadata';
2
2
  import type { HttpMethodDecider } from '@modern-js/types';
3
- import { HttpMethod } from '../types';
4
- import type { APIHandlerInfo, ApiHandler } from './types';
5
- export * from './types';
6
- export * from './constants';
3
+ import { HttpMethod } from '../types.js';
4
+ import type { APIHandlerInfo, ApiHandler } from './types.js';
5
+ export * from './types.js';
6
+ export * from './constants.js';
7
7
  export declare class ApiRouter {
8
8
  private appDir?;
9
9
  private apiDir;
@@ -1,4 +1,4 @@
1
- import type { HttpMethod } from '../types';
1
+ import type { HttpMethod } from '../types.js';
2
2
  export type ModuleInfo = {
3
3
  filename: string;
4
4
  module: HandlerModule;
@@ -1,4 +1,4 @@
1
- import type { APIHandlerInfo } from './types';
1
+ import type { APIHandlerInfo } from './types.js';
2
2
  type MaybeAsync<I> = I | Promise<I>;
3
3
  export type NormalHandler = (...args: any[]) => any;
4
4
  export type Handler<I, O> = (input: I) => MaybeAsync<O>;
@@ -1,5 +1,5 @@
1
- export * from './storage';
2
- export * from './alias';
3
- export { debug } from './debug';
4
- export * from './meta';
5
- export * from './validate';
1
+ export * from './storage.js';
2
+ export * from './alias.js';
3
+ export { debug } from './debug.js';
4
+ export * from './meta.js';
5
+ export * from './validate.js';
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.9.0",
18
+ "version": "3.9.1",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "main": "./dist/cjs/index.js",
21
21
  "exports": {
@@ -33,10 +33,10 @@
33
33
  "koa-compose": "^4.1.0",
34
34
  "reflect-metadata": "^0.2.2",
35
35
  "type-fest": "2.19.0",
36
- "@modern-js/utils": "3.9.0"
36
+ "@modern-js/utils": "3.9.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@rslib/core": "0.23.2",
39
+ "@rslib/core": "1.0.0",
40
40
  "@types/koa-compose": "^3.2.9",
41
41
  "@types/node": "^20",
42
42
  "ts-node": "^10.9.2",
@@ -44,7 +44,7 @@
44
44
  "typescript": "^5",
45
45
  "zod": "^3.25.76",
46
46
  "@modern-js/rslib": "2.68.10",
47
- "@modern-js/types": "3.9.0",
47
+ "@modern-js/types": "3.9.1",
48
48
  "@scripts/rstest-config": "2.66.0"
49
49
  },
50
50
  "peerDependencies": {