├── .nvmrc ├── reasonml-postgres.opam ├── .dockerignore ├── dune ├── dune-project ├── executable ├── ReasonmlPostgresApp.re └── dune ├── library ├── Util.re ├── Loggers.re ├── dune ├── Config.rei ├── Database.rei ├── Server.re ├── Config.re ├── Reddit.re ├── Client.re ├── Database.re └── Schema.re ├── testExe ├── RunReasonmlPostgresTests.re └── dune ├── esy.lock ├── opam │ ├── seq.base │ │ ├── files │ │ │ ├── seq.install │ │ │ └── META.seq │ │ └── opam │ ├── ocamlfind.1.8.1 │ │ ├── files │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── conf-gmp.1 │ │ ├── files │ │ │ └── test.c │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── base-bigarray.base │ │ └── opam │ ├── base-threads.base │ │ └── opam │ ├── base-bytes.base │ │ └── opam │ ├── mirage-no-xen.1 │ │ └── opam │ ├── mirage-no-solo5.1 │ │ └── opam │ ├── jbuilder.transition │ │ └── opam │ ├── conf-perl.1 │ │ └── opam │ ├── cpuid.0.1.2 │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── lwt_log.1.1.1 │ │ └── opam │ ├── mmap.1.1.0 │ │ └── opam │ ├── ppx_derivers.1.2.1 │ │ └── opam │ ├── lwt_ppx.1.2.2 │ │ └── opam │ ├── lwt_react.1.1.2 │ │ └── opam │ ├── result.1.4 │ │ └── opam │ ├── ssl.0.5.9 │ │ └── opam │ ├── lwt_ssl.1.1.3 │ │ └── opam │ ├── atdgen-runtime.2.0.0 │ │ └── opam │ ├── ocaml-compiler-libs.v0.12.0 │ │ └── opam │ ├── conf-openssl.1 │ │ ├── files │ │ │ └── osx-build.sh │ │ └── opam │ ├── graphql_parser.0.12.2 │ │ └── opam │ ├── charInfo_width.1.1.0 │ │ └── opam │ ├── ocb-stubblr.0.1.1-1 │ │ ├── files │ │ │ ├── custom-cclib.patch │ │ │ └── use-OPAM_SWITCH_PREFIX.patch │ │ └── opam │ ├── stdio.v0.12.0 │ │ └── opam │ ├── ppx_sexp_conv.v0.12.0 │ │ └── opam │ ├── stdlib-shims.0.1.0 │ │ └── opam │ ├── caqti-driver-postgresql.1.1.0 │ │ └── opam │ ├── junit.2.0.1 │ │ └── opam │ ├── num.1.2 │ │ ├── opam │ │ └── files │ │ │ └── installation-warning.patch │ ├── sexplib0.v0.12.0 │ │ └── opam │ ├── ppx_fields_conv.v0.12.0 │ │ └── opam │ ├── ppx_tools_versioned.5.2.3 │ │ └── opam │ ├── caqti-lwt.1.0.0 │ │ └── opam │ ├── conduit-lwt.1.5.0 │ │ └── opam │ ├── menhir.20190626 │ │ └── opam │ ├── sexplib.v0.12.0 │ │ └── opam │ ├── atd.2.0.0 │ │ └── opam │ ├── conf-postgresql.1 │ │ └── opam │ ├── stringext.1.6.0 │ │ └── opam │ ├── fieldslib.v0.12.0 │ │ └── opam │ ├── merlin-extend.0.5 │ │ └── opam │ ├── uri-sexp.3.0.0 │ │ └── opam │ ├── base64.3.2.0 │ │ └── opam │ ├── ocamlbuild.0.14.0 │ │ └── opam │ ├── uchar.0.0.2 │ │ └── opam │ ├── re.1.9.0 │ │ └── opam │ ├── conduit-lwt-unix.1.5.0 │ │ └── opam │ ├── rresult.0.6.0 │ │ └── opam │ ├── ipaddr-sexp.4.0.0 │ │ └── opam │ ├── utop.2.4.1 │ │ └── opam │ ├── containers.2.6 │ │ └── opam │ ├── react.1.2.1 │ │ └── opam │ ├── cppo.1.6.6 │ │ └── opam │ ├── cstruct.3.3.0 │ │ └── opam │ ├── eqaf.0.5 │ │ └── opam │ ├── zed.2.0.3 │ │ └── opam │ ├── postgresql.4.5.0 │ │ └── opam │ ├── uri.3.0.0 │ │ └── opam │ ├── camomile.1.0.2 │ │ └── opam │ ├── yojson.1.7.0 │ │ └── opam │ ├── jsonm.1.0.1 │ │ └── opam │ ├── crunch.3.0.0 │ │ └── opam │ ├── lambda-term.2.0.2 │ │ └── opam │ ├── base.v0.12.2 │ │ └── opam │ ├── ocaml-migrate-parsetree.1.4.0 │ │ └── opam │ ├── atdgen.2.0.0 │ │ └── opam │ ├── macaddr.4.0.0 │ │ └── opam │ ├── domain-name.0.3.0 │ │ └── opam │ ├── conf-pkg-config.1.1 │ │ └── opam │ ├── astring.0.8.3 │ │ └── opam │ ├── tyxml.4.3.0 │ │ └── opam │ ├── uutf.1.0.2 │ │ └── opam │ ├── decoders.0.2.0 │ │ └── opam │ ├── zarith.1.7 │ │ └── opam │ ├── fmt.0.8.6 │ │ └── opam │ ├── cmdliner.1.0.4 │ │ └── opam │ ├── magic-mime.1.1.2 │ │ └── opam │ ├── ocplib-endian.1.0 │ │ └── opam │ ├── decoders-yojson.0.2.0 │ │ └── opam │ ├── ppxlib.0.5.0 │ │ └── opam │ ├── lwt.4.2.1 │ │ └── opam │ ├── parsexp.v0.12.0 │ │ └── opam │ ├── ptime.0.8.5 │ │ └── opam │ ├── cohttp-lwt.2.2.0 │ │ └── opam │ ├── cohttp-lwt-unix.2.2.0 │ │ └── opam │ ├── easy-format.1.3.2 │ │ └── opam │ ├── biniou.1.2.1 │ │ └── opam │ ├── digestif.0.7.3 │ │ └── opam │ ├── caqti.1.1.0 │ │ └── opam │ ├── topkg.1.0.1 │ │ └── opam │ ├── dune.1.11.1 │ │ └── opam │ ├── conduit.1.5.0 │ │ └── opam │ ├── cohttp.2.2.0 │ │ └── opam │ ├── ipaddr.4.0.0 │ │ └── opam │ ├── logs.0.7.0 │ │ └── opam │ └── merlin.3.3.2 │ │ └── opam ├── overrides │ ├── 186b93889ee6682b3910ff6984313567 │ │ ├── .gitignore │ │ ├── test │ │ │ ├── test.c │ │ │ └── package.json │ │ └── package.json │ ├── opam__s__dune_opam__c__1.11.1_opam_override │ │ └── package.json │ ├── opam__s__conf_pkg_config_opam__c__1.1_opam_override │ │ └── package.json │ ├── opam__s__ocb_stubblr_opam__c__0.1.1_1_opam_override │ │ ├── package.json │ │ └── files │ │ │ ├── customer-cclib.patch │ │ │ ├── use-OPAM_SWITCH_PREFIX.patch │ │ │ └── ocb-stubblr-0.1.1.patch │ ├── opam__s__conf_gmp_opam__c__1_opam_override │ │ └── package.json │ ├── opam__s__num_opam__c__1.2_opam_override │ │ └── package.json │ ├── opam__s__ocplib_endian_opam__c__1.0_opam_override │ │ ├── files │ │ │ ├── esy-fix.patch │ │ │ └── ocplib-endian-0.8.patch │ │ └── package.json │ ├── opam__s__zarith_opam__c__1.7_opam_override │ │ ├── package.json │ │ └── files │ │ │ └── Zarith-release-1.7.patch │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ │ └── package.json │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ │ └── package.json ├── .gitignore └── .gitattributes ├── integrationExe ├── RunReasonmlPostgresIntegrations.re └── dune ├── integration ├── dune ├── IntegrationFramework.re └── IntegrationReasonmlPostgres.re ├── test ├── dune ├── TestFramework.re ├── Utils.re ├── Factory.re ├── DatabaseTest.re └── ConfigTest.re ├── .gitignore ├── Dockerfile ├── README.md ├── reasonml-postgres-deployment.yaml ├── .github └── workflows │ └── workflow.yml ├── scripts └── sendIntrospectionQuery.js ├── package.json └── graphql_schema.json /.nvmrc: -------------------------------------------------------------------------------- 1 | 10.15.3 2 | -------------------------------------------------------------------------------- /reasonml-postgres.opam: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | _esy 2 | _release 3 | -------------------------------------------------------------------------------- /dune: -------------------------------------------------------------------------------- 1 | (ignored_subdirs (node_modules)) -------------------------------------------------------------------------------- /dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.2) 2 | (name reasonml-postgres) 3 | -------------------------------------------------------------------------------- /executable/ReasonmlPostgresApp.re: -------------------------------------------------------------------------------- 1 | Library.Server.start(); 2 | -------------------------------------------------------------------------------- /library/Util.re: -------------------------------------------------------------------------------- 1 | let foo = () => print_endline("Hello"); 2 | -------------------------------------------------------------------------------- /testExe/RunReasonmlPostgresTests.re: -------------------------------------------------------------------------------- 1 | Test.TestFramework.cli(); 2 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.base/files/seq.install: -------------------------------------------------------------------------------- 1 | lib:[ 2 | "META.seq" {"META"} 3 | ] 4 | -------------------------------------------------------------------------------- /esy.lock/overrides/186b93889ee6682b3910ff6984313567/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | _esy 3 | *~ -------------------------------------------------------------------------------- /integrationExe/RunReasonmlPostgresIntegrations.re: -------------------------------------------------------------------------------- 1 | Integration.IntegrationFramework.cli(); 2 | -------------------------------------------------------------------------------- /esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf linguist-generated 4 | -------------------------------------------------------------------------------- /executable/dune: -------------------------------------------------------------------------------- 1 | (executable (name ReasonmlPostgresApp) (public_name ReasonmlPostgresApp.exe) 2 | (libraries reasonml-postgres.library)) -------------------------------------------------------------------------------- /testExe/dune: -------------------------------------------------------------------------------- 1 | (executable (name RunReasonmlPostgresTests) 2 | (public_name RunReasonmlPostgresTests.exe) 3 | (libraries reasonml-postgres.test)) -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /integration/dune: -------------------------------------------------------------------------------- 1 | (library (name Integration) (public_name reasonml-postgres.integration) 2 | (libraries reasonml-postgres.library rely.lib) (flags -linkall -g)) -------------------------------------------------------------------------------- /esy.lock/opam/conf-gmp.1/files/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #ifndef __GMP_H__ 3 | #error "No GMP header" 4 | #endif 5 | 6 | void test(void) { 7 | __gmp_init(); 8 | } 9 | -------------------------------------------------------------------------------- /integrationExe/dune: -------------------------------------------------------------------------------- 1 | (executable (name RunReasonmlPostgresIntegrations) 2 | (public_name RunReasonmlPostgresIntegrations.exe) 3 | (libraries reasonml-postgres.integration)) -------------------------------------------------------------------------------- /library/Loggers.re: -------------------------------------------------------------------------------- 1 | let setup = (~level=Logs.Info, ()) => { 2 | Fmt_tty.setup_std_outputs(); 3 | Logs.set_level(Some(level)); 4 | Logs.set_reporter(Logs_fmt.reporter()); 5 | }; 6 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.base/files/META.seq: -------------------------------------------------------------------------------- 1 | name="seq" 2 | version="[distributed with OCaml 4.07 or above]" 3 | description="dummy backward-compatibility package for iterators" 4 | requires="" 5 | -------------------------------------------------------------------------------- /test/dune: -------------------------------------------------------------------------------- 1 | (library (name Test) (public_name reasonml-postgres.test) 2 | (libraries reasonml-postgres.library rely.lib) (flags -linkall -g) 3 | (preprocess (pps lwt_ppx graphql_ppx))) -------------------------------------------------------------------------------- /test/TestFramework.re: -------------------------------------------------------------------------------- 1 | include Rely.Make({ 2 | let config = 3 | Rely.TestFrameworkConfig.initialize({ 4 | snapshotDir: "test/_snapshots", 5 | projectDir: "", 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /integration/IntegrationFramework.re: -------------------------------------------------------------------------------- 1 | include Rely.Make({ 2 | let config = 3 | Rely.TestFrameworkConfig.initialize({ 4 | snapshotDir: "test/_snapshots", 5 | projectDir: "", 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /test/Utils.re: -------------------------------------------------------------------------------- 1 | open Lwt.Infix; 2 | 3 | module Database = { 4 | open Library.Database; 5 | 6 | let reset = () => 7 | rollback() >>= (_ => migrate()) >>= (_ => seed()) |> Lwt_main.run |> ignore; 8 | }; 9 | -------------------------------------------------------------------------------- /esy.lock/opam/base-bigarray.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Bigarray library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | .merlin 3 | yarn-error.log 4 | node_modules/ 5 | _build 6 | _release 7 | _esy/ 8 | reasonml-postgres.install 9 | .DS_Store 10 | *.install 11 | bootstrap 12 | .graphql_ppx_cache 13 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /esy.lock/opam/base-bytes.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: " " 3 | authors: " " 4 | homepage: " " 5 | depends: [ 6 | "ocaml" {>= "4.02.0"} 7 | "ocamlfind" {>= "1.5.3"} 8 | ] 9 | synopsis: "Bytes library distributed with the OCaml compiler" 10 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__dune_opam__c__1.11.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__conf_pkg_config_opam__c__1.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "pkg-config", 5 | "--help" 6 | ] 7 | ], 8 | "dependencies": { 9 | "yarn-pkg-config": "esy-ocaml/yarn-pkg-config#cca65f99674ed2d954d28788edeb8c57fada5ed0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /esy.lock/opam/mirage-no-xen.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "mirageos-devel@lists.xenproject.org" 3 | authors: ["mirageos-devel@lists.xenproject.org"] 4 | homepage: "https://mirage.io" 5 | license: "BSD2" 6 | conflicts: [ "mirage-xen" ] 7 | synopsis: "Virtual package conflicting with mirage-xen" 8 | depends: ["ocaml"] 9 | -------------------------------------------------------------------------------- /library/dune: -------------------------------------------------------------------------------- 1 | (library (name Library) (public_name reasonml-postgres.library) 2 | (libraries digestif.c cohttp-lwt-unix graphql graphql-lwt graphql-cohttp 3 | yojson logs.fmt fmt.tty decoders-yojson caqti caqti-lwt 4 | caqti-driver-postgresql jwt base64) 5 | (flags -w -32) (preprocess (pps lwt_ppx graphql_ppx))) -------------------------------------------------------------------------------- /esy.lock/opam/mirage-no-solo5.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "mirageos-devel@lists.xenproject.org" 3 | authors: ["mirageos-devel@lists.xenproject.org"] 4 | homepage: "https://mirage.io" 5 | license: "BSD2" 6 | conflicts: [ "mirage-solo5" ] 7 | synopsis: "Virtual package conflicting with mirage-solo5" 8 | depends: ["ocaml"] 9 | -------------------------------------------------------------------------------- /library/Config.rei: -------------------------------------------------------------------------------- 1 | type values = {db_connection: string}; 2 | 3 | module type EnvironmentProvider = { 4 | let env: option(string); 5 | let db_connection: option(string); 6 | }; 7 | 8 | module type Environment = {let values: values;}; 9 | 10 | module Make: (E: EnvironmentProvider) => Environment; 11 | 12 | module Environment: {let values: values;}; 13 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocb_stubblr_opam__c__0.1.1_1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | "#{os == 'windows' ? 'patch --strip 1 --input ocb-stubblr-0.1.1.patch' : 'true'}", 4 | [ "ocaml", "pkg/pkg.ml", "build", "--pinned", "false", "--tests", "false" ] 5 | ], 6 | "dependencies": { 7 | "@esy-ocaml/fauxpam": "0.1.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/Factory.re: -------------------------------------------------------------------------------- 1 | module Environment = { 2 | open Library.Config; 3 | let make = (env: option(string), db_connection: option(string)) => { 4 | module TestEnvProvider: EnvironmentProvider = { 5 | let env = env; 6 | let db_connection = db_connection; 7 | }; 8 | 9 | module TestEnvironment = Make(TestEnvProvider); 10 | TestEnvironment.values; 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__conf_gmp_opam__c__1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "#{os == 'windows' ? 'x86_64-w64-mingw32-gcc' : 'cc'}", 5 | "-c", 6 | "${CFLAGS:--g}", 7 | "$CPPFLAGS", 8 | "$LDFLAGS", 9 | "test.c" 10 | ] 11 | ], 12 | "dependencies": { 13 | "esy-gmp": "esy-packages/esy-gmp#a945c56e10e02bde2d2c76f5debd13bcc461abbc" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /esy.lock/overrides/186b93889ee6682b3910ff6984313567/test/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() { 6 | mpz_t i, j, k; 7 | mpz_init_set_str (i, "1a", 16); 8 | mpz_init (j); 9 | mpz_init (k); 10 | mpz_sqrtrem (j, k, i); 11 | if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort(); 12 | printf("%s\n", "Works as expected"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__num_opam__c__1.2_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "make" 5 | ] 6 | ], 7 | "install": [ 8 | [ 9 | "make", 10 | "findlib-install" 11 | ] 12 | ], 13 | "exportedEnv": { 14 | "CAML_LD_LIBRARY_PATH": { 15 | "val": "#{self.install / 'lib' / 'num' : $CAML_LD_LIBRARY_PATH}", 16 | "scope": "global" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocplib_endian_opam__c__1.0_opam_override/files/esy-fix.patch: -------------------------------------------------------------------------------- 1 | --- ./setup.ml 2 | +++ ./setup.ml 3 | @@ -6331,9 +6331,7 @@ 4 | [ 5 | "-classic-display"; 6 | "-no-log"; 7 | - "-no-links"; 8 | - "-install-lib-dir"; 9 | - (Filename.concat (standard_library ()) "ocamlbuild") 10 | + "-no-links" 11 | ] 12 | else 13 | []; 14 | -------------------------------------------------------------------------------- /library/Database.rei: -------------------------------------------------------------------------------- 1 | module Link: { 2 | type t = { 3 | id: int, 4 | url: string, 5 | }; 6 | }; 7 | 8 | let migrate: unit => Lwt.t(result(unit, string)); 9 | let rollback: unit => Lwt.t(result(unit, string)); 10 | let seed: 11 | (~urls: list(string)=?, unit) => Lwt.t(list(Stdlib.result(unit, string))); 12 | 13 | let get_all_links: unit => Lwt.t(result(list(Link.t), string)); 14 | 15 | let get_tablenames: unit => Lwt.t(result(list(string), string)); 16 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: " " 3 | authors: " " 4 | homepage: " " 5 | depends: [ 6 | "ocaml" {>= "4.07.0"} 7 | ] 8 | dev-repo: "git+https://github.com/ocaml/ocaml.git" 9 | bug-reports: "https://caml.inria.fr/mantis/main_page.php" 10 | synopsis: 11 | "Compatibility package for OCaml's standard iterator type starting from 4.07." 12 | extra-files: [ 13 | ["seq.install" "md5=026b31e1df290373198373d5aaa26e42"] 14 | ["META.seq" "md5=b33c8a1a6c7ed797816ce27df4855107"] 15 | ] 16 | -------------------------------------------------------------------------------- /integration/IntegrationReasonmlPostgres.re: -------------------------------------------------------------------------------- 1 | open IntegrationFramework; 2 | 3 | describe("integration test suite", ({test, _}) => { 4 | test("get_subreddit should return posts", ({expect}) => { 5 | let result = 6 | Library.Client.get_subreddit(~name="reactjs") |> Lwt_main.run; 7 | 8 | expect.result(result).toBeOk(); 9 | }); 10 | 11 | test("get_links should return links", ({expect}) => { 12 | let result = Library.Client.get_links() |> Lwt_main.run; 13 | 14 | expect.result(result).toBeOk(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__zarith_opam__c__1.7_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < Zarith-release-1.7.patch' : 'true' }" 7 | ], 8 | "./configure", 9 | "make" 10 | ], 11 | "install": [ 12 | "make install" 13 | ], 14 | "exportedEnv": { 15 | "CAML_LD_LIBRARY_PATH": { 16 | "val": "#{self.lib / 'zarith' : $CAML_LD_LIBRARY_PATH}", 17 | "scope": "global" 18 | } 19 | }, 20 | "dependencies": { 21 | "@opam/conf-gmp": "*" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/overrides/186b93889ee6682b3910ff6984313567/test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esy-gmp-test", 3 | "description": "For manual testing only", 4 | "version": "0.1.0", 5 | "description": "GMP packaged for esy", 6 | "license": "MIT", 7 | "esy": { 8 | "buildsInSource": true, 9 | "build": [ 10 | "#{os == 'windows' ? 'x86_64-w64-mingw32-gcc': 'gcc'} $CFLAGS -o testinggmp test.c $LDFLAGS" 11 | ], 12 | "install": "cp testinggmp #{self.bin}" 13 | }, 14 | "dependencies": { 15 | "gmp": "esy-packages/esy-gmp#e2a8fab86e6ff2b26637b3249ee149d29b3430dd" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/DatabaseTest.re: -------------------------------------------------------------------------------- 1 | open TestFramework; 2 | open Library.Database; 3 | 4 | let {describe, describeSkip, describeOnly} = 5 | describeConfig 6 | |> withLifecycle(testLifecycle => 7 | testLifecycle 8 | |> beforeEach(Utils.Database.reset) 9 | |> afterAll(Utils.Database.reset) 10 | ) 11 | |> build; 12 | 13 | describe("Database", ({describe, test, _}) => { 14 | describe("rollback", ({test, _}) => { 15 | test("should drop the table", ({expect}) => { 16 | let result = rollback() |> Lwt_main.run; 17 | expect.result(result).toBeOk(); 18 | }) 19 | }) 20 | }); 21 | -------------------------------------------------------------------------------- /esy.lock/opam/jbuilder.transition/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: ["ocaml" "dune"] 9 | post-messages: [ 10 | "Jbuilder has been renamed and the jbuilder package is now a transition \ 11 | package. Use the dune package instead." 12 | ] 13 | synopsis: 14 | "This is a transition package, jbuilder is now named dune. Use the dune" 15 | description: "package instead." 16 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-perl.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "https://www.perl.org/" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | license: "GPL-1+" 6 | authors: "Larry Wall" 7 | build: [["perl" "--version"]] 8 | depexts: [ 9 | ["perl"] {os-family = "debian"} 10 | ["perl"] {os-distribution = "alpine"} 11 | ["perl"] {os-distribution = "nixos"} 12 | ["perl"] {os-distribution = "arch"} 13 | ["perl-Pod-Html"] {os-distribution = "fedora"} 14 | ] 15 | synopsis: "Virtual package relying on perl" 16 | description: 17 | "This package can only install if the perl program is installed on the system." 18 | flags: conf 19 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocplib_endian_opam__c__1.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocplib-endian-0.8.patch' : 'true'}" 7 | ], 8 | [ 9 | "bash", 10 | "-c", 11 | "#{os == 'windows' ? 'patch -p1 < esy-fix.patch' : 'true'}" 12 | ], 13 | [ 14 | "ocaml", 15 | "setup.ml", 16 | "-configure", 17 | "--disable-debug", 18 | "--prefix", 19 | "#{self.install}" 20 | ], 21 | [ 22 | "ocaml", 23 | "setup.ml", 24 | "-build" 25 | ] 26 | ], 27 | "install": [ 28 | [ 29 | "ocaml", 30 | "setup.ml", 31 | "-install" 32 | ] 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/cpuid.0.1.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "David Kaloper Meršinjak " 3 | authors: ["David Kaloper Meršinjak "] 4 | homepage: "https://github.com/pqwy/cpuid" 5 | doc: "https://pqwy.github.io/cpuid/doc" 6 | license: "ISC" 7 | dev-repo: "git+https://github.com/pqwy/cpuid.git" 8 | bug-reports: "https://github.com/pqwy/cpuid/issues" 9 | build: [ ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs ] 11 | ["dune" "runtest"] {with-test} ] 12 | depends: [ 13 | "ocaml" {>="4.03.0"} 14 | "dune" {>= "1.7"} 15 | ] 16 | synopsis: "Detect CPU features" 17 | description: "CPUID" 18 | url { 19 | src: 20 | "https://github.com/pqwy/cpuid/releases/download/v0.1.2/cpuid-v0.1.2.tbz" 21 | checksum: "md5=21079a17bcf6cfe92e2f706b9d0d6d8d" 22 | } 23 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt_log.1.1.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "Lwt logging library (deprecated)" 4 | 5 | version: "1.1.1" 6 | license: "LGPL" 7 | homepage: "https://github.com/ocsigen/lwt_log" 8 | doc: "https://github.com/ocsigen/lwt_log/blob/master/src/core/lwt_log_core.mli" 9 | bug-reports: "https://github.com/ocsigen/lwt_log/issues" 10 | 11 | authors: [ 12 | "Shawn Wagner" 13 | "Jérémie Dimino" 14 | ] 15 | maintainer: "Anton Bachin " 16 | dev-repo: "git+https://github.com/ocsigen/lwt_log.git" 17 | 18 | depends: [ 19 | "dune" {>= "1.0"} 20 | "lwt" {>= "4.0.0"} 21 | ] 22 | 23 | build: [ 24 | ["dune" "build" "-p" name "-j" jobs] 25 | ] 26 | 27 | url { 28 | src: "https://github.com/aantron/lwt_log/archive/1.1.1.tar.gz" 29 | checksum: "md5=02e93be62288037870ae5b1ce099fe59" 30 | } 31 | -------------------------------------------------------------------------------- /esy.lock/opam/mmap.1.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino " "Anton Bachin" ] 4 | homepage: "https://github.com/mirage/mmap" 5 | bug-reports: "https://github.com/mirage/mmap/issues" 6 | doc: "https://mirage.github.io/mmap/" 7 | dev-repo: "git+https://github.com/mirage/mmap.git" 8 | license: "LGPL 2.1 with linking exception" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.3"} 14 | "dune" {>= "1.6"} 15 | ] 16 | synopsis: "File mapping functionality" 17 | description: """ 18 | This project provides a Mmap.map_file functions for mapping files in memory. 19 | """ 20 | url { 21 | src: 22 | "https://github.com/mirage/mmap/releases/download/v1.1.0/mmap-v1.1.0.tbz" 23 | checksum: "md5=8c5d5fbc537296dc525867535fb878ba" 24 | } 25 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD3" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt_ppx.1.2.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "PPX syntax for Lwt, providing something similar to async/await from JavaScript" 4 | 5 | license: "MIT" 6 | homepage: "https://github.com/ocsigen/lwt" 7 | doc: "https://ocsigen.org/lwt/api/Ppx_lwt" 8 | bug-reports: "https://github.com/ocsigen/lwt/issues" 9 | 10 | authors: [ 11 | "Gabriel Radanne" 12 | ] 13 | maintainer: [ 14 | "Anton Bachin " 15 | ] 16 | dev-repo: "git+https://github.com/ocsigen/lwt.git" 17 | 18 | depends: [ 19 | "dune" 20 | "lwt" 21 | "ocaml" {>= "4.02.0"} 22 | "ocaml-migrate-parsetree" 23 | "ppx_tools_versioned" {>= "5.0.1"} 24 | ] 25 | 26 | build: [ 27 | ["dune" "build" "-p" name "-j" jobs] 28 | ] 29 | 30 | url { 31 | src: "https://github.com/ocsigen/lwt/archive/4.2.0.tar.gz" 32 | checksum: "md5=2ce7827948adc611319f9449e4519070" 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt_react.1.1.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "Helpers for using React with Lwt" 4 | 5 | license: "MIT" 6 | homepage: "https://github.com/ocsigen/lwt" 7 | doc: "https://ocsigen.org/lwt/api/Lwt_react" 8 | bug-reports: "https://github.com/ocsigen/lwt/issues" 9 | 10 | authors: [ 11 | "Jérémie Dimino" 12 | ] 13 | maintainer: [ 14 | "Anton Bachin " 15 | "Mauricio Fernandez " 16 | "Simon Cruanes " 17 | ] 18 | dev-repo: "git+https://github.com/ocsigen/lwt.git" 19 | 20 | depends: [ 21 | "dune" 22 | "lwt" {>= "3.0.0"} 23 | "ocaml" 24 | "react" {>= "1.0.0"} 25 | ] 26 | 27 | build: [ 28 | ["dune" "build" "-p" name "-j" jobs] 29 | ] 30 | 31 | url { 32 | src: "https://github.com/ocsigen/lwt/archive/4.2.0.tar.gz" 33 | checksum: "md5=2ce7827948adc611319f9449e4519070" 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD3" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /esy.lock/opam/ssl.0.5.9/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Samuel Mimram " 3 | homepage: "https://github.com/savonet/ocaml-ssl" 4 | dev-repo: "git+https://github.com/savonet/ocaml-ssl.git" 5 | bug-reports: "https://github.com/savonet/ocaml-ssl/issues" 6 | build: [ 7 | ["dune" "subst"] {pinned} 8 | ["dune" "build" "-p" name "-j" jobs] 9 | ] 10 | depends: [ 11 | "ocaml" {>= "4.02.0"} 12 | "dune" {>= "1.2.1"} 13 | "base-unix" 14 | "conf-openssl" 15 | ] 16 | synopsis: "Bindings for OpenSSL" 17 | authors: "Samuel Mimram " 18 | url { 19 | src: "https://github.com/savonet/ocaml-ssl/archive/0.5.9.tar.gz" 20 | checksum: [ 21 | "md5=09265ae2dee5ac48507ccb8a81244a15" 22 | "sha512=6826e5a6ab9f51013e8d097900f443d091e085e3d2d232a315a0e3a90ca334c9b9779d20dcae267f9ed961bc4a08fcb80372e669389c59a22d5c7706d37fcd5f" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt_ssl.1.1.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "OpenSSL binding with concurrent I/O" 4 | 5 | version: "1.1.3" 6 | license: "LGPL with OpenSSL linking exception" 7 | homepage: "https://github.com/ocsigen/lwt_ssl" 8 | doc: "https://github.com/ocsigen/lwt_ssl/blob/master/src/lwt_ssl.mli" 9 | bug-reports: "https://github.com/ocsigen/lwt_ssl/issues" 10 | 11 | authors: [ 12 | "Jérôme Vouillon" 13 | "Jérémie Dimino" 14 | ] 15 | maintainer: "Anton Bachin " 16 | dev-repo: "git+https://github.com/ocsigen/lwt_ssl.git" 17 | 18 | depends: [ 19 | "base-unix" 20 | "dune" 21 | "lwt" {>= "3.0.0"} 22 | "ocaml" 23 | "ssl" {>= "0.5.0"} 24 | ] 25 | 26 | build: [ 27 | ["dune" "build" "-p" name "-j" jobs] 28 | ] 29 | 30 | url { 31 | src: "https://github.com/ocsigen/lwt_ssl/archive/1.1.3.tar.gz" 32 | checksum: "md5=b18414b2ef71ededa07666dfc467f10a" 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/atdgen-runtime.2.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | 5 | homepage: "https://github.com/mjambon/atd" 6 | bug-reports: "https://github.com/mjambon/atd/issues" 7 | dev-repo: "git://github.com/mjambon/atd.git" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ] 13 | 14 | # Restore when https://github.com/mjambon/atd/issues/121 is resolved. 15 | # build-test: [ 16 | # ["jbuilder" "runtest" "-p" name] 17 | # ] 18 | 19 | depends: [ 20 | "ocaml" {>= "4.02.3"} 21 | "jbuilder" {build} 22 | "biniou" {>= "1.0.6"} 23 | "yojson" {>= "1.2.1"} 24 | ] 25 | synopsis: "Runtime library for code generated by atdgen." 26 | url { 27 | src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz" 28 | checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf" 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/ocaml-compiler-libs.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ocaml-compiler-libs" 5 | bug-reports: "https://github.com/janestreet/ocaml-compiler-libs/issues" 6 | dev-repo: "git+https://github.com/janestreet/ocaml-compiler-libs.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "dune" {>= "1.0"} 14 | ] 15 | synopsis: "OCaml compiler libraries repackaged" 16 | description: """ 17 | This packages exposes the OCaml compiler libraries repackages under 18 | the toplevel names Ocaml_common, Ocaml_bytecomp, ...""" 19 | url { 20 | src: 21 | "https://github.com/janestreet/ocaml-compiler-libs/archive/v0.12.0.tar.gz" 22 | checksum: "md5=3351925ed99be59829641d2044fc80c0" 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-openssl.1/files/osx-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Try just executing pkg-config openssl before looking 4 | # explicitly for Nix -> Homebrew -> MacPorts. 5 | # This handles the case where the user has set 6 | # PKG_CONFIG_PATH themselves. 7 | res=$(pkg-config openssl) 8 | if [ $? -eq 0 ]; then 9 | echo $res 10 | exit 0 11 | fi 12 | 13 | if [ -e "$HOME/.nix-profile/lib/pkgconfig/openssl.pc" ]; then 14 | # Nix on macOS 15 | res=$(env PKG_CONFIG_PATH=$HOME/.nix-profile/lib/pkgconfig pkg-config openssl) 16 | if [ $? -eq 0 ]; then 17 | echo $res 18 | exit 0 19 | fi 20 | fi 21 | 22 | if [ -e "/usr/local/opt/openssl/lib/pkgconfig/openssl.pc" ]; then 23 | # Homebrew 24 | res=$(env PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig pkg-config openssl) 25 | if [ $? -eq 0 ]; then 26 | echo $res 27 | exit 0 28 | fi 29 | fi 30 | 31 | # MacPorts 32 | PKG_CONFIG_PATH=/opt/local/lib/pkgconfig pkg-config openssl 33 | -------------------------------------------------------------------------------- /library/Server.re: -------------------------------------------------------------------------------- 1 | Loggers.setup(); 2 | 3 | module Graphql_cohttp_lwt = 4 | Graphql_cohttp.Make( 5 | Graphql_lwt.Schema, 6 | Cohttp_lwt_unix.IO, 7 | Cohttp_lwt.Body, 8 | ); 9 | 10 | let start = () => { 11 | let on_exn = 12 | fun 13 | | [@implicit_arity] Unix.Unix_error(error, func, arg) => 14 | Logs.warn(m => 15 | m( 16 | "Client connection error %s: %s(%S)", 17 | Unix.error_message(error), 18 | func, 19 | arg, 20 | ) 21 | ) 22 | | exn => Logs.err(m => m("Unhandled exception: %a", Fmt.exn, exn)); 23 | 24 | let callback = Graphql_cohttp_lwt.make_callback(_req => (), Schema.schema); 25 | 26 | let port = 8080; 27 | let server = Cohttp_lwt_unix.Server.make_response_action(~callback, ()); 28 | let mode = `TCP(`Port(port)); 29 | 30 | Logs.info(m => m("Starting server on port: %d", port)); 31 | Cohttp_lwt_unix.Server.create(~on_exn, ~mode, server) |> Lwt_main.run; 32 | }; 33 | -------------------------------------------------------------------------------- /esy.lock/opam/graphql_parser.0.12.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Andreas Garnaes " 3 | authors: "Andreas Garnaes " 4 | homepage: "https://github.com/andreas/ocaml-graphql-server" 5 | doc: "https://andreas.github.io/ocaml-graphql-server/" 6 | bug-reports: "https://github.com/andreas/ocaml-graphql-server/issues" 7 | dev-repo: "git+https://github.com/andreas/ocaml-graphql-server.git" 8 | 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 12 | ] 13 | 14 | depends: [ 15 | "ocaml" {>= "4.03.0"} 16 | "dune" 17 | "menhir" {build} 18 | "alcotest" {with-test & >= "0.8.1"} 19 | "fmt" {< "0.8.7"} 20 | "re" {>= "1.5.0"} 21 | ] 22 | 23 | synopsis: "Library for parsing GraphQL queries" 24 | 25 | url { 26 | archive: "https://github.com/andreas/ocaml-graphql-server/releases/download/0.12.2/graphql-0.12.2.tbz" 27 | checksum: "d7c79e9527a57051b40c005c36cf236f" 28 | } 29 | -------------------------------------------------------------------------------- /esy.lock/opam/charInfo_width.1.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "zandoye@gmail.com" 3 | authors: [ "ZAN DoYe" ] 4 | homepage: "https://bitbucket.org/zandoye/charinfo_width/" 5 | bug-reports: "https://bitbucket.org/zandoye/charinfo_width/issues" 6 | license: "MIT" 7 | dev-repo: "hg+https://bitbucket.org/zandoye/charinfo_width" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ["dune" "runtest" "-p" name "-j" jobs] {with-test & (ocaml:version >= "4.04.0")} 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.3"} 14 | "result" 15 | "camomile" {>= "1.0.0" & < "2.0~"} 16 | "dune" 17 | "ppx_expect" {with-test & < "v0.13"} 18 | ] 19 | 20 | synopsis: "Determine column width for a character" 21 | description: """ 22 | This module is implemented purely in OCaml and the width function follows the prototype of POSIX's wcwidth.""" 23 | 24 | url { 25 | src:"https://bitbucket.org/zandoye/charinfo_width/get/1.1.0.tar.gz" 26 | checksum: "md5=c4ab038e06f06a29692c05fdd7c268c5" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/ocb-stubblr.0.1.1-1/files/custom-cclib.patch: -------------------------------------------------------------------------------- 1 | From d51b3f3a49f159469e00d23524db915f19bb0127 Mon Sep 17 00:00:00 2001 2 | From: Hannes Mehnert 3 | Date: Tue, 3 Oct 2017 13:55:16 +0100 4 | Subject: [PATCH] bytecode / custom needs -cclib as well 5 | 6 | --- 7 | src/ocb_stubblr.ml | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/src/ocb_stubblr.ml b/src/ocb_stubblr.ml 11 | index b68c37a..a0ee035 100644 12 | --- a/src/ocb_stubblr.ml 13 | +++ b/src/ocb_stubblr.ml 14 | @@ -160,7 +160,7 @@ let link_flag () = 15 | S [A switch; A ("-l"^name)] 16 | and dep flag = Pathname.([remove_extension flag -.- "a"]) in 17 | pflag ["link"; "ocaml"; "library"; "byte"] tag (libarg "-dllib"); 18 | - pflag ["link"; "ocaml"; "library"; "native"] tag (libarg "-cclib"); 19 | + pflag ["link"; "ocaml"; "library"] tag (libarg "-cclib"); 20 | pdep ["link"; "ocaml"] tag dep; 21 | pdep ["compile"; "ocaml"] tag dep 22 | (* XXX sneak in '-I' for compile;ocaml;program ?? *) 23 | -------------------------------------------------------------------------------- /esy.lock/opam/stdio.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/stdio" 5 | bug-reports: "https://github.com/janestreet/stdio/issues" 6 | dev-repo: "git+https://github.com/janestreet/stdio.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/stdio/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "base" {>= "v0.12" & < "v0.13"} 15 | "dune" {>= "1.5.1"} 16 | ] 17 | synopsis: "Standard IO library for OCaml" 18 | description: " 19 | Stdio implements simple input/output functionalities for OCaml. 20 | 21 | It re-exports the input/output functions of the OCaml standard 22 | libraries using a more consistent API. 23 | " 24 | url { 25 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/stdio-v0.12.0.tar.gz" 26 | checksum: "md5=b261ff2d5667fde960c95e50cff668da" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocb_stubblr_opam__c__0.1.1_1_opam_override/files/customer-cclib.patch: -------------------------------------------------------------------------------- 1 | From d51b3f3a49f159469e00d23524db915f19bb0127 Mon Sep 17 00:00:00 2001 2 | From: Hannes Mehnert 3 | Date: Tue, 3 Oct 2017 13:55:16 +0100 4 | Subject: [PATCH] bytecode / custom needs -cclib as well 5 | 6 | --- 7 | src/ocb_stubblr.ml | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/src/ocb_stubblr.ml b/src/ocb_stubblr.ml 11 | index b68c37a..a0ee035 100644 12 | --- a/src/ocb_stubblr.ml 13 | +++ b/src/ocb_stubblr.ml 14 | @@ -160,7 +160,7 @@ let link_flag () = 15 | S [A switch; A ("-l"^name)] 16 | and dep flag = Pathname.([remove_extension flag -.- "a"]) in 17 | pflag ["link"; "ocaml"; "library"; "byte"] tag (libarg "-dllib"); 18 | - pflag ["link"; "ocaml"; "library"; "native"] tag (libarg "-cclib"); 19 | + pflag ["link"; "ocaml"; "library"] tag (libarg "-cclib"); 20 | pdep ["link"; "ocaml"] tag dep; 21 | pdep ["compile"; "ocaml"] tag dep 22 | (* XXX sneak in '-I' for compile;ocaml;program ?? *) 23 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_sexp_conv.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ppx_sexp_conv" 5 | bug-reports: "https://github.com/janestreet/ppx_sexp_conv/issues" 6 | dev-repo: "git+https://github.com/janestreet/ppx_sexp_conv.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_sexp_conv/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "base" {>= "v0.12" & < "v0.13"} 15 | "sexplib0" {>= "v0.12" & < "v0.13"} 16 | "dune" {>= "1.5.1"} 17 | "ppxlib" {>= "0.5.0" & < "0.9.0"} 18 | ] 19 | synopsis: "[@@deriving] plugin to generate S-expression conversion functions" 20 | description: " 21 | Part of the Jane Street's PPX rewriters collection. 22 | " 23 | url { 24 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/ppx_sexp_conv-v0.12.0.tar.gz" 25 | checksum: "md5=648ac430b4a74c2297705d260b66778f" 26 | } 27 | -------------------------------------------------------------------------------- /esy.lock/opam/stdlib-shims.0.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "The stdlib-shims programmers" 3 | authors: "The stdlib-shims programmers" 4 | homepage: "https://github.com/ocaml/stdlib-shims" 5 | doc: "https://ocaml.github.io/stdlib-shims/" 6 | dev-repo: "git+https://github.com/ocaml/stdlib-shims.git" 7 | bug-reports: "https://github.com/ocaml/stdlib-shims/issues" 8 | tags: ["stdlib" "compatibility" "org:ocaml"] 9 | license: ["typeof OCaml system"] 10 | depends: [ 11 | "dune" 12 | "ocaml" {>= "4.02.3"} 13 | ] 14 | build: [ "dune" "build" "-p" name "-j" jobs ] 15 | synopsis: "Backport some of the new stdlib features to older compiler" 16 | description: """ 17 | Backport some of the new stdlib features to older compiler, 18 | such as the Stdlib module. 19 | 20 | This allows projects that require compatibility with older compiler to 21 | use these new features in their code. 22 | """ 23 | url { 24 | src: 25 | "https://github.com/ocaml/stdlib-shims/releases/download/0.1.0/stdlib-shims-0.1.0.tbz" 26 | checksum: "md5=12b5704eed70c6bff5ac39a16db1425d" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/caqti-driver-postgresql.1.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "caqti-driver-postgresql" 3 | maintainer: "Petter A. Urkedal " 4 | authors: "Petter A. Urkedal " 5 | license: "LGPL-3 with OCaml linking exception" 6 | homepage: "https://github.com/paurkedal/ocaml-caqti/" 7 | doc: "http://paurkedal.github.io/ocaml-caqti/index.html" 8 | bug-reports: "https://github.com/paurkedal/ocaml-caqti/issues" 9 | depends: [ 10 | "ocaml" 11 | "caqti" {>= "1.1.0" & < "1.2.0~"} 12 | "dune" 13 | "postgresql" 14 | ] 15 | build: [ 16 | ["dune" "build" "-p" name "-j" jobs] 17 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 18 | ] 19 | dev-repo: "git+https://github.com/paurkedal/ocaml-caqti.git" 20 | synopsis: "PostgreSQL driver for Caqti based on C bindings" 21 | url { 22 | src: 23 | "https://github.com/paurkedal/ocaml-caqti/releases/download/v1.1.0/caqti-v1.1.0.tbz" 24 | checksum: [ 25 | "md5=1dbae4092760be0813823a1936dec1c6" 26 | "sha256=9635da1efb377fc4477a573f8292d4afd781e20dae17e2da7250dc7fbfec5170" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /esy.lock/opam/junit.2.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Louis Roché " 3 | authors: "Louis Roché " 4 | homepage: "https://github.com/Khady/ocaml-junit" 5 | bug-reports: "https://github.com/Khady/ocaml-junit/issues" 6 | license: "LGPLv3+ with OCaml linking exception" 7 | dev-repo: "git+https://github.com/Khady/ocaml-junit.git" 8 | doc: "https://khady.github.io/ocaml-junit/" 9 | tags: ["junit" "jenkins"] 10 | depends: [ 11 | "dune" {>= "1.0"} 12 | "ptime" 13 | "tyxml" {>= "4.0.0"} 14 | "odoc" {with-doc & >= "1.1.1"} 15 | ] 16 | build: [ 17 | ["dune" "subst"] {pinned} 18 | ["dune" "build" "-p" name "-j" jobs] 19 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 20 | ["dune" "build" "-p" name "-j" jobs] {with-doc} 21 | ] 22 | name: "junit" 23 | synopsis: "JUnit XML reports generation library" 24 | description: "JUnit XML reports generation library" 25 | url { 26 | src: 27 | "https://github.com/Khady/ocaml-junit/releases/download/2.0.1/junit-2.0.1.tbz" 28 | checksum: "md5=40224fb3d4f5e47dc5ff4605587d383b" 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/num.1.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | version: "1.2" 3 | maintainer: "Xavier Leroy " 4 | authors: [ 5 | "Valérie Ménissier-Morain" 6 | "Pierre Weis" 7 | "Xavier Leroy" 8 | ] 9 | license: "LGPL 2.1 with OCaml linking exception" 10 | 11 | homepage: "https://github.com/ocaml/num/" 12 | bug-reports: "https://github.com/ocaml/num/issues" 13 | dev-repo: "git+https://github.com/ocaml/num.git" 14 | build: [ 15 | [make] 16 | ] 17 | install: [ 18 | make 19 | "install" {!ocaml:preinstalled} 20 | "findlib-install" {ocaml:preinstalled} 21 | ] 22 | depends: [ 23 | "ocaml" {>= "4.06.0"} 24 | "ocamlfind" {build & >= "1.7.3"} 25 | ] 26 | conflicts: [ "base-num" ] 27 | patches: [ "installation-warning.patch" ] 28 | synopsis: 29 | "The legacy Num library for arbitrary-precision integer and rational arithmetic" 30 | extra-files: [ 31 | ["installation-warning.patch" "md5=93c92bf6da6bae09d068da42b1bbaaac"] 32 | ] 33 | url { 34 | src: "https://github.com/ocaml/num/archive/v1.2.tar.gz" 35 | checksum: "md5=4f43ce8e44db68692bee50f2f8ef911c" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/sexplib0.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/sexplib0" 5 | bug-reports: "https://github.com/janestreet/sexplib0/issues" 6 | dev-repo: "git+https://github.com/janestreet/sexplib0.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexplib0/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "dune" {>= "1.5.1"} 15 | ] 16 | synopsis: "Library containing the definition of S-expressions and some base converters" 17 | description: " 18 | Part of Jane Street's Core library 19 | The Core suite of libraries is an industrial strength alternative to 20 | OCaml's standard library that was developed by Jane Street, the 21 | largest industrial user of OCaml. 22 | " 23 | url { 24 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/sexplib0-v0.12.0.tar.gz" 25 | checksum: "md5=2486a25d3a94da9a94acc018b5f09061" 26 | } 27 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-gmp.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "nbraud" 3 | homepage: "http://gmplib.org/" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | license: "GPL" 6 | build: [ 7 | ["sh" "-exc" "cc -c $CFLAGS -I/usr/local/include test.c"] {os != "macos"} 8 | [ 9 | "sh" 10 | "-exc" 11 | "cc -c $CFLAGS -I/opt/local/include -I/usr/local/include test.c" 12 | ] {os = "macos"} 13 | ] 14 | depexts: [ 15 | ["libgmp-dev"] {os-family = "debian"} 16 | ["gmp"] {os = "macos" & os-distribution = "homebrew"} 17 | ["gmp" "gmp-devel"] {os-distribution = "centos"} 18 | ["gmp" "gmp-devel"] {os-distribution = "fedora"} 19 | ["gmp"] {os = "openbsd"} 20 | ["gmp"] {os = "freebsd"} 21 | ["gmp-dev"] {os-distribution = "alpine"} 22 | ["gmp-devel"] {os-family = "suse"} 23 | ] 24 | synopsis: "Virtual package relying on a GMP lib system installation" 25 | description: 26 | "This package can only install if the GMP lib is installed on the system." 27 | authors: "nbraud" 28 | extra-files: ["test.c" "md5=ec8cc21ab709bdd57103de36e7b0b53f"] 29 | flags: conf 30 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_fields_conv.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ppx_fields_conv" 5 | bug-reports: "https://github.com/janestreet/ppx_fields_conv/issues" 6 | dev-repo: "git+https://github.com/janestreet/ppx_fields_conv.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_fields_conv/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "base" {>= "v0.12" & < "v0.13"} 15 | "fieldslib" {>= "v0.12" & < "v0.13"} 16 | "dune" {>= "1.5.1"} 17 | "ppxlib" {>= "0.5.0" & < "0.9.0"} 18 | ] 19 | synopsis: "Generation of accessor and iteration functions for ocaml records" 20 | description: " 21 | Part of the Jane Street's PPX rewriters collection. 22 | " 23 | url { 24 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/ppx_fields_conv-v0.12.0.tar.gz" 25 | checksum: "md5=5bdf701197abc0dd4145a489912e49aa" 26 | } 27 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_tools_versioned.5.2.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "frederic.bour@lakaban.net" 3 | authors: [ 4 | "Frédéric Bour " 5 | "Alain Frisch " 6 | ] 7 | license: "MIT" 8 | homepage: "https://github.com/ocaml-ppx/ppx_tools_versioned" 9 | bug-reports: "https://github.com/ocaml-ppx/ppx_tools_versioned/issues" 10 | dev-repo: "git://github.com/ocaml-ppx/ppx_tools_versioned.git" 11 | tags: [ "syntax" ] 12 | build: [ 13 | ["dune" "subst"] {pinned} 14 | ["dune" "build" "-p" name "-j" jobs] 15 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 16 | ] 17 | depends: [ 18 | "ocaml" {>= "4.02.0"} 19 | "dune" {>= "1.0"} 20 | "ocaml-migrate-parsetree" {>= "1.4.0"} 21 | ] 22 | synopsis: "A variant of ppx_tools based on ocaml-migrate-parsetree" 23 | url { 24 | src: 25 | "https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.3.tar.gz" 26 | checksum: [ 27 | "md5=b1455e5a4a1bcd9ddbfcf712ccbd4262" 28 | "sha512=af20aa0031b9c638537bcdb52c75de95f316ae8fd455a38672a60da5c7c6895cca9dbecd5d56a88c3c40979c6a673a047d986b5b41e1e84b528b7df5d905b9b1" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /esy.lock/opam/caqti-lwt.1.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Petter A. Urkedal " 3 | authors: "Petter A. Urkedal " 4 | license: "LGPL-3 with OCaml linking exception" 5 | homepage: "https://github.com/paurkedal/ocaml-caqti/" 6 | doc: "http://paurkedal.github.io/ocaml-caqti/index.html" 7 | bug-reports: "https://github.com/paurkedal/ocaml-caqti/issues" 8 | depends: [ 9 | "ocaml" 10 | "caqti" {>= "1.0.0" & < "2.0.0~"} 11 | "caqti-dynload" {with-test & >= "1.0.0" & < "2.0.0~"} 12 | "caqti-driver-sqlite3" {with-test & >= "1.0.0" & < "2.0.0~"} 13 | "dune" 14 | "logs" 15 | "lwt" {>= "3.2.0"} 16 | ] 17 | build: [ 18 | ["dune" "build" "-p" name "-j" jobs] 19 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 20 | ] 21 | dev-repo: "git+https://github.com/paurkedal/ocaml-caqti.git" 22 | synopsis: "Lwt support for Caqti" 23 | url { 24 | src: 25 | "https://github.com/paurkedal/ocaml-caqti/releases/download/v1.0.0/caqti-1.0.0.tbz" 26 | checksum: [ 27 | "md5=6fb535971d307094a9f0bfb05ddc711c" 28 | "sha256=016e4649710b8ba530642aa706fa62ae65224f18d6791df63554451a430eb3dd" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /esy.lock/opam/conduit-lwt.1.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg" 5 | ] 6 | license: "ISC" 7 | tags: "org:mirage" 8 | homepage: "https://github.com/mirage/ocaml-conduit" 9 | bug-reports: "https://github.com/mirage/ocaml-conduit/issues" 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "dune" 13 | "base-unix" 14 | "ppx_sexp_conv" {>="v0.9.0"} 15 | "sexplib" 16 | "conduit" {=version} 17 | "lwt" {>= "3.0.0"} 18 | ] 19 | build: [ 20 | ["dune" "subst"] {pinned} 21 | ["dune" "build" "-p" name "-j" jobs] 22 | ] 23 | dev-repo: "git+https://github.com/mirage/ocaml-conduit.git" 24 | synopsis: "A portable network connection establishment library using Lwt" 25 | url { 26 | src: 27 | "https://github.com/mirage/ocaml-conduit/releases/download/v1.5.0/conduit-v1.5.0.tbz" 28 | checksum: [ 29 | "sha256=06b6476ba4d8caf4cbfccbf7fd181cb2e5fe459e5e8e4992617fd2d7bebcbfd1" 30 | "sha512=8bddae1a238d58d1b59520afb4f627c4beaf9b5355cacc4087e6667e678392cbc681777e32874ee033ffe40da8a7f0d3bab38eed64f25d201294a9c3e3476978" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /esy.lock/opam/menhir.20190626/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.02"} 18 | "ocamlfind" {build} 19 | "ocamlbuild" {build} 20 | ] 21 | synopsis: "An LR(1) parser generator" 22 | url { 23 | src: 24 | "https://gitlab.inria.fr/fpottier/menhir/repository/20190626/archive.tar.gz" 25 | checksum: [ 26 | "md5=783961f8d124449a1a335cc8e50f013f" 27 | "sha512=bacc5161682130d894a6476fb79363aa73e5582543265a0c23c9a1f9d974007c04853dc8f6faa2b8bd2e82b2323b8604dcc4cb74308af667698079b394dfd492" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/sexplib.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/sexplib" 5 | bug-reports: "https://github.com/janestreet/sexplib/issues" 6 | dev-repo: "git+https://github.com/janestreet/sexplib.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexplib/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "parsexp" {>= "v0.12" & < "v0.13"} 15 | "sexplib0" {>= "v0.12" & < "v0.13"} 16 | "dune" {>= "1.5.1"} 17 | "num" 18 | ] 19 | synopsis: "Library for serializing OCaml values to and from S-expressions" 20 | description: " 21 | Part of Jane Street's Core library 22 | The Core suite of libraries is an industrial strength alternative to 23 | OCaml's standard library that was developed by Jane Street, the 24 | largest industrial user of OCaml. 25 | " 26 | url { 27 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/sexplib-v0.12.0.tar.gz" 28 | checksum: "md5=a7f9f8a414aed6cc56901199cda020f6" 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/atd.2.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | 5 | homepage: "https://github.com/mjambon/atd" 6 | bug-reports: "https://github.com/mjambon/atd/issues" 7 | dev-repo: "git://github.com/mjambon/atd.git" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ] 13 | 14 | # Restore when https://github.com/mjambon/atd/issues/121 is resolved. 15 | # build-test: [ 16 | # ["jbuilder" "runtest" "-p" name] 17 | # ] 18 | 19 | depends: [ 20 | "ocaml" {>= "4.03.0"} 21 | "jbuilder" {build} 22 | "menhir" {build} 23 | "easy-format" 24 | ] 25 | synopsis: "Parser for the ATD data format description language" 26 | description: """ 27 | ATD is the OCaml library providing a parser for the ATD language and 28 | various utilities. ATD stands for Adjustable Type Definitions in 29 | reference to its main property of supporting annotations that allow a 30 | good fit with a variety of data formats.""" 31 | url { 32 | src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz" 33 | checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf" 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-postgresql.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Markus Mottl " 3 | authors: "Markus Mottl " 4 | homepage: "https://www.postgresql.org" 5 | dev-repo: "git+https://github.com/mmottl/postgresql-ocaml.git" 6 | license: "PD" 7 | build: [["pg_config"]] 8 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 9 | 10 | depexts: [ 11 | ["libpq-dev"] {os-family = "debian"} 12 | ["database/postgresql96-client"] {os-distribution = "freebsd"} 13 | ["database/postgresql96-client"] {os-distribution = "openbsd"} 14 | ["postgresql-devel"] {os-distribution = "centos"} 15 | ["postgresql-devel"] {os-distribution = "rhel"} 16 | ["postgresql-devel"] {os-distribution = "fedora"} 17 | ["postgresql-devel"] {os-family = "suse"} 18 | ["postgresql-dev"] {os-distribution = "alpine"} 19 | ["postgresql"] {os = "macos" & os-distribution = "homebrew"} 20 | ["postgresql96"] {os = "macos" & os-distribution = "macports"} 21 | ] 22 | synopsis: "Virtual package relying on a PostgreSQL system installation" 23 | description: 24 | "This package can only install if PostgreSQL is installed on the system." 25 | flags: conf 26 | -------------------------------------------------------------------------------- /esy.lock/opam/stringext.1.6.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "rudi.grinberg@gmail.com" 3 | authors: "Rudi Grinberg" 4 | license: "MIT" 5 | homepage: "https://github.com/rgrinberg/stringext" 6 | bug-reports: "https://github.com/rgrinberg/stringext/issues" 7 | depends: [ 8 | "ocaml" {>= "4.02.3"} 9 | "dune" {>= "1.0"} 10 | "ounit" {with-test} 11 | "qtest" {with-test & >= "2.2"} 12 | "base-bytes" 13 | ] 14 | build: [ 15 | ["dune" "subst"] {pinned} 16 | ["dune" "build" "-p" name "-j" jobs] 17 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 18 | ] 19 | dev-repo: "git+https://github.com/rgrinberg/stringext.git" 20 | synopsis: "Extra string functions for OCaml" 21 | description: """ 22 | Extra string functions for OCaml. Mainly splitting. All functions are in the 23 | Stringext module. 24 | """ 25 | url { 26 | src: 27 | "https://github.com/rgrinberg/stringext/releases/download/1.6.0/stringext-1.6.0.tbz" 28 | checksum: [ 29 | "sha256=db41f5d52e9eab17615f110b899dfeb27dd7e7f89cd35ae43827c5119db206ea" 30 | "sha512=d8ebe40f42b598a9bd99f1ef4b00ba93458385a4accd121af66a0bf3b3f8d7135f576740adf1a43081dd409977c2219fd4bdbb5b3d1308890d301d553ed49900" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /library/Config.re: -------------------------------------------------------------------------------- 1 | type values = {db_connection: string}; 2 | 3 | module type EnvironmentProvider = { 4 | let env: option(string); 5 | let db_connection: option(string); 6 | }; 7 | 8 | module type Environment = {let values: values;}; 9 | 10 | module Make = (E: EnvironmentProvider) : Environment => { 11 | let test = { 12 | db_connection: "postgresql://postgres:postgres@localhost:5432/community_test", 13 | }; 14 | 15 | let development = { 16 | db_connection: "postgresql://postgres:postgres@localhost:5432/community_dev", 17 | }; 18 | 19 | let create_environment = connection => {db_connection: connection}; 20 | 21 | let environment_of_string = env => 22 | switch (env) { 23 | | "TEST" => test 24 | | _ => development 25 | }; 26 | 27 | let values = 28 | switch (E.env, E.db_connection) { 29 | | (_, Some(connection)) => create_environment(connection) 30 | | (Some(env), None) => environment_of_string(env) 31 | | _ => development 32 | }; 33 | }; 34 | 35 | module SystemEnvProvider: EnvironmentProvider = { 36 | let env = Sys.getenv_opt("ENV"); 37 | let db_connection = Sys.getenv_opt("DB_CONNECTION"); 38 | }; 39 | 40 | module Environment = Make(SystemEnvProvider); 41 | -------------------------------------------------------------------------------- /esy.lock/opam/fieldslib.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/fieldslib" 5 | bug-reports: "https://github.com/janestreet/fieldslib/issues" 6 | dev-repo: "git+https://github.com/janestreet/fieldslib.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/fieldslib/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "base" {>= "v0.12" & < "v0.13"} 15 | "dune" {>= "1.5.1"} 16 | ] 17 | synopsis: "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values" 18 | description: " 19 | Part of Jane Street's Core library 20 | The Core suite of libraries is an industrial strength alternative to 21 | OCaml's standard library that was developed by Jane Street, the 22 | largest industrial user of OCaml. 23 | " 24 | url { 25 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/fieldslib-v0.12.0.tar.gz" 26 | checksum: "md5=7cb44f0fb396b6645fc9965ebb8e6741" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/uri-sexp.3.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["Anil Madhavapeddy" "David Sheets" "Rudi Grinberg"] 4 | license: "ISC" 5 | tags: ["url" "uri" "org:mirage" "org:xapi-project"] 6 | homepage: "https://github.com/mirage/ocaml-uri" 7 | bug-reports: "https://github.com/mirage/ocaml-uri/issues" 8 | dev-repo: "git+https://github.com/mirage/ocaml-uri.git" 9 | doc: "https://mirage.github.io/ocaml-uri/" 10 | synopsis: "An RFC3986 URI/URL parsing library" 11 | description: """ 12 | ocaml-uri with sexp support 13 | """ 14 | depends: [ 15 | "uri" {= version} 16 | "dune" {>= "1.2.0"} 17 | "ppx_sexp_conv" {>= "v0.9.0"} 18 | "sexplib0" 19 | "ounit" {with-test} 20 | ] 21 | build: [ 22 | ["dune" "subst"] {pinned} 23 | ["dune" "build" "-p" name "-j" jobs] 24 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 25 | ] 26 | url { 27 | src: 28 | "https://github.com/mirage/ocaml-uri/releases/download/v3.0.0/uri-v3.0.0.tbz" 29 | checksum: [ 30 | "sha256=8fb334fba6ebbf879e2e82d80d6adee8bdaf6cec3bb3da248110d805477d19fa" 31 | "sha512=553c18032a7c96cccdc8e37f497ce34e821b9dd089cfc8685783b7ade1d4dfa422722e4724abcba8b1171b51fa91a2bee297396fc7c349118069b6352e07881e" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/base64.3.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "mirageos-devel@lists.xenproject.org" 3 | authors: [ "Thomas Gazagnaire" 4 | "Anil Madhavapeddy" "Calascibetta Romain" 5 | "Peter Zotov" ] 6 | license: "ISC" 7 | homepage: "https://github.com/mirage/ocaml-base64" 8 | doc: "http://mirage.github.io/ocaml-base64/" 9 | bug-reports: "https://github.com/mirage/ocaml-base64/issues" 10 | dev-repo: "git+https://github.com/mirage/ocaml-base64.git" 11 | synopsis: "Base64 encoding for OCaml" 12 | description: """ 13 | Base64 is a group of similar binary-to-text encoding schemes that represent 14 | binary data in an ASCII string format by translating it into a radix-64 15 | representation. It is specified in RFC 4648. 16 | """ 17 | depends: [ 18 | "ocaml" {>="4.03.0"} 19 | "base-bytes" 20 | "dune" {>= "1.0.1"} 21 | "bos" {with-test} 22 | "rresult" {with-test} 23 | "alcotest" {with-test} 24 | ] 25 | build: [ 26 | ["dune" "subst"] 27 | ["dune" "build" "-p" name "-j" jobs] 28 | ["dune" "runtest" "-p" name] {with-test} 29 | ] 30 | url { 31 | src: 32 | "https://github.com/mirage/ocaml-base64/releases/download/v3.2.0/base64-v3.2.0.tbz" 33 | checksum: "md5=8ac1d6145277cee57d36611d1c420f05" 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/overrides/186b93889ee6682b3910ff6984313567/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esy-gmp", 3 | "version": "6.1.2001", 4 | "description": "GMP packaged for esy", 5 | "source": "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz#9dc6981197a7d92f339192eea974f5eca48fcffe", 6 | "override": { 7 | "buildsInSource": true, 8 | "build": [ 9 | "find ./ -exec touch -t 200905010101 {} +", 10 | "./configure --prefix=#{self.install} #{os == 'windows' ? '--host x86_64-w64-mingw32' : ''} --with-pic", 11 | "make" 12 | ], 13 | "install": [ 14 | "make install" 15 | ], 16 | "exportedEnv": { 17 | "LDFLAGS": { 18 | "scope": "global", 19 | "val": "-L#{self.lib} -lgmp" 20 | }, 21 | "CPPFLAGS": { 22 | "scope": "global", 23 | "val": "-I#{self.install / 'include'}" 24 | }, 25 | "LD_LIBRARY_PATH": { 26 | "scope": "global", 27 | "val": "#{self.lib}:$LD_LIBRARY_PATH" 28 | }, 29 | "LIBRARY_PATH": { 30 | "scope": "global", 31 | "val": "#{self.lib}:$LIBRARY_PATH" 32 | }, 33 | "CPATH": { 34 | "scope": "global", 35 | "val": "#{self.install / 'include'}:$CPATH" 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /esy.lock/opam/ocb-stubblr.0.1.1-1/files/use-OPAM_SWITCH_PREFIX.patch: -------------------------------------------------------------------------------- 1 | From f1c9340f3ab973ad1e8dcc4b7065bbe6cfaa028f Mon Sep 17 00:00:00 2001 2 | From: David Allsopp 3 | Date: Sun, 1 Jul 2018 09:54:32 +0100 4 | Subject: [PATCH] Use OPAM_SWITCH_PREFIX before opam config var prefix 5 | 6 | opam 2's sandbox doesn't expose the mount point for the opam root. 7 | 8 | Signed-off-by: David Allsopp 9 | --- 10 | src/ocb_stubblr.ml | 6 +++++- 11 | 1 file changed, 5 insertions(+), 1 deletion(-) 12 | 13 | diff --git a/src/ocb_stubblr.ml b/src/ocb_stubblr.ml 14 | index b68c37a..2cc5332 100644 15 | --- a/src/ocb_stubblr.ml 16 | +++ b/src/ocb_stubblr.ml 17 | @@ -31,11 +31,15 @@ module Pkg_config = struct 18 | 19 | (* XXX Would be nice to move pkg-config results to a build artefact. *) 20 | 21 | - let opam_prefix = 22 | + let opam_prefix_cmd = 23 | let cmd = "opam config var prefix" in 24 | lazy ( try run_and_read cmd with Failure _ -> 25 | error_msgf "error running opam") 26 | 27 | + let opam_prefix = 28 | + lazy (try Sys.getenv "OPAM_SWITCH_PREFIX" 29 | + with Not_found -> Lazy.force opam_prefix_cmd) 30 | + 31 | let var = "PKG_CONFIG_PATH" 32 | 33 | let path () = 34 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "./configure", 10 | "-bindir", 11 | "#{self.bin}", 12 | "-sitelib", 13 | "#{self.lib}", 14 | "-mandir", 15 | "#{self.man}", 16 | "-config", 17 | "#{self.lib}/findlib.conf", 18 | "-no-custom", 19 | "-no-topfind" 20 | ], 21 | [ 22 | "make", 23 | "all" 24 | ], 25 | [ 26 | "make", 27 | "opt" 28 | ] 29 | ], 30 | "install": [ 31 | [ 32 | "make", 33 | "install" 34 | ], 35 | [ 36 | "install", 37 | "-m", 38 | "0755", 39 | "ocaml-stub", 40 | "#{self.bin}/ocaml" 41 | ], 42 | [ 43 | "mkdir", 44 | "-p", 45 | "#{self.toplevel}" 46 | ], 47 | [ 48 | "install", 49 | "-m", 50 | "0644", 51 | "src/findlib/topfind", 52 | "#{self.toplevel}/topfind" 53 | ] 54 | ], 55 | "exportedEnv": { 56 | "OCAML_TOPLEVEL_PATH": { 57 | "val": "#{self.toplevel}", 58 | "scope": "global" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlbuild.0.14.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Gabriel Scherer " 3 | authors: ["Nicolas Pouillard" "Berke Durak"] 4 | homepage: "https://github.com/ocaml/ocamlbuild/" 5 | bug-reports: "https://github.com/ocaml/ocamlbuild/issues" 6 | license: "LGPL-2 with OCaml linking exception" 7 | doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc" 8 | dev-repo: "git+https://github.com/ocaml/ocamlbuild.git" 9 | build: [ 10 | [ 11 | make 12 | "-f" 13 | "configure.make" 14 | "all" 15 | "OCAMLBUILD_PREFIX=%{prefix}%" 16 | "OCAMLBUILD_BINDIR=%{bin}%" 17 | "OCAMLBUILD_LIBDIR=%{lib}%" 18 | "OCAMLBUILD_MANDIR=%{man}%" 19 | "OCAML_NATIVE=%{ocaml:native}%" 20 | "OCAML_NATIVE_TOOLS=%{ocaml:native}%" 21 | ] 22 | [make "check-if-preinstalled" "all" "opam-install"] 23 | ] 24 | conflicts: [ 25 | "base-ocamlbuild" 26 | "ocamlfind" {< "1.6.2"} 27 | ] 28 | synopsis: 29 | "OCamlbuild is a build system with builtin rules to easily build most OCaml projects." 30 | depends: [ 31 | "ocaml" {>= "4.03"} 32 | ] 33 | url { 34 | src: "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz" 35 | checksum: "sha256=87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-openssl.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "David Sheets " 3 | authors: ["The OpenSSL Project"] 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | homepage: "https://www.openssl.org/" 6 | license: "Apache-1.0" 7 | build: [ 8 | ["pkg-config" "openssl"] 9 | {os != "macos" & os != "freebsd" & os != "openbsd" & os != "netbsd"} 10 | ["./osx-build.sh"] {os = "macos"} 11 | ] 12 | depends: ["conf-pkg-config" {build}] 13 | depexts: [ 14 | ["libssl-dev"] {os-family = "debian"} 15 | ["openssl-devel"] {os-distribution = "centos"} 16 | ["openssl-devel"] {os-distribution = "ol"} 17 | ["openssl-devel"] {os-distribution = "fedora"} 18 | ["openssl"] {os = "macos" & os-distribution = "homebrew"} 19 | ["openssl"] {os = "macos" & os-distribution = "macports"} 20 | ["libressl-dev"] {os-distribution = "alpine"} 21 | ["openssl"] {os-distribution = "nixos"} 22 | ["openssl"] {os-distribution = "arch"} 23 | ["libopenssl-devel"] {os-family = "suse"} 24 | ] 25 | synopsis: "Virtual package relying on an OpenSSL system installation" 26 | description: 27 | "This package can only install if OpenSSL is installed on the system." 28 | extra-files: ["osx-build.sh" "md5=e216c6189d0dfb4185521c8ace09fe40"] 29 | flags: conf 30 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocb_stubblr_opam__c__0.1.1_1_opam_override/files/use-OPAM_SWITCH_PREFIX.patch: -------------------------------------------------------------------------------- 1 | From f1c9340f3ab973ad1e8dcc4b7065bbe6cfaa028f Mon Sep 17 00:00:00 2001 2 | From: David Allsopp 3 | Date: Sun, 1 Jul 2018 09:54:32 +0100 4 | Subject: [PATCH] Use OPAM_SWITCH_PREFIX before opam config var prefix 5 | 6 | opam 2's sandbox doesn't expose the mount point for the opam root. 7 | 8 | Signed-off-by: David Allsopp 9 | --- 10 | src/ocb_stubblr.ml | 6 +++++- 11 | 1 file changed, 5 insertions(+), 1 deletion(-) 12 | 13 | diff --git a/src/ocb_stubblr.ml b/src/ocb_stubblr.ml 14 | index b68c37a..2cc5332 100644 15 | --- a/src/ocb_stubblr.ml 16 | +++ b/src/ocb_stubblr.ml 17 | @@ -31,11 +31,15 @@ module Pkg_config = struct 18 | 19 | (* XXX Would be nice to move pkg-config results to a build artefact. *) 20 | 21 | - let opam_prefix = 22 | + let opam_prefix_cmd = 23 | let cmd = "opam config var prefix" in 24 | lazy ( try run_and_read cmd with Failure _ -> 25 | error_msgf "error running opam") 26 | 27 | + let opam_prefix = 28 | + lazy (try Sys.getenv "OPAM_SWITCH_PREFIX" 29 | + with Not_found -> Lazy.force opam_prefix_cmd) 30 | + 31 | let var = "PKG_CONFIG_PATH" 32 | 33 | let path () = -------------------------------------------------------------------------------- /esy.lock/opam/uchar.0.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://ocaml.org" 5 | doc: "https://ocaml.github.io/uchar/" 6 | dev-repo: "git+https://github.com/ocaml/uchar.git" 7 | bug-reports: "https://github.com/ocaml/uchar/issues" 8 | tags: [ "text" "character" "unicode" "compatibility" "org:ocaml.org" ] 9 | license: "typeof OCaml system" 10 | depends: [ 11 | "ocaml" {>= "3.12.0"} 12 | "ocamlbuild" {build} 13 | ] 14 | build: [ 15 | ["ocaml" "pkg/git.ml"] 16 | [ 17 | "ocaml" 18 | "pkg/build.ml" 19 | "native=%{ocaml:native}%" 20 | "native-dynlink=%{ocaml:native-dynlink}%" 21 | ] 22 | ] 23 | synopsis: "Compatibility library for OCaml's Uchar module" 24 | description: """ 25 | The `uchar` package provides a compatibility library for the 26 | [`Uchar`][1] module introduced in OCaml 4.03. 27 | 28 | The `uchar` package is distributed under the license of the OCaml 29 | compiler. See [LICENSE](LICENSE) for details. 30 | 31 | [1]: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Uchar.html""" 32 | url { 33 | src: 34 | "https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz" 35 | checksum: "md5=c9ba2c738d264c420c642f7bb1cf4a36" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/re.1.9.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | maintainer: "rudi.grinberg@gmail.com" 4 | authors: [ 5 | "Jerome Vouillon" 6 | "Thomas Gazagnaire" 7 | "Anil Madhavapeddy" 8 | "Rudi Grinberg" 9 | "Gabriel Radanne" 10 | ] 11 | license: "LGPL-2.0 with OCaml linking exception" 12 | homepage: "https://github.com/ocaml/ocaml-re" 13 | bug-reports: "https://github.com/ocaml/ocaml-re/issues" 14 | dev-repo: "git+https://github.com/ocaml/ocaml-re.git" 15 | 16 | build: [ 17 | ["dune" "subst"] {pinned} 18 | ["dune" "build" "-p" name "-j" jobs] 19 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 20 | ] 21 | 22 | depends: [ 23 | "ocaml" {>= "4.02"} 24 | "dune" 25 | "ounit" {with-test} 26 | "seq" 27 | ] 28 | 29 | synopsis: "RE is a regular expression library for OCaml" 30 | description: """ 31 | Pure OCaml regular expressions with: 32 | * Perl-style regular expressions (module Re.Perl) 33 | * Posix extended regular expressions (module Re.Posix) 34 | * Emacs-style regular expressions (module Re.Emacs) 35 | * Shell-style file globbing (module Re.Glob) 36 | * Compatibility layer for OCaml's built-in Str module (module Re.Str) 37 | """ 38 | url { 39 | src: 40 | "https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz" 41 | checksum: "md5=bddaed4f386a22cace7850c9c7dac296" 42 | } 43 | -------------------------------------------------------------------------------- /esy.lock/opam/conduit-lwt-unix.1.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg" 5 | ] 6 | license: "ISC" 7 | tags: "org:mirage" 8 | homepage: "https://github.com/mirage/ocaml-conduit" 9 | bug-reports: "https://github.com/mirage/ocaml-conduit/issues" 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "dune" 13 | "base-unix" 14 | "ppx_sexp_conv" {>="v0.9.0"} 15 | "conduit-lwt" {=version} 16 | "lwt" {>= "3.0.0"} 17 | "uri" {>= "1.9.4"} 18 | "ipaddr" {>= "4.0.0"} 19 | "ipaddr-sexp" 20 | ] 21 | depopts: ["tls" "lwt_ssl" "launchd"] 22 | conflicts: [ 23 | "tls" {< "0.8.0"} 24 | "ssl" {< "0.5.9"} 25 | ] 26 | build: [ 27 | ["dune" "subst"] {pinned} 28 | ["dune" "build" "-p" name "-j" jobs] 29 | ] 30 | dev-repo: "git+https://github.com/mirage/ocaml-conduit.git" 31 | synopsis: "A network connection establishment library for Lwt_unix" 32 | url { 33 | src: 34 | "https://github.com/mirage/ocaml-conduit/releases/download/v1.5.0/conduit-v1.5.0.tbz" 35 | checksum: [ 36 | "sha256=06b6476ba4d8caf4cbfccbf7fd181cb2e5fe459e5e8e4992617fd2d7bebcbfd1" 37 | "sha512=8bddae1a238d58d1b59520afb4f627c4beaf9b5355cacc4087e6667e678392cbc681777e32874ee033ffe40da8a7f0d3bab38eed64f25d201294a9c3e3476978" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /esy.lock/opam/rresult.0.6.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/rresult" 5 | doc: "http://erratique.ch/software/rresult" 6 | dev-repo: "git+http://erratique.ch/repos/rresult.git" 7 | bug-reports: "https://github.com/dbuenzli/rresult/issues" 8 | tags: [ "result" "error" "declarative" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "result" 16 | ] 17 | build:[[ 18 | "ocaml" "pkg/pkg.ml" "build" 19 | "--pinned" "%{pinned}%" ]] 20 | 21 | synopsis: """Result value combinators for OCaml""" 22 | description: """\ 23 | 24 | Rresult is an OCaml module for handling computation results and errors 25 | in an explicit and declarative manner, without resorting to 26 | exceptions. It defines combinators to operate on the `result` type 27 | available from OCaml 4.03 in the standard library. 28 | 29 | Rresult depends on the compatibility `result` package and is 30 | distributed under the ISC license. 31 | """ 32 | url { 33 | archive: "http://erratique.ch/software/rresult/releases/rresult-0.6.0.tbz" 34 | checksum: "aba88cffa29081714468c2c7bcdf7fb1" 35 | } 36 | -------------------------------------------------------------------------------- /esy.lock/opam/ipaddr-sexp.4.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"] 4 | synopsis: "A library for manipulation of IP address representations usnig sexp" 5 | description: """ 6 | Sexp convertions for ipaddr 7 | """ 8 | 9 | license: "ISC" 10 | tags: ["org:mirage" "org:xapi-project"] 11 | homepage: "https://github.com/mirage/ocaml-ipaddr" 12 | doc: "https://mirage.github.io/ocaml-ipaddr/" 13 | bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues" 14 | depends: [ 15 | "ocaml" {>= "4.04.0"} 16 | "dune" {>="1.9.0"} 17 | "ipaddr" {=version} 18 | "ipaddr-cstruct" {with-test & =version} 19 | "ounit" {with-test} 20 | "ppx_sexp_conv" {>= "v0.9.0"} 21 | ] 22 | build: [ 23 | ["dune" "subst"] {pinned} 24 | ["dune" "build" "-p" name "-j" jobs] 25 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 26 | ] 27 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" 28 | url { 29 | src: 30 | "https://github.com/mirage/ocaml-ipaddr/releases/download/v4.0.0/ipaddr-v4.0.0.tbz" 31 | checksum: [ 32 | "sha256=6f4abf9c210b20ccddf4610691a87b8c870790d8f71d4a7edcfca9e21b59fc29" 33 | "sha512=ca55a8cfa8b84c0a2f4e1fe7afb4c582066bbb562efb94169c0347e441ce076dc426d191772edb869eca6bd77f42f7141378181057ad8886da25ef915a9ee57f" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /esy.lock/opam/utop.2.4.1/opam: -------------------------------------------------------------------------------- 1 | version: "2.4.1" 2 | opam-version: "2.0" 3 | maintainer: "jeremie@dimino.org" 4 | authors: "Jérémie Dimino" 5 | license: "BSD3" 6 | homepage: "https://github.com/ocaml-community/utop" 7 | bug-reports: "https://github.com/ocaml-community/utop/issues" 8 | doc: "https://ocaml-community.github.io/utop/" 9 | depends: [ 10 | "ocaml" {>= "4.03.0"} 11 | "base-unix" 12 | "base-threads" 13 | "ocamlfind" {>= "1.7.2"} 14 | "lambda-term" {>= "2.0" & < "3.0"} 15 | "lwt" 16 | "lwt_react" 17 | "camomile" 18 | "react" {>= "1.0.0"} 19 | "cppo" {build & >= "1.1.2"} 20 | "dune" 21 | ] 22 | build: [ 23 | ["dune" "subst"] {pinned} 24 | ["dune" "build" "-p" name "-j" jobs] 25 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 26 | ] 27 | dev-repo: "git+https://github.com/ocaml-community/utop.git" 28 | synopsis: "Universal toplevel for OCaml" 29 | description: """ 30 | utop is an improved toplevel (i.e., Read-Eval-Print Loop or REPL) for 31 | OCaml. It can run in a terminal or in Emacs. It supports line 32 | edition, history, real-time and context sensitive completion, colors, 33 | and more. It integrates with the Tuareg mode in Emacs. 34 | """ 35 | url { 36 | src: "https://github.com/ocaml-community/utop/releases/download/2.4.1/utop-2.4.1.tbz" 37 | checksum: "md5=d51936e2180e42c812c91ec35a7de02a" 38 | } 39 | -------------------------------------------------------------------------------- /esy.lock/opam/containers.2.6/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: 3 | "A modular, clean and powerful extension of the OCaml standard library" 4 | maintainer: "simon.cruanes.2007@m4x.org" 5 | authors: "Simon Cruanes" 6 | tags: ["stdlib" "containers" "iterators" "list" "heap" "queue"] 7 | homepage: "https://github.com/c-cube/ocaml-containers/" 8 | doc: "https://c-cube.github.io/ocaml-containers" 9 | bug-reports: "https://github.com/c-cube/ocaml-containers/issues/" 10 | depends: [ 11 | "dune" 12 | "result" 13 | "uchar" 14 | "qtest" {with-test} 15 | "qcheck" {with-test} 16 | "ounit" {with-test} 17 | "iter" {with-test} 18 | "gen" {with-test} 19 | "uutf" {with-test} 20 | "mdx" {with-test} 21 | "odoc" {with-doc} 22 | "ocaml" {>= "4.02.0"} 23 | ] 24 | depopts: ["base-unix" "base-threads"] 25 | build: [ 26 | ["dune" "build" "-p" name "-j" jobs] 27 | ["dune" "build" "@doc" "-p" name] {with-doc} 28 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 29 | ] 30 | dev-repo: "git+https://github.com/c-cube/ocaml-containers.git" 31 | url { 32 | src: "https://github.com/c-cube/ocaml-containers/archive/2.6.tar.gz" 33 | checksum: [ 34 | "md5=cbc9b49bb6b4211f95bae5368d30649b" 35 | "sha512=bee7248b6382e006a979b85bee1643f7083101ec65771b71f4949d0a9e66150e3ab65c615828600fa0c1f23a0281b8d8e926c104606d04681649558bc49b21f9" 36 | ] 37 | } -------------------------------------------------------------------------------- /esy.lock/opam/react.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | homepage: "http://erratique.ch/software/react" 4 | authors: ["Daniel Bünzli "] 5 | doc: "http://erratique.ch/software/react/doc/React" 6 | dev-repo: "git+http://erratique.ch/repos/react.git" 7 | bug-reports: "https://github.com/dbuenzli/react/issues" 8 | tags: [ "reactive" "declarative" "signal" "event" "frp" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build & >= "0.9.0"} 15 | ] 16 | build: 17 | [[ "ocaml" "pkg/pkg.ml" "build" 18 | "--dev-pkg" "%{pinned}%" ]] 19 | synopsis: "Declarative events and signals for OCaml" 20 | description: """ 21 | Release %%VERSION%% 22 | 23 | React is an OCaml module for functional reactive programming (FRP). It 24 | provides support to program with time varying values : declarative 25 | events and signals. React doesn't define any primitive event or 26 | signal, it lets the client chooses the concrete timeline. 27 | 28 | React is made of a single, independent, module and distributed under 29 | the ISC license.""" 30 | url { 31 | src: "http://erratique.ch/software/react/releases/react-1.2.1.tbz" 32 | checksum: "md5=ce1454438ce4e9d2931248d3abba1fcc" 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/cppo.1.6.6/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: "Martin Jambon" 4 | license: "BSD-3-Clause" 5 | homepage: "http://mjambon.com/cppo.html" 6 | doc: "https://ocaml-community.github.io/cppo/" 7 | bug-reports: "https://github.com/ocaml-community/cppo/issues" 8 | depends: [ 9 | "ocaml" {>= "4.03"} 10 | "dune" {>= "1.0"} 11 | "base-unix" 12 | ] 13 | build: [ 14 | ["dune" "subst"] {pinned} 15 | ["dune" "build" "-p" name "-j" jobs] 16 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 17 | ] 18 | dev-repo: "git+https://github.com/ocaml-community/cppo.git" 19 | synopsis: "Code preprocessor like cpp for OCaml" 20 | description: """ 21 | Cppo is an equivalent of the C preprocessor for OCaml programs. 22 | It allows the definition of simple macros and file inclusion. 23 | 24 | Cppo is: 25 | 26 | * more OCaml-friendly than cpp 27 | * easy to learn without consulting a manual 28 | * reasonably fast 29 | * simple to install and to maintain 30 | """ 31 | url { 32 | src: "https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz" 33 | checksum: [ 34 | "sha256=e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" 35 | "sha512=44ecf9d225d9e45490a2feac0bde04865ca398dba6c3579e3370fcd1ea255707b8883590852af8b2df87123801062b9f3acce2455c092deabf431f9c4fb8d8eb" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /esy.lock/opam/cstruct.3.3.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire" 4 | "Pierre Chambart" "David Kaloper" "Jeremy Yallop" "David Scott" 5 | "Mindy Preston" "Thomas Leonard" ] 6 | homepage: "https://github.com/mirage/ocaml-cstruct" 7 | license: "ISC" 8 | dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git" 9 | bug-reports: "https://github.com/mirage/ocaml-cstruct/issues" 10 | doc: "https://mirage.github.io/ocaml-cstruct/" 11 | 12 | tags: [ "org:mirage" "org:ocamllabs" ] 13 | build: [ 14 | ["dune" "subst"] {pinned} 15 | ["dune" "build" "-p" name "-j" jobs] 16 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 17 | ] 18 | depends: [ 19 | "ocaml" {>= "4.03.0"} 20 | "dune" {>= "1.0"} 21 | "sexplib" 22 | "alcotest" {with-test} 23 | ] 24 | synopsis: "Access C-like structures directly from OCaml" 25 | description: """ 26 | Cstruct is a library and syntax extension to make it easier to access C-like 27 | structures directly from OCaml. It supports both reading and writing to these 28 | structures, and they are accessed via the `Bigarray` module.""" 29 | url { 30 | src: 31 | "https://github.com/mirage/ocaml-cstruct/releases/download/v3.3.0/cstruct-v3.3.0.tbz" 32 | checksum: "md5=7451389f3941d938575f8887c55c5e6b" 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/eqaf.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "eqaf" 3 | maintainer: [ "Romain Calascibetta " ] 4 | authors: [ "Romain Calascibetta " ] 5 | homepage: "https://github.com/mirage/eqaf" 6 | bug-reports: "https://github.com/mirage/eqaf/issues" 7 | dev-repo: "git+https://github.com/mirage/eqaf.git" 8 | doc: "https://mirage.github.io/eqaf/" 9 | license: "MIT" 10 | synopsis: "Constant-time equal function on string" 11 | description: """ 12 | This package provides an equal function on string in constant-time to avoid timing-attack with crypto stuff. 13 | """ 14 | 15 | build: [ "dune" "build" "-p" name "-j" jobs ] 16 | run-test: [ "dune" "runtest" "-p" name "-j" "1" "--no-buffer" "--verbose" ] 17 | 18 | depends: [ 19 | "ocaml" {>= "4.03.0"} 20 | "dune" 21 | "alcotest" {with-test} 22 | "crowbar" {with-test} 23 | ] 24 | depopts: [ 25 | "cstruct" {>= "4.0.0"} 26 | "bigarray-compat" 27 | ] 28 | url { 29 | src: "https://github.com/mirage/eqaf/releases/download/v0.5/eqaf-v0.5.tbz" 30 | checksum: [ 31 | "sha256=58ef81c110ee44669b1951df669cdc1f60ca34f0063cf0ae8b87568111af73f2" 32 | "sha512=8a5761596bb8cbde8743161502900423f369d3de3b4b999a940b93d66b1830204fdb67165eff461f3eec0cdb1e169ebd6c9b80f5a8162bc12f359b606a0cbb17" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/opam/zed.2.0.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opam-devel@lists.ocaml.org" 3 | authors: ["Jérémie Dimino"] 4 | homepage: "https://github.com/ocaml-community/zed" 5 | bug-reports: "https://github.com/ocaml-community/zed/issues" 6 | dev-repo: "git://github.com/ocaml-community/zed.git" 7 | license: "BSD3" 8 | depends: [ 9 | "ocaml" {>= "4.02.3"} 10 | "dune" {>= "1.1.0"} 11 | "base-bytes" 12 | "camomile" {>= "1.0.1"} 13 | "react" 14 | "charInfo_width" {>= "1.1.0" & < "2.0~"} 15 | ] 16 | build: [ 17 | ["dune" "build" "-p" name "-j" jobs] 18 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 19 | ] 20 | synopsis: "Abstract engine for text edition in OCaml" 21 | description: """ 22 | Zed is an abstract engine for text edition. It can be used to write text 23 | editors, edition widgets, readlines, ... Zed uses Camomile to fully support the 24 | Unicode specification, and implements an UTF-8 encoded string type with 25 | validation, and a rope datastructure to achieve efficient operations on large 26 | Unicode buffers. Zed also features a regular expression search on ropes. To 27 | support efficient text edition capabilities, Zed provides macro recording and 28 | cursor management facilities.""" 29 | url { 30 | src: "https://github.com/ocaml-community/zed/releases/download/2.0.3/zed-2.0.3.tbz" 31 | checksum: "878123c9114bf3c0bd18a19fb1af73cd" 32 | } 33 | -------------------------------------------------------------------------------- /esy.lock/opam/postgresql.4.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Markus Mottl " 3 | authors: [ 4 | "Alain Frisch " 5 | "Markus Mottl " 6 | "Petter Urkedal " 7 | ] 8 | license: "LGPL-2.1+ with OCaml linking exception" 9 | homepage: "https://mmottl.github.io/postgresql-ocaml" 10 | doc: "https://mmottl.github.io/postgresql-ocaml/api" 11 | dev-repo: "git+https://github.com/mmottl/postgresql-ocaml.git" 12 | bug-reports: "https://github.com/mmottl/postgresql-ocaml/issues" 13 | 14 | build: [ 15 | ["dune" "subst"] {pinned} 16 | ["dune" "build" "-p" name "-j" jobs] 17 | ] 18 | 19 | depends: [ 20 | "ocaml" {>= "4.05"} 21 | "dune" {>= "1.4.0"} 22 | "base" {build} 23 | "stdio" {build} 24 | "base-bytes" 25 | "conf-postgresql" {build} 26 | ] 27 | 28 | synopsis: "Bindings to the PostgreSQL library" 29 | 30 | description: """ 31 | Postgresql offers library functions for accessing PostgreSQL databases.""" 32 | url { 33 | src: 34 | "https://github.com/mmottl/postgresql-ocaml/releases/download/4.5.0/postgresql-4.5.0.tbz" 35 | checksum: [ 36 | "sha256=1cca5b3da400e4de060b8e61e8aff9675f67204da27c16a5bc4ec0dca4ca0905" 37 | "sha512=56f3719dc1cf7ae1cf7c71db16264c8737f9114851459edf1a46b5ee2c51ecebb8ed5428c003d243a5cd518cb66a8a007ba2d2d23d01a3b9b87567a0b9871c5c" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /esy.lock/opam/uri.3.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["Anil Madhavapeddy" "David Sheets" "Rudi Grinberg"] 4 | license: "ISC" 5 | tags: ["url" "uri" "org:mirage" "org:xapi-project"] 6 | homepage: "https://github.com/mirage/ocaml-uri" 7 | bug-reports: "https://github.com/mirage/ocaml-uri/issues" 8 | dev-repo: "git+https://github.com/mirage/ocaml-uri.git" 9 | doc: "https://mirage.github.io/ocaml-uri/" 10 | synopsis: "An RFC3986 URI/URL parsing library" 11 | description: """ 12 | This is an OCaml implementation of the [RFC3986](http://tools.ietf.org/html/rfc3986) specification 13 | for parsing URI or URLs. 14 | """ 15 | depends: [ 16 | "ocaml" {>= "4.04.0"} 17 | "dune" {>= "1.2.0"} 18 | "ounit" {with-test & >= "1.0.2"} 19 | "ppx_sexp_conv" {with-test & >= "v0.9.0"} 20 | "re" {>= "1.9.0"} 21 | "stringext" {>= "1.4.0"} 22 | ] 23 | build: [ 24 | ["dune" "subst"] {pinned} 25 | ["dune" "build" "-p" name "-j" jobs] 26 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 27 | ] 28 | url { 29 | src: 30 | "https://github.com/mirage/ocaml-uri/releases/download/v3.0.0/uri-v3.0.0.tbz" 31 | checksum: [ 32 | "sha256=8fb334fba6ebbf879e2e82d80d6adee8bdaf6cec3bb3da248110d805477d19fa" 33 | "sha512=553c18032a7c96cccdc8e37f497ce34e821b9dd089cfc8685783b7ade1d4dfa422722e4724abcba8b1171b51fa91a2bee297396fc7c349118069b6352e07881e" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /esy.lock/opam/camomile.1.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "A Unicode library" 3 | description: """ 4 | Camomile is a Unicode library for OCaml. Camomile provides Unicode character 5 | type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about 200 encodings, 6 | collation and locale-sensitive case mappings, and more. The library is currently 7 | designed for Unicode Standard 3.2.""" 8 | maintainer: ["yoriyuki.y@gmail.com"] 9 | authors: ["Yoriyuki Yamagata"] 10 | license: "LGPL-2+ with OCaml linking exception" 11 | homepage: "https://github.com/yoriyuki/Camomile" 12 | doc: "https://yoriyuki.github.io/Camomile/" 13 | bug-reports: "https://github.com/yoriyuki/Camomile/issues" 14 | depends: [ 15 | "dune" {>= "1.11"} 16 | "ocaml" {>= "4.02.3"} 17 | ] 18 | dev-repo: "git+https://github.com/yoriyuki/Camomile.git" 19 | build: [ 20 | ["ocaml" "configure.ml" "--share" "%{share}%/camomile"] 21 | ["dune" "subst"] {pinned} 22 | ["dune" "build" "-p" name "-j" jobs 23 | "@install" 24 | "@doc" {with-doc} 25 | ] 26 | ] 27 | url { 28 | src: 29 | "https://github.com/yoriyuki/Camomile/releases/download/1.0.2/camomile-1.0.2.tbz" 30 | checksum: [ 31 | "sha256=f0a419b0affc36500f83b086ffaa36c545560cee5d57e84b729e8f851b3d1632" 32 | "sha512=7586422e68779476206027c6ebbe19b677fbe459153221f7c952c7fae374c5c8232249cb76fdb1f482069707aa1580be827cd39693906142988268b7f0e7f6d0" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/opam/yojson.1.7.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/ocaml-community/yojson" 5 | bug-reports: "https://github.com/ocaml-community/yojson/issues" 6 | dev-repo: "git+https://github.com/ocaml-community/yojson.git" 7 | doc: "https://ocaml-community.github.io/yojson/" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | run-test: [["dune" "runtest" "-p" name "-j" jobs]] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" 16 | "cppo" {build} 17 | "easy-format" 18 | "biniou" {>= "1.2.0"} 19 | "alcotest" {with-test & >= "0.8.5"} 20 | ] 21 | synopsis: 22 | "Yojson is an optimized parsing and printing library for the JSON format" 23 | description: """ 24 | Yojson is an optimized parsing and printing library for the JSON format. 25 | 26 | It addresses a few shortcomings of json-wheel including 2x speedup, 27 | polymorphic variants and optional syntax for tuples and variants. 28 | 29 | ydump is a pretty-printing command-line program provided with the 30 | yojson package. 31 | 32 | The program atdgen can be used to derive OCaml-JSON serializers and 33 | deserializers from type definitions.""" 34 | url { 35 | src: 36 | "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz" 37 | checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d" 38 | } 39 | -------------------------------------------------------------------------------- /esy.lock/opam/jsonm.1.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/jsonm" 5 | doc: "http://erratique.ch/software/jsonm/doc/Jsonm" 6 | dev-repo: "git+http://erratique.ch/repos/jsonm.git" 7 | bug-reports: "https://github.com/dbuenzli/jsonm/issues" 8 | tags: [ "json" "codec" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "uchar" 16 | "uutf" {>= "1.0.0"} 17 | ] 18 | build:[[ 19 | "ocaml" "pkg/pkg.ml" "build" 20 | "--pinned" "%{pinned}%" ]] 21 | synopsis: "Non-blocking streaming JSON codec for OCaml" 22 | description: """ 23 | Jsonm is a non-blocking streaming codec to decode and encode the JSON 24 | data format. It can process JSON text without blocking on IO and 25 | without a complete in-memory representation of the data. 26 | 27 | The alternative "uncut" codec also processes whitespace and 28 | (non-standard) JSON with JavaScript comments. 29 | 30 | Jsonm is made of a single module and depends on [Uutf][uutf]. It is distributed 31 | under the ISC license. 32 | 33 | [uutf]: http://erratique.ch/software/uutf""" 34 | url { 35 | src: "http://erratique.ch/software/jsonm/releases/jsonm-1.0.1.tbz" 36 | checksum: "md5=e2ca39eaefd55b8d155c4f1ec5885311" 37 | } 38 | -------------------------------------------------------------------------------- /test/ConfigTest.re: -------------------------------------------------------------------------------- 1 | open TestFramework; 2 | open Library.Config; 3 | 4 | describe("Environment", ({test, _}) => { 5 | test("by default", ({expect}) => { 6 | let environment = Environment.values; 7 | 8 | expect.string(environment.db_connection).not.toBeEmpty(); 9 | }); 10 | 11 | test("with a connection", ({expect}) => { 12 | let fake_connection = "test-fake"; 13 | let environment = Factory.Environment.make(None, Some(fake_connection)); 14 | 15 | expect.string(environment.db_connection).toEqual(fake_connection); 16 | }); 17 | 18 | test("with a test env", ({expect}) => { 19 | let environment = Factory.Environment.make(Some("TEST"), None); 20 | 21 | expect.string(environment.db_connection).toEqual( 22 | "postgresql://postgres:postgres@localhost:5432/community_test", 23 | ); 24 | }); 25 | 26 | test("with a test env and a connection", ({expect}) => { 27 | let fake_connection = "test-fake"; 28 | let environment = 29 | Factory.Environment.make(Some("TEST"), Some(fake_connection)); 30 | 31 | expect.string(environment.db_connection).toEqual(fake_connection); 32 | }); 33 | 34 | test("without a test env and a connection", ({expect}) => { 35 | let environment = Factory.Environment.make(None, None); 36 | 37 | expect.string(environment.db_connection).toEqual( 38 | "postgresql://postgres:postgres@localhost:5432/community_dev", 39 | ); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /esy.lock/opam/crunch.3.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "MirageOS team" 3 | authors: ["Anil Madhavapeddy" "Thomas Gazagnaire" "Stefanie Schirmer" "Hannes Mehnert"] 4 | homepage: "https://github.com/mirage/ocaml-crunch" 5 | bug-reports: "https://github.com/mirage/ocaml-crunch/issues" 6 | doc: "https://mirage.github.io/ocaml-crunch/" 7 | license: "ISC" 8 | dev-repo: "git+https://github.com/mirage/ocaml-crunch.git" 9 | tags: ["org:mirage" "org:xapi-project"] 10 | 11 | depends: [ 12 | "ocaml" {>= "4.05.0"} 13 | "cmdliner" 14 | "ptime" 15 | "dune" {>= "1.0"} 16 | "lwt" {with-test} 17 | "mirage-kv-lwt" {with-test & >= "2.0.0"} 18 | "mirage-kv-mem" {with-test} 19 | ] 20 | build: [ 21 | ["dune" "subst"] {pinned} 22 | ["dune" "build" "-p" name "-j" jobs] 23 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 24 | ] 25 | synopsis: "Convert a filesystem into a static OCaml module" 26 | description: """ 27 | `ocaml-crunch` takes a directory of files and compiles them into a standalone 28 | OCaml module which serves the contents directly from memory. This can be 29 | convenient for libraries that need a few embedded files (such as a web server) 30 | and do not want to deal with all the trouble of file configuration. 31 | """ 32 | url { 33 | src: 34 | "https://github.com/mirage/ocaml-crunch/releases/download/v3.0.0/crunch-v3.0.0.tbz" 35 | checksum: "md5=83936d6316c2f81e3c64695bfac62f77" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/lambda-term.2.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | homepage: "https://github.com/ocaml-community/lambda-term" 5 | bug-reports: "https://github.com/ocaml-community/lambda-term/issues" 6 | dev-repo: "git://github.com/ocaml-community/lambda-term.git" 7 | license: "BSD3" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.3"} 14 | "lwt" {>= "4.0.0"} 15 | "lwt_log" 16 | "react" 17 | "zed" {>= "2.0.3" & < "3.0"} 18 | "camomile" {>= "1.0.1"} 19 | "lwt_react" 20 | "dune" {>= "1.0.0"} 21 | ] 22 | synopsis: "Terminal manipulation library for OCaml" 23 | description: """ 24 | Lambda-term is a cross-platform library for manipulating the terminal. It 25 | provides an abstraction for keys, mouse events, colors, as well as a set of 26 | widgets to write curses-like applications. The main objective of lambda-term is 27 | to provide a higher level functional interface to terminal manipulation than, 28 | for example, ncurses, by providing a native OCaml interface instead of bindings 29 | to a C library. Lambda-term integrates with zed to provide text edition 30 | facilities in console applications.""" 31 | url { 32 | src: "https://github.com/ocaml-community/lambda-term/releases/download/2.0.2/lambda-term-2.0.2.tbz" 33 | checksum: "md5=4602aa4355705909e406513322b4b27e" 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/opam/base.v0.12.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/base" 5 | bug-reports: "https://github.com/janestreet/base/issues" 6 | dev-repo: "git+https://github.com/janestreet/base.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/base/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2" & < "4.09.0"} 14 | "sexplib0" {>= "v0.12" & < "v0.13"} 15 | "dune" {>= "1.5.1"} 16 | ] 17 | depopts: [ 18 | "base-native-int63" 19 | ] 20 | synopsis: "Full standard library replacement for OCaml" 21 | description: " 22 | Full standard library replacement for OCaml 23 | 24 | Base is a complete and portable alternative to the OCaml standard 25 | library. It provides all standard functionalities one would expect 26 | from a language standard library. It uses consistent conventions 27 | across all of its module. 28 | 29 | Base aims to be usable in any context. As a result system dependent 30 | features such as I/O are not offered by Base. They are instead 31 | provided by companion libraries such as stdio: 32 | 33 | https://github.com/janestreet/stdio 34 | " 35 | url { 36 | src: "https://github.com/janestreet/base/archive/v0.12.2.tar.gz" 37 | checksum: "md5=7150e848a730369a2549d01645fb6c72" 38 | } 39 | -------------------------------------------------------------------------------- /esy.lock/opam/ocaml-migrate-parsetree.1.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "frederic.bour@lakaban.net" 3 | authors: [ 4 | "Frédéric Bour " 5 | "Jérémie Dimino " 6 | ] 7 | license: "LGPL-2.1 with OCaml linking exception" 8 | homepage: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree" 9 | bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues" 10 | dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git" 11 | doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/" 12 | tags: [ "syntax" "org:ocamllabs" ] 13 | build: [ 14 | ["dune" "build" "-p" name "-j" jobs] 15 | ] 16 | depends: [ 17 | "result" 18 | "ppx_derivers" 19 | "dune" {>= "1.9.0"} 20 | "ocaml" {>= "4.02.3"} 21 | ] 22 | synopsis: "Convert OCaml parsetrees between different versions" 23 | description: """ 24 | Convert OCaml parsetrees between different versions 25 | 26 | This library converts parsetrees, outcometree and ast mappers between 27 | different OCaml versions. High-level functions help making PPX 28 | rewriters independent of a compiler version. 29 | """ 30 | url { 31 | src: 32 | "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.4.0/ocaml-migrate-parsetree-v1.4.0.tbz" 33 | checksum: [ 34 | "sha256=231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8" 35 | "sha512=61ee91d2d146cc2d2ff2d5dc4ef5dea4dc4d3c8dbd8b4c9586d64b6ad7302327ab35547aa0a5b0103c3f07b66b13d416a1bee6d4d117293cd3cabe44113ec6d4" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /esy.lock/opam/atdgen.2.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | 5 | homepage: "https://github.com/mjambon/atd" 6 | bug-reports: "https://github.com/mjambon/atd/issues" 7 | dev-repo: "git://github.com/mjambon/atd.git" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ] 13 | 14 | # Restore when https://github.com/mjambon/atd/issues/121 is resolved. 15 | # build-test: [ 16 | # ["jbuilder" "runtest" "-p" name] 17 | # ] 18 | 19 | depends: [ 20 | "ocaml" {>= "4.03.0"} 21 | "jbuilder" {build} 22 | "atd" {>= "2.0.0"} 23 | "atdgen-runtime" {>= "2.0.0"} 24 | "biniou" {>= "1.0.6"} 25 | "yojson" {>= "1.2.1"} 26 | ] 27 | synopsis: 28 | "Generates efficient JSON serializers, deserializers and validators" 29 | description: """ 30 | Atdgen is a command-line program that takes as input type definitions in the 31 | ATD syntax and produces OCaml code suitable for data serialization and 32 | deserialization. 33 | 34 | Two data formats are currently supported, these are biniou and JSON. 35 | Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or the 36 | other. 37 | 38 | Atdgen was designed with efficiency and durability in mind. Software authors 39 | are encouraged to use Atdgen directly and to write tools that may reuse part of 40 | Atdgen’s source code.""" 41 | url { 42 | src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz" 43 | checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf" 44 | } 45 | -------------------------------------------------------------------------------- /esy.lock/opam/macaddr.4.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"] 4 | synopsis: "A library for manipulation of MAC address representations" 5 | license: "ISC" 6 | tags: ["org:mirage" "org:xapi-project"] 7 | homepage: "https://github.com/mirage/ocaml-ipaddr" 8 | doc: "https://mirage.github.io/ocaml-ipaddr/" 9 | bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues" 10 | depends: [ 11 | "ocaml" {>= "4.04.0"} 12 | "dune" {>="1.9.0"} 13 | "ounit" {with-test} 14 | "ppx_sexp_conv" {with-test & >= "v0.9.0"} 15 | ] 16 | conflicts: [ "ipaddr" {< "3.0.0"} ] 17 | build: [ 18 | ["dune" "subst"] {pinned} 19 | ["dune" "build" "-p" name "-j" jobs] 20 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 21 | ] 22 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" 23 | description: """ 24 | A library for manipulation of MAC address representations. 25 | 26 | Features: 27 | 28 | * oUnit-based tests 29 | * MAC-48 (Ethernet) address support 30 | * `Macaddr` is a `Map.OrderedType` 31 | * All types have sexplib serializers/deserializers optionally via the `Macaddr_sexp` library. 32 | """ 33 | url { 34 | src: 35 | "https://github.com/mirage/ocaml-ipaddr/releases/download/v4.0.0/ipaddr-v4.0.0.tbz" 36 | checksum: [ 37 | "sha256=6f4abf9c210b20ccddf4610691a87b8c870790d8f71d4a7edcfca9e21b59fc29" 38 | "sha512=ca55a8cfa8b84c0a2f4e1fe7afb4c582066bbb562efb94169c0347e441ce076dc426d191772edb869eca6bd77f42f7141378181057ad8886da25ef915a9ee57f" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /esy.lock/opam/domain-name.0.3.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Hannes Mehnert " 3 | authors: "Hannes Mehnert " 4 | license: "ISC" 5 | homepage: "https://github.com/hannesm/domain-name" 6 | doc: "https://hannesm.github.io/domain-name/doc" 7 | bug-reports: "https://github.com/hannesm/domain-name/issues" 8 | depends: [ 9 | "ocaml" {>= "4.04.2"} 10 | "dune" 11 | "fmt" 12 | "astring" 13 | "alcotest" {with-test} 14 | ] 15 | build: [ 16 | ["dune" "subst"] {pinned} 17 | ["dune" "build" "-p" name "-j" jobs] 18 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 19 | ] 20 | dev-repo: "git+https://github.com/hannesm/domain-name.git" 21 | synopsis: "RFC 1035 Internet domain names" 22 | description: """ 23 | A domain name is a sequence of labels separated by dots, such as `foo.example`. 24 | Each label may contain any bytes. The length of each label may not exceed 63 25 | charactes. The total length of a domain name is limited to 253 (byte 26 | representation is 255), but other protocols (such as SMTP) may apply even 27 | smaller limits. A domain name label is case preserving, comparison is done in a 28 | case insensitive manner. 29 | """ 30 | url { 31 | src: 32 | "https://github.com/hannesm/domain-name/releases/download/v0.3.0/domain-name-v0.3.0.tbz" 33 | checksum: [ 34 | "sha256=4dd9ed1bc619886d1adcaff14edfb503dedb77fc0b7a28d88d213aa1c44d6c8a" 35 | "sha512=8229766b20a44622d3a94250c6909dbe64269aab6dde8dd13f6b1c027d63e119658fd35b459c6556817ab583bbfdbc5dbea97d3022f590184d70a72ecd7c0a34" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-pkg-config.1.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "unixjunkie@sdf.org" 3 | authors: ["Francois Berenger"] 4 | homepage: "http://www.freedesktop.org/wiki/Software/pkg-config/" 5 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 6 | license: "GPL" 7 | build: [ 8 | ["pkg-config" "--help"] 9 | ] 10 | install: [ 11 | ["ln" "-s" "/usr/local/bin/pkgconf" "%{bin}%/pkg-config"] {os = "openbsd"} 12 | ] 13 | remove: [ 14 | ["rm" "-f" "%{bin}%/pkg-config"] {os = "openbsd"} 15 | ] 16 | post-messages: [ 17 | "conf-pkg-config: A symlink to /usr/local/bin/pkgconf has been installed in the OPAM bin directory (%{bin}%) on your PATH as 'pkg-config'. This is necessary for correct operation." {os = "openbsd"} 18 | ] 19 | depexts: [ 20 | ["pkg-config"] {os-family = "debian"} 21 | ["pkg-config"] {os-distribution = "arch"} 22 | ["pkgconfig"] {os-distribution = "fedora"} 23 | ["pkgconfig"] {os-distribution = "centos"} 24 | ["pkgconfig"] {os-distribution = "mageia"} 25 | ["pkgconfig"] {os-distribution = "rhel"} 26 | ["pkgconfig"] {os-distribution = "ol"} 27 | ["pkgconfig"] {os-distribution = "alpine"} 28 | ["devel/pkgconf"] {os = "freebsd"} 29 | ["devel/pkgconf"] {os = "openbsd"} 30 | ["pkg-config"] {os = "macos" & os-distribution = "homebrew"} 31 | ["pkgconf"] {os = "freebsd"} 32 | ["pkg-config"] {os-distribution = "cygwinports"} 33 | ] 34 | synopsis: "Virtual package relying on pkg-config installation" 35 | description: """ 36 | This package can only install if the pkg-config package is installed 37 | on the system.""" 38 | flags: conf 39 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocb_stubblr_opam__c__0.1.1_1_opam_override/files/ocb-stubblr-0.1.1.patch: -------------------------------------------------------------------------------- 1 | --- ./src/ocb_stubblr.ml 2 | +++ ./src/ocb_stubblr.ml 3 | @@ -158,7 +158,7 @@ 4 | let name = Pathname.(remove_extension clib |> basename) in 5 | let name = String.(if is_prefix ~affix:"lib" name then drop ~max:3 name else name) in 6 | S [A switch; A ("-l"^name)] 7 | - and dep flag = Pathname.([remove_extension flag -.- "a"]) in 8 | + and dep flag = Pathname.([remove_extension flag -.- !Options.ext_lib]) in 9 | pflag ["link"; "ocaml"; "library"; "byte"] tag (libarg "-dllib"); 10 | pflag ["link"; "ocaml"; "library"; "native"] tag (libarg "-cclib"); 11 | pdep ["link"; "ocaml"] tag dep; 12 | @@ -174,9 +174,18 @@ 13 | let c = env c and deps = env deps in 14 | let to_list str = List.filter ((<>) "\\") @@ 15 | String.fields ~empty:false ~is_sep:Char.Ascii.is_white str in 16 | + let cc = 17 | + (* very dirty, no msvc support *) 18 | + if Sys.os_type <> "Win32" then 19 | + "cc" 20 | + else if Sys.word_size = 64 then 21 | + "x86_64-w64-mingw32-gcc" 22 | + else 23 | + "i686-w64-mingw32-gcc" 24 | + in 25 | let cmd = Cmd ( 26 | S [ A "cd"; P root; Sh "&&"; 27 | - A "cc"; T (tags_of_pathname c); A "-MM"; A "-MG"; P c ]) in 28 | + A cc; T (tags_of_pathname c); A "-MM"; A "-MG"; P c ]) in 29 | let headers = match Command.to_string cmd |> run_and_read |> to_list with 30 | | _::_::xs -> List.map (fun p -> Pathname.normalize p ^ "\n") xs 31 | | _ -> error_exit_msgf "%s: depends: unrecognized format" c in 32 | -------------------------------------------------------------------------------- /esy.lock/opam/astring.0.8.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/astring" 5 | doc: "http://erratique.ch/software/astring/doc" 6 | dev-repo: "git+http://erratique.ch/repos/astring.git" 7 | bug-reports: "https://github.com/dbuenzli/astring/issues" 8 | tags: [ "string" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "base-bytes" 16 | ] 17 | build: [[ 18 | "ocaml" "pkg/pkg.ml" "build" 19 | "--pinned" "%{pinned}%" ]] 20 | synopsis: "Alternative String module for OCaml" 21 | description: """ 22 | Astring exposes an alternative `String` module for OCaml. This module 23 | tries to balance minimality and expressiveness for basic, index-free, 24 | string processing and provides types and functions for substrings, 25 | string sets and string maps. 26 | 27 | Remaining compatible with the OCaml `String` module is a non-goal. The 28 | `String` module exposed by Astring has exception safe functions, 29 | removes deprecated and rarely used functions, alters some signatures 30 | and names, adds a few missing functions and fully exploits OCaml's 31 | newfound string immutability. 32 | 33 | Astring depends only on the OCaml standard library. It is distributed 34 | under the ISC license.""" 35 | url { 36 | src: "http://erratique.ch/software/astring/releases/astring-0.8.3.tbz" 37 | checksum: "md5=c5bf6352b9ac27fbeab342740f4fa870" 38 | } 39 | -------------------------------------------------------------------------------- /esy.lock/opam/tyxml.4.3.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "dev@ocsigen.org" 3 | homepage: "https://github.com/ocsigen/tyxml/" 4 | bug-reports: "https://github.com/ocsigen/tyxml/issues" 5 | doc: "https://ocsigen.org/tyxml/manual/" 6 | dev-repo: "git+https://github.com/ocsigen/tyxml.git" 7 | license: "LGPL-2.1 with OCaml linking exception" 8 | 9 | build: [ 10 | ["dune" "subst"] {pinned} 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | 15 | depends: [ 16 | "ocaml" {>= "4.02"} 17 | "re" {>= "1.5.0"} 18 | ("ocaml" {>= "4.07"} | "re" {>= "1.8.0"}) 19 | "dune" 20 | "alcotest" {with-test} 21 | "seq" 22 | "uutf" {>= "1.0.0"} 23 | ] 24 | 25 | synopsis:"TyXML is a library for building correct HTML and SVG documents" 26 | description:""" 27 | TyXML provides a set of convenient combinators that uses the OCaml 28 | type system to ensure the validity of the generated documents. TyXML 29 | can be used with any representation of HTML and SVG: the textual one, 30 | provided directly by this package, or DOM trees (`js_of_ocaml-tyxml`) 31 | virtual DOM (`virtual-dom`) and reactive or replicated trees 32 | (`eliom`). You can also create your own representation and use it to 33 | instantiate a new set of combinators. 34 | 35 | ```ocaml 36 | open Tyxml 37 | let to_ocaml = Html.(a ~a:[a_href "ocaml.org"] [txt "OCaml!"]) 38 | ``` 39 | """ 40 | authors: "The ocsigen team" 41 | url { 42 | src: 43 | "https://github.com/ocsigen/tyxml/releases/download/4.3.0/tyxml-4.3.0.tbz" 44 | checksum: "md5=fd834a567f813bf447cab5f4c3a723e2" 45 | } 46 | -------------------------------------------------------------------------------- /esy.lock/opam/uutf.1.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/uutf" 5 | doc: "http://erratique.ch/software/uutf/doc/Uutf" 6 | dev-repo: "git+http://erratique.ch/repos/uutf.git" 7 | bug-reports: "https://github.com/dbuenzli/uutf/issues" 8 | tags: [ "unicode" "text" "utf-8" "utf-16" "codec" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "uchar" 16 | ] 17 | depopts: ["cmdliner"] 18 | conflicts: ["cmdliner" { < "0.9.6"} ] 19 | build: [[ 20 | "ocaml" "pkg/pkg.ml" "build" 21 | "--pinned" "%{pinned}%" 22 | "--with-cmdliner" "%{cmdliner:installed}%" ]] 23 | synopsis: """Non-blocking streaming Unicode codec for OCaml""" 24 | description: """\ 25 | 26 | Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 27 | UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently 28 | work character by character without blocking on IO. Decoders perform 29 | character position tracking and support newline normalization. 30 | 31 | Functions are also provided to fold over the characters of UTF encoded 32 | OCaml string values and to directly encode characters in OCaml 33 | Buffer.t values. 34 | 35 | Uutf has no dependency and is distributed under the ISC license. 36 | """ 37 | url { 38 | archive: "http://erratique.ch/software/uutf/releases/uutf-1.0.2.tbz" 39 | checksum: "a7c542405a39630c689a82bd7ef2292c" 40 | } 41 | -------------------------------------------------------------------------------- /esy.lock/opam/decoders.0.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "Elm-inspired decoders for Ocaml" 3 | description: """ 4 | A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. 5 | 6 | > Eh? 7 | 8 | An Ocaml program having a JSON (or YAML) data source usually goes something like this: 9 | 10 | 1. Get your data from somewhere. Now you have a `string`. 11 | 2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. 12 | 3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. 13 | 14 | This library helps with step 3. 15 | """ 16 | maintainer: "Matt Bray " 17 | authors: "Matt Bray " 18 | license: "ISC" 19 | homepage: "https://github.com/mattjbray/ocaml-decoders" 20 | doc: "https://mattjbray.github.io/ocaml-decoders/decoders" 21 | bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" 22 | depends: [ 23 | "ocaml" 24 | "dune" 25 | "containers" 26 | ] 27 | build: ["dune" "build" "-p" name "-j" jobs] 28 | dev-repo: "git+ssh://git@github.com/mattjbray/ocaml-decoders.git" 29 | url { 30 | src: 31 | "https://github.com/mattjbray/ocaml-decoders/releases/download/v0.2.0/decoders-v0.2.0.tbz" 32 | checksum: [ 33 | "sha256=62b3e2706dafe526c832bce2ea871f01d50b0464baf9bb90db3a819ebdf17e65" 34 | "sha512=8c564b7bf01b906a384128f588c323425db2af3476ff83f1e4ed1773786a2f444949b9e6b81f5ba1e405cc5dd0a782ed10cdea55005be289660c5bc81e6481d5" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/zarith.1.7/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "zarith" 3 | version: "1.7" 4 | maintainer: "Xavier Leroy " 5 | authors: [ 6 | "Antoine Miné" 7 | "Xavier Leroy" 8 | "Pascal Cuoq" 9 | ] 10 | homepage: "https://github.com/ocaml/Zarith" 11 | bug-reports: "https://github.com/ocaml/Zarith/issues" 12 | dev-repo: "git+https://github.com/ocaml/Zarith.git" 13 | build: [ 14 | ["./configure"] {os != "openbsd" & os != "freebsd" & os != "macos"} 15 | [ 16 | "sh" 17 | "-exc" 18 | "LDFLAGS=\"$LDFLAGS -L/usr/local/lib\" CFLAGS=\"$CFLAGS -I/usr/local/include\" ./configure" 19 | ] {os = "openbsd" | os = "freebsd"} 20 | [ 21 | "sh" 22 | "-exc" 23 | "LDFLAGS=\"$LDFLAGS -L/opt/local/lib -L/usr/local/lib\" CFLAGS=\"$CFLAGS -I/opt/local/include -I/usr/local/include\" ./configure" 24 | ] {os = "macos"} 25 | [make] 26 | ] 27 | install: [ 28 | [make "install"] 29 | ] 30 | remove: ["ocamlfind" "remove" "zarith"] 31 | depends: [ 32 | "ocaml" 33 | "ocamlfind" 34 | "conf-gmp" 35 | "conf-perl" {build} 36 | ] 37 | synopsis: 38 | "Implements arithmetic and logical operations over arbitrary-precision integers" 39 | description: """ 40 | The Zarith library implements arithmetic and logical operations over 41 | arbitrary-precision integers. It uses GMP to efficiently implement 42 | arithmetic over big integers. Small integers are represented as Caml 43 | unboxed integers, for speed and space economy.""" 44 | flags: light-uninstall 45 | url { 46 | src: "https://github.com/ocaml/Zarith/archive/release-1.7.tar.gz" 47 | checksum: "md5=80944e2755ebb848451a77dc2ad0651b" 48 | } 49 | -------------------------------------------------------------------------------- /esy.lock/opam/fmt.0.8.6/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: [ "The fmt programmers" ] 4 | homepage: "https://erratique.ch/software/fmt" 5 | doc: "https://erratique.ch/software/fmt" 6 | dev-repo: "git+https://erratique.ch/repos/fmt.git" 7 | bug-reports: "https://github.com/dbuenzli/fmt/issues" 8 | tags: [ "string" "format" "pretty-print" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build & >= "0.9.0"} 15 | # Can be removed once ocaml >= 4.07 16 | "seq" 17 | "stdlib-shims" 18 | ] 19 | depopts: [ "base-unix" "cmdliner" ] 20 | conflicts: [ "cmdliner" {< "0.9.8"} ] 21 | build: [[ 22 | "ocaml" "pkg/pkg.ml" "build" 23 | "--dev-pkg" "%{pinned}%" 24 | "--with-base-unix" "%{base-unix:installed}%" 25 | "--with-cmdliner" "%{cmdliner:installed}%" ]] 26 | 27 | synopsis: """OCaml Format pretty-printer combinators""" 28 | description: """\ 29 | 30 | Fmt exposes combinators to devise `Format` pretty-printing functions. 31 | 32 | Fmt depends only on the OCaml standard library. The optional `Fmt_tty` 33 | library that allows to setup formatters for terminal color output 34 | depends on the Unix library. The optional `Fmt_cli` library that 35 | provides command line support for Fmt depends on [`Cmdliner`][cmdliner]. 36 | 37 | Fmt is distributed under the ISC license. 38 | 39 | [cmdliner]: http://erratique.ch/software/cmdliner 40 | """ 41 | url { 42 | archive: "https://erratique.ch/software/fmt/releases/fmt-0.8.6.tbz" 43 | checksum: "5407789e5f0ea42272ca19353b1abfd3" 44 | } 45 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 as esy 2 | 3 | ENV TERM=dumb LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib 4 | 5 | ARG DB_CONNECTION=postgresql://postgres:postgres@localhost:5432/community_test 6 | ENV DB_CONNECTION ${DB_CONNECTION} 7 | 8 | RUN apk add --no-cache ca-certificates wget bash curl perl-utils git patch gcc g++ musl-dev make m4 gmp-dev linux-headers openssl-dev postgresql-libs postgresql-dev nodejs nodejs-npm 9 | 10 | RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub 11 | RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk 12 | RUN apk add --no-cache glibc-2.28-r0.apk 13 | 14 | RUN npm install -g --unsafe-perm esy@latest 15 | 16 | RUN mkdir /app 17 | WORKDIR /app 18 | 19 | COPY . . 20 | 21 | RUN esy install 22 | RUN esy build 23 | 24 | RUN esy test 25 | RUN esy e2e 26 | 27 | RUN esy bash -c 'cp $cur__target_dir/default/executable/ReasonmlPostgresApp.exe bootstrap' 28 | 29 | # now that we have build everthing, let's just use the binary 30 | 31 | FROM alpine:3.9 as slim 32 | 33 | ENV TERM=dumb LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib 34 | 35 | WORKDIR / 36 | 37 | COPY --from=esy /app/bootstrap ./bootstrap 38 | 39 | RUN apk add --no-cache ca-certificates wget bash curl perl-utils git patch gcc g++ musl-dev make m4 gmp-dev linux-headers openssl-dev postgresql-libs postgresql-dev 40 | 41 | RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub 42 | RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk 43 | RUN apk add --no-cache glibc-2.28-r0.apk 44 | 45 | ENTRYPOINT [ "./bootstrap" ] 46 | -------------------------------------------------------------------------------- /esy.lock/opam/cmdliner.1.0.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/cmdliner" 5 | doc: "http://erratique.ch/software/cmdliner/doc/Cmdliner" 6 | dev-repo: "git+http://erratique.ch/repos/cmdliner.git" 7 | bug-reports: "https://github.com/dbuenzli/cmdliner/issues" 8 | tags: [ "cli" "system" "declarative" "org:erratique" ] 9 | license: "ISC" 10 | depends:[ "ocaml" {>= "4.03.0"} ] 11 | build: [[ make "all" "PREFIX=%{prefix}%" ]] 12 | install: 13 | [[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%" ] 14 | [make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%" ]] 15 | 16 | synopsis: """Declarative definition of command line interfaces for OCaml""" 17 | description: """\ 18 | 19 | Cmdliner allows the declarative definition of command line interfaces 20 | for OCaml. 21 | 22 | It provides a simple and compositional mechanism to convert command 23 | line arguments to OCaml values and pass them to your functions. The 24 | module automatically handles syntax errors, help messages and UNIX man 25 | page generation. It supports programs with single or multiple commands 26 | and respects most of the [POSIX][1] and [GNU][2] conventions. 27 | 28 | Cmdliner has no dependencies and is distributed under the ISC license. 29 | 30 | [1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html 31 | [2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html 32 | """ 33 | url { 34 | archive: "http://erratique.ch/software/cmdliner/releases/cmdliner-1.0.4.tbz" 35 | checksum: "fe2213d0bc63b1e10a2d0aa66d2fc8d9" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/magic-mime.1.1.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "magic-mime" 3 | synopsis: "Map filenames to common MIME types" 4 | description: """ 5 | This library contains a database of MIME types that maps filename extensions 6 | into MIME types suitable for use in many Internet protocols such as HTTP or 7 | e-mail. It is generated from the `mime.types` file found in Unix systems, but 8 | has no dependency on a filesystem since it includes the contents of the 9 | database as an ML datastructure. 10 | 11 | For example, here's how to lookup MIME types in the [utop] REPL: 12 | 13 | #require "magic-mime";; 14 | Magic_mime.lookup "/foo/bar.txt";; 15 | - : bytes = "text/plain" 16 | Magic_mime.lookup "bar.css";; 17 | - : bytes = "text/css" 18 | """ 19 | maintainer: "Anil Madhavapeddy " 20 | authors: ["Anil Madhavapeddy" "Maxence Guesdon"] 21 | license: "ISC" 22 | homepage: "https://github.com/mirage/ocaml-magic-mime" 23 | doc: "https://mirage.github.io/ocaml-magic-mime/" 24 | bug-reports: "https://github.com/mirage/ocaml-magic-mime/issues" 25 | dev-repo: "git+https://github.com/mirage/ocaml-magic-mime.git" 26 | depends: [ 27 | "ocaml" {>= "4.03.0"} 28 | "dune" 29 | ] 30 | build: [ 31 | ["dune" "subst"] {pinned} 32 | ["dune" "build" "-p" name "-j" jobs] 33 | ] 34 | url { 35 | src: 36 | "https://github.com/mirage/ocaml-magic-mime/releases/download/v1.1.2/magic-mime-v1.1.2.tbz" 37 | checksum: [ 38 | "sha256=0c590bbc747531b56d392ee8f063d879df1e2026ba2dfa2d1bc98c9a9acb04eb" 39 | "sha512=8264db78adc2c75b8adabc23c26ad34eab98383bd3a8f2068f2236ff3425d653c0238fbd7361e55a3d70d843413ef8671b6e97293074b4d3a1e300628d5292ab" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "A library manager for OCaml" 3 | maintainer: "Thomas Gazagnaire " 4 | authors: "Gerd Stolpmann " 5 | homepage: "http://projects.camlcity.org/projects/findlib.html" 6 | bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" 7 | dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" 8 | description: """ 9 | Findlib is a library manager for OCaml. It provides a convention how 10 | to store libraries, and a file format ("META") to describe the 11 | properties of libraries. There is also a tool (ocamlfind) for 12 | interpreting the META files, so that it is very easy to use libraries 13 | in programs and scripts. 14 | """ 15 | build: [ 16 | [ 17 | "./configure" 18 | "-bindir" 19 | bin 20 | "-sitelib" 21 | lib 22 | "-mandir" 23 | man 24 | "-config" 25 | "%{lib}%/findlib.conf" 26 | "-no-custom" 27 | "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} 28 | "-no-topfind" {ocaml:preinstalled} 29 | ] 30 | [make "all"] 31 | [make "opt"] {ocaml:native} 32 | ] 33 | install: [ 34 | [make "install"] 35 | ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} 36 | ] 37 | depends: [ 38 | "ocaml" {>= "4.00.0"} 39 | "conf-m4" {build} 40 | ] 41 | extra-files: [ 42 | ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] 43 | ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] 44 | ] 45 | url { 46 | src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" 47 | checksum: "md5=18ca650982c15536616dea0e422cbd8c" 48 | mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" 49 | } 50 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocplib_endian_opam__c__1.0_opam_override/files/ocplib-endian-0.8.patch: -------------------------------------------------------------------------------- 1 | --- ./myocamlbuild.ml 2 | +++ ./myocamlbuild.ml 3 | @@ -573,6 +573,24 @@ 4 | Add a dependency after dropping support for 4.01 and earlier. *) 5 | let dispatch_cppo = function 6 | | After_rules -> begin 7 | + let is_directory s = 8 | + let slen = String.length s in 9 | + let s = 10 | + if Sys.os_type <> "Win32" || slen < 2 then 11 | + s 12 | + else 13 | + match s.[slen-1] with 14 | + | '\\' | '/' -> 15 | + if slen <> 3 || s.[1] <> ':' then 16 | + String.sub s 0 (slen -1) 17 | + else 18 | + (match s.[0] with 19 | + | 'A' .. 'Z' | 'a' .. 'z' -> s 20 | + | _ -> String.sub s 0 (slen -1)) 21 | + | _ -> s 22 | + in 23 | + Pathname.is_directory s 24 | + in 25 | let cppo_rules ext = 26 | let dep = "%(name).cppo"-.-ext 27 | and prod1 = "%(name: <*> and not <*.cppo>)"-.-ext 28 | @@ -591,11 +609,11 @@ 29 | pflag ["cppo"] "cppo_D" (fun s -> S [A "-D"; A s]) ; 30 | pflag ["cppo"] "cppo_U" (fun s -> S [A "-U"; A s]) ; 31 | pflag ["cppo"] "cppo_I" (fun s -> 32 | - if Pathname.is_directory s then S [A "-I"; P s] 33 | + if is_directory s then S [A "-I"; P s] 34 | else S [A "-I"; P (Pathname.dirname s)] 35 | ) ; 36 | pdep ["cppo"] "cppo_I" (fun s -> 37 | - if Pathname.is_directory s then [] else [s]) ; 38 | + if is_directory s then [] else [s]) ; 39 | flag ["cppo"; "cppo_q"] (A "-q") ; 40 | flag ["cppo"; "cppo_s"] (A "-s") ; 41 | flag ["cppo"; "cppo_n"] (A "-n") ; 42 | -------------------------------------------------------------------------------- /esy.lock/opam/ocplib-endian.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | authors: "Pierre Chambart" 3 | maintainer: "pierre.chambart@ocamlpro.com" 4 | homepage: "https://github.com/OCamlPro/ocplib-endian" 5 | build: [ 6 | ["ocaml" "setup.ml" "-configure" "--disable-debug" "--prefix" prefix] 7 | ["ocaml" "setup.ml" "-build"] 8 | ] 9 | install: [ 10 | ["ocaml" "setup.ml" "-install"] 11 | ] 12 | remove: ["ocamlfind" "remove" "ocplib-endian"] 13 | depends: [ 14 | "ocaml" 15 | "base-bytes" 16 | "ocamlfind" 17 | "cppo" {>= "1.1.0"} 18 | "ocamlbuild" {build} 19 | ] 20 | dev-repo: "git+https://github.com/OCamlPro/ocplib-endian.git" 21 | bug-reports: "https://github.com/OCamlPro/ocplib-endian/issues" 22 | synopsis: 23 | "Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01." 24 | description: """ 25 | The library implements three modules: 26 | * [EndianString](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianString.cppo.mli) works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; 27 | * [EndianBytes](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianBytes.cppo.mli) works directly on bytes, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; 28 | * [EndianBigstring](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianBigstring.cppo.mli) works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts;""" 29 | flags: light-uninstall 30 | url { 31 | src: "https://github.com/OCamlPro/ocplib-endian/archive/1.0.tar.gz" 32 | checksum: "md5=74b45ba33e189283170a748c2a3ed477" 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/decoders-yojson.0.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "Elm-inspired decoders for Ocaml" 3 | description: """ 4 | A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. 5 | 6 | > Eh? 7 | 8 | An Ocaml program having a JSON (or YAML) data source usually goes something like this: 9 | 10 | 1. Get your data from somewhere. Now you have a `string`. 11 | 2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. 12 | 3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. 13 | 14 | This library helps with step 3. 15 | """ 16 | maintainer: "Matt Bray " 17 | authors: "Matt Bray " 18 | license: "ISC" 19 | homepage: "https://github.com/mattjbray/ocaml-decoders" 20 | doc: "https://mattjbray.github.io/ocaml-decoders/decoders-yojson" 21 | bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" 22 | depends: [ 23 | "ocaml" 24 | "dune" 25 | "ounit" {with-test} 26 | "decoders" 27 | "yojson" 28 | ] 29 | build: [ 30 | ["dune" "build" "-p" name "-j" jobs] 31 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 32 | ] 33 | dev-repo: "git+ssh://git@github.com/mattjbray/ocaml-decoders.git" 34 | url { 35 | src: 36 | "https://github.com/mattjbray/ocaml-decoders/releases/download/v0.2.0/decoders-v0.2.0.tbz" 37 | checksum: [ 38 | "sha256=62b3e2706dafe526c832bce2ea871f01d50b0464baf9bb90db3a819ebdf17e65" 39 | "sha512=8c564b7bf01b906a384128f588c323425db2af3476ff83f1e4ed1773786a2f444949b9e6b81f5ba1e405cc5dd0a782ed10cdea55005be289660c5bc81e6481d5" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # reasonml-postgres 2 | 3 | **Contains the following libraries and executables:** 4 | 5 | ``` 6 | reasonml-postgres@0.0.0 7 | │ 8 | ├─test/ 9 | │ name: TestReasonmlPostgres.exe 10 | │ require: reasonml-postgres/library 11 | │ 12 | ├─integration/ 13 | │ name: IntegrationReasonmlPostgres.exe 14 | │ require: reasonml-postgres/library 15 | │ 16 | ├─library/ 17 | │ library name: reasonml-postgres/library 18 | │ require: 19 | │ 20 | └─executable/ 21 | name: ReasonmlPostgresApp.exe 22 | require: reasonml-postgres/library 23 | ``` 24 | 25 | ## Developing: 26 | 27 | ``` 28 | npm install -g esy@next 29 | git clone 30 | esy install 31 | esy build 32 | ``` 33 | 34 | ### MacOS: 35 | 36 | ``` 37 | brew install postgres 38 | ``` 39 | 40 | Also make sure you disable esy sandboxing 41 | 42 | ### Ubuntu: 43 | 44 | ``` 45 | sudo apt-get install libpq-dev libssl-dev pkg-config 46 | ``` 47 | 48 | ## If you experience: 49 | 50 | `Operation not permitted mkdir ... .graphql_ppx_cache/` 51 | 52 | Temporarily add this to the esy section of your package.json. 53 | 54 | ``` 55 | "esy": { 56 | "buildsInSource": "unsafe" 57 | } 58 | ``` 59 | 60 | ## Running Binary: 61 | 62 | After building the project, you can run the main binary that is produced. 63 | 64 | ``` 65 | esy start 66 | ``` 67 | 68 | ## Running Tests: 69 | 70 | ``` 71 | # Runs the "test" command in `package.json`. 72 | esy test 73 | ``` 74 | 75 | ## Runnin Repl: 76 | 77 | ``` 78 | esy dune utop library 79 | #require "rtop";; 80 | open Library; 81 | #show Schema; 82 | ``` 83 | 84 | ## Kubernetes: 85 | 86 | ## Create Secrets 87 | 88 | ```bash 89 | kubectl create secret generic postgres --from-literal=db-connection='YOUR_DB_CONNECTION' 90 | ``` 91 | -------------------------------------------------------------------------------- /esy.lock/opam/ppxlib.0.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml-ppx/ppxlib" 5 | bug-reports: "https://github.com/ocaml-ppx/ppxlib/issues" 6 | dev-repo: "git+https://github.com/ocaml-ppx/ppxlib.git" 7 | doc: "https://ocaml-ppx.github.io/ppxlib/" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "subst"] {pinned} 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ] 13 | run-test: [ 14 | ["dune" "runtest" "-p" name "-j" jobs] { ocaml >= "4.06" } 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.04.1" & < "4.08.0"} 18 | "base" {>= "v0.11.0" & < "v0.13"} 19 | "dune" 20 | "ocaml-compiler-libs" {>= "v0.11.0"} 21 | "ocaml-migrate-parsetree" {>= "1.0.9"} 22 | "ppx_derivers" {>= "1.0"} 23 | "stdio" {>= "v0.11.0" & < "v0.13"} 24 | "ocamlfind" {with-test} 25 | ] 26 | synopsis: "Base library and tools for ppx rewriters" 27 | description: """ 28 | A comprehensive toolbox for ppx development. It features: 29 | - a OCaml AST / parser / pretty-printer snapshot,to create a full 30 | frontend independent of the version of OCaml; 31 | - a library for library for ppx rewriters in general, and type-driven 32 | code generators in particular; 33 | - a feature-full driver for OCaml AST transformers; 34 | - a quotation mechanism allowing to write values representing the 35 | OCaml AST in the OCaml syntax; 36 | - a generator of open recursion classes from type definitions. 37 | """ 38 | url { 39 | src: 40 | "https://github.com/ocaml-ppx/ppxlib/releases/download/0.5.0/ppxlib-0.5.0.tbz" 41 | checksum: "md5=bb278ff6e819e0e4a4d8a005bb2512a4" 42 | } 43 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt.4.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "Promises and event-driven I/O" 4 | 5 | license: "MIT" 6 | homepage: "https://github.com/ocsigen/lwt" 7 | doc: "https://ocsigen.org/lwt/manual/" 8 | bug-reports: "https://github.com/ocsigen/lwt/issues" 9 | 10 | authors: [ 11 | "Jérôme Vouillon" 12 | "Jérémie Dimino" 13 | ] 14 | maintainer: [ 15 | "Anton Bachin " 16 | "Mauricio Fernandez " 17 | "Simon Cruanes " 18 | ] 19 | dev-repo: "git+https://github.com/ocsigen/lwt.git" 20 | 21 | depends: [ 22 | "cppo" {build & >= "1.1.0"} 23 | "dune" 24 | "mmap" # mmap is needed as long as Lwt supports OCaml < 4.06.0. 25 | "ocaml" {>= "4.02.0"} 26 | "result" # result is needed as long as Lwt supports OCaml 4.02. 27 | "seq" # seq is needed as long as Lwt supports OCaml < 4.07.0. 28 | 29 | "bisect_ppx" {dev & >= "1.3.0"} 30 | "ocamlfind" {dev & >= "1.7.3-1"} 31 | ] 32 | depopts: [ 33 | "base-threads" 34 | "base-unix" 35 | "conf-libev" 36 | ] 37 | 38 | conflicts: [ 39 | "ocaml-variants" {= "4.02.1+BER"} 40 | ] 41 | 42 | build: [ 43 | ["dune" "build" "-p" name "-j" jobs] 44 | ] 45 | 46 | description: "A promise is a value that may become determined in the future. 47 | 48 | Lwt provides typed, composable promises. Promises that are resolved by I/O are 49 | resolved by Lwt in parallel. 50 | 51 | Meanwhile, OCaml code, including code creating and waiting on promises, runs in 52 | a single thread by default. This reduces the need for locks or other 53 | synchronization primitives. Code can be run in parallel on an opt-in basis." 54 | 55 | url { 56 | src: "https://github.com/ocsigen/lwt/archive/4.2.1.tar.gz" 57 | checksum: "md5=9d648386ca0a9978eb9487de36b781cc" 58 | } 59 | -------------------------------------------------------------------------------- /esy.lock/opam/parsexp.v0.12.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/parsexp" 5 | bug-reports: "https://github.com/janestreet/parsexp/issues" 6 | dev-repo: "git+https://github.com/janestreet/parsexp.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/parsexp/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "base" {>= "v0.12" & < "v0.13"} 15 | "sexplib0" {>= "v0.12" & < "v0.13"} 16 | "dune" {>= "1.5.1"} 17 | ] 18 | synopsis: "S-expression parsing library" 19 | description: " 20 | This library provides generic parsers for parsing S-expressions from 21 | strings or other medium. 22 | 23 | The library is focused on performances but still provide full generic 24 | parsers that can be used with strings, bigstrings, lexing buffers, 25 | character streams or any other sources effortlessly. 26 | 27 | It provides three different class of parsers: 28 | - the normal parsers, producing [Sexp.t] or [Sexp.t list] values 29 | - the parsers with positions, building compact position sequences so 30 | that one can recover original positions in order to report properly 31 | located errors at little cost 32 | - the Concrete Syntax Tree parsers, produce values of type 33 | [Parsexp.Cst.t] which record the concrete layout of the s-expression 34 | syntax, including comments 35 | 36 | This library is portable and doesn't provide IO functions. To read 37 | s-expressions from files or other external sources, you should use 38 | parsexp_io. 39 | " 40 | url { 41 | src: "https://ocaml.janestreet.com/ocaml-core/v0.12/files/parsexp-v0.12.0.tar.gz" 42 | checksum: "md5=741b2c6f59b9618e3affabaa34d468a2" 43 | } 44 | -------------------------------------------------------------------------------- /esy.lock/opam/ptime.0.8.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["The ptime programmers"] 4 | homepage: "https://erratique.ch/software/ptime" 5 | doc: "https://erratique.ch/software/ptime/doc" 6 | dev-repo: "git+http://erratique.ch/repos/ptime.git" 7 | bug-reports: "https://github.com/dbuenzli/ptime/issues" 8 | tags: [ "time" "posix" "system" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "result" 16 | ] 17 | depopts: [ "js_of_ocaml" ] 18 | conflicts: [ "js_of_ocaml" { < "3.3.0" } ] 19 | build:[[ 20 | "ocaml" "pkg/pkg.ml" "build" 21 | "--pinned" "%{pinned}%" 22 | "--with-js_of_ocaml" "%{js_of_ocaml:installed}%" ]] 23 | 24 | synopsis: """POSIX time for OCaml""" 25 | description: """\ 26 | 27 | Ptime has platform independent POSIX time support in pure OCaml. It 28 | provides a type to represent a well-defined range of POSIX timestamps 29 | with picosecond precision, conversion with date-time values, 30 | conversion with [RFC 3339 timestamps][rfc3339] and pretty printing to a 31 | human-readable, locale-independent representation. 32 | 33 | The additional Ptime_clock library provides access to a system POSIX 34 | clock and to the system's current time zone offset. 35 | 36 | Ptime is not a calendar library. 37 | 38 | Ptime depends on the `result` compatibility package. Ptime_clock 39 | depends on your system library. Ptime_clock's optional JavaScript 40 | support depends on [js_of_ocaml][jsoo]. Ptime and its libraries are 41 | distributed under the ISC license. 42 | 43 | [rfc3339]: http://tools.ietf.org/html/rfc3339 44 | [jsoo]: http://ocsigen.org/js_of_ocaml/ 45 | """ 46 | url { 47 | archive: "https://erratique.ch/software/ptime/releases/ptime-0.8.5.tbz" 48 | checksum: "4d48055d623ecf2db792439b3e96a520" 49 | } 50 | -------------------------------------------------------------------------------- /esy.lock/opam/cohttp-lwt.2.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" 5 | "Stefano Zacchiroli" 6 | "David Sheets" 7 | "Thomas Gazagnaire" 8 | "David Scott" 9 | "Rudi Grinberg" 10 | "Andy Ray" 11 | ] 12 | synopsis: "CoHTTP implementation using the Lwt concurrency library" 13 | description: """ 14 | This is a portable implementation of HTTP that uses the Lwt 15 | concurrency library to multiplex IO. It implements as much of the 16 | logic in an OS-independent way as possible, so that more specialised 17 | modules can be tailored for different targets. For example, you 18 | can install `cohttp-lwt-unix` or `cohttp-lwt-jsoo` for a Unix or 19 | JavaScript backend, or `cohttp-mirage` for the MirageOS unikernel 20 | version of the library. All of these implementations share the same 21 | IO logic from this module.""" 22 | license: "ISC" 23 | tags: ["org:mirage" "org:xapi-project"] 24 | homepage: "https://github.com/mirage/ocaml-cohttp" 25 | doc: "https://mirage.github.io/ocaml-cohttp/" 26 | bug-reports: "https://github.com/mirage/ocaml-cohttp/issues" 27 | depends: [ 28 | "ocaml" {>= "4.04.1"} 29 | "dune" {>= "1.1.0"} 30 | "cohttp" {=version} 31 | "lwt" {>= "2.5.0"} 32 | "sexplib0" 33 | "ppx_sexp_conv" {>= "v0.9.0"} 34 | "logs" 35 | ] 36 | build: [ 37 | ["dune" "subst"] {pinned} 38 | ["dune" "build" "-p" name "-j" jobs] 39 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 40 | ] 41 | dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git" 42 | url { 43 | src: 44 | "https://github.com/mirage/ocaml-cohttp/releases/download/v2.2.0/cohttp-v2.2.0.tbz" 45 | checksum: [ 46 | "sha256=7b504359cfaa8d02ffdf1e2d03100ea9d1d552defeb3679e99960196ac2cea29" 47 | "sha512=d49a43856817ffcda1b1f242e1f6fb3fe23139186f2b6ffc8927810b9c8bf874cd7c1807904f76184a2fb5116e588e689032eafd2e1e33b83e7c31704e42941d" 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /esy.lock/opam/cohttp-lwt-unix.2.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" 5 | "Stefano Zacchiroli" 6 | "David Sheets" 7 | "Thomas Gazagnaire" 8 | "David Scott" 9 | "Rudi Grinberg" 10 | "Andy Ray" 11 | ] 12 | synopsis: "CoHTTP implementation for Unix and Windows using Lwt" 13 | description: """ 14 | An implementation of an HTTP client and server using the Lwt 15 | concurrency library. See the `Cohttp_lwt_unix` module for information 16 | on how to use this. The package also installs `cohttp-curl-lwt` 17 | and a `cohttp-server-lwt` binaries for quick uses of a HTTP(S) 18 | client and server respectively. 19 | 20 | Although the name implies that this only works under Unix, it 21 | should also be fine under Windows too.""" 22 | license: "ISC" 23 | tags: ["org:mirage" "org:xapi-project"] 24 | homepage: "https://github.com/mirage/ocaml-cohttp" 25 | doc: "https://mirage.github.io/ocaml-cohttp/" 26 | bug-reports: "https://github.com/mirage/ocaml-cohttp/issues" 27 | depends: [ 28 | "ocaml" {>= "4.04.1"} 29 | "dune" {>= "1.1.0"} 30 | "conduit-lwt-unix" {>= "1.0.3"} 31 | "cmdliner" 32 | "magic-mime" 33 | "logs" 34 | "fmt" {>= "0.8.2"} 35 | "cohttp-lwt" {=version} 36 | "lwt" {>= "3.0.0"} 37 | "base-unix" 38 | "ounit" {with-test} 39 | ] 40 | build: [ 41 | ["dune" "subst"] {pinned} 42 | ["dune" "build" "-p" name "-j" jobs] 43 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 44 | ] 45 | dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git" 46 | url { 47 | src: 48 | "https://github.com/mirage/ocaml-cohttp/releases/download/v2.2.0/cohttp-v2.2.0.tbz" 49 | checksum: [ 50 | "sha256=7b504359cfaa8d02ffdf1e2d03100ea9d1d552defeb3679e99960196ac2cea29" 51 | "sha512=d49a43856817ffcda1b1f242e1f6fb3fe23139186f2b6ffc8927810b9c8bf874cd7c1807904f76184a2fb5116e588e689032eafd2e1e33b83e7c31704e42941d" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /esy.lock/opam/easy-format.1.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/easy-format/issues" 11 | homepage: "https://github.com/mjambon/easy-format" 12 | doc: "https://mjambon.github.io/easy-format/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/easy-format.git" 15 | synopsis: 16 | "High-level and functional interface to the Format module of the OCaml standard library" 17 | description: """ 18 | 19 | This module offers a high-level and functional interface to the Format module of 20 | the OCaml standard library. It is a pretty-printing facility, i.e. it takes as 21 | input some code represented as a tree and formats this code into the most 22 | visually satisfying result, breaking and indenting lines of code where 23 | appropriate. 24 | 25 | Input data must be first modelled and converted into a tree using 3 kinds of 26 | nodes: 27 | 28 | * atoms 29 | * lists 30 | * labelled nodes 31 | 32 | Atoms represent any text that is guaranteed to be printed as-is. Lists can model 33 | any sequence of items such as arrays of data or lists of definitions that are 34 | labelled with something like "int main", "let x =" or "x:".""" 35 | depends: [ 36 | "dune" {>= "1.10"} 37 | "ocaml" {>= "4.02.3"} 38 | ] 39 | url { 40 | src: 41 | "https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz" 42 | checksum: [ 43 | "sha256=3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 44 | "sha512=e39377a2ff020ceb9ac29e8515a89d9bdbc91dfcfa871c4e3baafa56753fac2896768e5d9822a050dc1e2ade43c8967afb69391a386c0a8ecd4e1f774e236135" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /esy.lock/opam/biniou.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/biniou/issues" 11 | homepage: "https://github.com/mjambon/biniou" 12 | doc: "https://mjambon.github.io/biniou/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/biniou.git" 15 | synopsis: 16 | "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" 17 | description: """ 18 | 19 | Biniou (pronounced "be new") is a binary data format designed for speed, safety, 20 | ease of use and backward compatibility as protocols evolve. Biniou is vastly 21 | equivalent to JSON in terms of functionality but allows implementations several 22 | times faster (4 times faster than yojson), with 25-35% space savings. 23 | 24 | Biniou data can be decoded into human-readable form without knowledge of type 25 | definitions except for field and variant names which are represented by 31-bit 26 | hashes. A program named bdump is provided for routine visualization of biniou 27 | data files. 28 | 29 | The program atdgen is used to derive OCaml-Biniou serializers and deserializers 30 | from type definitions. 31 | 32 | Biniou format specification: mjambon.github.io/atdgen-doc/biniou-format.txt""" 33 | depends: [ 34 | "easy-format" 35 | "dune" {>= "1.10"} 36 | "ocaml" {>= "4.02.3"} 37 | ] 38 | url { 39 | src: 40 | "https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz" 41 | checksum: [ 42 | "sha256=35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 43 | "sha512=82670cc77bf3e869ee26e5fbe5a5affa45a22bc8b6c4bd7e85473912780e0111baca59b34a2c14feae3543ce6e239d7fddaeab24b686a65bfe642cdb91d27ebf" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /esy.lock/opam/digestif.0.7.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "digestif" 3 | maintainer: [ "Eyyüb Sari " 4 | "Romain Calascibetta " ] 5 | authors: [ "Eyyüb Sari " 6 | "Romain Calascibetta " ] 7 | homepage: "https://github.com/mirage/digestif" 8 | bug-reports: "https://github.com/mirage/digestif/issues" 9 | dev-repo: "git+https://github.com/mirage/digestif.git" 10 | doc: "https://mirage.github.io/digestif/" 11 | license: "MIT" 12 | synopsis: "Hashes implementations (SHA*, RIPEMD160, BLAKE2* and MD5)" 13 | description: """ 14 | Digestif is a toolbox to provide hashes implementations in C and OCaml. 15 | 16 | It uses the linking trick and user can decide at the end to use the C implementation or the OCaml implementation. 17 | 18 | We provides implementation of: 19 | * MD5 20 | * SHA1 21 | * SHA224 22 | * SHA256 23 | * SHA384 24 | * SHA512 25 | * BLAKE2B 26 | * BLAKE2S 27 | * RIPEMD160 28 | """ 29 | 30 | build: [ "dune" "build" "-p" name "-j" jobs ] 31 | run-test: [ "dune" "runtest" "-p" name "-j" jobs ] 32 | 33 | depends: [ 34 | "ocaml" {>= "4.03.0"} 35 | "dune" {>= "1.9.2"} 36 | "eqaf" 37 | "base-bytes" 38 | "base-bigarray" 39 | "fmt" {with-test} 40 | "alcotest" {with-test} 41 | ] 42 | 43 | depopts: [ 44 | "ocaml-freestanding" 45 | "mirage-xen-posix" 46 | ] 47 | 48 | conflicts: [ 49 | "mirage-xen-posix" {< "3.1.0"} 50 | "ocaml-freestanding" {< "0.4.3"} 51 | "mirage-runtime" {< "4.0.0"} 52 | ] 53 | url { 54 | src: 55 | "https://github.com/mirage/digestif/releases/download/v0.7.3/digestif-v0.7.3.tbz" 56 | checksum: [ 57 | "sha256=fa0e3fd543b84ab4fb11e2f2333ba51678b0d607895f0f5528e0f640c382cd8e" 58 | "sha512=7c2efbd63d893ab743efa9de0e9c31f47ef84e5319a2293529c8ffd7ced40e2d5906c43ee011bb0aa0020a96e7f67bc5e5e66ac43bafc598d7e08bbeb781a0c5" 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /reasonml-postgres-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: reasonml-postgres-deployment 5 | spec: 6 | selector: 7 | matchLabels: 8 | purpose: reasonml-postgres-config 9 | replicas: 1 10 | template: 11 | metadata: 12 | labels: 13 | purpose: reasonml-postgres-config 14 | spec: 15 | containers: 16 | - name: reasonml-postgres-container 17 | image: gcr.io/radiant-destiny-219301/reasonml-postgres:latest 18 | imagePullPolicy: Always 19 | ports: 20 | - containerPort: 8080 21 | - name: liveness-port 22 | containerPort: 8080 23 | hostPort: 80 24 | livenessProbe: 25 | httpGet: 26 | path: /healthz 27 | port: liveness-port 28 | httpHeaders: 29 | - name: Accept 30 | value: text/html 31 | resources: 32 | limits: 33 | memory: "50Mi" 34 | cpu: "100m" 35 | env: 36 | - name: DB_CONNECTION 37 | valueFrom: 38 | secretKeyRef: 39 | name: postgres 40 | key: db-connection 41 | --- 42 | apiVersion: cloud.google.com/v1beta1 43 | kind: BackendConfig 44 | metadata: 45 | name: reasonml-postgres-backendconfig 46 | spec: 47 | timeoutSec: 86400 48 | connectionDraining: 49 | drainingTimeoutSec: 3600 50 | sessionAffinity: 51 | affinityType: "CLIENT_IP" 52 | --- 53 | apiVersion: v1 54 | kind: Service 55 | metadata: 56 | name: reasonml-postgres-service 57 | labels: 58 | purpose: reasonml-postgres-config 59 | annotations: 60 | cloud.google.com/neg: '{"ingress": true}' 61 | beta.cloud.google.com/backend-config: '{"ports": {"80":"reasonml-postgres-backendconfig"}}' 62 | spec: 63 | type: NodePort 64 | selector: 65 | purpose: reasonml-postgres-config 66 | ports: 67 | - port: 80 68 | protocol: TCP 69 | targetPort: 8080 70 | -------------------------------------------------------------------------------- /esy.lock/opam/caqti.1.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "caqti" 3 | maintainer: "Petter A. Urkedal " 4 | authors: "Petter A. Urkedal " 5 | license: "LGPL-3 with OCaml linking exception" 6 | homepage: "https://github.com/paurkedal/ocaml-caqti/" 7 | doc: "http://paurkedal.github.io/ocaml-caqti/index.html" 8 | bug-reports: "https://github.com/paurkedal/ocaml-caqti/issues" 9 | depends: [ 10 | "ocaml" {>= "4.04.0"} 11 | "dune" 12 | "logs" 13 | "ptime" 14 | "uri" {>= "1.9.0"} 15 | ] 16 | build: [ 17 | ["dune" "build" "-p" name "-j" jobs] 18 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 19 | ] 20 | dev-repo: "git+https://github.com/paurkedal/ocaml-caqti.git" 21 | synopsis: "Unified interface to relational database libraries" 22 | description: """ 23 | Caqti provides a monadic cooperative-threaded OCaml connector API for 24 | relational databases. 25 | 26 | The purpose of Caqti is further to help make applications independent of a 27 | particular database system. This is achieved by defining a common signature, 28 | which is implemented by the database drivers. Connection parameters are 29 | specified as an URI, which is typically provided at run-time. Caqti then 30 | loads a driver which can handle the URI, and provides a first-class module 31 | which implements the driver API and additional convenience functionality. 32 | 33 | Caqti does not make assumptions about the structure of the query language, 34 | and only provides the type information needed at the edges of communication 35 | between the OCaml code and the database; i.e. for encoding parameters and 36 | decoding returned tuples. It is hoped that this agnostic choice makes it a 37 | suitable target for higher level interfaces and code generators.""" 38 | url { 39 | src: 40 | "https://github.com/paurkedal/ocaml-caqti/releases/download/v1.1.0/caqti-v1.1.0.tbz" 41 | checksum: [ 42 | "md5=1dbae4092760be0813823a1936dec1c6" 43 | "sha256=9635da1efb377fc4477a573f8292d4afd781e20dae17e2da7250dc7fbfec5170" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /esy.lock/opam/topkg.1.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/topkg" 5 | doc: "http://erratique.ch/software/topkg/doc" 6 | license: "ISC" 7 | dev-repo: "git+http://erratique.ch/repos/topkg.git" 8 | bug-reports: "https://github.com/dbuenzli/topkg/issues" 9 | tags: ["packaging" "ocamlbuild" "org:erratique"] 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "ocamlfind" {build & >= "1.6.1"} 13 | "ocamlbuild" ] 14 | build: [[ 15 | "ocaml" "pkg/pkg.ml" "build" 16 | "--pkg-name" name 17 | "--dev-pkg" "%{pinned}%" ]] 18 | synopsis: """The transitory OCaml software packager""" 19 | description: """\ 20 | 21 | Topkg is a packager for distributing OCaml software. It provides an 22 | API to describe the files a package installs in a given build 23 | configuration and to specify information about the package's 24 | distribution, creation and publication procedures. 25 | 26 | The optional topkg-care package provides the `topkg` command line tool 27 | which helps with various aspects of a package's life cycle: creating 28 | and linting a distribution, releasing it on the WWW, publish its 29 | documentation, add it to the OCaml opam repository, etc. 30 | 31 | Topkg is distributed under the ISC license and has **no** 32 | dependencies. This is what your packages will need as a *build* 33 | dependency. 34 | 35 | Topkg-care is distributed under the ISC license it depends on 36 | [fmt][fmt], [logs][logs], [bos][bos], [cmdliner][cmdliner], 37 | [webbrowser][webbrowser] and `opam-format`. 38 | 39 | [fmt]: http://erratique.ch/software/fmt 40 | [logs]: http://erratique.ch/software/logs 41 | [bos]: http://erratique.ch/software/bos 42 | [cmdliner]: http://erratique.ch/software/cmdliner 43 | [webbrowser]: http://erratique.ch/software/webbrowser 44 | """ 45 | url { 46 | archive: "http://erratique.ch/software/topkg/releases/topkg-1.0.1.tbz" 47 | checksum: "16b90e066d8972a5ef59655e7c28b3e9" 48 | } 49 | -------------------------------------------------------------------------------- /library/Reddit.re: -------------------------------------------------------------------------------- 1 | open Lwt.Infix; 2 | 3 | module D = Decoders_yojson.Basic.Decode; 4 | 5 | type post = { 6 | id: string, 7 | title: string, 8 | author: string, 9 | ups: int, 10 | }; 11 | 12 | let post_decoder: D.decoder(post) = ( 13 | D.( 14 | field("id", string) 15 | >>= ( 16 | id => 17 | field("title", string) 18 | >>= ( 19 | title => 20 | field("author", string) 21 | >>= ( 22 | author => 23 | field("ups", int) 24 | >>= (ups => succeed({id, title, author, ups})) 25 | ) 26 | ) 27 | ) 28 | ): 29 | D.decoder(post) 30 | ); 31 | 32 | type post_data = {data: post}; 33 | 34 | let post_data_decoder: D.decoder(post_data) = ( 35 | D.(field("data", post_decoder) >>= (data => succeed({data: data}))): 36 | D.decoder(post_data) 37 | ); 38 | 39 | type subreddit = {children: list(post_data)}; 40 | 41 | let subreddit_decoder: D.decoder(subreddit) = ( 42 | D.( 43 | field("children", list(post_data_decoder)) 44 | >>= (children => succeed({children: children})) 45 | ): 46 | D.decoder(subreddit) 47 | ); 48 | 49 | type subreddit_data = {data: subreddit}; 50 | 51 | let subreddit_data_decoder: D.decoder(subreddit_data) = ( 52 | D.(field("data", subreddit_decoder) >>= (data => succeed({data: data}))): 53 | D.decoder(subreddit_data) 54 | ); 55 | 56 | let get_subreddit = (~name) => { 57 | Logs.debug(m => m("Getting subreddit: %s", name)); 58 | 59 | let url = 60 | Uri.of_string(Format.sprintf("https://www.reddit.com/r/%s.json", name)); 61 | Cohttp_lwt_unix.Client.get(url) 62 | >>= ( 63 | ((_resp, body)) => 64 | Cohttp_lwt.Body.to_string(body) 65 | >|= ( 66 | body => { 67 | let decoded = D.(decode_string(subreddit_data_decoder, body)); 68 | switch (decoded) { 69 | | Ok(result) => Ok(Some(result.data)) 70 | | Error(e) => Error(Format.asprintf("%a", D.pp_error, e)) 71 | }; 72 | } 73 | ) 74 | ); 75 | }; 76 | -------------------------------------------------------------------------------- /esy.lock/opam/ocb-stubblr.0.1.1-1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "David Kaloper Meršinjak " 3 | authors: ["David Kaloper Meršinjak "] 4 | homepage: "https://github.com/pqwy/ocb-stubblr" 5 | doc: "https://pqwy.github.io/ocb-stubblr/doc" 6 | license: "ISC" 7 | dev-repo: "git+https://github.com/pqwy/ocb-stubblr.git" 8 | bug-reports: "https://github.com/pqwy/ocb-stubblr/issues" 9 | tags: ["ocamlbuild"] 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {>= "0.9.3" | < "0.9.0"} 14 | "topkg" {>= "0.8.1"} 15 | "astring" 16 | ] 17 | build: [ "ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "false" ] 18 | 19 | patches: [ 20 | "custom-cclib.patch" 21 | "use-OPAM_SWITCH_PREFIX.patch" 22 | ] 23 | 24 | synopsis: "OCamlbuild plugin for C stubs" 25 | description: """ 26 | Do you get excited by C stubs? Do they sometimes make you swoon, and even faint, 27 | and in the end no `cmxa`s get properly linked -- not to mention correct 28 | multi-lib support? 29 | 30 | Do you wish that the things that excite you the most, would excite you just a 31 | little less? Then ocb-stubblr is just the library for you. 32 | 33 | ocb-stubblr is about ten lines of code that you need to repeat over, over, over 34 | and over again if you are using `ocamlbuild` to build OCaml projects that 35 | contain C stubs -- now with 100% more lib! 36 | 37 | It does what everyone wants to do with `.clib` files in their project 38 | directories. It can also clone the `.clib` and arrange for multiple compilations 39 | with different sets of discovered `cflags`. 40 | 41 | ocb-stubblr is distributed under the ISC license.""" 42 | url { 43 | src: 44 | "https://github.com/pqwy/ocb-stubblr/releases/download/v0.1.1/ocb-stubblr-0.1.1.tbz" 45 | checksum: "md5=607720dd18ca51e40645b42df5c1273e" 46 | } 47 | extra-files: [ 48 | [ 49 | "custom-cclib.patch" 50 | "md5=d479b52a50d53dd79da2d6eea2a9a9e3" 51 | ] 52 | [ 53 | "use-OPAM_SWITCH_PREFIX.patch" 54 | "md5=a7271bb1f862bd3da4ffd9caa87ca76f" 55 | ] 56 | ] -------------------------------------------------------------------------------- /esy.lock/opam/dune.1.11.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "Fast, portable and opinionated build system" 3 | description: """ 4 | 5 | dune is a build system that was designed to simplify the release of 6 | Jane Street packages. It reads metadata from "dune" files following a 7 | very simple s-expression syntax. 8 | 9 | dune is fast, it has very low-overhead and support parallel builds on 10 | all platforms. It has no system dependencies, all you need to build 11 | dune and packages using dune is OCaml. You don't need or make or bash 12 | as long as the packages themselves don't use bash explicitly. 13 | 14 | dune supports multi-package development by simply dropping multiple 15 | repositories into the same directory. 16 | 17 | It also supports multi-context builds, such as building against 18 | several opam roots/switches simultaneously. This helps maintaining 19 | packages across several versions of OCaml and gives cross-compilation 20 | for free. 21 | """ 22 | maintainer: ["Jane Street Group, LLC "] 23 | authors: ["Jane Street Group, LLC "] 24 | license: "MIT" 25 | homepage: "https://github.com/ocaml/dune" 26 | doc: "https://dune.readthedocs.io/" 27 | bug-reports: "https://github.com/ocaml/dune/issues" 28 | depends: [ 29 | "ocaml" {>= "4.02"} 30 | "base-unix" 31 | "base-threads" 32 | ] 33 | conflicts: [ 34 | "jbuilder" {!= "transition"} 35 | "odoc" {< "1.3.0"} 36 | "dune-release" {< "1.3.0"} 37 | ] 38 | dev-repo: "git+https://github.com/ocaml/dune.git" 39 | build: [ 40 | # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path 41 | ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} 42 | ["ocaml" "bootstrap.ml"] 43 | ["./boot.exe" "--release" "--subst"] {pinned} 44 | ["./boot.exe" "--release" "-j" jobs] 45 | ] 46 | url { 47 | src: 48 | "https://github.com/ocaml/dune/releases/download/1.11.1/dune-build-info-1.11.1.tbz" 49 | checksum: [ 50 | "sha256=57afa265e08810fe910a1e277ffc4877490d9ddfbe984882a17d05daa2723f42" 51 | "sha512=14dbb9ade5b86b2b136e1658eb96d4d455838b01ec2129591816f0cafa037b97b1570cd8a45b4a664b87eb5f4b6f2de1cc14c64221b922623415e59c73638ec8" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /esy.lock/opam/conduit.1.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg" 5 | ] 6 | license: "ISC" 7 | tags: "org:mirage" 8 | homepage: "https://github.com/mirage/ocaml-conduit" 9 | doc: "https://mirage.github.io/ocaml-conduit/" 10 | bug-reports: "https://github.com/mirage/ocaml-conduit/issues" 11 | depends: [ 12 | "ocaml" {>= "4.03.0"} 13 | "dune" 14 | "ppx_sexp_conv" {>="v0.9.0"} 15 | "sexplib" 16 | "astring" 17 | "uri" 18 | "logs" {>= "0.5.0"} 19 | "ipaddr" {>= "4.0.0"} 20 | "ipaddr-sexp" 21 | ] 22 | build: [ 23 | ["dune" "subst"] {pinned} 24 | ["dune" "build" "-p" name "-j" jobs] 25 | ] 26 | dev-repo: "git+https://github.com/mirage/ocaml-conduit.git" 27 | synopsis: "A network connection establishment library" 28 | description: """ 29 | The `conduit` library takes care of establishing and listening for 30 | TCP and SSL/TLS connections for the Lwt and Async libraries. 31 | 32 | The reason this library exists is to provide a degree of abstraction 33 | from the precise SSL library used, since there are a variety of ways 34 | to bind to a library (e.g. the C FFI, or the Ctypes library), as well 35 | as well as which library is used (just OpenSSL for now). 36 | 37 | By default, OpenSSL is used as the preferred connection library, but 38 | you can force the use of the pure OCaml TLS stack by setting the 39 | environment variable `CONDUIT_TLS=native` when starting your program. 40 | 41 | The useful opam packages available that extend this library are: 42 | 43 | - `conduit`: the main `Conduit` module 44 | - `conduit-lwt`: the portable Lwt implementation 45 | - `conduit-lwt-unix`: the Lwt/Unix implementation 46 | - `conduit-async` the Jane Street Async implementation 47 | - `mirage-conduit`: the MirageOS compatible implementation 48 | """ 49 | url { 50 | src: 51 | "https://github.com/mirage/ocaml-conduit/releases/download/v1.5.0/conduit-v1.5.0.tbz" 52 | checksum: [ 53 | "sha256=06b6476ba4d8caf4cbfccbf7fd181cb2e5fe459e5e8e4992617fd2d7bebcbfd1" 54 | "sha512=8bddae1a238d58d1b59520afb4f627c4beaf9b5355cacc4087e6667e678392cbc681777e32874ee033ffe40da8a7f0d3bab38eed64f25d201294a9c3e3476978" 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /library/Client.re: -------------------------------------------------------------------------------- 1 | open Lwt.Infix; 2 | 3 | module Json = { 4 | include Yojson.Basic.Util; 5 | 6 | let member_opt = (m, t) => 7 | try(Some(member(m, t))) { 8 | | _ => None 9 | }; 10 | }; 11 | 12 | let execute_query = (~query) => { 13 | let url = Uri.of_string("http://localhost:8080/graphql"); 14 | 15 | let queryJson = 16 | `Assoc([ 17 | ("query", `String(query#query)), 18 | ("variables", query#variables), 19 | ]); 20 | let reqBody = Yojson.Safe.to_string(queryJson); 21 | 22 | Logs.debug(m => m("reqBody: %s", reqBody)); 23 | 24 | let body = Cohttp_lwt.Body.of_string(reqBody); 25 | 26 | let baseHeaders = 27 | Cohttp.Header.init_with("Content-Type", "application/json"); 28 | let headers = 29 | Cohttp.Header.add( 30 | baseHeaders, 31 | "content-length", 32 | string_of_int(String.length(reqBody)), 33 | ); 34 | 35 | Cohttp_lwt_unix.Client.post(url, ~body, ~headers) 36 | >>= ( 37 | ((_resp, body)) => 38 | Cohttp_lwt.Body.to_string(body) 39 | >|= ( 40 | body => { 41 | Logs.debug(m => m("got body: %s", body)); 42 | 43 | // TODO: catch error from either from_string or query parse 44 | let json_result = Yojson.Basic.from_string(body); 45 | switch (Json.member_opt("data", json_result)) { 46 | | Some(data) => Ok(query#parse(data)) 47 | | None => Error("Didn't get anything") 48 | }; 49 | } 50 | ) 51 | ); 52 | }; 53 | 54 | let get_subreddit = (~name) => { 55 | Logs.debug(m => m("Getting subreddit: %s", name)); 56 | 57 | module SubredditQuery = [%graphql 58 | {| 59 | query Subreddit($name: String!) { 60 | subreddit(name: $name) { 61 | posts { 62 | id 63 | } 64 | } 65 | } 66 | |} 67 | ]; 68 | 69 | let query = SubredditQuery.make(~name, ()); 70 | execute_query(~query); 71 | }; 72 | 73 | let get_links = () => { 74 | Logs.debug(m => m("Getting links")); 75 | 76 | module LinksQuery = [%graphql 77 | {| 78 | query Links { 79 | links { 80 | id 81 | } 82 | } 83 | |} 84 | ]; 85 | 86 | let query = LinksQuery.make(); 87 | execute_query(~query); 88 | }; 89 | -------------------------------------------------------------------------------- /esy.lock/opam/cohttp.2.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" 5 | "Stefano Zacchiroli" 6 | "David Sheets" 7 | "Thomas Gazagnaire" 8 | "David Scott" 9 | "Rudi Grinberg" 10 | "Andy Ray" 11 | ] 12 | synopsis: "An OCaml library for HTTP clients and servers" 13 | description: """ 14 | Cohttp is an OCaml library for creating HTTP daemons. It has a portable 15 | HTTP parser, and implementations using various asynchronous programming 16 | libraries. 17 | 18 | See the cohttp-async, cohttp-lwt, cohttp-lwt-unix, cohttp-lwt-jsoo and 19 | cohttp-mirage libraries for concrete implementations for particular 20 | targets. 21 | 22 | You can implement other targets using the parser very easily. Look at the `IO` 23 | signature in `lib/s.mli` and implement that in the desired backend. 24 | 25 | You can activate some runtime debugging by setting `COHTTP_DEBUG` to any 26 | value, and all requests and responses will be written to stderr. Further 27 | debugging of the connection layer can be obtained by setting `CONDUIT_DEBUG` 28 | to any value.""" 29 | license: "ISC" 30 | tags: ["org:mirage" "org:xapi-project"] 31 | homepage: "https://github.com/mirage/ocaml-cohttp" 32 | doc: "https://mirage.github.io/ocaml-cohttp/" 33 | bug-reports: "https://github.com/mirage/ocaml-cohttp/issues" 34 | depends: [ 35 | "ocaml" {>= "4.04.1"} 36 | "dune" {>= "1.1.0"} 37 | "re" {>= "1.9.0"} 38 | "uri" {>= "2.0.0"} 39 | "uri-sexp" 40 | "fieldslib" 41 | "sexplib0" 42 | "ppx_fields_conv" {>= "v0.9.0"} 43 | "ppx_sexp_conv" {>= "v0.9.0"} 44 | "stringext" 45 | "base64" {>= "3.1.0"} 46 | "fmt" {with-test} 47 | "jsonm" {build} 48 | "alcotest" {with-test} 49 | ] 50 | build: [ 51 | ["dune" "subst"] {pinned} 52 | ["dune" "build" "-p" name "-j" jobs] 53 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 54 | ] 55 | dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git" 56 | url { 57 | src: 58 | "https://github.com/mirage/ocaml-cohttp/releases/download/v2.2.0/cohttp-v2.2.0.tbz" 59 | checksum: [ 60 | "sha256=7b504359cfaa8d02ffdf1e2d03100ea9d1d552defeb3679e99960196ac2cea29" 61 | "sha512=d49a43856817ffcda1b1f242e1f6fb3fe23139186f2b6ffc8927810b9c8bf874cd7c1807904f76184a2fb5116e588e689032eafd2e1e33b83e7c31704e42941d" 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /esy.lock/opam/ipaddr.4.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"] 4 | synopsis: "A library for manipulation of IP (and MAC) address representations" 5 | description: """ 6 | Features: 7 | * Depends only on sexplib (conditionalization under consideration) 8 | * oUnit-based tests 9 | * IPv4 and IPv6 support 10 | * IPv4 and IPv6 CIDR prefix support 11 | * IPv4 and IPv6 [CIDR-scoped address](http://tools.ietf.org/html/rfc4291#section-2.3) support 12 | * `Ipaddr.V4` and `Ipaddr.V4.Prefix` modules are `Map.OrderedType` 13 | * `Ipaddr.V6` and `Ipaddr.V6.Prefix` modules are `Map.OrderedType` 14 | * `Ipaddr` and `Ipaddr.Prefix` modules are `Map.OrderedType` 15 | * `Ipaddr_unix` in findlib subpackage `ipaddr.unix` provides compatibility with the standard library `Unix` module 16 | * `Ipaddr_top` in findlib subpackage `ipaddr.top` provides top-level pretty printers (requires compiler-libs default since OCaml 4.0) 17 | * IP address scope classification 18 | * IPv4-mapped addresses in IPv6 (::ffff:0:0/96) are an embedding of IPv4 19 | * MAC-48 (Ethernet) address support 20 | * `Macaddr` is a `Map.OrderedType` 21 | * All types have sexplib serializers/deserializers 22 | """ 23 | 24 | license: "ISC" 25 | tags: ["org:mirage" "org:xapi-project"] 26 | homepage: "https://github.com/mirage/ocaml-ipaddr" 27 | doc: "https://mirage.github.io/ocaml-ipaddr/" 28 | bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues" 29 | depends: [ 30 | "ocaml" {>= "4.04.0"} 31 | "dune" {>="1.9.0"} 32 | "macaddr" {=version} 33 | "sexplib0" 34 | "domain-name" {>= "0.3.0"} 35 | "ounit" {with-test} 36 | "ppx_sexp_conv" {with-test & >= "v0.9.0"} 37 | ] 38 | build: [ 39 | ["dune" "subst"] {pinned} 40 | ["dune" "build" "-p" name "-j" jobs] 41 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 42 | ] 43 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" 44 | url { 45 | src: 46 | "https://github.com/mirage/ocaml-ipaddr/releases/download/v4.0.0/ipaddr-v4.0.0.tbz" 47 | checksum: [ 48 | "sha256=6f4abf9c210b20ccddf4610691a87b8c870790d8f71d4a7edcfca9e21b59fc29" 49 | "sha512=ca55a8cfa8b84c0a2f4e1fe7afb4c582066bbb562efb94169c0347e441ce076dc426d191772edb869eca6bd77f42f7141378181057ad8886da25ef915a9ee57f" 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /esy.lock/opam/num.1.2/files/installation-warning.patch: -------------------------------------------------------------------------------- 1 | From db8d748b2cad0adc2698e9fcf28727083a711bae Mon Sep 17 00:00:00 2001 2 | From: David Allsopp 3 | Date: Wed, 24 Jan 2018 16:01:56 +0000 4 | Subject: [PATCH] Warn about installations broken by previous faulty package 5 | 6 | --- 7 | Makefile | 33 +++++++++++++++++++++++++++++++++ 8 | 1 file changed, 33 insertions(+) 9 | 10 | diff --git a/Makefile b/Makefile 11 | index b40e588..d4dcd70 100644 12 | --- a/Makefile 13 | +++ b/Makefile 14 | @@ -14,9 +14,42 @@ install: 15 | $(MAKE) -C src install 16 | $(MAKE) -C toplevel install 17 | 18 | +OCAMLFIND_DIR:=$(dir $(shell command -v ocamlfind 2>/dev/null)) 19 | +OCAMLC_DIR:=$(dir $(shell command -v ocamlc 2>/dev/null)) 20 | +NUM_INSTALLED:=$(shell ocamlfind query num 2>/dev/null) 21 | + 22 | +ifeq ($(NUM_INSTALLED),) 23 | +# The num findlib package is not already present - wohoo! 24 | +OUR_FAULT=no 25 | +else 26 | +ifeq ($(OCAMLFIND_DIR),$(OCAMLC_DIR)) 27 | +# The num findlib package is present, but ocamlc and ocamlfind are in the 28 | +# same place, which means that either we're looking at a system-installed 29 | +# ocamlfind (which isn't supported), or the user has done something else 30 | +# nefarious and doesn't deserve our sympathy (or, at least, our potentially 31 | +# unhelpful advice) 32 | +OUR_FAULT=no 33 | +else 34 | +# The num findlib package package is present, and ocamlc and ocamlfind reside 35 | +# in different directories, which means that we're almost certainly looking at 36 | +# a system switch which has been damaged by a previous num package installation 37 | +# on an OS which didn't protect the system lib directory. 38 | +OUR_FAULT=probably 39 | +endif 40 | +endif 41 | + 42 | findlib-install: 43 | +ifeq ($(OUR_FAULT),no) 44 | $(MAKE) -C src findlib-install 45 | $(MAKE) -C toplevel install 46 | +else 47 | + @echo "\033[0;31m[ERROR]\033[m It appears that the num library was previously installed to your system" 48 | + @echo " compiler's lib directory, probably by a faulty opam package." 49 | + @echo " You will need to remove arith_flags.*, arith_status.*, big_int.*," 50 | + @echo " int_misc.*, nat.*, num.*, ratio.*, nums.*, libnums.* and" 51 | + @echo " stublibs/dllnums.* from $(shell ocamlc -where)." 52 | + @false 53 | +endif 54 | 55 | uninstall: 56 | $(MAKE) -C src uninstall 57 | -- 58 | 2.14.1 59 | 60 | -------------------------------------------------------------------------------- /esy.lock/opam/logs.0.7.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["The logs programmers"] 4 | homepage: "https://erratique.ch/software/logs" 5 | doc: "https://erratique.ch/software/logs/doc" 6 | dev-repo: "git+https://erratique.ch/repos/logs.git" 7 | bug-reports: "https://github.com/dbuenzli/logs/issues" 8 | tags: [ "log" "system" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "mtime" {with-test} ] 16 | depopts: [ 17 | "js_of_ocaml" 18 | "fmt" 19 | "cmdliner" 20 | "lwt" 21 | "base-threads" 22 | ] 23 | conflicts: [ 24 | "js_of_ocaml" { < "3.3.0" } ] 25 | 26 | build: [[ 27 | "ocaml" "pkg/pkg.ml" "build" 28 | "--pinned" "%{pinned}%" 29 | "--with-js_of_ocaml" "%{js_of_ocaml:installed}%" 30 | "--with-fmt" "%{fmt:installed}%" 31 | "--with-cmdliner" "%{cmdliner:installed}%" 32 | "--with-lwt" "%{lwt:installed}%" 33 | "--with-base-threads" "%{base-threads:installed}%" 34 | ]] 35 | 36 | synopsis: """Logging infrastructure for OCaml""" 37 | description: """\ 38 | 39 | Logs provides a logging infrastructure for OCaml. Logging is performed 40 | on sources whose reporting level can be set independently. Log message 41 | report is decoupled from logging and is handled by a reporter. 42 | 43 | A few optional log reporters are distributed with the base library and 44 | the API easily allows to implement your own. 45 | 46 | `Logs` has no dependencies. The optional `Logs_fmt` reporter on OCaml 47 | formatters depends on [Fmt][fmt]. The optional `Logs_browser` 48 | reporter that reports to the web browser console depends on 49 | [js_of_ocaml][jsoo]. The optional `Logs_cli` library that provides 50 | command line support for controlling Logs depends on 51 | [`Cmdliner`][cmdliner]. The optional `Logs_lwt` library that provides 52 | Lwt logging functions depends on [`Lwt`][lwt] 53 | 54 | Logs and its reporters are distributed under the ISC license. 55 | 56 | [fmt]: http://erratique.ch/software/fmt 57 | [jsoo]: http://ocsigen.org/js_of_ocaml/ 58 | [cmdliner]: http://erratique.ch/software/cmdliner 59 | [lwt]: http://ocsigen.org/lwt/ 60 | """ 61 | url { 62 | archive: "https://erratique.ch/software/logs/releases/logs-0.7.0.tbz" 63 | checksum: "2bf021ca13331775e33cf34ab60246f7" 64 | } 65 | -------------------------------------------------------------------------------- /esy.lock/opam/merlin.3.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "merlin" 3 | maintainer: "defree@gmail.com" 4 | authors: "The Merlin team" 5 | homepage: "https://github.com/ocaml/merlin" 6 | bug-reports: "https://github.com/ocaml/merlin/issues" 7 | dev-repo: "git+https://github.com/ocaml/merlin.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.1" & < "4.09"} 14 | "dune" {>= "1.8.0"} 15 | "ocamlfind" {>= "1.5.2"} 16 | "yojson" 17 | "mdx" {with-test & >= "1.3.0"} 18 | ] 19 | synopsis: 20 | "Editor helper, provides completion, typing and source browsing in Vim and Emacs" 21 | description: 22 | "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." 23 | post-messages: [ 24 | "merlin installed. 25 | 26 | Quick setup for VIM 27 | ------------------- 28 | Append this to your .vimrc to add merlin to vim's runtime-path: 29 | let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') 30 | execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" 31 | 32 | Also run the following line in vim to index the documentation: 33 | :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" 34 | 35 | Quick setup for EMACS 36 | ------------------- 37 | Add opam emacs directory to your load-path by appending this to your .emacs: 38 | (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) 39 | (when (and opam-share (file-directory-p opam-share)) 40 | ;; Register Merlin 41 | (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) 42 | (autoload 'merlin-mode \"merlin\" nil t nil) 43 | ;; Automatically start it in OCaml buffers 44 | (add-hook 'tuareg-mode-hook 'merlin-mode t) 45 | (add-hook 'caml-mode-hook 'merlin-mode t) 46 | ;; Use opam switch to lookup ocamlmerlin binary 47 | (setq merlin-command 'opam))) 48 | 49 | Take a look at https://github.com/ocaml/merlin for more information 50 | 51 | Quick setup with opam-user-setup 52 | -------------------------------- 53 | 54 | Opam-user-setup support Merlin. 55 | 56 | $ opam user-setup install 57 | 58 | should take care of basic setup. 59 | See https://github.com/OCamlPro/opam-user-setup 60 | " 61 | {success & !user-setup:installed} 62 | ] 63 | url { 64 | src: 65 | "https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz" 66 | checksum: [ 67 | "sha256=1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 68 | "sha512=3ae021669808a40b4449f1cbdaca40b605ea5779a6204addd8b0ee4af9f14f528d55ca43a8dd3c7d547fb8e4cb256c09a9151d5559ef24dad83b5ab05aa146a2" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /library/Database.re: -------------------------------------------------------------------------------- 1 | module Link = { 2 | type t = { 3 | id: int, 4 | url: string, 5 | }; 6 | let t = { 7 | let encode = ({id, url}) => Ok((id, url)); 8 | let decode = ((id, url)) => Ok({id, url}); 9 | let rep = Caqti_type.(tup2(int, string)); 10 | Caqti_type.custom(~encode, ~decode, rep); 11 | }; 12 | }; 13 | 14 | let or_error = m => 15 | switch%lwt (m) { 16 | | Ok(a) => Ok(a) |> Lwt.return 17 | | Error(e) => Error(Caqti_error.show(e)) |> Lwt.return 18 | }; 19 | 20 | open Config; 21 | 22 | let connection_url = Environment.values.db_connection; 23 | 24 | let pool = 25 | switch ( 26 | Caqti_lwt.connect_pool(~max_size=10, Uri.of_string(connection_url)) 27 | ) { 28 | | Ok(pool) => pool 29 | | Error(err) => failwith(Caqti_error.show(err)) 30 | }; 31 | 32 | // Migrations 33 | 34 | module M = { 35 | let migrate_query = 36 | Caqti_request.exec( 37 | Caqti_type.unit, 38 | {| CREATE TABLE links ( 39 | id BIGSERIAL PRIMARY KEY, 40 | url character varying(255) 41 | ) 42 | |}, 43 | ); 44 | 45 | let rollback_query = 46 | Caqti_request.exec(Caqti_type.unit, "DROP TABLE links"); 47 | }; 48 | 49 | let migrate = () => { 50 | let migrate' = (module Db: Caqti_lwt.CONNECTION) => 51 | Db.exec(M.migrate_query, ()); 52 | 53 | Caqti_lwt.Pool.use(migrate', pool) |> or_error; 54 | }; 55 | 56 | let rollback = () => { 57 | let rollback' = (module Db: Caqti_lwt.CONNECTION) => 58 | Db.exec(M.rollback_query, ()); 59 | 60 | Caqti_lwt.Pool.use(rollback', pool) |> or_error; 61 | }; 62 | 63 | // Queries 64 | 65 | module Q = { 66 | let add_link_query = 67 | Caqti_request.exec( 68 | Caqti_type.string, 69 | "INSERT INTO links (url) VALUES (?)", 70 | ); 71 | 72 | let get_all_links = 73 | Caqti_request.collect( 74 | Caqti_type.unit, 75 | Link.t, 76 | "SELECT id, url FROM links", 77 | ); 78 | 79 | let get_tablenames = 80 | Caqti_request.collect( 81 | Caqti_type.unit, 82 | Caqti_type.string, 83 | "SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname != 'pg_catalog' AND schemaname != 'information_schema'", 84 | ); 85 | }; 86 | 87 | let add_url = content => { 88 | let add' = (content, module Db: Caqti_lwt.CONNECTION) => 89 | Db.exec(Q.add_link_query, content); 90 | 91 | Caqti_lwt.Pool.use(add'(content), pool) |> or_error; 92 | }; 93 | 94 | let seed = (~urls=["https://www.test.com", "https://www.apple.com"], ()) => { 95 | Lwt_list.map_p(add_url, urls); 96 | }; 97 | 98 | let get_all = query => { 99 | let get_all = (module Db: Caqti_lwt.CONNECTION) => 100 | Db.fold(query, (row, acc) => [row, ...acc], (), []); 101 | 102 | Caqti_lwt.Pool.use(get_all, pool) |> or_error; 103 | }; 104 | 105 | let get_all_links = () => get_all(Q.get_all_links); 106 | 107 | let get_tablenames = () => get_all(Q.get_tablenames); 108 | -------------------------------------------------------------------------------- /.github/workflows/workflow.yml: -------------------------------------------------------------------------------- 1 | name: Main workflow 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build: 8 | name: Build, Test, e2e and Publish 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@master 12 | 13 | - name: Build Docker image 14 | uses: actions/docker/cli@master 15 | env: 16 | DB_CONNECTION: ${{ secrets.DB_CONNECTION }} 17 | with: 18 | args: build -t reasonml-postgres --build-arg DB_CONNECTION=${DB_CONNECTION} . 19 | 20 | - name: Setup Google Cloud 21 | uses: actions/gcloud/auth@master 22 | env: 23 | GCLOUD_AUTH: ${{ secrets.GCLOUD_AUTH }} 24 | 25 | - name: Tag image for GCR 26 | uses: actions/docker/tag@master 27 | env: 28 | APPLICATION_NAME: reasonml-postgres 29 | PROJECT_ID: radiant-destiny-219301 30 | with: 31 | args: reasonml-postgres gcr.io/$PROJECT_ID/$APPLICATION_NAME 32 | 33 | - name: Set Credential Helper for Docker 34 | uses: actions/gcloud/cli@master 35 | with: 36 | args: auth configure-docker --quiet 37 | 38 | - name: Push image to GCR 39 | uses: actions/gcloud/cli@master 40 | env: 41 | APPLICATION_NAME: reasonml-postgres 42 | PROJECT_ID: radiant-destiny-219301 43 | with: 44 | entrypoint: sh 45 | args: -c "docker push gcr.io/$PROJECT_ID/$APPLICATION_NAME" 46 | 47 | - name: Load GKE kube credentials 48 | uses: actions/gcloud/cli@master 49 | env: 50 | CLUSTER_NAME: batman 51 | PROJECT_ID: radiant-destiny-219301 52 | with: 53 | args: container clusters get-credentials $CLUSTER_NAME --zone us-central1-a --project $PROJECT_ID 54 | 55 | - name: Deploy to GKE 56 | uses: docker://gcr.io/cloud-builders/kubectl 57 | env: 58 | APPLICATION_NAME: reasonml-postgres 59 | DEPLOYMENT_NAME: reasonml-postgres-deployment 60 | PROJECT_ID: radiant-destiny-219301 61 | CLOUDSDK_COMPUTE_ZONE: us-central1-a 62 | CLOUDSDK_CONTAINER_CLUSTER: batman 63 | CLOUDSDK_CORE_PROJECT: radiant-destiny-219301 64 | with: 65 | entrypoint: sh 66 | args: 67 | -l -c "SHORT_REF=$(echo ${GITHUB_SHA} | head -c7) && cat reasonml-postgres-deployment.yaml | sed 's/PROJECT_ID/'\"$PROJECT_ID\"'/' 68 | | sed 's/APPLICATION_NAME/'\"$APPLICATION_NAME\"'/' | sed 's/TAG/'\"$SHORT_REF\"'/' 69 | | kubectl apply -f - " 70 | 71 | - name: Verify GKE deployment 72 | uses: docker://gcr.io/cloud-builders/kubectl 73 | env: 74 | DEPLOYMENT_NAME: reasonml-postgres-deployment 75 | CLOUDSDK_COMPUTE_ZONE: us-central1-a 76 | CLOUDSDK_CONTAINER_CLUSTER: batman 77 | CLOUDSDK_CORE_PROJECT: radiant-destiny-219301 78 | with: 79 | args: rollout status deployment/reasonml-postgres-deployment 80 | -------------------------------------------------------------------------------- /scripts/sendIntrospectionQuery.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // source: https://github.com/mhallin/graphql_ppx/blob/master/sendIntrospectionQuery.js 3 | var argv = require("yargs") 4 | .usage('Usage: $0 [--headers "key:value"]') 5 | .command("url", "URL of the GraphQL endpoint", { alias: "url" }) 6 | .required(1, "URL is required") 7 | .option("H", { 8 | alias: "headers", 9 | describe: "Additional Headers to send with introspection query", 10 | type: "array", 11 | coerce: arg => { 12 | let additionalHeaders = {}; 13 | for (const header of arg) { 14 | const separator = header.indexOf(":"); 15 | const name = header.substring(0, separator).trim(); 16 | const value = header.substring(separator + 1).trim(); 17 | if (!(name && value)) { 18 | throw new Error('Headers should be specified as "Name: Value"'); 19 | } 20 | additionalHeaders[name] = value; 21 | } 22 | return additionalHeaders; 23 | } 24 | }) 25 | .help("?") 26 | .alias("?", "help") 27 | .example("$0 https://example.com/graphql", "Get GraphQL Schema") 28 | .example( 29 | `$0 https://example.com/graphql --headers "Authorisation: "`, 30 | "Get GraphQL Schema with Authorisation header" 31 | ).argv; 32 | 33 | var request = require("request"); 34 | var fs = require("fs"); 35 | var introspectionQuery = ` 36 | query IntrospectionQuery { 37 | __schema { 38 | queryType { name } 39 | mutationType { name } 40 | subscriptionType { name } 41 | types { 42 | ...FullType 43 | } 44 | directives { 45 | name 46 | description 47 | locations 48 | args { 49 | ...InputValue 50 | } 51 | } 52 | } 53 | } 54 | fragment FullType on __Type { 55 | kind 56 | name 57 | description 58 | fields(includeDeprecated: true) { 59 | name 60 | description 61 | args { 62 | ...InputValue 63 | } 64 | type { 65 | ...TypeRef 66 | } 67 | isDeprecated 68 | deprecationReason 69 | } 70 | inputFields { 71 | ...InputValue 72 | } 73 | interfaces { 74 | ...TypeRef 75 | } 76 | enumValues(includeDeprecated: true) { 77 | name 78 | description 79 | isDeprecated 80 | deprecationReason 81 | } 82 | possibleTypes { 83 | ...TypeRef 84 | } 85 | } 86 | fragment InputValue on __InputValue { 87 | name 88 | description 89 | type { ...TypeRef } 90 | defaultValue 91 | } 92 | fragment TypeRef on __Type { 93 | kind 94 | name 95 | ofType { 96 | kind 97 | name 98 | ofType { 99 | kind 100 | name 101 | ofType { 102 | kind 103 | name 104 | ofType { 105 | kind 106 | name 107 | ofType { 108 | kind 109 | name 110 | ofType { 111 | kind 112 | name 113 | ofType { 114 | kind 115 | name 116 | } 117 | } 118 | } 119 | } 120 | } 121 | } 122 | } 123 | }`; 124 | 125 | const requestOptions = { 126 | json: true, 127 | body: { query: introspectionQuery }, 128 | headers: { "user-agent": "node.js", ...argv.headers } 129 | }; 130 | 131 | request.post(argv._[0], requestOptions, function(error, response, body) { 132 | if (error) { 133 | console.error("Could not send introspection query: ", error); 134 | process.exit(1); 135 | } 136 | 137 | if (response.statusCode !== 200) { 138 | console.error( 139 | "Non-ok status code from API: ", 140 | response.statusCode, 141 | response.statusMessage 142 | ); 143 | process.exit(1); 144 | } 145 | 146 | var result = JSON.stringify(body, null, 2); 147 | 148 | fs.writeFileSync("graphql_schema.json", result, { encoding: "utf-8" }); 149 | }); 150 | -------------------------------------------------------------------------------- /library/Schema.re: -------------------------------------------------------------------------------- 1 | // reddit 2 | 3 | open Reddit; 4 | 5 | let post: Graphql_lwt.Schema.typ(unit, option(post_data)) = 6 | Graphql_lwt.Schema.( 7 | obj("Post", ~doc="A subreddit post", ~fields=_ => 8 | [ 9 | field( 10 | "id", 11 | ~doc="Unique post identifier", 12 | ~typ=non_null(string), 13 | ~args=Arg.[], 14 | ~resolve=(_info, p: post_data) => 15 | p.data.id 16 | ), 17 | field( 18 | "title", 19 | ~typ=non_null(string), 20 | ~args=Arg.[], 21 | ~resolve=(_info, p: post_data) => 22 | p.data.title 23 | ), 24 | field( 25 | "author", 26 | ~typ=non_null(string), 27 | ~args=Arg.[], 28 | ~resolve=(_info, p: post_data) => 29 | p.data.author 30 | ), 31 | field( 32 | "ups", 33 | ~doc="The upvotes a post has received", 34 | ~typ=non_null(int), 35 | ~args=Arg.[], 36 | ~resolve=(_info, p: post_data) => 37 | p.data.ups 38 | ), 39 | ] 40 | ) 41 | ); 42 | 43 | let subreddit: Graphql_lwt.Schema.typ(unit, option(subreddit)) = 44 | Graphql_lwt.Schema.( 45 | obj("Subreddit", ~doc="A subreddit", ~fields=_ => 46 | [ 47 | field( 48 | "posts", 49 | ~doc="List of posts", 50 | ~typ=non_null(list(non_null(post))), 51 | ~args=Arg.[], 52 | ~resolve=(_info, p) => 53 | p.children 54 | ), 55 | ] 56 | ) 57 | ); 58 | 59 | // postgres 60 | 61 | open Database; 62 | 63 | let link: Graphql_lwt.Schema.typ(unit, option(Link.t)) = 64 | Graphql_lwt.Schema.( 65 | obj("Link", ~doc="A database link", ~fields=_ => 66 | [ 67 | field( 68 | "id", 69 | ~doc="Unique link identifier", 70 | ~typ=non_null(int), 71 | ~args=Arg.[], 72 | ~resolve=(_info, p) => 73 | p.Link.id 74 | ), 75 | field( 76 | "url", ~typ=non_null(string), ~args=Arg.[], ~resolve=(_info, p) => 77 | p.Link.url 78 | ), 79 | ] 80 | ) 81 | ); 82 | 83 | let set_interval = (s, f, destroy) => { 84 | let rec set_interval_loop = (s, f, n) => { 85 | let timeout = 86 | Lwt_timeout.create(s, () => 87 | if (n > 0) { 88 | f(); 89 | set_interval_loop(s, f, n - 1); 90 | } else { 91 | destroy(); 92 | } 93 | ); 94 | 95 | Lwt_timeout.start(timeout); 96 | }; 97 | 98 | set_interval_loop(s, f, 5); 99 | }; 100 | 101 | let users = ["Anthony", "John", "Paul", "Jason"]; 102 | 103 | let schema = 104 | Graphql_lwt.Schema.( 105 | schema( 106 | [ 107 | io_field( 108 | "subreddit", 109 | ~typ=subreddit, 110 | ~args=Arg.[arg("name", ~typ=non_null(string))], 111 | ~resolve=(_info, (), name) => 112 | Reddit.get_subreddit(~name) 113 | ), 114 | io_field( 115 | "links", 116 | ~doc="List of database links", 117 | ~typ=non_null(list(non_null(link))), 118 | ~args=Arg.[], 119 | ~resolve=(_info, ()) => 120 | Database.get_all_links() 121 | ), 122 | ], 123 | ~subscriptions=[ 124 | subscription_field( 125 | "subscribe_to_user", 126 | ~typ=non_null(string), 127 | ~args=Arg.[arg'("intarg", ~typ=int, ~default=42)], 128 | ~resolve=(_info, _intarg) => { 129 | let (user_stream, push_to_user_stream) = Lwt_stream.create(); 130 | let destroy_stream = () => push_to_user_stream(None); 131 | set_interval( 132 | 2, 133 | () => { 134 | let idx = Random.int(List.length(users)); 135 | push_to_user_stream(Some(List.nth(users, idx))); 136 | }, 137 | destroy_stream, 138 | ); 139 | Lwt_result.return((user_stream, destroy_stream)); 140 | }, 141 | ), 142 | ], 143 | ) 144 | ); 145 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reasonml-postgres", 3 | "version": "0.0.0", 4 | "description": "GraphQL server powered by postgres", 5 | "esy": { 6 | "build": "dune build -p #{self.name}", 7 | "buildDev": [ 8 | "refmterr dune build --root . --only-packages #{self.name}" 9 | ], 10 | "release": { 11 | "releasedBinaries": [ 12 | "ReasonmlPostgresApp.exe" 13 | ] 14 | } 15 | }, 16 | "buildDirs": { 17 | "test": { 18 | "require": [ 19 | "reasonml-postgres/library", 20 | "rely.lib" 21 | ], 22 | "preprocess": [ 23 | "pps", 24 | "lwt_ppx", 25 | "graphql_ppx" 26 | ], 27 | "flags": [ 28 | "-linkall", 29 | "-g" 30 | ] 31 | }, 32 | "testExe": { 33 | "require": [ 34 | "reasonml-postgres/test" 35 | ], 36 | "bin": { 37 | "RunReasonmlPostgresTests.exe": "RunReasonmlPostgresTests.re" 38 | } 39 | }, 40 | "integration": { 41 | "require": [ 42 | "reasonml-postgres/library", 43 | "rely.lib" 44 | ], 45 | "flags": [ 46 | "-linkall", 47 | "-g" 48 | ] 49 | }, 50 | "integrationExe": { 51 | "require": [ 52 | "reasonml-postgres/integration" 53 | ], 54 | "bin": { 55 | "RunReasonmlPostgresIntegrations.exe": "RunReasonmlPostgresIntegrations.re" 56 | } 57 | }, 58 | "library": { 59 | "require": [ 60 | "digestif.c", 61 | "cohttp-lwt-unix", 62 | "graphql", 63 | "graphql-lwt", 64 | "graphql-cohttp", 65 | "yojson", 66 | "logs.fmt", 67 | "fmt.tty", 68 | "decoders-yojson", 69 | "caqti", 70 | "caqti-lwt", 71 | "caqti-driver-postgresql", 72 | "jwt", 73 | "base64" 74 | ], 75 | "preprocess": [ 76 | "pps", 77 | "lwt_ppx", 78 | "graphql_ppx" 79 | ], 80 | "flags": [ 81 | "-w", 82 | "-32" 83 | ] 84 | }, 85 | "executable": { 86 | "require": [ 87 | "reasonml-postgres/library" 88 | ], 89 | "bin": { 90 | "ReasonmlPostgresApp.exe": "ReasonmlPostgresApp.re" 91 | } 92 | } 93 | }, 94 | "scripts": { 95 | "start": "esy x ReasonmlPostgresApp.exe", 96 | "test": "env ENV=TEST esy x RunReasonmlPostgresTests.exe", 97 | "integration": "esy x RunReasonmlPostgresIntegrations.exe", 98 | "e2e": "start-server-and-test start http-get://localhost:8080 integration", 99 | "format": "bash -c 'refmt --in-place {library,executable,test}/*.re'", 100 | "update-schema": "scripts/sendIntrospectionQuery.js http://localhost:8080/graphql", 101 | "repl": "esy dune utop library", 102 | "build-watch": "esy dune build --root . --only-packages #{self.name} --watch" 103 | }, 104 | "dependencies": { 105 | "@esy-ocaml/reason": "*", 106 | "@opam/base64": "*", 107 | "@opam/caqti-driver-postgresql": "*", 108 | "@opam/caqti-lwt": "*", 109 | "@opam/cohttp-lwt-unix": "*", 110 | "@opam/conf-openssl": "*", 111 | "@opam/decoders-yojson": "*", 112 | "@opam/digestif": "*", 113 | "@opam/fmt": "*", 114 | "@opam/graphql_ppx": "*", 115 | "@opam/graphql-cohttp": "*", 116 | "@opam/graphql-lwt": "*", 117 | "@opam/graphql": "*", 118 | "@opam/jwt": "*", 119 | "@opam/logs": "*", 120 | "@opam/lwt_ppx": "*", 121 | "@opam/lwt_ssl": "*", 122 | "ocaml": "4.7.x" 123 | }, 124 | "devDependencies": { 125 | "@esy-ocaml/rtop": "*", 126 | "@opam/dune": "*", 127 | "@opam/merlin": "*", 128 | "@opam/utop": "*", 129 | "@reason-native/rely": "*", 130 | "pesy": "*", 131 | "refmterr": "*", 132 | "request": "*", 133 | "start-server-and-test": "*", 134 | "yargs": "*" 135 | }, 136 | "resolutions": { 137 | "@opam/graphql_ppx": "baransu/graphql_ppx:esy.json#7ab30b3", 138 | "@opam/graphql-cohttp": "sync/ocaml-graphql-server:graphql-cohttp.opam#b0656b2", 139 | "@opam/graphql-lwt": "sync/ocaml-graphql-server:graphql-lwt.opam#b0656b2", 140 | "@opam/graphql": "sync/ocaml-graphql-server:graphql.opam#b0656b2", 141 | "@opam/jwt": "besport/ocaml-jwt:jwt.opam#6563a10", 142 | "@opam/nocrypto": "mirleft/ocaml-nocrypto:opam#ed7bb8d911dc340e36d85d335d9edb8339f0932d", 143 | "pesy": "esy/pesy#e15824e" 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__zarith_opam__c__1.7_opam_override/files/Zarith-release-1.7.patch: -------------------------------------------------------------------------------- 1 | --- ./caml_z_x86_64_mingw64.S 2 | +++ ./caml_z_x86_64_mingw64.S 3 | @@ -21,9 +21,9 @@ 4 | 5 | 6 | /* makes the stack non-executable. */ 7 | +#if defined __ELF__ && defined __linux__ 8 | .section .note.GNU-stack,"",@progbits 9 | - 10 | - 11 | +#endif 12 | /* helper functions */ 13 | /* **************** */ 14 | 15 | --- ./configure 16 | +++ ./configure 17 | @@ -22,7 +22,24 @@ 18 | gmp='auto' 19 | perf='no' 20 | 21 | -ar='ar' 22 | +#ar='ar' 23 | +ar_help=$(ocamlc -config | awk -F '[\t \r]+' '/^system/ {print $2}') 24 | +case "$ar_help" in 25 | + *mingw64*) 26 | + if which x86_64-w64-mingw32-ar >/dev/null 2>&1 ; then 27 | + ar=x86_64-w64-mingw32-ar 28 | + fi 29 | + ;; 30 | + *mingw*) 31 | + if which i686-w64-mingw32-ar >/dev/null 2>&1 ; then 32 | + ar=i686-w64-mingw32-ar 33 | + fi 34 | + ;; 35 | + *) 36 | + ar='ar' 37 | + ;; 38 | +esac 39 | + 40 | ocaml='ocaml' 41 | ocamlc='ocamlc' 42 | ocamlopt='ocamlopt' 43 | @@ -204,13 +221,32 @@ 44 | searchbinreq "$CC" 45 | cc="$CC" 46 | ccopt="$CFLAGS" 47 | -elif ! searchbin 'gcc'; then 48 | +else 49 | + cc=x86_64-w64-mingw32-gcc 50 | + case "$system_help" in 51 | + *mingw64*) 52 | + if which x86_64-w64-mingw32-gcc >/dev/null 2>&1 ; then 53 | + cc=x86_64-w64-mingw32-gcc 54 | + ccopt="-O3 -Wall -Wextra $CFLAGS" 55 | + fi 56 | + ;; 57 | + *mingw*) 58 | + if which i686-w64-mingw32-gcc >/dev/null 2>&1 ; then 59 | + cc=i686-w64-mingw32-gcc 60 | + ccopt="-O3 -Wall -Wextra $CFLAGS" 61 | + fi 62 | + ;; 63 | + esac 64 | + if [ -z "$cc" ]; then 65 | + if ! searchbin 'gcc'; then 66 | cc='gcc' 67 | ccopt="-O3 -Wall -Wextra $CFLAGS" 68 | -else 69 | + else 70 | searchbinreq 'cc' 71 | cc='cc' 72 | ccopt="-O3 -Wall -Wextra $CFLAGS" 73 | + fi 74 | + fi 75 | fi 76 | 77 | # optional native-code generation 78 | @@ -234,7 +270,7 @@ 79 | 80 | # directories 81 | 82 | -if test "$ocamllibdir" = "auto"; then ocamllibdir=`ocamlc -where`; fi 83 | +if test "$ocamllibdir" = "auto"; then ocamllibdir=`ocamlc -where | tr -d '\r'`; fi 84 | 85 | # fails on Cygwin: 86 | # if test ! -f "$ocamllibdir/caml/mlvalues.h" 87 | @@ -261,7 +297,7 @@ 88 | if test $? -eq 1 -a $ocamlfind != "no"; then 89 | instmeth='findlib' 90 | if test "$installdir" = "auto" 91 | - then installdir=`ocamlfind printconf destdir`; fi 92 | + then installdir=`ocamlfind printconf destdir | tr -d '\r'`; fi 93 | else 94 | searchbin install 95 | if test $? -eq 1; then instmeth='install' 96 | @@ -298,7 +334,7 @@ 97 | i486-*linux-gnu|i686-*linux-gnu|i486-kfreebsd-gnu) 98 | ccdef="-DZ_ELF -DZ_DOT_LABEL_PREFIX $ccdef" 99 | arch='i686';; 100 | - i686-*cygwin) 101 | + i686-*cygwin|x86_64-*cygwin) 102 | if test "x$wordsize" = "x64"; then 103 | ccdef="-DZ_COFF $ccdef" 104 | arch='x86_64_mingw64' 105 | @@ -386,6 +422,20 @@ 106 | ;; 107 | esac 108 | 109 | +exec_suffix='' 110 | +so_suffix='.so' 111 | +systype=`uname -s` 112 | +case "$systype" in 113 | + CYGWIN*) 114 | + exec_suffix='.exe' 115 | + so_suffix='.dll' 116 | + ;; 117 | + MINGW*) 118 | + exec_suffix='.exe' 119 | + so_suffix='.dll' 120 | + ;; 121 | +esac 122 | + 123 | # dump Makefile 124 | 125 | cat > Makefile <