transone-cli 0.5.0 → 0.6.0

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.
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  resolveConfig,
18
18
  startDevServer,
19
19
  targetRegistry
20
- } from "./index-nag8rsrg.js";
20
+ } from "./index-pg5v7h1t.js";
21
21
  import"./index-k1qfvp0y.js";
22
22
  import"./index-yb2wsc7f.js";
23
23
  // src/target/placeholder-target.ts
package/dist/types.d.ts CHANGED
@@ -3,6 +3,8 @@ export type { MpTargetType, TargetType } from './target/types';
3
3
  export { MP_TARGET_TYPES, APP_TARGET_TYPES, isAppTargetType, isMpTargetType, isTargetType, TARGET_TYPES, } from './target/types';
4
4
  /** 原生 App 目标通用配置。 */
5
5
  export interface AppConfig {
6
+ /** 接口请求基础地址(http/https);平台配置可覆盖。 */
7
+ host?: string;
6
8
  appName?: string;
7
9
  bundleId?: string;
8
10
  outDir?: string;
@@ -13,8 +15,10 @@ export interface AppConfig {
13
15
  }
14
16
  /** 按原生 App 平台分组的配置。 */
15
17
  export type AppConfigMap = Partial<Record<AppTargetType, AppConfig>>;
16
- export type UserAppConfig = AppConfig | AppConfigMap;
18
+ export type UserAppConfig = AppConfig | (AppConfigMap & Pick<AppConfig, 'host'>);
17
19
  export interface ResolvedAppConfig {
20
+ /** 接口请求基础地址(http/https);平台配置可覆盖。 */
21
+ host?: string;
18
22
  appName: string;
19
23
  bundleId: string;
20
24
  outDir: string;
@@ -29,6 +33,8 @@ export interface ProxyOptions {
29
33
  }
30
34
  /** 小程序目标端通用配置(--target mp-*)。 */
31
35
  export interface MiniProgramConfig {
36
+ /** 接口请求基础地址(http/https);平台配置可覆盖。 */
37
+ host?: string;
32
38
  /** 小程序 appid;默认 "touristappid"(平台开发工具测试号/占位 ID)。 */
33
39
  appId?: string;
34
40
  /** 小程序产物目录;默认 dist/build/{target}。 */
@@ -53,6 +59,8 @@ export interface MiniProgramConfig {
53
59
  globalData?: Record<string, unknown>;
54
60
  }
55
61
  export interface ResolvedMiniProgramConfig {
62
+ /** 接口请求基础地址(http/https);平台配置可覆盖。 */
63
+ host?: string;
56
64
  appId: string;
57
65
  outDir: string;
58
66
  navigationBarTitleText: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "transone-cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Bun-native multi-target compiler CLI for TransOne applications: 一份 TypeScript 源码,按 Target 静态转换为 Web 与多端小程序原生工程",
5
5
  "type": "module",
6
6
  "exports": {