@glowlabs-org/utils 0.1.3 → 0.1.4
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/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/create-weekly-report/index.d.ts +3 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/create-weekly-report/index.d.ts +3 -2
- package/package.json +1 -1
- package/src/index.ts +4 -1
- package/src/lib/create-weekly-report/index.ts +1 -5
@@ -14,7 +14,7 @@ export type CreateWeeklyReportArgs = {
|
|
14
14
|
gcaUrls: string[];
|
15
15
|
apiUrl: string;
|
16
16
|
};
|
17
|
-
export declare function
|
17
|
+
export declare function createWeeklyReportLegacy(args: CreateWeeklyReportArgs): Promise<{
|
18
18
|
headlineStats: {
|
19
19
|
weekNumber: number;
|
20
20
|
totalCreditsProduced: string;
|
@@ -36,7 +36,8 @@ export declare function createWeeklyReport({ week, gcaUrls, apiUrl, }: CreateWee
|
|
36
36
|
}[];
|
37
37
|
farms: import("./types").Farm[];
|
38
38
|
rawData: import("./types").GCAServerResponse;
|
39
|
-
}
|
39
|
+
}>;
|
40
|
+
export declare function createWeeklyReport({ week, gcaUrls, apiUrl, }: CreateWeeklyReportArgs): Promise<{
|
40
41
|
headlineStats: {
|
41
42
|
weekNumber: number;
|
42
43
|
totalCreditsProduced: string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -1,3 +1,6 @@
|
|
1
1
|
export * from "./lib/create-weekly-report/types/index";
|
2
2
|
export * from "./constants/index";
|
3
|
-
export {
|
3
|
+
export {
|
4
|
+
createWeeklyReport,
|
5
|
+
createWeeklyReportLegacy,
|
6
|
+
} from "./lib/create-weekly-report/index";
|
@@ -39,7 +39,7 @@ export type CreateWeeklyReportArgs = {
|
|
39
39
|
apiUrl: string;
|
40
40
|
};
|
41
41
|
|
42
|
-
async function createWeeklyReportLegacy(args: CreateWeeklyReportArgs) {
|
42
|
+
export async function createWeeklyReportLegacy(args: CreateWeeklyReportArgs) {
|
43
43
|
const mapLegacy = new Map<string, MerkleLeafIntermediary>();
|
44
44
|
|
45
45
|
function addValueToMapLegacy(
|
@@ -372,10 +372,6 @@ export async function createWeeklyReport({
|
|
372
372
|
gcaUrls,
|
373
373
|
apiUrl,
|
374
374
|
}: CreateWeeklyReportArgs) {
|
375
|
-
if (week < 72) {
|
376
|
-
return createWeeklyReportLegacy({ week, gcaUrls, apiUrl });
|
377
|
-
}
|
378
|
-
|
379
375
|
const map = new Map<string, MerkleLeaf>();
|
380
376
|
|
381
377
|
const [apiResponse, auditsRes] = await Promise.all([
|