diff --git a/.github/workflows/web-api-publish.yml b/.github/workflows/web-api-publish.yml index ff688549c..820da081b 100644 --- a/.github/workflows/web-api-publish.yml +++ b/.github/workflows/web-api-publish.yml @@ -16,8 +16,8 @@ jobs: registry-url: 'https://registry.npmjs.org' - run: make gen-web - run: | - cd web/api/ - npm run build + cd web-api/ + npm i npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/Makefile b/Makefile index a036ebdbb..f48fa0f31 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ gen-web: openapitools/openapi-generator-cli generate \ -i /local/schema.yml \ -g typescript-fetch \ - -o /local/web/api \ + -o /local/web-api \ --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${TIMESTAMP}.0.0 gen-outpost: diff --git a/web/package-lock.json b/web/package-lock.json index db02494c2..f167d8b0a 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^1629055619.0.0", + "@goauthentik/api": "^1629704636.0.0", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", @@ -1690,9 +1690,9 @@ } }, "node_modules/@goauthentik/api": { - "version": "1629055619.0.0", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629055619.0.0.tgz", - "integrity": "sha512-FQR1hoYC8hEGAm/oHC6VPoB/T8zb+V7pccx4LRJlKo8VxdsRAxgGn9nm/5h/1zIg8VmuRQqsXFNQMRT86nzyjw==" + "version": "1629704636.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629704636.0.0.tgz", + "integrity": "sha512-rjUjp7Gbf/Tzw0hGPx2ig5InXa4bPqj4FkFnIEgR6T1w6jbHV+q2BghztVFDc2hK2ib2NnQUQp6LWIAcYLAdSw==" }, "node_modules/@humanwhocodes/config-array": { "version": "0.5.0", @@ -9567,9 +9567,9 @@ "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==" }, "@goauthentik/api": { - "version": "1629055619.0.0", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629055619.0.0.tgz", - "integrity": "sha512-FQR1hoYC8hEGAm/oHC6VPoB/T8zb+V7pccx4LRJlKo8VxdsRAxgGn9nm/5h/1zIg8VmuRQqsXFNQMRT86nzyjw==" + "version": "1629704636.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629704636.0.0.tgz", + "integrity": "sha512-rjUjp7Gbf/Tzw0hGPx2ig5InXa4bPqj4FkFnIEgR6T1w6jbHV+q2BghztVFDc2hK2ib2NnQUQp6LWIAcYLAdSw==" }, "@humanwhocodes/config-array": { "version": "0.5.0", diff --git a/web/package.json b/web/package.json index 62a0e9b0b..e260d7e59 100644 --- a/web/package.json +++ b/web/package.json @@ -46,7 +46,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^1629704307.0.0", + "@goauthentik/api": "^1629704636.0.0", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", diff --git a/web/rollup.config.js b/web/rollup.config.js index 259203f8a..19f124b0c 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -75,6 +75,10 @@ export default [ resolve({ browser: true }), commonjs(), isProdBuild && terser(), + copy({ + targets: [...resources], + copyOnce: false, + }), ].filter((p) => p), watch: { clearScreen: false,