publ-echo-test 0.0.92 → 0.0.93

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.
@@ -53,4 +53,7 @@ export declare const addBulkToTarget: (blockStructure: Block[], targetId: string
53
53
  export declare const getBlockWorkDirPath: (blockStructure: Block[], blockId: string) => string | null;
54
54
  export declare const getBlockIdByComponentId: (blockStructure: Block[], componentId: number) => string | null;
55
55
  export declare const blockStructure: Block[];
56
- export declare const mapComponentBlockIdsToBlockIds: (blockStructure: Block[]) => Record<number, string>;
56
+ export declare const mapComponentBlockIdsToBlockIds: (blockStructure: Block[]) => {
57
+ CB_ID: Record<number, string>;
58
+ BLOCK_ID: Record<string, number>;
59
+ };
@@ -415,12 +415,14 @@ export var blockStructure = [
415
415
  }
416
416
  ];
417
417
  export var mapComponentBlockIdsToBlockIds = function (blockStructure) {
418
- var map = {};
418
+ var cbToBlockMap = {};
419
+ var blockToCbMap = {};
419
420
  var traverse = function (blocks) {
420
421
  for (var _i = 0, blocks_7 = blocks; _i < blocks_7.length; _i++) {
421
422
  var block = blocks_7[_i];
422
423
  if (block.type === 'COMPONENT_BLOCK') {
423
- map[block.componentBlockId] = block.blockId;
424
+ cbToBlockMap[block.componentBlockId] = block.blockId;
425
+ blockToCbMap[block.blockId] = block.componentBlockId;
424
426
  }
425
427
  if ('children' in block && block.children) {
426
428
  traverse(block.children);
@@ -428,5 +430,5 @@ export var mapComponentBlockIdsToBlockIds = function (blockStructure) {
428
430
  }
429
431
  };
430
432
  traverse(blockStructure);
431
- return map;
433
+ return { CB_ID: cbToBlockMap, BLOCK_ID: blockToCbMap };
432
434
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",