wuffle 0.57.0 → 0.59.0
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.
- package/bin/run.js +52 -41
- package/bin/wuffle +1 -1
- package/index.js +1 -1
- package/lib/apps/auth-routes/AuthRoutes.js +10 -20
- package/lib/apps/auth-routes/index.js +2 -2
- package/lib/apps/automatic-dev-flow.js +5 -5
- package/lib/apps/background-sync/BackgroundSync.js +9 -17
- package/lib/apps/background-sync/index.js +2 -2
- package/lib/apps/board-api-routes/board-api-filters.js +10 -28
- package/lib/apps/board-api-routes/board-api-routes.js +17 -27
- package/lib/apps/board-api-routes/index.js +2 -2
- package/lib/apps/board-routes.js +21 -10
- package/lib/apps/dump-store/local/DumpStoreLocal.js +8 -12
- package/lib/apps/dump-store/local/index.js +2 -2
- package/lib/apps/dump-store/s3/DumpStoreS3.js +6 -8
- package/lib/apps/dump-store/s3/S3.js +4 -5
- package/lib/apps/dump-store/s3/index.js +2 -2
- package/lib/apps/events-sync.js +7 -9
- package/lib/apps/github-app/GithubApp.js +7 -9
- package/lib/apps/github-app/index.js +2 -2
- package/lib/apps/github-checks/GithubChecks.js +7 -10
- package/lib/apps/github-checks/index.js +2 -2
- package/lib/apps/github-client/GithubClient.js +28 -18
- package/lib/apps/github-client/index.js +2 -2
- package/lib/apps/github-comments/GithubComments.js +8 -17
- package/lib/apps/github-comments/index.js +2 -2
- package/lib/apps/github-issues/GithubIssues.js +4 -9
- package/lib/apps/github-issues/index.js +2 -2
- package/lib/apps/github-reviews/GithubReviews.js +8 -14
- package/lib/apps/github-reviews/index.js +2 -2
- package/lib/apps/github-statuses/GithubStatuses.js +8 -14
- package/lib/apps/github-statuses/index.js +2 -2
- package/lib/apps/log-events.js +7 -9
- package/lib/apps/reindex-store.js +10 -18
- package/lib/apps/route-compression.js +3 -5
- package/lib/apps/route-https.js +3 -5
- package/lib/apps/search/Search.js +8 -20
- package/lib/apps/search/index.js +2 -2
- package/lib/apps/security-context/SecurityContext.js +3 -5
- package/lib/apps/security-context/index.js +2 -2
- package/lib/apps/user-access/TreeCache.js +1 -3
- package/lib/apps/user-access/UserAccess.js +11 -8
- package/lib/apps/user-access/index.js +2 -2
- package/lib/apps/webhook-events/WebhookEvents.js +4 -6
- package/lib/apps/webhook-events/index.js +2 -2
- package/lib/columns.js +7 -4
- package/lib/events.js +2 -9
- package/lib/filters.js +11 -31
- package/lib/index.js +38 -40
- package/lib/links.js +17 -12
- package/lib/load-config.js +8 -4
- package/lib/middleware/index.js +7 -9
- package/lib/probot/CustomProbot.js +43 -27
- package/lib/probot/apps/setup.js +119 -58
- package/lib/probot/index.js +1 -1
- package/lib/store.js +10 -22
- package/lib/util/cache.js +4 -11
- package/lib/util/index.js +37 -37
- package/lib/util/links.js +3 -7
- package/lib/util/meta.js +24 -7
- package/lib/util/search.js +3 -8
- package/package.json +23 -16
- package/public/bundle.js.map +1 -1
- package/public/service-worker.js +1 -1
- package/public/service-worker.js.map +1 -1
package/lib/probot/apps/setup.js
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import bodyParser from 'body-parser';
|
|
2
|
+
import updateDotenv from 'update-dotenv';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { ManifestCreation } from 'probot/lib/manifest-creation.js';
|
|
5
|
+
import { getLoggingMiddleware } from 'probot/lib/server/logging-middleware.js';
|
|
6
|
+
import { getLog } from 'probot/lib/helpers/get-log.js';
|
|
7
|
+
import { importView } from 'probot/lib/views/import.js';
|
|
8
|
+
import { setupView } from 'probot/lib/views/setup.js';
|
|
5
9
|
|
|
6
|
-
|
|
10
|
+
import { randomString } from '../../util/index.js';
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const { randomString } = require('../../util');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function setupAppFactory(host, port) {
|
|
12
|
+
export function setupAppFactory(host, port) {
|
|
14
13
|
|
|
15
14
|
return async function setupApp(app, { getRouter }) {
|
|
16
15
|
const setup = new ManifestCreation();
|
|
17
16
|
|
|
18
17
|
const log = getLog().child({ name: 'wuffle:setup' });
|
|
19
18
|
|
|
20
|
-
if (
|
|
19
|
+
if (!(
|
|
20
|
+
process.env.NODE_ENV === 'production' ||
|
|
21
|
+
process.env.WEBHOOK_PROXY_URL ||
|
|
22
|
+
process.env.NO_SMEE_SETUP === 'true'
|
|
23
|
+
)) {
|
|
21
24
|
await setup.createWebhookChannel();
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -32,55 +35,113 @@ function setupAppFactory(host, port) {
|
|
|
32
35
|
route.use(getLoggingMiddleware(app.log));
|
|
33
36
|
|
|
34
37
|
route.get('/probot', async (req, res) => {
|
|
35
|
-
const baseUrl = getBaseUrl(req);
|
|
38
|
+
const baseUrl = process.env.BASE_URL || getBaseUrl(req);
|
|
36
39
|
const pkg = setup.pkg;
|
|
37
40
|
const manifest = setup.getManifest(pkg, baseUrl);
|
|
38
41
|
const createAppUrl = setup.createAppUrl;
|
|
39
42
|
|
|
43
|
+
await setup.updateEnv({
|
|
44
|
+
BASE_URL: baseUrl
|
|
45
|
+
});
|
|
46
|
+
|
|
40
47
|
// Pass the manifest to be POST'd
|
|
41
|
-
res.
|
|
48
|
+
res.writeHead(200, { 'content-type': 'text/html' }).end(setupView({
|
|
49
|
+
name: pkg.name || 'Wuffle',
|
|
50
|
+
version: pkg.version,
|
|
51
|
+
description: pkg.description,
|
|
52
|
+
createAppUrl,
|
|
53
|
+
manifest
|
|
54
|
+
}));
|
|
42
55
|
});
|
|
43
56
|
|
|
44
57
|
route.get('/probot/setup', async (req, res) => {
|
|
45
58
|
const { code } = req.query;
|
|
46
|
-
const app_url = await setup.createAppFromCode(code);
|
|
47
59
|
|
|
48
|
-
|
|
60
|
+
if (!code || typeof code !== 'string' || code.length === 0) {
|
|
61
|
+
return res
|
|
62
|
+
.writeHead(400, { 'content-type': 'text/plain' })
|
|
63
|
+
.end('code missing or invalid');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const response = await setup.createAppFromCode(code, {
|
|
67
|
+
request: app.state.request
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const appUrl = app.state.appUrl = `${response}/installations/new`;
|
|
71
|
+
|
|
72
|
+
log.warn('Setup completed, please restart the app');
|
|
73
|
+
|
|
74
|
+
log.info(`Visit ${appUrl} to connect GitHub repositories`);
|
|
75
|
+
|
|
76
|
+
const location = '/probot/success';
|
|
49
77
|
|
|
50
|
-
res
|
|
78
|
+
return res
|
|
79
|
+
.writeHead(302, {
|
|
80
|
+
'content-type': 'text/plain',
|
|
81
|
+
location
|
|
82
|
+
})
|
|
83
|
+
.end(`Redirecting to ${ location }`);
|
|
51
84
|
});
|
|
52
85
|
|
|
53
86
|
route.get('/probot/import', async (_req, res) => {
|
|
87
|
+
|
|
88
|
+
const pkg = setup.pkg;
|
|
54
89
|
const { WEBHOOK_PROXY_URL, GHE_HOST } = process.env;
|
|
55
90
|
const GH_HOST = `https://${GHE_HOST ?? 'github.com'}`;
|
|
56
|
-
|
|
91
|
+
|
|
92
|
+
return res
|
|
93
|
+
.writeHead(200, {
|
|
94
|
+
'content-type': 'text/html'
|
|
95
|
+
})
|
|
96
|
+
.end(importView({
|
|
97
|
+
name: pkg.name || 'Wuffle',
|
|
98
|
+
WEBHOOK_PROXY_URL,
|
|
99
|
+
GH_HOST
|
|
100
|
+
}));
|
|
57
101
|
});
|
|
58
102
|
|
|
59
103
|
route.post('/probot/import', bodyParser.json(), async (req, res) => {
|
|
60
104
|
const { appId, pem, webhook_secret } = req.body;
|
|
61
105
|
if (!appId || !pem || !webhook_secret) {
|
|
62
|
-
res
|
|
63
|
-
|
|
106
|
+
return res
|
|
107
|
+
.writeHead(400, {
|
|
108
|
+
'content-type': 'text/plain'
|
|
109
|
+
})
|
|
110
|
+
.end('appId and/or pem and/or webhook_secret missing');
|
|
64
111
|
}
|
|
112
|
+
|
|
65
113
|
await updateDotenv({
|
|
66
114
|
APP_ID: appId,
|
|
67
115
|
PRIVATE_KEY: `"${pem}"`,
|
|
68
116
|
WEBHOOK_SECRET: webhook_secret
|
|
69
117
|
});
|
|
70
118
|
|
|
71
|
-
log.
|
|
119
|
+
log.warn('Setup completed, please restart the app.');
|
|
72
120
|
|
|
73
|
-
res.
|
|
121
|
+
return res.redirect('/probot/success');
|
|
74
122
|
});
|
|
75
123
|
|
|
76
|
-
route.get('/', (
|
|
124
|
+
route.get('/probot/success', (_req, res) => {
|
|
125
|
+
const pkg = setup.pkg;
|
|
126
|
+
|
|
127
|
+
const appUrl = app.state.appUrl;
|
|
128
|
+
|
|
129
|
+
return res
|
|
130
|
+
.writeHead(200, { 'content-type': 'text/html' })
|
|
131
|
+
.end(successView({
|
|
132
|
+
name: pkg.name || 'Wuffle',
|
|
133
|
+
appUrl
|
|
134
|
+
}));
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
route.get('/', (_req, res) => {
|
|
138
|
+
return res
|
|
139
|
+
.writeHead(302, { 'content-type': 'text/plain', location: '/probot' })
|
|
140
|
+
.end();
|
|
141
|
+
});
|
|
77
142
|
};
|
|
78
143
|
}
|
|
79
144
|
|
|
80
|
-
module.exports = {
|
|
81
|
-
setupAppFactory
|
|
82
|
-
};
|
|
83
|
-
|
|
84
145
|
function getBaseUrl(req) {
|
|
85
146
|
const protocols = req.headers['x-forwarded-proto'] || req.protocol;
|
|
86
147
|
const protocol =
|
|
@@ -90,40 +151,40 @@ function getBaseUrl(req) {
|
|
|
90
151
|
return baseUrl;
|
|
91
152
|
}
|
|
92
153
|
|
|
93
|
-
|
|
94
|
-
function renderSuccess(appUrl = null) {
|
|
154
|
+
function successView({ name, appUrl }) {
|
|
95
155
|
|
|
96
156
|
return `
|
|
97
|
-
<!DOCTYPE html>
|
|
98
|
-
<html lang="en" class="height-full">
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
157
|
+
<!DOCTYPE html>
|
|
158
|
+
<html lang="en" class="height-full" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark">
|
|
159
|
+
<head>
|
|
160
|
+
<meta charset="UTF-8">
|
|
161
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
162
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
163
|
+
<title>${ name } Setup complete</title>
|
|
164
|
+
<link rel="icon" href="/probot/static/probot-head.png">
|
|
165
|
+
<link rel="stylesheet" href="/probot/static/primer.css">
|
|
166
|
+
</head>
|
|
167
|
+
<body class="height-full bg-gray-light">
|
|
168
|
+
<div class="d-flex flex-column flex-justify-center flex-items-center text-center height-full">
|
|
169
|
+
<img src="/probot/static/robot.svg" alt="Probot Logo" width="100" class="mb-6">
|
|
170
|
+
<div class="box-shadow rounded-2 border p-6 bg-white">
|
|
171
|
+
<div class="text-center">
|
|
172
|
+
<h1 class="alt-h3 mb-2">You completed your ${name} setup!</h1>
|
|
173
|
+
|
|
174
|
+
<p class="mb-2">
|
|
175
|
+
Go ahead and ${ appUrl ? `<a href="${appUrl}" target="_blank" rel="no-opener">` : ''}
|
|
176
|
+
connect GitHub repositories
|
|
177
|
+
${appUrl ? '</a>' : ''} to your board.
|
|
178
|
+
</p>
|
|
179
|
+
|
|
180
|
+
<p>
|
|
181
|
+
Please restart the server to complete the setup.
|
|
182
|
+
</p>
|
|
183
|
+
|
|
184
|
+
</div>
|
|
123
185
|
</div>
|
|
124
186
|
</div>
|
|
125
|
-
</
|
|
126
|
-
</
|
|
127
|
-
|
|
128
|
-
|
|
187
|
+
</body>
|
|
188
|
+
</html>
|
|
189
|
+
`;
|
|
129
190
|
}
|
package/lib/probot/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './CustomProbot.js';
|
package/lib/store.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
issueIdent
|
|
9
|
-
} = require('./util');
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
findLinks
|
|
13
|
-
} = require('./util/links');
|
|
14
|
-
|
|
15
|
-
const { Links } = require('./links');
|
|
1
|
+
import { groupBy } from 'min-dash';
|
|
2
|
+
import pDefer from 'p-defer';
|
|
3
|
+
import { issueIdent } from './util/index.js';
|
|
4
|
+
import { findLinks } from './util/links.js';
|
|
5
|
+
import { Links } from './links.js';
|
|
16
6
|
|
|
17
7
|
|
|
18
8
|
/**
|
|
19
9
|
* The store that holds all board data
|
|
20
10
|
* and makes it accessible.
|
|
21
11
|
*/
|
|
22
|
-
class Store {
|
|
12
|
+
export default class Store {
|
|
23
13
|
|
|
24
14
|
/**
|
|
25
|
-
* @param {import('./columns')} columns
|
|
26
|
-
* @param {import('./types').Logger} logger
|
|
27
|
-
* @param {import('./events')} events
|
|
15
|
+
* @param {import('./columns.js').default} columns
|
|
16
|
+
* @param {import('./types.js').Logger} logger
|
|
17
|
+
* @param {import('./events.js').default} events
|
|
28
18
|
*
|
|
29
19
|
* @constructor
|
|
30
20
|
*/
|
|
@@ -1020,6 +1010,4 @@ class Updates {
|
|
|
1020
1010
|
return updates;
|
|
1021
1011
|
}
|
|
1022
1012
|
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
module.exports = Store;
|
|
1013
|
+
}
|
package/lib/util/cache.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
class Cache {
|
|
1
|
+
export class Cache {
|
|
3
2
|
|
|
4
3
|
constructor(ttl) {
|
|
5
4
|
this.ttl = ttl;
|
|
@@ -62,10 +61,8 @@ class Cache {
|
|
|
62
61
|
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
module.exports.Cache = Cache;
|
|
66
|
-
|
|
67
64
|
|
|
68
|
-
class KeepAliveCache extends Cache {
|
|
65
|
+
export class KeepAliveCache extends Cache {
|
|
69
66
|
|
|
70
67
|
get(key, defaultValue) {
|
|
71
68
|
|
|
@@ -79,10 +76,8 @@ class KeepAliveCache extends Cache {
|
|
|
79
76
|
}
|
|
80
77
|
}
|
|
81
78
|
|
|
82
|
-
module.exports.KeepAliveCache = KeepAliveCache;
|
|
83
|
-
|
|
84
79
|
|
|
85
|
-
class NoopCache {
|
|
80
|
+
export class NoopCache {
|
|
86
81
|
|
|
87
82
|
evict() { }
|
|
88
83
|
|
|
@@ -95,6 +90,4 @@ class NoopCache {
|
|
|
95
90
|
|
|
96
91
|
return value;
|
|
97
92
|
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
module.exports.NoopCache = NoopCache;
|
|
93
|
+
}
|
package/lib/util/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
NoopCache
|
|
4
|
-
} = require('./cache');
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs';
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
findLinks,
|
|
8
|
-
linkTypes
|
|
9
|
-
} = require('./links');
|
|
4
|
+
export { Cache, NoopCache } from './cache.js';
|
|
10
5
|
|
|
11
|
-
|
|
12
|
-
parseSearch,
|
|
13
|
-
parseTemporalFilter
|
|
14
|
-
} = require('./search');
|
|
6
|
+
export { findLinks, linkTypes } from './links.js';
|
|
15
7
|
|
|
16
|
-
|
|
8
|
+
export { parseSearch, parseTemporalFilter } from './search.js';
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
repoAndOwner,
|
|
20
|
-
issueIdent
|
|
21
|
-
} = require('./meta');
|
|
10
|
+
export { default as preExit } from 'prexit';
|
|
22
11
|
|
|
23
|
-
|
|
12
|
+
export { repoAndOwner, issueIdent } from './meta.js';
|
|
24
13
|
|
|
25
|
-
|
|
14
|
+
export function randomString(length = 64) {
|
|
26
15
|
return crypto.randomBytes(length).toString('base64');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {string} str
|
|
20
|
+
*
|
|
21
|
+
* @return {string}
|
|
22
|
+
*/
|
|
23
|
+
export function hash(str) {
|
|
24
|
+
return crypto.createHash('md5').update(str).digest('hex');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @param {string|URL} path
|
|
29
|
+
* @param {string|URL} baseUrl
|
|
30
|
+
*
|
|
31
|
+
* @return {URL}
|
|
32
|
+
*/
|
|
33
|
+
export function relativePath(path, baseUrl) {
|
|
34
|
+
return new URL(path, baseUrl);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function getPackageVersion() {
|
|
38
|
+
|
|
39
|
+
const { version } = JSON.parse(
|
|
40
|
+
fs.readFileSync(relativePath('../../package.json', import.meta.url), 'utf8')
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return version;
|
|
44
|
+
}
|
package/lib/util/links.js
CHANGED
|
@@ -28,7 +28,7 @@ const phrasesToTypes = {
|
|
|
28
28
|
'related to': LINKED_TO
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const linkTypes = {
|
|
31
|
+
export const linkTypes = {
|
|
32
32
|
CHILD_OF,
|
|
33
33
|
PARENT_OF,
|
|
34
34
|
DEPENDS_ON,
|
|
@@ -38,7 +38,7 @@ const linkTypes = {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
function findLinks(issue, types) {
|
|
41
|
+
export function findLinks(issue, types) {
|
|
42
42
|
|
|
43
43
|
const {
|
|
44
44
|
title,
|
|
@@ -161,8 +161,4 @@ function filterLinks(links, filterMap) {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
return links.filter(l => l.type in filterMap);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
module.exports.findLinks = findLinks;
|
|
167
|
-
|
|
168
|
-
module.exports.linkTypes = linkTypes;
|
|
164
|
+
}
|
package/lib/util/meta.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { {
|
|
3
|
+
* number: number,
|
|
4
|
+
* repository: {
|
|
5
|
+
* name: string,
|
|
6
|
+
* owner: {
|
|
7
|
+
* login: string
|
|
8
|
+
* }
|
|
9
|
+
* }
|
|
10
|
+
* } } Issue
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param { Issue } issue
|
|
15
|
+
*
|
|
16
|
+
* @return { { repo: string, owner: string } }
|
|
17
|
+
*/
|
|
18
|
+
export function repoAndOwner(issue) {
|
|
2
19
|
const {
|
|
3
20
|
repository
|
|
4
21
|
} = issue;
|
|
@@ -13,15 +30,15 @@ function repoAndOwner(issue) {
|
|
|
13
30
|
};
|
|
14
31
|
}
|
|
15
32
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @param { Issue } issue
|
|
35
|
+
*
|
|
36
|
+
* @return { string }
|
|
37
|
+
*/
|
|
38
|
+
export function issueIdent(issue) {
|
|
20
39
|
const { owner, repo } = repoAndOwner(issue);
|
|
21
40
|
|
|
22
41
|
const { number } = issue;
|
|
23
42
|
|
|
24
43
|
return `${owner}/${repo}#${number}`;
|
|
25
44
|
}
|
|
26
|
-
|
|
27
|
-
module.exports.issueIdent = issueIdent;
|
package/lib/util/search.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function parseTemporalFilter(str) {
|
|
1
|
+
export function parseTemporalFilter(str) {
|
|
3
2
|
|
|
4
3
|
const regexp = /^(?:(>|>=|<|<=)?(\d{4}-\d{1,2}-\d{1,2})|@(today|last_week|last_month))$/;
|
|
5
4
|
|
|
@@ -42,8 +41,6 @@ function parseTemporalFilter(str) {
|
|
|
42
41
|
};
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
module.exports.parseTemporalFilter = parseTemporalFilter;
|
|
46
|
-
|
|
47
44
|
/**
|
|
48
45
|
* @param {number} time
|
|
49
46
|
*
|
|
@@ -67,7 +64,7 @@ function startOfDay(time) {
|
|
|
67
64
|
* negated?: boolean
|
|
68
65
|
* }[] }
|
|
69
66
|
*/
|
|
70
|
-
function parseSearch(str) {
|
|
67
|
+
export function parseSearch(str) {
|
|
71
68
|
|
|
72
69
|
const regexp = /(?:([\w#/&]+)|"([\w#/&\s-.]+)"|([-!]?)([\w]+):(?:([\w-#/&@<>=.]+)|"([\w-#/&@:.,; ]+)")?)(?:\s|$)/g;
|
|
73
70
|
|
|
@@ -111,6 +108,4 @@ function parseSearch(str) {
|
|
|
111
108
|
}
|
|
112
109
|
|
|
113
110
|
return terms;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
module.exports.parseSearch = parseSearch;
|
|
111
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wuffle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "A multi-repository task board for GitHub issues",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Nico Rehwaldt",
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"bin": {
|
|
10
10
|
"wuffle": "./bin/wuffle"
|
|
11
11
|
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./index.js",
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./lib/*.js": "./lib/*.js"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
12
18
|
"license": "MIT",
|
|
13
19
|
"homepage": "https://github.com/nikku/wuffle",
|
|
14
20
|
"repository": {
|
|
@@ -26,7 +32,7 @@
|
|
|
26
32
|
"project management"
|
|
27
33
|
],
|
|
28
34
|
"scripts": {
|
|
29
|
-
"all": "run-s lint
|
|
35
|
+
"all": "run-s lint test",
|
|
30
36
|
"dev": "nodemon",
|
|
31
37
|
"start": "NODE_ENV=production node ./bin/wuffle",
|
|
32
38
|
"test": "mocha 'test/**/*.js' --exit",
|
|
@@ -36,31 +42,32 @@
|
|
|
36
42
|
"auto-test": "npm test -- --watch"
|
|
37
43
|
},
|
|
38
44
|
"dependencies": {
|
|
39
|
-
"@aws-sdk/client-s3": "^3.
|
|
45
|
+
"@aws-sdk/client-s3": "^3.503.1",
|
|
40
46
|
"async-didi": "^0.3.1",
|
|
41
47
|
"body-parser": "^1.20.0",
|
|
42
48
|
"compression": "^1.7.4",
|
|
43
|
-
"express-session": "^1.
|
|
44
|
-
"fake-tag": "^
|
|
49
|
+
"express-session": "^1.18.0",
|
|
50
|
+
"fake-tag": "^5.0.0",
|
|
45
51
|
"memorystore": "^1.6.7",
|
|
46
52
|
"min-dash": "^4.1.1",
|
|
47
53
|
"mkdirp": "^3.0.1",
|
|
48
|
-
"p-defer": "^
|
|
49
|
-
"prexit": "
|
|
50
|
-
"probot": "^
|
|
51
|
-
"smee-client": "^
|
|
54
|
+
"p-defer": "^4.0.0",
|
|
55
|
+
"prexit": "^2.2.0",
|
|
56
|
+
"probot": "^13.0.1",
|
|
57
|
+
"smee-client": "^2.0.0"
|
|
52
58
|
},
|
|
53
59
|
"devDependencies": {
|
|
54
60
|
"@graphql-eslint/eslint-plugin": "^3.20.1",
|
|
55
|
-
"@octokit/graphql-schema": "^
|
|
61
|
+
"@octokit/graphql-schema": "^14.53.0",
|
|
56
62
|
"@types/compression": "^1.7.2",
|
|
57
|
-
"@types/express-session": "^1.17.
|
|
58
|
-
"
|
|
63
|
+
"@types/express-session": "^1.17.10",
|
|
64
|
+
"@types/mocha": "^10.0.6",
|
|
65
|
+
"chai": "^4",
|
|
59
66
|
"graphql": "^16.6.0",
|
|
60
67
|
"mocha": "^10.2.0",
|
|
61
|
-
"nock": "^13.
|
|
62
|
-
"nodemon": "^3.0.
|
|
63
|
-
"npm-run-
|
|
68
|
+
"nock": "^13.5.1",
|
|
69
|
+
"nodemon": "^3.0.3",
|
|
70
|
+
"npm-run-all2": "^6.0.0",
|
|
64
71
|
"sinon": "^17.0.1",
|
|
65
72
|
"sinon-chai": "^3.7.0",
|
|
66
73
|
"typescript": "^5.3.3"
|
|
@@ -91,5 +98,5 @@
|
|
|
91
98
|
"index.js",
|
|
92
99
|
"wuffle.config.example.js"
|
|
93
100
|
],
|
|
94
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "e517056bec193a96a9989c17533f9fcb93db12d4"
|
|
95
102
|
}
|