qarpeo 0.4.11 → 0.4.13

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.
@@ -9,7 +9,7 @@ import { useRuntimeConfig, defineEventHandler } from 'nuxt/server';
9
9
  import { mkdir, writeFile, readFile } from 'node:fs/promises';
10
10
  import { defu } from 'defu';
11
11
 
12
- const version = "0.4.11";
12
+ const version = "0.4.13";
13
13
 
14
14
  function spawnBinSync(bin, args, options = {}) {
15
15
  const isWindows = process.platform === "win32";
package/dist/module.mjs CHANGED
@@ -1047,16 +1047,9 @@ async function setupAliases(options, nuxt, resolver) {
1047
1047
  );
1048
1048
  } catch {
1049
1049
  }
1050
- try {
1051
- const comarkNuxtDir = resolvePkgDir("@comark/nuxt");
1052
- nuxt.options.alias["@comark/nuxt/utils"] = resolve(comarkNuxtDir, "dist/utils/index.js");
1053
- nuxt.options.alias["@comark/nuxt/render"] = resolve(comarkNuxtDir, "dist/render.js");
1054
- nuxt.options.alias["@comark/nuxt/parse"] = resolve(comarkNuxtDir, "dist/parse.js");
1055
- nuxt.options.alias["@comark/nuxt"] = resolve(comarkNuxtDir, "dist/module.js");
1056
- } catch {
1057
- }
1058
1050
  try {
1059
1051
  const comarkVueDir = resolvePkgDir("@comark/vue");
1052
+ nuxt.options.alias["@comark/vue/nuxt"] = resolve(comarkVueDir, "dist/nuxt.js");
1060
1053
  nuxt.options.alias["@comark/vue/vite"] = resolve(comarkVueDir, "dist/vite.js");
1061
1054
  nuxt.options.alias["@comark/vue/utils"] = resolve(comarkVueDir, "dist/utils/index.js");
1062
1055
  nuxt.options.alias["@comark/vue/render"] = resolve(comarkVueDir, "dist/render.js");
@@ -1308,6 +1301,10 @@ async function setupSchema(options, nuxt, resolver, logger) {
1308
1301
  if (isDrizzle) {
1309
1302
  const drizzleCheck = checkDrizzleVersion(nuxt.options.rootDir);
1310
1303
  if (!drizzleCheck.isRC) {
1304
+ if (process.env.npm_lifecycle_event === "postinstall" || nuxt.options._prepare && options.autoInstall !== false) {
1305
+ logger.warn(drizzleCheck.error);
1306
+ return;
1307
+ }
1311
1308
  throw new Error(drizzleCheck.error);
1312
1309
  }
1313
1310
  const tableResolveOpts = {
@@ -1867,16 +1864,9 @@ async function setupNitro(options, nuxt, resolver, logger) {
1867
1864
  } catch {
1868
1865
  }
1869
1866
  if (options.cms) {
1870
- try {
1871
- const comarkNuxtDir = resolvePkgDir("@comark/nuxt");
1872
- nitroConfig.alias["@comark/nuxt/utils"] = resolve(comarkNuxtDir, "dist/utils/index.js");
1873
- nitroConfig.alias["@comark/nuxt/render"] = resolve(comarkNuxtDir, "dist/render.js");
1874
- nitroConfig.alias["@comark/nuxt/parse"] = resolve(comarkNuxtDir, "dist/parse.js");
1875
- nitroConfig.alias["@comark/nuxt"] = resolve(comarkNuxtDir, "dist/module.js");
1876
- } catch {
1877
- }
1878
1867
  try {
1879
1868
  const comarkVueDir = resolvePkgDir("@comark/vue");
1869
+ nitroConfig.alias["@comark/vue/nuxt"] = resolve(comarkVueDir, "dist/nuxt.js");
1880
1870
  nitroConfig.alias["@comark/vue/vite"] = resolve(comarkVueDir, "dist/vite.js");
1881
1871
  nitroConfig.alias["@comark/vue/utils"] = resolve(comarkVueDir, "dist/utils/index.js");
1882
1872
  nitroConfig.alias["@comark/vue/render"] = resolve(comarkVueDir, "dist/render.js");
@@ -5442,24 +5432,27 @@ async function setupCMS(options, nuxt, resolver, logger) {
5442
5432
  return;
5443
5433
  }
5444
5434
  }
5445
- if (options.cms && !hasNuxtModule("@comark/vue/nuxt") && !hasNuxtModule("@comark/vue") && !hasNuxtModule("@comark/nuxt")) {
5435
+ if (options.cms && !hasNuxtModule("@comark/vue/nuxt") && !hasNuxtModule("@comark/vue")) {
5436
+ const rootReq = createRequire(resolve(nuxt.options.rootDir, "package.json"));
5437
+ let comarkModulePath = null;
5446
5438
  try {
5447
- const rootReq = createRequire(resolve(nuxt.options.rootDir, "package.json"));
5448
- const comarkModulePath = rootReq.resolve("@comark/vue/nuxt");
5449
- await installModule(comarkModulePath);
5439
+ const resolved = rootReq.resolve("@comark/vue/nuxt");
5440
+ if (existsSync(resolved)) {
5441
+ comarkModulePath = resolved;
5442
+ }
5450
5443
  } catch {
5451
5444
  try {
5452
- const comarkModulePath = fileURLToPath(import.meta.resolve("@comark/vue/nuxt"));
5445
+ const resolved = fileURLToPath(import.meta.resolve("@comark/vue/nuxt"));
5446
+ if (existsSync(resolved)) {
5447
+ comarkModulePath = resolved;
5448
+ }
5449
+ } catch {
5450
+ }
5451
+ }
5452
+ if (comarkModulePath) {
5453
+ try {
5453
5454
  await installModule(comarkModulePath);
5454
5455
  } catch {
5455
- try {
5456
- await installModule("@comark/vue/nuxt");
5457
- } catch {
5458
- try {
5459
- await installModule("@comark/nuxt");
5460
- } catch {
5461
- }
5462
- }
5463
5456
  }
5464
5457
  }
5465
5458
  }
@@ -6884,7 +6877,7 @@ ${extraSources}
6884
6877
  return;
6885
6878
  }
6886
6879
  await setupWrangler(options, nuxt, resolver, logger);
6887
- await setupSchema(options, nuxt, resolver);
6880
+ await setupSchema(options, nuxt, resolver, logger);
6888
6881
  await setupNitro(options, nuxt, resolver);
6889
6882
  await setupD1Migrate(options, nuxt);
6890
6883
  await setupServerUtils(options, nuxt, resolver);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qarpeo",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Zero-config Cloudflare Edge Platform for Nuxt",
5
5
  "keywords": [
6
6
  "analytics-engine",