@syncbridge/syncbuild 0.7.0 → 0.7.2
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/builder/extract-exports.js +6 -3
- package/constants.js +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { CLASS_METADATA, CLASS_TYPE } from '@syncbridge/common';
|
|
5
|
-
import { resolvePromisesDeep } from './utils/resolve-promises.js';
|
|
4
|
+
import { CLASS_METADATA, CLASS_TYPE, normalizeComponentMetadata, normalizeProcessorMetadata, } from '@syncbridge/common';
|
|
6
5
|
export async function extractExports(context) {
|
|
7
6
|
const { outPkgJson } = context;
|
|
8
7
|
const pkgGlobal = await import(path.join(context.tmpDir, context.outEntryPoint));
|
|
@@ -12,7 +11,11 @@ export async function extractExports(context) {
|
|
|
12
11
|
const classType = Reflect.getMetadata(CLASS_TYPE, v);
|
|
13
12
|
let metadata = Reflect.getMetadata(CLASS_METADATA, v);
|
|
14
13
|
if (metadata && (classType === 'component' || classType === 'processor')) {
|
|
15
|
-
|
|
14
|
+
if (classType === 'component')
|
|
15
|
+
metadata = await normalizeComponentMetadata(metadata);
|
|
16
|
+
else
|
|
17
|
+
metadata = await normalizeProcessorMetadata(metadata);
|
|
18
|
+
delete metadata.id;
|
|
16
19
|
const metadataDir = path.join(context.tmpDir, 'metadata');
|
|
17
20
|
fs.mkdirSync(metadataDir, { recursive: true });
|
|
18
21
|
fs.writeFileSync(path.join(metadataDir, `${k}.json`), JSON.stringify(metadata, undefined, 2));
|
package/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncbridge/syncbuild",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "SyncBridge Extension Package Builder",
|
|
5
5
|
"author": "Panates Inc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"typescript": "^6.0.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@syncbridge/common": "^0.7.
|
|
23
|
+
"@syncbridge/common": "^0.7.2"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
26
|
"module": "./index.js",
|