Skip to content

Commit

Permalink
chore: fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Jan 15, 2024
1 parent e9819e4 commit e59284b
Show file tree
Hide file tree
Showing 24 changed files with 367 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/base-build-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: npm i -g npm

- name: Install Dependencies
run: npm ci && npm run install:ci -- --scope="@restorecommerce/${{ inputs.package }}" --include-dependencies
run: npm ci

- name: Cache Nx
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/base-test-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
shutdown: ${{ inputs.shutdown }}

- name: Install Dependencies
run: npm ci && npm run install:ci -- --scope="@restorecommerce/${{ inputs.package }}" --include-dependencies
run: npm ci

- name: Cache Nx
uses: actions/cache@v2
Expand Down
429 changes: 339 additions & 90 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"devDependencies": {
"cz-conventional-changelog": "^3.3.0",
"lerna": "^8.0.2",
"nx": "^17.2.8"
"nx": "^17.2.8",
"eslint-plugin-unicorn": "^50.0.1",
"eslint-plugin-file-extension-in-import-ts": "^2.1.0"
},
"workspaces": [
"packages/*"
Expand Down
7 changes: 2 additions & 5 deletions packages/dev/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@
"ES2022",
"dom"
],
"module": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictNullChecks": true,
"target": "ES2022",
"typeRoots": [
"./node_modules/@types"
]
"target": "ES2022"
},
"ts-node": {
"transpileOnly": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/facade/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export class RestoreCommerceFacade<TModules extends FacadeModuleBase[] = []> imp
const apolloGraphQLRouter = new Router();
apolloGraphQLRouter.use(bodyParser({ jsonLimit: this.jsonLimit }));
apolloGraphQLRouter.all('/graphql',
koaMiddleware(gqlServer, {
koaMiddleware(gqlServer as any, {
context: async ({ ctx }) => ctx,
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> =
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' |
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string | number; output: string; }
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down
2 changes: 1 addition & 1 deletion packages/facade/src_codegen/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import * as fs from 'node:fs';
import * as fs from 'fs';
import * as typescriptPlugin from '@graphql-codegen/typescript';
import * as typescriptResolversPlugin from '@graphql-codegen/typescript-resolvers';
import { codegen } from '@graphql-codegen/core';
Expand Down
2 changes: 1 addition & 1 deletion packages/facade/tsconfig-base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./node_modules/@restorecommerce/dev/tsconfig.json",
"extends": "../../node_modules/@restorecommerce/dev/tsconfig.json",
"compilerOptions": {
"paths": {
"@modules": ["src/modules/index"],
Expand Down
4 changes: 2 additions & 2 deletions packages/gql-bot/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class Client {

const apolloLinkOpts: HttpLink.Options = {
uri: normalUrl,
fetch
fetch: fetch as any
};

if (this.opts.headers) {
Expand All @@ -198,7 +198,7 @@ export class Client {
});

const response = await apolloClient.mutate({
mutation: gql`${mutation}`,
mutation: gql`${mutation}` as any,
variables
});

Expand Down
4 changes: 2 additions & 2 deletions packages/rc-grpc-clients/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"build:compile": "tsc -p tsconfig.lib.json",
"prepublishOnly": "npm run build",
"generate": "npm run generate:client && npm run generate:server",
"generate:client": "protoc --experimental_allow_proto3_optional --ts_proto_opt=stringEnums=true,outputClientImpl=false,env=node,useOptionals=all,initializeFieldsAsUndefined=false,outputJsonMethods=true,outputSchema=true,useExactTypes=false,outputServices=nice-grpc,outputServices=generic-definitions --proto_path=../protos --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./src/generated ../protos/io/restorecommerce/*.proto ../protos/grpc/health/v1/*.proto ../protos/grpc/reflection/v1alpha/*.proto ../protos/test/*.proto ../protos/echo/*.proto ../protos/google/**/*.proto",
"generate:server": "protoc --experimental_allow_proto3_optional --ts_proto_opt=stringEnums=true,outputClientImpl=false,env=node,useOptionals=all,initializeFieldsAsUndefined=false,outputJsonMethods=true,outputSchema=true,useExactTypes=false,outputServices=nice-grpc,outputServices=generic-definitions,snakeToCamel=false --proto_path=../protos --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./src/generated-server ../protos/io/restorecommerce/*.proto ../protos/grpc/health/v1/*.proto ../protos/grpc/reflection/v1alpha/*.proto ../protos/test/*.proto ../protos/echo/*.proto ../protos/google/**/*.proto",
"generate:client": "protoc --experimental_allow_proto3_optional --ts_proto_opt=stringEnums=true,outputClientImpl=false,env=node,useOptionals=all,initializeFieldsAsUndefined=false,outputJsonMethods=true,outputSchema=true,useExactTypes=false,outputServices=nice-grpc,outputServices=generic-definitions --proto_path=../protos --plugin=../../node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./src/generated ../protos/io/restorecommerce/*.proto ../protos/grpc/health/v1/*.proto ../protos/grpc/reflection/v1alpha/*.proto ../protos/test/*.proto ../protos/echo/*.proto ../protos/google/**/*.proto",
"generate:server": "protoc --experimental_allow_proto3_optional --ts_proto_opt=stringEnums=true,outputClientImpl=false,env=node,useOptionals=all,initializeFieldsAsUndefined=false,outputJsonMethods=true,outputSchema=true,useExactTypes=false,outputServices=nice-grpc,outputServices=generic-definitions,snakeToCamel=false --proto_path=../protos --plugin=../../node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./src/generated-server ../protos/io/restorecommerce/*.proto ../protos/grpc/health/v1/*.proto ../protos/grpc/reflection/v1alpha/*.proto ../protos/test/*.proto ../protos/echo/*.proto ../protos/google/**/*.proto",
"test": "jest",
"pretest": "run-s prebuild"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/rc-grpc-clients/tsconfig-base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./node_modules/@restorecommerce/dev/tsconfig.json",
"extends": "../../node_modules/@restorecommerce/dev/tsconfig.json",
"compilerOptions": {
"typeRoots": [
"./node_modules/@types"
Expand Down

0 comments on commit e59284b

Please sign in to comment.