s1seven / schema-tools

Tools to create, validate and render certificates using Material Identity JSON schemas
https://materialidentity.org/
Apache License 2.0
1 stars 1 forks source link

fix: move getPartials to generate-html to fix missing dependency #182

Closed eamon0989 closed 1 year ago

eamon0989 commented 1 year ago

Description

handlebars is a dependency of @s1seven/schema-tools-utils, but it was not listed as a dependency. As @s1seven/schema-tools-utils is a dependency of @s1seven/schema-tools-generate-pdf, when trying to generate a PDF using Node-Red, it threw Error: Cannot find module 'handlebars'.

It appears that Lerna handled the dependency when using schema-tools locally, but when generate-pdf is used in a project where handlebars is not already present, it breaks.

Instead of adding handlebars as a dependency, this PR moves the function getPartials from utils to generate-html.

Updates all the URLS in fixtures to use schemas.s1seven.dev instead of schemas.s1seven.com.

Adds a handlebars alias to the webpack config in karma.conf.js to remove webpack errors based on the issue found here: https://github.com/handlebars-lang/handlebars.js/issues/953

Fixes s1seven/node-red-monorepo#4

Type of change

Checklist:

nx-cloud[bot] commented 1 year ago

Nx Cloud Report

CI is running for commit 690b0df48323d6a60e7d3351a3fcf9e580a147ab.

📂 Click to track the progress, see the status, the terminal output, and the build insights.


Sent with 💌 from NxCloud.

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

73.1% 73.1% Coverage
0.7% 0.7% Duplication