pax_global_header00006660000000000000000000000064147233101740014514gustar00rootroot0000000000000052 comment=b5a8e4186c9590658c0f2bbe9e9d695856855757 eliom-11.1.1/000077500000000000000000000000001472331017400127025ustar00rootroot00000000000000eliom-11.1.1/.github/000077500000000000000000000000001472331017400142425ustar00rootroot00000000000000eliom-11.1.1/.github/dependabot.yml000066400000000000000000000001601472331017400170670ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: github-actions directory: / schedule: interval: weekly eliom-11.1.1/.github/workflows/000077500000000000000000000000001472331017400162775ustar00rootroot00000000000000eliom-11.1.1/.github/workflows/workflow.yml000066400000000000000000000017531472331017400207020ustar00rootroot00000000000000name: Main workflow on: pull_request: push: schedule: # Prime the caches every Monday - cron: 0 1 * * MON jobs: build: strategy: fail-fast: false matrix: os: - macos-latest - ubuntu-latest - windows-latest ocaml-compiler: - "4.14" - "5.2" runs-on: ${{ matrix.os }} steps: - name: Checkout tree uses: actions/checkout@v4 - name: Set-up OCaml ${{ matrix.ocaml-compiler }} uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} opam-pin: false - run: opam install . --deps-only - run: opam exec -- make all lint-fmt: runs-on: ubuntu-latest steps: - name: Checkout tree uses: actions/checkout@v4 - name: Set-up OCaml uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: "4.14" dune-cache: true - uses: ocaml/setup-ocaml/lint-fmt@v3 eliom-11.1.1/.gitignore000066400000000000000000000001531472331017400146710ustar00rootroot00000000000000*~ #* *# .#* _build eliom.install src/**/*.mllib src/**/*.mldylib src/**/*.odocl ocsigen.org-data _opam eliom-11.1.1/.ocamlformat000066400000000000000000000015551472331017400152150ustar00rootroot00000000000000version=0.26.1 break-cases = fit break-collection-expressions = fit-or-vertical break-fun-decl = wrap break-fun-sig = wrap break-infix = wrap break-infix-before-func = false break-sequences = false break-separators = before break-string-literals = never break-struct = force cases-matching-exp-indent = compact doc-comments = after-when-possible dock-collection-brackets = false indicate-multiline-delimiters = no infix-precedence = indent let-and = compact let-binding-spacing = compact module-item-spacing = compact parens-tuple = multi-line-only parens-tuple-patterns = multi-line-only sequence-style = terminator sequence-blank-line = compact single-case = compact type-decl = compact if-then-else = keyword-first field-space = loose space-around-arrays = false space-around-records = false space-around-lists = false space-around-variants = false ocp-indent-compat = true eliom-11.1.1/.ocp-indent000066400000000000000000000000521472331017400147400ustar00rootroot00000000000000normal with=0 syntax=lwt mll max_indent=2 eliom-11.1.1/CHANGES000066400000000000000000001264701472331017400137070ustar00rootroot00000000000000===== 11.1 ===== * Compatibility with WASM ===== 11.0 ===== * Building Eliom app as executables, with Ocsigen Server as a library, without config file ===== 10.4.1 ===== * Update to OCaml 5.2 (thanks to Kate Deplaix) ===== 10.4.0 (2024-03-22) ===== * Basic client-server distillery template: sqlite is now the default backend * Basic template now has license unlicense * Basic template fixes * Compatibility with Tyxml >= 4.6.0 (by Vincent Laporte) ===== 10.3.1 (2024-02-21) ===== * Fixing Problem with browser navigation https://github.com/ocsigen/eliom/issues/781 ===== 10.3.0 (2024-02-18) ===== * Adding raw events handlers in Eliom_content.Html.F.Raw for server-side only programming ===== 10.2.0 (2023-12-08) ===== * Adding Dune-based basic template client-server.basic ===== 10.1.0 (2023-09-25) ===== * Fix compilation with OCaml 5.1 ===== 10.0 (2022-03-08) ===== * Make Eliom_state.Ext.discard_state more robust ===== 9.0 (2021-10-16) ===== * compatibility with ocsigenserver.5.0.0 (outsourced Ocsipersist) ===== 8.8 (2021-10-05) ===== * rework Eliom_client * more debugging info * restore functions to access uploaded file info ===== 8.6 (2021-07-26) ===== * improvements of history handling and DOM caching ===== 8.5 (2020-10-28) ==== * Compatibility with ocsigenserver 4.0 ===== 6.9 (2019-11-12) ===== * fix scrolling bug: scrolling to top happens before page change * Server functions: log function argument on uncaught exceptions * Compile Eliom libraries with the linkall option ===== 6.8 (2019-09-11) ===== * Use directly Pcre instead of relying on Netstring_pcre * Improved async exception handler * Remove camlp4 syntax * Adapt to OCaml 4.08 * PPX extension: use migrate-parse-tree ===== 6.7 (2018-02-08) ===== * Eliom_client.Page_status: function while_active; ?stop parameter * DOM caching: treat history as linear and keep only reachable pages in cache ===== 6.6 (2018-01-17) ===== * Add missing function Eliom_request_info.get_remote_port * Eliom_client.Page_status.oninactive * Some documentation on DOM caching * Eliom_wrap: fix compilation on 32-bit architectures ===== 6.5 (2018-12-18) ===== * Compatibility with tyxml.4.3.x and js_of_caml.3.3.x ===== 6.4 (2018-12-17) ===== * Compatibility with Lwt 4.x * New configuration option to set html content type * Comet: deactivate when window does not have the focus; deactivate polling when idle * eliom_request_info.in_request_handler * Client-side non-localized parameters * Provide a way to serve global data separately from the initial page ===== 6.3 (2018-02-08) ===== * Compatibility with OCaml 4.06, js_of_ocaml 3.0 and Lwt 3.0 * DOM caching (preview) * Various small fixes and improvements ===== 6.2 (2017-02-07) ===== * Implement Eliom_client.onchangepage * Fix URL-related bugs arising in mobile apps ===== 6.1 (2016-12-20) ===== * Remove redundant dependency on calendar * Permit client routing to "./" * -y parameter for eliom-distillery (do not ask) * Eliom_client: do not execute onload after OCaml services * Permit suffix params in Eliom_service.create_attached_post ===== 6.0 (2016-12-08) ===== * Improve Eliom_service and Eliom_registration APIs using GADTs * Implement client-side services, useful for mobile apps. This includes ** client-side service registration (Eliom_registration) ** client-side service routing (Eliom_client.change_page_uri) * Transition to PPX internally * Compatibility with ** OCaml 4.03.0 and 4.04.0 ** Js_of_ocaml 2.8.2 and newer ** TyXML 4.0 and newer * Various bugfixes and improvements ===== 5.0 (2016-01-28) ===== * Add Eliom_shared and server-side Eliom_content.{Html5,Svg}.R modules * Add PPX syntax extension * Clean-up form APIs, now available under Eliom_content.Html5.{D,F}.Form * Patches to significantly reduce the size of request data * Compatibility with TyXML 3.6, Js_of_ocaml 2.7, and reactiveData 0.2 * Various bugfixes and enhancements ===== 4.2 (2015-07-21) ===== * Add Manip.children, to get the html children of an element. * Simplify Html5 and Svg signatures using tyxml's signature functors. * Various logging improvements, in particular in Eliom_client. * Fix eliomdep's exit code when calling option "-sort". * Fix #168: call_ocaml_service always sends boolean true. * Makes server function return types covariant. * Restore compatibility with ocsigenserver 2.6 and lwt 2.4.7. * Various bugfixes and wiki updates. ===== 4.1 (2014-10-01) ===== * Compatibility with js_of_ocaml-2.5 and tyxml-3.3.0 * Improvements: ** Simplify typing of services ** Use GADT to encode service parameters (Eliom_parameter) Eliom need OCaml 4.00 at least. ** bugfixes for service parameters ** Various bugfixes and enhancement ===== 4.0 (2014-05) ===== * Main new features: ** Reactive DOM elements (thanks to a contribution by besport.com) ** PUT and DELETE services for RESTful Eliom Applications (Contribution by Domoco) ** EXPERIMENTAL: Mobile apps with Eliom. By making it possible to start the application from client-side. ** Documentation improvements * Improvements: ** Improvements in typing of services (Contribution by Jacques-Pascal Deplaix) ** Filtering data from Eliom buses ** "caml" in value or type names now replaced by "OCaml" everywhere ** New module {{{Eliom_registration.File_ct}}} to make easier to send files with their content type ** Now possible to define services in shared sections ** Adding function {{{Eliom_client.change_url}}} to change the URL without doing a request ** Adding function {{{Eliom_service.attach_coservice'}}} to attach a non-attached coservice to an URL ** Improving comet configurations: now possible to stay idle instead of being completely inactive ** Now using defaultprotocol option (from ocsigenserver) to compute URLs ** The default expiration date for cookies on client side is now 10 years ** Now possible to send files in {{{Eliom_client.call_ocaml_service}}} ** Various additions and bugfixes in {{{Manip}}}, {{{Eliom_request_info}}}, {{{Eliom_content.html5}}} (events) (contributions by besport.com) ** eliom-destillery renamed into eliom-distillery ** Templates for eliom-distillery ** New programs: eliomdoc and eliompp ** Ocamlbuild package ** Various bugfixes And many other things (see git commits) ===== 3.0.0 (2012-12-10) ===== * Language ** Generalized client values in server code ** Injections into client sections * Tools ** Added eliom-destillery for generating project scaffolds ** Support Eliom interface files (.eliomi) in eliomc, eliomdep ** eliomdep: Generate dependencies between eliom-modules ** eliomc: infer only with option -infer, drop option -noinfer ** eliomc: Basic support for -i on eliom-files ** eliom{c,dep,opt},js_of_eliom: -dump to output the intermediate code ** eliomc,js_of_eliom: always open Eliom_pervasives in eliom files * API ** Eliom_pervasives.server_function to easily access the from the client ** Get current state of a scope ** Module to access values of Eliom references in external states (Eliom_state.Ext) ** Scope names are now named scope hierarchies ** Iterate the scope hierarchy (group > session > client > request) ** Adding Eliom_parameter.(type_checker, neopt) ** Add functions to insert html5 in atom feeds ** Eliom_tools.{F,D}.html to ease creation of head-tag ** Eliom_tools.wrap_handler as an easy alernative to Eliom_registration.Customize ** Test for initial request of a client on the server * Changed server behaviour ** Eliom_state.discard_everything now also discards request state ** Don't send nodes as data when they are part of the document * Changed client behaviour ** Show progress cursor during navigation with change_page ** Improved error messages ** Fail on the client when a [server_function] or call_caml_service fails on the server * Bugfixes ** Allow % for injections directly after parentheses * Support dropped for ** Xhtml ** OCamlDuce ** Eliom_compatibility_2_1 * A myriade of bugfixes ===== 2.2.2 (2012-06-11) ===== * Fix (re-disable) generation of API doc for ocamlduce modules ===== 2.2.1 (2012-06-07) ===== Addendum to the great renaming * Eliom_cookies -> Eliom_cookie * Eliom_comet.Channels -> Eliom_comet.Channel ===== 2.2 (2012-06-02) ===== The great renaming: Make Eliom's API more coherent * Dropped Eliom_pervasives, split into ** Eliom_lib (extension of stdlib) ** Eliom_content (content creation) * Moved all Html5,Xhtml content function to Eliom_content.{Html5,Xhtml} ** {HTML5,SVG,XHTML}.M -> Eliom_content.{Html5,Svg,Xhtml}.F ** {HTML5,SVG,XHTML}.DOM -> Eliom_content.{Html5,Svg,Xhtml}.D ** Eliom_output.{Html5,Xhtml}: form functions to Eliom_content.{Html5,Xhtml} ** Eliom_client.Html5 -> Eliom_content.Html5.To_dom ** Eliom_dom -> Eliom_content.Html5.Manip ** HTML5.of_element -> Eliom_content.Html5.Of_dom.of_element * Removed default implementations in Eliom_content.{Html5,Svg,Xhtml} (was inclusion of DOM) * Rename Eliom_output to Eliom_registration * Rename Eliom_registration.Eliom_appl to Eliom_registration.App * Conform naming conventions for modules (singular, lower-case) ** XML -> Xml ** SVG -> Svg ** XML_types -> Xml_types ** XHTML_types -> Xhtml_types ** HTML5_types -> Html5_types ** Eliom_services -> Eliom_service ** Eliom_parameters -> Eliom_parameter ** Eliom_references -> Eliom_reference ** Eliom_extensions -> Eliom_extension * Approximating compatibility module for Eliom 2.1: Eliom_compatibility_2_1 ===== 2.1.1 (2012-03-20) ===== * Server: Add Eliom references of scope site * Server: Add an non-Lwt interface to volatile Eliom references * Client: Add an option to restrict usage of XHR. * Bugfixes: ** Client: More robust and portable history handling ** Client: More robust CSS preloading (change_page) ** Client: Better compatibility with Opera ===== 2.1.0 (2012-02-24) ===== * Page loading rewritten. ** We do not traverse the HTML tree anymore for retrieving links and putting events handlers, it use querySelectorAll instead. (with a fallback for older browsers) *** We do not send a sparse tree along the page anymore. *** It is faster and more resilient to ugly browser plugins ** Add css loading optimisations: It fetch the css included using @include with XHR before changing page and construct only one concatenated css. It avoids page blinking when the css change and is faster (browsers tend to render the page once per css). ** Unwrapping hand rewritten in js. ** And a lot of other optimisations. * Rework of unique nodes: ** Introduce new lightweight 'unique' node of scope request, a.k.a. DOM nodes: use it through HTML5.DOM.{div,...} or its alias HTML5.{div,...}. ** To create unique node of scope application, the function 'HTML5.M.unique ?copy' has been renamed 'HTML5.create_global_elt ?id' ** Abstract id for application node are created with "HTML.new_global_elt_id" ** Node representation now differs between the client and the server. They are unwrapped on the client to simplify the XML representation: "unique" node that have already a "Javascript DOM representation" only contains a reference to the DOM representation. * Server API Changes: ** Add Eliom_state.get_*_session_group_size to know the number of session in a session group ** Parameters of type any can't be suffixes (semantic problem) ** Add Eliom_comet.wait_timeout to notify when a client isn't active ** Allow services to setup "Cache-policy: max-age" with Text, CssText and Files modules. ** Eliom_state.discard and discard_data now accept scope request. * Client API Changes: ** add an Eliom_dom module provinding imperative function on unique HTML5.elt. (for instance {{{appendChild: ?before:'a elt -> 'b elt -> 'c elt -> unit}}}). ** HTML5.M.a_on{click,...} functions directly expect a function as parameter (XML.event_handler_of_function isn't required anymore). ** Eliom_comet: configuration option for time until timeout after the focus is lost ** Handling wrapping of int32 type. ** Onload event handlers on HTML elements are executed when they are converted to DOM (using Eliom_client.of_ functions). This allows them to be added to nodes not sent in the page. ** Calls to {{{Eliom_services.onload}}} are taken into account for services sending caml values. The handlers are executed when the call to {{{Eliom_client.caml_call_service}}} terminates. * Eliom syntax: ** Event handlers can now access the current event using the _ev variable inside {{ ... }} typed according to the attribute. ** Allow modules to be used inside client expr {{ ... }} and client_expr {{ ... }} to be used inside modules ** Add -ppopt option to eliomc * And a lot of bugfixes. ===== 2.0.2 (2001-11-30) ===== * Compatibility with js_of_ocaml-1.0.8 and tyxml-2.0.1 * API Changes: ** Eliom_output.Redirection: use 302 as default and introduce abstract nome for all the 30x HTTP code ** Eliom_output.Customize: remove unrequired Functor parameters. * Delayed URl computation: this allows relative links to be created outside of service handler. * Client: do not ignore "onload" events attached on Dom elements other than window. * Bugfixes: ** Client: do not execute change_page_uri when the middle button or any modifier key is pressed. ** Client: update correctly the location when changing page with forms. ** Server: displaying better dynlink error messages. ** Syntax extension: avoid infinite loop while parsing first-order module expression ** Eliom_parameters: fixing wrong parameter names for list of list ** Eliom_parameters: fixing bug causing stack overflow when lists parameter names were wrong ** Fixing bug with non-localized parameters and service not keeping non-attached params ** Eliom_comet: stateless channels can be registered multiple times (close #220) ===== 2.0.1 (2011-09-28) ===== * Bugfixes in eliom appl.: ** Preload css when changing page to avoid a disgraceful "flash" effect ** Use to preserve links in unique node when changing page ** Fragment in URL aren't ignored anymore ** Proper exception handling in eliomc, js_of_eliom, ... ** Display a correct URL after submitting a
===== 2.0 (2011-09-20) ===== * Bugfixes: ** Correct handling of HTTP redirections hidden by XHR ** Fix links from http to https on client application ===== 2.0-rc2 (2011-09-06) ===== * Feature: ** api history: when the api history is available, application URLs are more readable (no more {{{#!}}}) * Bugfixes: ** fix browser compatibility: it should work with Firefox (>= 3.0), Chrome (all recent version we tested), Safari 5, Opera (tested 11.51), Internet explorer (9, ie 8 almost work) ** in forms declared outside of the sp's scope, hrefs were incorrect: url calculation is now done for each request ** the function {{{Eliom_client.caml_call_service}}} was broken with some kind of services ** application cookies are now always sent ** fix incorrect sharing of type variables in the syntax extension (thanks to William Le Ferrand) ** 404 and 403 errors are not dropped by applications anymore (This fix is partial: when the page content is application content, this still does not work when an exception handler returns something else) ** Fix problems with url generation for non-attached coservices inside an application ** tail recursive marshalling and demarshalling: no more limit on the depth of data sent along the page ** Fix problems with redirection and action with `NoReload exiting the application ** Handle correctly 204 code in application (do nothing with change page, fail with caml_call_service) ** Fix escape character '>': problem with strings containing "]]>" ===== 2.0-rc1 (2011-07-15) ===== * Eliom_client.change_page type now correctly forbid to call it on non-eliom application services * Stateless implementation of comet channels * Scope and state names parameters of functions are now fused in one parameter (called scope) * Change the type of 'send' functions: forbid use of incompatible output with Eliom_output.Any together. * Change the format of page loaded by an application: all pages are sent in HTML5 format. (first answers were in HTML5 subsequent were marshalled caml tree) * XML representation is now shared by client and server: conversion to Dom nodes is made by Eliom_client.Html5.of_ functions * Remove the need for an application container: application pages are now classical HTML5 pages. * Add Eliom_pervasives.{HTML5/XML/SVG}.unique function to declare XML node handled "by reference" * Fix ocamldoc generation with Eliom_output * Eliom_appl are now stateless if no data is stored in session * Allow dynamic wrapping with values to be sent to client with caml services and comet channel * Add Eliom_react.S: server to client React signals * Add lazy site values: lazy evaluated one time per site * Option to compile without preemptive threads * And lots of simplifications and bug fixes ===== 1.91 (2011-04-08) ===== * Split the ocsigen package in three : tyxml, ocsigenserver and eliom * Rename into eliom * It's now possible to set a //priority// on services registered on the same path, to choose in which order Eliom will try them. * New implementation of internal application forms with formData when available * New build system for eliom application * No type restriction in value sent from the server to the client ===== 1.90 ===== * New module {{{Eliom_client}}} for client/server Eliom programs using js_of_ocaml. * Eliom client: calling a service from client side code. * Eliom: Services taking Caml values as parameters. * Eliom: services sending Caml values. * Eliom: new implementation of forms and links to be compatible with client side programs. * Eliom: sp parameter has been removed (now using Lwt's thread storage) * Eliom: {{{Eliom_predefmod}}} renamed {{{Eliom_output}}} * Eliom: New module {{{Eliom_output.Customize}}} to create your own register functions from another registration module * Eliom: Module {{{Eliom_sessions}}} replaced by {{{Eliom_state}}}, {{{Eliom_request_info}}} and {{{Eliom_config}}}. * Eliom: new implementation of user cookies. * Eliom: Client process cookies. Like usual browser cookies but for one client side process. * Eliom: Client process server side state data. Like session data but for one client side process. * Eliom: Client process session services. * Eliom: Session group data. Like session data but for all sessions in a session group. * Eliom: Session group services. * Eliom: session replaced by a more general concept of "server side state". States have a scope: client process, session or group of sessions. * Eliom: session tables and request cache now deprecated, replaced by //Eliom references// * Eliom client: Possible to call another service without stopping the client side program, with bookmark support and back button support. * New extension Comet to allow server -> client communication. * Eliom: client/server communication channels. * Eliom: client/server reactive programming using React. * Eliom client: syntax extension for separating client and server code. * Eliom: New module Eliom_output.Eliom_appl for registering pages that belong to the same Eliom application. * Eliom client: syntax extension and wrapping/unwrapping mechanism to access server side values in client side code. * Eliom client: Relinking the DOM on client side after loading a (portion of) page. This allows nodes created on server side to be directly used in client side code. * Eliom client: XHR redirections for Eliom applications. * Eliom: safe unmarshaling of caml values sent by client side programs * Xhtml: Xhtml5 support * Atom module and Pubsubhubbub * OpenID support * SVG module * Documentation: New tutorial * Documentation: New Eliom manual * //and many other things ...// ===== 1.3.4 ===== * Eliom: Now supporting list of lists in service parameters ===== 1.3.3 (2010-06-13) ===== * Eliom: Fix some typos in Eliom's tutorial stylesheet * Server: Fix usage of {{{accept_n}}} to avoid file descriptor leakage * XHTML: Adding missing elements and attributes in XHTML.M * Cleaning Ocsigen_cache * Eliom: Fixing actions with uploads ===== 1.3.2 (2010-04-30) ===== * Add dummy findlib packages ocsigen.xhtml*, that depend on ocsigen_xhtml*, for compatibility with previous versions. These packages might be removed in a future (major) release. * Port to Lwt 2.1.0 ===== 1.3.1 (2010-04-23) ===== * Split out ocsigen_xhtml findlib package * Configuration file: when no protocol is specified in {{{}}}, listen on IPv6 (if possible) and IPv4 (always) ===== 1.3.0 (2010-01-22) ===== * Server: Each request now has a polymorphic data table (called //request cache//), where you can store the data you want to keep during the whole page generation. * Eliom: actions now return {{{()}}}. Use the request cache to send information to fallbacks. * Eliom: CSRF-safe coservices * Eliom: the number of sessions without group by IP address is now limited * Eliom: efficient implementation of limitation of sessions by groups (or now IP) for large limits * Eliom: the number of anonymous coservices by session is now limited * Eliom: the number of anonymous coservices without session by IP address is now limited * Eliom: now possible to unregister services * Eliom: New (very) experimental module {{{Eliom_obrowser}}} to use Eliom with Obrowser * Eliom: Now possible to have constant parts in suffixes to allow URLS like {{{/param1/something/param2}}} * Eliom: services with optional suffixes * Eliom: form towards a service with suffix: it is now possible to choose whether you want the redirection towards the suffix form or not * Eliom: lists and sets in suffixes * Eliom: Now possible to create services sending custom HTTP header values or customizing the content-type * Eliom: New notion: "Non localized parameters". Can be sent to any service. * Eliom: changing the order of parameters for user type form widgets * Eliom: changing the order of parameters for user type form widgets * Eliom: Eliom_tools.menu and hierarchical_menu now compare the URL strings (was: compare the service) * Eliom: textarea now take a string (was pcdata) * Eliom: The type of the iterator for lists in parameters has changed * Eliom: New options in configuration file to set session timeouts * Server: now possible to give the config file name to reload server command * Server: now possible to do a "graceful shutdown" of the server using the "shutdown" server command * Server: now possible to add custom commands for the command pipe * Server: EXPERIMENTAL now possible to observe HTTP headers before sending the result * Xhtmlpp: the parsing now fails if a quotation for an Xhtml element contains superfluous elements. (This can cause the parsing of previously incorrect code to fail) * Staticmod/Eliom: attempting to access a file whose name contains a NULL character will result in a 403. * Server: HTTP headers containing newlines are now properly escaped. * Server: correct missing xmlns in Xhtml DTD * Server: now send last-modified and etag headers when returning a 403 * Server: Now accepting several requests at a time (as explained in "Accept()able strategies" by Tim Brecht & all) * Rewritemod: more rewriting possibilities (still very basic) * Eliom menus are now more robust when finding which item is active * Fixed handling of incorrectly-sized multipart requests. Thanks to Mauricio Fernandez for noticing the bug * Upload directory and maximum file size can now be configured on a per-site basis * Renamed the field of Ocsigen_http_frame.t * Javascript events support in Xhtml.M ; Thanks to john @ 5070.info for the patch ===== 1.2.2 (2009-10-17) ===== * Add react and lwt.unix to the list of built-in findlib packages ===== 1.2.1 (2009-09-26) ===== * Lwt 2.0 compatibility: ** Adapt to Lwt.t/Lwt.u splitting ** fix Makefile to deal with lwt.unix findlib package * Fix ocsipersist-dbm Makefile * Fix for pcre-ocaml 6.0.0 * Fix typo regarding --stubdir in configure script ===== 1.2.0 (2009-03-25) ===== * Native code version now compiled by default * Now possible to link extensions and Eliom modules statically, for example to use a native code server on platforms where native dynlink is not supported * Server: Partial requests implemented (Range HTTP header) * Build C stubs into a shared library so that bytecode executables may be not linked in custom mode; new {{{--stubdir}}} option in {{{configure}}} script * Eliom: non-attached services now called "named non-attached coservices" and created using {{{Eliom_services.new_coservice'}}} with the optional {{{name}}} parameter * Eliom: now possible to create named attached coservices using the optional {{{name}}} parameter * Eliom: now possible to write libraries for Eliom sites, loaded inside {{{}}}, but not generating any page * Eliom and server: EXPERIMENTAL now possible to make extensions that can use Eliom's data * XHTML.M's pretty printer: now possible to set the DOCTYPE manually * Eliom: now possible to set manually the DOCTYPE when registering an XHTML.M service * Redirectmod and Revproxy: now possible to do more complex rewriting * Accesscontrol: add support for {{{}}} and {{{}}} conditions * Config file: {{{aliases}}} attribute now called {{{hostfilter}}} * Revproxy and Redirectmod: now possible to filter on server, port and protocol * New extension extendconfiguration to allow dynamic changes in the configuration (mimetypes, charsets, followsymnlink, directory listing, ...) * Server: new module {{{LocalFiles}}} factoring the common parts for sending static files (with Eliom and staticmod for example), while checking that the files can safely be sent. * Now possible to use XHTML pretty printers without Ocsigen, using the {{{xhtmlpretty.cma}}} library * Add {{{Ocsigen_lib.register_exn_printer}}}, better error messages * Now possible to use the same configuration file in native code and in bytecode (.cmo/.cma filenames are internally translated to .cmxs) * Signature of Ocsigen_extensions.register_extension is now more complete and more lightweight * Userconf: the options set in the local .userconf file are kept in the enclosing {{{}}} tag * Server: possibility to ignore or to supply an alternative command-line * Ocsigen_http_client: timeout when the distant server does not exists * OCaml versions < 3.10 are not supported anymore * Extensions are now much more strict w.r.t. the syntax of configuration files * Staticmod: accessing a directory for which indexing is disallowed returns an error 404 (instead of a 403 previously) ===== 1.1.0 (2008-07-15) ===== * Lwt removed (now distributed separately) * {{{XHTML.M}}} pretty printer: fixing pretty printing of empty tags (for browser compatibility) * Eliom_duce: New pretty printer for XHTML fixing pretty printing of empty tags * Eliom: secure sessions, secure services, (absolute) https links/forms, and using secure cookies * Eliom: Adding special "void action", without any parameters * Eliom: {{{Eliom_predefmod.Redirections}}} now called {{{Eliom_predefmod.String_redirection}}}, and adding new module {{{Eliom_predefmod.Redirection}}} that use GET services without parameters as data type. * Eliom and XHTML.M: Small changes of types in interfaces * Eliom: New session ID generator * Eliom: Adding types {{{int32}}} and {{{int64}}} for parameters and forms * Eliom: Adding functions {{{lwt_get_form}}} and {{{lwt_post_form}}} for creating forms using cooperative functions * Eliom and Staticmod: now possible to give GET parameters to static pages * Eliom: Bugfix in Makefiles for native code version * Eliom forms: Adding missing types in interfaces * Eliom_tools: current page is now optional in menus * Userconf and Eliom: there was a bug when loading both Eliom and Userconf together * Reverse Proxy: Now sending content length when available * Web server: The default content-type is now {{{application/octet-stream}}} * Creating and installing a cma file for all Ocsigen libraries not installed elsewhere * Ocsipersist-dbm: fixing bug when removing data * Deflatemod: fixing memory leak * And small bugfixes in XHTML.M, Eliom, ... ===== 1.0.0 (2008-04-01) ===== * Config file: findlib integration * Eliom and Ocsigen: changing namespace convention for modules * Access control: simplification of config file syntax * Eliom: Allowing (module dependent) parameters for registration functions * New xhtml output without pretty printing * Web server: Bugfix in HTTP/1.0 with keep-alive * Reverse proxy: Bugfix GET parameters were wrong * Reverse proxy: Bugfix memory consumption when the connection was closed by client ===== 0.99.5 (2008-01-11) ===== * Revproxy: pipelining of requests * Access control: simplification, generalization of filters and syntax changes in config file * Eliom: EXPERIMENTAL session groups * Eliom: non-attached services * Eliomduce: new functor {{{SubXhtml}}} for creating registration modules * Eliomduce: new module Eliomducetools with same features as Eliomtools, but for Eliomduce * Web server: now possible to split the configuration file into several files using the {{{}}} option. * Web server: now possible to have {{{}}} option inside another {{{}}} in configuration files, and the the first one is optional * Web server: EXPERIMENTAL user configuration files, with restricted possibilities (for security reasons) * Web server: IPv6 support * Deflatemod: now possible to filter on file extensions * Eliom: new option to keep GET non-attached parameters or not when doing a POST form towards a non-attached coservice. * Eliom: bugfix path of session cookies * Eliom: bugfix POST non-attached coservices called from a page with non-attached GET parameters were not found. * Lwt: now catching exceptions raised after timeouts * Cgimod: bufixes in path handling * Web server: bugfix - some files were not closed ===== 0.99.4 (2007-11-21) ===== * Ocsigen: Changes in the extension mechanism. The extensions are not tried in the order in which they are loaded any more, but in the order in which the options are specified for each site in the configuration file. * New experimental extension: access control * A few small enhancements ** Eliom: internal cookie management rewritten (+ bugfix) ** Eliom: Small changes in function names ** Eliom: now retry all extensions after actions (not only Eliom) ** Eliom: cleaning {{{Eliommod}}} interface ** Ocsigen server: Internal changes in server (removing "send" functions, debug messages lazier) ** Lwt: Adding a few functions in {{{Lwt_chan}}} interface ** Staticmod: Allowing default error pages for HTTP errors to be customized ** Ocsipersist (dbm and sqlite): better handling of database errors ** XHTML: New pretty printer for xhtml using streams (up to 15% speedup on requests) ** XHTML: Allowing any value for {{{}}} rel attribute (for example {{{shortcut icon}}}). ===== 0.99.3 (2007-11-07) ===== * Ocsigen: New module Deflatemod to compress data before sending to the browser. * Ocsigen: EXPERIMENTAL - New module Revproxy (reverse proxy). * Eliom: New session mechanism, with the ability to name the sessions and thus have several sessions for the same site. * Eliom: Now possible to have one site with session inside a subdirectory of another one. * Lwt: New module {{{Lwt_timeout}}} to implement timeouts, new module {{{Lwt_chan}}}, new module {{{Lwt_mutex}}}, new function {{{Lwt_unix.abort}}} to make all threads waiting on a file descriptor abort with an exception. * Ocsigen: New implementation of lots of Web server internals. Better management of Ocsigen's streams, file descriptors, exceptions, timeouts ... * A lot of enhancements and bug fixes: ** Eliom: Single {{{}}} in forms, by Stéphane Dalmas * EXPERIMENTAL: The Web server is now extensible. It means that you can add modules (like Apache modules) for generating pages, filters of requests, extensions of config files. For now there are two modules, one for static pages, and one for dynamic pages. The only changes for users is that they need to dynlink staticmod.cmo and ocsigenmod.cma from the configuration file. The syntax of config file for modules and staticdir also changed. * It is now possible to specify the encoding of characters for each sub-site. * Now usable with Ocamlnet 2.2 or 1.1.2. * EXPERIMENTAL: If OCamlDuce is installed on your system, you can now use it to do the type-checking of your pages (see the documentation). Warning: This is broken with OCamlDuce 3.09.2 patch level 2. You need at least OCamlDuce 3.09.3 patch level 1. * Removing Ocsimore from the default distribution. That version of Ocsimore is not supported anymore. Ocsimore has been rewritten from scratch by Piero Furiesi. ===== 0.5.1 (2006-12-14) ===== * Bugfix Konqueror: Multipart forms with now work correctly with Konqueror * Bugfix Internet Explorer: getting around a bug of Internet Explorer while displaying page * Bugfix NetBSD: Makefile * Bugfix Debian for HPPA, Mips, Alpha: Makefile * Bugfix: preemptive.cmi was missing in the installation directory * Adding manpage (S. Mimram) * Adding logrotate configuration * Daemon mode: adding setsid and redirect stdout/stderr to /dev/null. Closing stdin. ===== 0.5.0 (2006-11-23) ===== * HTTP 1.1 improved (HEAD, ETag, keep-alive implemented, If-Modified-Since, ...) * HTTPS support * Pipelining of requests * Server can listen on several ports * Multiple servers: you can now define several servers in the config file. * Virtual hosts: filtering on hostnames/ports (with wildcards) * Asynchronous file upload with multipart support * Large file transfer improved. * MIME types are now parsed from a file * Changes in the syntax of config file * Accessors for server parameters. Use ({{{get_user_agent sp}}}) instead of {{{sp.user_agent}}}. * Page generation is now using {{{Lwt}}} cooperative threads, to make it possible the generation of several pages at the same time. Practically, add {{{Lwt.return}}} before the page you want to send, and use cooperative input/output functions. * Typing errors of parameters are now catchable. * {{{static_dir}}} is now a function * Most of global references have been removed. You now need to give sp as parameter to {{{register_for_session}}}, {{{static_dir}}}, {{{close_session}}}, etc. * Links and forms now take {{{server_params}}} instead of {{{current_url}}} ({{{sp}}} is shorter than {{{sp.current_url}}}) * EXPERIMENTAL: Use of preemptive threads for non cooperative libraries ({{{detach}}} function). * EXPERIMENTAL: The {{{Ocsigen}}} module now contains a functor {{{Make}}} to allows the use of several ways of generating XHTML. The default way (using {{{XHTML.M}}} or the syntax extension) can be used by doing {{{open Ocsigen.Xhtml}}}. There is also an untyped xhtml generation module called {{{Ocsigen.Text}}}. * EXPERIMENTAL: extension of forms. * Reorganisation of the code * Bugfixes in makefiles * Bugfix: escaping of strings in xhtml with syntax extension (thanks to David Mentre) ===== 0.4.0 (2006-06-06) ===== * Full reimplementation of the core using Generalized Algebraic Data Types, * {{{_int}}}, {{{_string}}}, etc. are now called {{{int}}}, {{{string}}}, etc. * The type {{{_http_params}}} is now called {{{server_params}}}, * Services functions now all take 3 parameters, one for server parameters, one for GET parameters, and one for POST parameters. Note that {{{**}}} is used to create **pairs** and not tuples. * The {{{a}}} and {{{post_form}}} functions now take a fix number of parameters, corresponding to GET parameters. * //URLs// are now called //services//, * //state URLs// are now called //auxiliary services//, * {{{register_post_url}}} does not exist anymore. use {{{register_service}}} instead (idem for all other {{{register_post_*}}} functions). * Changes for prefix URLs * Small changes for actions * EXPERIMENTAL: sums, bool and list types for services and forms * small bugfixes ===== 0.3.27 (2006-04-27) ===== * Change the way to get server parameters ===== 0.3.26 ===== * Load unsafe modules * Other small changes ===== 0.3.25-2 (2006-02-24) ===== * Small bugfix for 64 bits processors * bugfix for static files * {{{action_link}}} is now called {{{action_a}}} ===== 0.3.24 (2006-02-07) ===== * More documentation * Change types {{{internal_url}}} and {{{external_service}}} to use polymorphic variants ===== 0.3.23 (2006-02-07) ===== * Better handling of static files and "403 Forbidden" message eliom-11.1.1/CODE_OF_CONDUCT.md000066400000000000000000000007741472331017400155110ustar00rootroot00000000000000# Code of Conduct This project has adopted the [OCaml Code of Conduct](https://github.com/ocaml/code-of-conduct/blob/main/CODE_OF_CONDUCT.md). # Enforcement This project follows the OCaml Code of Conduct [enforcement policy](https://github.com/ocaml/code-of-conduct/blob/main/CODE_OF_CONDUCT.md#enforcement). To report any violations, please contact Jérôme Vouillon, Raphael Proust, Vincent Balat, Hugo Heuzard and Gabriel Radanne at (or some of them individually). eliom-11.1.1/COPYING000066400000000000000000000654371472331017400137540ustar00rootroot00000000000000This program is released under the LGPL version 2.1 (see the text below) with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. As a special exception to the GNU Library General Public License, you may also link, statically or dynamically, a "work that uses the Library" with a publicly distributed version of the Library to produce an executable file containing portions of the Library, and distribute that executable file under terms of your choice, without any of the additional requirements listed in clause 6 of the GNU Library General Public License. By "a publicly distributed version of the Library", we mean either the unmodified Library, or a modified version of the Library that is distributed under the conditions defined in clause 3 of the GNU Library General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Library General Public License. GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! eliom-11.1.1/LICENSE000066400000000000000000000004131472331017400137050ustar00rootroot00000000000000The Ocsigen application core, and other portions of the official Ocsigen distribution not explicitly licensed otherwise, are licensed under the GNU LESSER GENERAL PUBLIC LICENSE with openssl linking exception -- see the 'COPYING' file in this directory for details. eliom-11.1.1/Makefile000066400000000000000000000033511472331017400143440ustar00rootroot00000000000000### Building BEST=$(if $(shell command -v ocamlopt 2> /dev/null),native,byte) BUILDER=_build/build/build.$(BEST) .PHONY: all all: dune build ### Doc .PHONY: doc wikidoc doc man alldoc DOCS_DIR=src/lib/client src/lib/server src/ocamlbuild src/ppx DOCS_HTML=$(addsuffix /api.docdir/index.html,$(DOCS_DIR)) DOCS_WIKI=$(addsuffix /api.wikidocdir/index.wiki,$(DOCS_DIR)) DOCS_MAN= src/lib/client/api.mandocdir/man.3oc \ src/lib/server/api.mandocdir/man.3os \ src/ocamlbuild/api.mandocdir/man.3o \ src/ppx/api.mandocdir/man.3o API_DIR=_build/doc/dev/api doc: $(BUILDER) $(BUILDER) $(DOCS_HTML) wikidoc: $(BUILDER) $(BUILDER) $(DOCS_WIKI) man: $(BUILDER) $(BUILDER) $(DOCS_MAN) alldoc: man wikidoc doc doccp: alldoc mkdir -p $(API_DIR)/server $(API_DIR)/client $(API_DIR)/ocamlbuild $(API_DIR)/ppx cp -Rf _build/src/lib/server/api.wikidocdir/*.wiki $(API_DIR)/server/ cp -Rf _build/src/lib/client/api.wikidocdir/*.wiki $(API_DIR)/client/ cp -Rf _build/src/ocamlbuild/api.wikidocdir/*.wiki $(API_DIR)/ocamlbuild/ cp -Rf _build/src/ppx/api.wikidocdir/*.wiki $(API_DIR)/ppx/ cp -Rf doc/index.wiki $(API_DIR)/ $(BUILDER): $(wildcard build/*.ml) ocamlbuild -no-plugin -I src/ocamlbuild -no-links -use-ocamlfind build/build.$(BEST) 1> /dev/null ocaml pkg/build.ml manpage=false native=true native-dynlink=true builder: $(BUILDER) ### Cleaning ### .PHONY: clean distclean clean: dune clean distclean: clean -find ./ -name "*\#*" | xargs rm -f ### Installation #### .PHONY: install uninstall reinstall install uninstall: eliom.install ifneq ($(PREFIX),) opam-installer --$@ --prefix $(PREFIX) eliom.install else @echo you must provide a prefix with : make PREFIX=myprefix $@ endif reinstall: ${MAKE} uninstall ${MAKE} install eliom-11.1.1/README.build000066400000000000000000000015011472331017400146550ustar00rootroot00000000000000== internal description of compilation/installation steps 1 - build custom ocamlbuild (build/build.native) this custom ocamlbuld uses src/ocamlbuild/ocamlbuild_eliom.ml to avoid duplication 2 - call `ocaml pkg/build.ml` (topkg) that will call the custom builder (from 1) to build request targets 3 - eliom.install is generated and can be used by opam-installer == How to update the build system - add new files => update pkg/filelist.ml client only files can be : src/lib/client/*.ml, src/lib/*.client.ml server only files can be : src/lib/server/*.ml, src/lib/*.server.ml common files can be : src/common/*.ml, src/*.eliom (with shared_section) - add packages requirement => update pkg/META (if needed) and src/_tags "package(new_package)" - change version update VERSION and pkg/META eliom-11.1.1/README.doc000066400000000000000000000004351472331017400143300ustar00rootroot00000000000000To update the API documentation: make doccp git checkout wikidoc rm -rf doc/dev/api cp -r _build/doc/dev/api doc/dev/api git add doc/dev/api git commit To update manual: Edit files in doc/dev/manual To create a new version: cp -a doc/dev doc/ Then commit and push on Github eliom-11.1.1/README.md000066400000000000000000000071411472331017400141640ustar00rootroot00000000000000# Eliom - the full-stack OCaml Web and mobile framework Eliom is a framework for building client/server Web and mobile applications in OCaml. It can be used both as a traditional server-side Web framework or to implement complex client-server applications. Eliom transforms OCaml into a multi-tier language, making it possible to implement both the server and client parts of a Web and mobile app as a single program. This simplifies a lot the communication between server and client. Applications can run on any Web browser or mobile device (iOS, Android), saving from the need to develop one version for each platform. Eliom has support for reactive pages (generated on server or client), advanced session mechanism, server to client communication, continuation based Web programming, etc. Eliom is part of the [Ocsigen project][ocsigen]. ## Installation Instructions ``` opam install eliom ``` ## Getting started Defining a service on path `/foo`, taking any GET parameters: ```ocaml let myservice = Eliom_service.create ~path:(Eliom_service.Path ["foo"]) ~meth:(Eliom_service.Get (Eliom_parameter.any)) () let () = Eliom_registration.Html.register ~service:myservice (fun get_params () -> Lwt.return Eliom_content.Html.F.(html (head (title (txt ""))) (body [h1 [txt "Hello"]]))) ``` Inserting a link towards that service, with parameters: ```ocaml Eliom_content.Html.D.a ~service:myservice [txt "Home"] [("param1", "v1"); ("param2", "v2")] ``` Event handlers are written in OCaml: ```ocaml div ~a:[a_onclick [%client (fun ev -> ... )]] [ ... ] ``` The client-side and server sides are written as a single program: ```ocaml let%server a = ... (* code for the server part of the application *) let%client b = ... (* code for the client part of the application *) let%shared c = ... (* code that will be included in both parts *) ``` Using a server-side value in client-side code: ```ocaml let%server a = ... let%client f () = print_endline ~%a ; (* print in browser console *) ... ``` Calling a server function from the client program: ```ocaml let%rpc f (x : int) : string Lwt.t = ... (* server-side code *) let%client () = let%lwt r = f 4 in ... ``` Saving session data on the server using Eliom references: ```ocaml let%server r = Eliom_reference.eref ~scope:Eliom_common.default_session_scope 0 let%server f () = let%lwt v = Eliom_reference.get r in Eliom_reference.set r (v + 1); ... ``` Where scope can be: * `Eliom_common.default_session_scope` (different value for each browser), * `Eliom_common.default_process_scope` (different value for each tab), * `Eliom_common.default_group_scope` (different value for each user), * `Eliom_common.site_scope` (value for the whole site), * `Eliom_common.global_scope` (global value for the whole server). Eliom references are persistant if you add optional parameter `~persistent` to function `Eliom_reference.eref`. ## Learning Eliom More documentation [here](https://ocsigen.org/tuto/latest/manual/basics). Write your first Web and mobile application with Eliom using [Ocsigen Start](https://ocsigen.org/ocsigen-start) ## Authors * Vincent Balat * Jérôme Vouillon * Grégoire Henry * Pierre Chambart * Benedikt Becker * Vasilis Papavasileiou * Boris Yakobowski * Hugo Heuzard * Raphaël Proust * Jan Rochel * Idir Lankri * Stéphane Glondu * Gabriel Radanne * Gabriel Kerneis * Denis Berthod * Jaap Boender * Simon Castellan * Mauricio Fernandez * Archibald Pontier * Simon Castellan * Kate Deplaix [ocsigen]: https://www.ocsigen.org/ [main documentation page]: https://ocsigen.org/tuto/latest/manual/basics eliom-11.1.1/VERSION000066400000000000000000000000071472331017400137470ustar00rootroot0000000000000011.1.1 eliom-11.1.1/_tags000066400000000000000000000000131472331017400137140ustar00rootroot00000000000000true:debug eliom-11.1.1/build/000077500000000000000000000000001472331017400140015ustar00rootroot00000000000000eliom-11.1.1/build/_tags000066400000000000000000000001051472331017400150150ustar00rootroot00000000000000<*.{ml,byte,native}>:package(unix,ocamlbuild,js_of_ocaml-ocamlbuild) eliom-11.1.1/build/build.ml000066400000000000000000000065261472331017400154430ustar00rootroot00000000000000open Ocamlbuild_plugin module Pack = Ocamlbuild_pack let best = if Sys.command "command -v ocamlopt > /dev/null" = 0 then "native" else "byte" module Conf = struct let server_dir = "server" let client_dir = "client" let type_dir = "type_dir" end module Intern = struct let with_eliom_ppx = Some (function | `Client -> "src/ppx/ppx_eliom_client_ex." ^ best | `Server -> "src/ppx/ppx_eliom_server_ex." ^ best) let with_package = function | "eliom.ppx.type" -> "pkg_ppx_eliom_types" | "eliom.ppx.client" | "eliom.ppx.server" | "eliom.syntax.predef" | "eliom.client" | "eliom.server" -> (* do noting in this case *) "pkg_dummy" | _ -> assert false end module Eliom_plugin = Ocamlbuild_eliom.MakeIntern (Intern) (Conf) let _ = dispatch (fun x -> Eliom_plugin.dispatcher x; match x with | After_rules -> Doc.init (); let link source dest = rule (Printf.sprintf "%s -> %s" source dest) ~dep:source ~prod:dest (fun env _ -> Cmd (S [A "ln"; A "-f"; P (env source); P (env dest)])) in (* add I pflag *) pflag ["ocaml"; "compile"] "I" (fun x -> S [A "-I"; A x]); pflag ["ocaml"; "infer_interface"] "I" (fun x -> S [A "-I"; A x]); pflag ["ocaml"; "doc"] "I" (fun x -> S [A "-I"; A x]); (* add syntax extension *) let add_syntax name path = let bytes_dep = Findlib.(link_flags_byte [query "bytes"]) in (* hack : not dep when "compile" to avoid the extension syntax to be link with binaries *) (* the dep with ocamldep make sure the extension syntax is compiled before *) flag ["ocaml"; "compile"; "pkg_" ^ name] (S [ A "-ppx" ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); flag ["ocaml"; "ocamldep"; "pkg_" ^ name] (S [ A "-ppx" ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); dep ["ocaml"; "ocamldep"; "pkg_" ^ name] [path ^ name ^ "_ex." ^ best]; flag_and_dep ["ocaml"; "infer_interface"; "pkg_" ^ name] (S [ A "-ppx" ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); dep ["ocaml"; "infer_interface"; "pkg_" ^ name] [path ^ name ^ "_ex." ^ best]; flag_and_dep ["doc"; "pkg_" ^ name] (S [ A "-ppx" ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); dep ["doc"; "pkg_" ^ name] [path ^ name ^ "_ex." ^ best] in add_syntax "ppx_eliom_utils" "src/ppx/"; add_syntax "ppx_eliom_types" "src/ppx/"; (* link executable aliases *) let link_exec f t = link (Printf.sprintf "src/tools/%s.byte" f) (Printf.sprintf "src/tools/%s.byte" t); link (Printf.sprintf "src/tools/%s.native" f) (Printf.sprintf "src/tools/%s.native" t) in List.iter (link_exec "eliomc") ["eliomopt"; "eliomcp"; "js_of_eliom"]; link_exec "distillery" "eliom-distillery" | _ -> ()) let _ = Options.make_links := false; Options.plugin := false; Options.use_ocamlfind := true; Ocamlbuild_unix_plugin.setup (); Ocamlbuild_pack.Main.main () eliom-11.1.1/build/doc.ml000066400000000000000000000037351472331017400151100ustar00rootroot00000000000000open Ocamlbuild_plugin module Pack = Ocamlbuild_pack (* Doc should move in its own ocamlbuild plugin *) (* Compile the wiki version of the Ocamldoc. Thanks to Till Varoquaux on usenet: http://www.digipedia.pl/usenet/thread/14273/231/ *) let ocamldoc_wiki tags deps docout docdir = let tags = tags -- "extension:html" in Ocamlbuild_pack.Ocaml_tools.ocamldoc_l_dir tags deps docout docdir let ocamldoc_man tags deps docout docdir = let tags = tags (* -- "extension:html" *) in Ocamlbuild_pack.Ocaml_tools.ocamldoc_l_dir tags deps docout docdir let init_wikidoc () = try let wikidoc_dir = let base = Ocamlbuild_pack.My_unix.run_and_read "ocamlfind query wikidoc" in String.sub base 0 (String.length base - 1) in Ocamlbuild_pack.Rule.rule "ocamldoc: document ocaml project odocl & *odoc -> wikidocdir" ~insert:`top ~prod:"%.wikidocdir/index.wiki" ~stamp:"%.wikidocdir/wiki.stamp" ~dep:"%.odocl" (Ocamlbuild_pack.Ocaml_tools.document_ocaml_project ~ocamldoc:ocamldoc_wiki "%.odocl" "%.wikidocdir/index.wiki" "%.wikidocdir"); flag ["wikidoc"] & S [A "-colorize-code"; A "-i"; A wikidoc_dir; A "-g"; A "odoc_wiki.cma"]; pflag ["wikidoc"] "subproject" (fun sub -> S [A "-passopt"; A "-subproject"; A sub]) with Failure e -> () (* Silently fail if the package wikidoc isn't available *) let init_mandoc () = Ocamlbuild_pack.Rule.rule "ocamldoc: document ocaml project odocl & *odoc -> mandocdir" ~insert:`top ~prod:"%.mandocdir/man.%(ext)" ~stamp:"%.mandocdir/man.%(ext).stamp" ~dep:"%.odocl" (Ocamlbuild_pack.Ocaml_tools.document_ocaml_project ~ocamldoc:ocamldoc_man "%.odocl" "%.mandocdir/man.%(ext)" "%.mandocdir"); pflag ["apiref"] "man_ext" (fun ext -> S [A "-man-mini"; A "-man-section"; A ext; A "-man-suffix"; A ext]) let init () = init_wikidoc (); init_mandoc (); (* ocamldoc intro *) pflag_and_dep ["doc"] "with_intro" (fun f -> S [A "-intro"; P f]) eliom-11.1.1/doc/000077500000000000000000000000001472331017400134475ustar00rootroot00000000000000eliom-11.1.1/doc/client.indexdoc000066400000000000000000000005271472331017400164500ustar00rootroot00000000000000{1 Client API} {!modules: Eliom_lib Eliom_client Eliom_client_value } {2 Content and form creation} {!modules: Eliom_content.Html Eliom_content.Html.Manip Eliom_content.Svg Eliom_content.Xml } {2 Client/server communication} {!modules: Eliom_service Eliom_shared Eliom_cscache Eliom_bus Eliom_comet Eliom_react } {2 Index} {!indexlist} eliom-11.1.1/doc/index.wiki000066400000000000000000000006321472331017400154440ustar00rootroot00000000000000= Eliom -- API reference [[wiki:mindmap.pdf|A mindmap to get an overview on the most important modules of Eliom]] <<| in /var/www/data/site-ocsimore/eliom >> <> <> <> <<|a_api subproject="ocamlbuild" text="The ocamlbuild plugin" | intro >> eliom-11.1.1/doc/ppx.indexdoc000066400000000000000000000000471472331017400157760ustar00rootroot00000000000000{1 Ppx syntax} {!modules: Ppx_eliom } eliom-11.1.1/doc/server.indexdoc000066400000000000000000000012441472331017400164750ustar00rootroot00000000000000{1 Server API} {!modules: Eliom_lib Eliom_client Eliom_client_value Eliom_common Eliom_config Eliom_request_info Eliom_reference Eliom_state } {2 Content and form creation} {!modules: Eliom_content Eliom_content.Html Eliom_content.Svg Eliom_content.Xml Eliom_tools } {2 Service creation} {!modules: Eliom_service Eliom_parameter Eliom_registration Eliom_registration.Html Eliom_registration.Action Eliom_registration.Ocaml Eliom_registration.App Eliom_registration.File Eliom_registration.Any Eliom_registration.Redirection } {2 Client/server communication} {!modules: Eliom_shared Eliom_notif Eliom_cscache Eliom_bus Eliom_comet Eliom_react } {2 Index} {!indexlist} eliom-11.1.1/dune-project000066400000000000000000000036631472331017400152340ustar00rootroot00000000000000(lang dune 3.6) (name eliom) (version 11.1.1) (maintainers dev@ocsigen.org) (authors dev@ocsigen.org) (license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception") (package (name eliom) (synopsis "Advanced client/server Web and mobile framework") (description "Eliom is a framework for implementing Web sites and client/server Web and mobile applications. It uses advanced concepts to simplify the implementation of common behaviors (e.g. scoped sessions, continuation based Web programming ...). It uses advanced static typing features of OCaml to check many properties of the Web application at compile-time (html, page parameters ...). Eliom allows implementing the whole application as a single program that includes both the client and the server code. For example, you can implement event handlers (onclick ...) directly in OCaml, and you can call a server-side OCaml function from the client. Pages are generated either on the server or the client. These client-side features remain compatible with traditional Web programming (links, forms, URLs, bookmarks, sessions ...). It is possible to generate mobile applications for Android and iOS with the exact same code as your Web application. The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm using Wasm_of_ocaml. ") (homepage https://ocsigen.org/eliom/) (source (github ocsigen/eliom)) (depends (ocaml (>= 4.12.0)) ocamlfind ppx_deriving (ppxlib (>= 0.15.0)) (js_of_ocaml-compiler (>= 5.5.0)) (js_of_ocaml (>= 5.5.0)) (js_of_ocaml-lwt (>= 5.5.0)) (js_of_ocaml-ocamlbuild :build) (js_of_ocaml-ppx (>= 5.5.0)) (js_of_ocaml-ppx_deriving_json (>= 5.5.0)) (js_of_ocaml-tyxml (>= 5.5.0)) lwt_log (lwt_ppx (>= 1.2.3)) (tyxml (and (>= 4.6.0) (< 4.7.0))) (ocsigenserver (and (>= 6.0.0) (< 7.0.0))) (ipaddr (>= 2.1)) (reactiveData (>= 0.2.1)) base-bytes (ocsipersist (and (>= 2.0) (< 3.0))) ppx_optcomp (xml-light (>= "2.5")))) (generate_opam_files) eliom-11.1.1/eliom.opam000066400000000000000000000043621472331017400146720ustar00rootroot00000000000000# This file is generated by dune, edit dune-project instead opam-version: "2.0" version: "11.1.1" synopsis: "Advanced client/server Web and mobile framework" description: """ Eliom is a framework for implementing Web sites and client/server Web and mobile applications. It uses advanced concepts to simplify the implementation of common behaviors (e.g. scoped sessions, continuation based Web programming ...). It uses advanced static typing features of OCaml to check many properties of the Web application at compile-time (html, page parameters ...). Eliom allows implementing the whole application as a single program that includes both the client and the server code. For example, you can implement event handlers (onclick ...) directly in OCaml, and you can call a server-side OCaml function from the client. Pages are generated either on the server or the client. These client-side features remain compatible with traditional Web programming (links, forms, URLs, bookmarks, sessions ...). It is possible to generate mobile applications for Android and iOS with the exact same code as your Web application. The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm using Wasm_of_ocaml. """ maintainer: ["dev@ocsigen.org"] authors: ["dev@ocsigen.org"] license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://ocsigen.org/eliom/" bug-reports: "https://github.com/ocsigen/eliom/issues" depends: [ "dune" {>= "3.6"} "ocaml" {>= "4.12.0"} "ocamlfind" "ppx_deriving" "ppxlib" {>= "0.15.0"} "js_of_ocaml-compiler" {>= "5.5.0"} "js_of_ocaml" {>= "5.5.0"} "js_of_ocaml-lwt" {>= "5.5.0"} "js_of_ocaml-ocamlbuild" {build} "js_of_ocaml-ppx" {>= "5.5.0"} "js_of_ocaml-ppx_deriving_json" {>= "5.5.0"} "js_of_ocaml-tyxml" {>= "5.5.0"} "lwt_log" "lwt_ppx" {>= "1.2.3"} "tyxml" {>= "4.6.0" & < "4.7.0"} "ocsigenserver" {>= "6.0.0" & < "7.0.0"} "ipaddr" {>= "2.1"} "reactiveData" {>= "0.2.1"} "base-bytes" "ocsipersist" {>= "2.0" & < "3.0"} "ppx_optcomp" "xml-light" {>= "2.5"} "odoc" {with-doc} ] build: [ ["dune" "subst"] {dev} [ "dune" "build" "-p" name "-j" jobs "@install" "@runtest" {with-test} "@doc" {with-doc} ] ] dev-repo: "git+https://github.com/ocsigen/eliom.git" eliom-11.1.1/pkg/000077500000000000000000000000001472331017400134635ustar00rootroot00000000000000eliom-11.1.1/pkg/META000066400000000000000000000073071472331017400141430ustar00rootroot00000000000000description = "Eliom: client-server Web and mobile applications" version = "6.3.0" package "server" ( description = "Eliom: server-side" version = "[distributed with Eliom]" directory = "server" requires = "ocsigenserver, ocsipersist, ppx_deriving.runtime, js_of_ocaml.deriving, react, reactiveData, tyxml, lwt_react, cryptokit, reactiveData" archive(byte) = "server.cma" archive(native) = "server.cmxa" package "monitor" ( directory = "monitor" description = "Eliom: monitoring" version = "[distributed with Eliom]" archive(byte) = "eliom_monitor.cma" archive(native) = "eliom_monitor.cmxa" package "start" ( description = "Eliom: monitoring" version = "[distributed with Eliom]" require = "eliom.server.monitor" archive(byte) = "eliom_monitor_main.cma" archive(native) = "eliom_monitor_main.cmxa" ) ) ) package "client" ( description = "Eliom: client-side" version = "[distributed with Eliom]" directory = "client" requires = "ocsigenserver.cookies, ocsigenserver.polytables, ocsigenserver.baselib.base, ppx_deriving.runtime, js_of_ocaml, js_of_ocaml.deriving, js_of_ocaml-tyxml, js_of_ocaml-lwt, js_of_ocaml-lwt.logger, lwt_react, react, reactiveData, tyxml.functor" archive(byte) = "client.cma eliom_client_main.cmo" jsoo_runtime = "eliom_client.js" linkopts(javascript) = "+eliom.client/eliom_client.js" ) package "syntax" ( package "predef" ( description = "Syntax extension: predefined commonly use syntaxes" version = "[distributed with Eliom]" requires(syntax, preprocessor) = "js_of_ocaml-camlp4,lwt_camlp4" requires(syntax, toploop) = "js_of_ocaml-camlp4,lwt_camlp4" archive(syntax, preprocessor) = "-ignore dummy" ) ) package "ppx" ( directory = "ppx" package "server" ( description = "Ppx syntax extension: server side" ppx(-ppx_driver,-custom_ppx) = "ppx_eliom_server" archive(ppx_driver,byte) = "ppx_eliom_server.cma" archive(ppx_driver,native) = "ppx_eliom_server.cmxa" plugin(ppx_driver,byte) = "ppx_eliom_server.cma" plugin(ppx_driver,native) = "ppx_eliom_server.cmxs" requires(ppx_driver) = "ppxlib" library_kind = "ppx_rewriter" ) package "client" ( description = "Ppx syntax extension: client side" ppx(-ppx_driver,-custom_ppx) = "ppx_eliom_client" archive(ppx_driver,byte) = "ppx_eliom_client.cma" archive(ppx_driver,native) = "ppx_eliom_client.cmxa" plugin(ppx_driver,byte) = "ppx_eliom_client.cma" plugin(ppx_driver,native) = "ppx_eliom_client.cmxs" requires(ppx_driver) = "ppxlib" library_kind = "ppx_rewriter" ) package "type" ( description = "Ppx syntax extension: type inference" ppx(-ppx_driver,-custom_ppx) = "ppx_eliom_types" archive(ppx_driver,byte) = "ppx_eliom_type.cma" archive(ppx_driver,native) = "ppx_eliom_type.cmxa" plugin(ppx_driver,byte) = "ppx_eliom_type.cma" plugin(ppx_driver,native) = "ppx_eliom_type.cmxs" requires(ppx_driver) = "ppxlib" library_kind = "ppx_rewriter" ) ) package "templates" ( directory = "templates" ) package "ocamlbuild" ( description = "Eliom ocamlbuild plugin (js_of_ocaml part included)" version = "[distributed with Eliom]" directory = "ocamlbuild" requires = "js_of_ocaml-ocamlbuild" archive(byte) = "ocamlbuild_eliom.cma" archive(byte, plugin) = "ocamlbuild_eliom.cma" archive(native) = "ocamlbuild_eliom.cmxa" archive(native, plugin) = "ocamlbuild_eliom.cmxs" ) eliom-11.1.1/pkg/build.ml000077500000000000000000000122731472331017400151240ustar00rootroot00000000000000#!/usr/bin/env ocaml #directory "pkg" #use "topkg.ml" #use "filelist.ml" (* DEBUG ONLY *) let nothing_should_be_rebuilt = false let except = function (* cmxs are regerated every time ( bug in ocamlbuild rule) *) | ".cmxs" when nothing_should_be_rebuilt -> false | _ -> true (* END *) let exts_syntax = List.filter except [".cmo"; ".cmx"; ".cma"; ".cmxa"; ".cmxs"; ".a"] let exts_modlib = List.filter except Exts.module_library let exts_lib = List.filter except Exts.library let _ = list_to_file "src/lib/client/client.mllib" client_mllib; list_to_file "src/lib/client/api.odocl" client_api; list_to_file "src/lib/server/server.mllib" server_mllib; list_to_file "src/lib/server/server.mldylib" server_mllib; list_to_file "src/lib/server/api.odocl" server_api; list_to_file "src/ocamlbuild/ocamlbuild.mllib" ocamlbuild_mllib; list_to_file "src/ocamlbuild/ocamlbuild.mldylib" ocamlbuild_mllib; list_to_file "src/ocamlbuild/api.odocl" ocamlbuild_api; list_to_file "src/ppx/ppx.mllib" ppx_mllib; list_to_file "src/ppx/ppx.mldylib" ppx_mllib; list_to_file "src/ppx/api.odocl" ppx_api; list_to_file "src/ppx/ppx.mllib" ppx_mllib; list_to_file "src/ppx/ppx.mldylib" ppx_mllib; list_to_file "src/ppx/api.odocl" ppx_api let spf = Printf.sprintf let nothing = if nothing_should_be_rebuilt then "-nothing-should-be-rebuilt" else "" let best = if Env.native then "native" else "byte" let builder = `Other ("_build/build/build." ^ best, "_build") let with_man3 = Env.bool "manpage" let () = Pkg.describe "eliom" ~builder ([ (* META *) Pkg.lib "pkg/META" ; (* MANPAGE *) Pkg.man ~dst:"man1/eliomc.1" "pkg/man/eliomc.1" ; Pkg.man ~dst:"man1/eliomcp.1" "pkg/man/eliomc.1" ; Pkg.man ~dst:"man1/eliomopt.1" "pkg/man/eliomc.1" ; Pkg.man ~dst:"man1/eliomdep.1" "pkg/man/eliomc.1" ; Pkg.man ~dst:"man1/js_of_eliom.1" "pkg/man/eliomc.1" ; Pkg.man ~dst:"man1/eliom-distillery.1" "pkg/man/eliom-distillery.1" ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3oc" ~target:"src/lib/client/api.mandocdir/man.3oc" "src/lib/client/api.mandocdir/%.3oc" ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3os" ~target:"src/lib/server/api.mandocdir/man.3os" "src/lib/server/api.mandocdir/%.3os" ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3o" ~target:"src/ocamlbuild/api.mandocdir/man.3o" "src/ocamlbuild/api.mandocdir/%.3o" ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3o" ~target:"src/ppx/api.mandocdir/man.3o" "src/ppx/api.mandocdir/%.3o" ; (* TOOLS *) Pkg.bin ~auto:true "src/tools/eliomc" ; Pkg.bin ~auto:true "src/tools/eliomcp" ; Pkg.bin ~auto:true "src/tools/eliomdep" ; Pkg.bin ~auto:true "src/tools/eliomopt" ; Pkg.bin ~auto:true "src/tools/js_of_eliom" ; Pkg.bin ~auto:true "src/tools/eliomdoc" ; Pkg.bin ~auto:true "src/tools/eliompp" ; Pkg.bin ~auto:true ~dst:"eliom-distillery" "src/tools/distillery" ; Pkg.bin ~auto:true "src/ocamlbuild/eliombuild" ; Pkg.lib ~exts:exts_modlib ~dst:"ocamlbuild/ocamlbuild_eliom" "src/ocamlbuild/ocamlbuild_eliom" ; (* PPX *) Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom" "src/ppx/ppx_eliom" ; Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom_client" "src/ppx/ppx_eliom_client" ; Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom_type" "src/ppx/ppx_eliom_type" ; Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom_server" "src/ppx/ppx_eliom_server" ; Pkg.bin ~auto:true ~dst:"ppx_eliom_client" "src/ppx/ppx_eliom_client_ex" ; Pkg.bin ~auto:true ~dst:"ppx_eliom_server" "src/ppx/ppx_eliom_server_ex" ; Pkg.bin ~auto:true ~dst:"ppx_eliom_types" "src/ppx/ppx_eliom_types_ex" ] (* CLIENT LIBS *) @ Pkg.lib ~dst:"client/client" ~exts:[".cma"] "src/lib/client/client" :: Pkg.lib ~dst:"client/eliom_client_main.cmo" "src/lib/client/eliom_client_main.cmo" :: Pkg.lib ~dst:"client/eliom_client.js" "src/lib/client/eliom_client.js" :: Pkg.lib ~dst:"client/libeliom_stubs.a" "src/lib/client/libeliom_stubs.a" :: Pkg.stublibs "src/lib/client/dlleliom_stubs.so" :: List.map (fun x -> Pkg.lib ~dst:(spf "client/%s" x) (spf "src/lib/client/%s" x)) client_extra (* SERVER LIBS *) @ Pkg.lib ~dst:"server/monitor/eliom_monitor" ~exts:Exts.module_library "src/lib/server/monitor/eliom_monitor" :: Pkg.lib ~dst:"server/monitor/eliom_monitor_main" ~exts:Exts.module_library "src/lib/server/monitor/eliom_monitor_main" :: Pkg.lib ~dst:"server/server" ~exts:exts_lib "src/lib/server/server" :: List.map (fun x -> Pkg.lib ~dst:(spf "server/%s" x) (spf "src/lib/server/%s" x)) server_extra @ [ (* MISC *) Pkg.doc "README.md" ; Pkg.doc "CHANGES" ; Pkg.etc "pkg/etc/mime.types" ] @ List.flatten (List.map (fun (name, files) -> List.map (fun file -> Pkg.lib ~dst:(spf "templates/%s/%s" name file) (spf "%s/%s/%s" templates_dir name file)) files) templates_files)) eliom-11.1.1/pkg/distillery/000077500000000000000000000000001472331017400156475ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/dune000066400000000000000000000002541472331017400165260ustar00rootroot00000000000000(data_only_dirs templates) (install (section lib) (files (glob_files templates/app.exe/**) (glob_files templates/app.lib/**) (glob_files templates/basic.ppx/**))) eliom-11.1.1/pkg/distillery/templates/000077500000000000000000000000001472331017400176455ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/templates/app.exe/000077500000000000000000000000001472331017400212055ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/templates/app.exe/.eliomignore000066400000000000000000000000661472331017400235210ustar00rootroot00000000000000.eliomreserve upgrade.sql .eliomignore .eliomverbatim eliom-11.1.1/pkg/distillery/templates/app.exe/.eliomreserve000066400000000000000000000000461472331017400237070ustar00rootroot00000000000000db local mobile options os demo style eliom-11.1.1/pkg/distillery/templates/app.exe/.eliomverbatim000066400000000000000000000004101472331017400240400ustar00rootroot00000000000000assets!images!icon.png mobile!www!img!logo.png static!fonts!FontAwesome.otf static!fonts!fontawesome-webfont.eot static!fonts!fontawesome-webfont.svg static!fonts!fontawesome-webfont.ttf static!fonts!fontawesome-webfont.woff static!fonts!fontawesome-webfont.woff2 eliom-11.1.1/pkg/distillery/templates/app.exe/.gitignore000066400000000000000000000001721472331017400231750ustar00rootroot00000000000000# Local server configuration local # Eliom .depend _client _deps _server static/css/project_name.css.map # Dune _build eliom-11.1.1/pkg/distillery/templates/app.exe/.ocamlformat000066400000000000000000000015361472331017400235170ustar00rootroot00000000000000break-cases = fit break-collection-expressions = fit-or-vertical break-fun-decl = wrap break-fun-sig = wrap break-infix = wrap break-infix-before-func = false break-sequences = false break-separators = before break-string-literals = never break-struct = force cases-matching-exp-indent = compact doc-comments = after-when-possible dock-collection-brackets = false indicate-multiline-delimiters = no infix-precedence = indent let-and = compact let-binding-spacing = compact module-item-spacing = compact parens-tuple = multi-line-only parens-tuple-patterns = multi-line-only sequence-style = terminator sequence-blank-line = compact single-case = compact type-decl = compact if-then-else = keyword-first field-space = loose space-around-arrays = false space-around-records = false space-around-lists = false space-around-variants = false ocp-indent-compat = true eliom-11.1.1/pkg/distillery/templates/app.exe/.ocp-indent000066400000000000000000000000521472331017400232430ustar00rootroot00000000000000normal with=0 syntax=lwt mll max_indent=2 eliom-11.1.1/pkg/distillery/templates/app.exe/LICENSE000066400000000000000000000022731472331017400222160ustar00rootroot00000000000000This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to eliom-11.1.1/pkg/distillery/templates/app.exe/Makefile000066400000000000000000000007441472331017400226520ustar00rootroot00000000000000#---------------------------------------------------------------------- # GLOBAL MAKEFILE #---------------------------------------------------------------------- # Local settings (optional). See Makefile.local.example for an example. # WARNING: do not commit to a repository! -include Makefile.local # Eliom settings. Contains all variables. include Makefile.options # Eliom default makefile # Makefile.PROJECT_NAME is also included in this makefile include Makefile.app eliom-11.1.1/pkg/distillery/templates/app.exe/Makefile.app000066400000000000000000000100021472331017400234150ustar00rootroot00000000000000##---------------------------------------------------------------------- ## DISCLAIMER ## ## This file contains the rules to make an Eliom project. The project is ## configured through the variables in the file Makefile.options. ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Internals ## Required binaries OCSIGENSERVER := ocsigenserver OCSIGENSERVER.OPT := ocsigenserver.opt ifneq ($(DEBUG),yes) DUNE_OPTIONS = --profile release endif ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## General .PHONY: all css byte opt DIST_DIRS := $(ETCDIR) $(DATADIR) $(LIBDIR) $(LOGDIR) \ $(FILESDIR)/avatars/tmp $(ELIOMSTATICDIR) \ $(shell dirname $(CMDPIPE)) JS_PREFIX := $(TEST_PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME) all:: css byte opt staticfiles ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Testing DIST_FILES = $(ELIOMSTATICDIR)/$(PROJECT_NAME).js $(LIBDIR)/$(PROJECT_NAME).cma .PHONY: test.byte test.opt staticfiles test.byte:: byte | $(addprefix $(TEST_PREFIX),$(DIST_DIRS)) staticfiles @echo "==== The website is available at http://localhost:$(TEST_PORT) ====" dune exec ./$(PROJECT_NAME)_main.bc test.opt:: opt | $(addprefix $(TEST_PREFIX),$(DIST_DIRS)) staticfiles @echo "==== The website is available at http://localhost:$(TEST_PORT) ====" dune exec ./$(PROJECT_NAME)_main.exe test.static.byte: test.byte test.static.opt: test.opt $(addprefix $(TEST_PREFIX), $(DIST_DIRS)): mkdir -p $@ staticfiles: cp -rf $(LOCAL_STATIC_CSS) $(TEST_PREFIX)$(ELIOMSTATICDIR) ##---------------------------------------------------------------------- ## Installing & Running .PHONY: install install.static install.lib run install: all install.static | $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(shell dirname $(CMDPIPE))) dune install install.static: $(TEST_PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME).js | $(PREFIX)$(STATICDIR) $(PREFIX)$(ELIOMSTATICDIR) cp -r $(LOCAL_STATIC_CSS) $(PREFIX)$(FILESDIR) HASH=`md5sum _build/default/client/$(PROJECT_NAME).bc.js | cut -d ' ' -f 1` && \ install $(addprefix -o ,$(WWWUSER)) $(JS_PREFIX)_$$HASH.js $(PREFIX)$(ELIOMSTATICDIR) && \ ln -sf $(PROJECT_NAME)_$$HASH.js $(PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME).js [ -z $(WWWUSER) ] || chown -R $(WWWUSER) $(PREFIX)$(FILESDIR) .PHONY: print-install-files: @echo $(PREFIX)$(LIBDIR) @echo $(PREFIX)$(ELIOMSTATICDIR) @echo $(PREFIX)$(ETCDIR) $(addprefix $(PREFIX),$(ETCDIR) $(LIBDIR)): install -d $@ $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(ELIOMSTATICDIR) $(shell dirname $(CMDPIPE))): install $(addprefix -o ,$(WWWUSER)) -d $@ ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Compilation .PHONY: gen-dune config-files config-files: | $(TEST_PREFIX)$(ELIOMSTATICDIR) $(TEST_PREFIX)$(LIBDIR) HASH=`md5sum _build/default/client/$(PROJECT_NAME).bc.js | cut -d ' ' -f 1` && \ cp -f _build/default/client/$(PROJECT_NAME).bc.js $(JS_PREFIX)_$$HASH.js && \ ln -sf $(PROJECT_NAME)_$$HASH.js $(JS_PREFIX).js cp -f _build/default/$(PROJECT_NAME).cm* $(TEST_PREFIX)$(LIBDIR)/ all:: $(ENV_PSQL) dune build $(DUNE_OPTIONS) @install @$(PROJECT_NAME) js:: $(ENV_PSQL) dune build $(DUNE_OPTIONS) client/$(PROJECT_NAME).bc.js byte:: js $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME)_main.bc make config-files PROJECT_NAME=$(PROJECT_NAME) opt:: js $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME)_main.exe make config-files PROJECT_NAME=$(PROJECT_NAME) run: $(PREFIX)bin/$(PROJECT_NAME) ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Clean up .PHONY: clean clean:: dune clean eliom-11.1.1/pkg/distillery/templates/app.exe/Makefile.options000066400000000000000000000050521472331017400243410ustar00rootroot00000000000000#---------------------------------------------------------------------- # SETTINGS FOR THE ELIOM PROJECT %%%PROJECT_NAME%%% #---------------------------------------------------------------------- # Required binaries OPAM := opam PROJECT_NAME := %%%PROJECT_NAME%%% ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## The following part contains the settings for the compilation process like the ## server/client OPAM packages and the server/client files. # OCamlfind packages for the server (for modules which defines services) SERVER_ELIOM_PACKAGES := # OCamlfind packages for the server SERVER_PACKAGES := ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## The following part contains the configuration for the ocsigenserver. # Port for running the server (make run) PORT := 8080 # Port for testing (make test.*) TEST_PORT := 8080 # Root of installation (must end with /) # PREFIX := /usr/local/ PREFIX := ${OPAM_SWITCH_PREFIX}/ # Local folder for make test.* (must end with /) TEST_PREFIX := local/ ## The installation tree (relative to $(PREFIX) when installing/running or ## $(TEST_PREFIX) when testing). # Configuration file $(PROJECT_NAME).conf ETCDIR := etc/${PROJECT_NAME} # Project's library $(PROJECT_NAME).cma (cmxs) LIBDIR := lib/${PROJECT_NAME} # Command pipe, eg. $ echo restart > $(INSTALL_PREFIX)$(CMDPIPE) CMDPIPE := var/run/${PROJECT_NAME}-cmd # Ocsigenserver's logging files LOGDIR := var/log/${PROJECT_NAME} # Ocsigenserver's persistent data files DATADIR := var/data/${PROJECT_NAME} # Project's static files FILESDIR := var/www/${PROJECT_NAME} # Project's JavaScript file directory ELIOMSTATICDIR := var/www/${PROJECT_NAME} LOCAL_STATIC := static LOCAL_STATIC_CSS := $(LOCAL_STATIC)/css CSS_PREFIX := $(LOCAL_STATIC_CSS)/${PROJECT_NAME} ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## The following part contains the settings for debugging # Debug application (yes/no): Debugging info in compilation, # JavaScript, ocsigenserver DEBUG := yes ##---------------------------------------------------------------------- eliom-11.1.1/pkg/distillery/templates/app.exe/PROJECT_NAME.eliom000066400000000000000000000027471472331017400241540ustar00rootroot00000000000000(* This file was generated by Eliom-distillery. Feel free to use it, modify it, and redistribute it as you wish. *) let%server application_name = "%%%PROJECT_NAME%%%" let%client application_name = Eliom_client.get_application_name () let%server () = Ocsipersist_settings.set_db_file "local/var/data/%%%PROJECT_NAME%%%/%%%PROJECT_NAME%%%_db"; (* Create a module for the application. See https://ocsigen.org/eliom/manual/clientserver-applications for more information. *) module%shared App = Eliom_registration.App (struct let application_name = application_name let global_data_path = Some ["__global_data__"] end) (* As the headers (stylesheets, etc) won't change, we ask Eliom not to update the of the page when changing page. (This also avoids blinking when changing page in iOS). *) let%client _ = Eliom_client.persist_document_head () let%server main_service = Eliom_service.create ~path:(Eliom_service.Path []) ~meth:(Eliom_service.Get Eliom_parameter.unit) () let%client main_service = ~%main_service let%shared () = App.register ~service:main_service (fun () () -> Lwt.return Eliom_content.Html.F.( html (head (title (txt "%%%PROJECT_NAME%%%")) [ css_link ~uri: (make_uri ~service:(Eliom_service.static_dir ()) ["css"; "%%%PROJECT_NAME%%%.css"]) () ]) (body [h1 [txt "Welcome to Eliom!"]]))) eliom-11.1.1/pkg/distillery/templates/app.exe/PROJECT_NAME.opam000066400000000000000000000003031472331017400237650ustar00rootroot00000000000000opam-version: "2.0" name: "%%%PROJECT_NAME%%%" version: "0.1" synopsis: "%%%PROJECT_NAME%%%" depends: [ "eliom" {>= "11.0.0" & < "12.0.0"} "ocsipersist-sqlite-config" {>= "2.0" & < "3.0"} ] eliom-11.1.1/pkg/distillery/templates/app.exe/PROJECT_NAME_main.eliom000066400000000000000000000011211472331017400251410ustar00rootroot00000000000000(** This is the main file if you are using static linking without config file. *) module%shared %%%MODULE_NAME%%% = %%%MODULE_NAME%%% let%server _ = Ocsigen_server.start ~ports:[`All, 8080] ~veryverbose:() ~debugmode:true ~logdir:"local/var/log/%%%PROJECT_NAME%%%" ~datadir:"local/var/data/%%%PROJECT_NAME%%%" ~uploaddir:(Some "/tmp") ~usedefaulthostname:true ~command_pipe:"local/var/run/%%%PROJECT_NAME%%%-cmd" ~default_charset:(Some "utf-8") [ Ocsigen_server.host [Staticmod.run ~dir:"local/var/www/%%%PROJECT_NAME%%%" (); Eliom.run ()] ] eliom-11.1.1/pkg/distillery/templates/app.exe/README.md000066400000000000000000000031111472331017400224600ustar00rootroot00000000000000Instructions ============ This project is (initially) generated by `eliom-distillery` as the basic project `%%%PROJECT_NAME%%%`. This version builds the application as a static executable including the Web server as a library. Generated files --------------- The following files in this directory have been generated by eliom-distillery: - %%%PROJECT_NAME%%%.eliom This is your initial source file. - static/ The content of this folder is statically served. Put your CSS or additional JavaScript files here - Makefile.options Configure your project here - Makefile This contains all rules necessary to build, test, and run your Eliom application. You better don't touch it ;) See below for the relevant targets. - local/ This directory is the target of the temporary installation of your application, to test locally before doing a system-wide installation in /. Do not put anything manually here. Makefile targets ---------------- Here's some help on how to work with this basic distillery project: - Test your application by compiling it and running ocsigenserver locally $ make test.byte (or test.opt) - Compile it only $ make all (or byte or opt) - Deploy your project on your system: Adapt the paths in your source code to match the installation. The default source code is using local files in this directory. The default installation puts files in your opam directory (see variable PREFIX in file Makefile.options). $ make install (or install.byte or install.opt) - Run the server on the deployed project $ make run eliom-11.1.1/pkg/distillery/templates/app.exe/assets!example000066400000000000000000000000001472331017400240350ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/templates/app.exe/dune000066400000000000000000000047601472331017400220720ustar00rootroot00000000000000(dirs tools client gen assets static local) (library (name %%%PROJECT_NAME%%%) (modules (:standard \ %%%MODULE_NAME%%%_main)) (libraries eliom.server ocsipersist-sqlite ocsipersist-sqlite.settings) (library_flags (:standard -linkall)) (wrapped false) (preprocess (pps lwt_ppx ; pgocaml_ppx js_of_ocaml-ppx_deriving_json ; ocsigen-i18n ocsigen-ppx-rpc eliom.ppx.server -- --rpc-raw ; --prefix ; %%%MODULE_NAME%%%_ ; --suffix ; _i18n ; --default-module ; %%%MODULE_NAME%%%_i18n ))) (executables (names %%%PROJECT_NAME%%%_main) (public_names %%%PROJECT_NAME%%%) (modes (byte exe) (native exe)) (libraries eliom.server ocsipersist-sqlite ocsigenserver.ext.staticmod %%%PROJECT_NAME%%%) (modules %%%MODULE_NAME%%%_main) (preprocess (pps lwt_ppx ; pgocaml_ppx js_of_ocaml-ppx_deriving_json ; ocsigen-i18n ocsigen-ppx-rpc eliom.ppx.server ; -- ; --prefix ; %%%MODULE_NAME%%%_ ; --suffix ; _i18n ; --default-module ; %%%MODULE_NAME%%%_i18n ))) ;(rule ; (target %%%PROJECT_NAME%%%_i18n.eliom) ; (deps assets/%%%PROJECT_NAME%%%_i18n.tsv) ; (action ; (with-stdout-to ; %{target} ; (with-stdin-from ; %{deps} ; (pipe-stdout ; (run ; ocsigen-i18n-generator ; --languages ; en,fr ; --default-language ; fr ; %{deps}) ; (run ; sed ; "1 s/]/[@@deriving json]]\\n[%%shared [@@@ocaml.warning\"-27\"]]/")))))) (subdir gen (rule (deps ../tools/gen_dune.ml) (action (with-stdout-to dune.client (run ocaml ../tools/gen_dune.ml))))) (subdir client (executables (names %%%PROJECT_NAME%%%) (modes js byte) (preprocess (pps js_of_ocaml-ppx lwt_ppx ; ocsigen-i18n ; -- ; --prefix ; %%%MODULE_NAME%%%_ ; --suffix ; _i18n ; --default-module ; %%%MODULE_NAME%%%_i18n )) (js_of_ocaml (build_runtime_flags :standard --enable use-js-string) (flags :standard --enable with-js-error --enable use-js-string --no-source-map)) ; source maps are slow... (libraries eliom.client)) (dynamic_include ../gen/dune.client)) ; Main rule: (rule (alias %%%PROJECT_NAME%%%) (deps %%%PROJECT_NAME%%%.cma %%%PROJECT_NAME%%%_main.bc %%%PROJECT_NAME%%%_main.exe client/%%%PROJECT_NAME%%%.bc client/%%%PROJECT_NAME%%%.bc.js tools/check_modules.ml) (action (run ocaml -I +unix -I +str tools/check_modules.ml %%%PROJECT_NAME%%%))) eliom-11.1.1/pkg/distillery/templates/app.exe/dune-project000066400000000000000000000003111472331017400235220ustar00rootroot00000000000000(lang dune 3.14) (dialect (name "eliom-server") (implementation (extension "eliom")) (interface (extension "eliomi"))) (wrapped_executables false) (formatting (enabled_for ocaml "eliom-server")) eliom-11.1.1/pkg/distillery/templates/app.exe/static!css!PROJECT_NAME.css000066400000000000000000000000431472331017400256450ustar00rootroot00000000000000* { font-family: sans-serif; } eliom-11.1.1/pkg/distillery/templates/app.exe/tools!check_modules.ml000066400000000000000000000055631472331017400254770ustar00rootroot00000000000000#load "unix.cma" #load "str.cma" let app = Sys.argv.(1) let modules_from_bytecode_executable nm = let ch = Unix.open_process_in (Printf.sprintf "ocamlobjinfo %s" nm) in while input_line ch <> "Imported units:" do () done; let lst = ref [] in (try while let l = input_line ch in if l <> "" && l.[0] = '\t' then ( let i = String.rindex l '\t' in lst := String.sub l (i + 1) (String.length l - i - 1) :: !lst; true) else false do () done with End_of_file -> ()); !lst let modules_from_bytecode_library nm = let ch = Unix.open_process_in (Printf.sprintf "ocamlobjinfo %s" nm) in let lst = ref [] in (try while true do let l = input_line ch in if String.length l > 11 && String.sub l 0 11 = "Unit name: " then lst := String.sub l 11 (String.length l - 11) :: !lst done with End_of_file -> ()); !lst let read_file f = let ch = open_in f in let s = really_input_string ch (in_channel_length ch) in close_in ch; s let section_re = Str.regexp "close_\\(server\\|client\\)_section" let match_substring sub_re s = try ignore (Str.search_forward sub_re s 0); true with Not_found -> false let eliom_modules dir = Sys.readdir dir |> Array.to_list |> List.sort compare |> List.filter_map @@ fun nm -> if Filename.check_suffix nm ".pp.eliom" then let f = read_file (Filename.concat dir nm) in Some ( String.capitalize_ascii (Filename.chop_suffix nm ".pp.eliom") , match_substring section_re f ) else None let print_modules side l = Format.printf "[%%%%%s.start]@.@." side; List.iter (fun m -> Format.printf "module %s = %s@." m m) l; Format.printf "@." let _ = let client_modules = modules_from_bytecode_executable (Printf.sprintf "./client/%s.bc" app) in let server_modules = modules_from_bytecode_library (Printf.sprintf "./%s.cma" app) in let eliom_modules = eliom_modules "." in let missing_server_modules = List.filter_map (fun (m, sect) -> let c = List.mem m client_modules in let s = List.mem m server_modules in match c, s, sect with true, false, true -> Some m | _ -> None) eliom_modules in let missing_client_modules = List.filter_map (fun (m, sect) -> let c = List.mem m client_modules in let s = List.mem m server_modules in match c, s, sect with false, true, true -> Some m | _ -> None) eliom_modules in let missing_modules = missing_server_modules <> [] || missing_client_modules <> [] in if missing_modules then Format.eprintf "Some modules are missing in %s.eliom:@.@." app; if missing_server_modules <> [] then print_modules "server" missing_server_modules; if missing_client_modules <> [] then print_modules "client" missing_client_modules; if missing_modules then exit 1 eliom-11.1.1/pkg/distillery/templates/app.exe/tools!dune000066400000000000000000000004351472331017400232070ustar00rootroot00000000000000(executable (name eliom_ppx_client) (modes native) (modules eliom_ppx_client) (preprocess (pps lwt_ppx)) (libraries ocsigen-ppx-rpc eliom.ppx.client)) (rule (action (with-stdout-to eliom_ppx_client.ml (echo "let () = Ppxlib.Driver.standalone ()")))) eliom-11.1.1/pkg/distillery/templates/app.exe/tools!gen_dune.ml000066400000000000000000000021071472331017400244450ustar00rootroot00000000000000let with_suffixes nm l f = List.iter (fun suffix -> if Filename.check_suffix nm suffix then f (Filename.chop_suffix nm suffix)) l let handle_file_client nm = if Filename.check_suffix nm ".pp.eliom" then () else if Filename.check_suffix nm ".pp.eliomi" then () else with_suffixes nm [".eliom"; ".tsv"] (fun nm -> Printf.printf "(rule (target %s.ml) (deps ../%s.eliom)\n\ (action\n\ (with-stdout-to %%{target}\n\ (chdir .. (run tools/eliom_ppx_client.exe --as-pp -server-cmo %%{cmo:../%s} --impl %s.eliom)))))\n" nm nm nm nm); if Filename.check_suffix nm ".eliomi" then let nm = Filename.chop_suffix nm ".eliomi" in Printf.printf "(rule (target %s.mli) (deps ../%s.eliomi)\n\ (action\n\ (with-stdout-to %%{target}\n\ (chdir .. (run tools/eliom_ppx_client.exe --as-pp --intf %%{deps})))))\n" nm nm let () = Array.concat (List.map Sys.readdir ["../../.."; "../../../assets"]) |> Array.to_list |> List.sort compare |> List.filter (fun nm -> nm.[0] <> '.') |> List.iter handle_file_client eliom-11.1.1/pkg/distillery/templates/app.exe/tools!sort_deps.ml000066400000000000000000000037231472331017400246700ustar00rootroot00000000000000#load "str.cma" let space_re = Str.regexp " +" let edges = Hashtbl.create 128 let edge_count = Hashtbl.create 128 let chop s = try let i = String.rindex s '.' in String.sub s 0 i with Not_found -> s let add_edge target dep = if target <> dep then ( Hashtbl.replace edges dep (target :: (try Hashtbl.find edges dep with Not_found -> [])); Hashtbl.replace edge_count target (1 + try Hashtbl.find edge_count target with Not_found -> 0); if not (Hashtbl.mem edge_count dep) then Hashtbl.add edge_count dep 0) let sort l = let res = ref [] in List.iter (fun (target, deps) -> let target = chop target in if not (Hashtbl.mem edge_count target) then Hashtbl.add edge_count target 0; List.iter (fun dep -> add_edge target (chop dep)) deps) l; let q = Queue.create () in Hashtbl.iter (fun target count -> if count = 0 then Queue.add target q) edge_count; while not (Queue.is_empty q) do let n = Queue.take q in res := n :: !res; let l = try Hashtbl.find edges n with Not_found -> [] in Hashtbl.remove edges n; List.iter (fun target -> let c = Hashtbl.find edge_count target - 1 in Hashtbl.replace edge_count target c; if c = 0 then Queue.add target q) l done; if Hashtbl.length edges <> 0 then ( Format.eprintf "Dependency loop!@."; exit 1); List.rev !res let _ = let ch = open_in Sys.argv.(1) in let lst = ref [] in (try while true do let l = input_line ch in let l = Str.split space_re l in match l with | target :: ":" :: deps -> lst := (target, deps) :: !lst | _ -> assert false done with End_of_file -> ()); let lst = sort !lst in let files = Hashtbl.create 128 in for i = 2 to Array.length Sys.argv - 1 do Hashtbl.add files (chop Sys.argv.(i)) Sys.argv.(i) done; List.iter (fun f -> try Format.printf "%s@." (Hashtbl.find files f) with Not_found -> ()) lst eliom-11.1.1/pkg/distillery/templates/app.lib/000077500000000000000000000000001472331017400211725ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/templates/app.lib/.eliomignore000066400000000000000000000000661472331017400235060ustar00rootroot00000000000000.eliomreserve upgrade.sql .eliomignore .eliomverbatim eliom-11.1.1/pkg/distillery/templates/app.lib/.eliomreserve000066400000000000000000000000461472331017400236740ustar00rootroot00000000000000db local mobile options os demo style eliom-11.1.1/pkg/distillery/templates/app.lib/.eliomverbatim000066400000000000000000000004101472331017400240250ustar00rootroot00000000000000assets!images!icon.png mobile!www!img!logo.png static!fonts!FontAwesome.otf static!fonts!fontawesome-webfont.eot static!fonts!fontawesome-webfont.svg static!fonts!fontawesome-webfont.ttf static!fonts!fontawesome-webfont.woff static!fonts!fontawesome-webfont.woff2 eliom-11.1.1/pkg/distillery/templates/app.lib/.gitignore000066400000000000000000000001721472331017400231620ustar00rootroot00000000000000# Local server configuration local # Eliom .depend _client _deps _server static/css/project_name.css.map # Dune _build eliom-11.1.1/pkg/distillery/templates/app.lib/.ocamlformat000066400000000000000000000015361472331017400235040ustar00rootroot00000000000000break-cases = fit break-collection-expressions = fit-or-vertical break-fun-decl = wrap break-fun-sig = wrap break-infix = wrap break-infix-before-func = false break-sequences = false break-separators = before break-string-literals = never break-struct = force cases-matching-exp-indent = compact doc-comments = after-when-possible dock-collection-brackets = false indicate-multiline-delimiters = no infix-precedence = indent let-and = compact let-binding-spacing = compact module-item-spacing = compact parens-tuple = multi-line-only parens-tuple-patterns = multi-line-only sequence-style = terminator sequence-blank-line = compact single-case = compact type-decl = compact if-then-else = keyword-first field-space = loose space-around-arrays = false space-around-records = false space-around-lists = false space-around-variants = false ocp-indent-compat = true eliom-11.1.1/pkg/distillery/templates/app.lib/.ocp-indent000066400000000000000000000000521472331017400232300ustar00rootroot00000000000000normal with=0 syntax=lwt mll max_indent=2 eliom-11.1.1/pkg/distillery/templates/app.lib/LICENSE000066400000000000000000000022731472331017400222030ustar00rootroot00000000000000This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to eliom-11.1.1/pkg/distillery/templates/app.lib/Makefile000066400000000000000000000007441472331017400226370ustar00rootroot00000000000000#---------------------------------------------------------------------- # GLOBAL MAKEFILE #---------------------------------------------------------------------- # Local settings (optional). See Makefile.local.example for an example. # WARNING: do not commit to a repository! -include Makefile.local # Eliom settings. Contains all variables. include Makefile.options # Eliom default makefile # Makefile.PROJECT_NAME is also included in this makefile include Makefile.app eliom-11.1.1/pkg/distillery/templates/app.lib/Makefile.app000066400000000000000000000171361472331017400234210ustar00rootroot00000000000000##---------------------------------------------------------------------- ## DISCLAIMER ## ## This file contains the rules to make an Eliom project. The project is ## configured through the variables in the file Makefile.options. ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Internals ## Required binaries OCSIGENSERVER := ocsigenserver OCSIGENSERVER.OPT := ocsigenserver.opt ifneq ($(DEBUG),yes) DUNE_OPTIONS = --profile release endif ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## General .PHONY: all css byte opt DIST_DIRS := $(ETCDIR) $(DATADIR) $(LIBDIR) $(LOGDIR) \ $(FILESDIR)/avatars/tmp $(ELIOMSTATICDIR) \ $(shell dirname $(CMDPIPE)) JS_PREFIX := $(TEST_PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME) CONF_IN := $(wildcard *.conf.in) CONFIG_FILES := $(patsubst %.conf.in,$(TEST_PREFIX)$(ETCDIR)/%.conf,$(CONF_IN)) TEST_CONFIG_FILES := $(patsubst %.conf.in,$(TEST_PREFIX)$(ETCDIR)/%-test.conf,$(CONF_IN)) all:: css byte opt staticfiles ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Testing DIST_FILES = $(ELIOMSTATICDIR)/$(PROJECT_NAME).js $(LIBDIR)/$(PROJECT_NAME).cma .PHONY: test.byte test.opt staticfiles test.byte:: byte | $(addprefix $(TEST_PREFIX),$(DIST_DIRS)) staticfiles @echo "==== The website is available at http://localhost:$(TEST_PORT) ====" $(OCSIGENSERVER) $(RUN_DEBUG) -c $(patsubst %.conf.in,$(TEST_PREFIX)$(ETCDIR)/%-test.conf,$(CONF_IN)) test.opt:: opt | $(addprefix $(TEST_PREFIX),$(DIST_DIRS)) staticfiles @echo "==== The website is available at http://localhost:$(TEST_PORT) ====" $(OCSIGENSERVER.OPT) $(RUN_DEBUG) -c $(patsubst %.conf.in,$(TEST_PREFIX)$(ETCDIR)/%-test.conf,$(CONF_IN)) $(addprefix $(TEST_PREFIX), $(DIST_DIRS)): mkdir -p $@ staticfiles: cp -rf $(LOCAL_STATIC_CSS) $(TEST_PREFIX)$(ELIOMSTATICDIR) ##---------------------------------------------------------------------- ## Installing & Running .PHONY: install install.byte install.byte install.opt install.static install.etc install.lib install.lib.byte install.lib.opt run.byte run.opt install: install.byte install.opt staticfiles install.byte: byte install.lib.byte install.etc install.static | $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(shell dirname $(CMDPIPE))) install.opt: opt install.lib.opt install.etc install.static | $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(shell dirname $(CMDPIPE))) install.lib: install.lib.byte install.lib.opt install.lib.byte: $(TEST_PREFIX)$(LIBDIR)/$(PROJECT_NAME).cma | $(PREFIX)$(LIBDIR) install $< $(PREFIX)$(LIBDIR) install.lib.opt: $(TEST_PREFIX)$(LIBDIR)/$(PROJECT_NAME).cmxs | $(PREFIX)$(LIBDIR) install $< $(PREFIX)$(LIBDIR) install.static: $(TEST_PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME).js | $(PREFIX)$(STATICDIR) $(PREFIX)$(ELIOMSTATICDIR) cp -r $(LOCAL_STATIC_CSS) $(PREFIX)$(FILESDIR) HASH=`md5sum _build/default/client/$(PROJECT_NAME).bc.js | cut -d ' ' -f 1` && \ install $(addprefix -o ,$(WWWUSER)) $(JS_PREFIX)_$$HASH.js $(PREFIX)$(ELIOMSTATICDIR) && \ ln -sf $(PROJECT_NAME)_$$HASH.js $(PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME).js [ -z $(WWWUSER) ] || chown -R $(WWWUSER) $(PREFIX)$(FILESDIR) install.etc: $(TEST_PREFIX)$(ETCDIR)/$(PROJECT_NAME).conf | $(PREFIX)$(ETCDIR) install $< $(PREFIX)$(ETCDIR)/$(PROJECT_NAME).conf .PHONY: print-install-files: @echo $(PREFIX)$(LIBDIR) @echo $(PREFIX)$(ELIOMSTATICDIR) @echo $(PREFIX)$(ETCDIR) $(addprefix $(PREFIX),$(ETCDIR) $(LIBDIR)): install -d $@ $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(ELIOMSTATICDIR) $(shell dirname $(CMDPIPE))): install $(addprefix -o ,$(WWWUSER)) -d $@ run.byte: @echo "==== The website is available at http://localhost:$(PORT) ====" $(OCSIGENSERVER) $(RUN_DEBUG) -c ${PREFIX}${ETCDIR}/${PROJECT_NAME}.conf run.opt: @echo "==== The website is available at http://localhost:$(PORT) ====" $(OCSIGENSERVER.OPT) $(RUN_DEBUG) -c ${PREFIX}${ETCDIR}/${PROJECT_NAME}.conf ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Config files ELIOM_MODULES=$(patsubst %,\,$(SERVER_ELIOM_PACKAGES)) FINDLIB_PACKAGES=$(patsubst %,\,$(SERVER_PACKAGES)) EDIT_WARNING=DON\'T EDIT THIS FILE! It is generated from $(PROJECT_NAME).conf.in, edit that one, or the variables in Makefile.options SED_ARGS = -e "/^ *%%%/d" SED_ARGS += -e "s|%%PROJECT_NAME%%|$(PROJECT_NAME)|g" SED_ARGS += -e "s|%%DB_NAME%%|$(DB_NAME)|g" SED_ARGS += -e "s|%%DB_HOST%%|$(DB_HOST)|g" SED_ARGS += -e "s|%%DB_PORT%%|$(DB_PORT)|g" SED_ARGS += -e "s|%%DB_USER%%|$(DB_USER)|g" SED_ARGS += -e "s|%%DB_PASSWORD%%|$(DB_PASSWORD)|g" SED_ARGS += -e "s|%%CMDPIPE%%|%%PREFIX%%$(CMDPIPE)|g" SED_ARGS += -e "s|%%LOGDIR%%|%%PREFIX%%$(LOGDIR)|g" SED_ARGS += -e "s|%%DATADIR%%|%%PREFIX%%$(DATADIR)|g" SED_ARGS += -e "s|%%LIBDIR%%|%%PREFIX%%$(LIBDIR)|g" SED_ARGS += -e "s|%%WARNING%%|$(EDIT_WARNING)|g" SED_ARGS += -e "s|%%PACKAGES%%|$(FINDLIB_PACKAGES)|g" SED_ARGS += -e "s|%%ELIOM_MODULES%%|$(ELIOM_MODULES)|g" SED_ARGS += -e "s|%%FILESDIR%%|%%PREFIX%%$(FILESDIR)|g" SED_ARGS += -e "s|%%ELIOMSTATICDIR%%|%%PREFIX%%$(ELIOMSTATICDIR)|g" SED_ARGS += -e "s|%%APPNAME%%|$(shell basename `readlink $(JS_PREFIX).js` .js)|g" SED_ARGS += -e "s|%%CSSNAME%%|$(shell readlink $(CSS_PREFIX).css)|g" ifeq ($(DEBUG),yes) SED_ARGS += -e "s|%%DEBUGMODE%%|\|g" else SED_ARGS += -e "s|%%DEBUGMODE%%||g" endif LOCAL_SED_ARGS := -e "s|%%PORT%%|$(TEST_PORT)|g" LOCAL_SED_ARGS += -e "s|%%USERGROUP%%||g" GLOBAL_SED_ARGS := -e "s|%%PORT%%|$(PORT)|g" ifeq ($(WWWUSER)$(WWWGROUP),) GLOBAL_SED_ARGS += -e "s|%%USERGROUP%%||g" else GLOBAL_SED_ARGS += -e "s|%%USERGROUP%%|$(WWWUSER)$(WWWGROUP)|g" endif JS_AND_CSS=$(JS_PREFIX).js $(CSS_PREFIX).css $(CONFIG_FILES): $(TEST_PREFIX)$(ETCDIR)/%.conf: %.conf.in $(JS_AND_CSS) | $(TEST_PREFIX)$(ETCDIR) sed $(SED_ARGS) $(GLOBAL_SED_ARGS) $< | sed -e "s|%%PREFIX%%|$(PREFIX)|g" > $@ $(TEST_CONFIG_FILES): $(TEST_PREFIX)$(ETCDIR)/%-test.conf: %.conf.in $(JS_AND_CSS) | $(TEST_PREFIX)$(ETCDIR) sed $(SED_ARGS) $(LOCAL_SED_ARGS) $< | sed -e "s|%%PREFIX%%|$(TEST_PREFIX)|g" > $@ ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Compilation .PHONY: gen-dune config-files config-files: | $(TEST_PREFIX)$(ELIOMSTATICDIR) $(TEST_PREFIX)$(LIBDIR) HASH=`md5sum _build/default/client/$(PROJECT_NAME).bc.js | cut -d ' ' -f 1` && \ cp -f _build/default/client/$(PROJECT_NAME).bc.js $(JS_PREFIX)_$$HASH.js && \ ln -sf $(PROJECT_NAME)_$$HASH.js $(JS_PREFIX).js cp -f _build/default/$(PROJECT_NAME).cm* $(TEST_PREFIX)$(LIBDIR)/ $(MAKE) $(CONFIG_FILES) $(TEST_CONFIG_FILES) PROJECT_NAME=$(PROJECT_NAME) all:: $(ENV_PSQL) dune build $(DUNE_OPTIONS) @install @$(PROJECT_NAME) $(PROJECT_NAME).cmxs js:: $(ENV_PSQL) dune build $(DUNE_OPTIONS) client/$(PROJECT_NAME).bc.js byte:: $(ENV_PSQL) dune build $(DUNE_OPTIONS) @$(PROJECT_NAME) make config-files PROJECT_NAME=$(PROJECT_NAME) opt:: $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME).cmxs @$(PROJECT_NAME) make config-files PROJECT_NAME=$(PROJECT_NAME) ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## Clean up .PHONY: clean clean:: dune clean eliom-11.1.1/pkg/distillery/templates/app.lib/Makefile.options000066400000000000000000000050541472331017400243300ustar00rootroot00000000000000#---------------------------------------------------------------------- # SETTINGS FOR THE ELIOM PROJECT %%%PROJECT_NAME%%% #---------------------------------------------------------------------- # Required binaries OPAM := opam PROJECT_NAME := %%%PROJECT_NAME%%% ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## The following part contains the settings for the compilation process like the ## server/client OPAM packages and the server/client files. # OCamlfind packages for the server (for modules which defines services) SERVER_ELIOM_PACKAGES := # OCamlfind packages for the server SERVER_PACKAGES := ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## The following part contains the configuration for the ocsigenserver. # Port for running the server (make run.*) PORT := 8080 # Port for testing (make test.*) TEST_PORT := 8080 # Root of installation (must end with /) # PREFIX := /usr/local/ PREFIX := ${OPAM_SWITCH_PREFIX}/ # Local folder for make test.* (must end with /) TEST_PREFIX := local/ ## The installation tree (relative to $(PREFIX) when installing/running or ## $(TEST_PREFIX) when testing). # Configuration file $(PROJECT_NAME).conf ETCDIR := etc/${PROJECT_NAME} # Project's library $(PROJECT_NAME).cma (cmxs) LIBDIR := lib/${PROJECT_NAME} # Command pipe, eg. $ echo restart > $(INSTALL_PREFIX)$(CMDPIPE) CMDPIPE := var/run/${PROJECT_NAME}-cmd # Ocsigenserver's logging files LOGDIR := var/log/${PROJECT_NAME} # Ocsigenserver's persistent data files DATADIR := var/data/${PROJECT_NAME} # Project's static files FILESDIR := var/www/${PROJECT_NAME} # Project's JavaScript file directory ELIOMSTATICDIR := var/www/${PROJECT_NAME} LOCAL_STATIC := static LOCAL_STATIC_CSS := $(LOCAL_STATIC)/css CSS_PREFIX := $(LOCAL_STATIC_CSS)/${PROJECT_NAME} ##---------------------------------------------------------------------- ##---------------------------------------------------------------------- ## The following part contains the settings for debugging # Debug application (yes/no): Debugging info in compilation, # JavaScript, ocsigenserver DEBUG := yes ##---------------------------------------------------------------------- eliom-11.1.1/pkg/distillery/templates/app.lib/PROJECT_NAME.conf.in000066400000000000000000000054701472331017400243620ustar00rootroot00000000000000%%% This is the template for your configuration file. The %%VALUES%% below are %%% taken from the Makefile to generate the actual configuration files. %%% This comment will disappear. %%PORT%% %%% Only set for running, not for testing %%LOGDIR%% %%DATADIR%% utf-8 /tmp %%% Only set when debugging %%DEBUGMODE%% %%CMDPIPE%% %%% This will include the packages defined as SERVER_PACKAGES in your Makefile: %%PACKAGES%% %%ELIOM_MODULES%%
eliom-11.1.1/pkg/distillery/templates/app.lib/PROJECT_NAME.eliom000066400000000000000000000025661472331017400241400ustar00rootroot00000000000000(* This file was generated by Eliom-distillery. Feel free to use it, modify it, and redistribute it as you wish. *) let%server application_name = "%%%PROJECT_NAME%%%" let%client application_name = Eliom_client.get_application_name () (* Create a module for the application. See https://ocsigen.org/eliom/manual/clientserver-applications for more information. *) module%shared App = Eliom_registration.App (struct let application_name = application_name let global_data_path = Some ["__global_data__"] end) (* As the headers (stylesheets, etc) won't change, we ask Eliom not to update the of the page when changing page. (This also avoids blinking when changing page in iOS). *) let%client _ = Eliom_client.persist_document_head () let%server main_service = Eliom_service.create ~path:(Eliom_service.Path []) ~meth:(Eliom_service.Get Eliom_parameter.unit) () let%client main_service = ~%main_service let%shared () = App.register ~service:main_service (fun () () -> Lwt.return Eliom_content.Html.F.( html (head (title (txt "%%%PROJECT_NAME%%%")) [ css_link ~uri: (make_uri ~service:(Eliom_service.static_dir ()) ["css"; "%%%PROJECT_NAME%%%.css"]) () ]) (body [h1 [txt "Welcome to Eliom!"]]))) eliom-11.1.1/pkg/distillery/templates/app.lib/PROJECT_NAME.opam000066400000000000000000000003031472331017400237520ustar00rootroot00000000000000opam-version: "2.0" name: "%%%PROJECT_NAME%%%" version: "0.1" synopsis: "%%%PROJECT_NAME%%%" depends: [ "eliom" {>= "11.0.0" & < "12.0.0"} "ocsipersist-sqlite-config" {>= "2.0" & < "3.0"} ] eliom-11.1.1/pkg/distillery/templates/app.lib/README.md000066400000000000000000000040131472331017400224470ustar00rootroot00000000000000Instructions ============ This project is (initially) generated by `eliom-distillery` as the basic project `%%%PROJECT_NAME%%%`. This version of the build system creates the app as a library to be loaded dynamically into ocsigenserver using a configuration file. Generated files --------------- The following files in this directory have been generated by eliom-distillery: - %%%PROJECT_NAME%%%.eliom This is your initial source file. - static/ The content of this folder is statically served. Put your CSS or additional JavaScript files here - Makefile.options Configure your project here - %%%PROJECT_NAME%%%.conf.in This file is a template for the configuration file for ocsigenserver. You will rarely have to edit itself - it takes its variables from the Makefile.options. This way, the installation rules and the configuration files are synchronized with respect to the different folders. - Makefile This contains all rules necessary to build, test, and run your Eliom application. You better don't touch it ;) See below for the relevant targets. - local/ This directory is the target of the temporary installation of your application, to test locally before doing a system-wide installation in /. Do not put anything manually here. Makefile targets ---------------- Here's some help on how to work with this basic distillery project: - Test your application by compiling it and running ocsigenserver locally $ make test.byte (or test.opt) - Compile it only $ make all (or byte or opt) - Deploy your project on your system $ make install (or install.byte or install.opt) - Run the server on the deployed project $ make run.byte (or run.opt) If you want to use a global install, update PREFIX in `Makefile.options` and run make ```install``` as root. If OCaml/Eliom is not installed globally, you will need to re-export some environment variables to make this work: ```Shell sudo PATH=$PATH OCAMLPATH=$OCAMLPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make run.opt ``` eliom-11.1.1/pkg/distillery/templates/app.lib/assets!example000066400000000000000000000000001472331017400240220ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/templates/app.lib/dune000066400000000000000000000036011472331017400220500ustar00rootroot00000000000000(dirs tools client gen assets static local) (library (name %%%PROJECT_NAME%%%) (modules (:standard)) (libraries eliom.server ocsipersist-sqlite ocsipersist-sqlite.settings) (library_flags (:standard -linkall)) (wrapped false) (preprocess (pps lwt_ppx ; pgocaml_ppx js_of_ocaml-ppx_deriving_json ; ocsigen-i18n ocsigen-ppx-rpc eliom.ppx.server -- --rpc-raw ; --prefix ; %%%MODULE_NAME%%%_ ; --suffix ; _i18n ; --default-module ; %%%MODULE_NAME%%%_i18n ))) ;(rule ; (target %%%PROJECT_NAME%%%_i18n.eliom) ; (deps assets/%%%PROJECT_NAME%%%_i18n.tsv) ; (action ; (with-stdout-to ; %{target} ; (with-stdin-from ; %{deps} ; (pipe-stdout ; (run ; ocsigen-i18n-generator ; --languages ; en,fr ; --default-language ; fr ; %{deps}) ; (run ; sed ; "1 s/]/[@@deriving json]]\\n[%%shared [@@@ocaml.warning\"-27\"]]/")))))) (subdir gen (rule (deps ../tools/gen_dune.ml) (action (with-stdout-to dune.client (run ocaml ../tools/gen_dune.ml))))) (subdir client (executables (names %%%PROJECT_NAME%%%) (modes js byte) (preprocess (pps js_of_ocaml-ppx lwt_ppx ; ocsigen-i18n ; -- ; --prefix ; %%%MODULE_NAME%%%_ ; --suffix ; _i18n ; --default-module ; %%%MODULE_NAME%%%_i18n )) (js_of_ocaml (build_runtime_flags :standard --enable use-js-string) (flags :standard --enable with-js-error --enable use-js-string --no-source-map)) ; source maps are slow... (libraries eliom.client)) (dynamic_include ../gen/dune.client)) ; Main rule: (rule (alias %%%PROJECT_NAME%%%) (deps %%%PROJECT_NAME%%%.cma client/%%%PROJECT_NAME%%%.bc client/%%%PROJECT_NAME%%%.bc.js tools/check_modules.ml) (action (run ocaml -I +unix -I +str tools/check_modules.ml %%%PROJECT_NAME%%%))) eliom-11.1.1/pkg/distillery/templates/app.lib/dune-project000066400000000000000000000003111472331017400235070ustar00rootroot00000000000000(lang dune 3.14) (dialect (name "eliom-server") (implementation (extension "eliom")) (interface (extension "eliomi"))) (wrapped_executables false) (formatting (enabled_for ocaml "eliom-server")) eliom-11.1.1/pkg/distillery/templates/app.lib/static!css!PROJECT_NAME.css000066400000000000000000000000431472331017400256320ustar00rootroot00000000000000* { font-family: sans-serif; } eliom-11.1.1/pkg/distillery/templates/app.lib/tools!check_modules.ml000066400000000000000000000055631472331017400254640ustar00rootroot00000000000000#load "unix.cma" #load "str.cma" let app = Sys.argv.(1) let modules_from_bytecode_executable nm = let ch = Unix.open_process_in (Printf.sprintf "ocamlobjinfo %s" nm) in while input_line ch <> "Imported units:" do () done; let lst = ref [] in (try while let l = input_line ch in if l <> "" && l.[0] = '\t' then ( let i = String.rindex l '\t' in lst := String.sub l (i + 1) (String.length l - i - 1) :: !lst; true) else false do () done with End_of_file -> ()); !lst let modules_from_bytecode_library nm = let ch = Unix.open_process_in (Printf.sprintf "ocamlobjinfo %s" nm) in let lst = ref [] in (try while true do let l = input_line ch in if String.length l > 11 && String.sub l 0 11 = "Unit name: " then lst := String.sub l 11 (String.length l - 11) :: !lst done with End_of_file -> ()); !lst let read_file f = let ch = open_in f in let s = really_input_string ch (in_channel_length ch) in close_in ch; s let section_re = Str.regexp "close_\\(server\\|client\\)_section" let match_substring sub_re s = try ignore (Str.search_forward sub_re s 0); true with Not_found -> false let eliom_modules dir = Sys.readdir dir |> Array.to_list |> List.sort compare |> List.filter_map @@ fun nm -> if Filename.check_suffix nm ".pp.eliom" then let f = read_file (Filename.concat dir nm) in Some ( String.capitalize_ascii (Filename.chop_suffix nm ".pp.eliom") , match_substring section_re f ) else None let print_modules side l = Format.printf "[%%%%%s.start]@.@." side; List.iter (fun m -> Format.printf "module %s = %s@." m m) l; Format.printf "@." let _ = let client_modules = modules_from_bytecode_executable (Printf.sprintf "./client/%s.bc" app) in let server_modules = modules_from_bytecode_library (Printf.sprintf "./%s.cma" app) in let eliom_modules = eliom_modules "." in let missing_server_modules = List.filter_map (fun (m, sect) -> let c = List.mem m client_modules in let s = List.mem m server_modules in match c, s, sect with true, false, true -> Some m | _ -> None) eliom_modules in let missing_client_modules = List.filter_map (fun (m, sect) -> let c = List.mem m client_modules in let s = List.mem m server_modules in match c, s, sect with false, true, true -> Some m | _ -> None) eliom_modules in let missing_modules = missing_server_modules <> [] || missing_client_modules <> [] in if missing_modules then Format.eprintf "Some modules are missing in %s.eliom:@.@." app; if missing_server_modules <> [] then print_modules "server" missing_server_modules; if missing_client_modules <> [] then print_modules "client" missing_client_modules; if missing_modules then exit 1 eliom-11.1.1/pkg/distillery/templates/app.lib/tools!dune000066400000000000000000000004351472331017400231740ustar00rootroot00000000000000(executable (name eliom_ppx_client) (modes native) (modules eliom_ppx_client) (preprocess (pps lwt_ppx)) (libraries ocsigen-ppx-rpc eliom.ppx.client)) (rule (action (with-stdout-to eliom_ppx_client.ml (echo "let () = Ppxlib.Driver.standalone ()")))) eliom-11.1.1/pkg/distillery/templates/app.lib/tools!gen_dune.ml000066400000000000000000000021071472331017400244320ustar00rootroot00000000000000let with_suffixes nm l f = List.iter (fun suffix -> if Filename.check_suffix nm suffix then f (Filename.chop_suffix nm suffix)) l let handle_file_client nm = if Filename.check_suffix nm ".pp.eliom" then () else if Filename.check_suffix nm ".pp.eliomi" then () else with_suffixes nm [".eliom"; ".tsv"] (fun nm -> Printf.printf "(rule (target %s.ml) (deps ../%s.eliom)\n\ (action\n\ (with-stdout-to %%{target}\n\ (chdir .. (run tools/eliom_ppx_client.exe --as-pp -server-cmo %%{cmo:../%s} --impl %s.eliom)))))\n" nm nm nm nm); if Filename.check_suffix nm ".eliomi" then let nm = Filename.chop_suffix nm ".eliomi" in Printf.printf "(rule (target %s.mli) (deps ../%s.eliomi)\n\ (action\n\ (with-stdout-to %%{target}\n\ (chdir .. (run tools/eliom_ppx_client.exe --as-pp --intf %%{deps})))))\n" nm nm let () = Array.concat (List.map Sys.readdir ["../../.."; "../../../assets"]) |> Array.to_list |> List.sort compare |> List.filter (fun nm -> nm.[0] <> '.') |> List.iter handle_file_client eliom-11.1.1/pkg/distillery/templates/app.lib/tools!sort_deps.ml000066400000000000000000000037231472331017400246550ustar00rootroot00000000000000#load "str.cma" let space_re = Str.regexp " +" let edges = Hashtbl.create 128 let edge_count = Hashtbl.create 128 let chop s = try let i = String.rindex s '.' in String.sub s 0 i with Not_found -> s let add_edge target dep = if target <> dep then ( Hashtbl.replace edges dep (target :: (try Hashtbl.find edges dep with Not_found -> [])); Hashtbl.replace edge_count target (1 + try Hashtbl.find edge_count target with Not_found -> 0); if not (Hashtbl.mem edge_count dep) then Hashtbl.add edge_count dep 0) let sort l = let res = ref [] in List.iter (fun (target, deps) -> let target = chop target in if not (Hashtbl.mem edge_count target) then Hashtbl.add edge_count target 0; List.iter (fun dep -> add_edge target (chop dep)) deps) l; let q = Queue.create () in Hashtbl.iter (fun target count -> if count = 0 then Queue.add target q) edge_count; while not (Queue.is_empty q) do let n = Queue.take q in res := n :: !res; let l = try Hashtbl.find edges n with Not_found -> [] in Hashtbl.remove edges n; List.iter (fun target -> let c = Hashtbl.find edge_count target - 1 in Hashtbl.replace edge_count target c; if c = 0 then Queue.add target q) l done; if Hashtbl.length edges <> 0 then ( Format.eprintf "Dependency loop!@."; exit 1); List.rev !res let _ = let ch = open_in Sys.argv.(1) in let lst = ref [] in (try while true do let l = input_line ch in let l = Str.split space_re l in match l with | target :: ":" :: deps -> lst := (target, deps) :: !lst | _ -> assert false done with End_of_file -> ()); let lst = sort !lst in let files = Hashtbl.create 128 in for i = 2 to Array.length Sys.argv - 1 do Hashtbl.add files (chop Sys.argv.(i)) Sys.argv.(i) done; List.iter (fun f -> try Format.printf "%s@." (Hashtbl.find files f) with Not_found -> ()) lst eliom-11.1.1/pkg/distillery/templates/basic.ppx/000077500000000000000000000000001472331017400215345ustar00rootroot00000000000000eliom-11.1.1/pkg/distillery/templates/basic.ppx/.ocp-indent000066400000000000000000000000741472331017400235760ustar00rootroot00000000000000normal with=0 syntax=lwt mll max_indent=2 ppx_stritem_ext=0 eliom-11.1.1/pkg/distillery/templates/basic.ppx/Makefile000066400000000000000000000221761472331017400232040ustar00rootroot00000000000000 ##---------------------------------------------------------------------- ## DISCLAIMER ## ## This file contains the rules to make an Eliom project. The project is ## configured through the variables in the file Makefile.options. ##---------------------------------------------------------------------- include Makefile.options ##---------------------------------------------------------------------- ## Internals ## Required binaries ELIOMC := eliomc -ppx ELIOMOPT := eliomopt -ppx JS_OF_ELIOM := js_of_eliom -ppx ELIOMDEP := eliomdep OCSIGENSERVER := ocsigenserver OCSIGENSERVER.OPT := ocsigenserver.opt ## Where to put intermediate object files. ## - ELIOM_{SERVER,CLIENT}_DIR must be distinct ## - ELIOM_CLIENT_DIR must not be the local dir. ## - ELIOM_SERVER_DIR could be ".", but you need to ## remove it from the "clean" rules... export ELIOM_SERVER_DIR := _server export ELIOM_CLIENT_DIR := _client export ELIOM_TYPE_DIR := _server DEPSDIR := _deps ifeq ($(DEBUG),yes) GENERATE_DEBUG ?= -g RUN_DEBUG ?= "-v" DEBUG_JS ?= -jsopt -pretty -jsopt -noinline -jsopt -debuginfo endif ##---------------------------------------------------------------------- ## General .PHONY: all byte opt all: byte opt byte opt:: $(TEST_PREFIX)$(ELIOMSTATICDIR)/${PROJECT_NAME}.js byte opt:: $(TEST_PREFIX)$(ETCDIR)/$(PROJECT_NAME).conf byte opt:: $(TEST_PREFIX)$(ETCDIR)/$(PROJECT_NAME)-test.conf byte:: $(TEST_PREFIX)$(LIBDIR)/${PROJECT_NAME}.cma opt:: $(TEST_PREFIX)$(LIBDIR)/${PROJECT_NAME}.cmxs DIST_DIRS = $(ETCDIR) $(DATADIR) $(LIBDIR) $(LOGDIR) $(STATICDIR) $(ELIOMSTATICDIR) $(shell dirname $(CMDPIPE)) ##---------------------------------------------------------------------- ## Testing DIST_FILES = $(ELIOMSTATICDIR)/$(PROJECT_NAME).js $(LIBDIR)/$(PROJECT_NAME).cma .PHONY: test.byte test.opt test.byte: $(addprefix $(TEST_PREFIX),$(ETCDIR)/$(PROJECT_NAME)-test.conf $(DIST_DIRS) $(DIST_FILES)) $(OCSIGENSERVER) $(RUN_DEBUG) -c $< test.opt: $(addprefix $(TEST_PREFIX),$(ETCDIR)/$(PROJECT_NAME)-test.conf $(DIST_DIRS) $(patsubst %.cma,%.cmxs, $(DIST_FILES))) $(OCSIGENSERVER.OPT) $(RUN_DEBUG) -c $< $(addprefix $(TEST_PREFIX), $(DIST_DIRS)): mkdir -p $@ ##---------------------------------------------------------------------- ## Installing & Running .PHONY: install install.byte install.byte install.opt install.static install.etc install.lib install.lib.byte install.lib.opt run.byte run.opt install: install.byte install.opt install.byte: install.lib.byte install.etc install.static | $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(shell dirname $(CMDPIPE))) install.opt: install.lib.opt install.etc install.static | $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(shell dirname $(CMDPIPE))) install.lib: install.lib.byte install.lib.opt install.lib.byte: $(TEST_PREFIX)$(LIBDIR)/$(PROJECT_NAME).cma | $(PREFIX)$(LIBDIR) install $< $(PREFIX)$(LIBDIR) install.lib.opt: $(TEST_PREFIX)$(LIBDIR)/$(PROJECT_NAME).cmxs | $(PREFIX)$(LIBDIR) install $< $(PREFIX)$(LIBDIR) install.static: $(TEST_PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME).js | $(PREFIX)$(STATICDIR) $(PREFIX)$(ELIOMSTATICDIR) cp -r $(LOCAL_STATIC)/* $(PREFIX)$(STATICDIR) [ -z $(WWWUSER) ] || chown -R $(WWWUSER) $(PREFIX)$(STATICDIR) install $(addprefix -o ,$(WWWUSER)) $< $(PREFIX)$(ELIOMSTATICDIR) install.etc: $(TEST_PREFIX)$(ETCDIR)/$(PROJECT_NAME).conf | $(PREFIX)$(ETCDIR) install $< $(PREFIX)$(ETCDIR)/$(PROJECT_NAME).conf .PHONY: print-install-files: @echo $(PREFIX)$(LIBDIR) @echo $(PREFIX)$(STATICDIR) @echo $(PREFIX)$(ELIOMSTATICDIR) @echo $(PREFIX)$(ETCDIR) $(addprefix $(PREFIX),$(ETCDIR) $(LIBDIR)): install -d $@ $(addprefix $(PREFIX),$(DATADIR) $(LOGDIR) $(STATICDIR) $(ELIOMSTATICDIR) $(shell dirname $(CMDPIPE))): install $(addprefix -o ,$(WWWUSER)) -d $@ run.byte: $(OCSIGENSERVER) $(RUN_DEBUG) -c ${PREFIX}${ETCDIR}/${PROJECT_NAME}.conf run.opt: $(OCSIGENSERVER.OPT) $(RUN_DEBUG) -c ${PREFIX}${ETCDIR}/${PROJECT_NAME}.conf ##---------------------------------------------------------------------- ## Aux eliomdep=$(shell $(ELIOMDEP) $(1) -ppx -sort $(2) $(filter %.eliom %.ml,$(3)))) objs=$(patsubst %.ml,$(1)/%.$(2),$(patsubst %.eliom,$(1)/%.$(2),$(filter %.eliom %.ml,$(3)))) depsort=$(call objs,$(1),$(2),$(call eliomdep,$(3),$(4),$(5))) ##---------------------------------------------------------------------- ## Config files FINDLIB_PACKAGES=$(patsubst %,\,$(SERVER_PACKAGES)) EDIT_WARNING=DON\'T EDIT THIS FILE! It is generated from $(PROJECT_NAME).conf.in, edit that one, or the variables in Makefile.options SED_ARGS := -e "/^ *%%%/d" SED_ARGS += -e "s|%%PROJECT_NAME%%|$(PROJECT_NAME)|g" SED_ARGS += -e "s|%%DATABASE_NAME%%|$(DATABASE_NAME)|g" SED_ARGS += -e "s|%%DATABASE_USER%%|$(DATABASE_USER)|g" SED_ARGS += -e "s|%%CMDPIPE%%|%%PREFIX%%$(CMDPIPE)|g" SED_ARGS += -e "s|%%LOGDIR%%|%%PREFIX%%$(LOGDIR)|g" SED_ARGS += -e "s|%%DATADIR%%|%%PREFIX%%$(DATADIR)|g" SED_ARGS += -e "s|%%PERSISTENT_DATA_BACKEND%%|$(PERSISTENT_DATA_BACKEND)|g" SED_ARGS += -e "s|%%LIBDIR%%|%%PREFIX%%$(LIBDIR)|g" SED_ARGS += -e "s|%%WARNING%%|$(EDIT_WARNING)|g" SED_ARGS += -e "s|%%PACKAGES%%|$(FINDLIB_PACKAGES)|g" SED_ARGS += -e "s|%%ELIOMSTATICDIR%%|%%PREFIX%%$(ELIOMSTATICDIR)|g" ifeq ($(DEBUG),yes) SED_ARGS += -e "s|%%DEBUGMODE%%|\|g" else SED_ARGS += -e "s|%%DEBUGMODE%%||g" endif LOCAL_SED_ARGS := -e "s|%%PORT%%|$(TEST_PORT)|g" LOCAL_SED_ARGS += -e "s|%%STATICDIR%%|$(LOCAL_STATIC)|g" LOCAL_SED_ARGS += -e "s|%%USERGROUP%%||g" GLOBAL_SED_ARGS := -e "s|%%PORT%%|$(PORT)|g" GLOBAL_SED_ARGS += -e "s|%%STATICDIR%%|%%PREFIX%%$(STATICDIR)|g" ifeq ($(WWWUSER)$(WWWGROUP),) GLOBAL_SED_ARGS += -e "s|%%USERGROUP%%||g" else GLOBAL_SED_ARGS += -e "s|%%USERGROUP%%|$(WWWUSER)$(WWWGROUP)|g" endif $(TEST_PREFIX)${ETCDIR}/${PROJECT_NAME}.conf: ${PROJECT_NAME}.conf.in Makefile.options | $(TEST_PREFIX)$(ETCDIR) sed $(SED_ARGS) $(GLOBAL_SED_ARGS) $< | sed -e "s|%%PREFIX%%|$(PREFIX)|g" > $@ $(TEST_PREFIX)${ETCDIR}/${PROJECT_NAME}-test.conf: ${PROJECT_NAME}.conf.in Makefile.options | $(TEST_PREFIX)$(ETCDIR) sed $(SED_ARGS) $(LOCAL_SED_ARGS) $< | sed -e "s|%%PREFIX%%|$(TEST_PREFIX)|g" > $@ ##---------------------------------------------------------------------- ## Server side compilation SERVER_INC := ${addprefix -package ,${SERVER_PACKAGES}} ${ELIOM_TYPE_DIR}/%.type_mli: %.eliom ${ELIOMC} -infer ${SERVER_INC} $< $(TEST_PREFIX)$(LIBDIR)/$(PROJECT_NAME).cma: $(call objs,$(ELIOM_SERVER_DIR),cmo,$(SERVER_FILES)) | $(TEST_PREFIX)$(LIBDIR) ${ELIOMC} -a -o $@ $(GENERATE_DEBUG) \ $(call depsort,$(ELIOM_SERVER_DIR),cmo,-server,$(SERVER_INC),$(SERVER_FILES)) $(TEST_PREFIX)$(LIBDIR)/$(PROJECT_NAME).cmxa: $(call objs,$(ELIOM_SERVER_DIR),cmx,$(SERVER_FILES)) | $(TEST_PREFIX)$(LIBDIR) ${ELIOMOPT} -a -o $@ $(GENERATE_DEBUG) \ $(call depsort,$(ELIOM_SERVER_DIR),cmx,-server,$(SERVER_INC),$(SERVER_FILES)) %.cmxs: %.cmxa $(ELIOMOPT) -shared -linkall -o $@ $(GENERATE_DEBUG) $< ${ELIOM_SERVER_DIR}/%.cmi: %.mli ${ELIOMC} -c ${SERVER_INC} $(GENERATE_DEBUG) $< ${ELIOM_SERVER_DIR}/%.cmi: %.eliomi ${ELIOMC} -c ${SERVER_INC} $(GENERATE_DEBUG) $< ${ELIOM_SERVER_DIR}/%.cmo: %.ml ${ELIOMC} -c ${SERVER_INC} $(GENERATE_DEBUG) $< ${ELIOM_SERVER_DIR}/%.cmo: %.eliom ${ELIOMC} -c ${SERVER_INC} $(GENERATE_DEBUG) $< ${ELIOM_SERVER_DIR}/%.cmx: %.ml ${ELIOMOPT} -c ${SERVER_INC} $(GENERATE_DEBUG) $< ${ELIOM_SERVER_DIR}/%.cmx: %.eliom ${ELIOMOPT} -c ${SERVER_INC} $(GENERATE_DEBUG) $< ##---------------------------------------------------------------------- ## Client side compilation CLIENT_LIBS := ${addprefix -package ,${CLIENT_PACKAGES}} CLIENT_INC := ${addprefix -package ,${CLIENT_PACKAGES}} CLIENT_OBJS := $(filter %.eliom %.ml, $(CLIENT_FILES)) CLIENT_OBJS := $(patsubst %.eliom,${ELIOM_CLIENT_DIR}/%.cmo, ${CLIENT_OBJS}) CLIENT_OBJS := $(patsubst %.ml,${ELIOM_CLIENT_DIR}/%.cmo, ${CLIENT_OBJS}) $(TEST_PREFIX)$(ELIOMSTATICDIR)/$(PROJECT_NAME).js: $(call objs,$(ELIOM_CLIENT_DIR),cmo,$(CLIENT_FILES)) | $(TEST_PREFIX)$(ELIOMSTATICDIR) ${JS_OF_ELIOM} -o $@ $(GENERATE_DEBUG) $(CLIENT_INC) $(DEBUG_JS) \ $(call depsort,$(ELIOM_CLIENT_DIR),cmo,-client,$(CLIENT_INC),$(CLIENT_FILES)) ${ELIOM_CLIENT_DIR}/%.cmi: %.mli ${JS_OF_ELIOM} -c ${CLIENT_INC} $(GENERATE_DEBUG) $< ${ELIOM_CLIENT_DIR}/%.cmo: %.eliom ${JS_OF_ELIOM} -c ${CLIENT_INC} $(GENERATE_DEBUG) $< ${ELIOM_CLIENT_DIR}/%.cmo: %.ml ${JS_OF_ELIOM} -c ${CLIENT_INC} $(GENERATE_DEBUG) $< ${ELIOM_CLIENT_DIR}/%.cmi: %.eliomi ${JS_OF_ELIOM} -c ${CLIENT_INC} $(GENERATE_DEBUG) $< ##---------------------------------------------------------------------- ## Dependencies include .depend .depend: $(patsubst %,$(DEPSDIR)/%.server,$(SERVER_FILES)) $(patsubst %,$(DEPSDIR)/%.client,$(CLIENT_FILES)) cat $^ > $@ $(DEPSDIR)/%.server: % | $(DEPSDIR) $(ELIOMDEP) -server -ppx $(SERVER_INC) $< > $@ $(DEPSDIR)/%.client: % | $(DEPSDIR) $(ELIOMDEP) -client -ppx $(CLIENT_INC) $< > $@ $(DEPSDIR): mkdir $@ ##---------------------------------------------------------------------- ## Clean up clean: -rm -f *.cm[ioax] *.cmxa *.cmxs *.o *.a *.annot -rm -f *.type_mli -rm -f ${PROJECT_NAME}.js -rm -rf ${ELIOM_CLIENT_DIR} ${ELIOM_SERVER_DIR} distclean: clean -rm -rf $(TEST_PREFIX) $(DEPSDIR) .depend eliom-11.1.1/pkg/distillery/templates/basic.ppx/Makefile.options000066400000000000000000000041011472331017400246620ustar00rootroot00000000000000 #---------------------------------------------------------------------- # SETTINGS FOR THE ELIOM PROJECT %%%PROJECT_NAME%%% #---------------------------------------------------------------------- PROJECT_NAME := %%%PROJECT_NAME%%% # Source files for the server SERVER_FILES := $(wildcard *.eliomi *.eliom) # Source files for the client CLIENT_FILES := $(wildcard *.eliomi *.eliom) # OCamlfind packages for the server SERVER_PACKAGES := lwt_ppx js_of_ocaml-ppx_deriving_json # OCamlfind packages for the client CLIENT_PACKAGES := lwt_ppx js_of_ocaml-ppx js_of_ocaml-ppx_deriving_json # Directory with files to be statically served LOCAL_STATIC = static # The backend for persistent data. Can be dbm or sqlite. # Make sure you have the following packages installed # - *dbm* if you use dbm --> opam install dbm. # - *sqlite* if you use sqlite --> opam install sqlite3. PERSISTENT_DATA_BACKEND = %%%PROJECT_DB%%% # Debug application (yes/no): Debugging info in compilation, # JavaScript, ocsigenserver DEBUG := no # User to run server with (make run.*) WWWUSER := www-data WWWGROUP := www-data # Port for running the server (make run.*) PORT := 80 # Port for testing (make test.*) TEST_PORT := 8080 # Root of installation (must end with /) PREFIX := /usr/local/ # Local folder for make test.* (must end with /) # Do not add files manually in this directory. # It is just here to test your installation before installing in / TEST_PREFIX := local/ # The installation tree (relative to $(PREFIX) when # installing/running or $(TEST_PREFIX) when testing). # Configuration file $(PROJECT_NAME).conf ETCDIR := etc/${PROJECT_NAME} # Project's library $(PROJECT_NAME).cma (cmxs) LIBDIR := lib/${PROJECT_NAME} # Command pipe, eg. $ echo reload > $(INSTALL_PREFIX)$(CMDPIPE) CMDPIPE := var/run/${PROJECT_NAME}-cmd # Ocsigenserver's logging files LOGDIR := var/log/${PROJECT_NAME} # Ocsigenserver's persistent data files DATADIR := var/data/${PROJECT_NAME} # Copy of $(LOCAL_STATIC) STATICDIR := var/www/${PROJECT_NAME}/static # Project's JavaScript file ELIOMSTATICDIR := var/www/${PROJECT_NAME}/eliom eliom-11.1.1/pkg/distillery/templates/basic.ppx/PROJECT_NAME.conf.in000066400000000000000000000021141472331017400247140ustar00rootroot00000000000000%%% This is the template for your configuration file. The %%VALUES%% below are %%% taken from the Makefile to generate the actual configuration files. %%% This comment will disappear. %%PORT%% %%% Only set for running, not for testing %%USERGROUP%% %%LOGDIR%% %%DATADIR%% utf-8 %%% Only set when debugging %%DEBUGMODE%% %%CMDPIPE%% %%% This will include the packages defined as SERVER_PACKAGES in your Makefile: %%PACKAGES%% eliom-11.1.1/pkg/distillery/templates/basic.ppx/PROJECT_NAME.eliom000066400000000000000000000012451472331017400244730ustar00rootroot00000000000000[%%shared open Eliom_lib open Eliom_content open Html.D ] module %%%MODULE_NAME%%%_app = Eliom_registration.App ( struct let application_name = "%%%PROJECT_NAME%%%" let global_data_path = None end) let main_service = Eliom_service.create ~path:(Eliom_service.Path []) ~meth:(Eliom_service.Get Eliom_parameter.unit) () let () = %%%MODULE_NAME%%%_app.register ~service:main_service (fun () () -> Lwt.return (Eliom_tools.F.html ~title:"%%%PROJECT_NAME%%%" ~css:[["css";"%%%PROJECT_NAME%%%.css"]] Html.F.(body [ h1 [txt "Welcome from Eliom's distillery!"]; ]))) eliom-11.1.1/pkg/distillery/templates/basic.ppx/README000066400000000000000000000053451472331017400224230ustar00rootroot00000000000000WARNING: This template is deprecated. It does not support let%rcp syntax. Please use Dune-based templates, like "client-server", instead. Instructions ============ This project is (initially) generated by eliom-distillery as the basic project "%%%PROJECT_NAME%%%". Generally, you can compile it and run ocsigenserver on it by $ make test.byte (or test.opt) See below for other useful targets for make. Generated files --------------- The following files in this directory have been generated by eliom-distillery: - %%%PROJECT_NAME%%%.eliom This is your initial source file. %%%ifdef OCAML4%%% All Eliom files (*.eliom, *.eliomi) in this directory are automatically considered. To add a .ml/.mli file to your project, append it to the variable SERVER_FILES or CLIENT_FILES. %%%endif%%% %%%ifdef OCAML3%%% To add more source files (.ml,.mli,.eliom,.eliomi) to your project, add it to the variables SERVER_FILES and/or CLIENT_FILES. %%%endif%%% - static/ The content of this folder is statically served. Put your CSS or additional JavaScript files here! - Makefile.options Configure your project here! - %%%PROJECT_NAME%%%.conf.in This file is a template for the configuration file for ocsigenserver. You will rarely have to edit itself - it takes its variables from the Makefile.options. This way, the installation rules and the configuration files are synchronized with respect to the different folders. - Makefile This contains all rules necessary to build, test, and run your Eliom application. You better don't touch it ;) See below for the relevant targets. - local/ This directory is the target of the temporary installation of your application, to test locally before doing a system-wide installation in /. Do not put anything manually here. - README Not completely describable here. Makefile targets ---------------- Here's some help on how to work with this basic distillery project: - Test your application by compiling it and running ocsigenserver locally $ make test.byte (or test.opt) - Compile it only $ make all (or byte or opt) - Deploy your project on your system $ sudo make install (or install.byte or install.opt) - Run the server on the deployed project $ sudo make run.byte (or run.opt) If WWWUSER in the Makefile.options is you, you don't need the `sudo'. If Eliom isn't installed globally, however, you need to re-export some environment variables to make this work: $ sudo PATH=$PATH OCAMLPATH=$OCAMLPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make run.byte/run.opt - If you need a findlib package in your project, add it to the variables SERVER_PACKAGES and/or CLIENT_PACKAGES. The configuration file will be automatically updated. eliom-11.1.1/pkg/distillery/templates/basic.ppx/static!css!PROJECT_NAME.css000066400000000000000000000000431472331017400261740ustar00rootroot00000000000000* { font-family: sans-serif; } eliom-11.1.1/pkg/etc/000077500000000000000000000000001472331017400142365ustar00rootroot00000000000000eliom-11.1.1/pkg/etc/mime.types000066400000000000000000000352541472331017400162640ustar00rootroot00000000000000# This is a comment. I love comments. # This file controls what Internet media types are sent to the client for # given file extension(s). Sending the correct media type to the client # is important so they know how to handle the content of the file. # Extra types can either be added here or by using an AddType directive # in your config files. For more information about Internet media types, # please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type # registry is at . # MIME type Extensions application/activemessage application/andrew-inset ez application/applefile application/atom+xml atom application/atomicmail application/batch-smtp application/beep+xml application/cals-1840 application/cnrp+xml application/commonground application/cpl+xml application/cybercash application/dca-rft application/dec-dx application/dvcs application/edi-consent application/edifact application/edi-x12 application/eshop application/font-tdpfr application/http application/hyperstudio application/iges application/index application/index.cmd application/index.obj application/index.response application/index.vnd application/iotp application/ipp application/isup application/mac-binhex40 hqx application/mac-compactpro cpt application/macwriteii application/marc application/mathematica application/mathml+xml mathml application/msword doc application/news-message-id application/news-transmission application/ocsp-request application/ocsp-response application/octet-stream bin dms lha lzh exe class so dll dmg application/oda oda application/ogg ogg application/parityfec application/pdf pdf application/pgp-encrypted application/pgp-keys application/pgp-signature application/pkcs10 application/pkcs7-mime application/pkcs7-signature application/pkix-cert application/pkix-crl application/pkixcmp application/postscript ai eps ps application/prs.alvestrand.titrax-sheet application/prs.cww application/prs.nprend application/prs.plucker application/qsig application/rdf+xml rdf application/reginfo+xml application/remote-printing application/riscos application/rtf application/sdp application/set-payment application/set-payment-initiation application/set-registration application/set-registration-initiation application/sgml application/sgml-open-catalog application/sieve application/slate application/smil smi smil application/srgs gram application/srgs+xml grxml application/timestamp-query application/timestamp-reply application/tve-trigger application/vemmi application/vnd.3gpp.pic-bw-large application/vnd.3gpp.pic-bw-small application/vnd.3gpp.pic-bw-var application/vnd.3gpp.sms application/vnd.3m.post-it-notes application/vnd.accpac.simply.aso application/vnd.accpac.simply.imp application/vnd.acucobol application/vnd.acucorp application/vnd.adobe.xfdf application/vnd.aether.imp application/vnd.amiga.ami application/vnd.anser-web-certificate-issue-initiation application/vnd.anser-web-funds-transfer-initiation application/vnd.audiograph application/vnd.blueice.multipass application/vnd.bmi application/vnd.businessobjects application/vnd.canon-cpdl application/vnd.canon-lips application/vnd.cinderella application/vnd.claymore application/vnd.commerce-battelle application/vnd.commonspace application/vnd.contact.cmsg application/vnd.cosmocaller application/vnd.criticaltools.wbs+xml application/vnd.ctc-posml application/vnd.cups-postscript application/vnd.cups-raster application/vnd.cups-raw application/vnd.curl application/vnd.cybank application/vnd.data-vision.rdz application/vnd.dna application/vnd.dpgraph application/vnd.dreamfactory application/vnd.dxr application/vnd.ecdis-update application/vnd.ecowin.chart application/vnd.ecowin.filerequest application/vnd.ecowin.fileupdate application/vnd.ecowin.series application/vnd.ecowin.seriesrequest application/vnd.ecowin.seriesupdate application/vnd.enliven application/vnd.epson.esf application/vnd.epson.msf application/vnd.epson.quickanime application/vnd.epson.salt application/vnd.epson.ssf application/vnd.ericsson.quickcall application/vnd.eudora.data application/vnd.fdf application/vnd.ffsns application/vnd.fints application/vnd.flographit application/vnd.framemaker application/vnd.fsc.weblaunch application/vnd.fujitsu.oasys application/vnd.fujitsu.oasys2 application/vnd.fujitsu.oasys3 application/vnd.fujitsu.oasysgp application/vnd.fujitsu.oasysprs application/vnd.fujixerox.ddd application/vnd.fujixerox.docuworks application/vnd.fujixerox.docuworks.binder application/vnd.fut-misnet application/vnd.grafeq application/vnd.groove-account application/vnd.groove-help application/vnd.groove-identity-message application/vnd.groove-injector application/vnd.groove-tool-message application/vnd.groove-tool-template application/vnd.groove-vcard application/vnd.hbci application/vnd.hhe.lesson-player application/vnd.hp-hpgl application/vnd.hp-hpid application/vnd.hp-hps application/vnd.hp-pcl application/vnd.hp-pclxl application/vnd.httphone application/vnd.hzn-3d-crossword application/vnd.ibm.afplinedata application/vnd.ibm.electronic-media application/vnd.ibm.minipay application/vnd.ibm.modcap application/vnd.ibm.rights-management application/vnd.ibm.secure-container application/vnd.informix-visionary application/vnd.intercon.formnet application/vnd.intertrust.digibox application/vnd.intertrust.nncp application/vnd.intu.qbo application/vnd.intu.qfx application/vnd.irepository.package+xml application/vnd.is-xpr application/vnd.japannet-directory-service application/vnd.japannet-jpnstore-wakeup application/vnd.japannet-payment-wakeup application/vnd.japannet-registration application/vnd.japannet-registration-wakeup application/vnd.japannet-setstore-wakeup application/vnd.japannet-verification application/vnd.japannet-verification-wakeup application/vnd.jisp application/vnd.kde.karbon application/vnd.kde.kchart application/vnd.kde.kformula application/vnd.kde.kivio application/vnd.kde.kontour application/vnd.kde.kpresenter application/vnd.kde.kspread application/vnd.kde.kword application/vnd.kenameaapp application/vnd.koan application/vnd.liberty-request+xml application/vnd.llamagraphics.life-balance.desktop application/vnd.llamagraphics.life-balance.exchange+xml application/vnd.lotus-1-2-3 application/vnd.lotus-approach application/vnd.lotus-freelance application/vnd.lotus-notes application/vnd.lotus-organizer application/vnd.lotus-screencam application/vnd.lotus-wordpro application/vnd.mcd application/vnd.mediastation.cdkey application/vnd.meridian-slingshot application/vnd.micrografx.flo application/vnd.micrografx.igx application/vnd.mif mif application/vnd.minisoft-hp3000-save application/vnd.mitsubishi.misty-guard.trustweb application/vnd.mobius.daf application/vnd.mobius.dis application/vnd.mobius.mbk application/vnd.mobius.mqy application/vnd.mobius.msl application/vnd.mobius.plc application/vnd.mobius.txf application/vnd.mophun.application application/vnd.mophun.certificate application/vnd.motorola.flexsuite application/vnd.motorola.flexsuite.adsi application/vnd.motorola.flexsuite.fis application/vnd.motorola.flexsuite.gotap application/vnd.motorola.flexsuite.kmr application/vnd.motorola.flexsuite.ttc application/vnd.motorola.flexsuite.wem application/vnd.mozilla.xul+xml xul application/vnd.ms-artgalry application/vnd.ms-asf application/vnd.ms-excel xls application/vnd.ms-lrm application/vnd.ms-powerpoint ppt application/vnd.ms-project application/vnd.ms-tnef application/vnd.ms-works application/vnd.ms-wpl application/vnd.mseq application/vnd.msign application/vnd.music-niff application/vnd.musician application/vnd.netfpx application/vnd.noblenet-directory application/vnd.noblenet-sealer application/vnd.noblenet-web application/vnd.novadigm.edm application/vnd.novadigm.edx application/vnd.novadigm.ext application/vnd.obn application/vnd.osa.netdeploy application/vnd.palm application/vnd.pg.format application/vnd.pg.osasli application/vnd.powerbuilder6 application/vnd.powerbuilder6-s application/vnd.powerbuilder7 application/vnd.powerbuilder7-s application/vnd.powerbuilder75 application/vnd.powerbuilder75-s application/vnd.previewsystems.box application/vnd.publishare-delta-tree application/vnd.pvi.ptid1 application/vnd.pwg-multiplexed application/vnd.pwg-xhtml-print+xml application/vnd.quark.quarkxpress application/vnd.rapid application/vnd.s3sms application/vnd.sealed.net application/vnd.seemail application/vnd.shana.informed.formdata application/vnd.shana.informed.formtemplate application/vnd.shana.informed.interchange application/vnd.shana.informed.package application/vnd.smaf application/vnd.sss-cod application/vnd.sss-dtf application/vnd.sss-ntf application/vnd.street-stream application/vnd.svd application/vnd.swiftview-ics application/vnd.triscape.mxs application/vnd.trueapp application/vnd.truedoc application/vnd.ufdl application/vnd.uplanet.alert application/vnd.uplanet.alert-wbxml application/vnd.uplanet.bearer-choice application/vnd.uplanet.bearer-choice-wbxml application/vnd.uplanet.cacheop application/vnd.uplanet.cacheop-wbxml application/vnd.uplanet.channel application/vnd.uplanet.channel-wbxml application/vnd.uplanet.list application/vnd.uplanet.list-wbxml application/vnd.uplanet.listcmd application/vnd.uplanet.listcmd-wbxml application/vnd.uplanet.signal application/vnd.vcx application/vnd.vectorworks application/vnd.vidsoft.vidconference application/vnd.visio application/vnd.visionary application/vnd.vividence.scriptfile application/vnd.vsf application/vnd.wap.sic application/vnd.wap.slc application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc application/vnd.webturbo application/vnd.wrq-hp3000-labelled application/vnd.wt.stf application/vnd.wv.csp+wbxml application/vnd.xara application/vnd.xfdl application/vnd.yamaha.hv-dic application/vnd.yamaha.hv-script application/vnd.yamaha.hv-voice application/vnd.yellowriver-custom-menu application/voicexml+xml vxml application/watcherinfo+xml application/whoispp-query application/whoispp-response application/wita application/wordperfect5.1 application/x-bcpio bcpio application/x-cdlink vcd application/x-chess-pgn pgn application/x-compress application/x-cpio cpio application/x-csh csh application/x-director dcr dir dxr application/x-dvi dvi application/x-futuresplash spl application/x-gtar gtar application/x-gzip application/x-hdf hdf application/x-javascript js application/x-koan skp skd skt skm application/x-latex latex application/x-netcdf nc cdf application/x-sh sh application/x-shar shar application/x-shockwave-flash swf application/x-stuffit sit application/x-sv4cpio sv4cpio application/x-sv4crc sv4crc application/x-tar tar application/x-tcl tcl application/x-tex tex application/x-texinfo texinfo texi application/x-troff t tr roff application/x-troff-man man application/x-troff-me me application/x-troff-ms ms application/x-ustar ustar application/x-wais-source src application/x400-bp application/xhtml+xml xhtml xht application/xslt+xml xslt application/xml xml xsl application/xml-dtd dtd application/xml-external-parsed-entity application/zip zip audio/32kadpcm audio/amr audio/amr-wb audio/basic au snd audio/cn audio/dat12 audio/dsr-es201108 audio/dvi4 audio/evrc audio/evrc0 audio/g722 audio/g.722.1 audio/g723 audio/g726-16 audio/g726-24 audio/g726-32 audio/g726-40 audio/g728 audio/g729 audio/g729D audio/g729E audio/gsm audio/gsm-efr audio/l8 audio/l16 audio/l20 audio/l24 audio/lpc audio/midi mid midi kar audio/mpa audio/mpa-robust audio/mp4a-latm audio/mpeg mpga mp2 mp3 audio/parityfec audio/pcma audio/pcmu audio/prs.sid audio/qcelp audio/red audio/smv audio/smv0 audio/telephone-event audio/tone audio/vdvi audio/vnd.3gpp.iufp audio/vnd.cisco.nse audio/vnd.cns.anp1 audio/vnd.cns.inf1 audio/vnd.digital-winds audio/vnd.everad.plj audio/vnd.lucent.voice audio/vnd.nortel.vbk audio/vnd.nuera.ecelp4800 audio/vnd.nuera.ecelp7470 audio/vnd.nuera.ecelp9600 audio/vnd.octel.sbc audio/vnd.qcelp audio/vnd.rhetorex.32kadpcm audio/vnd.vmx.cvsd audio/x-aiff aif aiff aifc audio/x-alaw-basic audio/x-mpegurl m3u audio/x-pn-realaudio ram ra audio/x-pn-realaudio-plugin application/vnd.rn-realmedia rm audio/x-wav wav chemical/x-pdb pdb chemical/x-xyz xyz image/bmp bmp image/cgm cgm image/g3fax image/gif gif image/ief ief image/jpeg jpeg jpg jpe image/naplps image/png png image/prs.btif image/prs.pti image/svg+xml svg image/t38 image/tiff tiff tif image/tiff-fx image/vnd.cns.inf2 image/vnd.djvu djvu djv image/vnd.dwg image/vnd.dxf image/vnd.fastbidsheet image/vnd.fpx image/vnd.fst image/vnd.fujixerox.edmics-mmr image/vnd.fujixerox.edmics-rlc image/vnd.globalgraphics.pgb image/vnd.mix image/vnd.ms-modi image/vnd.net-fpx image/vnd.svf image/vnd.wap.wbmp wbmp image/vnd.xiff image/x-cmu-raster ras image/x-icon ico image/x-portable-anymap pnm image/x-portable-bitmap pbm image/x-portable-graymap pgm image/x-portable-pixmap ppm image/x-rgb rgb image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd message/delivery-status message/disposition-notification message/external-body message/http message/news message/partial message/rfc822 message/s-http message/sip message/sipfrag model/iges igs iges model/mesh msh mesh silo model/vnd.dwf model/vnd.flatland.3dml model/vnd.gdl model/vnd.gs-gdl model/vnd.gtw model/vnd.mts model/vnd.parasolid.transmit.binary model/vnd.parasolid.transmit.text model/vnd.vtu model/vrml wrl vrml multipart/alternative multipart/appledouble multipart/byteranges multipart/digest multipart/encrypted multipart/form-data multipart/header-set multipart/mixed multipart/parallel multipart/related multipart/report multipart/signed multipart/voice-message text/calendar ics ifb text/css css text/directory text/enriched text/html html htm text/parityfec text/plain asc txt text/prs.lines.tag text/rfc822-headers text/richtext rtx text/rtf rtf text/sgml sgml sgm text/t140 text/tab-separated-values tsv text/uri-list text/vnd.abc text/vnd.curl text/vnd.dmclientscript text/vnd.fly text/vnd.fmi.flexstor text/vnd.in3d.3dml text/vnd.in3d.spot text/vnd.iptc.nitf text/vnd.iptc.newsml text/vnd.latex-z text/vnd.motorola.reflex text/vnd.ms-mediapackage text/vnd.net2phone.commcenter.command text/vnd.sun.j2me.app-descriptor text/vnd.wap.si text/vnd.wap.sl text/vnd.wap.wml wml text/vnd.wap.wmlscript wmls text/x-setext etx text/xml text/xml-external-parsed-entity video/bmpeg video/bt656 video/celb video/dv video/h261 video/h263 video/h263-1998 video/h263-2000 video/jpeg video/mp1s video/mp2p video/mp2t video/mp4v-es video/mpv video/mpeg mpeg mpg mpe video/nv video/parityfec video/pointer video/quicktime qt mov video/smpte292m video/vnd.fvt video/vnd.motorola.video video/vnd.motorola.videop video/vnd.mpegurl mxu m4u video/vnd.nokia.interleaved-multimedia video/vnd.objectvideo video/vnd.vivo video/x-msvideo avi video/x-sgi-movie movie x-conference/x-cooltalk ice eliom-11.1.1/pkg/filelist.ml000066400000000000000000000116471472331017400156410ustar00rootroot00000000000000type descr = {interface_only : string list; interface : string list; internal : string list} let server = { interface_only = [ "eliom_content_sigs" ; "eliom_form_sigs" ; "eliom_parameter_sigs" ; "eliom_registration_sigs" ; "eliom_service_sigs" ; "eliom_shared_sigs" ] ; interface = [ "eliom_bus" ; "eliom_client_value" ; "eliom_syntax" ; "eliom_client" ; "eliom_comet" ; "eliom_common" ; "eliom_config" ; "eliom_content" ; "eliom_extension" ; "eliom_lib" ; "eliom_mkreg" ; "eliom_notif" ; "eliom_parameter" ; "eliom_react" ; "eliom_shared" ; "eliom_cscache" ; "eliom_reference" ; "eliom_registration" ; "eliom_request_info" ; "eliom_service" ; "eliom_state" ; "eliom_tools" ; "eliom_types" ; "eliom_uri" ; "eliom_wrap" ] ; internal = [ "eliom_comet_base" ; "eliom_common_base" ; "eliom_runtime" ; "eliom_content_" ; "eliom_content_core" ; "eliom_cookies_base" ; "eliom_error_pages" ; "eliom_form" ; "eliom_lazy" ; "eliom_lib_base" ; "eliom_parameter_base" ; "eliom_process" ; "eliom_service_base" ; "eliom_route" ; "eliom_route_base" ; "eliom_shared_content" ; "eliom_types_base" ; "eliom_client_main" ; "eliommod" ; "eliommod_cli" ; "eliommod_cookies" ; "eliommod_datasess" ; "eliommod_gc" ; "eliommod_pagegen" ; "eliommod_parameters" ; "eliommod_persess" ; "eliommod_sersess" ; "eliommod_sessadmin" ; "eliommod_sessexpl" ; "eliommod_sessiongroups" ; "eliommod_timeouts" ] } let client = { interface_only = [ "eliom_content_sigs" ; "eliom_form_sigs" ; "eliom_parameter_sigs" ; "eliom_registration_sigs" ; "eliom_service_sigs" ; "eliom_shared_sigs" ] ; interface = [ "eliom_bus" ; "eliom_client_value" ; "eliom_client_core" ; "eliom_client" ; "eliom_comet" ; "eliom_config" ; "eliom_content" ; "eliom_content_core" ; "eliom_lazy" ; "eliom_lib" ; "eliom_parameter" ; "eliom_react" ; "eliom_shared" ; "eliom_cscache" ; "eliom_registration" ; "eliom_service" ; "eliom_tools" ; "eliom_types" ; "eliom_unwrap" ; "eliom_uri" ] ; internal = [ "eliom_comet_base" ; "eliom_common" ; "eliom_common_base" ; "eliom_runtime" ; "eliom_content_" ; "eliom_cookies_base" ; "eliom_form" ; "eliom_lib_base" ; "eliom_parameter_base" ; "eliom_process" ; "eliom_request" ; "eliom_request_info" ; "eliom_service_base" ; "eliom_route" ; "eliom_route_base" ; "eliom_shared_content" ; "eliom_types_base" ; "eliommod_cookies" ; "eliommod_dom" ; "eliommod_parameters" ] } let server_ext = { interface_only = [] ; interface = ["atom_feed"; "eliom_atom"; "eliom_openid"; "eliom_s2s"] ; internal = [] } let ocamlbuild = {interface_only = []; interface = ["ocamlbuild_eliom"]; internal = []} let ppx = { interface_only = [] ; interface = ["ppx_eliom"; "ppx_eliom_client"; "ppx_eliom_type"; "ppx_eliom_server"] ; internal = ["ppx_eliom_utils"] } let ( -.- ) name ext = name ^ "." ^ ext let exts el sl = List.flatten (List.map (fun ext -> List.map (fun name -> name -.- ext) sl) el) let list_to_file filename list = let oc = open_out filename in List.iter (fun s -> output_string oc s; output_char oc '\n') list; close_out oc let client_mllib = client.interface @ client.internal let client_extra = exts ["cmi"] (client.interface_only @ client.interface) let client_api = client.interface_only @ client.interface let server_mllib = server.interface @ server.internal let server_extra = exts ["cmi"] (server.interface_only @ server.interface) @ exts ["cmx"] (server.interface @ server.internal) let server_api = server.interface_only @ server.interface let server_ext_mllib = server_ext.interface @ server_ext.internal let server_ext_extra = exts ["cmi"] (server_ext.interface_only @ server_ext.interface) @ exts ["cmx"] (server_ext.interface @ server_ext.internal) let ocamlbuild_mllib = ocamlbuild.interface @ ocamlbuild.internal let ocamlbuild_extra = exts ["cmi"] (ocamlbuild.interface_only @ ocamlbuild.interface) @ exts ["cmx"] (ocamlbuild.interface @ ocamlbuild.internal) let ocamlbuild_api = ocamlbuild.interface_only @ ocamlbuild.interface let ppx_mllib = ppx.interface @ ppx.internal let ppx_extra = exts ["cmi"] ppx.interface @ exts ["cmx"] (ppx.interface @ ppx.internal) let ppx_api = ppx.interface let templates_dir = "pkg/distillery/templates" let templates = Array.to_list (Sys.readdir templates_dir) let templates_files = List.map (fun name -> name, Array.to_list (Sys.readdir (templates_dir ^ "/" ^ name))) templates eliom-11.1.1/pkg/man/000077500000000000000000000000001472331017400142365ustar00rootroot00000000000000eliom-11.1.1/pkg/man/eliom-distillery.1000066400000000000000000000021151472331017400176060ustar00rootroot00000000000000.TH eliom-distillery 1 2012-12-17 .SH NAME eliom-distillery \- Scaffolding for your Eliom-projects. .SH SYNOPSIS .B eliom-distillery .BI \-dir .B eliom-distillery .BI \-name \ name [ .BI \-template \