@uniformdev/uniform-nuxt 20.74.6-alpha.2 → 20.74.6-alpha.5

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,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-uniform",
3
3
  "configKey": "uniform",
4
- "version": "20.74.6-alpha.2+d9426e9b81",
4
+ "version": "20.74.6-alpha.5+aaa8f352b2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -636,7 +636,116 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
636
636
  _name: string;
637
637
  type: string;
638
638
  } | undefined;
639
- fullResponse: {
639
+ fullResponse: ({
640
+ wholeResponseCacheDiagnostics?: {
641
+ info: string;
642
+ cacheTtl: number;
643
+ cachedAt: string;
644
+ edgeLocation?: string;
645
+ requestId: string;
646
+ };
647
+ diagnostics?: {
648
+ edgeLocation?: string;
649
+ originFetch?: {
650
+ duration: number;
651
+ cacheHit: boolean;
652
+ isValid: boolean;
653
+ sourceCache?: "edge-cdn-cache" | "long-term-cache" | "api-cache";
654
+ cacheLocation?: string;
655
+ requestId?: string;
656
+ ignoredQueryParams?: string[];
657
+ };
658
+ configRetrieval?: {
659
+ duration: number;
660
+ dataTypeCount: number;
661
+ };
662
+ } & {
663
+ data?: {
664
+ componentPath: string;
665
+ dataType: string;
666
+ dataName: string;
667
+ performance: {
668
+ cacheHit: boolean;
669
+ total: number;
670
+ retryCount: number;
671
+ retryDelay: number;
672
+ sourceCache?: string;
673
+ statusCodes: number[];
674
+ };
675
+ projection?: string;
676
+ data: unknown;
677
+ }[];
678
+ };
679
+ errors?: {
680
+ componentId?: string;
681
+ componentPath?: string;
682
+ componentType?: string;
683
+ message: string;
684
+ type: string;
685
+ parameterName?: string;
686
+ expression?: {
687
+ pointer: string;
688
+ syntax: "jptr";
689
+ failureAction?: "t" | "p" | "c" | "a";
690
+ failureLogLevel?: "e" | "w" | "i";
691
+ failureDefault?: string;
692
+ };
693
+ dataName?: string;
694
+ dataType?: string;
695
+ inputName?: string;
696
+ code?: string;
697
+ locale?: string;
698
+ conditionIndex?: number;
699
+ clauseIndex?: number;
700
+ statusCode?: number;
701
+ }[];
702
+ warnings?: {
703
+ componentId?: string;
704
+ componentPath?: string;
705
+ componentType?: string;
706
+ message: string;
707
+ type: string;
708
+ parameterName?: string;
709
+ expression?: {
710
+ pointer: string;
711
+ syntax: "jptr";
712
+ failureAction?: "t" | "p" | "c" | "a";
713
+ failureLogLevel?: "e" | "w" | "i";
714
+ failureDefault?: string;
715
+ };
716
+ dataName?: string;
717
+ dataType?: string;
718
+ inputName?: string;
719
+ code?: string;
720
+ locale?: string;
721
+ conditionIndex?: number;
722
+ clauseIndex?: number;
723
+ statusCode?: number;
724
+ }[];
725
+ infos?: {
726
+ componentId?: string;
727
+ componentPath?: string;
728
+ componentType?: string;
729
+ message: string;
730
+ type: string;
731
+ parameterName?: string;
732
+ expression?: {
733
+ pointer: string;
734
+ syntax: "jptr";
735
+ failureAction?: "t" | "p" | "c" | "a";
736
+ failureLogLevel?: "e" | "w" | "i";
737
+ failureDefault?: string;
738
+ };
739
+ dataName?: string;
740
+ dataType?: string;
741
+ inputName?: string;
742
+ code?: string;
743
+ locale?: string;
744
+ conditionIndex?: number;
745
+ clauseIndex?: number;
746
+ statusCode?: number;
747
+ }[];
748
+ } & {
640
749
  state: number;
641
750
  uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | "Previous" | "Unknown";
642
751
  projectId: string;
@@ -1319,7 +1428,7 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
1319
1428
  editionId?: string;
1320
1429
  editionName?: string;
1321
1430
  editionPriority?: number;
1322
- } | undefined;
1431
+ }) | undefined;
1323
1432
  pending: import("vue").Ref<boolean, boolean>;
1324
1433
  error: import("vue").Ref<import("#app").NuxtError<unknown> | undefined, import("#app").NuxtError<unknown> | undefined>;
1325
1434
  }>;
@@ -23,22 +23,22 @@ export const useUniformComposition = async (options) => {
23
23
  const state = previewState ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE;
24
24
  let response = void 0;
25
25
  if ("slug" in parameters) {
26
- response = await canvasClient.getCompositionBySlug({
26
+ response = await canvasClient.get({
27
27
  ...parameters,
28
28
  state
29
29
  });
30
30
  } else if ("compositionId" in parameters) {
31
- response = await canvasClient.getCompositionById({
31
+ response = await canvasClient.get({
32
32
  ...parameters,
33
33
  state
34
34
  });
35
35
  } else if ("projectMapNodeId" in parameters) {
36
- response = await canvasClient.getCompositionByNodeId({
36
+ response = await canvasClient.get({
37
37
  ...parameters,
38
38
  state
39
39
  });
40
40
  } else if ("projectMapNodePath" in parameters) {
41
- response = await canvasClient.getCompositionByNodePath({
41
+ response = await canvasClient.get({
42
42
  ...parameters,
43
43
  state
44
44
  });
@@ -1,4 +1,4 @@
1
- import { CanvasClient, CompositionGetParameters } from '@uniformdev/canvas';
1
+ import { CompositionDeliveryClient, CompositionGetParameters } from '@uniformdev/canvas';
2
2
  import { Context } from '@uniformdev/context';
3
3
  import { type Ref } from 'vue';
4
4
  export type PreviewState = {
@@ -12,7 +12,7 @@ declare const _default: import("#app").Plugin<{
12
12
  uniformIsSetup: boolean;
13
13
  useUniformContext: () => import("@uniformdev/context-vue").UniformContextProps;
14
14
  preview: PreviewState | undefined;
15
- uniformCanvasClient: CanvasClient;
15
+ uniformCanvasClient: CompositionDeliveryClient;
16
16
  uniformContext: Context;
17
17
  useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
18
18
  data: Ref<({
@@ -1607,7 +1607,7 @@ declare const _default: import("#app").Plugin<{
1607
1607
  uniformIsSetup: boolean;
1608
1608
  useUniformContext: () => import("@uniformdev/context-vue").UniformContextProps;
1609
1609
  preview: PreviewState | undefined;
1610
- uniformCanvasClient: CanvasClient;
1610
+ uniformCanvasClient: CompositionDeliveryClient;
1611
1611
  uniformContext: Context;
1612
1612
  useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
1613
1613
  data: Ref<({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CANVAS_DRAFT_STATE,
3
3
  CANVAS_PUBLISHED_STATE,
4
- CanvasClient,
4
+ CompositionDeliveryClient,
5
5
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
6
6
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM
7
7
  } from "@uniformdev/canvas";
@@ -109,7 +109,7 @@ function setupCanvas(nuxtApp) {
109
109
  const options = getModuleOptions();
110
110
  nuxtApp.vueApp.component("Composition", UniformComposition);
111
111
  nuxtApp.vueApp.component("SlotContent", UniformSlot);
112
- const uniformCanvasClient = new CanvasClient({
112
+ const uniformCanvasClient = new CompositionDeliveryClient({
113
113
  projectId: options.projectId,
114
114
  apiKey: options.readOnlyApiKey,
115
115
  apiHost: options.apiHost,
@@ -187,9 +187,9 @@ function setupUseComposition(uniformCanvasClient, currentCompositionId, preview)
187
187
  const state = preview ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE;
188
188
  const { data, pending, error } = await useAsyncData(`composition-${slug || compositionId}`, async () => {
189
189
  if (slug) {
190
- return await uniformCanvasClient.getCompositionBySlug({ slug, state });
190
+ return await uniformCanvasClient.get({ slug, state });
191
191
  } else if (compositionId) {
192
- return await uniformCanvasClient.getCompositionById({ compositionId, state });
192
+ return await uniformCanvasClient.get({ compositionId, state });
193
193
  }
194
194
  log(
195
195
  "uniform-nuxt: `useComposition` requires either a `slug` or a `compositionId`, but none were provided."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/uniform-nuxt",
3
- "version": "20.74.6-alpha.2+d9426e9b81",
3
+ "version": "20.74.6-alpha.5+aaa8f352b2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@nuxt/kit": "4.4.8",
32
- "@uniformdev/canvas": "20.74.6-alpha.2+d9426e9b81",
33
- "@uniformdev/canvas-vue": "20.74.6-alpha.2+d9426e9b81",
34
- "@uniformdev/context": "20.74.6-alpha.2+d9426e9b81",
35
- "@uniformdev/context-vue": "20.74.6-alpha.2+d9426e9b81",
36
- "@uniformdev/richtext": "20.74.6-alpha.2+d9426e9b81"
32
+ "@uniformdev/canvas": "20.74.6-alpha.5+aaa8f352b2",
33
+ "@uniformdev/canvas-vue": "20.74.6-alpha.5+aaa8f352b2",
34
+ "@uniformdev/context": "20.74.6-alpha.5+aaa8f352b2",
35
+ "@uniformdev/context-vue": "20.74.6-alpha.5+aaa8f352b2",
36
+ "@uniformdev/richtext": "20.74.6-alpha.5+aaa8f352b2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@nuxt/module-builder": "1.0.2",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "d9426e9b81a6943318d903c723f23f3c0cbb17ad"
50
+ "gitHead": "aaa8f352b2378d4ef9f062e364ebf7336145d95d"
51
51
  }