monastery 3.0.12 → 3.0.13

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/changelog.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [3.0.13](https://github.com/boycce/monastery/compare/3.0.12...3.0.13) (2024-05-01)
6
+
5
7
  ### [3.0.12](https://github.com/boycce/monastery/compare/3.0.11...3.0.12) (2024-05-01)
6
8
 
7
9
  ### [3.0.11](https://github.com/boycce/monastery/compare/3.0.10...3.0.11) (2024-04-30)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "monastery",
3
3
  "description": "⛪ A simple, straightforward MongoDB ODM",
4
4
  "author": "Ricky Boyce",
5
- "version": "3.0.12",
5
+ "version": "3.0.13",
6
6
  "license": "MIT",
7
7
  "repository": "github:boycce/monastery",
8
8
  "homepage": "https://boycce.github.io/monastery/",
@@ -2,13 +2,14 @@
2
2
  const util = require('../lib/util.js')
3
3
  const imagePluginFile = require('../plugins/images/index.js')
4
4
  const monastery = require('../lib/index.js')
5
+ const imagePluginFakeOpts = { awsBucket: 'fake', awsRegion: 'fake', awsAccessKeyId: 'fake', awsSecretAccessKey: 'fake' }
5
6
 
6
7
  let db
7
8
  afterAll(async () => { db.close() })
8
9
  beforeAll(async () => {
9
10
  db = monastery('127.0.0.1/monastery', {
10
11
  timestamps: false,
11
- imagePlugin: { awsBucket: 'fake', awsAccessKeyId: 'fake', awsSecretAccessKey: 'fake' },
12
+ imagePlugin: imagePluginFakeOpts,
12
13
  })
13
14
  })
14
15
 
@@ -69,7 +70,7 @@ test('images initialisation', async () => {
69
70
  }})
70
71
 
71
72
  // Initialisation success
72
- expect(db.opts.imagePlugin).toEqual({ awsBucket: 'fake', awsAccessKeyId: 'fake', awsSecretAccessKey: 'fake' })
73
+ expect(db.opts.imagePlugin).toEqual(imagePluginFakeOpts)
73
74
 
74
75
  let expected = {
75
76
  bucket: { type: 'string', isString: true },
@@ -641,9 +642,7 @@ test('images options formats & filesizes', async () => {
641
642
  const db3 = monastery('127.0.0.1/monastery', {
642
643
  timestamps: false,
643
644
  imagePlugin: {
644
- awsBucket: 'fake',
645
- awsAccessKeyId: 'fake',
646
- awsSecretAccessKey: 'fake',
645
+ ...imagePluginFakeOpts,
647
646
  formats: ['jpg', 'jpeg', 'png', 'ico'],
648
647
  filesize: 1000 * 270,
649
648
  },
@@ -722,9 +721,7 @@ test('images option getSignedUrls', async () => {
722
721
  const db3 = monastery('127.0.0.1/monastery', {
723
722
  timestamps: false,
724
723
  imagePlugin: {
725
- awsBucket: 'fake',
726
- awsAccessKeyId: 'fake',
727
- awsSecretAccessKey: 'fake',
724
+ ...imagePluginFakeOpts,
728
725
  awsRegion: 's3-ap-southeast-2',
729
726
  getSignedUrl: true,
730
727
  },
@@ -781,10 +778,8 @@ test('images options awsAcl, awsBucket, metadata, params, path', async () => {
781
778
  const db3 = monastery('127.0.0.1/monastery', {
782
779
  timestamps: false,
783
780
  imagePlugin: {
781
+ ...imagePluginFakeOpts,
784
782
  awsAcl: 'private',
785
- awsBucket: 'fake',
786
- awsAccessKeyId: 'fake',
787
- awsSecretAccessKey: 'fake',
788
783
  metadata: { small: '*x300' , medium: '*x800', large: '*x1200' },
789
784
  params: { ContentLanguage: 'DE'},
790
785
  path: (uid, basename, ext, file) => `images/${basename}`,
@@ -884,9 +879,7 @@ test('images option depreciations', async () => {
884
879
  logLevel: 1,
885
880
  timestamps: false,
886
881
  imagePlugin: {
887
- awsBucket: 'fake',
888
- awsAccessKeyId: 'fake',
889
- awsSecretAccessKey: 'fake',
882
+ ...imagePluginFakeOpts,
890
883
  bucketDir: 'old',
891
884
  },
892
885
  })