@jtakeit/kit 0.7.2 → 0.8.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/lib/catalogue.mjs CHANGED
@@ -18,7 +18,7 @@
18
18
  * Both directions matter and they fail differently. A field declared and never
19
19
  * rendered is a control in the admin that edits nothing. A field rendered and
20
20
  * never declared is text the owner can see and cannot touch — and it is the
21
- * silent one, which is why `annotation-lint.mjs` exists at the other end of the
21
+ * silent one, which is why `jtkit lint` exists at the other end of the
22
22
  * pipeline to catch it at build time too.
23
23
  *
24
24
  * jtk catalogue # emit, then check against dist/
@@ -149,7 +149,7 @@ if (Object.keys(modules).length > 0) catalogue.modules = modules;
149
149
  * A site scaffolded as `de-CH` therefore had its labels accepted and its own
150
150
  * language refused, with the message "not a language — two letters, or two and
151
151
  * a region" printed against a tag that is exactly that. Every regional locale
152
- * fl-init can produce hit it.
152
+ * jtk create can produce hit it.
153
153
  *
154
154
  * The region is *read* in either case and *written* in one. There are sites in
155
155
  * repositories spelt `de-ch` — the platform asked for that once — and a checker
@@ -1279,7 +1279,7 @@ const contentProblems = [];
1279
1279
  /*
1280
1280
  * A body with pictures in it needs the two class names that draw them.
1281
1281
  *
1282
- * `figures.mjs` turns a paragraph of images into `.fl-figure` and `.fl-row`,
1282
+ * `figures.mjs` turns a paragraph of images into `.jtk-figure` and `.jtk-row`,
1283
1283
  * and the kit ships styles for both in `src/styles/global.css`. A site that
1284
1284
  * deleted them gets pictures at their natural size in document order, which
1285
1285
  * looks like a broken build and is really a missing stylesheet — so it is said
@@ -1287,7 +1287,7 @@ const contentProblems = [];
1287
1287
  */
1288
1288
  if (pages.some(hasBodyPicture)) {
1289
1289
  const styled = readStyles(join(root, 'src'));
1290
- for (const name of ['fl-figure', 'fl-row']) {
1290
+ for (const name of ['jtk-figure', 'jtk-row']) {
1291
1291
  if (!styled.includes(name)) {
1292
1292
  contentProblems.push(
1293
1293
  `a post has pictures in its body and nothing styles .${name}. ` +
@@ -1409,7 +1409,7 @@ const disagreements = [];
1409
1409
 
1410
1410
  /*
1411
1411
  * Which fields a page must carry a tap target for: the platform's own rule,
1412
- * `tappable()` in its sitebuild/annotation-lint.mjs, copied (12 October 2026).
1412
+ * `tappable()` in its sitebuild/`jtkit lint`, copied (12 October 2026).
1413
1413
  *
1414
1414
  * This used to ask it of every field but a bool or a `no_tap_target`, which
1415
1415
  * is stricter than the judge in exactly the shapes that are the way a
@@ -1745,14 +1745,14 @@ if (!flag('dist') && !existsSync(join(root, 'astro.config.mjs'))) {
1745
1745
  console.log('not an Astro project: the second build under a path is skipped — build with SITE_URL=https://x.invalid/p/check/ and run again with --dist <dir> to prove the addresses');
1746
1746
  }
1747
1747
  if (!flag('dist') && existsSync(join(root, 'astro.config.mjs'))) {
1748
- const prefix = '/p/fl-check/';
1749
- const out = join(root, '.fl-prefix-check');
1748
+ const prefix = '/p/jtk-check/';
1749
+ const out = join(root, '.jtk-prefix-check');
1750
1750
 
1751
1751
  try {
1752
1752
  execFileSync('npx', ['astro', 'build', '--outDir', out], {
1753
1753
  cwd: root,
1754
1754
  stdio: 'pipe',
1755
- env: { ...process.env, SITE_URL: `https://fl-check.invalid${prefix}`, PUBLIC_INDEXABLE: 'false' },
1755
+ env: { ...process.env, SITE_URL: `https://jtk-check.invalid${prefix}`, PUBLIC_INDEXABLE: 'false' },
1756
1756
  });
1757
1757
 
1758
1758
  const leaks = [];
package/lib/codes.mjs CHANGED
@@ -9,7 +9,7 @@
9
9
  * what the troubleshooting page is tested against. Nothing here is authoritative
10
10
  * about anything.
11
11
  *
12
- * It is copied because `fl-catalogue` has to work before there is anything to
12
+ * It is copied because `jtk catalogue` has to work before there is anything to
13
13
  * ask — on a laptop, before a deploy, before a token, on a plane. A local
14
14
  * checker that needs the network to name a fault is a local checker nobody runs.
15
15
  *
@@ -19,7 +19,7 @@
19
19
  * checkout, all so that a list of twenty-one strings can be regenerated on the
20
20
  * few days a year it changes.
21
21
  *
22
- * **What keeps it honest is `fl-catalogue --judge`, not anybody remembering.**
22
+ * **What keeps it honest is `jtk catalogue --judge`, not anybody remembering.**
23
23
  * That flag posts the emitted catalogue to the real validator and reports every
24
24
  * place the two answers differ — a code the server raised and we did not, or one
25
25
  * we raised and it did not. Every client the studio runs through it is one
@@ -163,7 +163,7 @@ export const MEANS = Object.freeze({
163
163
  * comparison in `--judge`: their absence from the server's answer is the correct
164
164
  * answer rather than a gap.
165
165
  */
166
- export const LOCAL = 'FL_LOCAL';
166
+ export const LOCAL = 'JTK_LOCAL';
167
167
 
168
168
  /** Whether a finding is one the server can be asked about. */
169
169
  export function isPlatformCode(code) {
package/lib/kits.mjs CHANGED
@@ -16,7 +16,7 @@
16
16
  * the settings no zone and no hours. What the kit says to take from the brief
17
17
  * is in `kit.ask`, for whoever runs this to do next.
18
18
  */
19
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
19
+ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
20
20
  import { dirname, join, resolve } from 'node:path';
21
21
 
22
22
  /** Where the platform is, for a kit asked by its kind. */
@@ -74,7 +74,10 @@ export async function fetchKit(kind, api = process.env.JTK_API_URL || API) {
74
74
  * @param {string} [api]
75
75
  */
76
76
  export async function loadKit(asked, api) {
77
- if (existsSync(resolve(asked)) || asked.endsWith('.json')) return readKit(asked);
77
+ // A file is a file: a folder that happens to share the kind's name — a
78
+ // project called `salon`, run beside `--kit salon` — is not a kit, and
79
+ // reading it failed with EISDIR.
80
+ if (asked.endsWith('.json') || (existsSync(resolve(asked)) && statSync(resolve(asked)).isFile())) return readKit(asked);
78
81
  if (/^[a-z][a-z_]*$/.test(asked)) return fetchKit(asked, api);
79
82
  throw new Error(`--kit ${asked} is neither a kit's kind nor a file`);
80
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtakeit/kit",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "The framework-free half of a site on jtakeit: the booking form as an element and as markup, for Astro through @jtakeit/astro and for any other generator directly",
5
5
  "license": "MIT",
6
6
  "type": "module",