two-factor-authentification-tools 0.0.24 → 0.0.25

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/dist/module.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- interface ModuleOptions {
4
- }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
3
+ declare const _default: _nuxt_schema.NuxtModule<{
4
+ enabled: boolean;
5
+ }, {
6
+ enabled: boolean;
7
+ }, false>;
6
8
 
7
9
  export { _default as default };
8
- export type { ModuleOptions };
package/dist/module.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- interface ModuleOptions {
4
- }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
3
+ declare const _default: _nuxt_schema.NuxtModule<{
4
+ enabled: boolean;
5
+ }, {
6
+ enabled: boolean;
7
+ }, false>;
6
8
 
7
9
  export { _default as default };
8
- export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "two-authentification-tools-module",
3
3
  "configKey": "myModule",
4
- "version": "0.0.24",
4
+ "version": "0.0.25",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1 +1 @@
1
- export * from './services/index.js';
1
+ export * from './server/services/index.js';
@@ -1 +1 @@
1
- export * from "./services/index.js";
1
+ export * from "./server/services/index.js";
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
- import { twoAuthService } from "./services/twoAuth.service.js";
2
+ import { twoAuthService } from "./server/services/twoAuth.service.js";
3
3
  export default defineNuxtPlugin((nuxtApp) => {
4
4
  nuxtApp.provide("twoAuthService", twoAuthService);
5
5
  });
@@ -1,7 +1,7 @@
1
1
  export declare const twoAuthService: {
2
2
  activateTwoFactorAuth: (user: {
3
3
  email: string;
4
- }) => Promise<{
4
+ }, appName: string) => Promise<{
5
5
  qr: string;
6
6
  secret: string;
7
7
  otpauth: string;
@@ -1,11 +1,10 @@
1
- import { TwoFactorAuthentificatorAdapter } from "../server/adapters/twoFactorAuthentificator.adapters.js";
2
- import { QRCodesAdapter } from "../server/adapters/QRCodes.adapters.js";
3
- import { useRuntimeConfig } from "#app";
4
- const activateTwoFactorAuth = async (user) => {
1
+ import { TwoFactorAuthentificatorAdapter } from "../adapters/twoFactorAuthentificator.adapters.js";
2
+ import { QRCodesAdapter } from "../adapters/QRCodes.adapters.js";
3
+ const activateTwoFactorAuth = async (user, appName) => {
5
4
  const secret = TwoFactorAuthentificatorAdapter.generateSecret();
6
5
  const otpauth = TwoFactorAuthentificatorAdapter.createKeyURI(
7
6
  user.email,
8
- useRuntimeConfig().public.appName || "YourAppName",
7
+ appName,
9
8
  secret
10
9
  );
11
10
  const qr = await QRCodesAdapter.generateQRCode(otpauth);
package/dist/types.d.mts CHANGED
@@ -1,3 +1,7 @@
1
- export { default } from './module.mjs'
1
+ import type { NuxtModule } from '@nuxt/schema'
2
+
3
+ import type { default as Module } from './module.mjs'
2
4
 
3
- export { type ModuleOptions } from './module.mjs'
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
+
7
+ export { default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "two-factor-authentification-tools",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",
@@ -34,7 +34,8 @@
34
34
  "dev": "npm run dev:prepare && nuxt dev playground",
35
35
  "dev:build": "nuxt build playground",
36
36
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
37
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
37
+ "release-default": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
38
+ "release": "npm run prepack && npm publish",
38
39
  "lint": "eslint .",
39
40
  "test": "vitest run",
40
41
  "test:watch": "vitest watch",