Skip to content

Commit 101aef4

Browse files
author
James Struga
committed
Fix CI: stub ZLUX namespace for standalone TypeScript compilation
1 parent 2bc5278 commit 101aef4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ jobs:
2424
run: npm ci
2525
- name: Build TypeScript
2626
run: |
27-
cd src/logging && npx tsc
28-
cd ../../src/obfuscator && npx -p typescript tsc --module commonjs --moduleResolution node --declaration --outDir . --skipLibCheck htmlObfuscator.ts
27+
cd src/logging
28+
# Create stub for ZLUX namespace (defined in zlux-platform, not available in test-only CI)
29+
echo 'declare namespace ZLUX { interface ComponentLogger {} interface Logger {} }' > zlux-stub.d.ts
30+
npx tsc --skipLibCheck --declaration --module commonjs --target es5 --moduleResolution node --outDir . --types node,core-js --esModuleInterop --include 'zlux-stub.d.ts' 'logger.ts'
31+
rm zlux-stub.d.ts
32+
cd ../../src/obfuscator
33+
npx -p typescript tsc --module commonjs --moduleResolution node --declaration --outDir . --skipLibCheck htmlObfuscator.ts
2934
- name: Run tests with coverage
3035
working-directory: src/logging
3136
run: npm run test:coverage

0 commit comments

Comments
 (0)