kanban-lite 1.2.2 → 1.2.3
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/dist/cli.js +168 -85
- package/dist/extension.js +157 -74
- package/dist/mcp-server.js +94 -33
- package/dist/sdk/index.cjs +94 -32
- package/dist/sdk/index.mjs +94 -32
- package/dist/sdk/sdk/KanbanSDK.d.ts +5 -9
- package/dist/sdk/sdk/modules/cards.d.ts +11 -2
- package/dist/sdk/sdk/types.d.ts +1 -1
- package/dist/sdk/shared/config.d.ts +17 -1
- package/dist/standalone-webview/index.js +15 -15
- package/dist/standalone-webview/index.js.map +1 -1
- package/dist/standalone.js +219 -121
- package/package.json +1 -1
- package/src/mcp-server/index.ts +1 -1
- package/src/sdk/KanbanSDK.d.ts +5 -9
- package/src/sdk/KanbanSDK.ts +7 -10
- package/src/sdk/integrationCatalog.ts +1 -0
- package/src/sdk/modules/cards.ts +13 -24
- package/src/sdk/plugins/index.ts +10 -2
- package/src/sdk/types.d.ts +1 -1
- package/src/sdk/types.ts +1 -0
- package/src/sdk/webhooks.ts +19 -2
- package/src/shared/config.ts +124 -2
- package/src/standalone/internal/runtime.ts +11 -6
- package/src/standalone/server.ts +21 -7
- package/src/standalone/watcherSetup.ts +9 -0
- package/src/webview/standalone-shim.ts +2 -1
package/dist/standalone.js
CHANGED
|
@@ -433,42 +433,42 @@ var require_queue = __commonJS({
|
|
|
433
433
|
queue.drained = drained;
|
|
434
434
|
return queue;
|
|
435
435
|
function push(value) {
|
|
436
|
-
var p = new Promise(function(
|
|
436
|
+
var p = new Promise(function(resolve10, reject) {
|
|
437
437
|
pushCb(value, function(err, result) {
|
|
438
438
|
if (err) {
|
|
439
439
|
reject(err);
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
resolve10(result);
|
|
443
443
|
});
|
|
444
444
|
});
|
|
445
445
|
p.catch(noop);
|
|
446
446
|
return p;
|
|
447
447
|
}
|
|
448
448
|
function unshift(value) {
|
|
449
|
-
var p = new Promise(function(
|
|
449
|
+
var p = new Promise(function(resolve10, reject) {
|
|
450
450
|
unshiftCb(value, function(err, result) {
|
|
451
451
|
if (err) {
|
|
452
452
|
reject(err);
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
resolve10(result);
|
|
456
456
|
});
|
|
457
457
|
});
|
|
458
458
|
p.catch(noop);
|
|
459
459
|
return p;
|
|
460
460
|
}
|
|
461
461
|
function drained() {
|
|
462
|
-
var p = new Promise(function(
|
|
462
|
+
var p = new Promise(function(resolve10) {
|
|
463
463
|
process.nextTick(function() {
|
|
464
464
|
if (queue.idle()) {
|
|
465
|
-
|
|
465
|
+
resolve10();
|
|
466
466
|
} else {
|
|
467
467
|
var previousDrain = queue.drain;
|
|
468
468
|
queue.drain = function() {
|
|
469
469
|
if (typeof previousDrain === "function")
|
|
470
470
|
previousDrain();
|
|
471
|
-
|
|
471
|
+
resolve10();
|
|
472
472
|
queue.drain = previousDrain;
|
|
473
473
|
};
|
|
474
474
|
}
|
|
@@ -813,8 +813,8 @@ var require_create_promise = __commonJS({
|
|
|
813
813
|
reject: null,
|
|
814
814
|
promise: null
|
|
815
815
|
};
|
|
816
|
-
obj.promise = new Promise((
|
|
817
|
-
obj.resolve =
|
|
816
|
+
obj.promise = new Promise((resolve10, reject) => {
|
|
817
|
+
obj.resolve = resolve10;
|
|
818
818
|
obj.reject = reject;
|
|
819
819
|
});
|
|
820
820
|
return obj;
|
|
@@ -1083,11 +1083,11 @@ var require_thenify = __commonJS({
|
|
|
1083
1083
|
return;
|
|
1084
1084
|
}
|
|
1085
1085
|
debug("thenify");
|
|
1086
|
-
return (
|
|
1086
|
+
return (resolve10, reject) => {
|
|
1087
1087
|
const p = this._loadRegistered();
|
|
1088
1088
|
return p.then(() => {
|
|
1089
1089
|
this[kThenifyDoNotWrap] = true;
|
|
1090
|
-
return
|
|
1090
|
+
return resolve10(this._server);
|
|
1091
1091
|
}, reject);
|
|
1092
1092
|
};
|
|
1093
1093
|
}
|
|
@@ -1224,12 +1224,12 @@ var require_boot = __commonJS({
|
|
|
1224
1224
|
inherits(Boot, EE);
|
|
1225
1225
|
if ("asyncDispose" in Symbol) {
|
|
1226
1226
|
Boot.prototype[Symbol.asyncDispose] = function() {
|
|
1227
|
-
return new Promise((
|
|
1227
|
+
return new Promise((resolve10, reject) => {
|
|
1228
1228
|
this.close((err) => {
|
|
1229
1229
|
if (err) {
|
|
1230
1230
|
return reject(err);
|
|
1231
1231
|
}
|
|
1232
|
-
|
|
1232
|
+
resolve10();
|
|
1233
1233
|
});
|
|
1234
1234
|
});
|
|
1235
1235
|
};
|
|
@@ -1376,12 +1376,12 @@ var require_boot = __commonJS({
|
|
|
1376
1376
|
throw new AVV_ERR_CALLBACK_NOT_FN("close", typeof func);
|
|
1377
1377
|
}
|
|
1378
1378
|
} else {
|
|
1379
|
-
promise = new Promise(function(
|
|
1379
|
+
promise = new Promise(function(resolve10, reject) {
|
|
1380
1380
|
func = function(err) {
|
|
1381
1381
|
if (err) {
|
|
1382
1382
|
return reject(err);
|
|
1383
1383
|
}
|
|
1384
|
-
|
|
1384
|
+
resolve10();
|
|
1385
1385
|
};
|
|
1386
1386
|
});
|
|
1387
1387
|
}
|
|
@@ -1401,7 +1401,7 @@ var require_boot = __commonJS({
|
|
|
1401
1401
|
queueMicrotask(this.start.bind(this));
|
|
1402
1402
|
return;
|
|
1403
1403
|
}
|
|
1404
|
-
return new Promise((
|
|
1404
|
+
return new Promise((resolve10, reject) => {
|
|
1405
1405
|
this._readyQ.push(readyPromiseCB);
|
|
1406
1406
|
this.start();
|
|
1407
1407
|
const relativeContext = this._current[0].server;
|
|
@@ -1409,7 +1409,7 @@ var require_boot = __commonJS({
|
|
|
1409
1409
|
if (err) {
|
|
1410
1410
|
reject(err);
|
|
1411
1411
|
} else {
|
|
1412
|
-
|
|
1412
|
+
resolve10(relativeContext);
|
|
1413
1413
|
}
|
|
1414
1414
|
process.nextTick(done);
|
|
1415
1415
|
}
|
|
@@ -2691,8 +2691,8 @@ var require_promise = __commonJS({
|
|
|
2691
2691
|
var { kTestInternals } = require_symbols2();
|
|
2692
2692
|
function withResolvers() {
|
|
2693
2693
|
let res, rej;
|
|
2694
|
-
const promise = new Promise((
|
|
2695
|
-
res =
|
|
2694
|
+
const promise = new Promise((resolve10, reject) => {
|
|
2695
|
+
res = resolve10;
|
|
2696
2696
|
rej = reject;
|
|
2697
2697
|
});
|
|
2698
2698
|
return { promise, resolve: res, reject: rej };
|
|
@@ -2791,15 +2791,15 @@ var require_server = __commonJS({
|
|
|
2791
2791
|
if (cb === void 0) {
|
|
2792
2792
|
const listening = listenPromise.call(this, server2, listenOptions);
|
|
2793
2793
|
return listening.then((address) => {
|
|
2794
|
-
const { promise, resolve:
|
|
2794
|
+
const { promise, resolve: resolve10 } = PonyPromise.withResolvers();
|
|
2795
2795
|
if (host === "localhost") {
|
|
2796
2796
|
multipleBindings.call(this, server2, httpHandler, options, listenOptions, () => {
|
|
2797
2797
|
this[kState].listening = true;
|
|
2798
|
-
|
|
2798
|
+
resolve10(address);
|
|
2799
2799
|
onListenHookRunner(this);
|
|
2800
2800
|
});
|
|
2801
2801
|
} else {
|
|
2802
|
-
|
|
2802
|
+
resolve10(address);
|
|
2803
2803
|
onListenHookRunner(this);
|
|
2804
2804
|
}
|
|
2805
2805
|
return promise;
|
|
@@ -2928,7 +2928,7 @@ var require_server = __commonJS({
|
|
|
2928
2928
|
return this.ready().then(() => {
|
|
2929
2929
|
if (this[kState].aborted)
|
|
2930
2930
|
return;
|
|
2931
|
-
const { promise, resolve:
|
|
2931
|
+
const { promise, resolve: resolve10, reject } = PonyPromise.withResolvers();
|
|
2932
2932
|
const errEventHandler = (err) => {
|
|
2933
2933
|
cleanup();
|
|
2934
2934
|
this[kState].listening = false;
|
|
@@ -2937,7 +2937,7 @@ var require_server = __commonJS({
|
|
|
2937
2937
|
const listeningEventHandler = () => {
|
|
2938
2938
|
cleanup();
|
|
2939
2939
|
this[kState].listening = true;
|
|
2940
|
-
|
|
2940
|
+
resolve10(logServerAddress.call(
|
|
2941
2941
|
this,
|
|
2942
2942
|
server2,
|
|
2943
2943
|
listenOptions.listenTextResolver || defaultResolveServerListeningText
|
|
@@ -5660,7 +5660,7 @@ var require_thread_stream = __commonJS({
|
|
|
5660
5660
|
var { version } = require_package();
|
|
5661
5661
|
var { EventEmitter: EventEmitter3 } = require("events");
|
|
5662
5662
|
var { Worker } = require("worker_threads");
|
|
5663
|
-
var { join:
|
|
5663
|
+
var { join: join21 } = require("path");
|
|
5664
5664
|
var { pathToFileURL } = require("url");
|
|
5665
5665
|
var { wait } = require_wait();
|
|
5666
5666
|
var {
|
|
@@ -5696,7 +5696,7 @@ var require_thread_stream = __commonJS({
|
|
|
5696
5696
|
function createWorker(stream, opts) {
|
|
5697
5697
|
const { filename, workerData } = opts;
|
|
5698
5698
|
const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
|
|
5699
|
-
const toExecute = bundlerOverrides["thread-stream-worker"] ||
|
|
5699
|
+
const toExecute = bundlerOverrides["thread-stream-worker"] || join21(__dirname, "lib", "worker.js");
|
|
5700
5700
|
const worker = new Worker(toExecute, {
|
|
5701
5701
|
...opts.workerOpts,
|
|
5702
5702
|
trackUnmanagedFds: false,
|
|
@@ -6087,7 +6087,7 @@ var require_transport = __commonJS({
|
|
|
6087
6087
|
var { createRequire: createRequire2 } = require("module");
|
|
6088
6088
|
var { existsSync: existsSync4 } = require("node:fs");
|
|
6089
6089
|
var getCallers = require_caller();
|
|
6090
|
-
var { join:
|
|
6090
|
+
var { join: join21, isAbsolute: isAbsolute2, sep: sep2 } = require("node:path");
|
|
6091
6091
|
var { fileURLToPath: fileURLToPath2 } = require("node:url");
|
|
6092
6092
|
var sleep = require_atomic_sleep();
|
|
6093
6093
|
var onExit = require_on_exit_leak_free();
|
|
@@ -6240,7 +6240,7 @@ var require_transport = __commonJS({
|
|
|
6240
6240
|
throw new Error("only one of target or targets can be specified");
|
|
6241
6241
|
}
|
|
6242
6242
|
if (targets) {
|
|
6243
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
6243
|
+
target = bundlerOverrides["pino-worker"] || join21(__dirname, "worker.js");
|
|
6244
6244
|
options.targets = targets.filter((dest) => dest.target).map((dest) => {
|
|
6245
6245
|
return {
|
|
6246
6246
|
...dest,
|
|
@@ -6258,7 +6258,7 @@ var require_transport = __commonJS({
|
|
|
6258
6258
|
});
|
|
6259
6259
|
});
|
|
6260
6260
|
} else if (pipeline) {
|
|
6261
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
6261
|
+
target = bundlerOverrides["pino-worker"] || join21(__dirname, "worker.js");
|
|
6262
6262
|
options.pipelines = [pipeline.map((dest) => {
|
|
6263
6263
|
return {
|
|
6264
6264
|
...dest,
|
|
@@ -6281,7 +6281,7 @@ var require_transport = __commonJS({
|
|
|
6281
6281
|
return origin;
|
|
6282
6282
|
}
|
|
6283
6283
|
if (origin === "pino/file") {
|
|
6284
|
-
return
|
|
6284
|
+
return join21(__dirname, "..", "file.js");
|
|
6285
6285
|
}
|
|
6286
6286
|
let fixTarget2;
|
|
6287
6287
|
for (const filePath of callers) {
|
|
@@ -7271,7 +7271,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7271
7271
|
return circularValue;
|
|
7272
7272
|
}
|
|
7273
7273
|
let res = "";
|
|
7274
|
-
let
|
|
7274
|
+
let join21 = ",";
|
|
7275
7275
|
const originalIndentation = indentation;
|
|
7276
7276
|
if (Array.isArray(value)) {
|
|
7277
7277
|
if (value.length === 0) {
|
|
@@ -7285,7 +7285,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7285
7285
|
indentation += spacer;
|
|
7286
7286
|
res += `
|
|
7287
7287
|
${indentation}`;
|
|
7288
|
-
|
|
7288
|
+
join21 = `,
|
|
7289
7289
|
${indentation}`;
|
|
7290
7290
|
}
|
|
7291
7291
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -7293,13 +7293,13 @@ ${indentation}`;
|
|
|
7293
7293
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
7294
7294
|
const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
7295
7295
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
7296
|
-
res +=
|
|
7296
|
+
res += join21;
|
|
7297
7297
|
}
|
|
7298
7298
|
const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
7299
7299
|
res += tmp !== void 0 ? tmp : "null";
|
|
7300
7300
|
if (value.length - 1 > maximumBreadth) {
|
|
7301
7301
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7302
|
-
res += `${
|
|
7302
|
+
res += `${join21}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7303
7303
|
}
|
|
7304
7304
|
if (spacer !== "") {
|
|
7305
7305
|
res += `
|
|
@@ -7320,7 +7320,7 @@ ${originalIndentation}`;
|
|
|
7320
7320
|
let separator = "";
|
|
7321
7321
|
if (spacer !== "") {
|
|
7322
7322
|
indentation += spacer;
|
|
7323
|
-
|
|
7323
|
+
join21 = `,
|
|
7324
7324
|
${indentation}`;
|
|
7325
7325
|
whitespace = " ";
|
|
7326
7326
|
}
|
|
@@ -7334,13 +7334,13 @@ ${indentation}`;
|
|
|
7334
7334
|
const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
|
|
7335
7335
|
if (tmp !== void 0) {
|
|
7336
7336
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
7337
|
-
separator =
|
|
7337
|
+
separator = join21;
|
|
7338
7338
|
}
|
|
7339
7339
|
}
|
|
7340
7340
|
if (keyLength > maximumBreadth) {
|
|
7341
7341
|
const removedKeys = keyLength - maximumBreadth;
|
|
7342
7342
|
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
|
|
7343
|
-
separator =
|
|
7343
|
+
separator = join21;
|
|
7344
7344
|
}
|
|
7345
7345
|
if (spacer !== "" && separator.length > 1) {
|
|
7346
7346
|
res = `
|
|
@@ -7380,7 +7380,7 @@ ${originalIndentation}`;
|
|
|
7380
7380
|
}
|
|
7381
7381
|
const originalIndentation = indentation;
|
|
7382
7382
|
let res = "";
|
|
7383
|
-
let
|
|
7383
|
+
let join21 = ",";
|
|
7384
7384
|
if (Array.isArray(value)) {
|
|
7385
7385
|
if (value.length === 0) {
|
|
7386
7386
|
return "[]";
|
|
@@ -7393,7 +7393,7 @@ ${originalIndentation}`;
|
|
|
7393
7393
|
indentation += spacer;
|
|
7394
7394
|
res += `
|
|
7395
7395
|
${indentation}`;
|
|
7396
|
-
|
|
7396
|
+
join21 = `,
|
|
7397
7397
|
${indentation}`;
|
|
7398
7398
|
}
|
|
7399
7399
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -7401,13 +7401,13 @@ ${indentation}`;
|
|
|
7401
7401
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
7402
7402
|
const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
7403
7403
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
7404
|
-
res +=
|
|
7404
|
+
res += join21;
|
|
7405
7405
|
}
|
|
7406
7406
|
const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
7407
7407
|
res += tmp !== void 0 ? tmp : "null";
|
|
7408
7408
|
if (value.length - 1 > maximumBreadth) {
|
|
7409
7409
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7410
|
-
res += `${
|
|
7410
|
+
res += `${join21}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7411
7411
|
}
|
|
7412
7412
|
if (spacer !== "") {
|
|
7413
7413
|
res += `
|
|
@@ -7420,7 +7420,7 @@ ${originalIndentation}`;
|
|
|
7420
7420
|
let whitespace = "";
|
|
7421
7421
|
if (spacer !== "") {
|
|
7422
7422
|
indentation += spacer;
|
|
7423
|
-
|
|
7423
|
+
join21 = `,
|
|
7424
7424
|
${indentation}`;
|
|
7425
7425
|
whitespace = " ";
|
|
7426
7426
|
}
|
|
@@ -7429,7 +7429,7 @@ ${indentation}`;
|
|
|
7429
7429
|
const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
|
|
7430
7430
|
if (tmp !== void 0) {
|
|
7431
7431
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
7432
|
-
separator =
|
|
7432
|
+
separator = join21;
|
|
7433
7433
|
}
|
|
7434
7434
|
}
|
|
7435
7435
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -7486,20 +7486,20 @@ ${originalIndentation}`;
|
|
|
7486
7486
|
indentation += spacer;
|
|
7487
7487
|
let res2 = `
|
|
7488
7488
|
${indentation}`;
|
|
7489
|
-
const
|
|
7489
|
+
const join22 = `,
|
|
7490
7490
|
${indentation}`;
|
|
7491
7491
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
7492
7492
|
let i = 0;
|
|
7493
7493
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
7494
7494
|
const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
7495
7495
|
res2 += tmp2 !== void 0 ? tmp2 : "null";
|
|
7496
|
-
res2 +=
|
|
7496
|
+
res2 += join22;
|
|
7497
7497
|
}
|
|
7498
7498
|
const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
7499
7499
|
res2 += tmp !== void 0 ? tmp : "null";
|
|
7500
7500
|
if (value.length - 1 > maximumBreadth) {
|
|
7501
7501
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7502
|
-
res2 += `${
|
|
7502
|
+
res2 += `${join22}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7503
7503
|
}
|
|
7504
7504
|
res2 += `
|
|
7505
7505
|
${originalIndentation}`;
|
|
@@ -7515,16 +7515,16 @@ ${originalIndentation}`;
|
|
|
7515
7515
|
return '"[Object]"';
|
|
7516
7516
|
}
|
|
7517
7517
|
indentation += spacer;
|
|
7518
|
-
const
|
|
7518
|
+
const join21 = `,
|
|
7519
7519
|
${indentation}`;
|
|
7520
7520
|
let res = "";
|
|
7521
7521
|
let separator = "";
|
|
7522
7522
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
7523
7523
|
if (isTypedArrayWithEntries(value)) {
|
|
7524
|
-
res += stringifyTypedArray(value,
|
|
7524
|
+
res += stringifyTypedArray(value, join21, maximumBreadth);
|
|
7525
7525
|
keys = keys.slice(value.length);
|
|
7526
7526
|
maximumPropertiesToStringify -= value.length;
|
|
7527
|
-
separator =
|
|
7527
|
+
separator = join21;
|
|
7528
7528
|
}
|
|
7529
7529
|
if (deterministic) {
|
|
7530
7530
|
keys = sort(keys, comparator);
|
|
@@ -7535,13 +7535,13 @@ ${indentation}`;
|
|
|
7535
7535
|
const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
|
|
7536
7536
|
if (tmp !== void 0) {
|
|
7537
7537
|
res += `${separator}${strEscape(key2)}: ${tmp}`;
|
|
7538
|
-
separator =
|
|
7538
|
+
separator = join21;
|
|
7539
7539
|
}
|
|
7540
7540
|
}
|
|
7541
7541
|
if (keyLength > maximumBreadth) {
|
|
7542
7542
|
const removedKeys = keyLength - maximumBreadth;
|
|
7543
7543
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
7544
|
-
separator =
|
|
7544
|
+
separator = join21;
|
|
7545
7545
|
}
|
|
7546
7546
|
if (separator !== "") {
|
|
7547
7547
|
res = `
|
|
@@ -15429,7 +15429,7 @@ var require_compile = __commonJS({
|
|
|
15429
15429
|
const schOrFunc = root.refs[ref];
|
|
15430
15430
|
if (schOrFunc)
|
|
15431
15431
|
return schOrFunc;
|
|
15432
|
-
let _sch =
|
|
15432
|
+
let _sch = resolve10.call(this, root, ref);
|
|
15433
15433
|
if (_sch === void 0) {
|
|
15434
15434
|
const schema2 = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
|
|
15435
15435
|
const { schemaId } = this.opts;
|
|
@@ -15456,7 +15456,7 @@ var require_compile = __commonJS({
|
|
|
15456
15456
|
function sameSchemaEnv(s1, s2) {
|
|
15457
15457
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
15458
15458
|
}
|
|
15459
|
-
function
|
|
15459
|
+
function resolve10(root, ref) {
|
|
15460
15460
|
let sch;
|
|
15461
15461
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
15462
15462
|
ref = sch;
|
|
@@ -16032,7 +16032,7 @@ var require_fast_uri = __commonJS({
|
|
|
16032
16032
|
}
|
|
16033
16033
|
return uri;
|
|
16034
16034
|
}
|
|
16035
|
-
function
|
|
16035
|
+
function resolve10(baseURI, relativeURI, options) {
|
|
16036
16036
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
16037
16037
|
const resolved = resolveComponent(parse2(baseURI, schemelessOptions), parse2(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
16038
16038
|
schemelessOptions.skipEscape = true;
|
|
@@ -16260,7 +16260,7 @@ var require_fast_uri = __commonJS({
|
|
|
16260
16260
|
var fastUri = {
|
|
16261
16261
|
SCHEMES,
|
|
16262
16262
|
normalize: normalize2,
|
|
16263
|
-
resolve:
|
|
16263
|
+
resolve: resolve10,
|
|
16264
16264
|
resolveComponent,
|
|
16265
16265
|
equal,
|
|
16266
16266
|
serialize,
|
|
@@ -33670,9 +33670,9 @@ var require_light_my_request = __commonJS({
|
|
|
33670
33670
|
const res = new Response(req, callback);
|
|
33671
33671
|
return makeRequest(dispatchFunc, server2, req, res);
|
|
33672
33672
|
} else {
|
|
33673
|
-
return new Promise((
|
|
33673
|
+
return new Promise((resolve10, reject) => {
|
|
33674
33674
|
const req = new RequestConstructor(options);
|
|
33675
|
-
const res = new Response(req,
|
|
33675
|
+
const res = new Response(req, resolve10, reject);
|
|
33676
33676
|
makeRequest(dispatchFunc, server2, req, res);
|
|
33677
33677
|
});
|
|
33678
33678
|
}
|
|
@@ -38573,7 +38573,7 @@ var require_eventemitter2 = __commonJS({
|
|
|
38573
38573
|
var callbacks;
|
|
38574
38574
|
var timer = 0;
|
|
38575
38575
|
var subscriptionClosed;
|
|
38576
|
-
var promise = new Promise2(function(
|
|
38576
|
+
var promise = new Promise2(function(resolve10, reject, onCancel) {
|
|
38577
38577
|
options = resolveOptions(options, {
|
|
38578
38578
|
timeout: 0,
|
|
38579
38579
|
overload: false
|
|
@@ -38598,7 +38598,7 @@ var require_eventemitter2 = __commonJS({
|
|
|
38598
38598
|
}
|
|
38599
38599
|
var _resolve = function(value) {
|
|
38600
38600
|
cleanup();
|
|
38601
|
-
|
|
38601
|
+
resolve10(value);
|
|
38602
38602
|
};
|
|
38603
38603
|
var _reject = function(err) {
|
|
38604
38604
|
cleanup();
|
|
@@ -38915,8 +38915,8 @@ var require_eventemitter2 = __commonJS({
|
|
|
38915
38915
|
var args = arguments;
|
|
38916
38916
|
var context = this;
|
|
38917
38917
|
var event2 = this.event;
|
|
38918
|
-
return promisify6 ? nextTick ? Promise.resolve() : new Promise(function(
|
|
38919
|
-
_setImmediate(
|
|
38918
|
+
return promisify6 ? nextTick ? Promise.resolve() : new Promise(function(resolve10) {
|
|
38919
|
+
_setImmediate(resolve10);
|
|
38920
38920
|
}).then(function() {
|
|
38921
38921
|
context.event = event2;
|
|
38922
38922
|
return _listener.apply(context, args);
|
|
@@ -39516,7 +39516,7 @@ var require_eventemitter2 = __commonJS({
|
|
|
39516
39516
|
filter: functionReducer,
|
|
39517
39517
|
Promise: constructorReducer
|
|
39518
39518
|
});
|
|
39519
|
-
return makeCancelablePromise(options.Promise, function(
|
|
39519
|
+
return makeCancelablePromise(options.Promise, function(resolve10, reject, onCancel) {
|
|
39520
39520
|
function listener() {
|
|
39521
39521
|
var filter = options.filter;
|
|
39522
39522
|
if (filter && !filter.apply(self2, arguments)) {
|
|
@@ -39525,9 +39525,9 @@ var require_eventemitter2 = __commonJS({
|
|
|
39525
39525
|
self2.off(event, listener);
|
|
39526
39526
|
if (options.handleError) {
|
|
39527
39527
|
var err = arguments[0];
|
|
39528
|
-
err ? reject(err) :
|
|
39528
|
+
err ? reject(err) : resolve10(toArray2.apply(null, arguments).slice(1));
|
|
39529
39529
|
} else {
|
|
39530
|
-
|
|
39530
|
+
resolve10(toArray2.apply(null, arguments));
|
|
39531
39531
|
}
|
|
39532
39532
|
}
|
|
39533
39533
|
onCancel(function() {
|
|
@@ -39548,11 +39548,11 @@ var require_eventemitter2 = __commonJS({
|
|
|
39548
39548
|
Promise: constructorReducer
|
|
39549
39549
|
});
|
|
39550
39550
|
var _Promise = options.Promise;
|
|
39551
|
-
return makeCancelablePromise(_Promise, function(
|
|
39551
|
+
return makeCancelablePromise(_Promise, function(resolve10, reject, onCancel) {
|
|
39552
39552
|
var handler;
|
|
39553
39553
|
if (typeof emitter.addEventListener === "function") {
|
|
39554
39554
|
handler = function() {
|
|
39555
|
-
|
|
39555
|
+
resolve10(toArray2.apply(null, arguments));
|
|
39556
39556
|
};
|
|
39557
39557
|
onCancel(function() {
|
|
39558
39558
|
emitter.removeEventListener(name, handler);
|
|
@@ -39566,7 +39566,7 @@ var require_eventemitter2 = __commonJS({
|
|
|
39566
39566
|
}
|
|
39567
39567
|
var eventListener = function() {
|
|
39568
39568
|
errorListener && emitter.removeListener("error", errorListener);
|
|
39569
|
-
|
|
39569
|
+
resolve10(toArray2.apply(null, arguments));
|
|
39570
39570
|
};
|
|
39571
39571
|
var errorListener;
|
|
39572
39572
|
if (name !== "error") {
|
|
@@ -49639,14 +49639,14 @@ var init_open = __esm({
|
|
|
49639
49639
|
}
|
|
49640
49640
|
const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);
|
|
49641
49641
|
if (options.wait) {
|
|
49642
|
-
return new Promise((
|
|
49642
|
+
return new Promise((resolve10, reject) => {
|
|
49643
49643
|
subprocess.once("error", reject);
|
|
49644
49644
|
subprocess.once("close", (exitCode) => {
|
|
49645
49645
|
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
49646
49646
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
49647
49647
|
return;
|
|
49648
49648
|
}
|
|
49649
|
-
|
|
49649
|
+
resolve10(subprocess);
|
|
49650
49650
|
});
|
|
49651
49651
|
});
|
|
49652
49652
|
}
|
|
@@ -49894,11 +49894,83 @@ function migrateConfigV1ToV2(raw) {
|
|
|
49894
49894
|
}
|
|
49895
49895
|
return v2;
|
|
49896
49896
|
}
|
|
49897
|
+
function loadDotEnv(dir2) {
|
|
49898
|
+
const envPath = path.join(dir2, ".env");
|
|
49899
|
+
let content;
|
|
49900
|
+
try {
|
|
49901
|
+
content = fs.readFileSync(envPath, "utf-8");
|
|
49902
|
+
} catch {
|
|
49903
|
+
return;
|
|
49904
|
+
}
|
|
49905
|
+
for (const line of content.split("\n")) {
|
|
49906
|
+
const trimmed = line.trim();
|
|
49907
|
+
if (!trimmed || trimmed.startsWith("#"))
|
|
49908
|
+
continue;
|
|
49909
|
+
const eqIdx = trimmed.indexOf("=");
|
|
49910
|
+
if (eqIdx < 1)
|
|
49911
|
+
continue;
|
|
49912
|
+
const key = trimmed.slice(0, eqIdx).trim();
|
|
49913
|
+
let val = trimmed.slice(eqIdx + 1).trim();
|
|
49914
|
+
if (val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'")) {
|
|
49915
|
+
val = val.slice(1, -1);
|
|
49916
|
+
}
|
|
49917
|
+
if (process.env[key] === void 0) {
|
|
49918
|
+
process.env[key] = val;
|
|
49919
|
+
}
|
|
49920
|
+
}
|
|
49921
|
+
}
|
|
49922
|
+
function resolveConfigEnvVars(node, configFileName, nodePath = "") {
|
|
49923
|
+
if (typeof node === "string") {
|
|
49924
|
+
return node.replace(/\$\{([^}]+)\}/g, (_match, varName) => {
|
|
49925
|
+
const envValue = process.env[varName];
|
|
49926
|
+
if (envValue === void 0) {
|
|
49927
|
+
throw new Error(
|
|
49928
|
+
`missing ${varName} in ${configFileName}: ${nodePath} "${node}"`
|
|
49929
|
+
);
|
|
49930
|
+
}
|
|
49931
|
+
return envValue;
|
|
49932
|
+
});
|
|
49933
|
+
}
|
|
49934
|
+
if (Array.isArray(node)) {
|
|
49935
|
+
for (let i = 0; i < node.length; i++) {
|
|
49936
|
+
node[i] = resolveConfigEnvVars(node[i], configFileName, `${nodePath}[${i}]`);
|
|
49937
|
+
}
|
|
49938
|
+
return node;
|
|
49939
|
+
}
|
|
49940
|
+
if (node !== null && typeof node === "object") {
|
|
49941
|
+
const obj = node;
|
|
49942
|
+
for (const key of Object.keys(obj)) {
|
|
49943
|
+
const jsonKey = /[^a-zA-Z0-9_]/.test(key) ? `"${key}"` : key;
|
|
49944
|
+
const childPath = nodePath ? `${nodePath}.${jsonKey}` : `.${jsonKey}`;
|
|
49945
|
+
obj[key] = resolveConfigEnvVars(obj[key], configFileName, childPath);
|
|
49946
|
+
}
|
|
49947
|
+
return obj;
|
|
49948
|
+
}
|
|
49949
|
+
return node;
|
|
49950
|
+
}
|
|
49897
49951
|
function readConfig(workspaceRoot2) {
|
|
49898
49952
|
const filePath = configPath(workspaceRoot2);
|
|
49899
49953
|
const defaults = { ...DEFAULT_CONFIG, boards: { default: { ...DEFAULT_BOARD_CONFIG, columns: [...DEFAULT_COLUMNS] } } };
|
|
49954
|
+
let raw;
|
|
49955
|
+
try {
|
|
49956
|
+
raw = JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
|
49957
|
+
} catch {
|
|
49958
|
+
return defaults;
|
|
49959
|
+
}
|
|
49960
|
+
loadDotEnv(workspaceRoot2);
|
|
49961
|
+
try {
|
|
49962
|
+
resolveConfigEnvVars(raw, CONFIG_FILENAME);
|
|
49963
|
+
} catch (err) {
|
|
49964
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
49965
|
+
process.stderr.write(`
|
|
49966
|
+
Configuration error: ${msg}
|
|
49967
|
+
|
|
49968
|
+
Set the missing environment variable before starting the server.
|
|
49969
|
+
|
|
49970
|
+
`);
|
|
49971
|
+
process.exit(1);
|
|
49972
|
+
}
|
|
49900
49973
|
try {
|
|
49901
|
-
const raw = JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
|
49902
49974
|
const isV1 = raw.version === 1 || !raw.version && !(typeof raw.boards === "object" && raw.boards !== null && !Array.isArray(raw.boards));
|
|
49903
49975
|
if (isV1) {
|
|
49904
49976
|
const v2 = migrateConfigV1ToV2(raw);
|
|
@@ -55238,7 +55310,7 @@ var NodeFsHandler = class {
|
|
|
55238
55310
|
this._addToNodeFs(path23, initialAdd, wh, depth + 1);
|
|
55239
55311
|
}
|
|
55240
55312
|
}).on(EV.ERROR, this._boundHandleError);
|
|
55241
|
-
return new Promise((
|
|
55313
|
+
return new Promise((resolve10, reject) => {
|
|
55242
55314
|
if (!stream)
|
|
55243
55315
|
return reject();
|
|
55244
55316
|
stream.once(STR_END, () => {
|
|
@@ -55247,7 +55319,7 @@ var NodeFsHandler = class {
|
|
|
55247
55319
|
return;
|
|
55248
55320
|
}
|
|
55249
55321
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
55250
|
-
|
|
55322
|
+
resolve10(void 0);
|
|
55251
55323
|
previous.getChildren().filter((item) => {
|
|
55252
55324
|
return item !== directory && !current.has(item);
|
|
55253
55325
|
}).forEach((item) => {
|
|
@@ -56338,6 +56410,13 @@ function setupWatcher(ctx, server2) {
|
|
|
56338
56410
|
ctx.wss.close();
|
|
56339
56411
|
});
|
|
56340
56412
|
}
|
|
56413
|
+
const configFilePath = path7.join(ctx.workspaceRoot, ".kanban.json");
|
|
56414
|
+
const configWatcher = esm_default.watch(configFilePath, {
|
|
56415
|
+
ignoreInitial: true,
|
|
56416
|
+
awaitWriteFinish: { stabilityThreshold: 100 }
|
|
56417
|
+
});
|
|
56418
|
+
configWatcher.on("change", () => handleFileChange(ctx, debounceRef));
|
|
56419
|
+
server2.on("close", () => configWatcher.close());
|
|
56341
56420
|
}
|
|
56342
56421
|
|
|
56343
56422
|
// src/standalone/httpUtils.ts
|
|
@@ -56368,13 +56447,13 @@ function readBody(req) {
|
|
|
56368
56447
|
return Promise.reject(err);
|
|
56369
56448
|
}
|
|
56370
56449
|
}
|
|
56371
|
-
return new Promise((
|
|
56450
|
+
return new Promise((resolve10, reject) => {
|
|
56372
56451
|
const chunks = [];
|
|
56373
56452
|
req.on("data", (chunk) => chunks.push(chunk));
|
|
56374
56453
|
req.on("end", () => {
|
|
56375
56454
|
try {
|
|
56376
56455
|
const text = Buffer.concat(chunks).toString("utf-8");
|
|
56377
|
-
|
|
56456
|
+
resolve10(text ? JSON.parse(text) : {});
|
|
56378
56457
|
} catch (err) {
|
|
56379
56458
|
reject(err);
|
|
56380
56459
|
}
|
|
@@ -56694,7 +56773,7 @@ var EventBus = class {
|
|
|
56694
56773
|
* Wildcard patterns are supported.
|
|
56695
56774
|
*/
|
|
56696
56775
|
waitFor(event, options) {
|
|
56697
|
-
return new Promise((
|
|
56776
|
+
return new Promise((resolve10, reject) => {
|
|
56698
56777
|
let timer;
|
|
56699
56778
|
const unsubscribe = this.on(event, (payload) => {
|
|
56700
56779
|
try {
|
|
@@ -56703,7 +56782,7 @@ var EventBus = class {
|
|
|
56703
56782
|
if (timer)
|
|
56704
56783
|
clearTimeout(timer);
|
|
56705
56784
|
unsubscribe();
|
|
56706
|
-
|
|
56785
|
+
resolve10(payload);
|
|
56707
56786
|
} catch (error) {
|
|
56708
56787
|
if (timer)
|
|
56709
56788
|
clearTimeout(timer);
|
|
@@ -56928,7 +57007,7 @@ function resolveAuthIdentityPlugin(ref) {
|
|
|
56928
57007
|
if (ref.provider === "rbac")
|
|
56929
57008
|
return RBAC_IDENTITY_PLUGIN;
|
|
56930
57009
|
const packageName = AUTH_PROVIDER_ALIASES.get(ref.provider) ?? ref.provider;
|
|
56931
|
-
return loadExternalAuthIdentityPlugin(packageName, ref.provider);
|
|
57010
|
+
return loadExternalAuthIdentityPlugin(packageName, ref.provider, ref.options);
|
|
56932
57011
|
}
|
|
56933
57012
|
function resolveAuthPolicyPlugin(ref) {
|
|
56934
57013
|
if (ref.provider === "noop")
|
|
@@ -57154,8 +57233,13 @@ function selectAuthPolicyPlugin(mod, providerId) {
|
|
|
57154
57233
|
return direct;
|
|
57155
57234
|
return null;
|
|
57156
57235
|
}
|
|
57157
|
-
function loadExternalAuthIdentityPlugin(packageName, providerId) {
|
|
57236
|
+
function loadExternalAuthIdentityPlugin(packageName, providerId, options) {
|
|
57158
57237
|
const mod = loadExternalModule(packageName);
|
|
57238
|
+
if (options !== void 0 && typeof mod.createAuthIdentityPlugin === "function") {
|
|
57239
|
+
const created = mod.createAuthIdentityPlugin(options);
|
|
57240
|
+
if (isValidAuthIdentityPlugin(created, providerId))
|
|
57241
|
+
return created;
|
|
57242
|
+
}
|
|
57159
57243
|
const plugin = selectAuthIdentityPlugin(mod, providerId);
|
|
57160
57244
|
if (!plugin) {
|
|
57161
57245
|
throw new Error(
|
|
@@ -60158,29 +60242,10 @@ async function updateCard(ctx, { cardId, updates, boardId }) {
|
|
|
60158
60242
|
return card;
|
|
60159
60243
|
}
|
|
60160
60244
|
async function triggerAction(ctx, { cardId, action, boardId }) {
|
|
60161
|
-
const config = readConfig(ctx.workspaceRoot);
|
|
60162
|
-
const { actionWebhookUrl } = config;
|
|
60163
|
-
if (!actionWebhookUrl) {
|
|
60164
|
-
throw new Error("No action webhook URL configured. Set actionWebhookUrl in .kanban.json");
|
|
60165
|
-
}
|
|
60166
60245
|
const card = await getCard(ctx, { cardId, boardId });
|
|
60167
60246
|
if (!card)
|
|
60168
60247
|
throw new Error(`Card not found: ${cardId}`);
|
|
60169
60248
|
const resolvedBoardId = card.boardId || ctx._resolveBoardId(boardId);
|
|
60170
|
-
const payload = {
|
|
60171
|
-
action,
|
|
60172
|
-
board: resolvedBoardId,
|
|
60173
|
-
list: card.status,
|
|
60174
|
-
card: sanitizeCard(card)
|
|
60175
|
-
};
|
|
60176
|
-
const response = await fetch(actionWebhookUrl, {
|
|
60177
|
-
method: "POST",
|
|
60178
|
-
headers: { "Content-Type": "application/json" },
|
|
60179
|
-
body: JSON.stringify(payload)
|
|
60180
|
-
});
|
|
60181
|
-
if (!response.ok) {
|
|
60182
|
-
throw new Error(`Action webhook responded with ${response.status}: ${response.statusText}`);
|
|
60183
|
-
}
|
|
60184
60249
|
await appendActivityLog(ctx, {
|
|
60185
60250
|
cardId,
|
|
60186
60251
|
boardId: resolvedBoardId,
|
|
@@ -60191,6 +60256,12 @@ async function triggerAction(ctx, { cardId, action, boardId }) {
|
|
|
60191
60256
|
}
|
|
60192
60257
|
}).catch(() => {
|
|
60193
60258
|
});
|
|
60259
|
+
return {
|
|
60260
|
+
action,
|
|
60261
|
+
board: resolvedBoardId,
|
|
60262
|
+
list: card.status,
|
|
60263
|
+
card: sanitizeCard(card)
|
|
60264
|
+
};
|
|
60194
60265
|
}
|
|
60195
60266
|
async function submitForm(ctx, input) {
|
|
60196
60267
|
const card = await getCard(ctx, { cardId: input.cardId, boardId: input.boardId });
|
|
@@ -62073,21 +62144,17 @@ var KanbanSDK = class _KanbanSDK {
|
|
|
62073
62144
|
return result;
|
|
62074
62145
|
}
|
|
62075
62146
|
/**
|
|
62076
|
-
* Triggers a named action for a card
|
|
62077
|
-
* configured in `.kanban.json`.
|
|
62147
|
+
* Triggers a named action for a card.
|
|
62078
62148
|
*
|
|
62079
|
-
*
|
|
62080
|
-
*
|
|
62081
|
-
*
|
|
62082
|
-
* ```
|
|
62149
|
+
* Validates the card, appends an activity log entry, and emits the
|
|
62150
|
+
* `card.action.triggered` after-event so registered webhooks receive
|
|
62151
|
+
* the action payload automatically.
|
|
62083
62152
|
*
|
|
62084
62153
|
* @param cardId - The ID of the card to trigger the action for.
|
|
62085
62154
|
* @param action - The action name string (e.g. `'retry'`, `'sendEmail'`).
|
|
62086
62155
|
* @param boardId - Optional board ID. Defaults to the workspace's default board.
|
|
62087
|
-
* @returns A promise
|
|
62088
|
-
* @throws {Error} If no `actionWebhookUrl` is configured in `.kanban.json`.
|
|
62156
|
+
* @returns A promise that resolves when the action has been processed.
|
|
62089
62157
|
* @throws {Error} If the card is not found.
|
|
62090
|
-
* @throws {Error} If the webhook responds with a non-2xx status.
|
|
62091
62158
|
*
|
|
62092
62159
|
* @example
|
|
62093
62160
|
* ```ts
|
|
@@ -62097,7 +62164,8 @@ var KanbanSDK = class _KanbanSDK {
|
|
|
62097
62164
|
*/
|
|
62098
62165
|
async triggerAction(cardId, action, boardId) {
|
|
62099
62166
|
const mergedInput = await this._runBeforeEvent("card.action.trigger", { cardId, action, boardId }, void 0, boardId);
|
|
62100
|
-
|
|
62167
|
+
const payload = await triggerAction(this, mergedInput);
|
|
62168
|
+
this._runAfterEvent("card.action.triggered", payload, void 0, payload.board);
|
|
62101
62169
|
}
|
|
62102
62170
|
/**
|
|
62103
62171
|
* Moves a card to a different status column and/or position within that column.
|
|
@@ -63066,20 +63134,24 @@ var KanbanSDK = class _KanbanSDK {
|
|
|
63066
63134
|
};
|
|
63067
63135
|
|
|
63068
63136
|
// src/standalone/internal/runtime.ts
|
|
63069
|
-
|
|
63137
|
+
function getIndexHtml(basePath = "") {
|
|
63138
|
+
return `<!DOCTYPE html>
|
|
63070
63139
|
<html lang="en">
|
|
63071
63140
|
<head>
|
|
63072
63141
|
<meta charset="UTF-8">
|
|
63073
63142
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
63074
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
63075
|
-
<link href="/style.css" rel="stylesheet">
|
|
63143
|
+
<link rel="icon" type="image/svg+xml" href="${basePath}/favicon.svg">
|
|
63144
|
+
<link href="${basePath}/style.css" rel="stylesheet">
|
|
63076
63145
|
<title>Kanban Board</title>
|
|
63146
|
+
<script>window.__KB_BASE__ = ${JSON.stringify(basePath)}</script>
|
|
63077
63147
|
</head>
|
|
63078
63148
|
<body>
|
|
63079
63149
|
<div id="root"></div>
|
|
63080
|
-
<script type="module" src="/index.js"></script>
|
|
63150
|
+
<script type="module" src="${basePath}/index.js"></script>
|
|
63081
63151
|
</body>
|
|
63082
63152
|
</html>`;
|
|
63153
|
+
}
|
|
63154
|
+
var indexHtml = getIndexHtml();
|
|
63083
63155
|
function resolveStandaloneWebviewDir(webviewDir) {
|
|
63084
63156
|
if (webviewDir)
|
|
63085
63157
|
return webviewDir;
|
|
@@ -63093,12 +63165,12 @@ function resolveStandaloneWebviewDir(webviewDir) {
|
|
|
63093
63165
|
}
|
|
63094
63166
|
return candidates[0];
|
|
63095
63167
|
}
|
|
63096
|
-
function createStandaloneRuntime(kanbanDir, webviewDir, httpServer) {
|
|
63168
|
+
function createStandaloneRuntime(kanbanDir, webviewDir, httpServer, basePath) {
|
|
63097
63169
|
const absoluteKanbanDir = path18.resolve(kanbanDir);
|
|
63098
63170
|
const workspaceRoot2 = path18.dirname(absoluteKanbanDir);
|
|
63099
63171
|
const resolvedWebviewDir = resolveStandaloneWebviewDir(webviewDir);
|
|
63100
63172
|
const server2 = httpServer ?? http.createServer();
|
|
63101
|
-
const wss = new import_websocket_server.default({ server: server2, path: "/ws" });
|
|
63173
|
+
const wss = new import_websocket_server.default({ server: server2, path: (basePath || "") + "/ws" });
|
|
63102
63174
|
const ctx = {};
|
|
63103
63175
|
const sdk = new KanbanSDK(absoluteKanbanDir, {
|
|
63104
63176
|
onEvent: (event, data) => {
|
|
@@ -65118,6 +65190,7 @@ async function handleMessage(ctx, ws, message, authContext) {
|
|
|
65118
65190
|
const updatedCard = ctx.cards.find((card) => card.id === cardId);
|
|
65119
65191
|
if (updatedCard) {
|
|
65120
65192
|
await broadcastCardContentToEditingClients(ctx, updatedCard);
|
|
65193
|
+
await broadcastLogsUpdatedToEditingClients(ctx, cardId);
|
|
65121
65194
|
}
|
|
65122
65195
|
ws.send(JSON.stringify({ type: "actionResult", callbackKey }));
|
|
65123
65196
|
} catch (err) {
|
|
@@ -65331,7 +65404,7 @@ function collectStandaloneHttpHandlers(requestType, ctx) {
|
|
|
65331
65404
|
return handlers ? [...handlers] : [];
|
|
65332
65405
|
});
|
|
65333
65406
|
}
|
|
65334
|
-
function createRequestContext(ctx, req, res, resolvedWebviewDir) {
|
|
65407
|
+
function createRequestContext(ctx, req, res, resolvedWebviewDir, resolvedIndexHtml) {
|
|
65335
65408
|
const url = new URL(req.url || "/", `http://${req.headers.host}`);
|
|
65336
65409
|
const pathname = url.pathname;
|
|
65337
65410
|
const method = req.method || "GET";
|
|
@@ -65346,7 +65419,7 @@ function createRequestContext(ctx, req, res, resolvedWebviewDir) {
|
|
|
65346
65419
|
pathname,
|
|
65347
65420
|
method,
|
|
65348
65421
|
resolvedWebviewDir,
|
|
65349
|
-
indexHtml,
|
|
65422
|
+
indexHtml: resolvedIndexHtml,
|
|
65350
65423
|
route: createRouteMatcher(method, pathname, matchRoute),
|
|
65351
65424
|
isApiRequest: isApiRequestPath(pathname),
|
|
65352
65425
|
isPageRequest: isPageRequest(method, pathname),
|
|
@@ -65371,16 +65444,33 @@ function startServer(kanbanDir, port2, webviewDir, resolvedConfigPath) {
|
|
|
65371
65444
|
const swaggerUiStaticDir = resolveSwaggerUiStaticDir();
|
|
65372
65445
|
const swaggerUiLogoPath = swaggerUiStaticDir ? path20.join(swaggerUiStaticDir, "logo.svg") : void 0;
|
|
65373
65446
|
const swaggerUiLogo = swaggerUiLogoPath && fs15.existsSync(swaggerUiLogoPath) ? { type: "image/svg+xml", content: fs15.readFileSync(swaggerUiLogoPath) } : null;
|
|
65374
|
-
const
|
|
65447
|
+
const workspaceRoot2 = path20.dirname(path20.resolve(kanbanDir));
|
|
65448
|
+
const config = readConfig(workspaceRoot2);
|
|
65449
|
+
const rawBase = config.basePath ?? "";
|
|
65450
|
+
const basePath = rawBase ? (rawBase.startsWith("/") ? rawBase : "/" + rawBase).replace(/\/+$/, "") : "";
|
|
65451
|
+
const runtime = createStandaloneRuntime(kanbanDir, webviewDir, fastify.server, basePath);
|
|
65375
65452
|
const { ctx, resolvedWebviewDir } = runtime;
|
|
65453
|
+
let resolvedIndexHtml = getIndexHtml(basePath);
|
|
65454
|
+
let customHead = config.customHeadHtml || "";
|
|
65455
|
+
if (config.customHeadHtmlFile) {
|
|
65456
|
+
try {
|
|
65457
|
+
const filePath = path20.resolve(ctx.workspaceRoot, config.customHeadHtmlFile);
|
|
65458
|
+
customHead = fs15.readFileSync(filePath, "utf-8");
|
|
65459
|
+
} catch {
|
|
65460
|
+
}
|
|
65461
|
+
}
|
|
65462
|
+
if (customHead) {
|
|
65463
|
+
resolvedIndexHtml = resolvedIndexHtml.replace("</head>", `${customHead}
|
|
65464
|
+
</head>`);
|
|
65465
|
+
}
|
|
65376
65466
|
const standaloneHttpPlugins = ctx.sdk.capabilities?.standaloneHttpPlugins ?? [];
|
|
65377
65467
|
const standaloneOpenApiSpec = buildStandaloneOpenApiSpec(standaloneHttpPlugins);
|
|
65378
65468
|
fastify.register(import_swagger.default, { openapi: standaloneOpenApiSpec });
|
|
65379
65469
|
fastify.register(import_swagger_ui.default, {
|
|
65380
|
-
routePrefix:
|
|
65470
|
+
routePrefix: `${basePath}/api/docs`,
|
|
65381
65471
|
uiConfig: { docExpansion: "list", deepLinking: false },
|
|
65382
|
-
|
|
65383
|
-
...
|
|
65472
|
+
logo: swaggerUiLogo,
|
|
65473
|
+
...swaggerUiStaticDir ? { baseDir: swaggerUiStaticDir } : {}
|
|
65384
65474
|
});
|
|
65385
65475
|
fastify.removeAllContentTypeParsers();
|
|
65386
65476
|
fastify.addContentTypeParser("*", { parseAs: "buffer" }, (_req, body, done) => {
|
|
@@ -65409,7 +65499,15 @@ function startServer(kanbanDir, port2, webviewDir, resolvedConfigPath) {
|
|
|
65409
65499
|
if (request.body instanceof Buffer && request.body.length > 0) {
|
|
65410
65500
|
req._rawBody = request.body;
|
|
65411
65501
|
}
|
|
65412
|
-
|
|
65502
|
+
if (basePath) {
|
|
65503
|
+
const rawUrl = req.url ?? "/";
|
|
65504
|
+
if (rawUrl === basePath) {
|
|
65505
|
+
req.url = "/";
|
|
65506
|
+
} else if (rawUrl.startsWith(basePath + "/") || rawUrl.startsWith(basePath + "?")) {
|
|
65507
|
+
req.url = rawUrl.slice(basePath.length);
|
|
65508
|
+
}
|
|
65509
|
+
}
|
|
65510
|
+
const requestContext = createRequestContext(ctx, req, reply.raw, resolvedWebviewDir, resolvedIndexHtml);
|
|
65413
65511
|
await dispatchRequest(requestContext, middlewareHandlers);
|
|
65414
65512
|
if (!reply.sent && !reply.raw.writableEnded) {
|
|
65415
65513
|
await dispatchRequest(requestContext, handlers);
|
|
@@ -65424,7 +65522,7 @@ function startServer(kanbanDir, port2, webviewDir, resolvedConfigPath) {
|
|
|
65424
65522
|
console.error("Failed to start server:", err);
|
|
65425
65523
|
process.exit(1);
|
|
65426
65524
|
}
|
|
65427
|
-
console.log(`Kanban board running at http://localhost:${port2}`);
|
|
65525
|
+
console.log(`Kanban board running at http://localhost:${port2}${basePath}`);
|
|
65428
65526
|
console.log(`API available at http://localhost:${port2}/api`);
|
|
65429
65527
|
console.log(`Kanban config: ${effectiveConfigPath}`);
|
|
65430
65528
|
console.log(`Kanban directory: ${ctx.absoluteKanbanDir}`);
|