Skip to content

Commit 1d963e8

Browse files
authored
Merge branch 'KelvinTegelaar:main' into main
2 parents 02e73fc + 095fd97 commit 1d963e8

63 files changed

Lines changed: 1615 additions & 358 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cipp_dev_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
# Upload to Azure Blob Storage
5656
- name: Azure Blob Upload
57-
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.11.0
57+
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.12.0
5858
with:
5959
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
6060
container_name: cipp

.github/workflows/cipp_frontend_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
# Upload to Azure Blob Storage
5656
- name: Azure Blob Upload
57-
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.11.0
57+
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.12.0
5858
with:
5959
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
6060
container_name: cipp

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cipp",
3-
"version": "10.5.2",
3+
"version": "10.5.3",
44
"author": "CIPP Contributors",
55
"homepage": "https://cipp.app/",
66
"bugs": {
@@ -16,7 +16,7 @@
1616
},
1717
"scripts": {
1818
"dev": "next -H 127.0.0.1",
19-
"build": "next build --webpack && rm -rf package.json yarn.lock",
19+
"build": "node scripts/skip-export-build-traces.mjs && next build --webpack && rm -rf package.json yarn.lock",
2020
"start": "next start",
2121
"export": "next export",
2222
"lint": "npx eslint .",
@@ -40,10 +40,10 @@
4040
"@nivo/core": "^0.99.0",
4141
"@nivo/sankey": "^0.99.0",
4242
"@react-pdf/renderer": "^4.5.1",
43-
"@reduxjs/toolkit": "^2.11.2",
43+
"@reduxjs/toolkit": "^2.12.0",
4444
"@tanstack/query-sync-storage-persister": "^5.90.25",
4545
"@tanstack/react-query": "^5.100.10",
46-
"@tanstack/react-query-devtools": "^5.96.2",
46+
"@tanstack/react-query-devtools": "^5.100.10",
4747
"@tanstack/react-query-persist-client": "^5.96.2",
4848
"@tanstack/react-table": "^8.19.2",
4949
"@tiptap/core": "^3.22.3",
@@ -53,11 +53,11 @@
5353
"@tiptap/react": "^3.20.5",
5454
"@tiptap/starter-kit": "^3.20.5",
5555
"@vvo/tzdb": "^6.198.0",
56-
"apexcharts": "5.10.4",
56+
"apexcharts": "5.14.0",
5757
"axios": "1.16.1",
5858
"date-fns": "4.1.0",
5959
"diff": "^8.0.3",
60-
"dompurify": "^3.4.3",
60+
"dompurify": "^3.4.9",
6161
"driver.js": "^1.4.0",
6262
"eml-parse-js": "^1.2.0-beta.0",
6363
"export-to-csv": "^1.3.0",
@@ -72,7 +72,7 @@
7272
"lodash.isequal": "4.5.0",
7373
"material-react-table": "^3.0.1",
7474
"monaco-editor": "^0.55.1",
75-
"mui-tiptap": "^1.30.0",
75+
"mui-tiptap": "^1.31.0",
7676
"next": "^16.2.2",
7777
"nprogress": "0.2.0",
7878
"numeral": "2.0.6",
@@ -116,4 +116,4 @@
116116
"eslint-config-prettier": "^10.1.8",
117117
"prettier": "^3.8.1"
118118
}
119-
}
119+
}

public/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "10.5.2"
2+
"version": "10.5.3"
33
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Workaround for a Next.js 16 build-time waste on `output: 'export'` builds.
2+
//
3+
// Next traces server-side file dependencies with @vercel/nft ("Collecting build traces") on every
4+
// webpack build. For a static export there is NO server runtime, so that trace is never used — yet it
5+
// costs roughly HALF the build wall-clock (measured ~256s; the single biggest serial phase, and on a
6+
// 2-core CI runner it stacks on top of static generation). Next 14 let you skip it with
7+
// `outputFileTracing: false`; Next 15+ removed that option and ships no replacement.
8+
//
9+
// This idempotently patches the installed Next build to gate the NFT step on `config.output !== 'export'`
10+
// — exactly what the old flag did. It's safe: the trace result is never consumed for an export build
11+
// (only `output: 'standalone'` reads it), and Next already does `await buildTracesPromise` where an
12+
// unset (undefined) promise is a no-op. Run it immediately before `next build`. Re-running is harmless.
13+
// Remove once Next skips build traces for `output: 'export'` upstream (track: vercel/next.js).
14+
import { readFileSync, writeFileSync } from "node:fs";
15+
import { createRequire } from "node:module";
16+
17+
const require = createRequire(import.meta.url);
18+
19+
let target;
20+
try {
21+
target = require.resolve("next/dist/build/index.js");
22+
} catch {
23+
console.warn("[skip-export-traces] next/dist/build/index.js not resolvable — skipping (build still works)");
24+
process.exit(0);
25+
}
26+
27+
const NEEDLE = "!isGenerateMode && !buildTracesPromise) {";
28+
const PATCHED = "!isGenerateMode && !buildTracesPromise && config.output !== 'export') {";
29+
30+
let src = readFileSync(target, "utf8");
31+
if (src.includes(PATCHED)) {
32+
console.log("[skip-export-traces] already patched — Next will skip build traces for output: export");
33+
} else if (src.includes(NEEDLE)) {
34+
writeFileSync(target, src.replace(NEEDLE, PATCHED));
35+
console.log("[skip-export-traces] patched: Next will skip @vercel/nft build traces for output: export");
36+
} else {
37+
console.warn(
38+
"[skip-export-traces] WARNING: patch site not found — Next internals changed for this version. " +
39+
"Build proceeds unpatched (just slower). Re-verify the gate in next/dist/build/index.js."
40+
);
41+
}

src/components/CippCards/CippStandardsDialog.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
ExpandMore as ExpandMoreIcon,
3737
} from '@mui/icons-material'
3838
import { SvgIcon } from '@mui/material'
39-
import standards from '../../data/standards.json'
39+
import { getStandards } from '../../utils/standards-data'
4040

4141
const getCategoryIcon = (category) => {
4242
switch (category) {
@@ -136,7 +136,7 @@ export const CippStandardsDialog = ({ open, onClose, standardsData, currentTenan
136136
let totalStandardsCount = 0
137137

138138
Object.entries(combinedStandards).forEach(([standardKey, standardConfig]) => {
139-
const standardInfo = standards.find((s) => s.name === `standards.${standardKey}`)
139+
const standardInfo = getStandards().find((s) => s.name === `standards.${standardKey}`)
140140
if (standardInfo) {
141141
const category = standardInfo.cat
142142
if (!standardsByCategory[category]) {

src/components/CippComponents/CippAutocomplete.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ export const CippAutoComplete = React.forwardRef((props, ref) => {
146146
const currentTenant = api?.tenantFilter ? api.tenantFilter : useSettings().currentTenant
147147
useEffect(() => {
148148
if (actionGetRequest.isSuccess && !actionGetRequest.isFetching) {
149-
const lastPage = actionGetRequest.data?.pages[actionGetRequest.data.pages.length - 1]
149+
// Guard against a non-paginated cache shape (e.g. when a queryKey is accidentally shared
150+
// with a useQuery/ApiGetCall consumer that stores a plain array instead of { pages }).
151+
const pages = actionGetRequest.data?.pages
152+
const lastPage = Array.isArray(pages) ? pages[pages.length - 1] : undefined
150153
const nextLinkExists = lastPage?.Metadata?.nextLink
151154
if (nextLinkExists) {
152155
actionGetRequest.fetchNextPage()

src/components/CippComponents/CippCodeBlock.jsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import { useState } from "react";
2-
import { atomDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
3-
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
2+
import dynamic from "next/dynamic";
43
import { CippCopyToClipBoard } from "./CippCopyToClipboard";
54
import { styled } from "@mui/system"; // Correct import from @mui/system
6-
import { Editor } from "@monaco-editor/react";
75
import { useSettings } from "../../hooks/use-settings";
86

7+
// Heavy, client-only editors loaded on demand so monaco-editor (~5MB) and react-syntax-highlighter
8+
// stay out of the common bundle — they only download when a code block actually renders.
9+
const Editor = dynamic(() => import("@monaco-editor/react").then((m) => m.Editor), {
10+
ssr: false,
11+
loading: () => null,
12+
});
13+
const CippPrismHighlighter = dynamic(() => import("./CippPrismHighlighter"), {
14+
ssr: false,
15+
loading: () => null,
16+
});
17+
918
const CodeContainer = styled("div")`
1019
position: relative;
1120
display: block;
@@ -68,16 +77,14 @@ export const CippCodeBlock = (props) => {
6877
/>
6978
)}
7079
{type === "syntax" && (
71-
<SyntaxHighlighter
80+
<CippPrismHighlighter
7281
lineProps={{ style: { wordBreak: "break-all", whiteSpace: "pre-wrap" } }}
7382
language={language}
74-
style={atomDark}
7583
showLineNumbers={showLineNumbers}
7684
startingLineNumber={startingLineNumber}
7785
wrapLongLines={wrapLongLines}
78-
>
79-
{code}
80-
</SyntaxHighlighter>
86+
code={code}
87+
/>
8188
)}
8289
</CodeContainer>
8390
);

src/components/CippComponents/CippDeployCompliancePolicyDrawer.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,13 @@ const MODE_CONFIG = {
6767
"Tooltip": "Confidential data, do not share externally",
6868
"Comment": "Internal-only confidential classification",
6969
"ContentType": "File, Email",
70+
"ApplyContentMarkingHeaderEnabled": true,
71+
"ApplyContentMarkingHeaderText": "Confidential - Internal Use Only",
72+
"ApplyContentMarkingHeaderFontColor": "#FF0000",
7073
"EncryptionEnabled": true,
71-
"EncryptionProtectionType": "Template",
72-
"ContentMarkingHeaderEnabled": true,
73-
"ContentMarkingHeaderText": "Confidential - Internal Use Only",
74+
"EncryptionProtectionType": "UserDefined",
75+
"EncryptionPromptUser": true,
76+
"EncryptionDoNotForward": true,
7477
"PolicyParams": {
7578
"Name": "Confidential Label Policy",
7679
"ExchangeLocation": "All",

0 commit comments

Comments
 (0)