@svelte-vitals/core 0.43.0 → 0.44.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/README.md +12 -1
- package/dist/chunk-2N7E4JFX.js +30 -0
- package/dist/index-CWWQEu8q.d.ts +1138 -0
- package/dist/index.d.ts +1 -1953
- package/dist/index.js +5 -8477
- package/dist/internal.d.ts +883 -0
- package/dist/internal.js +8642 -0
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -9,7 +9,18 @@ This package is **mode-independent** and contains no I/O — it operates on a no
|
|
|
9
9
|
|
|
10
10
|
> Most users don't depend on this directly — install [`svelte-vitals`](https://www.npmjs.com/package/svelte-vitals) instead. This package is for building tools on top of the shared engine.
|
|
11
11
|
|
|
12
|
-
> **ESM-only** (Node
|
|
12
|
+
> **ESM-only** (Node 24.16+). Ships ES modules only; `require()` is unsupported by design.
|
|
13
|
+
|
|
14
|
+
## Entry points
|
|
15
|
+
|
|
16
|
+
| Entry | Contents | Stability |
|
|
17
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
|
18
|
+
| `@svelte-vitals/core` | `defineConfig` and the config types; the `JsonReport` types for reading a report | Follows semver. |
|
|
19
|
+
| `@svelte-vitals/core/internal` | The engine, rules, fact collection, reporters, and scoring — what the CLI and the Vite plugin share | **No guarantee. Anything here may change in any release, including a patch.** |
|
|
20
|
+
|
|
21
|
+
Reach for `/internal` only if you accept pinning an exact version. If something there is what you
|
|
22
|
+
actually need, open an issue — the point of the split is that promoting a name into the stable
|
|
23
|
+
entry is an additive change.
|
|
13
24
|
|
|
14
25
|
## License
|
|
15
26
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/types.ts
|
|
2
|
+
var defaultProject = {
|
|
3
|
+
hasRobotsTxt: false,
|
|
4
|
+
hasSitemap: false,
|
|
5
|
+
htmlLang: { presence: "none", value: "absent" }
|
|
6
|
+
};
|
|
7
|
+
var CATEGORIES = [
|
|
8
|
+
"seo",
|
|
9
|
+
"performance",
|
|
10
|
+
"correctness",
|
|
11
|
+
"security",
|
|
12
|
+
"architecture",
|
|
13
|
+
"a11y"
|
|
14
|
+
];
|
|
15
|
+
var defaultConfig = {
|
|
16
|
+
treatDynamicAs: "pass",
|
|
17
|
+
metaComponents: [],
|
|
18
|
+
rules: {},
|
|
19
|
+
failOn: "critical"
|
|
20
|
+
};
|
|
21
|
+
function defineConfig(config = {}) {
|
|
22
|
+
return { ...defaultConfig, ...config };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
defaultProject,
|
|
27
|
+
CATEGORIES,
|
|
28
|
+
defaultConfig,
|
|
29
|
+
defineConfig
|
|
30
|
+
};
|