修改后台权限

This commit is contained in:
yoyuzh
2026-03-24 14:30:59 +08:00
parent 00f902f475
commit b2d9db7be9
9310 changed files with 1246063 additions and 48 deletions

21
node_modules/ts-morph/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2017 David Sherret
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.

21665
node_modules/ts-morph/dist/ts-morph.js generated vendored Normal file

File diff suppressed because one or more lines are too long

11146
node_modules/ts-morph/lib/ts-morph.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

85
node_modules/ts-morph/package.json generated vendored Normal file
View File

@@ -0,0 +1,85 @@
{
"name": "ts-morph",
"version": "26.0.0",
"description": "TypeScript compiler wrapper for static analysis and code manipulation.",
"main": "dist/ts-morph.js",
"types": "lib/ts-morph.d.ts",
"scripts": {
"dopublish": "deno task type-check-docs && deno task code-generate && deno task package && deno task publish-code-verification && echo \"Run: npm publish\"",
"build": "deno task build:declarations && deno task build:node",
"build:node": "rimraf dist && rollup -c ",
"build:deno": "deno task build:declarations && rimraf dist-deno && rollup -c --environment BUILD:deno && deno run -A scripts/buildDeno.ts",
"build:declarations": "deno run -A scripts/generation/main.ts create-declaration-file",
"test": "deno run -A npm:mocha",
"test:debug": "deno task test --inspect-brk",
"test:watch": "deno task test --watch-extensions ts --watch",
"test:ci": "deno task test",
"test:ts-versions": "deno run -A scripts/test/testTypeScriptVersions.ts",
"type-check": "deno run -A scripts/typeCheckLibrary.ts",
"code-generate": "deno run -A scripts/generation/main.ts",
"output-wrapped-nodes": "deno run -A scripts/generation/outputWrappedNodesInfo.ts",
"package": "deno task build",
"publish-code-verification": "deno task code-verification && deno task ensure-no-declaration-file-errors",
"code-verification": "deno run -A scripts/verification/main.ts ensure-structures-match-classes ensure-overload-structures-match ensure-array-inputs-readonly ensure-classes-implement-structure-methods ensure-mixin-not-applied-multiple-times validate-public-api-class-member-names validate-compiler-node-to-wrapped-type validate-code-fences",
"ensure-structures-match-classes": "deno run -A scripts/verification/main.ts ensure-structures-match-classes",
"ensure-overload-structures-match": "deno run -A scripts/verification/main.ts ensure-overload-structures-match",
"ensure-no-project-compile-errors": "deno run -A scripts/verification/ensureNoProjectCompileErrors.ts",
"ensure-no-declaration-file-errors": "deno run -A scripts/verification/ensureNoDeclarationFileErrors.ts",
"ensure-array-inputs-readonly": "deno run -A scripts/verification/main ensure-array-inputs-readonly.ts",
"ensure-or-throw-exists": "deno run -A scripts/verification/main ensure-or-throw-exists.ts",
"type-check-docs": "deno run -A scripts/typeCheckDocumentation.ts"
},
"repository": "git+https://github.com/dsherret/ts-morph.git",
"keywords": [
"typescript",
"ast",
"static analysis",
"code generation",
"code refactor"
],
"author": "David Sherret",
"license": "MIT",
"bugs": {
"url": "https://github.com/dsherret/ts-morph/issues"
},
"homepage": "https://github.com/dsherret/ts-morph#readme",
"dependencies": {
"@ts-morph/common": "~0.27.0",
"code-block-writer": "^13.0.3"
},
"devDependencies": {
"@rollup/plugin-typescript": "^12.1.2",
"@types/chai": "^5.2.1",
"@types/diff": "^7.0.2",
"@types/mocha": "^10.0.10",
"@types/node": "^22.14.1",
"chai": "^5.2.0",
"conditional-type-checks": "^1.0.6",
"cross-env": "^7.0.3",
"diff": "^7.0.0",
"mocha": "11.1.0",
"standard-version": "^9.5.0",
"rimraf": "^6.0.1",
"rollup": "=4.40.0",
"ts-node": "10.9.2",
"typescript": "~5.8.3"
},
"standard-version": {
"tagPrefix": "",
"skip": {
"tag": true,
"commit": true
}
},
"browser": {
"fs": false,
"os": false,
"fs.realpath": false,
"mkdirp": false,
"dir-glob": false,
"graceful-fs": false,
"source-map-support": false,
"glob-parent": false,
"glob": false
}
}

111
node_modules/ts-morph/readme.md generated vendored Normal file
View File

@@ -0,0 +1,111 @@
# ts-morph
[![npm version](https://badge.fury.io/js/ts-morph.svg)](https://badge.fury.io/js/ts-morph)
[![CI](https://github.com/dsherret/ts-morph/workflows/CI/badge.svg)](https://github.com/dsherret/ts-morph/actions?query=workflow%3ACI)
[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)
[TypeScript](https://github.com/Microsoft/TypeScript) Compiler API wrapper. Provides an easier way to programmatically navigate and manipulate TypeScript and JavaScript code.
Formerly `ts-simple-ast`.
## Overview
- [Documentation](https://ts-morph.com/)
- [Declaration file](https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/lib/ts-morph.d.ts)
## Main Features
1. Wraps the compiler API objects to provide helper methods for getting information and programmatically changing files.
2. Allows falling back to the compiler API objects if necessary (ex. `classDeclaration.compilerNode` or `typeChecker.compilerObject`).
3. All changes are kept in memory (including file and directory moves) until specifying to save to the underlying file system.
4. Changes are made to the text and wrapped nodes can be held on to between manipulations.
## Getting Started
1. [Installing](https://ts-morph.com/)
2. [Instantiating](https://ts-morph.com/setup/)
3. [Adding source files](https://ts-morph.com/setup/adding-source-files)
4. [Getting source files](https://ts-morph.com/navigation/getting-source-files)
5. [Navigating](https://ts-morph.com/navigation/example)
6. [Manipulating](https://ts-morph.com/manipulation/)
## Library Progress
This library is still under active development. Most common code manipulation/generation use cases are implemented, but there's still a lot of work to do. Please open an issue if you find a feature missing, bug, or question that isn't in the issue tracker.
- [Breaking changes](https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/breaking-changes.md)
- [Change log](https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/CHANGELOG.md)
- [Wrapped nodes progress report](https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/wrapped-nodes.md)
## Example
<!-- dprint-ignore -->
```ts
import { Project, StructureKind } from "ts-morph";
// initialize
const project = new Project({
// Optionally specify compiler options, tsconfig.json, in-memory file system, and more here.
// If you initialize with a tsconfig.json, then it will automatically populate the project
// with the associated source files.
// Read more: https://ts-morph.com/setup/
});
// add source files
project.addSourceFilesAtPaths("src/**/*.ts");
const myClassFile = project.createSourceFile("src/MyClass.ts", "export class MyClass {}");
const myEnumFile = project.createSourceFile("src/MyEnum.ts", {
statements: [{
kind: StructureKind.Enum,
name: "MyEnum",
isExported: true,
members: [{ name: "member" }],
}],
});
// get information
const myClass = myClassFile.getClassOrThrow("MyClass");
myClass.getName(); // returns: "MyClass"
myClass.hasExportKeyword(); // returns: true
myClass.isDefaultExport(); // returns: false
// manipulate
const myInterface = myClassFile.addInterface({
name: "IMyInterface",
isExported: true,
properties: [{
name: "myProp",
type: "number",
}],
});
myClass.rename("NewName");
myClass.addImplements(myInterface.getName());
myClass.addProperty({
name: "myProp",
initializer: "5",
});
project.getSourceFileOrThrow("src/ExistingFile.ts").delete();
// asynchronously save all the changes above
await project.save();
// get underlying compiler node from the typescript AST from any node
const compilerNode = myClassFile.compilerNode;
```
Or navigate existing compiler nodes created with the TypeScript compiler (the `ts` named export is the TypeScript compiler):
```ts ignore-error: 1109
import { createWrappedNode, ClassDeclaration, ts } from "ts-morph";
// some code that creates a class declaration using the ts object
const classNode: ts.ClassDeclaration = ...;
// create and use a wrapped node
const classDec = createWrappedNode(classNode) as ClassDeclaration;
const firstProperty = classDec.getProperties()[0];
// ... do more stuff here ...
```