@marketeer-intelligence/framework-device 0.1.0-alpha.4 → 0.1.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/data-source/MarketIndexTableParaser.d.ts +8 -0
  2. package/dist/data-source/MarketIndexTableParaser.d.ts.map +1 -0
  3. package/dist/data-source/MarketIndexTableParaser.js +62 -0
  4. package/dist/data-source/MarketIndexTableParaser.js.map +1 -0
  5. package/dist/data-source/SecurityTableParaser.d.ts +7 -7
  6. package/dist/data-source/SecurityTableParaser.js +71 -71
  7. package/dist/data-source/StaticWebpageScraper.d.ts +11 -11
  8. package/dist/data-source/StaticWebpageScraper.js +49 -49
  9. package/dist/data-source/Webpage.d.ts +10 -10
  10. package/dist/data-source/Webpage.js +21 -21
  11. package/dist/data-source/WebpageBody.d.ts +10 -10
  12. package/dist/data-source/WebpageBody.js +33 -33
  13. package/dist/data-source/WebpageUrl.d.ts +10 -10
  14. package/dist/data-source/WebpageUrl.js +38 -38
  15. package/dist/data-source/index.d.ts +7 -6
  16. package/dist/data-source/index.d.ts.map +1 -1
  17. package/dist/data-source/index.js +7 -6
  18. package/dist/data-source/index.js.map +1 -1
  19. package/dist/data-store/InstrumentMongoDbCollection.d.ts +11 -11
  20. package/dist/data-store/InstrumentMongoDbCollection.js +57 -57
  21. package/dist/data-store/MarketIndexMongoDbCollection.d.ts +12 -0
  22. package/dist/data-store/MarketIndexMongoDbCollection.d.ts.map +1 -0
  23. package/dist/data-store/MarketIndexMongoDbCollection.js +58 -0
  24. package/dist/data-store/MarketIndexMongoDbCollection.js.map +1 -0
  25. package/dist/data-store/SecurityMongoDbCollection.d.ts +11 -11
  26. package/dist/data-store/SecurityMongoDbCollection.js +66 -66
  27. package/dist/data-store/index.d.ts +4 -3
  28. package/dist/data-store/index.d.ts.map +1 -1
  29. package/dist/data-store/index.js +4 -3
  30. package/dist/data-store/index.js.map +1 -1
  31. package/dist/index.d.ts +4 -4
  32. package/dist/index.js +4 -4
  33. package/dist/task/ConfigureEnvironmentVariables.d.ts +9 -9
  34. package/dist/task/ConfigureEnvironmentVariables.js +31 -31
  35. package/dist/task/ConnectToMongoDb.d.ts +8 -8
  36. package/dist/task/ConnectToMongoDb.js +28 -28
  37. package/dist/task/DisconnectFromMongoDb.d.ts +7 -7
  38. package/dist/task/DisconnectFromMongoDb.js +25 -25
  39. package/dist/task/MongoDbUri.d.ts +10 -10
  40. package/dist/task/MongoDbUri.js +38 -38
  41. package/dist/task/index.d.ts +5 -5
  42. package/dist/task/index.js +5 -5
  43. package/package.json +4 -4
@@ -1,26 +1,26 @@
1
- import { Failure, Success } from './index.js';
2
- import mongoose from 'mongoose';
3
- export class DisconnectFromMongoDb {
4
- constructor() { }
5
- static _instance;
6
- static create() {
7
- return this._instance || (this._instance = new DisconnectFromMongoDb());
8
- }
9
- async run() {
10
- try {
11
- if (mongoose.connection.readyState === mongoose.ConnectionStates.connected) {
12
- await mongoose.disconnect();
13
- await mongoose.connection.close();
14
- console.log('disconnected from MongoDb');
15
- }
16
- return Success.create();
17
- }
18
- catch (error) {
19
- if (error instanceof Error) {
20
- return Failure.create(error);
21
- }
22
- throw error;
23
- }
24
- }
25
- }
1
+ import { Failure, Success } from './index.js';
2
+ import mongoose from 'mongoose';
3
+ export class DisconnectFromMongoDb {
4
+ constructor() { }
5
+ static _instance;
6
+ static create() {
7
+ return this._instance || (this._instance = new DisconnectFromMongoDb());
8
+ }
9
+ async run() {
10
+ try {
11
+ if (mongoose.connection.readyState === mongoose.ConnectionStates.connected) {
12
+ await mongoose.disconnect();
13
+ await mongoose.connection.close();
14
+ console.log('disconnected from MongoDb');
15
+ }
16
+ return Success.create();
17
+ }
18
+ catch (error) {
19
+ if (error instanceof Error) {
20
+ return Failure.create(error);
21
+ }
22
+ throw error;
23
+ }
24
+ }
25
+ }
26
26
  //# sourceMappingURL=DisconnectFromMongoDb.js.map
@@ -1,11 +1,11 @@
1
- import { Feedback, IValueObject } from './index.js';
2
- export type MongoDbUriValue = Readonly<string>;
3
- export declare function isMongoDbUriValue(candidate: unknown): candidate is MongoDbUriValue;
4
- export declare class MongoDbUri implements IValueObject<MongoDbUriValue> {
5
- private _value;
6
- private constructor();
7
- static create(candidate: unknown): Feedback<MongoDbUri, Error>;
8
- get value(): MongoDbUriValue;
9
- }
10
- export declare function isMongoDbUri(candidate: unknown): candidate is MongoDbUri;
1
+ import { Feedback, IValueObject } from './index.js';
2
+ export type MongoDbUriValue = Readonly<string>;
3
+ export declare function isMongoDbUriValue(candidate: unknown): candidate is MongoDbUriValue;
4
+ export declare class MongoDbUri implements IValueObject<MongoDbUriValue> {
5
+ private _value;
6
+ private constructor();
7
+ static create(candidate: unknown): Feedback<MongoDbUri, Error>;
8
+ get value(): MongoDbUriValue;
9
+ }
10
+ export declare function isMongoDbUri(candidate: unknown): candidate is MongoDbUri;
11
11
  //# sourceMappingURL=MongoDbUri.d.ts.map
@@ -1,39 +1,39 @@
1
- import { Failure, Result } from './index.js';
2
- const testPattern = /^mongodb(?:\+srv)?:\/\/(?:(?:[^:\n\r]+:[^@\n\r]+)@)?(?:[^\/\n\r]+|\[[^\]]+\])(?::[0-9]+)?\/[^\/\n\r\?]+(?:\?[^\n\r]*)?$/;
3
- export function isMongoDbUriValue(candidate) {
4
- if (typeof candidate !== 'string')
5
- return false;
6
- if (!testPattern.test(candidate))
7
- return false;
8
- return true;
9
- }
10
- export class MongoDbUri {
11
- _value;
12
- constructor(_value) {
13
- this._value = _value;
14
- }
15
- static create(candidate) {
16
- try {
17
- if (!isMongoDbUriValue(candidate)) {
18
- const msg = 'invalid MongoDbUri creation value';
19
- const error = new Error(msg);
20
- return Failure.create(error);
21
- }
22
- const mongoDbUri = new MongoDbUri(candidate);
23
- return Result.create(mongoDbUri);
24
- }
25
- catch (error) {
26
- if (error instanceof Error) {
27
- return Failure.create(error);
28
- }
29
- throw error;
30
- }
31
- }
32
- get value() {
33
- return this._value;
34
- }
35
- }
36
- export function isMongoDbUri(candidate) {
37
- return candidate instanceof MongoDbUri;
38
- }
1
+ import { Failure, Result } from './index.js';
2
+ const testPattern = /^mongodb(?:\+srv)?:\/\/(?:(?:[^:\n\r]+:[^@\n\r]+)@)?(?:[^\/\n\r]+|\[[^\]]+\])(?::[0-9]+)?\/[^\/\n\r\?]+(?:\?[^\n\r]*)?$/;
3
+ export function isMongoDbUriValue(candidate) {
4
+ if (typeof candidate !== 'string')
5
+ return false;
6
+ if (!testPattern.test(candidate))
7
+ return false;
8
+ return true;
9
+ }
10
+ export class MongoDbUri {
11
+ _value;
12
+ constructor(_value) {
13
+ this._value = _value;
14
+ }
15
+ static create(candidate) {
16
+ try {
17
+ if (!isMongoDbUriValue(candidate)) {
18
+ const msg = 'invalid MongoDbUri creation value';
19
+ const error = new Error(msg);
20
+ return Failure.create(error);
21
+ }
22
+ const mongoDbUri = new MongoDbUri(candidate);
23
+ return Result.create(mongoDbUri);
24
+ }
25
+ catch (error) {
26
+ if (error instanceof Error) {
27
+ return Failure.create(error);
28
+ }
29
+ throw error;
30
+ }
31
+ }
32
+ get value() {
33
+ return this._value;
34
+ }
35
+ }
36
+ export function isMongoDbUri(candidate) {
37
+ return candidate instanceof MongoDbUri;
38
+ }
39
39
  //# sourceMappingURL=MongoDbUri.js.map
@@ -1,6 +1,6 @@
1
- export * from '../index.js';
2
- export { ConfigureEnvironmentVariables } from './ConfigureEnvironmentVariables.js';
3
- export { ConnectToMongoDb } from './ConnectToMongoDb.js';
4
- export { DisconnectFromMongoDb } from './DisconnectFromMongoDb.js';
5
- export { MongoDbUriValue, isMongoDbUriValue, MongoDbUri, isMongoDbUri, } from './MongoDbUri.js';
1
+ export * from '../index.js';
2
+ export { ConfigureEnvironmentVariables } from './ConfigureEnvironmentVariables.js';
3
+ export { ConnectToMongoDb } from './ConnectToMongoDb.js';
4
+ export { DisconnectFromMongoDb } from './DisconnectFromMongoDb.js';
5
+ export { MongoDbUriValue, isMongoDbUriValue, MongoDbUri, isMongoDbUri, } from './MongoDbUri.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
- export * from '../index.js';
2
- export { ConfigureEnvironmentVariables } from './ConfigureEnvironmentVariables.js';
3
- export { ConnectToMongoDb } from './ConnectToMongoDb.js';
4
- export { DisconnectFromMongoDb } from './DisconnectFromMongoDb.js';
5
- export { isMongoDbUriValue, MongoDbUri, isMongoDbUri, } from './MongoDbUri.js';
1
+ export * from '../index.js';
2
+ export { ConfigureEnvironmentVariables } from './ConfigureEnvironmentVariables.js';
3
+ export { ConnectToMongoDb } from './ConnectToMongoDb.js';
4
+ export { DisconnectFromMongoDb } from './DisconnectFromMongoDb.js';
5
+ export { isMongoDbUriValue, MongoDbUri, isMongoDbUri, } from './MongoDbUri.js';
6
6
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marketeer-intelligence/framework-device",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.6",
4
4
  "description": "framework/device layer modules for marketeer-intelligence app",
5
5
  "author": "juniorCitizen1978 <juniorCitizen1978@gmail.com>",
6
6
  "private": false,
@@ -21,7 +21,7 @@
21
21
  "README.md"
22
22
  ],
23
23
  "dependencies": {
24
- "@marketeer-intelligence/infrastructure": "^0.1.0-alpha.12",
24
+ "@marketeer-intelligence/infrastructure": "^0.1.0-alpha.14",
25
25
  "dotenv-safe": "^8.2.0",
26
26
  "got": "^12.6.0",
27
27
  "iconv-lite": "^0.6.3",
@@ -40,11 +40,11 @@
40
40
  "eslint-config-prettier": "^8.7.0",
41
41
  "prettier": "^2.8.4",
42
42
  "rimraf": "^4.4.0",
43
- "typescript": "^4.9.5"
43
+ "typescript": "^5.0.2"
44
44
  },
45
45
  "scripts": {
46
46
  "prebuild": "rimraf dist",
47
47
  "build": "tsc",
48
- "publish_new": "npm install & npm run build & git add . & git commit -m \"update\" & git push origin main & npm publish"
48
+ "publish-new": "npm install && npm run build && git add . && git commit -m \"update\" && git push origin main && npm publish"
49
49
  }
50
50
  }