mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-02 17:40:02 +02:00
style(cso): format lib/cso TypeScript with pinned Prettier
Mechanical reformat only. Minified transpile output is byte-identical for 21 of 22 files; witness.ts differs only in three regex flag orders (/mi -> /im), which JavaScript canonicalizes. Source-text assertions over lib/cso now compare whitespace-insensitively with the same tokens.
This commit is contained in:
1 parent
dcaea52800
commit
d93d61f7ba
27 files changed
+17942
-4164
No files matched your search
@@ -118,9 +118,9 @@ describe('CSO scanner qualification workflow', () => {
|
||||
expect(anonymousStage.env.GH_TOKEN).toBe('${{ github.token }}');
|
||||
for(const value of ['--signer-workflow "$signer_workflow"','--signer-digest "$signer_digest"','--source-digest "$source_commit"','cso-attestation-evidence.ts digest','provenanceStatementDigest','sbomStatementDigest'])expect(raw).toContain(value);
|
||||
expect(raw).not.toContain('cso-scanner-staging');
|
||||
const docker = fs.readFileSync(path.join(ROOT, 'lib/cso/docker.ts'), 'utf8');
|
||||
const docker = fs.readFileSync(path.join(ROOT, 'lib/cso/docker.ts'), 'utf8').replace(/\s+/g, '');
|
||||
for (const flag of ["'--pull=never'", "'--read-only'", "'--cap-drop','ALL'", "'no-new-privileges:true'", "'seccomp=builtin'", "'--log-driver=none'", "'--network'"]) expect(docker).toContain(flag);
|
||||
expect(docker).toContain("['rm','--force','--volumes',id]"); expect(docker).toContain('Pinned runtime image declares writable volumes');
|
||||
expect(docker).toContain("['rm','--force','--volumes',id]"); expect(docker).toContain('Pinnedruntimeimagedeclareswritablevolumes');
|
||||
expect(raw).toContain('cso-scanner-catalog.ts assemble'); expect(raw).toContain('cso-scanner-catalog.ts validate-transition lib/cso/scanner-images/catalog.json promotion/catalog-proposal.json'); expect(raw).toContain('gh pr create --base main');
|
||||
expect(raw).toContain('branch="cso-scanner-catalog-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"'); expect(raw).not.toContain('branch="cso-scanner-catalog-$GITHUB_RUN_ID"');
|
||||
const publicPromotion = raw.indexOf('Recheck public visibility and anonymous pulls before promotion');
|
||||
|
||||
@@ -135,7 +135,7 @@ describe('CSO native Windows build contract', () => {
|
||||
expect(msvc).toContain('GSTACK_CSO_GIT_PATH');
|
||||
expect(msvc).toContain('/FI$binding');
|
||||
expect(msvc).toContain('if ($LASTEXITCODE -ne 0)');
|
||||
const processSource=fs.readFileSync(path.join(ROOT,'lib','cso','process.ts'),'utf8');
|
||||
const processSource=fs.readFileSync(path.join(ROOT,'lib','cso','process.ts'),'utf8').replace(/\s+/g,'');
|
||||
expect(processSource).toContain("includeNullPath=process.platform==='win32'?'/dev/null':nullPath");
|
||||
const launcherSource = fs.readFileSync(path.join(ROOT, 'lib/cso/launcher-windows.c'), 'utf8');
|
||||
expect(launcherSource).toContain('.gstack-cso-generation.lock');
|
||||
|
||||
Reference in new issue
Block a user