@dhedge/backend-flatcoin-core 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # backend-flatcoin-core
@@ -0,0 +1,24 @@
1
+ declare abstract class FlatcoinPriceParent {
2
+ id: number;
3
+ priceUsd: string;
4
+ priceUsdFormatted: number;
5
+ timestamp: number;
6
+ blockNumber: number;
7
+ }
8
+
9
+ declare class FlatcoinPriceOneDay extends FlatcoinPriceParent {
10
+ }
11
+
12
+ declare class FlatcoinPriceOneMonth extends FlatcoinPriceParent {
13
+ }
14
+
15
+ declare class FlatcoinPriceOneWeek extends FlatcoinPriceParent {
16
+ }
17
+
18
+ declare class FlatcoinPriceOneYear extends FlatcoinPriceParent {
19
+ }
20
+
21
+ declare class FlatcoinPrice extends FlatcoinPriceParent {
22
+ }
23
+
24
+ export { FlatcoinPrice, FlatcoinPriceOneDay, FlatcoinPriceOneMonth, FlatcoinPriceOneWeek, FlatcoinPriceOneYear, FlatcoinPriceParent };
@@ -0,0 +1,85 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+
13
+ // src/entity/flatcoin.price.one.day.ts
14
+ import { Entity as Entity2 } from "typeorm";
15
+
16
+ // src/entity/flatcoin.price.parent.ts
17
+ import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
18
+ var FlatcoinPriceParent = class {
19
+ };
20
+ __decorateClass([
21
+ PrimaryGeneratedColumn({ name: "id" })
22
+ ], FlatcoinPriceParent.prototype, "id", 2);
23
+ __decorateClass([
24
+ Column({ name: "price_usd", type: "numeric", precision: 30 })
25
+ ], FlatcoinPriceParent.prototype, "priceUsd", 2);
26
+ __decorateClass([
27
+ Column({ name: "price_usd_formatted", type: "decimal", precision: 10, scale: 2 })
28
+ ], FlatcoinPriceParent.prototype, "priceUsdFormatted", 2);
29
+ __decorateClass([
30
+ Column({ name: "timestamp", type: "numeric", precision: 25 })
31
+ ], FlatcoinPriceParent.prototype, "timestamp", 2);
32
+ __decorateClass([
33
+ Column({ name: "block_number", type: "numeric", precision: 25 })
34
+ ], FlatcoinPriceParent.prototype, "blockNumber", 2);
35
+ FlatcoinPriceParent = __decorateClass([
36
+ Entity()
37
+ ], FlatcoinPriceParent);
38
+
39
+ // src/entity/flatcoin.price.one.day.ts
40
+ var FlatcoinPriceOneDay = class extends FlatcoinPriceParent {
41
+ };
42
+ FlatcoinPriceOneDay = __decorateClass([
43
+ Entity2({ name: "flatcoin_prices_1d" })
44
+ ], FlatcoinPriceOneDay);
45
+
46
+ // src/entity/flatcoin.price.one.month.ts
47
+ import { Entity as Entity3 } from "typeorm";
48
+ var FlatcoinPriceOneMonth = class extends FlatcoinPriceParent {
49
+ };
50
+ FlatcoinPriceOneMonth = __decorateClass([
51
+ Entity3({ name: "flatcoin_prices_1m" })
52
+ ], FlatcoinPriceOneMonth);
53
+
54
+ // src/entity/flatcoin.price.one.week.ts
55
+ import { Entity as Entity4 } from "typeorm";
56
+ var FlatcoinPriceOneWeek = class extends FlatcoinPriceParent {
57
+ };
58
+ FlatcoinPriceOneWeek = __decorateClass([
59
+ Entity4({ name: "flatcoin_prices_1w" })
60
+ ], FlatcoinPriceOneWeek);
61
+
62
+ // src/entity/flatcoin.price.one.year.ts
63
+ import { Entity as Entity5 } from "typeorm";
64
+ var FlatcoinPriceOneYear = class extends FlatcoinPriceParent {
65
+ };
66
+ FlatcoinPriceOneYear = __decorateClass([
67
+ Entity5({ name: "flatcoin_prices_1y" })
68
+ ], FlatcoinPriceOneYear);
69
+
70
+ // src/entity/flatcoin.price.ts
71
+ import { Entity as Entity6 } from "typeorm";
72
+ var FlatcoinPrice = class extends FlatcoinPriceParent {
73
+ };
74
+ FlatcoinPrice = __decorateClass([
75
+ Entity6({ name: "flatcoin_prices" })
76
+ ], FlatcoinPrice);
77
+ export {
78
+ FlatcoinPrice,
79
+ FlatcoinPriceOneDay,
80
+ FlatcoinPriceOneMonth,
81
+ FlatcoinPriceOneWeek,
82
+ FlatcoinPriceOneYear,
83
+ FlatcoinPriceParent
84
+ };
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/entity/flatcoin.price.one.day.ts","../../src/entity/flatcoin.price.parent.ts","../../src/entity/flatcoin.price.one.month.ts","../../src/entity/flatcoin.price.one.week.ts","../../src/entity/flatcoin.price.one.year.ts","../../src/entity/flatcoin.price.ts"],"sourcesContent":["import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1d' })\nexport class FlatcoinPriceOneDay extends FlatcoinPriceParent {}\n","import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';\n\n@Entity()\nexport abstract class FlatcoinPriceParent {\n @PrimaryGeneratedColumn({ name: 'id' })\n id: number;\n\n @Column({ name: 'price_usd', type: 'numeric', precision: 30 })\n priceUsd: string;\n\n @Column({ name: 'price_usd_formatted', type: 'decimal', precision: 10, scale: 2 })\n priceUsdFormatted: number;\n\n @Column({ name: 'timestamp', type: 'numeric', precision: 25 })\n timestamp: number;\n\n @Column({ name: 'block_number', type: 'numeric', precision: 25 })\n blockNumber: number;\n}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1m' })\nexport class FlatcoinPriceOneMonth extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1w' })\nexport class FlatcoinPriceOneWeek extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1y' })\nexport class FlatcoinPriceOneYear extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices' })\nexport class FlatcoinPrice extends FlatcoinPriceParent {}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,UAAAA,eAAc;;;ACAvB,SAAS,QAAQ,wBAAwB,cAAc;AAGhD,IAAe,sBAAf,MAAmC;AAe1C;AAbE;AAAA,EADC,uBAAuB,EAAE,MAAM,KAAK,CAAC;AAAA,GADlB,oBAEpB;AAGA;AAAA,EADC,OAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAJzC,oBAKpB;AAGA;AAAA,EADC,OAAO,EAAE,MAAM,uBAAuB,MAAM,WAAW,WAAW,IAAI,OAAO,EAAE,CAAC;AAAA,GAP7D,oBAQpB;AAGA;AAAA,EADC,OAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAVzC,oBAWpB;AAGA;AAAA,EADC,OAAO,EAAE,MAAM,gBAAgB,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAb5C,oBAcpB;AAdoB,sBAAf;AAAA,EADN,OAAO;AAAA,GACc;;;ADCf,IAAM,sBAAN,cAAkC,oBAAoB;AAAC;AAAjD,sBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;AEJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,wBAAN,cAAoC,oBAAoB;AAAC;AAAnD,wBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,gBAAN,cAA4B,oBAAoB;AAAC;AAA3C,gBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,kBAAkB,CAAC;AAAA,GACtB;","names":["Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity"]}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "main": "../dist/entity/index.js"
4
+ }
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@dhedge/backend-flatcoin-core",
3
+ "version": "0.1.0",
4
+ "description": "Backend Flatcoin Core",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./entity": {
14
+ "types": "./dist/entity/index.d.ts",
15
+ "default": "./dist/entity/index.js"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "/entity",
21
+ "/dist"
22
+ ],
23
+ "sideEffects": false,
24
+ "peerDependencies": {
25
+ "typeorm": "^0.3.17"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "typescript": {
29
+ "optional": true
30
+ }
31
+ },
32
+ "devDependencies": {
33
+ "@types/dedent": "^0.7.0",
34
+ "@types/fs-extra": "^11.0.1",
35
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
36
+ "@typescript-eslint/parser": "^6.7.2",
37
+ "dedent": "^0.7.0",
38
+ "eslint": "^8.49.0",
39
+ "eslint-config-prettier": "^9.0.0",
40
+ "eslint-plugin-prettier": "^5.0.0",
41
+ "execa": "^7.1.1",
42
+ "prettier": "3.0.3",
43
+ "tsup": "^7.2.0",
44
+ "typescript": "^5.0.0",
45
+ "fs-extra": "^11.1.1"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/dhedge/backend-flatcoin-core.git"
50
+ },
51
+ "homepage": "https://github.com/dhedge/backend-flatcoin-core#readme",
52
+ "scripts": {
53
+ "lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
54
+ "lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
55
+ "build": "tsup",
56
+ "typecheck": "tsc --noEmit",
57
+ "precommit": "npm run lint && npm run typecheck && npm run test",
58
+ "prepublish": "npm run build",
59
+ "test": "vitest run --coverage"
60
+ }
61
+ }