From bf1baac79015bbfa69e174d32499fe93adf0209c Mon Sep 17 00:00:00 2001 From: Anton Titovets Date: Thu, 18 Sep 2025 13:47:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BD=D1=8F=D1=82=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8?= =?UTF-8?q?,=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D0=BE=20SSH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/oint_test_full_en.yml | 58 +-- .github/workflows/oint_test_full_ru.yml | 58 +-- .github/workflows/testcl.yml | 2 +- ci/cli_deb_test_en | 6 +- ci/cli_deb_test_ru | 6 +- ci/cli_rpm_test_en | 6 +- ci/cli_rpm_test_ru | 6 +- ci/cli_test_en | 4 +- ci/cli_test_ru | 4 +- ci/main | 4 +- ci/opm_push | 6 +- ci/opm_update | 4 +- ci/os/docs_main.os | 20 +- ci/os/releasemaker.os | 2 +- ci/os_deb_test_en | 2 +- ci/os_deb_test_ru | 2 +- ci/os_rpm_test_en | 2 +- ci/os_rpm_test_ru | 2 +- ci/os_test_en | 2 +- ci/os_test_ru | 2 +- ci/release | 2 +- service/iss/en.iss | 2 +- service/iss/ru.iss | 2 +- service/project.json | 2 +- service/templates/doc_en.md | 3 - service/templates/doc_ru.md | 3 - service/templates/jenkins/cli_test_deb.txt | 6 +- service/templates/jenkins/cli_test_rpm.txt | 6 +- .../templates/jenkins/cli_test_windows.txt | 4 +- service/templates/jenkins/os_test_linux.txt | 2 +- service/templates/jenkins/os_test_windows.txt | 2 +- src/addins/ssh/Cargo.lock | 351 ++++++++++++++++++ src/addins/ssh/Cargo.toml | 20 + src/addins/ssh/dependencies.log | 12 + src/addins/ssh/release.bat | 8 + src/addins/ssh/src/component/methods.rs | 0 src/addins/ssh/src/component/mod.rs | 139 +++++++ src/addins/ssh/src/component/ssh_conf.rs | 35 ++ src/addins/ssh/src/core/getset.rs | 78 ++++ src/addins/ssh/src/core/mod.rs | 53 +++ src/addins/ssh/src/lib.rs | 49 +++ src/addins/tmpl/Cargo.lock | 98 ++++- src/addins/tmpl/Cargo.toml | 8 +- src/addins/tmpl/MANIFEST.XML | 7 - src/addins/tmpl/dependencies.log | 12 + src/addins/tmpl/release.bat | 69 +--- src/addins/tmpl/src/component/methods.rs | 4 - src/addins/tmpl/src/component/mod.rs | 21 +- src/addins/tmpl/src/core/mod.rs | 1 - src/addins/tmpl/src/lib.rs | 3 +- src/en/OInt/packagedef | 2 +- .../Modules/internal/Modules/OPI_Tools.os | 2 +- .../src/CommonModules/OPI_Tools/Module.bsl | 2 +- .../OPI/src/Configuration/Configuration.mdo | 2 +- src/en/cli/data/Classes/LibraryComposition.os | 2 +- src/en/cli/packagedef | 2 +- src/ru/OInt/packagedef | 2 +- .../internal/Modules/OPI_Инструменты.os | 2 +- .../CommonModules/OPI_Инструменты/Module.bsl | 2 +- .../OPI/src/Configuration/Configuration.mdo | 2 +- src/ru/cli/data/Classes/LibraryComposition.os | 2 +- src/ru/cli/packagedef | 2 +- 62 files changed, 1012 insertions(+), 212 deletions(-) create mode 100644 src/addins/ssh/Cargo.lock create mode 100644 src/addins/ssh/Cargo.toml create mode 100644 src/addins/ssh/dependencies.log create mode 100644 src/addins/ssh/release.bat create mode 100644 src/addins/ssh/src/component/methods.rs create mode 100644 src/addins/ssh/src/component/mod.rs create mode 100644 src/addins/ssh/src/component/ssh_conf.rs create mode 100644 src/addins/ssh/src/core/getset.rs create mode 100644 src/addins/ssh/src/core/mod.rs create mode 100644 src/addins/ssh/src/lib.rs delete mode 100644 src/addins/tmpl/MANIFEST.XML create mode 100644 src/addins/tmpl/dependencies.log diff --git a/.github/workflows/oint_test_full_en.yml b/.github/workflows/oint_test_full_en.yml index 8957bff73c..c2d3acb0cf 100644 --- a/.github/workflows/oint_test_full_en.yml +++ b/.github/workflows/oint_test_full_en.yml @@ -54,7 +54,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -180,7 +180,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -298,7 +298,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -344,7 +344,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -398,7 +398,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -444,7 +444,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -490,7 +490,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -536,7 +536,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -582,7 +582,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -624,7 +624,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -702,7 +702,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -752,7 +752,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -806,7 +806,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -864,7 +864,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -914,7 +914,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -968,7 +968,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1030,7 +1030,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1084,7 +1084,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1154,7 +1154,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1256,7 +1256,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1306,7 +1306,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1372,7 +1372,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1418,7 +1418,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1468,7 +1468,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1518,7 +1518,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1568,7 +1568,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1610,7 +1610,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1672,7 +1672,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1722,7 +1722,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" diff --git a/.github/workflows/oint_test_full_ru.yml b/.github/workflows/oint_test_full_ru.yml index 3d9d0b9c22..ded3b8c344 100644 --- a/.github/workflows/oint_test_full_ru.yml +++ b/.github/workflows/oint_test_full_ru.yml @@ -54,7 +54,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -180,7 +180,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -298,7 +298,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -344,7 +344,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -398,7 +398,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -444,7 +444,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -490,7 +490,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -536,7 +536,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -582,7 +582,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -624,7 +624,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -702,7 +702,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -752,7 +752,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -806,7 +806,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -864,7 +864,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -914,7 +914,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -968,7 +968,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1030,7 +1030,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1084,7 +1084,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1154,7 +1154,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1256,7 +1256,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1306,7 +1306,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1372,7 +1372,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1418,7 +1418,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1468,7 +1468,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1518,7 +1518,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1568,7 +1568,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1610,7 +1610,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1672,7 +1672,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" @@ -1722,7 +1722,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" diff --git a/.github/workflows/testcl.yml b/.github/workflows/testcl.yml index 51764b180b..834a171147 100644 --- a/.github/workflows/testcl.yml +++ b/.github/workflows/testcl.yml @@ -13,7 +13,7 @@ jobs: - name: Установить OInt run: | TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb' && + wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb' && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" diff --git a/ci/cli_deb_test_en b/ci/cli_deb_test_en index d748203f46..1fe0c81ea4 100644 --- a/ci/cli_deb_test_en +++ b/ci/cli_deb_test_en @@ -25,7 +25,7 @@ pipeline { steps { script { // Скачиваем новый deb-пакет oint - sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb ' + sh 'wget -O oint_1.28.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_en.deb ' } } } @@ -34,14 +34,14 @@ pipeline { steps { script { // Устанавливаем скаченный пакет - sh 'dpkg -i oint_1.27.0_all_en.deb' + sh 'dpkg -i oint_1.28.0_all_en.deb' } } } stage('Prepare'){ steps{ - sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/en/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/cli_deb_test_ru b/ci/cli_deb_test_ru index e73db81079..0d3ba88566 100644 --- a/ci/cli_deb_test_ru +++ b/ci/cli_deb_test_ru @@ -25,7 +25,7 @@ pipeline { steps { script { // Скачиваем новый deb-пакет oint - sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb ' + sh 'wget -O oint_1.28.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_ru.deb ' } } } @@ -34,14 +34,14 @@ pipeline { steps { script { // Устанавливаем скаченный пакет - sh 'dpkg -i oint_1.27.0_all_ru.deb' + sh 'dpkg -i oint_1.28.0_all_ru.deb' } } } stage('Prepare'){ steps{ - sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/ru/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/cli_rpm_test_en b/ci/cli_rpm_test_en index 17816707f3..c3a8459091 100644 --- a/ci/cli_rpm_test_en +++ b/ci/cli_rpm_test_en @@ -24,7 +24,7 @@ pipeline { steps { script { // Скачиваем новый rpm-пакет oint - sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm ' + sh 'wget -O oint-1.28.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint-1.28.0-1.noarch_en.rpm ' } } } @@ -33,14 +33,14 @@ pipeline { steps { script { // Устанавливаем скаченный пакет - sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm' + sh 'rpm -ivh --replacepkgs oint-1.28.0-1.noarch_en.rpm' } } } stage('Prepare'){ steps{ - sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/en/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/cli_rpm_test_ru b/ci/cli_rpm_test_ru index 2ac3dd025b..7b3076c3c2 100644 --- a/ci/cli_rpm_test_ru +++ b/ci/cli_rpm_test_ru @@ -24,7 +24,7 @@ pipeline { steps { script { // Скачиваем новый rpm-пакет oint - sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm ' + sh 'wget -O oint-1.28.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint-1.28.0-1.noarch_ru.rpm ' } } } @@ -33,14 +33,14 @@ pipeline { steps { script { // Устанавливаем скаченный пакет - sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm' + sh 'rpm -ivh --replacepkgs oint-1.28.0-1.noarch_ru.rpm' } } } stage('Prepare'){ steps{ - sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/ru/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/cli_test_en b/ci/cli_test_en index 4e8532475c..0858d73430 100644 --- a/ci/cli_test_en +++ b/ci/cli_test_en @@ -13,7 +13,7 @@ pipeline { stages { stage('Decrypt Data') { steps { - powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.28.0.ospx; del oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg' } @@ -80,7 +80,7 @@ pipeline { stage('Download Installer') { steps { powershell encoding: 'UTF-8', script: ''' - $url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_installer_en.exe " + $url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_installer_en.exe " $output = "$env:USERPROFILE\\Downloads\\oint_installer.exe" Invoke-WebRequest -Uri $url -OutFile $output Write-Host "Инсталлер скачан в: $output" diff --git a/ci/cli_test_ru b/ci/cli_test_ru index 3ba93b3a3b..3f65fc06fc 100644 --- a/ci/cli_test_ru +++ b/ci/cli_test_ru @@ -13,7 +13,7 @@ pipeline { stages { stage('Decrypt Data') { steps { - powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.28.0.ospx; del oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg' } @@ -80,7 +80,7 @@ pipeline { stage('Download Installer') { steps { powershell encoding: 'UTF-8', script: ''' - $url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_installer_ru.exe " + $url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_installer_ru.exe " $output = "$env:USERPROFILE\\Downloads\\oint_installer.exe" Invoke-WebRequest -Uri $url -OutFile $output Write-Host "Инсталлер скачан в: $output" diff --git a/ci/main b/ci/main index f530e46468..f4cc3af887 100644 --- a/ci/main +++ b/ci/main @@ -26,8 +26,8 @@ pipeline { stage('Local update'){ steps { - powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.27.0.ospx; del oint-1.27.0.ospx' - powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm build; opm install -f oint-cli-1.27.0.ospx; del oint-cli-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.28.0.ospx; del oint-1.28.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm build; opm install -f oint-cli-1.28.0.ospx; del oint-cli-1.28.0.ospx' } } diff --git a/ci/opm_push b/ci/opm_push index 16f3591ebf..9533564502 100644 --- a/ci/opm_push +++ b/ci/opm_push @@ -7,10 +7,10 @@ pipeline { steps { withCredentials([string(credentialsId: 'opm-token', variable: 'TOKEN')]) { - powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.27.0.ospx' - powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm push --token $ENV:TOKEN --channel stable --file oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.28.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm push --token $ENV:TOKEN --channel stable --file oint-1.28.0.ospx; del oint-1.28.0.ospx' powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm build;' - powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm push --token $ENV:TOKEN --channel stable --file oint-cli-1.27.0.ospx; del oint-cli-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm push --token $ENV:TOKEN --channel stable --file oint-cli-1.28.0.ospx; del oint-cli-1.28.0.ospx' } } diff --git a/ci/opm_update b/ci/opm_update index 1174c7c734..4dcf442398 100644 --- a/ci/opm_update +++ b/ci/opm_update @@ -7,8 +7,8 @@ pipeline { steps { - powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.27.0.ospx; del oint-1.27.0.ospx' - powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm build; opm install -f oint-cli-1.27.0.ospx; del oint-cli-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.28.0.ospx; del oint-1.28.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm build; opm install -f oint-cli-1.28.0.ospx; del oint-cli-1.28.0.ospx' } diff --git a/ci/os/docs_main.os b/ci/os/docs_main.os index 0ca9802bec..0dedf98f78 100644 --- a/ci/os/docs_main.os +++ b/ci/os/docs_main.os @@ -178,7 +178,7 @@ Макет = СтрЗаменить(Макет, "@Описание" , СтруктураМетода["Описание"]); ТаблицаПараметров = ""; - Вызов1С = ПолучитьВызов1С(СтруктураМетода["ИмяМодуля"], СтруктураМетода["ИмяМетода"]); + Вызов1С = ПолучитьВызов1С(СтруктураМетода["ИмяМодуля"], СтруктураМетода["ИмяМетода"], ТекущийЯзык); ВызовCLI = ПолучитьВызовCLI(СтруктураМетода); Для каждого ПараметрМетода Из СтруктураМетода["Параметры"] Цикл @@ -570,7 +570,7 @@ КонецПроцедуры -Функция ПолучитьВызов1С(Модуль, Метод) +Функция ПолучитьВызов1С(Модуль, Метод, ТекущийЯзык) Результат = ""; @@ -594,6 +594,22 @@ Результат = СокрП(Результат); + Если ЗначениеЗаполнено(Результат) Тогда + + Если ТекущийЯзык = "ru" Тогда + ШаблонТекста = "```bsl title=""Пример использования для 1С:Предприятие/OneScript"" + |%1 + |```"; + Иначе + ШаблонТекста = "```bsl title=""1C:Enterprise/OneScript code example"" + |%1 + |```"; + КонецЕсли; + + Результат = СтрШаблон(ШаблонТекста, Результат); + + КонецЕсли; + Возврат Результат; КонецФункции diff --git a/ci/os/releasemaker.os b/ci/os/releasemaker.os index fe60a7fe4f..7978dc005f 100644 --- a/ci/os/releasemaker.os +++ b/ci/os/releasemaker.os @@ -12,7 +12,7 @@ Процедура НачалоРаботы() Репозиторий = "https://github.com/Bayselonarrend/OpenIntegrations"; - Версия = "1.27.0"; + Версия = "1.28.0"; Режим = "CONFIG"; //Локальные данные diff --git a/ci/os_deb_test_en b/ci/os_deb_test_en index 022d1f3c2f..cc3724a132 100644 --- a/ci/os_deb_test_en +++ b/ci/os_deb_test_en @@ -50,7 +50,7 @@ pipeline { stage('Prepare'){ steps{ - sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/en/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/os_deb_test_ru b/ci/os_deb_test_ru index a4e28ca886..e013ed6260 100644 --- a/ci/os_deb_test_ru +++ b/ci/os_deb_test_ru @@ -50,7 +50,7 @@ pipeline { stage('Prepare'){ steps{ - sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/ru/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/os_rpm_test_en b/ci/os_rpm_test_en index e0bdef6244..dc190864f5 100644 --- a/ci/os_rpm_test_en +++ b/ci/os_rpm_test_en @@ -50,7 +50,7 @@ pipeline { stage('Prepare'){ steps{ - sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/en/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/os_rpm_test_ru b/ci/os_rpm_test_ru index 0154b2d23b..1bec297fa4 100644 --- a/ci/os_rpm_test_ru +++ b/ci/os_rpm_test_ru @@ -50,7 +50,7 @@ pipeline { stage('Prepare'){ steps{ - sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/ru/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/ci/os_test_en b/ci/os_test_en index c4fbb9a7f6..e83363183f 100644 --- a/ci/os_test_en +++ b/ci/os_test_en @@ -48,7 +48,7 @@ pipeline { } stage('Build OInt from source and decrypt secret data'){ steps{ - powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.28.0.ospx; del oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg' } diff --git a/ci/os_test_ru b/ci/os_test_ru index b2a20eb36d..9aa10f3722 100644 --- a/ci/os_test_ru +++ b/ci/os_test_ru @@ -48,7 +48,7 @@ pipeline { } stage('Build OInt from source and decrypt secret data'){ steps{ - powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.28.0.ospx; del oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg' } diff --git a/ci/release b/ci/release index a336033de1..61de91b2aa 100644 --- a/ci/release +++ b/ci/release @@ -8,7 +8,7 @@ pipeline { steps { powershell encoding: 'UTF-8', script:'Remove-Item -Path "./Melezh" -Recurse -Force' bat 'oscript ./ci/os/releasemaker.os' - archiveArtifacts artifacts: '1.27.0/*' + archiveArtifacts artifacts: '1.28.0/*' } } } diff --git a/service/iss/en.iss b/service/iss/en.iss index 03511c2b8a..6cc2e2260d 100644 --- a/service/iss/en.iss +++ b/service/iss/en.iss @@ -1,5 +1,5 @@ #define MyAppName "OInt" -#define MyAppVersion "1.27.0" +#define MyAppVersion "1.28.0" #define MyAppPublisher "bayselonarrend" #define MyAppURL "https://github.com/Bayselonarrend/OpenIntegrations" #define MyAppExeName "oint.bat" diff --git a/service/iss/ru.iss b/service/iss/ru.iss index b25d994624..3e7187b2a0 100644 --- a/service/iss/ru.iss +++ b/service/iss/ru.iss @@ -1,5 +1,5 @@ #define MyAppName "OInt" -#define MyAppVersion "1.27.0" +#define MyAppVersion "1.28.0" #define MyAppPublisher "bayselonarrend" #define MyAppURL "https://github.com/Bayselonarrend/OpenIntegrations" #define MyAppExeName "oint.bat" diff --git a/service/project.json b/service/project.json index 026b1ccf76..90d1a12792 100644 --- a/service/project.json +++ b/service/project.json @@ -1,5 +1,5 @@ { -"version": "1.27.0", +"version": "1.28.0", "root": "./src/", "mainLang": "ru", "packageSrc": "OInt/", diff --git a/service/templates/doc_en.md b/service/templates/doc_en.md index 77af26e046..eb7066f682 100644 --- a/service/templates/doc_en.md +++ b/service/templates/doc_en.md @@ -24,10 +24,7 @@ import TabItem from '@theme/TabItem'; @Примечание - -```bsl title="1C:Enterprise/OneScript code example" @Вызов1С -``` @ВызовCLI diff --git a/service/templates/doc_ru.md b/service/templates/doc_ru.md index a6db9b4ebc..c3edffc132 100644 --- a/service/templates/doc_ru.md +++ b/service/templates/doc_ru.md @@ -24,10 +24,7 @@ import TabItem from '@theme/TabItem'; @Примечание - -```bsl title="Пример использования для 1С:Предприятие/OneScript" @Вызов1С -``` @ВызовCLI diff --git a/service/templates/jenkins/cli_test_deb.txt b/service/templates/jenkins/cli_test_deb.txt index cf548b053d..28eb63692b 100644 --- a/service/templates/jenkins/cli_test_deb.txt +++ b/service/templates/jenkins/cli_test_deb.txt @@ -25,7 +25,7 @@ pipeline { steps { script { // Скачиваем новый deb-пакет oint - sh 'wget -O oint_1.27.0_all_%1.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_%1.deb ' + sh 'wget -O oint_1.28.0_all_%1.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_all_%1.deb ' } } } @@ -34,14 +34,14 @@ pipeline { steps { script { // Устанавливаем скаченный пакет - sh 'dpkg -i oint_1.27.0_all_%1.deb' + sh 'dpkg -i oint_1.28.0_all_%1.deb' } } } stage('Prepare'){ steps{ - sh 'cd ./src/%1/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/%1/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/service/templates/jenkins/cli_test_rpm.txt b/service/templates/jenkins/cli_test_rpm.txt index 90b367f038..369fc6f1ac 100644 --- a/service/templates/jenkins/cli_test_rpm.txt +++ b/service/templates/jenkins/cli_test_rpm.txt @@ -24,7 +24,7 @@ pipeline { steps { script { // Скачиваем новый rpm-пакет oint - sh 'wget -O oint-1.27.0-1.noarch_%1.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_%1.rpm ' + sh 'wget -O oint-1.28.0-1.noarch_%1.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint-1.28.0-1.noarch_%1.rpm ' } } } @@ -33,14 +33,14 @@ pipeline { steps { script { // Устанавливаем скаченный пакет - sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_%1.rpm' + sh 'rpm -ivh --replacepkgs oint-1.28.0-1.noarch_%1.rpm' } } } stage('Prepare'){ steps{ - sh 'cd ./src/%1/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/%1/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/service/templates/jenkins/cli_test_windows.txt b/service/templates/jenkins/cli_test_windows.txt index 134c293b39..6c7e5c48e1 100644 --- a/service/templates/jenkins/cli_test_windows.txt +++ b/service/templates/jenkins/cli_test_windows.txt @@ -13,7 +13,7 @@ pipeline { stages { stage('Decrypt Data') { steps { - powershell encoding: 'UTF-8', script:'cd ./src/%1/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/%1/OInt; opm build; opm install oint-1.28.0.ospx; del oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%%GPGKEY%%" --output ./data.json ./data.json.gpg' } @@ -80,7 +80,7 @@ pipeline { stage('Download Installer') { steps { powershell encoding: 'UTF-8', script: ''' - $url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_installer_%1.exe " + $url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.28.0/oint_1.28.0_installer_%1.exe " $output = "$env:USERPROFILE\\Downloads\\oint_installer.exe" Invoke-WebRequest -Uri $url -OutFile $output Write-Host "Инсталлер скачан в: $output" diff --git a/service/templates/jenkins/os_test_linux.txt b/service/templates/jenkins/os_test_linux.txt index 777e5543fb..52f2615526 100644 --- a/service/templates/jenkins/os_test_linux.txt +++ b/service/templates/jenkins/os_test_linux.txt @@ -50,7 +50,7 @@ pipeline { stage('Prepare'){ steps{ - sh 'cd ./src/%1/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx' + sh 'cd ./src/%1/OInt && opm build && opm install oint-1.28.0.ospx && rm oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg' } diff --git a/service/templates/jenkins/os_test_windows.txt b/service/templates/jenkins/os_test_windows.txt index 7b2fcbd682..dbf9ed73a2 100644 --- a/service/templates/jenkins/os_test_windows.txt +++ b/service/templates/jenkins/os_test_windows.txt @@ -48,7 +48,7 @@ pipeline { } stage('Build OInt from source and decrypt secret data'){ steps{ - powershell encoding: 'UTF-8', script:'cd ./src/%1/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.0.ospx' + powershell encoding: 'UTF-8', script:'cd ./src/%1/OInt; opm build; opm install oint-1.28.0.ospx; del oint-1.28.0.ospx' withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) { bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%%GPGKEY%%" --output ./data.json ./data.json.gpg' } diff --git a/src/addins/ssh/Cargo.lock b/src/addins/ssh/Cargo.lock new file mode 100644 index 0000000000..5414c704ee --- /dev/null +++ b/src/addins/ssh/Cargo.lock @@ -0,0 +1,351 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addin1c" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef34e8b7ff4c43e87491a4cc30a4779a9f67c50db43378a36362c7a56246e05b" +dependencies = [ + "smallvec", + "utf16_lit", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "cc" +version = "1.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libssh2-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "opi_ssh" +version = "0.1.0" +dependencies = [ + "addin1c", + "serde", + "serde_json", + "ssh2", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "ssh2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f84d13b3b8a0d4e91a2629911e951db1bb8671512f5c09d7d4ba34500ba68c8" +dependencies = [ + "bitflags", + "libc", + "libssh2-sys", + "parking_lot", +] + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "utf16_lit" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14706d2a800ee8ff38c1d3edb873cd616971ea59eb7c0d046bb44ef59b06a1ae" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/src/addins/ssh/Cargo.toml b/src/addins/ssh/Cargo.toml new file mode 100644 index 0000000000..7ea41ea563 --- /dev/null +++ b/src/addins/ssh/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "opi_ssh" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib"] + +[profile.release] +lto = "fat" # Enable Link Time Optimization +codegen-units = 1 # Reduce number of codegen units to increase optimizations. +panic = "abort" # Abort on panic +strip = true # Automatically strip symbols from the binary. +opt-level = "z" + +[dependencies] +addin1c = "0.5.0" +serde_json = "1.0.140" +ssh2 = "0.9.5" +serde = { version = "1.0.219", features = ["derive"] } \ No newline at end of file diff --git a/src/addins/ssh/dependencies.log b/src/addins/ssh/dependencies.log new file mode 100644 index 0000000000..8ee4221aef --- /dev/null +++ b/src/addins/ssh/dependencies.log @@ -0,0 +1,12 @@ +"MAIN ---" + linux-vdso.so.1 (0x00007ffedc1ce000) + libm.so.6 => /lib64/libm.so.6 (0x0000700082000000) + libpthread.so.0 => /lib64/libpthread.so.0 (0x0000700081c00000) + libc.so.6 => /lib64/libc.so.6 (0x0000700081800000) + libdl.so.2 => /lib64/libdl.so.2 (0x0000700081400000) + /lib64/ld-linux-x86-64.so.2 (0x0000700082400000) +GLIBC_2.2.5 +GLIBC_2.3 +GLIBC_2.3.4 +GLIBC_2.14 +GLIBC_2.17 diff --git a/src/addins/ssh/release.bat b/src/addins/ssh/release.bat new file mode 100644 index 0000000000..00070f187e --- /dev/null +++ b/src/addins/ssh/release.bat @@ -0,0 +1,8 @@ +@echo off + +:: Установить переменную +set CARGO_NAME=opi_ssh +set LIB_NAME=OPI_SSH +set ADDIN_DIR=%~dp0 + +call ../build.bat \ No newline at end of file diff --git a/src/addins/ssh/src/component/methods.rs b/src/addins/ssh/src/component/methods.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/addins/ssh/src/component/mod.rs b/src/addins/ssh/src/component/mod.rs new file mode 100644 index 0000000000..f6dabfd051 --- /dev/null +++ b/src/addins/ssh/src/component/mod.rs @@ -0,0 +1,139 @@ +mod methods; +mod ssh_conf; + +use addin1c::{name, Variant}; +use serde_json::json; +use crate::core::getset; +use ssh2::Session; +use std::net::TcpStream; +use crate::component::ssh_conf::{SshConf, SshAuthTypes}; + +// МЕТОДЫ КОМПОНЕНТЫ ------------------------------------------------------------------------------- + +// Синонимы +pub const METHODS: &[&[u16]] = &[ + name!("Connect"), + +]; + +// Число параметров функций компоненты +pub fn get_params_amount(num: usize) -> usize { + match num { + 0 => 1, + _ => 0, + } +} + +// Соответствие функций Rust функциям компоненты +// Вызовы должны быть обернуты в Box::new +pub fn cal_func(obj: &mut AddIn, num: usize, params: &mut [Variant]) -> Box { + + match num { + 0 => { + let json_string = params[0].get_string().unwrap_or("".to_string()); + Box::new(obj.initialize(json_string)) + }, + _ => Box::new(false), // Неверный номер команды + } + +} + +// ------------------------------------------------------------------------------------------------- + +// ПОЛЯ КОМПОНЕНТЫ --------------------------------------------------------------------------------- + +// Синонимы +pub const PROPS: &[&[u16]] = &[]; + +pub struct AddIn { + inner: Option, + credentials: Option +} + +impl AddIn { + /// Создает новый объект + pub fn new() -> Self { + AddIn { + inner: None, + credentials: None, + } + } + + pub fn initialize(&mut self, conf: String) -> String { + + let conf_data = match SshConf::from_sting(conf.as_str()){ + Ok(conf_data) => conf_data, + Err(e) => return format_json_error(&e) + }; + + self.credentials = Some(conf_data.clone()); + + let tcp = match TcpStream::connect(format!("{}:{}", conf_data.host, conf_data.port)){ + Ok(tcp) => tcp, + Err(e) => return format_json_error(&e.to_string()) + }; + + let mut sess = match Session::new(){ + Ok(sess) => sess, + Err(e) => return format_json_error(&e.to_string()) + }; + + sess.set_tcp_stream(tcp); + + if let Err(e) = sess.handshake() { + return e.to_string(); + }; + + let username= &conf_data.username; + let password = &conf_data.password.unwrap_or("".to_string()); + let passphrase = conf_data.passphrase; + let key_path = &conf_data.key_path; + + let auth_success = match conf_data.auth_type { + + SshAuthTypes::Password => sess.userauth_password(username,password), + SshAuthTypes::Agent => sess.userauth_agent(username), + SshAuthTypes::PrivateKey => { + let path = match key_path{ + Some(key_path) => key_path.as_ref(), + None => return format_json_error("No key path provided with PK auth type") + }; + sess.userauth_pubkey_file(username, None, path, passphrase.as_deref()) + }, + + }; + + if let Err(e) = auth_success{ + return format_json_error(&e.to_string()); + }; + + if !sess.authenticated(){ + return format_json_error("Authentication failed with no errors"); + } + + self.inner = Some(sess); + + json!({"result": true}).to_string() + + } + + pub fn get_field_ptr(&self, index: usize) -> *const dyn getset::ValueType { + match index { + _ => panic!("Index out of bounds"), + } + } + pub fn get_field_ptr_mut(&mut self, index: usize) -> *mut dyn getset::ValueType { self.get_field_ptr(index) as *mut _ } +} +// ------------------------------------------------------------------------------------------------- + + +pub fn format_json_error(error: &str) -> String { + json!({"result": false, "error": error}).to_string() +} + +// УНИЧТОЖЕНИЕ ОБЪЕКТА ----------------------------------------------------------------------------- + +// Обработка удаления объекта +impl Drop for AddIn { + fn drop(&mut self) {} +} \ No newline at end of file diff --git a/src/addins/ssh/src/component/ssh_conf.rs b/src/addins/ssh/src/component/ssh_conf.rs new file mode 100644 index 0000000000..11d0b39a38 --- /dev/null +++ b/src/addins/ssh/src/component/ssh_conf.rs @@ -0,0 +1,35 @@ +use std::path::PathBuf; +use serde_json::{json, Value}; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub enum SshAuthTypes{ + #[serde(rename = "password")] + Password, + #[serde(rename = "private_key")] + PrivateKey, + #[serde(rename = "agent")] + Agent +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SshConf{ + pub host: String, + pub port: i64, + pub auth_type: SshAuthTypes, + pub username: String, + pub password: Option, + pub key_path: Option, + pub passphrase: Option, + +} + +impl SshConf { + pub fn from_sting(conf: &str) -> Result { + serde_json::from_str(conf).unwrap_or_else(|e| Err(e.to_string())) + } + + pub fn to_string(&self) -> String { + json!({"result": true, "data": &self}).to_string() + } +} \ No newline at end of file diff --git a/src/addins/ssh/src/core/getset.rs b/src/addins/ssh/src/core/getset.rs new file mode 100644 index 0000000000..dfb6f65bc8 --- /dev/null +++ b/src/addins/ssh/src/core/getset.rs @@ -0,0 +1,78 @@ +use addin1c::{Variant, Tm}; + + +pub trait ValueType { + fn get_value(&self, val: &mut Variant) -> bool; + fn set_value(&mut self, val: &Variant); +} + +// Реализация для i32 +impl ValueType for i32 { + fn get_value(&self, val: &mut Variant) -> bool { + val.set_i32(*self); + true + } + + fn set_value(&mut self, val: &Variant) { + *self = val.get_i32().unwrap_or(0); + } +} + +// Реализация для f64 +impl ValueType for f64 { + fn get_value(&self, val: &mut Variant) -> bool { + val.set_f64(*self); + true + } + + fn set_value(&mut self, val: &Variant) { + *self = val.get_f64().unwrap_or(0.0); + } +} + +// Реализация для bool +impl ValueType for bool { + fn get_value(&self, val: &mut Variant) -> bool { + val.set_bool(*self); + true + } + + fn set_value(&mut self, val: &Variant) { + *self = val.get_bool().unwrap_or(false); + } +} + +// Реализация для tm +impl ValueType for Tm { + fn get_value(&self, val: &mut Variant) -> bool { + val.set_date(*self); + true + } + + fn set_value(&mut self, val: &Variant) { + *self = val.get_date().unwrap_or(Tm::default()); + } +} + +// Реализация для String +impl ValueType for String { + fn get_value(&self, val: &mut Variant) -> bool { + let s: Vec = self.encode_utf16().collect(); + val.set_str1c(s.as_slice()).is_ok() + } + + fn set_value(&mut self, val: &Variant) { + *self = val.get_string().unwrap_or("".to_string()); + } +} + +// Реализация для Vec +impl ValueType for Vec { + fn get_value(&self, val: &mut Variant) -> bool { + val.set_blob(self.as_slice()).is_ok() + } + + fn set_value(&mut self, val: &Variant) { + *self = val.get_blob().unwrap_or(&[]).to_vec() + } +} \ No newline at end of file diff --git a/src/addins/ssh/src/core/mod.rs b/src/addins/ssh/src/core/mod.rs new file mode 100644 index 0000000000..9f8e10c39f --- /dev/null +++ b/src/addins/ssh/src/core/mod.rs @@ -0,0 +1,53 @@ +pub mod getset; + +use addin1c::{name, RawAddin, Variant}; + +use crate::component::METHODS; +use crate::component::PROPS; +use crate::component::get_params_amount; +use crate::component::cal_func; +use crate::component::AddIn; + +// Определение класса +impl RawAddin for AddIn { + + fn register_extension_as(&mut self) -> &'static [u16] { + name!("Main") + } + fn get_n_props(&mut self) -> usize { + PROPS.len() + } + fn find_prop(&mut self, name: &[u16]) -> Option { + PROPS.iter().position(|&x| x == name) + } + fn get_prop_name(&mut self, num: usize, _alias: usize) -> Option<&'static [u16]> { PROPS.get(num).copied() } + fn get_prop_val(&mut self, num: usize, val: &mut Variant) -> bool {let field: &dyn getset::ValueType = &self[num]; field.get_value(val) } + fn set_prop_val(&mut self, num: usize, val: &Variant) -> bool {let field: &mut dyn getset::ValueType = &mut self[num]; field.set_value(val); true } + fn is_prop_readable(&mut self, _num: usize) -> bool { true } + fn is_prop_writable(&mut self, _num: usize) -> bool { true } + fn get_n_methods(&mut self) -> usize { METHODS.len() } + fn find_method(&mut self, name: &[u16]) -> Option { METHODS.iter().position(|&x| x == name) } + fn get_method_name(&mut self, num: usize, _alias: usize) -> Option<&'static [u16]> { METHODS.get(num).copied() } + fn get_n_params(&mut self, num: usize) -> usize { get_params_amount(num) } + fn get_param_def_value(&mut self, _method_num: usize, _param_num: usize, _value: Variant, ) -> bool { true } + fn has_ret_val(&mut self, _num: usize) -> bool { true } + fn call_as_proc(&mut self, _num: usize, _params: &mut [Variant]) -> bool { false } + fn call_as_func(&mut self, num: usize, params: &mut [Variant], ret_value: &mut Variant, ) -> bool { cal_func(self, num, params).get_value(ret_value) } + +} + +impl std::ops::Index for AddIn { + type Output = dyn getset::ValueType; + + fn index(&self, index: usize) -> &Self::Output { + unsafe { &*self.get_field_ptr(index) } + } +} + +impl std::ops::IndexMut for AddIn { + fn index_mut(&mut self, index: usize) -> &mut Self::Output { + unsafe { &mut *self.get_field_ptr_mut(index) } + } +} + + diff --git a/src/addins/ssh/src/lib.rs b/src/addins/ssh/src/lib.rs new file mode 100644 index 0000000000..6b7c2f62a1 --- /dev/null +++ b/src/addins/ssh/src/lib.rs @@ -0,0 +1,49 @@ +pub mod component; +mod core; + + +use std::{ + ffi::{c_int, c_long, c_void}, + sync::atomic::{AtomicI32, Ordering}, +}; + +use component::AddIn; +use addin1c::{create_component, destroy_component, name, AttachType}; + +pub static mut PLATFORM_CAPABILITIES: AtomicI32 = AtomicI32::new(-1); + +#[allow(non_snake_case)] +#[no_mangle] +pub unsafe extern "C" fn GetClassObject(_name: *const u16, component: *mut *mut c_void) -> c_long { + + let addin = AddIn::new(); + create_component(component, addin) + +} + +#[allow(non_snake_case)] +#[no_mangle] +pub unsafe extern "C" fn DestroyObject(component: *mut *mut c_void) -> c_long { + destroy_component(component) +} + +#[allow(non_snake_case)] +#[no_mangle] +pub extern "C" fn GetClassNames() -> *const u16 { + // small strings for performance + name!("Main").as_ptr() +} + +#[allow(non_snake_case)] +#[no_mangle] +#[allow(static_mut_refs)] +pub unsafe extern "C" fn SetPlatformCapabilities(capabilities: c_int) -> c_int { + PLATFORM_CAPABILITIES.store(capabilities, Ordering::Relaxed); + 3 +} + +#[allow(non_snake_case)] +#[no_mangle] +pub extern "C" fn GetAttachType() -> AttachType { + AttachType::Any +} diff --git a/src/addins/tmpl/Cargo.lock b/src/addins/tmpl/Cargo.lock index bc8d9d7b38..de360329e9 100644 --- a/src/addins/tmpl/Cargo.lock +++ b/src/addins/tmpl/Cargo.lock @@ -13,10 +13,89 @@ dependencies = [ ] [[package]] -name = "opi_addin" +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "opi_ssh" version = "0.1.0" dependencies = [ "addin1c", + "serde_json", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "serde" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", ] [[package]] @@ -25,6 +104,23 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + [[package]] name = "utf16_lit" version = "2.0.2" diff --git a/src/addins/tmpl/Cargo.toml b/src/addins/tmpl/Cargo.toml index de09132e2d..f1880a0bad 100644 --- a/src/addins/tmpl/Cargo.toml +++ b/src/addins/tmpl/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "opi_addin" +name = "opi_ssh" version = "0.1.0" edition = "2021" @@ -7,10 +7,12 @@ edition = "2021" crate-type = ["cdylib"] [profile.release] -lto = true # Enable Link Time Optimization +lto = "fat" # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations. panic = "abort" # Abort on panic strip = true # Automatically strip symbols from the binary. +opt-level = "z" [dependencies] -addin1c = "0.5.0" \ No newline at end of file +addin1c = "0.5.0" +serde_json = "1.0.140" \ No newline at end of file diff --git a/src/addins/tmpl/MANIFEST.XML b/src/addins/tmpl/MANIFEST.XML deleted file mode 100644 index eb28e4669f..0000000000 --- a/src/addins/tmpl/MANIFEST.XML +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/addins/tmpl/dependencies.log b/src/addins/tmpl/dependencies.log new file mode 100644 index 0000000000..8ee4221aef --- /dev/null +++ b/src/addins/tmpl/dependencies.log @@ -0,0 +1,12 @@ +"MAIN ---" + linux-vdso.so.1 (0x00007ffedc1ce000) + libm.so.6 => /lib64/libm.so.6 (0x0000700082000000) + libpthread.so.0 => /lib64/libpthread.so.0 (0x0000700081c00000) + libc.so.6 => /lib64/libc.so.6 (0x0000700081800000) + libdl.so.2 => /lib64/libdl.so.2 (0x0000700081400000) + /lib64/ld-linux-x86-64.so.2 (0x0000700082400000) +GLIBC_2.2.5 +GLIBC_2.3 +GLIBC_2.3.4 +GLIBC_2.14 +GLIBC_2.17 diff --git a/src/addins/tmpl/release.bat b/src/addins/tmpl/release.bat index 62534a5e06..00070f187e 100644 --- a/src/addins/tmpl/release.bat +++ b/src/addins/tmpl/release.bat @@ -1,69 +1,8 @@ @echo off :: Установить переменную -set CARGO_NAME=opi_addin -set LIB_NAME=OPI_AddIn -set OPENSSL_DIR=C:\msys64\mingw64 -set OPENSSL_LIB_DIR=%OPENSSL_DIR%\lib -set OPENSSL_INCLUDE_DIR=%OPENSSL_DIR%\include +set CARGO_NAME=opi_ssh +set LIB_NAME=OPI_SSH +set ADDIN_DIR=%~dp0 - -:: Перейти в директорию проекта -cd /d "%~dp0" - -:: Создать папку для артефактов -set OUTPUT_DIR=artifacts -if not exist "%OUTPUT_DIR%" mkdir "%OUTPUT_DIR%" - -:: Сборка для x86_64-pc-windows-msvc -cargo build --release --target x86_64-pc-windows-msvc -if errorlevel 1 goto :error - -:: Сборка для x86_64-unknown-linux-gnu -cargo zigbuild --release --target x86_64-unknown-linux-gnu -if errorlevel 1 goto :error - -:: Сборка для i686-pc-windows-msvc -cargo build --release --target i686-pc-windows-msvc -if errorlevel 1 goto :error - -:: Сборка для i686-unknown-linux-gnu -cargo zigbuild --release --target i686-unknown-linux-gnu -if errorlevel 1 goto :error - -:: Копирование файлов .dll и .so -copy /y target\x86_64-pc-windows-msvc\release\%CARGO_NAME%.dll "%OUTPUT_DIR%\AddIn_x64_windows.dll" -if errorlevel 1 goto :error - -copy /y target\i686-pc-windows-msvc\release\%CARGO_NAME%.dll "%OUTPUT_DIR%\AddIn_x86_windows.dll" -if errorlevel 1 goto :error - -copy /y target\x86_64-unknown-linux-gnu\release\lib%CARGO_NAME%.so "%OUTPUT_DIR%\AddIn_x64_linux.so" -if errorlevel 1 goto :error - -copy /y target\i686-unknown-linux-gnu\release\lib%CARGO_NAME%.so "%OUTPUT_DIR%\AddIn_x86_linux.so" -if errorlevel 1 goto :error - -copy /y MANIFEST.XML "%OUTPUT_DIR%\MANIFEST.XML" -if errorlevel 1 goto :error - -:: Архивация -powershell -Command "Compress-Archive -Path '%OUTPUT_DIR%\*' -Force -DestinationPath '%LIB_NAME%.zip'" -if errorlevel 1 goto :error - -copy /y "%LIB_NAME%.zip" "../../ru/OInt/addins/%LIB_NAME%.zip" -copy /y "%LIB_NAME%.zip" "../../en/OInt/addins/%LIB_NAME%.zip" - -copy /y "%LIB_NAME%.zip" "../../ru/OPI/src/CommonTemplates/%LIB_NAME%/Template.addin" -copy /y "%LIB_NAME%.zip" "../../en/OPI/src/CommonTemplates/%LIB_NAME%/Template.addin" - -if exist "%OUTPUT_DIR%" ( - rmdir /S /Q "%OUTPUT_DIR%" -) - -@echo Build and packaging completed successfully. -exit /b 0 - -:error -@echo An error occurred during the build or packaging process. -exit /b 1 +call ../build.bat \ No newline at end of file diff --git a/src/addins/tmpl/src/component/methods.rs b/src/addins/tmpl/src/component/methods.rs index 17e3d74592..e69de29bb2 100644 --- a/src/addins/tmpl/src/component/methods.rs +++ b/src/addins/tmpl/src/component/methods.rs @@ -1,4 +0,0 @@ -pub fn method1() -> bool { - true -} - diff --git a/src/addins/tmpl/src/component/mod.rs b/src/addins/tmpl/src/component/mod.rs index 266bef7197..60e71394dc 100644 --- a/src/addins/tmpl/src/component/mod.rs +++ b/src/addins/tmpl/src/component/mod.rs @@ -1,13 +1,13 @@ mod methods; use addin1c::{name, Variant}; +use serde_json::json; use crate::core::getset; - // МЕТОДЫ КОМПОНЕНТЫ ------------------------------------------------------------------------------- // Синонимы pub const METHODS: &[&[u16]] = &[ - name!("Method1"), // 0 + name!("Connect"), ]; @@ -25,7 +25,8 @@ pub fn cal_func(obj: &mut AddIn, num: usize, params: &mut [Variant]) -> Box Box::new(methods::method1()), + 0 => Box::new(obj.initialize()), + _ => Box::new(false), // Неверный номер команды } @@ -37,24 +38,25 @@ pub fn cal_func(obj: &mut AddIn, num: usize, params: &mut [Variant]) -> Box Self { AddIn { - prop1: String::new() + field: String::new() } } + pub fn get_field_ptr(&self, index: usize) -> *const dyn getset::ValueType { match index { - 0 => &self.prop1 as &dyn getset::ValueType as *const _, + 0 => &self.field as &dyn getset::ValueType as *const _, _ => panic!("Index out of bounds"), } } @@ -62,6 +64,11 @@ impl AddIn { } // ------------------------------------------------------------------------------------------------- + +pub fn format_json_error(error: &str) -> String { + json!({"result": false, "error": error}).to_string() +} + // УНИЧТОЖЕНИЕ ОБЪЕКТА ----------------------------------------------------------------------------- // Обработка удаления объекта diff --git a/src/addins/tmpl/src/core/mod.rs b/src/addins/tmpl/src/core/mod.rs index e0753977f0..9f8e10c39f 100644 --- a/src/addins/tmpl/src/core/mod.rs +++ b/src/addins/tmpl/src/core/mod.rs @@ -8,7 +8,6 @@ use crate::component::get_params_amount; use crate::component::cal_func; use crate::component::AddIn; - // Определение класса impl RawAddin for AddIn { diff --git a/src/addins/tmpl/src/lib.rs b/src/addins/tmpl/src/lib.rs index d4c6a07705..6b7c2f62a1 100644 --- a/src/addins/tmpl/src/lib.rs +++ b/src/addins/tmpl/src/lib.rs @@ -30,12 +30,13 @@ pub unsafe extern "C" fn DestroyObject(component: *mut *mut c_void) -> c_long { #[allow(non_snake_case)] #[no_mangle] pub extern "C" fn GetClassNames() -> *const u16 { + // small strings for performance name!("Main").as_ptr() } #[allow(non_snake_case)] -#[allow(static_mut_refs)] #[no_mangle] +#[allow(static_mut_refs)] pub unsafe extern "C" fn SetPlatformCapabilities(capabilities: c_int) -> c_int { PLATFORM_CAPABILITIES.store(capabilities, Ordering::Relaxed); 3 diff --git a/src/en/OInt/packagedef b/src/en/OInt/packagedef index bca237adec..ba90fa3826 100644 --- a/src/en/OInt/packagedef +++ b/src/en/OInt/packagedef @@ -1,5 +1,5 @@ Описание.Имя("oint") - .Версия("1.27.0") + .Версия("1.28.0") .Автор("bayselonarrend") .АдресАвтора("bayselonarrend@gmail.com") .Описание("Открытый пакет интеграций с популярными API") diff --git a/src/en/OInt/tools/Modules/internal/Modules/OPI_Tools.os b/src/en/OInt/tools/Modules/internal/Modules/OPI_Tools.os index c2c1dc9318..152e1a32b6 100644 --- a/src/en/OInt/tools/Modules/internal/Modules/OPI_Tools.os +++ b/src/en/OInt/tools/Modules/internal/Modules/OPI_Tools.os @@ -1019,7 +1019,7 @@ Function ThisIsCollection(Val Value, Val KeyValue = False) Export EndFunction Function OPIVersion() Export - Return "1.27.0"; + Return "1.28.0"; EndFunction Function OPILanguage() Export diff --git a/src/en/OPI/src/CommonModules/OPI_Tools/Module.bsl b/src/en/OPI/src/CommonModules/OPI_Tools/Module.bsl index d74b31af95..155a412f43 100644 --- a/src/en/OPI/src/CommonModules/OPI_Tools/Module.bsl +++ b/src/en/OPI/src/CommonModules/OPI_Tools/Module.bsl @@ -1019,7 +1019,7 @@ Function ThisIsCollection(Val Value, Val KeyValue = False) Export EndFunction Function OPIVersion() Export - Return "1.27.0"; + Return "1.28.0"; EndFunction Function OPILanguage() Export diff --git a/src/en/OPI/src/Configuration/Configuration.mdo b/src/en/OPI/src/Configuration/Configuration.mdo index f3a71bac31..994eb2c168 100644 --- a/src/en/OPI/src/Configuration/Configuration.mdo +++ b/src/en/OPI/src/Configuration/Configuration.mdo @@ -25,7 +25,7 @@ PersonalComputer English Bayselonarrend - 1.27.0 + 1.28.0 en The Open Integration Package is a set of libraries for integrating with some popular APIs for 1C:Enterprise. It consists of common modules, each responsible for its own API, as well as several shared tool modules.. diff --git a/src/en/cli/data/Classes/LibraryComposition.os b/src/en/cli/data/Classes/LibraryComposition.os index 9e08adf574..4297534f4a 100644 --- a/src/en/cli/data/Classes/LibraryComposition.os +++ b/src/en/cli/data/Classes/LibraryComposition.os @@ -9,7 +9,7 @@ Var PackagesDirectory; Procedure OnObjectCreate() - Version = "1.27.0"; + Version = "1.28.0"; InitializeCommonLists(); CurrentDirectory = CurrentScript().Path; diff --git a/src/en/cli/packagedef b/src/en/cli/packagedef index 8ad3f1eaf3..fd6f9e2eaf 100644 --- a/src/en/cli/packagedef +++ b/src/en/cli/packagedef @@ -1,5 +1,5 @@ Описание.Имя("oint-cli") - .Версия("1.27.0") + .Версия("1.28.0") .Автор("bayselonarrend") .АдресАвтора("bayselonarrend@gmail.com") .Описание("OpenIntegrations-based CLI tool") diff --git a/src/ru/OInt/packagedef b/src/ru/OInt/packagedef index bca237adec..ba90fa3826 100644 --- a/src/ru/OInt/packagedef +++ b/src/ru/OInt/packagedef @@ -1,5 +1,5 @@ Описание.Имя("oint") - .Версия("1.27.0") + .Версия("1.28.0") .Автор("bayselonarrend") .АдресАвтора("bayselonarrend@gmail.com") .Описание("Открытый пакет интеграций с популярными API") diff --git a/src/ru/OInt/tools/Modules/internal/Modules/OPI_Инструменты.os b/src/ru/OInt/tools/Modules/internal/Modules/OPI_Инструменты.os index 8857378420..05feab90bb 100644 --- a/src/ru/OInt/tools/Modules/internal/Modules/OPI_Инструменты.os +++ b/src/ru/OInt/tools/Modules/internal/Modules/OPI_Инструменты.os @@ -1019,7 +1019,7 @@ КонецФункции Функция ВерсияОПИ() Экспорт - Возврат "1.27.0"; + Возврат "1.28.0"; КонецФункции Функция ЯзыкОПИ() Экспорт diff --git a/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl index b8d058de19..f4a902de56 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl @@ -1019,7 +1019,7 @@ КонецФункции Функция ВерсияОПИ() Экспорт - Возврат "1.27.0"; + Возврат "1.28.0"; КонецФункции Функция ЯзыкОПИ() Экспорт diff --git a/src/ru/OPI/src/Configuration/Configuration.mdo b/src/ru/OPI/src/Configuration/Configuration.mdo index 7faff21b06..628d00f276 100644 --- a/src/ru/OPI/src/Configuration/Configuration.mdo +++ b/src/ru/OPI/src/Configuration/Configuration.mdo @@ -25,7 +25,7 @@ PersonalComputer Russian Bayselonarrend - 1.27.0 + 1.28.0 ru Открытый пакет интеграций - набор библиотек для интеграции с некоторыми популярными API для 1C:Enterprise. Он состоит из общих модулей, каждый из которых отвечает за свой API, а также нескольких модулей-инструментов, общих для всех. diff --git a/src/ru/cli/data/Classes/LibraryComposition.os b/src/ru/cli/data/Classes/LibraryComposition.os index a24bf842b5..ab7ea1bdcc 100644 --- a/src/ru/cli/data/Classes/LibraryComposition.os +++ b/src/ru/cli/data/Classes/LibraryComposition.os @@ -9,7 +9,7 @@ Процедура ПриСозданииОбъекта() - Версия = "1.27.0"; + Версия = "1.28.0"; ИнициализироватьОсновныеСписки(); ТекущийКаталог = ТекущийСценарий().Каталог; diff --git a/src/ru/cli/packagedef b/src/ru/cli/packagedef index 8ad3f1eaf3..fd6f9e2eaf 100644 --- a/src/ru/cli/packagedef +++ b/src/ru/cli/packagedef @@ -1,5 +1,5 @@ Описание.Имя("oint-cli") - .Версия("1.27.0") + .Версия("1.28.0") .Автор("bayselonarrend") .АдресАвтора("bayselonarrend@gmail.com") .Описание("OpenIntegrations-based CLI tool")