@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
94 lines • 6.89 kB
JavaScript
;
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathDomain = exports.PathValidationError = exports.PathParseError = exports.PathError = exports.PATH_CONSTANTS = exports.PathType = exports.PathFactoryUtils = exports.PathBuilder = exports.SimplePathPool = exports.DefaultPathFactory = exports.PathFactoryImpl = exports.PathUtils = exports.Path = exports.PathParserUtils = exports.ConfigurablePathNormalizer = exports.DefaultFileExtensionChecker = exports.PathParsingNormalizer = exports.BasicPathNormalizer = exports.PathProcessorImpl = exports.PathComponentsUtils = exports.PathComponentsFactory = exports.LowHighImpl = exports.PathPositionsImpl = exports.PathComponentsImpl = void 0;
// Main interfaces and types
__exportStar(require("./type"), exports);
// Value objects
var pathcomponents_1 = require("./vo/pathcomponents");
Object.defineProperty(exports, "PathComponentsImpl", { enumerable: true, get: function () { return pathcomponents_1.PathComponentsImpl; } });
Object.defineProperty(exports, "PathPositionsImpl", { enumerable: true, get: function () { return pathcomponents_1.PathPositionsImpl; } });
Object.defineProperty(exports, "LowHighImpl", { enumerable: true, get: function () { return pathcomponents_1.LowHighImpl; } });
Object.defineProperty(exports, "PathComponentsFactory", { enumerable: true, get: function () { return pathcomponents_1.PathComponentsFactory; } });
Object.defineProperty(exports, "PathComponentsUtils", { enumerable: true, get: function () { return pathcomponents_1.PathComponentsUtils; } });
var pathparser_1 = require("./vo/pathparser");
Object.defineProperty(exports, "PathProcessorImpl", { enumerable: true, get: function () { return pathparser_1.PathProcessorImpl; } });
Object.defineProperty(exports, "BasicPathNormalizer", { enumerable: true, get: function () { return pathparser_1.BasicPathNormalizer; } });
Object.defineProperty(exports, "PathParsingNormalizer", { enumerable: true, get: function () { return pathparser_1.PathParsingNormalizer; } });
Object.defineProperty(exports, "DefaultFileExtensionChecker", { enumerable: true, get: function () { return pathparser_1.DefaultFileExtensionChecker; } });
Object.defineProperty(exports, "ConfigurablePathNormalizer", { enumerable: true, get: function () { return pathparser_1.ConfigurablePathNormalizer; } });
Object.defineProperty(exports, "PathParserUtils", { enumerable: true, get: function () { return pathparser_1.PathParserUtils; } });
// Entities
var path_1 = require("./entity/path");
Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return path_1.Path; } });
Object.defineProperty(exports, "PathUtils", { enumerable: true, get: function () { return path_1.PathUtils; } });
// Factories
var pathfactory_1 = require("./factory/pathfactory");
Object.defineProperty(exports, "PathFactoryImpl", { enumerable: true, get: function () { return pathfactory_1.PathFactoryImpl; } });
Object.defineProperty(exports, "DefaultPathFactory", { enumerable: true, get: function () { return pathfactory_1.DefaultPathFactory; } });
Object.defineProperty(exports, "SimplePathPool", { enumerable: true, get: function () { return pathfactory_1.SimplePathPool; } });
Object.defineProperty(exports, "PathBuilder", { enumerable: true, get: function () { return pathfactory_1.PathBuilder; } });
Object.defineProperty(exports, "PathFactoryUtils", { enumerable: true, get: function () { return pathfactory_1.PathFactoryUtils; } });
// Export enums
var type_1 = require("./type");
Object.defineProperty(exports, "PathType", { enumerable: true, get: function () { return type_1.PathType; } });
// Export constants
var type_2 = require("./type");
Object.defineProperty(exports, "PATH_CONSTANTS", { enumerable: true, get: function () { return type_2.PATH_CONSTANTS; } });
// Export error classes
var type_3 = require("./type");
Object.defineProperty(exports, "PathError", { enumerable: true, get: function () { return type_3.PathError; } });
Object.defineProperty(exports, "PathParseError", { enumerable: true, get: function () { return type_3.PathParseError; } });
Object.defineProperty(exports, "PathValidationError", { enumerable: true, get: function () { return type_3.PathValidationError; } });
// Import for utilities
const pathfactory_2 = require("./factory/pathfactory");
const pathparser_2 = require("./vo/pathparser");
const path_2 = require("./entity/path");
const pathparser_3 = require("./vo/pathparser");
const pathfactory_3 = require("./factory/pathfactory");
const pathfactory_4 = require("./factory/pathfactory");
const pathparser_4 = require("./vo/pathparser");
// Utility functions
exports.PathDomain = {
// Factory shortcuts
createContentPath: pathfactory_2.PathFactoryUtils.createContentPath,
createStaticPath: pathfactory_2.PathFactoryUtils.createStaticPath,
createLayoutPath: pathfactory_2.PathFactoryUtils.createLayoutPath,
createArchetypePath: pathfactory_2.PathFactoryUtils.createArchetypePath,
createDataPath: pathfactory_2.PathFactoryUtils.createDataPath,
createThemePath: pathfactory_2.PathFactoryUtils.createThemePath,
// Builder
builder: pathfactory_2.PathFactoryUtils.builder,
// Parser utilities
parseBasic: pathparser_2.PathParserUtils.parseBasic,
join: pathparser_2.PathParserUtils.join,
normalizeBasic: pathparser_2.PathParserUtils.normalizeBasic,
isBundle: pathparser_2.PathParserUtils.isBundle,
extractSection: pathparser_2.PathParserUtils.extractSection,
removeExtension: pathparser_2.PathParserUtils.removeExtension,
checkExtension: pathparser_2.PathParserUtils.hasExtension,
// Path utilities
hasSpecificExtension: path_2.PathUtils.hasExtension,
isUnder: path_2.PathUtils.isUnder,
relativeTo: path_2.PathUtils.relativeTo,
compare: path_2.PathUtils.compare,
// Create default instances
createProcessor: () => new pathparser_3.PathProcessorImpl(),
createFactory: () => new pathfactory_3.DefaultPathFactory(),
createPool: (maxSize) => new pathfactory_4.SimplePathPool(maxSize),
createNormalizer: (config) => new pathparser_4.BasicPathNormalizer(config?.toLowerCase, config?.replaceSpaces)
};
//# sourceMappingURL=index.js.map