Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nzdjb/static-site-generator

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nzdjb/static-site-generator - npm Package Compare versions

Comparing version 0.6.5 to 0.7.0

13

CHANGELOG.md
# Changelog
## [0.7.0](https://github.com/nzdjb/static-site-generator/compare/v0.6.5...v0.7.0) (2024-04-21)
### Features
* Add support for reading articles from files. ([#384](https://github.com/nzdjb/static-site-generator/issues/384)) ([16a4d58](https://github.com/nzdjb/static-site-generator/commit/16a4d585a1349519b7c36e5864406fe94bac4713))
### Bug Fixes
* bump glob from 10.3.10 to 10.3.12 ([#368](https://github.com/nzdjb/static-site-generator/issues/368)) ([cd2e498](https://github.com/nzdjb/static-site-generator/commit/cd2e498aed036806d606962625ce50b71001f0af))
* bump sanitize-html from 2.12.1 to 2.13.0 ([#365](https://github.com/nzdjb/static-site-generator/issues/365)) ([c4c11d0](https://github.com/nzdjb/static-site-generator/commit/c4c11d0fd39e160c6663ebe2b4472183f5ac42c3))
## [0.6.5](https://github.com/nzdjb/static-site-generator/compare/v0.6.4...v0.6.5) (2024-03-19)

@@ -4,0 +17,0 @@

11

dist/src/article.d.ts

@@ -5,9 +5,15 @@ export interface Link {

}
export interface ArticleConfig {
interface ArticleBaseConfig {
title: string;
author?: string;
date: Date;
content: string;
published?: boolean;
}
interface ArticleStringConfig extends ArticleBaseConfig {
content: string;
}
interface ArticleFileConfig extends ArticleBaseConfig {
contentFile: string;
}
export type ArticleConfig = ArticleStringConfig | ArticleFileConfig;
export declare class Article {

@@ -22,2 +28,3 @@ readonly title: string;

}
export {};
//# sourceMappingURL=article.d.ts.map

29

dist/src/article.js

@@ -1,21 +0,21 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Article = void 0;
const marked_1 = require("marked");
const sanitize_html_1 = __importDefault(require("sanitize-html"));
import { marked } from 'marked';
import { readFileSync } from 'node:fs';
import sanitizeHTML from 'sanitize-html';
const sanitizerSettings = {
allowedTags: sanitize_html_1.default.defaults.allowedTags.concat(['img', 'h1']),
allowedTags: sanitizeHTML.defaults.allowedTags.concat(['img', 'h1']),
disallowedTagsMode: 'escape',
};
class Article {
export class Article {
title;
content;
author;
date;
published;
constructor(input) {
var _a;
this.title = input.title;
this.author = input.author;
this.date = input.date.toISOString().split('T')[0];
this.content = (0, sanitize_html_1.default)(marked_1.marked.parse(input.content, { async: false }), sanitizerSettings);
this.published = (_a = input.published) !== null && _a !== void 0 ? _a : true;
const content = "content" in input ? input.content : readFileSync(input.contentFile).toString();
this.content = sanitizeHTML(marked.parse(content, { async: false }), sanitizerSettings);
this.published = input.published ?? true;
}

@@ -26,3 +26,2 @@ compareDate(other) {

}
exports.Article = Article;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJ0aWNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hcnRpY2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLG1DQUFnQztBQUNoQyxrRUFBeUM7QUFFekMsTUFBTSxpQkFBaUIsR0FBMEI7SUFDL0MsV0FBVyxFQUFFLHVCQUFZLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxLQUFLLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDcEUsa0JBQWtCLEVBQUUsUUFBUTtDQUM3QixDQUFDO0FBZUYsTUFBYSxPQUFPO0lBT2xCLFlBQVksS0FBb0I7O1FBQzlCLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQztRQUN6QixJQUFJLENBQUMsTUFBTSxHQUFHLEtBQUssQ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NvbnRlbnQgPSBzYW5pdGl6ZUhUTUwoXG4gICAgICBtYXJrZWQucGFyc2UoY29udGVudCwgeyBhc3luYzogZmFsc2UgfSkgYXMgc3RyaW5nLFxuICAgICAgc2FuaXRpemVyU2V0dGluZ3NcbiAgICApO1xuICAgIHRoaXMucHVibGlzaGVkID0gaW5wdXQucHVibGlzaGVkID8/IHRydWU7XG4gIH1cblxuICBjb21wYXJlRGF0ZShvdGhlcjogQXJ0aWNsZSk6IG51bWJlciB7XG4gICAgcmV0dXJuIHRoaXMuZGF0ZSA9PT0gb3RoZXIuZGF0ZSA/IDAgOiB0aGlzLmRhdGUgPiBvdGhlci5kYXRlID8gMSA6IC0xO1xuICB9XG59XG4iXX0=

@@ -1,2 +0,2 @@

import { Article } from './article';
import { Article } from './article.js';
export declare class Config {

@@ -3,0 +3,0 @@ readonly articles: Article[];

@@ -1,49 +0,20 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Config = void 0;
const article_1 = require("./article");
const fs_1 = require("fs");
const toml_1 = __importDefault(require("@iarna/toml"));
const path = __importStar(require("path"));
const glob_1 = require("glob");
class Config {
import { Article } from './article.js';
import { readFileSync, lstatSync } from 'fs';
import toml from '@iarna/toml';
import * as path from 'path';
import { globSync } from 'glob';
export class Config {
articles;
constructor(configPaths) {
const configPathList = [...new Set(this.resolveConfigPaths(configPaths))];
const config = configPathList.map((file => (0, fs_1.readFileSync)(file).toString())).join('\n');
this.articles = toml_1.default.parse(config).articles.map(article => new article_1.Article(article));
const config = configPathList.map((file => readFileSync(file).toString())).join('\n');
this.articles = toml.parse(config).articles.map(article => new Article(article));
}
resolveConfigPaths(configPaths) {
return configPaths.flatMap((configPath) => {
const configPathStat = (0, fs_1.lstatSync)(configPath);
return configPathStat.isDirectory() ? (0, glob_1.globSync)(path.join(configPath, '**', '*.toml')) : [configPath];
const configPathStat = lstatSync(configPath);
return configPathStat.isDirectory() ? globSync(path.join(configPath, '**', '*.toml')) : [configPath];
});
}
}
exports.Config = Config;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHVDQUF3RDtBQUN4RCwyQkFBNkM7QUFDN0MsdURBQStCO0FBQy9CLDJDQUE2QjtBQUM3QiwrQkFBZ0M7QUFFaEMsTUFBYSxNQUFNO0lBR2pCLFlBQVksV0FBcUI7UUFDL0IsTUFBTSxjQUFjLEdBQUcsQ0FBQyxHQUFHLElBQUksR0FBRyxDQUFDLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDMUUsTUFBTSxNQUFNLEdBQUcsY0FBYyxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQU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ZUNvbmZpZ1BhdGhzKGNvbmZpZ1BhdGhzOiBzdHJpbmdbXSk6IHN0cmluZ1tdIHtcbiAgICByZXR1cm4gY29uZmlnUGF0aHMuZmxhdE1hcCgoY29uZmlnUGF0aCkgPT4ge1xuICAgICAgY29uc3QgY29uZmlnUGF0aFN0YXQgPSBsc3RhdFN5bmMoY29uZmlnUGF0aCk7XG4gICAgICByZXR1cm4gY29uZmlnUGF0aFN0YXQuaXNEaXJlY3RvcnkoKSA/IGdsb2JTeW5jKHBhdGguam9pbihjb25maWdQYXRoLCAnKionLCAnKi50b21sJykpIDogW2NvbmZpZ1BhdGhdO1xuICAgIH0pO1xuICB9XG59XG4iXX0=
#!/usr/bin/env node
import { type Article } from './article';
import { type Article } from './article.js';
export declare function renderIndex(template: string, articles: Article[]): string;
//# sourceMappingURL=index.d.ts.map
#!/usr/bin/env node
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderIndex = void 0;
const handlebars_1 = __importDefault(require("handlebars"));
const fs_1 = require("fs");
const ts_command_line_args_1 = require("ts-command-line-args");
const config_1 = require("./config");
function renderIndex(template, articles) {
import Handlebars from 'handlebars';
import { readFileSync, writeFileSync } from 'fs';
import { parse } from 'ts-command-line-args';
import { Config } from './config.js';
import esMain from 'es-main';
export function renderIndex(template, articles) {
articles = articles.filter((a) => a.published);
articles.sort((a, b) => a.compareDate(b));
articles.reverse();
return handlebars_1.default.compile(template)({ articles });
return Handlebars.compile(template)({ articles });
}
exports.renderIndex = renderIndex;
if (require.main === module) {
const args = (0, ts_command_line_args_1.parse)({
if (esMain(import.meta)) {
const args = parse({
config: { type: String, optional: true, multiple: true, description: 'Path to config file or directory of config files. Default: articles' },

@@ -29,7 +22,7 @@ indexTemplate: { type: String, optional: true, description: 'Path to index template file. Default: templates/index.hb.html' },

});
const config = new config_1.Config([(_a = args.config) !== null && _a !== void 0 ? _a : 'articles'].flat());
const template = (0, fs_1.readFileSync)((_b = args.indexTemplate) !== null && _b !== void 0 ? _b : 'templates/index.hb.html').toString();
const config = new Config([args.config ?? 'articles'].flat());
const template = readFileSync(args.indexTemplate ?? 'templates/index.hb.html').toString();
const index = renderIndex(template, config.articles);
if (args.outFile !== undefined) {
(0, fs_1.writeFileSync)(args.outFile, index);
writeFileSync(args.outFile, index);
}

@@ -40,2 +33,2 @@ else {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFDQSw0REFBb0M7QUFDcEMsMkJBQWlEO0FBQ2pELCtEQUE2QztBQUM3QyxxQ0FBa0M7QUFHbEMsU0FBZ0IsV0FBVyxDQUFDLFFBQWdCLEVBQUUsUUFBbUI7SUFDL0QsUUFBUSxHQUFHLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUMvQyxRQUFRLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBVSxFQUFFLENBQVUsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQzVELFFBQVEsQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUNuQixPQUFPLG9CQUFVLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQztBQUNwRCxDQUFDO0FBTEQsa0NBS0M7QUFTRCxJQUFJLE9BQU8sQ0FBQyxJQUFJLEtBQUssTUFBTSxFQUFFLENBQUM7SUFDNUIsTUFBTSxJQUFJLEdBQUcsSUFBQSw0Q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7XG4gIH0gZWxzZSB7XG4gICAgY29uc29sZS5sb2coaW5kZXgpO1xuICB9XG59XG4iXX0=
{
"name": "@nzdjb/static-site-generator",
"version": "0.6.5",
"version": "0.7.0",
"description": "Static site generator.",

@@ -9,5 +9,6 @@ "main": "dist/src/index.js",

"license": "MIT",
"type": "module",
"scripts": {
"build": "tsc",
"test": "jest",
"test": "node --test",
"lint": "eslint src test"

@@ -17,3 +18,2 @@ },

"@types/glob": "^8.1.0",
"@types/jest": "^29.2.4",
"@types/marked": "^6.0.0",

@@ -24,3 +24,2 @@ "@types/node": "^20.1.0",

"esbuild": "^0.20.0",
"esbuild-jest": "^0.5.0",
"eslint": "^8.0.1",

@@ -30,8 +29,5 @@ "eslint-config-prettier": "^9.0.0",

"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jest-extended": "^2.0.0",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.0.0",
"jest": "^29.3.1",
"jest-extended": "^4.0.1",
"prettier": "^3.0.0",

@@ -43,2 +39,3 @@ "typescript": "*"

"@iarna/toml": "^2.2.5",
"es-main": "^1.3.0",
"glob": "^10.2.7",

@@ -45,0 +42,0 @@ "handlebars": "^4.7.7",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc