@springfield/ham-radio-api 16.0.0 → 16.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/CHANGELOG.md +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/radio/codec-factory.d.ts +21 -0
- package/dist/radio/codec-factory.d.ts.map +1 -0
- package/dist/radio/codec-factory.js +2 -0
- package/dist/radio/codec-factory.js.map +1 -0
- package/dist/radio/shared-components.d.ts +40 -0
- package/dist/radio/shared-components.d.ts.map +1 -0
- package/dist/radio/shared-components.js +2 -0
- package/dist/radio/shared-components.js.map +1 -0
- package/dist/radio/validation.d.ts +21 -0
- package/dist/radio/validation.d.ts.map +1 -0
- package/dist/radio/validation.js +2 -0
- package/dist/radio/validation.js.map +1 -0
- package/package.json +2 -1
- package/src/index.ts +3 -0
- package/src/radio/codec-factory.ts +22 -0
- package/src/radio/shared-components.ts +44 -0
- package/src/radio/validation.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [16.1.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v16.0.0...v16.1.0) (2025-06-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add loglayer dependency and enhance radio module exports ([a8e5363](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/commit/a8e5363f6ac40a0c2cb9fb4495d241776400cef9))
|
|
7
|
+
|
|
1
8
|
## [16.0.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v15.0.0...v16.0.0) (2025-06-23)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './branded-types/wavelength.js';
|
|
|
10
10
|
export * from './license/class.js';
|
|
11
11
|
export * from './radio/channel.js';
|
|
12
12
|
export * from './radio/codec.js';
|
|
13
|
+
export * from './radio/codec-factory.js';
|
|
13
14
|
export * from './radio/connection.js';
|
|
14
15
|
export * from './radio/ctcss.js';
|
|
15
16
|
export * from './radio/dcs.js';
|
|
@@ -27,8 +28,10 @@ export * from './radio/protocol.js';
|
|
|
27
28
|
export * from './radio/radio.js';
|
|
28
29
|
export * from './radio/schema.js';
|
|
29
30
|
export * from './radio/serial-config.js';
|
|
31
|
+
export * from './radio/shared-components.js';
|
|
30
32
|
export * from './radio/settings.js';
|
|
31
33
|
export * from './radio/tone.js';
|
|
34
|
+
export * from './radio/validation.js';
|
|
32
35
|
export * from './spectrum/band.js';
|
|
33
36
|
export * from './spectrum/channel.js';
|
|
34
37
|
export * from './spectrum/mode.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+B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AC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from './branded-types/wavelength.js';
|
|
|
10
10
|
export * from './license/class.js';
|
|
11
11
|
export * from './radio/channel.js';
|
|
12
12
|
export * from './radio/codec.js';
|
|
13
|
+
export * from './radio/codec-factory.js';
|
|
13
14
|
export * from './radio/connection.js';
|
|
14
15
|
export * from './radio/ctcss.js';
|
|
15
16
|
export * from './radio/dcs.js';
|
|
@@ -27,8 +28,10 @@ export * from './radio/protocol.js';
|
|
|
27
28
|
export * from './radio/radio.js';
|
|
28
29
|
export * from './radio/schema.js';
|
|
29
30
|
export * from './radio/serial-config.js';
|
|
31
|
+
export * from './radio/shared-components.js';
|
|
30
32
|
export * from './radio/settings.js';
|
|
31
33
|
export * from './radio/tone.js';
|
|
34
|
+
export * from './radio/validation.js';
|
|
32
35
|
export * from './spectrum/band.js';
|
|
33
36
|
export * from './spectrum/channel.js';
|
|
34
37
|
export * from './spectrum/mode.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,0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;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ILogLayer } from 'loglayer';
|
|
2
|
+
import type { RadioCodec } from './codec.js';
|
|
3
|
+
import type { RadioModelId } from '../branded-types/radio-model-id.js';
|
|
4
|
+
/**
|
|
5
|
+
* Factory interface for creating radio codecs
|
|
6
|
+
*
|
|
7
|
+
* This interface provides a standardized way for radio modules to create
|
|
8
|
+
* codec instances that can encode/decode radio memory data.
|
|
9
|
+
*/
|
|
10
|
+
export interface CodecFactory {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a codec instance for a specific radio model
|
|
13
|
+
*
|
|
14
|
+
* @param modelId - The radio model identifier
|
|
15
|
+
* @param config - Configuration object for the codec
|
|
16
|
+
* @param logger - Logger instance for the codec
|
|
17
|
+
* @returns Promise that resolves to a RadioCodec instance
|
|
18
|
+
*/
|
|
19
|
+
createCodec(modelId: RadioModelId, config: Record<string, unknown>, logger: ILogLayer): Promise<RadioCodec>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=codec-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-factory.d.ts","sourceRoot":"","sources":["../../src/radio/codec-factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC7G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-factory.js","sourceRoot":"","sources":["../../src/radio/codec-factory.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { RadioCodec } from './codec.js';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for managing shared components across radio models
|
|
4
|
+
*
|
|
5
|
+
* This interface provides a standardized way for radio modules to share
|
|
6
|
+
* common components like schemas, protocols, and codecs.
|
|
7
|
+
*/
|
|
8
|
+
export interface SharedComponentManager {
|
|
9
|
+
/**
|
|
10
|
+
* Load a shared schema from a file path
|
|
11
|
+
*
|
|
12
|
+
* @param schemaPath - Path to the schema file
|
|
13
|
+
* @returns Promise that resolves to the schema object
|
|
14
|
+
*/
|
|
15
|
+
loadSchema(schemaPath: string): Promise<Record<string, unknown>>;
|
|
16
|
+
/**
|
|
17
|
+
* Load a shared protocol from a file path
|
|
18
|
+
*
|
|
19
|
+
* @param protocolPath - Path to the protocol file
|
|
20
|
+
* @returns Promise that resolves to the protocol object
|
|
21
|
+
*/
|
|
22
|
+
loadProtocol(protocolPath: string): Promise<Record<string, unknown>>;
|
|
23
|
+
/**
|
|
24
|
+
* Load a shared codec from a file path
|
|
25
|
+
*
|
|
26
|
+
* @param codecPath - Path to the codec module
|
|
27
|
+
* @param config - Configuration for the codec
|
|
28
|
+
* @returns Promise that resolves to a RadioCodec instance
|
|
29
|
+
*/
|
|
30
|
+
loadCodec(codecPath: string, config: Record<string, unknown>): Promise<RadioCodec>;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve a component reference relative to a base path
|
|
33
|
+
*
|
|
34
|
+
* @param reference - The reference to resolve
|
|
35
|
+
* @param basePath - The base path for resolution
|
|
36
|
+
* @returns The resolved absolute path
|
|
37
|
+
*/
|
|
38
|
+
resolveReference(reference: string, basePath: string): string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=shared-components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-components.d.ts","sourceRoot":"","sources":["../../src/radio/shared-components.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAErE;;;;;;OAMG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEnF;;;;;;OAMG;IACH,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-components.js","sourceRoot":"","sources":["../../src/radio/shared-components.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of a validation operation
|
|
3
|
+
*
|
|
4
|
+
* This interface provides a standardized way to return validation results
|
|
5
|
+
* across different parts of the radio system.
|
|
6
|
+
*/
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the validation passed
|
|
10
|
+
*/
|
|
11
|
+
isValid: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* List of validation errors
|
|
14
|
+
*/
|
|
15
|
+
errors: string[];
|
|
16
|
+
/**
|
|
17
|
+
* List of validation warnings
|
|
18
|
+
*/
|
|
19
|
+
warnings: string[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/radio/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/radio/validation.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springfield/ham-radio-api",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"author": "Bryan Hunt",
|
|
5
5
|
"packageManager": "yarn@4.9.2",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"typescript": "5.8.3"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
+
"loglayer": "^6.4.3",
|
|
64
65
|
"ts-brand": "^0.2.0"
|
|
65
66
|
}
|
|
66
67
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './license/class.js';
|
|
|
12
12
|
|
|
13
13
|
export * from './radio/channel.js';
|
|
14
14
|
export * from './radio/codec.js';
|
|
15
|
+
export * from './radio/codec-factory.js';
|
|
15
16
|
export * from './radio/connection.js';
|
|
16
17
|
export * from './radio/ctcss.js';
|
|
17
18
|
export * from './radio/dcs.js';
|
|
@@ -29,8 +30,10 @@ export * from './radio/protocol.js';
|
|
|
29
30
|
export * from './radio/radio.js';
|
|
30
31
|
export * from './radio/schema.js';
|
|
31
32
|
export * from './radio/serial-config.js';
|
|
33
|
+
export * from './radio/shared-components.js';
|
|
32
34
|
export * from './radio/settings.js';
|
|
33
35
|
export * from './radio/tone.js';
|
|
36
|
+
export * from './radio/validation.js';
|
|
34
37
|
|
|
35
38
|
export * from './spectrum/band.js';
|
|
36
39
|
export * from './spectrum/channel.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// oxlint-disable consistent-indexed-object-style
|
|
2
|
+
import type { ILogLayer } from 'loglayer';
|
|
3
|
+
import type { RadioCodec } from './codec.js';
|
|
4
|
+
import type { RadioModelId } from '../branded-types/radio-model-id.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Factory interface for creating radio codecs
|
|
8
|
+
*
|
|
9
|
+
* This interface provides a standardized way for radio modules to create
|
|
10
|
+
* codec instances that can encode/decode radio memory data.
|
|
11
|
+
*/
|
|
12
|
+
export interface CodecFactory {
|
|
13
|
+
/**
|
|
14
|
+
* Creates a codec instance for a specific radio model
|
|
15
|
+
*
|
|
16
|
+
* @param modelId - The radio model identifier
|
|
17
|
+
* @param config - Configuration object for the codec
|
|
18
|
+
* @param logger - Logger instance for the codec
|
|
19
|
+
* @returns Promise that resolves to a RadioCodec instance
|
|
20
|
+
*/
|
|
21
|
+
createCodec(modelId: RadioModelId, config: Record<string, unknown>, logger: ILogLayer): Promise<RadioCodec>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// oxlint-disable consistent-indexed-object-style
|
|
2
|
+
import type { RadioCodec } from './codec.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface for managing shared components across radio models
|
|
6
|
+
*
|
|
7
|
+
* This interface provides a standardized way for radio modules to share
|
|
8
|
+
* common components like schemas, protocols, and codecs.
|
|
9
|
+
*/
|
|
10
|
+
export interface SharedComponentManager {
|
|
11
|
+
/**
|
|
12
|
+
* Load a shared schema from a file path
|
|
13
|
+
*
|
|
14
|
+
* @param schemaPath - Path to the schema file
|
|
15
|
+
* @returns Promise that resolves to the schema object
|
|
16
|
+
*/
|
|
17
|
+
loadSchema(schemaPath: string): Promise<Record<string, unknown>>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Load a shared protocol from a file path
|
|
21
|
+
*
|
|
22
|
+
* @param protocolPath - Path to the protocol file
|
|
23
|
+
* @returns Promise that resolves to the protocol object
|
|
24
|
+
*/
|
|
25
|
+
loadProtocol(protocolPath: string): Promise<Record<string, unknown>>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Load a shared codec from a file path
|
|
29
|
+
*
|
|
30
|
+
* @param codecPath - Path to the codec module
|
|
31
|
+
* @param config - Configuration for the codec
|
|
32
|
+
* @returns Promise that resolves to a RadioCodec instance
|
|
33
|
+
*/
|
|
34
|
+
loadCodec(codecPath: string, config: Record<string, unknown>): Promise<RadioCodec>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Resolve a component reference relative to a base path
|
|
38
|
+
*
|
|
39
|
+
* @param reference - The reference to resolve
|
|
40
|
+
* @param basePath - The base path for resolution
|
|
41
|
+
* @returns The resolved absolute path
|
|
42
|
+
*/
|
|
43
|
+
resolveReference(reference: string, basePath: string): string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of a validation operation
|
|
3
|
+
*
|
|
4
|
+
* This interface provides a standardized way to return validation results
|
|
5
|
+
* across different parts of the radio system.
|
|
6
|
+
*/
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the validation passed
|
|
10
|
+
*/
|
|
11
|
+
isValid: boolean;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* List of validation errors
|
|
15
|
+
*/
|
|
16
|
+
errors: string[];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* List of validation warnings
|
|
20
|
+
*/
|
|
21
|
+
warnings: string[];
|
|
22
|
+
}
|