@diagc/cli 0.14.2 → 1.0.0

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.
@@ -1,5 +1,5 @@
1
1
  import { isIP } from 'node:net';
2
- import { errMessage } from '@diagc/core';
2
+ import { errMessage } from '@diagc/core/internal';
3
3
  import { matchRoute } from './routes.js';
4
4
  async function readBody(req) {
5
5
  const chunks = [];
@@ -1,4 +1,4 @@
1
- import { type DiagramModel } from '@diagc/core';
1
+ import { type DiagramModel } from '@diagc/core/internal';
2
2
  export interface HandlerResult {
3
3
  status: number;
4
4
  body: unknown;
@@ -1,7 +1,7 @@
1
1
  import { access, mkdir, readFile, readdir, rename, unlink } from 'node:fs/promises';
2
2
  import { createHash } from 'node:crypto';
3
3
  import path from 'node:path';
4
- import { IMAGE_REF, composeIncludes, errMessage, isDrawings, isLayoutOverlay, validate, } from '@diagc/core';
4
+ import { IMAGE_REF, composeIncludes, errMessage, isDrawings, isLayoutOverlay, validate, } from '@diagc/core/internal';
5
5
  import { writeFileAtomic } from '../atomic-write.js';
6
6
  import { EjectError, ejectDiagram } from '../eject.js';
7
7
  import { resolveInclude } from '../includes.js';
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import { existsSync, statSync } from 'node:fs';
23
23
  import path from 'node:path';
24
24
  import { fileURLToPath } from 'node:url';
25
25
  import fg from 'fast-glob';
26
- import { errMessage } from '@diagc/core';
26
+ import { errMessage } from '@diagc/core/internal';
27
27
  import { compileFile } from './compile.js';
28
28
  import { compareDiagramSets, formatDiffSummary, loadDiagramSet, writeDiffPages } from './diff.js';
29
29
  import { checkoutDiagrams } from './git-ref.js';
package/dist/compile.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type DiagramModel, type IncludeResolver } from '@diagc/core';
1
+ import { type DiagramModel, type IncludeResolver } from '@diagc/core/internal';
2
2
  /**
3
3
  * A source that threw while running — a misspelled method, a builder call that
4
4
  * refused — placed at the first stack frame inside that file. V8 writes the file
package/dist/compile.js CHANGED
@@ -2,7 +2,7 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
2
  import { createRequire } from 'node:module';
3
3
  import path from 'node:path';
4
4
  import { createJiti } from 'jiti';
5
- import { composeIncludes, DiagramValidationError, diagramWarnings, errMessage, validate, } from '@diagc/core';
5
+ import { composeIncludes, DiagramValidationError, diagramWarnings, errMessage, validate, } from '@diagc/core/internal';
6
6
  import { resolveInclude } from './includes.js';
7
7
  import { snapshotSession } from './snapshots.js';
8
8
  /**
package/dist/diff.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type DiagramModel, type Drawings, type LayoutOverlay, type ModelDiff } from '@diagc/core';
1
+ import { type DiagramModel, type Drawings, type LayoutOverlay, type ModelDiff } from '@diagc/core/internal';
2
2
  /** One diagram as a version of the repo had it: the compiled model plus the
3
3
  * sidecars a picture of it needs. */
4
4
  export interface DiagramVersion {
package/dist/diff.js CHANGED
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
2
2
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import fg from 'fast-glob';
5
- import { diffMarks, diffModels, errMessage, isDrawings, isEmptyDiff, } from '@diagc/core';
5
+ import { diffMarks, diffModels, errMessage, isDrawings, isEmptyDiff, } from '@diagc/core/internal';
6
6
  import { loadModel } from './compile.js';
7
7
  import { inlineAssets } from './publish/publish.js';
8
8
  import { stampHtml } from './publish/html.js';
package/dist/eject.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type DiagramModel } from '@diagc/core';
1
+ import { type DiagramModel } from '@diagc/core/internal';
2
2
  export type EjectFailure = 'not-found' | 'already-ts' | 'invalid' | 'mismatch';
3
3
  export declare class EjectError extends Error {
4
4
  readonly code: EjectFailure;
package/dist/eject.js CHANGED
@@ -2,7 +2,7 @@ import { access, mkdtemp, readFile, rm, unlink, writeFile } from 'node:fs/promis
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
4
  import { isDeepStrictEqual } from 'node:util';
5
- import { ejectSource, errMessage, validate } from '@diagc/core';
5
+ import { ejectSource, errMessage, validate } from '@diagc/core/internal';
6
6
  import { compileFile, executeDiagramTs } from './compile.js';
7
7
  import { resolveInclude } from './includes.js';
8
8
  import { snapshotSession } from './snapshots.js';
package/dist/guide.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
2
  import path from 'node:path';
3
- import { NODE_TYPES, NOTATION_NODE_TYPES, NOTATION_RELATION_KINDS, RELATION_KINDS } from '@diagc/core';
3
+ import { NODE_TYPES, NOTATION_NODE_TYPES, NOTATION_RELATION_KINDS, RELATION_KINDS } from '@diagc/core/internal';
4
4
  import { UnknownStarterError, readStarter } from './starters.js';
5
5
  const INDEX = 'index';
6
6
  /** `diagc guide all`: the index, then every topic — for a reader who cannot ask
@@ -1,4 +1,4 @@
1
- import type { IncludeSource } from '@diagc/core';
1
+ import type { IncludeSource } from '@diagc/core/internal';
2
2
  export declare const AUTH_TOKENS_ENV = "DIAGC_AUTH_TOKENS";
3
3
  /**
4
4
  * Credentials for private include hosts, in Deno's `DENO_AUTH_TOKENS` format:
package/dist/init.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type IncludeResolver } from '@diagc/core';
1
+ import { type IncludeResolver } from '@diagc/core/internal';
2
2
  /** What `diagc init` works with. `cwd` is the directory being set up — the
3
3
  * current directory in the CLI, a temp dir in tests — and every path is built
4
4
  * from it, so nothing here reads `process.cwd()`. */
package/dist/init.js CHANGED
@@ -2,7 +2,7 @@ import { existsSync, statSync } from 'node:fs';
2
2
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import fg from 'fast-glob';
5
- import { errMessage } from '@diagc/core';
5
+ import { errMessage } from '@diagc/core/internal';
6
6
  import { isSafeName } from './api/handlers.js';
7
7
  import { compileFile } from './compile.js';
8
8
  import { readStarter, UnknownStarterError } from './starters.js';
package/dist/lint.js CHANGED
@@ -1,4 +1,4 @@
1
- import { diagramWarnings, errMessage } from '@diagc/core';
1
+ import { diagramWarnings, errMessage } from '@diagc/core/internal';
2
2
  import { LoadError, loadModel } from './compile.js';
3
3
  const report = (file, severity, i) => ({
4
4
  file,
@@ -1,4 +1,4 @@
1
- import type { DiagramModel } from '@diagc/core';
1
+ import type { DiagramModel } from '@diagc/core/internal';
2
2
  export declare function dataUri(bytes: Buffer, ext: string): string;
3
3
  /**
4
4
  * Classify an asset ref so publish-time code knows whether/where to read it from disk.
@@ -1,4 +1,4 @@
1
- import { SOURCE_URL } from '@diagc/core';
1
+ import { SOURCE_URL } from '@diagc/core/internal';
2
2
  export declare const DG_DATA_SENTINEL = "\"__DG_DIAGRAM_DATA__\"";
3
3
  export { SOURCE_URL };
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { SOURCE_URL } from '@diagc/core';
1
+ import { SOURCE_URL } from '@diagc/core/internal';
2
2
  export const DG_DATA_SENTINEL = '"__DG_DIAGRAM_DATA__"';
3
3
  export { SOURCE_URL };
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type { DiagramModel } from '@diagc/core';
1
+ import type { DiagramModel } from '@diagc/core/internal';
2
2
  export interface PublishOptions {
3
3
  srcDir: string;
4
4
  artifactsDir: string;
@@ -1,6 +1,6 @@
1
1
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { errMessage, isDrawings } from '@diagc/core';
3
+ import { errMessage, isDrawings } from '@diagc/core/internal';
4
4
  import { classifyAssetRef, rewriteAssetRefs, safeAssetPath } from './assets.js';
5
5
  import { buildGallery } from './gallery.js';
6
6
  import { discoverDiagrams } from './discover.js';
package/dist/serve.js CHANGED
@@ -2,7 +2,7 @@ import { createReadStream } from 'node:fs';
2
2
  import { stat } from 'node:fs/promises';
3
3
  import { createServer } from 'node:http';
4
4
  import path from 'node:path';
5
- import { errMessage } from '@diagc/core';
5
+ import { errMessage } from '@diagc/core/internal';
6
6
  import { handleApiRequest } from './api/dispatch.js';
7
7
  import * as handlers from './api/handlers.js';
8
8
  /** Content types for what a Vite build actually emits, plus the image formats a
@@ -1,4 +1,4 @@
1
- import { type IncludeResolver } from '@diagc/core';
1
+ import { type IncludeResolver } from '@diagc/core/internal';
2
2
  export type SnapshotMode = 'locked' | 'update';
3
3
  export interface SnapshotSession {
4
4
  resolver: IncludeResolver;
package/dist/snapshots.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
- import { IncludeError } from '@diagc/core';
4
+ import { IncludeError } from '@diagc/core/internal';
5
5
  const LOCK_NAME = 'includes.lock.json';
6
6
  const VENDOR_DIR = 'includes';
7
7
  const isHttp = (s) => /^https?:\/\//.test(s);
package/dist/watch.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type IncludeResolver } from '@diagc/core';
1
+ import { type IncludeResolver } from '@diagc/core/internal';
2
2
  export type WatchEvent = {
3
3
  file: string;
4
4
  ok: true;
package/dist/watch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { watch as chokidarWatch } from 'chokidar';
2
- import { errMessage } from '@diagc/core';
2
+ import { errMessage } from '@diagc/core/internal';
3
3
  import { compileFile } from './compile.js';
4
4
  /** Human-readable rendering of a compile event, shared by the one-shot
5
5
  * `compile` command, the `watch` command's live log, and the `studio` watcher
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagc/cli",
3
- "version": "0.14.2",
3
+ "version": "1.0.0",
4
4
  "description": "Author software-architecture diagrams as code, compile them to a validated model, edit them in a local studio, and publish pages and images.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Bogdan Frankovskyi",
@@ -44,7 +44,7 @@
44
44
  "fast-glob": "^3.3.0",
45
45
  "jiti": "^2.0.0",
46
46
  "playwright-core": "^1.62.0",
47
- "@diagc/core": "0.14.2"
47
+ "@diagc/core": "1.0.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"