Merge pull request #60 from multica-ai/fix/sdk-source-exports

fix(sdk): point exports to source, remove .js suffixes
This commit is contained in:
Naiyuan Qing 2026-02-02 17:01:44 +08:00 committed by GitHub
commit 6b0340480b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 18 deletions

View file

@ -2,14 +2,9 @@
"name": "@multica/sdk",
"version": "0.1.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"private": true,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
".": "./src/index.ts",
"./*": "./src/*.ts"
},
"scripts": {

View file

@ -3,7 +3,7 @@ export {
HelloResponseAction,
type HelloPayload,
type HelloResponsePayload,
} from "./hello.js";
} from "./hello";
export {
RequestAction,
@ -25,6 +25,6 @@ export {
type DeleteAgentResult,
type UpdateGatewayParams,
type UpdateGatewayResult,
} from "./rpc.js";
} from "./rpc";
export { StreamAction, type StreamPayload } from "./stream.js";
export { StreamAction, type StreamPayload } from "./stream";

View file

@ -11,15 +11,15 @@ import type {
DeviceType,
DeviceInfo,
ListDevicesResponse,
} from "./types.js";
import { GatewayEvents } from "./types.js";
} from "./types";
import { GatewayEvents } from "./types";
import {
RequestAction,
ResponseAction,
type RequestPayload,
type ResponsePayload,
isResponseSuccess,
} from "./actions/rpc.js";
} from "./actions/rpc";
interface PendingRequest<T = unknown> {
resolve: (value: T) => void;

View file

@ -1,4 +1,4 @@
export { GatewayClient } from "./client.js";
export { GatewayClient } from "./client";
export {
GatewayEvents,
type DeviceType,
@ -12,7 +12,7 @@ export {
type PingPayload,
type PongResponse,
type ListDevicesResponse,
} from "./types.js";
} from "./types";
// Actions
export * from "./actions/index.js";
export * from "./actions/index";

View file

@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"module": "ESNext",
"moduleResolution": "bundler",
"declaration": true,
"declarationMap": true,
"sourceMap": true,