@naulon/sdk 0.1.0 → 0.1.1
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 +34 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @naulon/sdk
|
|
2
|
+
|
|
3
|
+
The publisher SDK for the naulon citation toll — the credits contract, the
|
|
4
|
+
settlement wire types, and the helpers a site uses to get tolled.
|
|
5
|
+
|
|
6
|
+
This is the money-routing trust boundary in one place: `ArticleCredits` (what a
|
|
7
|
+
page is worth and who gets paid), the validators that keep a credits response
|
|
8
|
+
honest, the HMAC sign/verify used on the settlement path, and the credits
|
|
9
|
+
resolvers the gate calls. It also ships the crawl engine behind the `naulon` /
|
|
10
|
+
`naulon-kit` CLI — discover a site's tollable articles from its RSS or sitemap —
|
|
11
|
+
and framework adapters for exposing a credits route and receiving settlement.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @naulon/sdk
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Entry points
|
|
20
|
+
|
|
21
|
+
- `@naulon/sdk` — the contract types, validators, crypto (sign/verify), credits
|
|
22
|
+
resolvers, and the crawl engine.
|
|
23
|
+
- `@naulon/sdk/next` · `@naulon/sdk/express` — credits-route + settlement-receiver
|
|
24
|
+
adapters for those frameworks (both optional peer deps).
|
|
25
|
+
- `@naulon/sdk/cli` — the `naulon` / `naulon-kit` command entry.
|
|
26
|
+
|
|
27
|
+
## What it is not
|
|
28
|
+
|
|
29
|
+
For in-app enforcement — the 402-at-the-edge middleware a site drops into its
|
|
30
|
+
request pipeline — use [`@naulon/enforce`](https://www.npmjs.com/package/@naulon/enforce).
|
|
31
|
+
The gate shell (`@naulon/tollgate`) is not published to npm; it ships as a
|
|
32
|
+
container image.
|
|
33
|
+
|
|
34
|
+
MIT.
|
package/dist/index.d.ts
CHANGED
|
@@ -15,4 +15,7 @@ export * from "./resolver/types.ts";
|
|
|
15
15
|
export * from "./resolver/http.ts";
|
|
16
16
|
export * from "./resolver/fixture.ts";
|
|
17
17
|
export * from "./idempotency.ts";
|
|
18
|
+
export { runCrawl, type CrawlOptions, type CrawlResult } from "./crawl/crawl.ts";
|
|
19
|
+
export { makeGuardedFetcher } from "./crawl/fetcher.ts";
|
|
20
|
+
export type { CrawlConfig, DiscoveredArticle, SourceAdapterId } from "./crawl/types.ts";
|
|
18
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,4 +15,8 @@ export * from "./resolver/types.js";
|
|
|
15
15
|
export * from "./resolver/http.js";
|
|
16
16
|
export * from "./resolver/fixture.js";
|
|
17
17
|
export * from "./idempotency.js";
|
|
18
|
+
// The crawl engine — shared verbatim by the `naulon-kit crawl` CLI and the
|
|
19
|
+
// self-host console's Content tab, so the two front-doors never drift.
|
|
20
|
+
export { runCrawl } from "./crawl/crawl.js";
|
|
21
|
+
export { makeGuardedFetcher } from "./crawl/fetcher.js";
|
|
18
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,2EAA2E;AAC3E,uEAAuE;AACvE,OAAO,EAAE,QAAQ,EAAuC,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|