Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ParadoxPM.Extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
1 change: 1 addition & 0 deletions src/ParadoxPM.Extension/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
8 changes: 8 additions & 0 deletions src/ParadoxPM.Extension/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"vue.volar"
]
}
22 changes: 22 additions & 0 deletions src/ParadoxPM.Extension/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/extension/*.js"],
"preLaunchTask": "pnpm: dev",

},
{
"name": "Preview Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/extension/*.js"],
"preLaunchTask": "pnpm: build"
}
]
}
13 changes: 13 additions & 0 deletions src/ParadoxPM.Extension/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
47 changes: 47 additions & 0 deletions src/ParadoxPM.Extension/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"command": "pnpm",
"args": ["run", "dev"],
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^([a-zA-Z]\\:/?([\\w\\-]/?)+\\.\\w+):(\\d+):(\\d+): (ERROR|WARNING)\\: (.*)$",
"file": 1,
"line": 3,
"column": 4,
"code": 5,
"message": 6
},
"background": {
"activeOnStart": true,
"beginsPattern": "^.*extension build start*$",
"endsPattern": "^.*extension (build|rebuild) success.*$"
}
},
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
},
"label": "pnpm: dev"
},
{
"type": "shell",
"command": "pnpm",
"args": ["run", "build"],
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": [],
"label": "pnpm: build"
}
]
}
14 changes: 14 additions & 0 deletions src/ParadoxPM.Extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.vscode/**
.vscode-test/**
out/**
node_modules/**
src/**
.gitignore
.yarnrc
esbuild.js
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*
Empty file.
71 changes: 71 additions & 0 deletions src/ParadoxPM.Extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# ParadoxPM-Server README

This is the README for your extension "ParadoxPM-Server". After writing up a brief description, we recommend including the following sections.

## Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

\!\[feature X\]\(images/feature-x.png\)

> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.

## Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

## Extension Settings

Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.

For example:

This extension contributes the following settings:

* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.

## Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of ...

### 1.0.1

Fixed issue #.

### 1.1.0

Added features X, Y, and Z.

---

## Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)

## Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.

## For more information

* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)

**Enjoy!**
28 changes: 28 additions & 0 deletions src/ParadoxPM.Extension/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";

export default [{
Copy link

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint configuration targets only .ts files; consider adding rules or overrides for .vue files to ensure consistent linting across components.

Copilot uses AI. Check for mistakes.
files: ["**/*.ts"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: "module",
},

rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],

curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
},
}];
12 changes: 12 additions & 0 deletions src/ParadoxPM.Extension/extension/WebviewHelpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { ExtensionContext, Webview } from "vscode";

export class WebviewHelpers {
static getHtml(webview: Webview, context: ExtensionContext, input: string) {
return __getWebviewHtml__({
serverUrl: `${process.env.VITE_DEV_SERVER_URL}src/html/${input}.html`,
webview,
context,
inputName: input,
});
}
}
1 change: 1 addition & 0 deletions src/ParadoxPM.Extension/extension/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="@tomjs/vite-plugin-vscode/env" />
14 changes: 14 additions & 0 deletions src/ParadoxPM.Extension/extension/extension.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as vscode from "vscode";
import { PackagesManagerViewProvider } from "./packagesManagerViewProvider.js";

export function activate(context: vscode.ExtensionContext) {
console.log('Congratulations, your extension "ParadoxPM-Server" is now active!');

const provider = new PackagesManagerViewProvider(context);

context.subscriptions.push(
vscode.window.registerWebviewViewProvider(PackagesManagerViewProvider.viewType, provider)
);
}

export function deactivate() {}
30 changes: 30 additions & 0 deletions src/ParadoxPM.Extension/extension/packagesManagerViewProvider.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as vscode from "vscode";
import { WebviewHelpers } from "./WebviewHelpers.js";

export class PackagesManagerViewProvider implements vscode.WebviewViewProvider {
public static readonly viewType = "packages-manager";

private _view?: vscode.WebviewView;
private _context: vscode.ExtensionContext;

public constructor(context: vscode.ExtensionContext) {
this._context = context;
}

resolveWebviewView(
webviewView: vscode.WebviewView,
context: vscode.WebviewViewResolveContext,
token: vscode.CancellationToken
): Thenable<void> | void {
webviewView.webview.options = {
enableScripts: true,
};
this._view = webviewView;

webviewView.webview.html = WebviewHelpers.getHtml(
webviewView.webview,
this._context,
"packageManager"
);
}
}
74 changes: 74 additions & 0 deletions src/ParadoxPM.Extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "paradoxpm",
"displayName": "ParadoxPM",
"description": "",
"version": "0.0.1",
"license": "Apache-2.0",
"engines": {
"vscode": "^1.90.0"
},
"author": "Paradox Developer Foundation",
"repository": {
"type": "git",
"url": "https://github.com/Paradox-Developer-Foundation/PackageManager"
},
"preview": true,
"type": "module",
"categories": [
"Other"
],
"activationEvents": [],
"main": "./dist/extension/extension.js",
"contributes": {
"commands": [
{
"command": "ParadoxPM-Server.helloWorld",
"title": "Hello World"
}
],
"viewsContainers": {
"panel": [
{
"id": "packages-manager",
"title": "Packages Manager",
"icon": "$(search-editor-label-icon)"
}
]
},
"views": {
"packages-manager": [
{
"id": "packages-manager",
"name": "Packages Manager",
"icon": "$(package)",
"type": "webview"
}
]
}
},
"scripts": {
"vscode:prepublish": "pnpm run build",
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
"lint": "eslint src"
},
"devDependencies": {
"@tomjs/vite-plugin-vscode": "^4.2.1",
"@types/mocha": "^10.0.10",
"@types/node": "~20.19.4",
"@types/vscode": "^1.90.0",
"@typescript-eslint/eslint-plugin": "^8.35.1",
"@typescript-eslint/parser": "^8.35.1",
"@vitejs/plugin-vue": "^6.0.0",
"eslint": "^9.30.1",
"typescript": "^5.8.3",
"vite": "npm:rolldown-vite@latest",
"vue-tsc": "^3.0.0"
},
"dependencies": {
"@vscode-elements/elements": "^1.17.0",
"@vscode/codicons": "^0.0.36",
"vue": "^3.5.17"
}
}
Loading