gopadjs 1.0.1 → 1.1.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 CHANGED
@@ -1 +1 @@
1
- Sun May 26 22:00:25 UTC 2024
1
+ Mon May 27 08:10:17 UTC 2024
@@ -34,6 +34,7 @@ branches:
34
34
  restrictions:
35
35
  apps:
36
36
  - renovate
37
+ - gopad
37
38
  users: []
38
39
  teams:
39
40
  - admins
@@ -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,32 @@ jobs:
20
20
  with:
21
21
  token: ${{ secrets.BOT_ACCESS_TOKEN }}
22
22
 
23
+ - name: Setup nodejs
24
+ uses: actions/setup-node@v4
25
+ with:
26
+ node-version: 20.x
27
+
23
28
  - name: Install generator
24
29
  run: npm install @openapitools/openapi-generator-cli -g
25
30
 
26
- - name: Semantic release
27
- uses: cycjimmy/semantic-release-action@v3
31
+ - name: Install releaser
32
+ run: |
33
+ npm install -g \
34
+ conventional-changelog-conventionalcommits@6.1.0 \
35
+ semantic-release \
36
+ @semantic-release/commit-analyzer \
37
+ @semantic-release/release-notes-generator \
38
+ @semantic-release/changelog \
39
+ @semantic-release/git \
40
+ @semantic-release/github \
41
+ @semantic-release/npm \
42
+ semantic-release-replace-plugin
43
+
44
+ - name: Run releaser
28
45
  env:
29
46
  GITHUB_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
30
47
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31
- with:
32
- extra_plugins: |
33
- @semantic-release/exec
34
- conventional-changelog-conventionalcommits@6.1.0
48
+ run: semantic-release
35
49
 
36
50
  - name: Write buildtime
37
51
  run: date >| .github/RELEASE
package/.releaserc CHANGED
@@ -110,9 +110,58 @@
110
110
  }
111
111
  ],
112
112
  [
113
- "@semantic-release/exec",
113
+ "semantic-release-replace-plugin",
114
114
  {
115
- "prepareCmd": "./hack/semantic-version.sh ${nextRelease.version} && ./hack/generate-client.sh"
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,10 @@
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
- "api/*",
134
- "model/*"
182
+ "README.md"
135
183
  ]
136
184
  }
137
185
  ],
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.0](https://github.com/gopad/gopad-js/compare/v1.0.1...v1.1.0) (2024-05-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * automated openapi client update ([df204de](https://github.com/gopad/gopad-js/commit/df204de5a528c9d20c35f9b3d26ae0d46eb9d420))
9
+
3
10
  ## [1.0.1](https://github.com/gopad/gopad-js/compare/v1.0.0...v1.0.1) (2024-05-26)
4
11
 
5
12
 
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Gopad: SDK for Javascript
2
2
 
3
- [![General Workflow](https://github.com/gopad/gopad-js/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/de988a49ed9f4e3eae33faa17b5f08d4)](https://www.codacy.com/gh/gopad/gopad-js/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=gopad/gopad-js&amp;utm_campaign=Badge_Grade) [![NPM Version](https://badge.fury.io/js/gopad.svg)](https://badge.fury.io/js/gopad)
3
+ [![General Workflow](https://github.com/gopad/gopad-js/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/de988a49ed9f4e3eae33faa17b5f08d4)](https://app.codacy.com/gh/gopad/gopad-js/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![NPM Version](https://badge.fury.io/js/gopadjs.svg)](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.1
9
+ - Package version:1.1.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.1
42
+ npm install --save gopadjs@1.1.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": 1716484006,
43
- "narHash": "sha256-2gtN5jf21HS9TAZXhf9G+OSUY1TQ/95n6clcuFjYQ58=",
42
+ "lastModified": 1716772813,
43
+ "narHash": "sha256-PLQ5Ap2BJ/EnLTY8KybwuOHDveVaH7Fvh+ItXzLL38M=",
44
44
  "owner": "cachix",
45
45
  "repo": "devenv",
46
- "rev": "800f19d1b999f89464fd8e0226abf4b3b444b0fa",
46
+ "rev": "a1290a186b9420e2c0b21700f300b486ad90dcc9",
47
47
  "type": "github"
48
48
  },
49
49
  "original": {
package/flake.nix CHANGED
@@ -48,7 +48,9 @@
48
48
  };
49
49
  };
50
50
 
51
- packages = with pkgs; [];
51
+ packages = with pkgs; [
52
+ openapi-generator-cli
53
+ ];
52
54
  };
53
55
  };
54
56
  };
@@ -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 "> install requirements"
16
- npm install --ci
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
- if hash openapi-generator-cli 2>/dev/null; then
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
- else
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
- [![General Workflow](https://github.com/gopad/gopad-js/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/de988a49ed9f4e3eae33faa17b5f08d4)](https://www.codacy.com/gh/gopad/gopad-js/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=gopad/gopad-js&amp;utm_campaign=Badge_Grade) [![NPM Version](https://badge.fury.io/js/gopad.svg)](https://badge.fury.io/js/gopad)
3
+ [![General Workflow](https://github.com/gopad/gopad-js/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-js/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/de988a49ed9f4e3eae33faa17b5f08d4)](https://app.codacy.com/gh/gopad/gopad-js/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![NPM Version](https://badge.fury.io/js/gopadjs.svg)](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
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  npmName: gopadjs
3
- npmVersion: 1.0.1
3
+ npmVersion: 1.1.0
4
4
  supportsES6: true
5
5
  useSingleRequestParameter: true
6
6
  withNodeImports: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gopadjs",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "OpenAPI client for Gopad",
5
5
  "homepage": "https://github.com/gopad/gopad-js#readme",
6
6
  "license": "Apache-2.0",
@@ -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"