fix: 微信登录补充保存username和role
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Agent
2026-04-04 07:35:21 +00:00
parent 756444ef2b
commit d12eea7693
10597 changed files with 817047 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
MIT License
-----------
Copyright (C) 2018-2022 Guy Bedford
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.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,57 @@
{
"name": "es-module-lexer",
"version": "1.6.0",
"description": "Lexes ES modules returning their import/export metadata",
"main": "lib/lexer.cjs",
"module": "lib/lexer.js",
"types": "types/lexer.d.ts",
"exports": {
".": {
"types": "./types/lexer.d.ts",
"module": "./lib/lexer.js",
"import": "./lib/lexer.js",
"require": "./lib/lexer.cjs"
},
"./js": {
"types": "./types/lexer.d.ts",
"default": "./lib/lexer.asm.js"
}
},
"scripts": {
"build": "chomp build",
"test": "chomp test"
},
"author": "Guy Bedford",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/plugin-transform-modules-commonjs": "^7.5.0",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.224",
"@types/node": "^18.7.1",
"kleur": "^2.0.2",
"mocha": "^5.2.0",
"terser": "^5.19.4",
"typescript": "^4.7.4"
},
"files": [
"lib",
"types",
"lexer.js"
],
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/guybedford/es-module-lexer.git"
},
"bugs": {
"url": "https://github.com/guybedford/es-module-lexer/issues"
},
"homepage": "https://github.com/guybedford/es-module-lexer#readme",
"directories": {
"lib": "lib",
"test": "test"
},
"keywords": []
}

View File

@@ -0,0 +1,184 @@
export declare enum ImportType {
/**
* A normal static using any syntax variations
* import .. from 'module'
*/
Static = 1,
/**
* A dynamic import expression `import(specifier)`
* or `import(specifier, opts)`
*/
Dynamic = 2,
/**
* An import.meta expression
*/
ImportMeta = 3,
/**
* A source phase import
* import source x from 'module'
*/
StaticSourcePhase = 4,
/**
* A dynamic source phase import
* import.source('module')
*/
DynamicSourcePhase = 5
}
export interface ImportSpecifier {
/**
* Module name
*
* To handle escape sequences in specifier strings, the .n field of imported specifiers will be provided where possible.
*
* For dynamic import expressions, this field will be empty if not a valid JS string.
*
* @example
* const [imports1, exports1] = parse(String.raw`import './\u0061\u0062.js'`);
* imports1[0].n;
* // Returns "./ab.js"
*
* const [imports2, exports2] = parse(`import("./ab.js")`);
* imports2[0].n;
* // Returns "./ab.js"
*
* const [imports3, exports3] = parse(`import("./" + "ab.js")`);
* imports3[0].n;
* // Returns undefined
*/
readonly n: string | undefined;
/**
* Type of import statement
*/
readonly t: ImportType;
/**
* Start of module specifier
*
* @example
* const source = `import { a } from 'asdf'`;
* const [imports, exports] = parse(source);
* source.substring(imports[0].s, imports[0].e);
* // Returns "asdf"
*/
readonly s: number;
/**
* End of module specifier
*/
readonly e: number;
/**
* Start of import statement
*
* @example
* const source = `import { a } from 'asdf'`;
* const [imports, exports] = parse(source);
* source.substring(imports[0].ss, imports[0].se);
* // Returns "import { a } from 'asdf';"
*/
readonly ss: number;
/**
* End of import statement
*/
readonly se: number;
/**
* If this import keyword is a dynamic import, this is the start value.
* If this import keyword is a static import, this is -1.
* If this import keyword is an import.meta expresion, this is -2.
*/
readonly d: number;
/**
* If this import has an import assertion, this is the start value.
* Otherwise this is `-1`.
*/
readonly a: number;
}
export interface ExportSpecifier {
/**
* Exported name
*
* @example
* const source = `export default []`;
* const [imports, exports] = parse(source);
* exports[0].n;
* // Returns "default"
*
* @example
* const source = `export const asdf = 42`;
* const [imports, exports] = parse(source);
* exports[0].n;
* // Returns "asdf"
*/
readonly n: string;
/**
* Local name, or undefined.
*
* @example
* const source = `export default []`;
* const [imports, exports] = parse(source);
* exports[0].ln;
* // Returns undefined
*
* @example
* const asdf = 42;
* const source = `export { asdf as a }`;
* const [imports, exports] = parse(source);
* exports[0].ln;
* // Returns "asdf"
*/
readonly ln: string | undefined;
/**
* Start of exported name
*
* @example
* const source = `export default []`;
* const [imports, exports] = parse(source);
* source.substring(exports[0].s, exports[0].e);
* // Returns "default"
*
* @example
* const source = `export { 42 as asdf }`;
* const [imports, exports] = parse(source);
* source.substring(exports[0].s, exports[0].e);
* // Returns "asdf"
*/
readonly s: number;
/**
* End of exported name
*/
readonly e: number;
/**
* Start of local name, or -1.
*
* @example
* const asdf = 42;
* const source = `export { asdf as a }`;
* const [imports, exports] = parse(source);
* source.substring(exports[0].ls, exports[0].le);
* // Returns "asdf"
*/
readonly ls: number;
/**
* End of local name, or -1.
*/
readonly le: number;
}
export interface ParseError extends Error {
idx: number;
}
/**
* Outputs the list of exports and locations of import specifiers,
* including dynamic import and import meta handling.
*
* @param source Source code to parser
* @param name Optional sourcename
* @returns Tuple contaning imports list and exports list.
*/
export declare function parse(source: string, name?: string): readonly [
imports: ReadonlyArray<ImportSpecifier>,
exports: ReadonlyArray<ExportSpecifier>,
facade: boolean,
hasModuleSyntax: boolean
];
/**
* Wait for init to resolve before calling `parse`.
*/
export declare const init: Promise<void>;
export declare const initSync: () => void;