@modernpoacher/halacious 6.2.1 → 6.2.4

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.
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npm run pre-commit
@@ -1,5 +1,7 @@
1
1
  require('module-alias/register')
2
2
 
3
+ const path = require('path')
4
+
3
5
  const hapi = require('@hapi/hapi')
4
6
  const vision = require('@hapi/vision')
5
7
  const halacious = require('halacious')
@@ -14,7 +16,7 @@ async function init () {
14
16
  await server.register(halacious)
15
17
 
16
18
  server.plugins[PLUGIN].namespaces.add({
17
- dir: `${__dirname}/rels/mycompany`,
19
+ dir: path.resolve(__dirname, 'rels/mycompany'),
18
20
  prefix: 'mco'
19
21
  })
20
22
 
@@ -1,5 +1,7 @@
1
1
  require('module-alias/register')
2
2
 
3
+ const path = require('path')
4
+
3
5
  const hapi = require('@hapi/hapi')
4
6
  const vision = require('@hapi/vision')
5
7
  const halacious = require('halacious')
@@ -19,7 +21,7 @@ async function init () {
19
21
  })
20
22
 
21
23
  server.plugins[PLUGIN].namespaces.add({
22
- dir: `${__dirname}/rels/mycompany`,
24
+ dir: path.resolve(__dirname, 'rels/mycompany'),
23
25
  prefix: 'mco'
24
26
  })
25
27
 
package/lib/plugin.js CHANGED
@@ -7,14 +7,18 @@ const path = require('path')
7
7
  const pug = require('pug')
8
8
  const util = require('util')
9
9
  const async = require('async')
10
- const marked = require('marked')
10
+ const {
11
+ marked
12
+ } = require('marked')
11
13
  const urlTemplate = require('url-template')
12
14
  const Negotiator = require('negotiator')
13
15
  const URITemplate = require('urijs/src/URITemplate')
14
16
  const url = require('url')
15
17
  const URI = require('urijs')
16
18
 
17
- const { RepresentationFactory } = require('./representation')
19
+ const {
20
+ RepresentationFactory
21
+ } = require('./representation')
18
22
 
19
23
  const HAL_MIME_TYPE = 'application/hal+json'
20
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/halacious",
3
- "version": "6.2.1",
3
+ "version": "6.2.4",
4
4
  "description": "A HAL processor for Hapi",
5
5
  "keywords": [
6
6
  "HAL",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "engines": {
19
- "node": ">=12.19.0"
19
+ "node": ">=16.13.0"
20
20
  },
21
21
  "repository": {
22
22
  "type": "git",
@@ -36,42 +36,36 @@
36
36
  "@hapi/boom": "9.1.0",
37
37
  "@hapi/hoek": "9.0.4",
38
38
  "@hapi/joi": "15.1.1",
39
- "async": "^3.2.0",
40
- "lodash": "^4.17.20",
41
- "marked": "^1.2.0",
42
- "negotiator": "^0.6.2",
43
- "pug": "^3.0.0",
44
- "urijs": "^1.19.2",
45
- "url-template": "^2.0.8"
39
+ "async": "^3.2.3",
40
+ "lodash": "^4.17.21",
41
+ "marked": "^4.0.12",
42
+ "negotiator": "^0.6.3",
43
+ "pug": "^3.0.2",
44
+ "urijs": "^1.19.8",
45
+ "url-template": "2.0.8"
46
46
  },
47
47
  "devDependencies": {
48
- "@babel/core": "^7.12.3",
49
- "@babel/eslint-parser": "^7.12.1",
48
+ "@babel/core": "^7.17.5",
49
+ "@babel/eslint-parser": "^7.17.0",
50
50
  "@hapi/hapi": "18.4.1",
51
51
  "@hapi/vision": "6.0.1",
52
- "babel-loader": "^8.1.0",
53
- "chai": "^4.2.0",
52
+ "babel-loader": "^8.2.3",
53
+ "chai": "^4.3.6",
54
54
  "chai-string": "^1.5.0",
55
- "cross-env": "^7.0.2",
56
- "eslint": "^7.11.0",
57
- "eslint-config-standard": "^14.1.1",
58
- "eslint-plugin-import": "^2.22.1",
59
- "eslint-plugin-mocha": "^8.0.0",
55
+ "cross-env": "^7.0.3",
56
+ "eslint": "7.32.0",
57
+ "eslint-config-standard": "^16.0.3",
58
+ "eslint-plugin-import": "^2.25.4",
59
+ "eslint-plugin-mocha": "^10.0.3",
60
60
  "eslint-plugin-node": "^11.1.0",
61
- "eslint-plugin-promise": "^4.2.1",
62
- "eslint-plugin-standard": "^4.0.1",
63
- "husky": "^4.3.0",
64
- "mocha": "^8.2.0",
61
+ "eslint-plugin-promise": "5.2.0",
62
+ "husky": "^7.0.4",
63
+ "mocha": "^9.2.1",
65
64
  "module-alias": "^2.2.2",
66
- "sinon": "^9.2.0",
67
- "sinon-chai": "^3.5.0"
65
+ "sinon": "^13.0.1",
66
+ "sinon-chai": "^3.7.0"
68
67
  },
69
68
  "_moduleAliases": {
70
69
  "halacious": "."
71
- },
72
- "husky": {
73
- "hooks": {
74
- "pre-commit": "npm run pre-commit"
75
- }
76
70
  }
77
71
  }
@@ -1,5 +1,7 @@
1
1
  require('module-alias/register')
2
2
 
3
+ const path = require('path')
4
+
3
5
  const chai = require('chai')
4
6
 
5
7
  const should = chai.should()
@@ -346,7 +348,7 @@ describe('Halacious Plugin', () => {
346
348
  } = server
347
349
 
348
350
  namespaces.add({
349
- dir: `${__dirname}/rels/mycompany`,
351
+ dir: path.resolve(__dirname, 'rels/mycompany'),
350
352
  prefix: 'mco'
351
353
  })
352
354
  })
@@ -373,7 +375,7 @@ describe('Halacious Plugin', () => {
373
375
  } = server
374
376
 
375
377
  const namespace = plugin.namespaces.add({
376
- dir: `${__dirname}/rels/mycompany`,
378
+ dir: path.resolve(__dirname, 'rels/mycompany'),
377
379
  prefix: 'mco'
378
380
  })
379
381
 
@@ -402,7 +404,7 @@ describe('Halacious Plugin', () => {
402
404
  } = server
403
405
 
404
406
  plugin.namespaces.add({
405
- dir: `${__dirname}/rels/mycompany`,
407
+ dir: path.resolve(__dirname, 'rels/mycompany'),
406
408
  prefix: 'mco'
407
409
  })
408
410
  })