Skip to content

Commit

Permalink
Merge pull request #590 from cosmology-tech/esm-comp
Browse files Browse the repository at this point in the history
Esm compatibility
  • Loading branch information
Zetazzz authored Mar 20, 2024
2 parents 565c926 + 3734798 commit 7daeedf
Show file tree
Hide file tree
Showing 633 changed files with 3,652 additions and 3,347 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ See [RPC Clients](#rpc-clients) for more info.
| `removeUnusedImports` | removes unused imports | `true` |
| `classesUseArrowFunctions` | classes use arrow functions instead of `bind()`ing in constructors | `false` |
| `includeExternalHelpers` | exports a few helpers functions in `extern.ts` | `false` |
| `restoreImportExtension` | restore extensions of imported paths. e.g: '.js'. null means no ext | `null` |

## Types

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute";
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute.js";
import { AminoMsg } from "@cosmjs/amino";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit.js";
export interface MsgSignProviderAttributesAminoType extends AminoMsg {
type: "akash/audit/testonly-sign-provider-attributes";
value: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute";
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute.js";
import { GeneratedType, Registry } from "@cosmjs/proto-signing";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit.js";
export const registry: ReadonlyArray<[string, GeneratedType]> = [["/akash.audit.v1beta1.MsgSignProviderAttributes", MsgSignProviderAttributes], ["/akash.audit.v1beta1.MsgDeleteProviderAttributes", MsgDeleteProviderAttributes]];
export const load = (protoRegistry: Registry) => {
registry.forEach(([typeUrl, mod]) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute";
import { Rpc } from "../../../helpers";
import { BinaryReader } from "../../../binary";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgSignProviderAttributesResponse, MsgSignProviderAttributesResponseSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType, MsgDeleteProviderAttributesResponse, MsgDeleteProviderAttributesResponseSDKType } from "./audit";
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute.js";
import { Rpc } from "../../../helpers.js";
import { BinaryReader } from "../../../binary.js";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgSignProviderAttributesResponse, MsgSignProviderAttributesResponseSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType, MsgDeleteProviderAttributesResponse, MsgDeleteProviderAttributesResponseSDKType } from "./audit.js";
/** Msg defines the provider Msg service */
export interface Msg {
/** SignProviderAttributes defines a method that signs provider attributes */
Expand Down
6 changes: 3 additions & 3 deletions __fixtures__/v-next/outputv4/akash/audit/v1beta1/audit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { Attribute, AttributeSDKType } from "../../base/v1beta1/attribute.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.audit.v1beta1";
/** Provider stores owner auditor and attributes details */
export interface Provider {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute";
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute.js";
import { AminoMsg } from "@cosmjs/amino";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit.js";
export interface MsgSignProviderAttributesAminoType extends AminoMsg {
type: "mymessage-testonly";
value: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute";
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute.js";
import { GeneratedType, Registry } from "@cosmjs/proto-signing";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType } from "./audit.js";
export const registry: ReadonlyArray<[string, GeneratedType]> = [["/akash.audit.v1beta2.MsgSignProviderAttributes", MsgSignProviderAttributes], ["/akash.audit.v1beta2.MsgDeleteProviderAttributes", MsgDeleteProviderAttributes]];
export const load = (protoRegistry: Registry) => {
registry.forEach(([typeUrl, mod]) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute";
import { Rpc } from "../../../helpers";
import { BinaryReader } from "../../../binary";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgSignProviderAttributesResponse, MsgSignProviderAttributesResponseSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType, MsgDeleteProviderAttributesResponse, MsgDeleteProviderAttributesResponseSDKType } from "./audit";
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute.js";
import { Rpc } from "../../../helpers.js";
import { BinaryReader } from "../../../binary.js";
import { MsgSignProviderAttributes, MsgSignProviderAttributesSDKType, MsgSignProviderAttributesResponse, MsgSignProviderAttributesResponseSDKType, MsgDeleteProviderAttributes, MsgDeleteProviderAttributesSDKType, MsgDeleteProviderAttributesResponse, MsgDeleteProviderAttributesResponseSDKType } from "./audit.js";
/** Msg defines the provider Msg service */
export interface Msg {
/** SignProviderAttributes defines a method that signs provider attributes */
Expand Down
6 changes: 3 additions & 3 deletions __fixtures__/v-next/outputv4/akash/audit/v1beta2/audit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.audit.v1beta2";
/** Provider stores owner auditor and attributes details */
export interface Provider {
Expand Down
6 changes: 3 additions & 3 deletions __fixtures__/v-next/outputv4/akash/audit/v1beta2/genesis.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AuditedAttributes, AuditedAttributesSDKType } from "./audit";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { DeepPartial, Exact } from "../../../helpers";
import { AuditedAttributes, AuditedAttributesSDKType } from "./audit.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.audit.v1beta2";
/** GenesisState defines the basic genesis state used by audit module */
export interface GenesisState {
Expand Down
8 changes: 4 additions & 4 deletions __fixtures__/v-next/outputv4/akash/audit/v1beta2/query.lcd.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination";
import { Provider, ProviderSDKType } from "./audit";
import { setPaginationParams } from "../../../helpers";
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination.js";
import { Provider, ProviderSDKType } from "./audit.js";
import { setPaginationParams } from "../../../helpers.js";
import { LCDClient } from "@cosmology/lcd";
import { QueryAllProvidersAttributesRequest, QueryAllProvidersAttributesRequestSDKType, QueryProvidersResponse, QueryProvidersResponseSDKType, QueryProviderAttributesRequest, QueryProviderAttributesRequestSDKType, QueryProviderAuditorRequest, QueryProviderAuditorRequestSDKType, QueryAuditorAttributesRequest, QueryAuditorAttributesRequestSDKType } from "./query";
import { QueryAllProvidersAttributesRequest, QueryAllProvidersAttributesRequestSDKType, QueryProvidersResponse, QueryProvidersResponseSDKType, QueryProviderAttributesRequest, QueryProviderAttributesRequestSDKType, QueryProviderAuditorRequest, QueryProviderAuditorRequestSDKType, QueryAuditorAttributesRequest, QueryAuditorAttributesRequestSDKType } from "./query.js";
export class LCDQueryClient {
req: LCDClient;
constructor({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination";
import { Provider, ProviderSDKType } from "./audit";
import { Rpc } from "../../../helpers";
import { BinaryReader } from "../../../binary";
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination.js";
import { Provider, ProviderSDKType } from "./audit.js";
import { Rpc } from "../../../helpers.js";
import { BinaryReader } from "../../../binary.js";
import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
import { QueryAllProvidersAttributesRequest, QueryAllProvidersAttributesRequestSDKType, QueryProvidersResponse, QueryProvidersResponseSDKType, QueryProviderAttributesRequest, QueryProviderAttributesRequestSDKType, QueryProviderAuditorRequest, QueryProviderAuditorRequestSDKType, QueryAuditorAttributesRequest, QueryAuditorAttributesRequestSDKType } from "./query";
import { QueryAllProvidersAttributesRequest, QueryAllProvidersAttributesRequestSDKType, QueryProvidersResponse, QueryProvidersResponseSDKType, QueryProviderAttributesRequest, QueryProviderAttributesRequestSDKType, QueryProviderAuditorRequest, QueryProviderAuditorRequestSDKType, QueryAuditorAttributesRequest, QueryAuditorAttributesRequestSDKType } from "./query.js";
/** Query defines the gRPC querier service */
export interface Query {
/**
Expand Down
8 changes: 4 additions & 4 deletions __fixtures__/v-next/outputv4/akash/audit/v1beta2/query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination";
import { Provider, ProviderSDKType } from "./audit";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination.js";
import { Provider, ProviderSDKType } from "./audit.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.audit.v1beta2";
/** QueryProvidersResponse is response type for the Query/Providers RPC method */
export interface QueryProvidersResponse {
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/v-next/outputv4/akash/base/v1beta1/attribute.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta1";
/** Attribute represents key value pair */
export interface Attribute {
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/v-next/outputv4/akash/base/v1beta1/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta1";
/** This describes how the endpoint is implemented when the lease is deployed */
export enum Endpoint_Kind {
Expand Down
10 changes: 5 additions & 5 deletions __fixtures__/v-next/outputv4/akash/base/v1beta1/resource.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ResourceValue, ResourceValueSDKType } from "./resourcevalue";
import { Attribute, AttributeSDKType } from "./attribute";
import { Endpoint, EndpointSDKType } from "./endpoint";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { ResourceValue, ResourceValueSDKType } from "./resourcevalue.js";
import { Attribute, AttributeSDKType } from "./attribute.js";
import { Endpoint, EndpointSDKType } from "./endpoint.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta1";
/** CPU stores resource units and cpu config attributes */
export interface CPU {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta1";
/** Unit stores cpu, memory and storage metrics */
export interface ResourceValue {
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/v-next/outputv4/akash/base/v1beta2/attribute.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta2";
/** Attribute represents key value pair */
export interface Attribute {
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/v-next/outputv4/akash/base/v1beta2/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta2";
/** This describes how the endpoint is implemented when the lease is deployed */
export enum Endpoint_Kind {
Expand Down
8 changes: 4 additions & 4 deletions __fixtures__/v-next/outputv4/akash/base/v1beta2/resource.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ResourceValue, ResourceValueSDKType } from "./resourcevalue";
import { Attribute, AttributeSDKType } from "./attribute";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { ResourceValue, ResourceValueSDKType } from "./resourcevalue.js";
import { Attribute, AttributeSDKType } from "./attribute.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta2";
/** CPU stores resource units and cpu config attributes */
export interface CPU {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CPU, CPUSDKType, Memory, MemorySDKType, Storage, StorageSDKType } from "./resource";
import { Endpoint, EndpointSDKType } from "./endpoint";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, Exact } from "../../../helpers";
import { CPU, CPUSDKType, Memory, MemorySDKType, Storage, StorageSDKType } from "./resource.js";
import { Endpoint, EndpointSDKType } from "./endpoint.js";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta2";
/**
* ResourceUnits describes all available resources types for deployment/node etc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../binary.js";
import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers.js";
export const protobufPackage = "akash.base.v1beta2";
/** Unit stores cpu, memory and storage metrics */
export interface ResourceValue {
Expand Down
Loading

0 comments on commit 7daeedf

Please sign in to comment.