fix ci
Publish to npm / publish (push) Failing after 12s

This commit is contained in:
2026-04-08 01:33:23 +08:00
parent e91ddd36bf
commit b6d5a5dbe1
7 changed files with 68 additions and 24 deletions
+2 -9
View File
@@ -11,8 +11,6 @@
*/
import {
AppVersion,
SimApiVersion,
type SimApiVersions,
type SimApiAuthConfig,
type SimApiApiConfig,
@@ -20,7 +18,6 @@ import {
type SimApiBaseResponse,
} from './types'
export { SimApiVersion, AppVersion } from './types'
export type {
SimApiVersions,
SimApiAuthConfig,
@@ -29,6 +26,8 @@ export type {
SimApiBaseResponse,
} from './types'
declare const AppVersion: string;
declare const SimApiVersion: string;
// ── Helper: Fetch with Timeout ────────────────────────────────────────
function fetchWithTimeout(
@@ -120,9 +119,6 @@ export class SimApiCore {
if (config.debug !== undefined) {
this.debug = config.debug
}
if (config.uiAppVersion !== undefined) {
this.uiAppVersion = config.uiAppVersion
}
if (config.endpoints) {
this.api.endpoints = { ...this.api.endpoints, ...config.endpoints }
}
@@ -135,9 +131,6 @@ export class SimApiCore {
if (options.debug !== undefined) {
this.debug = options.debug
}
if (options.uiAppVersion !== undefined) {
this.uiAppVersion = options.uiAppVersion
}
if (options.auth) {
this.auth = { ...this.auth, ...options.auth }
}
+1 -5
View File
@@ -2,10 +2,6 @@
* SimApi 类型定义
*/
// 版本号占位符,构建时由 GitHub Action 替换
export const SimApiVersion = '0.0.0-version-placeholder'
export const AppVersion = '0.0.0-version-placeholder'
/** 版本信息 */
export interface SimApiVersions {
uiApp: string
@@ -56,7 +52,7 @@ export interface SimApiApiConfig {
/** SimApi 完整配置 */
export interface SimApiOptions {
debug?: boolean
/** UI 应用版本,如果不指定则使用库内置的占位符版本 */
/** UI 应用版本,如果不指定则使用库内置的版本 */
uiAppVersion?: string
auth?: Partial<SimApiAuthConfig>
api?: Partial<SimApiApiConfig>