@freeappstore/compliance

中文文档
0.7.32发布于 2026/11/12MITTypeScriptES Module构建来源已验证近 30 天下载 6707

Compliance checks for apps published on freeappstore.online — used by the CLI for local feedback and by CI for gating.

原始使用文档
文档目录3 节
  1. Checks (v0.1.0)
  2. Styling checks (warn-only rollout, #324)
  3. License

@freeappstore/compliance

Compliance checks for apps published on freeappstore.online. Same checks the CLI runs locally and the template's CI runs on every push.

import { runChecks } from '@freeappstore/compliance';

const results = await runChecks(process.cwd());
for (const r of results) {
  console.log(`${r.status}  ${r.name}  ${r.detail}`);
  for (const s of r.suggestions ?? []) console.log(`   → ${s}`);
}

Checks (v0.1.0)

NameWhat it checksStatus on fail
No template placeholdersNo file still contains APPNAMEfail
Analytics routed through platform loaderNo direct install of google-analytics / gtag / amplitude / mixpanel / segment / hotjar / plausible / posthog — analytics must flow through api.freeappstore.online/v1/analytics.js?app=<id>fail
No payments (free tier)No Payment Request API, Apple Pay, checkout SDKs / links (Stripe, PayPal, Paddle, Lemon Squeezy, Gumroad, Google Pay) or payment manifest membersfail
No adsNo ad network scripts, SDKs or packages (AdSense, Ad Manager / GPT, IMA, H5 Games Ads / AdMob, Amazon APS, Prebid, Media.net, Carbon Ads, BuySellAds, EthicalAds, Ezoic, PropellerAds, Adsterra, Taboola, Outbrain, Poki / CrazyGames / GameDistribution / GameMonetize ad SDKs). checkNoAdsLive runs the same patterns over published HTML in the weekly auditfail
Brand fonts presentManrope + Fraunces referenced in CSS or HTMLfail
PWA manifestweb/public/manifest.json exists and has name / short_name / start_url / displaywarn
Bundle sizeInitial-load JS (entry + static imports) ≤ 300 KB gzipped; lazy wasm/workers/dynamic chunks ≤ 25 MB eachfail if either cap is exceeded; warn if not built yet

Styling checks (warn-only rollout, #324)

  • CSS discipline: PostCSS parses web/src/**/*.css and reports banned token aliases, unlayered rules, hex colours outside token blocks, per-screen dark overrides, and more than 15 feature classes per stylesheet.
  • No excessive inline styles: vendored from FreeGameStore's platform check; warns above 15 style={{...}} objects per TSX file or 30 total. Tests and comments are excluded. FAS permits genuinely dynamic values with a reason commented beside them; static appearance belongs in Tailwind on FAS tokens.
  • Opaque surfaces: warns for alpha colours in --paper, --panel, or --popover, in either theme. --panel-glass and --scrim are exempt.

fas check --json includes these warnings without failing the app build. pnpm lint:platform-ui reuses all three checks for SDK UI, Console, and Admin, and reports parsed TSX inline-style and runtime CSS injection counts. CI stays in warn-only migration mode while #322 is pending. After migration, run pnpm lint:platform-ui --strict to fail on runtime CSS injection or inline styles without a nearby comment explaining the dynamic value.

The PAS CSS source referenced by #324 was unavailable (404); its five specified rules are implemented here with PostCSS. The FGS inline scanner is adapted from freegamestore-online/platform/packages/compliance/src/checks/no-excessive-inline-styles.ts.

License

MIT.

版本与发布记录

@freeappstore/compliance 共发布 40 个版本,首次发布于 2026/05/06;过去 12 个月发布了 40 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.32latest2026/11/123 天前
0.7.312026/11/087 天前
0.7.302026/11/087 天前
0.7.292026/11/087 天前
0.7.282026/11/078 天前
0.7.272026/11/078 天前

关于 @freeappstore/compliance 的常见问题

@freeappstore/compliance 是什么?

Compliance checks for apps published on freeappstore.online — used by the CLI for local feedback and by CI for gating.

如何安装 @freeappstore/compliance?

在项目目录运行 npm install @freeappstore/compliance,或使用 pnpm add / yarn add / bun add。

@freeappstore/compliance 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@freeappstore/compliance 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@freeappstore/compliance 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@freeappstore/compliance 可以商用吗?

@freeappstore/compliance 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@freeappstore/compliance 的下载量有多少?

根据 npm 官方下载统计,@freeappstore/compliance 在 2026/10/16 – 2026/11/14 这 30 天内被下载 6,707 次,日均约 224 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@freeappstore/compliance 还在维护吗?

最新版本 0.7.32 发布于 2026/11/12(3 天前);至今共发布 40 个版本,其中过去 12 个月发布了 40 个;首次发布于 2026/05/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。