diff --git a/model-client/build.gradle.kts b/model-client/build.gradle.kts index 436f0e9d26..d2d3c90d2d 100644 --- a/model-client/build.gradle.kts +++ b/model-client/build.gradle.kts @@ -133,27 +133,14 @@ val patchTypesScriptInProductionLibrary = tasks.register("patchTypesScriptInProd into(preparedProductionLibraryOutputDirectory) } - // Add correct TypeScript imports and mark exports as experimental. + // Add correct TypeScript imports. val typescriptDeclaration = preparedProductionLibraryOutputDirectory.get().file("modelix.core-model-client.d.ts").asFile - val originalTypescriptDeclarationContent = typescriptDeclaration.readLines() - val experimentalDeclaration = """ - - /** - * @experimental This feature is expected to be finalized with https://issues.modelix.org/issue/MODELIX-500. - */ - """.trimIndent() + val originalTypescriptDeclarationContent = typescriptDeclaration.readText() typescriptDeclaration.writer().use { it.appendLine("""import { INodeJS } from "@modelix/ts-model-api";""") .appendLine() - for (line in originalTypescriptDeclarationContent) { - // Only mark the parts of the client (`org.modelix.model.client2`) experimental. - // Reported declarations from `org.modelix.model.api` should not be annotated as experimental. - if (line.startsWith("export declare namespace org.modelix.model.client2")) { - it.appendLine(experimentalDeclaration) - } - it.appendLine(line) - } + .append(originalTypescriptDeclarationContent) } } } diff --git a/model-client/integration-tests/src/jsTest/kotlin/org/modelix/model/client2/ClientJsAuthTest.kt b/model-client/integration-tests/src/jsTest/kotlin/org/modelix/model/client2/ClientJsAuthTest.kt index 89338394b1..c52f4e2cd5 100644 --- a/model-client/integration-tests/src/jsTest/kotlin/org/modelix/model/client2/ClientJsAuthTest.kt +++ b/model-client/integration-tests/src/jsTest/kotlin/org/modelix/model/client2/ClientJsAuthTest.kt @@ -1,12 +1,9 @@ -@file:OptIn(UnstableModelixFeature::class) - package org.modelix.model.client2 import io.ktor.client.plugins.ClientRequestException import io.ktor.http.HttpStatusCode import kotlinx.coroutines.await import kotlinx.coroutines.test.runTest -import org.modelix.kotlin.utils.UnstableModelixFeature import kotlin.js.Promise import kotlin.test.Test import kotlin.test.assertEquals diff --git a/model-client/src/jsMain/kotlin/org/modelix/model/client2/BranchJSImpl.kt b/model-client/src/jsMain/kotlin/org/modelix/model/client2/BranchJSImpl.kt index e4e14d0628..ef63f9b062 100644 --- a/model-client/src/jsMain/kotlin/org/modelix/model/client2/BranchJSImpl.kt +++ b/model-client/src/jsMain/kotlin/org/modelix/model/client2/BranchJSImpl.kt @@ -14,13 +14,10 @@ * limitations under the License. */ -@file:OptIn(UnstableModelixFeature::class) - package org.modelix.model.client2 import INodeJS import INodeReferenceJS -import org.modelix.kotlin.utils.UnstableModelixFeature import org.modelix.model.api.IBranch import org.modelix.model.api.IBranchListener import org.modelix.model.api.INodeReferenceSerializer diff --git a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ChangeJS.kt b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ChangeJS.kt index fa9420f7f9..f28a53841f 100644 --- a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ChangeJS.kt +++ b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ChangeJS.kt @@ -17,16 +17,11 @@ package org.modelix.model.client2 import INodeJS -import org.modelix.kotlin.utils.UnstableModelixFeature /** * Represents a change in branch that can be handled by a [ChangeHandler]. * See [BranchJS.addListener] */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport sealed interface ChangeJS { /** @@ -38,10 +33,6 @@ sealed interface ChangeJS { /** * Represents a changed property value. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport data class PropertyChanged( override val node: INodeJS, @@ -54,10 +45,6 @@ data class PropertyChanged( /** * Represents moved, added or removed children. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport data class ChildrenChanged( override val node: INodeJS, @@ -70,10 +57,6 @@ data class ChildrenChanged( /** * Represents a changed reference target. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport data class ReferenceChanged( override val node: INodeJS, @@ -86,19 +69,11 @@ data class ReferenceChanged( /** * Represents the change of the parent of [node] changed. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport data class ContainmentChanged(override val node: INodeJS) : ChangeJS /** * Represents the change of the concept of a [node]. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport data class ConceptChanged(override val node: INodeJS) : ChangeJS diff --git a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ClientJS.kt b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ClientJS.kt index fa1ef22569..b4b58aa910 100644 --- a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ClientJS.kt +++ b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ClientJS.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -@file:OptIn(UnstableModelixFeature::class, DelicateCoroutinesApi::class) +@file:OptIn(DelicateCoroutinesApi::class) package org.modelix.model.client2 @@ -24,7 +24,6 @@ import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.await import kotlinx.coroutines.promise -import org.modelix.kotlin.utils.UnstableModelixFeature import org.modelix.model.ModelFacade import org.modelix.model.api.INode import org.modelix.model.api.JSNodeConverter @@ -36,10 +35,6 @@ import kotlin.js.Promise /** * Same as [loadModelsFromJsonAsBranch] but directly returns the [BranchJS.rootNode] of the created branch. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport fun loadModelsFromJson(json: Array): INodeJS { val branch = loadModelsFromJsonAsBranch(json) @@ -51,10 +46,6 @@ fun loadModelsFromJson(json: Array): INodeJS { * * Each JSON string will be added as child of the [BranchJS.rootNode] the created [BranchJS]. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport fun loadModelsFromJsonAsBranch(json: Array): BranchJS { val branch = ModelFacade.toLocalBranch(ModelFacade.newLocalTree()) @@ -68,10 +59,6 @@ fun loadModelsFromJsonAsBranch(json: Array): BranchJS { * @param url URL to the V2 endpoint of the model server. * e.g., http://localhost:28102/v2 */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport fun connectClient(url: String, bearerTokenProvider: (() -> Promise)? = null): Promise { return GlobalScope.promise { @@ -94,10 +81,6 @@ fun connectClient(url: String, bearerTokenProvider: (() -> Promise)? = * The full version data of an [ModelClientV2] is not exposed because most parts model API are not exposed to JS yet. * See https://issues.modelix.org/issue/MODELIX-962 */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport interface ClientJS { @@ -203,10 +186,6 @@ typealias ChangeHandler = (ChangeJS) -> Unit * The full version data of an [ModelClientV2] is not exposed because most parts model API are not exposed to JS yet. * See https://issues.modelix.org/issue/MODELIX-962 */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport interface BranchJS { /** diff --git a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJS.kt b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJS.kt index cabd32f893..fbf1caee1e 100644 --- a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJS.kt +++ b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJS.kt @@ -14,20 +14,13 @@ * limitations under the License. */ -@file:OptIn(UnstableModelixFeature::class, UnstableModelixFeature::class) - package org.modelix.model.client2 -import org.modelix.kotlin.utils.UnstableModelixFeature import kotlin.js.Promise /** * Represents a branch two-way live replicated to the model server. */ -@UnstableModelixFeature( - reason = "The overarching task https://issues.modelix.org/issue/MODELIX-500 is in development.", - intendedFinalization = "The client is intended to be finalized when the overarching task is finished.", -) @JsExport interface ReplicatedModelJS { /** diff --git a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJSImpl.kt b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJSImpl.kt index 012485f223..67b0acc837 100644 --- a/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJSImpl.kt +++ b/model-client/src/jsMain/kotlin/org/modelix/model/client2/ReplicatedModelJSImpl.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -@file:OptIn(UnstableModelixFeature::class, DelicateCoroutinesApi::class) +@file:OptIn(DelicateCoroutinesApi::class) package org.modelix.model.client2 @@ -22,7 +22,6 @@ import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.promise import kotlinx.datetime.toJSDate -import org.modelix.kotlin.utils.UnstableModelixFeature import org.modelix.model.withAutoTransactions import kotlin.js.Promise diff --git a/model-client/src/jsTest/kotlin/org/modelix/model/client2/BranchJSTest.kt b/model-client/src/jsTest/kotlin/org/modelix/model/client2/BranchJSTest.kt index 1ba7aa73d2..80d864df04 100644 --- a/model-client/src/jsTest/kotlin/org/modelix/model/client2/BranchJSTest.kt +++ b/model-client/src/jsTest/kotlin/org/modelix/model/client2/BranchJSTest.kt @@ -17,12 +17,10 @@ package org.modelix.model.client2 import GeneratedConcept -import org.modelix.kotlin.utils.UnstableModelixFeature import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNull -@OptIn(UnstableModelixFeature::class) class BranchJSTest { private val emptyRoot = """ diff --git a/model-client/src/jsTest/kotlin/org/modelix/model/client2/ClientJSTest.kt b/model-client/src/jsTest/kotlin/org/modelix/model/client2/ClientJSTest.kt index bab83eff1d..0af0b03939 100644 --- a/model-client/src/jsTest/kotlin/org/modelix/model/client2/ClientJSTest.kt +++ b/model-client/src/jsTest/kotlin/org/modelix/model/client2/ClientJSTest.kt @@ -17,11 +17,9 @@ package org.modelix.model.client2 import GeneratedConcept -import org.modelix.kotlin.utils.UnstableModelixFeature import kotlin.test.Test import kotlin.test.assertEquals -@OptIn(UnstableModelixFeature::class) class ClientJSTest { private val emptyRoot = """ diff --git a/vue-model-api/src/useModelClient.ts b/vue-model-api/src/useModelClient.ts index f736ffb500..eb0908ec66 100644 --- a/vue-model-api/src/useModelClient.ts +++ b/vue-model-api/src/useModelClient.ts @@ -11,8 +11,6 @@ type ClientJS = org.modelix.model.client2.ClientJS; * * The URL is reactive and if it changes, the client is automatically disposed and a new client for the updated URL is created. * - * @experimental This feature is expected to be finalized with https://issues.modelix.org/issue/MODELIX-500. - * * @param url - Reactive reference of an URL to a model server. * @param getClient - Function how to create a cliente given an URL. * diff --git a/vue-model-api/src/useModelsFromJson.ts b/vue-model-api/src/useModelsFromJson.ts index 149d1f1d9c..67bcf50b91 100644 --- a/vue-model-api/src/useModelsFromJson.ts +++ b/vue-model-api/src/useModelsFromJson.ts @@ -13,8 +13,6 @@ type ChangeJS = org.modelix.model.client2.ChangeJS; * * The returned root node uses Vues reactivity and can be used in Vue like an reactive object. * - * @experimental This feature is expected to be finalized with https://issues.modelix.org/issue/MODELIX-500. - * * @param modelDataJsonStrings - Array of string, each representing a root node. * @returns A new root node the combines all children from the loaded root nodes. */ diff --git a/vue-model-api/src/useReplicatedModel.ts b/vue-model-api/src/useReplicatedModel.ts index aee4b27779..f1b423e723 100644 --- a/vue-model-api/src/useReplicatedModel.ts +++ b/vue-model-api/src/useReplicatedModel.ts @@ -21,8 +21,6 @@ type ChangeJS = org.modelix.model.client2.ChangeJS; * * Calling the returned dispose function stops syncing the root node to the underlying branch on the server. * - * @experimental This feature is expected to be finalized with https://issues.modelix.org/issue/MODELIX-500. - * * @param client - Reactive reference of a client to a model server. * @param repositoryId - Reactive reference of a repositoryId on the model server. * @param branchId - Reactive reference of a branchId in the repository of the model server.