@caelo-cms/shared 0.10.61 → 0.10.62

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 (50) hide show
  1. package/dist/auto-update.d.ts +15 -0
  2. package/dist/auto-update.d.ts.map +1 -1
  3. package/dist/auto-update.js +27 -0
  4. package/dist/auto-update.js.map +1 -1
  5. package/dist/cloud-shell-install.d.ts +42 -10
  6. package/dist/cloud-shell-install.d.ts.map +1 -1
  7. package/dist/cloud-shell-install.js +59 -0
  8. package/dist/cloud-shell-install.js.map +1 -1
  9. package/dist/css-scope-scan.d.ts +29 -0
  10. package/dist/css-scope-scan.d.ts.map +1 -0
  11. package/dist/css-scope-scan.js +251 -0
  12. package/dist/css-scope-scan.js.map +1 -0
  13. package/dist/font-assets.d.ts +1 -1
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/interactions.d.ts +65 -13
  19. package/dist/interactions.d.ts.map +1 -1
  20. package/dist/interactions.js +132 -33
  21. package/dist/interactions.js.map +1 -1
  22. package/dist/preview-compose.d.ts.map +1 -1
  23. package/dist/preview-compose.js +15 -19
  24. package/dist/preview-compose.js.map +1 -1
  25. package/dist/release-manifest.d.ts +3 -0
  26. package/dist/release-manifest.d.ts.map +1 -1
  27. package/dist/release-manifest.js +11 -0
  28. package/dist/release-manifest.js.map +1 -1
  29. package/dist/static-security-headers.d.ts +50 -0
  30. package/dist/static-security-headers.d.ts.map +1 -0
  31. package/dist/static-security-headers.js +58 -0
  32. package/dist/static-security-headers.js.map +1 -0
  33. package/dist/version.d.ts +2 -2
  34. package/dist/version.js +1 -1
  35. package/package.json +1 -1
  36. package/src/auto-update.test.ts +25 -0
  37. package/src/auto-update.ts +36 -0
  38. package/src/cloud-shell-install.test.ts +36 -1
  39. package/src/cloud-shell-install.ts +64 -0
  40. package/src/css-scope-scan.test.ts +117 -0
  41. package/src/css-scope-scan.ts +263 -0
  42. package/src/index.ts +2 -0
  43. package/src/interactions.test.ts +61 -0
  44. package/src/interactions.ts +181 -26
  45. package/src/preview-compose.test.ts +87 -1
  46. package/src/preview-compose.ts +16 -21
  47. package/src/release-manifest.ts +12 -0
  48. package/src/static-security-headers.test.ts +60 -0
  49. package/src/static-security-headers.ts +64 -0
  50. package/src/version.ts +1 -1
@@ -35,6 +35,11 @@
35
35
  * 10. soak period not over (security releases: their own, shorter one) → wait;
36
36
  * 11. outside the maintenance window → wait until it opens;
37
37
  * 12. otherwise → install.
38
+ *
39
+ * On top of the rules: a release the Owner skipped ("Skip this time" in
40
+ * Settings → Updates, #868) that the rules would install or schedule is
41
+ * offered instead (notify). Only that version: a newer release installs
42
+ * automatically again, and the skipped one stays installable by hand.
38
43
  */
39
44
  import { type PlatformUpdateRoute, type StoredUpdatePolicy, type UpdateKind } from "./platform-updates.js";
40
45
  /** Why the scheduler queued an automatic install (`platform_update_requests.auto_basis`). */
@@ -93,6 +98,11 @@ export interface AutoUpdateInput {
93
98
  readonly convergeAvailable: boolean;
94
99
  /** Why it has none right now, in plain words (null: none set up at all). */
95
100
  readonly upgraderProblem?: string | null;
101
+ /**
102
+ * The release whose automatic install the Owner skipped
103
+ * (`platform_update_scheduler.skipped_version`, #868); null when none.
104
+ */
105
+ readonly skippedVersion: string | null;
96
106
  readonly now: Date;
97
107
  }
98
108
  /** What the scheduler does with the newest release now. */
@@ -133,6 +143,11 @@ export declare function isPausedAt(policy: Pick<StoredUpdatePolicy, "paused" | "
133
143
  * window; null keeps the caller honest instead of guessing).
134
144
  */
135
145
  export declare function nextWindowOpening(policy: Pick<StoredUpdatePolicy, "windowStart" | "windowEnd" | "windowTimezone">, from: Date): Date | null;
146
+ /**
147
+ * The scheduler's sentence for a release whose automatic install the Owner
148
+ * skipped (#868); the skip op writes the same one right away.
149
+ */
150
+ export declare function skippedInstallReason(version: string): string;
136
151
  /** Decide what the scheduler does now. See the file comment for the rules. */
137
152
  export declare function decideAutoUpdate(input: AutoUpdateInput): AutoUpdateDecision;
138
153
  //# sourceMappingURL=auto-update.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auto-update.d.ts","sourceRoot":"","sources":["../src/auto-update.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EAEhB,MAAM,uBAAuB,CAAC;AAE/B,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,yCAA0C,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,0FAQtB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,wEAAwE;AACxE,eAAO,MAAM,yBAAyB,iFAM5B,CAAC;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE;IAC1C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC,GAAG,OAAO,CAEV;AAED,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,+EAA+E;IAC/E,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AAED,oDAAoD;AAC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C,KAAK,EAAE,eAAe,CAAC;IAChC,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN,sFAAsF;AACtF,wBAAgB,UAAU,CACxB,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,aAAa,CAAC,EAC1D,GAAG,EAAE,IAAI,GACR,OAAO,CAGT;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,WAAW,GAAG,gBAAgB,CAAC,EAChF,IAAI,EAAE,IAAI,GACT,IAAI,GAAG,IAAI,CAOb;AAqBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,kBAAkB,CAe3E"}
@@ -36,6 +36,11 @@
36
36
  * 10. soak period not over (security releases: their own, shorter one) → wait;
37
37
  * 11. outside the maintenance window → wait until it opens;
38
38
  * 12. otherwise → install.
39
+ *
40
+ * On top of the rules: a release the Owner skipped ("Skip this time" in
41
+ * Settings → Updates, #868) that the rules would install or schedule is
42
+ * offered instead (notify). Only that version: a newer release installs
43
+ * automatically again, and the skipped one stays installable by hand.
39
44
  */
40
45
  import { inMaintenanceWindow, updateKind, } from "./platform-updates.js";
41
46
  /** Why the scheduler queued an automatic install (`platform_update_requests.auto_basis`). */
@@ -102,8 +107,30 @@ function isStable(version) {
102
107
  return !version.includes("-");
103
108
  }
104
109
  const hours = (n) => `${n} hour${n === 1 ? "" : "s"}`;
110
+ /**
111
+ * The scheduler's sentence for a release whose automatic install the Owner
112
+ * skipped (#868); the skip op writes the same one right away.
113
+ */
114
+ export function skippedInstallReason(version) {
115
+ return `The Owner skipped the automatic install of v${version}. It stays available in Settings → Updates; the next newer release installs automatically again.`;
116
+ }
105
117
  /** Decide what the scheduler does now. See the file comment for the rules. */
106
118
  export function decideAutoUpdate(input) {
119
+ const decision = decideByRules(input);
120
+ if ((decision.action === "install" || decision.action === "wait") &&
121
+ input.skippedVersion !== null &&
122
+ decision.version === input.skippedVersion) {
123
+ return {
124
+ action: "notify",
125
+ version: decision.version,
126
+ kind: decision.kind,
127
+ reason: skippedInstallReason(decision.version),
128
+ };
129
+ }
130
+ return decision;
131
+ }
132
+ /** The numbered rules of the file comment, without the Owner's skip. */
133
+ function decideByRules(input) {
107
134
  const { policy, release, now } = input;
108
135
  if (!release) {
109
136
  return { action: "none", reason: "The release check has not found a Caelo release yet." };
@@ -1 +1 @@
1
- {"version":3,"file":"auto-update.js","sourceRoot":"","sources":["../src/auto-update.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,mBAAmB,EAInB,UAAU,GACX,MAAM,uBAAuB,CAAC;AAE/B,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAGzE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM;IACN,QAAQ;IACR,MAAM;IACN,SAAS;IACT,QAAQ;IACR,mBAAmB;IACnB,SAAS;CACD,CAAC;AAGX,wEAAwE;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,WAAW;IACX,WAAW;IACX,WAAW;IACX,QAAQ;IACR,mBAAmB;CACX,CAAC;AAGX;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAGjC;IACC,OAAO,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AAC7D,CAAC;AAsED,sFAAsF;AACtF,MAAM,UAAU,UAAU,CACxB,MAA0D,EAC1D,GAAS;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L,MAAM,EAAE,MAAM;YACd,GAAG,IAAI;YACP,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC,qDAAqD,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC,EAAE,GAAG;SACxM,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO;YACL,MAAM,EAAE,MAAM;YACd,GAAG,IAAI;YACP,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC;YACrC,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC,+DAA+D,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,cAAc,IAAI;SACvK,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,GAAG,IAAI;QACP,MAAM,EAAE,IAAI,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC,8DAA8D,KAAK,CAAC,IAAI,CAAC,uBAAuB,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC,EAAE,GAAG;KACvM,CAAC;AACJ,CAAC"}
@@ -1,13 +1,3 @@
1
- /**
2
- * The "Open in Google Cloud Shell" install link (epic #696, Phase 3).
3
- *
4
- * The link opens github.com/caelo-cms/install on the `release-v<version>`
5
- * branch that repository's track-release workflow creates for every stable
6
- * release (and never moves), with the provider's walkthrough tutorial. Its
7
- * `run.sh` pins and verifies exactly that release of the provisioner. One
8
- * builder for every place that shows the link — README, docs, and the
9
- * admin's "run this release in Cloud Shell" hint — so they can't drift.
10
- */
11
1
  /** The repository the Cloud Shell button clones. */
12
2
  export declare const CLOUD_SHELL_INSTALL_REPO = "https://github.com/caelo-cms/install";
13
3
  /** The button image Google publishes for "Open in Cloud Shell" links. */
@@ -24,4 +14,46 @@ export type CloudShellProvider = "gcp" | "gcp-firebase";
24
14
  * // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=release-v0.10.47&cloudshell_tutorial=gcp.md"
25
15
  */
26
16
  export declare function cloudShellInstallUrl(version: string, provider: CloudShellProvider): string;
17
+ /**
18
+ * The first release whose `release-v<version>` branch in the install
19
+ * repository ships the break-glass upgrade (#816): `upgrade-gcp.md`,
20
+ * `upgrade-gcp-firebase.md` and `./run.sh upgrade`. Release branches are
21
+ * cut from the install repository's main when the release is tracked and
22
+ * never move, so older branches lack the tutorial; for them the admin shows
23
+ * the CLI command instead of a link that would open nothing.
24
+ *
25
+ * Set to the release that follows caelo-cms/install#3 (the upgrade
26
+ * tutorials) merging; if that merge slips past a release, raise it.
27
+ */
28
+ export declare const CLOUD_SHELL_UPGRADE_FIRST_VERSION = "0.10.60";
29
+ /**
30
+ * The Cloud Shell link that opens the break-glass UPGRADE walkthrough of a
31
+ * stable release (#816), never the install wizard.
32
+ *
33
+ * Cloud Shell links cannot carry the project or the install: Google
34
+ * documents no parameter for either, and a tutorial cannot read the URL.
35
+ * `./run.sh upgrade` finds the Owner's install itself (the projects whose
36
+ * ops bucket holds `install/install.json`); the admin shows the explicit
37
+ * `--project … --install …` line ({@link cloudShellUpgradeCommand}) next to
38
+ * the button for an Owner with several installs.
39
+ *
40
+ * @returns null for a pre-release (no pinned branch) or a release before
41
+ * {@link CLOUD_SHELL_UPGRADE_FIRST_VERSION} (its branch has no tutorial)
42
+ *
43
+ * @example cloudShellUpgradeUrl("0.10.60", "gcp-firebase")
44
+ * // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=release-v0.10.60&cloudshell_tutorial=upgrade-gcp-firebase.md"
45
+ */
46
+ export declare function cloudShellUpgradeUrl(version: string, provider: CloudShellProvider): string | null;
47
+ /**
48
+ * The one line the break-glass walkthrough runs, from the clone of the
49
+ * install repository: `./run.sh upgrade` with the install named when the
50
+ * admin knows it (`--project` from its upgrader job, `--install` = domain).
51
+ *
52
+ * @example cloudShellUpgradeCommand({ project: "acme-site", install: "acme.com" })
53
+ * // → "./run.sh upgrade --project acme-site --install acme.com"
54
+ */
55
+ export declare function cloudShellUpgradeCommand(target: {
56
+ readonly project: string | null;
57
+ readonly install: string;
58
+ }): string;
27
59
  //# sourceMappingURL=cloud-shell-install.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-shell-install.d.ts","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,oDAAoD;AACpD,eAAO,MAAM,wBAAwB,yCAAyC,CAAC;AAE/E,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,qDAAqD,CAAC;AAE3F,oEAAoE;AACpE,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,cAAc,CAAC;AAIxD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAa1F"}
1
+ {"version":3,"file":"cloud-shell-install.d.ts","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"AAeA,oDAAoD;AACpD,eAAO,MAAM,wBAAwB,yCAAyC,CAAC;AAE/E,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,qDAAqD,CAAC;AAE3F,oEAAoE;AACpE,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,cAAc,CAAC;AAIxD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAa1F;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC,YAAY,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAUjG;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GAAG,MAAM,CAOT"}
@@ -9,6 +9,7 @@
9
9
  * builder for every place that shows the link — README, docs, and the
10
10
  * admin's "run this release in Cloud Shell" hint — so they can't drift.
11
11
  */
12
+ import { isNewerVersion } from "./version.js";
12
13
  /** The repository the Cloud Shell button clones. */
13
14
  export const CLOUD_SHELL_INSTALL_REPO = "https://github.com/caelo-cms/install";
14
15
  /** The button image Google publishes for "Open in Cloud Shell" links. */
@@ -35,4 +36,62 @@ export function cloudShellInstallUrl(version, provider) {
35
36
  `&cloudshell_tutorial=${provider}.md`,
36
37
  ].join("");
37
38
  }
39
+ /**
40
+ * The first release whose `release-v<version>` branch in the install
41
+ * repository ships the break-glass upgrade (#816): `upgrade-gcp.md`,
42
+ * `upgrade-gcp-firebase.md` and `./run.sh upgrade`. Release branches are
43
+ * cut from the install repository's main when the release is tracked and
44
+ * never move, so older branches lack the tutorial; for them the admin shows
45
+ * the CLI command instead of a link that would open nothing.
46
+ *
47
+ * Set to the release that follows caelo-cms/install#3 (the upgrade
48
+ * tutorials) merging; if that merge slips past a release, raise it.
49
+ */
50
+ export const CLOUD_SHELL_UPGRADE_FIRST_VERSION = "0.10.60";
51
+ /**
52
+ * The Cloud Shell link that opens the break-glass UPGRADE walkthrough of a
53
+ * stable release (#816), never the install wizard.
54
+ *
55
+ * Cloud Shell links cannot carry the project or the install: Google
56
+ * documents no parameter for either, and a tutorial cannot read the URL.
57
+ * `./run.sh upgrade` finds the Owner's install itself (the projects whose
58
+ * ops bucket holds `install/install.json`); the admin shows the explicit
59
+ * `--project … --install …` line ({@link cloudShellUpgradeCommand}) next to
60
+ * the button for an Owner with several installs.
61
+ *
62
+ * @returns null for a pre-release (no pinned branch) or a release before
63
+ * {@link CLOUD_SHELL_UPGRADE_FIRST_VERSION} (its branch has no tutorial)
64
+ *
65
+ * @example cloudShellUpgradeUrl("0.10.60", "gcp-firebase")
66
+ * // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=release-v0.10.60&cloudshell_tutorial=upgrade-gcp-firebase.md"
67
+ */
68
+ export function cloudShellUpgradeUrl(version, provider) {
69
+ const m = STABLE.exec(version);
70
+ if (!m?.[1])
71
+ return null;
72
+ if (isNewerVersion(CLOUD_SHELL_UPGRADE_FIRST_VERSION, m[1]))
73
+ return null;
74
+ return [
75
+ "https://shell.cloud.google.com/cloudshell/editor",
76
+ `?cloudshell_git_repo=${CLOUD_SHELL_INSTALL_REPO}`,
77
+ `&cloudshell_git_branch=release-v${m[1]}`,
78
+ `&cloudshell_tutorial=upgrade-${provider}.md`,
79
+ ].join("");
80
+ }
81
+ /**
82
+ * The one line the break-glass walkthrough runs, from the clone of the
83
+ * install repository: `./run.sh upgrade` with the install named when the
84
+ * admin knows it (`--project` from its upgrader job, `--install` = domain).
85
+ *
86
+ * @example cloudShellUpgradeCommand({ project: "acme-site", install: "acme.com" })
87
+ * // → "./run.sh upgrade --project acme-site --install acme.com"
88
+ */
89
+ export function cloudShellUpgradeCommand(target) {
90
+ return [
91
+ "./run.sh upgrade",
92
+ ...(target.project ? ["--project", target.project] : []),
93
+ "--install",
94
+ target.install,
95
+ ].join(" ");
96
+ }
38
97
  //# sourceMappingURL=cloud-shell-install.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-shell-install.js","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;GASG;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AO;QACL,kDAAkD;QAClD,wBAAwB,wBAAwB,EAAE;QAClD,mCAAmC,CAAC,CAAC,CAAC,CAAC,EAAE;QACzC,wBAAwB,QAAQ,KAAK;KACtC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,QAA4B;IAChF,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,cAAc,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACzE,OAAO;QACL,kDAAkD;QAClD,wBAAwB,wBAAwB,EAAE;QAClD,mCAAmC,CAAC,CAAC,CAAC,CAAC,EAAE;QACzC,gCAAgC,QAAQ,KAAK;KAC9C,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAGxC;IACC,OAAO;QACL,kBAAkB;QAClB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,WAAW;QACX,MAAM,CAAC,OAAO;KACf,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,29 @@
1
+ /** Class and id tokens of the module's first element, or null when the html has no element. */
2
+ export declare function moduleRootTokens(html: string): {
3
+ classes: string[];
4
+ id: string | null;
5
+ } | null;
6
+ /** What the scope check found in one module's CSS. */
7
+ export interface CssScopeFindings {
8
+ /** Selectors with no class, id or attribute at all (`h1`, `body p`, `*`). */
9
+ readonly global: string[];
10
+ /** Selectors that are not tied to the module's root class (needs the html). */
11
+ readonly unanchored: string[];
12
+ /** The module's root classes the CSS was checked against. */
13
+ readonly rootClasses: string[];
14
+ /** The module has CSS but its root element carries no class to scope under. */
15
+ readonly rootHasNoClass: boolean;
16
+ }
17
+ /**
18
+ * Check a module's CSS for selectors that bleed into other modules.
19
+ * Pass the module's `html` when the write carried it: the selectors are
20
+ * then also checked against the root element's classes. Prefixed class
21
+ * names count as scoped (`.hero__title`, `.hero-cta` under root `.hero`).
22
+ */
23
+ export declare function scanModuleCssScope(input: {
24
+ css: string;
25
+ html?: string;
26
+ }): CssScopeFindings;
27
+ /** The findings as one tool-result sentence group, or null when the CSS is scoped. */
28
+ export declare function formatCssScopeFindings(f: CssScopeFindings): string | null;
29
+ //# sourceMappingURL=css-scope-scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-scope-scan.d.ts","sourceRoot":"","sources":["../src/css-scope-scan.ts"],"names":[],"mappings":"AAmJA,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAY9F;AAoBD,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAC9B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAC/B,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAiC1F;AAQD,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAsBzE"}
@@ -0,0 +1,251 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+ /**
3
+ * issue #158 — module CSS scoping check (epic #149).
4
+ *
5
+ * Every module's CSS lands in ONE page-wide stylesheet, so a selector
6
+ * that is not tied to the module bleeds into every other module on the
7
+ * page: an `h1 {}` in the hero restyles the pricing table's heading, a
8
+ * `.card {}` in one module restyles another module's cards. The
9
+ * convention (edit_module description, design-quality skill) is to nest
10
+ * module CSS under the module's own root class; this scanner is the
11
+ * mechanical write-time check that rides the authoring tool's result,
12
+ * so the AI fixes the selector in the same turn. A warning, not a gate:
13
+ * the write already succeeded, and a module may legitimately style
14
+ * something global on purpose.
15
+ *
16
+ * Pure string analysis, no CSS parser dependency: comments and strings
17
+ * are skipped, rule preludes are read at the top level and inside
18
+ * grouping at-rules (`@media`, `@supports`, `@layer`, `@container`),
19
+ * and blocks whose contents are not selectors (`@keyframes`,
20
+ * `@font-face`, …) are skipped whole.
21
+ */
22
+ /** Grouping at-rules whose blocks contain style rules. */
23
+ const GROUPING_AT_RULES = new Set(["media", "supports", "layer", "container", "document"]);
24
+ /** Max offending selectors named per finding. */
25
+ const MAX_SELECTORS_SHOWN = 5;
26
+ /** Index just past the string literal starting at `i` (a quote char). */
27
+ function skipString(css, i) {
28
+ const quote = css[i];
29
+ let j = i + 1;
30
+ while (j < css.length && css[j] !== quote) {
31
+ if (css[j] === "\\")
32
+ j++;
33
+ j++;
34
+ }
35
+ return j + 1;
36
+ }
37
+ /** Index of the `}` matching the `{` at `open`, or css.length when unbalanced. */
38
+ function matchingBrace(css, open) {
39
+ let depth = 0;
40
+ for (let i = open; i < css.length; i++) {
41
+ const c = css[i];
42
+ if (c === '"' || c === "'") {
43
+ i = skipString(css, i) - 1;
44
+ }
45
+ else if (c === "{") {
46
+ depth++;
47
+ }
48
+ else if (c === "}") {
49
+ depth--;
50
+ if (depth === 0)
51
+ return i;
52
+ }
53
+ }
54
+ return css.length;
55
+ }
56
+ /** Selector preludes of every style rule in `css[start, end)`, recursing into grouping at-rules. */
57
+ function collectPreludes(css, start, end, out) {
58
+ let i = start;
59
+ while (i < end) {
60
+ // Read one prelude: up to `{` (a block) or `;` (a statement at-rule).
61
+ let j = i;
62
+ while (j < end && css[j] !== "{" && css[j] !== ";" && css[j] !== "}") {
63
+ if (css[j] === '"' || css[j] === "'")
64
+ j = skipString(css, j);
65
+ else
66
+ j++;
67
+ }
68
+ const prelude = css.slice(i, j).trim();
69
+ if (j >= end)
70
+ return;
71
+ if (css[j] !== "{") {
72
+ i = j + 1;
73
+ continue;
74
+ }
75
+ const close = matchingBrace(css, j);
76
+ if (prelude.startsWith("@")) {
77
+ const name = /^@([\w-]+)/.exec(prelude)?.[1]?.toLowerCase() ?? "";
78
+ if (GROUPING_AT_RULES.has(name))
79
+ collectPreludes(css, j + 1, close, out);
80
+ }
81
+ else if (prelude.length > 0) {
82
+ out.push(prelude);
83
+ }
84
+ i = close + 1;
85
+ }
86
+ }
87
+ /** Split a selector list on top-level commas (not inside `()` / `[]`). */
88
+ function splitSelectorList(prelude) {
89
+ const out = [];
90
+ let depth = 0;
91
+ let from = 0;
92
+ for (let i = 0; i < prelude.length; i++) {
93
+ const c = prelude[i];
94
+ if (c === "(" || c === "[")
95
+ depth++;
96
+ else if (c === ")" || c === "]")
97
+ depth--;
98
+ else if (c === "," && depth === 0) {
99
+ out.push(prelude.slice(from, i));
100
+ from = i + 1;
101
+ }
102
+ }
103
+ out.push(prelude.slice(from));
104
+ return out.map((s) => s.trim().replace(/\s+/g, " ")).filter((s) => s.length > 0);
105
+ }
106
+ /** The selector with every `(…)` argument removed (`:not(.x)` does not scope `h1:not(.x)`). */
107
+ function withoutArguments(selector) {
108
+ let out = "";
109
+ let depth = 0;
110
+ for (const c of selector) {
111
+ if (c === "(")
112
+ depth++;
113
+ else if (c === ")")
114
+ depth--;
115
+ else if (depth === 0)
116
+ out += c;
117
+ }
118
+ return out;
119
+ }
120
+ /**
121
+ * Index of the first character after leading whitespace and `<!-- -->`
122
+ * comments, or -1 when a comment is never closed. A scan, not a regex:
123
+ * `(?:<!--[\s\S]*?-->\s*)*` backtracks exponentially on `<!----><!--…`
124
+ * input (CodeQL js/redos), and module html is operator/AI supplied.
125
+ */
126
+ function skipLeadingHtmlComments(html) {
127
+ let i = 0;
128
+ for (;;) {
129
+ while (i < html.length && /\s/.test(html.charAt(i)))
130
+ i++;
131
+ if (!html.startsWith("<!--", i))
132
+ return i;
133
+ const end = html.indexOf("-->", i + 4);
134
+ if (end === -1)
135
+ return -1;
136
+ i = end + 3;
137
+ }
138
+ }
139
+ /**
140
+ * The attribute text of the start tag at `at` (`""` for `<div>`), or null
141
+ * when no element starts there. Parsed by hand: the regex form
142
+ * `<name(\s[^>]*)?>` is quadratic on `<A\t<A\t…` input without a `>`
143
+ * (CodeQL js/polynomial-redos).
144
+ */
145
+ function openTagAttributes(html, at) {
146
+ if (html.charAt(at) !== "<" || !/[a-zA-Z]/.test(html.charAt(at + 1)))
147
+ return null;
148
+ let nameEnd = at + 2;
149
+ while (nameEnd < html.length && /[\w-]/.test(html.charAt(nameEnd)))
150
+ nameEnd++;
151
+ const close = html.indexOf(">", nameEnd);
152
+ if (close === -1)
153
+ return null;
154
+ const attrs = html.slice(nameEnd, close);
155
+ return attrs === "" || /^\s/.test(attrs) ? attrs : null;
156
+ }
157
+ /** Class and id tokens of the module's first element, or null when the html has no element. */
158
+ export function moduleRootTokens(html) {
159
+ const start = skipLeadingHtmlComments(html);
160
+ if (start === -1)
161
+ return null;
162
+ const attrs = openTagAttributes(html, start);
163
+ if (attrs === null)
164
+ return null;
165
+ const classAttr = /\sclass\s*=\s*(?:"([^"]*)"|'([^']*)')/.exec(attrs);
166
+ const classes = (classAttr?.[1] ?? classAttr?.[2] ?? "")
167
+ .split(/\s+/)
168
+ .filter((c) => c.length > 0 && !c.includes("{{"));
169
+ const idAttr = /\sid\s*=\s*(?:"([^"]*)"|'([^']*)')/.exec(attrs);
170
+ const id = idAttr?.[1] ?? idAttr?.[2] ?? null;
171
+ return { classes, id: id !== null && !id.includes("{{") ? id : null };
172
+ }
173
+ /**
174
+ * The CSS without its comments. An unterminated `/*` runs to the end of
175
+ * the input, as in the CSS syntax spec. A scan rather than a lazy regex,
176
+ * which is quadratic on `/*a/*a/*…` input (CodeQL js/polynomial-redos).
177
+ */
178
+ function stripCssComments(css) {
179
+ let out = "";
180
+ let from = 0;
181
+ for (;;) {
182
+ const open = css.indexOf("/*", from);
183
+ if (open === -1)
184
+ return out + css.slice(from);
185
+ out += css.slice(from, open);
186
+ const close = css.indexOf("*/", open + 2);
187
+ if (close === -1)
188
+ return out;
189
+ from = close + 2;
190
+ }
191
+ }
192
+ /**
193
+ * Check a module's CSS for selectors that bleed into other modules.
194
+ * Pass the module's `html` when the write carried it: the selectors are
195
+ * then also checked against the root element's classes. Prefixed class
196
+ * names count as scoped (`.hero__title`, `.hero-cta` under root `.hero`).
197
+ */
198
+ export function scanModuleCssScope(input) {
199
+ const css = stripCssComments(input.css);
200
+ const preludes = [];
201
+ collectPreludes(css, 0, css.length, preludes);
202
+ const selectors = preludes.flatMap(splitSelectorList);
203
+ const root = input.html !== undefined ? moduleRootTokens(input.html) : null;
204
+ const rootClasses = root?.classes ?? [];
205
+ const anchorable = rootClasses.length > 0 || (root?.id ?? null) !== null;
206
+ const global = [];
207
+ const unanchored = [];
208
+ for (const selector of selectors) {
209
+ const bare = withoutArguments(selector);
210
+ if (!/[.#[]/.test(bare)) {
211
+ global.push(selector);
212
+ continue;
213
+ }
214
+ if (!anchorable)
215
+ continue;
216
+ const classes = [...bare.matchAll(/\.(-?[_a-zA-Z][\w-]*)/g)].map((m) => m[1] ?? "");
217
+ const anchored = classes.some((c) => rootClasses.some((r) => c === r || c.startsWith(`${r}-`) || c.startsWith(`${r}_`))) ||
218
+ (root?.id != null && bare.includes(`#${root.id}`));
219
+ if (!anchored)
220
+ unanchored.push(selector);
221
+ }
222
+ return {
223
+ global,
224
+ unanchored,
225
+ rootClasses,
226
+ rootHasNoClass: root !== null && !anchorable && selectors.length > 0,
227
+ };
228
+ }
229
+ function listSelectors(selectors) {
230
+ const shown = selectors.slice(0, MAX_SELECTORS_SHOWN).map((s) => `\`${s}\``);
231
+ const more = selectors.length - shown.length;
232
+ return more > 0 ? `${shown.join(", ")} (+${more} more)` : shown.join(", ");
233
+ }
234
+ /** The findings as one tool-result sentence group, or null when the CSS is scoped. */
235
+ export function formatCssScopeFindings(f) {
236
+ const scopeHint = f.rootClasses.length > 0
237
+ ? `nest them under the module root \`.${f.rootClasses[0]}\` (e.g. \`.${f.rootClasses[0]} h2\`)`
238
+ : "nest them under the module's root class";
239
+ const parts = [];
240
+ if (f.global.length > 0) {
241
+ parts.push(`module CSS selectors ${listSelectors(f.global)} style EVERY matching element on the page, including other modules' — ${scopeHint}`);
242
+ }
243
+ if (f.unanchored.length > 0) {
244
+ parts.push(`module CSS selectors ${listSelectors(f.unanchored)} are not scoped to this module and can restyle other modules using the same class — ${scopeHint} or prefix the class with it`);
245
+ }
246
+ if (f.rootHasNoClass) {
247
+ parts.push('the module\'s root element has no class to scope its CSS under — give it one (e.g. `<section class="pricing">`) and nest the module CSS under it');
248
+ }
249
+ return parts.length > 0 ? parts.join(". ") : null;
250
+ }
251
+ //# sourceMappingURL=css-scope-scan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-scope-scan.js","sourceRoot":"","sources":["../src/css-scope-scan.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0DAA0D;AAC1D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAE3F,iDAAiD;AACjD,MAAM,mBAAm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C;IACD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC"}
@@ -65,8 +65,8 @@ export declare const fontResolveInput: z.ZodObject<{
65
65
  id: z.ZodString;
66
66
  sha256: z.ZodString;
67
67
  use: z.ZodEnum<{
68
- web: "web";
69
68
  document: "document";
69
+ web: "web";
70
70
  }>;
71
71
  text: z.ZodDefault<z.ZodString>;
72
72
  formats: z.ZodArray<z.ZodEnum<{
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./cloud-shell-install.js";
10
10
  export * from "./content.js";
11
11
  export * from "./context.js";
12
12
  export * from "./css-gradient-scan.js";
13
+ export * from "./css-scope-scan.js";
13
14
  export * from "./css-var-scan.js";
14
15
  export * from "./database-url.js";
15
16
  export * from "./design-draft-shell.js";
@@ -55,6 +56,7 @@ export * from "./skills.js";
55
56
  export * from "./snapshots.js";
56
57
  export * from "./staging-gate.js";
57
58
  export * from "./static-cache-policy.js";
59
+ export * from "./static-security-headers.js";
58
60
  export * from "./strip-cdata.js";
59
61
  export * from "./structured-sets.js";
60
62
  export * from "./subagents.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,cAAc,CAAC;AAExC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,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Ac,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,KAAK,YAAY,EACjB,cAAc,EACd,YAAY,GACb,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ export * from "./cloud-shell-install.js";
11
11
  export * from "./content.js";
12
12
  export * from "./context.js";
13
13
  export * from "./css-gradient-scan.js";
14
+ export * from "./css-scope-scan.js";
14
15
  export * from "./css-var-scan.js";
15
16
  export * from "./database-url.js";
16
17
  export * from "./design-draft-shell.js";
@@ -56,6 +57,7 @@ export * from "./skills.js";
56
57
  export * from "./snapshots.js";
57
58
  export * from "./staging-gate.js";
58
59
  export * from "./static-cache-policy.js";
60
+ export * from "./static-security-headers.js";
59
61
  export * from "./strip-cdata.js";
60
62
  export * from "./structured-sets.js";
61
63
  export * from "./subagents.js";