Skip to content

Commit

Permalink
Merge branch 'beta' into feature/JST-883/payment-in-pools
Browse files Browse the repository at this point in the history
  • Loading branch information
SewerynKras committed May 16, 2024
2 parents 6ca3096 + cb11a30 commit 27d7a91
Show file tree
Hide file tree
Showing 14 changed files with 386 additions and 126 deletions.
358 changes: 358 additions & 0 deletions examples/package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GolemConfigError } from "../../shared/error/golem-error";
import { GolemConfigError } from "../shared/error/golem-error";
import { GolemDeploymentBuilder } from "./builder";
import { GolemNetwork } from "../../golem-network";
import { GolemNetwork } from "../golem-network";
import { imock } from "@johanblumenberg/ts-mockito";

const mockGolemNetwork = imock<GolemNetwork>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { GolemConfigError } from "../../shared/error/golem-error";
import { NetworkOptions } from "../../network";
import { GolemConfigError } from "../shared/error/golem-error";
import { NetworkOptions } from "../network";
import { Deployment, DeploymentComponents } from "./deployment";
import { GolemNetwork } from "../../golem-network";
import { GolemNetwork } from "../golem-network";
import { validateDeployment } from "./validate-deployment";
import { MarketOptions } from "../../market";
import { PaymentModuleOptions } from "../../payment";
import { BuildDemandOptions } from "../../market/demand";
import { MarketOptions } from "../market";
import { PaymentModuleOptions } from "../payment";
import { BuildDemandOptions } from "../market/demand";

interface DeploymentOptions {
replicas?: number | { min: number; max: number };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { GolemAbortError, GolemUserError } from "../../shared/error/golem-error";
import { defaultLogger, Logger, YagnaApi } from "../../shared/utils";
import { GolemAbortError, GolemUserError } from "../shared/error/golem-error";
import { defaultLogger, Logger, YagnaApi } from "../shared/utils";
import { EventEmitter } from "eventemitter3";
import { ActivityModule } from "../../activity";
import { Network, NetworkOptions } from "../../network";
import { GftpStorageProvider, StorageProvider, WebSocketBrowserStorageProvider } from "../../shared/storage";
import { ActivityModule } from "../activity";
import { Network, NetworkOptions } from "../network";
import { GftpStorageProvider, StorageProvider, WebSocketBrowserStorageProvider } from "../shared/storage";
import { validateDeployment } from "./validate-deployment";
import { DemandBuildParams, DraftOfferProposalPool, MarketModule } from "../../market";
import { PaymentModule } from "../../payment";
import { LeaseProcessPool, LeaseProcessPoolOptions } from "../../agreement";
import { DemandBuildParams, DraftOfferProposalPool, MarketModule } from "../market";
import { PaymentModule } from "../payment";
import { CreateActivityPoolOptions } from "./builder";
import { Subscription } from "rxjs";
import { LeaseProcessPool, LeaseProcessPoolOptions } from "../agreement";

export enum DeploymentState {
INITIAL = "INITIAL",
Expand Down
2 changes: 2 additions & 0 deletions src/deployment/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./deployment";
export * from "./builder";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GolemConfigError } from "../../shared/error/golem-error";
import { GolemConfigError } from "../shared/error/golem-error";
import { DeploymentComponents } from "./deployment";

function validateNetworks(components: DeploymentComponents) {
Expand Down
1 change: 0 additions & 1 deletion src/experimental.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./experimental/job";
export * from "./experimental/reputation";
export * from "./experimental/new-api";
3 changes: 2 additions & 1 deletion src/experimental/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./new-api";
export * from "./job";
export * from "./reputation";
18 changes: 0 additions & 18 deletions src/experimental/new-api/index.ts

This file was deleted.

84 changes: 0 additions & 84 deletions src/experimental/new-api/types.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/golem-network.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataTransferProtocol, DeploymentOptions, GolemDeploymentBuilder, MarketOptions } from "./experimental";
import { DataTransferProtocol, DeploymentOptions, GolemDeploymentBuilder } from "./deployment";
import { defaultLogger, Logger, YagnaApi } from "./shared/utils";
import {
Demand,
Expand All @@ -7,6 +7,7 @@ import {
MarketApi,
MarketModule,
MarketModuleImpl,
MarketOptions,
OfferProposal,
} from "./market";
import { PaymentModule, PaymentModuleImpl, PaymentModuleOptions } from "./payment";
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// High-level entry points
export * from "./golem-network";
export * from "./deployment";

// Low level entry points for advanced users
export * from "./market";
Expand Down
4 changes: 2 additions & 2 deletions tests/import/import.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe("ESM Import", () => {
});

test("Import @golem-sdk/golem-js/experimental", async () => {
const { GolemNetwork } = await import("@golem-sdk/golem-js/experimental");
expect(typeof GolemNetwork).toBe("function");
const { Job } = await import("@golem-sdk/golem-js/experimental");
expect(typeof Job).toBe("function");
});
});
4 changes: 2 additions & 2 deletions tests/import/require.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe("CommonJS Import", () => {
});

test("Require @golem-sdk/golem-js/experimental", async () => {
const { GolemNetwork } = require("@golem-sdk/golem-js/experimental");
expect(typeof GolemNetwork).toBe("function");
const { Job } = require("@golem-sdk/golem-js/experimental");
expect(typeof Job).toBe("function");
});
});

0 comments on commit 27d7a91

Please sign in to comment.