@freeappstore/compliance 0.7.10 → 0.7.11

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.
@@ -1,17 +1,4 @@
1
1
  import type { FileSource } from '../lib/file-source.js';
2
2
  import type { CheckResult } from '../types.js';
3
- /**
4
- * Apps and games should link back to their storefront — it's how
5
- * visitors discover the rest of the catalog from inside any single
6
- * app. The check passes if any source file under `web/src/` references
7
- * the appropriate domain:
8
- *
9
- * - games → freegamestore.online
10
- * - apps → freeappstore.online
11
- *
12
- * The link can be in JSX (`<a href="https://freeappstore.online">`),
13
- * a string constant, or even a footer comment — we don't enforce a
14
- * specific component, just that the link exists somewhere visible.
15
- */
16
3
  export declare function checkStoreLink(source: FileSource): Promise<CheckResult>;
17
4
  //# sourceMappingURL=store-link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-link.d.ts","sourceRoot":"","sources":["../../src/checks/store-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAoB7E"}
1
+ {"version":3,"file":"store-link.d.ts","sourceRoot":"","sources":["../../src/checks/store-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAqB/C,wBAAsB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CA2B7E"}
@@ -11,7 +11,11 @@ import { isGameProject } from '../lib/project-type.js';
11
11
  * The link can be in JSX (`<a href="https://freeappstore.online">`),
12
12
  * a string constant, or even a footer comment — we don't enforce a
13
13
  * specific component, just that the link exists somewhere visible.
14
+ * An app wrapped in the SDK's `Shell` passes too: its topbar links to
15
+ * freeappstore.online.
14
16
  */
17
+ // `<Shell>` / `<FasShell>` rendered from @freeappstore/sdk/ui (not a local component).
18
+ const SDK_SHELL_RE = /from\s*['"]@freeappstore\/sdk\/ui['"][\s\S]*<(?:Fas)?Shell\b|<(?:Fas)?Shell\b[\s\S]*from\s*['"]@freeappstore\/sdk\/ui['"]/;
15
19
  export async function checkStoreLink(source) {
16
20
  const isGame = await isGameProject(source);
17
21
  const domain = isGame ? 'freegamestore.online' : 'freeappstore.online';
@@ -22,6 +26,13 @@ export async function checkStoreLink(source) {
22
26
  if (content?.includes(domain)) {
23
27
  return { name: 'Store link', status: 'pass', detail: `${domain} referenced in ${path}` };
24
28
  }
29
+ if (!isGame && content && SDK_SHELL_RE.test(content)) {
30
+ return {
31
+ name: 'Store link',
32
+ status: 'pass',
33
+ detail: `${path} renders the SDK Shell, whose topbar links to ${domain}`,
34
+ };
35
+ }
25
36
  }
26
37
  return {
27
38
  name: 'Store link',
@@ -1 +1 @@
1
- {"version":3,"file":"store-link.js","sourceRoot":"","sources":["../../src/checks/store-link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAkB;IACrD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,qBAAqB,CAAC;IAEvE,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,SAAS;QAC3C,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC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,IAAI,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACrD,OAAO;gBACL,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,GAAG,IAAI,iDAAiD,MAAM,EAAE;aACzE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,cAAc,MAAM,oBAAoB;QAChD,WAAW,EAAE;YACX,0BAA0B,MAAM,uCAAuC;YACvE,wFAAwF;SACzF;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freeappstore/compliance",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
4
4
  "description": "Compliance checks for apps published on freeappstore.online — used by the CLI for local feedback and by CI for gating.",
5
5
  "license": "MIT",
6
6
  "type": "module",