Update app and tooling

This commit is contained in:
Lawrence Chen 2026-01-29 17:36:26 -08:00
parent 3046531bdd
commit e620ec7349
4950 changed files with 2975120 additions and 10 deletions

2903
node_modules/ts-morph/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load diff

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

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

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because it is too large Load diff

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

@ -0,0 +1,111 @@
{
"name": "ts-morph",
"version": "12.0.0",
"description": "TypeScript compiler wrapper for static analysis and code manipulation.",
"main": "dist/ts-morph.js",
"typings": "lib/ts-morph.d.ts",
"scripts": {
"dopublish": "yarn type-check-docs && yarn package && yarn publish-code-verification && echo \"Run: npm publish --otp\"",
"build": "yarn build:declarations && yarn build:deno && yarn build:node",
"build:node": "rimraf dist && rollup -c ",
"build:deno": "rimraf dist-deno && rollup -c --environment BUILD:deno && ts-node scripts/buildDeno.ts",
"build:declarations": "ts-node --transpile-only scripts/generation/main create-declaration-file",
"test": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" mocha",
"test:debug": "yarn test --inspect-brk",
"test:watch": "yarn test --watch-extensions ts --watch",
"test:ci": "yarn run test",
"test:ts-versions": "ts-node --transpile-only scripts/test/testTypeScriptVersions",
"test:coverage": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" nyc --reporter=lcov mocha",
"test:performance": "yarn build && node ./dist/tests/performance/run.js",
"test:performance-save": "yarn test:performance --save",
"type-check": "yarn type-check:library && yarn type-check:scripts",
"type-check:library": "ts-node --transpile-only scripts/typeCheckLibrary",
"type-check:scripts": "tsc --noEmit --project scripts/tsconfig.json",
"code-generate": "ts-node --transpile-only --compiler ttypescript scripts/generation/main",
"refactor": "ts-node --transpile-only scripts/refactor",
"output-wrapped-nodes": "ts-node --transpile-only scripts/generation/outputWrappedNodesInfo",
"package": "yarn build",
"publish-code-verification": "yarn code-verification && yarn ensure-no-declaration-file-errors",
"code-verification": "ts-node --transpile-only scripts/verification/main 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": "ts-node --transpile-only scripts/verification/main ensure-structures-match-classes",
"ensure-overload-structures-match": "ts-node --transpile-only scripts/verification/main ensure-overload-structures-match",
"ensure-no-project-compile-errors": "ts-node --transpile-only scripts/verification/ensureNoProjectCompileErrors",
"ensure-no-declaration-file-errors": "ts-node --transpile-only scripts/verification/ensureNoDeclarationFileErrors",
"ensure-array-inputs-readonly": "ts-node --transpile-only scripts/verification/main ensure-array-inputs-readonly",
"ensure-or-throw-exists": "ts-node --transpile-only scripts/verification/main ensure-or-throw-exists",
"type-check-docs": "ts-node --transpile-only 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",
"nyc": {
"extension": [
".ts",
".tsx"
],
"include": [
"src/**/*.ts",
"!src/tests/**/*.ts",
"!src/structures/utils/forEachStructureChild.ts"
],
"reporter": [
"html"
],
"all": true
},
"dependencies": {
"@ts-morph/common": "~0.11.0",
"code-block-writer": "^10.1.1"
},
"devDependencies": {
"@types/chai": "^4.2.21",
"@types/diff": "^5.0.1",
"@types/mocha": "^9.0.0",
"@types/node": "^16.7.2",
"@types/ts-nameof": "^4.2.1",
"@ts-morph/scripts": "~0.2.0",
"chai": "^4.3.4",
"conditional-type-checks": "^1.0.5",
"cross-env": "^7.0.3",
"diff": "^5.0.0",
"mocha": "9.1.0",
"nyc": "15.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.56.3",
"rollup-plugin-typescript2": "^0.30.0",
"ts-nameof": "^5.0.0",
"ts-node": "10.2.1",
"ttypescript": "1.5.12",
"typescript": "~4.4.2"
},
"standard-version": {
"tagPrefix": "",
"skip": {
"tag": true,
"commit": true
}
},
"browser": {
"fs": false,
"os": false,
"fs.realpath": false,
"mkdirp": false,
"dir-glob": false,
"graceful-fs": false,
"fast-glob": 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 onto 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 ...
```