@uniformdev/uniform-nuxt 17.5.0 → 17.5.1-alpha.105

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.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "nuxt-uniform",
3
3
  "configKey": "uniform",
4
- "version": "17.5.0"
4
+ "version": "17.5.1-alpha.105+9b3f152e7"
5
5
  }
@@ -29,6 +29,8 @@ import {
29
29
  onRouteChange,
30
30
  useUniformContext
31
31
  } from "@uniformdev/context-vue";
32
+ const log = process.env.NODE_ENV === "development" ? (...args) => console.log(...args) : () => {
33
+ };
32
34
  export default defineNuxtPlugin((nuxtApp) => {
33
35
  if (nuxtApp.$uniformIsSetup) {
34
36
  return;
@@ -64,7 +66,7 @@ function setupContext(nuxtApp) {
64
66
  );
65
67
  }
66
68
  if (!uniformContext && options.manifest) {
67
- console.log("uniform-nuxt: \u{1F4DC} found a manifest, will initialize Context");
69
+ log("uniform-nuxt: \u{1F4DC} found a manifest, will initialize Context");
68
70
  const manifestAsSimpleObject = toRaw(options.manifest);
69
71
  uniformContext = new Context({
70
72
  defaultConsent: Boolean(options.defaultConsent),
@@ -116,7 +118,7 @@ function setupPreview() {
116
118
  const route = useRoute();
117
119
  let preview;
118
120
  if (route.query.preview === "true") {
119
- console.log("uniform-nuxt: \u{1F575}\uFE0F Entering preview mode");
121
+ log("uniform-nuxt: \u{1F575}\uFE0F Entering preview mode");
120
122
  preview = {
121
123
  slug: route.query.slug,
122
124
  compositionId: route.query.id
@@ -161,8 +163,12 @@ function setupUseComposition(uniformCanvasClient, currentCompositionId, preview)
161
163
  const { data, pending, error } = await useAsyncData(`composition-${slug || compositionId}`, async () => {
162
164
  if (slug) {
163
165
  return await uniformCanvasClient.getCompositionBySlug({ slug, state });
166
+ } else if (compositionId) {
167
+ return await uniformCanvasClient.getCompositionById({ compositionId, state });
164
168
  }
165
- return await uniformCanvasClient.getCompositionById({ compositionId, state });
169
+ log(
170
+ "uniform-nuxt: `useComposition` requires either a `slug` or a `compositionId`, but none were provided."
171
+ );
166
172
  });
167
173
  currentCompositionId.value = data.value?.composition._id ?? "";
168
174
  return { data, pending, error };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/uniform-nuxt",
3
- "version": "17.5.0",
3
+ "version": "17.5.1-alpha.105+9b3f152e7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -22,7 +22,7 @@
22
22
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\""
23
23
  },
24
24
  "dependencies": {
25
- "@nuxt/kit": "^3.0.0-rc.9",
25
+ "@nuxt/kit": "3.0.0",
26
26
  "vue-demi": "^0.13.11"
27
27
  },
28
28
  "peerDependencies": {
@@ -32,21 +32,21 @@
32
32
  "@uniformdev/context-vue": ">15"
33
33
  },
34
34
  "devDependencies": {
35
- "@nuxt/module-builder": "0.2.0",
36
- "@nuxt/schema": "3.0.0-rc.9",
35
+ "@nuxt/module-builder": "0.2.1",
36
+ "@nuxt/schema": "3.0.0",
37
37
  "@nuxtjs/eslint-config-typescript": "11.0.0",
38
- "@uniformdev/canvas": "^17.5.0",
39
- "@uniformdev/canvas-vue": "^17.5.0",
40
- "@uniformdev/context": "^17.5.0",
41
- "@uniformdev/context-vue": "^17.5.0",
42
- "esbuild": "0.15.13",
38
+ "@uniformdev/canvas": "^17.5.1-alpha.105+9b3f152e7",
39
+ "@uniformdev/canvas-vue": "^17.5.1-alpha.105+9b3f152e7",
40
+ "@uniformdev/context": "^17.5.1-alpha.105+9b3f152e7",
41
+ "@uniformdev/context-vue": "^17.5.1-alpha.105+9b3f152e7",
42
+ "esbuild": "0.15.15",
43
43
  "eslint": "latest",
44
- "nuxt": "3.0.0-rc.9",
45
- "vue": "3.2.39",
44
+ "nuxt": "3.0.0",
45
+ "vue": "3.2.45",
46
46
  "vue-router": "4.1.5"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "de1f52defe798010336e1dd3b2732fce359855fb"
51
+ "gitHead": "9b3f152e7455f37fd8609004bab4ded4a9a88bc7"
52
52
  }