Skip to content

Commit e8d671c

Browse files
committed
refactor(*): no usage of barrel file imports in src
1 parent 6a2f03b commit e8d671c

File tree

118 files changed

+271
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+271
-235
lines changed

src/config/config.type.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { TableNameResolver } from '../dynamo'
21
import { SessionValidityEnsurer } from '../dynamo/session-validity-ensurer.type'
3-
import { LogReceiver } from '../logger'
4-
import { MapperForType } from '../mapper'
2+
import { TableNameResolver } from '../dynamo/table-name-resolver.type'
3+
import { LogReceiver } from '../logger/log-receiver.type'
4+
import { MapperForType } from '../mapper/for-type/base.mapper'
55

66
/**
77
* the global config object
File renamed without changes.

src/config/update-config.function.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tslint:disable:no-empty
22

33
import { resetDynamoEasyConfig } from '../../test/helper/resetDynamoEasyConfig.function'
4-
import { dateToNumberMapper } from '../mapper/custom'
4+
import { dateToNumberMapper } from '../mapper/custom/date-to-number.mapper'
55
import { dynamoEasyConfig } from './dynamo-easy-config'
66
import { updateDynamoEasyConfig } from './update-config.function'
77

src/decorator/decorators.spec.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// tslint:disable:no-unnecessary-class
33
// tslint:disable:no-non-null-assertion
44
// tslint:disable:no-unused-variable
5-
import { getMetaDataProperty } from '../../test/helper'
5+
import { getMetaDataProperty } from '../../test/helper/get-meta-data-property.function'
66
import {
77
ComplexModel,
88
CustomTableNameModel,
@@ -19,11 +19,18 @@ import {
1919
SimpleModel,
2020
} from '../../test/models'
2121
import { Form } from '../../test/models/real-world'
22-
import { GSIPartitionKey, GSISortKey, LSISortKey, PartitionKey, Property, SortKey, Transient } from './impl'
2322
import { CollectionProperty } from './impl/collection/collection-property.decorator'
23+
import { GSIPartitionKey } from './impl/index/gsi-partition-key.decorator'
24+
import { GSISortKey } from './impl/index/gsi-sort-key.decorator'
25+
import { LSISortKey } from './impl/index/lsi-sort-key.decorator'
26+
import { PartitionKey } from './impl/key/partition-key.decorator'
27+
import { SortKey } from './impl/key/sort-key.decorator'
2428
import { Model } from './impl/model/model.decorator'
25-
import { Metadata, metadataForClass, metadataForModel, ModelMetadata } from './index'
26-
import { metadataForProperty } from './metadata'
29+
import { Property } from './impl/property/property.decorator'
30+
import { Transient } from './impl/transient/transient.decorator'
31+
import { Metadata } from './metadata/metadata'
32+
import { metadataForClass, metadataForModel, metadataForProperty } from './metadata/metadata-helper'
33+
import { ModelMetadata } from './metadata/model-metadata.model'
2734

2835
describe('Decorators should add correct metadata', () => {
2936
describe('Property() should allow to define a different Mapper', () => {

src/decorator/impl/collection/collection-property-data.model.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { BinaryAttribute, MapperForType, NumberAttribute, StringAttribute } from '../../../mapper'
2-
import { ModelConstructor } from '../../../model'
1+
import { MapperForType } from '../../../mapper/for-type/base.mapper'
2+
import { BinaryAttribute, NumberAttribute, StringAttribute } from '../../../mapper/type/attribute.type'
3+
import { ModelConstructor } from '../../../model/model-constructor'
34

45
export interface CollectionPropertyData<R, T extends StringAttribute | NumberAttribute | BinaryAttribute> {
56
/**

src/decorator/impl/collection/collection-property.decorator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tslint:disable:max-classes-per-file
22
// tslint:disable:no-non-null-assertion
33
import { FormId, formIdMapper } from '../../../../test/models/real-world'
4-
import { metadataForClass, metadataForProperty } from '../../metadata'
4+
import { metadataForClass, metadataForProperty } from '../../metadata/metadata-helper'
55
import { Model } from '../model/model.decorator'
66
import { CollectionProperty } from './collection-property.decorator'
77

src/decorator/impl/collection/collection-property.decorator.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { BinaryAttribute, MapperForType, NumberAttribute, StringAttribute } from '../../../mapper'
1+
import { MapperForType } from '../../../mapper/for-type/base.mapper'
2+
import { BinaryAttribute, NumberAttribute, StringAttribute } from '../../../mapper/type/attribute.type'
23
import {
34
wrapMapperForDynamoListJsArray,
45
wrapMapperForDynamoListJsSet,
56
wrapMapperForDynamoSetJsArray,
67
wrapMapperForDynamoSetJsSet,
78
} from '../../../mapper/wrap-mapper-for-collection.function'
8-
import { ModelConstructor } from '../../../model'
9-
import { PropertyMetadata, TypeInfo } from '../../metadata'
9+
import { ModelConstructor } from '../../../model/model-constructor'
10+
import { PropertyMetadata, TypeInfo } from '../../metadata/property-metadata.model'
1011
import { getMetadataType } from '../../util'
1112
import { initOrUpdateProperty } from '../property/init-or-update-property.function'
1213
import { CollectionPropertyData } from './collection-property-data.model'

src/decorator/impl/date/date-property.decorator.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// tslint:disable:no-non-null-assertion
2-
import { metadataForModel, Model, ModelMetadata } from '../..'
3-
import { getMetaDataProperty } from '../../../../test/helper'
2+
import { getMetaDataProperty } from '../../../../test/helper/get-meta-data-property.function'
43
import { resetDynamoEasyConfig } from '../../../../test/helper/resetDynamoEasyConfig.function'
5-
import { updateDynamoEasyConfig } from '../../../config'
6-
import { dateToNumberMapper } from '../../../mapper/custom'
4+
import { updateDynamoEasyConfig } from '../../../config/update-config.function'
5+
import { dateToNumberMapper } from '../../../mapper/custom/date-to-number.mapper'
6+
import { metadataForModel } from '../../metadata/metadata-helper'
7+
import { ModelMetadata } from '../../metadata/model-metadata.model'
8+
import { Model } from '../model/model.decorator'
79
import { DateProperty } from './date-property.decorator'
810

911
@Model()

src/decorator/impl/date/date-property.decorator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { dynamoEasyConfig } from '../../../config/dynamo-easy-config'
2-
import { PropertyMetadata } from '../../metadata'
2+
import { PropertyMetadata } from '../../metadata/property-metadata.model'
33
import { initOrUpdateProperty } from '../property/init-or-update-property.function'
44
import { DatePropertyData } from './date-property-data.model'
55

src/decorator/impl/model/model.decorator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as DynamoDB from 'aws-sdk/clients/dynamodb'
22
import { kebabCase } from 'lodash'
3-
import { ModelMetadata } from '../../metadata'
3+
import { ModelMetadata } from '../../metadata/model-metadata.model'
44
import { PropertyMetadata } from '../../metadata/property-metadata.model'
55
import { SecondaryIndex } from '../index/secondary-index'
66
import { KEY_PROPERTY } from '../property/key-property.const'

0 commit comments

Comments
 (0)