Skip to content

Commit

Permalink
Updated build dependencies of common and server
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyBoo6 committed Nov 25, 2023
1 parent 7134ad9 commit 7bae667
Show file tree
Hide file tree
Showing 63 changed files with 3,605 additions and 2,693 deletions.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Test removeActor call
* Test express error handling
34 changes: 34 additions & 0 deletions common/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ['./tsconfig.json'],
},
ignorePatterns: ["node_modules/**/*", "build/**/*", "dist/**/*"],
rules: {
"import/order": [
"error",
{ alphabetize: { caseInsensitive: true, order: "asc" } },
],
"import/no-unresolved": "off",
"sort-imports": [
"error",
{
ignoreCase: true,
ignoreDeclarationSort: true,
allowSeparatedGroups: true,
},
],
"prettier/prettier": "warn",
},
};

42 changes: 0 additions & 42 deletions common/.eslintrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions common/.prettierrc

This file was deleted.

5 changes: 5 additions & 0 deletions common/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 2,
"printWidth": 120,
"singleQuote": true
}
23 changes: 11 additions & 12 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
"license": "MIT",
"scripts": {
"build": "tsc -p .",
"lint": "./node_modules/@luvies/config/scripts/lint.sh",
"fix": "./node_modules/@luvies/config/scripts/lint.sh fix"
"lint": "eslint --ext .ts ./src",
"fix": "eslint --fix --ext .ts ./src"
},
"devDependencies": {
"@luvies/config": "^3.1.3",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"eslint": "7.7.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-prettier": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"prettier": "^1.18.2",
"tslib": "^1.10.0",
"typescript": "^3.5.3"
"prettier": "^3.1.0",
"tslib": "^2.6.2",
"typescript": "^5.3.2"
}
}
4 changes: 2 additions & 2 deletions common/src/bulk.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UpdateMedia } from "./media";
import { SubsetConstraints } from "./search";
import { UpdateMedia } from './media';
import { SubsetConstraints } from './search';

export interface BulkUpdate {
constraints: SubsetConstraints;
Expand Down
2 changes: 1 addition & 1 deletion common/src/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export namespace Configuration {
}

export interface Mongo {
provider: "mongodb";
provider: 'mongodb';
uri: string;
db: string;
}
Expand Down
2 changes: 1 addition & 1 deletion common/src/media.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface Metadata extends MetadataBase {
height: number;
}

export type MediaType = "still" | "gif" | "video";
export type MediaType = 'still' | 'gif' | 'video';

export interface MediaPlaylist {
id: string;
Expand Down
9 changes: 1 addition & 8 deletions common/src/search.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,7 @@ export interface SubsetConstraints {
keywordSearch?: string;
// Object ID, if set can sort by order.
playlist?: string;
sortBy?:
| "hashDate"
| "recommended"
| "rating"
| "length"
| "createdAt"
| "path"
| "order";
sortBy?: 'hashDate' | 'recommended' | 'rating' | 'length' | 'createdAt' | 'path' | 'order';
// Checks that metadata exists
indexed?: boolean;
// Checks that metadata.qualityCache.0 exists or type != video
Expand Down
8 changes: 3 additions & 5 deletions common/src/task.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ export interface TaskArgDefinitionBase {
}

export interface TaskArgDefinitionString extends TaskArgDefinitionBase {
type: "string";
type: 'string';
}

export interface TaskArgDefinitionSelect extends TaskArgDefinitionBase {
type: "select";
type: 'select';
values: Array<{ id: string; name: string }>;
}

export type TaskArgDefinition =
| TaskArgDefinitionString
| TaskArgDefinitionSelect;
export type TaskArgDefinition = TaskArgDefinitionString | TaskArgDefinitionSelect;
export type TaskArgDefinitions = TaskArgDefinition[];
export type TaskArg = string;
export type TaskArgs = Array<TaskArg | undefined>;
Expand Down
40 changes: 34 additions & 6 deletions common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
{
"extends": "@luvies/config/tsconfig.base.json",
"exclude": [
"./node_modules/",
"./dist/"
],
"compilerOptions": {
"outDir": "./dist",
"module": "commonjs",
"rootDir": "src",
"outDir": "dist",
"target": "es2018",
"declaration": false,
"declarationMap": false,

"target": "es2022",
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,

"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"useUnknownInCatchVariables": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": false,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": false,

"skipDefaultLibCheck": true,
"skipLibCheck": true,
"importHelpers": false
},
"include": ["src/*.d.ts"]
}
}
Loading

0 comments on commit 7bae667

Please sign in to comment.