@cieloazul310/jclub-financial-utils 0.0.1-alpha.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.
Files changed (100) hide show
  1. package/.turbo/turbo-build.log +93 -0
  2. package/CHANGELOG.md +7 -0
  3. package/__tests__/club.test.ts +40 -0
  4. package/__tests__/dictionary.test.ts +26 -0
  5. package/__tests__/years.test.ts +11 -0
  6. package/clubs.yml +850 -0
  7. package/dictionary.yml +69 -0
  8. package/dist/all-fields.cjs +96 -0
  9. package/dist/all-fields.d.cts +14 -0
  10. package/dist/all-fields.d.cts.map +1 -0
  11. package/dist/all-fields.d.mts +14 -0
  12. package/dist/all-fields.d.mts.map +1 -0
  13. package/dist/all-fields.mjs +89 -0
  14. package/dist/all-fields.mjs.map +1 -0
  15. package/dist/club-CCls7mTR.mjs +1 -0
  16. package/dist/club-CYJ2Any-.cjs +0 -0
  17. package/dist/club-CcV6Gouv.d.mts +20 -0
  18. package/dist/club-CcV6Gouv.d.mts.map +1 -0
  19. package/dist/club-DConAzRZ.d.cts +20 -0
  20. package/dist/club-DConAzRZ.d.cts.map +1 -0
  21. package/dist/clubs-B6WFNimH.cjs +910 -0
  22. package/dist/clubs-BF9Y0ITz.mjs +893 -0
  23. package/dist/clubs-BF9Y0ITz.mjs.map +1 -0
  24. package/dist/clubs.cjs +5 -0
  25. package/dist/clubs.d.cts +10 -0
  26. package/dist/clubs.d.cts.map +1 -0
  27. package/dist/clubs.d.mts +10 -0
  28. package/dist/clubs.d.mts.map +1 -0
  29. package/dist/clubs.mjs +3 -0
  30. package/dist/data-BI1o8Mn-.mjs +1 -0
  31. package/dist/data-B_nPtYBn.cjs +0 -0
  32. package/dist/data-Bs9dSa_0.d.cts +158 -0
  33. package/dist/data-Bs9dSa_0.d.cts.map +1 -0
  34. package/dist/data-c1kTjXyV.d.mts +158 -0
  35. package/dist/data-c1kTjXyV.d.mts.map +1 -0
  36. package/dist/dictionary-BzN32kPK.cjs +113 -0
  37. package/dist/dictionary-LXXa4AIA.mjs +102 -0
  38. package/dist/dictionary-LXXa4AIA.mjs.map +1 -0
  39. package/dist/dictionary.cjs +4 -0
  40. package/dist/dictionary.d.cts +26 -0
  41. package/dist/dictionary.d.cts.map +1 -0
  42. package/dist/dictionary.d.mts +26 -0
  43. package/dist/dictionary.d.mts.map +1 -0
  44. package/dist/dictionary.mjs +3 -0
  45. package/dist/index.cjs +20 -0
  46. package/dist/index.d.cts +9 -0
  47. package/dist/index.d.mts +9 -0
  48. package/dist/index.mjs +7 -0
  49. package/dist/types/club.cjs +0 -0
  50. package/dist/types/club.d.cts +2 -0
  51. package/dist/types/club.d.mts +2 -0
  52. package/dist/types/club.mjs +1 -0
  53. package/dist/types/data.cjs +0 -0
  54. package/dist/types/data.d.cts +2 -0
  55. package/dist/types/data.d.mts +2 -0
  56. package/dist/types/data.mjs +1 -0
  57. package/dist/types/index.cjs +0 -0
  58. package/dist/types/index.d.cts +4 -0
  59. package/dist/types/index.d.mts +4 -0
  60. package/dist/types/index.mjs +1 -0
  61. package/dist/types/year.cjs +0 -0
  62. package/dist/types/year.d.cts +2 -0
  63. package/dist/types/year.d.mts +2 -0
  64. package/dist/types/year.mjs +1 -0
  65. package/dist/year-0HxxyYb_.mjs +1 -0
  66. package/dist/year-C02MQex_.d.mts +9 -0
  67. package/dist/year-C02MQex_.d.mts.map +1 -0
  68. package/dist/year-CSrJssAF.d.cts +9 -0
  69. package/dist/year-CSrJssAF.d.cts.map +1 -0
  70. package/dist/year-dUgWR1aM.cjs +0 -0
  71. package/dist/years-6Ii8ZNVQ.mjs +157 -0
  72. package/dist/years-6Ii8ZNVQ.mjs.map +1 -0
  73. package/dist/years-DRN0nquf.cjs +162 -0
  74. package/dist/years.cjs +3 -0
  75. package/dist/years.d.cts +8 -0
  76. package/dist/years.d.cts.map +1 -0
  77. package/dist/years.d.mts +8 -0
  78. package/dist/years.d.mts.map +1 -0
  79. package/dist/years.mjs +3 -0
  80. package/eslint.config.mjs +4 -0
  81. package/package.json +66 -0
  82. package/scripts/build-clubs.ts +18 -0
  83. package/scripts/build-dictionary.ts +18 -0
  84. package/scripts/build-years.ts +18 -0
  85. package/scripts/build.ts +21 -0
  86. package/src/all-fields.ts +100 -0
  87. package/src/clubs.ts +20 -0
  88. package/src/data/clubs.json +949 -0
  89. package/src/data/dictionary.json +71 -0
  90. package/src/data/years.json +173 -0
  91. package/src/dictionary.ts +39 -0
  92. package/src/index.ts +5 -0
  93. package/src/types/club.ts +16 -0
  94. package/src/types/data.ts +161 -0
  95. package/src/types/index.ts +3 -0
  96. package/src/types/year.ts +5 -0
  97. package/src/years.ts +6 -0
  98. package/tsconfig.json +4 -0
  99. package/tsdown.config.ts +15 -0
  100. package/years.yml +111 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,20 @@
1
+ const require_all_fields = require('./all-fields.cjs');
2
+ const require_clubs = require('./clubs-B6WFNimH.cjs');
3
+ const require_dictionary = require('./dictionary-BzN32kPK.cjs');
4
+ const require_years = require('./years-DRN0nquf.cjs');
5
+ require('./types/index.cjs');
6
+
7
+ exports.allFields = require_all_fields.allFields;
8
+ exports.allSortableFields = require_all_fields.allSortableFields;
9
+ exports.attdFields = require_all_fields.attdFields;
10
+ exports.bsFields = require_all_fields.bsFields;
11
+ exports.expenseFields = require_all_fields.expenseFields;
12
+ exports.generalFields = require_all_fields.generalFields;
13
+ exports.getAllClubs = require_clubs.getAllClubs;
14
+ exports.getAllYears = require_years.getAllYears;
15
+ exports.getClubBySlug = require_clubs.getClubBySlug;
16
+ exports.getClubsByCategory = require_clubs.getClubsByCategory;
17
+ exports.getLabel = require_dictionary.getLabel;
18
+ exports.getLabelWithOptions = require_dictionary.getLabelWithOptions;
19
+ exports.plFields = require_all_fields.plFields;
20
+ exports.revenueFields = require_all_fields.revenueFields;
@@ -0,0 +1,9 @@
1
+ import { a as General, c as SeasonResult, i as FinancialDatum, n as BS, o as PL, r as Expense, s as Revenue, t as Attd } from "./data-Bs9dSa_0.cjs";
2
+ import { allFields, allSortableFields, attdFields, bsFields, expenseFields, generalFields, plFields, revenueFields } from "./all-fields.cjs";
3
+ import { t as ClubInfo } from "./club-DConAzRZ.cjs";
4
+ import { t as YearInfo } from "./year-CSrJssAF.cjs";
5
+ import "./types/index.cjs";
6
+ import { getAllClubs, getClubBySlug, getClubsByCategory } from "./clubs.cjs";
7
+ import { getLabel, getLabelWithOptions } from "./dictionary.cjs";
8
+ import { getAllYears } from "./years.cjs";
9
+ export { Attd, BS, ClubInfo, Expense, FinancialDatum, General, PL, Revenue, SeasonResult, YearInfo, allFields, allSortableFields, attdFields, bsFields, expenseFields, generalFields, getAllClubs, getAllYears, getClubBySlug, getClubsByCategory, getLabel, getLabelWithOptions, plFields, revenueFields };
@@ -0,0 +1,9 @@
1
+ import { a as General, c as SeasonResult, i as FinancialDatum, n as BS, o as PL, r as Expense, s as Revenue, t as Attd } from "./data-c1kTjXyV.mjs";
2
+ import { allFields, allSortableFields, attdFields, bsFields, expenseFields, generalFields, plFields, revenueFields } from "./all-fields.mjs";
3
+ import { t as ClubInfo } from "./club-CcV6Gouv.mjs";
4
+ import { t as YearInfo } from "./year-C02MQex_.mjs";
5
+ import "./types/index.mjs";
6
+ import { getAllClubs, getClubBySlug, getClubsByCategory } from "./clubs.mjs";
7
+ import { getLabel, getLabelWithOptions } from "./dictionary.mjs";
8
+ import { getAllYears } from "./years.mjs";
9
+ export { Attd, BS, ClubInfo, Expense, FinancialDatum, General, PL, Revenue, SeasonResult, YearInfo, allFields, allSortableFields, attdFields, bsFields, expenseFields, generalFields, getAllClubs, getAllYears, getClubBySlug, getClubsByCategory, getLabel, getLabelWithOptions, plFields, revenueFields };
package/dist/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { allFields, allSortableFields, attdFields, bsFields, expenseFields, generalFields, plFields, revenueFields } from "./all-fields.mjs";
2
+ import { n as getClubBySlug, r as getClubsByCategory, t as getAllClubs } from "./clubs-BF9Y0ITz.mjs";
3
+ import { n as getLabelWithOptions, t as getLabel } from "./dictionary-LXXa4AIA.mjs";
4
+ import { t as getAllYears } from "./years-6Ii8ZNVQ.mjs";
5
+ import "./types/index.mjs";
6
+
7
+ export { allFields, allSortableFields, attdFields, bsFields, expenseFields, generalFields, getAllClubs, getAllYears, getClubBySlug, getClubsByCategory, getLabel, getLabelWithOptions, plFields, revenueFields };
File without changes
@@ -0,0 +1,2 @@
1
+ import { t as ClubInfo } from "../club-DConAzRZ.cjs";
2
+ export { ClubInfo };
@@ -0,0 +1,2 @@
1
+ import { t as ClubInfo } from "../club-CcV6Gouv.mjs";
2
+ export { ClubInfo };
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1,2 @@
1
+ import { a as General, c as SeasonResult, i as FinancialDatum, n as BS, o as PL, r as Expense, s as Revenue, t as Attd } from "../data-Bs9dSa_0.cjs";
2
+ export { Attd, BS, Expense, FinancialDatum, General, PL, Revenue, SeasonResult };
@@ -0,0 +1,2 @@
1
+ import { a as General, c as SeasonResult, i as FinancialDatum, n as BS, o as PL, r as Expense, s as Revenue, t as Attd } from "../data-c1kTjXyV.mjs";
2
+ export { Attd, BS, Expense, FinancialDatum, General, PL, Revenue, SeasonResult };
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1,4 @@
1
+ import { a as General, c as SeasonResult, i as FinancialDatum, n as BS, o as PL, r as Expense, s as Revenue, t as Attd } from "../data-Bs9dSa_0.cjs";
2
+ import { t as ClubInfo } from "../club-DConAzRZ.cjs";
3
+ import { t as YearInfo } from "../year-CSrJssAF.cjs";
4
+ export { Attd, BS, ClubInfo, Expense, FinancialDatum, General, PL, Revenue, SeasonResult, YearInfo };
@@ -0,0 +1,4 @@
1
+ import { a as General, c as SeasonResult, i as FinancialDatum, n as BS, o as PL, r as Expense, s as Revenue, t as Attd } from "../data-c1kTjXyV.mjs";
2
+ import { t as ClubInfo } from "../club-CcV6Gouv.mjs";
3
+ import { t as YearInfo } from "../year-C02MQex_.mjs";
4
+ export { Attd, BS, ClubInfo, Expense, FinancialDatum, General, PL, Revenue, SeasonResult, YearInfo };
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1,2 @@
1
+ import { t as YearInfo } from "../year-CSrJssAF.cjs";
2
+ export { YearInfo };
@@ -0,0 +1,2 @@
1
+ import { t as YearInfo } from "../year-C02MQex_.mjs";
2
+ export { YearInfo };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,9 @@
1
+ //#region src/types/year.d.ts
2
+ type YearInfo = {
3
+ id: string;
4
+ year: number;
5
+ categories: ("J1" | "J2" | "J3")[];
6
+ };
7
+ //#endregion
8
+ export { YearInfo as t };
9
+ //# sourceMappingURL=year-C02MQex_.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"year-C02MQex_.d.mts","names":[],"sources":["../src/types/year.ts"],"sourcesContent":[],"mappings":";KAAY,QAAA;EAAA,EAAA,EAAA,MAAA"}
@@ -0,0 +1,9 @@
1
+ //#region src/types/year.d.ts
2
+ type YearInfo = {
3
+ id: string;
4
+ year: number;
5
+ categories: ("J1" | "J2" | "J3")[];
6
+ };
7
+ //#endregion
8
+ export { YearInfo as t };
9
+ //# sourceMappingURL=year-CSrJssAF.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"year-CSrJssAF.d.cts","names":[],"sources":["../src/types/year.ts"],"sourcesContent":[],"mappings":";KAAY,QAAA;EAAA,EAAA,EAAA,MAAA"}
File without changes
@@ -0,0 +1,157 @@
1
+ //#region src/data/years.json
2
+ var years_default = [
3
+ {
4
+ "id": "2005",
5
+ "year": 2005,
6
+ "categories": ["J1", "J2"]
7
+ },
8
+ {
9
+ "id": "2006",
10
+ "year": 2006,
11
+ "categories": ["J1", "J2"]
12
+ },
13
+ {
14
+ "id": "2007",
15
+ "year": 2007,
16
+ "categories": ["J1", "J2"]
17
+ },
18
+ {
19
+ "id": "2008",
20
+ "year": 2008,
21
+ "categories": ["J1", "J2"]
22
+ },
23
+ {
24
+ "id": "2009",
25
+ "year": 2009,
26
+ "categories": ["J1", "J2"]
27
+ },
28
+ {
29
+ "id": "2010",
30
+ "year": 2010,
31
+ "categories": ["J1", "J2"]
32
+ },
33
+ {
34
+ "id": "2011",
35
+ "year": 2011,
36
+ "categories": ["J1", "J2"]
37
+ },
38
+ {
39
+ "id": "2012",
40
+ "year": 2012,
41
+ "categories": ["J1", "J2"]
42
+ },
43
+ {
44
+ "id": "2013",
45
+ "year": 2013,
46
+ "categories": ["J1", "J2"]
47
+ },
48
+ {
49
+ "id": "2014",
50
+ "year": 2014,
51
+ "categories": [
52
+ "J1",
53
+ "J2",
54
+ "J3"
55
+ ]
56
+ },
57
+ {
58
+ "id": "2015",
59
+ "year": 2015,
60
+ "categories": [
61
+ "J1",
62
+ "J2",
63
+ "J3"
64
+ ]
65
+ },
66
+ {
67
+ "id": "2016",
68
+ "year": 2016,
69
+ "categories": [
70
+ "J1",
71
+ "J2",
72
+ "J3"
73
+ ]
74
+ },
75
+ {
76
+ "id": "2017",
77
+ "year": 2017,
78
+ "categories": [
79
+ "J1",
80
+ "J2",
81
+ "J3"
82
+ ]
83
+ },
84
+ {
85
+ "id": "2018",
86
+ "year": 2018,
87
+ "categories": [
88
+ "J1",
89
+ "J2",
90
+ "J3"
91
+ ]
92
+ },
93
+ {
94
+ "id": "2019",
95
+ "year": 2019,
96
+ "categories": [
97
+ "J1",
98
+ "J2",
99
+ "J3"
100
+ ]
101
+ },
102
+ {
103
+ "id": "2020",
104
+ "year": 2020,
105
+ "categories": [
106
+ "J1",
107
+ "J2",
108
+ "J3"
109
+ ]
110
+ },
111
+ {
112
+ "id": "2021",
113
+ "year": 2021,
114
+ "categories": [
115
+ "J1",
116
+ "J2",
117
+ "J3"
118
+ ]
119
+ },
120
+ {
121
+ "id": "2022",
122
+ "year": 2022,
123
+ "categories": [
124
+ "J1",
125
+ "J2",
126
+ "J3"
127
+ ]
128
+ },
129
+ {
130
+ "id": "2023",
131
+ "year": 2023,
132
+ "categories": [
133
+ "J1",
134
+ "J2",
135
+ "J3"
136
+ ]
137
+ },
138
+ {
139
+ "id": "2024",
140
+ "year": 2024,
141
+ "categories": [
142
+ "J1",
143
+ "J2",
144
+ "J3"
145
+ ]
146
+ }
147
+ ];
148
+
149
+ //#endregion
150
+ //#region src/years.ts
151
+ function getAllYears() {
152
+ return years_default;
153
+ }
154
+
155
+ //#endregion
156
+ export { getAllYears as t };
157
+ //# sourceMappingURL=years-6Ii8ZNVQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"years-6Ii8ZNVQ.mjs","names":["years"],"sources":["../src/data/years.json","../src/years.ts"],"sourcesContent":["","import type { YearInfo } from \"./types\";\nimport years from \"./data/years.json\";\n\nexport function getAllYears() {\n return years as YearInfo[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACGA,SAAgB,cAAc;AAC5B,QAAOA"}
@@ -0,0 +1,162 @@
1
+
2
+ //#region src/data/years.json
3
+ var years_default = [
4
+ {
5
+ "id": "2005",
6
+ "year": 2005,
7
+ "categories": ["J1", "J2"]
8
+ },
9
+ {
10
+ "id": "2006",
11
+ "year": 2006,
12
+ "categories": ["J1", "J2"]
13
+ },
14
+ {
15
+ "id": "2007",
16
+ "year": 2007,
17
+ "categories": ["J1", "J2"]
18
+ },
19
+ {
20
+ "id": "2008",
21
+ "year": 2008,
22
+ "categories": ["J1", "J2"]
23
+ },
24
+ {
25
+ "id": "2009",
26
+ "year": 2009,
27
+ "categories": ["J1", "J2"]
28
+ },
29
+ {
30
+ "id": "2010",
31
+ "year": 2010,
32
+ "categories": ["J1", "J2"]
33
+ },
34
+ {
35
+ "id": "2011",
36
+ "year": 2011,
37
+ "categories": ["J1", "J2"]
38
+ },
39
+ {
40
+ "id": "2012",
41
+ "year": 2012,
42
+ "categories": ["J1", "J2"]
43
+ },
44
+ {
45
+ "id": "2013",
46
+ "year": 2013,
47
+ "categories": ["J1", "J2"]
48
+ },
49
+ {
50
+ "id": "2014",
51
+ "year": 2014,
52
+ "categories": [
53
+ "J1",
54
+ "J2",
55
+ "J3"
56
+ ]
57
+ },
58
+ {
59
+ "id": "2015",
60
+ "year": 2015,
61
+ "categories": [
62
+ "J1",
63
+ "J2",
64
+ "J3"
65
+ ]
66
+ },
67
+ {
68
+ "id": "2016",
69
+ "year": 2016,
70
+ "categories": [
71
+ "J1",
72
+ "J2",
73
+ "J3"
74
+ ]
75
+ },
76
+ {
77
+ "id": "2017",
78
+ "year": 2017,
79
+ "categories": [
80
+ "J1",
81
+ "J2",
82
+ "J3"
83
+ ]
84
+ },
85
+ {
86
+ "id": "2018",
87
+ "year": 2018,
88
+ "categories": [
89
+ "J1",
90
+ "J2",
91
+ "J3"
92
+ ]
93
+ },
94
+ {
95
+ "id": "2019",
96
+ "year": 2019,
97
+ "categories": [
98
+ "J1",
99
+ "J2",
100
+ "J3"
101
+ ]
102
+ },
103
+ {
104
+ "id": "2020",
105
+ "year": 2020,
106
+ "categories": [
107
+ "J1",
108
+ "J2",
109
+ "J3"
110
+ ]
111
+ },
112
+ {
113
+ "id": "2021",
114
+ "year": 2021,
115
+ "categories": [
116
+ "J1",
117
+ "J2",
118
+ "J3"
119
+ ]
120
+ },
121
+ {
122
+ "id": "2022",
123
+ "year": 2022,
124
+ "categories": [
125
+ "J1",
126
+ "J2",
127
+ "J3"
128
+ ]
129
+ },
130
+ {
131
+ "id": "2023",
132
+ "year": 2023,
133
+ "categories": [
134
+ "J1",
135
+ "J2",
136
+ "J3"
137
+ ]
138
+ },
139
+ {
140
+ "id": "2024",
141
+ "year": 2024,
142
+ "categories": [
143
+ "J1",
144
+ "J2",
145
+ "J3"
146
+ ]
147
+ }
148
+ ];
149
+
150
+ //#endregion
151
+ //#region src/years.ts
152
+ function getAllYears() {
153
+ return years_default;
154
+ }
155
+
156
+ //#endregion
157
+ Object.defineProperty(exports, 'getAllYears', {
158
+ enumerable: true,
159
+ get: function () {
160
+ return getAllYears;
161
+ }
162
+ });
package/dist/years.cjs ADDED
@@ -0,0 +1,3 @@
1
+ const require_years = require('./years-DRN0nquf.cjs');
2
+
3
+ exports.getAllYears = require_years.getAllYears;
@@ -0,0 +1,8 @@
1
+ import { t as YearInfo } from "./year-CSrJssAF.cjs";
2
+ import "./types/index.cjs";
3
+
4
+ //#region src/years.d.ts
5
+ declare function getAllYears(): YearInfo[];
6
+ //#endregion
7
+ export { getAllYears };
8
+ //# sourceMappingURL=years.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"years.d.cts","names":[],"sources":["../src/years.ts"],"sourcesContent":[],"mappings":";;;;iBAGgB,WAAA,CAAA,GACE"}
@@ -0,0 +1,8 @@
1
+ import { t as YearInfo } from "./year-C02MQex_.mjs";
2
+ import "./types/index.mjs";
3
+
4
+ //#region src/years.d.ts
5
+ declare function getAllYears(): YearInfo[];
6
+ //#endregion
7
+ export { getAllYears };
8
+ //# sourceMappingURL=years.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"years.d.mts","names":[],"sources":["../src/years.ts"],"sourcesContent":[],"mappings":";;;;iBAGgB,WAAA,CAAA,GACE"}
package/dist/years.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { t as getAllYears } from "./years-6Ii8ZNVQ.mjs";
2
+
3
+ export { getAllYears };
@@ -0,0 +1,4 @@
1
+ import { defineConfig } from "eslint/config";
2
+ import { config as libraryConfig } from "@repo/eslint-config/library";
3
+
4
+ export default defineConfig(...libraryConfig);
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@cieloazul310/jclub-financial-utils",
3
+ "version": "0.0.1-alpha.0",
4
+ "license": "MIT",
5
+ "homepage": "https://github.com/cieloazul310/jclub-financial-table",
6
+ "author": {
7
+ "name": "cieloazul310",
8
+ "url": "https://cieloazul310.github.io"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/cieloazul310/jclub-financial-table.git",
13
+ "directory": "packages/utils"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ },
19
+ "type": "module",
20
+ "main": "./dist/index.cjs",
21
+ "module": "./dist/index.mjs",
22
+ "types": "./dist/index.d.mts",
23
+ "exports": {
24
+ ".": {
25
+ "import": {
26
+ "types": "./dist/index.d.mts",
27
+ "default": "./dist/index.mjs"
28
+ },
29
+ "require": {
30
+ "types": "./dist/index.d.cts",
31
+ "default": "./dist/index.cjs"
32
+ }
33
+ },
34
+ "./types": {
35
+ "import": {
36
+ "types": "./dist/types/index.d.mts",
37
+ "default": "./dist/types/index.mjs"
38
+ },
39
+ "require": {
40
+ "types": "./dist/types/index.d.cts",
41
+ "default": "./dist/types/index.cjs"
42
+ }
43
+ },
44
+ "./package.json": "./package.json"
45
+ },
46
+ "scripts": {
47
+ "prebuild": "tsx ./scripts/build.ts",
48
+ "build": "tsdown",
49
+ "dev": "npm run build -- --watch"
50
+ },
51
+ "devDependencies": {
52
+ "@repo/eslint-config": "^0.0.1-alpha.0",
53
+ "@repo/typescript-config": "^0.0.1-alpha.0",
54
+ "@types/node": "^24.9.1",
55
+ "eslint": "^9.34.0",
56
+ "tsdown": "^0.18.2",
57
+ "tsx": "^4.20.6",
58
+ "yaml": "^2.8.1"
59
+ },
60
+ "lint-staged": {
61
+ "**/*.{js,mjs,cjs,ts,tsx}": [
62
+ "eslint --fix",
63
+ "prettier --parser typescript --write"
64
+ ]
65
+ }
66
+ }
@@ -0,0 +1,18 @@
1
+ import { readFile, writeFile, mkdir } from "fs/promises";
2
+ import { resolve, join } from "path";
3
+ import { parse } from "yaml";
4
+
5
+ export async function buildClubs() {
6
+ const __dirname = import.meta.dirname;
7
+ const outDir = resolve(__dirname, "../src/data");
8
+ await mkdir(outDir, { recursive: true });
9
+
10
+ const file = await readFile(resolve(__dirname, "../clubs.yml"), "utf8");
11
+ const parsed = parse(file);
12
+
13
+ await writeFile(
14
+ join(outDir, "clubs.json"),
15
+ JSON.stringify(parsed, null, 2),
16
+ "utf8",
17
+ );
18
+ }
@@ -0,0 +1,18 @@
1
+ import { readFile, writeFile, mkdir } from "fs/promises";
2
+ import { resolve, join } from "path";
3
+ import { parse } from "yaml";
4
+
5
+ export async function buildDictonary() {
6
+ const __dirname = import.meta.dirname;
7
+ const outDir = resolve(__dirname, "../src/data");
8
+ await mkdir(outDir, { recursive: true });
9
+
10
+ const file = await readFile(resolve(__dirname, "../dictionary.yml"), "utf8");
11
+ const parsed = parse(file);
12
+
13
+ await writeFile(
14
+ join(outDir, "dictionary.json"),
15
+ JSON.stringify(parsed, null, 2),
16
+ "utf8",
17
+ );
18
+ }
@@ -0,0 +1,18 @@
1
+ import { readFile, writeFile, mkdir } from "fs/promises";
2
+ import { resolve, join } from "path";
3
+ import { parse } from "yaml";
4
+
5
+ export async function buildYears() {
6
+ const __dirname = import.meta.dirname;
7
+ const outDir = resolve(__dirname, "../src/data");
8
+ await mkdir(outDir, { recursive: true });
9
+
10
+ const file = await readFile(resolve(__dirname, "../years.yml"), "utf8");
11
+ const parsed = parse(file);
12
+
13
+ await writeFile(
14
+ join(outDir, "years.json"),
15
+ JSON.stringify(parsed, null, 2),
16
+ "utf8",
17
+ );
18
+ }
@@ -0,0 +1,21 @@
1
+ import { mkdir } from "fs/promises";
2
+ import { resolve } from "path";
3
+
4
+ import { buildClubs } from "./build-clubs";
5
+ import { buildDictonary } from "./build-dictionary";
6
+ import { buildYears } from "./build-years";
7
+
8
+ const __dirname = import.meta.dirname;
9
+ const outDir = resolve(__dirname, "../src/data");
10
+
11
+ try {
12
+ await mkdir(outDir, { recursive: true });
13
+ await buildDictonary();
14
+ console.log("Build dictionary");
15
+ await buildClubs();
16
+ console.log("Build clubs");
17
+ await buildYears();
18
+ console.log("Build years");
19
+ } catch (e) {
20
+ console.error(e);
21
+ }