Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cli/src/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import {
import { DerivedFees, DerivedBalances } from '@polkadot/api-derive/types';
import { CLIError } from '@oclif/errors';
import ExitCodes from './ExitCodes';
import { Worker, Lead as WorkerLead, WorkerId, WorkerRoleStakeProfile } from '@joystream/types/lib/working-group';
import { MemberId, Profile } from '@joystream/types/lib/members';
import { RewardRelationship, RewardRelationshipId } from '@joystream/types/lib/recurring-rewards';
import { Stake, StakeId } from '@joystream/types/lib/stake';
import { Worker, Lead as WorkerLead, WorkerId, WorkerRoleStakeProfile } from '@joystream/types/working-group';
import { MemberId, Profile } from '@joystream/types/members';
import { RewardRelationship, RewardRelationshipId } from '@joystream/types/recurring-rewards';
import { Stake, StakeId } from '@joystream/types/stake';
import { LinkageResult } from '@polkadot/types/codec/Linkage';

export const DEFAULT_API_URI = 'wss://rome-rpc-endpoint.joystream.org:9944/';
Expand Down
6 changes: 3 additions & 3 deletions cli/src/Types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import BN from 'bn.js';
import { ElectionStage, Seat } from '@joystream/types/lib/council';
import { ElectionStage, Seat } from '@joystream/types/council';
import { Option } from '@polkadot/types';
import { BlockNumber, Balance, AccountId } from '@polkadot/types/interfaces';
import { DerivedBalances } from '@polkadot/api-derive/types';
import { KeyringPair } from '@polkadot/keyring/types';
import { WorkerId, Lead } from '@joystream/types/lib/working-group';
import { Profile, MemberId } from '@joystream/types/lib/members';
import { WorkerId, Lead } from '@joystream/types/working-group';
import { Profile, MemberId } from '@joystream/types/members';

// KeyringPair type extended with mandatory "meta.name"
// It's used for accounts/keys management within CLI.
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/council/info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElectionStage } from '@joystream/types/lib/council';
import { ElectionStage } from '@joystream/types/council';
import { formatNumber, formatBalance } from '@polkadot/util';
import { BlockNumber } from '@polkadot/types/interfaces';
import { CouncilInfoObj, NameValueObj } from '../../Types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { KeyringPair } from '@polkadot/keyring/types';
import { ApiWrapper } from '../../utils/apiWrapper';
import { Keyring } from '@polkadot/api';
import BN from 'bn.js';
import { Seat } from '@constantinople/types/lib/council';
import { Seat } from '@constantinople/types/council';
import { assert } from 'chai';
import { v4 as uuid } from 'uuid';
import { Utils } from '../../utils/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ApiWrapper } from '../../../utils/apiWrapper';
import { v4 as uuid } from 'uuid';
import BN from 'bn.js';
import { assert } from 'chai';
import { RoleParameters } from '@constantinople/types/lib/roles';
import { RoleParameters } from '@constantinople/types/roles';
import tap from 'tap';

export function storageRoleParametersProposalTest(
Expand Down
10 changes: 5 additions & 5 deletions tests/network-tests/src/constantinople/utils/apiWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { ApiPromise, WsProvider } from '@polkadot/api';
import { Option, Vec, Bytes, u32 } from '@polkadot/types';
import { Codec } from '@polkadot/types/types';
import { KeyringPair } from '@polkadot/keyring/types';
import { UserInfo, PaidMembershipTerms, MemberId } from '@constantinople/types/lib/members';
import { Mint, MintId } from '@constantinople/types/lib/mint';
import { Lead, LeadId } from '@constantinople/types/lib/content-working-group';
import { RoleParameters } from '@constantinople/types/lib/roles';
import { Seat } from '@constantinople/types/lib/council';
import { UserInfo, PaidMembershipTerms, MemberId } from '@constantinople/types/members';
import { Mint, MintId } from '@constantinople/types/mint';
import { Lead, LeadId } from '@constantinople/types/content-working-group';
import { RoleParameters } from '@constantinople/types/roles';
import { Seat } from '@constantinople/types/council';
import { Balance, EventRecord, AccountId, BlockNumber, BalanceOf } from '@polkadot/types/interfaces';
import BN from 'bn.js';
import { SubmittableExtrinsic } from '@polkadot/api/types';
Expand Down
2 changes: 1 addition & 1 deletion tests/network-tests/src/constantinople/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { blake2AsHex } from '@polkadot/util-crypto';
import BN from 'bn.js';
import fs from 'fs';
import { decodeAddress } from '@polkadot/keyring';
import { Seat } from '@constantinople/types/lib/council';
import { Seat } from '@constantinople/types/council';

export class Utils {
private static LENGTH_ADDRESS = 32 + 1; // publicKey + prefix
Expand Down
13 changes: 12 additions & 1 deletion types/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
/lib/
# Don't track build artifacts
**/*.js
**/*.d.ts

# JSON files imported by hiring types
hiring/schemas/role.schema.json

# from prior versions
lib/

# artifact of webpack when building pioneer?
build/
6 changes: 6 additions & 0 deletions types/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# keep src/ files, packages is compiled when installed
# src/

# old build artifacts
lib/
build/
16 changes: 8 additions & 8 deletions types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@joystream/types",
"version": "0.11.0",
"description": "Types for Joystream Substrate Runtime - nicaea release",
"main": "lib/index.js",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"prepublish": "npm run build",
"build": "tsc --build tsconfig.json"
Expand All @@ -11,15 +12,14 @@
"maintainers": [],
"dependencies": {
"@polkadot/types": "^0.96.1",
"@polkadot/keyring": "^1.7.0-beta.5",
"@types/lodash": "^4.14.157",
"@types/vfile": "^4.0.0",
"ajv": "^6.11.0",
"lodash": "^4.17.15"
},
"directories": {
"lib": "lib"
},
"devDependencies": {
"typescript": "^3.6.4"
"typescript": "^3.7.2"
},
"engines": {
"node": ">=10.0"
Expand All @@ -30,7 +30,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/Joystream/apps.git"
"url": "git+https://github.com/Joystream/joystream.git"
},
"keywords": [
"substrate",
Expand All @@ -39,7 +39,7 @@
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/Joystream/apps/issues"
"url": "https://github.com/Joystream/joystream/issues"
},
"homepage": "https://github.com/Joystream/packages/joy-types/README.md"
"homepage": "https://github.com/Joystream/joystream"
}
17 changes: 11 additions & 6 deletions types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"declaration": true,
"outDir": "lib",
"resolveJsonModule": true,
"types" : [
"node"
]

"outDir": "./",
"resolveJsonModule": true,
"types" : [
"node"
],
"forceConsistentCasingInFileNames": true
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"**/*.spec.ts",
"**/*.d.ts"
]
}
6 changes: 6 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@
version "0.11.0"
dependencies:
"@polkadot/types" "^0.96.1"
"@types/lodash" "^4.14.157"
"@types/vfile" "^4.0.0"
ajv "^6.11.0"
lodash "^4.17.15"
Expand Down Expand Up @@ -3816,6 +3817,11 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.149.tgz#1342d63d948c6062838fbf961012f74d4e638440"
integrity sha512-ijGqzZt/b7BfzcK9vTrS6MFljQRPn5BFWOx8oE0GYxribu6uV+aA9zZuXI1zc/etK9E8nrgdoF2+LgUw7+9tJQ==

"@types/lodash@^4.14.157":
version "4.14.157"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.157.tgz#fdac1c52448861dfde1a2e1515dbc46e54926dc8"
integrity sha512-Ft5BNFmv2pHDgxV5JDsndOWTRJ+56zte0ZpYLowp03tW+K+t8u8YMOzAnpuqPgzX6WO1XpDIUm7u04M8vdDiVQ==

"@types/marked@^0.7.0":
version "0.7.2"
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.7.2.tgz#1393f076773b55cc7078c0fbeb86a497c69db97e"
Expand Down