@liveaxle/tooling

Interal Repository for reusable application tooling.

Stats

StarsIssuesVersionUpdatedCreatedSize
@liveaxle/tooling
0.15.31a year ago4 years agoMinified + gzip package size for @liveaxle/tooling in KB

Readme

README

Internal Repository for reusable application tooling.

Reference

Media Fly

namespace: mf

Methods -

** Authenticate: **

Gets a Media Fly access token

API:

mf.authenticate(Object: {username: <username>, password: <password>});

Returns Promise that resolves the Media Fly auth response:

CLI:

No CLI implementation due to request output. Maybe later.


** Build: **

Creates an interactive build.

API:

mf.build(String: name, {
  input: String path,
  output: String: path
 });

Returns a Promise instance.

CLI:

./node_modules/.bin/@liveaxle/tooling mf.build --name=<name> -i= |--input=<path> -o|--output=<path>


** Deploy: **

Uploads content to Media Fly

API:

mf.deploy(String: path to local contents, {
  destination: String: mediafly folder id,
  credentials: String: <username>:<password>, // please use environment vars and git-ignored files
  aws: String: <awsAccessKeyId>:<awsSecretAccessKey> // can also be supplied in a .env file, same key names as listed.
  project: String: Media Fly Company Code
 })

Returns a Promise instance.

CLI:

./node_modules/.bin/@liveaxle/tooling mf.deploy --source=<local file path> --destination:<mf airship folder id> --product=$MF_PRODUCT --credentials=$MF_USER:$MF_PASSWORD
--aws=$AWS_ID:$AWS_SECRET
--project=$MF_COMPANY_CODE

** Release: **

Creates a Media Fly release according to the development release flow: https://liveaxle.atlassian.net/wiki/spaces/PROC/pages/31686657/Process+-+Development+and+Release

This function aggregates most of the other tooling functions into a flow to abide by the above linked process. As such it requires quite a bit of configuration:

CLI:

./node_modules/.bin/@liveaxle/tooling mf.release \
--credentials=<mf username>:<mf:password>
--build.input=<input for build source above> --build.output<output on disk for build artifact>
--aws.credentials=<awsAccessKeyId>:<awsSecretAccessKey> --aws.bucket=<bucketname> --aws.data=<data to upload>
--cnfl.credentials=<cf email>:<cf password> --source=<space name>:<page id> --copy=<space name>:<parent page id>
--bb.credentials=<bb email>:<bb password> --bb.source=owner/repo/branch --bb.remote=owner/repo/branch

Flow:

  1. Creates an interactive Build
  2. Deploys build to specificed folder
  3. Creates confluence test plan
  4. Creates PR with content from previous steps.

AWS

namespace: aws

S3 - namespace: aws.s3

** Upload: **

Uploads an item to s3

API:

aws.s3.upload(String:<name of file/s3 path from point of bucket>, Buffer:<data>, Object:<config>)

>Returns a `Promise` instance

>> CLI:

>```
./node_modules/.bin/@liveaxle/tooling aws.s3.upload --name=<s3 object name> --credentials=<awsAccessKeyId:awsSecretAccessKey> --data=<Buffer/Binary Octet Stream>
>```

---

> ** *Delete:* **

> Deletes an item from s3

>> API:
>```
aws.s3.delete(String:<name of s3 Object>, Object:<configuration>)
>```

> Returns a `Promise` object.

>> CLI:
>
> `./node_modules/.bin/@liveaxle/tooling aws.s3.delete`
>
>   `  --name=<s3 object name>`
>
>   `  --credentials=<awsAccessKeyId:awsSecretAccessKey>`


---

### Bit Bucket

#### namespace: `bb`

#### Pull Requests - namespace: `bb.pr`

> ** *Create:* **

>>API:

>```
bb.pr.create(config={
  source: String<source repository> // expressed as owner/repo/branch - will default to CWD git stats if not defined.
  remote: String<source repository> // expressed as owner/repo/branch - will default to CWD git stats if not defined.
  title: String<name of the PR> default to local branch
  description: String<description of pr>. defaults to looping through each commit
  credentials: Object: {username: <email>, password: <password>}
  reviewers: [{username: String:<bb username>}] //  defaults to LA team
})
>```

>>CLI:

>```
./node_modules/.bin/@liveaxle/tooling bb.pr.create
  --credentials=email:password
  --source=String:<bibucket repo path> owner/repo/branch - will default to cwd branch
  --remote=String:<bitbucket repo path> owner/repo/branch - will default to master
  --title=String:<title of the PR> - default to cwd branch name
  --description=String:<body for the PR>
>```
---

### Confluence

#### namespace: `cnfl`

#### Pages - namespace: `cnfl.pages`

> ** *Get:* **
Gets a page from Confluence

>> API:
>```
confl.content.get(String:id, Object:{
  credentials: {username: <email>, password: <password>}, // required
  space: String:<space> // Space containing the requesting
})
>```

>> CLI:

>```
./node_modules/.bin/@liveaxle/tooling cnfl.content.get --id=page/content id --credentials=username:email --space=title of space
>```

---

> ** *Create:* **
Create a page in Confluence

>> API:
>```
confl.content.create(title, Object:{
  credentials: {username: <email>, password: <password>}, // required
  space: String:<space> // Space containing the requesting,
  status: String:<current, trashed, historical, draft> // defaults to current
  parent: String:<id of the parent>
  body: String:<page body> // wiki markup of page
})
>```

>> CLI:

>```
./node_modules/.bin/@liveaxle/tooling cnfl.content.create --title=<page title> --credentials=username:email --space=title of space --body=<page body> --status=<page publish status> --parent=<parent id>
>```

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.