@wirecat/notion-cli 0.0.0-stage → 0.1.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/CHANGELOG.md +33 -0
- package/LICENSE +204 -0
- package/README.md +36 -2
- package/contracts/wirecat.json +1315 -0
- package/dist/bin/notion.d.ts +3 -0
- package/dist/bin/notion.d.ts.map +1 -0
- package/dist/bin/notion.js +40 -0
- package/dist/bin/notion.js.map +1 -0
- package/dist/bundle/all-profiles-OETMCOLN.js +278 -0
- package/dist/bundle/anthropic-5Y3O2TYM.js +91 -0
- package/dist/bundle/app-server-IVWBIVHC.js +231 -0
- package/dist/bundle/bun-EO636SAD.js +169 -0
- package/dist/bundle/bun-sqlite-C2T7QJ2M.js +76 -0
- package/dist/bundle/chunk-24FAYAML.js +52 -0
- package/dist/bundle/chunk-2YR3RYT4.js +73 -0
- package/dist/bundle/chunk-35K5T6WV.js +24 -0
- package/dist/bundle/chunk-3D3PFXBP.js +2315 -0
- package/dist/bundle/chunk-47R43UVJ.js +1068 -0
- package/dist/bundle/chunk-4GC5DBHW.js +100 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-64D5VUZ4.js +9564 -0
- package/dist/bundle/chunk-66PL7P4C.js +23 -0
- package/dist/bundle/chunk-7FII4DCE.js +362 -0
- package/dist/bundle/chunk-7N5QB6NL.js +156 -0
- package/dist/bundle/chunk-AE2KQ37N.js +95 -0
- package/dist/bundle/chunk-AQZO3ITW.js +58 -0
- package/dist/bundle/chunk-B2WFKFYL.js +1488 -0
- package/dist/bundle/chunk-B2XKEEFX.js +230 -0
- package/dist/bundle/chunk-B4B65XIO.js +73 -0
- package/dist/bundle/chunk-BWICUW7W.js +288 -0
- package/dist/bundle/chunk-CLG2ISQH.js +206 -0
- package/dist/bundle/chunk-CWVAYQXI.js +185 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DIM5YWBU.js +53 -0
- package/dist/bundle/chunk-EGTBL3MJ.js +6848 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-EPAZ7DJB.js +783 -0
- package/dist/bundle/chunk-ESZT4WW3.js +142 -0
- package/dist/bundle/chunk-EU5WCOMQ.js +4001 -0
- package/dist/bundle/chunk-F6MLJ3V5.js +72 -0
- package/dist/bundle/chunk-FF4DDBCB.js +1028 -0
- package/dist/bundle/chunk-GA3URWIF.js +46 -0
- package/dist/bundle/chunk-HRTIRRXR.js +3112 -0
- package/dist/bundle/chunk-HWRKURQH.js +54 -0
- package/dist/bundle/chunk-IQWEJEB5.js +39724 -0
- package/dist/bundle/chunk-JK44XO2S.js +392 -0
- package/dist/bundle/chunk-JKIN5TOU.js +131 -0
- package/dist/bundle/chunk-K5TWMQSY.js +188 -0
- package/dist/bundle/chunk-KHOVVPLC.js +18 -0
- package/dist/bundle/chunk-NLDYZBTC.js +5862 -0
- package/dist/bundle/chunk-OWJDC4CB.js +217 -0
- package/dist/bundle/chunk-QBC23NHD.js +38 -0
- package/dist/bundle/chunk-QC3KOJT4.js +300 -0
- package/dist/bundle/chunk-R6ZM45NF.js +1239 -0
- package/dist/bundle/chunk-RAZKIHGH.js +76 -0
- package/dist/bundle/chunk-RDZ7SVBZ.js +731 -0
- package/dist/bundle/chunk-RLSFOR2D.js +161 -0
- package/dist/bundle/chunk-RSIS7BR7.js +2778 -0
- package/dist/bundle/chunk-ST2UC7FS.js +1324 -0
- package/dist/bundle/chunk-TR7R5DL4.js +370 -0
- package/dist/bundle/chunk-TSCIIXN3.js +106 -0
- package/dist/bundle/chunk-UWIA2G6Q.js +12737 -0
- package/dist/bundle/chunk-UWW24JQF.js +66 -0
- package/dist/bundle/chunk-WK3OSDNV.js +1197 -0
- package/dist/bundle/chunk-WM7663C2.js +1221 -0
- package/dist/bundle/chunk-WVZFXI36.js +274 -0
- package/dist/bundle/chunk-WWMB4UHF.js +78 -0
- package/dist/bundle/chunk-XC5CKHX2.js +63 -0
- package/dist/bundle/chunk-XL2HXHP3.js +82 -0
- package/dist/bundle/chunk-XQUUANA2.js +24600 -0
- package/dist/bundle/chunk-XYIT2XB3.js +1372 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YA4LSSDZ.js +64499 -0
- package/dist/bundle/chunk-ZI3YTXSF.js +2 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-6G5DC2FN.js +35 -0
- package/dist/bundle/command-server-entry-A66DJ3MH.js +164 -0
- package/dist/bundle/decode-7XOFRAAT.js +163 -0
- package/dist/bundle/definitions-M3U4UYHN.js +45607 -0
- package/dist/bundle/dispatch-FEKU5UXC.js +411 -0
- package/dist/bundle/dist-YFKABFFF.js +7577 -0
- package/dist/bundle/echarts-XD2JSWU4.js +42501 -0
- package/dist/bundle/embed-F3HYGAF7.js +38 -0
- package/dist/bundle/embedder-GSEDDUH7.js +111 -0
- package/dist/bundle/failure-HDJLR2YJ.js +25 -0
- package/dist/bundle/first-run-TXNTIUSP.js +28 -0
- package/dist/bundle/first-screen-JZPJND7J.js +33 -0
- package/dist/bundle/instructions-NZGJ4FW5.js +11 -0
- package/dist/bundle/mcp-VFIOZDVY.js +167 -0
- package/dist/bundle/node-KM3CUABH.js +2340 -0
- package/dist/bundle/node-RPKPDYQS.js +176 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-KH2UUYVO.js +74 -0
- package/dist/bundle/notion.js +185 -0
- package/dist/bundle/oauth-NKAI7TQD.js +20 -0
- package/dist/bundle/open-WSAEAA2V.js +23 -0
- package/dist/bundle/openai-JPVDGHG5.js +238 -0
- package/dist/bundle/process-5ZFVKOQX.js +91 -0
- package/dist/bundle/program-M3D56D6T.js +28854 -0
- package/dist/bundle/prompt-FROYQ5LV.js +17 -0
- package/dist/bundle/recognize-NYCHQMCX.js +26 -0
- package/dist/bundle/remote-4OERF3Z4.js +32 -0
- package/dist/bundle/rerank-TEGXFUWY.js +52 -0
- package/dist/bundle/schemas-MZNNOEYN.js +12214 -0
- package/dist/bundle/serve-HLYYBAXY.js +199 -0
- package/dist/bundle/server-D5OYNEUW.js +193 -0
- package/dist/bundle/server-LWZGVMNW.js +62 -0
- package/dist/bundle/sqlite-runtime-H2S5RR2F.js +20 -0
- package/dist/bundle/state-OPOXCDZL.js +36 -0
- package/dist/bundle/store-NHMXEJPD.js +164 -0
- package/dist/bundle/store-Y3KRLCJ7.js +281 -0
- package/dist/bundle/store-maintenance-command-D4W7WSLQ.js +53 -0
- package/dist/commands/api.d.ts +4 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +140 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/comments.d.ts +3 -0
- package/dist/commands/comments.d.ts.map +1 -0
- package/dist/commands/comments.js +114 -0
- package/dist/commands/comments.js.map +1 -0
- package/dist/commands/databases.d.ts +3 -0
- package/dist/commands/databases.d.ts.map +1 -0
- package/dist/commands/databases.js +65 -0
- package/dist/commands/databases.js.map +1 -0
- package/dist/commands/documents.d.ts +3 -0
- package/dist/commands/documents.d.ts.map +1 -0
- package/dist/commands/documents.js +41 -0
- package/dist/commands/documents.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +104 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +46 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +58 -0
- package/dist/context.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +45603 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/manifest.d.ts +3 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +2089 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/metadata.d.ts +6 -0
- package/dist/generated/metadata.d.ts.map +1 -0
- package/dist/generated/metadata.js +24 -0
- package/dist/generated/metadata.js.map +1 -0
- package/dist/generated/schemas.d.ts +1223 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +11557 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +11120 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/identity.d.ts +7 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +29 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/notion/client.d.ts +42 -0
- package/dist/notion/client.d.ts.map +1 -0
- package/dist/notion/client.js +118 -0
- package/dist/notion/client.js.map +1 -0
- package/dist/notion/errors.d.ts +24 -0
- package/dist/notion/errors.d.ts.map +1 -0
- package/dist/notion/errors.js +102 -0
- package/dist/notion/errors.js.map +1 -0
- package/dist/notion/ids.d.ts +7 -0
- package/dist/notion/ids.d.ts.map +1 -0
- package/dist/notion/ids.js +37 -0
- package/dist/notion/ids.js.map +1 -0
- package/dist/notion/links.d.ts +6 -0
- package/dist/notion/links.d.ts.map +1 -0
- package/dist/notion/links.js +22 -0
- package/dist/notion/links.js.map +1 -0
- package/dist/notion/notion.d.ts +95 -0
- package/dist/notion/notion.d.ts.map +1 -0
- package/dist/notion/notion.js +269 -0
- package/dist/notion/notion.js.map +1 -0
- package/dist/notion/port.d.ts +13 -0
- package/dist/notion/port.d.ts.map +1 -0
- package/dist/notion/port.js +60 -0
- package/dist/notion/port.js.map +1 -0
- package/dist/notion/read-posts.d.ts +36 -0
- package/dist/notion/read-posts.d.ts.map +1 -0
- package/dist/notion/read-posts.js +24 -0
- package/dist/notion/read-posts.js.map +1 -0
- package/dist/notion/reads.d.ts +327 -0
- package/dist/notion/reads.d.ts.map +1 -0
- package/dist/notion/reads.js +18 -0
- package/dist/notion/reads.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +62 -0
- package/dist/program.js.map +1 -0
- package/dist/sample/comments.d.ts +61 -0
- package/dist/sample/comments.d.ts.map +1 -0
- package/dist/sample/comments.js +39 -0
- package/dist/sample/comments.js.map +1 -0
- package/dist/sample/records.d.ts +16 -0
- package/dist/sample/records.d.ts.map +1 -0
- package/dist/sample/records.js +22 -0
- package/dist/sample/records.js.map +1 -0
- package/dist/sample/transport.d.ts +42 -0
- package/dist/sample/transport.d.ts.map +1 -0
- package/dist/sample/transport.js +153 -0
- package/dist/sample/transport.js.map +1 -0
- package/dist/sync/cursor.d.ts +54 -0
- package/dist/sync/cursor.d.ts.map +1 -0
- package/dist/sync/cursor.js +52 -0
- package/dist/sync/cursor.js.map +1 -0
- package/dist/sync/front-matter.d.ts +10 -0
- package/dist/sync/front-matter.d.ts.map +1 -0
- package/dist/sync/front-matter.js +114 -0
- package/dist/sync/front-matter.js.map +1 -0
- package/dist/sync/markdown.d.ts +8 -0
- package/dist/sync/markdown.d.ts.map +1 -0
- package/dist/sync/markdown.js +40 -0
- package/dist/sync/markdown.js.map +1 -0
- package/dist/sync/source.d.ts +64 -0
- package/dist/sync/source.d.ts.map +1 -0
- package/dist/sync/source.js +634 -0
- package/dist/sync/source.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +85 -4
- package/skills/notion-cli/SKILL.md +34 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
2
|
+
import { answerEntity, commandPath, itemOf, listOf, outputFor, positiveCount, queryTerms, REMOTE_READ, renderAnswer, termField, withQuery, } from "@wirecat/cli-core/cli";
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
import { withNotion } from "../context.js";
|
|
5
|
+
import { IDENTITY } from "../identity.js";
|
|
6
|
+
import { notionId } from "../notion/ids.js";
|
|
7
|
+
import { databaseRowSchema, databaseSchema } from "../notion/notion.js";
|
|
8
|
+
const CLI = IDENTITY.command;
|
|
9
|
+
/** Notion's page size: a default of 100, which is also its most ([pagination](https://developers.notion.com/reference/pagination)). */
|
|
10
|
+
const LARGEST_PAGE = 100;
|
|
11
|
+
const DEFAULT_PAGE = 50;
|
|
12
|
+
/** Notion's search matches its `query` against titles ([search](https://developers.notion.com/reference/post-search)). */
|
|
13
|
+
const DATABASES_QUERY = {
|
|
14
|
+
entity: "database",
|
|
15
|
+
backend: "native",
|
|
16
|
+
fields: [termField("title", "txt", "title:Roadmap")],
|
|
17
|
+
};
|
|
18
|
+
const listCommand = () => withQuery(answerEntity(annotate(new Command("list"), {
|
|
19
|
+
effects: REMOTE_READ,
|
|
20
|
+
offline: false,
|
|
21
|
+
examples: [
|
|
22
|
+
`${CLI} personal databases list`,
|
|
23
|
+
`${CLI} personal databases list title:Roadmap --json=id,data_source_id,title`,
|
|
24
|
+
],
|
|
25
|
+
}), "database", databaseRowSchema), DATABASES_QUERY)
|
|
26
|
+
.summary("list the databases this token can see, live, one row per data source")
|
|
27
|
+
.description("list the databases this token can see, live from Notion's search: one row for each data source, with the " +
|
|
28
|
+
"database it belongs to. Notion's search can lag behind a new database by a few minutes")
|
|
29
|
+
.option("--limit <n>", `at most this many, up to ${LARGEST_PAGE}; ${DEFAULT_PAGE} if not given`, positiveCount("--limit"))
|
|
30
|
+
.option("--cursor <cursor>", "go on from where the last page stopped; page.next gives it")
|
|
31
|
+
.action(async function (words) {
|
|
32
|
+
const title = queryTerms(words, DATABASES_QUERY, commandPath(this)).get("title");
|
|
33
|
+
const { limit = DEFAULT_PAGE, cursor } = this.opts();
|
|
34
|
+
const size = Math.min(limit, LARGEST_PAGE);
|
|
35
|
+
const found = await withNotion(this, (notion) => notion.databases({ limit: size, cursor, title }));
|
|
36
|
+
renderAnswer(this, outputFor(this), listOf(commandPath(this), {
|
|
37
|
+
items: found.items,
|
|
38
|
+
limit: size,
|
|
39
|
+
has_more: found.hasMore,
|
|
40
|
+
paging: "cursor",
|
|
41
|
+
...(found.cursor === undefined ? {} : { cursor: found.cursor }),
|
|
42
|
+
...(words.length ? { args: { query: words.join(" ") } } : {}),
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
const showCommand = () => answerEntity(annotate(new Command("show"), {
|
|
46
|
+
effects: REMOTE_READ,
|
|
47
|
+
offline: false,
|
|
48
|
+
examples: [
|
|
49
|
+
`${CLI} personal databases show 0123456789abcdef0123456789abcdef`,
|
|
50
|
+
`${CLI} personal databases show https://www.notion.so/0123456789abcdef0123456789abcdef --json`,
|
|
51
|
+
],
|
|
52
|
+
}), "database", databaseSchema)
|
|
53
|
+
.summary("show one database live: its data sources, their ids and properties")
|
|
54
|
+
.description("show one database live from Notion: its title, where it sits, and each of its data sources with its id and " +
|
|
55
|
+
"its properties, with the options of each select and status; a query of the database names a data source id")
|
|
56
|
+
.argument("<database>", "the database's id or its Notion link")
|
|
57
|
+
.action(async function (database) {
|
|
58
|
+
const id = notionId(database, "database");
|
|
59
|
+
renderAnswer(this, outputFor(this), itemOf(await withNotion(this, (notion) => notion.database(id))));
|
|
60
|
+
});
|
|
61
|
+
export const databasesCommand = () => annotate(new Command("databases"), { effects: REMOTE_READ })
|
|
62
|
+
.description("read Notion databases and their data sources")
|
|
63
|
+
.addCommand(listCommand())
|
|
64
|
+
.addCommand(showCommand());
|
|
65
|
+
//# sourceMappingURL=databases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databases.js","sourceRoot":"","sources":["../../src/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AAE,CACvB,YAAY,CACV,QAAQ,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;IAC5B,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE;QACR,GAAG,GAAG,2DAA2D;QACjE,GAAG,GAAG,wFAAwF;KAC/F;CACF,CAAC,EACF,UAAU,EACV,cAAc,CACf;KACE,OAAO,CAAC,oEAAoE,CAAC;KAC7E,WAAW,CACV,6GAA6G;IAC3G,4GAA4G,CAC/G;KACA,QAAQ,CAAC,YAAY,EAAE,sCAAsC,CAAC;KAC9D,MAAM,CAAC,KAAK,WAA0B,QAAgB;IACrD,MAAM,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;IACzC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;AACtG,CAAC,CAAC,CAAA;AAEN,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAY,EAAE,CAC5C,QAAQ,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;KACzD,WAAW,CAAC,8CAA8C,CAAC;KAC3D,UAAU,CAAC,WAAW,EAAE,CAAC;KACzB,UAAU,CAAC,WAAW,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/commands/documents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAmDnC,eAAO,MAAM,gBAAgB,QAAO,OACoF,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { visibleControls } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
|
+
import { answerEntity, itemOf, outputFor, REMOTE_READ, renderAnswer } from "@wirecat/cli-core/cli";
|
|
4
|
+
import { Command } from "commander";
|
|
5
|
+
import { withNotion } from "../context.js";
|
|
6
|
+
import { IDENTITY } from "../identity.js";
|
|
7
|
+
import { notionId } from "../notion/ids.js";
|
|
8
|
+
import { documentSchema } from "../notion/notion.js";
|
|
9
|
+
const CLI = IDENTITY.command;
|
|
10
|
+
const getCommand = () => answerEntity(annotate(new Command("get"), {
|
|
11
|
+
effects: REMOTE_READ,
|
|
12
|
+
offline: false,
|
|
13
|
+
examples: [
|
|
14
|
+
`${CLI} personal documents get https://www.notion.so/Roadmap-0123456789abcdef0123456789abcdef`,
|
|
15
|
+
`${CLI} personal documents get 0123456789abcdef0123456789abcdef --json`,
|
|
16
|
+
],
|
|
17
|
+
}), "document_markdown", documentSchema)
|
|
18
|
+
.summary("read one page live from Notion, as Markdown")
|
|
19
|
+
.description("read one page live from Notion as Notion-flavoured Markdown. A page too long for one answer is read in parts; " +
|
|
20
|
+
"a part the token may not see is listed in missing_block_ids, and a page that is not whole answers " +
|
|
21
|
+
"meta.complete false and exits non-zero. Signed file links lose their signature, " +
|
|
22
|
+
"so the output never carries a link that opens the file")
|
|
23
|
+
.argument("<page>", "the page's id or its Notion link")
|
|
24
|
+
.action(async function (page) {
|
|
25
|
+
const id = notionId(page);
|
|
26
|
+
const { document, issues } = await withNotion(this, (notion) => notion.document(id));
|
|
27
|
+
const output = outputFor(this);
|
|
28
|
+
const missing = document.missing_block_ids.length;
|
|
29
|
+
const why = missing > 0
|
|
30
|
+
? `${missing} blocks are missing: not shared with this token, or past what one read fetches`
|
|
31
|
+
: "Notion gave only part of the page";
|
|
32
|
+
renderAnswer(this, output, itemOf(document, {
|
|
33
|
+
...(issues.length > 0 ? { missing: [{ field: "markdown", why }], meta: { issues } } : {}),
|
|
34
|
+
}),
|
|
35
|
+
// Other members wrote this text; a terminal would run an escape sequence in it (WC-SECR-11).
|
|
36
|
+
(body) => `${visibleControls(body.item.markdown)}\n`);
|
|
37
|
+
if (issues.length > 0 && output.format !== "json" && output.format !== "jsonl")
|
|
38
|
+
output.renderer.warn(`the page is incomplete: ${why}`);
|
|
39
|
+
});
|
|
40
|
+
export const documentsCommand = () => annotate(new Command("documents"), { effects: REMOTE_READ }).description("read Notion pages").addCommand(getCommand());
|
|
41
|
+
//# sourceMappingURL=documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../src/commands/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAiB,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEnE,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAA;AAE5B,MAAM,UAAU,GAAG,GAAG,EAAE,CACtB,YAAY,CACV,QAAQ,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;IAC3B,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE;QACR,GAAG,GAAG,wFAAwF;QAC9F,GAAG,GAAG,iEAAiE;KACxE;CACF,CAAC,EACF,mBAAmB,EACnB,cAAc,CACf;KACE,OAAO,CAAC,6CAA6C,CAAC;KACtD,WAAW,CACV,gHAAgH;IAC9G,oGAAoG;IACpG,kFAAk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CAC5C,QAAQ,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/commands/session.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA6HnC,eAAO,MAAM,cAAc,QAAO,OAMJ,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
|
+
import { readSecret } from "@wirecat/cli-core";
|
|
4
|
+
import { commandWords, environmentOf, FETCH, itemOf, LOCAL_READ, LOCAL_WRITE, listOf, logsInOrOut, outputFor, ProfileTokenStore, profileFree, profilesHere, REMOTE_READ, refuseCommandName, refuseOffline, refuseUnderReadOnly, rememberAccount, renderAnswer, rootOf, secretInputOf, } from "@wirecat/cli-core/cli";
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
import { configuration } from "../config.js";
|
|
7
|
+
import { contextOf, notionFor, withNotion } from "../context.js";
|
|
8
|
+
import { IDENTITY } from "../identity.js";
|
|
9
|
+
import { NOTION } from "../notion/errors.js";
|
|
10
|
+
// `session start | status | end | list` is every provider CLI's sign-in (WC-ACCT-12). The token is a personal access
|
|
11
|
+
// token or an internal connection's; both are checked with GET /v1/users/me
|
|
12
|
+
// (https://developers.notion.com/reference/get-self). OAuth comes last (DESIGN.md, Sign-in).
|
|
13
|
+
const SERVICE = NOTION;
|
|
14
|
+
const CLI = IDENTITY.command;
|
|
15
|
+
const answer = (command, item) => renderAnswer(command, outputFor(command), itemOf(item));
|
|
16
|
+
const storageOf = (raw) => {
|
|
17
|
+
if (raw === "keyring" || raw === "file")
|
|
18
|
+
return raw;
|
|
19
|
+
throw new CliError("validation_error", `--credential-storage takes keyring or file; got ${raw}`);
|
|
20
|
+
};
|
|
21
|
+
const startCommand = () => logsInOrOut(annotate(new Command("start"), {
|
|
22
|
+
effects: FETCH,
|
|
23
|
+
lifetime: "interactive",
|
|
24
|
+
mcp: false,
|
|
25
|
+
examples: [`${CLI} personal session start`, `${CLI} personal session start --credential-storage file`],
|
|
26
|
+
}))
|
|
27
|
+
.summary("sign in to Notion with a personal access token or an internal connection's token")
|
|
28
|
+
.description("sign this profile in: a Notion personal access token, which acts with your own rights, or an internal " +
|
|
29
|
+
"connection's token, which sees only the pages shared with that connection. It is asked hidden or read from " +
|
|
30
|
+
"stdin, never taken as an argument, checked with Notion, and only then kept in the keyring, or in a private file")
|
|
31
|
+
.option("--credential-storage <storage>", "where the token is kept: keyring, which falls back to a private file by itself, or file", storageOf, "keyring")
|
|
32
|
+
.action(async function (args) {
|
|
33
|
+
const { env, profile, tokens, run } = contextOf(this);
|
|
34
|
+
refuseCommandName(profile, commandWords(rootOf(this)), CLI);
|
|
35
|
+
refuseOffline(this, SERVICE);
|
|
36
|
+
// A secret is never an argument: it would land in shell history and in the run record (WC-SECR-5).
|
|
37
|
+
const token = (await readSecret("Notion token: ", secretInputOf(this))).trim();
|
|
38
|
+
if (!token)
|
|
39
|
+
throw new CliError("validation_error", "no token was given");
|
|
40
|
+
const account = await run((events) => notionFor(this, token, events).me());
|
|
41
|
+
const storedIn = tokens.write(profile, token, args.credentialStorage);
|
|
42
|
+
// Two profiles in one workspace see different pages, so the account is the workspace and the token's bot.
|
|
43
|
+
rememberAccount(IDENTITY, profile, `${account.workspace.id}:${account.user.id}`, env);
|
|
44
|
+
answer(this, { profile, state: "saved", stored_in: storedIn, verified: true, ...account });
|
|
45
|
+
});
|
|
46
|
+
const statusCommand = () => annotate(new Command("status"), {
|
|
47
|
+
effects: REMOTE_READ,
|
|
48
|
+
examples: [`${CLI} personal session status`, `${CLI} personal session status --check --json`],
|
|
49
|
+
})
|
|
50
|
+
.summary("show where this profile's token comes from; never the token")
|
|
51
|
+
.description(`show where this profile's token comes from: ${IDENTITY.envPrefix}_TOKEN, the keyring or a file, never the token; ` +
|
|
52
|
+
`--check asks ${SERVICE} whose token it is`)
|
|
53
|
+
.option("--check", `ask ${SERVICE} whether the token still works, and whose it is`)
|
|
54
|
+
.action(async function (args) {
|
|
55
|
+
const { profile, tokens } = contextOf(this);
|
|
56
|
+
const saved = tokens.read(profile);
|
|
57
|
+
const status = { profile, state: saved ? "saved" : "missing", token_from: saved?.source ?? null };
|
|
58
|
+
if (!args.check || !saved)
|
|
59
|
+
return answer(this, { ...status, verified: false });
|
|
60
|
+
answer(this, { ...status, verified: true, ...(await withNotion(this, (notion) => notion.me())) });
|
|
61
|
+
});
|
|
62
|
+
const endCommand = () => logsInOrOut(annotate(new Command("end"), {
|
|
63
|
+
effects: LOCAL_WRITE,
|
|
64
|
+
mcp: false,
|
|
65
|
+
examples: [`${CLI} personal session end`],
|
|
66
|
+
}))
|
|
67
|
+
.summary("forget this profile's token on this computer")
|
|
68
|
+
.description(`forget this profile's token on this computer; the token itself stays valid in ${SERVICE}. Only this tool's ` +
|
|
69
|
+
"own entry goes: Notion's own CLI keeps its tokens under the same keyring name, and they stay")
|
|
70
|
+
.action(function () {
|
|
71
|
+
refuseUnderReadOnly(this, "session end");
|
|
72
|
+
const { profile, tokens } = contextOf(this);
|
|
73
|
+
answer(this, { profile, ended: tokens.remove(profile) });
|
|
74
|
+
});
|
|
75
|
+
const listCommand = () => profileFree(annotate(new Command("list"), {
|
|
76
|
+
effects: LOCAL_READ,
|
|
77
|
+
examples: [`${CLI} session list`, `${CLI} session list --json`],
|
|
78
|
+
}))
|
|
79
|
+
.summary("list the profiles here and whether each is signed in")
|
|
80
|
+
.description("list the profiles on this computer and whether each has a token; picks none")
|
|
81
|
+
.action(function () {
|
|
82
|
+
const environment = environmentOf(this);
|
|
83
|
+
const env = environment.env ?? process.env;
|
|
84
|
+
// biome-ignore lint/plugin/no-own-settings: baseContext needs a profile, and this local read names none
|
|
85
|
+
const { configuredProfiles } = configuration.resolveSettings({}, { env, needsProfile: false });
|
|
86
|
+
const tokens = new ProfileTokenStore({
|
|
87
|
+
app: IDENTITY,
|
|
88
|
+
env,
|
|
89
|
+
...(environment.keyring ? { keyring: environment.keyring } : {}),
|
|
90
|
+
warn: outputFor(this).renderer.warn,
|
|
91
|
+
});
|
|
92
|
+
const items = profilesHere(IDENTITY, configuredProfiles, env).map((profile) => {
|
|
93
|
+
const saved = tokens.read(profile);
|
|
94
|
+
return { profile, signed_in: saved !== undefined, token_from: saved?.source ?? null };
|
|
95
|
+
});
|
|
96
|
+
renderAnswer(this, outputFor(this), listOf("session list", { items, limit: Math.max(1, items.length), has_more: false }));
|
|
97
|
+
});
|
|
98
|
+
export const sessionCommand = () => annotate(new Command("session"), { effects: LOCAL_READ })
|
|
99
|
+
.description(`keep this profile's ${SERVICE} token in the OS keyring`)
|
|
100
|
+
.addCommand(startCommand())
|
|
101
|
+
.addCommand(statusCommand())
|
|
102
|
+
.addCommand(endCommand())
|
|
103
|
+
.addCommand(listCommand());
|
|
104
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/commands/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,MAAM,EACN,aAAa,GAEd,M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pC,CAAC,CAAA;IACF,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAC5E,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAClC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,CAAA;IACvF,CAAC,CAAC,CAAA;IACF,YAAY,CACV,IAAI,EACJ,SAAS,CAAC,IAAI,CAAC,EACf,MAAM,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CACrF,CAAA;AACH,CAAC,CAAC,CAAA;AAEN,MAAM,CAAC,MAAM,cAAc,GAAG,GAAY,EAAE,CAC1C,QAAQ,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;KACtD,WAAW,CAAC,uBAAuB,OAAO,0BAA0B,CAAC;KACrE,UAAU,CAAC,YAAY,EAAE,CAAC;KAC1B,UAAU,CAAC,aAAa,EAAE,CAAC;KAC3B,UAAU,CAAC,UAAU,EAAE,CAAC;KACxB,UAAU,CAAC,WAAW,EAAE,CAAC,CAAA"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Configuration } from "@wirecat/cli-core/cli";
|
|
2
|
+
/** Each command is checked against its own path (`notes.list`); add the keys a command checks inside itself. */
|
|
3
|
+
export declare const permissions: import("@wirecat/cli-core/cli").CommandPermissions;
|
|
4
|
+
export declare const configuration: Configuration;
|
|
5
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAmC,MAAM,uBAAuB,CAAA;AAI3F,gHAAgH;AAChH,eAAO,MAAM,WAAW,oDAQtB,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,aAAsD,CAAA"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { commandPermissions, settingsFor } from "@wirecat/cli-core/cli";
|
|
2
|
+
import { operations } from "./generated/manifest.js";
|
|
3
|
+
import { IDENTITY } from "./identity.js";
|
|
4
|
+
/** Each command is checked against its own path (`notes.list`); add the keys a command checks inside itself. */
|
|
5
|
+
export const permissions = commandPermissions({
|
|
6
|
+
// A generated API operation that deletes asks first at a terminal. Over MCP `ask` goes ahead (cli-core's rule),
|
|
7
|
+
// so `deny` is what stops an agent.
|
|
8
|
+
defaults: Object.fromEntries(operations
|
|
9
|
+
.filter((operation) => operation.effect === "destructive")
|
|
10
|
+
.map((operation) => [`api.${operation.command}`, "ask"])),
|
|
11
|
+
});
|
|
12
|
+
export const configuration = settingsFor(IDENTITY, { permissions });
|
|
13
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,kBAAkB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,gHAAgH;AAChH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;IAC5C,gHAAgH;IAChH,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC,WAAW,CAC1B,UAAU;SACP,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,KAAK,aAAa,CAAC;SACzD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,CAC3D;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAkB,WAAW,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { SleepLike } from "@wirecat/cli-base";
|
|
2
|
+
import { type BaseEnvironment, type EventSink, type GlobalFlags, ProfileTokenStore } from "@wirecat/cli-core/cli";
|
|
3
|
+
import type { Command } from "commander";
|
|
4
|
+
import { type LiveReads } from "./notion/notion.js";
|
|
5
|
+
/** What a test hands `run()` beside cli-core's own: the fake Notion in place of the network (WC-ARCH-10). */
|
|
6
|
+
export interface ServiceEnvironment extends BaseEnvironment {
|
|
7
|
+
fetch?: typeof fetch;
|
|
8
|
+
/** Notion's retry and pace waits; a test passes one that only counts them (WC-TEST-3). */
|
|
9
|
+
sleep?: SleepLike;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Settings, keyring and the run come from cli-core's `baseContext` and nowhere else: a command that resolves settings
|
|
13
|
+
* on its own skips `--timeout`, the run record and the profile's permissions (WC-LIFE-5, WC-LIFE-15).
|
|
14
|
+
*/
|
|
15
|
+
export declare const contextOf: (command: Command) => {
|
|
16
|
+
settings: import("@wirecat/cli-core/cli").Settings;
|
|
17
|
+
renderer: import("@wirecat/cli-base").Renderer;
|
|
18
|
+
format: import("@wirecat/cli-base").RenderFormat;
|
|
19
|
+
color: boolean;
|
|
20
|
+
streams: import("@wirecat/cli-base").Streams;
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
full?: boolean;
|
|
23
|
+
env: NodeJS.ProcessEnv;
|
|
24
|
+
keyring?: import("@wirecat/cli-base").KeyringStore;
|
|
25
|
+
run: <T>(body: (events: EventSink) => Promise<T>, options?: {
|
|
26
|
+
unbounded?: boolean;
|
|
27
|
+
name?: string;
|
|
28
|
+
}) => Promise<T>;
|
|
29
|
+
track: (closeable: import("@wirecat/cli-core/cli").Closeable) => void;
|
|
30
|
+
environment: ServiceEnvironment;
|
|
31
|
+
flags: GlobalFlags;
|
|
32
|
+
profile: string;
|
|
33
|
+
tokens: ProfileTokenStore;
|
|
34
|
+
};
|
|
35
|
+
/** The profile's saved token, or an authentication error that says how to sign in. Read before any request. */
|
|
36
|
+
export declare const tokenOf: (command: Command) => string;
|
|
37
|
+
/** Notion for one run: the SDK over the run's transport. */
|
|
38
|
+
export declare const notionFor: (command: Command, token: string, events: EventSink) => LiveReads;
|
|
39
|
+
/** The same transport for the generated `api` commands, each attempt recorded in the run, as the SDK's are. */
|
|
40
|
+
export declare const notionFetchFor: (command: Command) => import("@wirecat/cli-base/http").FetchLike;
|
|
41
|
+
/**
|
|
42
|
+
* Every Notion call goes through here: inside cli-core's run, so `--timeout` bounds it, a failure or `--record` keeps
|
|
43
|
+
* a run named after the command, and the client's requests land in that run (WC-LIFE-5, WC-LIFE-15).
|
|
44
|
+
*/
|
|
45
|
+
export declare const withNotion: <T>(command: Command, body: (notion: LiveReads) => Promise<T>) => Promise<T>;
|
|
46
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,SAAS,EAEd,KAAK,WAAW,EAChB,iBAAiB,EAElB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKxC,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,oBAAoB,CAAA;AAE9D,6GAA6G;AAC7G,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IACpB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,YAAa,OAAO;;;;;;;;;;;;;;;;;;;CAczC,CAAA;AAED,+GAA+G;AAC/G,eAAO,MAAM,OAAO,YAAa,OAAO,KAAG,MAI1C,CAAA;AAgBD,4DAA4D;AAC5D,eAAO,MAAM,SAAS,YAAa,OAAO,SAAS,MAAM,UAAU,SAAS,KAAG,SACV,CAAA;AAErE,+GAA+G;AAC/G,eAAO,MAAM,cAAc,YAAa,OAAO,+CAAiD,CAAA;AAEhG;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,WAAW,OAAO,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CAGlG,CAAA"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { baseContext, environmentOf, ProfileTokenStore, refuseOffline, } from "@wirecat/cli-core/cli";
|
|
2
|
+
import { Pacer, pacePathFor } from "@wirecat/cli-core/sends";
|
|
3
|
+
import { configuration } from "./config.js";
|
|
4
|
+
import { IDENTITY } from "./identity.js";
|
|
5
|
+
import { notionClient, notionFetch, PACE, QUERY_PACE } from "./notion/client.js";
|
|
6
|
+
import { NOTION } from "./notion/errors.js";
|
|
7
|
+
import { liveReads } from "./notion/notion.js";
|
|
8
|
+
/**
|
|
9
|
+
* Settings, keyring and the run come from cli-core's `baseContext` and nowhere else: a command that resolves settings
|
|
10
|
+
* on its own skips `--timeout`, the run record and the profile's permissions (WC-LIFE-5, WC-LIFE-15).
|
|
11
|
+
*/
|
|
12
|
+
export const contextOf = (command) => {
|
|
13
|
+
const base = baseContext(command, configuration.resolveSettings);
|
|
14
|
+
return {
|
|
15
|
+
...base,
|
|
16
|
+
environment: environmentOf(command),
|
|
17
|
+
flags: command.optsWithGlobals(),
|
|
18
|
+
profile: base.settings.profile,
|
|
19
|
+
tokens: new ProfileTokenStore({
|
|
20
|
+
app: IDENTITY,
|
|
21
|
+
env: base.env,
|
|
22
|
+
...(base.keyring ? { keyring: base.keyring } : {}),
|
|
23
|
+
warn: base.renderer.warn,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/** The profile's saved token, or an authentication error that says how to sign in. Read before any request. */
|
|
28
|
+
export const tokenOf = (command) => {
|
|
29
|
+
const { profile, tokens } = contextOf(command);
|
|
30
|
+
refuseOffline(command, NOTION);
|
|
31
|
+
return tokens.need(profile);
|
|
32
|
+
};
|
|
33
|
+
/** Notion's transport for one run: hostFetch, paced per profile, a slower pace of its own for data source queries. */
|
|
34
|
+
const transportOf = (command, events) => {
|
|
35
|
+
const { environment, env, profile } = contextOf(command);
|
|
36
|
+
const pace = pacePathFor(IDENTITY, profile, env);
|
|
37
|
+
return {
|
|
38
|
+
events,
|
|
39
|
+
signal: environment.signal,
|
|
40
|
+
fetch: environment.fetch,
|
|
41
|
+
pacer: new Pacer(pace, PACE),
|
|
42
|
+
...(environment.sleep ? { sleep: environment.sleep } : {}),
|
|
43
|
+
queryPacer: new Pacer(pace.replace(/\.json$/u, ".queries.json"), QUERY_PACE),
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/** Notion for one run: the SDK over the run's transport. */
|
|
47
|
+
export const notionFor = (command, token, events) => liveReads(notionClient({ token, ...transportOf(command, events) }));
|
|
48
|
+
/** The same transport for the generated `api` commands, each attempt recorded in the run, as the SDK's are. */
|
|
49
|
+
export const notionFetchFor = (command) => notionFetch(transportOf(command, undefined));
|
|
50
|
+
/**
|
|
51
|
+
* Every Notion call goes through here: inside cli-core's run, so `--timeout` bounds it, a failure or `--record` keeps
|
|
52
|
+
* a run named after the command, and the client's requests land in that run (WC-LIFE-5, WC-LIFE-15).
|
|
53
|
+
*/
|
|
54
|
+
export const withNotion = (command, body) => {
|
|
55
|
+
const token = tokenOf(command);
|
|
56
|
+
return contextOf(command).run((events) => body(notionFor(command, token, events)));
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EAEX,aAAa,EAEb,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAkB,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAS9D;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC5C,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IAChE,OAAO;QACL,GAAG,IAAI;QACP,WAAW,EAAE,aAAa,CAAqB,OAAO,CAAC;QACvD,KAAK,EAAE,OAAO,CAAC,eAAe,EAAe;QAC7C,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO;QAC9B,MAAM,EAAE,IAAI,iBAAiB,CAAC;YAC5B,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClD,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;SACzB,CAAC;KACH,CAAA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