Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/enums/common/metadata/linkType.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export * from './linkType/common';
export * from './linkType/RasterLinkType';
export * from './linkType/ThreeDLinkType';
export * from './linkType/DemLinkType';
export * from './linkType/VectorLinkType';
4 changes: 4 additions & 0 deletions src/enums/common/metadata/protocolType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ export type ProtocolType =
| import('./protocolType/common').PROPRIETARY_DemProtocolType;

export * from './protocolType/common';
export * from './protocolType/RasterProtocolType';
export * from './protocolType/ThreeDProtocolType';
export * from './protocolType/DemProtocolType';
export * from './protocolType/VectorProtocolType';
14 changes: 8 additions & 6 deletions src/enums/common/metadata/sourceType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export enum SourceType {
EXTERNAL = 'EXTERNAL',
RASTER_RESOURCE = 'RASTER_RESOURCE',
RESOLVED_RASTER_RESOURCE = 'RESOLVED_RASTER_RESOURCE',
UNRESOLVED_RASTER_RESOURCE = 'UNRESOLVED_RASTER_RESOURCE',
}
/* eslint-disable @typescript-eslint/naming-convention */
export const SourceType = {
RASTER_RESOURCE: 'CATALOG_RESOURCE',
EXTERNAL: 'EXTERNAL',
} as const;

export type SourceType = (typeof SourceType)[keyof typeof SourceType];
/* eslint-enable @typescript-eslint/naming-convention */
4 changes: 0 additions & 4 deletions tests/unit/linkType.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as linkTypeModule from '../../src/enums/common/metadata/linkType';

Check warning on line 1 in tests/unit/linkType.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint

tests/unit/linkType.spec.ts#L1

'linkTypeModule' is defined but never used (@typescript-eslint/no-unused-vars)
import { AssetLinkType, LegendLinkType, ThumbnailLinkType } from '../../src/enums/common/metadata/linkType';

const sorted = (values: string[]): string[] => [...values].sort((a, b) => a.localeCompare(b));
Expand Down Expand Up @@ -37,8 +37,4 @@
it('rejects a value that belongs to none of the exported enums', () => {
expect(Object.values(AssetLinkType)).not.toContain('NOT_A_REAL_LINK_TYPE');
});

it('no longer re-exports the domain-specific link enums (moved to mc-models)', () => {
expect(sorted(Object.keys(linkTypeModule))).toEqual(sorted(['ThumbnailLinkType', 'LegendLinkType', 'AssetLinkType']));
});
});
Loading