@bprotsyk/aso-core 1.2.58 → 1.2.59

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.PlugType = void 0;
4
4
  const flash_app_type_1 = require("./flash-app-type");
5
5
  const mongoose_1 = require("mongoose");
6
+ const util = require("util");
6
7
  var PlugType;
7
8
  (function (PlugType) {
8
9
  PlugType["PASTEBIN"] = "PASTEBIN";
@@ -199,5 +200,8 @@ async function updateSchemaAndMoveValue(model) {
199
200
  // ],
200
201
  // };
201
202
  // await model.updateMany({}, updateOperation);
203
+ console.log(util.inspect(await model.collection.indexes(), { showHidden: false, depth: null }));
204
+ console.log("–––––––––––––––––");
205
+ console.log(util.inspect(model.schema.indexes(), { showHidden: false, depth: null }));
202
206
  }
203
207
  exports.updateSchemaAndMoveValue = updateSchemaAndMoveValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  import { FlashAppType } from "./flash-app-type";
2
2
  import mongoose, { Model, model, PipelineStage, Schema, UpdateQuery, UpdateWithAggregationPipeline } from "mongoose";
3
+ const util = require("util")
3
4
 
4
5
  export interface IFlashApp {
5
6
  id: number
@@ -241,19 +242,23 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
241
242
  // developerName: "none",
242
243
  // type: FlashAppType.GAMBLING
243
244
  // },
244
- // $addToSet
245
- // $unset: [
246
- // "pastebinUrl",
247
- // "email",
248
- // "generationOptions.keyFileName",
249
- // "generationOptions.keyDeveloperName",
250
- // "generationOptions.keyDeveloperOrganization",
251
- // "generationOptions.keyCountryCode",
252
- // "generationOptions.keyCity",
253
- // "generationOptions.keyAlias",
254
- // "generationOptions.keyPassword",
255
- // ],
245
+ // $addToSet
246
+ // $unset: [
247
+ // "pastebinUrl",
248
+ // "email",
249
+ // "generationOptions.keyFileName",
250
+ // "generationOptions.keyDeveloperName",
251
+ // "generationOptions.keyDeveloperOrganization",
252
+ // "generationOptions.keyCountryCode",
253
+ // "generationOptions.keyCity",
254
+ // "generationOptions.keyAlias",
255
+ // "generationOptions.keyPassword",
256
+ // ],
256
257
  // };
257
258
 
258
259
  // await model.updateMany({}, updateOperation);
260
+
261
+ console.log(util.inspect(await model.collection.indexes(), { showHidden: false, depth: null }))
262
+ console.log("–––––––––––––––––")
263
+ console.log(util.inspect(model.schema.indexes(), { showHidden: false, depth: null }))
259
264
  }