Add polkadot-types-from-{chain,defs} (#1766)
* Add polkadot-types-from-{chain,defs}
* Generate scripts working
* User types generation docs
* Rebuild with new comment line
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
- [Type basics](start/types.basics.md)
|
||||
- [Type extension](start/types.extend.md)
|
||||
- [TypeScript interfaces](start/typescript.md)
|
||||
- [TypeScript user generated](start/typescript.user.md)
|
||||
|
||||
## Packages
|
||||
|
||||
|
||||
@@ -46,11 +46,6 @@ As of this writing, there are still some gray areas to type detection, specifica
|
||||
- `.at` & `.multi` on `api.query` does not (yet) have a `<TypeOverride>` interface. This means `as <TypeOverride>` casts are presently needed for these results
|
||||
- `api.queryMulti` does not (yet) allow you to provide a hint to the types returned, this ties to the previous point
|
||||
|
||||
In addition to expanding the type coverage, we wish to make the actual generation script for the types from `@polkadot/types/interfaces` available in 2 ways -
|
||||
## Adding user types
|
||||
|
||||
- allowing you to point to a folder of types and auto-generate the TypeScript typings from those. (Which is akin to what we do internally). This would allow a reduction in type classes explicitly written and injected.
|
||||
- once the metadata itself supports full type definitions, the script can be used to generate interface definitions specifically tailored for a chain
|
||||
|
||||
## And that's a wrap
|
||||
|
||||
This brings us to the end of our overview and jump through the API. While the documentation is still very much and ever evolving item, we can encourage you to try out what you have learned with some [examples](../examples). As we [indicated right at the start of this journey](README.md#help-us-help-others), if there are areas for improvement, let us know.
|
||||
In addition to the generated and available interfaces, there is also the ability to [create TypeScript interfaces from your own definitions and well as your on-chain modules](typescript.user.md).
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# TypeScript user generated
|
||||
|
||||
In the previous section we looked at the TypeScript definitions that are available and is generated from both the chain and definitions. Here we will expand upon the use of the infrastructure created to define types as part of the `@polkadot/types` library and see how to use them to generate your onw defintions and chain types.
|
||||
|
||||
## Definitions
|
||||
|
||||
A large part of the type definitions are defined not as classes, but rather as structures from which type definitions are extracted and that can be used as-i to let the API know how to decode a type. By now you should be familiar with [type extensions](types.extend.md), but effectively the [types library does exactly the same](https://github.com/polkadot-js/api/tree/master/packages/types/src/interfaces).
|
||||
|
||||
To create TypeScript-aware definitions and keep your files in a single place, you can follow the same approach. Assuming you have a package named `@MeInc/stuff` where you have the definitions in an `stuff/interfaces` folder. Each sub-folder would indicate a runtime module, e.g. `stuff/interfaces/<module>/definitions.ts` with a root file importing all in `stuff/interfaces/definitions.ts`. With this structure setup, you can generate TypeScript defintions.
|
||||
|
||||
In the root of your project (with the `@polkadot/api`), you can run `yarn polkadot-types-from-defs --input ./stuff/interfaces --package @MeInc/stuff/interfaces` which will create `types.ts` and `index.ts` files with the generated types. You can use these in exactly the same way as you would use your types from `@polkadot/types/interfaces`.
|
||||
|
||||
## Chain modules
|
||||
|
||||
In the same way as the type library provides defaults from a substrate-base chain, you can also, directly from chain from metadata, generate a complete `api.{consts,query}.*` defintion for your specific chain. The command will create 2 files, `{consts, query}.types.ts` which you can either use to augment the TypeScript defintions, or replace those in `@polkadot/api/*` with your versions (copy, TypeScript replacement or browser/node aliassing).
|
||||
|
||||
In the root of your project, you can run `yarn polkadot-types-from-chain.js --endpoint wss://<url> --output ./stuff` and it will create the required output.
|
||||
|
||||
## And that's a wrap
|
||||
|
||||
This brings us to the end of our overview and jump through the API. While the documentation is still very much and ever evolving item, we can encourage you to try out what you have learned with some [examples](../examples). As we [indicated right at the start of this journey](README.md#help-us-help-others), if there are areas for improvement, let us know.
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Bytes, u32, u64 } from '@polkadot/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -27,7 +27,7 @@ import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import { Multisig } from '@polkadot/types/interfaces/utility';
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
declare module './types' {
|
||||
declare module '@polkadot/api/types' {
|
||||
export interface QueryableStorageExact<ApiType> {
|
||||
system: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
"version": "1.0.0-beta.37",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-from-chain": "./scripts/polkadot-types-from-chain.js",
|
||||
"polkadot-types-from-defs": "./scripts/polkadot-types-from-defs.js"
|
||||
},
|
||||
"keywords": [
|
||||
"Polkadot",
|
||||
"JsonRPC"
|
||||
@@ -33,10 +37,12 @@
|
||||
"@polkadot/metadata": "^1.0.0-beta.37",
|
||||
"@polkadot/util": "^2.0.0-beta.10",
|
||||
"@polkadot/util-crypto": "^2.0.0-beta.10",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"memoizee": "^0.4.14"
|
||||
"memoizee": "^0.4.14",
|
||||
"yargs": "^15.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.0.0-beta.10"
|
||||
"@polkadot/keyring": "^2.0.0-beta.10",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/yargs": "^15.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Compact, Option, Raw, Vec } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Struct } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Codec } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Set, Struct } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { H160 } from '@polkadot/types/primitive';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { AccountId } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Codec } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Compact, Enum, Struct } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Codec } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Codec, ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Codec, ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Codec, ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Fixed64 } from '@polkadot/types/primitive';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './runtime/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
|
||||
@@ -37,8 +37,8 @@ function generateModule (modul: ModuleMetadataLatest, imports: TypeImports): str
|
||||
// Generate `packages/api/src/consts.types.ts` for a particular
|
||||
// metadata
|
||||
/** @internal */
|
||||
function generateForMeta (meta: Metadata): void {
|
||||
console.log('Writing packages/api/src/consts.types.ts');
|
||||
function generateForMeta (meta: Metadata, dest: string): void {
|
||||
console.log(`Writing ${dest}`);
|
||||
|
||||
const imports = createImports({ '@polkadot/types/interfaces': definitions }); // Will hold all needed imports
|
||||
|
||||
@@ -75,7 +75,7 @@ function generateForMeta (meta: Metadata): void {
|
||||
const interfaceEnd = `\n${indent(2)('}')}\n}`;
|
||||
|
||||
fs.writeFileSync(
|
||||
'packages/api/src/consts.types.ts',
|
||||
dest,
|
||||
header
|
||||
.concat(interfaceStart)
|
||||
.concat(body.join('\n'))
|
||||
@@ -87,8 +87,8 @@ function generateForMeta (meta: Metadata): void {
|
||||
|
||||
// Call `generateForMeta()` with current static metadata
|
||||
/** @internal */
|
||||
export default function generateConsts (): void {
|
||||
export default function generateConsts (dest = 'packages/api/src/consts.types.ts', data = staticData): void {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
return generateForMeta(new Metadata(registry, staticData));
|
||||
return generateForMeta(new Metadata(registry, data), dest);
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ function generateModule (definitions: object, registry: Registry, modul: ModuleM
|
||||
// Generate `packages/api/src/query.types.ts` for a particular
|
||||
// metadata
|
||||
/** @internal */
|
||||
function generateForMeta (definitions: object, registry: Registry, meta: Metadata): void {
|
||||
console.log('Writing packages/api/src/query.types.ts');
|
||||
function generateForMeta (definitions: object, registry: Registry, meta: Metadata, dest: string): void {
|
||||
console.log(`Writing ${dest}`);
|
||||
|
||||
const imports = createImports({ '@polkadot/types/interfaces': definitions }); // Will hold all needed imports
|
||||
|
||||
@@ -135,13 +135,13 @@ function generateForMeta (definitions: object, registry: Registry, meta: Metadat
|
||||
|
||||
const interfaceStart =
|
||||
[
|
||||
"declare module './types' {",
|
||||
"declare module '@polkadot/api/types' {",
|
||||
indent(2)('export interface QueryableStorageExact<ApiType> {\n')
|
||||
].join('\n');
|
||||
const interfaceEnd = `\n${indent(2)('}')}\n}`;
|
||||
|
||||
fs.writeFileSync(
|
||||
'packages/api/src/query.types.ts',
|
||||
dest,
|
||||
header
|
||||
.concat(interfaceStart)
|
||||
.concat(body.join('\n'))
|
||||
@@ -153,8 +153,8 @@ function generateForMeta (definitions: object, registry: Registry, meta: Metadat
|
||||
|
||||
// Call `generateForMeta()` with current static metadata
|
||||
/** @internal */
|
||||
export default function generateQuery (): void {
|
||||
export default function generateQuery (dest = 'packages/api/src/query.types.ts', data = staticData): void {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
return generateForMeta(defaultDefinitions, registry, new Metadata(registry, staticData));
|
||||
return generateForMeta(defaultDefinitions, registry, new Metadata(registry, data), dest);
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ import { createImportCode, createImports, FOOTER, getSimilarTypes, HEADER, setIm
|
||||
|
||||
// Generate `packages/rpc-core/jsonrpc.types.ts`
|
||||
/** @internal */
|
||||
export default function generateRpcTypes (): void {
|
||||
console.log('Writing packages/rpc-core/jsonrpc.types.ts');
|
||||
export default function generateRpcTypes (dest = 'packages/rpc-core/src/jsonrpc.types.ts'): void {
|
||||
console.log(`Writing ${dest}`);
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
const imports = createImports({ '@polkadot/types/interfaces': definitions });
|
||||
@@ -78,7 +78,7 @@ export default function generateRpcTypes (): void {
|
||||
const interfaceEnd = '\n}';
|
||||
|
||||
fs.writeFileSync(
|
||||
'packages/rpc-core/src/jsonrpc.types.ts',
|
||||
dest,
|
||||
header.concat(interfaceStart).concat(body).concat(interfaceEnd).concat(FOOTER)
|
||||
, { flag: 'w' }
|
||||
);
|
||||
|
||||
@@ -224,9 +224,7 @@ export function generateTsDef (importDefinitions: { [importPath: string]: object
|
||||
/** @internal */
|
||||
export default function generateTsDefDefault (): void {
|
||||
generateTsDef(
|
||||
{
|
||||
'@polkadot/types/interfaces': defaultDefinitions
|
||||
},
|
||||
{ '@polkadot/types/interfaces': defaultDefinitions },
|
||||
'packages/types/src/interfaces',
|
||||
'@polkadot/types/interfaces'
|
||||
);
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
|
||||
require('@babel/register')({
|
||||
extensions: ['.js', '.ts'],
|
||||
plugins: [
|
||||
['module-resolver', {
|
||||
alias: {
|
||||
'^@polkadot/metadata(.*)': './packages/metadata/src\\1',
|
||||
'^@polkadot/types(.*)': './packages/types/src\\1'
|
||||
}
|
||||
}]
|
||||
]
|
||||
});
|
||||
|
||||
if (typeof WebSocket === 'undefined') {
|
||||
global.WebSocket = require('websocket').w3cwebsocket;
|
||||
}
|
||||
|
||||
const path = require('path');
|
||||
const yargs = require('yargs');
|
||||
const { formatNumber } = require('@polkadot/util');
|
||||
const generateConst = require('./generateTypes/consts').default;
|
||||
const generateQuery = require('./generateTypes/query').default;
|
||||
|
||||
const { endpoint, output } = yargs.strict().options({
|
||||
endpoint: {
|
||||
description: 'The endpoint to connect to, e.g. wss://kusama-rpc.polkadot.io',
|
||||
type: 'string',
|
||||
required: true
|
||||
},
|
||||
output: {
|
||||
description: 'The target directory to write the data to',
|
||||
type: 'string',
|
||||
required: true
|
||||
}
|
||||
}).argv;
|
||||
let websocket = null;
|
||||
|
||||
function onSocketClose (event) {
|
||||
console.error(`${endpoint} disconnected, code: '${event.code}' reason: '${event.reason}'`);
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function onSocketError (event) {
|
||||
console.error(event);
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function onSocketOpen () {
|
||||
console.log(`${endpoint} connected`);
|
||||
|
||||
websocket.send('{"id":"1","jsonrpc":"2.0","method":"state_getMetadata","params":[]}');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function onSocketMessage (message) {
|
||||
const data = JSON.parse(message.data);
|
||||
const metaHex = data.result;
|
||||
|
||||
console.log(`Received metadata, ${formatNumber((metaHex.length - 2) / 2)} bytes`);
|
||||
|
||||
generateConst(path.join(process.cwd(), output, 'consts.types.ts'), metaHex);
|
||||
generateQuery(path.join(process.cwd(), output, 'query.types.ts'), metaHex);
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
websocket = new WebSocket(endpoint);
|
||||
websocket.onclose = onSocketClose;
|
||||
websocket.onerror = onSocketError;
|
||||
websocket.onmessage = onSocketMessage;
|
||||
websocket.onopen = onSocketOpen;
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
|
||||
require('@babel/register')({
|
||||
extensions: ['.js', '.ts'],
|
||||
plugins: [
|
||||
['module-resolver', {
|
||||
alias: {
|
||||
'^@polkadot/metadata(.*)': './packages/metadata/src\\1',
|
||||
'^@polkadot/types(.*)': './packages/types/src\\1'
|
||||
}
|
||||
}]
|
||||
]
|
||||
});
|
||||
|
||||
const path = require('path');
|
||||
const yargs = require('yargs');
|
||||
const substrateDefs = require('../interfaces/definitions');
|
||||
const { generateInterfaceRegistry } = require('./generateTypes/interfaceRegistry');
|
||||
const { generateTsDef } = require('./generateTypes/tsDef');
|
||||
|
||||
const { input, package } = yargs.strict().options({
|
||||
input: {
|
||||
description: 'The directory to use for the user definitions',
|
||||
type: 'string',
|
||||
required: true
|
||||
},
|
||||
package: {
|
||||
description: 'The package name & path to use for the user types',
|
||||
type: 'string',
|
||||
required: true
|
||||
}
|
||||
}).argv;
|
||||
|
||||
const userDefs = require(path.join(process.cwd(), input, 'definitions.ts'));
|
||||
const userKeys = Object.keys(userDefs);
|
||||
const filteredBase = Object
|
||||
.entries(substrateDefs)
|
||||
.filter(([key]) => {
|
||||
if (userKeys.includes(key)) {
|
||||
console.warn(`Override found for ${key} in user types, ignoring in @polkadot/types`);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.reduce((defs, [key, value]) => {
|
||||
defs[key] = value;
|
||||
|
||||
return defs;
|
||||
}, {});
|
||||
|
||||
const allDefs = {
|
||||
'@polkadot/types/interfaces': filteredBase,
|
||||
[package]: userDefs
|
||||
};
|
||||
|
||||
generateTsDef(allDefs, path.join(process.cwd(), input), package);
|
||||
generateInterfaceRegistry(allDefs, path.join(process.cwd(), input, 'interfaceRegistry.ts'));
|
||||
@@ -8,7 +8,7 @@ import { getTypeDef } from '../../codec/create';
|
||||
import { paramsNotation } from '../../codec/utils';
|
||||
import { setImports, TypeImports } from './imports';
|
||||
|
||||
export const HEADER = '// Auto-generated via `yarn build:interfaces`, do not edit\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\n';
|
||||
export const HEADER = '// Auto-generated via `yarn polkadot-types-from-defs`, do not edit\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\n';
|
||||
export const FOOTER = '\n';
|
||||
|
||||
// creates the import lines
|
||||
|
||||
@@ -4677,7 +4677,7 @@ debug@3.1.0, debug@~3.1.0:
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
|
||||
debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
|
||||
version "3.2.6"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
|
||||
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
|
||||
@@ -4863,11 +4863,6 @@ detect-indent@^5.0.0:
|
||||
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
|
||||
integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50=
|
||||
|
||||
detect-libc@^1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
|
||||
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
|
||||
|
||||
detect-newline@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||
@@ -6815,7 +6810,7 @@ humanize-url@^1.0.0:
|
||||
normalize-url "^1.0.0"
|
||||
strip-url-auth "^1.0.0"
|
||||
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
||||
@@ -9025,15 +9020,6 @@ natural-compare@^1.4.0:
|
||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||
|
||||
needle@^2.2.1:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c"
|
||||
integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==
|
||||
dependencies:
|
||||
debug "^3.2.6"
|
||||
iconv-lite "^0.4.4"
|
||||
sax "^1.2.4"
|
||||
|
||||
negotiator@0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
|
||||
@@ -9166,22 +9152,6 @@ node-notifier@^6.0.0:
|
||||
shellwords "^0.1.1"
|
||||
which "^1.3.1"
|
||||
|
||||
node-pre-gyp@*:
|
||||
version "0.14.0"
|
||||
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
|
||||
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
|
||||
dependencies:
|
||||
detect-libc "^1.0.2"
|
||||
mkdirp "^0.5.1"
|
||||
needle "^2.2.1"
|
||||
nopt "^4.0.1"
|
||||
npm-packlist "^1.1.6"
|
||||
npmlog "^4.0.2"
|
||||
rc "^1.2.7"
|
||||
rimraf "^2.6.1"
|
||||
semver "^5.3.0"
|
||||
tar "^4.4.2"
|
||||
|
||||
node-releases@^1.1.46:
|
||||
version "1.1.47"
|
||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.47.tgz#c59ef739a1fd7ecbd9f0b7cf5b7871e8a8b591e4"
|
||||
@@ -9298,7 +9268,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1:
|
||||
semver "^5.6.0"
|
||||
validate-npm-package-name "^3.0.0"
|
||||
|
||||
npm-packlist@^1.1.6, npm-packlist@^1.4.4:
|
||||
npm-packlist@^1.4.4:
|
||||
version "1.4.8"
|
||||
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
|
||||
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
|
||||
@@ -9330,7 +9300,7 @@ npm-run-path@^4.0.0:
|
||||
dependencies:
|
||||
path-key "^3.0.0"
|
||||
|
||||
npmlog@^4.0.2, npmlog@^4.1.2:
|
||||
npmlog@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
|
||||
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
|
||||
@@ -11175,7 +11145,7 @@ rimraf@2.6.3:
|
||||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
|
||||
rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3:
|
||||
version "2.7.1"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
|
||||
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
|
||||
@@ -11267,7 +11237,7 @@ sass-lookup@^3.0.0:
|
||||
dependencies:
|
||||
commander "^2.16.0"
|
||||
|
||||
sax@^1.2.4, sax@~1.2.4:
|
||||
sax@~1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
||||
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
||||
@@ -12132,7 +12102,7 @@ tapable@^1.0.0, tapable@^1.1.3:
|
||||
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
|
||||
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
|
||||
|
||||
tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8:
|
||||
tar@^4.4.10, tar@^4.4.12, tar@^4.4.8:
|
||||
version "4.4.13"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
|
||||
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
|
||||
|
||||
Reference in New Issue
Block a user