ctxr-cli 0.26.0 → 0.27.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 +6 -4
- package/dist/commands/land.d.ts.map +1 -1
- package/dist/commands/land.js +48 -3
- package/dist/commands/land.js.map +1 -1
- package/dist/commands/publish-check.d.ts +5 -5
- package/dist/commands/publish-check.d.ts.map +1 -1
- package/dist/commands/publish-check.js +24 -23
- package/dist/commands/publish-check.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +41 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/config/schema.d.ts +8 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +7 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/core/approval/lander.d.ts +38 -0
- package/dist/core/approval/lander.d.ts.map +1 -0
- package/dist/core/approval/lander.js +80 -0
- package/dist/core/approval/lander.js.map +1 -0
- package/dist/core/browse/approve.d.ts +2 -0
- package/dist/core/browse/approve.d.ts.map +1 -1
- package/dist/core/browse/approve.js +7 -1
- package/dist/core/browse/approve.js.map +1 -1
- package/dist/core/errors.d.ts +4 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +11 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/core/git/land-lock.d.ts +25 -0
- package/dist/core/git/land-lock.d.ts.map +1 -0
- package/dist/core/git/land-lock.js +91 -0
- package/dist/core/git/land-lock.js.map +1 -0
- package/dist/core/publish/lifespan.js +2 -2
- package/dist/core/publish/send-copies.d.ts +12 -0
- package/dist/core/publish/send-copies.d.ts.map +1 -0
- package/dist/core/publish/send-copies.js +15 -0
- package/dist/core/publish/send-copies.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/templates/skills/ctxr-publish.md +31 -19
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* send-copies-beside-their-page: a send copy is a file built from a note and
|
|
3
|
+
* sent to someone — a record of what went out on a day. Directly in a page
|
|
4
|
+
* folder, beside `index.html`, a file in one of these formats is one; anywhere
|
|
5
|
+
* below it, the same file is an input the page uses (file-pdfs-beside-their-page
|
|
6
|
+
* D3). A closed list, so a missed format goes unchecked rather than failing a
|
|
7
|
+
* page over a file nobody sent (D1). Adding a format is one entry here.
|
|
8
|
+
*/
|
|
9
|
+
export const SEND_COPY_EXTENSIONS = ['.pdf', '.docx', '.xlsx', '.pptx'];
|
|
10
|
+
/** The send-copy extension `fileName` carries, lower-cased, or `null` when it is not a send copy. */
|
|
11
|
+
export function sendCopyExtension(fileName) {
|
|
12
|
+
const lower = fileName.toLowerCase();
|
|
13
|
+
return SEND_COPY_EXTENSIONS.find((extension) => lower.endsWith(extension)) ?? null;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=send-copies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-copies.js","sourceRoot":"","sources":["../../../src/core/publish/send-copies.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAE3F,qGAAqG;AACrG,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC;AACrF,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Kept in sync with package.json's "version" field. */
|
|
2
|
-
export declare const CLI_VERSION = "0.
|
|
2
|
+
export declare const CLI_VERSION = "0.27.0";
|
|
3
3
|
/**
|
|
4
4
|
* The npm package this executable is published as. Bound here, beside the
|
|
5
5
|
* version, because the release check resolves the latest published release by
|
package/dist/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Kept in sync with package.json's "version" field. */
|
|
2
|
-
export const CLI_VERSION = '0.
|
|
2
|
+
export const CLI_VERSION = '0.27.0';
|
|
3
3
|
/**
|
|
4
4
|
* The npm package this executable is published as. Bound here, beside the
|
|
5
5
|
* version, because the release check resolves the latest published release by
|
package/package.json
CHANGED
|
@@ -96,8 +96,8 @@ this choice. Why: a page filed under a word that names nothing helps no reader.
|
|
|
96
96
|
|
|
97
97
|
Never start the page's own name with a date (`YYYY-` or `YYYY-MM-DD-`). That naming is reserved for
|
|
98
98
|
the frozen pages that `ctxr publish new --disposable` makes. The rule applies to the final segment, not
|
|
99
|
-
to the folders above it. It does not apply to a
|
|
100
|
-
|
|
99
|
+
to the folders above it. It does not apply to a send copy in the page's folder, which starts with
|
|
100
|
+
the date you made it (step 8). The command refuses to overwrite an existing folder. If a folder already
|
|
101
101
|
exists for this subject, edit its files directly. Do not run `publish new` again. Why: a rename or an
|
|
102
102
|
overwrite breaks a link that somebody already has.
|
|
103
103
|
|
|
@@ -134,7 +134,8 @@ Run `ctxr publish check <path>`. It runs the mechanical half of the checklist:
|
|
|
134
134
|
with a real date at the start of its name;
|
|
135
135
|
- for a permanent page, the note it represents (`represented-note`) and that note's recorded hash
|
|
136
136
|
(`represented-note-hash`).
|
|
137
|
-
- for each
|
|
137
|
+
- for each send copy at the page folder's root, a file name that starts with a real date
|
|
138
|
+
(`send-copy-name`).
|
|
138
139
|
|
|
139
140
|
The command reports the page's lifespan. It exits non-zero and names every failing check. Fix all of
|
|
140
141
|
them before you report the page as ready. The command answers only what the files can show. Why: the
|
|
@@ -188,27 +189,38 @@ changed after the stamp. To confirm a stale page, do these steps in order:
|
|
|
188
189
|
`ctxr publish stamp` never overwrites a marker. Why: a stamp without a review confirms nothing, so
|
|
189
190
|
the stale report stays until somebody removes the marker.
|
|
190
191
|
|
|
191
|
-
**
|
|
192
|
-
|
|
192
|
+
**Send copies of the page.** A send copy is a file that you make from the note and send to somebody.
|
|
193
|
+
It is a `.pdf`, `.docx`, `.xlsx` or `.pptx` file. Make a send copy only when you send one. Why: every
|
|
194
|
+
send copy is kept, so a send copy for each edit fills the folder.
|
|
193
195
|
|
|
194
|
-
Write the
|
|
195
|
-
|
|
196
|
-
real date (`
|
|
197
|
-
when you hand on the
|
|
196
|
+
Write the send copy into the page's folder, next to `index.html`. Start its file name with the date
|
|
197
|
+
you make it: `<YYYY-MM-DD>-<name>.<extension>`. `ctxr publish check` fails a send copy at the folder
|
|
198
|
+
root that has no real date (`send-copy-name`). `ctxr publish check --json` lists each send copy with
|
|
199
|
+
its address. Give that address when you hand on the send copy.
|
|
198
200
|
|
|
199
|
-
A
|
|
200
|
-
|
|
201
|
-
stamp on its README then reports the page and its
|
|
201
|
+
A send copy is never a page on its own. A document that you send as a PDF, a Word file, a workbook or
|
|
202
|
+
a deck still needs an `index.html` for the same content. Why: every command that reads pages finds a
|
|
203
|
+
page by its `index.html`. The stamp on its README then reports the page and its send copies as stale
|
|
204
|
+
together.
|
|
202
205
|
|
|
203
|
-
When the page changes, write a new dated
|
|
204
|
-
file can be the one a recipient got, and the folder then shows what you sent on each date.
|
|
206
|
+
When the page changes, write a new dated send copy. Do not change or remove an earlier one. Why: an
|
|
207
|
+
earlier file can be the one a recipient got, and the folder then shows what you sent on each date.
|
|
205
208
|
|
|
206
|
-
Put a
|
|
207
|
-
`ctxr publish check` reads only the
|
|
209
|
+
Put a file that the page uses, but that you did not make, in the page's `assets/` folder. Why:
|
|
210
|
+
`ctxr publish check` reads only the files at the folder root as the page's send copies.
|
|
208
211
|
|
|
209
|
-
The store chooses how to make
|
|
210
|
-
You can also use the store's own document
|
|
211
|
-
|
|
212
|
+
The store chooses how to make a send copy. You can print `index.html` to a PDF, because it already
|
|
213
|
+
has a print rule. You can also use the store's own document or spreadsheet skill. Contexture does not
|
|
214
|
+
make send copies.
|
|
215
|
+
|
|
216
|
+
**A file that is its own source.** Some office files are not made from a note. An example is a
|
|
217
|
+
financial model that somebody edits by hand in a spreadsheet. Do not publish that file. Keep it in
|
|
218
|
+
the store, next to the note that describes it, with no date in its name. Why: the file is the source,
|
|
219
|
+
and the note describes it. A published copy would sit where retrieval does not look, and the stale
|
|
220
|
+
report would treat the note as the source. Git keeps the file's history. When you send a copy of the
|
|
221
|
+
file to somebody, that copy is a send copy: write it, dated, into the page's folder.
|
|
222
|
+
|
|
223
|
+
A file that you received from somebody is a capture. File it where the store keeps its captures.
|
|
212
224
|
|
|
213
225
|
Never revise a disposable page after it lands. Why: it is a snapshot of one moment, and its link
|
|
214
226
|
shows that moment. Make a new disposable page instead. Do not remove a disposable page yourself.
|