* init vless

* change to cdn for uuid

* add TODO

* add support for ipv4 and 6

* add support for ipv4 and 6

* add error handle

* add error handle

* add error handle

* add debug log

* add debug log

* add udp log

* add udp log

* update vless-js

* add doc

* add doc

* add doc

* remove log

* remove log

* remove log

* remove log
This commit is contained in:
zizifn
2022-12-11 22:56:56 +08:00
committed by GitHub
parent 3d4fbd40c9
commit ceefb92803
30 changed files with 573 additions and 79 deletions

View File

@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}

11
libs/vless-js/README.md Normal file
View File

@@ -0,0 +1,11 @@
# vless-js
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build vless-js` to build the library.
## Running unit tests
Run `nx test vless-js` to execute the unit tests via [Jest](https://jestjs.io).

View File

@@ -0,0 +1,15 @@
/* eslint-disable */
export default {
displayName: 'vless-js',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/vless-js',
};

View File

@@ -0,0 +1,5 @@
{
"name": "vless-js",
"version": "0.0.1",
"type": "commonjs"
}

View File

@@ -0,0 +1,41 @@
{
"name": "vless-js",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/vless-js/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/vless-js",
"main": "libs/vless-js/src/index.ts",
"tsConfig": "libs/vless-js/tsconfig.lib.json",
"assets": ["libs/vless-js/*.md"]
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "node tools/scripts/publish.mjs vless-js {args.ver} {args.tag}"
},
"dependsOn": ["build"]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/vless-js/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/vless-js/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}

View File

@@ -0,0 +1 @@
export * from './lib/vless-js';

View File

@@ -0,0 +1,7 @@
import { vlessJs } from './vless-js';
describe('vlessJs', () => {
it('should work', () => {
expect(vlessJs()).toEqual('vless-js');
});
});

View File

@@ -0,0 +1,3 @@
export function vlessJs(): string {
return 'vless-js';
}

View File

@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
}

View File

@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}