From 0791f6a148eb1bce1b1abf54fc014c25acf875e3 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 4 Jan 2025 21:26:52 -0700 Subject: [PATCH] Cleanup and initial publish --- .vscodeignore | 2 ++ LICENSE | 7 +++++++ package-lock.json | 5 +++-- package.json | 9 +++++++-- webview/mock.ts | 9 +++++---- 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 LICENSE diff --git a/.vscodeignore b/.vscodeignore index 46597d2..7167422 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -4,6 +4,7 @@ out/** node_modules/** src/** webview/** +shared/** .gitignore .yarnrc rsbuild.config.ts @@ -12,3 +13,4 @@ rsbuild.config.ts **/*.map **/*.ts **/.vscode-test.* +.env* diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cb2d630 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2025 @encounter + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/package-lock.json b/package-lock.json index ccf71ec..3ad09e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,13 @@ { "name": "objdiff", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "objdiff", - "version": "0.0.1", + "version": "0.0.2", + "license": "MIT", "dependencies": { "@protobuf-ts/runtime": "^2.9.4", "@vscode/codicons": "^0.0.36", diff --git a/package.json b/package.json index ed1f6ae..5afe44b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,12 @@ "displayName": "objdiff", "description": "objdiff", "publisher": "decomp-dev", - "version": "0.0.1", + "version": "0.0.2", + "repository": { + "type": "git", + "url": "https://github.com/encounter/objdiff-code" + }, + "license": "MIT", "scripts": { "build": "rsbuild build", "watch": "rsbuild build -w --env-mode watch", @@ -54,7 +59,7 @@ "Other" ], "activationEvents": [ - "*" + "onWebviewPanel:objdiff" ], "contributes": { "commands": [ diff --git a/webview/mock.ts b/webview/mock.ts index d06b45e..904e683 100644 --- a/webview/mock.ts +++ b/webview/mock.ts @@ -1,5 +1,4 @@ -import projectConfig from '../../prime/objdiff.json'; -import { resolveProjectConfig } from '../shared/config'; +import { type ProjectConfig, resolveProjectConfig } from '../shared/config'; import type { InboundMessage, OutboundMessage } from '../shared/messages'; import type { AppStateSerialized, MyWebviewApi } from './state'; @@ -23,12 +22,14 @@ async function delay(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); } -const resolvedProjectConfig = resolveProjectConfig(projectConfig); +let resolvedProjectConfig: ProjectConfig | null = null; async function handleMessage(msg: OutboundMessage): Promise { switch (msg.type) { case 'ready': { - await delay(0); + const response = await fetch('/api/project'); + const projectConfig = await response.json(); + resolvedProjectConfig = resolveProjectConfig(projectConfig); sendMessage({ type: 'state', buildRunning: false,