transone-cli 0.3.0 → 0.4.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.
@@ -1,4 +1,7 @@
1
1
  // @bun
2
+ import {
3
+ loadTypescript
4
+ } from "./index-k1qfvp0y.js";
2
5
  import {
3
6
  __require
4
7
  } from "./index-yb2wsc7f.js";
@@ -9,6 +12,7 @@ var TARGET_TYPES = [
9
12
  "mp-weixin",
10
13
  "mp-alipay",
11
14
  "mp-bytedance",
15
+ "mp-xiaohongshu",
12
16
  "app-ios",
13
17
  "app-android",
14
18
  "app-harmony"
@@ -19,8 +23,17 @@ function isTargetType(value) {
19
23
  var MP_TARGET_TYPES = [
20
24
  "mp-weixin",
21
25
  "mp-alipay",
22
- "mp-bytedance"
26
+ "mp-bytedance",
27
+ "mp-xiaohongshu"
28
+ ];
29
+ var APP_TARGET_TYPES = [
30
+ "app-ios",
31
+ "app-android",
32
+ "app-harmony"
23
33
  ];
34
+ function isAppTargetType(value) {
35
+ return typeof value === "string" && APP_TARGET_TYPES.includes(value);
36
+ }
24
37
  function isMpTargetType(value) {
25
38
  return typeof value === "string" && MP_TARGET_TYPES.includes(value);
26
39
  }
@@ -72,7 +85,8 @@ async function resolveConfig(options = {}) {
72
85
  includeEntry: false,
73
86
  allowRoot: true
74
87
  }) : pages;
75
- const mpEnabled = config.mp !== undefined || target === "mp-weixin";
88
+ const mpEnabled = config.mp !== undefined || isMpTargetType(target);
89
+ const appConfig = pickAppConfig(config.app, target);
76
90
  return {
77
91
  root,
78
92
  ...loadedConfig.exists ? { configFile } : {},
@@ -92,13 +106,40 @@ async function resolveConfig(options = {}) {
92
106
  ...config.library ? { library: resolveLibrary(root, config.library) } : {},
93
107
  ...mpEnabled ? {
94
108
  mp: resolveMiniProgram(root, options.mpOutDir, mpConfig ?? {}, mpPages, target)
95
- } : {}
109
+ } : {},
110
+ ...isAppTargetType(target) ? { app: await resolveApp(root, options.outDir, appConfig ?? {}, target, pages) } : {}
111
+ };
112
+ }
113
+ function isAppConfigMap(value) {
114
+ return isRecord(value) && APP_TARGET_TYPES.some((platform) => (platform in value));
115
+ }
116
+ function pickAppConfig(app, target) {
117
+ if (app === undefined) {
118
+ return;
119
+ }
120
+ if (isAppConfigMap(app)) {
121
+ return isAppTargetType(target) ? app[target] : undefined;
122
+ }
123
+ return app;
124
+ }
125
+ async function resolveApp(root, outDirOverride, app, target, fallbackPages) {
126
+ return {
127
+ appName: app.appName ?? "TransOne",
128
+ bundleId: app.bundleId ?? "com.transone.app",
129
+ outDir: resolve(root, outDirOverride ?? app.outDir ?? `dist/build/${target}`),
130
+ minPlatformVersion: app.minPlatformVersion ?? "16.0",
131
+ publicDir: resolve(root, app.publicDir ?? "public"),
132
+ pages: app.pages ? await resolvePages(root, resolve(root, app.pages["/"] ?? "src/main.ts"), app.pages, {
133
+ includeEntry: false,
134
+ allowRoot: true
135
+ }) : fallbackPages
96
136
  };
97
137
  }
98
138
  var MP_DEFAULT_OUT_DIRS = {
99
139
  "mp-weixin": "dist/build/mp-weixin",
100
140
  "mp-alipay": "dist/build/mp-alipay",
101
- "mp-bytedance": "dist/build/mp-bytedance"
141
+ "mp-bytedance": "dist/build/mp-bytedance",
142
+ "mp-xiaohongshu": "dist/build/mp-xiaohongshu"
102
143
  };
103
144
  function isMpConfigMap(value) {
104
145
  return isRecord(value) && MP_TARGET_TYPES.some((platform) => (platform in value));
@@ -154,7 +195,7 @@ function resolveTarget(target) {
154
195
  if (isTargetType(target)) {
155
196
  return target;
156
197
  }
157
- throw new Error(`Unknown build target "${String(target)}". ` + "Available targets: web, mp-weixin, mp-alipay, mp-bytedance, " + "app-ios, app-android, app-harmony.");
198
+ throw new Error(`Unknown build target "${String(target)}". ` + "Available targets: web, mp-weixin, mp-alipay, mp-bytedance, mp-xiaohongshu, " + "app-ios, app-android, app-harmony.");
158
199
  }
159
200
  async function resolvePages(root, entry, pages, options = {}) {
160
201
  const resolved = options.includeEntry === false ? {} : { "/": entry };
@@ -231,7 +272,8 @@ function mergeConfig(...configs) {
231
272
  directoryPages: build?.directoryPages ?? merged.build.directoryPages
232
273
  },
233
274
  library: config.library ?? merged.library,
234
- mp: config.mp ?? merged.mp
275
+ mp: config.mp ?? merged.mp,
276
+ app: config.app ?? merged.app
235
277
  };
236
278
  }, DEFAULT_CONFIG);
237
279
  }
@@ -255,6 +297,36 @@ function validateUserConfig(config) {
255
297
  if (config.mp !== undefined) {
256
298
  validateMpConfig(config.mp);
257
299
  }
300
+ if (config.app !== undefined) {
301
+ validateAppConfig(config.app);
302
+ }
303
+ }
304
+ function validateAppConfig(app) {
305
+ assertRecord(app, "Config app");
306
+ if (isAppConfigMap(app)) {
307
+ const flatKeys = ["appName", "bundleId", "outDir", "minPlatformVersion", "publicDir", "pages"];
308
+ if (flatKeys.some((key) => (key in app))) {
309
+ throw new Error("Config app cannot mix flat fields with platform keys");
310
+ }
311
+ for (const platform of APP_TARGET_TYPES) {
312
+ if (app[platform] !== undefined) {
313
+ validateSingleAppConfig(app[platform], `Config app.${platform}`);
314
+ }
315
+ }
316
+ return;
317
+ }
318
+ validateSingleAppConfig(app, "Config app");
319
+ }
320
+ function validateSingleAppConfig(app, label) {
321
+ assertRecord(app, label);
322
+ for (const key of ["appName", "bundleId", "outDir", "minPlatformVersion", "publicDir"]) {
323
+ if (app[key] !== undefined && typeof app[key] !== "string") {
324
+ throw new Error(`${label}.${key} must be a string`);
325
+ }
326
+ }
327
+ if (app.pages !== undefined) {
328
+ validatePagesConfig(app.pages, `${label}.pages`);
329
+ }
258
330
  }
259
331
  function validateMpConfig(mp) {
260
332
  assertRecord(mp, "Config mp");
@@ -707,6 +779,35 @@ var MP_BYTEDANCE_DIALECT = {
707
779
  usingComponents
708
780
  })
709
781
  };
782
+ var MP_XIAOHONGSHU_DIALECT = {
783
+ id: "mp-xiaohongshu",
784
+ label: "\u5C0F\u7EA2\u4E66\u5C0F\u7A0B\u5E8F\u539F\u751F\u5DE5\u7A0B\uFF08XHSML / CSS / JS \u9759\u6001\u8F6C\u6362\uFF09",
785
+ templateExt: "xhsml",
786
+ styleExt: "css",
787
+ appStyleFile: "app.css",
788
+ directivePrefix: "xhs:",
789
+ bindEvent: (event) => `bind${event}`,
790
+ catchEvent: (event) => `catch${event}`,
791
+ projectConfigFile: "project.config.json",
792
+ buildProjectConfig: (mp, projectName) => ({
793
+ appid: mp.appId,
794
+ projectname: projectName,
795
+ compileType: "miniprogram"
796
+ }),
797
+ windowDefaults: (title) => ({
798
+ navigationBarTitleText: title,
799
+ navigationBarBackgroundColor: "#ffffff",
800
+ navigationBarTextStyle: "black",
801
+ backgroundTextStyle: "light"
802
+ }),
803
+ appJsonExtras: () => ({}),
804
+ sitemap: false,
805
+ componentJson: (usingComponents) => ({
806
+ component: true,
807
+ multipleSlots: true,
808
+ usingComponents
809
+ })
810
+ };
710
811
 
711
812
  // src/target/mp-target.ts
712
813
  class MpTarget {
@@ -724,30 +825,428 @@ class MpTarget {
724
825
  if (!config.mp) {
725
826
  throw new Error("Mini program build requires config.mp\uFF08\u8BF7\u5728 transone.config.ts \u914D\u7F6E mp \u5B57\u6BB5\uFF0C" + "\u5982 appId / pages / outDir\uFF09");
726
827
  }
727
- const { buildMiniProgram } = await import("./build-mp-kcnx989m.js");
828
+ const { buildMiniProgram } = await import("./build-mp-6j38wf4r.js");
728
829
  return buildMiniProgram(config, this.dialect);
729
830
  }
730
831
  }
731
832
  var mpWeixinTarget = new MpTarget(MP_WEIXIN_DIALECT);
732
833
  var mpAlipayTarget = new MpTarget(MP_ALIPAY_DIALECT);
733
834
  var mpBytedanceTarget = new MpTarget(MP_BYTEDANCE_DIALECT);
835
+ var mpXiaohongshuTarget = new MpTarget(MP_XIAOHONGSHU_DIALECT);
734
836
 
735
- // src/target/placeholder-target.ts
736
- class PlaceholderTarget {
737
- type;
738
- label;
739
- plannedMilestone;
740
- constructor(type, label, plannedMilestone) {
741
- this.type = type;
742
- this.label = label;
743
- this.plannedMilestone = plannedMilestone;
837
+ // src/app/build-app.ts
838
+ import { cp, mkdir as mkdir2, rm as rm2, writeFile as writeFile2 } from "fs/promises";
839
+ import { existsSync as existsSync3 } from "fs";
840
+ import { dirname as dirname3, join, resolve as resolve4 } from "path";
841
+
842
+ // src/app/errors.ts
843
+ import { basename } from "path";
844
+ function nativeError(filePath, message) {
845
+ return new Error(`[transone app] ${basename(filePath)}: ${message}`);
846
+ }
847
+
848
+ // src/app/analyze.ts
849
+ import { existsSync as existsSync2, readFileSync } from "fs";
850
+ var CONTAINERS = new Set(["view", "main", "div"]);
851
+ var TEXT = new Set(["text", "span", "p", "h1"]);
852
+ var STYLE_KEYS = new Set(["color", "backgroundColor", "fontSize", "fontWeight", "padding", "margin", "width", "height", "borderRadius", "textAlign"]);
853
+ async function analyzeNativeScreen(entry) {
854
+ if (!existsSync2(entry))
855
+ throw nativeError(entry, "\u6E90\u6587\u4EF6\u4E0D\u5B58\u5728");
856
+ const ts = await loadTypescript();
857
+ const source = ts.createSourceFile(entry, readFileSync(entry, "utf8"), ts.ScriptTarget.Latest, true);
858
+ const component = source.statements.find((s) => ts.isClassDeclaration(s));
859
+ if (!component)
860
+ throw nativeError(entry, "\u672A\u627E\u5230 Component \u7C7B");
861
+ const state = readState(ts, component, entry);
862
+ const actions = new Map;
863
+ for (const member of component.members)
864
+ if (ts.isMethodDeclaration(member) && ts.isIdentifier(member.name)) {
865
+ const action = readAction(ts, member, entry);
866
+ if (action)
867
+ actions.set(member.name.text, action);
868
+ }
869
+ const render = component.members.find((m) => ts.isMethodDeclaration(m) && m.name.getText(source) === "render");
870
+ const value = render?.body?.statements.find(ts.isReturnStatement)?.expression;
871
+ if (!value || !ts.isObjectLiteralExpression(value))
872
+ throw nativeError(entry, "render() \u5FC5\u987B\u8FD4\u56DE\u9759\u6001 VNode \u5BF9\u8C61");
873
+ const root = readNode(ts, value, entry, new Set(state.map((item) => item.key)), actions);
874
+ if (root.kind !== "container")
875
+ throw nativeError(entry, "\u6839\u8282\u70B9\u5FC5\u987B\u662F\u5BB9\u5668\u8282\u70B9");
876
+ return { name: component.name?.text ?? "App", state, root };
877
+ }
878
+ function readState(ts, component, file) {
879
+ const method = component.members.find((m) => ts.isMethodDeclaration(m) && m.name.getText() === "initState");
880
+ const value = method?.body?.statements.find(ts.isReturnStatement)?.expression;
881
+ if (!value)
882
+ return [];
883
+ if (!ts.isObjectLiteralExpression(value))
884
+ throw nativeError(file, "initState() \u5FC5\u987B\u8FD4\u56DE\u5BF9\u8C61\u5B57\u9762\u91CF");
885
+ return value.properties.map((item) => {
886
+ if (!ts.isPropertyAssignment(item) || !ts.isIdentifier(item.name))
887
+ throw nativeError(file, "state \u5FC5\u987B\u4F7F\u7528\u6807\u8BC6\u7B26\u5C5E\u6027");
888
+ const literal = literalValue(ts, item.initializer);
889
+ if (literal === undefined)
890
+ throw nativeError(file, `state.${item.name.text} \u5FC5\u987B\u662F\u5B57\u9762\u91CF`);
891
+ return { key: item.name.text, value: literal };
892
+ });
893
+ }
894
+ function readAction(ts, method, file) {
895
+ const expression = method.body?.statements[0];
896
+ if (!expression || !ts.isExpressionStatement(expression) || !ts.isBinaryExpression(expression.expression))
897
+ return;
898
+ const binary = expression.expression;
899
+ if (!ts.isPropertyAccessExpression(binary.left) || !ts.isPropertyAccessExpression(binary.left.expression) || binary.left.expression.expression.kind !== ts.SyntaxKind.ThisKeyword || binary.left.expression.name.text !== "state")
900
+ return;
901
+ const value = literalValue(ts, binary.right);
902
+ const key = binary.left.name.text;
903
+ if ((binary.operatorToken.kind === ts.SyntaxKind.PlusEqualsToken || binary.operatorToken.kind === ts.SyntaxKind.MinusEqualsToken) && typeof value === "number")
904
+ return { kind: "increment", key, by: binary.operatorToken.kind === ts.SyntaxKind.MinusEqualsToken ? -value : value };
905
+ if (binary.operatorToken.kind === ts.SyntaxKind.EqualsToken && value !== undefined)
906
+ return { kind: "set-literal", key, value };
907
+ throw nativeError(file, `\u65B9\u6CD5 ${method.name.getText()} \u4E0D\u652F\u6301\u539F\u751F\u7F16\u8BD1`);
908
+ }
909
+ function readNode(ts, node, file, state, actions) {
910
+ const tag = stringValue(ts, get(ts, node, "tag"), file, "VNode tag");
911
+ const style = readStyle(ts, get(ts, node, "props"), file);
912
+ const children = get(ts, node, "children");
913
+ const childNodes = children && ts.isArrayLiteralExpression(children) ? [...children.elements].filter(ts.isExpression) : [];
914
+ if (CONTAINERS.has(tag))
915
+ return { kind: "container", children: childNodes.map((child) => {
916
+ if (!ts.isObjectLiteralExpression(child))
917
+ throw nativeError(file, "\u5BB9\u5668 children \u53EA\u652F\u6301\u9759\u6001 VNode");
918
+ return readNode(ts, child, file, state, actions);
919
+ }), ...style ? { style } : {} };
920
+ const parts = childNodes.flatMap((child) => readText(ts, child, file, state));
921
+ if (TEXT.has(tag))
922
+ return { kind: "text", parts, ...style ? { style } : {} };
923
+ if (tag === "button")
924
+ return { kind: "button", parts, action: readClick(ts, get(ts, node, "listeners"), file, actions), ...style ? { style } : {} };
925
+ throw nativeError(file, `\u4E0D\u652F\u6301\u7684\u539F\u751F\u8282\u70B9: ${tag}`);
926
+ }
927
+ function readText(ts, expression, file, state) {
928
+ const value = literalValue(ts, expression);
929
+ if (typeof value !== "string")
930
+ throw nativeError(file, "\u6587\u672C children \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u5B57\u9762\u91CF");
931
+ const result = [];
932
+ const matcher = /{{([^}]+)}}/g;
933
+ let cursor = 0;
934
+ let match;
935
+ while (match = matcher.exec(value)) {
936
+ if (match.index > cursor)
937
+ result.push({ kind: "literal", value: value.slice(cursor, match.index) });
938
+ const key = match[1];
939
+ if (!/^[A-Za-z_$][\w$]*$/.test(key) || !state.has(key))
940
+ throw nativeError(file, "\u53EA\u652F\u6301\u5DF2\u58F0\u660E state \u7684 {{key}} \u7ED1\u5B9A");
941
+ result.push({ kind: "state", key });
942
+ cursor = matcher.lastIndex;
943
+ }
944
+ if (cursor < value.length || result.length === 0)
945
+ result.push({ kind: "literal", value: value.slice(cursor) });
946
+ return result;
947
+ }
948
+ function readClick(ts, listeners, file, actions) {
949
+ if (!listeners || !ts.isObjectLiteralExpression(listeners))
950
+ throw nativeError(file, "button \u5FC5\u987B\u58F0\u660E listeners.click");
951
+ const handler = get(ts, listeners, "click");
952
+ const body = handler && ts.isArrowFunction(handler) ? handler.body : undefined;
953
+ const expression = body && ts.isCallExpression(body) ? body : body && ts.isBlock(body) && ts.isExpressionStatement(body.statements[0]) ? body.statements[0].expression : undefined;
954
+ if (!expression || !ts.isCallExpression(expression) || !ts.isPropertyAccessExpression(expression.expression) || expression.expression.expression.kind !== ts.SyntaxKind.ThisKeyword)
955
+ throw nativeError(file, "click \u53EA\u652F\u6301\u8C03\u7528 this.method()");
956
+ const action = actions.get(expression.expression.name.text);
957
+ if (!action)
958
+ throw nativeError(file, `click \u65B9\u6CD5 ${expression.expression.name.text} \u4E0D\u652F\u6301\u539F\u751F\u7F16\u8BD1`);
959
+ return action;
960
+ }
961
+ function readStyle(ts, props, file) {
962
+ if (!props || !ts.isObjectLiteralExpression(props))
963
+ return;
964
+ const style = get(ts, props, "style");
965
+ if (!style || !ts.isObjectLiteralExpression(style))
966
+ return;
967
+ const out = {};
968
+ for (const item of style.properties) {
969
+ if (!ts.isPropertyAssignment(item) || !ts.isIdentifier(item.name) || !STYLE_KEYS.has(item.name.text))
970
+ throw nativeError(file, "\u4E0D\u652F\u6301\u7684\u539F\u751F\u6837\u5F0F\u5C5E\u6027");
971
+ const value = literalValue(ts, item.initializer);
972
+ const keyword = item.name.text === "color" || item.name.text === "backgroundColor" || item.name.text === "fontWeight" || item.name.text === "textAlign";
973
+ if (keyword && (typeof value === "string" || typeof value === "number")) {
974
+ out[item.name.text] = value;
975
+ continue;
976
+ }
977
+ if (typeof value !== "number" && !(typeof value === "string" && /^\d+(\.\d+)?px$/.test(value)))
978
+ throw nativeError(file, `\u6837\u5F0F ${item.name.text} \u53EA\u652F\u6301\u6570\u5B57\u6216 px`);
979
+ out[item.name.text] = typeof value === "string" ? Number.parseFloat(value) : value;
980
+ }
981
+ return out;
982
+ }
983
+ function get(ts, node, name) {
984
+ const item = node.properties.find((p) => ts.isPropertyAssignment(p) && p.name.getText().replace(/['"]/g, "") === name);
985
+ return item && ts.isPropertyAssignment(item) ? item.initializer : undefined;
986
+ }
987
+ function stringValue(ts, expression, file, label) {
988
+ const value = expression && literalValue(ts, expression);
989
+ if (typeof value !== "string")
990
+ throw nativeError(file, `${label} \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);
991
+ return value;
992
+ }
993
+ function literalValue(ts, value) {
994
+ if (ts.isStringLiteral(value) || ts.isNoSubstitutionTemplateLiteral(value))
995
+ return value.text;
996
+ if (ts.isNumericLiteral(value))
997
+ return Number(value.text);
998
+ if (value.kind === ts.SyntaxKind.TrueKeyword)
999
+ return true;
1000
+ if (value.kind === ts.SyntaxKind.FalseKeyword)
1001
+ return false;
1002
+ return;
1003
+ }
1004
+
1005
+ // src/app/build-app.ts
1006
+ async function buildNativeApp(config, dialect) {
1007
+ if (!config.app)
1008
+ throw new Error("Native app build requires config.app");
1009
+ const entries = Object.values(config.app.pages);
1010
+ if (entries.length !== 1)
1011
+ throw nativeError(config.entry, "\u9996\u671F\u539F\u751F App \u53EA\u652F\u6301\u4E00\u4E2A\u9875\u9762");
1012
+ const screen = await analyzeNativeScreen(entries[0]);
1013
+ const files = dialect.generateProject(screen, config.app);
1014
+ await rm2(config.app.outDir, { recursive: true, force: true });
1015
+ const assetsBuilt = [];
1016
+ for (const [relative3, content] of Object.entries(files).sort(([a], [b]) => a.localeCompare(b))) {
1017
+ const target = join(config.app.outDir, relative3);
1018
+ await mkdir2(dirname3(target), { recursive: true });
1019
+ await writeFile2(target, content, "utf8");
1020
+ assetsBuilt.push(target);
1021
+ }
1022
+ if (existsSync3(config.app.publicDir))
1023
+ await cp(config.app.publicDir, join(config.app.outDir, dialect.resourceDirectory), { recursive: true });
1024
+ return { root: config.root, outDir: resolve4(config.app.outDir), assetsBuilt };
1025
+ }
1026
+
1027
+ // src/target/app-target.ts
1028
+ class AppTarget {
1029
+ dialect;
1030
+ constructor(dialect) {
1031
+ this.dialect = dialect;
1032
+ }
1033
+ get type() {
1034
+ return this.dialect.id;
1035
+ }
1036
+ get label() {
1037
+ return this.dialect.label;
744
1038
  }
745
- async build(_config, _options) {
746
- const available = ["web"].map((target) => `'${target}'`).join(", ");
747
- throw new Error(`Target "${this.type}" (${this.label}) \u5C1A\u672A\u5B9E\u73B0\uFF0C\u9884\u8BA1\u5728 ${this.plannedMilestone} \u843D\u5730\u3002` + `\u5F53\u524D\u53EF\u7528\u76EE\u6807\u7AEF\uFF1A${available}\u3002`);
1039
+ build(config, _options) {
1040
+ return buildNativeApp(config, this.dialect);
748
1041
  }
749
1042
  }
750
1043
 
1044
+ // src/app/dialects.ts
1045
+ function text(parts, language) {
1046
+ if (language === "swift") {
1047
+ const value = parts.map((part) => part.kind === "literal" ? part.value : `\\(${part.key})`).join("");
1048
+ return `"${value.replace(/"/g, "\\\"")}"`;
1049
+ }
1050
+ if (language === "kotlin") {
1051
+ return JSON.stringify(parts.map((part) => part.kind === "literal" ? part.value : `$${part.key}`).join(""));
1052
+ }
1053
+ return parts.map((part) => part.kind === "literal" ? JSON.stringify(part.value) : `this.${part.key}`).join(" + ") || '""';
1054
+ }
1055
+ function action(node, language) {
1056
+ const { action: action2 } = node;
1057
+ const target = language === "ark" ? `this.${action2.key}` : action2.key;
1058
+ return action2.kind === "increment" ? `${target} ${action2.by >= 0 ? "+=" : "-="} ${Math.abs(action2.by)}` : `${target} = ${typeof action2.value === "string" ? JSON.stringify(action2.value) : action2.value}`;
1059
+ }
1060
+ function swiftNode(node, indent = " ") {
1061
+ if (node.kind === "container")
1062
+ return `${indent}VStack {
1063
+ ${node.children.map((child) => swiftNode(child, `${indent} `)).join(`
1064
+ `)}
1065
+ ${indent}}`;
1066
+ if (node.kind === "text")
1067
+ return `${indent}Text(${text(node.parts, "swift")})`;
1068
+ return `${indent}Button(${text(node.parts, "swift")}) { ${action(node, "swift")} }`;
1069
+ }
1070
+ function kotlinNode(node, indent = " ") {
1071
+ if (node.kind === "container")
1072
+ return `${indent}Column {
1073
+ ${node.children.map((child) => kotlinNode(child, `${indent} `)).join(`
1074
+ `)}
1075
+ ${indent}}`;
1076
+ if (node.kind === "text")
1077
+ return `${indent}Text(${text(node.parts, "kotlin")})`;
1078
+ return `${indent}Button(onClick = { ${action(node, "kotlin")} }) { Text(${text(node.parts, "kotlin")}) }`;
1079
+ }
1080
+ function arkNode(node, indent = " ") {
1081
+ if (node.kind === "container")
1082
+ return `${indent}Column() {
1083
+ ${node.children.map((child) => arkNode(child, `${indent} `)).join(`
1084
+ `)}
1085
+ ${indent}}`;
1086
+ if (node.kind === "text")
1087
+ return `${indent}Text(${text(node.parts, "ark")})`;
1088
+ return `${indent}Button(${text(node.parts, "ark")}).onClick(() => { ${action(node, "ark")} })`;
1089
+ }
1090
+ function swiftState(screen) {
1091
+ return screen.state.map((item) => ` @State private var ${item.key}: ${typeof item.value === "number" ? "Int" : typeof item.value === "boolean" ? "Bool" : "String"} = ${JSON.stringify(item.value)}`).join(`
1092
+ `);
1093
+ }
1094
+ function kotlinState(screen) {
1095
+ return screen.state.map((item) => ` var ${item.key} by remember { mutableStateOf(${JSON.stringify(item.value)}) }`).join(`
1096
+ `);
1097
+ }
1098
+ function arkState(screen) {
1099
+ return screen.state.map((item) => ` @State ${item.key}: ${typeof item.value === "number" ? "number" : typeof item.value === "boolean" ? "boolean" : "string"} = ${JSON.stringify(item.value)}`).join(`
1100
+ `);
1101
+ }
1102
+ var IOS_DIALECT = {
1103
+ id: "app-ios",
1104
+ label: "iOS \u539F\u751F App\uFF08SwiftUI\uFF09",
1105
+ resourceDirectory: "TransOneApp/Assets",
1106
+ generateProject(screen, config) {
1107
+ return {
1108
+ "TransOneApp/TransOneApp.swift": `import SwiftUI
1109
+
1110
+ @main struct TransOneApp: App { var body: some Scene { WindowGroup { ContentView() } } }
1111
+ `,
1112
+ "TransOneApp/ContentView.swift": `import SwiftUI
1113
+
1114
+ struct ContentView: View {
1115
+ ${swiftState(screen)}
1116
+ var body: some View {
1117
+ ${swiftNode(screen.root)}
1118
+ }
1119
+ }
1120
+ `,
1121
+ "TransOneApp.xcodeproj/project.pbxproj": xcodeProject(config),
1122
+ "TransOneApp/Assets.xcassets/Contents.json": `{"info":{"author":"xcode","version":1}}
1123
+ `
1124
+ };
1125
+ }
1126
+ };
1127
+ function xcodeProject(config) {
1128
+ const escapedName = config.appName.replace(/"/g, "\\\"");
1129
+ return `// !$*UTF8*$!
1130
+ {
1131
+ archiveVersion = 1;
1132
+ classes = {};
1133
+ objectVersion = 56;
1134
+ objects = {
1135
+
1136
+ /* Begin PBXBuildFile section */
1137
+ A00100000000000000000001 /* TransOneApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00100000000000000000011 /* TransOneApp.swift */; };
1138
+ A00100000000000000000002 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00100000000000000000012 /* ContentView.swift */; };
1139
+ /* End PBXBuildFile section */
1140
+
1141
+ /* Begin PBXFileReference section */
1142
+ A00100000000000000000011 /* TransOneApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransOneApp.swift; sourceTree = "<group>"; };
1143
+ A00100000000000000000012 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
1144
+ A00100000000000000000013 /* TransOneApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TransOneApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
1145
+ /* End PBXFileReference section */
1146
+
1147
+ /* Begin PBXGroup section */
1148
+ A00100000000000000000021 = {isa = PBXGroup; children = (A00100000000000000000022 /* TransOneApp */, A00100000000000000000023 /* Products */, ); sourceTree = "<group>"; };
1149
+ A00100000000000000000022 /* TransOneApp */ = {isa = PBXGroup; children = (A00100000000000000000011 /* TransOneApp.swift */, A00100000000000000000012 /* ContentView.swift */, ); path = TransOneApp; sourceTree = "<group>"; };
1150
+ A00100000000000000000023 /* Products */ = {isa = PBXGroup; children = (A00100000000000000000013 /* TransOneApp.app */, ); name = Products; sourceTree = "<group>"; };
1151
+ /* End PBXGroup section */
1152
+
1153
+ /* Begin PBXNativeTarget section */
1154
+ A00100000000000000000031 /* TransOneApp */ = {isa = PBXNativeTarget; buildConfigurationList = A00100000000000000000041 /* Build configuration list for PBXNativeTarget "TransOneApp" */; buildPhases = (A00100000000000000000032 /* Sources */, A00100000000000000000033 /* Frameworks */, A00100000000000000000034 /* Resources */, ); buildRules = (); dependencies = (); name = TransOneApp; productName = TransOneApp; productReference = A00100000000000000000013 /* TransOneApp.app */; productType = "com.apple.product-type.application"; };
1155
+ /* End PBXNativeTarget section */
1156
+
1157
+ /* Begin PBXProject section */
1158
+ A00100000000000000000051 /* Project object */ = {isa = PBXProject; attributes = { LastUpgradeCheck = 2700; TargetAttributes = { A00100000000000000000031 = { CreatedOnToolsVersion = 27.0; }; }; }; buildConfigurationList = A00100000000000000000052 /* Build configuration list for PBXProject "TransOneApp" */; compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = (en, Base, ); mainGroup = A00100000000000000000021; productRefGroup = A00100000000000000000023; projectDirPath = ""; projectRoot = ""; targets = (A00100000000000000000031 /* TransOneApp */, ); };
1159
+ /* End PBXProject section */
1160
+
1161
+ /* Begin PBXResourcesBuildPhase section */
1162
+ A00100000000000000000034 /* Resources */ = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };
1163
+ /* End PBXResourcesBuildPhase section */
1164
+
1165
+ /* Begin PBXSourcesBuildPhase section */
1166
+ A00100000000000000000032 /* Sources */ = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (A00100000000000000000001 /* TransOneApp.swift in Sources */, A00100000000000000000002 /* ContentView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };
1167
+ /* End PBXSourcesBuildPhase section */
1168
+
1169
+ /* Begin PBXFrameworksBuildPhase section */
1170
+ A00100000000000000000033 /* Frameworks */ = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };
1171
+ /* End PBXFrameworksBuildPhase section */
1172
+
1173
+ /* Begin XCBuildConfiguration section */
1174
+ A00100000000000000000061 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; SWIFT_VERSION = 5.0; }; name = Debug; };
1175
+ A00100000000000000000062 /* Release */ = {isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; SWIFT_VERSION = 5.0; }; name = Release; };
1176
+ A00100000000000000000063 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGNING_ALLOWED = NO; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = ${config.minPlatformVersion}; PRODUCT_BUNDLE_IDENTIFIER = ${config.bundleId}; PRODUCT_NAME = "${escapedName}"; SDKROOT = iphoneos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; };
1177
+ A00100000000000000000064 /* Release */ = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGNING_ALLOWED = NO; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = ${config.minPlatformVersion}; PRODUCT_BUNDLE_IDENTIFIER = ${config.bundleId}; PRODUCT_NAME = "${escapedName}"; SDKROOT = iphoneos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; };
1178
+ /* End XCBuildConfiguration section */
1179
+
1180
+ /* Begin XCConfigurationList section */
1181
+ A00100000000000000000041 /* Build configuration list for PBXNativeTarget "TransOneApp" */ = {isa = XCConfigurationList; buildConfigurations = (A00100000000000000000063 /* Debug */, A00100000000000000000064 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
1182
+ A00100000000000000000052 /* Build configuration list for PBXProject "TransOneApp" */ = {isa = XCConfigurationList; buildConfigurations = (A00100000000000000000061 /* Debug */, A00100000000000000000062 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
1183
+ /* End XCConfigurationList section */
1184
+ };
1185
+ rootObject = A00100000000000000000051 /* Project object */;
1186
+ }
1187
+ `;
1188
+ }
1189
+ var ANDROID_DIALECT = {
1190
+ id: "app-android",
1191
+ label: "Android \u539F\u751F App\uFF08Jetpack Compose\uFF09",
1192
+ resourceDirectory: "app/src/main/assets",
1193
+ generateProject(screen, config) {
1194
+ const pkg = config.bundleId.replace(/[^A-Za-z0-9_.]/g, "_");
1195
+ const path = pkg.replace(/\./g, "/");
1196
+ return {
1197
+ "settings.gradle.kts": `rootProject.name = "${config.appName}"
1198
+ include(":app")
1199
+ `,
1200
+ "build.gradle.kts": `plugins { }
1201
+ `,
1202
+ "app/build.gradle.kts": `plugins { id("com.android.application") version "8.5.0" apply false }
1203
+ `,
1204
+ "app/src/main/AndroidManifest.xml": `<manifest package="${pkg}" xmlns:android="http://schemas.android.com/apk/res/android"><application android:label="${config.appName}"><activity android:name=".MainActivity" android:exported="true"><intent-filter><action android:name="android.intent.action.MAIN"/><category android:name="android.intent.category.LAUNCHER"/></intent-filter></activity></application></manifest>
1205
+ `,
1206
+ [`app/src/main/java/${path}/MainActivity.kt`]: `package ${pkg}
1207
+
1208
+ import androidx.activity.ComponentActivity
1209
+ import androidx.activity.compose.setContent
1210
+ import androidx.compose.runtime.*
1211
+ import androidx.compose.foundation.layout.Column
1212
+ import androidx.compose.material3.*
1213
+
1214
+ class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: android.os.Bundle?) { super.onCreate(savedInstanceState); setContent {
1215
+ ${kotlinState(screen)}
1216
+ ${kotlinNode(screen.root)}
1217
+ } } }
1218
+ `
1219
+ };
1220
+ }
1221
+ };
1222
+ var HARMONY_DIALECT = {
1223
+ id: "app-harmony",
1224
+ label: "HarmonyOS \u539F\u751F App\uFF08ArkUI\uFF09",
1225
+ resourceDirectory: "entry/src/main/resources/rawfile",
1226
+ generateProject(screen, config) {
1227
+ return {
1228
+ "AppScope/app.json5": `{ "app": { "bundleName": "${config.bundleId}", "vendor": "TransOne", "versionCode": 1, "versionName": "1.0.0" } }
1229
+ `,
1230
+ "AppScope/resources/base/element/string.json": `{ "string": [{ "name": "app_name", "value": "${config.appName}" }] }
1231
+ `,
1232
+ "entry/src/main/module.json5": `{ "module": { "name": "entry", "type": "entry", "mainElement": "EntryAbility" } }
1233
+ `,
1234
+ "entry/src/main/ets/entryability/EntryAbility.ets": `import UIAbility from '@ohos.app.ability.UIAbility';
1235
+ export default class EntryAbility extends UIAbility {}
1236
+ `,
1237
+ "entry/src/main/ets/pages/Index.ets": `@Entry
1238
+ @Component
1239
+ struct Index {
1240
+ ${arkState(screen)}
1241
+ build() {
1242
+ ${arkNode(screen.root)}
1243
+ }
1244
+ }
1245
+ `
1246
+ };
1247
+ }
1248
+ };
1249
+
751
1250
  // src/target/registry.ts
752
1251
  class TargetRegistry {
753
1252
  targets = new Map;
@@ -756,9 +1255,10 @@ class TargetRegistry {
756
1255
  this.register(mpWeixinTarget);
757
1256
  this.register(mpAlipayTarget);
758
1257
  this.register(mpBytedanceTarget);
759
- this.register(new PlaceholderTarget("app-ios", "iOS \u539F\u751F App", "\u8FDC\u671F"));
760
- this.register(new PlaceholderTarget("app-android", "Android \u539F\u751F App", "\u8FDC\u671F"));
761
- this.register(new PlaceholderTarget("app-harmony", "\u9E3F\u8499\u539F\u751F App\uFF08ArkUI\uFF09", "\u8FDC\u671F"));
1258
+ this.register(mpXiaohongshuTarget);
1259
+ this.register(new AppTarget(IOS_DIALECT));
1260
+ this.register(new AppTarget(ANDROID_DIALECT));
1261
+ this.register(new AppTarget(HARMONY_DIALECT));
762
1262
  }
763
1263
  register(target) {
764
1264
  this.targets.set(target.type, target);
@@ -777,8 +1277,8 @@ class TargetRegistry {
777
1277
  var targetRegistry = new TargetRegistry;
778
1278
 
779
1279
  // src/build.ts
780
- import { mkdir as mkdir2, rm as rm2 } from "fs/promises";
781
- import { dirname as dirname3, resolve as resolve4 } from "path";
1280
+ import { mkdir as mkdir3, rm as rm3 } from "fs/promises";
1281
+ import { dirname as dirname4, resolve as resolve5 } from "path";
782
1282
  async function build(options = {}) {
783
1283
  const config = await resolveConfig(options);
784
1284
  if (options.library) {
@@ -792,8 +1292,8 @@ async function buildLibrary(config) {
792
1292
  if (!library) {
793
1293
  throw new Error("TransOne library build requires config.library");
794
1294
  }
795
- await rm2(library.outDir, { recursive: true, force: true });
796
- await mkdir2(library.outDir, { recursive: true });
1295
+ await rm3(library.outDir, { recursive: true, force: true });
1296
+ await mkdir3(library.outDir, { recursive: true });
797
1297
  if (library.dts) {
798
1298
  for (const tsconfig of library.tsconfigs) {
799
1299
  await runTsc(config.root, tsconfig);
@@ -803,7 +1303,7 @@ async function buildLibrary(config) {
803
1303
  const result = await Bun.build({
804
1304
  entrypoints: [library.entry],
805
1305
  outdir: library.outDir,
806
- root: dirname3(library.entry),
1306
+ root: dirname4(library.entry),
807
1307
  target: "browser",
808
1308
  format: "esm",
809
1309
  sourcemap: library.sourcemap ? "linked" : undefined,
@@ -817,7 +1317,7 @@ async function buildLibrary(config) {
817
1317
  ${result.logs.map((log) => log.message).join(`
818
1318
  `)}`);
819
1319
  }
820
- const assetsBuilt = result.outputs.map((output) => resolve4(output.path));
1320
+ const assetsBuilt = result.outputs.map((output) => resolve5(output.path));
821
1321
  return { root: config.root, outDir: library.outDir, assetsBuilt };
822
1322
  }
823
1323
  async function runTsc(root, tsconfig) {
@@ -833,23 +1333,23 @@ async function runTsc(root, tsconfig) {
833
1333
  }
834
1334
 
835
1335
  // src/create.ts
836
- import { existsSync as existsSync2, mkdirSync, writeFileSync } from "fs";
837
- import { basename, join } from "path";
838
- var TRANSONE_FRAMEWORK_VERSION = "0.3.0";
839
- var TRANSONE_CLI_VERSION = "0.3.0";
1336
+ import { existsSync as existsSync4, mkdirSync, writeFileSync } from "fs";
1337
+ import { basename as basename2, join as join2 } from "path";
1338
+ var TRANSONE_FRAMEWORK_VERSION = "0.4.0";
1339
+ var TRANSONE_CLI_VERSION = "0.4.0";
840
1340
  var GITHUB_URL = "https://github.com/geektech-team/transone";
841
1341
  function createProject(options = {}) {
842
1342
  const root = options.root ?? process.cwd();
843
- const name = options.name ?? basename(root);
1343
+ const name = options.name ?? basename2(root);
844
1344
  const files = scaffoldFiles(name);
845
- const existing = files.filter((file) => existsSync2(join(root, file.path)));
1345
+ const existing = files.filter((file) => existsSync4(join2(root, file.path)));
846
1346
  if (existing.length > 0) {
847
1347
  throw new Error(`Refusing to overwrite existing TransOne project files: ${existing.map((file) => file.path).join(", ")}`);
848
1348
  }
849
- mkdirSync(join(root, "src"), { recursive: true });
1349
+ mkdirSync(join2(root, "src"), { recursive: true });
850
1350
  const created = [];
851
1351
  for (const file of files) {
852
- writeFileSync(join(root, file.path), file.content, "utf8");
1352
+ writeFileSync(join2(root, file.path), file.content, "utf8");
853
1353
  created.push(file.path);
854
1354
  }
855
1355
  return { root, files: created };
@@ -991,11 +1491,11 @@ app.mount();
991
1491
  // src/server.ts
992
1492
  import { randomUUID } from "crypto";
993
1493
  import {
994
- basename as basename2,
1494
+ basename as basename3,
995
1495
  extname,
996
1496
  isAbsolute as isAbsolute4,
997
1497
  relative as relative4,
998
- resolve as resolve5,
1498
+ resolve as resolve6,
999
1499
  sep as sep3
1000
1500
  } from "path";
1001
1501
 
@@ -1084,7 +1584,7 @@ function filterHeaders(source) {
1084
1584
  // src/watch.ts
1085
1585
  import { watch } from "fs";
1086
1586
  import { readdir, stat } from "fs/promises";
1087
- import { isAbsolute as isAbsolute3, join as join2, relative as relative3 } from "path";
1587
+ import { isAbsolute as isAbsolute3, join as join3, relative as relative3 } from "path";
1088
1588
  var RECURSIVE_WATCH_UNSUPPORTED_ERROR = "ERR_FEATURE_UNAVAILABLE_ON_PLATFORM";
1089
1589
  var DEFAULT_DEBOUNCE_MS = 100;
1090
1590
  var DEFAULT_POLL_INTERVAL_MS = 300;
@@ -1195,7 +1695,7 @@ async function collectRelevantFiles(root, isRelevant, output) {
1195
1695
  if (relativeDirectory === undefined) {
1196
1696
  break;
1197
1697
  }
1198
- const absoluteDirectory = join2(root, relativeDirectory);
1698
+ const absoluteDirectory = join3(root, relativeDirectory);
1199
1699
  let entries;
1200
1700
  try {
1201
1701
  entries = await readdir(absoluteDirectory, { withFileTypes: true });
@@ -1212,7 +1712,7 @@ async function collectRelevantFiles(root, isRelevant, output) {
1212
1712
  continue;
1213
1713
  }
1214
1714
  try {
1215
- const info = await stat(join2(root, relativePath));
1715
+ const info = await stat(join3(root, relativePath));
1216
1716
  output.set(relativePath, { mtimeMs: info.mtimeMs, size: info.size });
1217
1717
  } catch {}
1218
1718
  }
@@ -1311,11 +1811,11 @@ async function createServerInstance(options, watch2) {
1311
1811
  for (const [route, entry] of Object.entries(config.pages)) {
1312
1812
  await renderProjectHtml(config, {}, entry, route);
1313
1813
  }
1314
- const developmentOutDir = resolve5(config.root, "dist", "dev", "h5");
1814
+ const developmentOutDir = resolve6(config.root, "dist", "dev", "h5");
1315
1815
  await assertSafeSubdirectory(config.root, developmentOutDir, INVALID_DEVELOPMENT_DIRECTORY_MESSAGE);
1316
1816
  const proxy = createProxyHandler(config.server.proxy);
1317
1817
  const sessionId = createGenerationId();
1318
- const sessionOutDir = resolve5(developmentOutDir, sessionId);
1818
+ const sessionOutDir = resolve6(developmentOutDir, sessionId);
1319
1819
  const artifacts = new Map;
1320
1820
  const buildProject = createDevelopmentBuilder(sessionId, sessionOutDir);
1321
1821
  const liveReload = watch2 ? createLiveReloadHub() : undefined;
@@ -1550,11 +2050,11 @@ function isWatchedFile(instance, relativePath) {
1550
2050
  if (segments.some((segment) => IGNORED_WATCH_SEGMENTS.has(segment))) {
1551
2051
  return false;
1552
2052
  }
1553
- const absolutePath = resolve5(instance.config.root, relativePath);
2053
+ const absolutePath = resolve6(instance.config.root, relativePath);
1554
2054
  if (isWithinOrEqual(instance.config.build.outDir, absolutePath)) {
1555
2055
  return false;
1556
2056
  }
1557
- const base = basename2(absolutePath);
2057
+ const base = basename3(absolutePath);
1558
2058
  if (base.startsWith(".") && absolutePath !== instance.config.configFile) {
1559
2059
  return false;
1560
2060
  }
@@ -1581,7 +2081,7 @@ function createDevelopmentBuilder(sessionId, sessionOutDir) {
1581
2081
  }
1582
2082
  async function buildProjectBundle(entry, sessionId, sessionOutDir) {
1583
2083
  const generationId = createGenerationId();
1584
- const generationOutDir = resolve5(sessionOutDir, generationId);
2084
+ const generationOutDir = resolve6(sessionOutDir, generationId);
1585
2085
  const generationUrl = `${DEVELOPMENT_URL_PREFIX}/${sessionId}/${generationId}`;
1586
2086
  const buildOptions = {
1587
2087
  entrypoints: [entry],
@@ -1645,7 +2145,7 @@ function publishDevelopmentBundle(bundle, artifacts) {
1645
2145
  }
1646
2146
  }
1647
2147
  function createDevelopmentOutput(generationOutDir, generationUrl, output) {
1648
- const filePath = resolve5(output.path);
2148
+ const filePath = resolve6(output.path);
1649
2149
  const pathFromGeneration = relative4(generationOutDir, filePath);
1650
2150
  if (pathFromGeneration === "" || pathFromGeneration === ".." || pathFromGeneration.startsWith(`..${sep3}`) || isAbsolute4(pathFromGeneration)) {
1651
2151
  throw new Error(`Development output must not escape outside its generation directory: ${output.path}`);
@@ -1667,7 +2167,7 @@ function buildFailureResponse() {
1667
2167
  });
1668
2168
  }
1669
2169
 
1670
- export { TARGET_TYPES, isTargetType, MP_TARGET_TYPES, isMpTargetType, defineConfig, resolveConfig, WebTarget, MpTarget, mpWeixinTarget, mpAlipayTarget, mpBytedanceTarget, PlaceholderTarget, TargetRegistry, targetRegistry, build, createProject, startDevServer };
2170
+ export { TARGET_TYPES, isTargetType, MP_TARGET_TYPES, isMpTargetType, defineConfig, resolveConfig, WebTarget, MpTarget, mpWeixinTarget, mpAlipayTarget, mpBytedanceTarget, mpXiaohongshuTarget, TargetRegistry, targetRegistry, build, createProject, startDevServer };
1671
2171
 
1672
- //# debugId=20702718C87A6CDF64756E2164756E21
1673
- //# sourceMappingURL=index-40bkmdrf.js.map
2172
+ //# debugId=4621705A1E76309564756E2164756E21
2173
+ //# sourceMappingURL=index-m455xjw2.js.map