@attributech/nuxt-drupal-utils 0.2.3 → 0.3.0
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.cts +2 -0
- package/dist/module.d.mts +2 -7
- package/dist/module.json +3 -3
- package/dist/module.mjs +18 -16
- package/dist/types.d.mts +10 -4
- package/package.json +21 -36
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -7
- package/dist/runtime/utils/getApiUrl.d.ts +0 -1
- package/dist/runtime/utils/getApiUrl.js +0 -5
- package/dist/runtime/utils/getAppUrl.d.ts +0 -1
- package/dist/runtime/utils/getAppUrl.js +0 -13
- package/dist/runtime/utils/getLagoonDevelopmentDomain.d.ts +0 -1
- package/dist/runtime/utils/getLagoonDevelopmentDomain.js +0 -6
- package/dist/runtime/utils/getServerUrl.d.ts +0 -1
- package/dist/runtime/utils/getServerUrl.js +0 -13
- package/dist/runtime/utils/index.d.ts +0 -4
- package/dist/runtime/utils/index.js +0 -4
- package/dist/types.d.ts +0 -7
package/dist/module.d.mts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { getApiUrl, getAppUrl, getLagoonDevelopmentDomain, getServerUrl } from '../dist/runtime/utils/index.js';
|
|
4
|
-
|
|
5
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
6
|
-
|
|
7
|
-
export { _default as default };
|
|
1
|
+
export * from "/home/luksak/Sites/nuxt-drupal-utils/src/module.js";
|
|
2
|
+
export { default } from "/home/luksak/Sites/nuxt-drupal-utils/src/module.js";
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { getApiUrl, getAppUrl, getLagoonDevelopmentDomain, getServerUrl } from '../dist/runtime/utils/index.js';
|
|
1
|
+
import { createJiti } from "file:///home/luksak/Sites/nuxt-drupal-utils/node_modules/.pnpm/jiti@2.7.0/node_modules/jiti/lib/jiti.mjs";
|
|
3
2
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
compatibility: {
|
|
9
|
-
// Compatible with Nuxt 2.16+ (with Bridge) and Nuxt 3
|
|
10
|
-
nuxt: "^2.16.0 || ^3.0.0"
|
|
11
|
-
}
|
|
3
|
+
const jiti = createJiti(import.meta.url, {
|
|
4
|
+
"interopDefault": true,
|
|
5
|
+
"alias": {
|
|
6
|
+
"@attributech/nuxt-drupal-utils": "/home/luksak/Sites/nuxt-drupal-utils"
|
|
12
7
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
"transformOptions": {
|
|
9
|
+
"babel": {
|
|
10
|
+
"plugins": []
|
|
11
|
+
}
|
|
17
12
|
}
|
|
18
|
-
})
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
/** @type {import("/home/luksak/Sites/nuxt-drupal-utils/src/module.js")} */
|
|
16
|
+
const _module = await jiti.import("/home/luksak/Sites/nuxt-drupal-utils/src/module.ts");
|
|
19
17
|
|
|
20
|
-
export
|
|
18
|
+
export default _module?.default ?? _module;
|
|
19
|
+
export const getApiUrl = _module.getApiUrl;
|
|
20
|
+
export const getAppUrl = _module.getAppUrl;
|
|
21
|
+
export const getServerUrl = _module.getServerUrl;
|
|
22
|
+
export const getLagoonDevelopmentDomain = _module.getLagoonDevelopmentDomain;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ModuleHooks, ModuleRuntimeHooks, ModuleRuntimeConfig, ModulePublicRuntimeConfig } from './module.mjs'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
declare module '#app' {
|
|
4
|
+
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
|
|
5
|
+
}
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
declare module '@nuxt/schema' {
|
|
8
|
+
interface NuxtHooks extends ModuleHooks {}
|
|
9
|
+
interface RuntimeConfig extends ModuleRuntimeConfig {}
|
|
10
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
11
|
+
}
|
|
6
12
|
|
|
7
|
-
export
|
|
13
|
+
export * from "./module.mjs"
|
package/package.json
CHANGED
|
@@ -1,35 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attributech/nuxt-drupal-utils",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Shared utilities for Nuxt
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Shared utilities for Nuxt projects with Drupal backend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
-
".":
|
|
8
|
-
"import": {
|
|
9
|
-
"types": "./dist/types.d.ts",
|
|
10
|
-
"default": "./dist/module.mjs"
|
|
11
|
-
},
|
|
12
|
-
"require": {
|
|
13
|
-
"types": "./dist/types.d.ts",
|
|
14
|
-
"default": "./dist/module.cjs"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"./dist/runtime/utils/index.js": {
|
|
18
|
-
"require": {
|
|
19
|
-
"types": "./dist/runtime/utils/index.d.ts",
|
|
20
|
-
"default": "./dist/runtime/utils/index.js"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
7
|
+
".": "./dist/module.mjs"
|
|
23
8
|
},
|
|
24
|
-
"main": "./dist/module.
|
|
25
|
-
"
|
|
26
|
-
"types": "./dist/types.d.ts",
|
|
9
|
+
"main": "./dist/module.mjs",
|
|
10
|
+
"types": "dist/types.d.mts",
|
|
27
11
|
"files": [
|
|
28
12
|
"dist"
|
|
29
13
|
],
|
|
30
14
|
"scripts": {
|
|
31
15
|
"build": "nuxt-module-build build",
|
|
32
|
-
"dev
|
|
16
|
+
"dev": "nuxi dev playground",
|
|
17
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
33
18
|
"lint": "eslint .",
|
|
34
19
|
"lint:fix": "eslint . --fix",
|
|
35
20
|
"test": "vitest run",
|
|
@@ -46,25 +31,25 @@
|
|
|
46
31
|
],
|
|
47
32
|
"license": "MIT",
|
|
48
33
|
"peerDependencies": {
|
|
49
|
-
"nuxt": "^
|
|
34
|
+
"nuxt": "^3.0.0 || ^4.0.0"
|
|
50
35
|
},
|
|
51
36
|
"dependencies": {
|
|
52
|
-
"@nuxt/kit": "^
|
|
37
|
+
"@nuxt/kit": "^4.4.6"
|
|
53
38
|
},
|
|
54
39
|
"devDependencies": {
|
|
55
|
-
"@nuxt/eslint-config": "^1.
|
|
56
|
-
"@nuxt/module-builder": "^0.
|
|
57
|
-
"@nuxt/types": "^2.
|
|
58
|
-
"@types/node": "^
|
|
59
|
-
"@vitest/coverage-v8": "^
|
|
60
|
-
"@vitest/ui": "^
|
|
61
|
-
"c8": "^
|
|
62
|
-
"eslint": "^
|
|
40
|
+
"@nuxt/eslint-config": "^1.15.2",
|
|
41
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
42
|
+
"@nuxt/types": "^2.18.1",
|
|
43
|
+
"@types/node": "^25.9.1",
|
|
44
|
+
"@vitest/coverage-v8": "^4.1.7",
|
|
45
|
+
"@vitest/ui": "^4.1.7",
|
|
46
|
+
"c8": "^11.0.0",
|
|
47
|
+
"eslint": "^10.4.0",
|
|
63
48
|
"eslint-plugin-vitest": "^0.5.4",
|
|
64
|
-
"happy-dom": "^
|
|
65
|
-
"release-it": "^
|
|
66
|
-
"typescript": "^
|
|
67
|
-
"vitest": "^
|
|
49
|
+
"happy-dom": "^20.9.0",
|
|
50
|
+
"release-it": "^20.0.1",
|
|
51
|
+
"typescript": "^6.0.3",
|
|
52
|
+
"vitest": "^4.1.7"
|
|
68
53
|
},
|
|
69
54
|
"publishConfig": {
|
|
70
55
|
"access": "public"
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { ModuleOptions } from 'nuxt/schema';
|
|
3
|
-
export { getApiUrl, getAppUrl, getLagoonDevelopmentDomain, getServerUrl } from '../dist/runtime/utils/index.js';
|
|
4
|
-
|
|
5
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
6
|
-
|
|
7
|
-
export { _default as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getApiUrl: (defaultServerUrl: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getAppUrl: (defaultUrl: string) => string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getLagoonDevelopmentDomain } from "./getLagoonDevelopmentDomain.js";
|
|
2
|
-
export const getAppUrl = function(defaultUrl) {
|
|
3
|
-
if (process.env.APP_URL !== void 0 && process.env.APP_URL !== "") {
|
|
4
|
-
return process.env.APP_URL;
|
|
5
|
-
}
|
|
6
|
-
if (process.env.LAGOON_ENVIRONMENT_TYPE !== void 0 && process.env.LAGOON_ENVIRONMENT_TYPE === "development") {
|
|
7
|
-
const lagoonDevelopmentDomain = getLagoonDevelopmentDomain();
|
|
8
|
-
if (lagoonDevelopmentDomain !== null) {
|
|
9
|
-
return `https://frontend.${lagoonDevelopmentDomain}`;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return defaultUrl;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getLagoonDevelopmentDomain: () => string | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const getLagoonDevelopmentDomain = function() {
|
|
2
|
-
if (process.env.LAGOON_ENVIRONMENT !== void 0 && process.env.LAGOON_PROJECT !== void 0 && process.env.LAGOON_KUBERNETES !== void 0) {
|
|
3
|
-
return `${process.env.LAGOON_ENVIRONMENT}.${process.env.LAGOON_PROJECT}.${process.env.LAGOON_KUBERNETES}`;
|
|
4
|
-
}
|
|
5
|
-
return null;
|
|
6
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getServerUrl: (defaultUrl: string) => string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getLagoonDevelopmentDomain } from "./getLagoonDevelopmentDomain.js";
|
|
2
|
-
export const getServerUrl = function(defaultUrl) {
|
|
3
|
-
if (process.env.API_SERVER !== void 0 && process.env.API_SERVER !== "") {
|
|
4
|
-
return process.env.API_SERVER;
|
|
5
|
-
}
|
|
6
|
-
if (process.env.LAGOON_ENVIRONMENT_TYPE !== void 0 && process.env.LAGOON_ENVIRONMENT_TYPE === "development") {
|
|
7
|
-
const lagoonDevelopmentDomain = getLagoonDevelopmentDomain();
|
|
8
|
-
if (lagoonDevelopmentDomain !== null) {
|
|
9
|
-
return `https://nginx.${lagoonDevelopmentDomain}`;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return defaultUrl;
|
|
13
|
-
};
|
package/dist/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { type getApiUrl, type getAppUrl, type getLagoonDevelopmentDomain, type getServerUrl } from './module'
|