@ahmedrowaihi/8n 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +14 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -36989,6 +36989,18 @@ async function installDependencies(options = {}) {
36989
36989
 
36990
36990
  //#endregion
36991
36991
  //#region src/web-app.ts
36992
+ async function checkSelfUpdate() {
36993
+ try {
36994
+ const res = await fetch("https://registry.npmjs.org/@ahmedrowaihi/8n/latest", {
36995
+ headers: { Accept: "application/json" },
36996
+ signal: AbortSignal.timeout(3e3)
36997
+ });
36998
+ if (!res.ok) return;
36999
+ const { version: latest } = await res.json();
37000
+ const current = "0.4.2";
37001
+ if (latest !== current) console.log(import_picocolors.default.yellow("⚠") + import_picocolors.default.dim(` new CLI version available: `) + import_picocolors.default.cyan(latest) + import_picocolors.default.dim(` (current: ${current}) — run `) + import_picocolors.default.cyan("npm i -g @ahmedrowaihi/8n") + import_picocolors.default.dim(" to update"));
37002
+ } catch {}
37003
+ }
36992
37004
  const DEFAULT_REPO = "ahmedrowaihi/fumadocsudo";
36993
37005
  function getRepo() {
36994
37006
  return process.env.SUDOCS_REPO ?? DEFAULT_REPO;
@@ -37076,6 +37088,7 @@ async function dev() {
37076
37088
  return;
37077
37089
  }
37078
37090
  console.log(import_picocolors.default.dim(" checking for updates..."));
37091
+ checkSelfUpdate();
37079
37092
  let sudocsDir;
37080
37093
  try {
37081
37094
  const result = await prepareSudocs(fallbackDir, { version: config.version });
@@ -37263,7 +37276,7 @@ async function init() {
37263
37276
 
37264
37277
  //#endregion
37265
37278
  //#region src/index.ts
37266
- const program = new Command().name("8n").description("Run your Thmanyah docs site").version("0.1.0");
37279
+ const program = new Command().name("8n").description("Run your Thmanyah docs site").version("0.4.2");
37267
37280
  program.command("init").description("Scaffold a new docs project in the current directory").action(init);
37268
37281
  program.command("dev").description("Start the dev server").action(dev);
37269
37282
  program.command("build").description("Build for production").action(build);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahmedrowaihi/8n",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Thmanyah Docs — run your docs site from your content directory",
5
5
  "type": "module",
6
6
  "bin": {