@react-native-oh/react-native-harmony-cli 0.77.18 → 0.77.33
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/assetResolver.js +74 -43
- package/dist/autolinking/Autolinking.js +179 -178
- package/dist/codegen/core/CodegenError.js +23 -3
- package/dist/codegen/core/EventUtils.js +3 -3
- package/dist/codegen/core/TypeAnnotationToTS.js +28 -24
- package/dist/codegen/core/UberSchema.js +97 -55
- package/dist/codegen/generators/AppBuildTimeGlueCodeGenerator.js +41 -28
- package/dist/codegen/generators/ArkTSComponentCodeGeneratorArkTS.js +34 -27
- package/dist/codegen/generators/ArkTSComponentCodeGeneratorCAPI.js +33 -25
- package/dist/codegen/generators/CppComponentCodeGenerator.js +28 -23
- package/dist/codegen/generators/LibGlueCodeGenerator.js +29 -26
- package/dist/codegen/generators/NativeModuleCodeGenerator.js +30 -25
- package/dist/codegen/generators/SharedComponentCodeGenerator.js +15 -15
- package/dist/codegen/generators/UberGeneratorV1.js +24 -18
- package/dist/codegen/generators/UberGeneratorV2.js +36 -28
- package/dist/codegen/templates/BaseComponentInstanceHTemplate.js +24 -50
- package/dist/codegen/templates/BasePackageHTemplate.js +21 -120
- package/dist/codegen/templates/ComponentDescriptorHTemplate.js +8 -54
- package/dist/codegen/templates/ComponentJSIBinderHTemplate.js +27 -75
- package/dist/codegen/templates/ComponentUtilsTSTemplate.js +29 -162
- package/dist/codegen/templates/IndexTSTemplate.js +17 -37
- package/dist/codegen/templates/RNOHGeneratedPackageHTemplate.js +24 -119
- package/dist/codegen/templates/TurboModuleCppTemplate.js +15 -38
- package/dist/codegen/templates/TurboModuleHTemplate.js +11 -32
- package/dist/codegen/templates/TurboModuleSpecTSTemplate.js +19 -52
- package/dist/commands/bundle-harmony.js +221 -118
- package/dist/commands/clean-harmony.js +63 -58
- package/dist/commands/codegen-harmony.js +175 -104
- package/dist/commands/codegen-lib-harmony.js +116 -76
- package/dist/commands/init-harmony.js +196 -151
- package/dist/commands/init.js +961 -537
- package/dist/commands/link-harmony.js +82 -35
- package/dist/commands/run-harmony.js +520 -352
- package/dist/commands/verify-package-harmony.js +117 -54
- package/dist/core/AbsolutePath.js +49 -33
- package/dist/core/CodegenConfig.js +22 -24
- package/dist/core/DescriptiveError.js +37 -18
- package/dist/core/FileSystem.js +18 -14
- package/dist/core/OHPackageJSON5.js +23 -17
- package/dist/core/PackageJSON.js +42 -26
- package/dist/core/ProjectDependenciesManager.js +92 -40
- package/dist/core/ValidationError.js +22 -2
- package/dist/core/fs.js +7 -10
- package/dist/index.js +1 -1
- package/dist/init/templates/AppScopeAppJSON5Template.js +8 -21
- package/dist/init/templates/AppScopeStringVarTemplate.js +8 -19
- package/dist/init/templates/EntryIndexTemplate.js +8 -56
- package/dist/init/templates/EntryStringVarTemplate.js +8 -27
- package/dist/init/templates/HvigorConfigJson5Template.js +8 -33
- package/dist/init/templates/MetroConfigTemplate.js +8 -38
- package/dist/init/templates/OhPackageJson5Template.js +8 -28
- package/dist/io/CliExecutor.js +98 -46
- package/dist/io/Logger.js +46 -40
- package/dist/io/RealFS.js +100 -43
- package/dist/io/TarGz.js +8 -11
- package/dist/io/__fixtures__.js +141 -79
- package/dist/io/fsUtils.js +12 -13
- package/dist/package-verifier/checks/HarmonyDirContainsOnlyHarsCheck.js +47 -19
- package/dist/package-verifier/checks/HarmonyDirExistsCheck.js +41 -13
- package/dist/package-verifier/checks/NpmAnAndOhPackageVersionsAreEqual.js +38 -8
- package/dist/package-verifier/checks/OhPackageNameFollowsNamingConventionCheck.js +54 -22
- package/dist/package-verifier/verify-package.js +133 -56
- package/dist/simulator/LaunchSimulator.js +395 -0
- package/dist/simulator/index.js +23 -0
- package/package.json +2 -11
- package/scripts/sync-hvigor.js +27 -0
- package/src/autolinking/Autolinking.ts +1 -1
- package/src/codegen/generators/UberGeneratorV1.ts +7 -2
- package/src/codegen/generators/UberGeneratorV2.ts +6 -1
- package/src/commands/codegen-harmony.ts +17 -7
- package/src/commands/run-harmony.ts +67 -41
- package/src/init/templates/harmony/entry/src/main/module.json5 +7 -0
- package/src/simulator/LaunchSimulator.ts +359 -0
- package/src/simulator/index.ts +8 -0
- package/dist/init/templates/harmony/AppScope/app.json5 +0 -10
- package/dist/init/templates/harmony/AppScope/resources/base/element/string.json +0 -8
- package/dist/init/templates/harmony/AppScope/resources/base/media/app_icon.png +0 -0
- package/dist/init/templates/harmony/build-profile.json5 +0 -36
- package/dist/init/templates/harmony/codelinter.json +0 -32
- package/dist/init/templates/harmony/entry/build-profile.json5 +0 -18
- package/dist/init/templates/harmony/entry/gitignore +0 -7
- package/dist/init/templates/harmony/entry/hvigorfile.ts +0 -13
- package/dist/init/templates/harmony/entry/oh-package.json5 +0 -9
- package/dist/init/templates/harmony/entry/src/main/cpp/CMakeLists.txt +0 -27
- package/dist/init/templates/harmony/entry/src/main/cpp/PackageProvider.cpp +0 -13
- package/dist/init/templates/harmony/entry/src/main/cpp/gitignore +0 -4
- package/dist/init/templates/harmony/entry/src/main/ets/PackageProvider.ets +0 -8
- package/dist/init/templates/harmony/entry/src/main/ets/codegen/gitignore +0 -2
- package/dist/init/templates/harmony/entry/src/main/ets/entryability/EntryAbility.ets +0 -11
- package/dist/init/templates/harmony/entry/src/main/ets/gitignore +0 -1
- package/dist/init/templates/harmony/entry/src/main/ets/pages/.gitkeep +0 -0
- package/dist/init/templates/harmony/entry/src/main/ets/workers/RNOHWorker.ets +0 -16
- package/dist/init/templates/harmony/entry/src/main/module.json5 +0 -58
- package/dist/init/templates/harmony/entry/src/main/resources/base/element/color.json +0 -8
- package/dist/init/templates/harmony/entry/src/main/resources/base/element/string.json +0 -16
- package/dist/init/templates/harmony/entry/src/main/resources/base/media/background.png +0 -0
- package/dist/init/templates/harmony/entry/src/main/resources/base/media/foreground.png +0 -0
- package/dist/init/templates/harmony/entry/src/main/resources/base/media/layered_image.json +0 -7
- package/dist/init/templates/harmony/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/dist/init/templates/harmony/entry/src/main/resources/base/profile/main_pages.json +0 -5
- package/dist/init/templates/harmony/entry/src/main/resources/gitignore +0 -1
- package/dist/init/templates/harmony/entry/src/ohosTest/ets/test/List.test.ets +0 -2
- package/dist/init/templates/harmony/entry/src/ohosTest/module.json5 +0 -13
- package/dist/init/templates/harmony/gitignore +0 -16
- package/dist/init/templates/harmony/hvigor/hvigor-config.json5 +0 -22
- package/dist/init/templates/harmony/hvigorfile.ts +0 -7
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
4
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
5
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
6
|
+
function step(op) {
|
|
7
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
8
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
9
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
10
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11
|
+
switch (op[0]) {
|
|
12
|
+
case 0: case 1: t = op; break;
|
|
13
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
14
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
15
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
16
|
+
default:
|
|
17
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
18
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
19
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
20
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
21
|
+
if (t[2]) _.ops.pop();
|
|
22
|
+
_.trys.pop(); continue;
|
|
23
|
+
}
|
|
24
|
+
op = body.call(thisArg, _);
|
|
25
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
26
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
27
|
+
}
|
|
28
|
+
};
|
|
2
29
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
3
30
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
4
31
|
var m = o[Symbol.asyncIterator], i;
|
|
@@ -15,7 +42,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
|
|
|
15
42
|
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
16
43
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
17
44
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
18
|
-
return i =
|
|
45
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
19
46
|
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
20
47
|
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
21
48
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
@@ -24,73 +51,123 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
|
|
|
24
51
|
function reject(value) { resume("throw", value); }
|
|
25
52
|
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
26
53
|
};
|
|
27
|
-
var
|
|
28
|
-
|
|
54
|
+
var __values = (this && this.__values) || function(o) {
|
|
55
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
56
|
+
if (m) return m.call(o);
|
|
57
|
+
if (o && typeof o.length === "number") return {
|
|
58
|
+
next: function () {
|
|
59
|
+
if (o && i >= o.length) o = void 0;
|
|
60
|
+
return { value: o && o[i++], done: !o };
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
29
64
|
};
|
|
30
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
66
|
exports.verifyRNOHPackage = verifyRNOHPackage;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
67
|
+
var node_fs_1 = require("node:fs");
|
|
68
|
+
var tmp_1 = require("tmp");
|
|
69
|
+
var core_1 = require("../core");
|
|
70
|
+
var checks_1 = require("./checks");
|
|
71
|
+
var io_1 = require("../io");
|
|
37
72
|
function verifyRNOHPackage(_a) {
|
|
38
|
-
return __asyncGenerator(this, arguments, function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]
|
|
54
|
-
|
|
73
|
+
return __asyncGenerator(this, arguments, function verifyRNOHPackage_1(_b) {
|
|
74
|
+
var npmPackageJson, initialChecks, harPath, tmpDirPath, ohPackageJson5, harChecks;
|
|
75
|
+
var npmPackagePath = _b.npmPackagePath, hasHarmonyCode = _b.hasHarmonyCode, checkNamesToSkip = _b.checkNamesToSkip;
|
|
76
|
+
return __generator(this, function (_c) {
|
|
77
|
+
switch (_c.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
npmPackageJson = core_1.PackageJSON.fromProjectRootPath(new io_1.RealFS(), npmPackagePath, npmPackagePath);
|
|
80
|
+
initialChecks = [
|
|
81
|
+
(0, checks_1.createHarmonyDirExistsCheck)(npmPackagePath, hasHarmonyCode),
|
|
82
|
+
(0, checks_1.createHarmonyDirContainsOnlyHarsCheck)(npmPackagePath, hasHarmonyCode),
|
|
83
|
+
];
|
|
84
|
+
return [5 /*yield**/, __values(__asyncDelegator(__asyncValues(runChecks(initialChecks, checkNamesToSkip))))];
|
|
85
|
+
case 1: return [4 /*yield*/, __await.apply(void 0, [_c.sent()])];
|
|
86
|
+
case 2:
|
|
87
|
+
_c.sent();
|
|
88
|
+
if (!hasHarmonyCode) return [3 /*break*/, 8];
|
|
89
|
+
harPath = findHarPath(npmPackagePath);
|
|
90
|
+
if (!harPath) {
|
|
91
|
+
throw new core_1.DescriptiveError({
|
|
92
|
+
whatHappened: 'Attempted to verify har but no har was found',
|
|
93
|
+
whatCanUserDo: [
|
|
94
|
+
'Run this command without --no-harmony-code flag.',
|
|
95
|
+
'Create har files by running DevEco Studio > Build > Make Module (MODULE_NAME). The har file can be later found in MODULE_NAME/build/default/outputs/default/MODULE_NAME.har. Copy that file to the PACKAGE_ROOT/harmony directory.',
|
|
96
|
+
],
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
tmpDirPath = new core_1.AbsolutePath(tmp_1.default.dirSync().name);
|
|
100
|
+
return [4 /*yield*/, __await({
|
|
101
|
+
type: 'START_PROCESS',
|
|
102
|
+
name: "Unpacking the har file to the tmpdir",
|
|
103
|
+
})];
|
|
104
|
+
case 3: return [4 /*yield*/, _c.sent()];
|
|
105
|
+
case 4:
|
|
106
|
+
_c.sent();
|
|
107
|
+
return [4 /*yield*/, __await((0, io_1.unpackTarGz)(harPath, tmpDirPath))];
|
|
108
|
+
case 5:
|
|
109
|
+
_c.sent();
|
|
110
|
+
ohPackageJson5 = core_1.OHPackageJSON5.fromPath(tmpDirPath.copyWithNewSegment('package', 'oh-package.json5'));
|
|
111
|
+
harChecks = [
|
|
112
|
+
(0, checks_1.createOhPackageNameFollowsNamingConventionCheck)(npmPackageJson.name, ohPackageJson5.name),
|
|
113
|
+
(0, checks_1.createNpmAndOhPackageVersionsAreEqualCheck)(npmPackageJson.version, ohPackageJson5.version),
|
|
114
|
+
];
|
|
115
|
+
return [5 /*yield**/, __values(__asyncDelegator(__asyncValues(runChecks(harChecks, checkNamesToSkip))))];
|
|
116
|
+
case 6: return [4 /*yield*/, __await.apply(void 0, [_c.sent()])];
|
|
117
|
+
case 7:
|
|
118
|
+
_c.sent();
|
|
119
|
+
_c.label = 8;
|
|
120
|
+
case 8: return [2 /*return*/];
|
|
55
121
|
}
|
|
56
|
-
|
|
57
|
-
yield yield __await({
|
|
58
|
-
type: 'START_PROCESS',
|
|
59
|
-
name: `Unpacking the har file to the tmpdir`,
|
|
60
|
-
});
|
|
61
|
-
yield __await((0, io_1.unpackTarGz)(harPath, tmpDirPath));
|
|
62
|
-
const ohPackageJson5 = core_1.OHPackageJSON5.fromPath(tmpDirPath.copyWithNewSegment('package', 'oh-package.json5'));
|
|
63
|
-
const harChecks = [
|
|
64
|
-
(0, checks_1.createOhPackageNameFollowsNamingConventionCheck)(npmPackageJson.name, ohPackageJson5.name),
|
|
65
|
-
(0, checks_1.createNpmAndOhPackageVersionsAreEqualCheck)(npmPackageJson.version, ohPackageJson5.version),
|
|
66
|
-
];
|
|
67
|
-
yield __await(yield* __asyncDelegator(__asyncValues(runChecks(harChecks, checkNamesToSkip))));
|
|
68
|
-
}
|
|
122
|
+
});
|
|
69
123
|
});
|
|
70
124
|
}
|
|
71
125
|
function runChecks(checks, checkNamesToSkip) {
|
|
72
|
-
return __asyncGenerator(this, arguments, function
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
126
|
+
return __asyncGenerator(this, arguments, function runChecks_1() {
|
|
127
|
+
var _i, checks_2, _a, checkIf, run, result, status_1, message;
|
|
128
|
+
return __generator(this, function (_b) {
|
|
129
|
+
switch (_b.label) {
|
|
130
|
+
case 0:
|
|
131
|
+
_i = 0, checks_2 = checks;
|
|
132
|
+
_b.label = 1;
|
|
133
|
+
case 1:
|
|
134
|
+
if (!(_i < checks_2.length)) return [3 /*break*/, 9];
|
|
135
|
+
_a = checks_2[_i], checkIf = _a.checkIf, run = _a.run;
|
|
136
|
+
if (!checkNamesToSkip.includes(checkIf)) return [3 /*break*/, 4];
|
|
137
|
+
return [4 /*yield*/, __await({
|
|
138
|
+
type: 'FINISHED_CHECKING',
|
|
139
|
+
name: checkIf,
|
|
140
|
+
status: 'skip',
|
|
141
|
+
message: '',
|
|
142
|
+
})];
|
|
143
|
+
case 2: return [4 /*yield*/, _b.sent()];
|
|
144
|
+
case 3:
|
|
145
|
+
_b.sent();
|
|
146
|
+
return [3 /*break*/, 8];
|
|
147
|
+
case 4: return [4 /*yield*/, __await(run())];
|
|
148
|
+
case 5:
|
|
149
|
+
result = _b.sent();
|
|
150
|
+
status_1 = typeof result === 'string' ? result : result.status;
|
|
151
|
+
message = typeof result === 'string' ? '' : result.message;
|
|
152
|
+
return [4 /*yield*/, __await({ type: 'FINISHED_CHECKING', name: checkIf, status: status_1, message: message })];
|
|
153
|
+
case 6: return [4 /*yield*/, _b.sent()];
|
|
154
|
+
case 7:
|
|
155
|
+
_b.sent();
|
|
156
|
+
_b.label = 8;
|
|
157
|
+
case 8:
|
|
158
|
+
_i++;
|
|
159
|
+
return [3 /*break*/, 1];
|
|
160
|
+
case 9: return [2 /*return*/];
|
|
82
161
|
}
|
|
83
|
-
|
|
84
|
-
const status = typeof result === 'string' ? result : result.status;
|
|
85
|
-
const message = typeof result === 'string' ? '' : result.message;
|
|
86
|
-
yield yield __await({ type: 'FINISHED_CHECKING', name: checkIf, status, message });
|
|
87
|
-
}
|
|
162
|
+
});
|
|
88
163
|
});
|
|
89
164
|
}
|
|
90
165
|
function findHarPath(packagePath) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
166
|
+
var packageHarmonyPath = packagePath.copyWithNewSegment('harmony');
|
|
167
|
+
var fileOrDirNames = node_fs_1.default.readdirSync(packageHarmonyPath.getValue());
|
|
168
|
+
var harFilenames = fileOrDirNames.filter(function (fileOrDirName) {
|
|
169
|
+
return fileOrDirName.endsWith('.har');
|
|
170
|
+
});
|
|
94
171
|
if (harFilenames.length != 1) {
|
|
95
172
|
return null;
|
|
96
173
|
}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
18
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
19
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
21
|
+
function step(op) {
|
|
22
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
23
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
25
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
26
|
+
switch (op[0]) {
|
|
27
|
+
case 0: case 1: t = op; break;
|
|
28
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
29
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
30
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
31
|
+
default:
|
|
32
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
33
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
34
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
35
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
36
|
+
if (t[2]) _.ops.pop();
|
|
37
|
+
_.trys.pop(); continue;
|
|
38
|
+
}
|
|
39
|
+
op = body.call(thisArg, _);
|
|
40
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
41
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.launchHarmonySimulator = launchHarmonySimulator;
|
|
46
|
+
var path_1 = require("path");
|
|
47
|
+
var fs_extra_1 = require("fs-extra");
|
|
48
|
+
var child_process_1 = require("child_process");
|
|
49
|
+
var core_1 = require("../core");
|
|
50
|
+
var MIN_SUPPORTED_VERSION = [6, 0, 0, 828];
|
|
51
|
+
function compareVersionTuple(a, b) {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
for (var i = 0; i < Math.max(a.length, b.length); i++) {
|
|
54
|
+
var av = (_a = a[i]) !== null && _a !== void 0 ? _a : 0;
|
|
55
|
+
var bv = (_b = b[i]) !== null && _b !== void 0 ? _b : 0;
|
|
56
|
+
if (av !== bv)
|
|
57
|
+
return av - bv;
|
|
58
|
+
}
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
function isSupportedVersion(versionDir) {
|
|
62
|
+
var m = versionDir.match(/^(\d+)\.(\d+)\.(\d+)\.(\d+)/);
|
|
63
|
+
if (!m)
|
|
64
|
+
return false;
|
|
65
|
+
var current = m.slice(1).map(function (n) { return parseInt(n, 10); });
|
|
66
|
+
return compareVersionTuple(current, MIN_SUPPORTED_VERSION) >= 0;
|
|
67
|
+
}
|
|
68
|
+
function getCreatedSimulators(cli, emulator) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var simulatorInfos_1, simulatorInfosFromStderr_1, error_1;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0:
|
|
74
|
+
_a.trys.push([0, 2, , 3]);
|
|
75
|
+
simulatorInfos_1 = '';
|
|
76
|
+
simulatorInfosFromStderr_1 = '';
|
|
77
|
+
return [4 /*yield*/, cli.run("\"".concat(emulator, "\""), {
|
|
78
|
+
args: ['--list'],
|
|
79
|
+
shell: true,
|
|
80
|
+
onStdout: function (msg) {
|
|
81
|
+
simulatorInfos_1 += msg;
|
|
82
|
+
},
|
|
83
|
+
onStderr: function (msg) {
|
|
84
|
+
simulatorInfosFromStderr_1 += msg;
|
|
85
|
+
},
|
|
86
|
+
})];
|
|
87
|
+
case 1:
|
|
88
|
+
_a.sent();
|
|
89
|
+
if (simulatorInfos_1 == null || simulatorInfos_1.trim() === '') {
|
|
90
|
+
simulatorInfos_1 = simulatorInfosFromStderr_1;
|
|
91
|
+
}
|
|
92
|
+
if (!simulatorInfos_1 || simulatorInfos_1.trim() === '' ||
|
|
93
|
+
simulatorInfos_1.trim() === '[Empty]' ||
|
|
94
|
+
simulatorInfos_1.includes('not ')) {
|
|
95
|
+
return [2 /*return*/, []];
|
|
96
|
+
}
|
|
97
|
+
return [2 /*return*/, simulatorInfos_1.split('\n').filter(function (line) { return line.trim() !== ''; })];
|
|
98
|
+
case 2:
|
|
99
|
+
error_1 = _a.sent();
|
|
100
|
+
throw new core_1.DescriptiveError({
|
|
101
|
+
whatHappened: "Failed to get simulator list: ".concat((error_1 === null || error_1 === void 0 ? void 0 : error_1.message) || error_1),
|
|
102
|
+
whatCanUserDo: [
|
|
103
|
+
'Ensure DevEco Studio is properly installed and configured.',
|
|
104
|
+
'Check if the emulator path is correct.',
|
|
105
|
+
'Verify that the emulator has read/write permissions.'
|
|
106
|
+
],
|
|
107
|
+
extraData: error_1,
|
|
108
|
+
});
|
|
109
|
+
case 3: return [2 /*return*/];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function getDevEcoVersion(devEcoStudioToolsPath) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
+
var productInfoPath, content, info, error_2;
|
|
117
|
+
return __generator(this, function (_a) {
|
|
118
|
+
switch (_a.label) {
|
|
119
|
+
case 0:
|
|
120
|
+
_a.trys.push([0, 2, , 3]);
|
|
121
|
+
productInfoPath = path_1.default.join(devEcoStudioToolsPath.toString(), '..', 'Resources', 'product-info.json');
|
|
122
|
+
if (process.platform === 'win32') {
|
|
123
|
+
productInfoPath = path_1.default.join(devEcoStudioToolsPath.toString(), '..', 'product-info.json');
|
|
124
|
+
}
|
|
125
|
+
return [4 /*yield*/, fs_extra_1.default.readFile(productInfoPath, 'utf-8')];
|
|
126
|
+
case 1:
|
|
127
|
+
content = _a.sent();
|
|
128
|
+
info = JSON.parse(content);
|
|
129
|
+
return [2 /*return*/, info.version || null];
|
|
130
|
+
case 2:
|
|
131
|
+
error_2 = _a.sent();
|
|
132
|
+
throw new core_1.DescriptiveError({
|
|
133
|
+
whatHappened: "Failed to read DevEco Studio version from product-info.json: ".concat((error_2 === null || error_2 === void 0 ? void 0 : error_2.message) || error_2),
|
|
134
|
+
whatCanUserDo: [
|
|
135
|
+
'Verify DevEco Studio installation is complete and not corrupted.',
|
|
136
|
+
'Check if the DevEco Studio tools path is correct.',
|
|
137
|
+
'Ensure product-info.json file exists and is readable.'
|
|
138
|
+
],
|
|
139
|
+
extraData: error_2,
|
|
140
|
+
});
|
|
141
|
+
case 3: return [2 /*return*/];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function resolveDeviceManagerXml(env, devEcoVersion) {
|
|
147
|
+
var candidates = [];
|
|
148
|
+
if (process.platform === 'darwin') {
|
|
149
|
+
var home = env.HOME || '';
|
|
150
|
+
candidates.push(path_1.default.join(home, 'Library', 'Application Support', 'Huawei', "DevEcoStudio".concat(devEcoVersion), 'options', 'deviceManager.xml'));
|
|
151
|
+
}
|
|
152
|
+
else if (process.platform === 'win32') {
|
|
153
|
+
var appdata = env.APPDATA || '';
|
|
154
|
+
candidates.push(path_1.default.join(appdata, 'Huawei', "DevEcoStudio".concat(devEcoVersion), 'options', 'deviceManager.xml'));
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
throw new core_1.DescriptiveError({
|
|
158
|
+
whatHappened: "Unsupported operating system.",
|
|
159
|
+
whatCanUserDo: ['Please run the RNOH project on Windows or macOS.']
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return candidates;
|
|
163
|
+
}
|
|
164
|
+
function parseDeviceManagerXml(xmlContent) {
|
|
165
|
+
var info = {};
|
|
166
|
+
var optionRegex = /<option\b[^>]*?>/gi;
|
|
167
|
+
var m;
|
|
168
|
+
while ((m = optionRegex.exec(xmlContent))) {
|
|
169
|
+
var tag = m[0];
|
|
170
|
+
var nameMatch = tag.match(/\bname=["']([^"']+)["']/i);
|
|
171
|
+
if (!nameMatch)
|
|
172
|
+
continue;
|
|
173
|
+
var valueMatch = tag.match(/\bvalue=["']([^"']+)["']/i);
|
|
174
|
+
if (!valueMatch)
|
|
175
|
+
continue;
|
|
176
|
+
var name_1 = nameMatch[1];
|
|
177
|
+
var value = valueMatch[1];
|
|
178
|
+
if (name_1 === 'imageDeployPath' && !info.imageRoot) {
|
|
179
|
+
info.imageRoot = value;
|
|
180
|
+
}
|
|
181
|
+
else if (name_1 === 'openharmonyDeployPath' && !info.instancePath) {
|
|
182
|
+
info.instancePath = value;
|
|
183
|
+
}
|
|
184
|
+
if (info.imageRoot && info.instancePath)
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
return info;
|
|
188
|
+
}
|
|
189
|
+
function candidateEmulatorExecutables(devEcoStudioToolsPath) {
|
|
190
|
+
var list = [];
|
|
191
|
+
var add = function () {
|
|
192
|
+
var segs = [];
|
|
193
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
194
|
+
segs[_i] = arguments[_i];
|
|
195
|
+
}
|
|
196
|
+
return list.push(devEcoStudioToolsPath.copyWithNewSegment.apply(devEcoStudioToolsPath, segs).toString());
|
|
197
|
+
};
|
|
198
|
+
if (process.platform === 'win32') {
|
|
199
|
+
add('emulator', 'Emulator.exe');
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
add('emulator', 'Emulator');
|
|
203
|
+
}
|
|
204
|
+
return list;
|
|
205
|
+
}
|
|
206
|
+
function pickExisting(paths) {
|
|
207
|
+
return paths.find(function (p) { return fs_extra_1.default.existsSync(p); });
|
|
208
|
+
}
|
|
209
|
+
function resolveInstanceAndImageRoot(env, devEcoVersion) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
211
|
+
var defaultInstanceCandidates, defaultImageCandidates, home, localAppData, xmlInfo, _i, _a, xmlPath, content, error_3, resolvedInstance, resolvedImageRoot;
|
|
212
|
+
return __generator(this, function (_b) {
|
|
213
|
+
switch (_b.label) {
|
|
214
|
+
case 0:
|
|
215
|
+
defaultInstanceCandidates = [];
|
|
216
|
+
defaultImageCandidates = [];
|
|
217
|
+
if (process.platform === 'darwin') {
|
|
218
|
+
home = env.HOME || '';
|
|
219
|
+
defaultInstanceCandidates.push(path_1.default.join(home, '.Huawei', 'Emulator', 'deployed'));
|
|
220
|
+
defaultImageCandidates.push(path_1.default.join(home, 'Library', 'Huawei', 'Sdk'));
|
|
221
|
+
}
|
|
222
|
+
else if (process.platform === 'win32') {
|
|
223
|
+
localAppData = env.LOCALAPPDATA || '';
|
|
224
|
+
defaultInstanceCandidates.push(path_1.default.join(localAppData, 'Huawei', 'Emulator', 'deployed'));
|
|
225
|
+
defaultImageCandidates.push(path_1.default.join(localAppData, 'Huawei', 'Sdk'));
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
throw new core_1.DescriptiveError({
|
|
229
|
+
whatHappened: "Unsupported operating system.",
|
|
230
|
+
whatCanUserDo: ['Please run the RNOH project on Windows or macOS.']
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
xmlInfo = {};
|
|
234
|
+
_i = 0, _a = resolveDeviceManagerXml(env, devEcoVersion);
|
|
235
|
+
_b.label = 1;
|
|
236
|
+
case 1:
|
|
237
|
+
if (!(_i < _a.length)) return [3 /*break*/, 6];
|
|
238
|
+
xmlPath = _a[_i];
|
|
239
|
+
if (!fs_extra_1.default.existsSync(xmlPath)) return [3 /*break*/, 5];
|
|
240
|
+
_b.label = 2;
|
|
241
|
+
case 2:
|
|
242
|
+
_b.trys.push([2, 4, , 5]);
|
|
243
|
+
return [4 /*yield*/, fs_extra_1.default.readFile(xmlPath, 'utf-8')];
|
|
244
|
+
case 3:
|
|
245
|
+
content = _b.sent();
|
|
246
|
+
xmlInfo = parseDeviceManagerXml(content);
|
|
247
|
+
if (xmlInfo.instancePath || xmlInfo.imageRoot)
|
|
248
|
+
return [3 /*break*/, 6];
|
|
249
|
+
return [3 /*break*/, 5];
|
|
250
|
+
case 4:
|
|
251
|
+
error_3 = _b.sent();
|
|
252
|
+
throw new core_1.DescriptiveError({
|
|
253
|
+
whatHappened: "Failed to read or parse device manager XML at ".concat(xmlPath, ": ").concat((error_3 === null || error_3 === void 0 ? void 0 : error_3.message) || error_3),
|
|
254
|
+
whatCanUserDo: [
|
|
255
|
+
'Verify that the DevEco Studio deviceManager.xml file exists and is readable.',
|
|
256
|
+
'Check if DEVECO_SDK_HOME environment variable is set correctly.',
|
|
257
|
+
'Ensure DevEco Studio has been launched at least once to generate configuration files.',
|
|
258
|
+
'Check file permissions for the DevEco Studio configuration directory.'
|
|
259
|
+
],
|
|
260
|
+
extraData: error_3,
|
|
261
|
+
});
|
|
262
|
+
case 5:
|
|
263
|
+
_i++;
|
|
264
|
+
return [3 /*break*/, 1];
|
|
265
|
+
case 6:
|
|
266
|
+
resolvedInstance = pickExisting(defaultInstanceCandidates);
|
|
267
|
+
resolvedImageRoot = pickExisting(defaultImageCandidates);
|
|
268
|
+
if (xmlInfo.imageRoot) {
|
|
269
|
+
resolvedImageRoot = xmlInfo.imageRoot;
|
|
270
|
+
}
|
|
271
|
+
if (xmlInfo.instancePath) {
|
|
272
|
+
resolvedInstance = xmlInfo.instancePath;
|
|
273
|
+
}
|
|
274
|
+
if (!resolvedInstance || !resolvedImageRoot) {
|
|
275
|
+
throw new core_1.DescriptiveError({
|
|
276
|
+
whatHappened: "No simulator instance or image root directory detected.",
|
|
277
|
+
whatCanUserDo: [
|
|
278
|
+
'Have you already launched the simulator via DevEco Studio?'
|
|
279
|
+
]
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
return [2 /*return*/, { instancePath: resolvedInstance, imageRoot: resolvedImageRoot }];
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
function launchHarmonySimulator(opt) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
+
var devEcoStudioToolsPath, cli, logger, devEcoVersion, versionList, majorVersion, paths, emulatorExe, simulatorName, quoteIfNeeded, args, child;
|
|
290
|
+
return __generator(this, function (_a) {
|
|
291
|
+
switch (_a.label) {
|
|
292
|
+
case 0:
|
|
293
|
+
devEcoStudioToolsPath = opt.devEcoStudioToolsPath, cli = opt.cli, logger = opt.logger;
|
|
294
|
+
return [4 /*yield*/, getDevEcoVersion(devEcoStudioToolsPath)];
|
|
295
|
+
case 1:
|
|
296
|
+
devEcoVersion = _a.sent();
|
|
297
|
+
if (!devEcoVersion) {
|
|
298
|
+
throw new core_1.DescriptiveError({
|
|
299
|
+
whatHappened: "DevEco Studio version could not be obtained.",
|
|
300
|
+
whatCanUserDo: [
|
|
301
|
+
'Verify DevEco Studio is properly installed and the tools path is correct.',
|
|
302
|
+
'Check if product-info.json file exists in the DevEco Studio installation directory.',
|
|
303
|
+
'Ensure you have the latest version of DevEco Studio installed.'
|
|
304
|
+
]
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
if (!isSupportedVersion(devEcoVersion)) {
|
|
308
|
+
throw new core_1.DescriptiveError({
|
|
309
|
+
whatHappened: "Current DevEco SDK version (".concat(devEcoVersion, ") does not support launching the simulator via command line (requires >= ").concat(MIN_SUPPORTED_VERSION.join('.'), ")."),
|
|
310
|
+
whatCanUserDo: [
|
|
311
|
+
"Update DevEco Studio to version ".concat(MIN_SUPPORTED_VERSION.join('.'), " or higher."),
|
|
312
|
+
'Check the official DevEco Studio website for the latest version.',
|
|
313
|
+
'Launch the simulator manually from DevEco Studio IDE.'
|
|
314
|
+
]
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
versionList = devEcoVersion.split('.');
|
|
318
|
+
majorVersion = "".concat(versionList[0], ".").concat(versionList[1]);
|
|
319
|
+
return [4 /*yield*/, resolveInstanceAndImageRoot(opt.env, majorVersion)];
|
|
320
|
+
case 2:
|
|
321
|
+
paths = _a.sent();
|
|
322
|
+
if (!paths) {
|
|
323
|
+
throw new core_1.DescriptiveError({
|
|
324
|
+
whatHappened: "Could not resolve simulator instance path or image root.",
|
|
325
|
+
whatCanUserDo: [
|
|
326
|
+
'Open DevEco Studio and launch the simulator at least once to generate configuration files.',
|
|
327
|
+
'Check if DEVECO_SDK_HOME environment variable is set correctly.',
|
|
328
|
+
'Verify that the simulator has been properly configured in DevEco Studio.',
|
|
329
|
+
'Ensure the default simulator paths exist in your system.'
|
|
330
|
+
]
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
emulatorExe = pickExisting(candidateEmulatorExecutables(devEcoStudioToolsPath));
|
|
334
|
+
if (!emulatorExe) {
|
|
335
|
+
throw new core_1.DescriptiveError({
|
|
336
|
+
whatHappened: "Emulator executable not found in DevEco Studio installation.",
|
|
337
|
+
whatCanUserDo: [
|
|
338
|
+
'Verify DevEco Studio installation is complete and not corrupted.',
|
|
339
|
+
'Check if the emulator component is installed in DevEco Studio.',
|
|
340
|
+
'Reinstall DevEco Studio if the emulator binary is missing.',
|
|
341
|
+
'Ensure the DevEco Studio tools path is correctly configured.'
|
|
342
|
+
]
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return [4 /*yield*/, getCreatedSimulators(cli, emulatorExe)];
|
|
346
|
+
case 3:
|
|
347
|
+
simulatorName = _a.sent();
|
|
348
|
+
if (simulatorName.length <= 0) {
|
|
349
|
+
throw new core_1.DescriptiveError({
|
|
350
|
+
whatHappened: "No existing HarmonyOS simulator instance detected.",
|
|
351
|
+
whatCanUserDo: [
|
|
352
|
+
'Create a simulator instance in DevEco Studio first.',
|
|
353
|
+
'Open DevEco Studio Device Manager and create a new virtual device.',
|
|
354
|
+
'Ensure the simulator instance is properly configured and available.',
|
|
355
|
+
'Check if the emulator --list command returns any valid instances.'
|
|
356
|
+
]
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
try {
|
|
360
|
+
quoteIfNeeded = function (p) {
|
|
361
|
+
return process.platform === 'win32' ? "\"".concat(p, "\"") : p;
|
|
362
|
+
};
|
|
363
|
+
args = [
|
|
364
|
+
'-hvd',
|
|
365
|
+
quoteIfNeeded(simulatorName[0].trim()),
|
|
366
|
+
'-path',
|
|
367
|
+
quoteIfNeeded(paths.instancePath),
|
|
368
|
+
'-imageRoot',
|
|
369
|
+
quoteIfNeeded(paths.imageRoot),
|
|
370
|
+
];
|
|
371
|
+
child = (0, child_process_1.spawn)(quoteIfNeeded(emulatorExe), args, {
|
|
372
|
+
cwd: path_1.default.dirname(emulatorExe),
|
|
373
|
+
detached: true,
|
|
374
|
+
stdio: 'ignore',
|
|
375
|
+
shell: process.platform === 'win32',
|
|
376
|
+
});
|
|
377
|
+
child.unref();
|
|
378
|
+
logger.info(function () { return "Launching HarmonyOS simulator in background: ".concat(simulatorName[0]); });
|
|
379
|
+
}
|
|
380
|
+
catch (e) {
|
|
381
|
+
throw new core_1.DescriptiveError({
|
|
382
|
+
whatHappened: "Failed to start simulator process: ".concat((e === null || e === void 0 ? void 0 : e.message) || e),
|
|
383
|
+
whatCanUserDo: [
|
|
384
|
+
'Confirm that the DevEco Simulator can be started manually from DevEco Studio.',
|
|
385
|
+
'Ensure no stale simulator process is blocking required ports.',
|
|
386
|
+
'Reinstall or repair DevEco Studio if the simulator binary is corrupted.'
|
|
387
|
+
],
|
|
388
|
+
extraData: e,
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
return [2 /*return*/];
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./LaunchSimulator"), exports);
|