@anywayseo/gatsby-plugin 1.0.0 → 2.0.0

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.
Files changed (66) hide show
  1. package/gatsby-node.d.ts +4 -4
  2. package/gatsby-node.js +60 -80
  3. package/index.d.ts +1 -0
  4. package/index.js +5 -0
  5. package/package.json +14 -6
  6. package/types/index.d.ts +33 -0
  7. package/types/index.js +2 -0
  8. package/utils/slug.d.ts +2 -0
  9. package/utils/slug.js +8 -0
  10. package/utils/source.d.ts +2 -0
  11. package/utils/source.js +15 -0
  12. package/utils/strapi-source/index.d.ts +5 -0
  13. package/utils/strapi-source/index.js +13 -0
  14. package/utils/strapi-source/schema/components.d.ts +1 -0
  15. package/utils/strapi-source/schema/components.js +152 -0
  16. package/utils/strapi-source/schema/index.d.ts +1 -0
  17. package/utils/strapi-source/schema/index.js +10 -0
  18. package/utils/strapi-source/schema/localization.d.ts +1 -0
  19. package/utils/strapi-source/schema/localization.js +14 -0
  20. package/utils/strapi-source/schema/navigation.d.ts +1 -0
  21. package/utils/strapi-source/schema/navigation.js +25 -0
  22. package/utils/strapi-source/schema/page.d.ts +1 -0
  23. package/utils/strapi-source/schema/page.js +17 -0
  24. package/utils/strapi-source/schema/shared.d.ts +1 -0
  25. package/utils/strapi-source/schema/shared.js +22 -0
  26. package/utils/strapi-source/schema/site.d.ts +1 -0
  27. package/utils/strapi-source/schema/site.js +14 -0
  28. package/utils/{strapi-client.d.ts → strapi-source/strapi-client/index.d.ts} +2 -1
  29. package/utils/strapi-source/strapi-client/index.js +44 -0
  30. package/utils/strapi-source/strapi-content/clean-entity.d.ts +2 -0
  31. package/utils/strapi-source/strapi-content/clean-entity.js +93 -0
  32. package/utils/strapi-source/strapi-content/create-nodes.d.ts +3 -0
  33. package/utils/strapi-source/strapi-content/create-nodes.js +202 -0
  34. package/utils/strapi-source/strapi-content/delete-nodes.d.ts +3 -0
  35. package/utils/strapi-source/strapi-content/delete-nodes.js +76 -0
  36. package/utils/strapi-source/strapi-content/download-media.d.ts +15 -0
  37. package/utils/strapi-source/strapi-content/download-media.js +174 -0
  38. package/utils/strapi-source/strapi-content/fetch-entity.d.ts +4 -0
  39. package/utils/strapi-source/strapi-content/fetch-entity.js +35 -0
  40. package/utils/strapi-source/strapi-content/fetch-schemas.d.ts +3 -0
  41. package/utils/strapi-source/strapi-content/fetch-schemas.js +23 -0
  42. package/utils/strapi-source/strapi-content/get-cached-entities.d.ts +3 -0
  43. package/utils/strapi-source/strapi-content/get-cached-entities.js +27 -0
  44. package/utils/strapi-source/strapi-content/get-endpoints.d.ts +2 -0
  45. package/utils/strapi-source/strapi-content/get-endpoints.js +32 -0
  46. package/utils/strapi-source/strapi-content/get-entities.d.ts +2 -0
  47. package/utils/strapi-source/strapi-content/get-entities.js +17 -0
  48. package/utils/strapi-source/strapi-content/helpers.d.ts +9 -0
  49. package/utils/strapi-source/strapi-content/helpers.js +56 -0
  50. package/utils/strapi-source/strapi-content/index.d.ts +3 -0
  51. package/utils/strapi-source/strapi-content/index.js +113 -0
  52. package/utils/strapi-source/strapi-content/types.d.ts +43 -0
  53. package/utils/strapi-source/strapi-content/types.js +2 -0
  54. package/utils/strapi-source/strapi-content/utils.d.ts +5 -0
  55. package/utils/strapi-source/strapi-content/utils.js +30 -0
  56. package/utils/strapi-source/strapi-localization/index.d.ts +3 -0
  57. package/utils/strapi-source/strapi-localization/index.js +38 -0
  58. package/utils/strapi-source/strapi-localization/types.d.ts +9 -0
  59. package/utils/strapi-source/strapi-localization/types.js +2 -0
  60. package/utils/strapi-source/strapi-navigation/index.d.ts +3 -0
  61. package/utils/strapi-source/strapi-navigation/index.js +48 -0
  62. package/utils/strapi-source/strapi-navigation/types.d.ts +5 -0
  63. package/utils/strapi-source/strapi-navigation/types.js +2 -0
  64. package/utils/schema.d.ts +0 -1
  65. package/utils/schema.js +0 -194
  66. package/utils/strapi-client.js +0 -20
package/utils/schema.js DELETED
@@ -1,194 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.typeDefs = void 0;
4
- exports.typeDefs = `
5
- # === BASE DEFINITIONS ===
6
- type Image {
7
- localFile: File @link(from: "localFile")
8
- alternativeText: String
9
- }
10
-
11
- type Seo {
12
- metaTitle: String
13
- metaDescription: String
14
- }
15
-
16
- type Author {
17
- name: String
18
- role: String
19
- bio: String
20
- avatar: Image
21
- }
22
-
23
- # === STRAPI DEFINITIONS ===
24
- type StrapiSite implements Node {
25
- id: ID!
26
- name: String
27
- lang: String
28
- currency: String
29
- theme: String
30
- primaryColor: String
31
- logo: Image
32
- seo: Seo
33
- }
34
-
35
- type StrapiPage implements Node {
36
- id: ID!
37
- title: String
38
- slug: String
39
- seo: Seo
40
- author: Author
41
- content: [ContentComponent]
42
- createdAt: Date @dateformat
43
- updatedAt: Date @dateformat
44
- }
45
-
46
- # === STRAPI NAVIGATION DEFINITIONS ===
47
- type StrapiNavigation implements Node {
48
- id: ID!
49
- items: [NavigationGroup!]
50
- }
51
-
52
- type NavigationGroup {
53
- name: String!
54
- slug: String!
55
- items: [NavigationItem!]
56
- }
57
-
58
- type NavigationItem {
59
- type: String!
60
- title: String!
61
- slug: String!
62
- path: String!
63
- menuAttached: Boolean!
64
- items: [NavigationItem!]
65
- }
66
-
67
- # === COMPONENT DEFINITIONS ===
68
- union ContentComponent =
69
- STRAPI__COMPONENT_CONTENT_FAQ
70
- | STRAPI__COMPONENT_CONTENT_FEATURES
71
- | STRAPI__COMPONENT_CONTENT_GAME_DEMO
72
- | STRAPI__COMPONENT_CONTENT_GAME_INFO
73
- | STRAPI__COMPONENT_CONTENT_HOW_TO
74
- | STRAPI__COMPONENT_CONTENT_LIST
75
- | STRAPI__COMPONENT_CONTENT_MEDIA
76
- | STRAPI__COMPONENT_CONTENT_PROS_CONS
77
- | STRAPI__COMPONENT_CONTENT_RICH_TEXT
78
- | STRAPI__COMPONENT_CONTENT_TABLE
79
- | STRAPI__COMPONENT_CONTENT_TIP
80
-
81
- type STRAPI__COMPONENT_CONTENT_FAQ {
82
- items: [FaqItem!]
83
- }
84
-
85
- type FaqItem {
86
- question: String
87
- answer: String
88
- }
89
-
90
- type STRAPI__COMPONENT_CONTENT_FEATURES {
91
- items: [ListItem!]
92
- }
93
-
94
- type STRAPI__COMPONENT_CONTENT_PROS_CONS {
95
- pros: [ListItem!]
96
- cons: [ListItem!]
97
- }
98
-
99
- type ListItem {
100
- title: String
101
- description: String
102
- }
103
-
104
- type STRAPI__COMPONENT_CONTENT_GAME_DEMO {
105
- name: String
106
- src: String
107
- href: String
108
- previewImage: Image
109
- }
110
-
111
- type STRAPI__COMPONENT_CONTENT_GAME_INFO {
112
- general: GAME_GENERAL
113
- features: GAME_FEATURES
114
- }
115
-
116
- type GAME_GENERAL {
117
- NAME: String
118
- DEVELOPER: String
119
- RELEASE_DATE: Date @dateformat
120
- THEME: String
121
- TYPE: String
122
- VOLATILITY: String
123
- RTP: String
124
- PAY_LINES: String
125
- ROWS_WITH_PINS: String
126
- REELS_NUMBER: String
127
- MIN_BET: String
128
- MAX_BET: String
129
- MAX_WIN: String
130
- COMPATIBILITY: String
131
- }
132
-
133
- type GAME_FEATURES {
134
- HAS_DEMO: Boolean
135
- HAS_AUTOPLAY: Boolean
136
- HAS_FREE_SPINS: Boolean
137
- HAS_FAST_SPIN: Boolean
138
- HAS_BONUS_PURCHASE: Boolean
139
- HAS_COLLECTION_SYMBOLS: Boolean
140
- HAS_PROGRESSIVE_JACKPOT: Boolean
141
- BONUS_FEATURES: String
142
- FUNCTIONS: String
143
- LANGUAGES: String
144
- }
145
-
146
- type STRAPI__COMPONENT_CONTENT_HOW_TO {
147
- steps: [HowToStep!]
148
- }
149
-
150
- type HowToStep {
151
- title: String!
152
- description: String
153
- thumbnail: Image
154
- }
155
-
156
- type STRAPI__COMPONENT_CONTENT_TIP {
157
- tip: String
158
- author: Author
159
- }
160
-
161
- type STRAPI__COMPONENT_CONTENT_RICH_TEXT {
162
- content: RichTextContent
163
- }
164
-
165
- type RichTextContent {
166
- data: RichTextData
167
- }
168
-
169
- type RichTextData {
170
- content: String
171
- }
172
-
173
- type STRAPI__COMPONENT_CONTENT_LIST {
174
- bullet: String
175
- content: JsonValue
176
- }
177
-
178
- type STRAPI__COMPONENT_CONTENT_MEDIA {
179
- file: Image
180
- }
181
-
182
- type STRAPI__COMPONENT_CONTENT_TABLE {
183
- columnNumber: Int
184
- striped: Boolean
185
- bordered: Boolean
186
- scrollable: Boolean
187
- content: JsonValue
188
- caption: String
189
- }
190
-
191
- type JsonValue {
192
- strapi_json_value: JSON
193
- }
194
- `;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StrapiClient = void 0;
4
- class StrapiClient {
5
- constructor(apiUrl, accessToken) {
6
- if (!apiUrl || !accessToken) {
7
- throw new Error('Missing STRAPI_API_URL or STRAPI_TOKEN in environment variables.');
8
- }
9
- this.apiUrl = apiUrl;
10
- this.accessToken = accessToken;
11
- }
12
- fetch(path) {
13
- return fetch(`${this.apiUrl}/api/${path}`, {
14
- headers: {
15
- Authorization: `Bearer ${this.accessToken}`,
16
- },
17
- });
18
- }
19
- }
20
- exports.StrapiClient = StrapiClient;