Skip to content

Commit

Permalink
Upload extension
Browse files Browse the repository at this point in the history
  • Loading branch information
memcorrupt committed Jan 31, 2024
1 parent edf749d commit 95519e7
Show file tree
Hide file tree
Showing 20 changed files with 2,345 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "import",
"format": [ "camelCase", "PascalCase" ]
}
],
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: publish to vs marketplace
on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
environment: vsce
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Package VSIX
run: pnpm run package

- name: Upload VSIX to GitHub Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: *.vsix

- name: Publish to VS marketplace
run: pnpm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
133 changes: 133 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Visual Studio packaged extensions
*.vsix
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
8 changes: 8 additions & 0 deletions .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",
"ms-vscode.extension-test-runner"
]
}
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 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
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
10 changes: 10 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore everything
*
*/**

# Include only what's needed
!out/**/extension.js
!LICENSE
!logo.png
!package.json
!README.md
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 memcorrupt
Copyright (c) 2024 CorruptedMemes LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
# luraph-vscode
Luraph extension for Visual Studio Code

[![Version](https://img.shields.io/visual-studio-marketplace/v/luraph-luraph-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=luraph.luraph-vscode)
[![Downloads](https://img.shields.io/visual-studio-marketplace/d/luraph.luraph-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=luraph.luraph-vscode)
[![Build Status](https://github.com/Luraph/luraph-vscode/actions/workflows/release.yml/badge.svg)](https://github.com/Luraph/luraph-vscode/actions)
[![License](https://img.shields.io/github/license/Luraph/luraph-vscode)](LICENSE)

Obfuscate files via the Luraph API from the comfort of your VS Code editor.

*The official [Luraph API documentation](https://lura.ph/dashboard/documents/apidoc) contains the most up-to-date and complete information and instructions for integrating with the Luraph API.*

**Luraph API access is only available for accounts under certain plans. For more information, please check out the pricing plans on the [Luraph website](https://lura.ph/#pricing).**

## Installation

- [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=luraph.luraph-vscode)
- [Latest VSIX file](https://github.com/luraph/luraph-vscode/releases/latest) (How to install VS Code extensions from a VSIX file?)(https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix "Visual Studio Code: Install from a VSIX"))

## Usage

*Before using this extension, you should set your Luraph API key as the `luraph.API Key` setting. If you attempt to obfuscate without one set, you will be prompted to enter an API key.*

To obfuscate, open the file to be obfuscated, and then click on the `Obfuscate with Luraph` item in the status bar at the bottom of the window or use the `Luraph: Obfuscate File` command. That's it!

## Looking for a feature? Is something broken? Want to add something new?

Please navigate to our [issues](https://github.com/luraph/luraph-vscode/issues) page to see any existing issues or feature requests. If you have a bug report or feature request that isn't already present here, please create it! Additionally, if you'd like to contribute to the development of the extension or fix any issues, feel free to open a [pull request](https://github.com/luraph/luraph-vscode/pulls). We don't bite!

## Useful Links
- [Visit the Luraph Website](https://lura.ph/ "Luraph - Online Lua Obfuscation")
- [Join the Luraph Discord](https://discord.lura.ph/ "Luraph Discord Server")
- [Read the Luraph Documentation](https://lura.ph/dashboard/documents "Luraph Documentation")
- [Read the Luraph FAQs](https://lura.ph/dashboard/faq "Luraph Frequently Asked Questions")
14 changes: 14 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Features planned to be added in the near future (contributions to add these features are appreciated and *encouraged!*):

- Allow settings to be saved for reuse next obfuscation, or to allow presets to be used for faster obfuscations.
- Add button to `editor/title` menu, and the right click file context menu if possible (https://code.visualstudio.com/api/references/contribution-points#contributes.menus)
- Allow obfuscation to be ran as a VS Code task
- Display `Success!` or `Failed!` on status bar for 3 seconds after a job succeeds/fails.
- Prevent concurrent obfuscations or ensure that the UI is synchronized.
- Allow obfuscation of a selected area of text instead of an entire file.
- Possibly allow obfuscation to be inlined in the same file, or as a in-place replacement of the current file.
- Embed an additional button (`QuickInputButton`) in the nodes list to `show` with a list of each node's settings. Either display to an outputchannel and focus it, or use showInformationMessage.
- Add extension tests to ensure that updates don't break functionality.
- Cleanup code and split into multiple functions.
- Add telemetry to count obfuscation usages to determine extension usage.
- Bundle extension (https://code.visualstudio.com/api/working-with-extensions/bundling-extension)
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 95519e7

Please sign in to comment.