@fjall/util 37.0.0 → 39.0.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.
Files changed (43) hide show
  1. package/dist/.minified +1 -1
  2. package/dist/appTypes.d.ts +27 -0
  3. package/dist/appTypes.js +1 -0
  4. package/dist/aws/index.d.ts +2 -1
  5. package/dist/aws/index.js +1 -1
  6. package/dist/aws/infraTags.d.ts +50 -4
  7. package/dist/aws/infraTags.js +1 -1
  8. package/dist/aws/resourceTypes.d.ts +54 -0
  9. package/dist/aws/resourceTypes.js +1 -0
  10. package/dist/backupTiers.d.ts +11 -4
  11. package/dist/childEnvPolicy.d.ts +72 -0
  12. package/dist/childEnvPolicy.js +1 -0
  13. package/dist/ciSetup.d.ts +25 -0
  14. package/dist/ciSetup.js +1 -0
  15. package/dist/complianceIssue.d.ts +10 -0
  16. package/dist/complianceIssue.js +1 -1
  17. package/dist/deploy/approvalTokenOutput.d.ts +0 -9
  18. package/dist/deploy/approvalTokenOutput.js +1 -1
  19. package/dist/index.d.ts +13 -5
  20. package/dist/index.js +1 -1
  21. package/dist/infra/backupVault.d.ts +79 -2
  22. package/dist/infra/backupVault.js +1 -1
  23. package/dist/insights/vocabulary.d.ts +29 -0
  24. package/dist/insights/vocabulary.js +1 -0
  25. package/dist/manifest/io.d.ts +9 -0
  26. package/dist/manifest/io.js +1 -1
  27. package/dist/mcpProtocol/index.d.ts +47 -10
  28. package/dist/mcpProtocol/index.js +1 -1
  29. package/dist/naming/applicationStackNames.d.ts +47 -0
  30. package/dist/naming/applicationStackNames.js +1 -0
  31. package/dist/naming/stackExportNames.d.ts +78 -0
  32. package/dist/naming/stackExportNames.js +1 -0
  33. package/dist/nonEmptyPartial.d.ts +19 -0
  34. package/dist/nonEmptyPartial.js +1 -0
  35. package/dist/patterns/frameworkPatterns.d.ts +1 -8
  36. package/dist/patterns/index.d.ts +2 -2
  37. package/dist/patterns/index.js +1 -1
  38. package/dist/patterns/patternTypes.d.ts +44 -2
  39. package/dist/patterns/patternTypes.js +1 -1
  40. package/dist/posturePolicy/registry.d.ts +6 -10
  41. package/dist/posturePolicy/resourceKinds.d.ts +6 -6
  42. package/dist/posturePolicy/resourceKinds.js +1 -1
  43. package/package.json +6 -2
@@ -26,6 +26,7 @@ import { type PatternType } from "../patterns/patternTypes.js";
26
26
  import type { BackupTierDefaults } from "../backupTiers.js";
27
27
  import { type CodemodStatementType } from "../codemod/statementTypes.js";
28
28
  import type { MachineLaneStatus } from "./machineLane.js";
29
+ import type { NonEmptyPartial } from "../nonEmptyPartial.js";
29
30
  import type { PolicyResourceKind } from "./resourceKinds.js";
30
31
  /** Account stages on which an expected-lane finding is softened. */
31
32
  export declare const EXPECTED_LANE_STAGES: readonly ["development", "staging"];
@@ -81,21 +82,16 @@ export interface PatternCure {
81
82
  export type PolicyCureEdit<Family extends CodemodStatementType> = Family extends "pattern" ? PatternCure : string;
82
83
  /**
83
84
  * The cure per family of statement the finding's resource can belong to,
84
- * keyed by the codemod's vocabulary: a non-empty partial record — the union,
85
- * over every family, of "this family required, the rest optional" — so `{}`
86
- * is unrepresentable and a key the codemod cannot address fails typecheck.
85
+ * keyed by the codemod's vocabulary: a `NonEmptyPartial` record, so `{}` is
86
+ * unrepresentable and a key the codemod cannot address fails typecheck.
87
87
  * Each value is the edit as the user writes it in `infrastructure.ts` on a
88
88
  * statement of that family (`versioned: true` on a `storage` statement,
89
89
  * `storage.media.versioned: true` on the `pattern` statement that owns the
90
90
  * bucket, scoped to the pattern types that carry the path).
91
91
  */
92
- export type PolicyCure = {
93
- [Family in CodemodStatementType]: {
94
- readonly [K in Family]: PolicyCureEdit<K>;
95
- } & {
96
- readonly [K in Exclude<CodemodStatementType, Family>]?: PolicyCureEdit<K>;
97
- };
98
- }[CodemodStatementType];
92
+ export type PolicyCure = NonEmptyPartial<{
93
+ [Family in CodemodStatementType]: PolicyCureEdit<Family>;
94
+ }>;
99
95
  export interface ExpectedPolicyRow {
100
96
  ruleId: string;
101
97
  /**
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * The CloudFormation resource types the policy registries speak for: the
3
3
  * `kind` every row carries, and the vocabulary a create surface's footprint
4
- * is expressed in (`expectedRowsAtDefault`). The literals are
5
- * CloudFormation's own (`AWS::S3::Bucket`) — the strings the scan stores as
6
- * an asset's resource type and a webapp rule lists in its `resourceTypes` —
7
- * so a row's kind is checked against its rule by equality, never through a
8
- * mapping. A kind joins the tuple when a row needs it; a footprint can only
9
- * name a kind some row can match.
4
+ * is expressed in (`expectedRowsAtDefault`). Drawn from `AWS_RESOURCE_TYPES`
5
+ * — the literals are CloudFormation's own (`AWS::S3::Bucket`), the strings
6
+ * the scan stores as an asset's resource type and a webapp rule lists in its
7
+ * `resourceTypes` — so a row's kind is checked against its rule by equality,
8
+ * never through a mapping. A kind joins the tuple when a row needs it; a
9
+ * footprint can only name a kind some row can match.
10
10
  */
11
11
  export declare const POLICY_RESOURCE_KINDS: readonly ["AWS::S3::Bucket", "AWS::ECS::Cluster", "AWS::SNS::Topic", "AWS::KMS::Key"];
12
12
  export type PolicyResourceKind = (typeof POLICY_RESOURCE_KINDS)[number];
@@ -1 +1 @@
1
- var S=Object.defineProperty;var e=(t,o)=>S(t,"name",{value:o,configurable:!0});const r=["AWS::S3::Bucket","AWS::ECS::Cluster","AWS::SNS::Topic","AWS::KMS::Key"],c=new Set(r);function i(t){return typeof t=="string"&&c.has(t)}e(i,"isPolicyResourceKind");function p(t){const o=new Set;for(const n of t)i(n)&&o.add(n);return o}e(p,"policyResourceFootprint");export{r as POLICY_RESOURCE_KINDS,i as isPolicyResourceKind,p as policyResourceFootprint};
1
+ var e=Object.defineProperty;var r=(o,t)=>e(o,"name",{value:t,configurable:!0});import{AWS_RESOURCE_TYPES as n}from"../aws/resourceTypes.js";const E=[n.S3_BUCKET,n.ECS_CLUSTER,n.SNS_TOPIC,n.KMS_KEY],i=new Set(E);function _(o){return typeof o=="string"&&i.has(o)}r(_,"isPolicyResourceKind");function s(o){const t=new Set;for(const S of o)_(S)&&t.add(S);return t}r(s,"policyResourceFootprint");export{E as POLICY_RESOURCE_KINDS,_ as isPolicyResourceKind,s as policyResourceFootprint};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjall/util",
3
- "version": "37.0.0",
3
+ "version": "39.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/fjall-tech/fjall.git",
@@ -119,6 +119,10 @@
119
119
  "types": "./dist/insights/computePatternFingerprint.d.ts",
120
120
  "default": "./dist/insights/computePatternFingerprint.js"
121
121
  },
122
+ "./insights/vocabulary": {
123
+ "types": "./dist/insights/vocabulary.d.ts",
124
+ "default": "./dist/insights/vocabulary.js"
125
+ },
122
126
  "./mcpProtocol": {
123
127
  "types": "./dist/mcpProtocol/index.d.ts",
124
128
  "default": "./dist/mcpProtocol/index.js"
@@ -174,7 +178,7 @@
174
178
  "prettier": "^3.9.6",
175
179
  "tsc-watch": "^7.2.1",
176
180
  "typescript": "^6.0.3",
177
- "vitest": "^4.1.10"
181
+ "vitest": "^4.1.11"
178
182
  },
179
183
  "dependencies": {
180
184
  "zod": "^4.4.3"