@constructorfleet/ultimate-govee
Version:
Library for interacting with Govee devices written in Typescript.
14 lines • 773 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthRefreshMarginProvider = exports.InjectRefreshMargin = exports.AuthRefreshMarginKey = exports.DEFAULT_AUTH_REFRESH_MARGIN = void 0;
const common_1 = require("@nestjs/common");
const auth_types_1 = require("./auth.types");
exports.DEFAULT_AUTH_REFRESH_MARGIN = 60 * 1000; // 1 minute
exports.AuthRefreshMarginKey = 'Auth.Refresh.Margin';
exports.InjectRefreshMargin = (0, common_1.Inject)(exports.AuthRefreshMarginKey);
exports.AuthRefreshMarginProvider = {
provide: exports.AuthRefreshMarginKey,
inject: [auth_types_1.MODULE_OPTIONS_TOKEN],
useFactory: (options) => options.refreshMargin ?? exports.DEFAULT_AUTH_REFRESH_MARGIN,
};
//# sourceMappingURL=auth.providers.js.map