├── .gitignore ├── LICENSE ├── Q01-hello-world-memory ├── README.md └── rss-thorntail │ ├── pom.xml │ └── src │ └── main │ └── java │ └── com │ └── example │ └── rest │ ├── HelloWorldEndpoint.java │ └── RestApplication.java ├── Q02-GraalVM ├── README.md └── graalvm-helloworld │ ├── others │ └── reflectconfig.json │ └── src │ ├── Foo.java │ ├── Main.java │ ├── Main2.java │ ├── Main3.java │ ├── Main4.java │ └── application.properties ├── Q03-hello-world ├── README.md └── hello │ ├── .dockerignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ └── test │ └── java │ └── me │ └── escoffier │ ├── HelloResourceTest.java │ └── NativeHelloResourceIT.java ├── Q04-rest-crud-application ├── simple-rest │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── acme │ │ └── rest │ │ ├── MyRestResource.java │ │ └── Product.java └── todo-backend │ ├── .dockerignore │ ├── README.md │ ├── pom.xml │ ├── src │ └── main │ │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ │ ├── java │ │ └── io │ │ │ └── quarkus │ │ │ └── sample │ │ │ ├── IndexResource.java │ │ │ ├── Todo.java │ │ │ └── TodoResource.java │ │ └── resources │ │ ├── META-INF │ │ └── resources │ │ │ ├── js │ │ │ ├── app.js │ │ │ ├── routes.js │ │ │ └── store.js │ │ │ ├── node_modules │ │ │ ├── director │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bower.json │ │ │ │ ├── build │ │ │ │ │ ├── director.js │ │ │ │ │ ├── director.min.js │ │ │ │ │ └── ender.js │ │ │ │ ├── examples │ │ │ │ │ └── http.js │ │ │ │ ├── img │ │ │ │ │ ├── director.png │ │ │ │ │ └── hashRoute.png │ │ │ │ ├── lib │ │ │ │ │ ├── director.js │ │ │ │ │ └── director │ │ │ │ │ │ ├── browser.js │ │ │ │ │ │ ├── cli.js │ │ │ │ │ │ ├── http │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── methods.js │ │ │ │ │ │ └── responses.js │ │ │ │ │ │ └── router.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── browser │ │ │ │ │ ├── backend │ │ │ │ │ │ └── backend.js │ │ │ │ │ ├── browserify-harness.html │ │ │ │ │ ├── helpers │ │ │ │ │ │ └── api.js │ │ │ │ │ ├── html5-routes-harness.html │ │ │ │ │ ├── html5-routes-test.js │ │ │ │ │ ├── routes-harness.html │ │ │ │ │ └── routes-test.js │ │ │ │ │ └── server │ │ │ │ │ ├── cli │ │ │ │ │ ├── dispatch-test.js │ │ │ │ │ ├── mount-test.js │ │ │ │ │ └── path-test.js │ │ │ │ │ ├── core │ │ │ │ │ ├── dispatch-test.js │ │ │ │ │ ├── insert-test.js │ │ │ │ │ ├── mount-test.js │ │ │ │ │ ├── on-test.js │ │ │ │ │ ├── path-test.js │ │ │ │ │ └── regifystring-test.js │ │ │ │ │ ├── helpers │ │ │ │ │ ├── index.js │ │ │ │ │ └── macros.js │ │ │ │ │ └── http │ │ │ │ │ ├── accept-test.js │ │ │ │ │ ├── attach-test.js │ │ │ │ │ ├── before-test.js │ │ │ │ │ ├── configure-test.js │ │ │ │ │ ├── http-test.js │ │ │ │ │ ├── methods-test.js │ │ │ │ │ ├── recursion-test.js │ │ │ │ │ ├── responses-test.js │ │ │ │ │ └── stream-test.js │ │ │ ├── todomvc-app-css │ │ │ │ ├── index.css │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── todomvc-common │ │ │ │ ├── base.css │ │ │ │ ├── base.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── vue-axios │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ │ ├── vue-axios.es5.js │ │ │ │ │ └── vue-axios.min.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ │ └── index.js │ │ │ └── vue │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ ├── README.md │ │ │ │ ├── vue.common.dev.js │ │ │ │ ├── vue.common.js │ │ │ │ ├── vue.common.prod.js │ │ │ │ ├── vue.esm.browser.js │ │ │ │ ├── vue.esm.browser.min.js │ │ │ │ ├── vue.esm.js │ │ │ │ ├── vue.js │ │ │ │ ├── vue.min.js │ │ │ │ ├── vue.runtime.common.dev.js │ │ │ │ ├── vue.runtime.common.js │ │ │ │ ├── vue.runtime.common.prod.js │ │ │ │ ├── vue.runtime.esm.js │ │ │ │ ├── vue.runtime.js │ │ │ │ └── vue.runtime.min.js │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── compiler │ │ │ │ │ ├── codeframe.js │ │ │ │ │ ├── codegen │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── create-compiler.js │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── bind.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── on.js │ │ │ │ │ ├── error-detector.js │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── optimizer.js │ │ │ │ │ ├── parser │ │ │ │ │ │ ├── entity-decoder.js │ │ │ │ │ │ ├── filter-parser.js │ │ │ │ │ │ ├── html-parser.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── text-parser.js │ │ │ │ │ └── to-function.js │ │ │ │ ├── core │ │ │ │ │ ├── components │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── keep-alive.js │ │ │ │ │ ├── config.js │ │ │ │ │ ├── global-api │ │ │ │ │ │ ├── assets.js │ │ │ │ │ │ ├── extend.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── mixin.js │ │ │ │ │ │ └── use.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── instance │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── init.js │ │ │ │ │ │ ├── inject.js │ │ │ │ │ │ ├── lifecycle.js │ │ │ │ │ │ ├── proxy.js │ │ │ │ │ │ ├── render-helpers │ │ │ │ │ │ │ ├── bind-dynamic-keys.js │ │ │ │ │ │ │ ├── bind-object-listeners.js │ │ │ │ │ │ │ ├── bind-object-props.js │ │ │ │ │ │ │ ├── check-keycodes.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── render-list.js │ │ │ │ │ │ │ ├── render-slot.js │ │ │ │ │ │ │ ├── render-static.js │ │ │ │ │ │ │ ├── resolve-filter.js │ │ │ │ │ │ │ ├── resolve-scoped-slots.js │ │ │ │ │ │ │ └── resolve-slots.js │ │ │ │ │ │ ├── render.js │ │ │ │ │ │ └── state.js │ │ │ │ │ ├── observer │ │ │ │ │ │ ├── array.js │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── scheduler.js │ │ │ │ │ │ ├── traverse.js │ │ │ │ │ │ └── watcher.js │ │ │ │ │ ├── util │ │ │ │ │ │ ├── debug.js │ │ │ │ │ │ ├── env.js │ │ │ │ │ │ ├── error.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── lang.js │ │ │ │ │ │ ├── next-tick.js │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ ├── perf.js │ │ │ │ │ │ └── props.js │ │ │ │ │ └── vdom │ │ │ │ │ │ ├── create-component.js │ │ │ │ │ │ ├── create-element.js │ │ │ │ │ │ ├── create-functional-component.js │ │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── extract-props.js │ │ │ │ │ │ ├── get-first-component-child.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── is-async-placeholder.js │ │ │ │ │ │ ├── merge-hook.js │ │ │ │ │ │ ├── normalize-children.js │ │ │ │ │ │ ├── normalize-scoped-slots.js │ │ │ │ │ │ ├── resolve-async-component.js │ │ │ │ │ │ └── update-listeners.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── directives.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── ref.js │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ └── vnode.js │ │ │ │ ├── platforms │ │ │ │ │ ├── web │ │ │ │ │ │ ├── compiler │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── html.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── text.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ ├── entry-compiler.js │ │ │ │ │ │ ├── entry-runtime-with-compiler.js │ │ │ │ │ │ ├── entry-runtime.js │ │ │ │ │ │ ├── entry-server-basic-renderer.js │ │ │ │ │ │ ├── entry-server-renderer.js │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ │ ├── class-util.js │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ │ └── transition-util.js │ │ │ │ │ │ ├── server │ │ │ │ │ │ │ ├── compiler.js │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ └── util │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── compat.js │ │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── style.js │ │ │ │ │ └── weex │ │ │ │ │ │ ├── compiler │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── model.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── modules │ │ │ │ │ │ │ ├── append.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── props.js │ │ │ │ │ │ │ ├── recycle-list │ │ │ │ │ │ │ ├── component-root.js │ │ │ │ │ │ │ ├── component.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── recycle-list.js │ │ │ │ │ │ │ ├── text.js │ │ │ │ │ │ │ ├── v-bind.js │ │ │ │ │ │ │ ├── v-for.js │ │ │ │ │ │ │ ├── v-if.js │ │ │ │ │ │ │ ├── v-on.js │ │ │ │ │ │ │ └── v-once.js │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ ├── entry-compiler.js │ │ │ │ │ │ ├── entry-framework.js │ │ │ │ │ │ ├── entry-runtime-factory.js │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── richtext.js │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ ├── recycle-list │ │ │ │ │ │ │ ├── render-component-template.js │ │ │ │ │ │ │ └── virtual-component.js │ │ │ │ │ │ └── text-node.js │ │ │ │ │ │ └── util │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── parser.js │ │ │ │ ├── server │ │ │ │ │ ├── bundle-renderer │ │ │ │ │ │ ├── create-bundle-renderer.js │ │ │ │ │ │ ├── create-bundle-runner.js │ │ │ │ │ │ └── source-map-support.js │ │ │ │ │ ├── create-basic-renderer.js │ │ │ │ │ ├── create-renderer.js │ │ │ │ │ ├── optimizing-compiler │ │ │ │ │ │ ├── codegen.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── modules.js │ │ │ │ │ │ ├── optimizer.js │ │ │ │ │ │ └── runtime-helpers.js │ │ │ │ │ ├── render-context.js │ │ │ │ │ ├── render-stream.js │ │ │ │ │ ├── render.js │ │ │ │ │ ├── template-renderer │ │ │ │ │ │ ├── create-async-file-mapper.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── parse-template.js │ │ │ │ │ │ └── template-stream.js │ │ │ │ │ ├── util.js │ │ │ │ │ ├── webpack-plugin │ │ │ │ │ │ ├── client.js │ │ │ │ │ │ ├── server.js │ │ │ │ │ │ └── util.js │ │ │ │ │ └── write.js │ │ │ │ ├── sfc │ │ │ │ │ └── parser.js │ │ │ │ └── shared │ │ │ │ │ ├── constants.js │ │ │ │ │ └── util.js │ │ │ │ └── types │ │ │ │ ├── index.d.ts │ │ │ │ ├── options.d.ts │ │ │ │ ├── plugin.d.ts │ │ │ │ ├── vnode.d.ts │ │ │ │ └── vue.d.ts │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ └── todo.html │ │ ├── application.properties │ │ ├── import.sql │ │ └── package-lock.json │ └── start-database.sh ├── Q05-reactive-kafka ├── README.md ├── banking-demo │ ├── fraud-detector │ │ ├── .dockerignore │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── docker │ │ │ ├── Dockerfile.jvm │ │ │ └── Dockerfile.native │ │ │ ├── java │ │ │ └── me │ │ │ │ └── escoffier │ │ │ │ └── quarkus │ │ │ │ └── reactive │ │ │ │ ├── Fraud.java │ │ │ │ ├── FraudDetector.java │ │ │ │ ├── FraudSocket.java │ │ │ │ └── Transaction.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ ├── payment-service │ │ ├── .dockerignore │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── docker │ │ │ ├── Dockerfile.jvm │ │ │ └── Dockerfile.native │ │ │ ├── java │ │ │ └── me │ │ │ │ └── escoffier │ │ │ │ └── quarkus │ │ │ │ └── reactive │ │ │ │ ├── Payment.java │ │ │ │ ├── PaymentResource.java │ │ │ │ └── Processing.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ └── transaction-viewer │ │ ├── .dockerignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ │ ├── java │ │ └── me │ │ │ └── escoffier │ │ │ └── quarkus │ │ │ └── reactive │ │ │ └── TransactionResource.java │ │ └── resources │ │ ├── META-INF │ │ └── resources │ │ │ └── index.html │ │ └── application.properties ├── coffeeshop-demo │ ├── LICENSE │ ├── README.md │ ├── barista-http │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── me │ │ │ │ └── escoffier │ │ │ │ └── quarkus │ │ │ │ └── coffeeshop │ │ │ │ ├── BaristaResource.java │ │ │ │ ├── Beverage.java │ │ │ │ └── Order.java │ │ │ └── resources │ │ │ └── application.properties │ ├── barista-kafka │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── me │ │ │ │ │ └── escoffier │ │ │ │ │ └── quarkus │ │ │ │ │ └── coffeeshop │ │ │ │ │ ├── Beverage.java │ │ │ │ │ ├── KafkaBarista.java │ │ │ │ │ ├── Order.java │ │ │ │ │ └── PreparationState.java │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ └── tom.sh │ ├── coffeeshop-service │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── me │ │ │ │ └── escoffier │ │ │ │ └── quarkus │ │ │ │ └── coffeeshop │ │ │ │ ├── CoffeeShopResource.java │ │ │ │ ├── dashboard │ │ │ │ └── BoardResource.java │ │ │ │ ├── http │ │ │ │ └── BaristaService.java │ │ │ │ ├── messaging │ │ │ │ └── KafkaBaristas.java │ │ │ │ └── model │ │ │ │ ├── Beverage.java │ │ │ │ ├── JsonProvider.java │ │ │ │ ├── Order.java │ │ │ │ └── PreparationState.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ ├── create-orders.sh │ ├── docker-compose.yaml │ ├── order-coffees.sh │ ├── pom.xml │ └── post-beverage.lua ├── docker-compose.yaml ├── hello-kafka-demo │ ├── quarkus-kafka-consumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── me │ │ │ │ └── escoffier │ │ │ │ └── quarkus │ │ │ │ └── kafka │ │ │ │ └── MyKafkaConsumer.java │ │ │ └── resources │ │ │ └── application.properties │ └── quarkus-kafka-producer │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── me │ │ │ └── escoffier │ │ │ └── quarkus │ │ │ └── kafka │ │ │ └── MyKafkaProducer.java │ │ └── resources │ │ └── application.properties ├── pom.xml └── reactive-http-demo │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── me │ │ └── escoffier │ │ └── demo │ │ ├── AsyncResource.java │ │ └── MyAsyncMessageReceiver.java │ └── resources │ └── application.properties ├── Q06-testing ├── .dockerignore ├── README.md ├── pom.xml ├── src │ ├── main │ │ ├── docker │ │ │ ├── Dockerfile.jvm │ │ │ └── Dockerfile.native │ │ ├── java │ │ │ └── io │ │ │ │ └── quarkus │ │ │ │ └── sample │ │ │ │ ├── IndexResource.java │ │ │ │ ├── Todo.java │ │ │ │ └── TodoResource.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ ├── js │ │ │ │ ├── app.js │ │ │ │ ├── routes.js │ │ │ │ └── store.js │ │ │ │ ├── node_modules │ │ │ │ ├── director │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── bower.json │ │ │ │ │ ├── build │ │ │ │ │ │ ├── director.js │ │ │ │ │ │ ├── director.min.js │ │ │ │ │ │ └── ender.js │ │ │ │ │ ├── examples │ │ │ │ │ │ └── http.js │ │ │ │ │ ├── img │ │ │ │ │ │ ├── director.png │ │ │ │ │ │ └── hashRoute.png │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── director.js │ │ │ │ │ │ └── director │ │ │ │ │ │ │ ├── browser.js │ │ │ │ │ │ │ ├── cli.js │ │ │ │ │ │ │ ├── http │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── methods.js │ │ │ │ │ │ │ └── responses.js │ │ │ │ │ │ │ └── router.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── test │ │ │ │ │ │ ├── browser │ │ │ │ │ │ ├── backend │ │ │ │ │ │ │ └── backend.js │ │ │ │ │ │ ├── browserify-harness.html │ │ │ │ │ │ ├── helpers │ │ │ │ │ │ │ └── api.js │ │ │ │ │ │ ├── html5-routes-harness.html │ │ │ │ │ │ ├── html5-routes-test.js │ │ │ │ │ │ ├── routes-harness.html │ │ │ │ │ │ └── routes-test.js │ │ │ │ │ │ └── server │ │ │ │ │ │ ├── cli │ │ │ │ │ │ ├── dispatch-test.js │ │ │ │ │ │ ├── mount-test.js │ │ │ │ │ │ └── path-test.js │ │ │ │ │ │ ├── core │ │ │ │ │ │ ├── dispatch-test.js │ │ │ │ │ │ ├── insert-test.js │ │ │ │ │ │ ├── mount-test.js │ │ │ │ │ │ ├── on-test.js │ │ │ │ │ │ ├── path-test.js │ │ │ │ │ │ └── regifystring-test.js │ │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── macros.js │ │ │ │ │ │ └── http │ │ │ │ │ │ ├── accept-test.js │ │ │ │ │ │ ├── attach-test.js │ │ │ │ │ │ ├── before-test.js │ │ │ │ │ │ ├── configure-test.js │ │ │ │ │ │ ├── http-test.js │ │ │ │ │ │ ├── methods-test.js │ │ │ │ │ │ ├── recursion-test.js │ │ │ │ │ │ ├── responses-test.js │ │ │ │ │ │ └── stream-test.js │ │ │ │ ├── todomvc-app-css │ │ │ │ │ ├── index.css │ │ │ │ │ ├── license │ │ │ │ │ ├── package.json │ │ │ │ │ └── readme.md │ │ │ │ ├── todomvc-common │ │ │ │ │ ├── base.css │ │ │ │ │ ├── base.js │ │ │ │ │ ├── license │ │ │ │ │ ├── package.json │ │ │ │ │ └── readme.md │ │ │ │ ├── vue-axios │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── dist │ │ │ │ │ │ ├── vue-axios.es5.js │ │ │ │ │ │ └── vue-axios.min.js │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ │ └── index.js │ │ │ │ └── vue │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── dist │ │ │ │ │ ├── README.md │ │ │ │ │ ├── vue.common.dev.js │ │ │ │ │ ├── vue.common.js │ │ │ │ │ ├── vue.common.prod.js │ │ │ │ │ ├── vue.esm.browser.js │ │ │ │ │ ├── vue.esm.browser.min.js │ │ │ │ │ ├── vue.esm.js │ │ │ │ │ ├── vue.js │ │ │ │ │ ├── vue.min.js │ │ │ │ │ ├── vue.runtime.common.dev.js │ │ │ │ │ ├── vue.runtime.common.js │ │ │ │ │ ├── vue.runtime.common.prod.js │ │ │ │ │ ├── vue.runtime.esm.js │ │ │ │ │ ├── vue.runtime.js │ │ │ │ │ └── vue.runtime.min.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── src │ │ │ │ │ ├── compiler │ │ │ │ │ │ ├── codeframe.js │ │ │ │ │ │ ├── codegen │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── create-compiler.js │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── bind.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ └── on.js │ │ │ │ │ │ ├── error-detector.js │ │ │ │ │ │ ├── helpers.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── optimizer.js │ │ │ │ │ │ ├── parser │ │ │ │ │ │ │ ├── entity-decoder.js │ │ │ │ │ │ │ ├── filter-parser.js │ │ │ │ │ │ │ ├── html-parser.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── text-parser.js │ │ │ │ │ │ └── to-function.js │ │ │ │ │ ├── core │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── keep-alive.js │ │ │ │ │ │ ├── config.js │ │ │ │ │ │ ├── global-api │ │ │ │ │ │ │ ├── assets.js │ │ │ │ │ │ │ ├── extend.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── mixin.js │ │ │ │ │ │ │ └── use.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── instance │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── init.js │ │ │ │ │ │ │ ├── inject.js │ │ │ │ │ │ │ ├── lifecycle.js │ │ │ │ │ │ │ ├── proxy.js │ │ │ │ │ │ │ ├── render-helpers │ │ │ │ │ │ │ │ ├── bind-dynamic-keys.js │ │ │ │ │ │ │ │ ├── bind-object-listeners.js │ │ │ │ │ │ │ │ ├── bind-object-props.js │ │ │ │ │ │ │ │ ├── check-keycodes.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── render-list.js │ │ │ │ │ │ │ │ ├── render-slot.js │ │ │ │ │ │ │ │ ├── render-static.js │ │ │ │ │ │ │ │ ├── resolve-filter.js │ │ │ │ │ │ │ │ ├── resolve-scoped-slots.js │ │ │ │ │ │ │ │ └── resolve-slots.js │ │ │ │ │ │ │ ├── render.js │ │ │ │ │ │ │ └── state.js │ │ │ │ │ │ ├── observer │ │ │ │ │ │ │ ├── array.js │ │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── scheduler.js │ │ │ │ │ │ │ ├── traverse.js │ │ │ │ │ │ │ └── watcher.js │ │ │ │ │ │ ├── util │ │ │ │ │ │ │ ├── debug.js │ │ │ │ │ │ │ ├── env.js │ │ │ │ │ │ │ ├── error.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── lang.js │ │ │ │ │ │ │ ├── next-tick.js │ │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ │ ├── perf.js │ │ │ │ │ │ │ └── props.js │ │ │ │ │ │ └── vdom │ │ │ │ │ │ │ ├── create-component.js │ │ │ │ │ │ │ ├── create-element.js │ │ │ │ │ │ │ ├── create-functional-component.js │ │ │ │ │ │ │ ├── helpers │ │ │ │ │ │ │ ├── extract-props.js │ │ │ │ │ │ │ ├── get-first-component-child.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── is-async-placeholder.js │ │ │ │ │ │ │ ├── merge-hook.js │ │ │ │ │ │ │ ├── normalize-children.js │ │ │ │ │ │ │ ├── normalize-scoped-slots.js │ │ │ │ │ │ │ ├── resolve-async-component.js │ │ │ │ │ │ │ └── update-listeners.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── directives.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── ref.js │ │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ │ └── vnode.js │ │ │ │ │ ├── platforms │ │ │ │ │ │ ├── web │ │ │ │ │ │ │ ├── compiler │ │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ │ ├── html.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ │ └── text.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ │ ├── entry-compiler.js │ │ │ │ │ │ │ ├── entry-runtime-with-compiler.js │ │ │ │ │ │ │ ├── entry-runtime.js │ │ │ │ │ │ │ ├── entry-server-basic-renderer.js │ │ │ │ │ │ │ ├── entry-server-renderer.js │ │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ │ │ ├── class-util.js │ │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ │ │ └── transition-util.js │ │ │ │ │ │ │ ├── server │ │ │ │ │ │ │ │ ├── compiler.js │ │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── compat.js │ │ │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ └── weex │ │ │ │ │ │ │ ├── compiler │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── model.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── modules │ │ │ │ │ │ │ │ ├── append.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── props.js │ │ │ │ │ │ │ │ ├── recycle-list │ │ │ │ │ │ │ │ ├── component-root.js │ │ │ │ │ │ │ │ ├── component.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── recycle-list.js │ │ │ │ │ │ │ │ ├── text.js │ │ │ │ │ │ │ │ ├── v-bind.js │ │ │ │ │ │ │ │ ├── v-for.js │ │ │ │ │ │ │ │ ├── v-if.js │ │ │ │ │ │ │ │ ├── v-on.js │ │ │ │ │ │ │ │ └── v-once.js │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ ├── entry-compiler.js │ │ │ │ │ │ │ ├── entry-framework.js │ │ │ │ │ │ │ ├── entry-runtime-factory.js │ │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── richtext.js │ │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ │ ├── recycle-list │ │ │ │ │ │ │ │ ├── render-component-template.js │ │ │ │ │ │ │ │ └── virtual-component.js │ │ │ │ │ │ │ └── text-node.js │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── parser.js │ │ │ │ │ ├── server │ │ │ │ │ │ ├── bundle-renderer │ │ │ │ │ │ │ ├── create-bundle-renderer.js │ │ │ │ │ │ │ ├── create-bundle-runner.js │ │ │ │ │ │ │ └── source-map-support.js │ │ │ │ │ │ ├── create-basic-renderer.js │ │ │ │ │ │ ├── create-renderer.js │ │ │ │ │ │ ├── optimizing-compiler │ │ │ │ │ │ │ ├── codegen.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── modules.js │ │ │ │ │ │ │ ├── optimizer.js │ │ │ │ │ │ │ └── runtime-helpers.js │ │ │ │ │ │ ├── render-context.js │ │ │ │ │ │ ├── render-stream.js │ │ │ │ │ │ ├── render.js │ │ │ │ │ │ ├── template-renderer │ │ │ │ │ │ │ ├── create-async-file-mapper.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── parse-template.js │ │ │ │ │ │ │ └── template-stream.js │ │ │ │ │ │ ├── util.js │ │ │ │ │ │ ├── webpack-plugin │ │ │ │ │ │ │ ├── client.js │ │ │ │ │ │ │ ├── server.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ └── write.js │ │ │ │ │ ├── sfc │ │ │ │ │ │ └── parser.js │ │ │ │ │ └── shared │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ └── util.js │ │ │ │ │ └── types │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── options.d.ts │ │ │ │ │ ├── plugin.d.ts │ │ │ │ │ ├── vnode.d.ts │ │ │ │ │ └── vue.d.ts │ │ │ │ ├── package-lock.json │ │ │ │ ├── package.json │ │ │ │ └── todo.html │ │ │ ├── application.properties │ │ │ ├── import.sql │ │ │ └── package-lock.json │ └── test │ │ └── java │ │ └── io │ │ └── quarkus │ │ └── sample │ │ ├── TodoResourceIT.java │ │ └── TodoResourceTest.java └── start-database.sh ├── Q08-ops ├── quarkus-health-check-demo │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── me │ │ └── escoffier │ │ └── quarkus │ │ └── demo │ │ └── health │ │ ├── AnotherSensor.java │ │ └── MyResource.java └── todo-backend-metrics │ ├── .dockerignore │ ├── README.md │ ├── pom.xml │ ├── prometheus │ └── prometheus.yaml │ ├── src │ └── main │ │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ │ ├── java │ │ └── io │ │ │ └── quarkus │ │ │ └── sample │ │ │ ├── IndexResource.java │ │ │ ├── Todo.java │ │ │ └── TodoResource.java │ │ └── resources │ │ ├── META-INF │ │ └── resources │ │ │ ├── js │ │ │ ├── app.js │ │ │ ├── routes.js │ │ │ └── store.js │ │ │ ├── node_modules │ │ │ ├── director │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bower.json │ │ │ │ ├── build │ │ │ │ │ ├── director.js │ │ │ │ │ ├── director.min.js │ │ │ │ │ └── ender.js │ │ │ │ ├── examples │ │ │ │ │ └── http.js │ │ │ │ ├── img │ │ │ │ │ ├── director.png │ │ │ │ │ └── hashRoute.png │ │ │ │ ├── lib │ │ │ │ │ ├── director.js │ │ │ │ │ └── director │ │ │ │ │ │ ├── browser.js │ │ │ │ │ │ ├── cli.js │ │ │ │ │ │ ├── http │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── methods.js │ │ │ │ │ │ └── responses.js │ │ │ │ │ │ └── router.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── browser │ │ │ │ │ ├── backend │ │ │ │ │ │ └── backend.js │ │ │ │ │ ├── browserify-harness.html │ │ │ │ │ ├── helpers │ │ │ │ │ │ └── api.js │ │ │ │ │ ├── html5-routes-harness.html │ │ │ │ │ ├── html5-routes-test.js │ │ │ │ │ ├── routes-harness.html │ │ │ │ │ └── routes-test.js │ │ │ │ │ └── server │ │ │ │ │ ├── cli │ │ │ │ │ ├── dispatch-test.js │ │ │ │ │ ├── mount-test.js │ │ │ │ │ └── path-test.js │ │ │ │ │ ├── core │ │ │ │ │ ├── dispatch-test.js │ │ │ │ │ ├── insert-test.js │ │ │ │ │ ├── mount-test.js │ │ │ │ │ ├── on-test.js │ │ │ │ │ ├── path-test.js │ │ │ │ │ └── regifystring-test.js │ │ │ │ │ ├── helpers │ │ │ │ │ ├── index.js │ │ │ │ │ └── macros.js │ │ │ │ │ └── http │ │ │ │ │ ├── accept-test.js │ │ │ │ │ ├── attach-test.js │ │ │ │ │ ├── before-test.js │ │ │ │ │ ├── configure-test.js │ │ │ │ │ ├── http-test.js │ │ │ │ │ ├── methods-test.js │ │ │ │ │ ├── recursion-test.js │ │ │ │ │ ├── responses-test.js │ │ │ │ │ └── stream-test.js │ │ │ ├── todomvc-app-css │ │ │ │ ├── index.css │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── todomvc-common │ │ │ │ ├── base.css │ │ │ │ ├── base.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── vue-axios │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ │ ├── vue-axios.es5.js │ │ │ │ │ └── vue-axios.min.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ │ └── index.js │ │ │ └── vue │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ ├── README.md │ │ │ │ ├── vue.common.dev.js │ │ │ │ ├── vue.common.js │ │ │ │ ├── vue.common.prod.js │ │ │ │ ├── vue.esm.browser.js │ │ │ │ ├── vue.esm.browser.min.js │ │ │ │ ├── vue.esm.js │ │ │ │ ├── vue.js │ │ │ │ ├── vue.min.js │ │ │ │ ├── vue.runtime.common.dev.js │ │ │ │ ├── vue.runtime.common.js │ │ │ │ ├── vue.runtime.common.prod.js │ │ │ │ ├── vue.runtime.esm.js │ │ │ │ ├── vue.runtime.js │ │ │ │ └── vue.runtime.min.js │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── compiler │ │ │ │ │ ├── codeframe.js │ │ │ │ │ ├── codegen │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── create-compiler.js │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── bind.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── on.js │ │ │ │ │ ├── error-detector.js │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── optimizer.js │ │ │ │ │ ├── parser │ │ │ │ │ │ ├── entity-decoder.js │ │ │ │ │ │ ├── filter-parser.js │ │ │ │ │ │ ├── html-parser.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── text-parser.js │ │ │ │ │ └── to-function.js │ │ │ │ ├── core │ │ │ │ │ ├── components │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── keep-alive.js │ │ │ │ │ ├── config.js │ │ │ │ │ ├── global-api │ │ │ │ │ │ ├── assets.js │ │ │ │ │ │ ├── extend.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── mixin.js │ │ │ │ │ │ └── use.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── instance │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── init.js │ │ │ │ │ │ ├── inject.js │ │ │ │ │ │ ├── lifecycle.js │ │ │ │ │ │ ├── proxy.js │ │ │ │ │ │ ├── render-helpers │ │ │ │ │ │ │ ├── bind-dynamic-keys.js │ │ │ │ │ │ │ ├── bind-object-listeners.js │ │ │ │ │ │ │ ├── bind-object-props.js │ │ │ │ │ │ │ ├── check-keycodes.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── render-list.js │ │ │ │ │ │ │ ├── render-slot.js │ │ │ │ │ │ │ ├── render-static.js │ │ │ │ │ │ │ ├── resolve-filter.js │ │ │ │ │ │ │ ├── resolve-scoped-slots.js │ │ │ │ │ │ │ └── resolve-slots.js │ │ │ │ │ │ ├── render.js │ │ │ │ │ │ └── state.js │ │ │ │ │ ├── observer │ │ │ │ │ │ ├── array.js │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── scheduler.js │ │ │ │ │ │ ├── traverse.js │ │ │ │ │ │ └── watcher.js │ │ │ │ │ ├── util │ │ │ │ │ │ ├── debug.js │ │ │ │ │ │ ├── env.js │ │ │ │ │ │ ├── error.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── lang.js │ │ │ │ │ │ ├── next-tick.js │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ ├── perf.js │ │ │ │ │ │ └── props.js │ │ │ │ │ └── vdom │ │ │ │ │ │ ├── create-component.js │ │ │ │ │ │ ├── create-element.js │ │ │ │ │ │ ├── create-functional-component.js │ │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── extract-props.js │ │ │ │ │ │ ├── get-first-component-child.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── is-async-placeholder.js │ │ │ │ │ │ ├── merge-hook.js │ │ │ │ │ │ ├── normalize-children.js │ │ │ │ │ │ ├── normalize-scoped-slots.js │ │ │ │ │ │ ├── resolve-async-component.js │ │ │ │ │ │ └── update-listeners.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── directives.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── ref.js │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ └── vnode.js │ │ │ │ ├── platforms │ │ │ │ │ ├── web │ │ │ │ │ │ ├── compiler │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── html.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── text.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ ├── entry-compiler.js │ │ │ │ │ │ ├── entry-runtime-with-compiler.js │ │ │ │ │ │ ├── entry-runtime.js │ │ │ │ │ │ ├── entry-server-basic-renderer.js │ │ │ │ │ │ ├── entry-server-renderer.js │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ │ ├── class-util.js │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ │ └── transition-util.js │ │ │ │ │ │ ├── server │ │ │ │ │ │ │ ├── compiler.js │ │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ └── util │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── compat.js │ │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── style.js │ │ │ │ │ └── weex │ │ │ │ │ │ ├── compiler │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── model.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── modules │ │ │ │ │ │ │ ├── append.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── props.js │ │ │ │ │ │ │ ├── recycle-list │ │ │ │ │ │ │ ├── component-root.js │ │ │ │ │ │ │ ├── component.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── recycle-list.js │ │ │ │ │ │ │ ├── text.js │ │ │ │ │ │ │ ├── v-bind.js │ │ │ │ │ │ │ ├── v-for.js │ │ │ │ │ │ │ ├── v-if.js │ │ │ │ │ │ │ ├── v-on.js │ │ │ │ │ │ │ └── v-once.js │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ ├── entry-compiler.js │ │ │ │ │ │ ├── entry-framework.js │ │ │ │ │ │ ├── entry-runtime-factory.js │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── richtext.js │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ ├── recycle-list │ │ │ │ │ │ │ ├── render-component-template.js │ │ │ │ │ │ │ └── virtual-component.js │ │ │ │ │ │ └── text-node.js │ │ │ │ │ │ └── util │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── parser.js │ │ │ │ ├── server │ │ │ │ │ ├── bundle-renderer │ │ │ │ │ │ ├── create-bundle-renderer.js │ │ │ │ │ │ ├── create-bundle-runner.js │ │ │ │ │ │ └── source-map-support.js │ │ │ │ │ ├── create-basic-renderer.js │ │ │ │ │ ├── create-renderer.js │ │ │ │ │ ├── optimizing-compiler │ │ │ │ │ │ ├── codegen.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── modules.js │ │ │ │ │ │ ├── optimizer.js │ │ │ │ │ │ └── runtime-helpers.js │ │ │ │ │ ├── render-context.js │ │ │ │ │ ├── render-stream.js │ │ │ │ │ ├── render.js │ │ │ │ │ ├── template-renderer │ │ │ │ │ │ ├── create-async-file-mapper.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── parse-template.js │ │ │ │ │ │ └── template-stream.js │ │ │ │ │ ├── util.js │ │ │ │ │ ├── webpack-plugin │ │ │ │ │ │ ├── client.js │ │ │ │ │ │ ├── server.js │ │ │ │ │ │ └── util.js │ │ │ │ │ └── write.js │ │ │ │ ├── sfc │ │ │ │ │ └── parser.js │ │ │ │ └── shared │ │ │ │ │ ├── constants.js │ │ │ │ │ └── util.js │ │ │ │ └── types │ │ │ │ ├── index.d.ts │ │ │ │ ├── options.d.ts │ │ │ │ ├── plugin.d.ts │ │ │ │ ├── vnode.d.ts │ │ │ │ └── vue.d.ts │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ └── todo.html │ │ ├── application.properties │ │ ├── import.sql │ │ └── package-lock.json │ └── start-database.sh └── README.md /Q01-hello-world-memory/README.md: -------------------------------------------------------------------------------- 1 | # Q01 - Java and RSS 2 | 3 | Make sure to use HotSpot JDK and not GraalVM 4 | 5 | Open in idea `idea .` 6 | Show simple app 7 | 8 | * show `pom.xml` 9 | * Show JAX-RS resource 10 | 11 | mvn package 12 | 13 | Demo the app 14 | 15 | java -jar ./target/restful-endpoint-thorntail.jar 16 | 17 | open http://localhost:8080/rest/hello 18 | 19 | Then play with memory usage 20 | 21 | java -Xmx10m -Xms10m -jar ./target/restful-endpoint-thorntail.jar 22 | 23 | Different OOME 24 | 25 | java -Xmx28m -Xms28m -jar ./target/restful-endpoint-thorntail.jar 26 | 27 | Minimum heap size 28 | 29 | java -Xmx29m -Xms29m -jar ./target/restful-endpoint-thorntail.jar 30 | 31 | http :8080/rest/hello 32 | 33 | ps x -o pid,rss,command | grep java 34 | 35 | RSS in kbytes 36 | 37 | jconsole 38 | -------------------------------------------------------------------------------- /Q01-hello-world-memory/rss-thorntail/src/main/java/com/example/rest/HelloWorldEndpoint.java: -------------------------------------------------------------------------------- 1 | package com.example.rest; 2 | 3 | import javax.ws.rs.Path; 4 | import javax.ws.rs.core.Response; 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Produces; 7 | 8 | @Path("/hello") 9 | public class HelloWorldEndpoint { 10 | 11 | @GET 12 | @Produces("text/plain") 13 | public Response doGet() { 14 | return Response.ok("Hello from Thorntail!").build(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Q01-hello-world-memory/rss-thorntail/src/main/java/com/example/rest/RestApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.rest; 2 | 3 | import javax.ws.rs.core.Application; 4 | import javax.ws.rs.ApplicationPath; 5 | 6 | @ApplicationPath("/rest") 7 | public class RestApplication extends Application { 8 | } 9 | -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/others/reflectconfig.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name" : "Foo", 4 | "allDeclaredConstructors" : true, 5 | "allPublicConstructors" : true, 6 | "allDeclaredMethods" : true, 7 | "allPublicMethods" : true, 8 | "allDeclaredClasses" : true, 9 | "allPublicClasses" : true, 10 | "fields" : [ 11 | { "name" : "bar" } 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/src/Foo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Emmanuel Bernard emmanuel@hibernate.org 3 | */ 4 | public class Foo { 5 | public String bar = "baz"; 6 | } 7 | -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/src/Main.java: -------------------------------------------------------------------------------- 1 | 2 | public class Main { 3 | 4 | public static void main(String[] args) { 5 | System.out.println("Hello World!"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/src/Main2.java: -------------------------------------------------------------------------------- 1 | import java.net.URL; 2 | 3 | public class Main2 { 4 | 5 | public static void main(String[] args) { 6 | System.out.println("Hello World!"); 7 | String resourceName = "application.properties"; 8 | URL resource = Main2.class.getClassLoader().getResource(resourceName); 9 | System.out.println("URL for " + resourceName + ( resource == null ? " is \u274c" : " is \u2705")); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/src/Main3.java: -------------------------------------------------------------------------------- 1 | import java.lang.reflect.Field; 2 | 3 | public class Main3 { 4 | 5 | public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchFieldException { 6 | System.out.println("Hello World!"); 7 | String classFirst = "F"; 8 | String classLast = "oo"; 9 | String field = "bar"; 10 | Class clazz = Main3.class.getClassLoader().loadClass(classFirst + classLast); 11 | Object o = clazz.newInstance(); 12 | Field f = clazz.getDeclaredField(field); 13 | System.out.println(f.get(o)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/src/Main4.java: -------------------------------------------------------------------------------- 1 | import java.lang.reflect.Field; 2 | 3 | public class Main4 { 4 | 5 | public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchFieldException, InterruptedException { 6 | System.out.println("Hello World!"); 7 | String classFirst = "F"; 8 | String classLast = "oo"; 9 | String field = "bar"; 10 | Class clazz = Main4.class.getClassLoader().loadClass(classFirst + classLast); 11 | Object o = clazz.newInstance(); 12 | Field f = clazz.getDeclaredField(field); 13 | System.out.println(f.get(o)); 14 | System.out.println("start"); 15 | while (true) { 16 | Thread.sleep(1000); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Q02-GraalVM/graalvm-helloworld/src/application.properties: -------------------------------------------------------------------------------- 1 | foo=bar -------------------------------------------------------------------------------- /Q03-hello-world/hello/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q03-hello-world/hello/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar 3 | -------------------------------------------------------------------------------- /Q03-hello-world/hello/src/test/java/me/escoffier/HelloResourceTest.java: -------------------------------------------------------------------------------- 1 | package me.escoffier; 2 | 3 | import io.quarkus.test.junit.QuarkusTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static io.restassured.RestAssured.given; 7 | import static org.hamcrest.CoreMatchers.is; 8 | 9 | @QuarkusTest 10 | public class HelloResourceTest { 11 | 12 | @Test 13 | public void testHelloEndpoint() { 14 | given() 15 | .when().get("/hello") 16 | .then() 17 | .statusCode(200) 18 | .body(is("hello")); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /Q03-hello-world/hello/src/test/java/me/escoffier/NativeHelloResourceIT.java: -------------------------------------------------------------------------------- 1 | package me.escoffier; 2 | 3 | import io.quarkus.test.junit.SubstrateTest; 4 | 5 | @SubstrateTest 6 | public class NativeHelloResourceIT extends HelloResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /Q04-rest-crud-application/simple-rest/src/main/java/org/acme/rest/Product.java: -------------------------------------------------------------------------------- 1 | package org.acme.rest; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | import java.util.UUID; 5 | 6 | public class Product { 7 | 8 | private String id = UUID.randomUUID().toString(); 9 | 10 | @NotBlank 11 | private String name; 12 | 13 | public String getId() { 14 | return id; 15 | } 16 | 17 | public Product setId(String id) { 18 | this.id = id; 19 | return this; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public Product setName(String name) { 27 | this.name = name; 28 | return this; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/.dockerignore: -------------------------------------------------------------------------------- 1 | ../ObjectStore 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/todo-backend-jvm . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/todo-backend-jvm 15 | # 16 | ### 17 | FROM fabric8/java-jboss-openjdk8-jdk 18 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 19 | COPY target/lib/* /deployments/lib/ 20 | COPY target/*-runner.jar /deployments/app.jar 21 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package -Pnative -Dnative-image.docker-build=true 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.native -t quarkus/todo-backend . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/todo-backend 15 | # 16 | ### 17 | FROM registry.fedoraproject.org/fedora-minimal 18 | WORKDIR /work/ 19 | COPY target/*-runner /work/application 20 | RUN chmod 775 /work 21 | EXPOSE 8080 22 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/java/io/quarkus/sample/IndexResource.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import java.net.URI; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | import javax.ws.rs.core.UriBuilder; 9 | 10 | @Path("/") 11 | public class IndexResource { 12 | 13 | @GET 14 | public Response redirect() { 15 | URI redirect = UriBuilder.fromUri("todo.html").build(); 16 | return Response.temporaryRedirect(redirect).build(); 17 | } 18 | } -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/java/io/quarkus/sample/Todo.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import io.quarkus.hibernate.orm.panache.PanacheEntity; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.validation.constraints.NotBlank; 8 | import java.util.List; 9 | 10 | @Entity 11 | public class Todo extends PanacheEntity { 12 | 13 | @NotBlank 14 | @Column(unique = true) 15 | public String title; 16 | 17 | public boolean completed; 18 | 19 | @Column(name = "ordering") 20 | public int order; 21 | 22 | public String url; 23 | 24 | public static List findNotCompleted() { 25 | return list("completed", false); 26 | } 27 | 28 | public static List findCompleted() { 29 | return list("completed", true); 30 | } 31 | 32 | public static long deleteCompleted() { 33 | return delete("completed", true); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/js/routes.js: -------------------------------------------------------------------------------- 1 | /*global app, Router */ 2 | 3 | (function (app, Router) { 4 | 5 | 'use strict'; 6 | 7 | var router = new Router(); 8 | 9 | ['all', 'active', 'completed'].forEach(function (visibility) { 10 | router.on(visibility, function () { 11 | app.visibility = visibility; 12 | }); 13 | }); 14 | 15 | router.configure({ 16 | notfound: function () { 17 | window.location.hash = ''; 18 | app.visibility = 'all'; 19 | } 20 | }); 21 | 22 | router.init(); 23 | 24 | })(app, Router); 25 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/js/store.js: -------------------------------------------------------------------------------- 1 | /*jshint unused:false */ 2 | 3 | (function (exports) { 4 | 5 | 'use strict'; 6 | 7 | var serverUrl = 'api/'; 8 | 9 | exports.todoStorage = { 10 | fetch: async function () { 11 | const response = await axios.get(serverUrl); 12 | console.log(response.data); 13 | return response.data; 14 | }, 15 | add : async function(item) { 16 | console.log("Adding todo item " + item.title); 17 | return (await axios.post(serverUrl, item)).data; 18 | }, 19 | save: async function (item) { 20 | console.log("save called with", item); 21 | await axios.patch(serverUrl + item.id, item); 22 | }, 23 | delete: async function(item) { 24 | await axios.delete(serverUrl + item.id); 25 | }, 26 | deleteCompleted: async function() { 27 | await axios.delete(serverUrl); 28 | } 29 | }; 30 | 31 | })(window); 32 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/.npmignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | node_modules 3 | npm-debug.log 4 | .DS_Store 5 | 6 | /test/browser/browserified-bundle.js 7 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | before_install: 4 | - curl --location http://git.io/1OcIZA | bash -s 5 | 6 | node_js: 7 | - "0.8" 8 | - "0.10" 9 | - "0.11" 10 | 11 | notifications: 12 | email: 13 | - travis@nodejitsu.com 14 | irc: "irc.freenode.org#nodejitsu" 15 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "director", 3 | "version": "1.2.7", 4 | "dependencies": {}, 5 | "main": "build/director.js", 6 | "scripts": [ 7 | "build/director.js" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/build/ender.js: -------------------------------------------------------------------------------- 1 | $.ender({ 2 | router: Router 3 | }); 4 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/examples/http.js: -------------------------------------------------------------------------------- 1 | var http = require('http'), 2 | director = require('../lib/director'); 3 | 4 | var router = new director.http.Router(); 5 | 6 | var server = http.createServer(function (req, res) { 7 | req.chunks = []; 8 | req.on('data', function (chunk) { 9 | req.chunks.push(chunk.toString()); 10 | }); 11 | 12 | router.dispatch(req, res, function (err) { 13 | if (err) { 14 | res.writeHead(404); 15 | res.end(); 16 | } 17 | 18 | console.log('Served ' + req.url); 19 | }); 20 | }); 21 | 22 | router.get(/foo/, function () { 23 | this.res.writeHead(200, { 'Content-Type': 'text/plain' }); 24 | this.res.end('hello world\n'); 25 | }); 26 | 27 | router.post(/foo/, function () { 28 | this.res.writeHead(200, { 'Content-Type': 'application/json' }); 29 | this.res.end(JSON.stringify(this.req.body)); 30 | }); 31 | 32 | server.listen(8080); 33 | console.log('vanilla http server with director running on 8080'); 34 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/img/director.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/img/director.png -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/img/hashRoute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/img/hashRoute.png -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/lib/director.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | exports.Router = require('./director/router').Router; 5 | exports.http = require('./director/http'); 6 | exports.cli = require('./director/cli'); 7 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/test/browser/browserify-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director Browserify Tests 6 | 7 | 8 | 9 |

To run these tests first generate a Browserify bundle for director by running the command browserify -r ../director -o test/browser/browserified-bundle.js in the repo's root directory.

10 | 11 |
12 |
13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/test/browser/html5-routes-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director HTML5 Tests 6 | 7 | 8 | 9 |

Note: in order to execute HTML5 mode test this file needs to be served with provided nodejs backend. Start the server from director/test/browser/backend and go to http://localhost:8080/ to launch the tests.

10 | 11 |
12 |
13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/test/browser/routes-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director Tests 6 | 7 | 8 | 9 |
10 |
11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/test/server/cli/mount-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * mount-test.js: Tests for the core mount method. 3 | * 4 | * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | vows = require('vows'), 11 | director = require('../../../lib/director'); 12 | 13 | vows.describe('director/cli/path').addBatch({ 14 | "An instance of director.cli.Router with routes": { 15 | topic: new director.cli.Router({ 16 | 'apps': function () { 17 | console.log('apps'); 18 | }, 19 | ' users': function () { 20 | console.log('users'); 21 | } 22 | }), 23 | "should create the correct nested routing table": function (router) { 24 | assert.isObject(router.routes.apps); 25 | assert.isFunction(router.routes.apps.on); 26 | assert.isObject(router.routes.users); 27 | assert.isFunction(router.routes.users.on); 28 | } 29 | } 30 | }).export(module); 31 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/director/test/server/http/responses-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * responses-test.js: Tests for HTTP responses. 3 | * 4 | * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | vows = require('vows'), 11 | director = require('../../../lib/director'); 12 | 13 | vows.describe('director/http/responses').addBatch({ 14 | "When using director.http": { 15 | "it should have the relevant responses defined": function () { 16 | Object.keys(require('../../../lib/director/http/responses')).forEach(function (name) { 17 | assert.isFunction(director.http[name]); 18 | }); 19 | } 20 | } 21 | }).export(module); 22 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/todomvc-app-css/readme.md: -------------------------------------------------------------------------------- 1 | # todomvc-app-css 2 | 3 | > CSS for TodoMVC apps 4 | 5 | ![](screenshot.png) 6 | 7 | 8 | ## Install 9 | 10 | 11 | ``` 12 | $ npm install todomvc-app-css 13 | ``` 14 | 15 | 16 | ## Getting started 17 | 18 | ```html 19 | 20 | ``` 21 | 22 | See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template). 23 | 24 | 25 | ## License 26 | 27 | CC-BY-4.0 © [Sindre Sorhus](https://sindresorhus.com) 28 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/todomvc-common/readme.md: -------------------------------------------------------------------------------- 1 | # todomvc-common 2 | 3 | > Common TodoMVC utilities used by our apps 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install todomvc-common 10 | ``` 11 | 12 | 13 | ## License 14 | 15 | MIT © [TasteJS](http://tastejs.com) 16 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue-axios/README.md: -------------------------------------------------------------------------------- 1 | # vue-axios 2 | A small wrapper for integrating axios to Vuejs 3 | 4 | ## How to install: 5 | ### CommonJS: 6 | ```bash 7 | npm install --save axios vue-axios 8 | ``` 9 | 10 | And in your entry file: 11 | ```js 12 | import Vue from 'vue' 13 | import axios from 'axios' 14 | import VueAxios from 'vue-axios' 15 | 16 | Vue.use(VueAxios, axios) 17 | ``` 18 | 19 | ### Script: 20 | Just add 3 scripts in order: `vue`, `axios` and `vue-axios` to your `document`. 21 | 22 | ## Usage: 23 | This wrapper bind `axios` to `Vue` or `this` if you're using single file component. 24 | 25 | You can `axios` like this: 26 | ```js 27 | Vue.axios.get(api).then((response) => { 28 | console.log(response.data) 29 | }) 30 | 31 | this.axios.get(api).then((response) => { 32 | console.log(response.data) 33 | }) 34 | 35 | this.$http.get(api).then((response) => { 36 | console.log(response.data) 37 | }) 38 | ``` 39 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue-axios/dist/vue-axios.min.js: -------------------------------------------------------------------------------- 1 | "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function o(e,t){if(!o.installed){if(o.installed=!0,!t)return void console.error("You have to install axios");e.axios=t,Object.defineProperties(e.prototype,{axios:{get:function(){return t}},$http:{get:function(){return t}}})}}"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):window.Vue&&window.axios&&Vue.use(o,window.axios)}(); -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue-axios/index.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, {PluginFunction, PluginObject} from "vue"; 2 | import {AxiosInstance} from "axios"; 3 | 4 | declare module "vue/types/vue" { 5 | 6 | interface Vue { 7 | axios: AxiosInstance; 8 | $http: AxiosInstance; 9 | } 10 | 11 | interface VueConstructor { 12 | axios: AxiosInstance; 13 | } 14 | } 15 | 16 | declare class VueAxios { 17 | static install: PluginFunction; 18 | } 19 | 20 | export default VueAxios; 21 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue-axios/src/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | /** 4 | * Install plugin 5 | * @param Vue 6 | * @param axios 7 | */ 8 | 9 | function plugin(Vue, axios) { 10 | 11 | if (plugin.installed) { 12 | return 13 | } 14 | plugin.installed = true 15 | 16 | if (!axios) { 17 | console.error('You have to install axios') 18 | return 19 | } 20 | 21 | Vue.axios = axios 22 | 23 | Object.defineProperties(Vue.prototype, { 24 | 25 | axios: { 26 | get() { 27 | return axios 28 | } 29 | }, 30 | 31 | $http: { 32 | get() { 33 | return axios 34 | } 35 | } 36 | 37 | }) 38 | } 39 | 40 | if (typeof exports == "object") { 41 | module.exports = plugin 42 | } else if (typeof define == "function" && define.amd) { 43 | define([], function(){ return plugin }) 44 | } else if (window.Vue && window.axios) { 45 | Vue.use(plugin, window.axios) 46 | } 47 | 48 | })(); 49 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/dist/vue.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/dist/vue.runtime.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.runtime.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.runtime.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function bind (el: ASTElement, dir: ASTDirective) { 4 | el.wrapData = (code: string) => { 5 | return `_b(${code},'${el.tag}',${dir.value},${ 6 | dir.modifiers && dir.modifiers.prop ? 'true' : 'false' 7 | }${ 8 | dir.modifiers && dir.modifiers.sync ? ',true' : '' 9 | })` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import on from './on' 4 | import bind from './bind' 5 | import { noop } from 'shared/util' 6 | 7 | export default { 8 | on, 9 | bind, 10 | cloak: noop 11 | } 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export default function on (el: ASTElement, dir: ASTDirective) { 6 | if (process.env.NODE_ENV !== 'production' && dir.modifiers) { 7 | warn(`v-on without argument does not support modifiers.`) 8 | } 9 | el.wrapListeners = (code: string) => `_g(${code},${dir.value})` 10 | } 11 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from './parser/index' 4 | import { optimize } from './optimizer' 5 | import { generate } from './codegen/index' 6 | import { createCompilerCreator } from './create-compiler' 7 | 8 | // `createCompilerCreator` allows creating compilers that use alternative 9 | // parser/optimizer/codegen, e.g the SSR optimizing compiler. 10 | // Here we just export a default compiler using the default parts. 11 | export const createCompiler = createCompilerCreator(function baseCompile ( 12 | template: string, 13 | options: CompilerOptions 14 | ): CompiledResult { 15 | const ast = parse(template.trim(), options) 16 | if (options.optimize !== false) { 17 | optimize(ast, options) 18 | } 19 | const code = generate(ast, options) 20 | return { 21 | ast, 22 | render: code.render, 23 | staticRenderFns: code.staticRenderFns 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/parser/entity-decoder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let decoder 4 | 5 | export default { 6 | decode (html: string): string { 7 | decoder = decoder || document.createElement('div') 8 | decoder.innerHTML = html 9 | return decoder.textContent 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/components/index.js: -------------------------------------------------------------------------------- 1 | import KeepAlive from './keep-alive' 2 | 3 | export default { 4 | KeepAlive 5 | } 6 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/global-api/mixin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { mergeOptions } from '../util/index' 4 | 5 | export function initMixin (Vue: GlobalAPI) { 6 | Vue.mixin = function (mixin: Object) { 7 | this.options = mergeOptions(this.options, mixin) 8 | return this 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/global-api/use.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { toArray } from '../util/index' 4 | 5 | export function initUse (Vue: GlobalAPI) { 6 | Vue.use = function (plugin: Function | Object) { 7 | const installedPlugins = (this._installedPlugins || (this._installedPlugins = [])) 8 | if (installedPlugins.indexOf(plugin) > -1) { 9 | return this 10 | } 11 | 12 | // additional parameters 13 | const args = toArray(arguments, 1) 14 | args.unshift(this) 15 | if (typeof plugin.install === 'function') { 16 | plugin.install.apply(plugin, args) 17 | } else if (typeof plugin === 'function') { 18 | plugin.apply(null, args) 19 | } 20 | installedPlugins.push(plugin) 21 | return this 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/index.js: -------------------------------------------------------------------------------- 1 | import Vue from './instance/index' 2 | import { initGlobalAPI } from './global-api/index' 3 | import { isServerRendering } from 'core/util/env' 4 | import { FunctionalRenderContext } from 'core/vdom/create-functional-component' 5 | 6 | initGlobalAPI(Vue) 7 | 8 | Object.defineProperty(Vue.prototype, '$isServer', { 9 | get: isServerRendering 10 | }) 11 | 12 | Object.defineProperty(Vue.prototype, '$ssrContext', { 13 | get () { 14 | /* istanbul ignore next */ 15 | return this.$vnode && this.$vnode.ssrContext 16 | } 17 | }) 18 | 19 | // expose FunctionalRenderContext for ssr runtime helper installation 20 | Object.defineProperty(Vue, 'FunctionalRenderContext', { 21 | value: FunctionalRenderContext 22 | }) 23 | 24 | Vue.version = '__VERSION__' 25 | 26 | export default Vue 27 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/index.js: -------------------------------------------------------------------------------- 1 | import { initMixin } from './init' 2 | import { stateMixin } from './state' 3 | import { renderMixin } from './render' 4 | import { eventsMixin } from './events' 5 | import { lifecycleMixin } from './lifecycle' 6 | import { warn } from '../util/index' 7 | 8 | function Vue (options) { 9 | if (process.env.NODE_ENV !== 'production' && 10 | !(this instanceof Vue) 11 | ) { 12 | warn('Vue is a constructor and should be called with the `new` keyword') 13 | } 14 | this._init(options) 15 | } 16 | 17 | initMixin(Vue) 18 | stateMixin(Vue) 19 | eventsMixin(Vue) 20 | lifecycleMixin(Vue) 21 | renderMixin(Vue) 22 | 23 | export default Vue 24 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/bind-object-listeners.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn, extend, isPlainObject } from 'core/util/index' 4 | 5 | export function bindObjectListeners (data: any, value: any): VNodeData { 6 | if (value) { 7 | if (!isPlainObject(value)) { 8 | process.env.NODE_ENV !== 'production' && warn( 9 | 'v-on without argument expects an Object value', 10 | this 11 | ) 12 | } else { 13 | const on = data.on = data.on ? extend({}, data.on) : {} 14 | for (const key in value) { 15 | const existing = on[key] 16 | const ours = value[key] 17 | on[key] = existing ? [].concat(existing, ours) : ours 18 | } 19 | } 20 | } 21 | return data 22 | } 23 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/resolve-filter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { identity, resolveAsset } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for resolving filters 7 | */ 8 | export function resolveFilter (id: string): Function { 9 | return resolveAsset(this.$options, 'filters', id, true) || identity 10 | } 11 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/resolve-scoped-slots.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function resolveScopedSlots ( 4 | fns: ScopedSlotsData, // see flow/vnode 5 | res?: Object, 6 | // the following are added in 2.6 7 | hasDynamicKeys?: boolean, 8 | contentHashKey?: number 9 | ): { [key: string]: Function, $stable: boolean } { 10 | res = res || { $stable: !hasDynamicKeys } 11 | for (let i = 0; i < fns.length; i++) { 12 | const slot = fns[i] 13 | if (Array.isArray(slot)) { 14 | resolveScopedSlots(slot, res, hasDynamicKeys) 15 | } else if (slot) { 16 | // marker for reverse proxying v-slot without scope on this.$slots 17 | if (slot.proxy) { 18 | slot.fn.proxy = true 19 | } 20 | res[slot.key] = slot.fn 21 | } 22 | } 23 | if (contentHashKey) { 24 | (res: any).$key = contentHashKey 25 | } 26 | return res 27 | } 28 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from 'shared/util' 4 | export * from './lang' 5 | export * from './env' 6 | export * from './options' 7 | export * from './debug' 8 | export * from './props' 9 | export * from './error' 10 | export * from './next-tick' 11 | export { defineReactive } from '../observer/index' 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/util/perf.js: -------------------------------------------------------------------------------- 1 | import { inBrowser } from './env' 2 | 3 | export let mark 4 | export let measure 5 | 6 | if (process.env.NODE_ENV !== 'production') { 7 | const perf = inBrowser && window.performance 8 | /* istanbul ignore if */ 9 | if ( 10 | perf && 11 | perf.mark && 12 | perf.measure && 13 | perf.clearMarks && 14 | perf.clearMeasures 15 | ) { 16 | mark = tag => perf.mark(tag) 17 | measure = (name, startTag, endTag) => { 18 | perf.measure(name, startTag, endTag) 19 | perf.clearMarks(startTag) 20 | perf.clearMarks(endTag) 21 | // perf.clearMeasures(name) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/get-first-component-child.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isDef } from 'shared/util' 4 | import { isAsyncPlaceholder } from './is-async-placeholder' 5 | 6 | export function getFirstComponentChild (children: ?Array): ?VNode { 7 | if (Array.isArray(children)) { 8 | for (let i = 0; i < children.length; i++) { 9 | const c = children[i] 10 | if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 11 | return c 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from './merge-hook' 4 | export * from './extract-props' 5 | export * from './update-listeners' 6 | export * from './normalize-children' 7 | export * from './resolve-async-component' 8 | export * from './get-first-component-child' 9 | export * from './is-async-placeholder' 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/is-async-placeholder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isAsyncPlaceholder (node: VNode): boolean { 4 | return node.isComment && node.asyncFactory 5 | } 6 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/modules/index.js: -------------------------------------------------------------------------------- 1 | import directives from './directives' 2 | import ref from './ref' 3 | 4 | export default [ 5 | ref, 6 | directives 7 | ] 8 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function html (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'innerHTML', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import text from './text' 3 | import html from './html' 4 | 5 | export default { 6 | model, 7 | text, 8 | html 9 | } 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function text (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'textContent', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from './options' 4 | import { createCompiler } from 'compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { compile, compileToFunctions } 9 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import model from './model' 4 | 5 | export default [ 6 | klass, 7 | style, 8 | model 9 | ] 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isPreTag, 5 | mustUseProp, 6 | isReservedTag, 7 | getTagNamespace 8 | } from '../util/index' 9 | 10 | import modules from './modules/index' 11 | import directives from './directives/index' 12 | import { genStaticKeys } from 'shared/util' 13 | import { isUnaryTag, canBeLeftOpenTag } from './util' 14 | 15 | export const baseOptions: CompilerOptions = { 16 | expectHTML: true, 17 | modules, 18 | directives, 19 | isPreTag, 20 | isUnaryTag, 21 | mustUseProp, 22 | canBeLeftOpenTag, 23 | isReservedTag, 24 | getTagNamespace, 25 | staticKeys: genStaticKeys(modules) 26 | } 27 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { parseComponent } from 'sfc/parser' 4 | export { compile, compileToFunctions } from './compiler/index' 5 | export { ssrCompile, ssrCompileToFunctions } from './server/compiler' 6 | export { generateCodeFrame } from 'compiler/codeframe' 7 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-runtime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from './runtime/index' 4 | 5 | export default Vue 6 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-server-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import modules from './server/modules/index' 4 | import directives from './server/directives/index' 5 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 6 | import { createBasicRenderer } from 'server/create-basic-renderer' 7 | 8 | export default createBasicRenderer({ 9 | modules, 10 | directives, 11 | isUnaryTag, 12 | canBeLeftOpenTag 13 | }) 14 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Transition from './transition' 2 | import TransitionGroup from './transition-group' 3 | 4 | export default { 5 | Transition, 6 | TransitionGroup 7 | } 8 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import show from './show' 3 | 4 | export default { 5 | model, 6 | show 7 | } 8 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import domProps from './dom-props' 5 | import style from './style' 6 | import transition from './transition' 7 | 8 | export default [ 9 | attrs, 10 | klass, 11 | events, 12 | domProps, 13 | style, 14 | transition 15 | ] 16 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'web/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'web/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ nodeOps, modules }) 13 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from '../compiler/options' 4 | import { createCompiler } from 'server/optimizing-compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { 9 | compile as ssrCompile, 10 | compileToFunctions as ssrCompileToFunctions 11 | } 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/directives/index.js: -------------------------------------------------------------------------------- 1 | import show from './show' 2 | import model from './model' 3 | 4 | export default { 5 | show, 6 | model 7 | } 8 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/directives/show.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function show (node: VNodeWithData, dir: VNodeDirective) { 4 | if (!dir.value) { 5 | const style: any = node.data.style || (node.data.style = {}) 6 | if (Array.isArray(style)) { 7 | style.push({ display: 'none' }) 8 | } else { 9 | style.display = 'none' 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { escape } from '../util' 4 | import { genClassForVnode } from 'web/util/index' 5 | 6 | export default function renderClass (node: VNodeWithData): ?string { 7 | const classList = genClassForVnode(node) 8 | if (classList !== '') { 9 | return ` class="${escape(classList)}"` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import domProps from './dom-props' 3 | import klass from './class' 4 | import style from './style' 5 | 6 | export default [ 7 | attrs, 8 | domProps, 9 | klass, 10 | style 11 | ] 12 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/util/compat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { inBrowser } from 'core/util/index' 4 | 5 | // check whether current browser encodes a char inside attribute values 6 | let div 7 | function getShouldDecode (href: boolean): boolean { 8 | div = div || document.createElement('div') 9 | div.innerHTML = href ? `` : `
` 10 | return div.innerHTML.indexOf(' ') > 0 11 | } 12 | 13 | // #3663: IE encodes newlines inside attribute values while other browsers don't 14 | export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false 15 | // #6828: chrome encodes content in a[href] 16 | export const shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false 17 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export * from './attrs' 6 | export * from './class' 7 | export * from './element' 8 | 9 | /** 10 | * Query an element selector if it's not an element already. 11 | */ 12 | export function query (el: string | Element): Element { 13 | if (typeof el === 'string') { 14 | const selected = document.querySelector(el) 15 | if (!selected) { 16 | process.env.NODE_ENV !== 'production' && warn( 17 | 'Cannot find element: ' + el 18 | ) 19 | return document.createElement('div') 20 | } 21 | return selected 22 | } else { 23 | return el 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | 3 | export default { 4 | model 5 | } 6 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/append.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | // The "unitary tag" means that the tag node and its children 6 | // must be sent to the native together. 7 | const isUnitaryTag = makeMap('cell,header,cell-slot,recycle-list', true) 8 | 9 | function preTransformNode (el: ASTElement) { 10 | if (isUnitaryTag(el.tag) && !el.attrsList.some(item => item.name === 'append')) { 11 | el.attrsMap.append = 'tree' 12 | el.attrsList.push({ name: 'append', value: 'tree' }) 13 | } 14 | if (el.attrsMap.append === 'tree') { 15 | el.appendAsTree = true 16 | } 17 | } 18 | 19 | function genData (el: ASTElement): string { 20 | return el.appendAsTree ? `appendAsTree:true,` : '' 21 | } 22 | 23 | export default { 24 | staticKeys: ['appendAsTree'], 25 | preTransformNode, 26 | genData 27 | } 28 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import props from './props' 4 | import append from './append' 5 | import recycleList from './recycle-list/index' 6 | 7 | export default [ 8 | recycleList, 9 | klass, 10 | style, 11 | props, 12 | append 13 | ] 14 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component-root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | // mark component root nodes as 6 | export function postTransformComponentRoot (el: ASTElement) { 7 | if (!el.parent) { 8 | // component root 9 | addAttr(el, '@isComponentRoot', 'true') 10 | addAttr(el, '@templateId', '_uid') 11 | addAttr(el, '@componentProps', '$props || {}') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | import { RECYCLE_LIST_MARKER } from 'weex/util/index' 5 | 6 | // mark components as inside recycle-list so that we know we need to invoke 7 | // their special @render function instead of render in create-component.js 8 | export function postTransformComponent ( 9 | el: ASTElement, 10 | options: WeexCompilerOptions 11 | ) { 12 | // $flow-disable-line (we know isReservedTag is there) 13 | if (!options.isReservedTag(el.tag) && el.tag !== 'cell-slot') { 14 | addAttr(el, RECYCLE_LIST_MARKER, 'true') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | function genText (node: ASTNode) { 6 | const value = node.type === 3 7 | ? node.text 8 | : node.type === 2 9 | ? node.tokens.length === 1 10 | ? node.tokens[0] 11 | : node.tokens 12 | : '' 13 | return JSON.stringify(value) 14 | } 15 | 16 | export function postTransformText (el: ASTElement) { 17 | // weex can only contain text, so the parser 18 | // always generates a single child. 19 | if (el.children.length) { 20 | addAttr(el, 'value', genText(el.children[0])) 21 | el.children = [] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { camelize } from 'shared/util' 4 | import { generateBinding } from 'weex/util/parser' 5 | import { bindRE } from 'compiler/parser/index' 6 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 7 | 8 | function parseAttrName (name: string): string { 9 | return camelize(name.replace(bindRE, '')) 10 | } 11 | 12 | export function preTransformVBind (el: ASTElement) { 13 | for (const attr in el.attrsMap) { 14 | if (bindRE.test(attr)) { 15 | const name: string = parseAttrName(attr) 16 | const value = generateBinding(getAndRemoveAttr(el, attr)) 17 | delete el.attrsMap[attr] 18 | addRawAttr(el, name, value) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-for.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parseFor } from 'compiler/parser/index' 4 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 5 | 6 | export function preTransformVFor (el: ASTElement, options: WeexCompilerOptions) { 7 | const exp = getAndRemoveAttr(el, 'v-for') 8 | if (!exp) { 9 | return 10 | } 11 | 12 | const res = parseFor(exp) 13 | if (!res) { 14 | if (process.env.NODE_ENV !== 'production' && options.warn) { 15 | options.warn(`Invalid v-for expression: ${exp}`) 16 | } 17 | return 18 | } 19 | 20 | const desc: Object = { 21 | '@expression': res.for, 22 | '@alias': res.alias 23 | } 24 | if (res.iterator2) { 25 | desc['@key'] = res.iterator1 26 | desc['@index'] = res.iterator2 27 | } else { 28 | desc['@index'] = res.iterator1 29 | } 30 | 31 | delete el.attrsMap['v-for'] 32 | addRawAttr(el, '[[repeat]]', desc) 33 | } 34 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const inlineStatementRE = /^\s*([A-Za-z_$0-9\['\."\]]+)*\s*\(\s*(([A-Za-z_$0-9\['\."\]]+)?(\s*,\s*([A-Za-z_$0-9\['\."\]]+))*)\s*\)$/ 4 | 5 | function parseHandlerParams (handler: ASTElementHandler) { 6 | const res = inlineStatementRE.exec(handler.value) 7 | if (res && res[2]) { 8 | handler.params = res[2].split(/\s*,\s*/) 9 | } 10 | } 11 | 12 | export function postTransformVOn (el: ASTElement) { 13 | const events: ASTElementHandlers | void = el.events 14 | if (!events) { 15 | return 16 | } 17 | for (const name in events) { 18 | const handler: ASTElementHandler | Array = events[name] 19 | if (Array.isArray(handler)) { 20 | handler.map(fn => parseHandlerParams(fn)) 21 | } else { 22 | parseHandlerParams(handler) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-once.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 4 | 5 | function containVOnce (el: ASTElement): boolean { 6 | for (const attr in el.attrsMap) { 7 | if (/^v\-once$/i.test(attr)) { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | export function preTransformVOnce (el: ASTElement) { 15 | if (containVOnce(el)) { 16 | getAndRemoveAttr(el, 'v-once', true) 17 | addRawAttr(el, '[[once]]', true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/entry-compiler.js: -------------------------------------------------------------------------------- 1 | export { compile } from 'weex/compiler/index' 2 | export { generateCodeFrame } from 'compiler/codeframe' 3 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/entry-runtime-factory.js: -------------------------------------------------------------------------------- 1 | // this entry is built and wrapped with a factory function 2 | // used to generate a fresh copy of Vue for every Weex instance. 3 | 4 | import Vue from './runtime/index' 5 | 6 | exports.Vue = Vue 7 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Richtext from './richtext' 2 | import Transition from './transition' 3 | import TransitionGroup from './transition-group' 4 | 5 | export default { 6 | Richtext, 7 | Transition, 8 | TransitionGroup 9 | } 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/components/transition.js: -------------------------------------------------------------------------------- 1 | // reuse same transition component logic from web 2 | export { 3 | transitionProps, 4 | extractTransitionData 5 | } from 'web/runtime/components/transition' 6 | 7 | import Transition from 'web/runtime/components/transition' 8 | 9 | export default Transition 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | } 3 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import style from './style' 5 | import transition from './transition' 6 | 7 | export default [ 8 | attrs, 9 | klass, 10 | events, 11 | style, 12 | transition 13 | ] 14 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'weex/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'weex/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ 13 | nodeOps, 14 | modules, 15 | LONG_LIST_THRESHOLD: 10 16 | }) 17 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/text-node.js: -------------------------------------------------------------------------------- 1 | let latestNodeId = 1 2 | 3 | export default function TextNode (text) { 4 | this.instanceId = '' 5 | this.nodeId = latestNodeId++ 6 | this.parentNode = null 7 | this.nodeType = 3 8 | this.text = text 9 | } 10 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/server/optimizing-compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from 'compiler/parser/index' 4 | import { generate } from './codegen' 5 | import { optimize } from './optimizer' 6 | import { createCompilerCreator } from 'compiler/create-compiler' 7 | 8 | export const createCompiler = createCompilerCreator(function baseCompile ( 9 | template: string, 10 | options: CompilerOptions 11 | ): CompiledResult { 12 | const ast = parse(template.trim(), options) 13 | optimize(ast, options) 14 | const code = generate(ast, options) 15 | return { 16 | ast, 17 | render: code.render, 18 | staticRenderFns: code.staticRenderFns 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/server/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file) 4 | 5 | export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file) 6 | 7 | export function createPromiseCallback () { 8 | let resolve, reject 9 | const promise: Promise = new Promise((_resolve, _reject) => { 10 | resolve = _resolve 11 | reject = _reject 12 | }) 13 | const cb = (err: Error, res?: string) => { 14 | if (err) return reject(err) 15 | resolve(res || '') 16 | } 17 | return { promise, cb } 18 | } 19 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const SSR_ATTR = 'data-server-rendered' 2 | 3 | export const ASSET_TYPES = [ 4 | 'component', 5 | 'directive', 6 | 'filter' 7 | ] 8 | 9 | export const LIFECYCLE_HOOKS = [ 10 | 'beforeCreate', 11 | 'created', 12 | 'beforeMount', 13 | 'mounted', 14 | 'beforeUpdate', 15 | 'updated', 16 | 'beforeDestroy', 17 | 'destroyed', 18 | 'activated', 19 | 'deactivated', 20 | 'errorCaptured', 21 | 'serverPrefetch' 22 | ] 23 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | 3 | export default Vue; 4 | 5 | export as namespace Vue; 6 | 7 | export { 8 | CreateElement, 9 | VueConstructor 10 | } from "./vue"; 11 | 12 | export { 13 | Component, 14 | AsyncComponent, 15 | ComponentOptions, 16 | FunctionalComponentOptions, 17 | RenderContext, 18 | PropType, 19 | PropOptions, 20 | ComputedOptions, 21 | WatchHandler, 22 | WatchOptions, 23 | WatchOptionsWithHandler, 24 | DirectiveFunction, 25 | DirectiveOptions 26 | } from "./options"; 27 | 28 | export { 29 | PluginFunction, 30 | PluginObject 31 | } from "./plugin"; 32 | 33 | export { 34 | VNodeChildren, 35 | VNodeChildrenArrayContents, 36 | VNode, 37 | VNodeComponentOptions, 38 | VNodeData, 39 | VNodeDirective 40 | } from "./vnode"; 41 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/node_modules/vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/META-INF/resources/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "dependencies": { 4 | "director": "^1.2.0", 5 | "vue": "^2.1.8", 6 | "vue-axios": "^2.1.4", 7 | "todomvc-common": "^1.0.1", 8 | "todomvc-app-css": "^2.0.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.datasource.url=jdbc:postgresql:rest-crud 4 | quarkus.datasource.driver=org.postgresql.Driver 5 | quarkus.datasource.username=restcrud 6 | quarkus.datasource.password=restcrud 7 | quarkus.datasource.max-size=8 8 | quarkus.datasource.min-size=2 9 | quarkus.hibernate-orm.database.generation=drop-and-create 10 | quarkus.hibernate-orm.log.sql=true -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/import.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Introduction to Quarkus', true, 0, null) 2 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Hibernate with Panache', false, 1, null) 3 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Visit Quarkus web site', false, 2, 'https://quarkus.io') 4 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Star Quarkus project', false, 3, 'https://github.com/quarkusio/quarkus/') 5 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/src/main/resources/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /Q04-rest-crud-application/todo-backend/start-database.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 \ 3 | --name postgres-quarkus-rest-http-crud -e POSTGRES_USER=restcrud \ 4 | -e POSTGRES_PASSWORD=restcrud -e POSTGRES_DB=rest-crud \ 5 | -p 5432:5432 postgres:10.5 6 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/fraud-detector/.dockerignore: -------------------------------------------------------------------------------- 1 | pom.xml 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/fraud-detector/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar 3 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/fraud-detector/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/fraud-detector-jvm . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/fraud-detector-jvm 15 | # 16 | ### 17 | FROM fabric8/java-jboss-openjdk8-jdk 18 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 19 | COPY target/lib/* /deployments/lib/ 20 | COPY target/*-runner.jar /deployments/app.jar 21 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/fraud-detector/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package -Pnative -Dnative-image.docker-build=true 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.native -t quarkus/fraud-detector . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/fraud-detector 15 | # 16 | ### 17 | FROM registry.fedoraproject.org/fedora-minimal 18 | WORKDIR /work/ 19 | COPY target/*-runner /work/application 20 | RUN chmod 775 /work 21 | EXPOSE 8080 22 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/fraud-detector/src/main/java/me/escoffier/quarkus/reactive/FraudSocket.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.reactive; 2 | 3 | import io.smallrye.reactive.messaging.annotations.Stream; 4 | import org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder; 5 | 6 | import javax.enterprise.context.ApplicationScoped; 7 | import javax.inject.Inject; 8 | import javax.json.Json; 9 | import javax.json.bind.JsonbBuilder; 10 | import javax.websocket.OnOpen; 11 | import javax.websocket.Session; 12 | import javax.websocket.server.ServerEndpoint; 13 | import java.io.StringReader; 14 | 15 | @ApplicationScoped 16 | @ServerEndpoint("/frauds") 17 | public class FraudSocket { 18 | 19 | @Inject @Stream("frauds") PublisherBuilder stream; 20 | 21 | @OnOpen 22 | public void opening(Session session) { 23 | stream 24 | .forEach(s -> 25 | session.getAsyncRemote().sendText(JsonbBuilder.create().toJson(s))) 26 | .run(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/fraud-detector/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.http.port=8083 4 | 5 | # [transactions] 6 | mp.messaging.incoming.transactions.type=io.smallrye.reactive.messaging.kafka.Kafka 7 | mp.messaging.incoming.transactions.topic=transactions 8 | mp.messaging.incoming.transactions.bootstrap.servers=localhost:9092 9 | mp.messaging.incoming.transactions.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer 10 | mp.messaging.incoming.transactions.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer 11 | mp.messaging.incoming.transactions.enable.auto.commit=false 12 | mp.messaging.incoming.transactions.auto.offset.reset=earliest 13 | mp.messaging.incoming.transactions.broadcast=true -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/.dockerignore: -------------------------------------------------------------------------------- 1 | .vertx 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar 3 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/TransactionService-jvm . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/TransactionService-jvm 15 | # 16 | ### 17 | FROM fabric8/java-jboss-openjdk8-jdk 18 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 19 | COPY target/lib/* /deployments/lib/ 20 | COPY target/*-runner.jar /deployments/app.jar 21 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package -Pnative -Dnative-image.docker-build=true 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.native -t quarkus/TransactionService . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/TransactionService 15 | # 16 | ### 17 | FROM registry.fedoraproject.org/fedora-minimal 18 | WORKDIR /work/ 19 | COPY target/*-runner /work/application 20 | RUN chmod 775 /work 21 | EXPOSE 8080 22 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/src/main/java/me/escoffier/quarkus/reactive/PaymentResource.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.reactive; 2 | 3 | import io.smallrye.reactive.messaging.annotations.Emitter; 4 | import io.smallrye.reactive.messaging.annotations.Stream; 5 | 6 | import javax.inject.Inject; 7 | import javax.validation.Valid; 8 | import javax.ws.rs.Consumes; 9 | import javax.ws.rs.POST; 10 | import javax.ws.rs.Path; 11 | import javax.ws.rs.Produces; 12 | import javax.ws.rs.core.MediaType; 13 | import javax.ws.rs.core.Response; 14 | 15 | @Path("/payment") 16 | public class PaymentResource { 17 | 18 | @Inject @Stream("internal") 19 | Emitter emitter; 20 | 21 | @POST 22 | @Produces(MediaType.APPLICATION_JSON) 23 | @Consumes(MediaType.APPLICATION_JSON) 24 | public Response payment(@Valid Payment payment) { 25 | emitter.send(payment); 26 | return Response.accepted().build(); 27 | 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/src/main/java/me/escoffier/quarkus/reactive/Processing.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.reactive; 2 | 3 | import org.eclipse.microprofile.reactive.messaging.Incoming; 4 | import org.eclipse.microprofile.reactive.messaging.Outgoing; 5 | 6 | import javax.annotation.PostConstruct; 7 | import javax.enterprise.context.ApplicationScoped; 8 | import javax.json.bind.Jsonb; 9 | import javax.json.bind.JsonbBuilder; 10 | 11 | @ApplicationScoped 12 | public class Processing { 13 | 14 | private Jsonb jsonb; 15 | 16 | @PostConstruct 17 | public void init() { 18 | jsonb = JsonbBuilder.create(); 19 | } 20 | 21 | @Incoming("internal") 22 | @Outgoing("payments") 23 | public String process(Payment payment) { 24 | payment.setKind("PAYMENT"); 25 | return jsonb.toJson(payment); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/payment-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.http.port=8081 4 | 5 | # [payments] 6 | mp.messaging.outgoing.payments.type=io.smallrye.reactive.messaging.kafka.Kafka 7 | mp.messaging.outgoing.payments.topic=transactions 8 | mp.messaging.outgoing.payments.bootstrap.servers=localhost:9092 9 | mp.messaging.outgoing.payments.key.serializer=org.apache.kafka.common.serialization.StringSerializer 10 | mp.messaging.outgoing.payments.value.serializer=org.apache.kafka.common.serialization.StringSerializer 11 | mp.messaging.outgoing.payments.acks=1 -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/transaction-viewer/.dockerignore: -------------------------------------------------------------------------------- 1 | transaction-viewer.iml 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/transaction-viewer/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar 3 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/transaction-viewer/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/transaction-viewer-jvm . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/transaction-viewer-jvm 15 | # 16 | ### 17 | FROM fabric8/java-jboss-openjdk8-jdk 18 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 19 | COPY target/lib/* /deployments/lib/ 20 | COPY target/*-runner.jar /deployments/app.jar 21 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/transaction-viewer/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package -Pnative -Dnative-image.docker-build=true 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.native -t quarkus/transaction-viewer . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/transaction-viewer 15 | # 16 | ### 17 | FROM registry.fedoraproject.org/fedora-minimal 18 | WORKDIR /work/ 19 | COPY target/*-runner /work/application 20 | RUN chmod 775 /work 21 | EXPOSE 8080 22 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /Q05-reactive-kafka/banking-demo/transaction-viewer/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.http.port=8082 4 | 5 | # [transactions] 6 | mp.messaging.incoming.transactions.type=io.smallrye.reactive.messaging.kafka.Kafka 7 | mp.messaging.incoming.transactions.topic=transactions 8 | mp.messaging.incoming.transactions.bootstrap.servers=localhost:9092 9 | mp.messaging.incoming.transactions.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer 10 | mp.messaging.incoming.transactions.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer 11 | #mp.messaging.incoming.transactions.group.id=user-account-application 12 | #mp.messaging.incoming.transactions.client.id=user-account 13 | mp.messaging.incoming.transactions.enable.auto.commit=false 14 | mp.messaging.incoming.transactions.auto.offset.reset=earliest 15 | mp.messaging.incoming.transactions.broadcast=true -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/barista-http/src/main/java/me/escoffier/quarkus/coffeeshop/Order.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.coffeeshop; 2 | 3 | public class Order { 4 | 5 | private String product; 6 | private String name; 7 | private String orderId; 8 | 9 | public String getProduct() { 10 | return product; 11 | } 12 | 13 | public Order setProduct(String product) { 14 | this.product = product; 15 | return this; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public Order setName(String name) { 23 | this.name = name; 24 | return this; 25 | } 26 | 27 | public String getOrderId() { 28 | return orderId; 29 | } 30 | 31 | public Order setOrderId(String orderId) { 32 | this.orderId = orderId; 33 | return this; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/barista-http/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | barista.name=tom 2 | 3 | quarkus.http.port=8082 -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/barista-kafka/src/main/java/me/escoffier/quarkus/coffeeshop/Order.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.coffeeshop; 2 | 3 | import io.quarkus.runtime.annotations.RegisterForReflection; 4 | 5 | @RegisterForReflection 6 | public class Order { 7 | 8 | private String product; 9 | private String name; 10 | private String orderId; 11 | 12 | public String getProduct() { 13 | return product; 14 | } 15 | 16 | public Order setProduct(String product) { 17 | this.product = product; 18 | return this; 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public Order setName(String name) { 26 | this.name = name; 27 | return this; 28 | } 29 | 30 | public String getOrderId() { 31 | return orderId; 32 | } 33 | 34 | public Order setOrderId(String orderId) { 35 | this.orderId = orderId; 36 | return this; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/barista-kafka/tom.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | java -Dbarista.name=tom \ 3 | -Dquarkus.http.port=9095 \ 4 | -jar target/barista-kafka-1.0-SNAPSHOT-runner.jar 5 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/coffeeshop-service/src/main/java/me/escoffier/quarkus/coffeeshop/dashboard/BoardResource.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.coffeeshop.dashboard; 2 | 3 | import io.smallrye.reactive.messaging.annotations.Stream; 4 | import org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder; 5 | import org.reactivestreams.Publisher; 6 | 7 | import javax.inject.Inject; 8 | import javax.ws.rs.GET; 9 | import javax.ws.rs.Path; 10 | import javax.ws.rs.Produces; 11 | import javax.ws.rs.core.MediaType; 12 | 13 | @Path("/queue") 14 | public class BoardResource { 15 | 16 | @Inject 17 | @Stream("beverages") 18 | PublisherBuilder queue; 19 | 20 | @GET 21 | @Produces(MediaType.SERVER_SENT_EVENTS) 22 | public Publisher getQueue() { 23 | return queue.peek(s -> System.out.println("GOT: " + s)).buildRs(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/coffeeshop-service/src/main/java/me/escoffier/quarkus/coffeeshop/http/BaristaService.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.coffeeshop.http; 2 | 3 | import me.escoffier.quarkus.coffeeshop.model.Beverage; 4 | import me.escoffier.quarkus.coffeeshop.model.Order; 5 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 6 | 7 | import javax.ws.rs.Consumes; 8 | import javax.ws.rs.POST; 9 | import javax.ws.rs.Path; 10 | import javax.ws.rs.Produces; 11 | 12 | @Path("/barista") 13 | @RegisterRestClient 14 | public interface BaristaService { 15 | 16 | @POST 17 | @Produces("application/json") 18 | @Consumes("application/json") 19 | Beverage order(Order order); 20 | } 21 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/coffeeshop-service/src/main/java/me/escoffier/quarkus/coffeeshop/model/JsonProvider.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.coffeeshop.model; 2 | 3 | import javax.enterprise.context.ApplicationScoped; 4 | import javax.enterprise.inject.Produces; 5 | import javax.json.bind.Jsonb; 6 | import javax.json.bind.JsonbBuilder; 7 | 8 | @ApplicationScoped 9 | public class JsonProvider { 10 | 11 | @Produces 12 | Jsonb json() { 13 | return JsonbBuilder.create(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/coffeeshop-service/src/main/java/me/escoffier/quarkus/coffeeshop/model/Order.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.coffeeshop.model; 2 | 3 | public class Order { 4 | 5 | private String product; 6 | private String name; 7 | private String orderId; 8 | 9 | public String getProduct() { 10 | return product; 11 | } 12 | 13 | public Order setProduct(String product) { 14 | this.product = product; 15 | return this; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public Order setName(String name) { 23 | this.name = name; 24 | return this; 25 | } 26 | 27 | public String getOrderId() { 28 | return orderId; 29 | } 30 | 31 | public Order setOrderId(String orderId) { 32 | this.orderId = orderId; 33 | return this; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/create-orders.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | kafka-topics --bootstrap-server localhost:9092 --create --partitions 4 --replication-factor 1 --topic orders 3 | kafka-topics --bootstrap-server localhost:9092 --list -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | 5 | zookeeper: 6 | image: strimzi/kafka:0.11.3-kafka-2.1.0 7 | command: [ 8 | "sh", "-c", 9 | "bin/zookeeper-server-start.sh config/zookeeper.properties" 10 | ] 11 | ports: 12 | - "2181:2181" 13 | environment: 14 | LOG_DIR: /tmp/logs 15 | 16 | kafka: 17 | image: strimzi/kafka:0.11.3-kafka-2.1.0 18 | command: [ 19 | "sh", "-c", 20 | "bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" 21 | ] 22 | depends_on: 23 | - zookeeper 24 | ports: 25 | - "9092:9092" 26 | environment: 27 | LOG_DIR: "/tmp/logs" 28 | KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 29 | KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 30 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/order-coffees.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | http POST :8080/messaging name=clement product=iced-latte 3 | http POST :8080/messaging name=edson product=cappuccino 4 | http POST :8080/messaging name=rafaele product=espresso 5 | http POST :8080/messaging name=ken product=americano 6 | http POST :8080/messaging name=emmanuel product=frappucino 7 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/coffeeshop-demo/post-beverage.lua: -------------------------------------------------------------------------------- 1 | wrk.method = "POST" 2 | wrk.body = "{\"product\":\"latte\", \"name\":\"joe\"}" 3 | wrk.headers["Content-Type"] = "application/json" -------------------------------------------------------------------------------- /Q05-reactive-kafka/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | 5 | zookeeper: 6 | image: strimzi/kafka:0.11.3-kafka-2.1.0 7 | command: [ 8 | "sh", "-c", 9 | "bin/zookeeper-server-start.sh config/zookeeper.properties" 10 | ] 11 | ports: 12 | - "2181:2181" 13 | environment: 14 | LOG_DIR: /tmp/logs 15 | 16 | kafka: 17 | image: strimzi/kafka:0.11.3-kafka-2.1.0 18 | command: [ 19 | "sh", "-c", 20 | "bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" 21 | ] 22 | depends_on: 23 | - zookeeper 24 | ports: 25 | - "9092:9092" 26 | environment: 27 | LOG_DIR: "/tmp/logs" 28 | KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 29 | KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 30 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 -------------------------------------------------------------------------------- /Q05-reactive-kafka/hello-kafka-demo/quarkus-kafka-consumer/src/main/java/me/escoffier/quarkus/kafka/MyKafkaConsumer.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.kafka; 2 | 3 | import org.eclipse.microprofile.reactive.messaging.Incoming; 4 | 5 | import javax.enterprise.context.ApplicationScoped; 6 | 7 | @ApplicationScoped 8 | public class MyKafkaConsumer { 9 | 10 | @Incoming("my-stream") 11 | public void consume(int value) { 12 | System.out.println("Received: " + value); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/hello-kafka-demo/quarkus-kafka-consumer/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8081 2 | 3 | # Configure the Kafka source (we read from it) 4 | mp.messaging.incoming.my-stream.type=io.smallrye.reactive.messaging.kafka.Kafka 5 | mp.messaging.incoming.my-stream.topic=my-topic 6 | mp.messaging.incoming.my-stream.bootstrap.servers=localhost:9092 7 | mp.messaging.incoming.my-stream.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer 8 | mp.messaging.incoming.my-stream.value.deserializer=org.apache.kafka.common.serialization.IntegerDeserializer 9 | mp.messaging.incoming.my-stream.enable.auto.commit=false 10 | mp.messaging.incoming.my-stream.auto.offset.reset=earliest 11 | mp.messaging.incoming.my-stream.broadcast=true -------------------------------------------------------------------------------- /Q05-reactive-kafka/hello-kafka-demo/quarkus-kafka-producer/src/main/java/me/escoffier/quarkus/kafka/MyKafkaProducer.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.kafka; 2 | 3 | import io.reactivex.Flowable; 4 | import org.eclipse.microprofile.reactive.messaging.Outgoing; 5 | 6 | import javax.enterprise.context.ApplicationScoped; 7 | import java.util.Random; 8 | import java.util.concurrent.TimeUnit; 9 | 10 | @ApplicationScoped 11 | public class MyKafkaProducer { 12 | 13 | private Random random = new Random(); 14 | 15 | @Outgoing("my-stream") 16 | public Flowable produce() { 17 | return Flowable.interval(1, TimeUnit.SECONDS) 18 | .map(msg -> random.nextInt(100)); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/hello-kafka-demo/quarkus-kafka-producer/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | mp.messaging.outgoing.my-stream.type=io.smallrye.reactive.messaging.kafka.Kafka 2 | mp.messaging.outgoing.my-stream.topic=my-topic 3 | mp.messaging.outgoing.my-stream.bootstrap.servers=localhost:9092 4 | mp.messaging.outgoing.my-stream.key.serializer=org.apache.kafka.common.serialization.StringSerializer 5 | mp.messaging.outgoing.my-stream.value.serializer=org.apache.kafka.common.serialization.IntegerSerializer 6 | mp.messaging.outgoing.my-stream.acks=1 -------------------------------------------------------------------------------- /Q05-reactive-kafka/reactive-http-demo/src/main/java/me/escoffier/demo/MyAsyncMessageReceiver.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.demo; 2 | 3 | import io.quarkus.vertx.ConsumeEvent; 4 | 5 | import javax.enterprise.context.ApplicationScoped; 6 | 7 | @ApplicationScoped 8 | public class MyAsyncMessageReceiver { 9 | 10 | @ConsumeEvent("some-address") 11 | public String greeting(String greeting) { 12 | return "Hello " + greeting; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Q05-reactive-kafka/reactive-http-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q05-reactive-kafka/reactive-http-demo/src/main/resources/application.properties -------------------------------------------------------------------------------- /Q06-testing/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q06-testing/README.md: -------------------------------------------------------------------------------- 1 | # TODO Application with Quarkus 2 | 3 | 4 | ## Database 5 | 6 | Run: 7 | 8 | ```bash 9 | docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 \ 10 | --name postgres-quarkus-rest-http-crud -e POSTGRES_USER=restcrud \ 11 | -e POSTGRES_PASSWORD=restcrud -e POSTGRES_DB=rest-crud \ 12 | -p 5432:5432 postgres:10.5 13 | ``` 14 | 15 | ## Application 16 | 17 | ```bash 18 | mvn compile quarkus:dev 19 | ``` 20 | 21 | Open: http://localhost:8080/ 22 | 23 | -------------------------------------------------------------------------------- /Q06-testing/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/todo-backend-jvm . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/todo-backend-jvm 15 | # 16 | ### 17 | FROM fabric8/java-jboss-openjdk8-jdk 18 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 19 | COPY target/lib/* /deployments/lib/ 20 | COPY target/*-runner.jar /deployments/app.jar 21 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /Q06-testing/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package -Pnative -Dnative-image.docker-build=true 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.native -t quarkus/todo-backend . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/todo-backend 15 | # 16 | ### 17 | FROM registry.fedoraproject.org/fedora-minimal 18 | WORKDIR /work/ 19 | COPY target/*-runner /work/application 20 | RUN chmod 775 /work 21 | EXPOSE 8080 22 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /Q06-testing/src/main/java/io/quarkus/sample/IndexResource.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import java.net.URI; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | import javax.ws.rs.core.UriBuilder; 9 | 10 | @Path("/") 11 | public class IndexResource { 12 | 13 | @GET 14 | public Response redirect() { 15 | URI redirect = UriBuilder.fromUri("todo.html").build(); 16 | return Response.temporaryRedirect(redirect).build(); 17 | } 18 | } -------------------------------------------------------------------------------- /Q06-testing/src/main/java/io/quarkus/sample/Todo.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import io.quarkus.hibernate.orm.panache.PanacheEntity; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.validation.constraints.NotBlank; 9 | 10 | @Entity 11 | @JsonIgnoreProperties("persistent") 12 | public class Todo extends PanacheEntity { 13 | 14 | @NotBlank 15 | @Column(unique = true) 16 | public String title; 17 | 18 | public boolean completed; 19 | 20 | @Column(name = "ordering") 21 | public int order; 22 | 23 | public String url; 24 | 25 | public static long deleteCompleted() { 26 | return delete("completed", true); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/js/routes.js: -------------------------------------------------------------------------------- 1 | /*global app, Router */ 2 | 3 | (function (app, Router) { 4 | 5 | 'use strict'; 6 | 7 | var router = new Router(); 8 | 9 | ['all', 'active', 'completed'].forEach(function (visibility) { 10 | router.on(visibility, function () { 11 | app.visibility = visibility; 12 | }); 13 | }); 14 | 15 | router.configure({ 16 | notfound: function () { 17 | window.location.hash = ''; 18 | app.visibility = 'all'; 19 | } 20 | }); 21 | 22 | router.init(); 23 | 24 | })(app, Router); 25 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/js/store.js: -------------------------------------------------------------------------------- 1 | /*jshint unused:false */ 2 | 3 | (function (exports) { 4 | 5 | 'use strict'; 6 | 7 | var serverUrl = 'api/'; 8 | 9 | exports.todoStorage = { 10 | fetch: async function () { 11 | const response = await axios.get(serverUrl); 12 | console.log(response.data); 13 | return response.data; 14 | }, 15 | add : async function(item) { 16 | console.log("Adding todo item " + item.title); 17 | return (await axios.post(serverUrl, item)).data; 18 | }, 19 | save: async function (item) { 20 | console.log("save called with", item); 21 | await axios.patch(serverUrl + item.id, item); 22 | }, 23 | delete: async function(item) { 24 | await axios.delete(serverUrl + item.id); 25 | }, 26 | deleteCompleted: async function() { 27 | await axios.delete(serverUrl); 28 | } 29 | }; 30 | 31 | })(window); 32 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/.npmignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | node_modules 3 | npm-debug.log 4 | .DS_Store 5 | 6 | /test/browser/browserified-bundle.js 7 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | before_install: 4 | - curl --location http://git.io/1OcIZA | bash -s 5 | 6 | node_js: 7 | - "0.8" 8 | - "0.10" 9 | - "0.11" 10 | 11 | notifications: 12 | email: 13 | - travis@nodejitsu.com 14 | irc: "irc.freenode.org#nodejitsu" 15 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "director", 3 | "version": "1.2.7", 4 | "dependencies": {}, 5 | "main": "build/director.js", 6 | "scripts": [ 7 | "build/director.js" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/build/ender.js: -------------------------------------------------------------------------------- 1 | $.ender({ 2 | router: Router 3 | }); 4 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/examples/http.js: -------------------------------------------------------------------------------- 1 | var http = require('http'), 2 | director = require('../lib/director'); 3 | 4 | var router = new director.http.Router(); 5 | 6 | var server = http.createServer(function (req, res) { 7 | req.chunks = []; 8 | req.on('data', function (chunk) { 9 | req.chunks.push(chunk.toString()); 10 | }); 11 | 12 | router.dispatch(req, res, function (err) { 13 | if (err) { 14 | res.writeHead(404); 15 | res.end(); 16 | } 17 | 18 | console.log('Served ' + req.url); 19 | }); 20 | }); 21 | 22 | router.get(/foo/, function () { 23 | this.res.writeHead(200, { 'Content-Type': 'text/plain' }); 24 | this.res.end('hello world\n'); 25 | }); 26 | 27 | router.post(/foo/, function () { 28 | this.res.writeHead(200, { 'Content-Type': 'application/json' }); 29 | this.res.end(JSON.stringify(this.req.body)); 30 | }); 31 | 32 | server.listen(8080); 33 | console.log('vanilla http server with director running on 8080'); 34 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/img/director.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q06-testing/src/main/resources/META-INF/resources/node_modules/director/img/director.png -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/img/hashRoute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q06-testing/src/main/resources/META-INF/resources/node_modules/director/img/hashRoute.png -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/lib/director.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | exports.Router = require('./director/router').Router; 5 | exports.http = require('./director/http'); 6 | exports.cli = require('./director/cli'); 7 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/test/browser/browserify-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director Browserify Tests 6 | 7 | 8 | 9 |

To run these tests first generate a Browserify bundle for director by running the command browserify -r ../director -o test/browser/browserified-bundle.js in the repo's root directory.

10 | 11 |
12 |
13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/test/browser/html5-routes-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director HTML5 Tests 6 | 7 | 8 | 9 |

Note: in order to execute HTML5 mode test this file needs to be served with provided nodejs backend. Start the server from director/test/browser/backend and go to http://localhost:8080/ to launch the tests.

10 | 11 |
12 |
13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/test/browser/routes-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director Tests 6 | 7 | 8 | 9 |
10 |
11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/test/server/cli/mount-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * mount-test.js: Tests for the core mount method. 3 | * 4 | * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | vows = require('vows'), 11 | director = require('../../../lib/director'); 12 | 13 | vows.describe('director/cli/path').addBatch({ 14 | "An instance of director.cli.Router with routes": { 15 | topic: new director.cli.Router({ 16 | 'apps': function () { 17 | console.log('apps'); 18 | }, 19 | ' users': function () { 20 | console.log('users'); 21 | } 22 | }), 23 | "should create the correct nested routing table": function (router) { 24 | assert.isObject(router.routes.apps); 25 | assert.isFunction(router.routes.apps.on); 26 | assert.isObject(router.routes.users); 27 | assert.isFunction(router.routes.users.on); 28 | } 29 | } 30 | }).export(module); 31 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/director/test/server/http/responses-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * responses-test.js: Tests for HTTP responses. 3 | * 4 | * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | vows = require('vows'), 11 | director = require('../../../lib/director'); 12 | 13 | vows.describe('director/http/responses').addBatch({ 14 | "When using director.http": { 15 | "it should have the relevant responses defined": function () { 16 | Object.keys(require('../../../lib/director/http/responses')).forEach(function (name) { 17 | assert.isFunction(director.http[name]); 18 | }); 19 | } 20 | } 21 | }).export(module); 22 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/todomvc-app-css/readme.md: -------------------------------------------------------------------------------- 1 | # todomvc-app-css 2 | 3 | > CSS for TodoMVC apps 4 | 5 | ![](screenshot.png) 6 | 7 | 8 | ## Install 9 | 10 | 11 | ``` 12 | $ npm install todomvc-app-css 13 | ``` 14 | 15 | 16 | ## Getting started 17 | 18 | ```html 19 | 20 | ``` 21 | 22 | See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template). 23 | 24 | 25 | ## License 26 | 27 | CC-BY-4.0 © [Sindre Sorhus](https://sindresorhus.com) 28 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/todomvc-common/readme.md: -------------------------------------------------------------------------------- 1 | # todomvc-common 2 | 3 | > Common TodoMVC utilities used by our apps 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install todomvc-common 10 | ``` 11 | 12 | 13 | ## License 14 | 15 | MIT © [TasteJS](http://tastejs.com) 16 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue-axios/README.md: -------------------------------------------------------------------------------- 1 | # vue-axios 2 | A small wrapper for integrating axios to Vuejs 3 | 4 | ## How to install: 5 | ### CommonJS: 6 | ```bash 7 | npm install --save axios vue-axios 8 | ``` 9 | 10 | And in your entry file: 11 | ```js 12 | import Vue from 'vue' 13 | import axios from 'axios' 14 | import VueAxios from 'vue-axios' 15 | 16 | Vue.use(VueAxios, axios) 17 | ``` 18 | 19 | ### Script: 20 | Just add 3 scripts in order: `vue`, `axios` and `vue-axios` to your `document`. 21 | 22 | ## Usage: 23 | This wrapper bind `axios` to `Vue` or `this` if you're using single file component. 24 | 25 | You can `axios` like this: 26 | ```js 27 | Vue.axios.get(api).then((response) => { 28 | console.log(response.data) 29 | }) 30 | 31 | this.axios.get(api).then((response) => { 32 | console.log(response.data) 33 | }) 34 | 35 | this.$http.get(api).then((response) => { 36 | console.log(response.data) 37 | }) 38 | ``` 39 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue-axios/dist/vue-axios.min.js: -------------------------------------------------------------------------------- 1 | "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function o(e,t){if(!o.installed){if(o.installed=!0,!t)return void console.error("You have to install axios");e.axios=t,Object.defineProperties(e.prototype,{axios:{get:function(){return t}},$http:{get:function(){return t}}})}}"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):window.Vue&&window.axios&&Vue.use(o,window.axios)}(); -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue-axios/index.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, {PluginFunction, PluginObject} from "vue"; 2 | import {AxiosInstance} from "axios"; 3 | 4 | declare module "vue/types/vue" { 5 | 6 | interface Vue { 7 | axios: AxiosInstance; 8 | $http: AxiosInstance; 9 | } 10 | 11 | interface VueConstructor { 12 | axios: AxiosInstance; 13 | } 14 | } 15 | 16 | declare class VueAxios { 17 | static install: PluginFunction; 18 | } 19 | 20 | export default VueAxios; 21 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue-axios/src/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | /** 4 | * Install plugin 5 | * @param Vue 6 | * @param axios 7 | */ 8 | 9 | function plugin(Vue, axios) { 10 | 11 | if (plugin.installed) { 12 | return 13 | } 14 | plugin.installed = true 15 | 16 | if (!axios) { 17 | console.error('You have to install axios') 18 | return 19 | } 20 | 21 | Vue.axios = axios 22 | 23 | Object.defineProperties(Vue.prototype, { 24 | 25 | axios: { 26 | get() { 27 | return axios 28 | } 29 | }, 30 | 31 | $http: { 32 | get() { 33 | return axios 34 | } 35 | } 36 | 37 | }) 38 | } 39 | 40 | if (typeof exports == "object") { 41 | module.exports = plugin 42 | } else if (typeof define == "function" && define.amd) { 43 | define([], function(){ return plugin }) 44 | } else if (window.Vue && window.axios) { 45 | Vue.use(plugin, window.axios) 46 | } 47 | 48 | })(); 49 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/dist/vue.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/dist/vue.runtime.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.runtime.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.runtime.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function bind (el: ASTElement, dir: ASTDirective) { 4 | el.wrapData = (code: string) => { 5 | return `_b(${code},'${el.tag}',${dir.value},${ 6 | dir.modifiers && dir.modifiers.prop ? 'true' : 'false' 7 | }${ 8 | dir.modifiers && dir.modifiers.sync ? ',true' : '' 9 | })` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import on from './on' 4 | import bind from './bind' 5 | import { noop } from 'shared/util' 6 | 7 | export default { 8 | on, 9 | bind, 10 | cloak: noop 11 | } 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export default function on (el: ASTElement, dir: ASTDirective) { 6 | if (process.env.NODE_ENV !== 'production' && dir.modifiers) { 7 | warn(`v-on without argument does not support modifiers.`) 8 | } 9 | el.wrapListeners = (code: string) => `_g(${code},${dir.value})` 10 | } 11 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from './parser/index' 4 | import { optimize } from './optimizer' 5 | import { generate } from './codegen/index' 6 | import { createCompilerCreator } from './create-compiler' 7 | 8 | // `createCompilerCreator` allows creating compilers that use alternative 9 | // parser/optimizer/codegen, e.g the SSR optimizing compiler. 10 | // Here we just export a default compiler using the default parts. 11 | export const createCompiler = createCompilerCreator(function baseCompile ( 12 | template: string, 13 | options: CompilerOptions 14 | ): CompiledResult { 15 | const ast = parse(template.trim(), options) 16 | if (options.optimize !== false) { 17 | optimize(ast, options) 18 | } 19 | const code = generate(ast, options) 20 | return { 21 | ast, 22 | render: code.render, 23 | staticRenderFns: code.staticRenderFns 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/parser/entity-decoder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let decoder 4 | 5 | export default { 6 | decode (html: string): string { 7 | decoder = decoder || document.createElement('div') 8 | decoder.innerHTML = html 9 | return decoder.textContent 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/components/index.js: -------------------------------------------------------------------------------- 1 | import KeepAlive from './keep-alive' 2 | 3 | export default { 4 | KeepAlive 5 | } 6 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/global-api/mixin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { mergeOptions } from '../util/index' 4 | 5 | export function initMixin (Vue: GlobalAPI) { 6 | Vue.mixin = function (mixin: Object) { 7 | this.options = mergeOptions(this.options, mixin) 8 | return this 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/global-api/use.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { toArray } from '../util/index' 4 | 5 | export function initUse (Vue: GlobalAPI) { 6 | Vue.use = function (plugin: Function | Object) { 7 | const installedPlugins = (this._installedPlugins || (this._installedPlugins = [])) 8 | if (installedPlugins.indexOf(plugin) > -1) { 9 | return this 10 | } 11 | 12 | // additional parameters 13 | const args = toArray(arguments, 1) 14 | args.unshift(this) 15 | if (typeof plugin.install === 'function') { 16 | plugin.install.apply(plugin, args) 17 | } else if (typeof plugin === 'function') { 18 | plugin.apply(null, args) 19 | } 20 | installedPlugins.push(plugin) 21 | return this 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/index.js: -------------------------------------------------------------------------------- 1 | import Vue from './instance/index' 2 | import { initGlobalAPI } from './global-api/index' 3 | import { isServerRendering } from 'core/util/env' 4 | import { FunctionalRenderContext } from 'core/vdom/create-functional-component' 5 | 6 | initGlobalAPI(Vue) 7 | 8 | Object.defineProperty(Vue.prototype, '$isServer', { 9 | get: isServerRendering 10 | }) 11 | 12 | Object.defineProperty(Vue.prototype, '$ssrContext', { 13 | get () { 14 | /* istanbul ignore next */ 15 | return this.$vnode && this.$vnode.ssrContext 16 | } 17 | }) 18 | 19 | // expose FunctionalRenderContext for ssr runtime helper installation 20 | Object.defineProperty(Vue, 'FunctionalRenderContext', { 21 | value: FunctionalRenderContext 22 | }) 23 | 24 | Vue.version = '__VERSION__' 25 | 26 | export default Vue 27 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/index.js: -------------------------------------------------------------------------------- 1 | import { initMixin } from './init' 2 | import { stateMixin } from './state' 3 | import { renderMixin } from './render' 4 | import { eventsMixin } from './events' 5 | import { lifecycleMixin } from './lifecycle' 6 | import { warn } from '../util/index' 7 | 8 | function Vue (options) { 9 | if (process.env.NODE_ENV !== 'production' && 10 | !(this instanceof Vue) 11 | ) { 12 | warn('Vue is a constructor and should be called with the `new` keyword') 13 | } 14 | this._init(options) 15 | } 16 | 17 | initMixin(Vue) 18 | stateMixin(Vue) 19 | eventsMixin(Vue) 20 | lifecycleMixin(Vue) 21 | renderMixin(Vue) 22 | 23 | export default Vue 24 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/bind-object-listeners.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn, extend, isPlainObject } from 'core/util/index' 4 | 5 | export function bindObjectListeners (data: any, value: any): VNodeData { 6 | if (value) { 7 | if (!isPlainObject(value)) { 8 | process.env.NODE_ENV !== 'production' && warn( 9 | 'v-on without argument expects an Object value', 10 | this 11 | ) 12 | } else { 13 | const on = data.on = data.on ? extend({}, data.on) : {} 14 | for (const key in value) { 15 | const existing = on[key] 16 | const ours = value[key] 17 | on[key] = existing ? [].concat(existing, ours) : ours 18 | } 19 | } 20 | } 21 | return data 22 | } 23 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/resolve-filter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { identity, resolveAsset } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for resolving filters 7 | */ 8 | export function resolveFilter (id: string): Function { 9 | return resolveAsset(this.$options, 'filters', id, true) || identity 10 | } 11 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/resolve-scoped-slots.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function resolveScopedSlots ( 4 | fns: ScopedSlotsData, // see flow/vnode 5 | res?: Object, 6 | // the following are added in 2.6 7 | hasDynamicKeys?: boolean, 8 | contentHashKey?: number 9 | ): { [key: string]: Function, $stable: boolean } { 10 | res = res || { $stable: !hasDynamicKeys } 11 | for (let i = 0; i < fns.length; i++) { 12 | const slot = fns[i] 13 | if (Array.isArray(slot)) { 14 | resolveScopedSlots(slot, res, hasDynamicKeys) 15 | } else if (slot) { 16 | // marker for reverse proxying v-slot without scope on this.$slots 17 | if (slot.proxy) { 18 | slot.fn.proxy = true 19 | } 20 | res[slot.key] = slot.fn 21 | } 22 | } 23 | if (contentHashKey) { 24 | (res: any).$key = contentHashKey 25 | } 26 | return res 27 | } 28 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from 'shared/util' 4 | export * from './lang' 5 | export * from './env' 6 | export * from './options' 7 | export * from './debug' 8 | export * from './props' 9 | export * from './error' 10 | export * from './next-tick' 11 | export { defineReactive } from '../observer/index' 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/util/perf.js: -------------------------------------------------------------------------------- 1 | import { inBrowser } from './env' 2 | 3 | export let mark 4 | export let measure 5 | 6 | if (process.env.NODE_ENV !== 'production') { 7 | const perf = inBrowser && window.performance 8 | /* istanbul ignore if */ 9 | if ( 10 | perf && 11 | perf.mark && 12 | perf.measure && 13 | perf.clearMarks && 14 | perf.clearMeasures 15 | ) { 16 | mark = tag => perf.mark(tag) 17 | measure = (name, startTag, endTag) => { 18 | perf.measure(name, startTag, endTag) 19 | perf.clearMarks(startTag) 20 | perf.clearMarks(endTag) 21 | // perf.clearMeasures(name) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/get-first-component-child.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isDef } from 'shared/util' 4 | import { isAsyncPlaceholder } from './is-async-placeholder' 5 | 6 | export function getFirstComponentChild (children: ?Array): ?VNode { 7 | if (Array.isArray(children)) { 8 | for (let i = 0; i < children.length; i++) { 9 | const c = children[i] 10 | if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 11 | return c 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from './merge-hook' 4 | export * from './extract-props' 5 | export * from './update-listeners' 6 | export * from './normalize-children' 7 | export * from './resolve-async-component' 8 | export * from './get-first-component-child' 9 | export * from './is-async-placeholder' 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/is-async-placeholder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isAsyncPlaceholder (node: VNode): boolean { 4 | return node.isComment && node.asyncFactory 5 | } 6 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/modules/index.js: -------------------------------------------------------------------------------- 1 | import directives from './directives' 2 | import ref from './ref' 3 | 4 | export default [ 5 | ref, 6 | directives 7 | ] 8 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function html (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'innerHTML', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import text from './text' 3 | import html from './html' 4 | 5 | export default { 6 | model, 7 | text, 8 | html 9 | } 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function text (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'textContent', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from './options' 4 | import { createCompiler } from 'compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { compile, compileToFunctions } 9 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import model from './model' 4 | 5 | export default [ 6 | klass, 7 | style, 8 | model 9 | ] 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isPreTag, 5 | mustUseProp, 6 | isReservedTag, 7 | getTagNamespace 8 | } from '../util/index' 9 | 10 | import modules from './modules/index' 11 | import directives from './directives/index' 12 | import { genStaticKeys } from 'shared/util' 13 | import { isUnaryTag, canBeLeftOpenTag } from './util' 14 | 15 | export const baseOptions: CompilerOptions = { 16 | expectHTML: true, 17 | modules, 18 | directives, 19 | isPreTag, 20 | isUnaryTag, 21 | mustUseProp, 22 | canBeLeftOpenTag, 23 | isReservedTag, 24 | getTagNamespace, 25 | staticKeys: genStaticKeys(modules) 26 | } 27 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { parseComponent } from 'sfc/parser' 4 | export { compile, compileToFunctions } from './compiler/index' 5 | export { ssrCompile, ssrCompileToFunctions } from './server/compiler' 6 | export { generateCodeFrame } from 'compiler/codeframe' 7 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-runtime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from './runtime/index' 4 | 5 | export default Vue 6 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-server-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import modules from './server/modules/index' 4 | import directives from './server/directives/index' 5 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 6 | import { createBasicRenderer } from 'server/create-basic-renderer' 7 | 8 | export default createBasicRenderer({ 9 | modules, 10 | directives, 11 | isUnaryTag, 12 | canBeLeftOpenTag 13 | }) 14 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Transition from './transition' 2 | import TransitionGroup from './transition-group' 3 | 4 | export default { 5 | Transition, 6 | TransitionGroup 7 | } 8 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import show from './show' 3 | 4 | export default { 5 | model, 6 | show 7 | } 8 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import domProps from './dom-props' 5 | import style from './style' 6 | import transition from './transition' 7 | 8 | export default [ 9 | attrs, 10 | klass, 11 | events, 12 | domProps, 13 | style, 14 | transition 15 | ] 16 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'web/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'web/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ nodeOps, modules }) 13 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from '../compiler/options' 4 | import { createCompiler } from 'server/optimizing-compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { 9 | compile as ssrCompile, 10 | compileToFunctions as ssrCompileToFunctions 11 | } 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/directives/index.js: -------------------------------------------------------------------------------- 1 | import show from './show' 2 | import model from './model' 3 | 4 | export default { 5 | show, 6 | model 7 | } 8 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/directives/show.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function show (node: VNodeWithData, dir: VNodeDirective) { 4 | if (!dir.value) { 5 | const style: any = node.data.style || (node.data.style = {}) 6 | if (Array.isArray(style)) { 7 | style.push({ display: 'none' }) 8 | } else { 9 | style.display = 'none' 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { escape } from '../util' 4 | import { genClassForVnode } from 'web/util/index' 5 | 6 | export default function renderClass (node: VNodeWithData): ?string { 7 | const classList = genClassForVnode(node) 8 | if (classList !== '') { 9 | return ` class="${escape(classList)}"` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import domProps from './dom-props' 3 | import klass from './class' 4 | import style from './style' 5 | 6 | export default [ 7 | attrs, 8 | domProps, 9 | klass, 10 | style 11 | ] 12 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/util/compat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { inBrowser } from 'core/util/index' 4 | 5 | // check whether current browser encodes a char inside attribute values 6 | let div 7 | function getShouldDecode (href: boolean): boolean { 8 | div = div || document.createElement('div') 9 | div.innerHTML = href ? `
` : `
` 10 | return div.innerHTML.indexOf(' ') > 0 11 | } 12 | 13 | // #3663: IE encodes newlines inside attribute values while other browsers don't 14 | export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false 15 | // #6828: chrome encodes content in a[href] 16 | export const shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false 17 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export * from './attrs' 6 | export * from './class' 7 | export * from './element' 8 | 9 | /** 10 | * Query an element selector if it's not an element already. 11 | */ 12 | export function query (el: string | Element): Element { 13 | if (typeof el === 'string') { 14 | const selected = document.querySelector(el) 15 | if (!selected) { 16 | process.env.NODE_ENV !== 'production' && warn( 17 | 'Cannot find element: ' + el 18 | ) 19 | return document.createElement('div') 20 | } 21 | return selected 22 | } else { 23 | return el 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | 3 | export default { 4 | model 5 | } 6 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/append.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | // The "unitary tag" means that the tag node and its children 6 | // must be sent to the native together. 7 | const isUnitaryTag = makeMap('cell,header,cell-slot,recycle-list', true) 8 | 9 | function preTransformNode (el: ASTElement) { 10 | if (isUnitaryTag(el.tag) && !el.attrsList.some(item => item.name === 'append')) { 11 | el.attrsMap.append = 'tree' 12 | el.attrsList.push({ name: 'append', value: 'tree' }) 13 | } 14 | if (el.attrsMap.append === 'tree') { 15 | el.appendAsTree = true 16 | } 17 | } 18 | 19 | function genData (el: ASTElement): string { 20 | return el.appendAsTree ? `appendAsTree:true,` : '' 21 | } 22 | 23 | export default { 24 | staticKeys: ['appendAsTree'], 25 | preTransformNode, 26 | genData 27 | } 28 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import props from './props' 4 | import append from './append' 5 | import recycleList from './recycle-list/index' 6 | 7 | export default [ 8 | recycleList, 9 | klass, 10 | style, 11 | props, 12 | append 13 | ] 14 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component-root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | // mark component root nodes as 6 | export function postTransformComponentRoot (el: ASTElement) { 7 | if (!el.parent) { 8 | // component root 9 | addAttr(el, '@isComponentRoot', 'true') 10 | addAttr(el, '@templateId', '_uid') 11 | addAttr(el, '@componentProps', '$props || {}') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | import { RECYCLE_LIST_MARKER } from 'weex/util/index' 5 | 6 | // mark components as inside recycle-list so that we know we need to invoke 7 | // their special @render function instead of render in create-component.js 8 | export function postTransformComponent ( 9 | el: ASTElement, 10 | options: WeexCompilerOptions 11 | ) { 12 | // $flow-disable-line (we know isReservedTag is there) 13 | if (!options.isReservedTag(el.tag) && el.tag !== 'cell-slot') { 14 | addAttr(el, RECYCLE_LIST_MARKER, 'true') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | function genText (node: ASTNode) { 6 | const value = node.type === 3 7 | ? node.text 8 | : node.type === 2 9 | ? node.tokens.length === 1 10 | ? node.tokens[0] 11 | : node.tokens 12 | : '' 13 | return JSON.stringify(value) 14 | } 15 | 16 | export function postTransformText (el: ASTElement) { 17 | // weex can only contain text, so the parser 18 | // always generates a single child. 19 | if (el.children.length) { 20 | addAttr(el, 'value', genText(el.children[0])) 21 | el.children = [] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { camelize } from 'shared/util' 4 | import { generateBinding } from 'weex/util/parser' 5 | import { bindRE } from 'compiler/parser/index' 6 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 7 | 8 | function parseAttrName (name: string): string { 9 | return camelize(name.replace(bindRE, '')) 10 | } 11 | 12 | export function preTransformVBind (el: ASTElement) { 13 | for (const attr in el.attrsMap) { 14 | if (bindRE.test(attr)) { 15 | const name: string = parseAttrName(attr) 16 | const value = generateBinding(getAndRemoveAttr(el, attr)) 17 | delete el.attrsMap[attr] 18 | addRawAttr(el, name, value) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-for.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parseFor } from 'compiler/parser/index' 4 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 5 | 6 | export function preTransformVFor (el: ASTElement, options: WeexCompilerOptions) { 7 | const exp = getAndRemoveAttr(el, 'v-for') 8 | if (!exp) { 9 | return 10 | } 11 | 12 | const res = parseFor(exp) 13 | if (!res) { 14 | if (process.env.NODE_ENV !== 'production' && options.warn) { 15 | options.warn(`Invalid v-for expression: ${exp}`) 16 | } 17 | return 18 | } 19 | 20 | const desc: Object = { 21 | '@expression': res.for, 22 | '@alias': res.alias 23 | } 24 | if (res.iterator2) { 25 | desc['@key'] = res.iterator1 26 | desc['@index'] = res.iterator2 27 | } else { 28 | desc['@index'] = res.iterator1 29 | } 30 | 31 | delete el.attrsMap['v-for'] 32 | addRawAttr(el, '[[repeat]]', desc) 33 | } 34 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const inlineStatementRE = /^\s*([A-Za-z_$0-9\['\."\]]+)*\s*\(\s*(([A-Za-z_$0-9\['\."\]]+)?(\s*,\s*([A-Za-z_$0-9\['\."\]]+))*)\s*\)$/ 4 | 5 | function parseHandlerParams (handler: ASTElementHandler) { 6 | const res = inlineStatementRE.exec(handler.value) 7 | if (res && res[2]) { 8 | handler.params = res[2].split(/\s*,\s*/) 9 | } 10 | } 11 | 12 | export function postTransformVOn (el: ASTElement) { 13 | const events: ASTElementHandlers | void = el.events 14 | if (!events) { 15 | return 16 | } 17 | for (const name in events) { 18 | const handler: ASTElementHandler | Array = events[name] 19 | if (Array.isArray(handler)) { 20 | handler.map(fn => parseHandlerParams(fn)) 21 | } else { 22 | parseHandlerParams(handler) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-once.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 4 | 5 | function containVOnce (el: ASTElement): boolean { 6 | for (const attr in el.attrsMap) { 7 | if (/^v\-once$/i.test(attr)) { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | export function preTransformVOnce (el: ASTElement) { 15 | if (containVOnce(el)) { 16 | getAndRemoveAttr(el, 'v-once', true) 17 | addRawAttr(el, '[[once]]', true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/entry-compiler.js: -------------------------------------------------------------------------------- 1 | export { compile } from 'weex/compiler/index' 2 | export { generateCodeFrame } from 'compiler/codeframe' 3 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/entry-runtime-factory.js: -------------------------------------------------------------------------------- 1 | // this entry is built and wrapped with a factory function 2 | // used to generate a fresh copy of Vue for every Weex instance. 3 | 4 | import Vue from './runtime/index' 5 | 6 | exports.Vue = Vue 7 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Richtext from './richtext' 2 | import Transition from './transition' 3 | import TransitionGroup from './transition-group' 4 | 5 | export default { 6 | Richtext, 7 | Transition, 8 | TransitionGroup 9 | } 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/components/transition.js: -------------------------------------------------------------------------------- 1 | // reuse same transition component logic from web 2 | export { 3 | transitionProps, 4 | extractTransitionData 5 | } from 'web/runtime/components/transition' 6 | 7 | import Transition from 'web/runtime/components/transition' 8 | 9 | export default Transition 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | } 3 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import style from './style' 5 | import transition from './transition' 6 | 7 | export default [ 8 | attrs, 9 | klass, 10 | events, 11 | style, 12 | transition 13 | ] 14 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'weex/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'weex/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ 13 | nodeOps, 14 | modules, 15 | LONG_LIST_THRESHOLD: 10 16 | }) 17 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/text-node.js: -------------------------------------------------------------------------------- 1 | let latestNodeId = 1 2 | 3 | export default function TextNode (text) { 4 | this.instanceId = '' 5 | this.nodeId = latestNodeId++ 6 | this.parentNode = null 7 | this.nodeType = 3 8 | this.text = text 9 | } 10 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/server/create-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { createWriteFunction } from './write' 4 | import { createRenderFunction } from './render' 5 | import type { RenderOptions } from './create-renderer' 6 | 7 | export function createBasicRenderer ({ 8 | modules = [], 9 | directives = {}, 10 | isUnaryTag = (() => false), 11 | cache 12 | }: RenderOptions = {}) { 13 | const render = createRenderFunction(modules, directives, isUnaryTag, cache) 14 | 15 | return function renderToString ( 16 | component: Component, 17 | context: any, 18 | done: any 19 | ): void { 20 | if (typeof context === 'function') { 21 | done = context 22 | context = {} 23 | } 24 | let result = '' 25 | const write = createWriteFunction(text => { 26 | result += text 27 | return false 28 | }, done) 29 | try { 30 | render(component, write, context, () => { 31 | done(null, result) 32 | }) 33 | } catch (e) { 34 | done(e) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/server/optimizing-compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from 'compiler/parser/index' 4 | import { generate } from './codegen' 5 | import { optimize } from './optimizer' 6 | import { createCompilerCreator } from 'compiler/create-compiler' 7 | 8 | export const createCompiler = createCompilerCreator(function baseCompile ( 9 | template: string, 10 | options: CompilerOptions 11 | ): CompiledResult { 12 | const ast = parse(template.trim(), options) 13 | optimize(ast, options) 14 | const code = generate(ast, options) 15 | return { 16 | ast, 17 | render: code.render, 18 | staticRenderFns: code.staticRenderFns 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/server/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file) 4 | 5 | export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file) 6 | 7 | export function createPromiseCallback () { 8 | let resolve, reject 9 | const promise: Promise = new Promise((_resolve, _reject) => { 10 | resolve = _resolve 11 | reject = _reject 12 | }) 13 | const cb = (err: Error, res?: string) => { 14 | if (err) return reject(err) 15 | resolve(res || '') 16 | } 17 | return { promise, cb } 18 | } 19 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const SSR_ATTR = 'data-server-rendered' 2 | 3 | export const ASSET_TYPES = [ 4 | 'component', 5 | 'directive', 6 | 'filter' 7 | ] 8 | 9 | export const LIFECYCLE_HOOKS = [ 10 | 'beforeCreate', 11 | 'created', 12 | 'beforeMount', 13 | 'mounted', 14 | 'beforeUpdate', 15 | 'updated', 16 | 'beforeDestroy', 17 | 'destroyed', 18 | 'activated', 19 | 'deactivated', 20 | 'errorCaptured', 21 | 'serverPrefetch' 22 | ] 23 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | 3 | export default Vue; 4 | 5 | export as namespace Vue; 6 | 7 | export { 8 | CreateElement, 9 | VueConstructor 10 | } from "./vue"; 11 | 12 | export { 13 | Component, 14 | AsyncComponent, 15 | ComponentOptions, 16 | FunctionalComponentOptions, 17 | RenderContext, 18 | PropType, 19 | PropOptions, 20 | ComputedOptions, 21 | WatchHandler, 22 | WatchOptions, 23 | WatchOptionsWithHandler, 24 | DirectiveFunction, 25 | DirectiveOptions 26 | } from "./options"; 27 | 28 | export { 29 | PluginFunction, 30 | PluginObject 31 | } from "./plugin"; 32 | 33 | export { 34 | VNodeChildren, 35 | VNodeChildrenArrayContents, 36 | VNode, 37 | VNodeComponentOptions, 38 | VNodeData, 39 | VNodeDirective 40 | } from "./vnode"; 41 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/node_modules/vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/META-INF/resources/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "dependencies": { 4 | "director": "^1.2.0", 5 | "vue": "^2.1.8", 6 | "vue-axios": "^2.1.4", 7 | "todomvc-common": "^1.0.1", 8 | "todomvc-app-css": "^2.0.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.datasource.url=jdbc:postgresql:rest-crud 4 | quarkus.datasource.driver=org.postgresql.Driver 5 | quarkus.datasource.username=restcrud 6 | quarkus.datasource.password=restcrud 7 | quarkus.datasource.max-size=8 8 | quarkus.datasource.min-size=2 9 | quarkus.hibernate-orm.database.generation=drop-and-create 10 | quarkus.hibernate-orm.log.sql=true -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/import.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Introduction to Quarkus', true, 0, null) 2 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Hibernate with Panache', false, 1, null) 3 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Visit Quarkus web site', false, 2, 'https://quarkus.io') 4 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Star Quarkus project', false, 3, 'https://github.com/quarkusio/quarkus/') 5 | -------------------------------------------------------------------------------- /Q06-testing/src/main/resources/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /Q06-testing/src/test/java/io/quarkus/sample/TodoResourceIT.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import io.quarkus.test.junit.SubstrateTest; 4 | 5 | @SubstrateTest 6 | class TodoResourceIT extends TodoResourceTest { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /Q06-testing/start-database.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 \ 3 | --name postgres-quarkus-rest-http-crud -e POSTGRES_USER=restcrud \ 4 | -e POSTGRES_PASSWORD=restcrud -e POSTGRES_DB=rest-crud \ 5 | -p 5432:5432 postgres:10.5 6 | -------------------------------------------------------------------------------- /Q08-ops/quarkus-health-check-demo/src/main/java/me/escoffier/quarkus/demo/health/AnotherSensor.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.demo.health; 2 | 3 | import org.eclipse.microprofile.health.Health; 4 | import org.eclipse.microprofile.health.HealthCheck; 5 | import org.eclipse.microprofile.health.HealthCheckResponse; 6 | 7 | import javax.enterprise.context.ApplicationScoped; 8 | 9 | @ApplicationScoped 10 | @Health 11 | public class AnotherSensor implements HealthCheck { 12 | 13 | 14 | @Override 15 | public HealthCheckResponse call() { 16 | return HealthCheckResponse.builder() 17 | .name("another-check") 18 | .up().build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Q08-ops/quarkus-health-check-demo/src/main/java/me/escoffier/quarkus/demo/health/MyResource.java: -------------------------------------------------------------------------------- 1 | package me.escoffier.quarkus.demo.health; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.Produces; 6 | import javax.ws.rs.core.MediaType; 7 | 8 | @Path("/") 9 | @Produces(MediaType.TEXT_PLAIN) 10 | public class MyResource { 11 | 12 | @GET 13 | public String hello() { 14 | return "hello"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/.dockerignore: -------------------------------------------------------------------------------- 1 | ../ObjectStore 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/prometheus/prometheus.yaml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 15s 3 | evaluation_interval: 15s 4 | 5 | scrape_configs: 6 | - job_name: 'todo-backend' 7 | 8 | static_configs: 9 | - targets: ['docker.for.mac.host.internal:8080'] -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/todo-backend-jvm . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/todo-backend-jvm 15 | # 16 | ### 17 | FROM fabric8/java-jboss-openjdk8-jdk 18 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 19 | COPY target/lib/* /deployments/lib/ 20 | COPY target/*-runner.jar /deployments/app.jar 21 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | #### 2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode 3 | # 4 | # Before building the docker image run: 5 | # 6 | # mvn package -Pnative -Dnative-image.docker-build=true 7 | # 8 | # Then, build the image with: 9 | # 10 | # docker build -f src/main/docker/Dockerfile.native -t quarkus/todo-backend . 11 | # 12 | # Then run the container using: 13 | # 14 | # docker run -i --rm -p 8080:8080 quarkus/todo-backend 15 | # 16 | ### 17 | FROM registry.fedoraproject.org/fedora-minimal 18 | WORKDIR /work/ 19 | COPY target/*-runner /work/application 20 | RUN chmod 775 /work 21 | EXPOSE 8080 22 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/java/io/quarkus/sample/IndexResource.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import java.net.URI; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | import javax.ws.rs.core.UriBuilder; 9 | 10 | @Path("/") 11 | public class IndexResource { 12 | 13 | @GET 14 | public Response redirect() { 15 | URI redirect = UriBuilder.fromUri("todo.html").build(); 16 | return Response.temporaryRedirect(redirect).build(); 17 | } 18 | } -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/java/io/quarkus/sample/Todo.java: -------------------------------------------------------------------------------- 1 | package io.quarkus.sample; 2 | 3 | import io.quarkus.hibernate.orm.panache.PanacheEntity; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.validation.constraints.NotBlank; 8 | import java.util.List; 9 | 10 | @Entity 11 | public class Todo extends PanacheEntity { 12 | 13 | @NotBlank 14 | @Column(unique = true) 15 | public String title; 16 | 17 | public boolean completed; 18 | 19 | @Column(name = "ordering") 20 | public int order; 21 | 22 | public String url; 23 | 24 | public static List findNotCompleted() { 25 | return list("completed", false); 26 | } 27 | 28 | public static List findCompleted() { 29 | return list("completed", true); 30 | } 31 | 32 | public static long deleteCompleted() { 33 | return delete("completed", true); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/js/routes.js: -------------------------------------------------------------------------------- 1 | /*global app, Router */ 2 | 3 | (function (app, Router) { 4 | 5 | 'use strict'; 6 | 7 | var router = new Router(); 8 | 9 | ['all', 'active', 'completed'].forEach(function (visibility) { 10 | router.on(visibility, function () { 11 | app.visibility = visibility; 12 | }); 13 | }); 14 | 15 | router.configure({ 16 | notfound: function () { 17 | window.location.hash = ''; 18 | app.visibility = 'all'; 19 | } 20 | }); 21 | 22 | router.init(); 23 | 24 | })(app, Router); 25 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/js/store.js: -------------------------------------------------------------------------------- 1 | /*jshint unused:false */ 2 | 3 | (function (exports) { 4 | 5 | 'use strict'; 6 | 7 | var serverUrl = 'api/'; 8 | 9 | exports.todoStorage = { 10 | fetch: async function () { 11 | const response = await axios.get(serverUrl); 12 | console.log(response.data); 13 | return response.data; 14 | }, 15 | add : async function(item) { 16 | console.log("Adding todo item " + item.title); 17 | return (await axios.post(serverUrl, item)).data; 18 | }, 19 | save: async function (item) { 20 | console.log("save called with", item); 21 | await axios.patch(serverUrl + item.id, item); 22 | }, 23 | delete: async function(item) { 24 | await axios.delete(serverUrl + item.id); 25 | }, 26 | deleteCompleted: async function() { 27 | await axios.delete(serverUrl); 28 | } 29 | }; 30 | 31 | })(window); 32 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/.npmignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | node_modules 3 | npm-debug.log 4 | .DS_Store 5 | 6 | /test/browser/browserified-bundle.js 7 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | before_install: 4 | - curl --location http://git.io/1OcIZA | bash -s 5 | 6 | node_js: 7 | - "0.8" 8 | - "0.10" 9 | - "0.11" 10 | 11 | notifications: 12 | email: 13 | - travis@nodejitsu.com 14 | irc: "irc.freenode.org#nodejitsu" 15 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "director", 3 | "version": "1.2.7", 4 | "dependencies": {}, 5 | "main": "build/director.js", 6 | "scripts": [ 7 | "build/director.js" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/build/ender.js: -------------------------------------------------------------------------------- 1 | $.ender({ 2 | router: Router 3 | }); 4 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/examples/http.js: -------------------------------------------------------------------------------- 1 | var http = require('http'), 2 | director = require('../lib/director'); 3 | 4 | var router = new director.http.Router(); 5 | 6 | var server = http.createServer(function (req, res) { 7 | req.chunks = []; 8 | req.on('data', function (chunk) { 9 | req.chunks.push(chunk.toString()); 10 | }); 11 | 12 | router.dispatch(req, res, function (err) { 13 | if (err) { 14 | res.writeHead(404); 15 | res.end(); 16 | } 17 | 18 | console.log('Served ' + req.url); 19 | }); 20 | }); 21 | 22 | router.get(/foo/, function () { 23 | this.res.writeHead(200, { 'Content-Type': 'text/plain' }); 24 | this.res.end('hello world\n'); 25 | }); 26 | 27 | router.post(/foo/, function () { 28 | this.res.writeHead(200, { 'Content-Type': 'application/json' }); 29 | this.res.end(JSON.stringify(this.req.body)); 30 | }); 31 | 32 | server.listen(8080); 33 | console.log('vanilla http server with director running on 8080'); 34 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/img/director.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/img/director.png -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/img/hashRoute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cescoffier/quarkus-deep-dive/237129691e2479ca090c6ec894acdc96d2b6c788/Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/img/hashRoute.png -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/lib/director.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | exports.Router = require('./director/router').Router; 5 | exports.http = require('./director/http'); 6 | exports.cli = require('./director/cli'); 7 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/test/browser/browserify-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director Browserify Tests 6 | 7 | 8 | 9 |

To run these tests first generate a Browserify bundle for director by running the command browserify -r ../director -o test/browser/browserified-bundle.js in the repo's root directory.

10 | 11 |
12 |
13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/test/browser/html5-routes-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director HTML5 Tests 6 | 7 | 8 | 9 |

Note: in order to execute HTML5 mode test this file needs to be served with provided nodejs backend. Start the server from director/test/browser/backend and go to http://localhost:8080/ to launch the tests.

10 | 11 |
12 |
13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/test/browser/routes-harness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Director Tests 6 | 7 | 8 | 9 |
10 |
11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/test/server/cli/mount-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * mount-test.js: Tests for the core mount method. 3 | * 4 | * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | vows = require('vows'), 11 | director = require('../../../lib/director'); 12 | 13 | vows.describe('director/cli/path').addBatch({ 14 | "An instance of director.cli.Router with routes": { 15 | topic: new director.cli.Router({ 16 | 'apps': function () { 17 | console.log('apps'); 18 | }, 19 | ' users': function () { 20 | console.log('users'); 21 | } 22 | }), 23 | "should create the correct nested routing table": function (router) { 24 | assert.isObject(router.routes.apps); 25 | assert.isFunction(router.routes.apps.on); 26 | assert.isObject(router.routes.users); 27 | assert.isFunction(router.routes.users.on); 28 | } 29 | } 30 | }).export(module); 31 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/director/test/server/http/responses-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * responses-test.js: Tests for HTTP responses. 3 | * 4 | * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | vows = require('vows'), 11 | director = require('../../../lib/director'); 12 | 13 | vows.describe('director/http/responses').addBatch({ 14 | "When using director.http": { 15 | "it should have the relevant responses defined": function () { 16 | Object.keys(require('../../../lib/director/http/responses')).forEach(function (name) { 17 | assert.isFunction(director.http[name]); 18 | }); 19 | } 20 | } 21 | }).export(module); 22 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/todomvc-app-css/readme.md: -------------------------------------------------------------------------------- 1 | # todomvc-app-css 2 | 3 | > CSS for TodoMVC apps 4 | 5 | ![](screenshot.png) 6 | 7 | 8 | ## Install 9 | 10 | 11 | ``` 12 | $ npm install todomvc-app-css 13 | ``` 14 | 15 | 16 | ## Getting started 17 | 18 | ```html 19 | 20 | ``` 21 | 22 | See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template). 23 | 24 | 25 | ## License 26 | 27 | CC-BY-4.0 © [Sindre Sorhus](https://sindresorhus.com) 28 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/todomvc-common/readme.md: -------------------------------------------------------------------------------- 1 | # todomvc-common 2 | 3 | > Common TodoMVC utilities used by our apps 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install todomvc-common 10 | ``` 11 | 12 | 13 | ## License 14 | 15 | MIT © [TasteJS](http://tastejs.com) 16 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue-axios/README.md: -------------------------------------------------------------------------------- 1 | # vue-axios 2 | A small wrapper for integrating axios to Vuejs 3 | 4 | ## How to install: 5 | ### CommonJS: 6 | ```bash 7 | npm install --save axios vue-axios 8 | ``` 9 | 10 | And in your entry file: 11 | ```js 12 | import Vue from 'vue' 13 | import axios from 'axios' 14 | import VueAxios from 'vue-axios' 15 | 16 | Vue.use(VueAxios, axios) 17 | ``` 18 | 19 | ### Script: 20 | Just add 3 scripts in order: `vue`, `axios` and `vue-axios` to your `document`. 21 | 22 | ## Usage: 23 | This wrapper bind `axios` to `Vue` or `this` if you're using single file component. 24 | 25 | You can `axios` like this: 26 | ```js 27 | Vue.axios.get(api).then((response) => { 28 | console.log(response.data) 29 | }) 30 | 31 | this.axios.get(api).then((response) => { 32 | console.log(response.data) 33 | }) 34 | 35 | this.$http.get(api).then((response) => { 36 | console.log(response.data) 37 | }) 38 | ``` 39 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue-axios/dist/vue-axios.min.js: -------------------------------------------------------------------------------- 1 | "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function o(e,t){if(!o.installed){if(o.installed=!0,!t)return void console.error("You have to install axios");e.axios=t,Object.defineProperties(e.prototype,{axios:{get:function(){return t}},$http:{get:function(){return t}}})}}"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):window.Vue&&window.axios&&Vue.use(o,window.axios)}(); -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue-axios/index.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, {PluginFunction, PluginObject} from "vue"; 2 | import {AxiosInstance} from "axios"; 3 | 4 | declare module "vue/types/vue" { 5 | 6 | interface Vue { 7 | axios: AxiosInstance; 8 | $http: AxiosInstance; 9 | } 10 | 11 | interface VueConstructor { 12 | axios: AxiosInstance; 13 | } 14 | } 15 | 16 | declare class VueAxios { 17 | static install: PluginFunction; 18 | } 19 | 20 | export default VueAxios; 21 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue-axios/src/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | /** 4 | * Install plugin 5 | * @param Vue 6 | * @param axios 7 | */ 8 | 9 | function plugin(Vue, axios) { 10 | 11 | if (plugin.installed) { 12 | return 13 | } 14 | plugin.installed = true 15 | 16 | if (!axios) { 17 | console.error('You have to install axios') 18 | return 19 | } 20 | 21 | Vue.axios = axios 22 | 23 | Object.defineProperties(Vue.prototype, { 24 | 25 | axios: { 26 | get() { 27 | return axios 28 | } 29 | }, 30 | 31 | $http: { 32 | get() { 33 | return axios 34 | } 35 | } 36 | 37 | }) 38 | } 39 | 40 | if (typeof exports == "object") { 41 | module.exports = plugin 42 | } else if (typeof define == "function" && define.amd) { 43 | define([], function(){ return plugin }) 44 | } else if (window.Vue && window.axios) { 45 | Vue.use(plugin, window.axios) 46 | } 47 | 48 | })(); 49 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/dist/vue.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/dist/vue.runtime.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.runtime.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.runtime.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function bind (el: ASTElement, dir: ASTDirective) { 4 | el.wrapData = (code: string) => { 5 | return `_b(${code},'${el.tag}',${dir.value},${ 6 | dir.modifiers && dir.modifiers.prop ? 'true' : 'false' 7 | }${ 8 | dir.modifiers && dir.modifiers.sync ? ',true' : '' 9 | })` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import on from './on' 4 | import bind from './bind' 5 | import { noop } from 'shared/util' 6 | 7 | export default { 8 | on, 9 | bind, 10 | cloak: noop 11 | } 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/directives/on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export default function on (el: ASTElement, dir: ASTDirective) { 6 | if (process.env.NODE_ENV !== 'production' && dir.modifiers) { 7 | warn(`v-on without argument does not support modifiers.`) 8 | } 9 | el.wrapListeners = (code: string) => `_g(${code},${dir.value})` 10 | } 11 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from './parser/index' 4 | import { optimize } from './optimizer' 5 | import { generate } from './codegen/index' 6 | import { createCompilerCreator } from './create-compiler' 7 | 8 | // `createCompilerCreator` allows creating compilers that use alternative 9 | // parser/optimizer/codegen, e.g the SSR optimizing compiler. 10 | // Here we just export a default compiler using the default parts. 11 | export const createCompiler = createCompilerCreator(function baseCompile ( 12 | template: string, 13 | options: CompilerOptions 14 | ): CompiledResult { 15 | const ast = parse(template.trim(), options) 16 | if (options.optimize !== false) { 17 | optimize(ast, options) 18 | } 19 | const code = generate(ast, options) 20 | return { 21 | ast, 22 | render: code.render, 23 | staticRenderFns: code.staticRenderFns 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/compiler/parser/entity-decoder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let decoder 4 | 5 | export default { 6 | decode (html: string): string { 7 | decoder = decoder || document.createElement('div') 8 | decoder.innerHTML = html 9 | return decoder.textContent 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/components/index.js: -------------------------------------------------------------------------------- 1 | import KeepAlive from './keep-alive' 2 | 3 | export default { 4 | KeepAlive 5 | } 6 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/global-api/mixin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { mergeOptions } from '../util/index' 4 | 5 | export function initMixin (Vue: GlobalAPI) { 6 | Vue.mixin = function (mixin: Object) { 7 | this.options = mergeOptions(this.options, mixin) 8 | return this 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/global-api/use.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { toArray } from '../util/index' 4 | 5 | export function initUse (Vue: GlobalAPI) { 6 | Vue.use = function (plugin: Function | Object) { 7 | const installedPlugins = (this._installedPlugins || (this._installedPlugins = [])) 8 | if (installedPlugins.indexOf(plugin) > -1) { 9 | return this 10 | } 11 | 12 | // additional parameters 13 | const args = toArray(arguments, 1) 14 | args.unshift(this) 15 | if (typeof plugin.install === 'function') { 16 | plugin.install.apply(plugin, args) 17 | } else if (typeof plugin === 'function') { 18 | plugin.apply(null, args) 19 | } 20 | installedPlugins.push(plugin) 21 | return this 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/index.js: -------------------------------------------------------------------------------- 1 | import Vue from './instance/index' 2 | import { initGlobalAPI } from './global-api/index' 3 | import { isServerRendering } from 'core/util/env' 4 | import { FunctionalRenderContext } from 'core/vdom/create-functional-component' 5 | 6 | initGlobalAPI(Vue) 7 | 8 | Object.defineProperty(Vue.prototype, '$isServer', { 9 | get: isServerRendering 10 | }) 11 | 12 | Object.defineProperty(Vue.prototype, '$ssrContext', { 13 | get () { 14 | /* istanbul ignore next */ 15 | return this.$vnode && this.$vnode.ssrContext 16 | } 17 | }) 18 | 19 | // expose FunctionalRenderContext for ssr runtime helper installation 20 | Object.defineProperty(Vue, 'FunctionalRenderContext', { 21 | value: FunctionalRenderContext 22 | }) 23 | 24 | Vue.version = '__VERSION__' 25 | 26 | export default Vue 27 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/index.js: -------------------------------------------------------------------------------- 1 | import { initMixin } from './init' 2 | import { stateMixin } from './state' 3 | import { renderMixin } from './render' 4 | import { eventsMixin } from './events' 5 | import { lifecycleMixin } from './lifecycle' 6 | import { warn } from '../util/index' 7 | 8 | function Vue (options) { 9 | if (process.env.NODE_ENV !== 'production' && 10 | !(this instanceof Vue) 11 | ) { 12 | warn('Vue is a constructor and should be called with the `new` keyword') 13 | } 14 | this._init(options) 15 | } 16 | 17 | initMixin(Vue) 18 | stateMixin(Vue) 19 | eventsMixin(Vue) 20 | lifecycleMixin(Vue) 21 | renderMixin(Vue) 22 | 23 | export default Vue 24 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/bind-object-listeners.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn, extend, isPlainObject } from 'core/util/index' 4 | 5 | export function bindObjectListeners (data: any, value: any): VNodeData { 6 | if (value) { 7 | if (!isPlainObject(value)) { 8 | process.env.NODE_ENV !== 'production' && warn( 9 | 'v-on without argument expects an Object value', 10 | this 11 | ) 12 | } else { 13 | const on = data.on = data.on ? extend({}, data.on) : {} 14 | for (const key in value) { 15 | const existing = on[key] 16 | const ours = value[key] 17 | on[key] = existing ? [].concat(existing, ours) : ours 18 | } 19 | } 20 | } 21 | return data 22 | } 23 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/resolve-filter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { identity, resolveAsset } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for resolving filters 7 | */ 8 | export function resolveFilter (id: string): Function { 9 | return resolveAsset(this.$options, 'filters', id, true) || identity 10 | } 11 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/instance/render-helpers/resolve-scoped-slots.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function resolveScopedSlots ( 4 | fns: ScopedSlotsData, // see flow/vnode 5 | res?: Object, 6 | // the following are added in 2.6 7 | hasDynamicKeys?: boolean, 8 | contentHashKey?: number 9 | ): { [key: string]: Function, $stable: boolean } { 10 | res = res || { $stable: !hasDynamicKeys } 11 | for (let i = 0; i < fns.length; i++) { 12 | const slot = fns[i] 13 | if (Array.isArray(slot)) { 14 | resolveScopedSlots(slot, res, hasDynamicKeys) 15 | } else if (slot) { 16 | // marker for reverse proxying v-slot without scope on this.$slots 17 | if (slot.proxy) { 18 | slot.fn.proxy = true 19 | } 20 | res[slot.key] = slot.fn 21 | } 22 | } 23 | if (contentHashKey) { 24 | (res: any).$key = contentHashKey 25 | } 26 | return res 27 | } 28 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from 'shared/util' 4 | export * from './lang' 5 | export * from './env' 6 | export * from './options' 7 | export * from './debug' 8 | export * from './props' 9 | export * from './error' 10 | export * from './next-tick' 11 | export { defineReactive } from '../observer/index' 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/util/perf.js: -------------------------------------------------------------------------------- 1 | import { inBrowser } from './env' 2 | 3 | export let mark 4 | export let measure 5 | 6 | if (process.env.NODE_ENV !== 'production') { 7 | const perf = inBrowser && window.performance 8 | /* istanbul ignore if */ 9 | if ( 10 | perf && 11 | perf.mark && 12 | perf.measure && 13 | perf.clearMarks && 14 | perf.clearMeasures 15 | ) { 16 | mark = tag => perf.mark(tag) 17 | measure = (name, startTag, endTag) => { 18 | perf.measure(name, startTag, endTag) 19 | perf.clearMarks(startTag) 20 | perf.clearMarks(endTag) 21 | // perf.clearMeasures(name) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/get-first-component-child.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isDef } from 'shared/util' 4 | import { isAsyncPlaceholder } from './is-async-placeholder' 5 | 6 | export function getFirstComponentChild (children: ?Array): ?VNode { 7 | if (Array.isArray(children)) { 8 | for (let i = 0; i < children.length; i++) { 9 | const c = children[i] 10 | if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 11 | return c 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from './merge-hook' 4 | export * from './extract-props' 5 | export * from './update-listeners' 6 | export * from './normalize-children' 7 | export * from './resolve-async-component' 8 | export * from './get-first-component-child' 9 | export * from './is-async-placeholder' 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/helpers/is-async-placeholder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isAsyncPlaceholder (node: VNode): boolean { 4 | return node.isComment && node.asyncFactory 5 | } 6 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/core/vdom/modules/index.js: -------------------------------------------------------------------------------- 1 | import directives from './directives' 2 | import ref from './ref' 3 | 4 | export default [ 5 | ref, 6 | directives 7 | ] 8 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function html (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'innerHTML', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import text from './text' 3 | import html from './html' 4 | 5 | export default { 6 | model, 7 | text, 8 | html 9 | } 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/directives/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function text (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'textContent', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from './options' 4 | import { createCompiler } from 'compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { compile, compileToFunctions } 9 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import model from './model' 4 | 5 | export default [ 6 | klass, 7 | style, 8 | model 9 | ] 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/compiler/options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isPreTag, 5 | mustUseProp, 6 | isReservedTag, 7 | getTagNamespace 8 | } from '../util/index' 9 | 10 | import modules from './modules/index' 11 | import directives from './directives/index' 12 | import { genStaticKeys } from 'shared/util' 13 | import { isUnaryTag, canBeLeftOpenTag } from './util' 14 | 15 | export const baseOptions: CompilerOptions = { 16 | expectHTML: true, 17 | modules, 18 | directives, 19 | isPreTag, 20 | isUnaryTag, 21 | mustUseProp, 22 | canBeLeftOpenTag, 23 | isReservedTag, 24 | getTagNamespace, 25 | staticKeys: genStaticKeys(modules) 26 | } 27 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { parseComponent } from 'sfc/parser' 4 | export { compile, compileToFunctions } from './compiler/index' 5 | export { ssrCompile, ssrCompileToFunctions } from './server/compiler' 6 | export { generateCodeFrame } from 'compiler/codeframe' 7 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-runtime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from './runtime/index' 4 | 5 | export default Vue 6 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/entry-server-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import modules from './server/modules/index' 4 | import directives from './server/directives/index' 5 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 6 | import { createBasicRenderer } from 'server/create-basic-renderer' 7 | 8 | export default createBasicRenderer({ 9 | modules, 10 | directives, 11 | isUnaryTag, 12 | canBeLeftOpenTag 13 | }) 14 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Transition from './transition' 2 | import TransitionGroup from './transition-group' 3 | 4 | export default { 5 | Transition, 6 | TransitionGroup 7 | } 8 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import show from './show' 3 | 4 | export default { 5 | model, 6 | show 7 | } 8 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import domProps from './dom-props' 5 | import style from './style' 6 | import transition from './transition' 7 | 8 | export default [ 9 | attrs, 10 | klass, 11 | events, 12 | domProps, 13 | style, 14 | transition 15 | ] 16 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'web/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'web/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ nodeOps, modules }) 13 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from '../compiler/options' 4 | import { createCompiler } from 'server/optimizing-compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { 9 | compile as ssrCompile, 10 | compileToFunctions as ssrCompileToFunctions 11 | } 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/directives/index.js: -------------------------------------------------------------------------------- 1 | import show from './show' 2 | import model from './model' 3 | 4 | export default { 5 | show, 6 | model 7 | } 8 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/directives/show.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function show (node: VNodeWithData, dir: VNodeDirective) { 4 | if (!dir.value) { 5 | const style: any = node.data.style || (node.data.style = {}) 6 | if (Array.isArray(style)) { 7 | style.push({ display: 'none' }) 8 | } else { 9 | style.display = 'none' 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { escape } from '../util' 4 | import { genClassForVnode } from 'web/util/index' 5 | 6 | export default function renderClass (node: VNodeWithData): ?string { 7 | const classList = genClassForVnode(node) 8 | if (classList !== '') { 9 | return ` class="${escape(classList)}"` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/server/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import domProps from './dom-props' 3 | import klass from './class' 4 | import style from './style' 5 | 6 | export default [ 7 | attrs, 8 | domProps, 9 | klass, 10 | style 11 | ] 12 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/util/compat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { inBrowser } from 'core/util/index' 4 | 5 | // check whether current browser encodes a char inside attribute values 6 | let div 7 | function getShouldDecode (href: boolean): boolean { 8 | div = div || document.createElement('div') 9 | div.innerHTML = href ? `
` : `
` 10 | return div.innerHTML.indexOf(' ') > 0 11 | } 12 | 13 | // #3663: IE encodes newlines inside attribute values while other browsers don't 14 | export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false 15 | // #6828: chrome encodes content in a[href] 16 | export const shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false 17 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/web/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export * from './attrs' 6 | export * from './class' 7 | export * from './element' 8 | 9 | /** 10 | * Query an element selector if it's not an element already. 11 | */ 12 | export function query (el: string | Element): Element { 13 | if (typeof el === 'string') { 14 | const selected = document.querySelector(el) 15 | if (!selected) { 16 | process.env.NODE_ENV !== 'production' && warn( 17 | 'Cannot find element: ' + el 18 | ) 19 | return document.createElement('div') 20 | } 21 | return selected 22 | } else { 23 | return el 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | 3 | export default { 4 | model 5 | } 6 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/append.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | // The "unitary tag" means that the tag node and its children 6 | // must be sent to the native together. 7 | const isUnitaryTag = makeMap('cell,header,cell-slot,recycle-list', true) 8 | 9 | function preTransformNode (el: ASTElement) { 10 | if (isUnitaryTag(el.tag) && !el.attrsList.some(item => item.name === 'append')) { 11 | el.attrsMap.append = 'tree' 12 | el.attrsList.push({ name: 'append', value: 'tree' }) 13 | } 14 | if (el.attrsMap.append === 'tree') { 15 | el.appendAsTree = true 16 | } 17 | } 18 | 19 | function genData (el: ASTElement): string { 20 | return el.appendAsTree ? `appendAsTree:true,` : '' 21 | } 22 | 23 | export default { 24 | staticKeys: ['appendAsTree'], 25 | preTransformNode, 26 | genData 27 | } 28 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import props from './props' 4 | import append from './append' 5 | import recycleList from './recycle-list/index' 6 | 7 | export default [ 8 | recycleList, 9 | klass, 10 | style, 11 | props, 12 | append 13 | ] 14 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component-root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | // mark component root nodes as 6 | export function postTransformComponentRoot (el: ASTElement) { 7 | if (!el.parent) { 8 | // component root 9 | addAttr(el, '@isComponentRoot', 'true') 10 | addAttr(el, '@templateId', '_uid') 11 | addAttr(el, '@componentProps', '$props || {}') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | import { RECYCLE_LIST_MARKER } from 'weex/util/index' 5 | 6 | // mark components as inside recycle-list so that we know we need to invoke 7 | // their special @render function instead of render in create-component.js 8 | export function postTransformComponent ( 9 | el: ASTElement, 10 | options: WeexCompilerOptions 11 | ) { 12 | // $flow-disable-line (we know isReservedTag is there) 13 | if (!options.isReservedTag(el.tag) && el.tag !== 'cell-slot') { 14 | addAttr(el, RECYCLE_LIST_MARKER, 'true') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | function genText (node: ASTNode) { 6 | const value = node.type === 3 7 | ? node.text 8 | : node.type === 2 9 | ? node.tokens.length === 1 10 | ? node.tokens[0] 11 | : node.tokens 12 | : '' 13 | return JSON.stringify(value) 14 | } 15 | 16 | export function postTransformText (el: ASTElement) { 17 | // weex can only contain text, so the parser 18 | // always generates a single child. 19 | if (el.children.length) { 20 | addAttr(el, 'value', genText(el.children[0])) 21 | el.children = [] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { camelize } from 'shared/util' 4 | import { generateBinding } from 'weex/util/parser' 5 | import { bindRE } from 'compiler/parser/index' 6 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 7 | 8 | function parseAttrName (name: string): string { 9 | return camelize(name.replace(bindRE, '')) 10 | } 11 | 12 | export function preTransformVBind (el: ASTElement) { 13 | for (const attr in el.attrsMap) { 14 | if (bindRE.test(attr)) { 15 | const name: string = parseAttrName(attr) 16 | const value = generateBinding(getAndRemoveAttr(el, attr)) 17 | delete el.attrsMap[attr] 18 | addRawAttr(el, name, value) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-for.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parseFor } from 'compiler/parser/index' 4 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 5 | 6 | export function preTransformVFor (el: ASTElement, options: WeexCompilerOptions) { 7 | const exp = getAndRemoveAttr(el, 'v-for') 8 | if (!exp) { 9 | return 10 | } 11 | 12 | const res = parseFor(exp) 13 | if (!res) { 14 | if (process.env.NODE_ENV !== 'production' && options.warn) { 15 | options.warn(`Invalid v-for expression: ${exp}`) 16 | } 17 | return 18 | } 19 | 20 | const desc: Object = { 21 | '@expression': res.for, 22 | '@alias': res.alias 23 | } 24 | if (res.iterator2) { 25 | desc['@key'] = res.iterator1 26 | desc['@index'] = res.iterator2 27 | } else { 28 | desc['@index'] = res.iterator1 29 | } 30 | 31 | delete el.attrsMap['v-for'] 32 | addRawAttr(el, '[[repeat]]', desc) 33 | } 34 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const inlineStatementRE = /^\s*([A-Za-z_$0-9\['\."\]]+)*\s*\(\s*(([A-Za-z_$0-9\['\."\]]+)?(\s*,\s*([A-Za-z_$0-9\['\."\]]+))*)\s*\)$/ 4 | 5 | function parseHandlerParams (handler: ASTElementHandler) { 6 | const res = inlineStatementRE.exec(handler.value) 7 | if (res && res[2]) { 8 | handler.params = res[2].split(/\s*,\s*/) 9 | } 10 | } 11 | 12 | export function postTransformVOn (el: ASTElement) { 13 | const events: ASTElementHandlers | void = el.events 14 | if (!events) { 15 | return 16 | } 17 | for (const name in events) { 18 | const handler: ASTElementHandler | Array = events[name] 19 | if (Array.isArray(handler)) { 20 | handler.map(fn => parseHandlerParams(fn)) 21 | } else { 22 | parseHandlerParams(handler) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-once.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 4 | 5 | function containVOnce (el: ASTElement): boolean { 6 | for (const attr in el.attrsMap) { 7 | if (/^v\-once$/i.test(attr)) { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | export function preTransformVOnce (el: ASTElement) { 15 | if (containVOnce(el)) { 16 | getAndRemoveAttr(el, 'v-once', true) 17 | addRawAttr(el, '[[once]]', true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/entry-compiler.js: -------------------------------------------------------------------------------- 1 | export { compile } from 'weex/compiler/index' 2 | export { generateCodeFrame } from 'compiler/codeframe' 3 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/entry-runtime-factory.js: -------------------------------------------------------------------------------- 1 | // this entry is built and wrapped with a factory function 2 | // used to generate a fresh copy of Vue for every Weex instance. 3 | 4 | import Vue from './runtime/index' 5 | 6 | exports.Vue = Vue 7 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Richtext from './richtext' 2 | import Transition from './transition' 3 | import TransitionGroup from './transition-group' 4 | 5 | export default { 6 | Richtext, 7 | Transition, 8 | TransitionGroup 9 | } 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/components/transition.js: -------------------------------------------------------------------------------- 1 | // reuse same transition component logic from web 2 | export { 3 | transitionProps, 4 | extractTransitionData 5 | } from 'web/runtime/components/transition' 6 | 7 | import Transition from 'web/runtime/components/transition' 8 | 9 | export default Transition 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | } 3 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import style from './style' 5 | import transition from './transition' 6 | 7 | export default [ 8 | attrs, 9 | klass, 10 | events, 11 | style, 12 | transition 13 | ] 14 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'weex/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'weex/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ 13 | nodeOps, 14 | modules, 15 | LONG_LIST_THRESHOLD: 10 16 | }) 17 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/platforms/weex/runtime/text-node.js: -------------------------------------------------------------------------------- 1 | let latestNodeId = 1 2 | 3 | export default function TextNode (text) { 4 | this.instanceId = '' 5 | this.nodeId = latestNodeId++ 6 | this.parentNode = null 7 | this.nodeType = 3 8 | this.text = text 9 | } 10 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/server/optimizing-compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from 'compiler/parser/index' 4 | import { generate } from './codegen' 5 | import { optimize } from './optimizer' 6 | import { createCompilerCreator } from 'compiler/create-compiler' 7 | 8 | export const createCompiler = createCompilerCreator(function baseCompile ( 9 | template: string, 10 | options: CompilerOptions 11 | ): CompiledResult { 12 | const ast = parse(template.trim(), options) 13 | optimize(ast, options) 14 | const code = generate(ast, options) 15 | return { 16 | ast, 17 | render: code.render, 18 | staticRenderFns: code.staticRenderFns 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/server/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file) 4 | 5 | export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file) 6 | 7 | export function createPromiseCallback () { 8 | let resolve, reject 9 | const promise: Promise = new Promise((_resolve, _reject) => { 10 | resolve = _resolve 11 | reject = _reject 12 | }) 13 | const cb = (err: Error, res?: string) => { 14 | if (err) return reject(err) 15 | resolve(res || '') 16 | } 17 | return { promise, cb } 18 | } 19 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const SSR_ATTR = 'data-server-rendered' 2 | 3 | export const ASSET_TYPES = [ 4 | 'component', 5 | 'directive', 6 | 'filter' 7 | ] 8 | 9 | export const LIFECYCLE_HOOKS = [ 10 | 'beforeCreate', 11 | 'created', 12 | 'beforeMount', 13 | 'mounted', 14 | 'beforeUpdate', 15 | 'updated', 16 | 'beforeDestroy', 17 | 'destroyed', 18 | 'activated', 19 | 'deactivated', 20 | 'errorCaptured', 21 | 'serverPrefetch' 22 | ] 23 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | 3 | export default Vue; 4 | 5 | export as namespace Vue; 6 | 7 | export { 8 | CreateElement, 9 | VueConstructor 10 | } from "./vue"; 11 | 12 | export { 13 | Component, 14 | AsyncComponent, 15 | ComponentOptions, 16 | FunctionalComponentOptions, 17 | RenderContext, 18 | PropType, 19 | PropOptions, 20 | ComputedOptions, 21 | WatchHandler, 22 | WatchOptions, 23 | WatchOptionsWithHandler, 24 | DirectiveFunction, 25 | DirectiveOptions 26 | } from "./options"; 27 | 28 | export { 29 | PluginFunction, 30 | PluginObject 31 | } from "./plugin"; 32 | 33 | export { 34 | VNodeChildren, 35 | VNodeChildrenArrayContents, 36 | VNode, 37 | VNodeComponentOptions, 38 | VNodeData, 39 | VNodeDirective 40 | } from "./vnode"; 41 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/node_modules/vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/META-INF/resources/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "dependencies": { 4 | "director": "^1.2.0", 5 | "vue": "^2.1.8", 6 | "vue-axios": "^2.1.4", 7 | "todomvc-common": "^1.0.1", 8 | "todomvc-app-css": "^2.0.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.datasource.url=jdbc:postgresql:rest-crud 4 | quarkus.datasource.driver=org.postgresql.Driver 5 | quarkus.datasource.username=restcrud 6 | quarkus.datasource.password=restcrud 7 | quarkus.datasource.max-size=8 8 | quarkus.datasource.min-size=2 9 | quarkus.hibernate-orm.database.generation=drop-and-create 10 | quarkus.hibernate-orm.log.sql=true -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/import.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Introduction to Quarkus', true, 0, null) 2 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Hibernate with Panache', false, 1, null) 3 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Visit Quarkus web site', false, 2, 'https://quarkus.io') 4 | INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Star Quarkus project', false, 3, 'https://github.com/quarkusio/quarkus/') 5 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/src/main/resources/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /Q08-ops/todo-backend-metrics/start-database.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 \ 3 | --name postgres-quarkus-rest-http-crud -e POSTGRES_USER=restcrud \ 4 | -e POSTGRES_PASSWORD=restcrud -e POSTGRES_DB=rest-crud \ 5 | -p 5432:5432 postgres:10.5 6 | --------------------------------------------------------------------------------