Skip to content

Commit

Permalink
fix: update express deps, remove referances to climate-warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed May 24, 2023
1 parent 2df58bf commit 0a25e5b
Show file tree
Hide file tree
Showing 16 changed files with 682 additions and 806 deletions.
1,383 changes: 629 additions & 754 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@
"assets": "package.json"
},
"dependencies": {
"body-parser": "^1.19.0",
"body-parser": "^1.20.2",
"cli-spinner": "^0.2.10",
"cors": "^2.8.5",
"csvtojson": "^2.0.10",
"dotenv": "^10.0.0",
"express": "~4.16.1",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-fileupload": "^1.2.1",
"express-joi-validation": "^5.0.0",
"express-joi-validation": "^5.0.1",
"joi": "^17.5.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"log-update": "^4.0.0",
"mysql2": "^2.3.3",
"node-xlsx": "^0.21.0",
"regenerator-runtime": "^0.13.9",
"rxjs": "^7.5.1",
"sequelize": "^6.17.0",
"socket.io": "^4.4.0",
"rxjs": "^7.8.1",
"sequelize": "^6.31.1",
"socket.io": "^4.6.1",
"sqlite3": "^5.1.6",
"superagent": "^3.8.3",
"superagent": "^8.0.9",
"toad-scheduler": "^1.6.0",
"uuidv4": "^6",
"winston": "^3.7.2",
Expand Down
2 changes: 1 addition & 1 deletion src/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mirrorConfig =
(process.env.NODE_ENV || 'local') === 'local' ? 'mirror' : 'mirrorTest';
export const sequelizeMirror = new Sequelize(config[mirrorConfig]);

logger.info('climate-warehouse:mirror-database');
logger.info('CADT:mirror-database');

export const safeMirrorDbHandler = (callback) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/datalayer/persistance.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Organization } from '../models';
import { logger } from '../config/logger.cjs';
import { getChiaRoot } from '../utils/chia-root.js';

logger.info('climate-warehouse:datalayer:persistance');
logger.info('CADT:datalayer:persistance');
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

const CONFIG = getConfig().APP;
Expand Down
2 changes: 1 addition & 1 deletion src/datalayer/writeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { logger } from '../config/logger.cjs';
import { Organization } from '../models';
import { publicIpv4 } from '../utils/ip-tools';

logger.info('climate-warehouse:datalayer:writeService');
logger.info('CADT:datalayer:writeService');

const { USE_SIMULATOR, DATALAYER_FILE_SERVER_URL } = getConfig().APP;

Expand Down
2 changes: 1 addition & 1 deletion src/models/organizations/organizations.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { getDataModelVersion } from '../../utils/helpers';
import { getConfig } from '../../utils/config-loader';
const { USE_SIMULATOR } = getConfig().APP;

logger.info('climate-warehouse:organizations');
logger.info('CADT:organizations');

import ModelTypes from './organizations.modeltypes.cjs';

Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import dotenv from 'dotenv';

dotenv.config();

logger.info('climate-warehouse:server');
logger.info('CADT:server');

const port = getConfig().APP.CW_PORT || 3030;
const server = http.createServer(rootRouter);
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync-audit-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
assertWalletIsSynced,
} from '../utils/data-assertions';

logger.info('climate-warehouse:task:audit');
logger.info('CADT:task:audit');

dotenv.config();
import { getConfig } from '../utils/config-loader';
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync-datalayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotenv.config();
import { getConfig } from '../utils/config-loader';
const CONFIG = getConfig().APP;

logger.info('climate-warehouse:task:sync-datalayer');
logger.info('CADT:task:sync-datalayer');

const spinner = new Spinner('Waiting for Updates %s');
spinner.setSpinnerString('|/-\\');
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync-default-organizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const CONFIG = getConfig().APP;
import dotenv from 'dotenv';
dotenv.config();

logger.info('climate-warehouse:task:sync-default-organizations');
logger.info('CADT:task:sync-default-organizations');

const task = new Task('sync-default-organizations', async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync-governance-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const CONFIG = getConfig();
import dotenv from 'dotenv';
dotenv.config();

logger.info('climate-warehouse:task:sync-governance');
logger.info('CADT:task:sync-governance');

const task = new Task('sync-governance-meta', async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync-organization-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CONFIG = getConfig().APP;
import dotenv from 'dotenv';
dotenv.config();

logger.info('climate-warehouse:task:sync-organizations');
logger.info('CADT:task:sync-organizations');

const task = new Task('sync-organization-meta', async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync-picklists.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { getConfig } from '../utils/config-loader';

const CONFIG = getConfig().APP;

logger.info('climate-warehouse:task:sync-picklists');
logger.info('CADT:task:sync-picklists');

const task = new Task('sync-picklist', async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/config-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import path from 'path';
import { logger } from '../config/logger.cjs';

import { getDataModelVersion } from './helpers';
import defaultConfig from './defaultConfig.json';
import { defaultConfig } from './defaultConfig.js';
import { getChiaRoot } from './chia-root.js';

export const getConfig = _.memoize(() => {
Expand Down
33 changes: 33 additions & 0 deletions src/utils/defaultConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export const defaultConfig = {
MIRROR_DB: {
DB_USERNAME: null,
DB_PASSWORD: null,
DB_NAME: null,
DB_HOST: null,
},
APP: {
CW_PORT: 31310,
DATALAYER_URL: 'https://localhost:8562',
WALLET_URL: 'https://localhost:9256',
USE_SIMULATOR: false,
READ_ONLY: false,
CADT_API_KEY: null,
CHIA_NETWORK: 'mainnet',
USE_DEVELOPMENT_MODE: false,
IS_GOVERNANCE_BODY: false,
DEFAULT_FEE: 300000000,
DEFAULT_COIN_AMOUNT: 300000000,
DATALAYER_FILE_SERVER_URL: null,
TASKS: {
AUDIT_SYNC_TASK_INTERVAL: 30,
DATAMODEL_SYNC_TASK_INTERVAL: 60,
GOVERNANCE_SYNC_TASK_INTERVAL: 86400,
ORGANIZATION_META_SYNC_TASK_INTERVAL: 86400,
PICKLIST_SYNC_TASK_INTERVAL: 30,
},
},
GOVERNANCE: {
GOVERNANCE_BODY_ID:
'23f6498e015ebcd7190c97df30c032de8deb5c8934fc1caa928bc310e2b8a57e',
},
};
32 changes: 0 additions & 32 deletions src/utils/defaultConfig.json

This file was deleted.

0 comments on commit 0a25e5b

Please sign in to comment.