kanban-lite 1.0.44 → 1.0.45
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/extension.js
CHANGED
|
@@ -14815,6 +14815,9 @@ var KanbanPanel = class _KanbanPanel {
|
|
|
14815
14815
|
static {
|
|
14816
14816
|
this.viewType = "kanban-lite.panel";
|
|
14817
14817
|
}
|
|
14818
|
+
static {
|
|
14819
|
+
this.serverPort = 2954;
|
|
14820
|
+
}
|
|
14818
14821
|
static createOrShow(extensionUri, context) {
|
|
14819
14822
|
const column = vscode.window.activeTextEditor ? vscode.window.activeTextEditor.viewColumn : void 0;
|
|
14820
14823
|
if (_KanbanPanel.currentPanel) {
|
|
@@ -14924,8 +14927,7 @@ var KanbanPanel = class _KanbanPanel {
|
|
|
14924
14927
|
this._panel.webview.html = this._getHtmlForWebview(this._panel.webview);
|
|
14925
14928
|
}
|
|
14926
14929
|
_getHtmlForWebview(_webview) {
|
|
14927
|
-
const
|
|
14928
|
-
const port = root ? readConfig(root).port : 2954;
|
|
14930
|
+
const port = _KanbanPanel.serverPort;
|
|
14929
14931
|
const base = `http://localhost:${port}`;
|
|
14930
14932
|
const nonce = this._getNonce();
|
|
14931
14933
|
return `<!DOCTYPE html>
|
|
@@ -16092,7 +16094,8 @@ function activate(context) {
|
|
|
16092
16094
|
const kanbanConfig = readConfig(root);
|
|
16093
16095
|
const kanbanDir = path16.join(root, kanbanConfig.kanbanDirectory);
|
|
16094
16096
|
const webviewDir = path16.join(context.extensionPath, "dist", "standalone-webview");
|
|
16095
|
-
findFreePort(
|
|
16097
|
+
findFreePort(kanbanConfig.port).then((port) => {
|
|
16098
|
+
KanbanPanel.serverPort = port;
|
|
16096
16099
|
standaloneServer = startServer(kanbanDir, port, webviewDir);
|
|
16097
16100
|
standaloneServer.on("error", () => {
|
|
16098
16101
|
standaloneServer = void 0;
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ interface CreateCardData {
|
|
|
23
23
|
export class KanbanPanel {
|
|
24
24
|
public static readonly viewType = 'kanban-lite.panel'
|
|
25
25
|
public static currentPanel: KanbanPanel | undefined
|
|
26
|
+
public static serverPort: number = 2954
|
|
26
27
|
|
|
27
28
|
private readonly _panel: vscode.WebviewPanel
|
|
28
29
|
private readonly _extensionUri: vscode.Uri
|
|
@@ -489,9 +490,7 @@ export class KanbanPanel {
|
|
|
489
490
|
}
|
|
490
491
|
|
|
491
492
|
private _getHtmlForWebview(_webview: vscode.Webview): string {
|
|
492
|
-
|
|
493
|
-
const root = this._getWorkspaceRoot()
|
|
494
|
-
const port = root ? readConfig(root).port : 2954
|
|
493
|
+
const port = KanbanPanel.serverPort
|
|
495
494
|
const base = `http://localhost:${port}`
|
|
496
495
|
|
|
497
496
|
const nonce = this._getNonce()
|
package/src/extension/index.ts
CHANGED
|
@@ -116,7 +116,8 @@ export function activate(context: vscode.ExtensionContext) {
|
|
|
116
116
|
const kanbanDir = path.join(root, kanbanConfig.kanbanDirectory)
|
|
117
117
|
const webviewDir = path.join(context.extensionPath, 'dist', 'standalone-webview')
|
|
118
118
|
|
|
119
|
-
findFreePort(
|
|
119
|
+
findFreePort(kanbanConfig.port).then(port => {
|
|
120
|
+
KanbanPanel.serverPort = port
|
|
120
121
|
standaloneServer = startServer(kanbanDir, port, webviewDir)
|
|
121
122
|
standaloneServer.on('error', () => {
|
|
122
123
|
standaloneServer = undefined
|