cantian-mongodb 0.0.24 → 0.0.25

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/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export * from 'mongodb';
2
2
  export * from './mongoClient.js';
3
- export * from './util.js';
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from 'mongodb';
2
2
  export * from './mongoClient.js';
3
- export * from './util.js';
4
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cantian-mongodb",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
package/dist/util.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const normalizeModelSchema: (options: {
2
- schema: any;
3
- deleteFields?: string[];
4
- }) => Promise<any>;
package/dist/util.js DELETED
@@ -1,17 +0,0 @@
1
- export const normalizeModelSchema = async (options) => {
2
- const { schema, deleteFields } = options;
3
- const newSchema = structuredClone(schema);
4
- if (newSchema.properties) {
5
- if (newSchema.properties._id) {
6
- newSchema.properties.id = newSchema.properties._id;
7
- delete newSchema.properties._id;
8
- }
9
- if (deleteFields?.length) {
10
- for (let deleteField of deleteFields) {
11
- delete newSchema.properties[deleteField];
12
- }
13
- }
14
- }
15
- return newSchema;
16
- };
17
- //# sourceMappingURL=util.js.map
package/dist/util.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,OAA4C,EAAE,EAAE;IACzF,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IACzC,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;QACzB,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;YAC7B,SAAS,CAAC,UAAU,CAAC,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;YACnD,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;QAClC,CAAC;QACD,IAAI,YAAY,EAAE,MAAM,EAAE,CAAC;YACzB,KAAK,IAAI,WAAW,IAAI,YAAY,EAAE,CAAC;gBACrC,OAAO,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}