window.markdeepOptions={tocStyle:"medium"} Deploy

Contents

Deploy
  1.1  Fossil
Publishing
    2.0.1  Updating
    2.0.2  Versioning
  2.1  Archive
    2.1.1  Zip
    2.1.2  Sqlar
  2.2  Security

Javascript Shell Interpreter
 DOWNLOAD / DEVELOP / DEPLOY

Types Builtin Reference  Index  Fossil  Demos Log Test Debug Misc

   

Deploy

Jsi code is deployed as an archive (zip, sqlar) or fossil repo which:

Typically there is a file “main.jsi”, plus zero or more directories of packages which can be run:

jsish -a jsi-app.zip Ledger
   

Fossil

Fossil archives offer the ability for safe software update:

InternetBrowserFossilJsish+AppZvfsFossil

Now when an application starts it can issue a fossil pull. This means that potentially all versions of software are available at program start-up.

But if a script update occurs that requires a newer version of Jsish, this could be dangerous. However we can avoid this problem by having the Fossil archive tag releases not only with version numbers, but also with Jsish prerequisites. Thus the archive manager can mount the latest compatible version.

This is what is meant by safe update. Although all releases (past and present) may be available, the latest safe one will be chosen for us automatically. Or we can choose to fallback previous versions without re-installing. Thus like /zvfs, dependency issues are avoided.

   

Publishing

During development of an App-Archive, there is the additional step of application changes getting pushed up to the repos, with appropriate tags to enforce dependencies.

InternetBrowserFossilJsish+AppZvfsFossil

The publish script pulls the dependencies automatically from the app files and adds the requisite tags.

A fossil-deploy is of particular interest as it can:

Most importantly, deploys automatically use the latest available version at startup.

For an example see the jsi-app deploy which hosts the online Ledger demo.

Jsish can run applications directly from downloaded fossil repositories, eg:

fossil clone http://jsish.org/jsi-app jsi-app.fossil
jsish -a jsi-app.fossil Ledger --help
   

Updating

To bring a repository up-to-date use:

fossil pull -R jsi-app.fossil

Or run with the update option:

jsish -a -update true jsi-app.fossil Ledger
   

Versioning

Jsish makes use of special tags in the repository to determine which checkin to mount:

A “prereq” tag may be associated only to commits with a “ver” tag.

Version tags use the float format, rather than “XX.YY.ZZ”.

The rules for determining the default version to mount are:

This means it is generally safe to keep repositories up-to-date without worrying about Jsish dependancies.

Explicit versions can be mounted using:

jsish -a -version ver-1.0 jsi-app.fossil Ledger
jsish -a -version 2018-09-07 jsi-app.fossil Ledger

For a list of available tags use:

fossil tag list -R jsi-app.fossil

Using fossil provides many more benefits. Such as easy checking out of source, apply fixes, and generating dif files to submit bug fixes. More on this to come.

   

Archive

Jsi supports mounting archives, to serve out content:

BrowserJsish+AppZvfsArchive

Archives are of interest because they can quickly be pulled from a fossil repository.

   

Zip

Zip archive support is the simplest and oldest supported archive. It features:

To pull down the head revision of jsi-app use:

wget -O jsi-app.zip http://jsish.org/jsi-app/zip

or jsish can be used:

jsish --wget -O jsi-app.zip http://jsish.org/jsi-app/zip

Alternatively the fossil UI supports “Zip Archive” download.

One downside to the zip format is it's readonly as it does not support in-place updates.

   

Sqlar

The sqlar stores compressed files in a small sqlite database. Although it is not widely used it is more easily supports updating in-place.

You can pull down the head reversion of “jsi-app” with:

wget -O jsi-app.zip http://jsish.org/jsi-app/zip

The fossil API provides “Sql Archive” download.

   

Security

Jsi code can NOT be executed remotely as in:

jsish http://host.com/foo.jsi;  # Does not work.

This would be a huge security hole. Although it would be simple enough to implement.

var startOfMarkDeep=true; window.alreadyProcessedMarkdeep||(document.body.style.visibility='visible'); document.title=location.pathname.match(/\/([\w]+)1;

formatted by Markdeep 1.03