@payloadcms/db-mongodb 3.0.0-canary.a0b06af → 3.0.0-canary.a192632

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/dist/connect.d.ts.map +1 -1
  2. package/dist/connect.js +6 -1
  3. package/dist/connect.js.map +1 -1
  4. package/dist/createMigration.d.ts.map +1 -1
  5. package/dist/createMigration.js +1 -1
  6. package/dist/createMigration.js.map +1 -1
  7. package/dist/find.d.ts.map +1 -1
  8. package/dist/find.js +7 -1
  9. package/dist/find.js.map +1 -1
  10. package/dist/findGlobalVersions.d.ts.map +1 -1
  11. package/dist/findGlobalVersions.js +8 -2
  12. package/dist/findGlobalVersions.js.map +1 -1
  13. package/dist/findVersions.d.ts.map +1 -1
  14. package/dist/findVersions.js +7 -1
  15. package/dist/findVersions.js.map +1 -1
  16. package/dist/index.d.ts +46 -7
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +2 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/init.d.ts.map +1 -1
  21. package/dist/init.js +1 -1
  22. package/dist/init.js.map +1 -1
  23. package/dist/models/buildCollectionSchema.d.ts.map +1 -1
  24. package/dist/models/buildCollectionSchema.js +9 -0
  25. package/dist/models/buildCollectionSchema.js.map +1 -1
  26. package/dist/models/buildSchema.d.ts.map +1 -1
  27. package/dist/models/buildSchema.js +12 -11
  28. package/dist/models/buildSchema.js.map +1 -1
  29. package/dist/queries/buildAndOrConditions.d.ts.map +1 -1
  30. package/dist/queries/buildAndOrConditions.js +0 -2
  31. package/dist/queries/buildAndOrConditions.js.map +1 -1
  32. package/dist/queries/getLocalizedSortProperty.spec.js +42 -42
  33. package/dist/queries/getLocalizedSortProperty.spec.js.map +1 -1
  34. package/dist/queries/parseParams.d.ts.map +1 -1
  35. package/dist/queries/parseParams.js +2 -5
  36. package/dist/queries/parseParams.js.map +1 -1
  37. package/dist/queryDrafts.d.ts.map +1 -1
  38. package/dist/queryDrafts.js +7 -1
  39. package/dist/queryDrafts.js.map +1 -1
  40. package/dist/types.d.ts.map +1 -1
  41. package/dist/types.js.map +1 -1
  42. package/package.json +3 -4
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { IndexDefinition, IndexOptions, Model, PaginateModel, SchemaOptions } from 'mongoose'\nimport type {\n ArrayField,\n BlockField,\n CheckboxField,\n CodeField,\n CollapsibleField,\n DateField,\n EmailField,\n Field,\n GroupField,\n JSONField,\n NumberField,\n Payload,\n PointField,\n RadioField,\n RelationshipField,\n RichTextField,\n RowField,\n SanitizedConfig,\n SelectField,\n TabsField,\n TextField,\n TextareaField,\n UploadField,\n} from 'payload'\n\nimport type { BuildQueryArgs } from './queries/buildQuery.js'\n\nexport interface CollectionModel extends Model<any>, PaginateModel<any> {\n /** buildQuery is used to transform payload's where operator into what can be used by mongoose (e.g. id => _id) */\n buildQuery: (args: BuildQueryArgs) => Promise<Record<string, unknown>> // TODO: Delete this\n}\n\nexport interface AuthCollectionModel extends CollectionModel {\n resetPasswordExpiration: Date\n resetPasswordToken: string\n}\n\nexport type TypeOfIndex = {\n fields: IndexDefinition\n options?: IndexOptions\n}\n\nexport interface GlobalModel extends Model<Document> {\n buildQuery: (query: unknown, locale?: string) => Promise<Record<string, unknown>>\n}\n\nexport type BuildSchema<TSchema> = (args: {\n config: SanitizedConfig\n fields: Field[]\n options: BuildSchemaOptions\n}) => TSchema\n\nexport type BuildSchemaOptions = {\n allowIDField?: boolean\n disableUnique?: boolean\n draftsEnabled?: boolean\n indexSortableFields?: boolean\n options?: SchemaOptions\n}\n\nexport type FieldGenerator<TSchema, TField> = {\n config: SanitizedConfig\n field: TField\n options: BuildSchemaOptions\n schema: TSchema\n}\n\n/**\n * Field config types that need representation in the database\n */\ntype FieldType =\n | 'array'\n | 'blocks'\n | 'checkbox'\n | 'code'\n | 'collapsible'\n | 'date'\n | 'email'\n | 'group'\n | 'json'\n | 'number'\n | 'point'\n | 'radio'\n | 'relationship'\n | 'richText'\n | 'row'\n | 'select'\n | 'tabs'\n | 'text'\n | 'textarea'\n | 'upload'\n\nexport type FieldGeneratorFunction<TSchema, TField extends Field> = (\n args: FieldGenerator<TSchema, TField>,\n) => void\n\n/**\n * Object mapping types to a schema based on TSchema\n */\nexport type FieldToSchemaMap<TSchema> = {\n array: FieldGeneratorFunction<TSchema, ArrayField>\n blocks: FieldGeneratorFunction<TSchema, BlockField>\n checkbox: FieldGeneratorFunction<TSchema, CheckboxField>\n code: FieldGeneratorFunction<TSchema, CodeField>\n collapsible: FieldGeneratorFunction<TSchema, CollapsibleField>\n date: FieldGeneratorFunction<TSchema, DateField>\n email: FieldGeneratorFunction<TSchema, EmailField>\n group: FieldGeneratorFunction<TSchema, GroupField>\n json: FieldGeneratorFunction<TSchema, JSONField>\n number: FieldGeneratorFunction<TSchema, NumberField>\n point: FieldGeneratorFunction<TSchema, PointField>\n radio: FieldGeneratorFunction<TSchema, RadioField>\n relationship: FieldGeneratorFunction<TSchema, RelationshipField>\n richText: FieldGeneratorFunction<TSchema, RichTextField>\n row: FieldGeneratorFunction<TSchema, RowField>\n select: FieldGeneratorFunction<TSchema, SelectField>\n tabs: FieldGeneratorFunction<TSchema, TabsField>\n text: FieldGeneratorFunction<TSchema, TextField>\n textarea: FieldGeneratorFunction<TSchema, TextareaField>\n upload: FieldGeneratorFunction<TSchema, UploadField>\n}\n\nexport type MigrateUpArgs = { payload: Payload }\nexport type MigrateDownArgs = { payload: Payload }\n"],"names":[],"mappings":"AA6HA,WAAkD"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { IndexDefinition, IndexOptions, Model, PaginateModel, SchemaOptions } from 'mongoose'\nimport type {\n ArrayField,\n BlockField,\n CheckboxField,\n CodeField,\n CollapsibleField,\n DateField,\n EmailField,\n Field,\n GroupField,\n JSONField,\n NumberField,\n Payload,\n PointField,\n RadioField,\n RelationshipField,\n RichTextField,\n RowField,\n SanitizedConfig,\n SelectField,\n TabsField,\n TextField,\n TextareaField,\n UploadField,\n} from 'payload'\n\nimport type { BuildQueryArgs } from './queries/buildQuery.js'\n\nexport interface CollectionModel extends Model<any>, PaginateModel<any> {\n /** buildQuery is used to transform payload's where operator into what can be used by mongoose (e.g. id => _id) */\n buildQuery: (args: BuildQueryArgs) => Promise<Record<string, unknown>> // TODO: Delete this\n}\n\nexport interface AuthCollectionModel extends CollectionModel {\n resetPasswordExpiration: Date\n resetPasswordToken: string\n}\n\nexport type TypeOfIndex = {\n fields: IndexDefinition\n options?: IndexOptions\n}\n\nexport interface GlobalModel extends Model<Document> {\n buildQuery: (query: unknown, locale?: string) => Promise<Record<string, unknown>>\n}\n\nexport type BuildSchema<TSchema> = (args: {\n config: SanitizedConfig\n fields: Field[]\n options: BuildSchemaOptions\n}) => TSchema\n\nexport type BuildSchemaOptions = {\n allowIDField?: boolean\n disableUnique?: boolean\n draftsEnabled?: boolean\n indexSortableFields?: boolean\n options?: SchemaOptions\n}\n\nexport type FieldGenerator<TSchema, TField> = {\n config: SanitizedConfig\n field: TField\n options: BuildSchemaOptions\n schema: TSchema\n}\n\nexport type FieldGeneratorFunction<TSchema, TField extends Field> = (\n args: FieldGenerator<TSchema, TField>,\n) => void\n\n/**\n * Object mapping types to a schema based on TSchema\n */\nexport type FieldToSchemaMap<TSchema> = {\n array: FieldGeneratorFunction<TSchema, ArrayField>\n blocks: FieldGeneratorFunction<TSchema, BlockField>\n checkbox: FieldGeneratorFunction<TSchema, CheckboxField>\n code: FieldGeneratorFunction<TSchema, CodeField>\n collapsible: FieldGeneratorFunction<TSchema, CollapsibleField>\n date: FieldGeneratorFunction<TSchema, DateField>\n email: FieldGeneratorFunction<TSchema, EmailField>\n group: FieldGeneratorFunction<TSchema, GroupField>\n json: FieldGeneratorFunction<TSchema, JSONField>\n number: FieldGeneratorFunction<TSchema, NumberField>\n point: FieldGeneratorFunction<TSchema, PointField>\n radio: FieldGeneratorFunction<TSchema, RadioField>\n relationship: FieldGeneratorFunction<TSchema, RelationshipField>\n richText: FieldGeneratorFunction<TSchema, RichTextField>\n row: FieldGeneratorFunction<TSchema, RowField>\n select: FieldGeneratorFunction<TSchema, SelectField>\n tabs: FieldGeneratorFunction<TSchema, TabsField>\n text: FieldGeneratorFunction<TSchema, TextField>\n textarea: FieldGeneratorFunction<TSchema, TextareaField>\n upload: FieldGeneratorFunction<TSchema, UploadField>\n}\n\nexport type MigrateUpArgs = { payload: Payload }\nexport type MigrateDownArgs = { payload: Payload }\n"],"names":[],"mappings":"AAoGA,WAAkD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-mongodb",
3
- "version": "3.0.0-canary.a0b06af",
3
+ "version": "3.0.0-canary.a192632",
4
4
  "description": "The officially supported MongoDB database adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -27,7 +27,6 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "bson-objectid": "2.0.4",
30
- "deepmerge": "4.3.1",
31
30
  "http-status": "1.6.2",
32
31
  "mongoose": "6.12.3",
33
32
  "mongoose-paginate-v2": "1.7.22",
@@ -39,10 +38,10 @@
39
38
  "mongodb": "4.17.1",
40
39
  "mongodb-memory-server": "^9",
41
40
  "@payloadcms/eslint-config": "3.0.0-beta.59",
42
- "payload": "3.0.0-canary.a0b06af"
41
+ "payload": "3.0.0-canary.a192632"
43
42
  },
44
43
  "peerDependencies": {
45
- "payload": "3.0.0-canary.a0b06af"
44
+ "payload": "3.0.0-canary.a192632"
46
45
  },
47
46
  "scripts": {
48
47
  "build": "pnpm build:types && pnpm build:swc",