Skip to content

Commit

Permalink
fix: es build
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-KumarH committed Feb 12, 2024
1 parent 49f31fc commit 5b9b46f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
],
},
rules: {
'@typescript-eslint/consistent-type-imports': 0
'@typescript-eslint/consistent-type-imports': 0,
'@typescript-eslint/consistent-type-exports': 0
}
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"tsctests": "tsc -d -p tsconfig.test.json",
"build:tsc": "esbuild ./src/start.ts --bundle --platform=node --outfile=lib/start.js --minify --tree-shaking=true --sourcemap=inline",
"build:jobs": "find ./src/jobs -maxdepth 1 -type f -exec bash -c 'esbuild {} --bundle --platform=node --outfile=lib/jobs/$(basename {} .ts).js --minify --tree-shaking=true --sourcemap=inline' \\;",
"build:clean": "rimraf lib",
"build": "npm-run-all lint build:clean build:tsc build:jobs"
"build": "npm-run-all lint build:clean build:tsc"
},
"engines": {
"node": ">= 20.8.0"
Expand Down
4 changes: 2 additions & 2 deletions src/accessControlService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Events } from '@restorecommerce/kafka-client';
import { CommandInterface } from '@restorecommerce/chassis-srv';
import { ResourceManager } from './resourceManager.js';
import { RedisClientType } from 'redis';
import { AccessController } from './core/accessController.js'
import { loadPoliciesFromDoc } from './core/utils.js'
import { AccessController } from './core/accessController.js';
import { loadPoliciesFromDoc } from './core/utils.js';
import { Logger } from 'winston';
import {
AccessControlServiceImplementation, ReverseQuery,
Expand Down
2 changes: 1 addition & 1 deletion src/resourceManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as _ from 'lodash-es';
import { ResourcesAPIBase, ServiceBase, FilterOperation } from '@restorecommerce/resource-base-interface';
import { Topic, Events } from '@restorecommerce/kafka-client';
import { AccessController } from './core/accessController';
import { AccessController } from './core/accessController.js';
import { createMetadata, checkAccessRequest } from './core/utils.js';
import { AuthZAction, Operation, ACSAuthZ, DecisionResponse, PolicySetRQResponse } from '@restorecommerce/acs-client';
import { RedisClientType } from 'redis';
Expand Down
15 changes: 0 additions & 15 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,3 @@ export class Worker {
await this.redisClient.quit();
}
}

if (require.main === module) {
const worker = new Worker();
worker.start().then().catch((err) => {
console.error('startup error', err);
process.exit(1);
});

process.on('SIGINT', () => {
worker.stop().then().catch((err) => {
console.error('shutdown error', err);
process.exit(1);
});
});
}

0 comments on commit 5b9b46f

Please sign in to comment.