Skip to content

Commit cd9b0ae

Browse files
committed
launch latest code
1 parent 22235ba commit cd9b0ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+6305
-1
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": [
3+
"oclif",
4+
"oclif-typescript"
5+
]
6+
}

.github/workflows/jira.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Create JIRA ISSUE
2+
on:
3+
pull_request:
4+
types: [opened]
5+
jobs:
6+
security-jira:
7+
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-') || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Login into JIRA
12+
uses: atlassian/gajira-login@master
13+
env:
14+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
15+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
16+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
17+
- name: Create a JIRA Issue
18+
id: create
19+
uses: atlassian/gajira-create@master
20+
with:
21+
project: ${{ secrets.JIRA_PROJECT }}
22+
issuetype: ${{ secrets.JIRA_ISSUE_TYPE }}
23+
summary: |
24+
${{ github.event.pull_request.title }}
25+
description: |
26+
PR: ${{ github.event.pull_request.html_url }}
27+
28+
fields: "${{ secrets.JIRA_FIELDS }}"
29+
- name: Transition issue
30+
uses: atlassian/gajira-transition@v3
31+
with:
32+
issue: ${{ steps.create.outputs.issue }}
33+
transition: ${{ secrets.JIRA_TRANSITION }}

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
name: Build and upload
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3.5.3
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3.7.0
17+
with:
18+
node-version: "18.x"
19+
- name: Installing dependencies
20+
run: npm install
21+
- name: Build
22+
run: npm run prepack
23+
- name: Upload dist
24+
uses: actions/upload-artifact@v3.1.2
25+
with:
26+
name: lib
27+
path: lib
28+
29+
release:
30+
name: Download dist and release
31+
runs-on: ubuntu-latest
32+
needs: build
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v3.5.3
36+
with:
37+
fetch-depth: 0
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v3.7.0
40+
with:
41+
node-version: "18.x"
42+
- name: Installing dependencies
43+
run: npm install
44+
- name: Download dist
45+
uses: actions/download-artifact@v3
46+
with:
47+
name: lib
48+
path: lib
49+
- name: Display dirs
50+
run: ls -R
51+
- name: Release
52+
id: release-plugin
53+
uses: JS-DevTools/npm-publish@v2.2.0
54+
with:
55+
token: ${{ secrets.NPM_TOKEN }}
56+
access: public
57+
- name: get-npm-version
58+
id: package-version
59+
uses: martinbeentjes/npm-get-version-action@v1.3.1
60+
- name: github-release
61+
id: github-release
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: gh release create v${{ steps.release-plugin.outputs.version }} --title "Release ${{ steps.release-plugin.outputs.version }}" --generate-notes

.github/workflows/sast-scan.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: SAST Scan
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
security-sast:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Semgrep Scan
11+
run: docker run -v /var/run/docker.sock:/var/run/docker.sock -v "${PWD}:/src" returntocorp/semgrep semgrep scan --config auto

.github/workflows/sca-scan.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Source Composition Analysis Scan
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
security-sca:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Run Snyk to check for vulnerabilities
11+
uses: snyk/actions/node@master
12+
env:
13+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
14+
with:
15+
args: --all-projects --fail-on=all --strict-out-of-sync=false

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
*-debug.log
2+
*-error.log
3+
/.nyc_output
4+
/dist
5+
/lib
6+
/package-lock.json
7+
/tmp
8+
/yarn.lock
9+
node_modules
10+
oclif.manifest.json
11+
.env
12+
*.log
13+
tsconfig.tsbuildinfo
14+
dependabot.yml
15+
.vscode
16+
*.todo
17+
/bkp
18+
.editorconfig
19+
/functions

.mocharc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"require": [
3+
"test/helpers/init.js",
4+
"ts-node/register"
5+
],
6+
"watch-extensions": [
7+
"ts"
8+
],
9+
"recursive": true,
10+
"reporter": "spec",
11+
"timeout": 60000
12+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Contentstack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
# launch-cli
1+
# Launch CLI plugin
2+
3+
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
4+
5+
With Launch CLI, you can interact with the Contentstack Launch platform using the terminal to create, manage and deploy Launch projects.
6+
7+
<!-- toc -->
8+
* [Launch CLI plugin](#launch-cli-plugin)
9+
* [Usage](#usage)
10+
* [Installation steps](#installation-steps)
11+
* [Commands](#commands)
12+
<!-- tocstop -->
13+
14+
# Installation steps
15+
16+
```sh-session
17+
GitHub installation steps:
18+
$ git clone clone <repo url>
19+
$ npm install
20+
$ npm run build
21+
$ csdx plugins:link <plugin path>
22+
23+
NPM installation steps:
24+
$ csdx plugins:install @contentstack/cli-launch
25+
$ csdx launch
26+
```
27+
28+
# Commands
29+
30+
```sh-session
31+
$ csdx launch
32+
start with launch flow <GitHub|FileUpload>
33+
$ csdx launch:logs
34+
To see server logs
35+
$ csdx launch:logs --type d
36+
To see deployment logs
37+
$ csdx launch:functions
38+
Run cloud functions locally
39+
```
40+
41+
<!-- commandsstop -->

0 commit comments

Comments
 (0)