1.1.2 • Published 1 year ago

@swimlane/swimlane-js v1.1.2

Weekly downloads
-
License
APACHE-2
Repository
-
Last release
1 year ago

swimlane-js

Setup

./setup-swimlane-js -h SWIMLANE_HOST -u SWIMLANE_USER

SWIMLANE_USER should be the user used when installing Swimlane (the owner of /opt/swimlane). Defaults to swimlane-host if not specified

This script automates setting up the git repo taking these steps:

  • create a new ed25519 SSH key if one doesn't already exist in the default location and adds it to the authorized_keys for the swimlane user
  • set up a git repo for the swimlane-js code
  • set a post-receive hook to update the docker container when code is pushed
  • add an entry in importmap.json to enable importing code from widgets
  • adds a remote to the git repo named swimlane-dev
  • pushes the "main" branch to the new remote to trigger the deployment of the code to the sw_web docker

Usage

Import it into a widget with

import {SwimlaneAPI} from 'swimlane-js';

The constructor takes the api token as a parameter. If instantiated inside a SwimlaneElement

const cli = new SwimlaneAPI(this.contextData.token);

Example code (may not be current)

There's an example index.html that can be used as a reference

  • Fill in the relevant values in config.skel.js and move it to config.js
  • start a web server and load index.html
1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-beta.2

2 years ago

1.0.1-beta.1

2 years ago

1.0.3

2 years ago

1.0.0-beta.1

2 years ago