@chevre/domain 23.2.0-alpha.48 → 23.2.0-alpha.49
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.
|
@@ -15,7 +15,7 @@ async function main() {
|
|
|
15
15
|
|
|
16
16
|
const settingRepo = await chevre.repository.Setting.createInstance(mongoose.connection);
|
|
17
17
|
|
|
18
|
-
const setting = await settingRepo.findOne({ project: { id: { $eq: '*' } } }, ['orderNumber'
|
|
18
|
+
const setting = await settingRepo.findOne({ project: { id: { $eq: '*' } } }, ['orderNumber']);
|
|
19
19
|
console.log(setting);
|
|
20
20
|
|
|
21
21
|
if (typeof setting?.orderNumber?.version !== 'string' || !(setting?.orderNumber?.validFrom instanceof Date)) {
|
|
@@ -33,22 +33,6 @@ async function main() {
|
|
|
33
33
|
);
|
|
34
34
|
console.log('orderNumber updated.');
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
if (typeof setting?.transactionNumber?.version !== 'string' || !(setting?.transactionNumber?.validFrom instanceof Date)) {
|
|
38
|
-
console.log('updating orderNumber...');
|
|
39
|
-
await settingRepo.updateByProject(
|
|
40
|
-
{ project: { id: { $eq: '*' } } },
|
|
41
|
-
{
|
|
42
|
-
transactionNumber: {
|
|
43
|
-
validFrom: moment('2026-01-31T15:00:00Z')
|
|
44
|
-
.toDate(),
|
|
45
|
-
fpeSecret: FPE_SECRET,
|
|
46
|
-
version: '1'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
console.log('transactionNumber updated.');
|
|
51
|
-
}
|
|
52
36
|
}
|
|
53
37
|
|
|
54
38
|
main()
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../../lib/index';
|
|
6
|
+
|
|
7
|
+
const { FPE_SECRET } = process.env;
|
|
8
|
+
|
|
9
|
+
async function main() {
|
|
10
|
+
if (typeof FPE_SECRET !== 'string') {
|
|
11
|
+
throw new Error('FPE_SECRET required');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
15
|
+
|
|
16
|
+
const settingRepo = await chevre.repository.Setting.createInstance(mongoose.connection);
|
|
17
|
+
|
|
18
|
+
const setting = await settingRepo.findOne({ project: { id: { $eq: '*' } } }, ['transactionNumber']);
|
|
19
|
+
console.log(setting);
|
|
20
|
+
|
|
21
|
+
if (typeof setting?.transactionNumber?.version !== 'string' || !(setting?.transactionNumber?.validFrom instanceof Date)) {
|
|
22
|
+
console.log('updating transactionNumber...');
|
|
23
|
+
await settingRepo.updateByProject(
|
|
24
|
+
{ project: { id: { $eq: '*' } } },
|
|
25
|
+
{
|
|
26
|
+
transactionNumber: {
|
|
27
|
+
validFrom: moment('2026-02-02T15:00:00Z')
|
|
28
|
+
.toDate(),
|
|
29
|
+
fpeSecret: FPE_SECRET,
|
|
30
|
+
version: '1'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
console.log('transactionNumber updated.');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
main()
|
|
39
|
+
.then()
|
|
40
|
+
.catch(console.error);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.minimizeSuperEvent = minimizeSuperEvent;
|
|
4
4
|
const factory = require("../factory");
|
|
5
|
+
const USE_DEPRECATED_VIDEO_FORMAT_EVENTS = process.env.USE_DEPRECATED_VIDEO_FORMAT_EVENTS === '1';
|
|
5
6
|
/**
|
|
6
7
|
* 興行イベントのsuperEventを作成する
|
|
7
8
|
*/
|
|
@@ -38,8 +39,10 @@ function minimizeSuperEvent(params) {
|
|
|
38
39
|
? { dubLanguage: params.superEventFromDB.dubLanguage }
|
|
39
40
|
: undefined), (params.superEventFromDB.subtitleLanguage !== undefined)
|
|
40
41
|
? { subtitleLanguage: params.superEventFromDB.subtitleLanguage }
|
|
41
|
-
: undefined),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
: undefined), (USE_DEPRECATED_VIDEO_FORMAT_EVENTS)
|
|
43
|
+
? {
|
|
44
|
+
// 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
45
|
+
videoFormat: params.superEventFromDB.videoFormat
|
|
46
|
+
}
|
|
47
|
+
: undefined);
|
|
45
48
|
}
|
|
@@ -16,6 +16,7 @@ const createDebug = require("debug");
|
|
|
16
16
|
const moment = require("moment-timezone");
|
|
17
17
|
const factory = require("../../factory");
|
|
18
18
|
const saveScreeningEventSeries_1 = require("./saveScreeningEventSeries");
|
|
19
|
+
const USE_DEPRECATED_VIDEO_FORMAT_EVENTS = process.env.USE_DEPRECATED_VIDEO_FORMAT_EVENTS === '1';
|
|
19
20
|
const debug = createDebug('chevre-domain:service:event');
|
|
20
21
|
function saveScreeningEvents(params, options) {
|
|
21
22
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -170,22 +171,16 @@ function createScreeningEvents(params, options) {
|
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
173
|
function minimizeSuperEvent(params) {
|
|
173
|
-
const { workPerformed, videoFormat, startDate, soundFormat, name, location, kanaName, identifier, endDate, duration, coaInfo, alternativeHeadline,
|
|
174
|
-
// additionalProperty,
|
|
175
|
-
typeOf, id
|
|
176
|
-
// project,
|
|
177
|
-
// organizer,
|
|
178
|
-
// offers,
|
|
179
|
-
// eventStatus
|
|
180
|
-
} = params.superEvent;
|
|
174
|
+
const { workPerformed, videoFormat, startDate, soundFormat, name, location, kanaName, identifier, endDate, duration, coaInfo, alternativeHeadline, typeOf, id } = params.superEvent;
|
|
181
175
|
return Object.assign({ workPerformed, startDate, soundFormat,
|
|
182
176
|
name, location, kanaName, identifier,
|
|
183
177
|
endDate, duration, coaInfo, alternativeHeadline,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
178
|
+
typeOf, id }, (USE_DEPRECATED_VIDEO_FORMAT_EVENTS)
|
|
179
|
+
? {
|
|
180
|
+
// 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
181
|
+
videoFormat
|
|
182
|
+
}
|
|
183
|
+
: undefined);
|
|
189
184
|
}
|
|
190
185
|
/**
|
|
191
186
|
* コアデータからイベントを作成する
|
package/package.json
CHANGED