feat: Rename the card to advanced-camera-card (#1873)
Whilst the Frigate support in this card is the best among camera engines, the name incorrectly suggests that Frigate is a requirement. Instead, to broaden the appeal, change to more camera agnostic name. This does not suggest any change in priority, role or support for Frigate. This change is likely to be bug prone, due to the size of the rename -- the code contains 1500+ references to "Frigate" most of which make sense to rename, some which do not, all of which needed human assessment. - Closes #1298 BREAKING CHANGE: References to `frigate-card` in all kinds of configuration need to be updated to `advanced-camera-card`. An automated config upgrade should take care of the majority of usecases (click `Edit -> Upgrade -> Save`), though may not be perfect.
This commit is contained in:
+26
-16
@@ -60,7 +60,7 @@ const plugins = [
|
||||
preventAssignment: true,
|
||||
values: {
|
||||
'process.env.NODE_ENV': JSON.stringify(dev ? 'development' : 'production'),
|
||||
__FRIGATE_CARD_RELEASE_VERSION__:
|
||||
__ADVANCED_CAMERA_CARD_RELEASE_VERSION__:
|
||||
process.env.RELEASE_VERSION ?? (dev ? 'dev' : 'pkg'),
|
||||
},
|
||||
}),
|
||||
@@ -72,6 +72,23 @@ const plugins = [
|
||||
}),
|
||||
];
|
||||
|
||||
const outputEntryTemplate = {
|
||||
entryFileNames: 'advanced-camera-card.js',
|
||||
dir: 'dist',
|
||||
chunkFileNames: (chunk) => {
|
||||
// Add "lang-" to the front of the language chunk names for readability.
|
||||
if (
|
||||
chunk.facadeModuleId &&
|
||||
chunk.facadeModuleId.match(/localize\/languages\/.*\.json/)
|
||||
) {
|
||||
return 'lang-[name]-[hash].js';
|
||||
}
|
||||
return '[name]-[hash].js';
|
||||
},
|
||||
format: 'es',
|
||||
sourcemap: dev,
|
||||
};
|
||||
|
||||
/**
|
||||
* @type {import('rollup').RollupOptions}
|
||||
*/
|
||||
@@ -83,22 +100,15 @@ const config = {
|
||||
// the hacstag, causing a re-download of the same content and functionality
|
||||
// problems.
|
||||
preserveEntrySignatures: 'strict',
|
||||
output: {
|
||||
entryFileNames: 'frigate-hass-card.js',
|
||||
dir: 'dist',
|
||||
chunkFileNames: (chunk) => {
|
||||
// Add "lang-" to the front of the language chunk names for readability.
|
||||
if (
|
||||
chunk.facadeModuleId &&
|
||||
chunk.facadeModuleId.match(/localize\/languages\/.*\.json/)
|
||||
) {
|
||||
return 'lang-[name]-[hash].js';
|
||||
}
|
||||
return '[name]-[hash].js';
|
||||
output: [
|
||||
outputEntryTemplate,
|
||||
|
||||
// Continue to include the old file name for backwards compatibility.
|
||||
{
|
||||
...outputEntryTemplate,
|
||||
entryFileNames: 'frigate-hass-card.js',
|
||||
},
|
||||
format: 'es',
|
||||
sourcemap: dev,
|
||||
},
|
||||
],
|
||||
plugins: plugins,
|
||||
// These files use this at the toplevel, which causes rollup warning
|
||||
// spam on build: `this` has been rewritten to `undefined`.
|
||||
|
||||
Reference in New Issue
Block a user