@shwfed/nuxt 0.1.32 → 0.1.33
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 +16 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -1
- package/dist/types.d.mts +1 -1
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
|
@@ -12,12 +12,26 @@ interface ModuleOptions {
|
|
|
12
12
|
baseURL: string;
|
|
13
13
|
}>;
|
|
14
14
|
}
|
|
15
|
+
interface Env {
|
|
16
|
+
ci: boolean;
|
|
17
|
+
git: Readonly<{
|
|
18
|
+
commit: string;
|
|
19
|
+
branch: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
15
22
|
declare module 'nuxt/schema' {
|
|
16
23
|
interface PublicRuntimeConfig {
|
|
17
|
-
shwfed: ModuleOptions;
|
|
24
|
+
shwfed: ModuleOptions & Env;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface ImportMetaEnv {
|
|
29
|
+
readonly CI?: 'true';
|
|
30
|
+
readonly GIT_COMMIT?: string;
|
|
31
|
+
readonly GIT_LOCAL_BRANCH?: string;
|
|
18
32
|
}
|
|
19
33
|
}
|
|
20
34
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
21
35
|
|
|
22
36
|
export { _default as default };
|
|
23
|
-
export type { ModuleOptions };
|
|
37
|
+
export type { Env, ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addImportsDir, addComponentsDir } from '@nuxt/kit';
|
|
2
2
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
3
|
+
import defu from 'defu';
|
|
3
4
|
|
|
4
5
|
const module$1 = defineNuxtModule({
|
|
5
6
|
meta: {
|
|
@@ -9,7 +10,13 @@ const module$1 = defineNuxtModule({
|
|
|
9
10
|
defaults: {},
|
|
10
11
|
setup(options, nuxt) {
|
|
11
12
|
const resolver = createResolver(import.meta.url);
|
|
12
|
-
nuxt.options.runtimeConfig.public.shwfed = options
|
|
13
|
+
nuxt.options.runtimeConfig.public.shwfed = defu(options, {
|
|
14
|
+
ci: import.meta.env.CI === "true",
|
|
15
|
+
git: {
|
|
16
|
+
commit: import.meta.env.GIT_COMMIT ?? "",
|
|
17
|
+
branch: import.meta.env.GIT_LOCAL_BRANCH ?? ""
|
|
18
|
+
}
|
|
19
|
+
});
|
|
13
20
|
nuxt.options.css ||= [];
|
|
14
21
|
nuxt.options.css.push("vue-sonner/style.css");
|
|
15
22
|
addVitePlugin(VueI18nPlugin({
|
package/dist/types.d.mts
CHANGED