@kausal/themes 0.8.1 → 0.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kausal/themes",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Themes for Kausal products",
5
5
  "type": "module",
6
6
  "main": "setup.cjs",
package/props.js CHANGED
@@ -192,9 +192,19 @@ export function makeThemePropType(cssv = null) {
192
192
  categoryPageHideCategoryLabel: bool,
193
193
  }),
194
194
  hiddenLocales: arrayOf(string),
195
- fundingInstruments: array.isRequired,
195
+ fundingInstruments: arrayOf(exact({
196
+ id: string,
197
+ name: string,
198
+ logo: string,
199
+ link: string,
200
+ })).isRequired,
196
201
  leftAlignCategoryPages: bool,
197
- otherLogos: array.isRequired,
202
+ otherLogos: arrayOf(exact({
203
+ id: string,
204
+ name: string,
205
+ logo: string,
206
+ link: string,
207
+ })).isRequired,
198
208
  attentionBannerContent: object,
199
209
  footerLogoOnly: bool,
200
210
  footerStatement: string,
package/setup.cjs CHANGED
@@ -22,7 +22,10 @@ function generateThemeSymlinks(destPath, opts) {
22
22
  const themesPath = path.join(__dirname, 'dist', 'themes');
23
23
  const statRes = fs.lstatSync(destPath, { throwIfNoEntry: false });
24
24
  if (statRes) {
25
- if (!statRes.isSymbolicLink()) {
25
+ if (statRes.isDirectory()) {
26
+ fs.rmdirSync(destPath);
27
+ } else if (!statRes.isSymbolicLink()) {
28
+ console.error(statRes);
26
29
  throw new Error(`${destPath} already exists and is not a symlink`);
27
30
  }
28
31
  const existingTarget = fs.readlinkSync(destPath);
package/types.ts CHANGED
@@ -178,7 +178,10 @@ export interface Theme {
178
178
  };
179
179
  hiddenLocales?: string[];
180
180
  fundingInstruments: {
181
+ id: string;
182
+ name: string;
181
183
  logo: string;
184
+ link: string;
182
185
  }[];
183
186
  leftAlignCategoryPages?: boolean;
184
187
  otherLogos: {