This commit is contained in:
Morten Olsen
2025-08-01 07:52:09 +02:00
parent 5782d59f71
commit a25e0b9ffb
17 changed files with 880 additions and 280 deletions

View File

@@ -1,3 +1,4 @@
const GROUP = 'homelab.mortenolsen.pro';
const NAMESPACE = 'homelab';
export { GROUP };
export { GROUP, NAMESPACE };

13
src/utils/naming.ts Normal file
View File

@@ -0,0 +1,13 @@
const getWithNamespace = (input: string) => {
const result = input.split('/');
const first = result.pop();
if (!first) {
throw new Error(`${input} could not be parsed as a namespace`);
}
return {
name: first,
namespace: result.join('/'),
};
};
export { getWithNamespace };