Skip to content

Commit

Permalink
Merge pull request #299 from near/serhii/path-fixes
Browse files Browse the repository at this point in the history
Exports and import paths
  • Loading branch information
ailisp authored Nov 14, 2022
2 parents 0b35fb3 + f13671f commit 9e30d01
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 59 deletions.
4 changes: 2 additions & 2 deletions examples/src/standard-nft/my-nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
NearPromise,
PromiseOrValue,
view,
} from "near-sdk-js/lib";
} from "near-sdk-js";
import {
NFTContractMetadata,
NonFungibleTokenMetadataProvider,
Expand All @@ -19,7 +19,7 @@ import {
IntoStorageKey,
Option,
} from "near-contract-standards/lib/non_fungible_token/utils";
import { AccountId } from "near-sdk-js/lib/types";
import { AccountId } from "near-sdk-js";
import { NonFungibleTokenCore } from "near-contract-standards/lib/non_fungible_token/core";
import {
Token,
Expand Down
4 changes: 2 additions & 2 deletions examples/src/standard-nft/test-approval-receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
PromiseOrValue,
assert,
call,
} from "near-sdk-js/lib";
import { AccountId } from "near-sdk-js/lib/types";
} from "near-sdk-js";
import { AccountId } from "near-sdk-js";
import { NonFungibleTokenApprovalReceiver } from "near-contract-standards/lib/non_fungible_token/approval/approval_receiver";

const BASE_GAS = 20_000_000_000_000n;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/standard-nft/test-token-receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
NearBindgen,
NearPromise,
PromiseOrValue,
} from "near-sdk-js/lib";
import { AccountId } from "near-sdk-js/lib/types";
} from "near-sdk-js";
import { AccountId } from "near-sdk-js";

const BASE_GAS = 10_000_000_000_000n;
const PROMISE_CALL = 10_000_000_000_000n;
Expand Down
13 changes: 6 additions & 7 deletions lib/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 6 additions & 37 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
import { call, view, initialize, NearBindgen } from "./near-bindgen";

import * as near from "./api";
import {
LookupMap,
Vector,
LookupSet,
UnorderedMap,
UnorderedSet,
} from "./collections";

import { bytes, Bytes, assert, validateAccountId, serialize } from "./utils";

import { NearPromise, PromiseOrValue } from "./promise";

import { AccountId } from "./types";

export {
call,
view,
initialize,
NearBindgen,
near,
LookupMap,
Vector,
LookupSet,
UnorderedMap,
UnorderedSet,
bytes,
Bytes,
assert,
validateAccountId,
serialize,
NearPromise,
PromiseOrValue,
AccountId,
};
export * as near from "./api";
export * from "./types";
export * from "./near-bindgen";
export * from "./collections";
export * from "./utils";
export * from "./promise";
2 changes: 1 addition & 1 deletion tests/src/highlevel-promise.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NearBindgen, call, NearPromise, near, bytes } from "near-sdk-js";
import { PublicKey } from "near-sdk-js/lib/types";
import { PublicKey } from "near-sdk-js";

function callingData() {
return {
Expand Down
4 changes: 2 additions & 2 deletions tests/src/public-key.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { near, bytes } from "near-sdk-js";
import { CurveType, PublicKey } from "near-sdk-js/lib/types";
import { assert } from "near-sdk-js/lib/utils";
import { CurveType, PublicKey } from "near-sdk-js";
import { assert } from "near-sdk-js";

function runtime_validate_public_key(prefix, public_key) {
let promiseId = near.promiseBatchCreate(prefix + ".pk.test.near");
Expand Down

0 comments on commit 9e30d01

Please sign in to comment.