@open-audio-stack/core 0.0.16 → 0.0.17

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.
@@ -3,7 +3,6 @@ import { execSync } from 'child_process';
3
3
  import { createReadStream, chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, unlinkSync, writeFileSync, } from 'fs';
4
4
  import { createHash } from 'crypto';
5
5
  import stream from 'stream/promises';
6
- import { Transform } from 'stream';
7
6
  import { globSync } from 'glob';
8
7
  import { moveSync } from 'fs-extra/esm';
9
8
  import os from 'os';
@@ -130,15 +129,10 @@ export function fileJsonCreate(filePath, data) {
130
129
  return fileCreate(filePath, JSON.stringify(data, null, 2));
131
130
  }
132
131
  export async function fileHash(filePath, algorithm = 'sha256') {
133
- const normalizeLineEndings = new Transform({
134
- transform(chunk, encoding, callback) {
135
- const normalized = chunk.toString('utf8').replace(/\r\n/g, '\n').replace(/\r/g, '\n');
136
- callback(null, Buffer.from(normalized));
137
- },
138
- });
132
+ console.log('⎋', filePath);
139
133
  const input = createReadStream(filePath);
140
134
  const hash = createHash(algorithm);
141
- await stream.pipeline(input, normalizeLineEndings, hash);
135
+ await stream.pipeline(input, hash);
142
136
  return hash.digest('hex');
143
137
  }
144
138
  export function fileMove(filePath, newPath) {
@@ -41,9 +41,9 @@ export function packageRecommendations(pkgVersion) {
41
41
  });
42
42
  });
43
43
  if (!supportedArchitectures.arm64)
44
- recs.push({ field: 'architectures', rec: 'should support Arm64' });
45
- if (!supportedArchitectures.bit64)
46
- recs.push({ field: 'architectures', rec: 'should support Bit64' });
44
+ recs.push({ field: 'architectures', rec: 'should support arm64' });
45
+ if (!supportedArchitectures.x64)
46
+ recs.push({ field: 'architectures', rec: 'should support x64' });
47
47
  if (!supportedSystems.linux)
48
48
  recs.push({ field: 'systems', rec: 'should support Linux' });
49
49
  if (!supportedSystems.mac)
@@ -1,8 +1,8 @@
1
1
  export declare enum Architecture {
2
2
  Arm32 = "arm32",
3
3
  Arm64 = "arm64",
4
- Bit32 = "bit32",
5
- Bit64 = "bit64"
4
+ X32 = "x32",
5
+ X64 = "x64"
6
6
  }
7
7
  export interface ArchitectureOption {
8
8
  description: string;
@@ -2,8 +2,8 @@ export var Architecture;
2
2
  (function (Architecture) {
3
3
  Architecture["Arm32"] = "arm32";
4
4
  Architecture["Arm64"] = "arm64";
5
- Architecture["Bit32"] = "bit32";
6
- Architecture["Bit64"] = "bit64";
5
+ Architecture["X32"] = "x32";
6
+ Architecture["X64"] = "x64";
7
7
  })(Architecture || (Architecture = {}));
8
8
  export const architectures = [
9
9
  {
@@ -18,12 +18,12 @@ export const architectures = [
18
18
  },
19
19
  {
20
20
  description: 'X86 processors are commonly used in desktop computers and laptops.',
21
- value: Architecture.Bit32,
21
+ value: Architecture.X32,
22
22
  name: 'x86 machine - 32-bit',
23
23
  },
24
24
  {
25
25
  description: 'X86 processors are commonly used in desktop computers and laptops.',
26
- value: Architecture.Bit64,
26
+ value: Architecture.X64,
27
27
  name: 'x86 machine - 64-bit',
28
28
  },
29
29
  ];
@@ -7,7 +7,8 @@ export declare enum FileFormat {
7
7
  Tarball = "tar.gz",
8
8
  TarballLegacy = "tgz",
9
9
  WindowsInstaller = "msi",
10
- Zip = "zip"
10
+ Zip = "zip",
11
+ Zip7 = "7z"
11
12
  }
12
13
  export interface FileFormatOption {
13
14
  description: string;
@@ -9,6 +9,7 @@ export var FileFormat;
9
9
  FileFormat["TarballLegacy"] = "tgz";
10
10
  FileFormat["WindowsInstaller"] = "msi";
11
11
  FileFormat["Zip"] = "zip";
12
+ FileFormat["Zip7"] = "7z";
12
13
  })(FileFormat || (FileFormat = {}));
13
14
  export const fileFormats = [
14
15
  {
@@ -56,4 +57,9 @@ export const fileFormats = [
56
57
  value: FileFormat.Zip,
57
58
  name: 'Zip',
58
59
  },
60
+ {
61
+ description: 'Archive file format which compresses files and folders into a single file.',
62
+ value: FileFormat.Zip7,
63
+ name: '7-Zip',
64
+ },
59
65
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-audio-stack/core",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Open-source audio plugin management software",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",