gopadjs 1.0.1 → 1.2.0
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/RELEASE +1 -1
- package/.github/settings.yml +1 -0
- package/.github/workflows/general.yml +1 -7
- package/.github/workflows/openapi.yml +74 -0
- package/.github/workflows/release.yml +20 -9
- package/.releaserc +54 -5
- package/CHANGELOG.md +14 -0
- package/README.md +3 -3
- package/flake.lock +3 -3
- package/flake.nix +3 -1
- package/hack/generate-client.sh +9 -38
- package/hack/openapi/templates/README.mustache +1 -1
- package/openapi.yml +1 -1
- package/package.json +1 -1
- package/hack/semantic-version.sh +0 -17
package/.github/RELEASE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Tue May 28 13:41:58 UTC 2024
|
package/.github/settings.yml
CHANGED
|
@@ -15,11 +15,9 @@ jobs:
|
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout source
|
|
18
|
-
id: source
|
|
19
18
|
uses: actions/checkout@v4
|
|
20
19
|
|
|
21
20
|
- name: Setup nodejs
|
|
22
|
-
id: nodejs
|
|
23
21
|
uses: actions/setup-node@v4
|
|
24
22
|
with:
|
|
25
23
|
node-version: 20.x
|
|
@@ -27,19 +25,15 @@ jobs:
|
|
|
27
25
|
cache-dependency-path: package-lock.json
|
|
28
26
|
|
|
29
27
|
- name: Install generator
|
|
30
|
-
run:
|
|
31
|
-
npm install @openapitools/openapi-generator-cli -g
|
|
28
|
+
run: npm install @openapitools/openapi-generator-cli -g
|
|
32
29
|
|
|
33
30
|
- name: Run install
|
|
34
|
-
id: deps
|
|
35
31
|
run: npm install --ci
|
|
36
32
|
|
|
37
33
|
- name: Run generate
|
|
38
|
-
id: generate
|
|
39
34
|
run: bash hack/generate-client.sh
|
|
40
35
|
|
|
41
36
|
- name: Run build
|
|
42
|
-
id: build
|
|
43
37
|
run: npm run build
|
|
44
38
|
|
|
45
39
|
...
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openapi
|
|
3
|
+
|
|
4
|
+
"on":
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "0 8 * * 1"
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
openapi:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Generate token
|
|
19
|
+
id: token
|
|
20
|
+
uses: tibdex/github-app-token@v2
|
|
21
|
+
with:
|
|
22
|
+
app_id: ${{ secrets.TOKEN_EXCHANGE_APP }}
|
|
23
|
+
installation_retrieval_mode: id
|
|
24
|
+
installation_retrieval_payload: ${{ secrets.TOKEN_EXCHANGE_INSTALL }}
|
|
25
|
+
private_key: ${{ secrets.TOKEN_EXCHANGE_KEY }}
|
|
26
|
+
permissions: >-
|
|
27
|
+
{"contents": "write", "pull_requests": "write"}
|
|
28
|
+
|
|
29
|
+
- name: Checkout source
|
|
30
|
+
id: source
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: Setup nodejs
|
|
34
|
+
uses: actions/setup-node@v4
|
|
35
|
+
with:
|
|
36
|
+
node-version: 20.x
|
|
37
|
+
cache: 'npm'
|
|
38
|
+
cache-dependency-path: package-lock.json
|
|
39
|
+
|
|
40
|
+
- name: Install generator
|
|
41
|
+
run: npm install @openapitools/openapi-generator-cli -g
|
|
42
|
+
|
|
43
|
+
- name: Run install
|
|
44
|
+
run: npm install --ci
|
|
45
|
+
|
|
46
|
+
- name: Run generate
|
|
47
|
+
run: bash hack/generate-client.sh
|
|
48
|
+
|
|
49
|
+
- name: Create request
|
|
50
|
+
id: pr
|
|
51
|
+
uses: peter-evans/create-pull-request@v6
|
|
52
|
+
with:
|
|
53
|
+
commit-message: "feat: automated openapi client update"
|
|
54
|
+
delete-branch: true
|
|
55
|
+
branch: openapi-client-update
|
|
56
|
+
title: "feat: automated openapi client update"
|
|
57
|
+
body: "New openapi client generated, automerge should handle that!"
|
|
58
|
+
labels: openapi
|
|
59
|
+
committer: GitHub Actions <github@webhippie.de>
|
|
60
|
+
token: ${{ steps.token.outputs.token }}
|
|
61
|
+
|
|
62
|
+
- name: Approve request
|
|
63
|
+
if: ${{ steps.pr.outputs.pull-request-url }}
|
|
64
|
+
run: gh pr review --approve "${{ steps.pr.outputs.pull-request-url }}"
|
|
65
|
+
env:
|
|
66
|
+
GH_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
|
|
67
|
+
|
|
68
|
+
- name: Enable automerge
|
|
69
|
+
if: ${{ steps.pr.outputs.pull-request-url }}
|
|
70
|
+
run: gh pr merge --rebase --auto "${{ steps.pr.outputs.pull-request-url }}"
|
|
71
|
+
env:
|
|
72
|
+
GH_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
|
|
73
|
+
|
|
74
|
+
...
|
|
@@ -20,18 +20,29 @@ jobs:
|
|
|
20
20
|
with:
|
|
21
21
|
token: ${{ secrets.BOT_ACCESS_TOKEN }}
|
|
22
22
|
|
|
23
|
-
- name:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
- name: Setup nodejs
|
|
24
|
+
uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: 20.x
|
|
27
|
+
|
|
28
|
+
- name: Install releaser
|
|
29
|
+
run: |
|
|
30
|
+
npm install -g \
|
|
31
|
+
conventional-changelog-conventionalcommits@6.1.0 \
|
|
32
|
+
semantic-release \
|
|
33
|
+
@semantic-release/commit-analyzer \
|
|
34
|
+
@semantic-release/release-notes-generator \
|
|
35
|
+
@semantic-release/changelog \
|
|
36
|
+
@semantic-release/git \
|
|
37
|
+
@semantic-release/github \
|
|
38
|
+
@semantic-release/npm \
|
|
39
|
+
semantic-release-replace-plugin
|
|
40
|
+
|
|
41
|
+
- name: Run releaser
|
|
28
42
|
env:
|
|
29
43
|
GITHUB_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
|
|
30
44
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
31
|
-
|
|
32
|
-
extra_plugins: |
|
|
33
|
-
@semantic-release/exec
|
|
34
|
-
conventional-changelog-conventionalcommits@6.1.0
|
|
45
|
+
run: semantic-release
|
|
35
46
|
|
|
36
47
|
- name: Write buildtime
|
|
37
48
|
run: date >| .github/RELEASE
|
package/.releaserc
CHANGED
|
@@ -110,9 +110,58 @@
|
|
|
110
110
|
}
|
|
111
111
|
],
|
|
112
112
|
[
|
|
113
|
-
"
|
|
113
|
+
"semantic-release-replace-plugin",
|
|
114
114
|
{
|
|
115
|
-
"
|
|
115
|
+
"replacements": [
|
|
116
|
+
{
|
|
117
|
+
"files": [
|
|
118
|
+
"openapi.yml"
|
|
119
|
+
],
|
|
120
|
+
"from": "npmVersion: .*",
|
|
121
|
+
"to": "npmVersion: ${nextRelease.version}",
|
|
122
|
+
"results": [
|
|
123
|
+
{
|
|
124
|
+
"file": "openapi.yml",
|
|
125
|
+
"hasChanged": true,
|
|
126
|
+
"numMatches": 1,
|
|
127
|
+
"numReplacements": 1
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"countMatches": true
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"files": [
|
|
134
|
+
"README.md"
|
|
135
|
+
],
|
|
136
|
+
"from": "Package version: .*",
|
|
137
|
+
"to": "Package version: ${nextRelease.version}",
|
|
138
|
+
"results": [
|
|
139
|
+
{
|
|
140
|
+
"file": "README.md",
|
|
141
|
+
"hasChanged": true,
|
|
142
|
+
"numMatches": 1,
|
|
143
|
+
"numReplacements": 1
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"countMatches": true
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"files": [
|
|
150
|
+
"README.md"
|
|
151
|
+
],
|
|
152
|
+
"from": "gopadjs@.*",
|
|
153
|
+
"to": "gopadjs@${nextRelease.version}",
|
|
154
|
+
"results": [
|
|
155
|
+
{
|
|
156
|
+
"file": "README.md",
|
|
157
|
+
"hasChanged": true,
|
|
158
|
+
"numMatches": 1,
|
|
159
|
+
"numReplacements": 1
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"countMatches": true
|
|
163
|
+
}
|
|
164
|
+
]
|
|
116
165
|
}
|
|
117
166
|
],
|
|
118
167
|
[
|
|
@@ -127,11 +176,11 @@
|
|
|
127
176
|
{
|
|
128
177
|
"message": "chore: release ${nextRelease.version}",
|
|
129
178
|
"assets": [
|
|
130
|
-
"package.json",
|
|
131
179
|
"CHANGELOG.md",
|
|
180
|
+
"package.json",
|
|
132
181
|
"openapi.yml",
|
|
133
|
-
"
|
|
134
|
-
"
|
|
182
|
+
"README.md",
|
|
183
|
+
"package-lock.json"
|
|
135
184
|
]
|
|
136
185
|
}
|
|
137
186
|
],
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.0](https://github.com/gopad/gopad-js/compare/v1.1.0...v1.2.0) (2024-05-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* automated openapi client update ([1e2091c](https://github.com/gopad/gopad-js/commit/1e2091c6080ecc6fd8fc55a742709836447730a4))
|
|
9
|
+
|
|
10
|
+
## [1.1.0](https://github.com/gopad/gopad-js/compare/v1.0.1...v1.1.0) (2024-05-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* automated openapi client update ([df204de](https://github.com/gopad/gopad-js/commit/df204de5a528c9d20c35f9b3d26ae0d46eb9d420))
|
|
16
|
+
|
|
3
17
|
## [1.0.1](https://github.com/gopad/gopad-js/compare/v1.0.0...v1.0.1) (2024-05-26)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Gopad: SDK for Javascript
|
|
2
2
|
|
|
3
|
-
[](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [](https://matrix.to/#/#gopad:matrix.org) [](https://
|
|
3
|
+
[](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [](https://matrix.to/#/#gopad:matrix.org) [](https://app.codacy.com/gh/gopad/gopad-js/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://badge.fury.io/js/gopadjs)
|
|
4
4
|
|
|
5
5
|
This repository provides a client SDK for Typescript/Javascript. This SDK is
|
|
6
6
|
automatically generated by the [OpenAPI Generator][generator] project:
|
|
7
7
|
|
|
8
8
|
- API version: 1.0.0-alpha1
|
|
9
|
-
- Package version: 1.0
|
|
9
|
+
- Package version: 1.2.0
|
|
10
10
|
- Build package: org.openapitools.codegen.languages.TypeScriptAxiosClientCodegen
|
|
11
11
|
|
|
12
12
|
For more information, please visit [https://gopad.eu](https://gopad.eu)
|
|
@@ -39,7 +39,7 @@ the following command within your project directory, after that you can import
|
|
|
39
39
|
it as other libraries:
|
|
40
40
|
|
|
41
41
|
```console
|
|
42
|
-
npm install --save gopadjs@1.0
|
|
42
|
+
npm install --save gopadjs@1.2.0
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### Installation with Git
|
package/flake.lock
CHANGED
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"pre-commit-hooks": "pre-commit-hooks"
|
|
40
40
|
},
|
|
41
41
|
"locked": {
|
|
42
|
-
"lastModified":
|
|
43
|
-
"narHash": "sha256-
|
|
42
|
+
"lastModified": 1716772813,
|
|
43
|
+
"narHash": "sha256-PLQ5Ap2BJ/EnLTY8KybwuOHDveVaH7Fvh+ItXzLL38M=",
|
|
44
44
|
"owner": "cachix",
|
|
45
45
|
"repo": "devenv",
|
|
46
|
-
"rev": "
|
|
46
|
+
"rev": "a1290a186b9420e2c0b21700f300b486ad90dcc9",
|
|
47
47
|
"type": "github"
|
|
48
48
|
},
|
|
49
49
|
"original": {
|
package/flake.nix
CHANGED
package/hack/generate-client.sh
CHANGED
|
@@ -8,19 +8,19 @@ else
|
|
|
8
8
|
ROOT=$(realpath -e "$(dirname "${0}")/..")
|
|
9
9
|
fi
|
|
10
10
|
|
|
11
|
+
if ! hash openapi-generator-cli 2>/dev/null; then
|
|
12
|
+
echo "missing openapi-generator-cli executable"
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
11
16
|
SPEC_VERSION="1.0.0-alpha1"
|
|
12
17
|
SPEC_DOWNLOAD=${SPEC:-https://dl.gopad.eu/openapi/${SPEC_VERSION}.yml}
|
|
13
18
|
|
|
14
19
|
pushd "${ROOT}" >/dev/null
|
|
15
|
-
echo ">
|
|
16
|
-
|
|
17
|
-
popd >/dev/null
|
|
18
|
-
|
|
19
|
-
echo "> deleteing apis and models"
|
|
20
|
-
rm -rf api model
|
|
20
|
+
echo "> deleting apis and models"
|
|
21
|
+
rm -rf api model
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
export TS_POST_PROCESS_FILE="./node_modules/.bin/prettier -w"
|
|
23
|
+
export TS_POST_PROCESS_FILE="npx prettier -w"
|
|
24
24
|
|
|
25
25
|
openapi-generator-cli \
|
|
26
26
|
generate \
|
|
@@ -33,33 +33,4 @@ if hash openapi-generator-cli 2>/dev/null; then
|
|
|
33
33
|
-o . \
|
|
34
34
|
-t hack/openapi/templates \
|
|
35
35
|
--strict-spec true
|
|
36
|
-
|
|
37
|
-
if hash docker 2>/dev/null; then
|
|
38
|
-
COMMAND="docker"
|
|
39
|
-
elif hash podman 2>/dev/null; then
|
|
40
|
-
COMMAND="postman"
|
|
41
|
-
else
|
|
42
|
-
echo "missing container runtime"
|
|
43
|
-
exit 1
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
"${COMMAND}" run --rm \
|
|
47
|
-
-v "${ROOT}:/generate:Z" \
|
|
48
|
-
-w /generate \
|
|
49
|
-
docker.io/openapitools/openapi-generator-cli:v7.6.0 \
|
|
50
|
-
generate \
|
|
51
|
-
-c /generate/openapi.yml \
|
|
52
|
-
-g typescript-axios \
|
|
53
|
-
--git-repo-id gopad-js \
|
|
54
|
-
--git-user-id gopad \
|
|
55
|
-
--http-user-agent "gopad-js/${SPEC_VERSION}" \
|
|
56
|
-
-i "${SPEC_DOWNLOAD}" \
|
|
57
|
-
-o /generate \
|
|
58
|
-
-t /generate/hack/openapi/templates \
|
|
59
|
-
--strict-spec true
|
|
60
|
-
|
|
61
|
-
pushd "${ROOT}" >/dev/null
|
|
62
|
-
echo "> fix code formatting"
|
|
63
|
-
npm run format
|
|
64
|
-
popd >/dev/null
|
|
65
|
-
fi
|
|
36
|
+
popd >/dev/null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gopad: SDK for Javascript
|
|
2
2
|
|
|
3
|
-
[](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [](https://matrix.to/#/#gopad:matrix.org) [](https://
|
|
3
|
+
[](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [](https://matrix.to/#/#gopad:matrix.org) [](https://app.codacy.com/gh/gopad/gopad-js/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://badge.fury.io/js/gopadjs)
|
|
4
4
|
|
|
5
5
|
This repository provides a client SDK for Typescript/Javascript. This SDK is
|
|
6
6
|
automatically generated by the [OpenAPI Generator][generator] project:
|
package/openapi.yml
CHANGED
package/package.json
CHANGED
package/hack/semantic-version.sh
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -eo pipefail
|
|
3
|
-
|
|
4
|
-
if [ $# -ne 1 ]; then
|
|
5
|
-
echo "Usage: ${0} VERSION"
|
|
6
|
-
exit 1
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
VERSION=${1}
|
|
10
|
-
shift
|
|
11
|
-
|
|
12
|
-
ROOT=$(cd "$(dirname "${0}")/.."; pwd)
|
|
13
|
-
|
|
14
|
-
sed \
|
|
15
|
-
-i \
|
|
16
|
-
"s|npmVersion: .*|npmVersion: ${VERSION}|" \
|
|
17
|
-
"${ROOT}/openapi.yml"
|