@bprotsyk/aso-core 1.2.81 → 1.2.83
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/lib/flash/flash-app.js +6 -20
- package/package.json +1 -1
- package/src/flash/flash-app.ts +6 -15
package/lib/flash/flash-app.js
CHANGED
|
@@ -50,7 +50,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
|
|
|
50
50
|
},
|
|
51
51
|
plugStatus: {
|
|
52
52
|
type: String,
|
|
53
|
-
enum:
|
|
53
|
+
enum: FlashAppPlugStatus,
|
|
54
54
|
default: FlashAppPlugStatus.DISABLED,
|
|
55
55
|
required: false
|
|
56
56
|
},
|
|
@@ -62,7 +62,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
|
|
|
62
62
|
},
|
|
63
63
|
reservePlugType: {
|
|
64
64
|
type: String,
|
|
65
|
-
enum:
|
|
65
|
+
enum: FlashAppPlugStatus,
|
|
66
66
|
default: PlugType.GIST,
|
|
67
67
|
required: false
|
|
68
68
|
},
|
|
@@ -210,32 +210,18 @@ async function updateSchemaAndMoveValue(model) {
|
|
|
210
210
|
// employee_addr: "$$REMOVE"
|
|
211
211
|
// },
|
|
212
212
|
$set: {
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"plugId": "none",
|
|
216
|
-
"plugContent": "none",
|
|
217
|
-
"keitaroData.domainId": "$$REMOVE",
|
|
218
|
-
"keitaroData.domainName": "$$REMOVE",
|
|
219
|
-
"plugUrl": "$$REMOVE",
|
|
220
|
-
"reservePlugUrl": "$$REMOVE",
|
|
213
|
+
"plugStatus": "$$REMOVE",
|
|
214
|
+
"reservePlugStatus": "$$REMOVE",
|
|
221
215
|
}
|
|
222
216
|
}
|
|
223
217
|
];
|
|
224
218
|
let aggregation = model.aggregate(pipelineStage);
|
|
225
219
|
try {
|
|
226
|
-
await model.collection.dropIndex("
|
|
227
|
-
}
|
|
228
|
-
catch (e) { }
|
|
229
|
-
try {
|
|
230
|
-
await model.collection.dropIndex("keitaroData.domainName");
|
|
231
|
-
}
|
|
232
|
-
catch (e) { }
|
|
233
|
-
try {
|
|
234
|
-
await model.collection.dropIndex("plugUrl");
|
|
220
|
+
await model.collection.dropIndex("plugStatus");
|
|
235
221
|
}
|
|
236
222
|
catch (e) { }
|
|
237
223
|
try {
|
|
238
|
-
await model.collection.dropIndex("
|
|
224
|
+
await model.collection.dropIndex("reservePlugStatus");
|
|
239
225
|
}
|
|
240
226
|
catch (e) { }
|
|
241
227
|
// await model.schema.dropIndex("generationOptions.keyPassword_1")
|
package/package.json
CHANGED
package/src/flash/flash-app.ts
CHANGED
|
@@ -104,7 +104,7 @@ export const FlashAppSchema = new Schema({
|
|
|
104
104
|
},
|
|
105
105
|
plugStatus: {
|
|
106
106
|
type: String,
|
|
107
|
-
enum:
|
|
107
|
+
enum: FlashAppPlugStatus,
|
|
108
108
|
default: FlashAppPlugStatus.DISABLED,
|
|
109
109
|
required: false
|
|
110
110
|
},
|
|
@@ -116,7 +116,7 @@ export const FlashAppSchema = new Schema({
|
|
|
116
116
|
},
|
|
117
117
|
reservePlugType: {
|
|
118
118
|
type: String,
|
|
119
|
-
enum:
|
|
119
|
+
enum: FlashAppPlugStatus,
|
|
120
120
|
default: PlugType.GIST,
|
|
121
121
|
required: false
|
|
122
122
|
},
|
|
@@ -269,24 +269,15 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
|
|
|
269
269
|
// employee_addr: "$$REMOVE"
|
|
270
270
|
// },
|
|
271
271
|
$set: {
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"plugId": "none",
|
|
275
|
-
"plugContent": "none",
|
|
276
|
-
"keitaroData.domainId": "$$REMOVE",
|
|
277
|
-
"keitaroData.domainName": "$$REMOVE",
|
|
278
|
-
"plugUrl": "$$REMOVE",
|
|
279
|
-
"reservePlugUrl": "$$REMOVE",
|
|
272
|
+
"plugStatus": "$$REMOVE",
|
|
273
|
+
"reservePlugStatus": "$$REMOVE",
|
|
280
274
|
}
|
|
281
275
|
}
|
|
282
276
|
]
|
|
283
277
|
|
|
284
278
|
let aggregation = model.aggregate(pipelineStage)
|
|
285
|
-
try { await model.collection.dropIndex("
|
|
286
|
-
try { await model.collection.dropIndex("
|
|
287
|
-
|
|
288
|
-
try { await model.collection.dropIndex("plugUrl") } catch(e) {}
|
|
289
|
-
try { await model.collection.dropIndex("reservePlugUrl") } catch(e) {}
|
|
279
|
+
try { await model.collection.dropIndex("plugStatus") } catch(e) {}
|
|
280
|
+
try { await model.collection.dropIndex("reservePlugStatus") } catch(e) {}
|
|
290
281
|
|
|
291
282
|
// await model.schema.dropIndex("generationOptions.keyPassword_1")
|
|
292
283
|
await aggregation.exec()
|