qarpeo 0.4.4 → 0.4.6
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/chunks/manifest.get.mjs +11 -3
- package/dist/module.mjs +6 -3
- package/dist/utils/pkg.d.ts +1 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import { useRuntimeConfig, defineEventHandler } from 'nuxt/server';
|
|
|
11
11
|
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
12
12
|
import { defu } from 'defu';
|
|
13
13
|
|
|
14
|
-
const version = "0.4.
|
|
14
|
+
const version = "0.4.6";
|
|
15
15
|
|
|
16
16
|
function resolveBindingName(service, override, defaultName) {
|
|
17
17
|
if (override && typeof override === "string") {
|
|
@@ -634,7 +634,7 @@ function resolveBinaryPath(binName, cwd = process.cwd()) {
|
|
|
634
634
|
return null;
|
|
635
635
|
}
|
|
636
636
|
async function confirmInstall(packageName, purpose) {
|
|
637
|
-
if (!stdin.isTTY) {
|
|
637
|
+
if (!stdin.isTTY || stdin.isRaw || process.env.npm_lifecycle_event === "postinstall") {
|
|
638
638
|
return false;
|
|
639
639
|
}
|
|
640
640
|
const rl = readline.createInterface({ input: stdin, output: stdout });
|
|
@@ -680,7 +680,15 @@ async function ensurePackage(packageName, options = {}) {
|
|
|
680
680
|
if (isPackageInstalled(packageName, cwd)) {
|
|
681
681
|
return true;
|
|
682
682
|
}
|
|
683
|
-
|
|
683
|
+
if (process.env.npm_lifecycle_event === "postinstall") {
|
|
684
|
+
const addCmd = await formatAddCommand(packageName, { cwd, dev: options.dev });
|
|
685
|
+
console.warn(
|
|
686
|
+
`
|
|
687
|
+
\u26A0\uFE0F [qarpeo] Missing optional dependency "${packageName}" for ${purpose}. Run: ${addCmd}`
|
|
688
|
+
);
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
const confirmed = options.autoInstall ? true : await confirmInstall(packageName, purpose);
|
|
684
692
|
if (!confirmed) {
|
|
685
693
|
const addCmd = await formatAddCommand(packageName, { cwd, dev: options.dev });
|
|
686
694
|
console.error(
|
package/dist/module.mjs
CHANGED
|
@@ -5359,18 +5359,21 @@ async function setupCMS(options, nuxt, resolver, logger) {
|
|
|
5359
5359
|
await ensurePackage("@comark/vue", {
|
|
5360
5360
|
cwd: nuxt.options.rootDir,
|
|
5361
5361
|
dev: false,
|
|
5362
|
-
purpose: "CMS markdown rendering"
|
|
5362
|
+
purpose: "CMS markdown rendering",
|
|
5363
|
+
autoInstall: true
|
|
5363
5364
|
});
|
|
5364
5365
|
await ensurePackage("comark", {
|
|
5365
5366
|
cwd: nuxt.options.rootDir,
|
|
5366
5367
|
dev: false,
|
|
5367
|
-
purpose: "CMS markdown parsing"
|
|
5368
|
+
purpose: "CMS markdown parsing",
|
|
5369
|
+
autoInstall: true
|
|
5368
5370
|
});
|
|
5369
5371
|
if (shikiEnabled) {
|
|
5370
5372
|
await ensurePackage("shiki", {
|
|
5371
5373
|
cwd: nuxt.options.rootDir,
|
|
5372
5374
|
dev: false,
|
|
5373
|
-
purpose: "CMS code syntax highlighting"
|
|
5375
|
+
purpose: "CMS code syntax highlighting",
|
|
5376
|
+
autoInstall: true
|
|
5374
5377
|
});
|
|
5375
5378
|
}
|
|
5376
5379
|
}
|
package/dist/utils/pkg.d.ts
CHANGED