Commit graph

42 commits

Author SHA1 Message Date
Jonatan Kłosko
ba4e59f416
Always run distribution in long names mode (#2646) 2024-06-13 10:06:08 +02:00
José Valim
64dad900d7
Exclude modules from docs (#2218)
Closes #2216.
2023-09-21 12:28:45 +02:00
Jonatan Kłosko
fb9148acf7
Change new notebook button to link (#2036) 2023-07-04 14:46:19 +02:00
Basile Nouvellet
e92cdd622d
Typo in CLI help menu (#1950) 2023-05-31 19:21:14 +02:00
Jonatan Kłosko
c03420798f
Add @home CLI argument for opening homepage (#1868) 2023-04-17 15:40:48 +02:00
ByeongUk Choi
4db39078bd
Add open page and track starred/recent notebooks (#1639)
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2023-03-06 18:14:33 +01:00
José Valim
b9e4de68c9
Move most flags to env vars (#1704)
Env vars provide a more unified experience across
Desktop, Docker, and CLI. We keep only a handful
of switches that mirror Elixir's own CLI.
2023-02-10 19:55:47 +01:00
Paulo Valim
285bc923b7
Rename the Explore section to Learn (#1424)
Co-authored-by: José Valim <jose.valim@gmail.com>
2022-09-21 12:06:22 +02:00
José Valim
608979471d
Remove Mix standalone runtime, closes #1345 (#1370)
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-08-29 14:20:24 +02:00
Jonatan Kłosko
3d5c7c3fad
Require Elixir 1.14 (#1342) 2022-08-11 20:13:57 +02:00
Jonatan Kłosko
36e48f861e
Use IP address as hostname when configured (#1181)
* Use IP address as hostname when configured

* Use localhost for access URL hostname when applicable

* Keep 0.0.0.0 as is for hostname
2022-05-13 15:22:41 +02:00
Jonatan Kłosko
aa3b58d708
Add support for mix run flags to the Mix runtime (#1108)
* Add support for mix run flags to the Mix runtime

* Support mix run flags in runtime config string

* Add flag validation

* Update lib/livebook_web/live/session_live/mix_standalone_live.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

Co-authored-by: José Valim <jose.valim@dashbit.co>
2022-04-14 11:44:55 +02:00
Kevin
4fac98e069
Fix double slashes in URL for new (#1013)
* Fix double slashes in URL for `new`

* Fix formatting

* Rename to append_path/2 to set_path/2
2022-02-18 20:57:03 +01:00
Jonatan Kłosko
fb9c4fbef8
Don't open browser after starting the server unless explicitly asked (#1011) 2022-02-18 17:27:36 +01:00
Jonatan Kłosko
e5e13d86c2
Serve iframes from another local port when running on http (#989)
* Serve iframes from another local port when running on http

* Use relative hostname in local iframe URL

* Simplify server start check

* Use random iframe port when Livebook runs on a random port

* Rename space/ to iframe/

* LivebookWeb.IframePlug -> LivebookWeb.IframeEndpoint
2022-02-08 14:45:58 +01:00
Sam
494ab40ac8
add function to open notebook urls (#986)
* add function to open notebook urls

* Update lib/livebook/utils.ex

Co-authored-by: José Valim <jose.valim@gmail.com>

* Update lib/livebook/utils.ex

Co-authored-by: José Valim <jose.valim@gmail.com>

* open notebook with notebook_open_url/2

* Update server.ex

* format Livebook.Utils

* Update lib/livebook_cli/server.ex

Co-authored-by: José Valim <jose.valim@gmail.com>

* correct function doc

Co-authored-by: José Valim <jose.valim@gmail.com>
2022-02-07 13:39:23 +01:00
Jonatan Kłosko
4681f98972
Expand directory path when opened via CLI (#976) 2022-02-03 23:43:47 +01:00
gpopides
be1fce326c
Pass file or directory as open command (#969)
* caputre directory from params

* set file if file parameter is a file

* set file param

* docs

* partial review changes

* apply review changes

* add tests and rename file to path

* formatting

* applied feedback + fixed test

* Apply suggestions from code review

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-02-03 20:26:18 +01:00
Jonatan Kłosko
fc8799ef8f
Group public routes under a common prefix (#974) 2022-02-03 17:48:16 +01:00
José Valim
efdbf67f59
Introduce LIVEBOOK_HOME and LIVEBOOK_DATA_PATH (#963)
And move the relevant configurations to settings.
2022-01-31 11:51:57 +01:00
Jakub Perżyło
86e4034f33
Persistent storage (#937)
Start moving filesystems as an initial implementation.
2022-01-30 19:51:03 +01:00
José Valim
849acd87a9
Reorder usage arguments 2022-01-30 18:58:09 +01:00
gpopides
0cae21e9e8
Remove --open-new option when starting server (#960) 2022-01-30 18:36:30 +01:00
José Valim
372f086044 Move from Helpers to Utils and add doctests 2022-01-29 10:39:26 +01:00
Sam
420284006a
Add url arg to the CLI (#947) 2022-01-29 10:36:32 +01:00
Wojtek Mach
e8c80bf6a7
Add Mac app release (#865) 2022-01-17 17:34:38 +01:00
Jonatan Kłosko
b422e1d98f
Revert to URI.new! (#784) 2021-12-09 20:46:45 +01:00
Jonatan Kłosko
f0606b109d
Automatically back up notebooks without a file (#736)
* Improve file select layout on long paths

* Automatically back up notebooks without a file

* Run formatter

* Add margin when there are no sections

* Add an informative note about autosave directory

* Store autosave path instead of file in the config

* Rename autosave dir to autosave path

* Fix insert mode escape on section headlines

* Show ellipsis on selected file too

* Always create the default directory

* Apply review comments
2021-12-04 16:29:14 +01:00
Jonatan Kłosko
47d29cb389
Require Elixir 1.13 (#737)
* Bump required Elixir version to 1.13 and fix TODOs

* Fix tests

* Remove the deprecated URI.parse/1

* Bump Docker base image

* Bump Elixir on CI
2021-12-03 21:47:20 +01:00
José Valim
d78a3cf865
Include reason if we can't start Livebook, closes #703 (#705) 2021-11-12 14:36:02 +01:00
Wojtek Mach
453eabb6d4
Fix urls on Elixir master (#647)
Before Elixir master, empty path is represented as `nil`:

    ~% asdf shell elixir 1.12.3-otp-24 ; elixir -e 'IO.inspect URI.parse("http://localhost")'
    %URI{
      authority: "localhost",
      fragment: nil,
      host: "localhost",
      path: nil,
      port: 80,
      query: nil,
      scheme: "http",
      userinfo: nil
    }

On Elixir master, it is an empty string:

    ~% asdf shell elixir git ; elixir -e 'IO.inspect URI.parse("http://localhost")'
    %URI{
      authority: "localhost",
      fragment: nil,
      host: "localhost",
      path: "",
      port: 80,
      query: nil,
      scheme: "http",
      userinfo: nil
    }

The new default, the empty string, caused a bug on this line:

    Map.update!(:path, &((&1 || "/") <> path))

because we never prepended the leading `/` and thus we ended up with
path `"health"`, not `"/health"`, which now on Elixir master crashes:

    iex> URI.parse("http://localhost") |> Map.replace!(:path, "health") |> to_string()
    ** (ArgumentError) :path in URI must be empty or an absolute path if URL has a :host, got: %URI{authority: "localhost", fragment: nil, host: "localhost", path: "health", port: 80, query: nil, scheme: "http", userinfo: nil}
        (elixir 1.13.0-dev) lib/uri.ex:863: String.Chars.URI.to_string/1
2021-10-26 16:48:17 +02:00
Jonatan Kłosko
2a338b6b83
Detect if Livebook or another application is running on the given port (#530)
* Detect if Livebook or another application is running on the given port

* Use json/2

* Print error when the port is taken
2021-08-30 23:23:05 +02:00
Wojtek Mach
01c079a697
livebook server: Add --open-new flag (#529)
* livebook server: Add `--open-new` flag

* Update lib/livebook_cli/server.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Update lib/livebook_cli/server.ex

* Update changelog

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-08-30 20:52:08 +02:00
Jonatan Kłosko
8e6558a83a
Introduce file system abstraction and an S3 implementation (#492)
* Introduce file system abstraction and an S3 implementation

* Support arbitrary absolute paths and delegate resolution to file system

* Remove accidental notebook file

* Apply suggestions from code review

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Apply review comments

* Add missing path assertions

* Apply review comments

* Fix test saving notebook in project root

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-08-13 21:17:43 +02:00
Wojtek Mach
6515629156
livebook server: Add --open flag (#417)
* livebook server: Add --open flag

* Update lib/livebook_cli/server.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Add LivebookWeb.Endpoint.access_url/0

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-07-01 12:17:49 +02:00
Jonatan Kłosko
0061facd64
Support configuring Attached as the default runtime (#397)
* Support configuring Attached as the default runtime

* Wrap env options section in the README
2021-06-24 18:03:00 +02:00
Jonatan Kłosko
c4a96bc99c
Add support for Mix runtime as the default one (#334)
* Add support for Mix runtime as a default

* Support default runtime options in the CLI

* Set cell status to queued while runtime is being started

* Clean up tests
2021-06-09 16:24:02 +02:00
Jonatan Kłosko
ac8e1e30f4
Setup Docker image with releases (#244)
* Setup Docker image with releases

* Support ip env variable and use it for Docker deployment

* Autofocus auth forms

* Rename ip env var

* Update option lists

* Make distribution cookie configurable

* Update README.md

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Include git in the final image

* Remove unnecessary build dependency

* Improve file permissions handling and add more comments

* Use namespaced home directory

* Update README with all running options

* Update base image

* Reference official Docker image in the README

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-27 16:34:02 +02:00
José Valim
81b123d5b5
Make root path configurable from outside (#217) 2021-04-19 19:50:09 +02:00
José Valim
57047f9c7f
Unify env variables and change auth to use session (#195) 2021-04-15 15:50:29 +02:00
José Valim
31e16f6b93 Fix typo on CLI entries 2021-04-15 09:06:01 +02:00
Jonatan Kłosko
e9766ed7a5
Introduce token auth and add basic cli configuration (#148)
* Add token authentication

* Restructure CLI

* Allow port configuration

* Further refactoring

* Make sure livebook node starts with unique name

* Improve startup error handling

* Further refactoring

* Add authentication tests

* Add authentication view for entering the token

* Fix auth tests

* Always use random Livebook name for distribution

* Don't enable ANSI on Windows

* Define CLI Task behaviour and move generic logic to the main module

* Generalize convertion from cli arguments to configuration

* Randomly generate secret key base

* Update test/livebook_web/plugs/auth_plug_test.exs

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Override app config in persistent manner

* Update lib/litebook_cli.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Move auth error to ErrorView

* Unify node name configuration and allow it via CLI

* Set all applications configs at once

* Move token generation to application.ex to work outside CLI

* Clean up overriding configuration

* Store auth token in separate cookies

* Update lib/livebook_cli/server.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Update lib/livebook_web/endpoint.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Update lib/livebook_web/plugs/auth_plug.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-08 11:41:52 +02:00