@neurodevs/ndx-native 0.0.1 → 0.1.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/index.d.ts CHANGED
@@ -12,3 +12,6 @@ export { default as FakeLibxdf } from './testDoubles/Libxdf/FakeLibxdf.js';
12
12
  export * from './testDoubles/Libxdf/FakeLibxdf.js';
13
13
  export { default as SpyLibxdf } from './testDoubles/Libxdf/SpyLibxdf.js';
14
14
  export * from './testDoubles/Libxdf/SpyLibxdf.js';
15
+ export { default as handleError } from './lib/handleError.js';
16
+ export * from './lib/handleError.js';
17
+ export * from './consts.js';
package/build/index.js CHANGED
@@ -15,4 +15,9 @@ export { default as FakeLibxdf } from './testDoubles/Libxdf/FakeLibxdf.js';
15
15
  export * from './testDoubles/Libxdf/FakeLibxdf.js';
16
16
  export { default as SpyLibxdf } from './testDoubles/Libxdf/SpyLibxdf.js';
17
17
  export * from './testDoubles/Libxdf/SpyLibxdf.js';
18
+ // handleError
19
+ export { default as handleError } from './lib/handleError.js';
20
+ export * from './lib/handleError.js';
21
+ // consts
22
+ export * from './consts.js';
18
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAC5E,cAAc,8BAA8B,CAAA;AAE5C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8CAA8C,CAAA;AACzF,cAAc,8CAA8C,CAAA;AAE5D,SAAS;AAET,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAClE,cAAc,yBAAyB,CAAA;AAEvC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC1E,cAAc,oCAAoC,CAAA;AAElD,SAAS;AAET,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAClE,cAAc,yBAAyB,CAAA;AAEvC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC1E,cAAc,oCAAoC,CAAA;AAElD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAA;AACxE,cAAc,mCAAmC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAC5E,cAAc,8BAA8B,CAAA;AAE5C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8CAA8C,CAAA;AACzF,cAAc,8CAA8C,CAAA;AAE5D,SAAS;AAET,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAClE,cAAc,yBAAyB,CAAA;AAEvC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC1E,cAAc,oCAAoC,CAAA;AAElD,SAAS;AAET,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAClE,cAAc,yBAAyB,CAAA;AAEvC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC1E,cAAc,oCAAoC,CAAA;AAElD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAA;AACxE,cAAc,mCAAmC,CAAA;AAEjD,cAAc;AAEd,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAC7D,cAAc,sBAAsB,CAAA;AAEpC,SAAS;AAET,cAAc,aAAa,CAAA"}
@@ -0,0 +1 @@
1
+ export declare function startRecording(): Promise<void>;
@@ -0,0 +1,13 @@
1
+ import LabrecorderAdapter from '../impl/LabrecorderAdapter.js';
2
+ export async function startRecording() {
3
+ console.log('Starting recording...');
4
+ const adapter = LabrecorderAdapter.Create('/opt/local/lib/liblabrecorder.dylib');
5
+ adapter.createRecording('test.xdf', [
6
+ 'type=EEG',
7
+ 'type=PPG',
8
+ 'type=markers',
9
+ ]);
10
+ console.log('Recording started!');
11
+ }
12
+ startRecording().catch((err) => console.error('Error:', err));
13
+ //# sourceMappingURL=labrecorder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labrecorder.js","sourceRoot":"","sources":["../../src/scripts/labrecorder.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,+BAA+B,CAAA;AAE9D,MAAM,CAAC,KAAK,UAAU,cAAc;IAChC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAEpC,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,CACrC,qCAAqC,CACxC,CAAA;IAED,OAAO,CAAC,eAAe,CAAC,UAAU,EAAE;QAChC,UAAU;QACV,UAAU;QACV,cAAc;KACjB,CAAC,CAAA;IAEF,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;AACrC,CAAC;AAED,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neurodevs/ndx-native",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "Native Node.js adapters for LSL, XDF, and LabRecorder",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/index.ts CHANGED
@@ -24,3 +24,12 @@ export * from './testDoubles/Libxdf/FakeLibxdf.js'
24
24
 
25
25
  export { default as SpyLibxdf } from './testDoubles/Libxdf/SpyLibxdf.js'
26
26
  export * from './testDoubles/Libxdf/SpyLibxdf.js'
27
+
28
+ // handleError
29
+
30
+ export { default as handleError } from './lib/handleError.js'
31
+ export * from './lib/handleError.js'
32
+
33
+ // consts
34
+
35
+ export * from './consts.js'
@@ -0,0 +1,19 @@
1
+ import LabrecorderAdapter from '../impl/LabrecorderAdapter.js'
2
+
3
+ export async function startRecording() {
4
+ console.log('Starting recording...')
5
+
6
+ const adapter = LabrecorderAdapter.Create(
7
+ '/opt/local/lib/liblabrecorder.dylib'
8
+ )
9
+
10
+ adapter.createRecording('test.xdf', [
11
+ 'type=EEG',
12
+ 'type=PPG',
13
+ 'type=markers',
14
+ ])
15
+
16
+ console.log('Recording started!')
17
+ }
18
+
19
+ startRecording().catch((err) => console.error('Error:', err))