mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -08:00
build(site): [SITE-07] distribute verified console package and embedded notices
This commit is contained in:
1 parent
63e4e8ad92
commit
199021c8a9
55 files changed
+1918
-14
No files matched your search
@@ -6,8 +6,8 @@ import { writeOrCheckNotices } from './site-vendor/notices.ts'
|
||||
assert(process.argv.slice(2).every(arg => arg === '--check'), 'Use yarn build:site-notices [--check]')
|
||||
/** @type {import('./site-vendor/notices.ts').VendorManifest} */
|
||||
const manifest = JSON.parse(fs.readFileSync('scripts/site-vendor/manifest.json', 'utf8'))
|
||||
assert.deepEqual(manifest.groups.map(group => group.name).sort(), ['monaco-editor', 'vconsole'], 'Do not silently drop a verified site component')
|
||||
assert.deepEqual(manifest.groups.flatMap(group => (group.components || []).map(component => component.name)).sort(), [
|
||||
assert.deepEqual(manifest.groups.map(group => group.name).sort(), ['console', 'monaco-editor', 'vconsole'], 'Do not silently drop a verified site component')
|
||||
assert.deepEqual(manifest.groups.filter(group => group.name !== 'console').flatMap(group => (group.components || []).map(component => component.name)).sort(), [
|
||||
'@babel/runtime',
|
||||
'@vscode/codicons',
|
||||
'copy-text-to-clipboard',
|
||||
@@ -19,8 +19,47 @@ assert.deepEqual(manifest.groups.flatMap(group => (group.components || []).map(c
|
||||
'svelte',
|
||||
'webpack',
|
||||
], 'Do not silently drop verified bundled component attribution')
|
||||
const consoleGroup = manifest.groups.find(group => group.name === 'console')
|
||||
assert.deepEqual(consoleGroup?.components?.map(component => component.name).sort(), [
|
||||
'@babel/runtime',
|
||||
'@emotion/cache',
|
||||
'@emotion/core',
|
||||
'@emotion/css',
|
||||
'@emotion/hash',
|
||||
'@emotion/is-prop-valid',
|
||||
'@emotion/memoize',
|
||||
'@emotion/serialize',
|
||||
'@emotion/sheet',
|
||||
'@emotion/styled',
|
||||
'@emotion/styled-base',
|
||||
'@emotion/stylis',
|
||||
'@emotion/unitless',
|
||||
'@emotion/utils',
|
||||
'@emotion/weak-memoize',
|
||||
'chromium-string-utils',
|
||||
'console-feed',
|
||||
'emotion-theming',
|
||||
'hoist-non-react-statics',
|
||||
'is-dom',
|
||||
'is-object',
|
||||
'is-window',
|
||||
'linkifyjs',
|
||||
'object-assign',
|
||||
'parcel-bundler',
|
||||
'process',
|
||||
'prop-types',
|
||||
'react',
|
||||
'react-dom',
|
||||
'react-inspector',
|
||||
'react-is',
|
||||
'scheduler',
|
||||
'shallowequal',
|
||||
'styled-components',
|
||||
'stylis-rule-sheet',
|
||||
], 'Do not silently drop verified console component attribution')
|
||||
assert.equal(consoleGroup?.notices.length, 35, 'Missing reviewed console notice')
|
||||
const vconsoleNotices = manifest.groups.find(group => group.name === 'vconsole')?.notices.map(notice => notice.target)
|
||||
for (const name of ['LICENSE', 'MIT-LICENSE', 'ATTRIBUTION.md'])
|
||||
assert(vconsoleNotices?.includes(`docs/licenses/vconsole/${name}`), `Missing vConsole notice: ${name}`)
|
||||
const count = writeOrCheckNotices(process.cwd(), manifest, process.argv.includes('--check'))
|
||||
console.log(`Verified site notices: ${count} outputs; Monaco/vConsole only, other provenance gates remain open.`)
|
||||
console.log(`Verified site notices: ${count} outputs; Monaco/vConsole/console inventories, embedded and other provenance gates remain open.`)
|
||||
Reference in new issue
Block a user