Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
typeofweb committed Aug 23, 2023
1 parent 2aa7121 commit d7d8917
Show file tree
Hide file tree
Showing 42 changed files with 10,354 additions and 7,092 deletions.
2 changes: 1 addition & 1 deletion .graphqlrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
schema: graphql/schema.graphql
documents: [graphql/**/*.graphql, src/**/*.ts, src/**/*.tsx]
documents: [graphql/**/*.graphql, src/migrations/**/*.graphql, src/**/*.ts, src/**/*.tsx]
extensions:
codegen:
overwrite: true
Expand Down
9 changes: 4 additions & 5 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// https://nextjs.org/docs/basic-features/eslint#lint-staged

const path = require("path");
import path from "path";

const buildEslintCommand = (filenames) =>
`next lint --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(" --file ")}`;

module.exports = {
"*.{js,mjs,jsx,ts,tsx}": [buildEslintCommand],
"*.{js,mjs,ts,tsx,css,md,json,yml,yaml,json}": "prettier --write",
"graphql/**/*.graphql": "prettier --write",
export default {
"*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}": [buildEslintCommand],
"*.*": "prettier --write --ignore-unknown",
};
1 change: 0 additions & 1 deletion .prototools

This file was deleted.

File renamed without changes.
8 changes: 8 additions & 0 deletions graphql/fragments/OrderOrCheckoutLines.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
fragment OrderOrCheckoutLines on OrderOrCheckout {
__typename
... on Checkout {
channel {
id
slug
}
shippingPrice {
gross {
...Money
Expand Down Expand Up @@ -50,6 +54,10 @@ fragment OrderOrCheckoutLines on OrderOrCheckout {
}
}
... on Order {
channel {
id
slug
}
shippingPrice {
gross {
...Money
Expand Down
8 changes: 8 additions & 0 deletions graphql/fragments/OrderOrCheckoutSourceObject.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ fragment OrderOrCheckoutSourceObject on OrderOrCheckout {
... on Checkout {
id
languageCode
channel {
id
slug
}
userEmail: email
billingAddress {
...TransactionInitializeSessionAddress
Expand All @@ -21,6 +25,10 @@ fragment OrderOrCheckoutSourceObject on OrderOrCheckout {
id
languageCodeEnum
userEmail
channel {
id
slug
}
billingAddress {
...TransactionInitializeSessionAddress
}
Expand Down
13 changes: 13 additions & 0 deletions graphql/fragments/PaymentGatewayInitializeSessionEvent.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ fragment PaymentGatewayInitializeSessionEvent on PaymentGatewayInitializeSession
}
data
amount
issuingPrincipal {
... on Node {
id
}
}
sourceObject {
__typename
... on Checkout {
id
channel {
id
slug
}
languageCode
billingAddress {
...PaymentGatewayInitializeSessionAddress
Expand All @@ -21,6 +30,10 @@ fragment PaymentGatewayInitializeSessionEvent on PaymentGatewayInitializeSession
}
... on Order {
id
channel {
id
slug
}
languageCodeEnum
userEmail
billingAddress {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ fragment TransactionCancelationRequestedEvent on TransactionCancelationRequested
transaction {
id
pspReference
sourceObject: order {
channel {
id
slug
}
}
}
}
5 changes: 5 additions & 0 deletions graphql/fragments/TransactionInitializeSessionEvent.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ fragment TransactionInitializeSessionEvent on TransactionInitializeSession {
currency
actionType
}
issuingPrincipal {
... on Node {
id
}
}
transaction {
id
}
Expand Down
3 changes: 3 additions & 0 deletions graphql/queries/FetchAppDetails.graphql
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
query FetchAppDetails {
shop {
schemaVersion
}
app {
id
privateMetadata {
Expand Down
125 changes: 64 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"url": "https://github.com/saleor/saleor-app-payment-template/issues",
"email": "[email protected]"
},
"type": "module",
"scripts": {
"dev": "pnpm generate && next dev",
"build": "pnpm generate && next build",
"deploy": "tsx ./src/deploy.ts",
"start": "next start",
"fetch-schema": "curl https://raw.githubusercontent.com/saleor/saleor/${npm_package_saleor_schemaVersion}/saleor/graphql/schema.graphql > graphql/schema.graphql",
"generate": "pnpm generate:graphql && pnpm generate:schema",
Expand All @@ -23,119 +25,120 @@
"test": "vitest",
"test:record": "POLLY_MODE=record_missing vitest",
"test:rerecord": "POLLY_MODE=record vitest",
"test:ci": "CI=true vitest --coverage --reporter=json --reporter=default && ./fix-coverage-report.js",
"test:ci": "CI=true vitest --coverage --reporter=json --reporter=default && ./fix-coverage-report.cjs",
"migrate": "pnpm tsx ./src/run-migrations.ts",
"ts-node-esm": "node --loader ts-node/esm --experimental-specifier-resolution=node",
"prepare": "husky install"
"prepare": "husky install",
"github:release": "pnpm changeset tag && git push --follow-tags"
},
"saleor": {
"schemaVersion": "3.13"
},
"dependencies": {
"@hookform/resolvers": "3.1.0",
"@hookform/resolvers": "3.3.0",
"@next/env": "13.4.19",
"@radix-ui/react-alert-dialog": "1.0.4",
"@saleor/app-sdk": "0.39.1",
"@saleor/macaw-ui": "0.8.0-pre.91",
"@sentry/nextjs": "7.53.1",
"@t3-oss/env-nextjs": "0.4.0",
"@tanstack/react-query": "4.29.12",
"@trpc/client": "10.30.0",
"@trpc/next": "10.30.0",
"@trpc/react-query": "10.30.0",
"@trpc/server": "10.30.0",
"@saleor/app-sdk": "0.43.0",
"@saleor/macaw-ui": "0.8.0-pre.123",
"@sentry/nextjs": "7.64.0",
"@t3-oss/env-nextjs": "0.6.1",
"@tanstack/react-query": "4.33.0",
"@trpc/client": "10.37.1",
"@trpc/next": "10.37.1",
"@trpc/react-query": "10.37.1",
"@trpc/server": "10.37.1",
"@urql/exchange-auth": "1.0.0",
"@vanilla-extract/css": "1.11.0",
"@vanilla-extract/next-plugin": "2.1.2",
"@vanilla-extract/recipes": "0.4.0",
"@vitejs/plugin-react": "4.0.0",
"@vitest/coverage-c8": "0.31.1",
"@vanilla-extract/css": "1.13.0",
"@vanilla-extract/next-plugin": "2.3.0",
"@vanilla-extract/recipes": "0.5.0",
"@vitejs/plugin-react": "4.0.4",
"ajv": "8.12.0",
"ajv-formats": "2.1.1",
"bluebird": "3.7.2",
"classnames": "2.3.2",
"eslint-plugin-node": "11.1.0",
"graphql": "16.6.0",
"graphql": "16.8.0",
"graphql-tag": "2.12.6",
"jose": "4.14.4",
"jsdom": "22.1.0",
"lodash-es": "4.17.21",
"modern-errors": "6.0.0",
"modern-errors-http": "4.0.0",
"modern-errors-serialize": "5.0.0",
"next": "13.4.4",
"next": "13.4.19",
"omit-deep-lodash": "1.1.7",
"pino": "8.14.1",
"pino-pretty": "10.0.0",
"pino": "8.15.0",
"pino-pretty": "10.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.44.2",
"react-hook-form": "7.45.4",
"semver": "7.5.4",
"tsx": "3.12.7",
"url-join": "5.0.0",
"urql": "3.0.4",
"uuidv7": "0.4.3",
"vite": "4.3.9",
"vitest": "0.31.1",
"webpack": "5.84.1",
"uuidv7": "0.6.2",
"vite": "4.4.9",
"vitest": "0.34.2",
"webpack": "5.88.2",
"yup": "1.2.0",
"zod": "3.21.4",
"zustand": "4.3.8"
"zod": "3.22.2",
"zustand": "4.4.1"
},
"devDependencies": {
"@graphql-codegen/add": "5.0.0",
"@graphql-codegen/cli": "4.0.0",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/introspection": "4.0.0",
"@graphql-codegen/typed-document-node": "5.0.0",
"@graphql-codegen/typescript": "4.0.0",
"@graphql-codegen/typescript-operations": "4.0.0",
"@graphql-codegen/typed-document-node": "5.0.1",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-operations": "4.0.1",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-codegen/urql-introspection": "2.2.1",
"@graphql-typed-document-node/core": "3.2.0",
"@next/env": "13.4.4",
"@pollyjs/adapter-fetch": "6.0.5",
"@pollyjs/adapter-node-http": "6.0.5",
"@pollyjs/core": "6.0.5",
"@pollyjs/persister-fs": "6.0.5",
"@pollyjs/adapter-fetch": "6.0.6",
"@pollyjs/adapter-node-http": "6.0.6",
"@pollyjs/core": "6.0.6",
"@pollyjs/persister-fs": "6.0.6",
"@saleor/eslint-plugin-saleor-app": "0.1.2",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/jest-dom": "6.1.1",
"@testing-library/react": "14.0.0",
"@testing-library/react-hooks": "8.0.1",
"@types/bluebird": "3.5.38",
"@types/lodash-es": "4.17.7",
"@types/node": "20.2.5",
"@types/lodash-es": "4.17.8",
"@types/node": "20.5.4",
"@types/omit-deep-lodash": "1.1.1",
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@types/semver": "7.5.0",
"@types/setup-polly-jest": "0.5.2",
"@types/testing-library__jest-dom": "5.14.6",
"@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.59.8",
"@vanilla-extract/vite-plugin": "3.8.2",
"dependency-cruiser": "13.0.2",
"eslint": "8.41.0",
"eslint-config-next": "13.4.4",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"@typescript-eslint/eslint-plugin": "6.4.1",
"@typescript-eslint/parser": "6.4.1",
"@vanilla-extract/vite-plugin": "3.9.0",
"@vitest/coverage-v8": "0.34.2",
"dependency-cruiser": "13.1.4",
"eslint": "8.47.0",
"eslint-config-next": "13.4.19",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-require-form-method": "1.0.2",
"eslint-plugin-testing-library": "5.11.0",
"eslint-plugin-vitest": "0.2.5",
"eslint-plugin-testing-library": "6.0.0",
"eslint-plugin-vitest": "0.2.8",
"husky": "8.0.3",
"json-schema-to-typescript": "13.0.1",
"lint-staged": "13.2.2",
"json-schema-to-typescript": "13.0.2",
"lint-staged": "14.0.1",
"next-test-api-route-handler": "3.1.8",
"prettier": "2.8.8",
"prettier": "3.0.2",
"setup-polly-jest": "0.11.0",
"ts-node": "10.9.1",
"typescript": "5.0.4",
"typescript": "5.1.6",
"vite-tsconfig-paths": "4.2.0"
},
"engines": {
"npm": ">=8.0.0 <10.0.0",
"node": ">=18.0.0 <19.0.0",
"pnpm": ">=8.0.0 <9.0.0"
},
"packageManager": "[email protected].0",
"packageManager": "[email protected].10",
"pnpm": {
"patchedDependencies": {
"@types/[email protected]": "patches/@[email protected]"
},
"overrides": {
"@urql/exchange-auth>@urql/core": "3.2.2"
}
Expand Down
13 changes: 0 additions & 13 deletions patches/@[email protected]

This file was deleted.

Loading

0 comments on commit d7d8917

Please sign in to comment.