cascivo 1.1.0 → 1.2.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/dist/args-CtmltI1S.mjs +2 -0
- package/dist/args-CtmltI1S.mjs.map +1 -0
- package/dist/email-CwQcZ-mB.mjs +4 -0
- package/dist/email-CwQcZ-mB.mjs.map +1 -0
- package/dist/generated/audit-contract.json +8 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +80 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e}from"./config-DT-Cs7bC.mjs";function t(e,t){let n=e.find(e=>e.startsWith(`--${t}=`));if(n)return n.slice(t.length+3);let r=e.indexOf(`--${t}`),i=r===-1?void 0:e[r+1];return i&&!i.startsWith(`--`)?i:void 0}function n(e,t=[]){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.startsWith(`-`)){let n=i.replace(/^--?/,``).split(`=`)[0],a=e[r+1];t.includes(n)&&!i.includes(`=`)&&a!==void 0&&!a.startsWith(`-`)&&r++;continue}n.push(i)}return n}function r(n){let r=t(n,`package-manager`)??t(n,`pm`);return r===void 0?{pm:void 0}:e(r)?{pm:r}:{error:`Unknown package manager "${r}". Use one of: pnpm, yarn, npm, bun.`}}export{n,r,t};
|
|
2
|
+
//# sourceMappingURL=args-CtmltI1S.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args-CtmltI1S.mjs","names":[],"sources":["../src/utils/args.ts"],"sourcesContent":["import { isPackageManager, type PackageManager } from './config.js'\n\n/**\n * Read `--key value` or `--key=value` from an argv slice. Ignores a following\n * token that is itself a flag (so `--tokens --dry-run` yields undefined, not\n * `--dry-run`).\n */\nexport function flagValue(args: string[], key: string): string | undefined {\n const eq = args.find((a) => a.startsWith(`--${key}=`))\n if (eq) return eq.slice(key.length + 3)\n const idx = args.indexOf(`--${key}`)\n const next = idx !== -1 ? args[idx + 1] : undefined\n return next && !next.startsWith('--') ? next : undefined\n}\n\n/**\n * Extract positional (non-flag) arguments from an argv slice. Any token starting\n * with `-` is dropped, as is the value token immediately following a flag named\n * in `valueFlags` (e.g. `pnpm` in `--pm pnpm`), so component names never pick up\n * a flag or its value.\n */\nexport function positionalArgs(args: string[], valueFlags: string[] = []): string[] {\n const out: string[] = []\n for (let i = 0; i < args.length; i++) {\n const token = args[i]!\n if (token.startsWith('-')) {\n const key = token.replace(/^--?/, '').split('=')[0]!\n const next = args[i + 1]\n if (\n valueFlags.includes(key) &&\n !token.includes('=') &&\n next !== undefined &&\n !next.startsWith('-')\n ) {\n i++ // skip the flag's value token\n }\n continue\n }\n out.push(token)\n }\n return out\n}\n\n/**\n * Resolve the `--package-manager` / `--pm` flag to a validated PackageManager.\n * Absent flag → `{ pm: undefined }` (fall back to auto-detection). Unknown value\n * → `{ error }` so the caller can print it and exit non-zero.\n */\nexport function resolvePackageManagerFlag(\n args: string[],\n): { pm: PackageManager | undefined } | { error: string } {\n const raw = flagValue(args, 'package-manager') ?? flagValue(args, 'pm')\n if (raw === undefined) return { pm: undefined }\n if (isPackageManager(raw)) return { pm: raw }\n return { error: `Unknown package manager \"${raw}\". Use one of: pnpm, yarn, npm, bun.` }\n}\n"],"mappings":"0CAOA,SAAgB,EAAU,EAAgB,EAAiC,CACzE,IAAM,EAAK,EAAK,KAAM,GAAM,EAAE,WAAW,KAAK,EAAI,EAAE,CAAC,EACrD,GAAI,EAAI,OAAO,EAAG,MAAM,EAAI,OAAS,CAAC,EACtC,IAAM,EAAM,EAAK,QAAQ,KAAK,GAAK,EAC7B,EAAO,IAAQ,GAAqB,IAAA,GAAhB,EAAK,EAAM,GACrC,OAAO,GAAQ,CAAC,EAAK,WAAW,IAAI,EAAI,EAAO,IAAA,EACjD,CAQA,SAAgB,EAAe,EAAgB,EAAuB,CAAC,EAAa,CAClF,IAAM,EAAgB,CAAC,EACvB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAAK,CACpC,IAAM,EAAQ,EAAK,GACnB,GAAI,EAAM,WAAW,GAAG,EAAG,CACzB,IAAM,EAAM,EAAM,QAAQ,OAAQ,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAC3C,EAAO,EAAK,EAAI,GAEpB,EAAW,SAAS,CAAG,GACvB,CAAC,EAAM,SAAS,GAAG,GACnB,IAAS,IAAA,IACT,CAAC,EAAK,WAAW,GAAG,GAEpB,IAEF,QACF,CACA,EAAI,KAAK,CAAK,CAChB,CACA,OAAO,CACT,CAOA,SAAgB,EACd,EACwD,CACxD,IAAM,EAAM,EAAU,EAAM,iBAAiB,GAAK,EAAU,EAAM,IAAI,EAGtE,OAFI,IAAQ,IAAA,GAAkB,CAAE,GAAI,IAAA,EAAU,EAC1C,EAAiB,CAAG,EAAU,CAAE,GAAI,CAAI,EACrC,CAAE,MAAO,4BAA4B,EAAI,qCAAsC,CACxF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{n as e,t}from"./args-CtmltI1S.mjs";import{stdin as n}from"node:process";import{existsSync as r,mkdirSync as i,readFileSync as a,statSync as o,writeFileSync as s}from"node:fs";import{dirname as c,join as l}from"node:path";import{tmpdir as u}from"node:os";const d=`https://www.caniemail.com/api/data.json`,f=l(u(),`cascivo-caniemail.json`);async function p(){try{return await import(`@cascivo/email`)}catch{throw Error(`cascivo email lint needs @cascivo/email, which is not installed here.
|
|
2
|
+
pnpm add @cascivo/email`)}}async function m(){let e=[];for await(let t of n)e.push(t);return Buffer.concat(e).toString(`utf8`)}function h(e,t){let n=e=>{throw Error(`The Can I email matrix from ${t} is not usable: ${e}`)};(typeof e!=`object`||!e)&&n(`not a JSON object`);let r=e;Array.isArray(r.data)||n("no `data` array");let i=r.data;i.length===0&&n("`data` is empty");let a=i.map((e,t)=>{if(typeof e!=`object`||!e)return n(`data[${t}] is not an object`);let r=e;return typeof r.slug==`string`?typeof r.stats!=`object`||r.stats===null?n(`data[${t}] (${r.slug}) has no \`stats\``):{slug:r.slug,title:typeof r.title==`string`?r.title:r.slug,category:typeof r.category==`string`?r.category:`unknown`,...typeof r.keywords==`string`?{keywords:r.keywords}:{},stats:r.stats}:n(`data[${t}] has no \`slug\``)});return{api_version:typeof r.api_version==`string`?r.api_version:`unknown`,last_update_date:typeof r.last_update_date==`string`?r.last_update_date:`unknown`,data:a}}async function g(e){let n=t(e,`data`);if(n!==void 0){if(!r(n))throw Error(`No such file: ${n}`);return h(JSON.parse(a(n,`utf8`)),n)}if(!e.includes(`--refresh`)&&r(f)&&Date.now()-o(f).mtimeMs<864e5)return h(JSON.parse(a(f,`utf8`)),f);let l=await fetch(d).catch(e=>{throw Error(`Could not fetch the Can I email matrix from ${d}: ${e instanceof Error?e.message:String(e)}\n Offline? Download it once and pass --data <file>.`)});if(!l.ok)throw Error(`Could not fetch ${d}: ${l.status} ${l.statusText}`);let u=await l.text();return i(c(f),{recursive:!0}),s(f,u),h(JSON.parse(u),d)}function _(e,t){let n=[t];for(let t of e)n.push(` ${t.level===`blocked`?`✗`:`!`} ${t.slug} ${t.source}\n ${t.clients.join(`, `)}`);return n.join(`
|
|
3
|
+
`)}async function v(t){let n=[...e(t,[`data`]),...t.includes(`-`)?[`-`]:[]];if(n.length===0)throw Error("cascivo email lint needs a file, or `-` to read rendered HTML from stdin.");let{lint:r,indexFeatures:i,CASCIVO_ALLOW:o}=await p(),s=i(await g(t)),c=t.includes(`--no-allowlist`)?{}:o,l=0,u=0;for(let e of n){let t=r(e===`-`?await m():a(e,`utf8`),s,{allow:c}),n=t.filter(e=>e.level===`blocked`),i=t.filter(e=>e.level===`caveat`);l+=n.length,u+=i.length;let o=e===`-`?`(stdin)`:e;if(n.length===0&&i.length===0){console.log(`✓ ${o}`);continue}console.log(_([...n,...i],`${n.length===0?`✓`:`✗`} ${o}`))}let d=`\n${n.length} file${n.length===1?``:`s`}, ${l} blocked, ${u} caveat${u===1?``:`s`}.`;console.log(d),l>0&&(process.exitCode=1)}async function y(e){let[t,...n]=e;if(t===`lint`){await v(n);return}console.error(t===void 0?"cascivo email needs a subcommand. Try `cascivo email lint --help`.":`Unknown email subcommand: ${t}`),process.exitCode=1}export{y as email};
|
|
4
|
+
//# sourceMappingURL=email-CwQcZ-mB.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-CwQcZ-mB.mjs","names":[],"sources":["../src/commands/email.ts"],"sourcesContent":["/**\n * `cascivo email lint` — the conformance check, without the boilerplate.\n *\n * `lint()` is the most compelling thing in `@cascivo/email` and it cannot run out of the\n * box: it needs the Can I email support matrix, which the package deliberately does not\n * bundle (~483 KB of test data in every adopter's `node_modules`). The README says where to\n * fetch it, and every adopter then writes the same dozen lines — fetch, cache, index, lint,\n * decide an exit code. This is those lines, once.\n *\n * It lints **rendered HTML**, not templates. Rendering a `.tsx` would mean a compiler this\n * CLI has no business carrying, and every project already renders in its own build; piping\n * the output here costs nothing and keeps the command honest about what it checks — the\n * finished document, which is the only thing a client ever sees.\n */\nimport { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\nimport { tmpdir } from 'node:os'\nimport { stdin } from 'node:process'\nimport type { CanIEmailData, Feature, Finding } from '@cascivo/email'\nimport { flagValue, positionalArgs } from '../utils/args.js'\n\n/** Upstream, and the URL the README and the preview both name. MIT, hteumeuleu/caniemail. */\nconst SOURCE = 'https://www.caniemail.com/api/data.json'\n\n/**\n * Where a fetched copy is kept.\n *\n * In the temp directory rather than the project: it is a cache of somebody else's data, it\n * is large, and a stale copy is a correctness problem rather than a disk one — so it lives\n * somewhere that gets cleaned up, and `--refresh` exists for when it should not be trusted.\n */\nconst CACHE = join(tmpdir(), 'cascivo-caniemail.json')\n\n/** A day. Long enough that a CI run does not re-download; short enough to notice a retest. */\nconst MAX_AGE_MS = 24 * 60 * 60 * 1000\n\n/**\n * Load `@cascivo/email` from the caller's project.\n *\n * An optional peer, resolved at call time. Making it a real dependency would put the whole\n * email package into the download for `cascivo add button`; anyone who wants this command\n * has it installed already, and the failure below says so if they do not.\n *\n * `@cascivo/email` is a devDependency here purely so these types resolve — nothing in the\n * published bundle imports it except this line.\n */\nasync function loadEmail(): Promise<typeof import('@cascivo/email')> {\n try {\n return await import('@cascivo/email')\n } catch {\n throw new Error(\n 'cascivo email lint needs @cascivo/email, which is not installed here.\\n' +\n ' pnpm add @cascivo/email',\n )\n }\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = []\n for await (const chunk of stdin) chunks.push(chunk as Buffer)\n return Buffer.concat(chunks).toString('utf8')\n}\n\n/**\n * Turn the downloaded payload into a `CanIEmailData`, or say why it is not one.\n *\n * `res.json()` hands back `any`, so `as CanIEmailData` would type-check and prove nothing —\n * and this payload is the definition of one you did not produce: third-party, fetched over\n * the network, and cached to disk where anything could edit it. A bad file would otherwise\n * surface as an unreadable `TypeError` from inside `indexFeatures`.\n *\n * Structural failures throw; a feature missing the optional fields is coerced rather than\n * rejected, so an upstream addition cannot break the command.\n */\nexport function parseMatrix(raw: unknown, source: string): CanIEmailData {\n const bad = (why: string): never => {\n throw new Error(`The Can I email matrix from ${source} is not usable: ${why}`)\n }\n if (typeof raw !== 'object' || raw === null) bad('not a JSON object')\n const root = raw as Record<string, unknown>\n if (!Array.isArray(root['data'])) bad('no `data` array')\n const entries = root['data'] as unknown[]\n if (entries.length === 0) bad('`data` is empty')\n\n const data: Feature[] = entries.map((entry, i) => {\n if (typeof entry !== 'object' || entry === null) return bad(`data[${i}] is not an object`)\n const feature = entry as Record<string, unknown>\n if (typeof feature['slug'] !== 'string') return bad(`data[${i}] has no \\`slug\\``)\n if (typeof feature['stats'] !== 'object' || feature['stats'] === null) {\n return bad(`data[${i}] (${feature['slug']}) has no \\`stats\\``)\n }\n return {\n slug: feature['slug'],\n title: typeof feature['title'] === 'string' ? feature['title'] : feature['slug'],\n category: typeof feature['category'] === 'string' ? feature['category'] : 'unknown',\n ...(typeof feature['keywords'] === 'string' ? { keywords: feature['keywords'] } : {}),\n stats: feature['stats'] as Feature['stats'],\n }\n })\n\n return {\n api_version: typeof root['api_version'] === 'string' ? root['api_version'] : 'unknown',\n last_update_date:\n typeof root['last_update_date'] === 'string' ? root['last_update_date'] : 'unknown',\n data,\n }\n}\n\n/** The matrix, from `--data`, from a fresh-enough cache, or from upstream. */\nasync function loadMatrix(args: string[]): Promise<CanIEmailData> {\n const supplied = flagValue(args, 'data')\n if (supplied !== undefined) {\n if (!existsSync(supplied)) throw new Error(`No such file: ${supplied}`)\n return parseMatrix(JSON.parse(readFileSync(supplied, 'utf8')), supplied)\n }\n\n const refresh = args.includes('--refresh')\n if (!refresh && existsSync(CACHE) && Date.now() - statSync(CACHE).mtimeMs < MAX_AGE_MS) {\n return parseMatrix(JSON.parse(readFileSync(CACHE, 'utf8')), CACHE)\n }\n\n const response = await fetch(SOURCE).catch((error: unknown) => {\n throw new Error(\n `Could not fetch the Can I email matrix from ${SOURCE}: ` +\n `${error instanceof Error ? error.message : String(error)}\\n` +\n ' Offline? Download it once and pass --data <file>.',\n )\n })\n if (!response.ok) {\n throw new Error(`Could not fetch ${SOURCE}: ${response.status} ${response.statusText}`)\n }\n const text = await response.text()\n // Cache before parsing so a malformed payload is inspectable rather than just gone.\n mkdirSync(dirname(CACHE), { recursive: true })\n writeFileSync(CACHE, text)\n return parseMatrix(JSON.parse(text), SOURCE)\n}\n\nfunction format(findings: Finding[], label: string): string {\n const lines = [label]\n for (const finding of findings) {\n lines.push(\n ` ${finding.level === 'blocked' ? '✗' : '!'} ${finding.slug} ${finding.source}` +\n `\\n ${finding.clients.join(', ')}`,\n )\n }\n return lines.join('\\n')\n}\n\n/**\n * Lint one or more rendered emails.\n *\n * Exits non-zero on a blocked finding and only on a blocked finding: a caveat is partial\n * support an author wants to know about, not a reason to fail a build.\n */\nexport async function emailLint(args: string[]): Promise<void> {\n // `positionalArgs` rather than a filter on `-`: a plain filter also keeps the *value* of\n // `--data <file>`, so the matrix itself got linted as if it were an email. The symptom was\n // spectacular — 28 blocked findings against a clean template, because the scanner read\n // slugs like `html-dfn` out of the JSON and took them for tags.\n //\n // A bare `-` is stdin by long convention and looks like a flag to any such parser, so it\n // is added back by name.\n const files = [...positionalArgs(args, ['data']), ...(args.includes('-') ? ['-'] : [])]\n if (files.length === 0) {\n throw new Error('cascivo email lint needs a file, or `-` to read rendered HTML from stdin.')\n }\n\n const { lint, indexFeatures, CASCIVO_ALLOW } = await loadEmail()\n const features = indexFeatures(await loadMatrix(args))\n const allow = args.includes('--no-allowlist') ? {} : CASCIVO_ALLOW\n\n let blockedTotal = 0\n let caveatTotal = 0\n\n for (const file of files) {\n const html = file === '-' ? await readStdin() : readFileSync(file, 'utf8')\n const findings = lint(html, features, { allow })\n const blocked = findings.filter((f) => f.level === 'blocked')\n const caveats = findings.filter((f) => f.level === 'caveat')\n blockedTotal += blocked.length\n caveatTotal += caveats.length\n\n const name = file === '-' ? '(stdin)' : file\n if (blocked.length === 0 && caveats.length === 0) {\n console.log(`✓ ${name}`)\n continue\n }\n console.log(format([...blocked, ...caveats], `${blocked.length === 0 ? '✓' : '✗'} ${name}`))\n }\n\n const summary =\n `\\n${files.length} file${files.length === 1 ? '' : 's'}, ` +\n `${blockedTotal} blocked, ${caveatTotal} caveat${caveatTotal === 1 ? '' : 's'}.`\n console.log(summary)\n if (blockedTotal > 0) process.exitCode = 1\n}\n\n/** Dispatch `cascivo email <subcommand>`. */\nexport async function email(args: string[]): Promise<void> {\n const [subcommand, ...rest] = args\n if (subcommand === 'lint') {\n await emailLint(rest)\n return\n }\n console.error(\n subcommand === undefined\n ? 'cascivo email needs a subcommand. Try `cascivo email lint --help`.'\n : `Unknown email subcommand: ${subcommand}`,\n )\n process.exitCode = 1\n}\n"],"mappings":"qQAsBA,MAAM,EAAS,0CAST,EAAQ,EAAK,EAAO,EAAG,wBAAwB,EAerD,eAAe,GAAsD,CACnE,GAAI,CACF,OAAO,MAAM,OAAO,iBACtB,MAAQ,CACN,MA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ault": "oklch(1 0 0)" },
|
|
5
5
|
{ "name": "--cascivo-gray-50", "resolvedDefault": "oklch(0.985 0.002 264)" },
|
|
@@ -237,6 +237,7 @@
|
|
|
237
237
|
{ "name": "--cascivo-chart-grid", "resolvedDefault": "oklch(0.928 0.006 264)" },
|
|
238
238
|
{ "name": "--cascivo-chart-axis", "resolvedDefault": "oklch(0.5 0.016 264)" },
|
|
239
239
|
{ "name": "--cascivo-chart-fill-opacity", "resolvedDefault": "0.25" },
|
|
240
|
+
{ "name": "--cascivo-chart-bar-radius", "resolvedDefault": "2px" },
|
|
240
241
|
{ "name": "--cascivo-color-accent-text", "resolvedDefault": "oklch(0.52 0.2 250)" },
|
|
241
242
|
{ "name": "--cascivo-color-accent-text-hover", "resolvedDefault": "oklch(0.45 0.2 250)" },
|
|
242
243
|
{
|
|
@@ -472,9 +473,13 @@
|
|
|
472
473
|
{ "name": "--cascivo-dropdown-anchor", "resolvedDefault": "--dropdown-trigger" },
|
|
473
474
|
{ "name": "--cascivo-editor-bracket", "resolvedDefault": "currentColor" },
|
|
474
475
|
{ "name": "--cascivo-editor-caret-line", "resolvedDefault": "0" },
|
|
476
|
+
{ "name": "--cascivo-editor-caret-row", "resolvedDefault": "1 / 2" },
|
|
477
|
+
{ "name": "--cascivo-editor-gutter-active", "resolvedDefault": "transparent" },
|
|
478
|
+
{ "name": "--cascivo-editor-gutter-digits", "resolvedDefault": "2" },
|
|
479
|
+
{ "name": "--cascivo-editor-gutter-gap", "resolvedDefault": "var(--cascivo-space-3)" },
|
|
475
480
|
{
|
|
476
|
-
"name": "--cascivo-editor-gutter-
|
|
477
|
-
"resolvedDefault": "var(--cascivo-editor-
|
|
481
|
+
"name": "--cascivo-editor-gutter-width",
|
|
482
|
+
"resolvedDefault": "calc(\n var(--cascivo-editor-gutter-digits, 2) * 1ch + var(--cascivo-space-3) + var(--cascivo-space-2)\n )"
|
|
478
483
|
},
|
|
479
484
|
{ "name": "--cascivo-editor-match", "resolvedDefault": "rgba(125, 211, 252, 0.28)" },
|
|
480
485
|
{ "name": "--cascivo-editor-match-current", "resolvedDefault": "rgba(250, 204, 21, 0.5)" },
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/utils/config.ts","../src/index.ts"],"mappings":";AA2BA;AAAA,cAfa,MAAA;AAAA,KAeD,SAAA,WAAoB,MAAM;AAAA,KAE1B,uBAAA;EAEN,GAAA;EAAa,OAAA,GAAU,MAAA;EAAwB,MAAA,GAAS,MAAM;AAAA;AAAA,UAEnD,aAAA;EAFX;EAIJ,QAAA;EAJ2B;EAM3B,SAAA;EAN4D;EAQ5D,KAAA,EAAO,SAAA;EAR2D;EAUlE,UAAA,GAAa,MAAA,SAAe,uBAAA;EARA;EAU5B,KAAA;AAAA;;;cCvBW,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/utils/config.ts","../src/index.ts"],"mappings":";AA2BA;AAAA,cAfa,MAAA;AAAA,KAeD,SAAA,WAAoB,MAAM;AAAA,KAE1B,uBAAA;EAEN,GAAA;EAAa,OAAA,GAAU,MAAA;EAAwB,MAAA,GAAS,MAAM;AAAA;AAAA,UAEnD,aAAA;EAFX;EAIJ,QAAA;EAJ2B;EAM3B,SAAA;EAN4D;EAQ5D,KAAA,EAAO,SAAA;EAR2D;EAUlE,UAAA,GAAa,MAAA,SAAe,uBAAA;EARA;EAU5B,KAAA;AAAA;;;cCvBW,OAAA;AAAA,iBAwLS,GAAA,CAAI,IAAA,aAAiB,OAAO"}
|