@pronto-tools-and-more/pronto 12.23.0 → 12.25.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/pronto",
3
- "version": "12.23.0",
3
+ "version": "12.25.0",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -17,16 +17,16 @@
17
17
  "@lvce-editor/ipc": "^13.7.0",
18
18
  "@lvce-editor/json-rpc": "^5.4.0",
19
19
  "@lvce-editor/verror": "^1.6.0",
20
- "@pronto-tools-and-more/file-watcher": "12.23.0",
21
- "@pronto-tools-and-more/files": "12.23.0",
22
- "@pronto-tools-and-more/network-process": "12.23.0",
23
- "@pronto-tools-and-more/sass-compiler": "12.23.0",
24
- "@pronto-tools-and-more/components-renderer": "12.23.0",
25
- "@pronto-tools-and-more/components": "12.23.0",
26
- "@pronto-tools-and-more/schema-process": "12.23.0",
27
- "@pronto-tools-and-more/diff-process": "12.23.0",
28
- "@pronto-tools-and-more/type-checker": "12.23.0",
29
- "@pronto-tools-and-more/custom-js-functions": "12.23.0",
20
+ "@pronto-tools-and-more/file-watcher": "12.25.0",
21
+ "@pronto-tools-and-more/files": "12.25.0",
22
+ "@pronto-tools-and-more/network-process": "12.25.0",
23
+ "@pronto-tools-and-more/sass-compiler": "12.25.0",
24
+ "@pronto-tools-and-more/components-renderer": "12.25.0",
25
+ "@pronto-tools-and-more/components": "12.25.0",
26
+ "@pronto-tools-and-more/schema-process": "12.25.0",
27
+ "@pronto-tools-and-more/diff-process": "12.25.0",
28
+ "@pronto-tools-and-more/type-checker": "12.25.0",
29
+ "@pronto-tools-and-more/custom-js-functions": "12.25.0",
30
30
  "execa": "^9.5.2",
31
31
  "express": "^4.21.2"
32
32
  },
@@ -14,6 +14,7 @@ import * as ProxyPath from "../ProxyPath/ProxyPath.js";
14
14
  export const create = ({
15
15
  root,
16
16
  appId,
17
+ releaseAppId,
17
18
  baseUrl,
18
19
  rootSassFile,
19
20
  contentUrl,
@@ -29,6 +30,7 @@ export const create = ({
29
30
  resourceDynamicUrlsInViewsJson,
30
31
  injectCustomJs,
31
32
  shimConfigLoader,
33
+ apiUrl,
32
34
  }) => {
33
35
  const app = express();
34
36
  const storeFrontPath = join(root, "src", "default", "storefront");
@@ -90,7 +92,8 @@ export const create = ({
90
92
  injectCustomJs,
91
93
  })
92
94
  );
93
- app.use("/api", HandleApi.handleApi({ appId }));
95
+ app.use("/api", HandleApi.handleApi({ appId, apiUrl }));
96
+ app.use("/prod-api", HandleApi.handleApi({ appId: releaseAppId, apiUrl }));
94
97
  app.use("*", HandleCss.handleCss(storeFrontPath, rootSassFile));
95
98
  app.use(express.static(FilesPath.filesPath));
96
99
  app.use(express.static(storeFrontPath));
@@ -117,3 +117,6 @@ export const resourceDynamicUrlsInViewsJson =
117
117
  export const injectCustomJs = config.injectCustomJs || false;
118
118
 
119
119
  export const shimConfigLoader = config.shimConfigLoader || false;
120
+
121
+ export const apiUrl =
122
+ process.env.API_URL || "https://catalog.purplemanager.com/graphql";
@@ -28,6 +28,8 @@ export const createServer = async (root, errorColor) => {
28
28
  resourceDynamicUrlsInViewsJson: Config.resourceDynamicUrlsInViewsJson,
29
29
  injectCustomJs: Config.injectCustomJs,
30
30
  shimConfigLoader: Config.shimConfigLoader,
31
+ releaseAppId: Config.releaseAppId,
32
+ apiUrl: Config.apiUrl,
31
33
  });
32
34
  const server = http.createServer(app);
33
35
  const webSocketServer = new ws.WebSocketServer({
@@ -0,0 +1,227 @@
1
+ export const top = `query CatalogCollections($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $filter: CollectionFilter, $sort: [CollectionComparator!], $first: Int, $after: String, $includeElements: Boolean!, $elementsFirst: Int, $elementsAfter: String, $includeBundledContent: Boolean!, $includeResources: Boolean!, $includeBlocks: Boolean!, $includeHtml: Boolean!, $includeContentSeoMetadata: Boolean!, $propertyFilter: PropertyFilter) {
2
+ catalog(
3
+ appInfo: $appInfo
4
+ deviceInfo: $deviceInfo
5
+ authorization: $authorization
6
+ ) {
7
+ collectionsConnection(
8
+ filter: $filter
9
+ sort: $sort
10
+ first: $first
11
+ after: $after
12
+ ) {
13
+ pageInfo {
14
+ hasNextPage
15
+ endCursor
16
+ }
17
+ edges {
18
+ node {
19
+ id
20
+ name
21
+ properties {
22
+ key
23
+ value
24
+ }
25
+ elementsConnection(first: $elementsFirst, after: $elementsAfter) @include(if: $includeElements) {
26
+ pageInfo {
27
+ hasNextPage
28
+ endCursor
29
+ }
30
+ edges {
31
+ node {
32
+ __typename
33
+ ... on ContentElement {
34
+ id
35
+ sortIndex
36
+ content {
37
+ ...ContentFragment
38
+ ...IssueFragment
39
+ ...PostFragment
40
+ ...BundleFragment
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ fragment ContentFragment on Content {
53
+ __typename
54
+ id
55
+ version
56
+ name
57
+ description
58
+ index
59
+ alias
60
+ externalId
61
+ publicationDate
62
+ unpublishDate
63
+ lastModified
64
+ access
65
+ productId
66
+ purchaseData {
67
+ purchased
68
+ purchasedBy
69
+ }
70
+ publication {
71
+ id
72
+ }
73
+ properties(filter: $propertyFilter) {
74
+ key
75
+ value
76
+ }
77
+ seoMetadata @include(if: $includeContentSeoMetadata) {
78
+ key
79
+ value
80
+ }
81
+ thumbnails {
82
+ kind
83
+ url
84
+ properties {
85
+ key
86
+ value
87
+ }
88
+ }
89
+ categories
90
+ tags
91
+ }
92
+
93
+ fragment IssueFragment on Issue {
94
+ contentLength
95
+ numberOfPages
96
+ previewContentLength
97
+ resources @include(if: $includeResources) {
98
+ id
99
+ url
100
+ type
101
+ contentLength
102
+ properties {
103
+ key
104
+ value
105
+ type
106
+ }
107
+ }
108
+ }
109
+
110
+ fragment PostFragment on Post {
111
+ postType
112
+ bundleId
113
+ bundles {
114
+ id
115
+ bundleType
116
+ }
117
+ taxonomies {
118
+ ...TaxonomySummaryFragment
119
+ }
120
+ authors {
121
+ name
122
+ email
123
+ }
124
+ bundleId
125
+ content @include(if: $includeBlocks) {
126
+ ...ContentBlockFragment
127
+ }
128
+ previewContentBlocks @include(if: $includeBlocks) {
129
+ ...ContentBlockFragment
130
+ }
131
+ contentHtml @include(if: $includeHtml)
132
+ previewContentHtml @include(if: $includeHtml)
133
+ resources @include(if: $includeResources) {
134
+ id
135
+ url
136
+ type
137
+ contentLength
138
+ properties {
139
+ key
140
+ value
141
+ type
142
+ }
143
+ }
144
+ }
145
+
146
+ fragment ContentBlockFragment on ContentBlock {
147
+ id
148
+ type
149
+ parentId
150
+ children
151
+ sequence
152
+ html
153
+ level
154
+ properties {
155
+ key
156
+ value
157
+ type
158
+ }
159
+ }
160
+
161
+ fragment BundleFragment on Bundle {
162
+ bundleType
163
+ taxonomies {
164
+ ...TaxonomySummaryFragment
165
+ }
166
+ authors {
167
+ name
168
+ email
169
+ }
170
+ contents @include(if: $includeBundledContent) {
171
+ id
172
+ content {
173
+ ...ContentFragment
174
+ ...PostFragment
175
+ }
176
+ }
177
+ }
178
+
179
+ fragment TaxonomySummaryFragment on Taxonomy {
180
+ id
181
+ internalId
182
+ name
183
+ type
184
+ parentId
185
+ seoMetadata @include(if: $includeContentSeoMetadata) {
186
+ key
187
+ value
188
+ }
189
+ properties {
190
+ key
191
+ value
192
+ }
193
+ }`;
194
+
195
+ export const bottom = {
196
+ filter: {
197
+ name: {
198
+ value: "",
199
+ },
200
+ },
201
+ first: 24,
202
+ includeElements: true,
203
+ elementsFirst: 100,
204
+ includeBlocks: false,
205
+ includeHtml: false,
206
+ includeResources: false,
207
+ includeBundledContent: false,
208
+ includeContentSeoMetadata: false,
209
+ appInfo: {
210
+ appId: "",
211
+ appVersion: "1.0-SNAPSHOT",
212
+ preview: true,
213
+ },
214
+ deviceInfo: {
215
+ deviceId: "editor-preview",
216
+ deviceModel: "web",
217
+ locale: "de_DE",
218
+ smallestScreenWidthDp: 0,
219
+ deviceOs: "web",
220
+ platform: "WEB",
221
+ },
222
+ authorization: {
223
+ subscriptionCodes: [],
224
+ },
225
+ };
226
+
227
+ export const queryName = "CatalogCollections";
@@ -0,0 +1,227 @@
1
+ export const top = `query CatalogCollections($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $filter: CollectionFilter, $sort: [CollectionComparator!], $first: Int, $after: String, $includeElements: Boolean!, $elementsFirst: Int, $elementsAfter: String, $includeBundledContent: Boolean!, $includeResources: Boolean!, $includeBlocks: Boolean!, $includeHtml: Boolean!, $includeContentSeoMetadata: Boolean!, $propertyFilter: PropertyFilter) {
2
+ catalog(
3
+ appInfo: $appInfo
4
+ deviceInfo: $deviceInfo
5
+ authorization: $authorization
6
+ ) {
7
+ collectionsConnection(
8
+ filter: $filter
9
+ sort: $sort
10
+ first: $first
11
+ after: $after
12
+ ) {
13
+ pageInfo {
14
+ hasNextPage
15
+ endCursor
16
+ }
17
+ edges {
18
+ node {
19
+ id
20
+ name
21
+ properties {
22
+ key
23
+ value
24
+ }
25
+ elementsConnection(first: $elementsFirst, after: $elementsAfter) @include(if: $includeElements) {
26
+ pageInfo {
27
+ hasNextPage
28
+ endCursor
29
+ }
30
+ edges {
31
+ node {
32
+ __typename
33
+ ... on ContentElement {
34
+ id
35
+ sortIndex
36
+ content {
37
+ ...ContentFragment
38
+ ...IssueFragment
39
+ ...PostFragment
40
+ ...BundleFragment
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ fragment ContentFragment on Content {
53
+ __typename
54
+ id
55
+ version
56
+ name
57
+ description
58
+ index
59
+ alias
60
+ externalId
61
+ publicationDate
62
+ unpublishDate
63
+ lastModified
64
+ access
65
+ productId
66
+ purchaseData {
67
+ purchased
68
+ purchasedBy
69
+ }
70
+ publication {
71
+ id
72
+ }
73
+ properties(filter: $propertyFilter) {
74
+ key
75
+ value
76
+ }
77
+ seoMetadata @include(if: $includeContentSeoMetadata) {
78
+ key
79
+ value
80
+ }
81
+ thumbnails {
82
+ kind
83
+ url
84
+ properties {
85
+ key
86
+ value
87
+ }
88
+ }
89
+ categories
90
+ tags
91
+ }
92
+
93
+ fragment IssueFragment on Issue {
94
+ contentLength
95
+ numberOfPages
96
+ previewContentLength
97
+ resources @include(if: $includeResources) {
98
+ id
99
+ url
100
+ type
101
+ contentLength
102
+ properties {
103
+ key
104
+ value
105
+ type
106
+ }
107
+ }
108
+ }
109
+
110
+ fragment PostFragment on Post {
111
+ postType
112
+ bundleId
113
+ bundles {
114
+ id
115
+ bundleType
116
+ }
117
+ taxonomies {
118
+ ...TaxonomySummaryFragment
119
+ }
120
+ authors {
121
+ name
122
+ email
123
+ }
124
+ bundleId
125
+ content @include(if: $includeBlocks) {
126
+ ...ContentBlockFragment
127
+ }
128
+ previewContentBlocks @include(if: $includeBlocks) {
129
+ ...ContentBlockFragment
130
+ }
131
+ contentHtml @include(if: $includeHtml)
132
+ previewContentHtml @include(if: $includeHtml)
133
+ resources @include(if: $includeResources) {
134
+ id
135
+ url
136
+ type
137
+ contentLength
138
+ properties {
139
+ key
140
+ value
141
+ type
142
+ }
143
+ }
144
+ }
145
+
146
+ fragment ContentBlockFragment on ContentBlock {
147
+ id
148
+ type
149
+ parentId
150
+ children
151
+ sequence
152
+ html
153
+ level
154
+ properties {
155
+ key
156
+ value
157
+ type
158
+ }
159
+ }
160
+
161
+ fragment BundleFragment on Bundle {
162
+ bundleType
163
+ taxonomies {
164
+ ...TaxonomySummaryFragment
165
+ }
166
+ authors {
167
+ name
168
+ email
169
+ }
170
+ contents @include(if: $includeBundledContent) {
171
+ id
172
+ content {
173
+ ...ContentFragment
174
+ ...PostFragment
175
+ }
176
+ }
177
+ }
178
+
179
+ fragment TaxonomySummaryFragment on Taxonomy {
180
+ id
181
+ internalId
182
+ name
183
+ type
184
+ parentId
185
+ seoMetadata @include(if: $includeContentSeoMetadata) {
186
+ key
187
+ value
188
+ }
189
+ properties {
190
+ key
191
+ value
192
+ }
193
+ }`;
194
+
195
+ export const bottom = {
196
+ filter: {
197
+ name: {
198
+ value: "",
199
+ },
200
+ },
201
+ first: 24,
202
+ includeElements: false,
203
+ elementsFirst: 100,
204
+ includeBlocks: false,
205
+ includeHtml: false,
206
+ includeResources: false,
207
+ includeBundledContent: false,
208
+ includeContentSeoMetadata: false,
209
+ appInfo: {
210
+ appId: "",
211
+ appVersion: "1.0-SNAPSHOT",
212
+ preview: true,
213
+ },
214
+ deviceInfo: {
215
+ deviceId: "editor-preview",
216
+ deviceModel: "web",
217
+ locale: "de_DE",
218
+ smallestScreenWidthDp: 0,
219
+ deviceOs: "web",
220
+ platform: "WEB",
221
+ },
222
+ authorization: {
223
+ subscriptionCodes: [],
224
+ },
225
+ };
226
+
227
+ export const queryName = "CatalogCollections";
@@ -0,0 +1,198 @@
1
+ export const top = `query CatalogContentsQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $filter: ContentFilter, $sort: [ContentComparator!], $first: Int, $after: String, $includeBundledContent: Boolean!, $includeResources: Boolean!, $includeBlocks: Boolean!, $includeHtml: Boolean!, $includeContentSeoMetadata: Boolean!, $propertyFilter: PropertyFilter) {
2
+ catalog(
3
+ appInfo: $appInfo
4
+ deviceInfo: $deviceInfo
5
+ authorization: $authorization
6
+ ) {
7
+ contentsConnection(filter: $filter, sort: $sort, first: $first, after: $after) {
8
+ pageInfo {
9
+ hasNextPage
10
+ endCursor
11
+ }
12
+ edges {
13
+ content: node {
14
+ __typename
15
+ ...ContentFragment
16
+ ...PostFragment
17
+ ...IssueFragment
18
+ ...BundleFragment
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ fragment ContentFragment on Content {
26
+ __typename
27
+ id
28
+ version
29
+ name
30
+ description
31
+ index
32
+ alias
33
+ externalId
34
+ publicationDate
35
+ unpublishDate
36
+ lastModified
37
+ access
38
+ productId
39
+ purchaseData {
40
+ purchased
41
+ purchasedBy
42
+ }
43
+ publication {
44
+ id
45
+ }
46
+ properties(filter: $propertyFilter) {
47
+ key
48
+ value
49
+ }
50
+ seoMetadata @include(if: $includeContentSeoMetadata) {
51
+ key
52
+ value
53
+ }
54
+ thumbnails {
55
+ kind
56
+ url
57
+ properties {
58
+ key
59
+ value
60
+ }
61
+ }
62
+ categories
63
+ tags
64
+ }
65
+
66
+ fragment PostFragment on Post {
67
+ postType
68
+ bundleId
69
+ bundles {
70
+ id
71
+ bundleType
72
+ }
73
+ taxonomies {
74
+ ...TaxonomySummaryFragment
75
+ }
76
+ authors {
77
+ name
78
+ email
79
+ }
80
+ bundleId
81
+ content @include(if: $includeBlocks) {
82
+ ...ContentBlockFragment
83
+ }
84
+ previewContentBlocks @include(if: $includeBlocks) {
85
+ ...ContentBlockFragment
86
+ }
87
+ contentHtml @include(if: $includeHtml)
88
+ previewContentHtml @include(if: $includeHtml)
89
+ resources @include(if: $includeResources) {
90
+ id
91
+ url
92
+ type
93
+ contentLength
94
+ properties {
95
+ key
96
+ value
97
+ type
98
+ }
99
+ }
100
+ }
101
+
102
+ fragment ContentBlockFragment on ContentBlock {
103
+ id
104
+ type
105
+ parentId
106
+ children
107
+ sequence
108
+ html
109
+ level
110
+ properties {
111
+ key
112
+ value
113
+ type
114
+ }
115
+ }
116
+
117
+ fragment BundleFragment on Bundle {
118
+ bundleType
119
+ taxonomies {
120
+ ...TaxonomySummaryFragment
121
+ }
122
+ authors {
123
+ name
124
+ email
125
+ }
126
+ contents @include(if: $includeBundledContent) {
127
+ id
128
+ content {
129
+ ...ContentFragment
130
+ ...PostFragment
131
+ }
132
+ }
133
+ }
134
+
135
+ fragment IssueFragment on Issue {
136
+ contentLength
137
+ numberOfPages
138
+ previewContentLength
139
+ resources @include(if: $includeResources) {
140
+ id
141
+ url
142
+ type
143
+ contentLength
144
+ properties {
145
+ key
146
+ value
147
+ type
148
+ }
149
+ }
150
+ }
151
+
152
+ fragment TaxonomySummaryFragment on Taxonomy {
153
+ id
154
+ internalId
155
+ name
156
+ type
157
+ parentId
158
+ seoMetadata @include(if: $includeContentSeoMetadata) {
159
+ key
160
+ value
161
+ }
162
+ properties {
163
+ key
164
+ value
165
+ }
166
+ }`;
167
+
168
+ export const bottom = {
169
+ filter: {
170
+ id: {
171
+ value: "",
172
+ },
173
+ },
174
+ first: 1,
175
+ includeBlocks: true,
176
+ includeHtml: true,
177
+ includeResources: true,
178
+ includeBundledContent: false,
179
+ includeContentSeoMetadata: false,
180
+ appInfo: {
181
+ appId: "",
182
+ appVersion: "1.0-SNAPSHOT",
183
+ preview: true,
184
+ },
185
+ deviceInfo: {
186
+ deviceId: "editor-preview",
187
+ deviceModel: "web",
188
+ locale: "de_DE",
189
+ smallestScreenWidthDp: 0,
190
+ deviceOs: "web",
191
+ platform: "WEB",
192
+ },
193
+ authorization: {
194
+ subscriptionCodes: [],
195
+ },
196
+ };
197
+
198
+ export const queryName = "CatalogContentsQuery";