abckit 0.0.47 → 0.0.49
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 +15 -0
- package/dist/module.mjs +6 -16
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
|
@@ -124,6 +124,21 @@ interface ModulesConfig {
|
|
|
124
124
|
* @default false (or true if all: true)
|
|
125
125
|
*/
|
|
126
126
|
sentry?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Enable Redis/Dragonfly storage driver
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
redis?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Enable S3/R2 storage driver
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
s3?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Enable local disk storage driver
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
disk?: boolean;
|
|
127
142
|
}
|
|
128
143
|
interface ModuleOptions {
|
|
129
144
|
/**
|
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addTypeTemplate, addServerScanDir, addRouteMiddleware, defineNuxtModule, createResolver } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { networkInterfaces } from 'node:os';
|
|
@@ -85,11 +85,6 @@ const IMGPROXY_DEFAULTS = {
|
|
|
85
85
|
storageUrl: "",
|
|
86
86
|
cdnDomains: []
|
|
87
87
|
};
|
|
88
|
-
const STORAGE_DEFAULTS = {
|
|
89
|
-
redis: false,
|
|
90
|
-
s3: false,
|
|
91
|
-
disk: false
|
|
92
|
-
};
|
|
93
88
|
const APP_HEAD_LINKS = [
|
|
94
89
|
{ rel: "icon", type: "image/png", href: "/favicon-96x96.png", sizes: "96x96" },
|
|
95
90
|
{ rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
|
|
@@ -181,22 +176,17 @@ async function setupRuntimeConfig(nuxt, options, isSentryEnabled) {
|
|
|
181
176
|
}
|
|
182
177
|
};
|
|
183
178
|
nuxt.options.runtimeConfig.imgproxy = defu(nuxt.options.runtimeConfig.imgproxy, IMGPROXY_DEFAULTS);
|
|
184
|
-
nuxt.options.runtimeConfig.
|
|
179
|
+
nuxt.options.runtimeConfig.modules = defu(nuxt.options.runtimeConfig.modules, {
|
|
180
|
+
s3: options.modules?.s3 ?? false,
|
|
181
|
+
redis: options.modules?.redis ?? false,
|
|
182
|
+
disk: options.modules?.disk ?? false
|
|
183
|
+
});
|
|
185
184
|
nuxt.options.runtimeConfig.public = defu(nuxt.options.runtimeConfig.public, {
|
|
186
185
|
siteUrl: isMobileBuild ? mobileBaseURL : "http://localhost:3000",
|
|
187
186
|
isMobile: isMobileBuild,
|
|
188
187
|
debug: nuxt.options.dev,
|
|
189
188
|
imgproxy: IMGPROXY_DEFAULTS
|
|
190
189
|
});
|
|
191
|
-
await updateRuntimeConfig({
|
|
192
|
-
modules: defu(options.modules, {
|
|
193
|
-
s3: false,
|
|
194
|
-
graphql: false,
|
|
195
|
-
redis: false,
|
|
196
|
-
disk: false,
|
|
197
|
-
ionic: false
|
|
198
|
-
})
|
|
199
|
-
});
|
|
200
190
|
}
|
|
201
191
|
function setupAppHead(nuxt) {
|
|
202
192
|
const siteUrl = nuxt.options.runtimeConfig.public.siteUrl;
|