sequoia-cli 0.5.2 → 0.5.4
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/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -102862,7 +102862,7 @@ function parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
|
|
|
102862
102862
|
|
|
102863
102863
|
// src/lib/markdown.ts
|
|
102864
102864
|
function parseFrontmatter(content, mapping) {
|
|
102865
|
-
const frontmatterRegex = /^(---|\+\+\+|\*\*\*)\n([\s\S]*?)\n\1\n([\s\S]*)$/;
|
|
102865
|
+
const frontmatterRegex = /^(---|\+\+\+|\*\*\*)\r?\n([\s\S]*?)\r?\n\1\r?\n([\s\S]*)$/;
|
|
102866
102866
|
const match2 = content.match(frontmatterRegex);
|
|
102867
102867
|
if (!match2) {
|
|
102868
102868
|
throw new Error("Could not parse frontmatter");
|
|
@@ -102977,8 +102977,8 @@ function resolvePostPath(post, pathPrefix, pathTemplate) {
|
|
|
102977
102977
|
if (pathTemplate) {
|
|
102978
102978
|
return resolvePathTemplate(pathTemplate, post);
|
|
102979
102979
|
}
|
|
102980
|
-
const prefix = pathPrefix
|
|
102981
|
-
return `${prefix}/${post.slug}`;
|
|
102980
|
+
const prefix = pathPrefix ?? "/posts";
|
|
102981
|
+
return prefix ? `${prefix}/${post.slug}` : `/${post.slug}`;
|
|
102982
102982
|
}
|
|
102983
102983
|
async function getContentHash(content) {
|
|
102984
102984
|
const encoder = new TextEncoder;
|
|
@@ -104302,7 +104302,7 @@ var initCommand = import_cmd_ts3.command({
|
|
|
104302
104302
|
imagesDir: siteConfig.imagesDir || undefined,
|
|
104303
104303
|
publicDir: siteConfig.publicDir || "./public",
|
|
104304
104304
|
outputDir: siteConfig.outputDir || "./dist",
|
|
104305
|
-
pathPrefix: siteConfig.pathPrefix
|
|
104305
|
+
pathPrefix: siteConfig.pathPrefix ?? "/posts",
|
|
104306
104306
|
publicationUri,
|
|
104307
104307
|
pdsUrl,
|
|
104308
104308
|
frontmatter: frontmatterMapping,
|
|
@@ -105258,7 +105258,7 @@ async function updateConfigFlow(config, configPath) {
|
|
|
105258
105258
|
const configSummary = [
|
|
105259
105259
|
`Site URL: ${config.siteUrl}`,
|
|
105260
105260
|
`Content Dir: ${config.contentDir}`,
|
|
105261
|
-
`Path Prefix: ${config.pathPrefix
|
|
105261
|
+
`Path Prefix: ${config.pathPrefix ?? "/posts"}`,
|
|
105262
105262
|
`Publication URI: ${config.publicationUri}`,
|
|
105263
105263
|
config.imagesDir ? `Images Dir: ${config.imagesDir}` : null,
|
|
105264
105264
|
config.outputDir ? `Output Dir: ${config.outputDir}` : null,
|
|
@@ -105359,12 +105359,12 @@ async function editSiteSettings(config) {
|
|
|
105359
105359
|
}));
|
|
105360
105360
|
const pathPrefix = exitOnCancel(await Qt({
|
|
105361
105361
|
message: "URL path prefix for posts:",
|
|
105362
|
-
initialValue: config.pathPrefix
|
|
105362
|
+
initialValue: config.pathPrefix ?? "/posts"
|
|
105363
105363
|
}));
|
|
105364
105364
|
return {
|
|
105365
105365
|
...config,
|
|
105366
105366
|
siteUrl,
|
|
105367
|
-
pathPrefix
|
|
105367
|
+
pathPrefix
|
|
105368
105368
|
};
|
|
105369
105369
|
}
|
|
105370
105370
|
async function editDirectories(config) {
|
|
@@ -105684,7 +105684,7 @@ Publish evergreen content to the ATmosphere
|
|
|
105684
105684
|
|
|
105685
105685
|
> https://tangled.org/stevedylan.dev/sequoia
|
|
105686
105686
|
`,
|
|
105687
|
-
version: "0.5.
|
|
105687
|
+
version: "0.5.4",
|
|
105688
105688
|
cmds: {
|
|
105689
105689
|
add: addCommand,
|
|
105690
105690
|
auth: authCommand,
|