@shwfed/nuxt 0.1.34 → 0.1.36

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
@@ -15,8 +15,8 @@ interface ModuleOptions {
15
15
  interface Env {
16
16
  ci: boolean;
17
17
  git: Readonly<{
18
- commit: string;
19
- branch: string;
18
+ commit?: string;
19
+ branch?: string;
20
20
  }>;
21
21
  }
22
22
  declare module 'nuxt/schema' {
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.34",
4
+ "version": "0.1.36",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -11,10 +11,10 @@ const module$1 = defineNuxtModule({
11
11
  setup(options, nuxt) {
12
12
  const resolver = createResolver(import.meta.url);
13
13
  nuxt.options.runtimeConfig.public.shwfed = defu(options, {
14
- ci: import.meta.env?.CI === "true",
14
+ ci: process.env.CI === "true",
15
15
  git: {
16
- commit: import.meta.env?.GIT_COMMIT,
17
- branch: import.meta.env?.GIT_LOCAL_BRANCH
16
+ commit: process.env.GIT_COMMIT,
17
+ branch: process.env.GIT_LOCAL_BRANCH
18
18
  }
19
19
  });
20
20
  nuxt.options.css ||= [];
@@ -1,10 +1,11 @@
1
- import { defineNuxtPlugin } from "#app";
1
+ import { defineNuxtPlugin, useRuntimeConfig } from "#app";
2
2
  import defu from "defu";
3
3
  import { createEnvironment } from "./env.js";
4
4
  export default defineNuxtPlugin({
5
5
  name: "shwfed-nuxt:cel",
6
6
  setup: () => {
7
- const env = createEnvironment({});
7
+ const config = useRuntimeConfig().public.shwfed;
8
+ const env = createEnvironment({}).registerConstant("git", "map<string, string>", config.git);
8
9
  return {
9
10
  provide: {
10
11
  dsl: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",