nuxt-mail 3.1.45 → 4.0.1

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -8
  2. package/package.json +5 -3
package/dist/index.js CHANGED
@@ -3,20 +3,14 @@ import { addImports, addServerHandler, addTemplate, createResolver, isNuxt3 as i
3
3
  import express from 'express';
4
4
  import fs from 'fs-extra';
5
5
  import nodemailer from 'nodemailer';
6
+ import nuxtAliasPath from 'nuxt-alias-path';
6
7
  import nuxtPushPlugins from 'nuxt-push-plugins';
7
8
  import parsePackagejsonName from 'parse-packagejson-name';
8
9
  import P from 'path';
9
- import { pathToFileURL } from 'url';
10
10
  import send from "./send.js";
11
11
  const resolver = createResolver(import.meta.url);
12
12
  const packageConfig = fs.readJsonSync(resolver.resolve('../package.json'));
13
13
  const moduleName = parsePackagejsonName(packageConfig.name).fullName;
14
- const getAliasPath = nuxt => {
15
- if (process.env.NODE_ENV === 'development') {
16
- return pathToFileURL(P.resolve(nuxt.options.buildDir, moduleName)).href;
17
- }
18
- return P.resolve(nuxt.options.buildDir, moduleName);
19
- };
20
14
  export default function (moduleOptions, nuxt) {
21
15
  nuxt = nuxt || this;
22
16
  const options = {
@@ -52,7 +46,7 @@ export default function (moduleOptions, nuxt) {
52
46
  getContents: () => fs.readFile(resolver.resolve('./send.js'), 'utf8'),
53
47
  write: true
54
48
  });
55
- nuxt.options.alias['#mail'] = getAliasPath(nuxt);
49
+ nuxt.options.alias['#mail'] = nuxtAliasPath(moduleName, nuxt);
56
50
  addServerHandler({
57
51
  handler: resolver.resolve('./server-handler.post.js'),
58
52
  route: '/mail/send'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-mail",
3
- "version": "3.1.45",
3
+ "version": "4.0.1",
4
4
  "description": "Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.",
5
5
  "keywords": [
6
6
  "email",
@@ -46,17 +46,19 @@
46
46
  "fs-extra": "^11.1.0",
47
47
  "h3": "^1.0.2",
48
48
  "nodemailer": "^6.4.11",
49
+ "nuxt-alias-path": "^1.0.0",
49
50
  "nuxt-push-plugins": "^2.1.2",
50
51
  "parse-packagejson-name": "^1.0.1"
51
52
  },
52
53
  "devDependencies": {
53
- "@dword-design/base": "^9.1.9",
54
+ "@dword-design/base": "^10.0.0",
54
55
  "@dword-design/puppeteer": "^5.0.0",
55
56
  "@nuxtjs/axios": "^5.13.1",
56
57
  "axios": "^0.27.2",
57
58
  "depcheck-package-name": "^3.0.0",
58
59
  "execa": "^7.1.1",
59
60
  "nuxt": "^3.3.3",
61
+ "nuxt-dev-ready": "^2.0.1",
60
62
  "ora": "^6.3.0",
61
63
  "output-files": "^2.0.19",
62
64
  "port-ready": "^0.1.0",
@@ -65,7 +67,7 @@
65
67
  "with-local-tmp-dir": "^5.0.0"
66
68
  },
67
69
  "engines": {
68
- "node": ">=14"
70
+ "node": ">=16"
69
71
  },
70
72
  "publishConfig": {
71
73
  "access": "public"