From 8da0329fe9d58899ed6fd9585d3cc01680bdeec6 Mon Sep 17 00:00:00 2001 From: Konstantin Dyachenko Date: Thu, 2 May 2024 22:43:40 +0000 Subject: [PATCH] Add refresh and release commands --- README.md | 15 +++++++++++---- package.json | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 764df67..4e9720d 100644 --- a/README.md +++ b/README.md @@ -150,14 +150,21 @@ SELECT pg_cancel_backend(pid); ## Maintenance -### Publish new version +### Refresh package-lock.json +This command deletes `node_modules`, `package-lock.json` and runs `npm i`. So everything is refreshed. + +```bash +npm run package:refresh ``` -npm version patch && git push + +### Release a new version + +```bash +npm run package:release ``` After that it might be required to release new versions of: 1. https://github.com/deep-foundation/react-hasura 2. https://github.com/deep-foundation/materialized-path -3. https://github.com/deep-foundation/deeplinks - +3. https://github.com/deep-foundation/deeplinks \ No newline at end of file diff --git a/package.json b/package.json index e6b8a06..3311d2f 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,11 @@ "ts-node": "^10.9.1" }, "scripts": { + "package:refresh": "rm -rf node_modules; rm -f package-lock.json; npm i", "package:build": "npx tsc --project tsconfig.json", "package:unbuild": "rimraf ./*.js && rimraf ./*.js.map && rimraf ./*.d.ts", "package:publish": "npm run package:build && npm publish --access public && npm run package:unbuild", + "package:release": "npm version patch && git push", "docker-local": "cd ./local && docker-compose -p deep up -d && cd ../", "docker": "cross-env JWT_SECRET=\"{\\\"type\\\":\\\"HS256\\\",\\\"key\\\":\\\"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R\\\"}\" HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres HASURA_GRAPHQL_ENABLE_CONSOLE=true HASURA_GRAPHQL_DEV_MODE=true HASURA_GRAPHQL_LOG_LEVEL=debug HASURA_GRAPHQL_ENABLED_LOG_TYPES=\"startup, http-log, webhook-log, websocket-log, query-log\" HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS=true HASURA_GRAPHQL_UNAUTHORIZED_ROLE=undefined POSTGRES_USER=postgres POSTGRES_PASSWORD=postgrespassword PGGSSENCMODE=disable PGSSLMODE=disable PGREQUIRESSL=0 MINIO_ROOT_USER=minioaccesskey MINIO_ROOT_PASSWORD=miniosecretkey HASURA_STORAGE_DEBUG=true HASURA_METADATA=1 HASURA_ENDPOINT=http://host.docker.internal:8080/v1 S3_ENDPOINT=http://host.docker.internal:9000 S3_ACCESS_KEY=minioaccesskey S3_SECRET_KEY=miniosecretkey S3_BUCKET=default S3_ROOT_FOLDER=default POSTGRES_MIGRATIONS=0 POSTGRES_MIGRATIONS_SOURCE=postgres://postgres:postgrespassword@host.docker.internal:5432/postgres?sslmode=disable npm run docker-local" },