mirror of
https://gitee.com/openharmony/developtools_ace_ets2bundle
synced 2024-11-23 08:29:55 +00:00
!2818 Rollback: Install the tsc and arkguard
Merge pull request !2818 from zhangchen168/1205-rollback
This commit is contained in:
commit
06fcbda35a
27
BUILD.gn
27
BUILD.gn
@ -38,7 +38,6 @@ action("build_ets_loader_library") {
|
||||
deps = [
|
||||
":components",
|
||||
":form_components",
|
||||
":install_arkguard_tsc",
|
||||
":server",
|
||||
]
|
||||
script = "build_ets_loader_library.py"
|
||||
@ -137,10 +136,7 @@ ets_loader_sources = [
|
||||
]
|
||||
|
||||
ohos_copy("ets_loader") {
|
||||
deps = [
|
||||
":build_ets_loader_library",
|
||||
":install_arkguard_tsc",
|
||||
]
|
||||
deps = [ ":build_ets_loader_library" ]
|
||||
sources = ets_loader_sources
|
||||
deps += [ ":build_ets_sysResource" ]
|
||||
sources += [ ets_sysResource ]
|
||||
@ -213,10 +209,7 @@ ohos_copy("ets_loader_declaration") {
|
||||
}
|
||||
|
||||
ohos_copy("ets_loader_ark") {
|
||||
deps = [
|
||||
":build_ets_loader_library",
|
||||
":install_arkguard_tsc",
|
||||
]
|
||||
deps = [ ":build_ets_loader_library" ]
|
||||
sources = ets_loader_sources
|
||||
deps += [ ":build_ets_sysResource" ]
|
||||
sources += [ ets_sysResource ]
|
||||
@ -305,19 +298,3 @@ ohos_copy("ets_loader_ark_hap") {
|
||||
outputs = [ target_out_dir + "/../../developtools/api/{{source_file_part}}" ]
|
||||
module_install_name = ""
|
||||
}
|
||||
|
||||
action("install_arkguard_tsc") {
|
||||
deps = [
|
||||
"//arkcompiler/ets_frontend/arkguard:build_arkguard",
|
||||
"//third_party/typescript:build_typescript",
|
||||
]
|
||||
script = "install_arkguard_tsc.py"
|
||||
args = [
|
||||
rebase_path(
|
||||
"${root_out_dir}/obj/third_party/typescript/ohos-typescript-4.9.5-r4.tgz"),
|
||||
rebase_path(
|
||||
"${root_out_dir}/obj/arkcompiler/ets_frontend/arkguard/arkguard-1.1.3.tgz"),
|
||||
rebase_path("//developtools/ace_ets2bundle/compiler"),
|
||||
]
|
||||
outputs = [ "${target_out_dir}/${target_name}.stamp" ]
|
||||
}
|
||||
|
53
compiler/package-lock.json
generated
53
compiler/package-lock.json
generated
@ -1910,6 +1910,48 @@
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
||||
"dev": true
|
||||
},
|
||||
"arkguard": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/arkguard/-/arkguard-1.1.3.tgz",
|
||||
"integrity": "sha512-iRedoO1wtiZNy2nJA6Q7+eqLfOjSV7LXfuRNpo6MNDuKilNyJuOLSu/CN7GObCKj5GEGD8uJdys5ix2FsqjTPQ==",
|
||||
"requires": {
|
||||
"commander": "^9.3.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
"json5": "^2.2.3",
|
||||
"source-map": "0.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "9.5.0",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/commander/-/commander-9.5.0.tgz",
|
||||
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.1.0.tgz",
|
||||
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-2.0.1.tgz",
|
||||
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"array-union": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/array-union/-/array-union-1.0.2.tgz",
|
||||
@ -3196,8 +3238,7 @@
|
||||
"json5": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "4.0.0",
|
||||
@ -4105,6 +4146,14 @@
|
||||
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "npm:ohos-typescript@4.9.5-r6",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/ohos-typescript/-/ohos-typescript-4.9.5-r6.tgz",
|
||||
"integrity": "sha512-gwQq8e28xPdGNrIUXYM175N53fevIJOOuSOB45+X8neyhXT6nk8A+W6H46ejXIgMnHCR31OYidKrqAtGY26AhQ==",
|
||||
"requires": {
|
||||
"json5": "2.2.3"
|
||||
}
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.17.4",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/uglify-js/-/uglify-js-3.17.4.tgz",
|
||||
|
@ -48,6 +48,8 @@
|
||||
"log4js": "6.7.1",
|
||||
"source-map": "0.7.4",
|
||||
"ts-loader": "9.4.2",
|
||||
"typescript": "npm:ohos-typescript@4.9.5-r6",
|
||||
"arkguard": "1.1.3",
|
||||
"webpack": "5.72.1",
|
||||
"webpack-cli": "5.0.2",
|
||||
"ws": "8.5.0"
|
||||
|
@ -1,50 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import shutil
|
||||
import tarfile
|
||||
|
||||
|
||||
def extract(package_path, dest_path, package_name):
|
||||
dest_package_path = os.path.join(dest_path, package_name)
|
||||
if (os.path.exists(dest_package_path)):
|
||||
return
|
||||
try:
|
||||
with tarfile.open(package_path, 'r:gz') as tar:
|
||||
tar.extractall(path=dest_path)
|
||||
except tarfile.TarError as e:
|
||||
print(f'Error extracting files: {e}')
|
||||
package_path = os.path.join(dest_path, 'package')
|
||||
if not (os.path.exists(dest_package_path)):
|
||||
# The default name of the decompressed npm package is package. It needs to be renamed to the specified name.
|
||||
shutil.copytree(package_path, dest_package_path, symlinks=True, dirs_exist_ok=True)
|
||||
shutil.rmtree(package_path)
|
||||
|
||||
|
||||
def run(args):
|
||||
tsc_path = args[0]
|
||||
arkguard_path = args[1]
|
||||
source_path = args[2]
|
||||
node_modules_path = os.path.join(source_path, "node_modules")
|
||||
extract(tsc_path, node_modules_path, 'typescript')
|
||||
extract(arkguard_path, node_modules_path, 'arkguard')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run(sys.argv[1:])
|
Loading…
Reference in New Issue
Block a user