Bump dev (sort imports) (#2923)
* Bump dev (sort imports) * Resort * Adjust ApiInterfaceRx
This commit is contained in:
@@ -33,10 +33,10 @@
|
||||
"@polkadot/util": "^4.2.1",
|
||||
"handlebars": "^4.7.6",
|
||||
"websocket": "^1.0.32",
|
||||
"yargs": "^16.1.1"
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/websocket": "^1.0.1",
|
||||
"@types/yargs": "^15.0.10"
|
||||
"@types/yargs": "^15.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
import process from 'process';
|
||||
import yargs from 'yargs';
|
||||
|
||||
import { ApiPromise, WsProvider } from '@polkadot/api/index';
|
||||
|
||||
/** @internal */
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import path from 'path';
|
||||
import yargs from 'yargs';
|
||||
|
||||
import { formatNumber } from '@polkadot/util';
|
||||
import WS from '@polkadot/x-ws';
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import path from 'path';
|
||||
import yargs from 'yargs';
|
||||
|
||||
import * as substrateDefs from '@polkadot/types/interfaces/definitions';
|
||||
|
||||
import { generateInterfaceTypes } from './generate/interfaceRegistry';
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import staticData from '@polkadot/metadata/static';
|
||||
import { Metadata } from '@polkadot/metadata';
|
||||
import staticData from '@polkadot/metadata/static';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { createImports, compareName, formatType, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
import { compareName, createImports, formatType, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
|
||||
const template = readTemplate('consts');
|
||||
const generateForMetaTemplate = Handlebars.compile(template);
|
||||
|
||||
@@ -6,14 +6,14 @@ import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import staticData from '@polkadot/metadata/static';
|
||||
import { Metadata } from '@polkadot/metadata';
|
||||
import staticData from '@polkadot/metadata/static';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { TypeImports, createImports, compareName, formatType, getSimilarTypes, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
import { compareName, createImports, formatType, getSimilarTypes, readTemplate, registerDefinitions, setImports, TypeImports, writeFile } from '../util';
|
||||
import { ModuleTypes } from '../util/imports';
|
||||
|
||||
// From a storage entry metadata, we return [args, returnType]
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
import type { Definitions } from '@polkadot/types/types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
|
||||
|
||||
import { createImports, getSimilarTypes, formatType, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
import { createImports, formatType, getSimilarTypes, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
|
||||
const StorageKeyTye = 'StorageKey | string | Uint8Array | any';
|
||||
|
||||
|
||||
@@ -6,12 +6,13 @@ import type { ModuleTypes } from '../util/imports';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
import path from 'path';
|
||||
|
||||
import { getTypeDef } from '@polkadot/types/create';
|
||||
import { TypeDefInfo } from '@polkadot/types/create/types';
|
||||
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
|
||||
import { isString, stringCamelCase, stringUpperFirst, assert } from '@polkadot/util';
|
||||
import { assert, isString, stringCamelCase, stringUpperFirst } from '@polkadot/util';
|
||||
|
||||
import { TypeImports, createImports, exportInterface, exportType, readTemplate, formatType, setImports, writeFile } from '../util';
|
||||
import { createImports, exportInterface, exportType, formatType, readTemplate, setImports, TypeImports, writeFile } from '../util';
|
||||
|
||||
interface Imports extends TypeImports {
|
||||
interfaces: [string, string][];
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
import staticData from '@polkadot/metadata/static';
|
||||
|
||||
import { Metadata } from '@polkadot/metadata';
|
||||
import staticData from '@polkadot/metadata/static';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { createImports, compareName, getSimilarTypes, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
import { compareName, createImports, getSimilarTypes, readTemplate, registerDefinitions, setImports, writeFile } from '../util';
|
||||
|
||||
const MAPPED_NAMES: Record<string, string> = {
|
||||
new: 'updated'
|
||||
|
||||
@@ -5,14 +5,15 @@ import type { MetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
|
||||
|
||||
import fs from 'fs';
|
||||
|
||||
import { Metadata } from '@polkadot/metadata';
|
||||
import rpcdata from '@polkadot/metadata/static';
|
||||
import { GenericCall as Call } from '@polkadot/types/generic';
|
||||
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { Vec } from '@polkadot/types/codec';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { GenericCall as Call } from '@polkadot/types/generic';
|
||||
import * as definitions from '@polkadot/types/interfaces/definitions';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
|
||||
import { stringCamelCase, stringLowerFirst } from '@polkadot/util';
|
||||
|
||||
interface Page {
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
import type { TypeDef } from '@polkadot/types/create/types';
|
||||
import type { Constructor, Registry } from '@polkadot/types/types';
|
||||
|
||||
import { ClassOfUnsafe, getTypeDef } from '@polkadot/types/create';
|
||||
import { Compact, Enum, Option, Struct, UInt, Vec, Tuple } from '@polkadot/types/codec';
|
||||
import { Compact, Enum, Option, Struct, Tuple, UInt, Vec } from '@polkadot/types/codec';
|
||||
import { AbstractInt } from '@polkadot/types/codec/AbstractInt';
|
||||
import { AllConvictions } from '@polkadot/types/interfaces/democracy/definitions';
|
||||
import { GenericAccountId, GenericLookupSource, GenericVote } from '@polkadot/types/generic';
|
||||
import { ClassOfUnsafe, getTypeDef } from '@polkadot/types/create';
|
||||
import { TypeDefInfo } from '@polkadot/types/create/types';
|
||||
import { GenericAccountId, GenericLookupSource, GenericVote } from '@polkadot/types/generic';
|
||||
import { AllConvictions } from '@polkadot/types/interfaces/democracy/definitions';
|
||||
import { Null } from '@polkadot/types/primitive';
|
||||
import * as primitiveClasses from '@polkadot/types/primitive';
|
||||
import { isChildClass } from '@polkadot/util';
|
||||
|
||||
import { isCompactEncodable } from './class';
|
||||
import { formatType } from './formatting';
|
||||
import { setImports, ModuleTypes, TypeImports } from './imports';
|
||||
import { ModuleTypes, setImports, TypeImports } from './imports';
|
||||
|
||||
function arrayToStrType (arr: string[]): string {
|
||||
return `${arr.map((c) => `'${c}'`).join(' | ')}`;
|
||||
|
||||
@@ -9,8 +9,8 @@ import { getTypeDef, paramsNotation } from '@polkadot/types/create';
|
||||
import { TypeDefInfo } from '@polkadot/types/create/types';
|
||||
import { isString } from '@polkadot/util';
|
||||
|
||||
import { setImports, ModuleTypes, TypeImports } from './imports';
|
||||
import { readTemplate } from './file';
|
||||
import { ModuleTypes, setImports, TypeImports } from './imports';
|
||||
|
||||
interface ImportDef {
|
||||
file: string;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Copyright 2017-2020 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { TypeDefInfo } from '@polkadot/types/create/types';
|
||||
|
||||
import * as codecClasses from '@polkadot/types/codec';
|
||||
import { getTypeDef } from '@polkadot/types/create';
|
||||
import { TypeDefInfo } from '@polkadot/types/create/types';
|
||||
import * as extrinsicClasses from '@polkadot/types/extrinsic';
|
||||
import * as genericClasses from '@polkadot/types/generic';
|
||||
import * as primitiveClasses from '@polkadot/types/primitive';
|
||||
|
||||
Reference in New Issue
Block a user