@shwfed/nuxt 0.1.32 → 0.1.34

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
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.32",
4
+ "version": "0.1.34",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
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
@@ -1,3 +1,3 @@
1
1
  export { default } from './module.mjs'
2
2
 
3
- export { type ModuleOptions } from './module.mjs'
3
+ export { type Env, type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",