@openstack_dev/gatsby-theme-marketing-oif-core 1.0.42 → 1.0.45
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/.nvmrc +1 -1
- package/gatsby-config.js +0 -1
- package/gatsby-node.js +59 -24
- package/package.json +3 -6
- package/src/content/site-settings/index.json +1 -1
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
22.22.
|
|
1
|
+
22.22.2
|
package/gatsby-config.js
CHANGED
package/gatsby-node.js
CHANGED
|
@@ -6,7 +6,7 @@ const { createFilePath } = require("gatsby-source-filesystem");
|
|
|
6
6
|
const typeDefs = require("./src/cms/config/collections/typeDefs");
|
|
7
7
|
|
|
8
8
|
require("dotenv").config({
|
|
9
|
-
path: `.env.${process.env.NODE_ENV}
|
|
9
|
+
path: `.env.${process.env.NODE_ENV}`
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
const {
|
|
@@ -14,23 +14,24 @@ const {
|
|
|
14
14
|
SITE_SETTINGS_FILE_PATH,
|
|
15
15
|
MAINTENANCE_FILE_PATH,
|
|
16
16
|
FONTS_SCSS_FILE_PATH,
|
|
17
|
-
SPONSORED_PROJECTS_FILE_PATH
|
|
17
|
+
SPONSORED_PROJECTS_FILE_PATH
|
|
18
18
|
} = require("./src/utils/filePath");
|
|
19
19
|
const { generateFontFile } = require("./src/utils/cssUtils");
|
|
20
20
|
|
|
21
21
|
const fileBuildTimes = [];
|
|
22
22
|
|
|
23
|
-
const SSR_getSponsoredProjects = async (baseUrl) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
const SSR_getSponsoredProjects = async (baseUrl) =>
|
|
24
|
+
axios
|
|
25
|
+
.get(`${baseUrl}/api/public/v1/sponsored-projects`, {
|
|
26
|
+
params: {
|
|
27
|
+
per_page: 100,
|
|
28
|
+
page: 1,
|
|
29
|
+
expand:
|
|
30
|
+
"subprojects,subprojects.sponsorship_types,subprojects.sponsorship_types.supporting_companies,subprojects.sponsorship_types.supporting_companies.company"
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
.then((response) => response.data.data)
|
|
34
|
+
.catch((e) => console.log("ERROR: ", e));
|
|
34
35
|
|
|
35
36
|
const writeToJson = (filePath, data) => {
|
|
36
37
|
fs.writeFileSync(filePath, JSON.stringify(data), "utf8", (err) => {
|
|
@@ -62,7 +63,7 @@ exports.onPreBootstrap = async () => {
|
|
|
62
63
|
fs.writeFileSync(
|
|
63
64
|
SITE_SETTINGS_FILE_PATH,
|
|
64
65
|
JSON.stringify(globalSettings),
|
|
65
|
-
"utf8"
|
|
66
|
+
"utf8"
|
|
66
67
|
);
|
|
67
68
|
|
|
68
69
|
// Read fonts from site settings
|
|
@@ -102,7 +103,7 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
|
|
|
102
103
|
createNodeField({
|
|
103
104
|
name: "slug",
|
|
104
105
|
node,
|
|
105
|
-
value
|
|
106
|
+
value
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
};
|
|
@@ -118,12 +119,12 @@ exports.createPages = ({ actions }) => {
|
|
|
118
119
|
if (maintenanceMode.enabled) {
|
|
119
120
|
createRedirect({
|
|
120
121
|
fromPath: "/*",
|
|
121
|
-
toPath: "/maintenance/"
|
|
122
|
+
toPath: "/maintenance/"
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
|
|
126
|
-
exports.onCreateWebpackConfig = ({ actions, plugins }) => {
|
|
127
|
+
exports.onCreateWebpackConfig = ({ actions, getConfig, plugins }) => {
|
|
127
128
|
console.log(`onCreateWebpackConfig src ${path.resolve("src")}`);
|
|
128
129
|
actions.setWebpackConfig({
|
|
129
130
|
resolve: {
|
|
@@ -136,25 +137,59 @@ exports.onCreateWebpackConfig = ({ actions, plugins }) => {
|
|
|
136
137
|
fallback: {
|
|
137
138
|
path: require.resolve("path-browserify"),
|
|
138
139
|
stream: require.resolve("stream-browserify"),
|
|
139
|
-
buffer: require.resolve("buffer/")
|
|
140
|
+
buffer: require.resolve("buffer/")
|
|
140
141
|
},
|
|
141
142
|
// allows content and data imports to correctly resolve when theming
|
|
142
|
-
modules: [path.resolve("src")]
|
|
143
|
+
modules: [path.resolve("src")]
|
|
143
144
|
},
|
|
144
145
|
// devtool: "source-map",
|
|
145
146
|
plugins: [
|
|
146
147
|
plugins.define({
|
|
147
148
|
"global.GENTLY": false,
|
|
148
|
-
"global.BLOB": false
|
|
149
|
+
"global.BLOB": false
|
|
149
150
|
}),
|
|
150
151
|
new webpack.ProvidePlugin({
|
|
151
|
-
Buffer: ["buffer", "Buffer"]
|
|
152
|
+
Buffer: ["buffer", "Buffer"]
|
|
152
153
|
}),
|
|
153
154
|
// ignore unused jsdom dependency
|
|
154
155
|
new webpack.IgnorePlugin({
|
|
155
156
|
resourceRegExp: /canvas/,
|
|
156
|
-
contextRegExp: /jsdom
|
|
157
|
-
})
|
|
158
|
-
]
|
|
157
|
+
contextRegExp: /jsdom$/
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// Silence Dart Sass legacy-js-api deprecation warning.
|
|
163
|
+
// sass-loader 10.x only supports the legacy JS API; upgrading requires
|
|
164
|
+
// a gatsby-plugin-sass major bump. Safe to silence until Dart Sass 2.0.
|
|
165
|
+
const config = getConfig();
|
|
166
|
+
(config.module?.rules ?? []).forEach((rule) => {
|
|
167
|
+
(rule?.oneOf ?? []).forEach((entry) => {
|
|
168
|
+
(entry?.use ?? []).forEach((loader) => {
|
|
169
|
+
if (
|
|
170
|
+
typeof loader === "object" &&
|
|
171
|
+
typeof loader.loader === "string" &&
|
|
172
|
+
loader.loader.includes("sass-loader")
|
|
173
|
+
) {
|
|
174
|
+
/* eslint-disable no-param-reassign */
|
|
175
|
+
if (!loader.options) loader.options = {};
|
|
176
|
+
if (!loader.options.sassOptions) loader.options.sassOptions = {};
|
|
177
|
+
if (!loader.options.sassOptions.silenceDeprecations) {
|
|
178
|
+
loader.options.sassOptions.silenceDeprecations = [];
|
|
179
|
+
}
|
|
180
|
+
/* eslint-enable no-param-reassign */
|
|
181
|
+
if (
|
|
182
|
+
!loader.options.sassOptions.silenceDeprecations.includes(
|
|
183
|
+
"legacy-js-api"
|
|
184
|
+
)
|
|
185
|
+
) {
|
|
186
|
+
loader.options.sassOptions.silenceDeprecations.push(
|
|
187
|
+
"legacy-js-api"
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
159
193
|
});
|
|
194
|
+
actions.replaceWebpackConfig(config);
|
|
160
195
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openstack_dev/gatsby-theme-marketing-oif-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "Base theme for Marketing Sites",
|
|
5
5
|
"author": "smarcet",
|
|
6
6
|
"keywords": [
|
|
@@ -22,9 +22,6 @@
|
|
|
22
22
|
"*.{js,jsx}": "eslint --fix",
|
|
23
23
|
"**/*": "prettier --write --ignore-unknown"
|
|
24
24
|
},
|
|
25
|
-
"resolutions": {
|
|
26
|
-
"gatsby-plugin-sass/sass-loader": "^16.0.0"
|
|
27
|
-
},
|
|
28
25
|
"dependencies": {
|
|
29
26
|
"@babel/core": "^7.26.10",
|
|
30
27
|
"@babel/preset-env": "^7.26.9",
|
|
@@ -97,7 +94,7 @@
|
|
|
97
94
|
"immutable": "^5.1.5",
|
|
98
95
|
"js-cookie": "^3.0.5",
|
|
99
96
|
"js-yaml": "^4.1.0",
|
|
100
|
-
"jsdom": "^
|
|
97
|
+
"jsdom": "^16.2.2",
|
|
101
98
|
"lodash": "^4.17.19",
|
|
102
99
|
"lz-string": "^1.4.4",
|
|
103
100
|
"markdown-it": "^12.0.0",
|
|
@@ -139,7 +136,7 @@
|
|
|
139
136
|
"redux-persist": "^6.0.0",
|
|
140
137
|
"redux-thunk": "^2.4.1",
|
|
141
138
|
"sanitize-html": "^2.7.0",
|
|
142
|
-
"sass": "1.
|
|
139
|
+
"sass": "^1.49.9",
|
|
143
140
|
"simple-oauth2": "^4.1.0",
|
|
144
141
|
"slick-carousel": "^1.8.1",
|
|
145
142
|
"smoothscroll-polyfill": "^0.4.4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"staticJsonFilesBuildTime":[],"lastBuild":
|
|
1
|
+
{ "staticJsonFilesBuildTime": [], "lastBuild": 1740420798753 }
|