Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
pozylon committed Nov 22, 2024
1 parent d5ebf55 commit 5f857ae
Show file tree
Hide file tree
Showing 182 changed files with 1,195 additions and 1,280 deletions.
2 changes: 1 addition & 1 deletion clean-packages.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rm -Rf node_modules
rm -Rf packages/*/node_modules && rm -Rf examples/*/node_modules
rm -Rf packages/*/lib && rm -Rf examples/kitchensink/lib
rm -Rf packages/*/tsconfig.tsbuildinfo
4 changes: 2 additions & 2 deletions docs/docs/advanced/write-plugins/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Below is a simple filter plugin that will filter products based on there attribu

```typescript

import type { IFilterAdapter, FilterAdapterActions, FilterContext } from '@unchainedshop/core-filters';
import { IFilterAdapter, FilterAdapterActions, FilterContext } from '@unchainedshop/core-filters';
import { Context } from '@unchainedshop/api';

const ShopAttributeFilter: IFilterAdapter = {
Expand Down Expand Up @@ -156,7 +156,7 @@ Incase you only want to change implementation of only few functions and keep the
Below is a simplified implementation of the `ShopAttributeFilter` above, this time it will use the default implantation and override `transformProductSelector` function only.

```typescript
import type { IFilterAdapter, FilterAdapterActions, FilterContext } from '@unchainedshop/core-filters';
import { IFilterAdapter, FilterAdapterActions, FilterContext } from '@unchainedshop/core-filters';
import { Context } from '@unchainedshop/api';

const ShopAttributeFilter: IFilterAdapter = {
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/advanced/write-plugins/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Below is an example implementation of `Pre-Paid INVOICE` payment provider type t

```typescript

import type { IPaymentAdapter } from '@unchainedshop/core-payment';
import { IPaymentAdapter } from '@unchainedshop/core-payment';
import {
PaymentDirector,
PaymentAdapter,
Expand Down
8 changes: 4 additions & 4 deletions examples/kitchensink/boot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import http from 'http';
import { useExecutionCancellation } from 'graphql-yoga';
import { useResponseCache } from '@graphql-yoga/plugin-response-cache';
import { startPlatform, setAccessToken } from '@unchainedshop/platform';
import { connect } from '@unchainedshop/api/express/index.js';
import { connect } from '@unchainedshop/api/lib/express/index.js';
import { defaultModules, connectDefaultPluginsToExpress4 } from '@unchainedshop/plugins';
import { log } from '@unchainedshop/logger';
import setupTicketing, { ticketingModules } from '@unchainedshop/ticketing';
import { TicketingAPI } from '@unchainedshop/ticketing';

import serveStatic from 'serve-static';
import '@unchainedshop/plugins/pricing/discount-half-price-manual.js';
import '@unchainedshop/plugins/pricing/discount-100-off.js';
import '@unchainedshop/plugins/lib/pricing/discount-half-price-manual.js';
import '@unchainedshop/plugins/lib/pricing/discount-100-off.js';

import seed from './seed.js';
import ticketingServices from '@unchainedshop/ticketing/services.js';
import ticketingServices from '@unchainedshop/ticketing/lib/services.js';
import cookie from 'cookie';

const { UNCHAINED_COOKIE_NAME = 'unchained_token' } = process.env;
Expand Down
12 changes: 6 additions & 6 deletions examples/kitchensink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
},
"scripts": {
"lint": "prettier -w .",
"clean": "rm -rf lib",
"build": "npm run clean && tsc",
"clean": "tsc -b --clean",
"build": "tsc -b",
"start": "node lib/boot.js",
"dev:run": "node --experimental-fetch --no-warnings --loader ts-node/esm boot.ts",
"dev": "nodemon --delay 2500ms --watch '../../packages' --watch '.' -i lib -e js,mjs,json,ts --exec \"npm run dev:run\""
},
"dependencies": {
"@graphql-yoga/plugin-response-cache": "^3.10.0",
"@graphql-yoga/plugin-response-cache": "^3.12.3",
"@paypal/checkout-server-sdk": "^1.0.3",
"@unchainedshop/api": "^3.0.0-alpha4",
"@unchainedshop/core-delivery": "^3.0.0-alpha4",
Expand All @@ -58,14 +58,14 @@
"passport-strategy": "^1.0.0",
"postfinancecheckout": "^4.5.0",
"serve-static": "^1.15.0",
"stripe": "^17.3.1",
"stripe": "^17.4.0",
"tiny-secp256k1": "^2.2.3",
"twilio": "^5.3.5",
"twilio": "^5.3.6",
"web-push": "^3.6.7",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/node": "^22.9.1",
"mongodb-memory-server": "^10.0.0",
"nodemon": "^3.1.7",
"prettier": "^3.3.3",
Expand Down
5 changes: 2 additions & 3 deletions examples/kitchensink/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
"lib": ["esnext"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "lib",
"outDir": "./lib",
"preserveWatchOutput": true,
"skipLibCheck": true,
"sourceMap": true,
"target": "esnext",
"baseUrl": "." // This must be specified if "paths" is.
},
"include": ["./*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules", "lib"]
}
4 changes: 2 additions & 2 deletions examples/minimal/boot.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { startPlatform, setAccessToken } from '@unchainedshop/platform';
import baseModules from '@unchainedshop/plugins/presets/base-modules.js';
import baseModules from '@unchainedshop/plugins/lib/presets/base-modules.js';
// import connectBasePluginsToExpress from '@unchainedshop/plugins/presets/base-express.js';
import { connect } from '@unchainedshop/api/fastify/index.js';
import { connect } from '@unchainedshop/api/lib/fastify/index.js';
import { log } from '@unchainedshop/logger';
import seed from './seed.js';
import Fastify from 'fastify';
Expand Down
6 changes: 3 additions & 3 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"scripts": {
"lint": "prettier -w .",
"clean": "rm -rf lib",
"build": "npm run clean && tsc",
"clean": "tsc -b --clean",
"build": "tsc -b",
"start": "node --env-file .env.defaults lib/boot.js",
"dev:run": "node --env-file .env.defaults --no-warnings --loader ts-node/esm boot.ts",
"dev": "nodemon --env-file .env.defaults --delay 2500ms --watch '../../packages' --watch '.' -i lib -e js,mjs,json,ts --exec \"npm run dev:run\""
Expand All @@ -41,7 +41,7 @@
"fastify": "^5.1.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/node": "^22.9.1",
"mongodb-memory-server": "^10.0.0",
"nodemon": "^3.1.7",
"prettier": "^3.3.3",
Expand Down
5 changes: 2 additions & 3 deletions examples/minimal/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
"lib": ["esnext"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "lib",
"outDir": "./lib",
"preserveWatchOutput": true,
"skipLibCheck": true,
"sourceMap": true,
"target": "esnext",
"baseUrl": "." // This must be specified if "paths" is.
},
"include": ["./*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules", "lib"]
}
Loading

0 comments on commit 5f857ae

Please sign in to comment.