@modernpoacher/halacious 6.2.7 → 6.2.8

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/README.md CHANGED
@@ -42,7 +42,7 @@ yarn add @modernpoacher/halacious --dev
42
42
  Register the plugin with the app server
43
43
  ```javascript
44
44
  const hapi = require('@hapi/hapi');
45
- const halacious = require('@modernpoacher/halacious');
45
+ const halacious = require('#halacious');
46
46
 
47
47
  const server = hapi.server({ port: 8080 });
48
48
 
@@ -376,7 +376,7 @@ happily let you be lazy but its much better if we do things the Right Way.
376
376
  Halacious exposes its api to your Hapi server so that you may configure it at runtime like so:
377
377
  ```javascript
378
378
  const hapi = require('@hapi/hapi');
379
- const halacious = require('@modernpoacher/halacious');
379
+ const halacious = require('#halacious');
380
380
 
381
381
  async function init () {
382
382
  await server.register(halacious);
@@ -441,7 +441,7 @@ company's namespace. We can suck all these into the system in one fell swoop:
441
441
 
442
442
  ```javascript
443
443
  const hapi = require('@hapi/hapi');
444
- const halacious = require('@modernpoacher/halacious');
444
+ const halacious = require('#halacious');
445
445
 
446
446
  async function init () {
447
447
  const server = hapi.server({ port: 8080 });
@@ -472,7 +472,7 @@ configuration option. For example:
472
472
 
473
473
  ```javascript
474
474
  const hapi = require('@hapi/hapi');
475
- const halacious = require('@modernpoacher/halacious');
475
+ const halacious = require('#halacious');
476
476
 
477
477
  async function init () {
478
478
  const server = hapi.server({ port: 8080 });
@@ -1,10 +1,8 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
- const { name: PLUGIN } = require('halacious/package.json')
5
+ const { name: PLUGIN } = require('#halacious/package.json')
8
6
 
9
7
  async function init () {
10
8
  const server = hapi.server({ port: 8080 })
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
@@ -1,12 +1,10 @@
1
- require('module-alias/register')
2
-
3
1
  const path = require('path')
4
2
 
5
3
  const hapi = require('@hapi/hapi')
6
4
  const vision = require('@hapi/vision')
7
- const halacious = require('halacious')
5
+ const halacious = require('#halacious')
8
6
 
9
- const { name: PLUGIN } = require('halacious/package.json')
7
+ const { name: PLUGIN } = require('#halacious/package.json')
10
8
 
11
9
  async function init () {
12
10
  const server = hapi.server({ port: 8080 })
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
@@ -1,10 +1,8 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
- const { name: PLUGIN } = require('halacious/package')
5
+ const { name: PLUGIN } = require('#halacious/package')
8
6
 
9
7
  async function init () {
10
8
  const server = hapi.server({ port: 8080 })
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
@@ -1,12 +1,10 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
3
  const hoek = require('@hapi/hoek')
6
4
  const Uri = require('urijs')
7
- const halacious = require('halacious')
5
+ const halacious = require('#halacious')
8
6
 
9
- const { name: PLUGIN } = require('halacious/package')
7
+ const { name: PLUGIN } = require('#halacious/package')
10
8
 
11
9
  const users = []
12
10
 
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  function User (id, firstName, lastName, googlePlusId) {
8
6
  this.id = id
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
@@ -1,12 +1,10 @@
1
- require('module-alias/register')
2
-
3
1
  const path = require('path')
4
2
 
5
3
  const hapi = require('@hapi/hapi')
6
4
  const vision = require('@hapi/vision')
7
- const halacious = require('halacious')
5
+ const halacious = require('#halacious')
8
6
 
9
- const { name: PLUGIN } = require('halacious/package')
7
+ const { name: PLUGIN } = require('#halacious/package')
10
8
 
11
9
  async function init () {
12
10
  const server = hapi.server({ port: 8080 })
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
@@ -1,8 +1,6 @@
1
- require('module-alias/register')
2
-
3
1
  const hapi = require('@hapi/hapi')
4
2
  const vision = require('@hapi/vision')
5
- const halacious = require('halacious')
3
+ const halacious = require('#halacious')
6
4
 
7
5
  async function init () {
8
6
  const server = hapi.server({ port: 8080 })
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare module '@modernpoacher/halacious' {
2
2
  const plugin: object
3
+
3
4
  export {
4
5
  plugin
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/halacious",
3
- "version": "6.2.7",
3
+ "version": "6.2.8",
4
4
  "description": "A HAL processor for Hapi",
5
5
  "keywords": [
6
6
  "HAL",
@@ -54,7 +54,6 @@
54
54
  "@babel/eslint-parser": "^7.21.8",
55
55
  "@hapi/hapi": "18.4.1",
56
56
  "@hapi/vision": "6.0.1",
57
- "babel-loader": "^9.1.2",
58
57
  "chai": "^4.3.7",
59
58
  "chai-string": "^1.5.0",
60
59
  "cross-env": "^7.0.3",
@@ -66,11 +65,16 @@
66
65
  "eslint-plugin-promise": "^6.1.1",
67
66
  "husky": "^8.0.3",
68
67
  "mocha": "^10.2.0",
69
- "module-alias": "^2.2.2",
70
68
  "sinon": "^15.1.0",
71
69
  "sinon-chai": "^3.7.0"
72
70
  },
73
- "_moduleAliases": {
74
- "halacious": "."
71
+ "imports": {
72
+ "#halacious/package.json": "./package.json",
73
+ "#halacious/lib/*": "./lib/*.js",
74
+ "#halacious": "./lib/index.js"
75
+ },
76
+ "exports": {
77
+ "./lib": "./lib/*.js",
78
+ ".": "./lib/index.js"
75
79
  }
76
80
  }
@@ -1,5 +1,3 @@
1
- require('module-alias/register')
2
-
3
1
  const path = require('path')
4
2
 
5
3
  const chai = require('chai')
@@ -10,15 +8,15 @@ const vision = require('@hapi/vision')
10
8
  const sinon = require('sinon')
11
9
  const sinonChai = require('sinon-chai')
12
10
  const chaiString = require('chai-string')
13
- const halacious = require('halacious')
14
- const { plugin } = require('halacious/lib/plugin')
11
+ const halacious = require('#halacious')
12
+ const { plugin } = require('#halacious/lib/plugin')
15
13
  const _ = require('lodash')
16
14
  const url = require('url')
17
15
 
18
16
  chai.use(sinonChai)
19
17
  chai.use(chaiString)
20
18
 
21
- const { name: PLUGIN } = require('halacious/package')
19
+ const { name: PLUGIN } = require('#halacious/package.json')
22
20
 
23
21
  describe('Halacious Plugin', () => {
24
22
  let server
@@ -1,14 +1,12 @@
1
- require('module-alias/register')
2
-
3
1
  const chai = require('chai')
4
2
 
5
3
  const should = chai.should()
6
4
  const hapi = require('@hapi/hapi')
7
- const halacious = require('halacious')
5
+ const halacious = require('#halacious')
8
6
 
9
- const { RepresentationFactory } = require('halacious/lib/representation')
7
+ const { RepresentationFactory } = require('#halacious/lib/representation')
10
8
 
11
- const { name: PLUGIN } = require('halacious/package')
9
+ const { name: PLUGIN } = require('#halacious/package.json')
12
10
 
13
11
  describe('Representation Factory', () => {
14
12
  let server