From e5942058da7cb638d459e5d492634e4b37bc4995 Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sun, 28 Apr 2024 19:32:51 -0300 Subject: [PATCH 1/6] wip-fix: fetch conn errors --- front/packages/client/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front/packages/client/src/index.ts b/front/packages/client/src/index.ts index cd74cfca..951ba520 100644 --- a/front/packages/client/src/index.ts +++ b/front/packages/client/src/index.ts @@ -7,6 +7,9 @@ import { ClientError, type ClientErrorCode } from "./error.js"; import node_fetch, { Headers } from "node-fetch"; import type { Response, RequestInit } from "node-fetch"; +import http from "http"; +import https from "https"; + import type { PublicErrorCode } from "./defs/error/PublicErrorCode.js"; export { ClientError, type ClientErrorCode }; @@ -62,7 +65,7 @@ export class Client { const method = init.method ?? "GET"; // this.logger.debug(`fetch: ${method} ${url}`); return await this.node_fetch(url, { - agent: false, + agent: url => url.protocol === "http:" ? http.globalAgent : https.globalAgent, ...init }).catch(e => { // this.logger.warn(`fetch error: ${e} | cause=${e.cause}`) @@ -109,7 +112,6 @@ export class Client { // remove default user agent headers.append("user-agent", ua || "openstream-unknown") - headers.append("connection", "close") if (token) headers.append(ACCESS_TOKEN_HEADER, token); @@ -511,7 +513,6 @@ export class StationPictures { if (ip) headers.append(FORWARD_IP_HEADER, ip) if (ua) headers.append("user-agent", ua) - headers.append("connection", "close") headers.append(ACCESS_TOKEN_HEADER, token) headers.append("content-type", "application/octet-stream") @@ -627,7 +628,6 @@ export class StationFiles { if (ip) headers.append(FORWARD_IP_HEADER, ip) if (ua) headers.append("user-agent", ua) - headers.append("connection", "close") headers.append(ACCESS_TOKEN_HEADER, token) headers.append("content-type", content_type) headers.append("content-length", String(content_length)) From 7c2596dcc11ae858eb03f62ab36c12d3bd31170e Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:01:22 -0300 Subject: [PATCH 2/6] fix-fetch-change-to-node-20 --- .github/workflows/front-admin-build.yml | 2 +- .github/workflows/front-admin-typecheck.yml | 2 +- .github/workflows/front-server-build.yml | 2 +- .github/workflows/front-server-unit-tests.yml | 2 +- .github/workflows/front-studio-build.yml | 2 +- .github/workflows/front-studio-typecheck.yml | 2 +- .github/workflows/release.yml | 2 +- front/package.json | 2 +- front/packages/client/package-lock.json | 4 +- front/packages/client/src/index.ts | 12 +- front/server/package-lock.json | 157 ++++-------------- front/server/package.json | 2 +- scripts/src/release.mts | 2 +- 13 files changed, 49 insertions(+), 144 deletions(-) diff --git a/.github/workflows/front-admin-build.yml b/.github/workflows/front-admin-build.yml index 60d24046..1cfa49f9 100644 --- a/.github/workflows/front-admin-build.yml +++ b/.github/workflows/front-admin-build.yml @@ -39,7 +39,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/front-admin-typecheck.yml b/.github/workflows/front-admin-typecheck.yml index e4c05eaa..c019c575 100644 --- a/.github/workflows/front-admin-typecheck.yml +++ b/.github/workflows/front-admin-typecheck.yml @@ -39,7 +39,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/front-server-build.yml b/.github/workflows/front-server-build.yml index 253cdaa3..974efb2b 100644 --- a/.github/workflows/front-server-build.yml +++ b/.github/workflows/front-server-build.yml @@ -38,7 +38,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - name: Skip Duplicate Actions diff --git a/.github/workflows/front-server-unit-tests.yml b/.github/workflows/front-server-unit-tests.yml index 3486ff3a..e6642deb 100644 --- a/.github/workflows/front-server-unit-tests.yml +++ b/.github/workflows/front-server-unit-tests.yml @@ -39,7 +39,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/front-studio-build.yml b/.github/workflows/front-studio-build.yml index 37489d47..c1e0f88d 100644 --- a/.github/workflows/front-studio-build.yml +++ b/.github/workflows/front-studio-build.yml @@ -39,7 +39,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/front-studio-typecheck.yml b/.github/workflows/front-studio-typecheck.yml index dd6f37b4..373dbdf2 100644 --- a/.github/workflows/front-studio-typecheck.yml +++ b/.github/workflows/front-studio-typecheck.yml @@ -39,7 +39,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f87656ce..b0113da4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: diff --git a/front/package.json b/front/package.json index 24894d1e..5f7109ba 100644 --- a/front/package.json +++ b/front/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "install": "run-s install:share install:server install:admin install:app", + "install": "run-s install:client install:server install:admin install:app", "install:share": "cd share && npm i", "install:server": "cd server && npm i", "install:admin": "cd admin && npm i", diff --git a/front/packages/client/package-lock.json b/front/packages/client/package-lock.json index 809259f5..ea654584 100644 --- a/front/packages/client/package-lock.json +++ b/front/packages/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@openstream/client", - "version": "0.1.3", + "version": "0.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@openstream/client", - "version": "0.1.3", + "version": "0.3.3", "license": "GPL-3.0", "dependencies": { "http-status-codes": "^2.3.0", diff --git a/front/packages/client/src/index.ts b/front/packages/client/src/index.ts index 951ba520..cf2c6a55 100644 --- a/front/packages/client/src/index.ts +++ b/front/packages/client/src/index.ts @@ -7,12 +7,18 @@ import { ClientError, type ClientErrorCode } from "./error.js"; import node_fetch, { Headers } from "node-fetch"; import type { Response, RequestInit } from "node-fetch"; +import type { PublicErrorCode } from "./defs/error/PublicErrorCode.js"; + +export { ClientError, type ClientErrorCode }; + import http from "http"; import https from "https"; -import type { PublicErrorCode } from "./defs/error/PublicErrorCode.js"; +http.globalAgent = new http.Agent({ keepAlive: false, maxSockets: Infinity }); +https.globalAgent = new https.Agent({ keepAlive: false, maxSockets: Infinity }); -export { ClientError, type ClientErrorCode }; +const http_agent = new http.Agent({ keepAlive: false, maxSockets: Infinity }) +const https_agent = new https.Agent({ keepAlive: false, maxSockets: Infinity }) const qss = (v: any) => { return qs.stringify(v, { addQueryPrefix: true, skipNulls: true }) @@ -65,7 +71,7 @@ export class Client { const method = init.method ?? "GET"; // this.logger.debug(`fetch: ${method} ${url}`); return await this.node_fetch(url, { - agent: url => url.protocol === "http:" ? http.globalAgent : https.globalAgent, + agent: url => url.protocol === "http:" ? http_agent : https_agent, ...init }).catch(e => { // this.logger.warn(`fetch error: ${e} | cause=${e.cause}`) diff --git a/front/server/package-lock.json b/front/server/package-lock.json index 83f149ed..6213b88f 100644 --- a/front/server/package-lock.json +++ b/front/server/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@openstream/client": "^0.3.3", + "@openstream/client": "../packages/client", "accept-language-parser": "^1.5.0", "braintree": "^3.15.0", "commander": "^9.4.1", @@ -45,6 +45,20 @@ "../../packages/client": { "extraneous": true }, + "../packages/client": { + "version": "0.3.3", + "license": "GPL-3.0", + "dependencies": { + "http-status-codes": "^2.3.0", + "node-fetch": "^3.3.2", + "qs": "^6.11.2" + }, + "devDependencies": { + "@types/node": "^20.11.5", + "@types/qs": "^6.9.11", + "typescript": "^5.3.3" + } + }, "node_modules/@ava/typescript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-4.0.0.tgz", @@ -278,45 +292,8 @@ } }, "node_modules/@openstream/client": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@openstream/client/-/client-0.3.3.tgz", - "integrity": "sha512-klHFTPP7K6CEqRcU76b33EGWSLp3LaQNpasOkOsrm7KihNKLpMtK47u2Vh1bqe6cHXfEgNlOV+m7PhS+d7RVlw==", - "dependencies": { - "http-status-codes": "^2.3.0", - "node-fetch": "^3.3.2", - "qs": "^6.11.2" - } - }, - "node_modules/@openstream/client/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/@openstream/client/node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "resolved": "../packages/client", + "link": true }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -1498,14 +1475,6 @@ "node": ">=0.10.0" } }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "engines": { - "node": ">= 12" - } - }, "node_modules/date-time": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", @@ -1863,28 +1832,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, "node_modules/figures": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", @@ -1999,17 +1946,6 @@ "node": ">= 14" } }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -2933,6 +2869,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true, "funding": [ { "type": "github", @@ -4397,6 +4334,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "dev": true, "engines": { "node": ">= 8" } @@ -4704,33 +4642,14 @@ } }, "@openstream/client": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@openstream/client/-/client-0.3.3.tgz", - "integrity": "sha512-klHFTPP7K6CEqRcU76b33EGWSLp3LaQNpasOkOsrm7KihNKLpMtK47u2Vh1bqe6cHXfEgNlOV+m7PhS+d7RVlw==", + "version": "file:../packages/client", "requires": { + "@types/node": "^20.11.5", + "@types/qs": "^6.9.11", "http-status-codes": "^2.3.0", "node-fetch": "^3.3.2", - "qs": "^6.11.2" - }, - "dependencies": { - "node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "requires": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - } - }, - "qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "requires": { - "side-channel": "^1.0.4" - } - } + "qs": "^6.11.2", + "typescript": "^5.3.3" } }, "@tsconfig/node10": { @@ -5617,11 +5536,6 @@ "array-find-index": "^1.0.1" } }, - "data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" - }, "date-time": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", @@ -5891,15 +5805,6 @@ "reusify": "^1.0.4" } }, - "fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "requires": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - } - }, "figures": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", @@ -5985,14 +5890,6 @@ } } }, - "formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "requires": { - "fetch-blob": "^3.1.2" - } - }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -6637,7 +6534,8 @@ "node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true }, "node-fetch": { "version": "2.6.7", @@ -7636,7 +7534,8 @@ "web-streams-polyfill": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", - "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==" + "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "dev": true }, "well-known-symbols": { "version": "2.0.0", diff --git a/front/server/package.json b/front/server/package.json index c2282425..0b0493f3 100644 --- a/front/server/package.json +++ b/front/server/package.json @@ -16,7 +16,7 @@ "author": "", "license": "ISC", "dependencies": { - "@openstream/client": "^0.3.3", + "@openstream/client": "../packages/client", "accept-language-parser": "^1.5.0", "braintree": "^3.15.0", "commander": "^9.4.1", diff --git a/scripts/src/release.mts b/scripts/src/release.mts index 74f881a5..a6b607d5 100644 --- a/scripts/src/release.mts +++ b/scripts/src/release.mts @@ -36,7 +36,7 @@ await within(async () => { cd(frontdir.src); await $`FORCE_COLOR=1 npm run ci --color always`; - for(const dir of ["server", "app", "admin"]) { + for(const dir of ["packages/client", "server", "app", "admin"]) { await within(async () => { cd(dir); await $`FORCE_COLOR=1 npm run build --color always`; From c7f07d0a011c5d21693357545c88f43d9c6a1d35 Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:04:02 -0300 Subject: [PATCH 3/6] fix: install share script --- front/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/package.json b/front/package.json index 5f7109ba..afd5f2f5 100644 --- a/front/package.json +++ b/front/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "install": "run-s install:client install:server install:admin install:app", + "install": "run-s install:share install:client install:server install:admin install:app", "install:share": "cd share && npm i", "install:server": "cd server && npm i", "install:admin": "cd admin && npm i", From bc08974474ebdce41dda241ad5b8e39453b5c69a Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:14:31 -0300 Subject: [PATCH 4/6] core: build client before --- .github/workflows/front-admin-build.yml | 5 +++++ .github/workflows/front-server-build.yml | 5 +++++ .github/workflows/front-studio-build.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/front-admin-build.yml b/.github/workflows/front-admin-build.yml index 1cfa49f9..fdd3ca6e 100644 --- a/.github/workflows/front-admin-build.yml +++ b/.github/workflows/front-admin-build.yml @@ -47,6 +47,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm run ci working-directory: ./front + + - run: npm run build --if-present + working-directory: ./front/packages/client + - run: npm run build --if-present \ No newline at end of file diff --git a/.github/workflows/front-server-build.yml b/.github/workflows/front-server-build.yml index 974efb2b..a0319f21 100644 --- a/.github/workflows/front-server-build.yml +++ b/.github/workflows/front-server-build.yml @@ -48,6 +48,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm run ci working-directory: ./front + + - run: npm run build --if-present + working-directory: ./front/packages/client + - run: npm run build --if-present \ No newline at end of file diff --git a/.github/workflows/front-studio-build.yml b/.github/workflows/front-studio-build.yml index c1e0f88d..9ee15270 100644 --- a/.github/workflows/front-studio-build.yml +++ b/.github/workflows/front-studio-build.yml @@ -47,6 +47,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm run ci working-directory: ./front + + - run: npm run build --if-present + working-directory: ./front/packages/client + - run: npm run build --if-present \ No newline at end of file From bf03b1b7669b9652adba23e31309ef6fb3bf4ae0 Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:22:46 -0300 Subject: [PATCH 5/6] core: build client before workflows --- .github/workflows/front-admin-typecheck.yml | 5 +++++ .github/workflows/front-server-unit-tests.yml | 5 +++++ .github/workflows/front-studio-typecheck.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/front-admin-typecheck.yml b/.github/workflows/front-admin-typecheck.yml index c019c575..993921c1 100644 --- a/.github/workflows/front-admin-typecheck.yml +++ b/.github/workflows/front-admin-typecheck.yml @@ -47,6 +47,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm run ci working-directory: ./front + + - run: npm run build --if-present + working-directory: ./front/packages/client + - run: npm run check \ No newline at end of file diff --git a/.github/workflows/front-server-unit-tests.yml b/.github/workflows/front-server-unit-tests.yml index e6642deb..abc934bd 100644 --- a/.github/workflows/front-server-unit-tests.yml +++ b/.github/workflows/front-server-unit-tests.yml @@ -47,6 +47,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm run ci working-directory: ./front + + - run: npm run build --if-present + working-directory: ./front/packages/client + - run: npm test \ No newline at end of file diff --git a/.github/workflows/front-studio-typecheck.yml b/.github/workflows/front-studio-typecheck.yml index 373dbdf2..27a93645 100644 --- a/.github/workflows/front-studio-typecheck.yml +++ b/.github/workflows/front-studio-typecheck.yml @@ -47,6 +47,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm run ci working-directory: ./front + + - run: npm run build --if-present + working-directory: ./front/packages/client + - run: npm run check \ No newline at end of file From b40e952b92a074ca12ee476315ba09eab24ee0a9 Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:25:41 -0300 Subject: [PATCH 6/6] core: release script prune client --- scripts/src/release.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/src/release.mts b/scripts/src/release.mts index a6b607d5..60a6aafc 100644 --- a/scripts/src/release.mts +++ b/scripts/src/release.mts @@ -48,7 +48,7 @@ await $`mkdir -p ${tmpdir}`; await $`mkdir -p ${frontdir.target}`; await $`mkdir -p ${path.dirname(binfile.target)}`; -for(const dir of ["server", "app", "admin"]) { +for(const dir of ["packages/client", "server", "app", "admin"]) { await within(async () => { cd(`${frontdir.src}/${dir}`); await $`FORCE_COLOR=1 npm prune --omit=dev --ignore-scripts --color always`;