@lightdash/cli 0.1985.0 → 0.1985.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,11 @@ exports.generatePersonalAccessToken = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const common_1 = require("@lightdash/common");
6
6
  const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
7
- const generatePersonalAccessToken = async (headers, url, hoursToExpire = 30 * 24) => {
7
+ const generatePersonalAccessToken = async (headers, url, hoursToExpire = 720) => {
8
8
  const patUrl = new URL(`/api/v1/user/me/personal-access-tokens`, url).href;
9
9
  const now = new Date();
10
10
  const createToken = {
11
- expiresAt: new Date(now.setDate(now.getDate() + hoursToExpire)),
11
+ expiresAt: new Date(now.getTime() + hoursToExpire * 60 * 60 * 1000),
12
12
  description: `Generated by OAuth on ${(0, common_1.formatDate)(now)}`,
13
13
  autoGenerated: true,
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "0.1985.0",
3
+ "version": "0.1985.2",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "lightdash": "dist/index.js"
@@ -32,8 +32,8 @@
32
32
  "parse-node-version": "^2.0.0",
33
33
  "unique-names-generator": "^4.7.1",
34
34
  "uuid": "^11.0.3",
35
- "@lightdash/common": "0.1985.0",
36
- "@lightdash/warehouses": "0.1985.0"
35
+ "@lightdash/common": "0.1985.2",
36
+ "@lightdash/warehouses": "0.1985.2"
37
37
  },
38
38
  "description": "Lightdash CLI tool",
39
39
  "devDependencies": {