@react-native-oh/react-native-harmony-cli 0.0.27 → 0.0.30
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/README.md +12 -0
- package/dist/assetResolver.js +6 -0
- package/dist/autolinking/Autolinking.js +275 -0
- package/dist/autolinking/index.js +23 -0
- package/dist/codegen/core/CodeGenerator.js +6 -0
- package/dist/codegen/core/CodegenError.js +6 -0
- package/dist/codegen/core/EventUtils.js +6 -0
- package/dist/codegen/core/TypeAnnotationToTS.js +6 -0
- package/dist/codegen/core/UberSchema.js +9 -3
- package/dist/codegen/core/index.js +6 -0
- package/dist/codegen/generators/AppBuildTimeGlueCodeGenerator.js +6 -0
- package/dist/codegen/generators/ArkTSComponentCodeGeneratorArkTS.js +6 -0
- package/dist/codegen/generators/ArkTSComponentCodeGeneratorCAPI.js +6 -0
- package/dist/codegen/generators/CppComponentCodeGenerator.js +6 -0
- package/dist/codegen/generators/LibGlueCodeGenerator.js +6 -0
- package/dist/codegen/generators/NativeModuleCodeGenerator.js +6 -0
- package/dist/codegen/generators/SharedComponentCodeGenerator.js +6 -0
- package/dist/codegen/generators/UberGeneratorV1.js +6 -0
- package/dist/codegen/generators/UberGeneratorV2.js +6 -0
- package/dist/codegen/generators/index.js +6 -0
- package/dist/codegen/index.js +6 -0
- package/dist/codegen/templates/BaseComponentInstanceHTemplate.js +6 -0
- package/dist/codegen/templates/BasePackageHTemplate.js +6 -0
- package/dist/codegen/templates/ComponentDescriptorHTemplate.js +6 -0
- package/dist/codegen/templates/ComponentJSIBinderHTemplate.js +6 -0
- package/dist/codegen/templates/ComponentUtilsTSTemplate.js +6 -0
- package/dist/codegen/templates/IndexTSTemplate.js +6 -0
- package/dist/codegen/templates/RNOHGeneratedPackageHTemplate.js +6 -0
- package/dist/codegen/templates/TurboModuleCppTemplate.js +6 -0
- package/dist/codegen/templates/TurboModuleHTemplate.js +6 -0
- package/dist/codegen/templates/TurboModuleSpecTSTemplate.js +6 -0
- package/dist/codegen/templates/index.js +6 -0
- package/dist/commands/bundle-harmony.js +7 -1
- package/dist/commands/codegen-harmony.js +16 -10
- package/dist/commands/codegen-lib-harmony.js +6 -0
- package/dist/commands/create-metro-host-constants.js +6 -0
- package/dist/commands/index.js +7 -0
- package/dist/commands/link-harmony.js +97 -0
- package/dist/commands/pack-harmony.js +6 -0
- package/dist/commands/unpack-harmony.js +10 -3
- package/dist/commands/verify-package-harmony.js +6 -0
- package/dist/core/AbsolutePath.js +12 -0
- package/dist/core/CodegenConfig.js +6 -0
- package/dist/core/DescriptiveError.js +6 -0
- package/dist/core/FileSystem.js +33 -0
- package/dist/core/OHPackageJSON5.js +6 -0
- package/dist/core/PackageJSON.js +15 -7
- package/dist/core/ProjectDependenciesManager.js +31 -18
- package/dist/core/ValidationError.js +6 -0
- package/dist/core/ValueObject.js +6 -0
- package/dist/core/fs.js +6 -0
- package/dist/core/index.js +7 -0
- package/dist/index.js +7 -0
- package/dist/io/CliExecutor.js +35 -0
- package/dist/io/Logger.js +9 -0
- package/dist/io/RealFS.js +68 -0
- package/dist/io/TarGz.js +6 -0
- package/dist/io/__fixtures__.js +127 -0
- package/dist/io/fsUtils.js +20 -6
- package/dist/io/index.js +7 -0
- package/dist/package-verifier/checks/HarmonyDirContainsOnlyHarsCheck.js +6 -0
- package/dist/package-verifier/checks/HarmonyDirExistsCheck.js +6 -0
- package/dist/package-verifier/checks/NpmAnAndOhPackageVersionsAreEqual.js +6 -0
- package/dist/package-verifier/checks/OhPackageNameFollowsNamingConventionCheck.js +6 -0
- package/dist/package-verifier/checks/index.js +6 -0
- package/dist/package-verifier/index.js +6 -0
- package/dist/package-verifier/types.js +6 -0
- package/dist/package-verifier/verify-package.js +7 -1
- package/jest.config.js +7 -0
- package/package.json +8 -2
- package/react-native.config.js +7 -0
- package/src/assetResolver.ts +7 -0
- package/src/autolinking/Autolinking.test.ts +483 -0
- package/src/autolinking/Autolinking.ts +384 -0
- package/src/autolinking/index.ts +8 -0
- package/src/codegen/core/CodeGenerator.ts +7 -0
- package/src/codegen/core/CodegenError.ts +7 -0
- package/src/codegen/core/EventUtils.ts +7 -0
- package/src/codegen/core/TypeAnnotationToTS.test.ts +7 -0
- package/src/codegen/core/TypeAnnotationToTS.ts +7 -0
- package/src/codegen/core/UberSchema.ts +11 -1
- package/src/codegen/core/index.ts +7 -0
- package/src/codegen/generators/AppBuildTimeGlueCodeGenerator.ts +7 -0
- package/src/codegen/generators/ArkTSComponentCodeGeneratorArkTS.ts +7 -0
- package/src/codegen/generators/ArkTSComponentCodeGeneratorCAPI.ts +7 -0
- package/src/codegen/generators/CppComponentCodeGenerator.ts +7 -0
- package/src/codegen/generators/LibGlueCodeGenerator.ts +7 -0
- package/src/codegen/generators/NativeModuleCodeGenerator.ts +7 -0
- package/src/codegen/generators/SharedComponentCodeGenerator.ts +7 -0
- package/src/codegen/generators/UberGeneratorV1.ts +7 -0
- package/src/codegen/generators/UberGeneratorV2.ts +7 -0
- package/src/codegen/generators/index.ts +7 -0
- package/src/codegen/index.ts +7 -0
- package/src/codegen/templates/BaseComponentInstanceHTemplate.ts +7 -0
- package/src/codegen/templates/BasePackageHTemplate.ts +7 -0
- package/src/codegen/templates/ComponentDescriptorHTemplate.ts +7 -0
- package/src/codegen/templates/ComponentJSIBinderHTemplate.ts +7 -0
- package/src/codegen/templates/ComponentUtilsTSTemplate.ts +7 -0
- package/src/codegen/templates/IndexTSTemplate.ts +7 -0
- package/src/codegen/templates/RNOHGeneratedPackageHTemplate.ts +7 -0
- package/src/codegen/templates/TurboModuleCppTemplate.ts +7 -0
- package/src/codegen/templates/TurboModuleHTemplate.ts +7 -0
- package/src/codegen/templates/TurboModuleSpecTSTemplate.ts +7 -0
- package/src/codegen/templates/index.ts +7 -0
- package/src/commands/bundle-harmony.ts +8 -2
- package/src/commands/codegen-harmony.ts +19 -6
- package/src/commands/codegen-lib-harmony.ts +7 -0
- package/src/commands/create-metro-host-constants.ts +7 -0
- package/src/commands/index.ts +8 -0
- package/src/commands/link-harmony.ts +102 -0
- package/src/commands/pack-harmony.ts +7 -0
- package/src/commands/unpack-harmony.ts +12 -3
- package/src/commands/verify-package-harmony.ts +7 -0
- package/src/core/AbsolutePath.ts +16 -0
- package/src/core/CodegenConfig.ts +7 -0
- package/src/core/DescriptiveError.ts +7 -0
- package/src/core/FileSystem.ts +57 -0
- package/src/core/OHPackageJSON5.ts +7 -0
- package/src/core/PackageJSON.ts +40 -8
- package/src/core/ProjectDependenciesManager.ts +40 -14
- package/src/core/ValidationError.ts +7 -0
- package/src/core/ValueObject.ts +7 -0
- package/src/core/fs.ts +7 -0
- package/src/core/index.ts +8 -0
- package/src/index.ts +9 -0
- package/src/io/CliExecutor.ts +47 -0
- package/src/io/Logger.ts +11 -0
- package/src/io/RealFS.ts +62 -0
- package/src/io/TarGz.ts +7 -0
- package/src/io/__fixtures__.ts +135 -0
- package/src/io/fsUtils.ts +26 -6
- package/src/io/index.ts +8 -0
- package/src/package-verifier/checks/HarmonyDirContainsOnlyHarsCheck.ts +7 -0
- package/src/package-verifier/checks/HarmonyDirExistsCheck.ts +7 -0
- package/src/package-verifier/checks/NpmAnAndOhPackageVersionsAreEqual.ts +7 -0
- package/src/package-verifier/checks/OhPackageNameFollowsNamingConventionCheck.ts +7 -0
- package/src/package-verifier/checks/index.ts +7 -0
- package/src/package-verifier/index.ts +7 -0
- package/src/package-verifier/types.ts +7 -0
- package/src/package-verifier/verify-package.ts +9 -1
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @react-native-oh/react-native-harmony-cli
|
|
2
|
+
|
|
3
|
+
Please refer to: [RNOH repo](https://gitee.com/openharmony-sig/ohos_react_native) for more detail.
|
|
4
|
+
|
|
5
|
+
# Documentation
|
|
6
|
+
|
|
7
|
+
- [中文](https://gitee.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/README.md)
|
|
8
|
+
- [English](https://gitee.com/openharmony-sig/ohos_react_native/blob/master/docs/en/README.md)
|
|
9
|
+
|
|
10
|
+
# License
|
|
11
|
+
|
|
12
|
+
This library is licensed under The [MIT License (MIT)](https://gitee.com/openharmony-sig/ohos_react_native)
|
package/dist/assetResolver.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.getAssetDestRelativePath = void 0;
|
|
4
10
|
function getAssetDestRelativePath(asset) {
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT 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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Autolinking = void 0;
|
|
22
|
+
const json5_1 = __importDefault(require("json5"));
|
|
23
|
+
const core_1 = require("../core");
|
|
24
|
+
const mustache_1 = __importDefault(require("mustache"));
|
|
25
|
+
const case_1 = __importDefault(require("case"));
|
|
26
|
+
const ETS_RNOH_PACKAGES_FACTORY_TEMPLATE = `
|
|
27
|
+
/*
|
|
28
|
+
* This file was generated by RNOH autolinking.
|
|
29
|
+
* DO NOT modify it manually, your changes WILL be overwritten.
|
|
30
|
+
*/
|
|
31
|
+
import type { RNPackageContext, RNOHPackage } from '@rnoh/react-native-openharmony';
|
|
32
|
+
{{#libraries}}
|
|
33
|
+
import {{etsRNOHPackageClassName}} from '{{{ohPackageName}}}';
|
|
34
|
+
{{/libraries}}
|
|
35
|
+
|
|
36
|
+
export function createRNOHPackages(ctx: RNPackageContext): RNOHPackage[] {
|
|
37
|
+
return [
|
|
38
|
+
{{#libraries}}
|
|
39
|
+
new {{etsRNOHPackageClassName}}(ctx),
|
|
40
|
+
{{/libraries}}
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
`.trimStart();
|
|
44
|
+
const CPP_RNOH_PACKAGES_FACTORY_TEMPLATE = `
|
|
45
|
+
/*
|
|
46
|
+
* This file was generated by RNOH autolinking.
|
|
47
|
+
* DO NOT modify it manually, your changes WILL be overwritten.
|
|
48
|
+
*/
|
|
49
|
+
// clang-format off
|
|
50
|
+
#pragma once
|
|
51
|
+
#include "RNOH/Package.h"
|
|
52
|
+
{{#libraries}}
|
|
53
|
+
#include "{{etsRNOHPackageClassName}}.h"
|
|
54
|
+
{{/libraries}}
|
|
55
|
+
|
|
56
|
+
std::vector<rnoh::Package::Shared> createRNOHPackages(const rnoh::Package::Context &ctx) {
|
|
57
|
+
return {
|
|
58
|
+
{{#libraries}}
|
|
59
|
+
std::make_shared<rnoh::{{cppRNOHPackageClassName}}>(ctx),
|
|
60
|
+
{{/libraries}}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
`.trimStart();
|
|
64
|
+
const CMAKE_AUTOLINKING_TEMPLATE = `
|
|
65
|
+
# This file was generated by RNOH autolinking.
|
|
66
|
+
# DO NOT modify it manually, your changes WILL be overwritten.
|
|
67
|
+
cmake_minimum_required(VERSION 3.5)
|
|
68
|
+
|
|
69
|
+
# @api
|
|
70
|
+
function(autolink_libraries target)
|
|
71
|
+
{{#libraries}}
|
|
72
|
+
add_subdirectory("\${OH_MODULES_DIR}/{{{ohPackageName}}}/src/main/cpp" ./{{cmakeLibraryTargetName}})
|
|
73
|
+
{{/libraries}}
|
|
74
|
+
|
|
75
|
+
set(AUTOLINKED_LIBRARIES
|
|
76
|
+
{{#libraries}}
|
|
77
|
+
{{cmakeLibraryTargetName}}
|
|
78
|
+
{{/libraries}}
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
foreach(lib \${AUTOLINKED_LIBRARIES})
|
|
82
|
+
target_link_libraries(\${target} PUBLIC \${lib})
|
|
83
|
+
endforeach()
|
|
84
|
+
endfunction()
|
|
85
|
+
`.trimStart();
|
|
86
|
+
class Autolinking {
|
|
87
|
+
constructor(fs, logger) {
|
|
88
|
+
this.fs = fs;
|
|
89
|
+
this.logger = logger;
|
|
90
|
+
}
|
|
91
|
+
prepareInput(config) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
var _a;
|
|
94
|
+
if (config.includedNpmPackageNames.size > 0 &&
|
|
95
|
+
config.excludedNpmPackageNames.size > 0) {
|
|
96
|
+
throw new core_1.DescriptiveError({
|
|
97
|
+
whatHappened: 'Tried to exclude and include npm packages.',
|
|
98
|
+
whatCanUserDo: {
|
|
99
|
+
default: ['Include or exclude npm packages, but not both.'],
|
|
100
|
+
},
|
|
101
|
+
extraData: {
|
|
102
|
+
includedNpmPackageNamesCount: config.includedNpmPackageNames.size,
|
|
103
|
+
excludedNpmPackageNamesCount: config.excludedNpmPackageNames.size,
|
|
104
|
+
includedNpmPackageNames: config.includedNpmPackageNames,
|
|
105
|
+
excludedNpmPackageNames: config.excludedNpmPackageNames,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const harmonyProjectPath = (_a = config.harmonyProjectPath) !== null && _a !== void 0 ? _a : new core_1.AbsolutePath('./');
|
|
110
|
+
const nodeModuleHarPaths = [];
|
|
111
|
+
const autolinkableLibraries = [];
|
|
112
|
+
const projectRootPath = config.nodeModulesPath.copyWithNewSegment('..');
|
|
113
|
+
const skippedLibraryNpmPackageNames = [];
|
|
114
|
+
yield new core_1.ProjectDependenciesManager(this.fs, projectRootPath).forEachAsync((dependency) => {
|
|
115
|
+
var _a;
|
|
116
|
+
const harFilePath = dependency.getHarFilePath();
|
|
117
|
+
if (!harFilePath) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
nodeModuleHarPaths.push(harFilePath);
|
|
121
|
+
const packageJson = dependency.readPackageJSON();
|
|
122
|
+
const providedAutolinkingConfig = (_a = packageJson.harmony) === null || _a === void 0 ? void 0 : _a.autolinking;
|
|
123
|
+
if (providedAutolinkingConfig === undefined ||
|
|
124
|
+
providedAutolinkingConfig === null ||
|
|
125
|
+
(config.excludedNpmPackageNames.has(packageJson.name) &&
|
|
126
|
+
config.excludedNpmPackageNames.size > 0) ||
|
|
127
|
+
(!config.includedNpmPackageNames.has(packageJson.name) &&
|
|
128
|
+
config.includedNpmPackageNames.size > 0)) {
|
|
129
|
+
skippedLibraryNpmPackageNames.push(packageJson.name);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const autolinkingConfig = providedAutolinkingConfig === true ? {} : providedAutolinkingConfig;
|
|
133
|
+
autolinkableLibraries.push({
|
|
134
|
+
npmPackageName: packageJson.name,
|
|
135
|
+
etsRNOHPackageClassName: autolinkingConfig === null || autolinkingConfig === void 0 ? void 0 : autolinkingConfig.etsPackageClassName,
|
|
136
|
+
cppRNOHPackageClassName: autolinkingConfig === null || autolinkingConfig === void 0 ? void 0 : autolinkingConfig.cppPackageClassName,
|
|
137
|
+
cmakeLibraryTargetName: autolinkingConfig === null || autolinkingConfig === void 0 ? void 0 : autolinkingConfig.cmakeLibraryTargetName,
|
|
138
|
+
ohPackageName: autolinkingConfig === null || autolinkingConfig === void 0 ? void 0 : autolinkingConfig.ohPackageName,
|
|
139
|
+
harFilePathRelativeToHarmony: harFilePath
|
|
140
|
+
.relativeTo(harmonyProjectPath)
|
|
141
|
+
.toString(),
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
const ohPackagePath = harmonyProjectPath.copyWithNewSegment(config.ohPackagePathRelativeToHarmony);
|
|
145
|
+
const ohPackageContent = yield this.fs.readText(ohPackagePath);
|
|
146
|
+
const cppRNOHPackagesFactoryPath = harmonyProjectPath.copyWithNewSegment(config.cppRNOHPackagesFactoryPathRelativeToHarmony);
|
|
147
|
+
const cmakeAutolinkingPath = harmonyProjectPath.copyWithNewSegment(config.cmakeAutolinkPathRelativeToHarmony);
|
|
148
|
+
return {
|
|
149
|
+
projectRootPath,
|
|
150
|
+
skippedLibraryNpmPackageNames,
|
|
151
|
+
etsRNOHPackagesFactoryPath: harmonyProjectPath.copyWithNewSegment(config.etsRNOHPackagesFactoryPathRelativeToHarmony),
|
|
152
|
+
cppRNOHPackagesFactoryPath,
|
|
153
|
+
cmakeAutolinkingPath: cmakeAutolinkingPath,
|
|
154
|
+
ohPackagePathAndContent: [ohPackagePath, ohPackageContent],
|
|
155
|
+
autolinkableLibraries,
|
|
156
|
+
nodeModuleHarFilePathsRelativeToHarmony: nodeModuleHarPaths.map((p) => p.relativeTo(harmonyProjectPath).toString()),
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
evaluate(input) {
|
|
161
|
+
const autolinkableLibraries = input.autolinkableLibraries.map((lib) => {
|
|
162
|
+
var _a, _b, _c, _d;
|
|
163
|
+
return Object.assign(Object.assign({}, lib), { etsRNOHPackageClassName: (_a = lib.etsRNOHPackageClassName) !== null && _a !== void 0 ? _a : this.npmPackageNameToRNOHPackageClassName(lib.npmPackageName), cppRNOHPackageClassName: (_b = lib.cppRNOHPackageClassName) !== null && _b !== void 0 ? _b : this.npmPackageNameToRNOHPackageClassName(lib.npmPackageName), cmakeLibraryTargetName: (_c = lib.cmakeLibraryTargetName) !== null && _c !== void 0 ? _c : this.npmPackageNameToCMakeLibraryTargetName(lib.npmPackageName), ohPackageName: (_d = lib.ohPackageName) !== null && _d !== void 0 ? _d : this.npmPackageNameToOHPackageName(lib.npmPackageName) });
|
|
164
|
+
});
|
|
165
|
+
autolinkableLibraries.sort((a, b) => {
|
|
166
|
+
if (a.npmPackageName < b.npmPackageName)
|
|
167
|
+
return -1;
|
|
168
|
+
if (a.npmPackageName > b.npmPackageName)
|
|
169
|
+
return 1;
|
|
170
|
+
return 0;
|
|
171
|
+
});
|
|
172
|
+
const ohPackage = json5_1.default.parse(input.ohPackagePathAndContent[1]);
|
|
173
|
+
const autolinkableHarFilePathsRelativeToHarmony = autolinkableLibraries.map((lib) => lib.harFilePathRelativeToHarmony);
|
|
174
|
+
const unmanagedNativeDependencySpecifierByName = {};
|
|
175
|
+
Object.entries(ohPackage.dependencies).forEach(([name, dependencySpecifier]) => {
|
|
176
|
+
if (!dependencySpecifier.includes('file:')) {
|
|
177
|
+
unmanagedNativeDependencySpecifierByName[name] = dependencySpecifier;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
const harFilePathRelativeToHarmony = dependencySpecifier.replace('file:', '');
|
|
181
|
+
if (!autolinkableHarFilePathsRelativeToHarmony.includes(harFilePathRelativeToHarmony) &&
|
|
182
|
+
input.nodeModuleHarFilePathsRelativeToHarmony.includes(harFilePathRelativeToHarmony)) {
|
|
183
|
+
unmanagedNativeDependencySpecifierByName[name] =
|
|
184
|
+
dependencySpecifier;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
const managedNativeDependencySpecifierByName = {};
|
|
189
|
+
for (const library of autolinkableLibraries) {
|
|
190
|
+
managedNativeDependencySpecifierByName[library.ohPackageName] =
|
|
191
|
+
'file:' + library.harFilePathRelativeToHarmony;
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
skippedLibraryNpmPackageNames: input.skippedLibraryNpmPackageNames,
|
|
195
|
+
linkedLibraryNpmPackageNames: autolinkableLibraries.map((lib) => lib.npmPackageName),
|
|
196
|
+
projectRootPath: input.projectRootPath,
|
|
197
|
+
cppRNOHPackagesFactoryPathAndContent: [
|
|
198
|
+
input.cppRNOHPackagesFactoryPath,
|
|
199
|
+
mustache_1.default.render(CPP_RNOH_PACKAGES_FACTORY_TEMPLATE, {
|
|
200
|
+
libraries: autolinkableLibraries,
|
|
201
|
+
}),
|
|
202
|
+
],
|
|
203
|
+
etsRNOHPackagesFactoryPathAndContent: [
|
|
204
|
+
input.etsRNOHPackagesFactoryPath,
|
|
205
|
+
mustache_1.default.render(ETS_RNOH_PACKAGES_FACTORY_TEMPLATE, {
|
|
206
|
+
libraries: autolinkableLibraries,
|
|
207
|
+
}),
|
|
208
|
+
],
|
|
209
|
+
cmakeAutolinkingPathAndContent: [
|
|
210
|
+
input.cmakeAutolinkingPath,
|
|
211
|
+
mustache_1.default.render(CMAKE_AUTOLINKING_TEMPLATE, {
|
|
212
|
+
libraries: autolinkableLibraries,
|
|
213
|
+
}),
|
|
214
|
+
],
|
|
215
|
+
ohPackagePathAndContent: [
|
|
216
|
+
input.ohPackagePathAndContent[0],
|
|
217
|
+
json5_1.default.stringify(Object.assign(Object.assign({}, ohPackage), { dependencies: Object.assign(Object.assign({}, unmanagedNativeDependencySpecifierByName), managedNativeDependencySpecifierByName) }), { space: 2, quote: '"' }) + '\n',
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
npmPackageNameToRNOHPackageClassName(fullNpmPackageName) {
|
|
222
|
+
if (fullNpmPackageName.startsWith('@')) {
|
|
223
|
+
const [scopeName, packageName] = fullNpmPackageName
|
|
224
|
+
.replace('@', '')
|
|
225
|
+
.split('/');
|
|
226
|
+
return case_1.default.pascal(scopeName) + case_1.default.pascal(packageName) + 'Package';
|
|
227
|
+
}
|
|
228
|
+
return case_1.default.pascal(fullNpmPackageName) + 'Package';
|
|
229
|
+
}
|
|
230
|
+
npmPackageNameToCMakeLibraryTargetName(fullNpmPackageName) {
|
|
231
|
+
if (fullNpmPackageName.startsWith('@')) {
|
|
232
|
+
const [scopeName, packageName] = fullNpmPackageName
|
|
233
|
+
.replace('@', '')
|
|
234
|
+
.split('/');
|
|
235
|
+
return 'rnoh__' + case_1.default.snake(scopeName) + '__' + case_1.default.snake(packageName);
|
|
236
|
+
}
|
|
237
|
+
return 'rnoh__' + case_1.default.snake(fullNpmPackageName);
|
|
238
|
+
}
|
|
239
|
+
npmPackageNameToOHPackageName(fullNpmPackageName) {
|
|
240
|
+
if (fullNpmPackageName.startsWith('@')) {
|
|
241
|
+
const [scopeName, packageName] = fullNpmPackageName
|
|
242
|
+
.replace('@', '')
|
|
243
|
+
.split('/');
|
|
244
|
+
return '@rnoh/' + case_1.default.kebab(scopeName) + '--' + case_1.default.kebab(packageName);
|
|
245
|
+
}
|
|
246
|
+
return '@rnoh/' + case_1.default.kebab(fullNpmPackageName);
|
|
247
|
+
}
|
|
248
|
+
saveAndLogOutput(output) {
|
|
249
|
+
const pathAndContentPairs = [];
|
|
250
|
+
pathAndContentPairs.push(output.etsRNOHPackagesFactoryPathAndContent);
|
|
251
|
+
pathAndContentPairs.push(output.cppRNOHPackagesFactoryPathAndContent);
|
|
252
|
+
pathAndContentPairs.push(output.cmakeAutolinkingPathAndContent);
|
|
253
|
+
pathAndContentPairs.push(output.ohPackagePathAndContent);
|
|
254
|
+
pathAndContentPairs.forEach(([path, content]) => {
|
|
255
|
+
this.fs.writeTextSync(path, content);
|
|
256
|
+
});
|
|
257
|
+
output.linkedLibraryNpmPackageNames.forEach((npmPackageName) => {
|
|
258
|
+
this.logger.info((styles) => `[${styles.green(styles.bold('link'))}] ${npmPackageName}`);
|
|
259
|
+
});
|
|
260
|
+
output.skippedLibraryNpmPackageNames.forEach((npmPackageName) => {
|
|
261
|
+
this.logger.warn((styles) => `[${styles.yellow(styles.bold('skip'))}] ${npmPackageName}`);
|
|
262
|
+
});
|
|
263
|
+
this.logger.info(() => '');
|
|
264
|
+
const sortedPathsRelativeToRoot = pathAndContentPairs
|
|
265
|
+
.map(([path]) => path.relativeTo(output.projectRootPath).toString())
|
|
266
|
+
.sort();
|
|
267
|
+
sortedPathsRelativeToRoot.forEach((pathStr) => {
|
|
268
|
+
this.logger.info((styles) => styles.gray(`• ${pathStr}`));
|
|
269
|
+
});
|
|
270
|
+
this.logger.info(() => '');
|
|
271
|
+
this.logger.info((styles) => `updated ${styles.green(styles.bold(sortedPathsRelativeToRoot.length))} file(s), linked ${styles.green(styles.bold(output.linkedLibraryNpmPackageNames.length))} libraries, skipped ${styles.yellow(styles.bold(output.skippedLibraryNpmPackageNames.length))} libraries`, { prefix: true });
|
|
272
|
+
this.logger.info(() => '');
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
exports.Autolinking = Autolinking;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT 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("./Autolinking"), exports);
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.CodegenError = void 0;
|
|
4
10
|
const core_1 = require("../../core");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.createEventNameFromEventHandlerName = void 0;
|
|
4
10
|
const CodegenError_1 = require("./CodegenError");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.wrapWithQuotes = exports.getStringifiedTSDefaultValueFromPropTypeAnnotation = exports.TypeAnnotationToTS = void 0;
|
|
4
10
|
class TypeAnnotationToTS {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
9
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
10
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -45,10 +51,10 @@ class UberSchema {
|
|
|
45
51
|
throw err;
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
|
-
static fromProject(projectRootPath, onShouldAcceptCodegenConfig) {
|
|
54
|
+
static fromProject(fs, projectRootPath, onShouldAcceptCodegenConfig) {
|
|
49
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
56
|
const onShouldAcceptCodegenConfig_ = onShouldAcceptCodegenConfig !== null && onShouldAcceptCodegenConfig !== void 0 ? onShouldAcceptCodegenConfig : ((x) => true);
|
|
51
|
-
const packageJSON = core_1.PackageJSON.fromProjectRootPath(projectRootPath, projectRootPath);
|
|
57
|
+
const packageJSON = core_1.PackageJSON.fromProjectRootPath(fs, projectRootPath, projectRootPath);
|
|
52
58
|
const acceptedCodegenConfigs = [];
|
|
53
59
|
const appCodegenConfigs = packageJSON.getCodegenConfigs();
|
|
54
60
|
for (const codegenConfig of appCodegenConfigs) {
|
|
@@ -56,7 +62,7 @@ class UberSchema {
|
|
|
56
62
|
acceptedCodegenConfigs.push(codegenConfig);
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
|
-
yield new core_1.ProjectDependenciesManager(projectRootPath).forEachAsync((dependency) => {
|
|
65
|
+
yield new core_1.ProjectDependenciesManager(fs, projectRootPath).forEachAsync((dependency) => {
|
|
60
66
|
const codegenConfigs = dependency.getCodegenConfigs();
|
|
61
67
|
for (const codegenConfig of codegenConfigs) {
|
|
62
68
|
if (onShouldAcceptCodegenConfig_(codegenConfig.getVersion(), dependency.readPackageJSON().name)) {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
9
|
if (k2 === undefined) k2 = k;
|
|
4
10
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ArkTSComponentCodeGeneratorArkTS = void 0;
|
|
4
10
|
const core_1 = require("../core");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ArkTSComponentCodeGeneratorCAPI = void 0;
|
|
4
10
|
const core_1 = require("../core");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.CppComponentCodeGenerator = void 0;
|
|
4
10
|
const templates_1 = require("../templates");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.NativeModuleCodeGenerator = void 0;
|
|
4
10
|
const templates_1 = require("../templates");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.UberGeneratorV1 = void 0;
|
|
4
10
|
const core_1 = require("../core");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.UberGeneratorV2 = void 0;
|
|
4
10
|
const CppComponentCodeGenerator_1 = require("./CppComponentCodeGenerator");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
9
|
if (k2 === undefined) k2 = k;
|
|
4
10
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/dist/codegen/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
9
|
if (k2 === undefined) k2 = k;
|
|
4
10
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE-MIT file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|