Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
reviews:
path_filters:
- "!src/test/resources/**"
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies {

// прочее
implementation("commons-io", "commons-io", "2.18.0")
implementation("io.github.1c-syntax", "bsl-common-library", "0.9.0.18-SNAPSHOT")
implementation("io.github.1c-syntax", "bsl-common-library", "0.9.0.21-SNAPSHOT")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Проверьте доступность версии SNAPSHOT-зависимости.

Убедитесь, что версия 0.9.0.21-SNAPSHOT библиотеки bsl-common-library доступна в репозитории Maven и не содержит критических проблем.

Выполните следующий скрипт для проверки доступности версии:


🏁 Script executed:

#!/bin/bash
# Проверка доступности версии 0.9.0.21-SNAPSHOT в Maven Central Snapshots
curl -s "https://central.sonatype.com/repository/maven-snapshots/io/github/1c-syntax/bsl-common-library/0.9.0.21-SNAPSHOT/" | head -20

Length of output: 907


🏁 Script executed:

#!/bin/bash
# Проверка наличия JAR-артефакта через Sonatype redirect API
curl -s -o /dev/null -w '%{http_code}' \
  "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.github.1c-syntax&a=bsl-common-library&v=0.9.0.21-SNAPSHOT&p=jar"

Length of output: 3


Версия SNAPSHOT отсутствует в репозитории
При попытке загрузить JAR-артефакт 0.9.0.21-SNAPSHOT получен HTTP 404. В build.gradle.kts (строка 62) укажите существующую версию или задеплойте 0.9.0.21-SNAPSHOT.

🤖 Prompt for AI Agents
В build.gradle.kts около строки 62, зависимость
implementation("io.github.1c-syntax","bsl-common-library","0.9.0.21-SNAPSHOT")
указывает на несуществующий SNAPSHOT (HTTP 404). Исправьте это либо заменив
версию на валидную опубликованную (например последнюю релизную версию в
репозитории артефактов), либо задеплойте артефакт 0.9.0.21-SNAPSHOT в
используемый репозиторий; после изменения синхронизируйте/перезапустите сборку
чтобы убедиться, что артефакт разрешается корректно.

implementation("io.github.1c-syntax", "utils", "0.6.3")
implementation("io.github.1c-syntax", "supportconf", "0.15.0.7-SNAPSHOT") {
exclude("io.github.1c-syntax", "bsl-common-library")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import com.github._1c_syntax.bsl.mdo.Task;
import com.github._1c_syntax.bsl.mdo.WSReference;
import com.github._1c_syntax.bsl.mdo.WebService;
import com.github._1c_syntax.bsl.mdo.WebSocketClient;
import com.github._1c_syntax.bsl.mdo.XDTOPackage;
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
import com.github._1c_syntax.bsl.mdo.support.DataLockControlMode;
Expand Down Expand Up @@ -202,6 +203,8 @@ public class Configuration implements CF {
@Singular
List<WebService> webServices;
@Singular
List<WebSocketClient> webSocketClients;
@Singular
List<HTTPService> httpServices;
@Singular
List<WSReference> wsReferences;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import com.github._1c_syntax.bsl.mdo.Task;
import com.github._1c_syntax.bsl.mdo.WSReference;
import com.github._1c_syntax.bsl.mdo.WebService;
import com.github._1c_syntax.bsl.mdo.WebSocketClient;
import com.github._1c_syntax.bsl.mdo.XDTOPackage;
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
import com.github._1c_syntax.bsl.mdo.support.ConfigurationExtensionPurpose;
Expand Down Expand Up @@ -195,6 +196,8 @@ public class ConfigurationExtension implements CF {
@Singular
List<WebService> webServices;
@Singular
List<WebSocketClient> webSocketClients;
@Singular
List<HTTPService> httpServices;
@Singular
List<WSReference> wsReferences;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import com.github._1c_syntax.bsl.mdo.Task;
import com.github._1c_syntax.bsl.mdo.WSReference;
import com.github._1c_syntax.bsl.mdo.WebService;
import com.github._1c_syntax.bsl.mdo.WebSocketClient;
import com.github._1c_syntax.bsl.mdo.XDTOPackage;

import java.util.List;
Expand Down Expand Up @@ -666,4 +667,16 @@ default Optional<Task> findTask(Predicate<? super Task> predicate) {
default Optional<ExternalDataSource> findExternalDataSource(Predicate<? super ExternalDataSource> predicate) {
return getExternalDataSources().stream().filter(predicate).findFirst();
}

/**
* WebSocket-клиенты
*/
List<WebSocketClient> getWebSocketClients();

/**
* Поиск WebSocket-клиента по условию
*/
default Optional<WebSocketClient> findWebSocketClient(Predicate<? super WebSocketClient> predicate) {
return getWebSocketClients().stream().filter(predicate).findFirst();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
package com.github._1c_syntax.bsl.mdo;

import com.github._1c_syntax.bsl.mdo.children.ExternalDataSourceCube;
import com.github._1c_syntax.bsl.mdo.children.ExternalDataSourceFunction;
import com.github._1c_syntax.bsl.mdo.children.ExternalDataSourceTable;
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
Expand Down Expand Up @@ -66,6 +68,7 @@ public class ExternalDataSource implements MDObject, ChildrenOwner, AccessRights
@Default
SupportVariant supportVariant = SupportVariant.NONE;

Lazy<List<MD>> children = new Lazy<>(this::computeChildren);
Lazy<List<MD>> plainChildren = new Lazy<>(this::computePlainChildren);

/*
Expand All @@ -78,17 +81,27 @@ public class ExternalDataSource implements MDObject, ChildrenOwner, AccessRights
@Singular
List<ExternalDataSourceTable> tables;

/**
* Функции
*/
@Singular
List<ExternalDataSourceFunction> functions;

/**
* Кубы
*/
@Singular
List<ExternalDataSourceCube> cubes;

/**
* Пояснение
*/
@Default
MultiLanguageString explanation = MultiLanguageString.EMPTY;

// todo сделать функции и кубы

@Override
public List<MD> getChildren() {
return Collections.unmodifiableList(tables);
return children.getOrCompute();
}

@Override
Expand All @@ -103,6 +116,10 @@ public static List<RoleRight> possibleRights() {
return POSSIBLE_RIGHTS;
}

private List<MD> computeChildren() {
return LazyLoader.computeChildren(this);
}

private List<MD> computePlainChildren() {
return LazyLoader.computePlainChildren(this);
}
Expand Down
93 changes: 93 additions & 0 deletions src/main/java/com/github/_1c_syntax/bsl/mdo/WebSocketClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* This file is a part of MDClasses.
*
* Copyright (c) 2019 - 2025
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* MDClasses is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* MDClasses is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with MDClasses.
*/
package com.github._1c_syntax.bsl.mdo;

import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
import com.github._1c_syntax.bsl.support.SupportVariant;
import com.github._1c_syntax.bsl.types.MdoReference;
import com.github._1c_syntax.bsl.types.MultiLanguageString;
import lombok.Builder;
import lombok.Builder.Default;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.Value;

import java.util.Collections;
import java.util.List;

@Value
@Builder
@ToString(of = {"name", "uuid"})
@EqualsAndHashCode(of = {"name", "uuid"})
public class WebSocketClient implements MDObject, ModuleOwner {
/*
* MDObject
*/

@Default
String uuid = "";
@Default
String name = "";
@Default
MdoReference mdoReference = MdoReference.EMPTY;
@Default
ObjectBelonging objectBelonging = ObjectBelonging.OWN;
@Default
String comment = "";
@Default
MultiLanguageString synonym = MultiLanguageString.EMPTY;
@Default
SupportVariant supportVariant = SupportVariant.NONE;

/*
* ModuleOwner
*/

@Default
List<Module> modules = Collections.emptyList();

/*
* Свое
*/

/**
* Предопределенный
*/
boolean predefined;

/**
* Подключать автоматически
*/
boolean autoConnect;

/**
* URI сервера
*/
@Default
String serverURL = "";

/**
* Таймаут
*/
int timeout;

}
Loading
Loading