feat: Complete CouchDB migration and Docker configuration
- Add comprehensive CouchDB setup and configuration - Update Docker files for CouchDB compatibility - Create Kubernetes manifests for CouchDB deployment - Add migration scripts and documentation - Update seeding scripts to support both CouchDB and MongoDB - Add docker-compose for local development - Create comprehensive setup and deployment guides 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
35
node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js
generated
vendored
Normal file
35
node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../../utils');
|
||||
|
||||
const keysToSkip = new Set(['__index', '__parentArray', '_doc']);
|
||||
|
||||
/**
|
||||
* Using spread operator on a Mongoose document gives you a
|
||||
* POJO that has a tendency to cause infinite recursion. So
|
||||
* we use this function on `set()` to prevent that.
|
||||
*/
|
||||
|
||||
module.exports = function handleSpreadDoc(v, includeExtraKeys) {
|
||||
if (utils.isPOJO(v) && v.$__ != null && v._doc != null) {
|
||||
if (includeExtraKeys) {
|
||||
const extraKeys = {};
|
||||
for (const key of Object.keys(v)) {
|
||||
if (typeof key === 'symbol') {
|
||||
continue;
|
||||
}
|
||||
if (key[0] === '$') {
|
||||
continue;
|
||||
}
|
||||
if (keysToSkip.has(key)) {
|
||||
continue;
|
||||
}
|
||||
extraKeys[key] = v[key];
|
||||
}
|
||||
return { ...v._doc, ...extraKeys };
|
||||
}
|
||||
return v._doc;
|
||||
}
|
||||
|
||||
return v;
|
||||
};
|
||||
Reference in New Issue
Block a user