@gitpod/gitpod-protocol 0.1.5-wth-update-mysql-dependencies-2.30 → 0.1.5-wth-test.41
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/data/builtin-theia-plugins.json +9 -9
- package/data/gitpod-schema.json +8 -22
- package/lib/accounting-protocol.d.ts +155 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +109 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +20 -4
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +15 -0
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +45 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/{util/without.js → analytics.js} +4 -2
- package/lib/analytics.js.map +1 -0
- package/lib/context-url.d.ts +18 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +49 -0
- package/lib/context-url.js.map +1 -0
- package/lib/{util/context-url.spec.d.ts → context-url.spec.d.ts} +3 -1
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +73 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/email-protocol.d.ts +1 -2
- package/lib/email-protocol.d.ts.map +1 -1
- package/lib/email-protocol.js +4 -4
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.js +5 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.js +19 -20
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -36
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.js +29 -43
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.js +25 -30
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -2
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +20 -21
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.js +25 -41
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +116 -116
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +132 -18
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +168 -256
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +8 -11
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +4 -7
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +5 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +183 -33
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.js +35 -55
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +35 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +83 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/connection-error-handler.js +11 -23
- package/lib/messaging/connection-error-handler.js.map +1 -1
- package/lib/messaging/error.d.ts +3 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +6 -2
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +22 -22
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +2 -0
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +74 -159
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/payment-protocol.d.ts +18 -0
- package/lib/payment-protocol.d.ts.map +1 -0
- package/lib/payment-protocol.js +13 -0
- package/lib/payment-protocol.js.map +1 -0
- package/lib/permission.d.ts +2 -1
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +14 -13
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +210 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +570 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +94 -15
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +104 -130
- package/lib/protocol.js.map +1 -1
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +2 -3
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +73 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +63 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +103 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +23 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/util/analytics.d.ts +8 -0
- package/lib/util/analytics.d.ts.map +1 -0
- package/lib/util/analytics.js +79 -0
- package/lib/util/analytics.js.map +1 -0
- package/lib/util/async-iterator.js +55 -133
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js +17 -59
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +8 -8
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deferred.js +10 -12
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.js +26 -39
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.js +58 -74
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.js +22 -46
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +13 -67
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +34 -79
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +44 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +1 -1
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +98 -98
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +7 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +103 -31
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +15 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +18 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/logging.d.ts +49 -33
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +107 -110
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +2 -2
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts +10 -0
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +32 -7
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +4 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +123 -84
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.js +16 -55
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.js +144 -288
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeater.js +35 -88
- package/lib/util/repeater.js.map +1 -1
- package/lib/util/safe-promise.js +9 -12
- package/lib/util/safe-promise.js.map +1 -1
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.js +28 -16
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.js +21 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.js +43 -47
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/workspace-port-authentication.js +3 -2
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +74 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +16 -0
- package/lib/workspace-cluster.js.map +1 -0
- package/lib/workspace-instance.d.ts +5 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +28 -16
- package/pkg-yarn.lock +17 -9
- package/src/accounting-protocol.ts +229 -0
- package/src/admin-protocol.ts +39 -5
- package/src/analytics.ts +54 -0
- package/src/context-url.spec.ts +39 -0
- package/src/context-url.ts +51 -0
- package/src/email-protocol.ts +2 -3
- package/src/env.ts +10 -10
- package/src/gitpod-service.ts +198 -33
- package/src/headless-workspace-log.ts +7 -11
- package/src/index.ts +5 -1
- package/src/messaging/browser/connection.ts +195 -14
- package/src/messaging/client-call-metrics.ts +97 -0
- package/src/messaging/error.ts +8 -2
- package/src/messaging/handler.ts +12 -0
- package/src/messaging/node/connection.ts +2 -2
- package/src/messaging/proxy-factory.ts +14 -6
- package/src/payment-protocol.ts +20 -0
- package/src/permission.ts +2 -1
- package/src/plans.ts +632 -0
- package/src/protocol.ts +153 -43
- package/src/snapshot-url.spec.ts +25 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +113 -0
- package/src/teams-projects-protocol.ts +132 -0
- package/src/util/analytics.ts +87 -0
- package/src/util/deferred.ts +1 -1
- package/src/util/garbage-collected-cache.ts +2 -2
- package/src/util/generate-workspace-id.spec.ts +3 -3
- package/src/util/generate-workspace-id.ts +2 -0
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.spec.ts +25 -1
- package/src/util/gitpod-host-url.ts +23 -10
- package/src/util/grpc.ts +15 -0
- package/src/util/logging.ts +102 -38
- package/src/util/parse-workspace-id.spec.ts +21 -1
- package/src/util/parse-workspace-id.ts +32 -6
- package/src/util/queue.spec.ts +1 -1
- package/src/util/semaphore.ts +2 -2
- package/src/util/skip-if.ts +1 -1
- package/src/util/timeutil.ts +4 -4
- package/src/workspace-cluster.ts +96 -0
- package/src/workspace-instance.ts +25 -13
- package/src/wsready.ts +2 -2
- package/lib/util/context-url.d.ts +0 -13
- package/lib/util/context-url.d.ts.map +0 -1
- package/lib/util/context-url.js +0 -26
- package/lib/util/context-url.js.map +0 -1
- package/lib/util/context-url.spec.d.ts.map +0 -1
- package/lib/util/context-url.spec.js +0 -52
- package/lib/util/context-url.spec.js.map +0 -1
- package/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js.map +0 -1
- package/src/util/context-url.spec.ts +0 -25
- package/src/util/context-url.ts +0 -23
package/lib/util/safe-promise.js
CHANGED
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.SafePromise = void 0;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
SafePromise.catchAndLog = function (p, logCtx) {
|
|
14
|
-
return SafePromise.catch(p, function (err) {
|
|
9
|
+
const logging_1 = require("./logging");
|
|
10
|
+
class SafePromise {
|
|
11
|
+
static catchAndLog(p, logCtx) {
|
|
12
|
+
return SafePromise.catch(p, (err) => {
|
|
15
13
|
if (logCtx) {
|
|
16
14
|
logging_1.log.error(logCtx, err);
|
|
17
15
|
}
|
|
@@ -19,16 +17,15 @@ var SafePromise = /** @class */ (function () {
|
|
|
19
17
|
logging_1.log.error(err);
|
|
20
18
|
}
|
|
21
19
|
});
|
|
22
|
-
}
|
|
20
|
+
}
|
|
23
21
|
;
|
|
24
|
-
|
|
25
|
-
return p.catch(
|
|
22
|
+
static catch(p, handler) {
|
|
23
|
+
return p.catch((err) => {
|
|
26
24
|
handler(err);
|
|
27
25
|
return {}; // Nobody will ever see this value as the Promise already failed. It's just there to please the compiler
|
|
28
26
|
});
|
|
29
|
-
}
|
|
27
|
+
}
|
|
30
28
|
;
|
|
31
|
-
|
|
32
|
-
}());
|
|
29
|
+
}
|
|
33
30
|
exports.SafePromise = SafePromise;
|
|
34
31
|
//# sourceMappingURL=safe-promise.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-promise.js","sourceRoot":"","sources":["../../src/util/safe-promise.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"safe-promise.js","sourceRoot":"","sources":["../../src/util/safe-promise.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,uCAA4C;AAE5C,MAAa,WAAW;IACb,MAAM,CAAC,WAAW,CAAI,CAAa,EAAE,MAAmB;QAC3D,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE;YAChC,IAAI,MAAM,EAAE;gBACR,aAAG,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;aAC1B;iBAAM;gBACH,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAClB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAAA,CAAC;IACK,MAAM,CAAC,KAAK,CAAI,CAAa,EAAE,OAA2B;QAC7D,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,OAAO,CAAC,GAAG,CAAC,CAAC;YACb,OAAO,EAAO,CAAC,CAAC,wGAAwG;QAC5H,CAAC,CAAC,CAAC;IACP,CAAC;IAAA,CAAC;CACL;AAhBD,kCAgBC"}
|
package/lib/util/semaphore.js
CHANGED
|
@@ -13,67 +13,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
17
|
exports.Semaphore = void 0;
|
|
45
|
-
|
|
46
|
-
|
|
18
|
+
class Semaphore {
|
|
19
|
+
constructor(capacity) {
|
|
47
20
|
this.capacity = capacity;
|
|
48
21
|
this.queue = [];
|
|
49
22
|
if (capacity < 1) {
|
|
50
23
|
throw new Error("Capacity cannot be less than 1");
|
|
51
24
|
}
|
|
52
25
|
}
|
|
53
|
-
|
|
26
|
+
release() {
|
|
54
27
|
if (this.used == 0)
|
|
55
28
|
return;
|
|
56
|
-
|
|
29
|
+
const queued = this.queue.shift();
|
|
57
30
|
if (queued) {
|
|
58
31
|
queued();
|
|
59
32
|
}
|
|
60
33
|
this.used--;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return [2 /*return*/, new Promise(function (rs, rj) {
|
|
71
|
-
_this.queue.push(rs);
|
|
72
|
-
})];
|
|
34
|
+
}
|
|
35
|
+
acquire() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
this.used++;
|
|
38
|
+
if (this.used <= this.capacity) {
|
|
39
|
+
return Promise.resolve();
|
|
40
|
+
}
|
|
41
|
+
return new Promise((rs, rj) => {
|
|
42
|
+
this.queue.push(rs);
|
|
73
43
|
});
|
|
74
44
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}());
|
|
45
|
+
}
|
|
46
|
+
}
|
|
78
47
|
exports.Semaphore = Semaphore;
|
|
79
48
|
//# sourceMappingURL=semaphore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semaphore.js","sourceRoot":"","sources":["../../src/util/semaphore.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"semaphore.js","sourceRoot":"","sources":["../../src/util/semaphore.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAGH,MAAa,SAAS;IAIlB,YAA+B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAHrC,UAAK,GAAmB,EAAE,CAAC;QAIjC,IAAG,QAAQ,GAAG,CAAC,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACrD;IACL,CAAC;IAEM,OAAO;QACV,IAAG,IAAI,CAAC,IAAI,IAAI,CAAC;YAAE,OAAO;QAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAClC,IAAI,MAAM,EAAE;YACR,MAAM,EAAE,CAAC;SACZ;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAEY,OAAO;;YAChB,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC3B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;aAC5B;YAED,OAAO,IAAI,OAAO,CAAO,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;gBAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxB,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CAEJ;AAhCD,8BAgCC"}
|
package/lib/util/skip-if.js
CHANGED
|
@@ -11,9 +11,9 @@ exports.skipIfEnvVarNotSet = exports.skipIf = void 0;
|
|
|
11
11
|
* @param doSkip A function which takes a TestSuite and decides if it should be skipped
|
|
12
12
|
*/
|
|
13
13
|
function skipIf(doSkip) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const trait = function (ctx, ctor) {
|
|
15
|
+
const suite = ctx; // No idea why those fields are not exported in the types
|
|
16
|
+
const skip = doSkip(suite);
|
|
17
17
|
suite.beforeEach(function () {
|
|
18
18
|
if (skip) {
|
|
19
19
|
this.skip();
|
|
@@ -30,10 +30,10 @@ exports.skipIf = skipIf;
|
|
|
30
30
|
* @param name The name of the env var the TestSuite depends on being present
|
|
31
31
|
*/
|
|
32
32
|
function skipIfEnvVarNotSet(name) {
|
|
33
|
-
return skipIf(
|
|
34
|
-
|
|
33
|
+
return skipIf((suite) => {
|
|
34
|
+
const skip = process.env[name] === undefined;
|
|
35
35
|
if (skip) {
|
|
36
|
-
console.log(
|
|
36
|
+
console.log(`Skipping suite ${suite.title} because env var '${name}' is not set`);
|
|
37
37
|
}
|
|
38
38
|
return skip;
|
|
39
39
|
});
|
package/lib/util/skip-if.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-if.js","sourceRoot":"","sources":["../../src/util/skip-if.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAWH;;;GAGG;AACH,SAAgB,MAAM,CAAC,MAA4C;IAC/D,
|
|
1
|
+
{"version":3,"file":"skip-if.js","sourceRoot":"","sources":["../../src/util/skip-if.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAWH;;;GAGG;AACH,SAAgB,MAAM,CAAC,MAA4C;IAC/D,MAAM,KAAK,GAA+B,UAA4C,GAAgC,EAAE,IAAc;QAClI,MAAM,KAAK,GAAG,GAA8B,CAAC,CAAE,yDAAyD;QACxG,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,CAAC,UAAU,CAAC;YACb,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;QACL,CAAC,CAAC,CAAA;IACN,CAAC,CAAC;IAEF,2IAA2I;IAC1I,KAAa,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACvC,OAAO,KAAK,CAAC;AACjB,CAAC;AAdD,wBAcC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;QAC7C,IAAI,IAAI,EAAE;YACN,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,CAAC,KAAK,qBAAqB,IAAI,cAAc,CAAC,CAAC;SACrF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;AACP,CAAC;AARD,gDAQC"}
|
package/lib/util/timeutil.js
CHANGED
|
@@ -16,9 +16,9 @@ exports.hoursToMilliseconds = exports.millisecondsToHours = exports.rightBefore
|
|
|
16
16
|
* @param day
|
|
17
17
|
*/
|
|
18
18
|
function oneMonthLater(fromDate, day) {
|
|
19
|
-
|
|
19
|
+
const later = new Date(fromDate);
|
|
20
20
|
day = day || later.getDate();
|
|
21
|
-
|
|
21
|
+
const fromMonth = later.getMonth();
|
|
22
22
|
later.setDate(day);
|
|
23
23
|
later.setMonth(later.getMonth() + 1);
|
|
24
24
|
if (later.getMonth() - fromMonth > 1) {
|
|
@@ -27,25 +27,37 @@ function oneMonthLater(fromDate, day) {
|
|
|
27
27
|
return later.toISOString();
|
|
28
28
|
}
|
|
29
29
|
exports.oneMonthLater = oneMonthLater;
|
|
30
|
-
|
|
30
|
+
const yearsLater = (fromDate, years) => (0, exports.liftDate1)(fromDate, (d) => {
|
|
31
31
|
d.setUTCFullYear(d.getUTCFullYear() + years);
|
|
32
32
|
return d.toISOString();
|
|
33
|
-
});
|
|
33
|
+
});
|
|
34
|
+
exports.yearsLater = yearsLater;
|
|
34
35
|
// tslint:disable-next-line:no-shadowed-variable
|
|
35
|
-
|
|
36
|
-
exports.
|
|
37
|
-
|
|
36
|
+
const addMillis = (d1, millis) => (0, exports.liftDate1)(d1, (d1) => new Date(d1.getTime() + millis).toISOString());
|
|
37
|
+
exports.addMillis = addMillis;
|
|
38
|
+
const durationInHours = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => millisecondsToHours(d1.getTime() - d2.getTime()));
|
|
39
|
+
exports.durationInHours = durationInHours;
|
|
40
|
+
const durationInMillis = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => d1.getTime() - d2.getTime());
|
|
41
|
+
exports.durationInMillis = durationInMillis;
|
|
38
42
|
// tslint:disable-next-line:no-shadowed-variable
|
|
39
|
-
|
|
40
|
-
exports.
|
|
41
|
-
|
|
42
|
-
exports.
|
|
43
|
-
|
|
44
|
-
exports.
|
|
45
|
-
|
|
46
|
-
exports.
|
|
43
|
+
const isDateGreaterOrEqual = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => d1.getTime() >= d2.getTime());
|
|
44
|
+
exports.isDateGreaterOrEqual = isDateGreaterOrEqual;
|
|
45
|
+
const isDateSmallerOrEqual = (d1, d2) => !d2 || d1 <= d2;
|
|
46
|
+
exports.isDateSmallerOrEqual = isDateSmallerOrEqual;
|
|
47
|
+
const isDateSmaller = (d1, d2) => !d2 || d1 < d2;
|
|
48
|
+
exports.isDateSmaller = isDateSmaller;
|
|
49
|
+
const oldest = (d1, d2) => d1 > d2 ? d1 : d2;
|
|
50
|
+
exports.oldest = oldest;
|
|
51
|
+
const earliest = (d1, d2) => d1 < d2 ? d1 : d2;
|
|
52
|
+
exports.earliest = earliest;
|
|
53
|
+
const orderAsc = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => d1.getTime() - d2.getTime());
|
|
54
|
+
exports.orderAsc = orderAsc;
|
|
55
|
+
const liftDate1 = (d1, f) => f(new Date(d1));
|
|
56
|
+
exports.liftDate1 = liftDate1;
|
|
57
|
+
const liftDate = (d1, d2, f) => f(new Date(d1), new Date(d2));
|
|
58
|
+
exports.liftDate = liftDate;
|
|
47
59
|
function hoursLater(date, hours) {
|
|
48
|
-
|
|
60
|
+
const result = new Date(date);
|
|
49
61
|
result.setHours(result.getHours() + hours);
|
|
50
62
|
return result.toISOString();
|
|
51
63
|
}
|
package/lib/util/timeutil.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeutil.js","sourceRoot":"","sources":["../../src/util/timeutil.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,QAAgB,EAAE,GAAY;IACxD,
|
|
1
|
+
{"version":3,"file":"timeutil.js","sourceRoot":"","sources":["../../src/util/timeutil.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,QAAgB,EAAE,GAAY;IACxD,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IAC7B,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;IACrC,IAAI,KAAK,CAAC,QAAQ,EAAE,GAAG,SAAS,GAAG,CAAC,EAAE;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KACpB;IACD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC;AAVD,sCAUC;AACM,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,KAAa,EAAU,EAAE,CAAC,IAAA,iBAAS,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;IAC7F,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,KAAK,CAAC,CAAC;IAC7C,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QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAA;IAC1C,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAJD,gCAIC;AAED,SAAgB,aAAa,CAAC,IAAY,EAAE,OAAe;IACvD,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7E,CAAC;AAFD,sCAEC;AAED,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,CAAC;AAFD,gCAEC;AAED,SAAgB,WAAW,CAAC,IAAY;IACpC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,CAAC;AAFD,kCAEC;AAED,SAAgB,mBAAmB,CAAC,YAAoB;IACpD,OAAO,YAAY,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;AACzC,CAAC;AAFD,kDAEC;AAED,SAAgB,mBAAmB,CAAC,KAAa;IAC7C,OAAO,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAClC,CAAC;AAFD,kDAEC"}
|
|
@@ -15,14 +15,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.TimeutilSpec = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
TimeutilSpec.prototype.testTimeutil = function () {
|
|
18
|
+
const chai = require("chai");
|
|
19
|
+
const expect = chai.expect;
|
|
20
|
+
const mocha_typescript_1 = require("mocha-typescript");
|
|
21
|
+
const timeutil_1 = require("./timeutil");
|
|
22
|
+
let TimeutilSpec = class TimeutilSpec {
|
|
23
|
+
testTimeutil() {
|
|
26
24
|
// targeting a 1st, 1th of Jan => 1st of Feb
|
|
27
25
|
this.isOneMonthLater(new Date(2000, 0, 1), 1, new Date(2000, 1, 1));
|
|
28
26
|
// targeting a 31th, 30th of Apr => 31st of May
|
|
@@ -38,21 +36,20 @@ var TimeutilSpec = /** @class */ (function () {
|
|
|
38
36
|
this.isOneMonthLater(new Date(2001, 0, 31), 31, new Date(2001, 1, 28));
|
|
39
37
|
// Feb leap year
|
|
40
38
|
this.isOneMonthLater(new Date(2000, 0, 31), 31, new Date(2000, 1, 29));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
expect(later,
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}());
|
|
39
|
+
}
|
|
40
|
+
isOneMonthLater(from, day, expectation) {
|
|
41
|
+
const later = (0, timeutil_1.oneMonthLater)(from.toISOString(), day);
|
|
42
|
+
expect(later, `expected ${later} to be equal ${expectation}`).to.be.equal(expectation.toISOString());
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
mocha_typescript_1.test,
|
|
47
|
+
__metadata("design:type", Function),
|
|
48
|
+
__metadata("design:paramtypes", []),
|
|
49
|
+
__metadata("design:returntype", void 0)
|
|
50
|
+
], TimeutilSpec.prototype, "testTimeutil", null);
|
|
51
|
+
TimeutilSpec = __decorate([
|
|
52
|
+
(0, mocha_typescript_1.suite)()
|
|
53
|
+
], TimeutilSpec);
|
|
57
54
|
exports.TimeutilSpec = TimeutilSpec;
|
|
58
55
|
//# sourceMappingURL=timeutil.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeutil.spec.js","sourceRoot":"","sources":["../../src/util/timeutil.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"timeutil.spec.js","sourceRoot":"","sources":["../../src/util/timeutil.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,6BAA6B;AAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAC3B,uDAA+C;AAC/C,yCAA2C;AAG3C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAGrB,YAAY;QACR,4CAA4C;QAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAEnE,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEtE,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEtE,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEtE,YAAY;QACZ,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACpE,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEvE,MAAM;QACN,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QACtE,gBAAgB;QAChB,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IAC1E,CAAC;IAED,eAAe,CAAC,IAAU,EAAE,GAAW,EAAE,WAAiB;QACtD,MAAM,KAAK,GAAG,IAAA,wBAAa,EAAC,IAAI,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,CAAA;QACpD,MAAM,CAAC,KAAK,EAAE,YAAY,KAAK,gBAAgB,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAA;IACxG,CAAC;CACJ,CAAA;AA3BG;IADC,uBAAI;;;;gDAsBJ;AAxBQ,YAAY;IADxB,IAAA,wBAAK,GAAE;GACK,YAAY,CA8BxB;AA9BY,oCAAY"}
|
package/lib/util/tracing.js
CHANGED
|
@@ -12,21 +12,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.PerOperationSampler = exports.TracingManager = exports.TraceContext = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const opentracing = require("opentracing");
|
|
16
|
+
const jaeger_client_1 = require("jaeger-client");
|
|
17
|
+
const opentracing_1 = require("opentracing");
|
|
18
|
+
const inversify_1 = require("inversify");
|
|
19
19
|
var TraceContext;
|
|
20
20
|
(function (TraceContext) {
|
|
21
21
|
function startSpan(operation, ctx) {
|
|
22
|
-
|
|
22
|
+
const options = {
|
|
23
23
|
childOf: ctx.span
|
|
24
24
|
};
|
|
25
25
|
return opentracing.globalTracer().startSpan(operation, options);
|
|
26
26
|
}
|
|
27
27
|
TraceContext.startSpan = startSpan;
|
|
28
28
|
function startAsyncSpan(operation, ctx) {
|
|
29
|
-
|
|
29
|
+
const options = {};
|
|
30
30
|
if (!!ctx.span) {
|
|
31
31
|
options.references = [opentracing.followsFrom(ctx.span.context())];
|
|
32
32
|
}
|
|
@@ -45,21 +45,19 @@ var TraceContext;
|
|
|
45
45
|
}
|
|
46
46
|
TraceContext.logError = logError;
|
|
47
47
|
})(TraceContext = exports.TraceContext || (exports.TraceContext = {}));
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
let TracingManager = class TracingManager {
|
|
49
|
+
setup(serviceName, opts) {
|
|
50
|
+
(0, opentracing_1.initGlobalTracer)(this.getTracerForService(serviceName, opts));
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
TracingManager.prototype.getTracerForService = function (serviceName, opts) {
|
|
55
|
-
var config = {
|
|
52
|
+
getTracerForService(serviceName, opts) {
|
|
53
|
+
const config = {
|
|
56
54
|
disable: false,
|
|
57
55
|
reporter: {
|
|
58
56
|
logSpans: false
|
|
59
57
|
},
|
|
60
|
-
serviceName
|
|
58
|
+
serviceName
|
|
61
59
|
};
|
|
62
|
-
|
|
60
|
+
const t = (0, jaeger_client_1.initTracerFromEnv)(config, {
|
|
63
61
|
logger: console
|
|
64
62
|
});
|
|
65
63
|
if (opts) {
|
|
@@ -68,26 +66,25 @@ var TracingManager = /** @class */ (function () {
|
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
return t;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}());
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
TracingManager = __decorate([
|
|
72
|
+
(0, inversify_1.injectable)()
|
|
73
|
+
], TracingManager);
|
|
77
74
|
exports.TracingManager = TracingManager;
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
class PerOperationSampler {
|
|
76
|
+
constructor(fallback, strategies) {
|
|
80
77
|
this.fallback = fallback;
|
|
81
78
|
this.strategies = strategies;
|
|
82
79
|
}
|
|
83
|
-
|
|
80
|
+
name() {
|
|
84
81
|
return 'PerOperationSampler';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
}
|
|
83
|
+
toString() {
|
|
84
|
+
return `${this.name()}`;
|
|
85
|
+
}
|
|
86
|
+
isSampled(operation, tags) {
|
|
87
|
+
let shouldSample = this.strategies[operation];
|
|
91
88
|
if (shouldSample === undefined) {
|
|
92
89
|
if (!this.fallback.isSampled) {
|
|
93
90
|
return false;
|
|
@@ -95,31 +92,30 @@ var PerOperationSampler = /** @class */ (function () {
|
|
|
95
92
|
return this.fallback.isSampled(operation, tags);
|
|
96
93
|
}
|
|
97
94
|
return shouldSample;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
}
|
|
96
|
+
onCreateSpan(span) {
|
|
97
|
+
const outTags = {};
|
|
98
|
+
const isSampled = this.isSampled(span.operationName, outTags);
|
|
102
99
|
// NB: return retryable=true here since we can change decision after setOperationName().
|
|
103
100
|
return { sample: isSampled, retryable: true, tags: outTags };
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
}
|
|
102
|
+
onSetOperationName(span, operationName) {
|
|
103
|
+
const outTags = {};
|
|
104
|
+
const isSampled = this.isSampled(span.operationName, outTags);
|
|
108
105
|
return { sample: isSampled, retryable: false, tags: outTags };
|
|
109
|
-
}
|
|
110
|
-
|
|
106
|
+
}
|
|
107
|
+
onSetTag(span, key, value) {
|
|
111
108
|
return { sample: false, retryable: true, tags: null };
|
|
112
|
-
}
|
|
113
|
-
|
|
109
|
+
}
|
|
110
|
+
equal(other) {
|
|
114
111
|
return false; // TODO equal should be removed
|
|
115
|
-
}
|
|
116
|
-
|
|
112
|
+
}
|
|
113
|
+
close(callback) {
|
|
117
114
|
// all nested samplers are of simple types, so we do not need to Close them
|
|
118
115
|
if (callback) {
|
|
119
116
|
callback();
|
|
120
117
|
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
}());
|
|
118
|
+
}
|
|
119
|
+
}
|
|
124
120
|
exports.PerOperationSampler = PerOperationSampler;
|
|
125
121
|
//# sourceMappingURL=tracing.js.map
|
package/lib/util/tracing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/util/tracing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/util/tracing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;AAGH,2CAA2C;AAC3C,iDAA4F;AAC5F,6CAA+C;AAC/C,yCAAuC;AAMvC,IAAiB,YAAY,CA2B5B;AA3BD,WAAiB,YAAY;IACzB,SAAgB,SAAS,CAAC,SAAiB,EAAE,GAAiB;QAC1D,MAAM,OAAO,GAA4B;YACrC,OAAO,EAAE,GAAG,CAAC,IAAI;SACpB,CAAA;QACD,OAAO,WAAW,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IALe,sBAA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AC5D,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAE,IAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QACvE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAClE,CAAC;IAED,QAAQ,CAAC,IAAsB,EAAE,GAAW,EAAE,KAAU;QACpD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,KAAc;QAChB,OAAO,KAAK,CAAC,CAAC,+BAA+B;IACjD,CAAC;IAED,KAAK,CAAC,QAAkB;QACpB,2EAA2E;QAC3E,IAAI,QAAQ,EAAE;YACV,QAAQ,EAAE,CAAC;SACd;IACL,CAAC;CACJ;AAlDD,kDAkDC"}
|
|
@@ -14,10 +14,11 @@ exports.worspacePortAuthCookieName = void 0;
|
|
|
14
14
|
* - server:
|
|
15
15
|
* - to authenticate access to port locations
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
const worspacePortAuthCookieName = function (host, workspaceId) {
|
|
18
18
|
return host
|
|
19
19
|
.replace(/https?/, '')
|
|
20
20
|
.replace(/[\W_]+/g, "_")
|
|
21
|
-
+
|
|
21
|
+
+ `_ws_${workspaceId}_port_auth_`;
|
|
22
22
|
};
|
|
23
|
+
exports.worspacePortAuthCookieName = worspacePortAuthCookieName;
|
|
23
24
|
//# sourceMappingURL=workspace-port-authentication.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-port-authentication.js","sourceRoot":"","sources":["../../src/util/workspace-port-authentication.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;;EAOE;
|
|
1
|
+
{"version":3,"file":"workspace-port-authentication.js","sourceRoot":"","sources":["../../src/util/workspace-port-authentication.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;;EAOE;AACK,MAAM,0BAA0B,GAAG,UAAS,IAAY,EAAE,WAAmB;IAChF,OAAO,IAAI;SACN,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;UACtB,OAAO,WAAW,aAAa,CAAC;AAC1C,CAAC,CAAC;AALW,QAAA,0BAA0B,8BAKrC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
+
* See License-AGPL.txt in the project root for license information.
|
|
5
|
+
*/
|
|
6
|
+
import { DeepPartial } from "./util/deep-partial";
|
|
7
|
+
import { PermissionName } from './permission';
|
|
8
|
+
export interface WorkspaceCluster {
|
|
9
|
+
name: string;
|
|
10
|
+
url: string;
|
|
11
|
+
tls?: TLSConfig;
|
|
12
|
+
state: WorkspaceClusterState;
|
|
13
|
+
maxScore: number;
|
|
14
|
+
score: number;
|
|
15
|
+
govern: boolean;
|
|
16
|
+
admissionConstraints?: AdmissionConstraint[];
|
|
17
|
+
admissionPreferences?: AdmissionPreference[];
|
|
18
|
+
}
|
|
19
|
+
export declare type WorkspaceClusterState = "available" | "cordoned" | "draining";
|
|
20
|
+
export interface TLSConfig {
|
|
21
|
+
ca: string;
|
|
22
|
+
key: string;
|
|
23
|
+
crt: string;
|
|
24
|
+
}
|
|
25
|
+
export declare namespace TLSConfig {
|
|
26
|
+
const loadFromBase64File: (path: string) => string;
|
|
27
|
+
}
|
|
28
|
+
export declare type WorkspaceClusterWoTLS = Omit<WorkspaceCluster, "tls">;
|
|
29
|
+
export declare type WorkspaceManagerConnectionInfo = Pick<WorkspaceCluster, "name" | "url" | "tls">;
|
|
30
|
+
export declare type AdmissionConstraint = AdmissionConstraintFeaturePreview | AdmissionConstraintHasRole | AdmissionConstraintHasUserLevel;
|
|
31
|
+
export declare type AdmissionConstraintFeaturePreview = {
|
|
32
|
+
type: "has-feature-preview";
|
|
33
|
+
};
|
|
34
|
+
export declare type AdmissionConstraintHasRole = {
|
|
35
|
+
type: "has-permission";
|
|
36
|
+
permission: PermissionName;
|
|
37
|
+
};
|
|
38
|
+
export declare type AdmissionConstraintHasUserLevel = {
|
|
39
|
+
type: "has-user-level";
|
|
40
|
+
level: string;
|
|
41
|
+
};
|
|
42
|
+
export declare type AdmissionPreference = AdmissionPreferenceUserLevel;
|
|
43
|
+
export declare type AdmissionPreferenceUserLevel = {
|
|
44
|
+
type: 'user-level';
|
|
45
|
+
level: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const WorkspaceClusterDB: unique symbol;
|
|
48
|
+
export interface WorkspaceClusterDB {
|
|
49
|
+
/**
|
|
50
|
+
* Stores the given WorkspaceCluster to the cluster-local DB in a consistent manner.
|
|
51
|
+
* If there already is an entry with the same name it's merged and updated with the given state.
|
|
52
|
+
* @param cluster
|
|
53
|
+
*/
|
|
54
|
+
save(cluster: WorkspaceCluster): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Deletes the cluster identified by this name, if any.
|
|
57
|
+
* @param name
|
|
58
|
+
*/
|
|
59
|
+
deleteByName(name: string): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Finds a WorkspaceCluster with the given name. If there is none, `undefined` is returned.
|
|
62
|
+
* @param name
|
|
63
|
+
*/
|
|
64
|
+
findByName(name: string): Promise<WorkspaceCluster | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
* Lists all WorkspaceClusterWoTls for which the given predicate is true (does not return TLS for size/speed concerns)
|
|
67
|
+
* @param predicate
|
|
68
|
+
*/
|
|
69
|
+
findFiltered(predicate: DeepPartial<WorkspaceClusterFilter>): Promise<WorkspaceClusterWoTLS[]>;
|
|
70
|
+
}
|
|
71
|
+
export interface WorkspaceClusterFilter extends Pick<WorkspaceCluster, "state" | "govern" | "url"> {
|
|
72
|
+
minScore: number;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=workspace-cluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-cluster.d.ts","sourceRoot":"","sources":["../src/workspace-cluster.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAI7B,IAAI,EAAE,MAAM,CAAC;IAGb,GAAG,EAAE,MAAM,CAAC;IAGZ,GAAG,CAAC,EAAE,SAAS,CAAC;IAGhB,KAAK,EAAE,qBAAqB,CAAC;IAG7B,QAAQ,EAAE,MAAM,CAAC;IAGjB,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,OAAO,CAAC;IAGhB,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAG7C,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAChD;AAED,oBAAY,qBAAqB,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAC1E,MAAM,WAAW,SAAS;IAEtB,EAAE,EAAE,MAAM,CAAC;IAEX,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,EAAE,MAAM,CAAC;CACf;AACD,yBAAiB,SAAS,CAAC;IAChB,MAAM,kBAAkB,SAAU,MAAM,KAAG,MAA6E,CAAC;CACnI;AACD,oBAAY,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAClE,oBAAY,8BAA8B,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC;AAE5F,oBAAY,mBAAmB,GAAG,iCAAiC,GAAG,0BAA0B,GAAG,+BAA+B,CAAC;AACnI,oBAAY,iCAAiC,GAAG;IAAE,IAAI,EAAE,qBAAqB,CAAA;CAAE,CAAC;AAChF,oBAAY,0BAA0B,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,UAAU,EAAE,cAAc,CAAA;CAAE,CAAC;AAChG,oBAAY,+BAA+B,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,oBAAY,mBAAmB,GAAG,4BAA4B,CAAC;AAC/D,oBAAY,4BAA4B,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAGjF,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1C;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IAEhE;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;CAClG;AACD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC9F,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
4
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
+
* See License-AGPL.txt in the project root for license information.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.WorkspaceClusterDB = exports.TLSConfig = void 0;
|
|
9
|
+
const fs = require("fs");
|
|
10
|
+
const env_1 = require("./env");
|
|
11
|
+
var TLSConfig;
|
|
12
|
+
(function (TLSConfig) {
|
|
13
|
+
TLSConfig.loadFromBase64File = (path) => fs.readFileSync((0, env_1.filePathTelepresenceAware)(path)).toString("base64");
|
|
14
|
+
})(TLSConfig = exports.TLSConfig || (exports.TLSConfig = {}));
|
|
15
|
+
exports.WorkspaceClusterDB = Symbol("WorkspaceClusterDB");
|
|
16
|
+
//# sourceMappingURL=workspace-cluster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-cluster.js","sourceRoot":"","sources":["../src/workspace-cluster.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,yBAAyB;AACzB,+BAAkD;AA4ClD,IAAiB,SAAS,CAEzB;AAFD,WAAiB,SAAS;IACT,4BAAkB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,IAAA,+BAAyB,EAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACpI,CAAC,EAFgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEzB;AAaY,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC"}
|