abckit 0.0.47 → 0.0.50
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 +12 -15
- 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
|
@@ -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,24 @@ 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
|
+
});
|
|
184
|
+
await updateRuntimeConfig({
|
|
185
|
+
modules: {
|
|
186
|
+
s3: options.modules?.s3 ?? false,
|
|
187
|
+
redis: options.modules?.redis ?? false,
|
|
188
|
+
disk: options.modules?.disk ?? false
|
|
189
|
+
}
|
|
190
|
+
});
|
|
185
191
|
nuxt.options.runtimeConfig.public = defu(nuxt.options.runtimeConfig.public, {
|
|
186
192
|
siteUrl: isMobileBuild ? mobileBaseURL : "http://localhost:3000",
|
|
187
193
|
isMobile: isMobileBuild,
|
|
188
194
|
debug: nuxt.options.dev,
|
|
189
195
|
imgproxy: IMGPROXY_DEFAULTS
|
|
190
196
|
});
|
|
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
197
|
}
|
|
201
198
|
function setupAppHead(nuxt) {
|
|
202
199
|
const siteUrl = nuxt.options.runtimeConfig.public.siteUrl;
|