qarpeo 0.4.3 → 0.4.5
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 +2 -2
- package/dist/module.mjs +32 -3
- 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.5";
|
|
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 || process.env.npm_lifecycle_event === "postinstall") {
|
|
638
638
|
return false;
|
|
639
639
|
}
|
|
640
640
|
const rl = readline.createInterface({ input: stdin, output: stdout });
|
package/dist/module.mjs
CHANGED
|
@@ -5351,17 +5351,46 @@ async function setupConsole(options, nuxt, resolver, logger) {
|
|
|
5351
5351
|
}
|
|
5352
5352
|
|
|
5353
5353
|
async function setupCMS(options, nuxt, resolver, logger) {
|
|
5354
|
+
if (options.cms) {
|
|
5355
|
+
const cmsOptions = typeof options.cms === "object" ? options.cms : {};
|
|
5356
|
+
const pluginConfig = cmsOptions.plugins || {};
|
|
5357
|
+
const shikiOption = cmsOptions.shiki !== void 0 ? cmsOptions.shiki : pluginConfig.shiki;
|
|
5358
|
+
const shikiEnabled = shikiOption !== false;
|
|
5359
|
+
await ensurePackage("@comark/vue", {
|
|
5360
|
+
cwd: nuxt.options.rootDir,
|
|
5361
|
+
dev: false,
|
|
5362
|
+
purpose: "CMS markdown rendering"
|
|
5363
|
+
});
|
|
5364
|
+
await ensurePackage("comark", {
|
|
5365
|
+
cwd: nuxt.options.rootDir,
|
|
5366
|
+
dev: false,
|
|
5367
|
+
purpose: "CMS markdown parsing"
|
|
5368
|
+
});
|
|
5369
|
+
if (shikiEnabled) {
|
|
5370
|
+
await ensurePackage("shiki", {
|
|
5371
|
+
cwd: nuxt.options.rootDir,
|
|
5372
|
+
dev: false,
|
|
5373
|
+
purpose: "CMS code syntax highlighting"
|
|
5374
|
+
});
|
|
5375
|
+
}
|
|
5376
|
+
}
|
|
5354
5377
|
if (options.cms && !hasNuxtModule("@comark/vue/nuxt") && !hasNuxtModule("@comark/vue") && !hasNuxtModule("@comark/nuxt")) {
|
|
5355
5378
|
try {
|
|
5356
|
-
const
|
|
5379
|
+
const rootReq = createRequire(resolve(nuxt.options.rootDir, "package.json"));
|
|
5380
|
+
const comarkModulePath = rootReq.resolve("@comark/vue/nuxt");
|
|
5357
5381
|
await installModule(comarkModulePath);
|
|
5358
5382
|
} catch {
|
|
5359
5383
|
try {
|
|
5360
|
-
|
|
5384
|
+
const comarkModulePath = fileURLToPath(import.meta.resolve("@comark/vue/nuxt"));
|
|
5385
|
+
await installModule(comarkModulePath);
|
|
5361
5386
|
} catch {
|
|
5362
5387
|
try {
|
|
5363
|
-
await installModule("@comark/nuxt");
|
|
5388
|
+
await installModule("@comark/vue/nuxt");
|
|
5364
5389
|
} catch {
|
|
5390
|
+
try {
|
|
5391
|
+
await installModule("@comark/nuxt");
|
|
5392
|
+
} catch {
|
|
5393
|
+
}
|
|
5365
5394
|
}
|
|
5366
5395
|
}
|
|
5367
5396
|
}
|