@bprotsyk/aso-core 1.2.39 → 1.2.41
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 +18 -45
- package/package.json +1 -1
- package/src/flash/flash-app.ts +18 -45
package/lib/flash/flash-app.js
CHANGED
|
@@ -176,56 +176,29 @@ exports.FlashAppSchemaUpdated = new mongoose_1.Schema({
|
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
async function updateSchemaAndMoveValue(model) {
|
|
179
|
-
const aggregationPipeline = [
|
|
180
|
-
// {
|
|
181
|
-
// '$project': {
|
|
182
|
-
// "pastebinUrl": "REMOVE",
|
|
183
|
-
// "email": "REMOVE",
|
|
184
|
-
// "generationOptions.keyFileName": "REMOVE",
|
|
185
|
-
// "generationOptions.keyDeveloperName": "REMOVE",
|
|
186
|
-
// "generationOptions.keyDeveloperOrganization": "REMOVE",
|
|
187
|
-
// "generationOptions.keyCountryCode": "REMOVE",
|
|
188
|
-
// "generationOptions.keyCity": "REMOVE",
|
|
189
|
-
// "generationOptions.keyAlias": "REMOVE",
|
|
190
|
-
// "generationOptions.keyPassword": "REMOVE"
|
|
191
|
-
// }
|
|
192
|
-
// },
|
|
193
|
-
{
|
|
194
|
-
'$addFields': {
|
|
195
|
-
'plugUrl': `$pastebinUrl`,
|
|
196
|
-
'reservePlugUrl': null,
|
|
197
|
-
'developerName': '$email',
|
|
198
|
-
'developerOrganization': '$generationOptions.keyDeveloperOrganization',
|
|
199
|
-
'developerEmail': '$email',
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
];
|
|
203
|
-
// Define the update operation to apply the new schema with the updated field
|
|
204
179
|
const updateOperation = {
|
|
205
|
-
$
|
|
206
|
-
plugUrl:
|
|
180
|
+
$addFields: {
|
|
181
|
+
plugUrl: "$pastebinUrl",
|
|
207
182
|
reservePlugUrl: null,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
]
|
|
183
|
+
developerName: "$generationOptions.keyDeveloperName",
|
|
184
|
+
developerEmail: "$email",
|
|
185
|
+
developerOrganization: "$generationOptions.keyDeveloperOrganization",
|
|
186
|
+
},
|
|
187
|
+
$project: {
|
|
188
|
+
pastebinUrl: 0,
|
|
189
|
+
email: 0,
|
|
190
|
+
"generationOptions.keyFileName": 0,
|
|
191
|
+
"generationOptions.keyDeveloperName": 0,
|
|
192
|
+
"generationOptions.keyDeveloperOrganization": 0,
|
|
193
|
+
"generationOptions.keyCountryCode": 0,
|
|
194
|
+
"generationOptions.keyCity": 0,
|
|
195
|
+
"generationOptions.keyAlias": 0,
|
|
196
|
+
"generationOptions.keyPassword": 0,
|
|
197
|
+
},
|
|
224
198
|
};
|
|
225
199
|
await model.updateMany({}, [
|
|
226
|
-
|
|
200
|
+
{},
|
|
227
201
|
updateOperation
|
|
228
202
|
]);
|
|
229
203
|
}
|
|
230
204
|
exports.updateSchemaAndMoveValue = updateSchemaAndMoveValue;
|
|
231
|
-
``;
|
package/package.json
CHANGED
package/src/flash/flash-app.ts
CHANGED
|
@@ -246,56 +246,29 @@ export const FlashAppSchemaUpdated = new Schema({
|
|
|
246
246
|
})
|
|
247
247
|
|
|
248
248
|
export async function updateSchemaAndMoveValue(model: Model<IFlashAppUpdated>): Promise<void> {
|
|
249
|
-
const aggregationPipeline = [
|
|
250
|
-
// {
|
|
251
|
-
// '$project': {
|
|
252
|
-
// "pastebinUrl": "REMOVE",
|
|
253
|
-
// "email": "REMOVE",
|
|
254
|
-
// "generationOptions.keyFileName": "REMOVE",
|
|
255
|
-
// "generationOptions.keyDeveloperName": "REMOVE",
|
|
256
|
-
// "generationOptions.keyDeveloperOrganization": "REMOVE",
|
|
257
|
-
// "generationOptions.keyCountryCode": "REMOVE",
|
|
258
|
-
// "generationOptions.keyCity": "REMOVE",
|
|
259
|
-
// "generationOptions.keyAlias": "REMOVE",
|
|
260
|
-
// "generationOptions.keyPassword": "REMOVE"
|
|
261
|
-
// }
|
|
262
|
-
// },
|
|
263
|
-
{
|
|
264
|
-
'$addFields': {
|
|
265
|
-
'plugUrl': `$pastebinUrl`,
|
|
266
|
-
'reservePlugUrl': null,
|
|
267
|
-
'developerName': '$email',
|
|
268
|
-
'developerOrganization': '$generationOptions.keyDeveloperOrganization',
|
|
269
|
-
'developerEmail': '$email',
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
];
|
|
273
|
-
|
|
274
|
-
// Define the update operation to apply the new schema with the updated field
|
|
275
249
|
const updateOperation: UpdateQuery<IFlashAppUpdated> = {
|
|
276
|
-
$
|
|
277
|
-
plugUrl:
|
|
250
|
+
$addFields: {
|
|
251
|
+
plugUrl: "$pastebinUrl",
|
|
278
252
|
reservePlugUrl: null,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
253
|
+
developerName: "$generationOptions.keyDeveloperName",
|
|
254
|
+
developerEmail: "$email",
|
|
255
|
+
developerOrganization: "$generationOptions.keyDeveloperOrganization",
|
|
256
|
+
},
|
|
257
|
+
$project: {
|
|
258
|
+
pastebinUrl: 0,
|
|
259
|
+
email: 0,
|
|
260
|
+
"generationOptions.keyFileName": 0,
|
|
261
|
+
"generationOptions.keyDeveloperName": 0,
|
|
262
|
+
"generationOptions.keyDeveloperOrganization": 0,
|
|
263
|
+
"generationOptions.keyCountryCode": 0,
|
|
264
|
+
"generationOptions.keyCity": 0,
|
|
265
|
+
"generationOptions.keyAlias": 0,
|
|
266
|
+
"generationOptions.keyPassword": 0,
|
|
283
267
|
},
|
|
284
|
-
$unset: [
|
|
285
|
-
'email',
|
|
286
|
-
'pastebinUrl',
|
|
287
|
-
'generationOptions.keyFileName',
|
|
288
|
-
'generationOptions.keyDeveloperName',
|
|
289
|
-
'generationOptions.keyDeveloperOrganization',
|
|
290
|
-
'generationOptions.keyCountryCode',
|
|
291
|
-
'generationOptions.keyCity',
|
|
292
|
-
'generationOptions.keyAlias',
|
|
293
|
-
'generationOptions.keyPassword',
|
|
294
|
-
]
|
|
295
268
|
};
|
|
296
269
|
|
|
297
270
|
await model.updateMany({}, [
|
|
298
|
-
|
|
271
|
+
{},
|
|
299
272
|
updateOperation
|
|
300
273
|
]);
|
|
301
|
-
}
|
|
274
|
+
}
|