Skip to content

Commit

Permalink
refactor: rename server bin to src
Browse files Browse the repository at this point in the history
  • Loading branch information
mytlogos committed Dec 16, 2021
1 parent 4775a36 commit 09f4175
Show file tree
Hide file tree
Showing 40 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ typings/
### Example user template

# IntelliJ project filessrc/
packages/server/bin/externals/direct/webnovelTocResponse 04.19.json
packages/server/bin/externals/direct/wwSearchResponse.json
packages/server/src/externals/direct/webnovelTocResponse 04.19.json
packages/server/src/externals/direct/wwSearchResponse.json
packages/**/*.vue.js
packages/**/*.vue.js.map
*.bat
*.gz
*.json
packages/server/bin/ignore/
packages/server/src/ignore/
dist/

# vscode project files
Expand All @@ -113,9 +113,9 @@ checkReleases.*
*.html
*.xml

packages/server/bin/misc/fixJobs.ts
packages/server/bin/validateMiddleware.ts
packages/server/bin/database/schema.ts
packages/server/bin/misc/openapi/validateMiddleware.ts
packages/server/bin/misc/openapi/webclient.ts
packages/server/src/misc/fixJobs.ts
packages/server/src/validateMiddleware.ts
packages/server/src/database/schema.ts
packages/server/src/misc/openapi/validateMiddleware.ts
packages/server/src/misc/openapi/webclient.ts
tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
// A list of paths to directories that Jest should use to search for files in
roots: [
"packages/core/src/test/",
//"packages/server/bin/test/", // TODO: requires test files
//"packages/server/src/test/", // TODO: requires test files
"packages/scraper/src/test/",
// "packages/website/src/test/", // TODO: requires test files
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "npm run lint:server && npm run lint:website",
"commit": "npx git-cz",
"generate:api": "node dist/server/misc/openapi/generate.js",
"lint:server": "eslint -c packages/server/.eslintrc.js packages/server/bin/",
"lint:server": "eslint -c packages/server/.eslintrc.js packages/server/src/",
"lint:website": "eslint packages/website/",
"lintfix": "eslint --fix 'packages/**/*.{js,ts,vue}'",
"migrate": "node dist/server/misc/migrate.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "tsc -p ./",
"lint": "eslint -c ./.eslintrc.js bin/",
"lint": "eslint -c ./.eslintrc.js src/",
"start": "node ./dist/startServer.js",
"test": " LOG_LEVEL=error jest",
"migrate": "node ../dist/misc/migrate.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function main() {
// @ts-expect-error
GenerateOpenApi(argv.middleware);
} else {
GenerateOpenApi("./packages/server/bin/api.ts");
GenerateOpenApi("./packages/server/src/api.ts");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function resolveReference(root: OpenApiObject, reference: ReferenceObject

export async function generateWebClient(data: Readonly<OpenApiObject>, target?: string): Promise<void> {
const rootDir = findAbsoluteProjectDirPath(__dirname);
const templateDir = join(rootDir, "src", "server", "bin", "misc", "openapi");
const templateDir = join(rootDir, "src", "server", "src", "misc", "openapi");

if (!target) {
target = join(templateDir, "webclient.ts");
Expand Down Expand Up @@ -372,8 +372,8 @@ class TSRequestValidatorGenerator extends TSTemplateGenerator {
public constructor(data: Readonly<OpenApiObject>) {
super(
data,
"./packages/server/bin/misc/openapi/validateMiddleware.ts.handlebars",
"./packages/server/bin/misc/openapi/validateMiddleware.ts",
"./packages/server/src/misc/openapi/validateMiddleware.ts.handlebars",
"./packages/server/src/misc/openapi/validateMiddleware.ts",
);
this.addHandler();
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"outDir": "./dist/",
"paths": {
"@/*": [
"./bin/*"
"./src/*"
]
},
"types": [
Expand All @@ -29,8 +29,8 @@
"node_modules"
],
"include": [
"./bin/**/*.ts",
"./bin/**/*.js"
"./src/**/*.ts",
"./src/**/*.js"
// "tests/**/*.ts",
// "tests/**/*.tsx"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/Httpclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
JobHistoryItem,
} from "./siteTypes";
import { AddPart, AppEvent, AppEventFilter, EmptyPromise, JobStatSummary } from "enterprise-core/src/types";
import { HookTest } from "enterprise-server/bin/types";
import { HookTest } from "enterprise-server/src/types";
import { CustomHook } from "enterprise-core/dist/types";

/**
Expand Down

0 comments on commit 09f4175

Please sign in to comment.