@chain-registry/workflows 1.38.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.d.ts +3 -3
- package/build.js +6 -6
- package/esm/build.js +6 -6
- package/package.json +4 -4
package/build.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSONSchemaPatchOperation } from 'json-schema-patch';
|
|
2
|
-
import { TransformFunction } from 'json-schema-patch/types/utils';
|
|
2
|
+
import { BooleanFunction, TransformFunction } from 'json-schema-patch/types/utils';
|
|
3
3
|
import { JSONStringifyOptions } from 'strfy-js';
|
|
4
4
|
import { JSONSchemaContent, Registry } from './registry';
|
|
5
5
|
export interface RegistryBuilderOptions {
|
|
@@ -17,7 +17,7 @@ export declare class RegistryBuilder {
|
|
|
17
17
|
private registry;
|
|
18
18
|
constructor(registry: Registry, options?: RegistryBuilderOptions);
|
|
19
19
|
writeFile(outDir: string, info: JSONSchemaContent<any>, options: JSONStringifyOptions): void;
|
|
20
|
-
writeSchema(outDir: string, info: JSONSchemaContent<any>, ops: JSONSchemaPatchOperation[], transformer: TransformFunction): void;
|
|
21
|
-
buildSchemas(outDir: string, transformer: TransformFunction): void;
|
|
20
|
+
writeSchema(outDir: string, info: JSONSchemaContent<any>, ops: JSONSchemaPatchOperation[], transformer: TransformFunction, transformTest: BooleanFunction): void;
|
|
21
|
+
buildSchemas(outDir: string, transformer: TransformFunction, transformTest: BooleanFunction): void;
|
|
22
22
|
build(outDir: string): void;
|
|
23
23
|
}
|
package/build.js
CHANGED
|
@@ -19,20 +19,20 @@ class RegistryBuilder {
|
|
|
19
19
|
(0, mkdirp_1.sync)((0, path_1.dirname)(file));
|
|
20
20
|
(0, fs_1.writeFileSync)(file, str);
|
|
21
21
|
}
|
|
22
|
-
writeSchema(outDir, info, ops, transformer) {
|
|
22
|
+
writeSchema(outDir, info, ops, transformer, transformTest) {
|
|
23
23
|
const patcher = new json_schema_patch_1.JSONSchemaPatch(info.content);
|
|
24
24
|
ops.forEach(patcher.prepareOperation.bind(patcher));
|
|
25
|
-
patcher.transform(transformer.bind(patcher));
|
|
25
|
+
patcher.transform(transformer.bind(patcher), transformTest);
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
patcher.applyPatch();
|
|
28
28
|
const file = (0, path_1.join)(outDir, info.path.replace(this.registry.basePath, ''));
|
|
29
29
|
(0, mkdirp_1.sync)((0, path_1.dirname)(file));
|
|
30
30
|
(0, fs_1.writeFileSync)(file, JSON.stringify(patcher.schema, null, 2));
|
|
31
31
|
}
|
|
32
|
-
buildSchemas(outDir, transformer) {
|
|
33
|
-
this.writeSchema(outDir, this.registry.schemaMappings.AssetList, this.options.ops.assetList, transformer);
|
|
34
|
-
this.writeSchema(outDir, this.registry.schemaMappings.Chain, this.options.ops.chain, transformer);
|
|
35
|
-
this.writeSchema(outDir, this.registry.schemaMappings.IBCData, this.options.ops.ibcData, transformer);
|
|
32
|
+
buildSchemas(outDir, transformer, transformTest) {
|
|
33
|
+
this.writeSchema(outDir, this.registry.schemaMappings.AssetList, this.options.ops.assetList, transformer, transformTest);
|
|
34
|
+
this.writeSchema(outDir, this.registry.schemaMappings.Chain, this.options.ops.chain, transformer, transformTest);
|
|
35
|
+
this.writeSchema(outDir, this.registry.schemaMappings.IBCData, this.options.ops.ibcData, transformer, transformTest);
|
|
36
36
|
}
|
|
37
37
|
build(outDir) {
|
|
38
38
|
this.registry.dataMappings.AssetList.forEach(info => {
|
package/esm/build.js
CHANGED
|
@@ -16,20 +16,20 @@ export class RegistryBuilder {
|
|
|
16
16
|
mkdirp(dirname(file));
|
|
17
17
|
writeFileSync(file, str);
|
|
18
18
|
}
|
|
19
|
-
writeSchema(outDir, info, ops, transformer) {
|
|
19
|
+
writeSchema(outDir, info, ops, transformer, transformTest) {
|
|
20
20
|
const patcher = new JSONSchemaPatch(info.content);
|
|
21
21
|
ops.forEach(patcher.prepareOperation.bind(patcher));
|
|
22
|
-
patcher.transform(transformer.bind(patcher));
|
|
22
|
+
patcher.transform(transformer.bind(patcher), transformTest);
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
patcher.applyPatch();
|
|
25
25
|
const file = join(outDir, info.path.replace(this.registry.basePath, ''));
|
|
26
26
|
mkdirp(dirname(file));
|
|
27
27
|
writeFileSync(file, JSON.stringify(patcher.schema, null, 2));
|
|
28
28
|
}
|
|
29
|
-
buildSchemas(outDir, transformer) {
|
|
30
|
-
this.writeSchema(outDir, this.registry.schemaMappings.AssetList, this.options.ops.assetList, transformer);
|
|
31
|
-
this.writeSchema(outDir, this.registry.schemaMappings.Chain, this.options.ops.chain, transformer);
|
|
32
|
-
this.writeSchema(outDir, this.registry.schemaMappings.IBCData, this.options.ops.ibcData, transformer);
|
|
29
|
+
buildSchemas(outDir, transformer, transformTest) {
|
|
30
|
+
this.writeSchema(outDir, this.registry.schemaMappings.AssetList, this.options.ops.assetList, transformer, transformTest);
|
|
31
|
+
this.writeSchema(outDir, this.registry.schemaMappings.Chain, this.options.ops.chain, transformer, transformTest);
|
|
32
|
+
this.writeSchema(outDir, this.registry.schemaMappings.IBCData, this.options.ops.ibcData, transformer, transformTest);
|
|
33
33
|
}
|
|
34
34
|
build(outDir) {
|
|
35
35
|
this.registry.dataMappings.AssetList.forEach(info => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chain-registry/workflows",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.39.0",
|
|
4
4
|
"description": "Chain Registry Workflows",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/cosmology-tech/chain-registry",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"@types/sha.js": "^2.4.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@chain-registry/interfaces": "^0.
|
|
34
|
+
"@chain-registry/interfaces": "^0.38.0",
|
|
35
35
|
"ajv": "^8.12.0",
|
|
36
36
|
"ajv-formats": "^3.0.1",
|
|
37
37
|
"bignumber.js": "9.1.2",
|
|
38
38
|
"chalk": "^4.1.0",
|
|
39
39
|
"file-ts": "^0.7.15",
|
|
40
40
|
"glob": "^7.1.4",
|
|
41
|
-
"json-schema-patch": "0.
|
|
41
|
+
"json-schema-patch": "1.0.1",
|
|
42
42
|
"minimatch": "^9.0.4",
|
|
43
43
|
"mkdirp": "3.0.1",
|
|
44
44
|
"schema-typescript": "^0.5.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"cosmos",
|
|
51
51
|
"interchain"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "3792a95ef16974f5e0de0703fe92d1fce6d494e9"
|
|
54
54
|
}
|