@dotpi/tools 2.6.1 → 2.7.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.
Files changed (27) hide show
  1. package/.history/dotpi_root/dist/@dotpi/javascript/index_20250224110150.js +0 -0
  2. package/.history/dotpi_root/dist/@dotpi/javascript/index_20250429123336.js +6 -0
  3. package/.history/dotpi_root/dist/@dotpi/javascript/package_20250224111859.json +15 -0
  4. package/.history/dotpi_root/dist/@dotpi/javascript/package_20250429101520.json +16 -0
  5. package/.history/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device_20250117162542.bash +556 -0
  6. package/.history/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device_20250428182930.bash +556 -0
  7. package/.history/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device_20250428183019.bash +561 -0
  8. package/.history/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device_20250428183434.bash +563 -0
  9. package/.history/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device_20250428183737.bash +563 -0
  10. package/.history/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device_20250428183826.bash +563 -0
  11. package/.history/test/utils.spec_20241114125309.js +48 -0
  12. package/.history/test/utils.spec_20250428183107.js +50 -0
  13. package/.history/test/utils.spec_20250428183349.js +50 -0
  14. package/.history/test/utils.spec_20250428183620.js +49 -0
  15. package/.history/test/utils.spec_20250428183631.js +50 -0
  16. package/.history/test/utils.spec_20250428183753.js +50 -0
  17. package/.history/test/utils.spec_20250428183813.js +50 -0
  18. package/dotpi_root/dist/@dotpi/javascript/LICENSE +28 -0
  19. package/dotpi_root/dist/@dotpi/javascript/index.js +6 -0
  20. package/dotpi_root/dist/@dotpi/javascript/package.json +7 -2
  21. package/dotpi_root/dist/@dotpi/module/LICENSE +28 -0
  22. package/dotpi_root/dist/@dotpi/module/package.json +4 -3
  23. package/dotpi_root/dist/@dotpi/module-module/package.json +3 -3
  24. package/dotpi_root/etc/dotpi_modules.json +2 -1
  25. package/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device.bash +25 -18
  26. package/package.json +3 -3
  27. package/test/utils.spec.js +15 -13
@@ -0,0 +1,49 @@
1
+ import assert from 'node:assert';
2
+ import { describe, it } from 'node:test';
3
+
4
+ import { readBashArray, readBashVariable, packageVersion } from '../src/utils.js';
5
+
6
+ describe('# utils', () => {
7
+ it('packageVersion()', () => {
8
+ const version = packageVersion();
9
+ console.log('package version:', version);
10
+ assert.equal(typeof version, 'string');
11
+ });
12
+
13
+ it('readBashVariable()', () => {
14
+ const value = readBashVariable('dotpi_audio_device');
15
+ assert.equal(value, 'default');
16
+ });
17
+
18
+ it('readBashArray()', () => {
19
+ const arr = readBashArray('dotpi_audio_device_supported');
20
+ assert.deepEqual(arr, [
21
+ 'default',
22
+ 'headphones',
23
+ 'hifiberry dac+ adc pro',
24
+ 'hifiberry dac+ adc',
25
+ 'hifiberry dac+ standard',
26
+ 'hifiberry dac+ light',
27
+ 'hifiberry dac zero',
28
+ 'hifiberry miniamp',
29
+ 'hifiberry beocreate',
30
+ 'hifiberry dac+ dsp',
31
+ 'hifiberry dac+ rtc',
32
+ 'hifiberry pro',
33
+ 'hifiberry amp2',
34
+ 'hifiberry dac2 hd',
35
+ 'hifiberry digi+',
36
+ 'hifiberry digi+ pro',
37
+ 'hifiberry amp+',
38
+ 'hifiberry amp3',
39
+ 'hifiberry amp4',
40
+ 'hifiberry amp4 pro',
41
+ 'bluetooth',
42
+ 'ue boom 2',
43
+ 'ue boom 3',
44
+ 'ue megaboom 2',
45
+ 'ue megaboom 3',
46
+ 'hifiberry dac for raspberry pi 1'
47
+ ]);
48
+ });
49
+ });
@@ -0,0 +1,50 @@
1
+ import assert from 'node:assert';
2
+ import { describe, it } from 'node:test';
3
+
4
+ import { readBashArray, readBashVariable, packageVersion } from '../src/utils.js';
5
+
6
+ describe('# utils', () => {
7
+ it('packageVersion()', () => {
8
+ const version = packageVersion();
9
+ console.log('package version:', version);
10
+ assert.equal(typeof version, 'string');
11
+ });
12
+
13
+ it('readBashVariable()', () => {
14
+ const value = readBashVariable('dotpi_audio_device');
15
+ assert.equal(value, 'default');
16
+ });
17
+
18
+ it('readBashArray()', () => {
19
+ const arr = readBashArray('dotpi_audio_device_supported');
20
+ assert.deepEqual(arr, [
21
+ 'default',
22
+ 'none',
23
+ 'headphones',
24
+ 'hifiberry dac+ adc pro',
25
+ 'hifiberry dac+ adc',
26
+ 'hifiberry dac+ standard',
27
+ 'hifiberry dac+ light',
28
+ 'hifiberry dac zero',
29
+ 'hifiberry miniamp',
30
+ 'hifiberry beocreate',
31
+ 'hifiberry dac+ dsp',
32
+ 'hifiberry dac+ rtc',
33
+ 'hifiberry pro',
34
+ 'hifiberry amp2',
35
+ 'hifiberry dac2 hd',
36
+ 'hifiberry digi+',
37
+ 'hifiberry digi+ pro',
38
+ 'hifiberry amp+',
39
+ 'hifiberry amp3',
40
+ 'hifiberry amp4',
41
+ 'hifiberry amp4 pro',
42
+ 'bluetooth',
43
+ 'ue boom 2',
44
+ 'ue boom 3',
45
+ 'ue megaboom 2',
46
+ 'ue megaboom 3',
47
+ 'hifiberry dac for raspberry pi 1'
48
+ ]);
49
+ });
50
+ });
@@ -0,0 +1,50 @@
1
+ import assert from 'node:assert';
2
+ import { describe, it } from 'node:test';
3
+
4
+ import { readBashArray, readBashVariable, packageVersion } from '../src/utils.js';
5
+
6
+ describe('# utils', () => {
7
+ it('packageVersion()', () => {
8
+ const version = packageVersion();
9
+ console.log('package version:', version);
10
+ assert.equal(typeof version, 'string');
11
+ });
12
+
13
+ it('readBashVariable()', () => {
14
+ const value = readBashVariable('dotpi_audio_device');
15
+ assert.equal(value, 'default');
16
+ });
17
+
18
+ it('readBashArray()', () => {
19
+ const arr = readBashArray('dotpi_audio_device_supported');
20
+ assert.deepEqual(arr, [
21
+ 'default',
22
+ 'none',
23
+ 'headphones',
24
+ 'bluetooth',
25
+ 'hifiberry amp+',
26
+ 'hifiberry amp2',
27
+ 'hifiberry amp3',
28
+ 'hifiberry amp4 pro',
29
+ 'hifiberry amp4',
30
+ 'hifiberry beocreate',
31
+ 'hifiberry dac for raspberry pi 1'
32
+ 'hifiberry dac zero',
33
+ 'hifiberry dac+ adc pro',
34
+ 'hifiberry dac+ adc',
35
+ 'hifiberry dac+ dsp',
36
+ 'hifiberry dac+ light',
37
+ 'hifiberry dac+ rtc',
38
+ 'hifiberry dac+ standard',
39
+ 'hifiberry dac2 hd',
40
+ 'hifiberry digi+ pro',
41
+ 'hifiberry digi+',
42
+ 'hifiberry miniamp',
43
+ 'hifiberry pro',
44
+ 'ue boom 2',
45
+ 'ue boom 3',
46
+ 'ue megaboom 2',
47
+ 'ue megaboom 3',
48
+ ]);
49
+ });
50
+ });
@@ -0,0 +1,50 @@
1
+ import assert from 'node:assert';
2
+ import { describe, it } from 'node:test';
3
+
4
+ import { readBashArray, readBashVariable, packageVersion } from '../src/utils.js';
5
+
6
+ describe('# utils', () => {
7
+ it('packageVersion()', () => {
8
+ const version = packageVersion();
9
+ console.log('package version:', version);
10
+ assert.equal(typeof version, 'string');
11
+ });
12
+
13
+ it('readBashVariable()', () => {
14
+ const value = readBashVariable('dotpi_audio_device');
15
+ assert.equal(value, 'default');
16
+ });
17
+
18
+ it('readBashArray()', () => {
19
+ const arr = readBashArray('dotpi_audio_device_supported');
20
+ assert.deepEqual(arr, [
21
+ 'default',
22
+ 'none',
23
+ 'headphones',
24
+ 'bluetooth',
25
+ 'hifiberry amp+',
26
+ 'hifiberry amp2',
27
+ 'hifiberry amp3',
28
+ 'hifiberry amp4 pro',
29
+ 'hifiberry amp4',
30
+ 'hifiberry beocreate',
31
+ 'hifiberry dac for raspberry pi 1',
32
+ 'hifiberry dac zero',
33
+ 'hifiberry dac+ adc pro',
34
+ 'hifiberry dac+ adc',
35
+ 'hifiberry dac+ dsp',
36
+ 'hifiberry dac+ light',
37
+ 'hifiberry dac+ rtc',
38
+ 'hifiberry dac+ standard',
39
+ 'hifiberry dac2 hd',
40
+ 'hifiberry digi+ pro',
41
+ 'hifiberry digi+',
42
+ 'hifiberry miniamp',
43
+ 'hifiberry pro',
44
+ 'ue boom 2',
45
+ 'ue boom 3',
46
+ 'ue megaboom 2',
47
+ 'ue megaboom 3',
48
+ ]);
49
+ });
50
+ });
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice, this
12
+ list of conditions and the following disclaimer in the documentation and/or
13
+ other materials provided with the distribution.
14
+
15
+ * Neither the name of the IRCAM nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,6 @@
1
+ export * as bash from './bash.js';
2
+ export * as echo from './echo.js';
3
+ export * as service from './service.js';
4
+ export * as system from './system.js';
5
+ export * as template from './template.js';
6
+ export * as user from './user.js';
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@dotpi/javascript",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "dotpi javascript utilities",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./*.js": "./*.js"
10
+ },
7
11
  "dependencies": {
8
12
  "chalk": "^5.4.0",
9
13
  "execa": "^9.5.2",
10
14
  "template-literal": "^1.0.4"
11
- }
15
+ },
16
+ "gitHead": "a9f6d317a671a02b05ae565eec9d1a6dbe95041c"
12
17
  }
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice, this
12
+ list of conditions and the following disclaimer in the documentation and/or
13
+ other materials provided with the distribution.
14
+
15
+ * Neither the name of the IRCAM nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,8 +8,9 @@
8
8
  },
9
9
  "license": "BSD-3-clause",
10
10
  "dependencies": {
11
- "@dotpi/javascript": "^1.5.0",
11
+ "@dotpi/javascript": "^1.5.1",
12
12
  "execa": "^9.5.2",
13
13
  "globby": "^14.0.2"
14
- }
14
+ },
15
+ "gitHead": "a9f6d317a671a02b05ae565eec9d1a6dbe95041c"
15
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module-module",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "bin": "./bin/dotpi_module",
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "license": "BSD-3-clause",
12
12
  "dependencies": {
13
- "@dotpi/javascript": "^1.5.0",
13
+ "@dotpi/javascript": "^1.5.1",
14
14
  "@dotpi/module": "^1.6.1",
15
15
  "commander": "^12.1.0"
16
16
  },
17
- "gitHead": "e3aac26518ffac91ee009e965adac7985fc1fe56"
17
+ "gitHead": "a9f6d317a671a02b05ae565eec9d1a6dbe95041c"
18
18
  }
@@ -2,7 +2,8 @@
2
2
  "moduleSource": {
3
3
 
4
4
  "_example_git": "git+https://github.com/ircam-ismm/dotpi-led#feat-dotpi-module",
5
- "_example_local": "file:///opt/dotpi/dist/@dotpi/avhi_monitor",
5
+ "_example_local": "file:///opt/dotpi/dist/@dotpi/avhi-monitor-module",
6
+
6
7
  "_see_npm_doc": "https://docs.npmjs.com/cli/v10/configuring-npm/package-json#dependencies"
7
8
  }
8
9
  }
@@ -4,32 +4,34 @@ dotpi_audio_device_supported=(
4
4
  'default'
5
5
  'none'
6
6
  'headphones'
7
+ 'bluetooth'
8
+ 'hifiberry amp+'
9
+ 'hifiberry amp2'
10
+ 'hifiberry amp3'
11
+ 'hifiberry amp4 pro'
12
+ 'hifiberry amp4'
13
+ 'hifiberry beocreate'
14
+ 'hifiberry dac for raspberry pi 1'
15
+ 'hifiberry dac zero'
7
16
  'hifiberry dac+ adc pro'
8
17
  'hifiberry dac+ adc'
9
- 'hifiberry dac+ standard'
10
- 'hifiberry dac+ light'
11
- 'hifiberry dac zero'
12
- 'hifiberry miniamp'
13
- 'hifiberry beocreate'
14
18
  'hifiberry dac+ dsp'
19
+ 'hifiberry dac+ light'
15
20
  'hifiberry dac+ rtc'
16
- 'hifiberry pro'
17
- 'hifiberry amp2'
21
+ 'hifiberry dac+ standard'
18
22
  'hifiberry dac2 hd'
19
- 'hifiberry digi+'
20
23
  'hifiberry digi+ pro'
21
- 'hifiberry amp+'
22
- 'hifiberry amp3'
23
- 'hifiberry dac for raspberry pi 1'
24
- 'raspberry pi dac pro'
25
- 'raspberry pi dac+'
26
- 'raspberry pi digiamp+'
27
- 'raspberry pi codec zero'
24
+ 'hifiberry digi+'
25
+ 'hifiberry miniamp'
26
+ 'hifiberry pro'
27
+ 'iqaudio codec zero'
28
28
  'iqaudio dac pro'
29
29
  'iqaudio dac+'
30
30
  'iqaudio digiamp+'
31
- 'iqaudio codec zero'
32
- 'bluetooth'
31
+ 'raspberry pi codec zero'
32
+ 'raspberry pi dac pro'
33
+ 'raspberry pi dac+'
34
+ 'raspberry pi digiamp+'
33
35
  'ue boom 2'
34
36
  'ue boom 3'
35
37
  'ue megaboom 2'
@@ -211,7 +213,7 @@ dotpi_audio_device_select() (
211
213
  _dotpi_audio_device_select_hifiberry
212
214
  ;;
213
215
 
214
- 'hifiberry dac+ standard'|'hifiberry pro'|'hifiberry amp2')
216
+ 'hifiberry dac+ standard'|'hifiberry pro'|'hifiberry amp2'|'hifiberry amp4')
215
217
  dtoverlay=hifiberry-dacplus
216
218
  _dotpi_audio_device_select_hifiberry
217
219
  ;;
@@ -251,6 +253,11 @@ dotpi_audio_device_select() (
251
253
  _dotpi_audio_device_select_hifiberry
252
254
  ;;
253
255
 
256
+ 'hifiberry amp4 pro')
257
+ dtoverlay=hifiberry-amp4pro
258
+ _dotpi_audio_device_select_hifiberry
259
+ ;;
260
+
254
261
  ####### Ultimate Ears (UE)
255
262
 
256
263
  'ue boom 2'|'ue boom 3'|'ue megaboom 2'|'ue megaboom 3')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/tools",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "description": "Set of scripts for managing dotpi fleets of Raspberry Pi",
5
5
  "author": "Jean-Philippe Lambert",
6
6
  "contributors": [
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "license": "BSD-3-Clause",
33
33
  "dependencies": {
34
- "@dotpi/javascript": "^1.4.1",
34
+ "@dotpi/javascript": "^1.5.1",
35
35
  "@dotpi/module": "^1.5.0",
36
36
  "chalk": "^5.3.0",
37
37
  "commander": "^12.1.0",
@@ -41,5 +41,5 @@
41
41
  "devDependencies": {
42
42
  "lerna": "^8.1.9"
43
43
  },
44
- "gitHead": "e3aac26518ffac91ee009e965adac7985fc1fe56"
44
+ "gitHead": "a9f6d317a671a02b05ae565eec9d1a6dbe95041c"
45
45
  }
@@ -1,7 +1,7 @@
1
1
  import assert from 'node:assert';
2
2
  import { describe, it } from 'node:test';
3
3
 
4
- import { readBashArray, readBashVariable, packageVersion } from '../js/utils.js';
4
+ import { readBashArray, readBashVariable, packageVersion } from '../src/utils.js';
5
5
 
6
6
  describe('# utils', () => {
7
7
  it('packageVersion()', () => {
@@ -21,28 +21,30 @@ describe('# utils', () => {
21
21
  'default',
22
22
  'none',
23
23
  'headphones',
24
+ 'bluetooth',
25
+ 'hifiberry amp+',
26
+ 'hifiberry amp2',
27
+ 'hifiberry amp3',
28
+ 'hifiberry amp4 pro',
29
+ 'hifiberry amp4',
30
+ 'hifiberry beocreate',
31
+ 'hifiberry dac for raspberry pi 1',
32
+ 'hifiberry dac zero',
24
33
  'hifiberry dac+ adc pro',
25
34
  'hifiberry dac+ adc',
26
- 'hifiberry dac+ standard',
27
- 'hifiberry dac+ light',
28
- 'hifiberry dac zero',
29
- 'hifiberry miniamp',
30
- 'hifiberry beocreate',
31
35
  'hifiberry dac+ dsp',
36
+ 'hifiberry dac+ light',
32
37
  'hifiberry dac+ rtc',
33
- 'hifiberry pro',
34
- 'hifiberry amp2',
38
+ 'hifiberry dac+ standard',
35
39
  'hifiberry dac2 hd',
36
- 'hifiberry digi+',
37
40
  'hifiberry digi+ pro',
38
- 'hifiberry amp+',
39
- 'hifiberry amp3',
40
- 'bluetooth',
41
+ 'hifiberry digi+',
42
+ 'hifiberry miniamp',
43
+ 'hifiberry pro',
41
44
  'ue boom 2',
42
45
  'ue boom 3',
43
46
  'ue megaboom 2',
44
47
  'ue megaboom 3',
45
- 'hifiberry dac for raspberry pi 1'
46
48
  ]);
47
49
  });
48
50
  });