UNPKG

729 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.store = exports.Store = void 0;
4const normalize_path_1 = require("./utils/normalize-path");
5class Store {
6 constructor() {
7 this.state = {
8 constants: {},
9 pluginsFiles: {
10 'enhance-app': new Set(),
11 'enhance-server': new Set(),
12 },
13 };
14 this.defineConstant = (name, value) => {
15 this.state.constants[name] = JSON.stringify(value);
16 };
17 this.addPluginFile = (type, file) => {
18 this.state.pluginsFiles[type].add(normalize_path_1.normalizePath(file));
19 };
20 }
21}
22exports.Store = Store;
23exports.store = new Store();