@everystack/cli 0.3.5 → 0.3.6
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/package.json +13 -10
- package/src/cli/audit-api.ts +11 -29
- package/src/cli/audit-source-api.ts +36 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everystack/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "CLI and OTA updates for Expo apps on everystack",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"author": "Scalable Technology, Inc. <licensing@scalable.technology>",
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"types": "./src/cli/audit-api.ts",
|
|
34
34
|
"default": "./src/cli/audit-api.ts"
|
|
35
35
|
},
|
|
36
|
+
"./audit/source": {
|
|
37
|
+
"types": "./src/cli/audit-source-api.ts",
|
|
38
|
+
"default": "./src/cli/audit-source-api.ts"
|
|
39
|
+
},
|
|
36
40
|
"./client": {
|
|
37
41
|
"types": "./src/client/index.ts",
|
|
38
42
|
"default": "./src/client/index.ts"
|
|
@@ -61,22 +65,16 @@
|
|
|
61
65
|
"bin": {
|
|
62
66
|
"everystack": "./src/cli/index.ts"
|
|
63
67
|
},
|
|
64
|
-
"scripts": {
|
|
65
|
-
"test": "jest",
|
|
66
|
-
"build": "tsc --build",
|
|
67
|
-
"prepublishOnly": "tsc --module commonjs --moduleResolution node --target ES2022 --esModuleInterop --skipLibCheck --declaration false --outDir src src/env.ts",
|
|
68
|
-
"lint": "tsc --noEmit"
|
|
69
|
-
},
|
|
70
68
|
"dependencies": {
|
|
71
69
|
"@aws-sdk/client-cloudfront": "3.1053.0",
|
|
72
70
|
"@aws-sdk/client-cloudfront-keyvaluestore": "3.1053.0",
|
|
73
71
|
"@aws-sdk/signature-v4a": "3.1048.0",
|
|
74
|
-
"@everystack/model": "workspace:*",
|
|
75
72
|
"glob": "13.0.6",
|
|
76
73
|
"node-forge": "1.4.0",
|
|
77
74
|
"structured-headers": "1.0.1",
|
|
78
75
|
"tsx": "4.21.0",
|
|
79
|
-
"typescript": "5.9.3"
|
|
76
|
+
"typescript": "5.9.3",
|
|
77
|
+
"@everystack/model": "0.3.3"
|
|
80
78
|
},
|
|
81
79
|
"peerDependencies": {
|
|
82
80
|
"@everystack/server": ">=0.1.0",
|
|
@@ -143,5 +141,10 @@
|
|
|
143
141
|
"jest": "29.7.0",
|
|
144
142
|
"react": "19.2.6",
|
|
145
143
|
"ts-jest": "29.4.9"
|
|
144
|
+
},
|
|
145
|
+
"scripts": {
|
|
146
|
+
"test": "jest",
|
|
147
|
+
"build": "tsc --build",
|
|
148
|
+
"lint": "tsc --noEmit"
|
|
146
149
|
}
|
|
147
|
-
}
|
|
150
|
+
}
|
package/src/cli/audit-api.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public audit surface — `@everystack/cli/audit`.
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
* (bundle-weight), plus the bundle composition helpers they build on. Pure,
|
|
4
|
+
* The bundle-side scanners: secret-leak (bundle-audit), weight/size (bundle-weight),
|
|
5
|
+
* remote UI-bloat (ui-bloat), and the composition helpers they build on. Pure,
|
|
7
6
|
* filesystem-free, no CLI/IO coupling — feed them text or {path, size} lists.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: this barrel is kept TYPESCRIPT-FREE on purpose. The source-side AST
|
|
9
|
+
* scanners (component-audit / component-model) pull in the `typescript` compiler, so
|
|
10
|
+
* they live behind `@everystack/cli/audit/source` instead. The governance MCP imports
|
|
11
|
+
* this light barrel (e.g. SECRET_PATTERNS) and bundles small; importing the source
|
|
12
|
+
* subpath would drag the ~10MB compiler into the hook hot-path.
|
|
8
13
|
*/
|
|
9
14
|
|
|
10
15
|
export {
|
|
@@ -56,32 +61,9 @@ export {
|
|
|
56
61
|
resolveUiBloatBudget,
|
|
57
62
|
} from './ui-bloat.js';
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
type FileRole,
|
|
63
|
-
DEFAULT_COMPONENT_BUDGET,
|
|
64
|
-
classifyRole,
|
|
65
|
-
scanComponentRepeatedStyles,
|
|
66
|
-
scanComponentHardcodedColors,
|
|
67
|
-
scanUiReimplementation,
|
|
68
|
-
discoverUiExports,
|
|
69
|
-
scanComponentSize,
|
|
70
|
-
scanDuplicateJsx,
|
|
71
|
-
scanDuplicateComponents,
|
|
72
|
-
auditComponents,
|
|
73
|
-
} from './component-audit.js';
|
|
74
|
-
|
|
75
|
-
export {
|
|
76
|
-
// types — the faithful component model (shared with the 5b frontend Module)
|
|
77
|
-
type ComponentDescriptor,
|
|
78
|
-
type ImportRef,
|
|
79
|
-
type JsxNode,
|
|
80
|
-
type StyleLiteral,
|
|
81
|
-
// the source-side foundation: parse/discover .tsx into neutral descriptors
|
|
82
|
-
parseComponents,
|
|
83
|
-
discoverComponents,
|
|
84
|
-
} from './component-model.js';
|
|
64
|
+
// NOTE: the source-side AST scanners (component-audit + component-model) moved to
|
|
65
|
+
// `@everystack/cli/audit/source` — they pull in `typescript`, which this barrel must
|
|
66
|
+
// stay free of. See audit-source-api.ts.
|
|
85
67
|
|
|
86
68
|
export {
|
|
87
69
|
// composition (input to scanDependencyWeight)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source-side audit surface — `@everystack/cli/audit/source`.
|
|
3
|
+
*
|
|
4
|
+
* The `.tsx` AST scanners: the faithful component model (`component-model`) and the
|
|
5
|
+
* source-side UI-bloat checks built on it (`component-audit`). These pull in the
|
|
6
|
+
* `typescript` compiler, so they are kept OUT of the light `@everystack/cli/audit`
|
|
7
|
+
* barrel and exposed here instead. Import this only when you need to parse/analyze
|
|
8
|
+
* component source — never from a hot path (it drags ~10MB of compiler).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
// source-side UI-bloat checks (located + fixable + self-verifying)
|
|
13
|
+
type ComponentBudget,
|
|
14
|
+
type FileRole,
|
|
15
|
+
DEFAULT_COMPONENT_BUDGET,
|
|
16
|
+
classifyRole,
|
|
17
|
+
scanComponentRepeatedStyles,
|
|
18
|
+
scanComponentHardcodedColors,
|
|
19
|
+
scanUiReimplementation,
|
|
20
|
+
discoverUiExports,
|
|
21
|
+
scanComponentSize,
|
|
22
|
+
scanDuplicateJsx,
|
|
23
|
+
scanDuplicateComponents,
|
|
24
|
+
auditComponents,
|
|
25
|
+
} from './component-audit.js';
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
// types — the faithful component model (shared with the 5b frontend Module)
|
|
29
|
+
type ComponentDescriptor,
|
|
30
|
+
type ImportRef,
|
|
31
|
+
type JsxNode,
|
|
32
|
+
type StyleLiteral,
|
|
33
|
+
// the source-side foundation: parse/discover .tsx into neutral descriptors
|
|
34
|
+
parseComponents,
|
|
35
|
+
discoverComponents,
|
|
36
|
+
} from './component-model.js';
|