@karmaniverous/stan-core 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  > Engine for STAN — programmatic archiving/diffing, patch application, config loading, file selection, and imports staging. No CLI/TTY concerns.
2
2
 
3
- # @karmaniverous/stan-core (engine)
4
-
3
+ # @karmaniverous/stan-core (engine)
5
4
  [![npm version](https://img.shields.io/npm/v/@karmaniverous/stan-core.svg)](https://www.npmjs.com/package/@karmaniverous/stan-core) ![Node Current](https://img.shields.io/node/v/@karmaniverous/stan-core) [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](./LICENSE) [Changelog](./CHANGELOG.md)
6
5
 
7
6
  This package exposes the STAN engine as a library:
@@ -10,11 +9,10 @@ This package exposes the STAN engine as a library:
10
9
  - Archiving: full archive.tar and diff archive.diff.tar (binary screening)
11
10
  - Patch engine: worktree‑first git apply cascade with jsdiff fallback
12
11
  - File Ops: safe mv/rm/rmdir/mkdirp block as “pre‑ops”
13
- - Config loading/validation (stan.config.yml|json)
12
+ - Config loading/validation (top‑level `stan-core` in stan.config.yml|json)
14
13
  - Imports staging under <stanPath>/imports/<label>/…
15
14
  - Response‑format validator (optional)
16
-
17
- For the CLI and TTY runner, see @karmaniverous/stan-cli.
15
+
18
16
 
19
17
  ## Install
20
18
 
@@ -90,17 +88,37 @@ if (!out.ok) {
90
88
  }
91
89
  ```
92
90
 
93
- Load and validate config (stan.config.yml|json), including cliDefaults mapping:
91
+ Load and validate repo config (namespaced `stan-core` in stan.config.yml|json):
92
+
93
+ YAML example:
94
+
95
+ ```yaml
96
+ stan-core:
97
+ stanPath: .stan
98
+ includes: []
99
+ excludes:
100
+ - CHANGELOG.md
101
+ imports:
102
+ cli-docs:
103
+ - ../stan-cli/.stan/system/stan.requirements.md
104
+ - ../stan-cli/.stan/system/stan.todo.md
105
+ ```
106
+
107
+ TypeScript:
94
108
 
95
109
  ```ts
96
110
  import { loadConfig } from '@karmaniverous/stan-core/stan/config';
111
+
97
112
  const cfg = await loadConfig(process.cwd());
98
- // cfg.stanPath, cfg.scripts, cfg.includes/excludes, cfg.cliDefaults, ...
113
+ // cfg has the minimal engine shape:
114
+ // {
115
+ // stanPath: string; includes?: string[]; excludes?: string[];
116
+ // imports?: Record<string, string[]>
117
+ // }
99
118
  ```
100
119
 
101
120
  Stage external imports under <stanPath>/imports/<label>/… before archiving:
102
-
103
- ```ts
121
+
104
122
  import { prepareImports } from '@karmaniverous/stan-core/stan';
105
123
  await prepareImports({
106
124
  cwd: process.cwd(),
@@ -132,6 +150,10 @@ Top‑level (via `import '@karmaniverous/stan-core/stan'`):
132
150
 
133
151
  See CHANGELOG for behavior changes. Typedoc site is generated from source.
134
152
 
153
+ ## Environment variables
154
+
155
+ See ENVIRONMENT.md for a complete list of environment variable switches observed by the engine, tests, and release scripts.
156
+
135
157
  ## License
136
158
 
137
159
  BSD‑3‑Clause