@syncbridge/syncbuild 0.7.0 → 0.7.1

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.
@@ -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
- metadata = await resolvePromisesDeep(metadata);
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
@@ -1,5 +1,5 @@
1
1
  import process from 'node:process';
2
- export const version = '0.7.0';
2
+ export const version = '0.7.1';
3
3
  // Environment variables
4
4
  export const NODE_ENV = process.env.NODE_ENV === 'test'
5
5
  ? 'test'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncbridge/syncbuild",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
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.0"
23
+ "@syncbridge/common": "^0.7.1"
24
24
  },
25
25
  "type": "module",
26
26
  "module": "./index.js",