From efd14572c7a1095ffa4ed170596772b9ab17b7fa Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 13 May 2024 08:38:38 +0000 Subject: [PATCH] refactor(@angular/build): remove orphane file This logic was moved to another file but the file was not removed. --- .../build/src/utils/index-file/style-nonce.ts | 66 ------------- .../src/utils/index-file/style-nonce_spec.ts | 95 ------------------- 2 files changed, 161 deletions(-) delete mode 100644 packages/angular/build/src/utils/index-file/style-nonce.ts delete mode 100644 packages/angular/build/src/utils/index-file/style-nonce_spec.ts diff --git a/packages/angular/build/src/utils/index-file/style-nonce.ts b/packages/angular/build/src/utils/index-file/style-nonce.ts deleted file mode 100644 index 6ebe1401bc7c..000000000000 --- a/packages/angular/build/src/utils/index-file/style-nonce.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { htmlRewritingStream } from './html-rewriting-stream'; - -/** - * Pattern matching the name of the Angular nonce attribute. Note that this is - * case-insensitive, because HTML attribute names are case-insensitive as well. - */ -const NONCE_ATTR_PATTERN = /ngCspNonce/i; - -/** - * Finds the `ngCspNonce` value and copies it to all inline ` - - - - - - - `); - - expect(result).toContain(''); - expect(result).toContain(''); - }); - - it('should add a lowercase nonce expression to style tags', async () => { - const result = await addNonce(` - - - - - - - - - `); - - expect(result).toContain(''); - }); - - it('should preserve any pre-existing nonces', async () => { - const result = await addNonce(` - - - - - - - - - - `); - - expect(result).toContain(''); - expect(result).toContain(''); - }); - - it('should use the first nonce that is defined on the page', async () => { - const result = await addNonce(` - - - - - - - - - - `); - - expect(result).toContain(''); - }); - - it('should to all inline script tags', async () => { - const result = await addNonce(` - - - - - - - '); - expect(result).toContain(`