Skip to content

Commit

Permalink
♻️ refactor(packages): remove old packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thrownullexception committed Nov 17, 2023
1 parent ad53a87 commit 5ac607d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 76 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,6 @@ DashPress is provided **"as is"** without any **warranty**.

_For more information and to report security issues, please refer to our [security documentation](docs/SECURITY.md)._

## Built With
- [KnexJS](https://github.com/knex/knex)
- [React](https://github.com/facebook/react)
- [NextJS](https://github.com/vercel/next.js)
- [Typescript](https://github.com/microsoft/TypeScript)
- [React Query](https://github.com/TanStack/query)
- [React Table](https://github.com/TanStack/table)
- [React Final Form](https://github.com/final-form/react-final-form)
- [Styled-components](https://github.com/styled-components/styled-components)
- [Class Validator](https://github.com/typestack/class-validator)
- [Zustand](https://github.com/pmndrs/zustand)

## License

This project is licensed under the **GNU Affero General Public License v3.0**.
Expand Down
12 changes: 0 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@types/react": "^18.0.11",
"@types/react-datepicker": "^4.4.1",
"@types/styled-components": "^5.1.25",
"@types/uuid": "^8.3.4",
"axios": "^1.2.1",
"bcrypt": "^5.0.1",
"change-case": "^4.1.2",
Expand Down Expand Up @@ -97,7 +96,6 @@
"styled-components": "^5.3.6",
"terminal-link": "^3.0.0",
"tiny-skeleton-loader-react": "^1.2.1",
"uuid": "^8.3.2",
"winston": "^3.8.2",
"zod": "^3.21.4",
"zustand": "3.4.2"
Expand Down
16 changes: 0 additions & 16 deletions src/backend/npm-packages/npm-packages.controller.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/backend/npm-packages/npm-packages.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class NpmPackagesApiService implements IApplicationService {
await this.installPackages();
}

async installPackages(): Promise<void> {
private async installPackages(): Promise<void> {
const dir = "npm-temp";

if (!fs.existsSync(dir)) {
Expand Down
27 changes: 14 additions & 13 deletions src/bin/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/* eslint-disable no-console */
import * as randomstring from "randomstring";
import { npmPackagesApiService } from "backend/npm-packages/npm-packages.service";
import { checkNodeVersion } from "./checkNodeVersion";

const replaceRandomCharaters = (envContent: string) => {
return ["CREDENTIALS_ENCRYPTION_KEY", "AUTH_TOKEN_KEY"].reduce(
(reducedEnvContent, currentKey) => {
return reducedEnvContent.replace(
`${currentKey}=RANDOM_CHARACTERS`,
`${currentKey}=${randomstring.generate(128)}`
);
},
envContent
);
};

(async () => {
const path = require("path");
const fs = require("fs-extra");
Expand All @@ -10,18 +23,6 @@ import { checkNodeVersion } from "./checkNodeVersion";

const { default: fetch } = await import("node-fetch");

const replaceRandomCharaters = (envContent: string) => {
return ["CREDENTIALS_ENCRYPTION_KEY", "AUTH_TOKEN_KEY"].reduce(
(reducedEnvContent, currentKey) => {
return reducedEnvContent.replace(
`${currentKey}=RANDOM_CHARACTERS`,
`${currentKey}=${randomstring.generate(128)}`
);
},
envContent
);
};

const defaultEnv = () => {
if (fs.existsSync(path.join(process.cwd(), "./.env.local"))) {
return;
Expand Down Expand Up @@ -95,7 +96,7 @@ import { checkNodeVersion } from "./checkNodeVersion";
)}
`);

// TODO Doing the npm package thing here
await npmPackagesApiService.bootstrap();

const { stdout, stderr } = execa("npm", ["run", "start"], {
cwd: path.join(__dirname, ".."),
Expand Down
5 changes: 0 additions & 5 deletions src/pages/api/healthcheck/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { configApiService } from "backend/lib/config/config.service";
import { rolesApiService } from "backend/roles/roles.service";
import { schemasApiService } from "backend/schema/schema.service";
import { usersApiService } from "backend/users/users.service";
// import { npmPackagesApiService } from "backend/npm-packages/npm-packages.service";
import { storageApiService } from "backend/storage/storage.service";
import { actionsApiService } from "backend/actions/actions.service";
import { dashboardWidgetsApiService } from "backend/dashboard-widgets/dashboard-widgets.service";
Expand Down Expand Up @@ -41,12 +40,8 @@ export default requestHandler(
await storageApiService.bootstrap();
await listOrderApiService.bootstrap();

// await npmPackagesApiService.bootstrap();

await bootstrapPortalServices();

// await npmPackagesApiService.installPackages();

await tempStorageApiService.bootstrap();
} catch (error) {
noop();
Expand Down
15 changes: 0 additions & 15 deletions src/pages/api/npm-packages/install.ts

This file was deleted.

0 comments on commit 5ac607d

Please sign in to comment.