Socket
Socket
Sign inDemoInstall

ssg-api

Package Overview
Dependencies
111
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.2 to 1.6.3

2

dist/src/DefaultLogger.d.ts

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

import { Logger } from "./Logger";
import { Logger } from "./Logger.js";
export interface LogConsole {

@@ -3,0 +3,0 @@ log(...data: any[]): void;

@@ -1,3 +0,3 @@

import { SsgContext } from "./SsgContext";
import { HtmlSsgFile } from './util';
import { SsgContext } from "./SsgContext.js";
import { HtmlSsgFile } from './util/index.js';
export interface HtmlSsgContext<V = any> extends SsgContext<V> {

@@ -4,0 +4,0 @@ inputFile: HtmlSsgFile;

@@ -1,4 +0,4 @@

import { SsgContext } from "./SsgContext";
import { SsgStep } from './step';
import { SsgFile } from './util';
import { SsgContext } from "./SsgContext.js";
import { SsgStep } from './step/index.js';
import { SsgFile } from './util/index.js';
export type SsgConfig = {

@@ -5,0 +5,0 @@ outDir: string;

@@ -1,3 +0,3 @@

import { SsgFile } from "./util";
import { Logger } from "./Logger";
import { SsgFile } from "./util/index.js";
import { Logger } from "./Logger.js";
export interface SsgContext<V = any> extends Logger {

@@ -4,0 +4,0 @@ /**

@@ -1,4 +0,4 @@

import { SsgFile } from "./util";
import { SsgContext } from "./SsgContext";
import { Logger } from "./Logger";
import { SsgFile } from "./util/index.js";
import { SsgContext } from "./SsgContext.js";
import { Logger } from "./Logger.js";
export declare class SsgContextImpl<V = any> implements SsgContext<V> {

@@ -5,0 +5,0 @@ readonly locale: string;

@@ -1,6 +0,5 @@

import { SsgFile } from "./util";
import { ObjectUtil } from "./util/ObjectUtil";
import { DefaultLogger } from "./DefaultLogger";
import { SsgFile, HtmlSsgFile } from "./util/index.js";
import { ObjectUtil } from "./util/ObjectUtil.js";
import { DefaultLogger } from "./DefaultLogger.js";
import path from "path";
import { HtmlSsgFile } from "./util";
export class SsgContextImpl {

@@ -7,0 +6,0 @@ constructor(locale, vars = new Map(), name = SsgContextImpl.DEFAULT_NAME, logger = new DefaultLogger(name), currentFile = undefined) {

@@ -1,6 +0,6 @@

import { SsgStep } from "../SsgStep";
import { SsgContext } from "../../SsgContext";
import { OutputFunc } from "../../Ssg";
import { ReplaceCommand } from './replace';
import { SsgFile } from '../../util';
import { SsgStep } from "../SsgStep.js";
import { SsgContext } from "../../SsgContext.js";
import { OutputFunc } from "../../Ssg.js";
import { ReplaceCommand } from './replace/index.js';
import { SsgFile } from '../../util/index.js';
export type ContentStepConfig<C extends SsgContext = SsgContext> = {

@@ -7,0 +7,0 @@ /**

@@ -0,4 +1,4 @@

import { HtmlSsgFile } from '../../util/index.js';
import fs from "fs";
import { promise as glob } from "glob-promise";
import { HtmlSsgFile } from "../../util";
import fs from "fs";
/**

@@ -5,0 +5,0 @@ * A SsgStep that can perform replacements in files' contents.

@@ -1,4 +0,4 @@

import { RegexReplacer } from "../RegexReplacer";
import { RegexReplaceCommand } from "../RegexReplaceCommand";
import { HtmlSsgContext } from "../../../../HtmlSsgContext";
import { RegexReplacer } from "../RegexReplacer.js";
import { RegexReplaceCommand } from "../RegexReplaceCommand.js";
import { HtmlSsgContext } from "../../../../HtmlSsgContext.js";
export declare class AngularExpressionReplaceCommand extends RegexReplaceCommand<HtmlSsgContext> {

@@ -5,0 +5,0 @@ constructor();

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

import { RegexReplaceCommand } from "../RegexReplaceCommand";
import { RegexReplaceCommand } from "../RegexReplaceCommand.js";
export class AngularExpressionReplaceCommand extends RegexReplaceCommand {

@@ -3,0 +3,0 @@ constructor() {

@@ -1,5 +0,5 @@

import { ReplaceCommand } from "./ReplaceCommand";
import { SsgFile } from '../../../util';
import { HtmlSsgContext } from "../../../HtmlSsgContext";
import { DomReplacer } from "./DomReplacer";
import { ReplaceCommand } from "./ReplaceCommand.js";
import { SsgFile } from '../../../util/index.js';
import { HtmlSsgContext } from "../../../HtmlSsgContext.js";
import { DomReplacer } from "./DomReplacer.js";
export declare abstract class DomReplaceCommand<T extends HTMLElement = HTMLElement, C extends HtmlSsgContext = HtmlSsgContext> implements ReplaceCommand<C> {

@@ -6,0 +6,0 @@ protected selector: string;

@@ -1,4 +0,4 @@

import { ReplaceCommand } from "../ReplaceCommand";
import { SsgFile } from '../../../../util';
import { SsgContext } from "../../../../SsgContext";
import { ReplaceCommand } from "../ReplaceCommand.js";
import { SsgFile } from '../../../../util/index.js';
import { SsgContext } from "../../../../SsgContext.js";
export declare abstract class HtAccessReplaceCommand implements ReplaceCommand<SsgContext> {

@@ -5,0 +5,0 @@ execute(context: SsgContext): Promise<SsgFile>;

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

import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand";
import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand.js";
export declare class HtAccessToNetlifyConfigReplaceCommand extends HtAccessReplaceCommand {

@@ -3,0 +3,0 @@ protected host: string;

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

import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand";
import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand.js";
export class HtAccessToNetlifyConfigReplaceCommand extends HtAccessReplaceCommand {

@@ -3,0 +3,0 @@ constructor(host) {

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

import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand";
import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand.js";
export declare class HtAccessToNetlifyRedirectsReplaceCommand extends HtAccessReplaceCommand {

@@ -3,0 +3,0 @@ protected host: string;

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

import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand";
import { HtAccessReplaceCommand } from "./HtAccessReplaceCommand.js";
export class HtAccessToNetlifyRedirectsReplaceCommand extends HtAccessReplaceCommand {

@@ -3,0 +3,0 @@ constructor(host) {

@@ -1,5 +0,5 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { ReplacerFactory } from "../../ReplacerFactory";
import { RegexReplacer } from "../../RegexReplacer";
import { SsgContext } from "../../../../../SsgContext";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { ReplacerFactory } from "../../ReplacerFactory.js";
import { RegexReplacer } from "../../RegexReplacer.js";
import { SsgContext } from "../../../../../SsgContext.js";
/**

@@ -6,0 +6,0 @@ * @deprecated Can't work tags with regexes. Use ClassReplaceCommand

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

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
/**

@@ -3,0 +3,0 @@ * @deprecated Can't work tags with regexes. Use ClassReplaceCommand

@@ -1,5 +0,5 @@

import { ReplacerFactory } from "../../ReplacerFactory";
import { DomReplaceCommand } from "../../DomReplaceCommand";
import { DomReplacer } from "../../DomReplacer";
import { HtmlSsgContext } from "../../../../../HtmlSsgContext";
import { ReplacerFactory } from "../../ReplacerFactory.js";
import { DomReplaceCommand } from "../../DomReplaceCommand.js";
import { DomReplacer } from "../../DomReplacer.js";
import { HtmlSsgContext } from "../../../../../HtmlSsgContext.js";
/**

@@ -6,0 +6,0 @@ * A replacer that looks for a class in tags.

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

import { DomReplaceCommand } from "../../DomReplaceCommand";
import { DomReplaceCommand } from "../../DomReplaceCommand.js";
/**

@@ -3,0 +3,0 @@ * A replacer that looks for a class in tags.

@@ -1,5 +0,5 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplacer } from "../../RegexReplacer";
import { HtmlSsgContext } from "../../../../../HtmlSsgContext";
import { StringContextHandler } from "../StringContextHandler";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { RegexReplacer } from "../../RegexReplacer.js";
import { HtmlSsgContext } from "../../../../../HtmlSsgContext.js";
import { StringContextHandler } from "../StringContextHandler.js";
/**

@@ -6,0 +6,0 @@ * Replaces SSI's <!-- #echo var="someVar" --> by someVar's value.

@@ -1,3 +0,3 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { VarRegexReplacer } from "../VarRegexReplacer";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { VarRegexReplacer } from "../VarRegexReplacer.js";
/**

@@ -4,0 +4,0 @@ * Replaces SSI's <!-- #echo var="someVar" --> by someVar's value.

@@ -1,4 +0,4 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplacer } from "../../RegexReplacer";
import { SsgContext } from "../../../../../SsgContext";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { RegexReplacer } from "../../RegexReplacer.js";
import { SsgContext } from "../../../../../SsgContext.js";
export declare class SsiIfReplaceCommand extends RegexReplaceCommand {

@@ -5,0 +5,0 @@ protected readonly replacer: {

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

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
export class SsiIfReplaceCommand extends RegexReplaceCommand {

@@ -3,0 +3,0 @@ constructor() {

@@ -1,4 +0,4 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplacer } from "../../RegexReplacer";
import { SsgContext } from "../../../../../SsgContext";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { RegexReplacer } from "../../RegexReplacer.js";
import { SsgContext } from "../../../../../SsgContext.js";
/**

@@ -5,0 +5,0 @@ * Replaces SSI's `<!-- #include virtual="myFileName" -->` by fileName's contents.

import path from "path";
import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { SsgFile } from "../../../../../util";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { SsgFile } from "../../../../../util/index.js";
/**

@@ -5,0 +5,0 @@ * Replaces SSI's `<!-- #include virtual="myFileName" -->` by fileName's contents.

@@ -1,4 +0,4 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplacer } from "../../RegexReplacer";
import { SsgContext } from "../../../../../SsgContext";
import { RegexReplaceCommand } from '../../RegexReplaceCommand.js';
import { RegexReplacer } from '../../RegexReplacer.js';
import { SsgContext } from '../../../../../SsgContext.js';
export declare class SsiLastModifiedReplaceCommand extends RegexReplaceCommand {

@@ -5,0 +5,0 @@ protected options: Intl.DateTimeFormatOptions;

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

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplaceCommand } from '../../RegexReplaceCommand.js';
export class SsiLastModifiedReplaceCommand extends RegexReplaceCommand {

@@ -3,0 +3,0 @@ constructor(options) {

@@ -1,4 +0,4 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplaceCallback, RegexReplacer } from "../../RegexReplacer";
import { SsgContext } from "../../../../../SsgContext";
import { RegexReplaceCommand } from '../../RegexReplaceCommand.js';
import { RegexReplaceCallback, RegexReplacer } from '../../RegexReplacer.js';
import { SsgContext } from '../../../../../SsgContext.js';
/**

@@ -5,0 +5,0 @@ * A Regex replace command that looks for SSI variable settings

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

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplaceCommand } from '../../RegexReplaceCommand.js';
/**

@@ -13,3 +13,3 @@ * A Regex replace command that looks for SSI variable settings

constructor(varName, ssiVarReplacer) {
super(new RegExp(`<!--\\s*#set\\s+var="${varName}"\\s+value="(.+?)"\\s*-->`, "gs"));
super(new RegExp(`<!--\\s*#set\\s+var="${varName}"\\s+value="(.+?)"\\s*-->`, 'gs'));
this.replacer = { replace: ssiVarReplacer };

@@ -16,0 +16,0 @@ }

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

import { SsgContext } from "../../../../SsgContext";
import { SsgContext } from "../../../../SsgContext.js";
/**

@@ -3,0 +3,0 @@ * @returns a string or undefined, depending on context.

@@ -1,5 +0,5 @@

import { RegexReplaceCommand } from "../RegexReplaceCommand";
import { RegexReplacer } from "../RegexReplacer";
import { StringContextHandler } from "./StringContextHandler";
import { SsgContext } from "../../../../SsgContext";
import { RegexReplaceCommand } from "../RegexReplaceCommand.js";
import { RegexReplacer } from "../RegexReplacer.js";
import { StringContextHandler } from "./StringContextHandler.js";
import { SsgContext } from "../../../../SsgContext.js";
export declare class StringEchoVarReplaceCommand<V = any, C extends SsgContext = SsgContext<V>> extends RegexReplaceCommand<V, C> {

@@ -6,0 +6,0 @@ protected varName: string;

@@ -1,3 +0,3 @@

import { RegexReplaceCommand } from "../RegexReplaceCommand";
import { VarRegexReplacer } from "./VarRegexReplacer";
import { RegexReplaceCommand } from "../RegexReplaceCommand.js";
import { VarRegexReplacer } from "./VarRegexReplacer.js";
export class StringEchoVarReplaceCommand extends RegexReplaceCommand {

@@ -4,0 +4,0 @@ constructor(varName, defaultHandlers = []) {

@@ -1,5 +0,5 @@

import { ReplacerFactory } from "../../ReplacerFactory";
import { DomReplaceCommand } from "../../DomReplaceCommand";
import { DomReplacer } from "../../DomReplacer";
import { HtmlSsgContext } from "../../../../../HtmlSsgContext";
import { ReplacerFactory } from "../../ReplacerFactory.js";
import { DomReplaceCommand } from "../../DomReplaceCommand.js";
import { DomReplacer } from "../../DomReplacer.js";
import { HtmlSsgContext } from "../../../../../HtmlSsgContext.js";
/**

@@ -6,0 +6,0 @@ * Command to replace HTML tags by name.

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

import { DomReplaceCommand } from "../../DomReplaceCommand";
import { DomReplaceCommand } from "../../DomReplaceCommand.js";
/**

@@ -3,0 +3,0 @@ * Command to replace HTML tags by name.

@@ -1,5 +0,5 @@

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { ReplacerFactory } from "../../ReplacerFactory";
import { RegexReplacer } from "../../RegexReplacer";
import { SsgContext } from "../../../../../SsgContext";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
import { ReplacerFactory } from "../../ReplacerFactory.js";
import { RegexReplacer } from "../../RegexReplacer.js";
import { SsgContext } from "../../../../../SsgContext.js";
/**

@@ -6,0 +6,0 @@ * A command that will replace tag expressions (`<tag-name>content</tag-name>`).

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

import { RegexReplaceCommand } from "../../RegexReplaceCommand";
import { RegexReplaceCommand } from "../../RegexReplaceCommand.js";
/**

@@ -3,0 +3,0 @@ * A command that will replace tag expressions (`<tag-name>content</tag-name>`).

@@ -1,4 +0,4 @@

import { RegexReplacer } from "../RegexReplacer";
import { StringContextHandler } from "./StringContextHandler";
import { SsgContext } from "../../../../SsgContext";
import { RegexReplacer } from "../RegexReplacer.js";
import { StringContextHandler } from "./StringContextHandler.js";
import { SsgContext } from "../../../../SsgContext.js";
export declare class VarRegexReplacer<V = any, C extends SsgContext = SsgContext> implements RegexReplacer {

@@ -5,0 +5,0 @@ protected context: C;

@@ -1,5 +0,5 @@

import { RegexReplacer } from "./RegexReplacer";
import { ReplaceCommand } from "./ReplaceCommand";
import { SsgFile } from "../../../util/file/SsgFile";
import { SsgContext } from "../../../SsgContext";
import { RegexReplacer } from "./RegexReplacer.js";
import { ReplaceCommand } from "./ReplaceCommand.js";
import { SsgFile } from "../../../util/file/SsgFile.js";
import { SsgContext } from "../../../SsgContext.js";
/**

@@ -6,0 +6,0 @@ * A command that performs replacements using a Regular Expression.

@@ -1,3 +0,3 @@

import { SsgFile } from '../../../util';
import { SsgContext } from "../../../SsgContext";
import { SsgFile } from '../../../util/index.js';
import { SsgContext } from "../../../SsgContext.js";
export interface ReplaceCommand<C extends SsgContext> {

@@ -4,0 +4,0 @@ /**

@@ -1,4 +0,4 @@

import { SsgContext } from "../../../SsgContext";
import { SsgContext } from "../../../SsgContext.js";
export interface ReplacerFactory<R> {
create(context: SsgContext): Promise<R>;
}

@@ -1,4 +0,4 @@

import { SsgStep } from './SsgStep';
import { SsgConfig } from '../Ssg';
import { SsgContext } from '../SsgContext';
import { SsgStep } from './SsgStep.js';
import { SsgConfig } from '../Ssg.js';
import { SsgContext } from '../SsgContext.js';
import { IOptions } from 'glob';

@@ -5,0 +5,0 @@ export type CopyStepResult = {

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

import { FileUtil } from '../util';
import { FileUtil } from '../util/index.js';
import * as process from 'process';

@@ -3,0 +3,0 @@ /**

@@ -1,4 +0,4 @@

import { SsgStep } from "./SsgStep";
import { SsgConfig } from "../Ssg";
import { SsgContext } from "../SsgContext";
import { SsgStep } from "./SsgStep.js";
import { SsgConfig } from "../Ssg.js";
import { SsgContext } from "../SsgContext.js";
export interface DirectoryResult {

@@ -5,0 +5,0 @@ directoryCount: number;

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

import { FileUtil } from "../util";
import { FileUtil } from "../util/index.js";
/**

@@ -3,0 +3,0 @@ * A step to enrich a template from some subdirectories processing.

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

import { SsgContext } from "../SsgContext";
import { SsgContext } from "../SsgContext.js";
export interface SsgStep<C extends SsgContext = SsgContext, R = any> {

@@ -3,0 +3,0 @@ readonly name?: string;

/// <reference types="node" />
import { SsgContext } from "../../SsgContext";
import { SsgFile, SsgFileLang } from "./SsgFile";
import { SsgContext } from "../../SsgContext.js";
import { SsgFile, SsgFileLang } from "./SsgFile.js";
import { JSDOM } from "jsdom";

@@ -5,0 +5,0 @@ export type HtmlMeta = {

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

import { SsgFile } from "./SsgFile";
import { SsgFile } from "./SsgFile.js";
import { JSDOM } from "jsdom";

@@ -3,0 +3,0 @@ export var LinkType;

/// <reference types="node" />
import { SsgContext } from "../../SsgContext";
import { SsgContext } from "../../SsgContext.js";
/**

@@ -4,0 +4,0 @@ * Language info about a file.

import fs from "fs";
import { JSDOM } from "jsdom";
import { ObjectUtil } from "../ObjectUtil";
import { FileUtil } from "./FileUtil";
import { ObjectUtil } from "../ObjectUtil.js";
import { FileUtil } from "./FileUtil.js";
/**

@@ -6,0 +6,0 @@ * A file as handled by Ssg.

@@ -5,3 +5,3 @@ {

"author": "Jérôme Beau <javarome@gmail.com> (https://javarome.com)",
"version": "1.6.2",
"version": "1.6.3",
"description": "Static Site Generation TypeScript API",

@@ -8,0 +8,0 @@ "exports": "./dist/src/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc