remove old stuff
This commit is contained in:
parent
3032a8b83d
commit
104bee2c19
@ -1,5 +1,3 @@
|
|||||||
nodeLinker: node-modules
|
nodeLinker: node-modules
|
||||||
|
|
||||||
npmRegistryServer: "https://registry.corgi.wtf"
|
npmRegistryServer: "https://registry.corgi.wtf"
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-3.5.1.cjs
|
yarnPath: .yarn/releases/yarn-3.5.1.cjs
|
||||||
|
@ -8,9 +8,6 @@ import FlagManager from "../components/FlagManager.js";
|
|||||||
// Prod: (1 << 3)
|
// Prod: (1 << 3)
|
||||||
// };
|
// };
|
||||||
|
|
||||||
const CONSUMERS = [ 'client', 'server', 'api' ];
|
|
||||||
const ENVS = [ 'test', 'prod' ];
|
|
||||||
|
|
||||||
class Flag {
|
class Flag {
|
||||||
|
|
||||||
#manager: FlagManager;
|
#manager: FlagManager;
|
||||||
@ -35,13 +32,9 @@ class Flag {
|
|||||||
|
|
||||||
if (!data.consumer)
|
if (!data.consumer)
|
||||||
throw new Error('Missing consumer');
|
throw new Error('Missing consumer');
|
||||||
if (!CONSUMERS.includes(data.consumer))
|
|
||||||
throw new Error('Bad consumer');
|
|
||||||
|
|
||||||
if (!data.env)
|
if (!data.env)
|
||||||
throw new Error('Missing env');
|
throw new Error('Missing env');
|
||||||
if (!ENVS.includes(data.env))
|
|
||||||
throw new Error('Bad env');
|
|
||||||
|
|
||||||
if (!('value' in data))
|
if (!('value' in data))
|
||||||
throw new Error('Missing value');
|
throw new Error('Missing value');
|
||||||
|
Loading…
Reference in New Issue
Block a user