@ahmedrowaihi/8n 0.5.2 → 0.5.4

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 +17 -7
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { builtinModules, createRequire } from "node:module";
3
3
  import { spawn } from "node:child_process";
4
4
  import path, { delimiter, dirname, join, normalize, resolve } from "node:path";
5
- import fs, { appendFileSync, existsSync, mkdirSync, promises, readFileSync, readdirSync, realpathSync, statSync, writeFileSync } from "node:fs";
5
+ import fs, { appendFileSync, existsSync, mkdirSync, promises, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
6
6
  import process$1, { cwd } from "node:process";
7
7
  import { PassThrough } from "node:stream";
8
8
  import c from "node:readline";
@@ -15048,7 +15048,7 @@ const preprocessType = ZodEffects.createWithPreprocess;
15048
15048
  const pipelineType = ZodPipeline.create;
15049
15049
 
15050
15050
  //#endregion
15051
- //#region ../core/dist/index.mjs
15051
+ //#region ../core/src/config.ts
15052
15052
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
15053
15053
  const configSchema = objectType({
15054
15054
  content: stringType().default("./content"),
@@ -15109,13 +15109,17 @@ function spinner(text) {
15109
15109
  const id = setInterval(() => {
15110
15110
  process.stdout.write(`\r${import_picocolors.default.cyan(FRAMES[i++ % FRAMES.length])} ${import_picocolors.default.dim(text)}`);
15111
15111
  }, 80);
15112
+ function clear() {
15113
+ clearInterval(id);
15114
+ process.stdout.clearLine?.(0);
15115
+ }
15112
15116
  return {
15113
15117
  succeed(msg) {
15114
- clearInterval(id);
15118
+ clear();
15115
15119
  process.stdout.write(`\r${import_picocolors.default.green("✓")} ${import_picocolors.default.dim(msg)}\n`);
15116
15120
  },
15117
15121
  fail(msg) {
15118
- clearInterval(id);
15122
+ clear();
15119
15123
  process.stdout.write(`\r${import_picocolors.default.red("✗")} ${msg}\n`);
15120
15124
  }
15121
15125
  };
@@ -15142,7 +15146,7 @@ async function checkSelfUpdate() {
15142
15146
  });
15143
15147
  if (!res.ok) return;
15144
15148
  const { version: latest } = await res.json();
15145
- const current = "0.5.2";
15149
+ const current = "0.5.4";
15146
15150
  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"));
15147
15151
  } catch {}
15148
15152
  }
@@ -15289,7 +15293,13 @@ async function build() {
15289
15293
  stdio: "inherit",
15290
15294
  env: buildEnv(config, contentDir)
15291
15295
  } });
15292
- console.log(import_picocolors.default.green("✓") + import_picocolors.default.dim(" build complete"));
15296
+ const outDir = join(process.cwd(), ".next");
15297
+ if (existsSync(outDir)) rmSync(outDir, {
15298
+ recursive: true,
15299
+ force: true
15300
+ });
15301
+ renameSync(join(sudocsDir, ".next"), outDir);
15302
+ console.log(import_picocolors.default.green("✓") + import_picocolors.default.dim(` build complete → ${outDir}`));
15293
15303
  }
15294
15304
 
15295
15305
  //#endregion
@@ -15429,7 +15439,7 @@ async function init() {
15429
15439
 
15430
15440
  //#endregion
15431
15441
  //#region src/index.ts
15432
- const program = new Command().name("8n").description("Run your Thmanyah docs site").version("0.5.2").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
15442
+ const program = new Command().name("8n").description("Run your Thmanyah docs site").version("0.5.4").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
15433
15443
  if (cmd.opts().debug) process.env.DEBUG_8N = "1";
15434
15444
  });
15435
15445
  program.command("init").description("Scaffold a new docs project in the current directory").action(init);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahmedrowaihi/8n",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Thmanyah Docs — run your docs site from your content directory",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,6 +9,10 @@
9
9
  "exports": {
10
10
  ".": "./dist/index.mjs"
11
11
  },
12
+ "scripts": {
13
+ "build": "tsdown",
14
+ "dev": "tsdown --watch"
15
+ },
12
16
  "files": [
13
17
  "dist"
14
18
  ],
@@ -17,17 +21,13 @@
17
21
  "nanotar": "^0.3.0"
18
22
  },
19
23
  "devDependencies": {
24
+ "@ahmedrowaihi/8n-core": "workspace:*",
20
25
  "@types/node": "^22.0.0",
21
26
  "c12": "^2.0.0",
22
27
  "commander": "^14.0.0",
23
28
  "nypm": "^0.3.0",
24
29
  "picocolors": "^1.1.0",
25
30
  "tinyexec": "^1.0.0",
26
- "tsdown": "^0.20.0",
27
- "@ahmedrowaihi/8n-core": "0.2.0"
28
- },
29
- "scripts": {
30
- "build": "tsdown",
31
- "dev": "tsdown --watch"
31
+ "tsdown": "^0.20.0"
32
32
  }
33
- }
33
+ }