@wordpress-flow/cli 1.2.10 → 1.2.11
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 +16 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78019,9 +78019,9 @@ var require_readdirp = __commonJS((exports, module) => {
|
|
|
78019
78019
|
async _formatEntry(dirent, path8) {
|
|
78020
78020
|
let entry;
|
|
78021
78021
|
try {
|
|
78022
|
-
const
|
|
78023
|
-
const fullPath = sysPath.resolve(sysPath.join(path8,
|
|
78024
|
-
entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename:
|
|
78022
|
+
const basename3 = this._isDirent ? dirent.name : dirent;
|
|
78023
|
+
const fullPath = sysPath.resolve(sysPath.join(path8, basename3));
|
|
78024
|
+
entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename: basename3 };
|
|
78025
78025
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
78026
78026
|
} catch (err) {
|
|
78027
78027
|
this._onError(err);
|
|
@@ -79944,16 +79944,16 @@ var require_nodefs_handler = __commonJS((exports, module) => {
|
|
|
79944
79944
|
_watchWithNodeFs(path8, listener) {
|
|
79945
79945
|
const opts = this.fsw.options;
|
|
79946
79946
|
const directory = sysPath.dirname(path8);
|
|
79947
|
-
const
|
|
79947
|
+
const basename3 = sysPath.basename(path8);
|
|
79948
79948
|
const parent = this.fsw._getWatchedDir(directory);
|
|
79949
|
-
parent.add(
|
|
79949
|
+
parent.add(basename3);
|
|
79950
79950
|
const absolutePath = sysPath.resolve(path8);
|
|
79951
79951
|
const options = { persistent: opts.persistent };
|
|
79952
79952
|
if (!listener)
|
|
79953
79953
|
listener = EMPTY_FN;
|
|
79954
79954
|
let closer;
|
|
79955
79955
|
if (opts.usePolling) {
|
|
79956
|
-
options.interval = opts.enableBinaryInterval && isBinaryPath(
|
|
79956
|
+
options.interval = opts.enableBinaryInterval && isBinaryPath(basename3) ? opts.binaryInterval : opts.interval;
|
|
79957
79957
|
closer = setFsWatchFileListener(path8, absolutePath, options, {
|
|
79958
79958
|
listener,
|
|
79959
79959
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -79972,10 +79972,10 @@ var require_nodefs_handler = __commonJS((exports, module) => {
|
|
|
79972
79972
|
return;
|
|
79973
79973
|
}
|
|
79974
79974
|
const dirname2 = sysPath.dirname(file);
|
|
79975
|
-
const
|
|
79975
|
+
const basename3 = sysPath.basename(file);
|
|
79976
79976
|
const parent = this.fsw._getWatchedDir(dirname2);
|
|
79977
79977
|
let prevStats = stats;
|
|
79978
|
-
if (parent.has(
|
|
79978
|
+
if (parent.has(basename3))
|
|
79979
79979
|
return;
|
|
79980
79980
|
const listener = async (path8, newStats) => {
|
|
79981
79981
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
|
|
@@ -79998,9 +79998,9 @@ var require_nodefs_handler = __commonJS((exports, module) => {
|
|
|
79998
79998
|
prevStats = newStats2;
|
|
79999
79999
|
}
|
|
80000
80000
|
} catch (error) {
|
|
80001
|
-
this.fsw._remove(dirname2,
|
|
80001
|
+
this.fsw._remove(dirname2, basename3);
|
|
80002
80002
|
}
|
|
80003
|
-
} else if (parent.has(
|
|
80003
|
+
} else if (parent.has(basename3)) {
|
|
80004
80004
|
const at2 = newStats.atimeMs;
|
|
80005
80005
|
const mt = newStats.mtimeMs;
|
|
80006
80006
|
if (!at2 || at2 <= mt || mt !== prevStats.mtimeMs) {
|
|
@@ -85709,7 +85709,7 @@ class PullCommand {
|
|
|
85709
85709
|
errors: []
|
|
85710
85710
|
};
|
|
85711
85711
|
try {
|
|
85712
|
-
const postTypes = options.postTypes || ["post", "page"];
|
|
85712
|
+
const postTypes = options.postTypes || config.sync.postTypes || ["post", "page"];
|
|
85713
85713
|
const outputDir = options.outputDir || config.paths.content;
|
|
85714
85714
|
fs3.mkdirSync(outputDir, { recursive: true });
|
|
85715
85715
|
let totalProcessed = 0;
|
|
@@ -85783,7 +85783,6 @@ class PullCommand {
|
|
|
85783
85783
|
const blocks = this.blockParser.parse(post.content.raw);
|
|
85784
85784
|
const frontmatter = {
|
|
85785
85785
|
title: post.title.rendered,
|
|
85786
|
-
slug: post.slug,
|
|
85787
85786
|
postId: post.id,
|
|
85788
85787
|
status: post.status
|
|
85789
85788
|
};
|
|
@@ -113220,13 +113219,14 @@ ${"=".repeat(80)}`);
|
|
|
113220
113219
|
`);
|
|
113221
113220
|
const pathParts = filePath2.split(path6.sep);
|
|
113222
113221
|
const postType = pathParts[pathParts.length - 2];
|
|
113222
|
+
const slug = path6.basename(filePath2, ".mdx");
|
|
113223
113223
|
const postData = {
|
|
113224
113224
|
title: { raw: mdxFile.frontmatter.title },
|
|
113225
113225
|
content: { raw: htmlContent },
|
|
113226
113226
|
excerpt: mdxFile.frontmatter.excerpt ? { raw: mdxFile.frontmatter.excerpt } : undefined,
|
|
113227
113227
|
status: mdxFile.frontmatter.status,
|
|
113228
113228
|
type: postType,
|
|
113229
|
-
slug
|
|
113229
|
+
slug,
|
|
113230
113230
|
categories: mdxFile.frontmatter.categories,
|
|
113231
113231
|
tags: mdxFile.frontmatter.tags,
|
|
113232
113232
|
meta: mdxFile.frontmatter.meta,
|
|
@@ -113272,13 +113272,14 @@ ${"=".repeat(80)}`);
|
|
|
113272
113272
|
const htmlContent = await this.getBlockRenderer().renderMDXContentToHTML(mdxFile.content);
|
|
113273
113273
|
const pathParts = filePath2.split(path6.sep);
|
|
113274
113274
|
const postType = pathParts[pathParts.length - 2];
|
|
113275
|
+
const slug = path6.basename(filePath2, ".mdx");
|
|
113275
113276
|
const postData = {
|
|
113276
113277
|
title: { raw: mdxFile.frontmatter.title },
|
|
113277
113278
|
content: { raw: htmlContent },
|
|
113278
113279
|
excerpt: mdxFile.frontmatter.excerpt ? { raw: mdxFile.frontmatter.excerpt } : undefined,
|
|
113279
113280
|
status: mdxFile.frontmatter.status,
|
|
113280
113281
|
type: postType,
|
|
113281
|
-
slug
|
|
113282
|
+
slug,
|
|
113282
113283
|
categories: mdxFile.frontmatter.categories,
|
|
113283
113284
|
tags: mdxFile.frontmatter.tags,
|
|
113284
113285
|
meta: mdxFile.frontmatter.meta,
|
|
@@ -116184,7 +116185,7 @@ class DockerEnvManager {
|
|
|
116184
116185
|
// package.json
|
|
116185
116186
|
var package_default = {
|
|
116186
116187
|
name: "@wordpress-flow/cli",
|
|
116187
|
-
version: "1.2.
|
|
116188
|
+
version: "1.2.11",
|
|
116188
116189
|
type: "module",
|
|
116189
116190
|
description: "TypeScript-based WordPress block creation system",
|
|
116190
116191
|
main: "dist/index.js",
|