@mbc-cqrs-serverless/sequence 0.1.29-beta.0 → 0.1.31-beta.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/dist/dto/gen-sequence.dto.d.ts +12 -1
- package/dist/dto/gen-sequence.dto.js +46 -2
- package/dist/dto/gen-sequence.dto.js.map +1 -1
- package/dist/interfaces/fiscal-year.interface.d.ts +5 -0
- package/dist/interfaces/fiscal-year.interface.js +3 -0
- package/dist/interfaces/fiscal-year.interface.js.map +1 -0
- package/dist/interfaces/sequence-service.interface.d.ts +8 -0
- package/dist/interfaces/sequence-service.interface.js +3 -0
- package/dist/interfaces/sequence-service.interface.js.map +1 -0
- package/dist/sequences.service.d.ts +25 -3
- package/dist/sequences.service.js +144 -11
- package/dist/sequences.service.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { RotateByEnum } from '../enums/rotate-by.enum';
|
|
2
|
+
export declare class SequenceParamsDto {
|
|
3
|
+
code1: string;
|
|
4
|
+
code2: string;
|
|
5
|
+
code3?: string;
|
|
6
|
+
code4?: string;
|
|
7
|
+
code5?: string;
|
|
8
|
+
constructor(partial: Partial<SequenceParamsDto>);
|
|
9
|
+
}
|
|
2
10
|
export declare class GenSequenceDto {
|
|
3
11
|
date?: Date;
|
|
4
12
|
rotateBy?: RotateByEnum;
|
|
5
13
|
tenantCode: string;
|
|
6
|
-
|
|
14
|
+
params: SequenceParamsDto;
|
|
15
|
+
format?: string;
|
|
16
|
+
startMonth?: number;
|
|
17
|
+
registerDate?: Date;
|
|
7
18
|
}
|
|
@@ -9,10 +9,39 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GenSequenceDto = void 0;
|
|
12
|
+
exports.GenSequenceDto = exports.SequenceParamsDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const rotate_by_enum_1 = require("../enums/rotate-by.enum");
|
|
16
|
+
class SequenceParamsDto {
|
|
17
|
+
constructor(partial) {
|
|
18
|
+
Object.assign(this, partial);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.SequenceParamsDto = SequenceParamsDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], SequenceParamsDto.prototype, "code1", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], SequenceParamsDto.prototype, "code2", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], SequenceParamsDto.prototype, "code3", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SequenceParamsDto.prototype, "code4", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], SequenceParamsDto.prototype, "code5", void 0);
|
|
16
45
|
class GenSequenceDto {
|
|
17
46
|
}
|
|
18
47
|
exports.GenSequenceDto = GenSequenceDto;
|
|
@@ -31,8 +60,23 @@ __decorate([
|
|
|
31
60
|
(0, class_validator_1.IsString)(),
|
|
32
61
|
__metadata("design:type", String)
|
|
33
62
|
], GenSequenceDto.prototype, "tenantCode", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsObject)(),
|
|
65
|
+
__metadata("design:type", SequenceParamsDto)
|
|
66
|
+
], GenSequenceDto.prototype, "params", void 0);
|
|
34
67
|
__decorate([
|
|
35
68
|
(0, class_validator_1.IsString)(),
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
70
|
__metadata("design:type", String)
|
|
37
|
-
], GenSequenceDto.prototype, "
|
|
71
|
+
], GenSequenceDto.prototype, "format", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsNumber)(),
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], GenSequenceDto.prototype, "startMonth", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
__metadata("design:type", Date)
|
|
81
|
+
], GenSequenceDto.prototype, "registerDate", void 0);
|
|
38
82
|
//# sourceMappingURL=gen-sequence.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen-sequence.dto.js","sourceRoot":"","sources":["../../src/dto/gen-sequence.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"gen-sequence.dto.js","sourceRoot":"","sources":["../../src/dto/gen-sequence.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA6C;AAC7C,qDAMwB;AAExB,4DAAsD;AAEtD,MAAa,iBAAiB;IAqB5B,YAAY,OAAmC;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC;CACF;AAxBD,8CAwBC;AApBC;IADC,IAAA,0BAAQ,GAAE;;gDACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;gDACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACG;AAOhB,MAAa,cAAc;CAuC1B;AAvCD,wCAuCC;AApCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;8BACN,IAAI;4CAAA;AAKX;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,6BAAY,EAAE,OAAO,EAAE,6BAAY,CAAC,aAAa,EAAE,CAAC;IACxE,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,6BAAY,CAAC;;gDACE;AAGvB;IADC,IAAA,0BAAQ,GAAE;;kDACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;8BACH,iBAAiB;8CAAA;AAQzB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACE;AAQf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACM;AAQnB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;8BACE,IAAI;oDAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiscal-year.interface.js","sourceRoot":"","sources":["../../src/interfaces/fiscal-year.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataEntity, DetailKey, IInvoke } from '@mbc-cqrs-serverless/core';
|
|
2
|
+
import { GenSequenceDto } from '../dto/gen-sequence.dto';
|
|
3
|
+
export interface ISequenceService {
|
|
4
|
+
getCurrentSequence(key: DetailKey): Promise<DataEntity>;
|
|
5
|
+
genNewSequence(dto: GenSequenceDto, opts: {
|
|
6
|
+
invokeContext: IInvoke;
|
|
7
|
+
}): Promise<DataEntity>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-service.interface.js","sourceRoot":"","sources":["../../src/interfaces/sequence-service.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { DataEntity, DetailKey, DynamoDbService, IInvoke } from '@mbc-cqrs-serverless/core';
|
|
2
|
-
import { GenSequenceDto } from './dto/gen-sequence.dto';
|
|
3
|
-
|
|
2
|
+
import { GenSequenceDto, SequenceParamsDto } from './dto/gen-sequence.dto';
|
|
3
|
+
import { RotateByEnum } from './enums/rotate-by.enum';
|
|
4
|
+
import { FiscalYearOptions } from './interfaces/fiscal-year.interface';
|
|
5
|
+
import { ISequenceService } from './interfaces/sequence-service.interface';
|
|
6
|
+
export declare class SequencesService implements ISequenceService {
|
|
4
7
|
private readonly dynamoDbService;
|
|
5
8
|
private readonly logger;
|
|
6
9
|
private readonly tableName;
|
|
@@ -9,5 +12,24 @@ export declare class SequencesService {
|
|
|
9
12
|
genNewSequence(dto: GenSequenceDto, opts: {
|
|
10
13
|
invokeContext: IInvoke;
|
|
11
14
|
}): Promise<DataEntity>;
|
|
12
|
-
|
|
15
|
+
getRotateValue(rotateBy?: RotateByEnum, forDate?: Date): string;
|
|
16
|
+
isIncrementNo(rotateBy: RotateByEnum | undefined, nowFiscalYear: number, fiscalYear: number, issuedAt: Date): boolean;
|
|
17
|
+
getFiscalYear(options: FiscalYearOptions): number;
|
|
18
|
+
createFormatDict(sequenceParams: SequenceParamsDto, fiscalYear: number, fixNo: number, now: Date): {
|
|
19
|
+
fiscal_year: number;
|
|
20
|
+
no: number;
|
|
21
|
+
month: number;
|
|
22
|
+
day: number;
|
|
23
|
+
date: Date;
|
|
24
|
+
code1: string;
|
|
25
|
+
code2: string;
|
|
26
|
+
code3?: string;
|
|
27
|
+
code4?: string;
|
|
28
|
+
code5?: string;
|
|
29
|
+
};
|
|
30
|
+
createFormattedNo(format: string, formatDict: SequenceParamsDto): string;
|
|
31
|
+
extractPaddingInfo(str: string): {
|
|
32
|
+
paddingValue: string;
|
|
33
|
+
paddingNumber: number;
|
|
34
|
+
};
|
|
13
35
|
}
|
|
@@ -25,37 +25,89 @@ let SequencesService = SequencesService_1 = class SequencesService {
|
|
|
25
25
|
return await this.dynamoDbService.getItem(this.tableName, key);
|
|
26
26
|
}
|
|
27
27
|
async genNewSequence(dto, opts) {
|
|
28
|
-
const
|
|
29
|
-
const pk = `SEQ${core_1.KEY_SEPARATOR}${
|
|
30
|
-
|
|
28
|
+
const { date, rotateBy, format = '%%no%%', tenantCode, params, registerDate, startMonth, } = dto;
|
|
29
|
+
const pk = `SEQ${core_1.KEY_SEPARATOR}${tenantCode}`;
|
|
30
|
+
let sk = [
|
|
31
|
+
params.code1,
|
|
32
|
+
params.code2,
|
|
33
|
+
params.code3,
|
|
34
|
+
params.code4,
|
|
35
|
+
params.code5,
|
|
36
|
+
]
|
|
37
|
+
.filter(Boolean)
|
|
38
|
+
.join(core_1.KEY_SEPARATOR);
|
|
39
|
+
const now = new Date();
|
|
40
|
+
const issuedAt = (0, core_1.toISOStringWithTimezone)(date || now);
|
|
41
|
+
const nowFiscalYear = this.getFiscalYear({
|
|
42
|
+
now: date || now,
|
|
43
|
+
registerTime: registerDate,
|
|
44
|
+
startMonth,
|
|
45
|
+
});
|
|
31
46
|
const sourceIp = opts.invokeContext?.event?.requestContext?.http?.sourceIp;
|
|
32
47
|
const userContext = (0, core_1.getUserContext)(opts.invokeContext);
|
|
33
48
|
const userId = userContext.userId || 'system';
|
|
34
|
-
const
|
|
35
|
-
const item = await this.dynamoDbService.updateItem(this.tableName, { pk, sk }, {
|
|
49
|
+
const buildUpdateData = (seq, formattedNo, sk) => ({
|
|
36
50
|
set: {
|
|
37
51
|
code: sk,
|
|
38
|
-
name:
|
|
39
|
-
tenantCode
|
|
40
|
-
type:
|
|
41
|
-
seq
|
|
52
|
+
name: rotateBy || 'none',
|
|
53
|
+
tenantCode,
|
|
54
|
+
type: params.code1,
|
|
55
|
+
seq,
|
|
42
56
|
requestId: opts.invokeContext?.context?.awsRequestId,
|
|
43
57
|
createdAt: { ifNotExists: now },
|
|
44
58
|
createdBy: { ifNotExists: userId },
|
|
45
59
|
createdIp: { ifNotExists: sourceIp },
|
|
60
|
+
attributes: {
|
|
61
|
+
formatted_no: formattedNo,
|
|
62
|
+
fiscal_year: nowFiscalYear,
|
|
63
|
+
issued_at: issuedAt,
|
|
64
|
+
},
|
|
46
65
|
updatedAt: now,
|
|
47
66
|
updatedBy: userId,
|
|
48
67
|
updatedIp: sourceIp,
|
|
49
68
|
},
|
|
50
69
|
});
|
|
51
|
-
|
|
70
|
+
const sequenceData = await this.dynamoDbService.getItem(this.tableName, {
|
|
71
|
+
pk,
|
|
72
|
+
sk,
|
|
73
|
+
});
|
|
74
|
+
let fixNo = 0;
|
|
75
|
+
let rotateSequenceData = null;
|
|
76
|
+
if (date) {
|
|
77
|
+
const rotateSortKeyVal = this.getRotateValue(rotateBy, date);
|
|
78
|
+
rotateSequenceData = await this.dynamoDbService.getItem(this.tableName, {
|
|
79
|
+
pk,
|
|
80
|
+
sk: `${sk}${core_1.KEY_SEPARATOR}${rotateSortKeyVal}`,
|
|
81
|
+
});
|
|
82
|
+
fixNo = rotateSequenceData ? rotateSequenceData.seq + 1 : 1;
|
|
83
|
+
}
|
|
84
|
+
else if (!date) {
|
|
85
|
+
if (sequenceData) {
|
|
86
|
+
fixNo = this.isIncrementNo(rotateBy, nowFiscalYear, sequenceData.attributes.fiscal_year, new Date(sequenceData.issuedAt))
|
|
87
|
+
? sequenceData.seq + 1
|
|
88
|
+
: 1;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
fixNo = 1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const formatDict = this.createFormatDict(params, nowFiscalYear, fixNo, date || now);
|
|
95
|
+
const formattedNo = this.createFormattedNo(format, formatDict);
|
|
96
|
+
if (rotateSequenceData) {
|
|
97
|
+
return await this.dynamoDbService.updateItem(this.tableName, { pk: rotateSequenceData.pk, sk: rotateSequenceData.sk }, buildUpdateData(fixNo, formattedNo, sk));
|
|
98
|
+
}
|
|
99
|
+
if (date) {
|
|
100
|
+
const rotateSortKeyVal = this.getRotateValue(rotateBy, date);
|
|
101
|
+
sk = `${sk}${core_1.KEY_SEPARATOR}${rotateSortKeyVal}`;
|
|
102
|
+
}
|
|
103
|
+
return await this.dynamoDbService.updateItem(this.tableName, { pk, sk }, buildUpdateData(fixNo, formattedNo, sk));
|
|
52
104
|
}
|
|
53
105
|
getRotateValue(rotateBy, forDate) {
|
|
54
106
|
const date = forDate || new Date();
|
|
55
107
|
switch (rotateBy) {
|
|
56
108
|
case rotate_by_enum_1.RotateByEnum.FISCAL_YEARLY:
|
|
57
109
|
const year = date.getFullYear();
|
|
58
|
-
return date.getMonth() < 3 ? year - 1 : year;
|
|
110
|
+
return date.getMonth() < 3 ? (year - 1).toString() : year.toString();
|
|
59
111
|
case rotate_by_enum_1.RotateByEnum.YEARLY:
|
|
60
112
|
return date.getFullYear().toString();
|
|
61
113
|
case rotate_by_enum_1.RotateByEnum.MONTHLY:
|
|
@@ -69,6 +121,87 @@ let SequencesService = SequencesService_1 = class SequencesService {
|
|
|
69
121
|
return rotate_by_enum_1.RotateByEnum.NONE;
|
|
70
122
|
}
|
|
71
123
|
}
|
|
124
|
+
isIncrementNo(rotateBy, nowFiscalYear, fiscalYear, issuedAt) {
|
|
125
|
+
if (!rotateBy) {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
if (rotateBy === rotate_by_enum_1.RotateByEnum.FISCAL_YEARLY) {
|
|
129
|
+
if (nowFiscalYear === fiscalYear) {
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const nowDate = new Date();
|
|
134
|
+
if (rotateBy === rotate_by_enum_1.RotateByEnum.YEARLY) {
|
|
135
|
+
if (nowDate.getFullYear() === issuedAt.getFullYear()) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (rotateBy === rotate_by_enum_1.RotateByEnum.MONTHLY) {
|
|
140
|
+
if (nowDate.getFullYear() === issuedAt.getFullYear()) {
|
|
141
|
+
if (nowDate.getMonth() === issuedAt.getMonth()) {
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
getFiscalYear(options) {
|
|
149
|
+
const { now, startMonth = 4, registerTime } = options;
|
|
150
|
+
const effectiveStartMonth = registerTime
|
|
151
|
+
? registerTime.getMonth() + 1
|
|
152
|
+
: startMonth ?? 4;
|
|
153
|
+
const referenceYear = registerTime ? registerTime.getFullYear() : 1953;
|
|
154
|
+
const fiscalYear = now.getMonth() + 1 < effectiveStartMonth
|
|
155
|
+
? now.getFullYear() - 1
|
|
156
|
+
: now.getFullYear();
|
|
157
|
+
return fiscalYear - referenceYear + 1;
|
|
158
|
+
}
|
|
159
|
+
createFormatDict(sequenceParams, fiscalYear, fixNo, now) {
|
|
160
|
+
return {
|
|
161
|
+
...sequenceParams,
|
|
162
|
+
fiscal_year: fiscalYear,
|
|
163
|
+
no: fixNo,
|
|
164
|
+
month: now.getMonth() + 1,
|
|
165
|
+
day: now.getDate(),
|
|
166
|
+
date: now,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
createFormattedNo(format, formatDict) {
|
|
170
|
+
let result = '';
|
|
171
|
+
const words = format.split('%%');
|
|
172
|
+
for (const word of words) {
|
|
173
|
+
if (word.includes('#')) {
|
|
174
|
+
const wordList = word.split('#');
|
|
175
|
+
if (formatDict[wordList[0]]) {
|
|
176
|
+
const key = wordList[0];
|
|
177
|
+
const value = formatDict[key].toString();
|
|
178
|
+
const paddingInfo = this.extractPaddingInfo(wordList[1]);
|
|
179
|
+
const paddingValue = value.padStart(paddingInfo.paddingNumber, paddingInfo.paddingValue);
|
|
180
|
+
result += paddingValue;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
result += word;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
if (formatDict[word]) {
|
|
188
|
+
result += formatDict[word].toString();
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
result += word;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
extractPaddingInfo(str) {
|
|
198
|
+
const regex = /:(\d)>(\d)/;
|
|
199
|
+
const match = str.match(regex);
|
|
200
|
+
return {
|
|
201
|
+
paddingValue: match[1],
|
|
202
|
+
paddingNumber: parseInt(match[2], 10),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
72
205
|
};
|
|
73
206
|
exports.SequencesService = SequencesService;
|
|
74
207
|
exports.SequencesService = SequencesService = SequencesService_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequences.service.js","sourceRoot":"","sources":["../src/sequences.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"sequences.service.js","sourceRoot":"","sources":["../src/sequences.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAQkC;AAClC,2CAAmD;AAGnD,2DAAqD;AAK9C,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAI3B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAH5C,WAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAA;QAIzD,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;QAC1D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,CAAA;IACnD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,GAAc;QACrC,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;IAChE,CAAC;IAsBD,KAAK,CAAC,cAAc,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B,OAAO;YACL,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;YACtB,aAAa,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACtC,CAAA;IACH,CAAC;CACF,CAAA;AA5TY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAKmC,sBAAe;GAJlD,gBAAgB,CA4T5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbc-cqrs-serverless/sequence",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31-beta.0",
|
|
4
4
|
"description": "Generate increment sequence with time-rotation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mbc",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@mbc-cqrs-serverless/core": "^0.1.
|
|
44
|
+
"@mbc-cqrs-serverless/core": "^0.1.31-beta.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ad5316db04ea32de8151f20a1b53499cda0f1caf"
|
|
47
47
|
}
|