@pipelab/plugin-tauri 1.0.0-beta.28 → 1.0.0-beta.32

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.cjs CHANGED
@@ -89560,7 +89560,7 @@ const runWithLiveLogs = async (command, args, execaOptions, log, hooks, abortSig
89560
89560
  TERM: "xterm-256color",
89561
89561
  FORCE_STDERR_LOGGING: "1"
89562
89562
  },
89563
- cancelSignal: abortSignal
89563
+ cancelSignal: abortSignal ?? execaOptions.cancelSignal
89564
89564
  });
89565
89565
  hooks?.onCreated?.(subprocess);
89566
89566
  subprocess.stdout?.on("data", (data) => {
@@ -99433,11 +99433,11 @@ var require_normalize = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
99433
99433
  //#endregion
99434
99434
  //#region ../../node_modules/@npmcli/package-json/lib/read-package.js
99435
99435
  var require_read_package = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
99436
- const { readFile: readFile$10 } = require("fs/promises");
99436
+ const { readFile: readFile$9 } = require("fs/promises");
99437
99437
  const parseJSON = require_lib$30();
99438
99438
  async function read(filename) {
99439
99439
  try {
99440
- return await readFile$10(filename, "utf8");
99440
+ return await readFile$9(filename, "utf8");
99441
99441
  } catch (err) {
99442
99442
  err.message = `Could not read package.json: ${err}`;
99443
99443
  throw err;
@@ -99522,7 +99522,7 @@ var require_sort$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
99522
99522
  //#endregion
99523
99523
  //#region ../../node_modules/@npmcli/package-json/lib/index.js
99524
99524
  var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
99525
- const { readFile: readFile$9, writeFile: writeFile$5 } = require("node:fs/promises");
99525
+ const { readFile: readFile$8, writeFile: writeFile$4 } = require("node:fs/promises");
99526
99526
  const { resolve: resolve$12 } = require("node:path");
99527
99527
  const parseJSON = require_lib$30();
99528
99528
  const updateDeps = require_update_dependencies();
@@ -99629,7 +99629,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
99629
99629
  const indexFile = resolve$12(this.path, "index.js");
99630
99630
  let indexFileContent;
99631
99631
  try {
99632
- indexFileContent = await readFile$9(indexFile, "utf8");
99632
+ indexFileContent = await readFile$8(indexFile, "utf8");
99633
99633
  } catch (err) {
99634
99634
  throw parseErr;
99635
99635
  }
@@ -99695,7 +99695,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
99695
99695
  const content = sort ? packageSort(rest) : rest;
99696
99696
  const fileContent = `${JSON.stringify(content, null, format)}\n`.replace(/\n/g, eol);
99697
99697
  if (fileContent.trim() !== this.#readFileContent.trim()) {
99698
- const written = await writeFile$5(this.filename, fileContent);
99698
+ const written = await writeFile$4(this.filename, fileContent);
99699
99699
  this.#readFileContent = fileContent;
99700
99700
  return written;
99701
99701
  }
@@ -101310,7 +101310,7 @@ var require_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
101310
101310
  //#region ../../node_modules/cacache/lib/entry-index.js
101311
101311
  var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
101312
101312
  const crypto$1 = require("crypto");
101313
- const { appendFile, mkdir: mkdir$6, readFile: readFile$8, readdir: readdir$5, rm: rm$7, writeFile: writeFile$4 } = require("fs/promises");
101313
+ const { appendFile, mkdir: mkdir$6, readFile: readFile$7, readdir: readdir$5, rm: rm$7, writeFile: writeFile$3 } = require("fs/promises");
101314
101314
  const { Minipass } = require_commonjs$10();
101315
101315
  const path$17 = require("path");
101316
101316
  const ssri = require_lib$17();
@@ -101357,7 +101357,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
101357
101357
  });
101358
101358
  };
101359
101359
  const write = async (tmp) => {
101360
- await writeFile$4(tmp.target, newIndex, { flag: "wx" });
101360
+ await writeFile$3(tmp.target, newIndex, { flag: "wx" });
101361
101361
  await mkdir$6(path$17.dirname(bucket), { recursive: true });
101362
101362
  await moveFile(tmp.target, bucket);
101363
101363
  tmp.moved = true;
@@ -101454,7 +101454,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
101454
101454
  }
101455
101455
  module.exports.bucketEntries = bucketEntries;
101456
101456
  async function bucketEntries(bucket, filter) {
101457
- return _bucketEntries(await readFile$8(bucket, "utf8"), filter);
101457
+ return _bucketEntries(await readFile$7(bucket, "utf8"), filter);
101458
101458
  }
101459
101459
  function _bucketEntries(data) {
101460
101460
  const entries = [];
@@ -106225,7 +106225,7 @@ var require_rm = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
106225
106225
  //#endregion
106226
106226
  //#region ../../node_modules/cacache/lib/verify.js
106227
106227
  var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
106228
- const { mkdir: mkdir$5, readFile: readFile$7, rm: rm$5, stat: stat$5, truncate, writeFile: writeFile$3 } = require("fs/promises");
106228
+ const { mkdir: mkdir$5, readFile: readFile$6, rm: rm$5, stat: stat$5, truncate, writeFile: writeFile$2 } = require("fs/promises");
106229
106229
  const contentPath = require_path();
106230
106230
  const fsm = require_lib$15();
106231
106231
  const glob = require_glob();
@@ -106414,11 +106414,11 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
106414
106414
  async function writeVerifile(cache, opts) {
106415
106415
  const verifile = path$13.join(cache, "_lastverified");
106416
106416
  opts.log.silly("verify", "writing verifile to " + verifile);
106417
- return writeFile$3(verifile, `${Date.now()}`);
106417
+ return writeFile$2(verifile, `${Date.now()}`);
106418
106418
  }
106419
106419
  module.exports.lastRun = lastRun;
106420
106420
  async function lastRun(cache) {
106421
- const data = await readFile$7(path$13.join(cache, "_lastverified"), { encoding: "utf8" });
106421
+ const data = await readFile$6(path$13.join(cache, "_lastverified"), { encoding: "utf8" });
106422
106422
  return /* @__PURE__ */ new Date(+data);
106423
106423
  }
106424
106424
  }));
@@ -106964,10 +106964,10 @@ var require_lib$12 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
106964
106964
  //#region ../../node_modules/@npmcli/installed-package-contents/lib/index.js
106965
106965
  var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
106966
106966
  const bundled = require_lib$12();
106967
- const { readFile: readFile$6, readdir: readdir$4, stat: stat$4 } = require("fs/promises");
106967
+ const { readFile: readFile$5, readdir: readdir$4, stat: stat$4 } = require("fs/promises");
106968
106968
  const { resolve: resolve$9, basename: basename$4, dirname: dirname$8 } = require("path");
106969
106969
  const normalizePackageBin = require_lib$21();
106970
- const readPackage = ({ path: path$51, packageJsonCache }) => packageJsonCache.has(path$51) ? Promise.resolve(packageJsonCache.get(path$51)) : readFile$6(path$51).then((json) => {
106970
+ const readPackage = ({ path: path$51, packageJsonCache }) => packageJsonCache.has(path$51) ? Promise.resolve(packageJsonCache.get(path$51)) : readFile$5(path$51).then((json) => {
106971
106971
  const pkg = normalizePackageBin(JSON.parse(json));
106972
106972
  packageJsonCache.set(path$51, pkg);
106973
106973
  return pkg;
@@ -112496,7 +112496,7 @@ var require_lib$10 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
112496
112496
  //#region ../../node_modules/npm-packlist/lib/index.js
112497
112497
  var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
112498
112498
  const { Walker: IgnoreWalker } = require_lib$10();
112499
- const { lstatSync: lstat$1, readFileSync: readFile$5 } = require("fs");
112499
+ const { lstatSync: lstat$1, readFileSync: readFile$4 } = require("fs");
112500
112500
  const { basename: basename$3, dirname: dirname$7, extname: extname$1, join: join$9, relative, resolve: resolve$7, sep } = require("path");
112501
112501
  const { log } = require_lib$29();
112502
112502
  const defaultRules = Symbol("npm-packlist.rules.default");
@@ -112530,7 +112530,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
112530
112530
  const normalizePath = (path$48) => path$48.split("\\").join("/");
112531
112531
  const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
112532
112532
  for (const file of [".npmignore", ".gitignore"]) try {
112533
- const ignoreContent = readFile$5(join$9(root, file), { encoding: "utf8" });
112533
+ const ignoreContent = readFile$4(join$9(root, file), { encoding: "utf8" });
112534
112534
  result.push(ignoreContent);
112535
112535
  break;
112536
112536
  } catch (err) {
@@ -151266,6 +151266,17 @@ async function isOnline() {
151266
151266
  lastCheckTime = now;
151267
151267
  return isOnlineCached;
151268
151268
  }
151269
+ function allowPrereleaseInRange(rangeStr) {
151270
+ try {
151271
+ return new import_semver.default.Range(rangeStr).set.map((conj) => conj.map((c) => {
151272
+ const v = c.semver;
151273
+ if (v.prerelease && v.prerelease.length) return c.operator + v.format();
151274
+ return c.operator + v.major + "." + v.minor + "." + v.patch + "-0";
151275
+ }).join(" ")).join(" || ");
151276
+ } catch {
151277
+ return rangeStr;
151278
+ }
151279
+ }
151269
151280
  /**
151270
151281
  * Robust utility to fetch, cache, and resolve an NPM package.
151271
151282
  * Centralized in core-node to avoid circular dependencies.
@@ -151288,6 +151299,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
151288
151299
  const ctx = options.context;
151289
151300
  const baseDir = ctx.getPackagesPath(packageName);
151290
151301
  let resolvedVersion;
151302
+ const includePrerelease = !!(ctx.releaseTag && ctx.releaseTag !== "latest");
151291
151303
  let resolvedVersionOrRange = versionOrRange;
151292
151304
  if (resolvedVersionOrRange === "local") resolvedVersionOrRange = "latest";
151293
151305
  console.log(`[Fetcher] Resolving ${packageName}@${resolvedVersionOrRange || "latest"}...`);
@@ -151295,7 +151307,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
151295
151307
  if (!await isOnline()) {
151296
151308
  console.warn(`[Fetcher] ${packageName}: offline mode detected (${Date.now() - resolveStart}ms), trying local fallback...`);
151297
151309
  const fallbackStart = Date.now();
151298
- const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName);
151310
+ const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName, includePrerelease);
151299
151311
  if (fallbackVersion) {
151300
151312
  resolvedVersion = fallbackVersion;
151301
151313
  console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
@@ -151310,7 +151322,27 @@ async function fetchPackage(packageName, versionOrRange, options) {
151310
151322
  const packument = await packumentPromise;
151311
151323
  const versions = Object.keys(packument.versions);
151312
151324
  const range = resolvedVersionOrRange || "latest";
151313
- let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range);
151325
+ let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range, { includePrerelease });
151326
+ if (!foundVersion && ctx.releaseTag && ctx.releaseTag !== "latest") {
151327
+ const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
151328
+ if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
151329
+ const rewrittenRangeForCheck = allowPrereleaseInRange(range);
151330
+ if (import_semver.default.satisfies(releaseTagVersion, rewrittenRangeForCheck, { includePrerelease: true })) {
151331
+ console.log(`[Fetcher] Using release tag "${ctx.releaseTag}" (${releaseTagVersion}) for ${packageName}@${range} because it satisfies the range`);
151332
+ foundVersion = releaseTagVersion;
151333
+ }
151334
+ }
151335
+ }
151336
+ if (!foundVersion && includePrerelease) {
151337
+ const rewrittenRange = allowPrereleaseInRange(range);
151338
+ if (rewrittenRange !== range) {
151339
+ const matched = import_semver.default.maxSatisfying(versions, rewrittenRange, { includePrerelease });
151340
+ if (matched) {
151341
+ console.log(`[Fetcher] Resolved ${packageName}@${range} to ${matched} via rewritten range ${rewrittenRange}`);
151342
+ foundVersion = matched;
151343
+ }
151344
+ }
151345
+ }
151314
151346
  if (range === "latest" && ctx.releaseTag && ctx.releaseTag !== "latest") {
151315
151347
  const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
151316
151348
  if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
@@ -151326,7 +151358,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
151326
151358
  } catch (error) {
151327
151359
  console.warn(`[Fetcher] ${packageName}: remote resolution failed (${Date.now() - resolveStart}ms), trying local fallback...`);
151328
151360
  const fallbackStart = Date.now();
151329
- const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, error, baseDir, packageName);
151361
+ const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, error, baseDir, packageName, includePrerelease);
151330
151362
  if (fallbackVersion) {
151331
151363
  resolvedVersion = fallbackVersion;
151332
151364
  console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
@@ -151589,7 +151621,7 @@ async function crawlMonorepoPackages() {
151589
151621
  }
151590
151622
  return cache;
151591
151623
  }
151592
- async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix) {
151624
+ async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix, includePrerelease = false) {
151593
151625
  if (!(0, node_fs.existsSync)(baseDir)) return null;
151594
151626
  try {
151595
151627
  const localVersions = (await (0, node_fs_promises.readdir)(baseDir, { withFileTypes: true })).filter((e) => e.isDirectory() || e.isSymbolicLink()).map((e) => e.name).filter((name) => !!import_semver.default.valid(name));
@@ -151602,7 +151634,7 @@ async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix) {
151602
151634
  return latestLocal;
151603
151635
  }
151604
151636
  } else {
151605
- const matched = import_semver.default.maxSatisfying(localVersions, range);
151637
+ const matched = import_semver.default.maxSatisfying(localVersions, range, { includePrerelease });
151606
151638
  if (matched) {
151607
151639
  console.info(`[Fetcher] ${logPrefix}: Using locally cached matching version: ${matched} for range ${range}`);
151608
151640
  return matched;
@@ -157187,13 +157219,13 @@ const tauri = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
157187
157219
  const sanitizedName = kebabCase(completeConfiguration.name);
157188
157220
  log("Package.json update");
157189
157221
  const pkgJSONPath = (0, node_path.join)(destinationFolder, "package.json");
157190
- const pkgJSONContent = await (0, node_fs.readFile)(pkgJSONPath, "utf8");
157222
+ const pkgJSONContent = await (0, node_fs_promises.readFile)(pkgJSONPath, "utf8");
157191
157223
  const pkgJSON = JSON.parse(pkgJSONContent);
157192
157224
  log("Setting name to", sanitizedName);
157193
157225
  pkgJSON.name = sanitizedName;
157194
157226
  log("Setting productName to", completeConfiguration.name);
157195
157227
  pkgJSON.productName = completeConfiguration.name;
157196
- await (0, node_fs.writeFile)(pkgJSONPath, JSON.stringify(pkgJSON, null, 2));
157228
+ await (0, node_fs_promises.writeFile)(pkgJSONPath, JSON.stringify(pkgJSON, null, 2));
157197
157229
  log("Cargo.toml update");
157198
157230
  const cargoTomlPath = (0, node_path.join)(destinationFolder, "src-tauri", "Cargo.toml");
157199
157231
  const cargoToml = i(await (0, node_fs_promises.readFile)(cargoTomlPath, "utf8"));
@@ -157206,7 +157238,7 @@ const tauri = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
157206
157238
  await (0, node_fs_promises.writeFile)(cargoTomlPath, a(cargoToml));
157207
157239
  log("Tauri.conf.json update");
157208
157240
  const tauriConfJSONPath = (0, node_path.join)(destinationFolder, "src-tauri", "tauri.conf.json");
157209
- const tauriConfJSONContent = await (0, node_fs.readFile)(tauriConfJSONPath, "utf8");
157241
+ const tauriConfJSONContent = await (0, node_fs_promises.readFile)(tauriConfJSONPath, "utf8");
157210
157242
  const tauriConfJSON = JSON.parse(tauriConfJSONContent);
157211
157243
  log("Setting productName to", completeConfiguration.name);
157212
157244
  tauriConfJSON.productName = completeConfiguration.name;
@@ -157434,7 +157466,9 @@ const defaultTauriConfig = {
157434
157466
  discordAppId: "",
157435
157467
  ignore: [],
157436
157468
  backgroundColor: "#FFF",
157437
- openDevtoolsOnStart: false
157469
+ openDevtoolsOnStart: false,
157470
+ enableDoctor: false,
157471
+ serverMode: "default"
157438
157472
  };
157439
157473
  //#endregion
157440
157474
  //#region src/make.ts
package/dist/index.mjs CHANGED
@@ -5,8 +5,8 @@ import { formatWithOptions, types } from "util";
5
5
  import path, { basename, delimiter, dirname, join, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import { arch, constants, homedir, platform } from "node:os";
8
- import { appendFileSync, createReadStream, createWriteStream, existsSync, readFile, readFileSync, readdirSync, statSync, writeFile, writeFileSync } from "node:fs";
9
- import { access, chmod, cp, mkdir, readFile as readFile$1, readdir, rename, rm, writeFile as writeFile$1 } from "node:fs/promises";
8
+ import { appendFileSync, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
9
+ import { access, chmod, cp, mkdir, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
10
10
  import http from "node:http";
11
11
  import { webcrypto } from "node:crypto";
12
12
  import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
@@ -89553,7 +89553,7 @@ const runWithLiveLogs = async (command, args, execaOptions, log, hooks, abortSig
89553
89553
  TERM: "xterm-256color",
89554
89554
  FORCE_STDERR_LOGGING: "1"
89555
89555
  },
89556
- cancelSignal: abortSignal
89556
+ cancelSignal: abortSignal ?? execaOptions.cancelSignal
89557
89557
  });
89558
89558
  hooks?.onCreated?.(subprocess);
89559
89559
  subprocess.stdout?.on("data", (data) => {
@@ -99426,11 +99426,11 @@ var require_normalize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
99426
99426
  //#endregion
99427
99427
  //#region ../../node_modules/@npmcli/package-json/lib/read-package.js
99428
99428
  var require_read_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
99429
- const { readFile: readFile$7 } = __require("fs/promises");
99429
+ const { readFile: readFile$6 } = __require("fs/promises");
99430
99430
  const parseJSON = require_lib$30();
99431
99431
  async function read(filename) {
99432
99432
  try {
99433
- return await readFile$7(filename, "utf8");
99433
+ return await readFile$6(filename, "utf8");
99434
99434
  } catch (err) {
99435
99435
  err.message = `Could not read package.json: ${err}`;
99436
99436
  throw err;
@@ -99515,7 +99515,7 @@ var require_sort$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
99515
99515
  //#endregion
99516
99516
  //#region ../../node_modules/@npmcli/package-json/lib/index.js
99517
99517
  var require_lib$18 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
99518
- const { readFile: readFile$6, writeFile: writeFile$4 } = __require("node:fs/promises");
99518
+ const { readFile: readFile$5, writeFile: writeFile$3 } = __require("node:fs/promises");
99519
99519
  const { resolve: resolve$11 } = __require("node:path");
99520
99520
  const parseJSON = require_lib$30();
99521
99521
  const updateDeps = require_update_dependencies();
@@ -99622,7 +99622,7 @@ var require_lib$18 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
99622
99622
  const indexFile = resolve$11(this.path, "index.js");
99623
99623
  let indexFileContent;
99624
99624
  try {
99625
- indexFileContent = await readFile$6(indexFile, "utf8");
99625
+ indexFileContent = await readFile$5(indexFile, "utf8");
99626
99626
  } catch (err) {
99627
99627
  throw parseErr;
99628
99628
  }
@@ -99688,7 +99688,7 @@ var require_lib$18 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
99688
99688
  const content = sort ? packageSort(rest) : rest;
99689
99689
  const fileContent = `${JSON.stringify(content, null, format)}\n`.replace(/\n/g, eol);
99690
99690
  if (fileContent.trim() !== this.#readFileContent.trim()) {
99691
- const written = await writeFile$4(this.filename, fileContent);
99691
+ const written = await writeFile$3(this.filename, fileContent);
99692
99692
  this.#readFileContent = fileContent;
99693
99693
  return written;
99694
99694
  }
@@ -101303,7 +101303,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
101303
101303
  //#region ../../node_modules/cacache/lib/entry-index.js
101304
101304
  var require_entry_index = /* @__PURE__ */ __commonJSMin(((exports, module) => {
101305
101305
  const crypto$1 = __require("crypto");
101306
- const { appendFile, mkdir: mkdir$3, readFile: readFile$5, readdir: readdir$3, rm: rm$4, writeFile: writeFile$3 } = __require("fs/promises");
101306
+ const { appendFile, mkdir: mkdir$3, readFile: readFile$4, readdir: readdir$3, rm: rm$4, writeFile: writeFile$2 } = __require("fs/promises");
101307
101307
  const { Minipass } = require_commonjs$10();
101308
101308
  const path$12 = __require("path");
101309
101309
  const ssri = require_lib$17();
@@ -101350,7 +101350,7 @@ var require_entry_index = /* @__PURE__ */ __commonJSMin(((exports, module) => {
101350
101350
  });
101351
101351
  };
101352
101352
  const write = async (tmp) => {
101353
- await writeFile$3(tmp.target, newIndex, { flag: "wx" });
101353
+ await writeFile$2(tmp.target, newIndex, { flag: "wx" });
101354
101354
  await mkdir$3(path$12.dirname(bucket), { recursive: true });
101355
101355
  await moveFile(tmp.target, bucket);
101356
101356
  tmp.moved = true;
@@ -101447,7 +101447,7 @@ var require_entry_index = /* @__PURE__ */ __commonJSMin(((exports, module) => {
101447
101447
  }
101448
101448
  module.exports.bucketEntries = bucketEntries;
101449
101449
  async function bucketEntries(bucket, filter) {
101450
- return _bucketEntries(await readFile$5(bucket, "utf8"), filter);
101450
+ return _bucketEntries(await readFile$4(bucket, "utf8"), filter);
101451
101451
  }
101452
101452
  function _bucketEntries(data) {
101453
101453
  const entries = [];
@@ -106218,7 +106218,7 @@ var require_rm = /* @__PURE__ */ __commonJSMin(((exports, module) => {
106218
106218
  //#endregion
106219
106219
  //#region ../../node_modules/cacache/lib/verify.js
106220
106220
  var require_verify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
106221
- const { mkdir: mkdir$2, readFile: readFile$4, rm: rm$2, stat: stat$3, truncate, writeFile: writeFile$2 } = __require("fs/promises");
106221
+ const { mkdir: mkdir$2, readFile: readFile$3, rm: rm$2, stat: stat$3, truncate, writeFile: writeFile$1 } = __require("fs/promises");
106222
106222
  const contentPath = require_path();
106223
106223
  const fsm = require_lib$15();
106224
106224
  const glob = require_glob();
@@ -106407,11 +106407,11 @@ var require_verify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
106407
106407
  async function writeVerifile(cache, opts) {
106408
106408
  const verifile = path$8.join(cache, "_lastverified");
106409
106409
  opts.log.silly("verify", "writing verifile to " + verifile);
106410
- return writeFile$2(verifile, `${Date.now()}`);
106410
+ return writeFile$1(verifile, `${Date.now()}`);
106411
106411
  }
106412
106412
  module.exports.lastRun = lastRun;
106413
106413
  async function lastRun(cache) {
106414
- const data = await readFile$4(path$8.join(cache, "_lastverified"), { encoding: "utf8" });
106414
+ const data = await readFile$3(path$8.join(cache, "_lastverified"), { encoding: "utf8" });
106415
106415
  return /* @__PURE__ */ new Date(+data);
106416
106416
  }
106417
106417
  }));
@@ -106957,10 +106957,10 @@ var require_lib$12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
106957
106957
  //#region ../../node_modules/@npmcli/installed-package-contents/lib/index.js
106958
106958
  var require_lib$11 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
106959
106959
  const bundled = require_lib$12();
106960
- const { readFile: readFile$3, readdir: readdir$2, stat: stat$2 } = __require("fs/promises");
106960
+ const { readFile: readFile$2, readdir: readdir$2, stat: stat$2 } = __require("fs/promises");
106961
106961
  const { resolve: resolve$8, basename: basename$4, dirname: dirname$4 } = __require("path");
106962
106962
  const normalizePackageBin = require_lib$21();
106963
- const readPackage = ({ path, packageJsonCache }) => packageJsonCache.has(path) ? Promise.resolve(packageJsonCache.get(path)) : readFile$3(path).then((json) => {
106963
+ const readPackage = ({ path, packageJsonCache }) => packageJsonCache.has(path) ? Promise.resolve(packageJsonCache.get(path)) : readFile$2(path).then((json) => {
106964
106964
  const pkg = normalizePackageBin(JSON.parse(json));
106965
106965
  packageJsonCache.set(path, pkg);
106966
106966
  return pkg;
@@ -112489,7 +112489,7 @@ var require_lib$10 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
112489
112489
  //#region ../../node_modules/npm-packlist/lib/index.js
112490
112490
  var require_lib$9 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
112491
112491
  const { Walker: IgnoreWalker } = require_lib$10();
112492
- const { lstatSync: lstat$1, readFileSync: readFile$2 } = __require("fs");
112492
+ const { lstatSync: lstat$1, readFileSync: readFile$1 } = __require("fs");
112493
112493
  const { basename: basename$3, dirname: dirname$3, extname: extname$1, join: join$2, relative, resolve: resolve$6, sep } = __require("path");
112494
112494
  const { log } = require_lib$29();
112495
112495
  const defaultRules = Symbol("npm-packlist.rules.default");
@@ -112523,7 +112523,7 @@ var require_lib$9 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
112523
112523
  const normalizePath = (path) => path.split("\\").join("/");
112524
112524
  const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
112525
112525
  for (const file of [".npmignore", ".gitignore"]) try {
112526
- const ignoreContent = readFile$2(join$2(root, file), { encoding: "utf8" });
112526
+ const ignoreContent = readFile$1(join$2(root, file), { encoding: "utf8" });
112527
112527
  result.push(ignoreContent);
112528
112528
  break;
112529
112529
  } catch (err) {
@@ -151260,6 +151260,17 @@ async function isOnline() {
151260
151260
  lastCheckTime = now;
151261
151261
  return isOnlineCached;
151262
151262
  }
151263
+ function allowPrereleaseInRange(rangeStr) {
151264
+ try {
151265
+ return new import_semver.default.Range(rangeStr).set.map((conj) => conj.map((c) => {
151266
+ const v = c.semver;
151267
+ if (v.prerelease && v.prerelease.length) return c.operator + v.format();
151268
+ return c.operator + v.major + "." + v.minor + "." + v.patch + "-0";
151269
+ }).join(" ")).join(" || ");
151270
+ } catch {
151271
+ return rangeStr;
151272
+ }
151273
+ }
151263
151274
  /**
151264
151275
  * Robust utility to fetch, cache, and resolve an NPM package.
151265
151276
  * Centralized in core-node to avoid circular dependencies.
@@ -151282,6 +151293,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
151282
151293
  const ctx = options.context;
151283
151294
  const baseDir = ctx.getPackagesPath(packageName);
151284
151295
  let resolvedVersion;
151296
+ const includePrerelease = !!(ctx.releaseTag && ctx.releaseTag !== "latest");
151285
151297
  let resolvedVersionOrRange = versionOrRange;
151286
151298
  if (resolvedVersionOrRange === "local") resolvedVersionOrRange = "latest";
151287
151299
  console.log(`[Fetcher] Resolving ${packageName}@${resolvedVersionOrRange || "latest"}...`);
@@ -151289,7 +151301,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
151289
151301
  if (!await isOnline()) {
151290
151302
  console.warn(`[Fetcher] ${packageName}: offline mode detected (${Date.now() - resolveStart}ms), trying local fallback...`);
151291
151303
  const fallbackStart = Date.now();
151292
- const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName);
151304
+ const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName, includePrerelease);
151293
151305
  if (fallbackVersion) {
151294
151306
  resolvedVersion = fallbackVersion;
151295
151307
  console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
@@ -151304,7 +151316,27 @@ async function fetchPackage(packageName, versionOrRange, options) {
151304
151316
  const packument = await packumentPromise;
151305
151317
  const versions = Object.keys(packument.versions);
151306
151318
  const range = resolvedVersionOrRange || "latest";
151307
- let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range);
151319
+ let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range, { includePrerelease });
151320
+ if (!foundVersion && ctx.releaseTag && ctx.releaseTag !== "latest") {
151321
+ const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
151322
+ if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
151323
+ const rewrittenRangeForCheck = allowPrereleaseInRange(range);
151324
+ if (import_semver.default.satisfies(releaseTagVersion, rewrittenRangeForCheck, { includePrerelease: true })) {
151325
+ console.log(`[Fetcher] Using release tag "${ctx.releaseTag}" (${releaseTagVersion}) for ${packageName}@${range} because it satisfies the range`);
151326
+ foundVersion = releaseTagVersion;
151327
+ }
151328
+ }
151329
+ }
151330
+ if (!foundVersion && includePrerelease) {
151331
+ const rewrittenRange = allowPrereleaseInRange(range);
151332
+ if (rewrittenRange !== range) {
151333
+ const matched = import_semver.default.maxSatisfying(versions, rewrittenRange, { includePrerelease });
151334
+ if (matched) {
151335
+ console.log(`[Fetcher] Resolved ${packageName}@${range} to ${matched} via rewritten range ${rewrittenRange}`);
151336
+ foundVersion = matched;
151337
+ }
151338
+ }
151339
+ }
151308
151340
  if (range === "latest" && ctx.releaseTag && ctx.releaseTag !== "latest") {
151309
151341
  const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
151310
151342
  if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
@@ -151320,7 +151352,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
151320
151352
  } catch (error) {
151321
151353
  console.warn(`[Fetcher] ${packageName}: remote resolution failed (${Date.now() - resolveStart}ms), trying local fallback...`);
151322
151354
  const fallbackStart = Date.now();
151323
- const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, error, baseDir, packageName);
151355
+ const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, error, baseDir, packageName, includePrerelease);
151324
151356
  if (fallbackVersion) {
151325
151357
  resolvedVersion = fallbackVersion;
151326
151358
  console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
@@ -151541,7 +151573,7 @@ async function tryResolveMonorepoPackage(packageName) {
151541
151573
  let entryPoint;
151542
151574
  try {
151543
151575
  const pkgPath = join(packageDir, "package.json");
151544
- const pkg = JSON.parse(await readFile$1(pkgPath, "utf-8"));
151576
+ const pkg = JSON.parse(await readFile(pkgPath, "utf-8"));
151545
151577
  const publishMain = pkg.publishConfig?.module || pkg.publishConfig?.main;
151546
151578
  const devMain = pkg.module || pkg.main;
151547
151579
  const binField = typeof pkg.bin === "string" ? pkg.bin : pkg.bin?.[packageName.replace("@pipelab/", "")] || (pkg.bin ? pkg.bin[Object.keys(pkg.bin)[0]] : void 0);
@@ -151575,7 +151607,7 @@ async function crawlMonorepoPackages() {
151575
151607
  for (const entry of entries) if (entry.isDirectory()) {
151576
151608
  const pkgPath = join(fullDir, entry.name, "package.json");
151577
151609
  if (existsSync(pkgPath)) try {
151578
- const pkg = JSON.parse(await readFile$1(pkgPath, "utf-8"));
151610
+ const pkg = JSON.parse(await readFile(pkgPath, "utf-8"));
151579
151611
  if (pkg.name) cache[pkg.name] = join(fullDir, entry.name);
151580
151612
  } catch (e) {}
151581
151613
  }
@@ -151583,7 +151615,7 @@ async function crawlMonorepoPackages() {
151583
151615
  }
151584
151616
  return cache;
151585
151617
  }
151586
- async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix) {
151618
+ async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix, includePrerelease = false) {
151587
151619
  if (!existsSync(baseDir)) return null;
151588
151620
  try {
151589
151621
  const localVersions = (await readdir(baseDir, { withFileTypes: true })).filter((e) => e.isDirectory() || e.isSymbolicLink()).map((e) => e.name).filter((name) => !!import_semver.default.valid(name));
@@ -151596,7 +151628,7 @@ async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix) {
151596
151628
  return latestLocal;
151597
151629
  }
151598
151630
  } else {
151599
- const matched = import_semver.default.maxSatisfying(localVersions, range);
151631
+ const matched = import_semver.default.maxSatisfying(localVersions, range, { includePrerelease });
151600
151632
  if (matched) {
151601
151633
  console.info(`[Fetcher] ${logPrefix}: Using locally cached matching version: ${matched} for range ${range}`);
151602
151634
  return matched;
@@ -151614,7 +151646,7 @@ async function resolveEntryPoint(packageDir, packageName) {
151614
151646
  try {
151615
151647
  const pkgPath = join(packageDir, "package.json");
151616
151648
  if (!existsSync(pkgPath)) return void 0;
151617
- const pkg = JSON.parse(await readFile$1(pkgPath, "utf-8"));
151649
+ const pkg = JSON.parse(await readFile(pkgPath, "utf-8"));
151618
151650
  const main = pkg.module || pkg.main || pkg.publishConfig?.module || pkg.publishConfig?.main;
151619
151651
  if (main) return join(packageDir, main);
151620
151652
  if (pkg.bin) {
@@ -157177,7 +157209,7 @@ const tauri = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
157177
157209
  });
157178
157210
  const placeAppFolder = join(destinationFolder, "src", "app");
157179
157211
  if (appFolder && action !== "preview") await cp(appFolder, placeAppFolder, { recursive: true });
157180
- writeFile$1(join(destinationFolder, "config.cjs"), `module.exports = ${JSON.stringify(completeConfiguration, void 0, 2)}`, "utf8");
157212
+ writeFile(join(destinationFolder, "config.cjs"), `module.exports = ${JSON.stringify(completeConfiguration, void 0, 2)}`, "utf8");
157181
157213
  const sanitizedName = kebabCase(completeConfiguration.name);
157182
157214
  log("Package.json update");
157183
157215
  const pkgJSONPath = join(destinationFolder, "package.json");
@@ -157190,14 +157222,14 @@ const tauri = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
157190
157222
  await writeFile(pkgJSONPath, JSON.stringify(pkgJSON, null, 2));
157191
157223
  log("Cargo.toml update");
157192
157224
  const cargoTomlPath = join(destinationFolder, "src-tauri", "Cargo.toml");
157193
- const cargoToml = i(await readFile$1(cargoTomlPath, "utf8"));
157225
+ const cargoToml = i(await readFile(cargoTomlPath, "utf8"));
157194
157226
  log("Setting name to", sanitizedName);
157195
157227
  console.log("cargoToml", cargoToml);
157196
157228
  cargoToml.name = sanitizedName;
157197
157229
  log("Setting version to", completeConfiguration.appVersion);
157198
157230
  cargoToml.version = completeConfiguration.appVersion;
157199
157231
  console.log("cargoToml", a(cargoToml));
157200
- await writeFile$1(cargoTomlPath, a(cargoToml));
157232
+ await writeFile(cargoTomlPath, a(cargoToml));
157201
157233
  log("Tauri.conf.json update");
157202
157234
  const tauriConfJSONPath = join(destinationFolder, "src-tauri", "tauri.conf.json");
157203
157235
  const tauriConfJSONContent = await readFile(tauriConfJSONPath, "utf8");
@@ -157211,7 +157243,7 @@ const tauri = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
157211
157243
  if (action === "preview") {
157212
157244
  log("Setting build.devUrl to", appFolder);
157213
157245
  tauriConfJSON.build.devUrl = appFolder;
157214
- await writeFile$1(tauriConfJSONPath, JSON.stringify(tauriConfJSON, null, 2));
157246
+ await writeFile(tauriConfJSONPath, JSON.stringify(tauriConfJSON, null, 2));
157215
157247
  }
157216
157248
  log("Installing packages");
157217
157249
  const { all } = await runPnpm(destinationFolder, {
@@ -157428,7 +157460,9 @@ const defaultTauriConfig = {
157428
157460
  discordAppId: "",
157429
157461
  ignore: [],
157430
157462
  backgroundColor: "#FFF",
157431
- openDevtoolsOnStart: false
157463
+ openDevtoolsOnStart: false,
157464
+ enableDoctor: false,
157465
+ serverMode: "default"
157432
157466
  };
157433
157467
  //#endregion
157434
157468
  //#region src/make.ts