Skip to content

Commit

Permalink
[MS-670] feat: Deployment improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrgrundas committed Oct 21, 2024
1 parent 64bc5bf commit af7412e
Show file tree
Hide file tree
Showing 21 changed files with 1,550 additions and 89 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ module.exports = defineConfig({
"import/no-default-export": "off",
"import/no-anonymous-default-export": "off",
},
files: ["**/plugins/**/*.ts", "**/emails/**/*.tsx", "*.config.*"],
files: [
"**/plugins/**/*.ts",
"**/emails/**/*.tsx",
"*.config.*",
"codegen.*",
],
},
],
});
25 changes: 25 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"git": {
"commitMessage": "chore(release): v${version}",
"push": true,
"commit": true,
"tag": true,
"requireCommits": false,
"requireCleanWorkingDir": false
},
"github": {
"release": false,
"draft": false,
"releaseName": "${version}"
},
"npm": {
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md",
"header": "# Changelog"
}
}
}
7 changes: 5 additions & 2 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as process from "node:process";

import { type CodegenConfig } from "@graphql-codegen/cli";
import { type IGraphQLConfig } from "graphql-config";
import invariant from "ts-invariant";

import { invariant } from "./src/lib/invariant";

export const baseCodegenConfig: CodegenConfig["config"] = {
avoidOptionals: {
Expand Down Expand Up @@ -49,6 +50,8 @@ const addContent = [

invariant(process.env.SALEOR_URL, "SALEOR_URL not set.");

const schemaUrl = new URL(process.env.SALEOR_URL).origin;

const config: IGraphQLConfig = {
projects: {
default: {
Expand Down Expand Up @@ -89,7 +92,7 @@ const config: IGraphQLConfig = {
overwrite: true,
},
},
schema: `${process.env.SALEOR_URL}/graphql/`,
schema: `${schemaUrl}/graphql/`,
},
},
};
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"tailwind-merge": "^2.5.4",
"tailwindcss": "^3.4.14",
"traverse": "^0.6.10",
"ts-invariant": "^0.10.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.6.3",
"vite": "^5.4.9",
Expand All @@ -93,6 +92,7 @@
"@graphql-codegen/typescript": "^4.1.0",
"@graphql-codegen/typescript-operations": "^4.3.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@release-it/conventional-changelog": "^9.0.1",
"@types/aws-lambda": "^8.10.145",
"@types/graphql": "^14.5.0",
"@types/jsonwebtoken": "^9.0.7",
Expand Down Expand Up @@ -120,6 +120,7 @@
"lint-staged": "^15.2.10",
"nodemon": "^3.1.7",
"prettier": "^3.3.3",
"release-it": "^17.10.0",
"sqs-consumer": "^11.1.0",
"ts-essentials": "^10.0.2",
"typescript-eslint": "^7.18.0",
Expand Down
Loading

0 comments on commit af7412e

Please sign in to comment.