Skip to content

Commit

Permalink
stash wip
Browse files Browse the repository at this point in the history
  • Loading branch information
odzhychko committed Oct 11, 2023
1 parent 824a4bd commit 35d6644
Show file tree
Hide file tree
Showing 7 changed files with 309 additions and 421 deletions.
50 changes: 50 additions & 0 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@
# yarn lockfile v1


"@aws-crypto/sha256-js@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-5.0.0.tgz#fec6d5a9a097e812207eacaaa707bfa9191b3ad8"
integrity sha512-g+u9iKkaQVp9Mjoxq1IJSHj9NHGZF441+R/GIH0dn7u4mix5QQ4VqgpppHrNm1LzjUzb0BpcFGsBXP6cOVf+ZQ==
dependencies:
"@aws-crypto/util" "^5.0.0"
"@aws-sdk/types" "^3.222.0"
tslib "^1.11.1"

"@aws-crypto/util@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-5.0.0.tgz#afa286af897ea2bd9fab194b4a6be9cc562db23a"
integrity sha512-1GYqLdYRe96idcCltlqxdJ68OWE6ADT8qGLmVi7PVHKl8AxD2EWSbJSSevPq2eTx6vaPZpkr1RoZ3lcw/uGoEA==
dependencies:
"@aws-sdk/types" "^3.222.0"
"@aws-sdk/util-utf8-browser" "^3.0.0"
tslib "^1.11.1"

"@aws-sdk/types@^3.222.0":
version "3.398.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.398.0.tgz#8ce02559536670f9188cddfce32e9dd12b4fe965"
integrity sha512-r44fkS+vsEgKCuEuTV+TIk0t0m5ZlXHNjSDYEUvzLStbbfUFiNus/YG4UCa0wOk9R7VuQI67badsvvPeVPCGDQ==
dependencies:
"@smithy/types" "^2.2.2"
tslib "^2.5.0"

"@aws-sdk/util-utf8-browser@^3.0.0":
version "3.259.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff"
integrity sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==
dependencies:
tslib "^2.3.1"

"@colors/colors@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
Expand Down Expand Up @@ -57,6 +90,13 @@
resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-3.2.0.tgz#3e61e21b7b2b8a6be746df1335cf91d70db2a273"
integrity sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg==

"@smithy/types@^2.2.2":
version "2.2.2"
resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.2.2.tgz#bd8691eb92dd07ac33b83e0e1c45f283502b1bf7"
integrity sha512-4PS0y1VxDnELGHGgBWlDksB2LJK8TG8lcvlWxIsgR+8vROI7Ms8h1P4FQUx+ftAX2QZv5g1CJCdhdRmQKyonyw==
dependencies:
tslib "^2.5.0"

"@socket.io/component-emitter@~3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"
Expand Down Expand Up @@ -1738,6 +1778,16 @@ tr46@~0.0.3:
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==

tslib@^1.11.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2.3.1, tslib@^2.5.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==

type-is@~1.6.18:
version "1.6.18"
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
Expand Down
553 changes: 136 additions & 417 deletions model-server/courses.modelserver5.dump

Large diffs are not rendered by default.

104 changes: 103 additions & 1 deletion spa-api-demo-angular/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions spa-api-demo-angular/src/app/model.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { N_Module } from 'metamodel-api-ts/build/dist/L_org_modelix_model_reposi
import * as metamodel from 'metamodel-api-ts'
import { IChangeJS, SampleModelClientJS, org } from 'modelix-samples-ts-model-client-demo'
import * as modelApi from "@modelix/ts-model-api/"

// import INodeJS from "@modelix/ts-model-api/dist/INodeJS"

interface ChangeDescription {
Expand All @@ -30,6 +31,20 @@ export class ModelService {
// TODO Olekz let specify branch
// How to switch branch?
// Would we create a new client?
// tmpName.SecureModelixClient.connectToModelServer(
// "http://0.0.0.0:28666/v2",
// "courses",
// (iNode) => {
// console.log(iNode);
// },
// (error) => {
// console.log(error);
// },
// (change) => {
// console.log(change);
// }
// );
console.log((window as any).coroutineDispatcher)
SampleModelClientJS.connectToModelServer("http://0.0.0.0:28101/v2", "courses", branchNode => {
// console.log(branchNode)
const branchJsNode = org.modelix.model.api.JSNodeConverter.nodeToJs(branchNode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export class TutorDetailComponent {
return
}
// TODO Olekz, put in generated Interface or into model service
// TODO Olekz, this should be part of the API
tutor.unwrap().getParent()?.removeChild(tutor.unwrap())
this.router.navigate(["/"])
}
Expand Down
4 changes: 3 additions & 1 deletion ts-model-client-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ kotlin {

sourceSets {
all {
// TODO Olekz I do not understand what is happening here.
languageSettings.optIn("kotlin.js.ExperimentalJsExport")
}
// TODO Olekz I do not understand what is happening here.
// TODO Olekz Why are the kotlin libs bundled and not part of dependencies in pakcage json
val jsMain by getting {
dependencies {
// TODO do we need all of this?
implementation(project(":mps:metamodel-api-kts"))
implementation(libs.modelix.model.client)
implementation(libs.modelix.model.api.gen.runtime)
Expand All @@ -38,7 +40,7 @@ val npmPack = tasks.register<NpmTask>("npmPack") {
dependsOn("jsBrowserProductionLibraryDistribution")
inputs.dir(buildDir.resolve("dist/js/productionLibrary"))
outputs.dir(buildDir.resolve("packages"))
// TODO Olekz output name
// TODO Olekz output name do not pack
args.addAll("pack", "./build/dist/js/productionLibrary", "--pack-destination", "./build/packages")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ object SampleModelClientJS {
callback: (INode) -> Unit,
changeCallback: (IChangeJS) -> Unit,
errorCallback: (Exception) -> Unit) {
// TODO Olekz, understand, what this does
GlobalScope.launch {
try {
z
val repositoryId = RepositoryId(repositoryIdString)
val client = ModelClientV2.builder().url(url).build()
client.init()
Expand Down

0 comments on commit 35d6644

Please sign in to comment.