Split registry & lookup augmentation (#4376)
* Split registry & lookup augmentation * Fix package path * Adjust CC paths, fix detectPackage * Adjust rollup config * Adjust rollup in-process packages * Re-adjust rollup (OCD...)
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
"@polkadot/rpc-provider": "7.0.3-0",
|
||||
"@polkadot/types": "7.0.3-0",
|
||||
"@polkadot/types-augment": "7.0.3-0",
|
||||
"@polkadot/types-augment-lookup": "7.0.3-0",
|
||||
"@polkadot/types-augment-registry": "7.0.3-0",
|
||||
"@polkadot/types-codec": "7.0.3-0",
|
||||
"@polkadot/types-create": "7.0.3-0",
|
||||
"@polkadot/types-support": "7.0.3-0",
|
||||
|
||||
@@ -4,19 +4,10 @@
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
const alias = {
|
||||
'^@polkadot/api-augment(.*)': './packages/api-augment/src\\1',
|
||||
'^@polkadot/api-base(.*)': './packages/api-base/src\\1',
|
||||
'^@polkadot/api-derive(.*)': './packages/api-derive/src\\1',
|
||||
'^@polkadot/api-(augment|base|derive)(.*)': './packages/api-\\1/src\\2',
|
||||
'^@polkadot/api(.*)': './packages/api/src/\\1',
|
||||
'^@polkadot/rpc-augment(.*)': './packages/rpc-augment/src\\1',
|
||||
'^@polkadot/rpc-core(.*)': './packages/rpc-core/src\\1',
|
||||
'^@polkadot/rpc-provider(.*)': './packages/rpc-provider/src\\1',
|
||||
'^@polkadot/types-(augment)(.*)': './packages/types-\\1/src\\2',
|
||||
'^@polkadot/types-codec(.*)': './packages/types-codec/src\\1',
|
||||
'^@polkadot/types-create(.*)': './packages/types-create/src\\1',
|
||||
'^@polkadot/types-known(.*)': './packages/types-known/src\\1',
|
||||
'^@polkadot/types-metadata(.*)': './packages/types-metadata/src\\1',
|
||||
'^@polkadot/types-support(.*)': './packages/types-support/src\\1',
|
||||
'^@polkadot/rpc-(augment|core|provider)(.*)': './packages/rpc-\\1/src\\2',
|
||||
'^@polkadot/types-(augment-lookup|augment-registry|augment|codec|create|known|metadata|support)(.*)': './packages/types-\\1/src\\2',
|
||||
'^@polkadot/types(.*)': './packages/types/src\\1'
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { Definitions } from '@polkadot/types/types';
|
||||
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
|
||||
import lookupDefinitions from '@polkadot/types-augment-lookup/augment/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, initMeta, readTemplate, setImports, writeFile } from '../util';
|
||||
|
||||
@@ -9,7 +9,7 @@ import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { Definitions } from '@polkadot/types/types';
|
||||
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
|
||||
import lookupDefinitions from '@polkadot/types-augment-lookup/augment/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, initMeta, readTemplate, setImports, writeFile } from '../util';
|
||||
|
||||
@@ -79,6 +79,6 @@ export function generateInterfaceTypes (importDefinitions: { [importPath: string
|
||||
export function generateDefaultInterface (): void {
|
||||
generateInterfaceTypes(
|
||||
{ '@polkadot/types/interfaces': defaultDefinitions },
|
||||
'packages/types-augment/src/augment/registry.ts'
|
||||
'packages/types-augment-registry/src/augment.ts'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ function generateLookup (destDir: string, entries: [string | undefined, HexStrin
|
||||
}
|
||||
|
||||
// Generate `packages/types/src/lookup/*s`, the registry of all lookup types
|
||||
export function generateDefaultLookup (destDir = 'packages/types-augment/src/augment/lookup', staticData?: HexString): void {
|
||||
export function generateDefaultLookup (destDir = 'packages/types-augment-lookup/src/augment', staticData?: HexString): void {
|
||||
generateLookup(
|
||||
destDir,
|
||||
staticData
|
||||
|
||||
@@ -11,7 +11,7 @@ import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { unwrapStorageSi } from '@polkadot/types/primitive/StorageKey';
|
||||
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
|
||||
import lookupDefinitions from '@polkadot/types-augment-lookup/augment/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, TypeImports, writeFile } from '../util';
|
||||
|
||||
@@ -10,7 +10,7 @@ import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
|
||||
import lookupDefinitions from '@polkadot/types-augment-lookup/augment/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util';
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
{ "path": "../rpc-provider" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-augment" },
|
||||
{ "path": "../types-augment-lookup" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-create" },
|
||||
{ "path": "../types-support" }
|
||||
|
||||
Reference in New Issue
Block a user