@parse/sqs-mq-adapter 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/---1-report-an-issue.md +51 -0
- package/.github/ISSUE_TEMPLATE/---2-feature-request.md +34 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/workflows/ci.yml +34 -0
- package/.github/workflows/release-automated.yml +31 -0
- package/.nycrc +9 -0
- package/.releaserc/commit.hbs +61 -0
- package/.releaserc/footer.hbs +11 -0
- package/.releaserc/header.hbs +25 -0
- package/.releaserc/template.hbs +14 -0
- package/CHANGELOG.md +13 -0
- package/README.md +16 -6
- package/package.json +26 -18
- package/release.config.js +115 -0
- package/.travis.yml +0 -10
- package/.vscode/launch.json +0 -14
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F41B Report an issue"
|
|
3
|
+
about: A feature is not working as expected.
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
### New Issue Checklist
|
|
11
|
+
<!--
|
|
12
|
+
Check every following box [x] before submitting your issue.
|
|
13
|
+
Click the "Preview" tab for better readability.
|
|
14
|
+
Thanks for contributing to Parse Platform!
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server-sqs-mq-adapter/security/policy).
|
|
18
|
+
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/main/SUPPORT.md).
|
|
19
|
+
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server-push-adapter/issues?q=is%3Aissue).
|
|
20
|
+
- [ ] I can reproduce the issue with the latest versions of [Parse Server](https://github.com/parse-community/parse-server/releases) and the [Parse Server SQS MQ Adapter](https://github.com/parse-community/parse-server-sqs-mq-adapter/releases). <!-- We don't investigate issues for outdated releases. -->
|
|
21
|
+
|
|
22
|
+
### Issue Description
|
|
23
|
+
<!-- What is the specific issue? -->
|
|
24
|
+
|
|
25
|
+
### Steps to reproduce
|
|
26
|
+
<!-- How can someone else reproduce the issue? -->
|
|
27
|
+
|
|
28
|
+
### Actual Outcome
|
|
29
|
+
<!-- What outcome did you get? -->
|
|
30
|
+
|
|
31
|
+
### Expected Outcome
|
|
32
|
+
<!-- What outcome did you expect? -->
|
|
33
|
+
|
|
34
|
+
### Environment
|
|
35
|
+
<!-- Be specific with versions, don't use "latest" or semver ranges like "~x.y.z" or "^x.y.z". -->
|
|
36
|
+
|
|
37
|
+
Client
|
|
38
|
+
- Parse Server SQS MQ Adapter version: `FILL_THIS_OUT`
|
|
39
|
+
|
|
40
|
+
Server
|
|
41
|
+
- Parse Server version: `FILL_THIS_OUT`
|
|
42
|
+
- Operating system: `FILL_THIS_OUT`
|
|
43
|
+
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): `FILL_THIS_OUT`
|
|
44
|
+
|
|
45
|
+
Database
|
|
46
|
+
- System (MongoDB or Postgres): `FILL_THIS_OUT`
|
|
47
|
+
- Database version: `FILL_THIS_OUT`
|
|
48
|
+
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): `FILL_THIS_OUT`
|
|
49
|
+
|
|
50
|
+
### Logs
|
|
51
|
+
<!-- Include relevant logs here. -->
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F4A1 Request a feature"
|
|
3
|
+
about: Suggest new functionality or an enhancement of existing functionality.
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
### New Feature / Enhancement Checklist
|
|
11
|
+
<!--
|
|
12
|
+
Check every following box [x] before submitting your issue.
|
|
13
|
+
Click the "Preview" tab for better readability.
|
|
14
|
+
Thanks for contributing to Parse Platform!
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server-sqs-mq-adapter/security/policy).
|
|
18
|
+
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/main/SUPPORT.md).
|
|
19
|
+
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server-sqs-mq-adapter/issues?q=is%3Aissue).
|
|
20
|
+
|
|
21
|
+
### Current Limitation
|
|
22
|
+
<!-- Which current limitation is the feature or enhancement addressing? -->
|
|
23
|
+
|
|
24
|
+
### Feature / Enhancement Description
|
|
25
|
+
<!-- What is the concept of the functionality and how should it be implemented? -->
|
|
26
|
+
|
|
27
|
+
### Example Use Case
|
|
28
|
+
<!-- What is an example use case in steps (1. / 2. / 3. / etc.) that describes the functionality? -->
|
|
29
|
+
|
|
30
|
+
### Alternatives / Workarounds
|
|
31
|
+
<!-- Which alternatives or workarounds exist currently? -->
|
|
32
|
+
|
|
33
|
+
### 3rd Party References
|
|
34
|
+
<!-- Have you seen a similar functionality provided somewhere else? -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: 🙋🏽♀️ Getting help with code
|
|
4
|
+
url: https://stackoverflow.com/questions/tagged/parse-platform
|
|
5
|
+
about: Get help with code-level questions on Stack Overflow.
|
|
6
|
+
- name: 🙋 Getting general help
|
|
7
|
+
url: https://community.parseplatform.org
|
|
8
|
+
about: Get help with other questions on our Community Forum.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
pull_request:
|
|
7
|
+
branches:
|
|
8
|
+
- '**'
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
node: [ '12', '14', '15', '16', '17', '18' ]
|
|
15
|
+
timeout-minutes: 30
|
|
16
|
+
env:
|
|
17
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
18
|
+
COVERAGE_OPTION: ./node_modules/.bin/nyc
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v2
|
|
21
|
+
- name: Use Node.js
|
|
22
|
+
uses: actions/setup-node@v2
|
|
23
|
+
with:
|
|
24
|
+
node-version: ${{ matrix.node }}
|
|
25
|
+
- name: Cache Node.js modules
|
|
26
|
+
uses: actions/cache@v2
|
|
27
|
+
with:
|
|
28
|
+
path: ~/.npm
|
|
29
|
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
30
|
+
restore-keys: |
|
|
31
|
+
${{ runner.os }}-node-
|
|
32
|
+
- run: npm ci
|
|
33
|
+
- run: npm run coverage
|
|
34
|
+
- run: bash <(curl -s https://codecov.io/bash)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: release-automated
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ main, master, release, alpha, beta ]
|
|
5
|
+
jobs:
|
|
6
|
+
release:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout repository
|
|
10
|
+
uses: actions/checkout@v2
|
|
11
|
+
with:
|
|
12
|
+
persist-credentials: false
|
|
13
|
+
- name: Setup Node
|
|
14
|
+
uses: actions/setup-node@v2
|
|
15
|
+
with:
|
|
16
|
+
node-version: 18
|
|
17
|
+
- name: Cache Node.js modules
|
|
18
|
+
uses: actions/cache@v2
|
|
19
|
+
with:
|
|
20
|
+
path: ~/.npm
|
|
21
|
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
22
|
+
restore-keys: |
|
|
23
|
+
${{ runner.os }}-node-
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
- name: Run semantic-release
|
|
27
|
+
run: npx semantic-release
|
|
28
|
+
env:
|
|
29
|
+
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
|
|
30
|
+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
|
|
31
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.nycrc
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
*{{#if scope}} **{{scope}}:**
|
|
2
|
+
{{~/if}} {{#if subject}}
|
|
3
|
+
{{~subject}}
|
|
4
|
+
{{~else}}
|
|
5
|
+
{{~header}}
|
|
6
|
+
{{~/if}}
|
|
7
|
+
|
|
8
|
+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
|
|
9
|
+
([{{shortHash}}](
|
|
10
|
+
{{~#if @root.repository}}
|
|
11
|
+
{{~#if @root.host}}
|
|
12
|
+
{{~@root.host}}/
|
|
13
|
+
{{~/if}}
|
|
14
|
+
{{~#if @root.owner}}
|
|
15
|
+
{{~@root.owner}}/
|
|
16
|
+
{{~/if}}
|
|
17
|
+
{{~@root.repository}}
|
|
18
|
+
{{~else}}
|
|
19
|
+
{{~@root.repoUrl}}
|
|
20
|
+
{{~/if}}/
|
|
21
|
+
{{~@root.commit}}/{{hash}}))
|
|
22
|
+
{{~else}}
|
|
23
|
+
{{~shortHash}}
|
|
24
|
+
{{~/if}}
|
|
25
|
+
|
|
26
|
+
{{~!-- commit references --}}
|
|
27
|
+
{{~#if references~}}
|
|
28
|
+
, closes
|
|
29
|
+
{{~#each references}} {{#if @root.linkReferences~}}
|
|
30
|
+
[
|
|
31
|
+
{{~#if this.owner}}
|
|
32
|
+
{{~this.owner}}/
|
|
33
|
+
{{~/if}}
|
|
34
|
+
{{~this.repository}}#{{this.issue}}](
|
|
35
|
+
{{~#if @root.repository}}
|
|
36
|
+
{{~#if @root.host}}
|
|
37
|
+
{{~@root.host}}/
|
|
38
|
+
{{~/if}}
|
|
39
|
+
{{~#if this.repository}}
|
|
40
|
+
{{~#if this.owner}}
|
|
41
|
+
{{~this.owner}}/
|
|
42
|
+
{{~/if}}
|
|
43
|
+
{{~this.repository}}
|
|
44
|
+
{{~else}}
|
|
45
|
+
{{~#if @root.owner}}
|
|
46
|
+
{{~@root.owner}}/
|
|
47
|
+
{{~/if}}
|
|
48
|
+
{{~@root.repository}}
|
|
49
|
+
{{~/if}}
|
|
50
|
+
{{~else}}
|
|
51
|
+
{{~@root.repoUrl}}
|
|
52
|
+
{{~/if}}/
|
|
53
|
+
{{~@root.issue}}/{{this.issue}})
|
|
54
|
+
{{~else}}
|
|
55
|
+
{{~#if this.owner}}
|
|
56
|
+
{{~this.owner}}/
|
|
57
|
+
{{~/if}}
|
|
58
|
+
{{~this.repository}}#{{this.issue}}
|
|
59
|
+
{{~/if}}{{/each}}
|
|
60
|
+
{{~/if}}
|
|
61
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{{#if isPatch~}}
|
|
2
|
+
##
|
|
3
|
+
{{~else~}}
|
|
4
|
+
#
|
|
5
|
+
{{~/if}} {{#if @root.linkCompare~}}
|
|
6
|
+
[{{version}}](
|
|
7
|
+
{{~#if @root.repository~}}
|
|
8
|
+
{{~#if @root.host}}
|
|
9
|
+
{{~@root.host}}/
|
|
10
|
+
{{~/if}}
|
|
11
|
+
{{~#if @root.owner}}
|
|
12
|
+
{{~@root.owner}}/
|
|
13
|
+
{{~/if}}
|
|
14
|
+
{{~@root.repository}}
|
|
15
|
+
{{~else}}
|
|
16
|
+
{{~@root.repoUrl}}
|
|
17
|
+
{{~/if~}}
|
|
18
|
+
/compare/{{previousTag}}...{{currentTag}})
|
|
19
|
+
{{~else}}
|
|
20
|
+
{{~version}}
|
|
21
|
+
{{~/if}}
|
|
22
|
+
{{~#if title}} "{{title}}"
|
|
23
|
+
{{~/if}}
|
|
24
|
+
{{~#if date}} ({{date}})
|
|
25
|
+
{{/if}}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## [1.3.6](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/compare/1.3.5...1.3.6) (2022-12-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Security upgrade qs from 6.5.2 to 6.5.3 ([#55](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/issues/55)) ([5c43964](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/commit/5c43964c4b6008b1d6e6d2fa981783c164cb37a4))
|
|
7
|
+
|
|
8
|
+
## [1.3.5](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/compare/1.3.4...1.3.5) (2022-06-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* security upgrade parse-server from 5.2.1 to 5.2.2 ([#41](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/issues/41)) ([6e29cf0](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/commit/6e29cf0edd369ed6ef15cebe54043c0142865c77))
|
package/README.md
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Parse Server SQS Message Queue Adapter <!-- omit in toc -->
|
|
2
2
|
|
|
3
|
-
[](https://github.com/parse-community/parse-server-sqs-mq-adapter/actions?query=workflow%3Aci+branch%3Amain)
|
|
4
|
+
[](https://snyk.io/test/github/parse-community/parse-server-sqs-mq-adapter)
|
|
5
|
+
[](https://codecov.io/github/parse-community/parse-server-sqs-mq-adapter?branch=main)
|
|
6
|
+
[](https://github.com/parse-community/parse-server-sqs-mq-adapter/releases)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
[](https://www.npmjs.com/package/@parse/sqs-mq-adapter)
|
|
8
9
|
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
The Parse Server AWS SQS Message Queue Adapter. This adapter allows a work queue to be spread across a cluster of machines.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
- [Installation](#installation)
|
|
17
|
+
- [Usage](#usage)
|
|
18
|
+
- [Credentials](#credentials)
|
|
9
19
|
## Installation
|
|
10
20
|
|
|
11
21
|
`npm install --save @parse/sqs-mq-adapter`
|
|
@@ -29,6 +39,7 @@ const parseServer = new ParseServer(config);
|
|
|
29
39
|
```
|
|
30
40
|
|
|
31
41
|
See: [sqs-consumer](https://www.npmjs.com/package/sqs-consumer#options) for complete list of configuration options.
|
|
42
|
+
|
|
32
43
|
### Credentials
|
|
33
44
|
|
|
34
45
|
By default the consumer will look for AWS credentials in the places [specified by the AWS SDK](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Setting_AWS_Credentials). The simplest option is to export your credentials as environment variables:
|
|
@@ -62,5 +73,4 @@ config = {
|
|
|
62
73
|
};
|
|
63
74
|
|
|
64
75
|
const parseServer = new ParseServer(config);
|
|
65
|
-
|
|
66
76
|
```
|
package/package.json
CHANGED
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parse/sqs-mq-adapter",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "Spread work queue across cluster of parse servers using SQS",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"test": "npm run freetest",
|
|
10
|
-
"freetest": "istanbul cover -x \"**/spec/**\" jasmine"
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/parse-server-modules/parse-server-sqs-mq-adapter.git"
|
|
11
9
|
},
|
|
12
|
-
"author": "
|
|
10
|
+
"author": "Parse Platform",
|
|
13
11
|
"license": "MIT",
|
|
14
12
|
"dependencies": {
|
|
15
|
-
"sqs-consumer": "
|
|
16
|
-
"sqs-producer": "
|
|
13
|
+
"sqs-consumer": "3.8.0",
|
|
14
|
+
"sqs-producer": "1.6.3"
|
|
17
15
|
},
|
|
18
16
|
"peerDependencies": {
|
|
19
17
|
"parse-server": "*"
|
|
20
18
|
},
|
|
21
19
|
"devDependencies": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
20
|
+
"@semantic-release/changelog": "5.0.1",
|
|
21
|
+
"@semantic-release/commit-analyzer": "8.0.1",
|
|
22
|
+
"@semantic-release/git": "9.0.0",
|
|
23
|
+
"@semantic-release/github": "7.2.3",
|
|
24
|
+
"@semantic-release/npm": "7.1.3",
|
|
25
|
+
"@semantic-release/release-notes-generator": "9.0.3",
|
|
26
|
+
"eslint": "4.19.1",
|
|
27
|
+
"eslint-config-airbnb-base": "12.1.0",
|
|
28
|
+
"eslint-plugin-import": "2.26.0",
|
|
29
|
+
"jasmine": "2.99.0",
|
|
30
|
+
"nyc": "15.1.0",
|
|
31
|
+
"parse-server": "5.3.2",
|
|
32
|
+
"semantic-release": "19.0.5",
|
|
33
|
+
"sinon": "14.0.0"
|
|
28
34
|
},
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
35
|
+
"scripts": {
|
|
36
|
+
"lint": "eslint ./index.js ./lib/** ./spec/**",
|
|
37
|
+
"pretest": "npm run lint",
|
|
38
|
+
"test": "jasmine",
|
|
39
|
+
"coverage": "nyc jasmine"
|
|
32
40
|
}
|
|
33
41
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic Release Config
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs').promises;
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
// Get env vars
|
|
9
|
+
const ref = process.env.GITHUB_REF;
|
|
10
|
+
const serverUrl = process.env.GITHUB_SERVER_URL;
|
|
11
|
+
const repository = process.env.GITHUB_REPOSITORY;
|
|
12
|
+
const repositoryUrl = serverUrl + '/' + repository;
|
|
13
|
+
|
|
14
|
+
// Declare params
|
|
15
|
+
const resourcePath = './.releaserc/';
|
|
16
|
+
const templates = {
|
|
17
|
+
main: { file: 'template.hbs', text: undefined },
|
|
18
|
+
header: { file: 'header.hbs', text: undefined },
|
|
19
|
+
commit: { file: 'commit.hbs', text: undefined },
|
|
20
|
+
footer: { file: 'footer.hbs', text: undefined },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Declare semantic config
|
|
24
|
+
async function config() {
|
|
25
|
+
|
|
26
|
+
// Get branch
|
|
27
|
+
const branch = ref.split('/').pop();
|
|
28
|
+
console.log(`Running on branch: ${branch}`);
|
|
29
|
+
|
|
30
|
+
// Set changelog file
|
|
31
|
+
//const changelogFile = `./changelogs/CHANGELOG_${branch}.md`;
|
|
32
|
+
const changelogFile = `./CHANGELOG.md`;
|
|
33
|
+
console.log(`Changelog file output to: ${changelogFile}`);
|
|
34
|
+
|
|
35
|
+
// Load template file contents
|
|
36
|
+
await loadTemplates();
|
|
37
|
+
|
|
38
|
+
const config = {
|
|
39
|
+
branches: [
|
|
40
|
+
'main',
|
|
41
|
+
// { name: 'alpha', prerelease: true },
|
|
42
|
+
// { name: 'beta', prerelease: true },
|
|
43
|
+
// 'next-major',
|
|
44
|
+
// Long-Term-Support branches
|
|
45
|
+
// { name: 'release-1', range: '1.x.x', channel: '1.x' },
|
|
46
|
+
// { name: 'release-2', range: '2.x.x', channel: '2.x' },
|
|
47
|
+
// { name: 'release-3', range: '3.x.x', channel: '3.x' },
|
|
48
|
+
// { name: 'release-4', range: '4.x.x', channel: '4.x' },
|
|
49
|
+
],
|
|
50
|
+
dryRun: false,
|
|
51
|
+
debug: true,
|
|
52
|
+
ci: true,
|
|
53
|
+
tagFormat: '${version}',
|
|
54
|
+
plugins: [
|
|
55
|
+
['@semantic-release/commit-analyzer', {
|
|
56
|
+
preset: 'angular',
|
|
57
|
+
releaseRules: [
|
|
58
|
+
{ type: 'docs', scope: 'README', release: 'patch' },
|
|
59
|
+
{ scope: 'no-release', release: false },
|
|
60
|
+
],
|
|
61
|
+
parserOpts: {
|
|
62
|
+
noteKeywords: [ 'BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING' ],
|
|
63
|
+
},
|
|
64
|
+
}],
|
|
65
|
+
['@semantic-release/release-notes-generator', {
|
|
66
|
+
preset: 'angular',
|
|
67
|
+
parserOpts: {
|
|
68
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING']
|
|
69
|
+
},
|
|
70
|
+
writerOpts: {
|
|
71
|
+
commitsSort: ['subject', 'scope'],
|
|
72
|
+
mainTemplate: templates.main.text,
|
|
73
|
+
headerPartial: templates.header.text,
|
|
74
|
+
commitPartial: templates.commit.text,
|
|
75
|
+
footerPartial: templates.footer.text,
|
|
76
|
+
},
|
|
77
|
+
}],
|
|
78
|
+
['@semantic-release/changelog', {
|
|
79
|
+
'changelogFile': changelogFile,
|
|
80
|
+
}],
|
|
81
|
+
['@semantic-release/npm', {
|
|
82
|
+
'npmPublish': true,
|
|
83
|
+
}],
|
|
84
|
+
['@semantic-release/git', {
|
|
85
|
+
assets: [changelogFile, 'package.json', 'package-lock.json'],
|
|
86
|
+
}],
|
|
87
|
+
['@semantic-release/github', {
|
|
88
|
+
successComment: getReleaseComment(),
|
|
89
|
+
labels: ['type:ci'],
|
|
90
|
+
releasedLabels: ['state:released<%= nextRelease.channel ? `-${nextRelease.channel}` : "" %>']
|
|
91
|
+
}],
|
|
92
|
+
],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return config;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function loadTemplates() {
|
|
99
|
+
for (const template of Object.keys(templates)) {
|
|
100
|
+
const text = await readFile(path.resolve(__dirname, resourcePath, templates[template].file));
|
|
101
|
+
templates[template].text = text;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function readFile(filePath) {
|
|
106
|
+
return await fs.readFile(filePath, 'utf-8');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function getReleaseComment() {
|
|
110
|
+
const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}';
|
|
111
|
+
let comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')';
|
|
112
|
+
return comment;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
module.exports = config();
|
package/.travis.yml
DELETED
package/.vscode/launch.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"type": "node",
|
|
9
|
-
"request": "launch",
|
|
10
|
-
"name": "Launch Program",
|
|
11
|
-
"program": "${workspaceFolder}/node_modules/.bin/jasmine"
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
}
|