Delete node_modules
This commit is contained in:
parent
fac33240ab
commit
b4b6b996d6
1
node_modules/.bin/acorn
generated
vendored
1
node_modules/.bin/acorn
generated
vendored
@ -1 +0,0 @@
|
|||||||
../acorn/bin/acorn
|
|
1
node_modules/.bin/loose-envify
generated
vendored
1
node_modules/.bin/loose-envify
generated
vendored
@ -1 +0,0 @@
|
|||||||
../loose-envify/cli.js
|
|
1
node_modules/.bin/mime
generated
vendored
1
node_modules/.bin/mime
generated
vendored
@ -1 +0,0 @@
|
|||||||
../mime/cli.js
|
|
1
node_modules/.bin/nanoid
generated
vendored
1
node_modules/.bin/nanoid
generated
vendored
@ -1 +0,0 @@
|
|||||||
../nanoid/bin/nanoid.cjs
|
|
1
node_modules/.bin/next
generated
vendored
1
node_modules/.bin/next
generated
vendored
@ -1 +0,0 @@
|
|||||||
../next/dist/bin/next
|
|
1
node_modules/.bin/nodemon
generated
vendored
1
node_modules/.bin/nodemon
generated
vendored
@ -1 +0,0 @@
|
|||||||
../nodemon/bin/nodemon.js
|
|
1
node_modules/.bin/nodetouch
generated
vendored
1
node_modules/.bin/nodetouch
generated
vendored
@ -1 +0,0 @@
|
|||||||
../touch/bin/nodetouch.js
|
|
1
node_modules/.bin/nopt
generated
vendored
1
node_modules/.bin/nopt
generated
vendored
@ -1 +0,0 @@
|
|||||||
../nopt/bin/nopt.js
|
|
1
node_modules/.bin/prisma
generated
vendored
1
node_modules/.bin/prisma
generated
vendored
@ -1 +0,0 @@
|
|||||||
../prisma/build/index.js
|
|
1
node_modules/.bin/prisma2
generated
vendored
1
node_modules/.bin/prisma2
generated
vendored
@ -1 +0,0 @@
|
|||||||
../prisma/build/index.js
|
|
1
node_modules/.bin/sass
generated
vendored
1
node_modules/.bin/sass
generated
vendored
@ -1 +0,0 @@
|
|||||||
../sass/sass.js
|
|
1
node_modules/.bin/semver
generated
vendored
1
node_modules/.bin/semver
generated
vendored
@ -1 +0,0 @@
|
|||||||
../semver/bin/semver
|
|
1
node_modules/.bin/ts-node
generated
vendored
1
node_modules/.bin/ts-node
generated
vendored
@ -1 +0,0 @@
|
|||||||
../ts-node/dist/bin.js
|
|
1
node_modules/.bin/ts-node-cwd
generated
vendored
1
node_modules/.bin/ts-node-cwd
generated
vendored
@ -1 +0,0 @@
|
|||||||
../ts-node/dist/bin-cwd.js
|
|
1
node_modules/.bin/ts-node-esm
generated
vendored
1
node_modules/.bin/ts-node-esm
generated
vendored
@ -1 +0,0 @@
|
|||||||
../ts-node/dist/bin-esm.js
|
|
1
node_modules/.bin/ts-node-script
generated
vendored
1
node_modules/.bin/ts-node-script
generated
vendored
@ -1 +0,0 @@
|
|||||||
../ts-node/dist/bin-script.js
|
|
1
node_modules/.bin/ts-node-transpile-only
generated
vendored
1
node_modules/.bin/ts-node-transpile-only
generated
vendored
@ -1 +0,0 @@
|
|||||||
../ts-node/dist/bin-transpile.js
|
|
1
node_modules/.bin/ts-script
generated
vendored
1
node_modules/.bin/ts-script
generated
vendored
@ -1 +0,0 @@
|
|||||||
../ts-node/dist/bin-script-deprecated.js
|
|
1
node_modules/.bin/tsc
generated
vendored
1
node_modules/.bin/tsc
generated
vendored
@ -1 +0,0 @@
|
|||||||
../typescript/bin/tsc
|
|
1
node_modules/.bin/tsserver
generated
vendored
1
node_modules/.bin/tsserver
generated
vendored
@ -1 +0,0 @@
|
|||||||
../typescript/bin/tsserver
|
|
1
node_modules/.bin/uuid
generated
vendored
1
node_modules/.bin/uuid
generated
vendored
@ -1 +0,0 @@
|
|||||||
../uuid/dist/bin/uuid
|
|
2234
node_modules/.package-lock.json
generated
vendored
2234
node_modules/.package-lock.json
generated
vendored
File diff suppressed because it is too large
Load Diff
10
node_modules/.prisma/client/deno/edge.ts
generated
vendored
10
node_modules/.prisma/client/deno/edge.ts
generated
vendored
@ -1,10 +0,0 @@
|
|||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`@prisma/client/deno/edge did not initialize yet. Please run "prisma generate --data-proxy" and try to import it again.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export { PrismaClient }
|
|
85
node_modules/.prisma/client/edge.d.ts
generated
vendored
85
node_modules/.prisma/client/edge.d.ts
generated
vendored
@ -1,85 +0,0 @@
|
|||||||
import runtime from '@prisma/client/runtime'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ## Prisma Client ʲˢ
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript & Node.js
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new Prisma()
|
|
||||||
* // Fetch zero or more Users
|
|
||||||
* const users = await prisma.user.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://github.com/prisma/prisma/blob/main/docs/prisma-client-js/api.md).
|
|
||||||
*/
|
|
||||||
export declare const PrismaClient: any
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ## Prisma Client ʲˢ
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript & Node.js
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new Prisma()
|
|
||||||
* // Fetch zero or more Users
|
|
||||||
* const users = await prisma.user.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://github.com/prisma/prisma/blob/main/docs/prisma-client-js/api.md).
|
|
||||||
*/
|
|
||||||
export declare type PrismaClient = any
|
|
||||||
|
|
||||||
export declare type PrismaClientExtends<
|
|
||||||
ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs,
|
|
||||||
> = {
|
|
||||||
$extends: { extArgs: ExtArgs } & (<
|
|
||||||
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
|
||||||
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
|
||||||
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
|
||||||
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
|
||||||
Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs<R, M, Q, C>,
|
|
||||||
>(
|
|
||||||
args:
|
|
||||||
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
|
|
||||||
| { name?: string; result?: R; model?: M; query?: Q; client?: C },
|
|
||||||
) => PrismaClientExtends<Args & ExtArgs>)
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare const dmmf: any
|
|
||||||
export declare type dmmf = any
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the type of the value, that the Promise holds.
|
|
||||||
*/
|
|
||||||
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the return type of a function which returns a Promise.
|
|
||||||
*/
|
|
||||||
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
|
|
||||||
|
|
||||||
export namespace Prisma {
|
|
||||||
export type TransactionClient = any
|
|
||||||
|
|
||||||
export function defineExtension<
|
|
||||||
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
|
||||||
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
|
||||||
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
|
||||||
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
|
||||||
Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs<R, M, Q, C>,
|
|
||||||
>(
|
|
||||||
args:
|
|
||||||
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
|
|
||||||
| { name?: string; result?: R; model?: M; query?: Q; client?: C },
|
|
||||||
): (client: any) => PrismaClientExtends<Args>
|
|
||||||
|
|
||||||
export type Extension = runtime.Types.Extensions.UserArgs
|
|
||||||
export import getExtensionContext = runtime.Extensions.getExtensionContext
|
|
||||||
export type Args<T, F extends runtime.Types.Public.Operation> = runtime.Types.Public.Args<T, F> & {}
|
|
||||||
export type Payload<T, F extends runtime.Types.Public.Operation> = runtime.Types.Public.Payload<T, F> & {}
|
|
||||||
export type Result<T, A, F extends runtime.Types.Public.Operation> = runtime.Types.Public.Result<T, A, F> & {}
|
|
||||||
export type Exact<T, W> = runtime.Types.Public.Exact<T, W> & {}
|
|
||||||
}
|
|
12
node_modules/.prisma/client/edge.js
generated
vendored
12
node_modules/.prisma/client/edge.js
generated
vendored
@ -1,12 +0,0 @@
|
|||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`@prisma/client/edge did not initialize yet. Please run "prisma generate --data-proxy" and try to import it again.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
PrismaClient,
|
|
||||||
}
|
|
148
node_modules/.prisma/client/index-browser.js
generated
vendored
148
node_modules/.prisma/client/index-browser.js
generated
vendored
@ -1,148 +0,0 @@
|
|||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
|
|
||||||
const {
|
|
||||||
Decimal,
|
|
||||||
objectEnumValues,
|
|
||||||
makeStrictEnum
|
|
||||||
} = require('@prisma/client/runtime/index-browser')
|
|
||||||
|
|
||||||
|
|
||||||
const Prisma = {}
|
|
||||||
|
|
||||||
exports.Prisma = Prisma
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prisma Client JS version: 4.9.0
|
|
||||||
* Query Engine version: ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5
|
|
||||||
*/
|
|
||||||
Prisma.prismaVersion = {
|
|
||||||
client: "4.9.0",
|
|
||||||
engine: "ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5"
|
|
||||||
}
|
|
||||||
|
|
||||||
Prisma.PrismaClientKnownRequestError = () => {
|
|
||||||
throw new Error(`PrismaClientKnownRequestError is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)};
|
|
||||||
Prisma.PrismaClientUnknownRequestError = () => {
|
|
||||||
throw new Error(`PrismaClientUnknownRequestError is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.PrismaClientRustPanicError = () => {
|
|
||||||
throw new Error(`PrismaClientRustPanicError is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.PrismaClientInitializationError = () => {
|
|
||||||
throw new Error(`PrismaClientInitializationError is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.PrismaClientValidationError = () => {
|
|
||||||
throw new Error(`PrismaClientValidationError is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.NotFoundError = () => {
|
|
||||||
throw new Error(`NotFoundError is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.Decimal = Decimal
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Re-export of sql-template-tag
|
|
||||||
*/
|
|
||||||
Prisma.sql = () => {
|
|
||||||
throw new Error(`sqltag is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.empty = () => {
|
|
||||||
throw new Error(`empty is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.join = () => {
|
|
||||||
throw new Error(`join is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.raw = () => {
|
|
||||||
throw new Error(`raw is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)}
|
|
||||||
Prisma.validator = () => (val) => val
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shorthand utilities for JSON filtering
|
|
||||||
*/
|
|
||||||
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
||||||
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
||||||
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
||||||
|
|
||||||
Prisma.NullTypes = {
|
|
||||||
DbNull: objectEnumValues.classes.DbNull,
|
|
||||||
JsonNull: objectEnumValues.classes.JsonNull,
|
|
||||||
AnyNull: objectEnumValues.classes.AnyNull
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enums
|
|
||||||
*/
|
|
||||||
// Based on
|
|
||||||
// https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275
|
|
||||||
function makeEnum(x) { return x; }
|
|
||||||
|
|
||||||
exports.Prisma.MetricScalarFieldEnum = makeEnum({
|
|
||||||
id: 'id',
|
|
||||||
path: 'path',
|
|
||||||
uuid: 'uuid',
|
|
||||||
remote_address: 'remote_address',
|
|
||||||
date_requested: 'date_requested',
|
|
||||||
projectId: 'projectId',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt'
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.Prisma.ProjectScalarFieldEnum = makeEnum({
|
|
||||||
id: 'id',
|
|
||||||
title: 'title',
|
|
||||||
uuid: 'uuid',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
network: 'network'
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.Prisma.QueryMode = makeEnum({
|
|
||||||
default: 'default',
|
|
||||||
insensitive: 'insensitive'
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.Prisma.SortOrder = makeEnum({
|
|
||||||
asc: 'asc',
|
|
||||||
desc: 'desc'
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
||||||
ReadUncommitted: 'ReadUncommitted',
|
|
||||||
ReadCommitted: 'ReadCommitted',
|
|
||||||
RepeatableRead: 'RepeatableRead',
|
|
||||||
Serializable: 'Serializable'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
exports.Prisma.ModelName = makeEnum({
|
|
||||||
Project: 'Project',
|
|
||||||
Metric: 'Metric'
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create the Client
|
|
||||||
*/
|
|
||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`PrismaClient is unable to be run in the browser.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.PrismaClient = PrismaClient
|
|
||||||
|
|
||||||
Object.assign(exports, Prisma)
|
|
3681
node_modules/.prisma/client/index.d.ts
generated
vendored
3681
node_modules/.prisma/client/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
195
node_modules/.prisma/client/index.js
generated
vendored
195
node_modules/.prisma/client/index.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
node_modules/.prisma/client/libquery_engine-darwin-arm64.dylib.node
generated
vendored
BIN
node_modules/.prisma/client/libquery_engine-darwin-arm64.dylib.node
generated
vendored
Binary file not shown.
6
node_modules/.prisma/client/package.json
generated
vendored
6
node_modules/.prisma/client/package.json
generated
vendored
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": ".prisma/client",
|
|
||||||
"main": "index.js",
|
|
||||||
"types": "index.d.ts",
|
|
||||||
"browser": "index-browser.js"
|
|
||||||
}
|
|
34
node_modules/.prisma/client/schema.prisma
generated
vendored
34
node_modules/.prisma/client/schema.prisma
generated
vendored
@ -1,34 +0,0 @@
|
|||||||
// This the Prisma schema file
|
|
||||||
|
|
||||||
generator client {
|
|
||||||
provider = "prisma-client-js"
|
|
||||||
}
|
|
||||||
|
|
||||||
datasource db {
|
|
||||||
provider = "postgresql"
|
|
||||||
url = env("DATABASE_URL")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Project {
|
|
||||||
id Int @default(autoincrement()) @id
|
|
||||||
title String @db.VarChar(255)
|
|
||||||
uuid String @unique @db.VarChar(255)
|
|
||||||
createdAt DateTime @default(now())
|
|
||||||
updatedAt DateTime @updatedAt
|
|
||||||
network String @db.VarChar(255)
|
|
||||||
Metrics Metric[]
|
|
||||||
@@map("app_projects")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Metric {
|
|
||||||
id Int @default(autoincrement()) @id
|
|
||||||
path String @db.VarChar(255)
|
|
||||||
uuid String @unique @db.VarChar(255)
|
|
||||||
remote_address String @db.VarChar(255)
|
|
||||||
date_requested DateTime
|
|
||||||
project Project @relation(fields: [projectId], references: [id])
|
|
||||||
projectId Int
|
|
||||||
createdAt DateTime @default(now())
|
|
||||||
updatedAt DateTime @updatedAt
|
|
||||||
@@map("app_metrics")
|
|
||||||
}
|
|
21
node_modules/@cspotcode/source-map-support/LICENSE.md
generated
vendored
21
node_modules/@cspotcode/source-map-support/LICENSE.md
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Evan Wallace
|
|
||||||
|
|
||||||
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.
|
|
289
node_modules/@cspotcode/source-map-support/README.md
generated
vendored
289
node_modules/@cspotcode/source-map-support/README.md
generated
vendored
@ -1,289 +0,0 @@
|
|||||||
# Source Map Support
|
|
||||||
|
|
||||||
[](https://npmjs.org/package/@cspotcode/source-map-support)
|
|
||||||
[](https://npmjs.org/package/@cspotcode/source-map-support)
|
|
||||||
[](https://github.com/cspotcode/node-source-map-support/actions?query=workflow%3A%22Continuous+Integration%22)
|
|
||||||
|
|
||||||
This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process.
|
|
||||||
|
|
||||||
## Installation and Usage
|
|
||||||
|
|
||||||
#### Node support
|
|
||||||
|
|
||||||
```
|
|
||||||
$ npm install @cspotcode/source-map-support
|
|
||||||
```
|
|
||||||
|
|
||||||
Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler):
|
|
||||||
|
|
||||||
```
|
|
||||||
//# sourceMappingURL=path/to/source.map
|
|
||||||
```
|
|
||||||
|
|
||||||
If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be
|
|
||||||
respected (e.g. if a file mentions the comment in code, or went through multiple transpilers).
|
|
||||||
The path should either be absolute or relative to the compiled file.
|
|
||||||
|
|
||||||
From here you have two options.
|
|
||||||
|
|
||||||
##### CLI Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
node -r @cspotcode/source-map-support/register compiled.js
|
|
||||||
# Or to enable hookRequire
|
|
||||||
node -r @cspotcode/source-map-support/register-hook-require compiled.js
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Programmatic Usage
|
|
||||||
|
|
||||||
Put the following line at the top of the compiled file.
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@cspotcode/source-map-support').install();
|
|
||||||
```
|
|
||||||
|
|
||||||
It is also possible to install the source map support directly by
|
|
||||||
requiring the `register` module which can be handy with ES6:
|
|
||||||
|
|
||||||
```js
|
|
||||||
import '@cspotcode/source-map-support/register'
|
|
||||||
|
|
||||||
// Instead of:
|
|
||||||
import sourceMapSupport from '@cspotcode/source-map-support'
|
|
||||||
sourceMapSupport.install()
|
|
||||||
```
|
|
||||||
Note: if you're using babel-register, it includes source-map-support already.
|
|
||||||
|
|
||||||
It is also very useful with Mocha:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ mocha --require @cspotcode/source-map-support/register tests/
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Browser support
|
|
||||||
|
|
||||||
This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code.
|
|
||||||
|
|
||||||
This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify.
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script src="browser-source-map-support.js"></script>
|
|
||||||
<script>sourceMapSupport.install();</script>
|
|
||||||
```
|
|
||||||
|
|
||||||
This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script>
|
|
||||||
define(['browser-source-map-support'], function(sourceMapSupport) {
|
|
||||||
sourceMapSupport.install();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer:
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@cspotcode/source-map-support').install({
|
|
||||||
handleUncaughtExceptions: false
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access.
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@cspotcode/source-map-support').install({
|
|
||||||
retrieveSourceMap: function(source) {
|
|
||||||
if (source === 'compiled.js') {
|
|
||||||
return {
|
|
||||||
url: 'original.js',
|
|
||||||
map: fs.readFileSync('compiled.js.map', 'utf8')
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment.
|
|
||||||
In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'.
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@cspotcode/source-map-support').install({
|
|
||||||
environment: 'node'
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps.
|
|
||||||
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@cspotcode/source-map-support').install({
|
|
||||||
hookRequire: true
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage.
|
|
||||||
|
|
||||||
## Demos
|
|
||||||
|
|
||||||
#### Basic Demo
|
|
||||||
|
|
||||||
original.js:
|
|
||||||
|
|
||||||
```js
|
|
||||||
throw new Error('test'); // This is the original code
|
|
||||||
```
|
|
||||||
|
|
||||||
compiled.js:
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@cspotcode/source-map-support').install();
|
|
||||||
|
|
||||||
throw new Error('test'); // This is the compiled code
|
|
||||||
// The next line defines the sourceMapping.
|
|
||||||
//# sourceMappingURL=compiled.js.map
|
|
||||||
```
|
|
||||||
|
|
||||||
compiled.js.map:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"version": 3,
|
|
||||||
"file": "compiled.js",
|
|
||||||
"sources": ["original.js"],
|
|
||||||
"names": [],
|
|
||||||
"mappings": ";;AAAA,MAAM,IAAI"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js):
|
|
||||||
|
|
||||||
```
|
|
||||||
$ node compiled.js
|
|
||||||
|
|
||||||
original.js:1
|
|
||||||
throw new Error('test'); // This is the original code
|
|
||||||
^
|
|
||||||
Error: test
|
|
||||||
at Object.<anonymous> (original.js:1:7)
|
|
||||||
at Module._compile (module.js:456:26)
|
|
||||||
at Object.Module._extensions..js (module.js:474:10)
|
|
||||||
at Module.load (module.js:356:32)
|
|
||||||
at Function.Module._load (module.js:312:12)
|
|
||||||
at Function.Module.runMain (module.js:497:10)
|
|
||||||
at startup (node.js:119:16)
|
|
||||||
at node.js:901:3
|
|
||||||
```
|
|
||||||
|
|
||||||
#### TypeScript Demo
|
|
||||||
|
|
||||||
demo.ts:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
declare function require(name: string);
|
|
||||||
require('@cspotcode/source-map-support').install();
|
|
||||||
class Foo {
|
|
||||||
constructor() { this.bar(); }
|
|
||||||
bar() { throw new Error('this is a demo'); }
|
|
||||||
}
|
|
||||||
new Foo();
|
|
||||||
```
|
|
||||||
|
|
||||||
Compile and run the file using the TypeScript compiler from the terminal:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ npm install source-map-support typescript
|
|
||||||
$ node_modules/typescript/bin/tsc -sourcemap demo.ts
|
|
||||||
$ node demo.js
|
|
||||||
|
|
||||||
demo.ts:5
|
|
||||||
bar() { throw new Error('this is a demo'); }
|
|
||||||
^
|
|
||||||
Error: this is a demo
|
|
||||||
at Foo.bar (demo.ts:5:17)
|
|
||||||
at new Foo (demo.ts:4:24)
|
|
||||||
at Object.<anonymous> (demo.ts:7:1)
|
|
||||||
at Module._compile (module.js:456:26)
|
|
||||||
at Object.Module._extensions..js (module.js:474:10)
|
|
||||||
at Module.load (module.js:356:32)
|
|
||||||
at Function.Module._load (module.js:312:12)
|
|
||||||
at Function.Module.runMain (module.js:497:10)
|
|
||||||
at startup (node.js:119:16)
|
|
||||||
at node.js:901:3
|
|
||||||
```
|
|
||||||
|
|
||||||
There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('@cspotcode/source-map-support').install()` in the code base:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ npm install source-map-support typescript
|
|
||||||
$ node_modules/typescript/bin/tsc -sourcemap demo.ts
|
|
||||||
$ node -r source-map-support/register demo.js
|
|
||||||
|
|
||||||
demo.ts:5
|
|
||||||
bar() { throw new Error('this is a demo'); }
|
|
||||||
^
|
|
||||||
Error: this is a demo
|
|
||||||
at Foo.bar (demo.ts:5:17)
|
|
||||||
at new Foo (demo.ts:4:24)
|
|
||||||
at Object.<anonymous> (demo.ts:7:1)
|
|
||||||
at Module._compile (module.js:456:26)
|
|
||||||
at Object.Module._extensions..js (module.js:474:10)
|
|
||||||
at Module.load (module.js:356:32)
|
|
||||||
at Function.Module._load (module.js:312:12)
|
|
||||||
at Function.Module.runMain (module.js:497:10)
|
|
||||||
at startup (node.js:119:16)
|
|
||||||
at node.js:901:3
|
|
||||||
```
|
|
||||||
|
|
||||||
#### CoffeeScript Demo
|
|
||||||
|
|
||||||
demo.coffee:
|
|
||||||
|
|
||||||
```coffee
|
|
||||||
require('@cspotcode/source-map-support').install()
|
|
||||||
foo = ->
|
|
||||||
bar = -> throw new Error 'this is a demo'
|
|
||||||
bar()
|
|
||||||
foo()
|
|
||||||
```
|
|
||||||
|
|
||||||
Compile and run the file using the CoffeeScript compiler from the terminal:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install @cspotcode/source-map-support coffeescript
|
|
||||||
$ node_modules/.bin/coffee --map --compile demo.coffee
|
|
||||||
$ node demo.js
|
|
||||||
|
|
||||||
demo.coffee:3
|
|
||||||
bar = -> throw new Error 'this is a demo'
|
|
||||||
^
|
|
||||||
Error: this is a demo
|
|
||||||
at bar (demo.coffee:3:22)
|
|
||||||
at foo (demo.coffee:4:3)
|
|
||||||
at Object.<anonymous> (demo.coffee:5:1)
|
|
||||||
at Object.<anonymous> (demo.coffee:1:1)
|
|
||||||
at Module._compile (module.js:456:26)
|
|
||||||
at Object.Module._extensions..js (module.js:474:10)
|
|
||||||
at Module.load (module.js:356:32)
|
|
||||||
at Function.Module._load (module.js:312:12)
|
|
||||||
at Function.Module.runMain (module.js:497:10)
|
|
||||||
at startup (node.js:119:16)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests:
|
|
||||||
|
|
||||||
* Build the tests using `build.js`
|
|
||||||
* Launch the HTTP server (`npm run serve-tests`) and visit
|
|
||||||
* http://127.0.0.1:1336/amd-test
|
|
||||||
* http://127.0.0.1:1336/browser-test
|
|
||||||
* http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details).
|
|
||||||
* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This code is available under the [MIT license](http://opensource.org/licenses/MIT).
|
|
114
node_modules/@cspotcode/source-map-support/browser-source-map-support.js
generated
vendored
114
node_modules/@cspotcode/source-map-support/browser-source-map-support.js
generated
vendored
@ -1,114 +0,0 @@
|
|||||||
/*
|
|
||||||
* Support for source maps in V8 stack traces
|
|
||||||
* https://github.com/evanw/node-source-map-support
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
The buffer module from node.js, for the browser.
|
|
||||||
|
|
||||||
@author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
||||||
license MIT
|
|
||||||
*/
|
|
||||||
(this.define||function(R,U){this.sourceMapSupport=U()})("browser-source-map-support",function(R){(function e(C,J,A){function p(f,c){if(!J[f]){if(!C[f]){var l="function"==typeof require&&require;if(!c&&l)return l(f,!0);if(t)return t(f,!0);throw Error("Cannot find module '"+f+"'");}l=J[f]={exports:{}};C[f][0].call(l.exports,function(q){var r=C[f][1][q];return p(r?r:q)},l,l.exports,e,C,J,A)}return J[f].exports}for(var t="function"==typeof require&&require,m=0;m<A.length;m++)p(A[m]);return p})({1:[function(C,
|
|
||||||
J,A){R=C("./source-map-support")},{"./source-map-support":21}],2:[function(C,J,A){(function(e){function p(m){m=m.charCodeAt(0);if(43===m)return 62;if(47===m)return 63;if(48>m)return-1;if(58>m)return m-48+52;if(91>m)return m-65;if(123>m)return m-97+26}var t="undefined"!==typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(m){function f(d){q[k++]=d}if(0<m.length%4)throw Error("Invalid string. Length must be a multiple of 4");var c=m.length;var l="="===m.charAt(c-2)?2:"="===m.charAt(c-1)?1:0;var q=
|
|
||||||
new t(3*m.length/4-l);var r=0<l?m.length-4:m.length;var k=0;for(c=0;c<r;c+=4){var u=p(m.charAt(c))<<18|p(m.charAt(c+1))<<12|p(m.charAt(c+2))<<6|p(m.charAt(c+3));f((u&16711680)>>16);f((u&65280)>>8);f(u&255)}2===l?(u=p(m.charAt(c))<<2|p(m.charAt(c+1))>>4,f(u&255)):1===l&&(u=p(m.charAt(c))<<10|p(m.charAt(c+1))<<4|p(m.charAt(c+2))>>2,f(u>>8&255),f(u&255));return q};e.fromByteArray=function(m){var f=m.length%3,c="",l;var q=0;for(l=m.length-f;q<l;q+=3){var r=(m[q]<<16)+(m[q+1]<<8)+m[q+2];r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>
|
|
||||||
18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);c+=r}switch(f){case 1:r=m[m.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<4&63);c+="==";break;case 2:r=(m[m.length-2]<<8)+
|
|
||||||
m[m.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),c+="="}return c}})("undefined"===typeof A?this.base64js={}:A)},{}],3:[function(C,J,A){},{}],4:[function(C,J,A){(function(e){var p=Object.prototype.toString,t="function"===typeof e.alloc&&"function"===typeof e.allocUnsafe&&"function"===
|
|
||||||
typeof e.from;J.exports=function(m,f,c){if("number"===typeof m)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===p.call(m).slice(8,-1)){f>>>=0;var l=m.byteLength-f;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===c)c=l;else if(c>>>=0,c>l)throw new RangeError("'length' is out of bounds");return t?e.from(m.slice(f,f+c)):new e(new Uint8Array(m.slice(f,f+c)))}if("string"===typeof m){c=f;if("string"!==typeof c||""===c)c="utf8";if(!e.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding');
|
|
||||||
return t?e.from(m,c):new e(m,c)}return t?e.from(m):new e(m)}}).call(this,C("buffer").Buffer)},{buffer:5}],5:[function(C,J,A){function e(a,b,h){if(!(this instanceof e))return new e(a,b,h);var w=typeof a;if("number"===w)var y=0<a?a>>>0:0;else if("string"===w){if("base64"===b)for(a=(a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")).replace(L,"");0!==a.length%4;)a+="=";y=e.byteLength(a,b)}else if("object"===w&&null!==a)"Buffer"===a.type&&z(a.data)&&(a=a.data),y=0<+a.length?Math.floor(+a.length):0;else throw new TypeError("must start with number, buffer, array or string");
|
|
||||||
if(this.length>G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");if(e.TYPED_ARRAY_SUPPORT)var I=e._augment(new Uint8Array(y));else I=this,I.length=y,I._isBuffer=!0;if(e.TYPED_ARRAY_SUPPORT&&"number"===typeof a.byteLength)I._set(a);else{var K=a;if(z(K)||e.isBuffer(K)||K&&"object"===typeof K&&"number"===typeof K.length)if(e.isBuffer(a))for(b=0;b<y;b++)I[b]=a.readUInt8(b);else for(b=0;b<y;b++)I[b]=(a[b]%256+256)%256;else if("string"===w)I.write(a,
|
|
||||||
0,b);else if("number"===w&&!e.TYPED_ARRAY_SUPPORT&&!h)for(b=0;b<y;b++)I[b]=0}return I}function p(a,b,h){var w="";for(h=Math.min(a.length,h);b<h;b++)w+=String.fromCharCode(a[b]);return w}function t(a,b,h){if(0!==a%1||0>a)throw new RangeError("offset is not uint");if(a+b>h)throw new RangeError("Trying to access beyond buffer length");}function m(a,b,h,w,y,I){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>y||b<I)throw new TypeError("value is out of bounds");if(h+w>a.length)throw new TypeError("index out of range");
|
|
||||||
}function f(a,b,h,w){0>b&&(b=65535+b+1);for(var y=0,I=Math.min(a.length-h,2);y<I;y++)a[h+y]=(b&255<<8*(w?y:1-y))>>>8*(w?y:1-y)}function c(a,b,h,w){0>b&&(b=4294967295+b+1);for(var y=0,I=Math.min(a.length-h,4);y<I;y++)a[h+y]=b>>>8*(w?y:3-y)&255}function l(a,b,h,w,y,I){if(b>y||b<I)throw new TypeError("value is out of bounds");if(h+w>a.length)throw new TypeError("index out of range");}function q(a,b,h,w,y){y||l(a,b,h,4,3.4028234663852886E38,-3.4028234663852886E38);v.write(a,b,h,w,23,4);return h+4}function r(a,
|
|
||||||
b,h,w,y){y||l(a,b,h,8,1.7976931348623157E308,-1.7976931348623157E308);v.write(a,b,h,w,52,8);return h+8}function k(a){for(var b=[],h=0;h<a.length;h++){var w=a.charCodeAt(h);if(127>=w)b.push(w);else{var y=h;55296<=w&&57343>=w&&h++;w=encodeURIComponent(a.slice(y,h+1)).substr(1).split("%");for(y=0;y<w.length;y++)b.push(parseInt(w[y],16))}}return b}function u(a){for(var b=[],h=0;h<a.length;h++)b.push(a.charCodeAt(h)&255);return b}function d(a,b,h,w,y){y&&(w-=w%y);for(y=0;y<w&&!(y+h>=b.length||y>=a.length);y++)b[y+
|
|
||||||
h]=a[y];return y}function g(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var n=C("base64-js"),v=C("ieee754"),z=C("is-array");A.Buffer=e;A.SlowBuffer=e;A.INSPECT_MAX_BYTES=50;e.poolSize=8192;var G=1073741823;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(h){return!1}}();e.isBuffer=function(a){return!(null==
|
|
||||||
a||!a._isBuffer)};e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");for(var h=a.length,w=b.length,y=0,I=Math.min(h,w);y<I&&a[y]===b[y];y++);y!==I&&(h=a[y],w=b[y]);return h<w?-1:w<h?1:0};e.isEncoding=function(a){switch(String(a).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};e.concat=function(a,b){if(!z(a))throw new TypeError("Usage: Buffer.concat(list[, length])");
|
|
||||||
if(0===a.length)return new e(0);if(1===a.length)return a[0];var h;if(void 0===b)for(h=b=0;h<a.length;h++)b+=a[h].length;var w=new e(b),y=0;for(h=0;h<a.length;h++){var I=a[h];I.copy(w,y);y+=I.length}return w};e.byteLength=function(a,b){a+="";switch(b||"utf8"){case "ascii":case "binary":case "raw":var h=a.length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":h=2*a.length;break;case "hex":h=a.length>>>1;break;case "utf8":case "utf-8":h=k(a).length;break;case "base64":h=n.toByteArray(a).length;
|
|
||||||
break;default:h=a.length}return h};e.prototype.length=void 0;e.prototype.parent=void 0;e.prototype.toString=function(a,b,h){var w=!1;b>>>=0;h=void 0===h||Infinity===h?this.length:h>>>0;a||(a="utf8");0>b&&(b=0);h>this.length&&(h=this.length);if(h<=b)return"";for(;;)switch(a){case "hex":a=b;b=h;h=this.length;if(!a||0>a)a=0;if(!b||0>b||b>h)b=h;w="";for(h=a;h<b;h++)a=w,w=this[h],w=16>w?"0"+w.toString(16):w.toString(16),w=a+w;return w;case "utf8":case "utf-8":w=a="";for(h=Math.min(this.length,h);b<h;b++)127>=
|
|
||||||
this[b]?(a+=g(w)+String.fromCharCode(this[b]),w=""):w+="%"+this[b].toString(16);return a+g(w);case "ascii":return p(this,b,h);case "binary":return p(this,b,h);case "base64":return b=0===b&&h===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(b,h)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,h);h="";for(a=0;a<b.length;a+=2)h+=String.fromCharCode(b[a]+256*b[a+1]);return h;default:if(w)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase();w=!0}};
|
|
||||||
e.prototype.equals=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return 0===e.compare(this,a)};e.prototype.inspect=function(){var a="",b=A.INSPECT_MAX_BYTES;0<this.length&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... "));return"<Buffer "+a+">"};e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return e.compare(this,a)};e.prototype.get=function(a){console.log(".get() is deprecated. Access using array indexes instead.");
|
|
||||||
return this.readUInt8(a)};e.prototype.set=function(a,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(a,b)};e.prototype.write=function(a,b,h,w){if(isFinite(b))isFinite(h)||(w=h,h=void 0);else{var y=w;w=b;b=h;h=y}b=Number(b)||0;y=this.length-b;h?(h=Number(h),h>y&&(h=y)):h=y;w=String(w||"utf8").toLowerCase();switch(w){case "hex":b=Number(b)||0;w=this.length-b;h?(h=Number(h),h>w&&(h=w)):h=w;w=a.length;if(0!==w%2)throw Error("Invalid hex string");h>w/
|
|
||||||
2&&(h=w/2);for(w=0;w<h;w++){y=parseInt(a.substr(2*w,2),16);if(isNaN(y))throw Error("Invalid hex string");this[b+w]=y}a=w;break;case "utf8":case "utf-8":a=d(k(a),this,b,h);break;case "ascii":a=d(u(a),this,b,h);break;case "binary":a=d(u(a),this,b,h);break;case "base64":a=d(n.toByteArray(a),this,b,h);break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":y=[];for(var I=0;I<a.length;I++){var K=a.charCodeAt(I);w=K>>8;K%=256;y.push(K);y.push(w)}a=d(y,this,b,h,2);break;default:throw new TypeError("Unknown encoding: "+
|
|
||||||
w);}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.slice=function(a,b){var h=this.length;a=~~a;b=void 0===b?h:~~b;0>a?(a+=h,0>a&&(a=0)):a>h&&(a=h);0>b?(b+=h,0>b&&(b=0)):b>h&&(b=h);b<a&&(b=a);if(e.TYPED_ARRAY_SUPPORT)return e._augment(this.subarray(a,b));h=b-a;for(var w=new e(h,void 0,!0),y=0;y<h;y++)w[y]=this[y+a];return w};e.prototype.readUInt8=function(a,b){b||t(a,1,this.length);return this[a]};e.prototype.readUInt16LE=
|
|
||||||
function(a,b){b||t(a,2,this.length);return this[a]|this[a+1]<<8};e.prototype.readUInt16BE=function(a,b){b||t(a,2,this.length);return this[a]<<8|this[a+1]};e.prototype.readUInt32LE=function(a,b){b||t(a,4,this.length);return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]};e.prototype.readUInt32BE=function(a,b){b||t(a,4,this.length);return 16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])};e.prototype.readInt8=function(a,b){b||t(a,1,this.length);return this[a]&128?-1*(255-this[a]+1):this[a]};
|
|
||||||
e.prototype.readInt16LE=function(a,b){b||t(a,2,this.length);var h=this[a]|this[a+1]<<8;return h&32768?h|4294901760:h};e.prototype.readInt16BE=function(a,b){b||t(a,2,this.length);var h=this[a+1]|this[a]<<8;return h&32768?h|4294901760:h};e.prototype.readInt32LE=function(a,b){b||t(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};e.prototype.readInt32BE=function(a,b){b||t(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};e.prototype.readFloatLE=function(a,
|
|
||||||
b){b||t(a,4,this.length);return v.read(this,a,!0,23,4)};e.prototype.readFloatBE=function(a,b){b||t(a,4,this.length);return v.read(this,a,!1,23,4)};e.prototype.readDoubleLE=function(a,b){b||t(a,8,this.length);return v.read(this,a,!0,52,8)};e.prototype.readDoubleBE=function(a,b){b||t(a,8,this.length);return v.read(this,a,!1,52,8)};e.prototype.writeUInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,255,0);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a;return b+1};e.prototype.writeUInt16LE=function(a,
|
|
||||||
b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeUInt16BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeUInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):c(this,a,b,!0);return b+4};e.prototype.writeUInt32BE=function(a,
|
|
||||||
b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a;return b+1};e.prototype.writeInt16LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeInt16BE=function(a,
|
|
||||||
b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):c(this,a,b,!0);return b+4};e.prototype.writeInt32BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+
|
|
||||||
2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeFloatLE=function(a,b,h){return q(this,a,b,!0,h)};e.prototype.writeFloatBE=function(a,b,h){return q(this,a,b,!1,h)};e.prototype.writeDoubleLE=function(a,b,h){return r(this,a,b,!0,h)};e.prototype.writeDoubleBE=function(a,b,h){return r(this,a,b,!1,h)};e.prototype.copy=function(a,b,h,w){h||(h=0);w||0===w||(w=this.length);b||(b=0);if(w!==h&&0!==a.length&&0!==this.length){if(w<h)throw new TypeError("sourceEnd < sourceStart");if(0>b||b>=a.length)throw new TypeError("targetStart out of bounds");
|
|
||||||
if(0>h||h>=this.length)throw new TypeError("sourceStart out of bounds");if(0>w||w>this.length)throw new TypeError("sourceEnd out of bounds");w>this.length&&(w=this.length);a.length-b<w-h&&(w=a.length-b+h);w-=h;if(1E3>w||!e.TYPED_ARRAY_SUPPORT)for(var y=0;y<w;y++)a[y+b]=this[y+h];else a._set(this.subarray(h,h+w),b)}};e.prototype.fill=function(a,b,h){a||(a=0);b||(b=0);h||(h=this.length);if(h<b)throw new TypeError("end < start");if(h!==b&&0!==this.length){if(0>b||b>=this.length)throw new TypeError("start out of bounds");
|
|
||||||
if(0>h||h>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;b<h;b++)this[b]=a;else{a=k(a.toString());for(var w=a.length;b<h;b++)this[b]=a[b%w]}return this}};e.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return(new e(this)).buffer;for(var a=new Uint8Array(this.length),b=0,h=a.length;b<h;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser");};var D=e.prototype;e._augment=
|
|
||||||
function(a){a.constructor=e;a._isBuffer=!0;a._get=a.get;a._set=a.set;a.get=D.get;a.set=D.set;a.write=D.write;a.toString=D.toString;a.toLocaleString=D.toString;a.toJSON=D.toJSON;a.equals=D.equals;a.compare=D.compare;a.copy=D.copy;a.slice=D.slice;a.readUInt8=D.readUInt8;a.readUInt16LE=D.readUInt16LE;a.readUInt16BE=D.readUInt16BE;a.readUInt32LE=D.readUInt32LE;a.readUInt32BE=D.readUInt32BE;a.readInt8=D.readInt8;a.readInt16LE=D.readInt16LE;a.readInt16BE=D.readInt16BE;a.readInt32LE=D.readInt32LE;a.readInt32BE=
|
|
||||||
D.readInt32BE;a.readFloatLE=D.readFloatLE;a.readFloatBE=D.readFloatBE;a.readDoubleLE=D.readDoubleLE;a.readDoubleBE=D.readDoubleBE;a.writeUInt8=D.writeUInt8;a.writeUInt16LE=D.writeUInt16LE;a.writeUInt16BE=D.writeUInt16BE;a.writeUInt32LE=D.writeUInt32LE;a.writeUInt32BE=D.writeUInt32BE;a.writeInt8=D.writeInt8;a.writeInt16LE=D.writeInt16LE;a.writeInt16BE=D.writeInt16BE;a.writeInt32LE=D.writeInt32LE;a.writeInt32BE=D.writeInt32BE;a.writeFloatLE=D.writeFloatLE;a.writeFloatBE=D.writeFloatBE;a.writeDoubleLE=
|
|
||||||
D.writeDoubleLE;a.writeDoubleBE=D.writeDoubleBE;a.fill=D.fill;a.inspect=D.inspect;a.toArrayBuffer=D.toArrayBuffer;return a};var L=/[^+\/0-9A-z]/g},{"base64-js":2,ieee754:6,"is-array":7}],6:[function(C,J,A){A.read=function(e,p,t,m,f){var c=8*f-m-1;var l=(1<<c)-1,q=l>>1,r=-7;f=t?f-1:0;var k=t?-1:1,u=e[p+f];f+=k;t=u&(1<<-r)-1;u>>=-r;for(r+=c;0<r;t=256*t+e[p+f],f+=k,r-=8);c=t&(1<<-r)-1;t>>=-r;for(r+=m;0<r;c=256*c+e[p+f],f+=k,r-=8);if(0===t)t=1-q;else{if(t===l)return c?NaN:Infinity*(u?-1:1);c+=Math.pow(2,
|
|
||||||
m);t-=q}return(u?-1:1)*c*Math.pow(2,t-m)};A.write=function(e,p,t,m,f,c){var l,q=8*c-f-1,r=(1<<q)-1,k=r>>1,u=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;c=m?0:c-1;var d=m?1:-1,g=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,m=r):(m=Math.floor(Math.log(p)/Math.LN2),1>p*(l=Math.pow(2,-m))&&(m--,l*=2),p=1<=m+k?p+u/l:p+u*Math.pow(2,1-k),2<=p*l&&(m++,l/=2),m+k>=r?(p=0,m=r):1<=m+k?(p=(p*l-1)*Math.pow(2,f),m+=k):(p=p*Math.pow(2,k-1)*Math.pow(2,f),m=0));for(;8<=f;e[t+c]=p&255,c+=
|
|
||||||
d,p/=256,f-=8);m=m<<f|p;for(q+=f;0<q;e[t+c]=m&255,c+=d,m/=256,q-=8);e[t+c-d]|=128*g}},{}],7:[function(C,J,A){var e=Object.prototype.toString;J.exports=Array.isArray||function(p){return!!p&&"[object Array]"==e.call(p)}},{}],8:[function(C,J,A){(function(e){function p(c,l){for(var q=0,r=c.length-1;0<=r;r--){var k=c[r];"."===k?c.splice(r,1):".."===k?(c.splice(r,1),q++):q&&(c.splice(r,1),q--)}if(l)for(;q--;q)c.unshift("..");return c}function t(c,l){if(c.filter)return c.filter(l);for(var q=[],r=0;r<c.length;r++)l(c[r],
|
|
||||||
r,c)&&q.push(c[r]);return q}var m=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;A.resolve=function(){for(var c="",l=!1,q=arguments.length-1;-1<=q&&!l;q--){var r=0<=q?arguments[q]:e.cwd();if("string"!==typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(c=r+"/"+c,l="/"===r.charAt(0))}c=p(t(c.split("/"),function(k){return!!k}),!l).join("/");return(l?"/":"")+c||"."};A.normalize=function(c){var l=A.isAbsolute(c),q="/"===f(c,-1);(c=p(t(c.split("/"),function(r){return!!r}),
|
|
||||||
!l).join("/"))||l||(c=".");c&&q&&(c+="/");return(l?"/":"")+c};A.isAbsolute=function(c){return"/"===c.charAt(0)};A.join=function(){var c=Array.prototype.slice.call(arguments,0);return A.normalize(t(c,function(l,q){if("string"!==typeof l)throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))};A.relative=function(c,l){function q(n){for(var v=0;v<n.length&&""===n[v];v++);for(var z=n.length-1;0<=z&&""===n[z];z--);return v>z?[]:n.slice(v,z-v+1)}c=A.resolve(c).substr(1);l=A.resolve(l).substr(1);
|
|
||||||
for(var r=q(c.split("/")),k=q(l.split("/")),u=Math.min(r.length,k.length),d=u,g=0;g<u;g++)if(r[g]!==k[g]){d=g;break}u=[];for(g=d;g<r.length;g++)u.push("..");u=u.concat(k.slice(d));return u.join("/")};A.sep="/";A.delimiter=":";A.dirname=function(c){var l=m.exec(c).slice(1);c=l[0];l=l[1];if(!c&&!l)return".";l&&(l=l.substr(0,l.length-1));return c+l};A.basename=function(c,l){var q=m.exec(c).slice(1)[2];l&&q.substr(-1*l.length)===l&&(q=q.substr(0,q.length-l.length));return q};A.extname=function(c){return m.exec(c).slice(1)[3]};
|
|
||||||
var f="b"==="ab".substr(-1)?function(c,l,q){return c.substr(l,q)}:function(c,l,q){0>l&&(l=c.length+l);return c.substr(l,q)}}).call(this,C("g5I+bs"))},{"g5I+bs":9}],9:[function(C,J,A){function e(){}C=J.exports={};C.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(t){return window.setImmediate(t)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var p=[];window.addEventListener("message",function(t){var m=t.source;m!==window&&null!==
|
|
||||||
m||"process-tick"!==t.data||(t.stopPropagation(),0<p.length&&p.shift()())},!0);return function(t){p.push(t);window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}();C.title="browser";C.browser=!0;C.env={};C.argv=[];C.on=e;C.addListener=e;C.once=e;C.off=e;C.removeListener=e;C.removeAllListeners=e;C.emit=e;C.binding=function(p){throw Error("process.binding is not supported");};C.cwd=function(){return"/"};C.chdir=function(p){throw Error("process.chdir is not supported");}},{}],
|
|
||||||
10:[function(C,J,A){function e(){this._array=[];this._set=m?new Map:Object.create(null)}var p=C("./util"),t=Object.prototype.hasOwnProperty,m="undefined"!==typeof Map;e.fromArray=function(f,c){for(var l=new e,q=0,r=f.length;q<r;q++)l.add(f[q],c);return l};e.prototype.size=function(){return m?this._set.size:Object.getOwnPropertyNames(this._set).length};e.prototype.add=function(f,c){var l=m?f:p.toSetString(f),q=m?this.has(f):t.call(this._set,l),r=this._array.length;q&&!c||this._array.push(f);q||(m?
|
|
||||||
this._set.set(f,r):this._set[l]=r)};e.prototype.has=function(f){if(m)return this._set.has(f);f=p.toSetString(f);return t.call(this._set,f)};e.prototype.indexOf=function(f){if(m){var c=this._set.get(f);if(0<=c)return c}else if(c=p.toSetString(f),t.call(this._set,c))return this._set[c];throw Error('"'+f+'" is not in the set.');};e.prototype.at=function(f){if(0<=f&&f<this._array.length)return this._array[f];throw Error("No element indexed by "+f);};e.prototype.toArray=function(){return this._array.slice()};
|
|
||||||
A.ArraySet=e},{"./util":19}],11:[function(C,J,A){var e=C("./base64");A.encode=function(p){var t="",m=0>p?(-p<<1)+1:p<<1;do p=m&31,m>>>=5,0<m&&(p|=32),t+=e.encode(p);while(0<m);return t};A.decode=function(p,t,m){var f=p.length,c=0,l=0;do{if(t>=f)throw Error("Expected more digits in base 64 VLQ value.");var q=e.decode(p.charCodeAt(t++));if(-1===q)throw Error("Invalid base64 digit: "+p.charAt(t-1));var r=!!(q&32);q&=31;c+=q<<l;l+=5}while(r);p=c>>1;m.value=1===(c&1)?-p:p;m.rest=t}},{"./base64":12}],12:[function(C,
|
|
||||||
J,A){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");A.encode=function(p){if(0<=p&&p<e.length)return e[p];throw new TypeError("Must be between 0 and 63: "+p);};A.decode=function(p){return 65<=p&&90>=p?p-65:97<=p&&122>=p?p-97+26:48<=p&&57>=p?p-48+52:43==p?62:47==p?63:-1}},{}],13:[function(C,J,A){function e(p,t,m,f,c,l){var q=Math.floor((t-p)/2)+p,r=c(m,f[q],!0);return 0===r?q:0<r?1<t-q?e(q,t,m,f,c,l):l==A.LEAST_UPPER_BOUND?t<f.length?t:-1:q:1<q-p?e(p,q,m,f,c,l):l==
|
|
||||||
A.LEAST_UPPER_BOUND?q:0>p?-1:p}A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.search=function(p,t,m,f){if(0===t.length)return-1;p=e(-1,t.length,p,t,m,f||A.GREATEST_LOWER_BOUND);if(0>p)return-1;for(;0<=p-1&&0===m(t[p],t[p-1],!0);)--p;return p}},{}],14:[function(C,J,A){function e(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var p=C("./util");e.prototype.unsortedForEach=function(t,m){this._array.forEach(t,m)};e.prototype.add=function(t){var m=this._last,f=m.generatedLine,
|
|
||||||
c=t.generatedLine,l=m.generatedColumn,q=t.generatedColumn;c>f||c==f&&q>=l||0>=p.compareByGeneratedPositionsInflated(m,t)?this._last=t:this._sorted=!1;this._array.push(t)};e.prototype.toArray=function(){this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};A.MappingList=e},{"./util":19}],15:[function(C,J,A){function e(t,m,f){var c=t[m];t[m]=t[f];t[f]=c}function p(t,m,f,c){if(f<c){var l=f-1;e(t,Math.round(f+Math.random()*(c-f)),c);for(var q=t[c],
|
|
||||||
r=f;r<c;r++)0>=m(t[r],q)&&(l+=1,e(t,l,r));e(t,l+1,r);l+=1;p(t,m,f,l-1);p(t,m,l+1,c)}}A.quickSort=function(t,m){p(t,m,0,t.length-1)}},{}],16:[function(C,J,A){function e(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));return null!=d.sections?new m(d,u):new p(d,u)}function p(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version"),n=f.getArg(d,"sources"),v=f.getArg(d,"names",[]),z=f.getArg(d,"sourceRoot",null),G=f.getArg(d,"sourcesContent",null),D=f.getArg(d,
|
|
||||||
"mappings");d=f.getArg(d,"file",null);if(g!=this._version)throw Error("Unsupported version: "+g);z&&(z=f.normalize(z));n=n.map(String).map(f.normalize).map(function(L){return z&&f.isAbsolute(z)&&f.isAbsolute(L)?f.relative(z,L):L});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(n,!0);this.sourceRoot=z;this.sourcesContent=G;this._mappings=D;this._sourceMapURL=u;this.file=d}function t(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source=
|
|
||||||
null}function m(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version");d=f.getArg(d,"sections");if(g!=this._version)throw Error("Unsupported version: "+g);this._sources=new l;this._names=new l;var n={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw Error("Support for url field in sections not implemented.");var z=f.getArg(v,"offset"),G=f.getArg(z,"line"),D=f.getArg(z,"column");if(G<n.line||G===n.line&&D<n.column)throw Error("Section offsets must be ordered and non-overlapping.");
|
|
||||||
n=z;return{generatedOffset:{generatedLine:G+1,generatedColumn:D+1},consumer:new e(f.getArg(v,"map"),u)}})}var f=C("./util"),c=C("./binary-search"),l=C("./array-set").ArraySet,q=C("./base64-vlq"),r=C("./quick-sort").quickSort;e.fromSourceMap=function(k){return p.fromSourceMap(k)};e.prototype._version=3;e.prototype.__generatedMappings=null;Object.defineProperty(e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){this.__generatedMappings||this._parseMappings(this._mappings,
|
|
||||||
this.sourceRoot);return this.__generatedMappings}});e.prototype.__originalMappings=null;Object.defineProperty(e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});e.prototype._charIsMappingSeparator=function(k,u){var d=k.charAt(u);return";"===d||","===d};e.prototype._parseMappings=function(k,u){throw Error("Subclasses must implement _parseMappings");};e.GENERATED_ORDER=
|
|
||||||
1;e.ORIGINAL_ORDER=2;e.GREATEST_LOWER_BOUND=1;e.LEAST_UPPER_BOUND=2;e.prototype.eachMapping=function(k,u,d){u=u||null;switch(d||e.GENERATED_ORDER){case e.GENERATED_ORDER:d=this._generatedMappings;break;case e.ORIGINAL_ORDER:d=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var g=this.sourceRoot;d.map(function(n){var v=null===n.source?null:this._sources.at(n.source);v=f.computeSourceURL(g,v,this._sourceMapURL);return{source:v,generatedLine:n.generatedLine,generatedColumn:n.generatedColumn,
|
|
||||||
originalLine:n.originalLine,originalColumn:n.originalColumn,name:null===n.name?null:this._names.at(n.name)}},this).forEach(k,u)};e.prototype.allGeneratedPositionsFor=function(k){var u=f.getArg(k,"line"),d={source:f.getArg(k,"source"),originalLine:u,originalColumn:f.getArg(k,"column",0)};null!=this.sourceRoot&&(d.source=f.relative(this.sourceRoot,d.source));if(!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var g=[];d=this._findMapping(d,this._originalMappings,"originalLine",
|
|
||||||
"originalColumn",f.compareByOriginalPositions,c.LEAST_UPPER_BOUND);if(0<=d){var n=this._originalMappings[d];if(void 0===k.column)for(u=n.originalLine;n&&n.originalLine===u;)g.push({line:f.getArg(n,"generatedLine",null),column:f.getArg(n,"generatedColumn",null),lastColumn:f.getArg(n,"lastGeneratedColumn",null)}),n=this._originalMappings[++d];else for(k=n.originalColumn;n&&n.originalLine===u&&n.originalColumn==k;)g.push({line:f.getArg(n,"generatedLine",null),column:f.getArg(n,"generatedColumn",null),
|
|
||||||
lastColumn:f.getArg(n,"lastGeneratedColumn",null)}),n=this._originalMappings[++d]}return g};A.SourceMapConsumer=e;p.prototype=Object.create(e.prototype);p.prototype.consumer=e;p.fromSourceMap=function(k,u){var d=Object.create(p.prototype),g=d._names=l.fromArray(k._names.toArray(),!0),n=d._sources=l.fromArray(k._sources.toArray(),!0);d.sourceRoot=k._sourceRoot;d.sourcesContent=k._generateSourcesContent(d._sources.toArray(),d.sourceRoot);d.file=k._file;d._sourceMapURL=u;for(var v=k._mappings.toArray().slice(),
|
|
||||||
z=d.__generatedMappings=[],G=d.__originalMappings=[],D=0,L=v.length;D<L;D++){var a=v[D],b=new t;b.generatedLine=a.generatedLine;b.generatedColumn=a.generatedColumn;a.source&&(b.source=n.indexOf(a.source),b.originalLine=a.originalLine,b.originalColumn=a.originalColumn,a.name&&(b.name=g.indexOf(a.name)),G.push(b));z.push(b)}r(d.__originalMappings,f.compareByOriginalPositions);return d};p.prototype._version=3;Object.defineProperty(p.prototype,"sources",{get:function(){return this._sources.toArray().map(function(k){return f.computeSourceURL(this.sourceRoot,
|
|
||||||
k,this._sourceMapURL)},this)}});p.prototype._parseMappings=function(k,u){for(var d=1,g=0,n=0,v=0,z=0,G=0,D=k.length,L=0,a={},b={},h=[],w=[],y,I,K,N,P;L<D;)if(";"===k.charAt(L))d++,L++,g=0;else if(","===k.charAt(L))L++;else{y=new t;y.generatedLine=d;for(N=L;N<D&&!this._charIsMappingSeparator(k,N);N++);I=k.slice(L,N);if(K=a[I])L+=I.length;else{for(K=[];L<N;)q.decode(k,L,b),P=b.value,L=b.rest,K.push(P);if(2===K.length)throw Error("Found a source, but no line and column");if(3===K.length)throw Error("Found a source and line, but no column");
|
|
||||||
a[I]=K}y.generatedColumn=g+K[0];g=y.generatedColumn;1<K.length&&(y.source=z+K[1],z+=K[1],y.originalLine=n+K[2],n=y.originalLine,y.originalLine+=1,y.originalColumn=v+K[3],v=y.originalColumn,4<K.length&&(y.name=G+K[4],G+=K[4]));w.push(y);"number"===typeof y.originalLine&&h.push(y)}r(w,f.compareByGeneratedPositionsDeflated);this.__generatedMappings=w;r(h,f.compareByOriginalPositions);this.__originalMappings=h};p.prototype._findMapping=function(k,u,d,g,n,v){if(0>=k[d])throw new TypeError("Line must be greater than or equal to 1, got "+
|
|
||||||
k[d]);if(0>k[g])throw new TypeError("Column must be greater than or equal to 0, got "+k[g]);return c.search(k,u,n,v)};p.prototype.computeColumnSpans=function(){for(var k=0;k<this._generatedMappings.length;++k){var u=this._generatedMappings[k];if(k+1<this._generatedMappings.length){var d=this._generatedMappings[k+1];if(u.generatedLine===d.generatedLine){u.lastGeneratedColumn=d.generatedColumn-1;continue}}u.lastGeneratedColumn=Infinity}};p.prototype.originalPositionFor=function(k){var u={generatedLine:f.getArg(k,
|
|
||||||
"line"),generatedColumn:f.getArg(k,"column")};k=this._findMapping(u,this._generatedMappings,"generatedLine","generatedColumn",f.compareByGeneratedPositionsDeflated,f.getArg(k,"bias",e.GREATEST_LOWER_BOUND));if(0<=k&&(k=this._generatedMappings[k],k.generatedLine===u.generatedLine)){u=f.getArg(k,"source",null);null!==u&&(u=this._sources.at(u),u=f.computeSourceURL(this.sourceRoot,u,this._sourceMapURL));var d=f.getArg(k,"name",null);null!==d&&(d=this._names.at(d));return{source:u,line:f.getArg(k,"originalLine",
|
|
||||||
null),column:f.getArg(k,"originalColumn",null),name:d}}return{source:null,line:null,column:null,name:null}};p.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(k){return null==k}):!1};p.prototype.sourceContentFor=function(k,u){if(!this.sourcesContent)return null;var d=k;null!=this.sourceRoot&&(d=f.relative(this.sourceRoot,d));if(this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];
|
|
||||||
var g=this.sources,n;for(n=0;n<g.length;++n)if(g[n]==k)return this.sourcesContent[n];var v;if(null!=this.sourceRoot&&(v=f.urlParse(this.sourceRoot))){g=d.replace(/^file:\/\//,"");if("file"==v.scheme&&this._sources.has(g))return this.sourcesContent[this._sources.indexOf(g)];if((!v.path||"/"==v.path)&&this._sources.has("/"+d))return this.sourcesContent[this._sources.indexOf("/"+d)]}if(u)return null;throw Error('"'+d+'" is not in the SourceMap.');};p.prototype.generatedPositionFor=function(k){var u=
|
|
||||||
f.getArg(k,"source");null!=this.sourceRoot&&(u=f.relative(this.sourceRoot,u));if(!this._sources.has(u))return{line:null,column:null,lastColumn:null};u=this._sources.indexOf(u);u={source:u,originalLine:f.getArg(k,"line"),originalColumn:f.getArg(k,"column")};k=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",f.compareByOriginalPositions,f.getArg(k,"bias",e.GREATEST_LOWER_BOUND));return 0<=k&&(k=this._originalMappings[k],k.source===u.source)?{line:f.getArg(k,"generatedLine",
|
|
||||||
null),column:f.getArg(k,"generatedColumn",null),lastColumn:f.getArg(k,"lastGeneratedColumn",null)}:{line:null,column:null,lastColumn:null}};A.BasicSourceMapConsumer=p;m.prototype=Object.create(e.prototype);m.prototype.constructor=e;m.prototype._version=3;Object.defineProperty(m.prototype,"sources",{get:function(){for(var k=[],u=0;u<this._sections.length;u++)for(var d=0;d<this._sections[u].consumer.sources.length;d++)k.push(this._sections[u].consumer.sources[d]);return k}});m.prototype.originalPositionFor=
|
|
||||||
function(k){var u={generatedLine:f.getArg(k,"line"),generatedColumn:f.getArg(k,"column")},d=c.search(u,this._sections,function(g,n){var v=g.generatedLine-n.generatedOffset.generatedLine;return v?v:g.generatedColumn-n.generatedOffset.generatedColumn});return(d=this._sections[d])?d.consumer.originalPositionFor({line:u.generatedLine-(d.generatedOffset.generatedLine-1),column:u.generatedColumn-(d.generatedOffset.generatedLine===u.generatedLine?d.generatedOffset.generatedColumn-1:0),bias:k.bias}):{source:null,
|
|
||||||
line:null,column:null,name:null}};m.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(k){return k.consumer.hasContentsOfAllSources()})};m.prototype.sourceContentFor=function(k,u){for(var d=0;d<this._sections.length;d++){var g=this._sections[d].consumer.sourceContentFor(k,!0);if(g)return g}if(u)return null;throw Error('"'+k+'" is not in the SourceMap.');};m.prototype.generatedPositionFor=function(k){for(var u=0;u<this._sections.length;u++){var d=this._sections[u];if(-1!==
|
|
||||||
d.consumer.sources.indexOf(f.getArg(k,"source"))){var g=d.consumer.generatedPositionFor(k);if(g)return{line:g.line+(d.generatedOffset.generatedLine-1),column:g.column+(d.generatedOffset.generatedLine===g.line?d.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}};m.prototype._parseMappings=function(k,u){this.__generatedMappings=[];this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var g=this._sections[d],n=g.consumer._generatedMappings,v=0;v<n.length;v++){var z=
|
|
||||||
n[v],G=g.consumer._sources.at(z.source);G=f.computeSourceURL(g.consumer.sourceRoot,G,this._sourceMapURL);this._sources.add(G);G=this._sources.indexOf(G);var D=null;z.name&&(D=g.consumer._names.at(z.name),this._names.add(D),D=this._names.indexOf(D));z={source:G,generatedLine:z.generatedLine+(g.generatedOffset.generatedLine-1),generatedColumn:z.generatedColumn+(g.generatedOffset.generatedLine===z.generatedLine?g.generatedOffset.generatedColumn-1:0),originalLine:z.originalLine,originalColumn:z.originalColumn,
|
|
||||||
name:D};this.__generatedMappings.push(z);"number"===typeof z.originalLine&&this.__originalMappings.push(z)}r(this.__generatedMappings,f.compareByGeneratedPositionsDeflated);r(this.__originalMappings,f.compareByOriginalPositions)};A.IndexedSourceMapConsumer=m},{"./array-set":10,"./base64-vlq":11,"./binary-search":13,"./quick-sort":15,"./util":19}],17:[function(C,J,A){function e(c){c||(c={});this._file=t.getArg(c,"file",null);this._sourceRoot=t.getArg(c,"sourceRoot",null);this._skipValidation=t.getArg(c,
|
|
||||||
"skipValidation",!1);this._sources=new m;this._names=new m;this._mappings=new f;this._sourcesContents=null}var p=C("./base64-vlq"),t=C("./util"),m=C("./array-set").ArraySet,f=C("./mapping-list").MappingList;e.prototype._version=3;e.fromSourceMap=function(c){var l=c.sourceRoot,q=new e({file:c.file,sourceRoot:l});c.eachMapping(function(r){var k={generated:{line:r.generatedLine,column:r.generatedColumn}};null!=r.source&&(k.source=r.source,null!=l&&(k.source=t.relative(l,k.source)),k.original={line:r.originalLine,
|
|
||||||
column:r.originalColumn},null!=r.name&&(k.name=r.name));q.addMapping(k)});c.sources.forEach(function(r){var k=r;null!==l&&(k=t.relative(l,r));q._sources.has(k)||q._sources.add(k);k=c.sourceContentFor(r);null!=k&&q.setSourceContent(r,k)});return q};e.prototype.addMapping=function(c){var l=t.getArg(c,"generated"),q=t.getArg(c,"original",null),r=t.getArg(c,"source",null);c=t.getArg(c,"name",null);this._skipValidation||this._validateMapping(l,q,r,c);null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r));
|
|
||||||
null!=c&&(c=String(c),this._names.has(c)||this._names.add(c));this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:null!=q&&q.line,originalColumn:null!=q&&q.column,source:r,name:c})};e.prototype.setSourceContent=function(c,l){var q=c;null!=this._sourceRoot&&(q=t.relative(this._sourceRoot,q));null!=l?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(q)]=l):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(q)],
|
|
||||||
0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};e.prototype.applySourceMap=function(c,l,q){var r=l;if(null==l){if(null==c.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=c.file}var k=this._sourceRoot;null!=k&&(r=t.relative(k,r));var u=new m,d=new m;this._mappings.unsortedForEach(function(g){if(g.source===r&&null!=g.originalLine){var n=c.originalPositionFor({line:g.originalLine,
|
|
||||||
column:g.originalColumn});null!=n.source&&(g.source=n.source,null!=q&&(g.source=t.join(q,g.source)),null!=k&&(g.source=t.relative(k,g.source)),g.originalLine=n.line,g.originalColumn=n.column,null!=n.name&&(g.name=n.name))}n=g.source;null==n||u.has(n)||u.add(n);g=g.name;null==g||d.has(g)||d.add(g)},this);this._sources=u;this._names=d;c.sources.forEach(function(g){var n=c.sourceContentFor(g);null!=n&&(null!=q&&(g=t.join(q,g)),null!=k&&(g=t.relative(k,g)),this.setSourceContent(g,n))},this)};e.prototype._validateMapping=
|
|
||||||
function(c,l,q,r){if(l&&"number"!==typeof l.line&&"number"!==typeof l.column)throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(c&&"line"in c&&"column"in c&&0<c.line&&0<=c.column&&!l&&!q&&!r||c&&"line"in c&&"column"in c&&l&&"line"in l&&"column"in l&&0<c.line&&0<=c.column&&0<l.line&&0<=l.column&&
|
|
||||||
q))throw Error("Invalid mapping: "+JSON.stringify({generated:c,source:q,original:l,name:r}));};e.prototype._serializeMappings=function(){for(var c=0,l=1,q=0,r=0,k=0,u=0,d="",g,n,v,z=this._mappings.toArray(),G=0,D=z.length;G<D;G++){n=z[G];g="";if(n.generatedLine!==l)for(c=0;n.generatedLine!==l;)g+=";",l++;else if(0<G){if(!t.compareByGeneratedPositionsInflated(n,z[G-1]))continue;g+=","}g+=p.encode(n.generatedColumn-c);c=n.generatedColumn;null!=n.source&&(v=this._sources.indexOf(n.source),g+=p.encode(v-
|
|
||||||
u),u=v,g+=p.encode(n.originalLine-1-r),r=n.originalLine-1,g+=p.encode(n.originalColumn-q),q=n.originalColumn,null!=n.name&&(n=this._names.indexOf(n.name),g+=p.encode(n-k),k=n));d+=g}return d};e.prototype._generateSourcesContent=function(c,l){return c.map(function(q){if(!this._sourcesContents)return null;null!=l&&(q=t.relative(l,q));q=t.toSetString(q);return Object.prototype.hasOwnProperty.call(this._sourcesContents,q)?this._sourcesContents[q]:null},this)};e.prototype.toJSON=function(){var c={version:this._version,
|
|
||||||
sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};null!=this._file&&(c.file=this._file);null!=this._sourceRoot&&(c.sourceRoot=this._sourceRoot);this._sourcesContents&&(c.sourcesContent=this._generateSourcesContent(c.sources,c.sourceRoot));return c};e.prototype.toString=function(){return JSON.stringify(this.toJSON())};A.SourceMapGenerator=e},{"./array-set":10,"./base64-vlq":11,"./mapping-list":14,"./util":19}],18:[function(C,J,A){function e(f,c,l,q,r){this.children=
|
|
||||||
[];this.sourceContents={};this.line=null==f?null:f;this.column=null==c?null:c;this.source=null==l?null:l;this.name=null==r?null:r;this.$$$isSourceNode$$$=!0;null!=q&&this.add(q)}var p=C("./source-map-generator").SourceMapGenerator,t=C("./util"),m=/(\r?\n)/;e.fromStringWithSourceMap=function(f,c,l){function q(z,G){if(null===z||void 0===z.source)r.add(G);else{var D=l?t.join(l,z.source):z.source;r.add(new e(z.originalLine,z.originalColumn,D,G,z.name))}}var r=new e,k=f.split(m),u=0,d=function(){var z=
|
|
||||||
u<k.length?k[u++]:void 0,G=(u<k.length?k[u++]:void 0)||"";return z+G},g=1,n=0,v=null;c.eachMapping(function(z){if(null!==v)if(g<z.generatedLine)q(v,d()),g++,n=0;else{var G=k[u]||"",D=G.substr(0,z.generatedColumn-n);k[u]=G.substr(z.generatedColumn-n);n=z.generatedColumn;q(v,D);v=z;return}for(;g<z.generatedLine;)r.add(d()),g++;n<z.generatedColumn&&(G=k[u]||"",r.add(G.substr(0,z.generatedColumn)),k[u]=G.substr(z.generatedColumn),n=z.generatedColumn);v=z},this);u<k.length&&(v&&q(v,d()),r.add(k.splice(u).join("")));
|
|
||||||
c.sources.forEach(function(z){var G=c.sourceContentFor(z);null!=G&&(null!=l&&(z=t.join(l,z)),r.setSourceContent(z,G))});return r};e.prototype.add=function(f){if(Array.isArray(f))f.forEach(function(c){this.add(c)},this);else if(f.$$$isSourceNode$$$||"string"===typeof f)f&&this.children.push(f);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+f);return this};e.prototype.prepend=function(f){if(Array.isArray(f))for(var c=f.length-1;0<=c;c--)this.prepend(f[c]);
|
|
||||||
else if(f.$$$isSourceNode$$$||"string"===typeof f)this.children.unshift(f);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+f);return this};e.prototype.walk=function(f){for(var c,l=0,q=this.children.length;l<q;l++)c=this.children[l],c.$$$isSourceNode$$$?c.walk(f):""!==c&&f(c,{source:this.source,line:this.line,column:this.column,name:this.name})};e.prototype.join=function(f){var c,l=this.children.length;if(0<l){var q=[];for(c=0;c<l-1;c++)q.push(this.children[c]),
|
|
||||||
q.push(f);q.push(this.children[c]);this.children=q}return this};e.prototype.replaceRight=function(f,c){var l=this.children[this.children.length-1];l.$$$isSourceNode$$$?l.replaceRight(f,c):"string"===typeof l?this.children[this.children.length-1]=l.replace(f,c):this.children.push("".replace(f,c));return this};e.prototype.setSourceContent=function(f,c){this.sourceContents[t.toSetString(f)]=c};e.prototype.walkSourceContents=function(f){for(var c=0,l=this.children.length;c<l;c++)this.children[c].$$$isSourceNode$$$&&
|
|
||||||
this.children[c].walkSourceContents(f);var q=Object.keys(this.sourceContents);c=0;for(l=q.length;c<l;c++)f(t.fromSetString(q[c]),this.sourceContents[q[c]])};e.prototype.toString=function(){var f="";this.walk(function(c){f+=c});return f};e.prototype.toStringWithSourceMap=function(f){var c="",l=1,q=0,r=new p(f),k=!1,u=null,d=null,g=null,n=null;this.walk(function(v,z){c+=v;null!==z.source&&null!==z.line&&null!==z.column?(u===z.source&&d===z.line&&g===z.column&&n===z.name||r.addMapping({source:z.source,
|
|
||||||
original:{line:z.line,column:z.column},generated:{line:l,column:q},name:z.name}),u=z.source,d=z.line,g=z.column,n=z.name,k=!0):k&&(r.addMapping({generated:{line:l,column:q}}),u=null,k=!1);for(var G=0,D=v.length;G<D;G++)10===v.charCodeAt(G)?(l++,q=0,G+1===D?(u=null,k=!1):k&&r.addMapping({source:z.source,original:{line:z.line,column:z.column},generated:{line:l,column:q},name:z.name})):q++});this.walkSourceContents(function(v,z){r.setSourceContent(v,z)});return{code:c,map:r}};A.SourceNode=e},{"./source-map-generator":17,
|
|
||||||
"./util":19}],19:[function(C,J,A){function e(d){return(d=d.match(k))?{scheme:d[1],auth:d[2],host:d[3],port:d[4],path:d[5]}:null}function p(d){var g="";d.scheme&&(g+=d.scheme+":");g+="//";d.auth&&(g+=d.auth+"@");d.host&&(g+=d.host);d.port&&(g+=":"+d.port);d.path&&(g+=d.path);return g}function t(d){var g=d,n=e(d);if(n){if(!n.path)return d;g=n.path}d=A.isAbsolute(g);g=g.split(/\/+/);for(var v,z=0,G=g.length-1;0<=G;G--)v=g[G],"."===v?g.splice(G,1):".."===v?z++:0<z&&(""===v?(g.splice(G+1,z),z=0):(g.splice(G,
|
|
||||||
2),z--));g=g.join("/");""===g&&(g=d?"/":".");return n?(n.path=g,p(n)):g}function m(d,g){""===d&&(d=".");""===g&&(g=".");var n=e(g),v=e(d);v&&(d=v.path||"/");if(n&&!n.scheme)return v&&(n.scheme=v.scheme),p(n);if(n||g.match(u))return g;if(v&&!v.host&&!v.path)return v.host=g,p(v);n="/"===g.charAt(0)?g:t(d.replace(/\/+$/,"")+"/"+g);return v?(v.path=n,p(v)):n}function f(d){return d}function c(d){return q(d)?"$"+d:d}function l(d){return q(d)?d.slice(1):d}function q(d){if(!d)return!1;var g=d.length;if(9>
|
|
||||||
g||95!==d.charCodeAt(g-1)||95!==d.charCodeAt(g-2)||111!==d.charCodeAt(g-3)||116!==d.charCodeAt(g-4)||111!==d.charCodeAt(g-5)||114!==d.charCodeAt(g-6)||112!==d.charCodeAt(g-7)||95!==d.charCodeAt(g-8)||95!==d.charCodeAt(g-9))return!1;for(g-=10;0<=g;g--)if(36!==d.charCodeAt(g))return!1;return!0}function r(d,g){return d===g?0:null===d?1:null===g?-1:d>g?1:-1}A.getArg=function(d,g,n){if(g in d)return d[g];if(3===arguments.length)return n;throw Error('"'+g+'" is a required argument.');};var k=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,
|
|
||||||
u=/^data:.+,.+$/;A.urlParse=e;A.urlGenerate=p;A.normalize=t;A.join=m;A.isAbsolute=function(d){return"/"===d.charAt(0)||k.test(d)};A.relative=function(d,g){""===d&&(d=".");d=d.replace(/\/$/,"");for(var n=0;0!==g.indexOf(d+"/");){var v=d.lastIndexOf("/");if(0>v)return g;d=d.slice(0,v);if(d.match(/^([^\/]+:\/)?\/*$/))return g;++n}return Array(n+1).join("../")+g.substr(d.length+1)};C=!("__proto__"in Object.create(null));A.toSetString=C?f:c;A.fromSetString=C?f:l;A.compareByOriginalPositions=function(d,
|
|
||||||
g,n){var v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;if(0!==v||n)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v)return v;v=d.generatedLine-g.generatedLine;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsDeflated=function(d,g,n){var v=d.generatedLine-g.generatedLine;if(0!==v)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v||n)return v;v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-
|
|
||||||
g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsInflated=function(d,g){var n=d.generatedLine-g.generatedLine;if(0!==n)return n;n=d.generatedColumn-g.generatedColumn;if(0!==n)return n;n=r(d.source,g.source);if(0!==n)return n;n=d.originalLine-g.originalLine;if(0!==n)return n;n=d.originalColumn-g.originalColumn;return 0!==n?n:r(d.name,g.name)};A.parseSourceMapInput=function(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/,
|
|
||||||
""))};A.computeSourceURL=function(d,g,n){g=g||"";d&&("/"!==d[d.length-1]&&"/"!==g[0]&&(d+="/"),g=d+g);if(n){d=e(n);if(!d)throw Error("sourceMapURL could not be parsed");d.path&&(n=d.path.lastIndexOf("/"),0<=n&&(d.path=d.path.substring(0,n+1)));g=m(p(d),g)}return t(g)}},{}],20:[function(C,J,A){A.SourceMapGenerator=C("./lib/source-map-generator").SourceMapGenerator;A.SourceMapConsumer=C("./lib/source-map-consumer").SourceMapConsumer;A.SourceNode=C("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16,
|
|
||||||
"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(C,J,A){(function(e){function p(){return"browser"===a?!0:"node"===a?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function t(x){return function(B){for(var F=0;F<x.length;F++){var E=x[F](B);if(E)return E}return null}}function m(x,B){if(!x)return B;var F=n.dirname(x),E=/^\w+:\/\/[^\/]*/.exec(F);E=E?E[0]:"";var H=F.slice(E.length);
|
|
||||||
return E&&/^\/\w:/.test(H)?(E+="/",E+n.resolve(F.slice(E.length),B).replace(/\\/g,"/")):E+n.resolve(F.slice(E.length),B)}function f(x){var B=h[x.source];if(!B){var F=N(x.source);F?(B=h[x.source]={url:F.url,map:new g(F.map)},B.map.sourcesContent&&B.map.sources.forEach(function(E,H){var M=B.map.sourcesContent[H];if(M){var S=m(B.url,E);b[S]=M}})):B=h[x.source]={url:null,map:null}}return B&&B.map&&"function"===typeof B.map.originalPositionFor&&(F=B.map.originalPositionFor(x),null!==F.source)?(F.source=
|
|
||||||
m(B.url,F.source),F):x}function c(x){var B=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(x);return B?(x=f({source:B[2],line:+B[3],column:B[4]-1}),"eval at "+B[1]+" ("+x.source+":"+x.line+":"+(x.column+1)+")"):(B=/^eval at ([^(]+) \((.+)\)$/.exec(x))?"eval at "+B[1]+" ("+c(B[2])+")":x}function l(){var x="";if(this.isNative())x="native";else{var B=this.getScriptNameOrSourceURL();!B&&this.isEval()&&(x=this.getEvalOrigin(),x+=", ");x=B?x+B:x+"<anonymous>";B=this.getLineNumber();null!=B&&(x+=":"+B,(B=
|
|
||||||
this.getColumnNumber())&&(x+=":"+B))}B="";var F=this.getFunctionName(),E=!0,H=this.isConstructor();if(this.isToplevel()||H)H?B+="new "+(F||"<anonymous>"):F?B+=F:(B+=x,E=!1);else{H=this.getTypeName();"[object Object]"===H&&(H="null");var M=this.getMethodName();F?(H&&0!=F.indexOf(H)&&(B+=H+"."),B+=F,M&&F.indexOf("."+M)!=F.length-M.length-1&&(B+=" [as "+M+"]")):B+=H+"."+(M||"<anonymous>")}E&&(B+=" ("+x+")");return B}function q(x){var B={};Object.getOwnPropertyNames(Object.getPrototypeOf(x)).forEach(function(F){B[F]=
|
|
||||||
/^(?:is|get)/.test(F)?function(){return x[F].call(x)}:x[F]});B.toString=l;return B}function r(x,B){void 0===B&&(B={nextPosition:null,curPosition:null});if(x.isNative())return B.curPosition=null,x;var F=x.getFileName()||x.getScriptNameOrSourceURL();if(F){var E=x.getLineNumber(),H=x.getColumnNumber()-1,M=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,S=M.test;var V="object"===typeof e&&null!==e?e.version:"";M=S.call(M,V)?0:62;1===E&&H>M&&!p()&&!x.isEval()&&(H-=M);var O=
|
|
||||||
f({source:F,line:E,column:H});B.curPosition=O;x=q(x);var T=x.getFunctionName;x.getFunctionName=function(){return null==B.nextPosition?T():B.nextPosition.name||T()};x.getFileName=function(){return O.source};x.getLineNumber=function(){return O.line};x.getColumnNumber=function(){return O.column+1};x.getScriptNameOrSourceURL=function(){return O.source};return x}var Q=x.isEval()&&x.getEvalOrigin();Q&&(Q=c(Q),x=q(x),x.getEvalOrigin=function(){return Q});return x}function k(x,B){L&&(b={},h={});for(var F=
|
|
||||||
(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+
|
|
||||||
"^"}return null}function d(){var x=e.emit;e.emit=function(B){if("uncaughtException"===B){var F=arguments[1]&&arguments[1].stack,E=0<this.listeners(B).length;if(F&&!E){F=arguments[1];E=u(F);var H="object"===typeof e&&null!==e?e.stderr:void 0;H&&H._handle&&H._handle.setBlocking&&H._handle.setBlocking(!0);E&&(console.error(),console.error(E));console.error(F.stack);"object"===typeof e&&null!==e&&"function"===typeof e.exit&&e.exit(1);return}}return x.apply(this,arguments)}}var g=C("source-map").SourceMapConsumer,
|
|
||||||
n=C("path");try{var v=C("fs");v.existsSync&&v.readFileSync||(v=null)}catch(x){}var z=C("buffer-from"),G=!1,D=!1,L=!1,a="auto",b={},h={},w=/^data:application\/json[^,]+base64,/,y=[],I=[],K=t(y);y.push(function(x){x=x.trim();/^file:/.test(x)&&(x=x.replace(/file:\/\/\/(\w:)?/,function(E,H){return H?"":"/"}));if(x in b)return b[x];var B="";try{if(v)v.existsSync(x)&&(B=v.readFileSync(x,"utf8"));else{var F=new XMLHttpRequest;F.open("GET",x,!1);F.send(null);4===F.readyState&&200===F.status&&(B=F.responseText)}}catch(E){}return b[x]=
|
|
||||||
B});var N=t(I);I.push(function(x){a:{if(p())try{var B=new XMLHttpRequest;B.open("GET",x,!1);B.send(null);var F=B.getResponseHeader("SourceMap")||B.getResponseHeader("X-SourceMap");if(F){var E=F;break a}}catch(M){}E=K(x);B=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;for(var H;F=B.exec(E);)H=F;E=H?H[1]:null}if(!E)return null;w.test(E)?(H=E.slice(E.indexOf(",")+1),H=z(H,"base64").toString(),E=x):(E=m(x,E),H=K(E));return H?{url:E,
|
|
||||||
map:H}:null});var P=y.slice(0),W=I.slice(0);A.wrapCallSite=r;A.getErrorSource=u;A.mapSourcePosition=f;A.retrieveSourceMap=N;A.install=function(x){x=x||{};if(x.environment&&(a=x.environment,-1===["node","browser","auto"].indexOf(a)))throw Error("environment "+a+" was unknown. Available options are {auto, browser, node}");x.retrieveFile&&(x.overrideRetrieveFile&&(y.length=0),y.unshift(x.retrieveFile));x.retrieveSourceMap&&(x.overrideRetrieveSourceMap&&(I.length=0),I.unshift(x.retrieveSourceMap));if(x.hookRequire&&
|
|
||||||
!p()){var B=J.require("module"),F=B.prototype._compile;F.__sourceMapSupport||(B.prototype._compile=function(E,H){b[H]=E;h[H]=void 0;return F.call(this,E,H)},B.prototype._compile.__sourceMapSupport=!0)}L||(L="emptyCacheBetweenOperations"in x?x.emptyCacheBetweenOperations:!1);G||(G=!0,Error.prepareStackTrace=k);if(!D){x="handleUncaughtExceptions"in x?x.handleUncaughtExceptions:!0;try{!1===J.require("worker_threads").isMainThread&&(x=!1)}catch(E){}x&&"object"===typeof e&&null!==e&&"function"===typeof e.on&&
|
|
||||||
(D=!0,d())}};A.resetRetrieveHandlers=function(){y.length=0;I.length=0;y=P.slice(0);I=W.slice(0);N=t(I);K=t(y)}}).call(this,C("g5I+bs"))},{"buffer-from":4,fs:3,"g5I+bs":9,path:8,"source-map":20}]},{},[1]);return R});
|
|
50
node_modules/@cspotcode/source-map-support/package.json
generated
vendored
50
node_modules/@cspotcode/source-map-support/package.json
generated
vendored
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@cspotcode/source-map-support",
|
|
||||||
"description": "Fixes stack traces for files with source maps",
|
|
||||||
"version": "0.8.1",
|
|
||||||
"main": "./source-map-support.js",
|
|
||||||
"types": "./source-map-support.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"build": "node build.js",
|
|
||||||
"serve-tests": "http-server -p 1336",
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"/register.d.ts",
|
|
||||||
"/register.js",
|
|
||||||
"/register-hook-require.d.ts",
|
|
||||||
"/register-hook-require.js",
|
|
||||||
"/source-map-support.d.ts",
|
|
||||||
"/source-map-support.js",
|
|
||||||
"/browser-source-map-support.js"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"@jridgewell/trace-mapping": "0.3.9"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/lodash": "^4.14.182",
|
|
||||||
"browserify": "^4.2.3",
|
|
||||||
"coffeescript": "^1.12.7",
|
|
||||||
"http-server": "^0.11.1",
|
|
||||||
"lodash": "^4.17.21",
|
|
||||||
"mocha": "^3.5.3",
|
|
||||||
"semver": "^7.3.7",
|
|
||||||
"source-map": "0.6.1",
|
|
||||||
"webpack": "^1.15.0"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/cspotcode/node-source-map-support"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/cspotcode/node-source-map-support/issues"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"volta": {
|
|
||||||
"node": "16.11.0",
|
|
||||||
"npm": "7.24.2"
|
|
||||||
}
|
|
||||||
}
|
|
7
node_modules/@cspotcode/source-map-support/register-hook-require.d.ts
generated
vendored
7
node_modules/@cspotcode/source-map-support/register-hook-require.d.ts
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
// tslint:disable:no-useless-files
|
|
||||||
|
|
||||||
// For following usage:
|
|
||||||
// import '@cspotcode/source-map-support/register-hook-require'
|
|
||||||
// Instead of:
|
|
||||||
// import sourceMapSupport from '@cspotcode/source-map-support'
|
|
||||||
// sourceMapSupport.install({hookRequire: true})
|
|
3
node_modules/@cspotcode/source-map-support/register-hook-require.js
generated
vendored
3
node_modules/@cspotcode/source-map-support/register-hook-require.js
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
require('./').install({
|
|
||||||
hookRequire: true
|
|
||||||
});
|
|
7
node_modules/@cspotcode/source-map-support/register.d.ts
generated
vendored
7
node_modules/@cspotcode/source-map-support/register.d.ts
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
// tslint:disable:no-useless-files
|
|
||||||
|
|
||||||
// For following usage:
|
|
||||||
// import '@cspotcode/source-map-support/register'
|
|
||||||
// Instead of:
|
|
||||||
// import sourceMapSupport from '@cspotcode/source-map-support'
|
|
||||||
// sourceMapSupport.install()
|
|
1
node_modules/@cspotcode/source-map-support/register.js
generated
vendored
1
node_modules/@cspotcode/source-map-support/register.js
generated
vendored
@ -1 +0,0 @@
|
|||||||
require('./').install();
|
|
76
node_modules/@cspotcode/source-map-support/source-map-support.d.ts
generated
vendored
76
node_modules/@cspotcode/source-map-support/source-map-support.d.ts
generated
vendored
@ -1,76 +0,0 @@
|
|||||||
// Type definitions for source-map-support 0.5
|
|
||||||
// Project: https://github.com/evanw/node-source-map-support
|
|
||||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
|
||||||
// Jason Cheatham <https://github.com/jason0x43>
|
|
||||||
// Alcedo Nathaniel De Guzman Jr <https://github.com/natealcedo>
|
|
||||||
// Griffin Yourick <https://github.com/tough-griff>
|
|
||||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
||||||
|
|
||||||
export interface RawSourceMap {
|
|
||||||
version: 3;
|
|
||||||
sources: string[];
|
|
||||||
names: string[];
|
|
||||||
sourceRoot?: string;
|
|
||||||
sourcesContent?: string[];
|
|
||||||
mappings: string;
|
|
||||||
file: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Output of retrieveSourceMap().
|
|
||||||
* From source-map-support:
|
|
||||||
* The map field may be either a string or the parsed JSON object (i.e.,
|
|
||||||
* it must be a valid argument to the SourceMapConsumer constructor).
|
|
||||||
*/
|
|
||||||
export interface UrlAndMap {
|
|
||||||
url: string;
|
|
||||||
map: string | RawSourceMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Options to install().
|
|
||||||
*/
|
|
||||||
export interface Options {
|
|
||||||
handleUncaughtExceptions?: boolean | undefined;
|
|
||||||
hookRequire?: boolean | undefined;
|
|
||||||
emptyCacheBetweenOperations?: boolean | undefined;
|
|
||||||
environment?: 'auto' | 'browser' | 'node' | undefined;
|
|
||||||
overrideRetrieveFile?: boolean | undefined;
|
|
||||||
overrideRetrieveSourceMap?: boolean | undefined;
|
|
||||||
retrieveFile?(path: string): string;
|
|
||||||
retrieveSourceMap?(source: string): UrlAndMap | null;
|
|
||||||
/**
|
|
||||||
* Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support`
|
|
||||||
*/
|
|
||||||
redirectConflictingLibrary?: boolean;
|
|
||||||
/**
|
|
||||||
* Callback will be called every time we redirect due to `redirectConflictingLibrary`
|
|
||||||
* This allows consumers to log helpful warnings if they choose.
|
|
||||||
* @param parent NodeJS.Module which made the require() or require.resolve() call
|
|
||||||
* @param options options object internally passed to node's `_resolveFilename` hook
|
|
||||||
*/
|
|
||||||
onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Position {
|
|
||||||
source: string;
|
|
||||||
line: number;
|
|
||||||
column: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function wrapCallSite(frame: any /* StackFrame */): any /* StackFrame */;
|
|
||||||
export function getErrorSource(error: Error): string | null;
|
|
||||||
export function mapSourcePosition(position: Position): Position;
|
|
||||||
export function retrieveSourceMap(source: string): UrlAndMap | null;
|
|
||||||
export function resetRetrieveHandlers(): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Install SourceMap support.
|
|
||||||
* @param options Can be used to e.g. disable uncaughtException handler.
|
|
||||||
*/
|
|
||||||
export function install(options?: Options): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Uninstall SourceMap support.
|
|
||||||
*/
|
|
||||||
export function uninstall(): void;
|
|
938
node_modules/@cspotcode/source-map-support/source-map-support.js
generated
vendored
938
node_modules/@cspotcode/source-map-support/source-map-support.js
generated
vendored
@ -1,938 +0,0 @@
|
|||||||
const { TraceMap, originalPositionFor, AnyMap } = require('@jridgewell/trace-mapping');
|
|
||||||
var path = require('path');
|
|
||||||
const { fileURLToPath, pathToFileURL } = require('url');
|
|
||||||
var util = require('util');
|
|
||||||
|
|
||||||
var fs;
|
|
||||||
try {
|
|
||||||
fs = require('fs');
|
|
||||||
if (!fs.existsSync || !fs.readFileSync) {
|
|
||||||
// fs doesn't have all methods we need
|
|
||||||
fs = null;
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
/* nop */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requires a module which is protected against bundler minification.
|
|
||||||
*
|
|
||||||
* @param {NodeModule} mod
|
|
||||||
* @param {string} request
|
|
||||||
*/
|
|
||||||
function dynamicRequire(mod, request) {
|
|
||||||
return mod.require(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{
|
|
||||||
* enabled: boolean;
|
|
||||||
* originalValue: any;
|
|
||||||
* installedValue: any;
|
|
||||||
* }} HookState
|
|
||||||
* Used for installing and uninstalling hooks
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Increment this if the format of sharedData changes in a breaking way.
|
|
||||||
var sharedDataVersion = 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @template T
|
|
||||||
* @param {T} defaults
|
|
||||||
* @returns {T}
|
|
||||||
*/
|
|
||||||
function initializeSharedData(defaults) {
|
|
||||||
var sharedDataKey = 'source-map-support/sharedData';
|
|
||||||
if (typeof Symbol !== 'undefined') {
|
|
||||||
sharedDataKey = Symbol.for(sharedDataKey);
|
|
||||||
}
|
|
||||||
var sharedData = this[sharedDataKey];
|
|
||||||
if (!sharedData) {
|
|
||||||
sharedData = { version: sharedDataVersion };
|
|
||||||
if (Object.defineProperty) {
|
|
||||||
Object.defineProperty(this, sharedDataKey, { value: sharedData });
|
|
||||||
} else {
|
|
||||||
this[sharedDataKey] = sharedData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (sharedDataVersion !== sharedData.version) {
|
|
||||||
throw new Error("Multiple incompatible instances of source-map-support were loaded");
|
|
||||||
}
|
|
||||||
for (var key in defaults) {
|
|
||||||
if (!(key in sharedData)) {
|
|
||||||
sharedData[key] = defaults[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sharedData;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If multiple instances of source-map-support are loaded into the same
|
|
||||||
// context, they shouldn't overwrite each other. By storing handlers, caches,
|
|
||||||
// and other state on a shared object, different instances of
|
|
||||||
// source-map-support can work together in a limited way. This does require
|
|
||||||
// that future versions of source-map-support continue to support the fields on
|
|
||||||
// this object. If this internal contract ever needs to be broken, increment
|
|
||||||
// sharedDataVersion. (This version number is not the same as any of the
|
|
||||||
// package's version numbers, which should reflect the *external* API of
|
|
||||||
// source-map-support.)
|
|
||||||
var sharedData = initializeSharedData({
|
|
||||||
|
|
||||||
// Only install once if called multiple times
|
|
||||||
// Remember how the environment looked before installation so we can restore if able
|
|
||||||
/** @type {HookState} */
|
|
||||||
errorPrepareStackTraceHook: undefined,
|
|
||||||
/** @type {HookState} */
|
|
||||||
processEmitHook: undefined,
|
|
||||||
/** @type {HookState} */
|
|
||||||
moduleResolveFilenameHook: undefined,
|
|
||||||
|
|
||||||
/** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */
|
|
||||||
onConflictingLibraryRedirectArr: [],
|
|
||||||
|
|
||||||
// If true, the caches are reset before a stack trace formatting operation
|
|
||||||
emptyCacheBetweenOperations: false,
|
|
||||||
|
|
||||||
// Maps a file path to a string containing the file contents
|
|
||||||
fileContentsCache: Object.create(null),
|
|
||||||
|
|
||||||
// Maps a file path to a source map for that file
|
|
||||||
/** @type {Record<string, {url: string, map: TraceMap}} */
|
|
||||||
sourceMapCache: Object.create(null),
|
|
||||||
|
|
||||||
// Priority list of retrieve handlers
|
|
||||||
retrieveFileHandlers: [],
|
|
||||||
retrieveMapHandlers: [],
|
|
||||||
|
|
||||||
// Priority list of internally-implemented handlers.
|
|
||||||
// When resetting state, we must keep these.
|
|
||||||
internalRetrieveFileHandlers: [],
|
|
||||||
internalRetrieveMapHandlers: [],
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// Supports {browser, node, auto}
|
|
||||||
var environment = "auto";
|
|
||||||
|
|
||||||
// Regex for detecting source maps
|
|
||||||
var reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
||||||
|
|
||||||
function isInBrowser() {
|
|
||||||
if (environment === "browser")
|
|
||||||
return true;
|
|
||||||
if (environment === "node")
|
|
||||||
return false;
|
|
||||||
return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function') && !(window.require && window.module && window.process && window.process.type === "renderer"));
|
|
||||||
}
|
|
||||||
|
|
||||||
function hasGlobalProcessEventEmitter() {
|
|
||||||
return ((typeof process === 'object') && (process !== null) && (typeof process.on === 'function'));
|
|
||||||
}
|
|
||||||
|
|
||||||
function tryFileURLToPath(v) {
|
|
||||||
if(isFileUrl(v)) {
|
|
||||||
return fileURLToPath(v);
|
|
||||||
}
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO un-copy these from resolve-uri; see if they can be exported from that lib
|
|
||||||
function isFileUrl(input) {
|
|
||||||
return input.startsWith('file:');
|
|
||||||
}
|
|
||||||
function isAbsoluteUrl(input) {
|
|
||||||
return schemeRegex.test(input);
|
|
||||||
}
|
|
||||||
// Matches the scheme of a URL, eg "http://"
|
|
||||||
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
||||||
function isSchemeRelativeUrl(input) {
|
|
||||||
return input.startsWith('//');
|
|
||||||
}
|
|
||||||
|
|
||||||
// #region Caches
|
|
||||||
/** @param {string} pathOrFileUrl */
|
|
||||||
function getCacheKey(pathOrFileUrl) {
|
|
||||||
if(pathOrFileUrl.startsWith('node:')) return pathOrFileUrl;
|
|
||||||
if(isFileUrl(pathOrFileUrl)) {
|
|
||||||
// Must normalize spaces to %20, stuff like that
|
|
||||||
return new URL(pathOrFileUrl).toString();
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return pathToFileURL(pathOrFileUrl).toString();
|
|
||||||
} catch {
|
|
||||||
return pathOrFileUrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getFileContentsCache(key) {
|
|
||||||
return sharedData.fileContentsCache[getCacheKey(key)];
|
|
||||||
}
|
|
||||||
function hasFileContentsCacheFromKey(key) {
|
|
||||||
return Object.prototype.hasOwnProperty.call(sharedData.fileContentsCache, key);
|
|
||||||
}
|
|
||||||
function getFileContentsCacheFromKey(key) {
|
|
||||||
return sharedData.fileContentsCache[key];
|
|
||||||
}
|
|
||||||
function setFileContentsCache(key, value) {
|
|
||||||
return sharedData.fileContentsCache[getCacheKey(key)] = value;
|
|
||||||
}
|
|
||||||
function getSourceMapCache(key) {
|
|
||||||
return sharedData.sourceMapCache[getCacheKey(key)];
|
|
||||||
}
|
|
||||||
function setSourceMapCache(key, value) {
|
|
||||||
return sharedData.sourceMapCache[getCacheKey(key)] = value;
|
|
||||||
}
|
|
||||||
function clearCaches() {
|
|
||||||
sharedData.fileContentsCache = Object.create(null);
|
|
||||||
sharedData.sourceMapCache = Object.create(null);
|
|
||||||
}
|
|
||||||
// #endregion Caches
|
|
||||||
|
|
||||||
function handlerExec(list, internalList) {
|
|
||||||
return function(arg) {
|
|
||||||
for (var i = 0; i < list.length; i++) {
|
|
||||||
var ret = list[i](arg);
|
|
||||||
if (ret) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (var i = 0; i < internalList.length; i++) {
|
|
||||||
var ret = internalList[i](arg);
|
|
||||||
if (ret) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var retrieveFile = handlerExec(sharedData.retrieveFileHandlers, sharedData.internalRetrieveFileHandlers);
|
|
||||||
|
|
||||||
sharedData.internalRetrieveFileHandlers.push(function(path) {
|
|
||||||
// Trim the path to make sure there is no extra whitespace.
|
|
||||||
path = path.trim();
|
|
||||||
if (/^file:/.test(path)) {
|
|
||||||
// existsSync/readFileSync can't handle file protocol, but once stripped, it works
|
|
||||||
path = path.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
|
|
||||||
return drive ?
|
|
||||||
'' : // file:///C:/dir/file -> C:/dir/file
|
|
||||||
'/'; // file:///root-dir/file -> /root-dir/file
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const key = getCacheKey(path);
|
|
||||||
if(hasFileContentsCacheFromKey(key)) {
|
|
||||||
return getFileContentsCacheFromKey(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
var contents = '';
|
|
||||||
try {
|
|
||||||
if (!fs) {
|
|
||||||
// Use SJAX if we are in the browser
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', path, /** async */ false);
|
|
||||||
xhr.send(null);
|
|
||||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
||||||
contents = xhr.responseText;
|
|
||||||
}
|
|
||||||
} else if (fs.existsSync(path)) {
|
|
||||||
// Otherwise, use the filesystem
|
|
||||||
contents = fs.readFileSync(path, 'utf8');
|
|
||||||
}
|
|
||||||
} catch (er) {
|
|
||||||
/* ignore any errors */
|
|
||||||
}
|
|
||||||
|
|
||||||
return setFileContentsCache(path, contents);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Support URLs relative to a directory, but be careful about a protocol prefix
|
|
||||||
// in case we are in the browser (i.e. directories may start with "http://" or "file:///")
|
|
||||||
function supportRelativeURL(file, url) {
|
|
||||||
if(!file) return url;
|
|
||||||
// given that this happens within error formatting codepath, probably best to
|
|
||||||
// fallback instead of throwing if anything goes wrong
|
|
||||||
try {
|
|
||||||
// if should output a URL
|
|
||||||
if(isAbsoluteUrl(file) || isSchemeRelativeUrl(file)) {
|
|
||||||
if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) {
|
|
||||||
return new URL(url, file).toString();
|
|
||||||
}
|
|
||||||
if(path.isAbsolute(url)) {
|
|
||||||
return new URL(pathToFileURL(url), file).toString();
|
|
||||||
}
|
|
||||||
// url is relative path or URL
|
|
||||||
return new URL(url.replace(/\\/g, '/'), file).toString();
|
|
||||||
}
|
|
||||||
// if should output a path (unless URL is something like https://)
|
|
||||||
if(path.isAbsolute(file)) {
|
|
||||||
if(isFileUrl(url)) {
|
|
||||||
return fileURLToPath(url);
|
|
||||||
}
|
|
||||||
if(isSchemeRelativeUrl(url)) {
|
|
||||||
return fileURLToPath(new URL(url, 'file://'));
|
|
||||||
}
|
|
||||||
if(isAbsoluteUrl(url)) {
|
|
||||||
// url is a non-file URL
|
|
||||||
// Go with the URL
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
if(path.isAbsolute(url)) {
|
|
||||||
// Normalize at all? decodeURI or normalize slashes?
|
|
||||||
return path.normalize(url);
|
|
||||||
}
|
|
||||||
// url is relative path or URL
|
|
||||||
return path.join(file, '..', decodeURI(url));
|
|
||||||
}
|
|
||||||
// If we get here, file is relative.
|
|
||||||
// Shouldn't happen since node identifies modules with absolute paths or URLs.
|
|
||||||
// But we can take a stab at returning something meaningful anyway.
|
|
||||||
if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) {
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
return path.join(file, '..', url);
|
|
||||||
} catch(e) {
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return pathOrUrl in the same style as matchStyleOf: either a file URL or a native path
|
|
||||||
function matchStyleOfPathOrUrl(matchStyleOf, pathOrUrl) {
|
|
||||||
try {
|
|
||||||
if(isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) {
|
|
||||||
if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl;
|
|
||||||
if(path.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString();
|
|
||||||
} else if(path.isAbsolute(matchStyleOf)) {
|
|
||||||
if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) {
|
|
||||||
return fileURLToPath(new URL(pathOrUrl, 'file://'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pathOrUrl;
|
|
||||||
} catch(e) {
|
|
||||||
return pathOrUrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function retrieveSourceMapURL(source) {
|
|
||||||
var fileData;
|
|
||||||
|
|
||||||
if (isInBrowser()) {
|
|
||||||
try {
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', source, false);
|
|
||||||
xhr.send(null);
|
|
||||||
fileData = xhr.readyState === 4 ? xhr.responseText : null;
|
|
||||||
|
|
||||||
// Support providing a sourceMappingURL via the SourceMap header
|
|
||||||
var sourceMapHeader = xhr.getResponseHeader("SourceMap") ||
|
|
||||||
xhr.getResponseHeader("X-SourceMap");
|
|
||||||
if (sourceMapHeader) {
|
|
||||||
return sourceMapHeader;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the URL of the source map
|
|
||||||
fileData = retrieveFile(tryFileURLToPath(source));
|
|
||||||
var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
|
|
||||||
// Keep executing the search to find the *last* sourceMappingURL to avoid
|
|
||||||
// picking up sourceMappingURLs from comments, strings, etc.
|
|
||||||
var lastMatch, match;
|
|
||||||
while (match = re.exec(fileData)) lastMatch = match;
|
|
||||||
if (!lastMatch) return null;
|
|
||||||
return lastMatch[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
// Can be overridden by the retrieveSourceMap option to install. Takes a
|
|
||||||
// generated source filename; returns a {map, optional url} object, or null if
|
|
||||||
// there is no source map. The map field may be either a string or the parsed
|
|
||||||
// JSON object (ie, it must be a valid argument to the SourceMapConsumer
|
|
||||||
// constructor).
|
|
||||||
/** @type {(source: string) => import('./source-map-support').UrlAndMap | null} */
|
|
||||||
var retrieveSourceMap = handlerExec(sharedData.retrieveMapHandlers, sharedData.internalRetrieveMapHandlers);
|
|
||||||
sharedData.internalRetrieveMapHandlers.push(function(source) {
|
|
||||||
var sourceMappingURL = retrieveSourceMapURL(source);
|
|
||||||
if (!sourceMappingURL) return null;
|
|
||||||
|
|
||||||
// Read the contents of the source map
|
|
||||||
var sourceMapData;
|
|
||||||
if (reSourceMap.test(sourceMappingURL)) {
|
|
||||||
// Support source map URL as a data url
|
|
||||||
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1);
|
|
||||||
sourceMapData = Buffer.from(rawData, "base64").toString();
|
|
||||||
sourceMappingURL = source;
|
|
||||||
} else {
|
|
||||||
// Support source map URLs relative to the source URL
|
|
||||||
sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
|
|
||||||
sourceMapData = retrieveFile(tryFileURLToPath(sourceMappingURL));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sourceMapData) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
url: sourceMappingURL,
|
|
||||||
map: sourceMapData
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
function mapSourcePosition(position) {
|
|
||||||
var sourceMap = getSourceMapCache(position.source);
|
|
||||||
if (!sourceMap) {
|
|
||||||
// Call the (overrideable) retrieveSourceMap function to get the source map.
|
|
||||||
var urlAndMap = retrieveSourceMap(position.source);
|
|
||||||
if (urlAndMap) {
|
|
||||||
sourceMap = setSourceMapCache(position.source, {
|
|
||||||
url: urlAndMap.url,
|
|
||||||
map: new AnyMap(urlAndMap.map, urlAndMap.url)
|
|
||||||
});
|
|
||||||
|
|
||||||
// Overwrite trace-mapping's resolutions, because they do not handle
|
|
||||||
// Windows paths the way we want.
|
|
||||||
// TODO Remove now that windows path support was added to resolve-uri and thus trace-mapping?
|
|
||||||
sourceMap.map.resolvedSources = sourceMap.map.sources.map(s => supportRelativeURL(sourceMap.url, s));
|
|
||||||
|
|
||||||
// Load all sources stored inline with the source map into the file cache
|
|
||||||
// to pretend like they are already loaded. They may not exist on disk.
|
|
||||||
if (sourceMap.map.sourcesContent) {
|
|
||||||
sourceMap.map.resolvedSources.forEach(function(resolvedSource, i) {
|
|
||||||
var contents = sourceMap.map.sourcesContent[i];
|
|
||||||
if (contents) {
|
|
||||||
setFileContentsCache(resolvedSource, contents);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
sourceMap = setSourceMapCache(position.source, {
|
|
||||||
url: null,
|
|
||||||
map: null
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve the source URL relative to the URL of the source map
|
|
||||||
if (sourceMap && sourceMap.map) {
|
|
||||||
var originalPosition = originalPositionFor(sourceMap.map, position);
|
|
||||||
|
|
||||||
// Only return the original position if a matching line was found. If no
|
|
||||||
// matching line is found then we return position instead, which will cause
|
|
||||||
// the stack trace to print the path and line for the compiled file. It is
|
|
||||||
// better to give a precise location in the compiled file than a vague
|
|
||||||
// location in the original file.
|
|
||||||
if (originalPosition.source !== null) {
|
|
||||||
// originalPosition.source has *already* been resolved against sourceMap.url
|
|
||||||
// so is *already* as absolute as possible.
|
|
||||||
// However, we want to ensure we output in same format as input: URL or native path
|
|
||||||
originalPosition.source = matchStyleOfPathOrUrl(
|
|
||||||
position.source, originalPosition.source);
|
|
||||||
return originalPosition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return position;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parses code generated by FormatEvalOrigin(), a function inside V8:
|
|
||||||
// https://code.google.com/p/v8/source/browse/trunk/src/messages.js
|
|
||||||
function mapEvalOrigin(origin) {
|
|
||||||
// Most eval() calls are in this format
|
|
||||||
var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
|
||||||
if (match) {
|
|
||||||
var position = mapSourcePosition({
|
|
||||||
source: match[2],
|
|
||||||
line: +match[3],
|
|
||||||
column: match[4] - 1
|
|
||||||
});
|
|
||||||
return 'eval at ' + match[1] + ' (' + position.source + ':' +
|
|
||||||
position.line + ':' + (position.column + 1) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse nested eval() calls using recursion
|
|
||||||
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
|
||||||
if (match) {
|
|
||||||
return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure we still return useful information if we didn't find anything
|
|
||||||
return origin;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is copied almost verbatim from the V8 source code at
|
|
||||||
// https://code.google.com/p/v8/source/browse/trunk/src/messages.js
|
|
||||||
// Update 2022-04-29:
|
|
||||||
// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/builtins/builtins-callsite.cc#L175-L179
|
|
||||||
// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L795-L804
|
|
||||||
// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L717-L750
|
|
||||||
// The implementation of wrapCallSite() used to just forward to the actual source
|
|
||||||
// code of CallSite.prototype.toString but unfortunately a new release of V8
|
|
||||||
// did something to the prototype chain and broke the shim. The only fix I
|
|
||||||
// could find was copy/paste.
|
|
||||||
function CallSiteToString() {
|
|
||||||
var fileName;
|
|
||||||
var fileLocation = "";
|
|
||||||
if (this.isNative()) {
|
|
||||||
fileLocation = "native";
|
|
||||||
} else {
|
|
||||||
fileName = this.getScriptNameOrSourceURL();
|
|
||||||
if (!fileName && this.isEval()) {
|
|
||||||
fileLocation = this.getEvalOrigin();
|
|
||||||
fileLocation += ", "; // Expecting source position to follow.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fileName) {
|
|
||||||
fileLocation += fileName;
|
|
||||||
} else {
|
|
||||||
// Source code does not originate from a file and is not native, but we
|
|
||||||
// can still get the source position inside the source string, e.g. in
|
|
||||||
// an eval string.
|
|
||||||
fileLocation += "<anonymous>";
|
|
||||||
}
|
|
||||||
var lineNumber = this.getLineNumber();
|
|
||||||
if (lineNumber != null) {
|
|
||||||
fileLocation += ":" + lineNumber;
|
|
||||||
var columnNumber = this.getColumnNumber();
|
|
||||||
if (columnNumber) {
|
|
||||||
fileLocation += ":" + columnNumber;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var line = "";
|
|
||||||
var isAsync = this.isAsync ? this.isAsync() : false;
|
|
||||||
if(isAsync) {
|
|
||||||
line += 'async ';
|
|
||||||
var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false;
|
|
||||||
var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false;
|
|
||||||
if(isPromiseAny || isPromiseAll) {
|
|
||||||
line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index ';
|
|
||||||
var promiseIndex = this.getPromiseIndex();
|
|
||||||
line += promiseIndex + ')';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var functionName = this.getFunctionName();
|
|
||||||
var addSuffix = true;
|
|
||||||
var isConstructor = this.isConstructor();
|
|
||||||
var isMethodCall = !(this.isToplevel() || isConstructor);
|
|
||||||
if (isMethodCall) {
|
|
||||||
var typeName = this.getTypeName();
|
|
||||||
// Fixes shim to be backward compatable with Node v0 to v4
|
|
||||||
if (typeName === "[object Object]") {
|
|
||||||
typeName = "null";
|
|
||||||
}
|
|
||||||
var methodName = this.getMethodName();
|
|
||||||
if (functionName) {
|
|
||||||
if (typeName && functionName.indexOf(typeName) != 0) {
|
|
||||||
line += typeName + ".";
|
|
||||||
}
|
|
||||||
line += functionName;
|
|
||||||
if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
|
|
||||||
line += " [as " + methodName + "]";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
line += typeName + "." + (methodName || "<anonymous>");
|
|
||||||
}
|
|
||||||
} else if (isConstructor) {
|
|
||||||
line += "new " + (functionName || "<anonymous>");
|
|
||||||
} else if (functionName) {
|
|
||||||
line += functionName;
|
|
||||||
} else {
|
|
||||||
line += fileLocation;
|
|
||||||
addSuffix = false;
|
|
||||||
}
|
|
||||||
if (addSuffix) {
|
|
||||||
line += " (" + fileLocation + ")";
|
|
||||||
}
|
|
||||||
return line;
|
|
||||||
}
|
|
||||||
|
|
||||||
function cloneCallSite(frame) {
|
|
||||||
var object = {};
|
|
||||||
Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
|
|
||||||
object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name];
|
|
||||||
});
|
|
||||||
object.toString = CallSiteToString;
|
|
||||||
return object;
|
|
||||||
}
|
|
||||||
|
|
||||||
function wrapCallSite(frame, state) {
|
|
||||||
// provides interface backward compatibility
|
|
||||||
if (state === undefined) {
|
|
||||||
state = { nextPosition: null, curPosition: null }
|
|
||||||
}
|
|
||||||
if(frame.isNative()) {
|
|
||||||
state.curPosition = null;
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Most call sites will return the source file from getFileName(), but code
|
|
||||||
// passed to eval() ending in "//# sourceURL=..." will return the source file
|
|
||||||
// from getScriptNameOrSourceURL() instead
|
|
||||||
var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
|
||||||
if (source) {
|
|
||||||
// v8 does not expose its internal isWasm, etc methods, so we do this instead.
|
|
||||||
if(source.startsWith('wasm://')) {
|
|
||||||
state.curPosition = null;
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
var line = frame.getLineNumber();
|
|
||||||
var column = frame.getColumnNumber() - 1;
|
|
||||||
|
|
||||||
// Fix position in Node where some (internal) code is prepended.
|
|
||||||
// See https://github.com/evanw/node-source-map-support/issues/36
|
|
||||||
// Header removed in node at ^10.16 || >=11.11.0
|
|
||||||
// v11 is not an LTS candidate, we can just test the one version with it.
|
|
||||||
// Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11
|
|
||||||
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
|
|
||||||
var headerLength = noHeader.test(process.version) ? 0 : 62;
|
|
||||||
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
|
|
||||||
column -= headerLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
var position = mapSourcePosition({
|
|
||||||
source: source,
|
|
||||||
line: line,
|
|
||||||
column: column
|
|
||||||
});
|
|
||||||
state.curPosition = position;
|
|
||||||
frame = cloneCallSite(frame);
|
|
||||||
var originalFunctionName = frame.getFunctionName;
|
|
||||||
frame.getFunctionName = function() {
|
|
||||||
if (state.nextPosition == null) {
|
|
||||||
return originalFunctionName();
|
|
||||||
}
|
|
||||||
return state.nextPosition.name || originalFunctionName();
|
|
||||||
};
|
|
||||||
frame.getFileName = function() { return position.source; };
|
|
||||||
frame.getLineNumber = function() { return position.line; };
|
|
||||||
frame.getColumnNumber = function() { return position.column + 1; };
|
|
||||||
frame.getScriptNameOrSourceURL = function() { return position.source; };
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code called using eval() needs special handling
|
|
||||||
var origin = frame.isEval() && frame.getEvalOrigin();
|
|
||||||
if (origin) {
|
|
||||||
origin = mapEvalOrigin(origin);
|
|
||||||
frame = cloneCallSite(frame);
|
|
||||||
frame.getEvalOrigin = function() { return origin; };
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we get here then we were unable to change the source position
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
var kIsNodeError = undefined;
|
|
||||||
try {
|
|
||||||
// Get a deliberate ERR_INVALID_ARG_TYPE
|
|
||||||
// TODO is there a better way to reliably get an instance of NodeError?
|
|
||||||
path.resolve(123);
|
|
||||||
} catch(e) {
|
|
||||||
const symbols = Object.getOwnPropertySymbols(e);
|
|
||||||
const symbol = symbols.find(function (s) {return s.toString().indexOf('kIsNodeError') >= 0});
|
|
||||||
if(symbol) kIsNodeError = symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ErrorPrototypeToString = (err) =>Error.prototype.toString.call(err);
|
|
||||||
|
|
||||||
/** @param {HookState} hookState */
|
|
||||||
function createPrepareStackTrace(hookState) {
|
|
||||||
return prepareStackTrace;
|
|
||||||
|
|
||||||
// This function is part of the V8 stack trace API, for more info see:
|
|
||||||
// https://v8.dev/docs/stack-trace-api
|
|
||||||
function prepareStackTrace(error, stack) {
|
|
||||||
if(!hookState.enabled) return hookState.originalValue.apply(this, arguments);
|
|
||||||
|
|
||||||
if (sharedData.emptyCacheBetweenOperations) {
|
|
||||||
clearCaches();
|
|
||||||
}
|
|
||||||
|
|
||||||
// node gives its own errors special treatment. Mimic that behavior
|
|
||||||
// https://github.com/nodejs/node/blob/3cbaabc4622df1b4009b9d026a1a970bdbae6e89/lib/internal/errors.js#L118-L128
|
|
||||||
// https://github.com/nodejs/node/pull/39182
|
|
||||||
var errorString;
|
|
||||||
if (kIsNodeError) {
|
|
||||||
if(kIsNodeError in error) {
|
|
||||||
errorString = `${error.name} [${error.code}]: ${error.message}`;
|
|
||||||
} else {
|
|
||||||
errorString = ErrorPrototypeToString(error);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
var name = error.name || 'Error';
|
|
||||||
var message = error.message || '';
|
|
||||||
errorString = message ? name + ": " + message : name;
|
|
||||||
}
|
|
||||||
|
|
||||||
var state = { nextPosition: null, curPosition: null };
|
|
||||||
var processedStack = [];
|
|
||||||
for (var i = stack.length - 1; i >= 0; i--) {
|
|
||||||
processedStack.push('\n at ' + wrapCallSite(stack[i], state));
|
|
||||||
state.nextPosition = state.curPosition;
|
|
||||||
}
|
|
||||||
state.curPosition = state.nextPosition = null;
|
|
||||||
return errorString + processedStack.reverse().join('');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate position and snippet of original source with pointer
|
|
||||||
function getErrorSource(error) {
|
|
||||||
var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
|
|
||||||
if (match) {
|
|
||||||
var source = match[1];
|
|
||||||
var line = +match[2];
|
|
||||||
var column = +match[3];
|
|
||||||
|
|
||||||
// Support the inline sourceContents inside the source map
|
|
||||||
var contents = getFileContentsCache(source);
|
|
||||||
|
|
||||||
const sourceAsPath = tryFileURLToPath(source);
|
|
||||||
|
|
||||||
// Support files on disk
|
|
||||||
if (!contents && fs && fs.existsSync(sourceAsPath)) {
|
|
||||||
try {
|
|
||||||
contents = fs.readFileSync(sourceAsPath, 'utf8');
|
|
||||||
} catch (er) {
|
|
||||||
contents = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Format the line from the original source code like node does
|
|
||||||
if (contents) {
|
|
||||||
var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
|
|
||||||
if (code) {
|
|
||||||
return source + ':' + line + '\n' + code + '\n' +
|
|
||||||
new Array(column).join(' ') + '^';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function printFatalErrorUponExit (error) {
|
|
||||||
var source = getErrorSource(error);
|
|
||||||
|
|
||||||
// Ensure error is printed synchronously and not truncated
|
|
||||||
if (process.stderr._handle && process.stderr._handle.setBlocking) {
|
|
||||||
process.stderr._handle.setBlocking(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (source) {
|
|
||||||
console.error(source);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Matches node's behavior for colorized output
|
|
||||||
console.error(
|
|
||||||
util.inspect(error, {
|
|
||||||
customInspect: false,
|
|
||||||
colors: process.stderr.isTTY
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function shimEmitUncaughtException () {
|
|
||||||
const originalValue = process.emit;
|
|
||||||
var hook = sharedData.processEmitHook = {
|
|
||||||
enabled: true,
|
|
||||||
originalValue,
|
|
||||||
installedValue: undefined
|
|
||||||
};
|
|
||||||
var isTerminatingDueToFatalException = false;
|
|
||||||
var fatalException;
|
|
||||||
|
|
||||||
process.emit = sharedData.processEmitHook.installedValue = function (type) {
|
|
||||||
const hadListeners = originalValue.apply(this, arguments);
|
|
||||||
if(hook.enabled) {
|
|
||||||
if (type === 'uncaughtException' && !hadListeners) {
|
|
||||||
isTerminatingDueToFatalException = true;
|
|
||||||
fatalException = arguments[1];
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
if (type === 'exit' && isTerminatingDueToFatalException) {
|
|
||||||
printFatalErrorUponExit(fatalException);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return hadListeners;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var originalRetrieveFileHandlers = sharedData.retrieveFileHandlers.slice(0);
|
|
||||||
var originalRetrieveMapHandlers = sharedData.retrieveMapHandlers.slice(0);
|
|
||||||
|
|
||||||
exports.wrapCallSite = wrapCallSite;
|
|
||||||
exports.getErrorSource = getErrorSource;
|
|
||||||
exports.mapSourcePosition = mapSourcePosition;
|
|
||||||
exports.retrieveSourceMap = retrieveSourceMap;
|
|
||||||
|
|
||||||
exports.install = function(options) {
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
if (options.environment) {
|
|
||||||
environment = options.environment;
|
|
||||||
if (["node", "browser", "auto"].indexOf(environment) === -1) {
|
|
||||||
throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use dynamicRequire to avoid including in browser bundles
|
|
||||||
var Module = dynamicRequire(module, 'module');
|
|
||||||
|
|
||||||
// Redirect subsequent imports of "source-map-support"
|
|
||||||
// to this package
|
|
||||||
const {redirectConflictingLibrary = true, onConflictingLibraryRedirect} = options;
|
|
||||||
if(redirectConflictingLibrary) {
|
|
||||||
if (!sharedData.moduleResolveFilenameHook) {
|
|
||||||
const originalValue = Module._resolveFilename;
|
|
||||||
const moduleResolveFilenameHook = sharedData.moduleResolveFilenameHook = {
|
|
||||||
enabled: true,
|
|
||||||
originalValue,
|
|
||||||
installedValue: undefined,
|
|
||||||
}
|
|
||||||
Module._resolveFilename = sharedData.moduleResolveFilenameHook.installedValue = function (request, parent, isMain, options) {
|
|
||||||
if (moduleResolveFilenameHook.enabled) {
|
|
||||||
// Match all source-map-support entrypoints: source-map-support, source-map-support/register
|
|
||||||
let requestRedirect;
|
|
||||||
if (request === 'source-map-support') {
|
|
||||||
requestRedirect = './';
|
|
||||||
} else if (request === 'source-map-support/register') {
|
|
||||||
requestRedirect = './register';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestRedirect !== undefined) {
|
|
||||||
const newRequest = require.resolve(requestRedirect);
|
|
||||||
for (const cb of sharedData.onConflictingLibraryRedirectArr) {
|
|
||||||
cb(request, parent, isMain, options, newRequest);
|
|
||||||
}
|
|
||||||
request = newRequest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return originalValue.call(this, request, parent, isMain, options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (onConflictingLibraryRedirect) {
|
|
||||||
sharedData.onConflictingLibraryRedirectArr.push(onConflictingLibraryRedirect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow sources to be found by methods other than reading the files
|
|
||||||
// directly from disk.
|
|
||||||
if (options.retrieveFile) {
|
|
||||||
if (options.overrideRetrieveFile) {
|
|
||||||
sharedData.retrieveFileHandlers.length = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
sharedData.retrieveFileHandlers.unshift(options.retrieveFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow source maps to be found by methods other than reading the files
|
|
||||||
// directly from disk.
|
|
||||||
if (options.retrieveSourceMap) {
|
|
||||||
if (options.overrideRetrieveSourceMap) {
|
|
||||||
sharedData.retrieveMapHandlers.length = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
sharedData.retrieveMapHandlers.unshift(options.retrieveSourceMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Support runtime transpilers that include inline source maps
|
|
||||||
if (options.hookRequire && !isInBrowser()) {
|
|
||||||
var $compile = Module.prototype._compile;
|
|
||||||
|
|
||||||
if (!$compile.__sourceMapSupport) {
|
|
||||||
Module.prototype._compile = function(content, filename) {
|
|
||||||
setFileContentsCache(filename, content);
|
|
||||||
setSourceMapCache(filename, undefined);
|
|
||||||
return $compile.call(this, content, filename);
|
|
||||||
};
|
|
||||||
|
|
||||||
Module.prototype._compile.__sourceMapSupport = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configure options
|
|
||||||
if (!sharedData.emptyCacheBetweenOperations) {
|
|
||||||
sharedData.emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ?
|
|
||||||
options.emptyCacheBetweenOperations : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Install the error reformatter
|
|
||||||
if (!sharedData.errorPrepareStackTraceHook) {
|
|
||||||
const originalValue = Error.prepareStackTrace;
|
|
||||||
sharedData.errorPrepareStackTraceHook = {
|
|
||||||
enabled: true,
|
|
||||||
originalValue,
|
|
||||||
installedValue: undefined
|
|
||||||
};
|
|
||||||
Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.installedValue = createPrepareStackTrace(sharedData.errorPrepareStackTraceHook);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sharedData.processEmitHook) {
|
|
||||||
var installHandler = 'handleUncaughtExceptions' in options ?
|
|
||||||
options.handleUncaughtExceptions : true;
|
|
||||||
|
|
||||||
// Do not override 'uncaughtException' with our own handler in Node.js
|
|
||||||
// Worker threads. Workers pass the error to the main thread as an event,
|
|
||||||
// rather than printing something to stderr and exiting.
|
|
||||||
try {
|
|
||||||
// We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify.
|
|
||||||
var worker_threads = dynamicRequire(module, 'worker_threads');
|
|
||||||
if (worker_threads.isMainThread === false) {
|
|
||||||
installHandler = false;
|
|
||||||
}
|
|
||||||
} catch(e) {}
|
|
||||||
|
|
||||||
// Provide the option to not install the uncaught exception handler. This is
|
|
||||||
// to support other uncaught exception handlers (in test frameworks, for
|
|
||||||
// example). If this handler is not installed and there are no other uncaught
|
|
||||||
// exception handlers, uncaught exceptions will be caught by node's built-in
|
|
||||||
// exception handler and the process will still be terminated. However, the
|
|
||||||
// generated JavaScript code will be shown above the stack trace instead of
|
|
||||||
// the original source code.
|
|
||||||
if (installHandler && hasGlobalProcessEventEmitter()) {
|
|
||||||
shimEmitUncaughtException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.uninstall = function() {
|
|
||||||
if(sharedData.processEmitHook) {
|
|
||||||
// Disable behavior
|
|
||||||
sharedData.processEmitHook.enabled = false;
|
|
||||||
// If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us.
|
|
||||||
if(process.emit === sharedData.processEmitHook.installedValue) {
|
|
||||||
process.emit = sharedData.processEmitHook.originalValue;
|
|
||||||
}
|
|
||||||
sharedData.processEmitHook = undefined;
|
|
||||||
}
|
|
||||||
if(sharedData.errorPrepareStackTraceHook) {
|
|
||||||
// Disable behavior
|
|
||||||
sharedData.errorPrepareStackTraceHook.enabled = false;
|
|
||||||
// If possible or necessary, remove our hook function.
|
|
||||||
// In vanilla environments, prepareStackTrace is `undefined`.
|
|
||||||
// We cannot delegate to `undefined` the way we can to a function w/`.apply()`; our only option is to remove the function.
|
|
||||||
// If we are the *first* hook installed, and another was installed on top of us, we have no choice but to remove both.
|
|
||||||
if(Error.prepareStackTrace === sharedData.errorPrepareStackTraceHook.installedValue || typeof sharedData.errorPrepareStackTraceHook.originalValue !== 'function') {
|
|
||||||
Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.originalValue;
|
|
||||||
}
|
|
||||||
sharedData.errorPrepareStackTraceHook = undefined;
|
|
||||||
}
|
|
||||||
if (sharedData.moduleResolveFilenameHook) {
|
|
||||||
// Disable behavior
|
|
||||||
sharedData.moduleResolveFilenameHook.enabled = false;
|
|
||||||
// If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us.
|
|
||||||
var Module = dynamicRequire(module, 'module');
|
|
||||||
if(Module._resolveFilename === sharedData.moduleResolveFilenameHook.installedValue) {
|
|
||||||
Module._resolveFilename = sharedData.moduleResolveFilenameHook.originalValue;
|
|
||||||
}
|
|
||||||
sharedData.moduleResolveFilenameHook = undefined;
|
|
||||||
}
|
|
||||||
sharedData.onConflictingLibraryRedirectArr.length = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.resetRetrieveHandlers = function() {
|
|
||||||
sharedData.retrieveFileHandlers.length = 0;
|
|
||||||
sharedData.retrieveMapHandlers.length = 0;
|
|
||||||
}
|
|
19
node_modules/@jridgewell/resolve-uri/LICENSE
generated
vendored
19
node_modules/@jridgewell/resolve-uri/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright 2019 Justin Ridgewell <jridgewell@google.com>
|
|
||||||
|
|
||||||
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.
|
|
40
node_modules/@jridgewell/resolve-uri/README.md
generated
vendored
40
node_modules/@jridgewell/resolve-uri/README.md
generated
vendored
@ -1,40 +0,0 @@
|
|||||||
# @jridgewell/resolve-uri
|
|
||||||
|
|
||||||
> Resolve a URI relative to an optional base URI
|
|
||||||
|
|
||||||
Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install @jridgewell/resolve-uri
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
function resolve(input: string, base?: string): string;
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
import resolve from '@jridgewell/resolve-uri';
|
|
||||||
|
|
||||||
resolve('foo', 'https://example.com'); // => 'https://example.com/foo'
|
|
||||||
```
|
|
||||||
|
|
||||||
| Input | Base | Resolution | Explanation |
|
|
||||||
|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------|
|
|
||||||
| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only |
|
|
||||||
| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol |
|
|
||||||
| `//example.com` | _rest_ | `//example.com/` | Input is normalized only |
|
|
||||||
| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin |
|
|
||||||
| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative |
|
|
||||||
| `/example` | _rest_ | `/example` | Input is normalized only |
|
|
||||||
| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base |
|
|
||||||
| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file |
|
|
||||||
| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory |
|
|
||||||
| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file |
|
|
||||||
| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory |
|
|
||||||
| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file |
|
|
||||||
| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory |
|
|
||||||
| `example` | `base/file` | `base/example` | Input is joined with the base without its file |
|
|
69
node_modules/@jridgewell/resolve-uri/package.json
generated
vendored
69
node_modules/@jridgewell/resolve-uri/package.json
generated
vendored
@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/resolve-uri",
|
|
||||||
"version": "3.1.0",
|
|
||||||
"description": "Resolve a URI relative to an optional base URI",
|
|
||||||
"keywords": [
|
|
||||||
"resolve",
|
|
||||||
"uri",
|
|
||||||
"url",
|
|
||||||
"path"
|
|
||||||
],
|
|
||||||
"author": "Justin Ridgewell <justin@ridgewell.name>",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/jridgewell/resolve-uri",
|
|
||||||
"main": "dist/resolve-uri.umd.js",
|
|
||||||
"module": "dist/resolve-uri.mjs",
|
|
||||||
"typings": "dist/types/resolve-uri.d.ts",
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"types": "./dist/types/resolve-uri.d.ts",
|
|
||||||
"browser": "./dist/resolve-uri.umd.js",
|
|
||||||
"require": "./dist/resolve-uri.umd.js",
|
|
||||||
"import": "./dist/resolve-uri.mjs"
|
|
||||||
},
|
|
||||||
"./dist/resolve-uri.umd.js"
|
|
||||||
],
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0.0"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"prebuild": "rm -rf dist",
|
|
||||||
"build": "run-s -n build:*",
|
|
||||||
"build:rollup": "rollup -c rollup.config.js",
|
|
||||||
"build:ts": "tsc --project tsconfig.build.json",
|
|
||||||
"lint": "run-s -n lint:*",
|
|
||||||
"lint:prettier": "npm run test:lint:prettier -- --write",
|
|
||||||
"lint:ts": "npm run test:lint:ts -- --fix",
|
|
||||||
"pretest": "run-s build:rollup",
|
|
||||||
"test": "run-s -n test:lint test:only",
|
|
||||||
"test:debug": "mocha --inspect-brk",
|
|
||||||
"test:lint": "run-s -n test:lint:*",
|
|
||||||
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
|
||||||
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
|
||||||
"test:only": "mocha",
|
|
||||||
"test:coverage": "c8 mocha",
|
|
||||||
"test:watch": "mocha --watch",
|
|
||||||
"prepublishOnly": "npm run preversion",
|
|
||||||
"preversion": "run-s test build"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*",
|
|
||||||
"@rollup/plugin-typescript": "8.3.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.10.0",
|
|
||||||
"@typescript-eslint/parser": "5.10.0",
|
|
||||||
"c8": "7.11.0",
|
|
||||||
"eslint": "8.7.0",
|
|
||||||
"eslint-config-prettier": "8.3.0",
|
|
||||||
"mocha": "9.2.0",
|
|
||||||
"npm-run-all": "4.1.5",
|
|
||||||
"prettier": "2.5.1",
|
|
||||||
"rollup": "2.66.0",
|
|
||||||
"typescript": "4.5.5"
|
|
||||||
}
|
|
||||||
}
|
|
21
node_modules/@jridgewell/sourcemap-codec/LICENSE
generated
vendored
21
node_modules/@jridgewell/sourcemap-codec/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2015 Rich Harris
|
|
||||||
|
|
||||||
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.
|
|
200
node_modules/@jridgewell/sourcemap-codec/README.md
generated
vendored
200
node_modules/@jridgewell/sourcemap-codec/README.md
generated
vendored
@ -1,200 +0,0 @@
|
|||||||
# sourcemap-codec
|
|
||||||
|
|
||||||
Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
|
|
||||||
|
|
||||||
|
|
||||||
## Why?
|
|
||||||
|
|
||||||
Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
|
|
||||||
|
|
||||||
This package makes the process slightly easier.
|
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install sourcemap-codec
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
import { encode, decode } from 'sourcemap-codec';
|
|
||||||
|
|
||||||
var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
|
||||||
|
|
||||||
assert.deepEqual( decoded, [
|
|
||||||
// the first line (of the generated code) has no mappings,
|
|
||||||
// as shown by the starting semi-colon (which separates lines)
|
|
||||||
[],
|
|
||||||
|
|
||||||
// the second line contains four (comma-separated) segments
|
|
||||||
[
|
|
||||||
// segments are encoded as you'd expect:
|
|
||||||
// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
|
|
||||||
|
|
||||||
// i.e. the first segment begins at column 2, and maps back to the second column
|
|
||||||
// of the second line (both zero-based) of the 0th source, and uses the 0th
|
|
||||||
// name in the `map.names` array
|
|
||||||
[ 2, 0, 2, 2, 0 ],
|
|
||||||
|
|
||||||
// the remaining segments are 4-length rather than 5-length,
|
|
||||||
// because they don't map a name
|
|
||||||
[ 4, 0, 2, 4 ],
|
|
||||||
[ 6, 0, 2, 5 ],
|
|
||||||
[ 7, 0, 2, 7 ]
|
|
||||||
],
|
|
||||||
|
|
||||||
// the final line contains two segments
|
|
||||||
[
|
|
||||||
[ 2, 1, 10, 19 ],
|
|
||||||
[ 12, 1, 11, 20 ]
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
|
|
||||||
var encoded = encode( decoded );
|
|
||||||
assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
|
||||||
```
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
```
|
|
||||||
node v18.0.0
|
|
||||||
|
|
||||||
amp.js.map - 45120 segments
|
|
||||||
|
|
||||||
Decode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 5479160 bytes
|
|
||||||
sourcemap-codec 5659336 bytes
|
|
||||||
source-map-0.6.1 17144440 bytes
|
|
||||||
source-map-0.8.0 6867424 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Decode speed:
|
|
||||||
decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
|
|
||||||
decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
|
|
||||||
decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
|
|
||||||
decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
|
|
||||||
Fastest is decode: @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 1261620 bytes
|
|
||||||
sourcemap-codec 9119248 bytes
|
|
||||||
source-map-0.6.1 8968560 bytes
|
|
||||||
source-map-0.8.0 8952952 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode speed:
|
|
||||||
encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
|
|
||||||
encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
|
|
||||||
encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
|
|
||||||
encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
|
|
||||||
Fastest is encode: @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
babel.min.js.map - 347793 segments
|
|
||||||
|
|
||||||
Decode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 35338184 bytes
|
|
||||||
sourcemap-codec 35922736 bytes
|
|
||||||
source-map-0.6.1 62366360 bytes
|
|
||||||
source-map-0.8.0 44337416 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Decode speed:
|
|
||||||
decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
|
|
||||||
decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
|
|
||||||
decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
|
|
||||||
decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
|
|
||||||
Fastest is decode: source-map-0.8.0
|
|
||||||
|
|
||||||
Encode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 7212604 bytes
|
|
||||||
sourcemap-codec 21421456 bytes
|
|
||||||
source-map-0.6.1 25286888 bytes
|
|
||||||
source-map-0.8.0 25498744 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode speed:
|
|
||||||
encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
|
|
||||||
encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
|
|
||||||
encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
|
|
||||||
encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
|
|
||||||
Fastest is encode: @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
preact.js.map - 1992 segments
|
|
||||||
|
|
||||||
Decode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 500272 bytes
|
|
||||||
sourcemap-codec 516864 bytes
|
|
||||||
source-map-0.6.1 1596672 bytes
|
|
||||||
source-map-0.8.0 517272 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Decode speed:
|
|
||||||
decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
|
|
||||||
decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
|
|
||||||
decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
|
|
||||||
decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
|
|
||||||
Fastest is decode: @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 321026 bytes
|
|
||||||
sourcemap-codec 830832 bytes
|
|
||||||
source-map-0.6.1 586608 bytes
|
|
||||||
source-map-0.8.0 586680 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode speed:
|
|
||||||
encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
|
|
||||||
encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
|
|
||||||
encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
|
|
||||||
encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
|
|
||||||
Fastest is encode: @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
react.js.map - 5726 segments
|
|
||||||
|
|
||||||
Decode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 734848 bytes
|
|
||||||
sourcemap-codec 954200 bytes
|
|
||||||
source-map-0.6.1 2276432 bytes
|
|
||||||
source-map-0.8.0 955488 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Decode speed:
|
|
||||||
decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
|
|
||||||
decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
|
|
||||||
decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
|
|
||||||
decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
|
|
||||||
Fastest is decode: @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode Memory Usage:
|
|
||||||
@jridgewell/sourcemap-codec 638672 bytes
|
|
||||||
sourcemap-codec 1109840 bytes
|
|
||||||
source-map-0.6.1 1321224 bytes
|
|
||||||
source-map-0.8.0 1324448 bytes
|
|
||||||
Smallest memory usage is @jridgewell/sourcemap-codec
|
|
||||||
|
|
||||||
Encode speed:
|
|
||||||
encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
|
|
||||||
encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
|
|
||||||
encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
|
|
||||||
encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
|
|
||||||
Fastest is encode: @jridgewell/sourcemap-codec
|
|
||||||
```
|
|
||||||
|
|
||||||
# License
|
|
||||||
|
|
||||||
MIT
|
|
75
node_modules/@jridgewell/sourcemap-codec/package.json
generated
vendored
75
node_modules/@jridgewell/sourcemap-codec/package.json
generated
vendored
@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/sourcemap-codec",
|
|
||||||
"version": "1.4.14",
|
|
||||||
"description": "Encode/decode sourcemap mappings",
|
|
||||||
"keywords": [
|
|
||||||
"sourcemap",
|
|
||||||
"vlq"
|
|
||||||
],
|
|
||||||
"main": "dist/sourcemap-codec.umd.js",
|
|
||||||
"module": "dist/sourcemap-codec.mjs",
|
|
||||||
"typings": "dist/types/sourcemap-codec.d.ts",
|
|
||||||
"files": [
|
|
||||||
"dist",
|
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"types": "./dist/types/sourcemap-codec.d.ts",
|
|
||||||
"browser": "./dist/sourcemap-codec.umd.js",
|
|
||||||
"import": "./dist/sourcemap-codec.mjs",
|
|
||||||
"require": "./dist/sourcemap-codec.umd.js"
|
|
||||||
},
|
|
||||||
"./dist/sourcemap-codec.umd.js"
|
|
||||||
],
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"benchmark": "run-s build:rollup benchmark:*",
|
|
||||||
"benchmark:install": "cd benchmark && npm install",
|
|
||||||
"benchmark:only": "node --expose-gc benchmark/index.js",
|
|
||||||
"build": "run-s -n build:*",
|
|
||||||
"build:rollup": "rollup -c rollup.config.js",
|
|
||||||
"build:ts": "tsc --project tsconfig.build.json",
|
|
||||||
"lint": "run-s -n lint:*",
|
|
||||||
"lint:prettier": "npm run test:lint:prettier -- --write",
|
|
||||||
"lint:ts": "npm run test:lint:ts -- --fix",
|
|
||||||
"prebuild": "rm -rf dist",
|
|
||||||
"prepublishOnly": "npm run preversion",
|
|
||||||
"preversion": "run-s test build",
|
|
||||||
"pretest": "run-s build:rollup",
|
|
||||||
"test": "run-s -n test:lint test:only",
|
|
||||||
"test:debug": "mocha --inspect-brk",
|
|
||||||
"test:lint": "run-s -n test:lint:*",
|
|
||||||
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
|
||||||
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
|
||||||
"test:only": "mocha",
|
|
||||||
"test:coverage": "c8 mocha",
|
|
||||||
"test:watch": "mocha --watch"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jridgewell/sourcemap-codec.git"
|
|
||||||
},
|
|
||||||
"author": "Rich Harris",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@rollup/plugin-typescript": "8.3.0",
|
|
||||||
"@types/node": "17.0.15",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.10.0",
|
|
||||||
"@typescript-eslint/parser": "5.10.0",
|
|
||||||
"benchmark": "2.1.4",
|
|
||||||
"c8": "7.11.2",
|
|
||||||
"eslint": "8.7.0",
|
|
||||||
"eslint-config-prettier": "8.3.0",
|
|
||||||
"mocha": "9.2.0",
|
|
||||||
"npm-run-all": "4.1.5",
|
|
||||||
"prettier": "2.5.1",
|
|
||||||
"rollup": "2.64.0",
|
|
||||||
"source-map": "0.6.1",
|
|
||||||
"source-map-js": "1.0.2",
|
|
||||||
"sourcemap-codec": "1.4.8",
|
|
||||||
"typescript": "4.5.4"
|
|
||||||
}
|
|
||||||
}
|
|
198
node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts
generated
vendored
198
node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts
generated
vendored
@ -1,198 +0,0 @@
|
|||||||
export type SourceMapSegment =
|
|
||||||
| [number]
|
|
||||||
| [number, number, number, number]
|
|
||||||
| [number, number, number, number, number];
|
|
||||||
export type SourceMapLine = SourceMapSegment[];
|
|
||||||
export type SourceMapMappings = SourceMapLine[];
|
|
||||||
|
|
||||||
const comma = ','.charCodeAt(0);
|
|
||||||
const semicolon = ';'.charCodeAt(0);
|
|
||||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
||||||
const intToChar = new Uint8Array(64); // 64 possible chars.
|
|
||||||
const charToInt = new Uint8Array(128); // z is 122 in ASCII
|
|
||||||
|
|
||||||
for (let i = 0; i < chars.length; i++) {
|
|
||||||
const c = chars.charCodeAt(i);
|
|
||||||
intToChar[i] = c;
|
|
||||||
charToInt[c] = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Provide a fallback for older environments.
|
|
||||||
const td =
|
|
||||||
typeof TextDecoder !== 'undefined'
|
|
||||||
? /* #__PURE__ */ new TextDecoder()
|
|
||||||
: typeof Buffer !== 'undefined'
|
|
||||||
? {
|
|
||||||
decode(buf: Uint8Array) {
|
|
||||||
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
||||||
return out.toString();
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
decode(buf: Uint8Array) {
|
|
||||||
let out = '';
|
|
||||||
for (let i = 0; i < buf.length; i++) {
|
|
||||||
out += String.fromCharCode(buf[i]);
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export function decode(mappings: string): SourceMapMappings {
|
|
||||||
const state: [number, number, number, number, number] = new Int32Array(5) as any;
|
|
||||||
const decoded: SourceMapMappings = [];
|
|
||||||
|
|
||||||
let index = 0;
|
|
||||||
do {
|
|
||||||
const semi = indexOf(mappings, index);
|
|
||||||
const line: SourceMapLine = [];
|
|
||||||
let sorted = true;
|
|
||||||
let lastCol = 0;
|
|
||||||
state[0] = 0;
|
|
||||||
|
|
||||||
for (let i = index; i < semi; i++) {
|
|
||||||
let seg: SourceMapSegment;
|
|
||||||
|
|
||||||
i = decodeInteger(mappings, i, state, 0); // genColumn
|
|
||||||
const col = state[0];
|
|
||||||
if (col < lastCol) sorted = false;
|
|
||||||
lastCol = col;
|
|
||||||
|
|
||||||
if (hasMoreVlq(mappings, i, semi)) {
|
|
||||||
i = decodeInteger(mappings, i, state, 1); // sourcesIndex
|
|
||||||
i = decodeInteger(mappings, i, state, 2); // sourceLine
|
|
||||||
i = decodeInteger(mappings, i, state, 3); // sourceColumn
|
|
||||||
|
|
||||||
if (hasMoreVlq(mappings, i, semi)) {
|
|
||||||
i = decodeInteger(mappings, i, state, 4); // namesIndex
|
|
||||||
seg = [col, state[1], state[2], state[3], state[4]];
|
|
||||||
} else {
|
|
||||||
seg = [col, state[1], state[2], state[3]];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
seg = [col];
|
|
||||||
}
|
|
||||||
|
|
||||||
line.push(seg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sorted) sort(line);
|
|
||||||
decoded.push(line);
|
|
||||||
index = semi + 1;
|
|
||||||
} while (index <= mappings.length);
|
|
||||||
|
|
||||||
return decoded;
|
|
||||||
}
|
|
||||||
|
|
||||||
function indexOf(mappings: string, index: number): number {
|
|
||||||
const idx = mappings.indexOf(';', index);
|
|
||||||
return idx === -1 ? mappings.length : idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
function decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number {
|
|
||||||
let value = 0;
|
|
||||||
let shift = 0;
|
|
||||||
let integer = 0;
|
|
||||||
|
|
||||||
do {
|
|
||||||
const c = mappings.charCodeAt(pos++);
|
|
||||||
integer = charToInt[c];
|
|
||||||
value |= (integer & 31) << shift;
|
|
||||||
shift += 5;
|
|
||||||
} while (integer & 32);
|
|
||||||
|
|
||||||
const shouldNegate = value & 1;
|
|
||||||
value >>>= 1;
|
|
||||||
|
|
||||||
if (shouldNegate) {
|
|
||||||
value = -0x80000000 | -value;
|
|
||||||
}
|
|
||||||
|
|
||||||
state[j] += value;
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hasMoreVlq(mappings: string, i: number, length: number): boolean {
|
|
||||||
if (i >= length) return false;
|
|
||||||
return mappings.charCodeAt(i) !== comma;
|
|
||||||
}
|
|
||||||
|
|
||||||
function sort(line: SourceMapSegment[]) {
|
|
||||||
line.sort(sortComparator);
|
|
||||||
}
|
|
||||||
|
|
||||||
function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {
|
|
||||||
return a[0] - b[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
export function encode(decoded: SourceMapMappings): string;
|
|
||||||
export function encode(decoded: Readonly<SourceMapMappings>): string;
|
|
||||||
export function encode(decoded: Readonly<SourceMapMappings>): string {
|
|
||||||
const state: [number, number, number, number, number] = new Int32Array(5) as any;
|
|
||||||
const bufLength = 1024 * 16;
|
|
||||||
const subLength = bufLength - 36;
|
|
||||||
const buf = new Uint8Array(bufLength);
|
|
||||||
const sub = buf.subarray(0, subLength);
|
|
||||||
let pos = 0;
|
|
||||||
let out = '';
|
|
||||||
|
|
||||||
for (let i = 0; i < decoded.length; i++) {
|
|
||||||
const line = decoded[i];
|
|
||||||
if (i > 0) {
|
|
||||||
if (pos === bufLength) {
|
|
||||||
out += td.decode(buf);
|
|
||||||
pos = 0;
|
|
||||||
}
|
|
||||||
buf[pos++] = semicolon;
|
|
||||||
}
|
|
||||||
if (line.length === 0) continue;
|
|
||||||
|
|
||||||
state[0] = 0;
|
|
||||||
|
|
||||||
for (let j = 0; j < line.length; j++) {
|
|
||||||
const segment = line[j];
|
|
||||||
// We can push up to 5 ints, each int can take at most 7 chars, and we
|
|
||||||
// may push a comma.
|
|
||||||
if (pos > subLength) {
|
|
||||||
out += td.decode(sub);
|
|
||||||
buf.copyWithin(0, subLength, pos);
|
|
||||||
pos -= subLength;
|
|
||||||
}
|
|
||||||
if (j > 0) buf[pos++] = comma;
|
|
||||||
|
|
||||||
pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
|
|
||||||
|
|
||||||
if (segment.length === 1) continue;
|
|
||||||
pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
|
|
||||||
pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
|
|
||||||
pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
|
|
||||||
|
|
||||||
if (segment.length === 4) continue;
|
|
||||||
pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return out + td.decode(buf.subarray(0, pos));
|
|
||||||
}
|
|
||||||
|
|
||||||
function encodeInteger(
|
|
||||||
buf: Uint8Array,
|
|
||||||
pos: number,
|
|
||||||
state: SourceMapSegment,
|
|
||||||
segment: SourceMapSegment,
|
|
||||||
j: number,
|
|
||||||
): number {
|
|
||||||
const next = segment[j];
|
|
||||||
let num = next - state[j];
|
|
||||||
state[j] = next;
|
|
||||||
|
|
||||||
num = num < 0 ? (-num << 1) | 1 : num << 1;
|
|
||||||
do {
|
|
||||||
let clamped = num & 0b011111;
|
|
||||||
num >>>= 5;
|
|
||||||
if (num > 0) clamped |= 0b100000;
|
|
||||||
buf[pos++] = intToChar[clamped];
|
|
||||||
} while (num > 0);
|
|
||||||
|
|
||||||
return pos;
|
|
||||||
}
|
|
19
node_modules/@jridgewell/trace-mapping/LICENSE
generated
vendored
19
node_modules/@jridgewell/trace-mapping/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright 2022 Justin Ridgewell <justin@ridgewell.name>
|
|
||||||
|
|
||||||
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.
|
|
193
node_modules/@jridgewell/trace-mapping/README.md
generated
vendored
193
node_modules/@jridgewell/trace-mapping/README.md
generated
vendored
@ -1,193 +0,0 @@
|
|||||||
# @jridgewell/trace-mapping
|
|
||||||
|
|
||||||
> Trace the original position through a source map
|
|
||||||
|
|
||||||
`trace-mapping` allows you to take the line and column of an output file and trace it to the
|
|
||||||
original location in the source file through a source map.
|
|
||||||
|
|
||||||
You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This
|
|
||||||
provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install @jridgewell/trace-mapping
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { TraceMap, originalPositionFor, generatedPositionFor } from '@jridgewell/trace-mapping';
|
|
||||||
|
|
||||||
const tracer = new TraceMap({
|
|
||||||
version: 3,
|
|
||||||
sources: ['input.js'],
|
|
||||||
names: ['foo'],
|
|
||||||
mappings: 'KAyCIA',
|
|
||||||
});
|
|
||||||
|
|
||||||
// Lines start at line 1, columns at column 0.
|
|
||||||
const traced = originalPositionFor(tracer, { line: 1, column: 5 });
|
|
||||||
assert.deepEqual(traced, {
|
|
||||||
source: 'input.js',
|
|
||||||
line: 42,
|
|
||||||
column: 4,
|
|
||||||
name: 'foo',
|
|
||||||
});
|
|
||||||
|
|
||||||
const generated = generatedPositionFor(tracer, {
|
|
||||||
source: 'input.js',
|
|
||||||
line: 42,
|
|
||||||
column: 4,
|
|
||||||
});
|
|
||||||
assert.deepEqual(generated, {
|
|
||||||
line: 1,
|
|
||||||
column: 5,
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
We also provide a lower level API to get the actual segment that matches our line and column. Unlike
|
|
||||||
`originalPositionFor`, `traceSegment` uses a 0-base for `line`:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { traceSegment } from '@jridgewell/trace-mapping';
|
|
||||||
|
|
||||||
// line is 0-base.
|
|
||||||
const traced = traceSegment(tracer, /* line */ 0, /* column */ 5);
|
|
||||||
|
|
||||||
// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
|
|
||||||
// Again, line is 0-base and so is sourceLine
|
|
||||||
assert.deepEqual(traced, [5, 0, 41, 4, 0]);
|
|
||||||
```
|
|
||||||
|
|
||||||
### SectionedSourceMaps
|
|
||||||
|
|
||||||
The sourcemap spec defines a special `sections` field that's designed to handle concatenation of
|
|
||||||
output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool
|
|
||||||
produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap`
|
|
||||||
helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a
|
|
||||||
`TraceMap` instance:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { AnyMap } from '@jridgewell/trace-mapping';
|
|
||||||
const fooOutput = 'foo';
|
|
||||||
const barOutput = 'bar';
|
|
||||||
const output = [fooOutput, barOutput].join('\n');
|
|
||||||
|
|
||||||
const sectioned = new AnyMap({
|
|
||||||
version: 3,
|
|
||||||
sections: [
|
|
||||||
{
|
|
||||||
// 0-base line and column
|
|
||||||
offset: { line: 0, column: 0 },
|
|
||||||
// fooOutput's sourcemap
|
|
||||||
map: {
|
|
||||||
version: 3,
|
|
||||||
sources: ['foo.js'],
|
|
||||||
names: ['foo'],
|
|
||||||
mappings: 'AAAAA',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// barOutput's sourcemap will not affect the first line, only the second
|
|
||||||
offset: { line: 1, column: 0 },
|
|
||||||
map: {
|
|
||||||
version: 3,
|
|
||||||
sources: ['bar.js'],
|
|
||||||
names: ['bar'],
|
|
||||||
mappings: 'AAAAA',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
const traced = originalPositionFor(sectioned, {
|
|
||||||
line: 2,
|
|
||||||
column: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(traced, {
|
|
||||||
source: 'bar.js',
|
|
||||||
line: 1,
|
|
||||||
column: 0,
|
|
||||||
name: 'bar',
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
```
|
|
||||||
node v18.0.0
|
|
||||||
|
|
||||||
amp.js.map
|
|
||||||
trace-mapping: decoded JSON input x 183 ops/sec ±0.41% (87 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 384 ops/sec ±0.89% (89 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 3,085 ops/sec ±0.24% (100 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 452 ops/sec ±0.80% (84 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 88.82 ops/sec ±0.45% (77 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 38.39 ops/sec ±1.88% (52 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
trace-mapping: decoded originalPositionFor x 4,025,347 ops/sec ±0.15% (97 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 3,333,136 ops/sec ±1.26% (90 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 824,978 ops/sec ±1.06% (94 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 741,300 ops/sec ±0.93% (92 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 2,587,603 ops/sec ±0.75% (97 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
babel.min.js.map
|
|
||||||
trace-mapping: decoded JSON input x 17.43 ops/sec ±8.81% (33 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 34.18 ops/sec ±4.67% (50 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 1,010 ops/sec ±0.41% (98 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 39.45 ops/sec ±4.01% (52 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 6.57 ops/sec ±3.04% (21 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 4.23 ops/sec ±2.93% (15 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
trace-mapping: decoded originalPositionFor x 7,576,265 ops/sec ±0.74% (96 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 5,019,743 ops/sec ±0.74% (94 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 3,396,137 ops/sec ±42.32% (95 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 3,753,176 ops/sec ±0.72% (95 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 6,423,633 ops/sec ±0.74% (95 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
preact.js.map
|
|
||||||
trace-mapping: decoded JSON input x 3,499 ops/sec ±0.18% (98 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 6,078 ops/sec ±0.25% (99 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 254,788 ops/sec ±0.13% (100 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 14,063 ops/sec ±0.27% (94 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 2,465 ops/sec ±0.25% (98 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 1,174 ops/sec ±1.90% (95 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
trace-mapping: decoded originalPositionFor x 7,720,171 ops/sec ±0.14% (97 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 6,864,485 ops/sec ±0.16% (101 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 2,387,219 ops/sec ±0.28% (98 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 1,565,339 ops/sec ±0.32% (101 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 3,819,732 ops/sec ±0.38% (98 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
react.js.map
|
|
||||||
trace-mapping: decoded JSON input x 1,719 ops/sec ±0.19% (99 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 4,284 ops/sec ±0.51% (99 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 94,668 ops/sec ±0.08% (99 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 5,287 ops/sec ±0.24% (99 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 814 ops/sec ±0.20% (98 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 429 ops/sec ±0.24% (94 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
trace-mapping: decoded originalPositionFor x 28,927,989 ops/sec ±0.61% (94 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 27,394,475 ops/sec ±0.55% (97 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 16,856,730 ops/sec ±0.45% (96 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 12,258,950 ops/sec ±0.41% (97 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 22,272,990 ops/sec ±0.58% (95 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
```
|
|
||||||
|
|
||||||
[source-map]: https://www.npmjs.com/package/source-map
|
|
70
node_modules/@jridgewell/trace-mapping/package.json
generated
vendored
70
node_modules/@jridgewell/trace-mapping/package.json
generated
vendored
@ -1,70 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/trace-mapping",
|
|
||||||
"version": "0.3.9",
|
|
||||||
"description": "Trace the original position through a source map",
|
|
||||||
"keywords": [
|
|
||||||
"source",
|
|
||||||
"map"
|
|
||||||
],
|
|
||||||
"main": "dist/trace-mapping.umd.js",
|
|
||||||
"module": "dist/trace-mapping.mjs",
|
|
||||||
"typings": "dist/types/trace-mapping.d.ts",
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"browser": "./dist/trace-mapping.umd.js",
|
|
||||||
"require": "./dist/trace-mapping.umd.js",
|
|
||||||
"import": "./dist/trace-mapping.mjs"
|
|
||||||
},
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"author": "Justin Ridgewell <justin@ridgewell.name>",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jridgewell/trace-mapping.git"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"scripts": {
|
|
||||||
"benchmark": "run-s build:rollup benchmark:*",
|
|
||||||
"benchmark:install": "cd benchmark && npm install",
|
|
||||||
"benchmark:only": "node benchmark/index.mjs",
|
|
||||||
"build": "run-s -n build:*",
|
|
||||||
"build:rollup": "rollup -c rollup.config.js",
|
|
||||||
"build:ts": "tsc --project tsconfig.build.json",
|
|
||||||
"lint": "run-s -n lint:*",
|
|
||||||
"lint:prettier": "npm run test:lint:prettier -- --write",
|
|
||||||
"lint:ts": "npm run test:lint:ts -- --fix",
|
|
||||||
"prebuild": "rm -rf dist",
|
|
||||||
"prepublishOnly": "npm run preversion",
|
|
||||||
"preversion": "run-s test build",
|
|
||||||
"test": "run-s -n test:lint test:only",
|
|
||||||
"test:debug": "ava debug",
|
|
||||||
"test:lint": "run-s -n test:lint:*",
|
|
||||||
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'",
|
|
||||||
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
|
||||||
"test:only": "c8 ava",
|
|
||||||
"test:watch": "ava --watch"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@rollup/plugin-typescript": "8.3.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.10.0",
|
|
||||||
"@typescript-eslint/parser": "5.10.0",
|
|
||||||
"ava": "4.0.1",
|
|
||||||
"benchmark": "2.1.4",
|
|
||||||
"c8": "7.11.0",
|
|
||||||
"esbuild": "0.14.14",
|
|
||||||
"esbuild-node-loader": "0.6.4",
|
|
||||||
"eslint": "8.7.0",
|
|
||||||
"eslint-config-prettier": "8.3.0",
|
|
||||||
"npm-run-all": "4.1.5",
|
|
||||||
"prettier": "2.5.1",
|
|
||||||
"rollup": "2.64.0",
|
|
||||||
"typescript": "4.5.4"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@jridgewell/resolve-uri": "^3.0.3",
|
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
|
||||||
}
|
|
||||||
}
|
|
3
node_modules/@next/env/README.md
generated
vendored
3
node_modules/@next/env/README.md
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
# `@next/env`
|
|
||||||
|
|
||||||
Next.js' util for loading dotenv files in with the proper priorities
|
|
39
node_modules/@next/env/package.json
generated
vendored
39
node_modules/@next/env/package.json
generated
vendored
@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@next/env",
|
|
||||||
"version": "13.1.5",
|
|
||||||
"keywords": [
|
|
||||||
"react",
|
|
||||||
"next",
|
|
||||||
"next.js",
|
|
||||||
"dotenv"
|
|
||||||
],
|
|
||||||
"description": "Next.js dotenv file loading",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/vercel/next.js",
|
|
||||||
"directory": "packages/next-env"
|
|
||||||
},
|
|
||||||
"author": "Next.js Team <support@vercel.com>",
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"types": "types/index.d.ts",
|
|
||||||
"files": [
|
|
||||||
"dist",
|
|
||||||
"types"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"dev": "ncc build ./index.ts -w -o dist/",
|
|
||||||
"prerelease": "rimraf ./dist/",
|
|
||||||
"types": "tsc index.ts --declaration --emitDeclarationOnly --declarationDir types --esModuleInterop",
|
|
||||||
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
|
|
||||||
"build": "pnpm release && pnpm types",
|
|
||||||
"prepublishOnly": "cd ../../ && turbo run build",
|
|
||||||
"test-pack": "cd ../../ && pnpm test-pack next-env"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@vercel/ncc": "0.34.0",
|
|
||||||
"dotenv": "10.0.0",
|
|
||||||
"dotenv-expand": "8.0.1",
|
|
||||||
"rimraf": "3.0.2"
|
|
||||||
}
|
|
||||||
}
|
|
17
node_modules/@next/env/types/index.d.ts
generated
vendored
17
node_modules/@next/env/types/index.d.ts
generated
vendored
@ -1,17 +0,0 @@
|
|||||||
export declare type Env = {
|
|
||||||
[key: string]: string | undefined;
|
|
||||||
};
|
|
||||||
export declare type LoadedEnvFiles = Array<{
|
|
||||||
path: string;
|
|
||||||
contents: string;
|
|
||||||
}>;
|
|
||||||
declare type Log = {
|
|
||||||
info: (...args: any[]) => void;
|
|
||||||
error: (...args: any[]) => void;
|
|
||||||
};
|
|
||||||
export declare function processEnv(loadedEnvFiles: LoadedEnvFiles, dir?: string, log?: Log, forceReload?: boolean): Env;
|
|
||||||
export declare function loadEnvConfig(dir: string, dev?: boolean, log?: Log, forceReload?: boolean): {
|
|
||||||
combinedEnv: Env;
|
|
||||||
loadedEnvFiles: LoadedEnvFiles;
|
|
||||||
};
|
|
||||||
export {};
|
|
3
node_modules/@next/swc-darwin-arm64/README.md
generated
vendored
3
node_modules/@next/swc-darwin-arm64/README.md
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
# `@next/swc-darwin-arm64`
|
|
||||||
|
|
||||||
This is the **aarch64-apple-darwin** binary for `@next/swc`
|
|
BIN
node_modules/@next/swc-darwin-arm64/next-swc.darwin-arm64.node
generated
vendored
BIN
node_modules/@next/swc-darwin-arm64/next-swc.darwin-arm64.node
generated
vendored
Binary file not shown.
18
node_modules/@next/swc-darwin-arm64/package.json
generated
vendored
18
node_modules/@next/swc-darwin-arm64/package.json
generated
vendored
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@next/swc-darwin-arm64",
|
|
||||||
"version": "13.1.5",
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"main": "next-swc.darwin-arm64.node",
|
|
||||||
"files": [
|
|
||||||
"next-swc.darwin-arm64.node"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
}
|
|
201
node_modules/@prisma/client/LICENSE
generated
vendored
201
node_modules/@prisma/client/LICENSE
generated
vendored
@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
27
node_modules/@prisma/client/README.md
generated
vendored
27
node_modules/@prisma/client/README.md
generated
vendored
@ -1,27 +0,0 @@
|
|||||||
# Prisma Client · [](https://www.npmjs.com/package/@prisma/client) [](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [](https://github.com/prisma/prisma/blob/main/LICENSE) [](https://slack.prisma.io/)
|
|
||||||
|
|
||||||
Prisma Client JS is an **auto-generated query builder** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js.
|
|
||||||
|
|
||||||
It is part of the [Prisma](https://www.prisma.io/) ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management. Learn more in the main [`prisma`](https://github.com/prisma/prisma/) repository or read the [documentation](https://www.prisma.io/docs/).
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
Follow one of these guides to get started with Prisma Client JS:
|
|
||||||
|
|
||||||
- [Quickstart](https://www.prisma.io/docs/getting-started/quickstart) (5 min)
|
|
||||||
- [Set up a new project with Prisma (SQL migrations)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-sql) (15 min)
|
|
||||||
- [Set up a new project with Prisma (Prisma Migrate)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-prisma-migrate) (15 min)
|
|
||||||
- [Add Prisma to an existing project](https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project) (15 min)
|
|
||||||
|
|
||||||
Alternatively you can explore the ready-to-run [examples](https://github.com/prisma/prisma-examples/) (REST, GraphQL, gRPC, plain JavaScript and TypeScript demos, ...) or watch the [demo videos](https://www.youtube.com/watch?v=0RhtQgIs-TE&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=1) (1-2 min per video).
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Refer to our [contribution guidelines](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) and [Code of Conduct for contributors](https://github.com/prisma/prisma/blob/main/CODE_OF_CONDUCT.md).
|
|
||||||
|
|
||||||
## Build Status
|
|
||||||
|
|
||||||
- Prisma Tests Status:
|
|
||||||
[](https://buildkite.com/prisma/prisma2-test)
|
|
||||||
- Ecosystem Tests Status:
|
|
||||||
[](https://github.com/prisma/ecosystem-tests/actions)
|
|
1
node_modules/@prisma/client/edge.d.ts
generated
vendored
1
node_modules/@prisma/client/edge.d.ts
generated
vendored
@ -1 +0,0 @@
|
|||||||
export * from '.prisma/client'
|
|
3
node_modules/@prisma/client/edge.js
generated
vendored
3
node_modules/@prisma/client/edge.js
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
...require('.prisma/client/edge'),
|
|
||||||
}
|
|
27999
node_modules/@prisma/client/generator-build/index.js
generated
vendored
27999
node_modules/@prisma/client/generator-build/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
3
node_modules/@prisma/client/index-browser.js
generated
vendored
3
node_modules/@prisma/client/index-browser.js
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
const prisma = require('.prisma/client/index-browser')
|
|
||||||
|
|
||||||
module.exports = prisma
|
|
1
node_modules/@prisma/client/index.d.ts
generated
vendored
1
node_modules/@prisma/client/index.d.ts
generated
vendored
@ -1 +0,0 @@
|
|||||||
export * from '.prisma/client'
|
|
3
node_modules/@prisma/client/index.js
generated
vendored
3
node_modules/@prisma/client/index.js
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
...require('.prisma/client/index'),
|
|
||||||
}
|
|
153
node_modules/@prisma/client/package.json
generated
vendored
153
node_modules/@prisma/client/package.json
generated
vendored
@ -1,153 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@prisma/client",
|
|
||||||
"version": "4.9.0",
|
|
||||||
"description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports MySQL, PostgreSQL, MariaDB, SQLite databases.",
|
|
||||||
"keywords": [
|
|
||||||
"orm",
|
|
||||||
"prisma2",
|
|
||||||
"prisma",
|
|
||||||
"client",
|
|
||||||
"query",
|
|
||||||
"database",
|
|
||||||
"sql",
|
|
||||||
"postgres",
|
|
||||||
"postgresql",
|
|
||||||
"mysql",
|
|
||||||
"sqlite",
|
|
||||||
"mariadb",
|
|
||||||
"mssql",
|
|
||||||
"typescript",
|
|
||||||
"query-builder"
|
|
||||||
],
|
|
||||||
"main": "index.js",
|
|
||||||
"browser": "index-browser.js",
|
|
||||||
"types": "index.d.ts",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.17"
|
|
||||||
},
|
|
||||||
"homepage": "https://www.prisma.io",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/prisma/prisma.git",
|
|
||||||
"directory": "packages/client"
|
|
||||||
},
|
|
||||||
"author": "Tim Suchanek <suchanek@prisma.io>",
|
|
||||||
"bugs": "https://github.com/prisma/prisma/issues",
|
|
||||||
"files": [
|
|
||||||
"README.md",
|
|
||||||
"runtime",
|
|
||||||
"scripts",
|
|
||||||
"generator-build",
|
|
||||||
"edge.js",
|
|
||||||
"edge.d.ts",
|
|
||||||
"index.js",
|
|
||||||
"index.d.ts",
|
|
||||||
"index-browser.js"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"@faker-js/faker": "7.6.0",
|
|
||||||
"@fast-check/jest": "1.6.0",
|
|
||||||
"@jest/globals": "29.3.1",
|
|
||||||
"@jest/test-sequencer": "29.3.1",
|
|
||||||
"@opentelemetry/api": "1.3.0",
|
|
||||||
"@opentelemetry/context-async-hooks": "1.8.0",
|
|
||||||
"@opentelemetry/instrumentation": "0.34.0",
|
|
||||||
"@opentelemetry/resources": "1.8.0",
|
|
||||||
"@opentelemetry/sdk-trace-base": "1.8.0",
|
|
||||||
"@opentelemetry/semantic-conventions": "1.8.0",
|
|
||||||
"@prisma/mini-proxy": "0.3.0",
|
|
||||||
"@swc-node/register": "1.5.4",
|
|
||||||
"@swc/core": "1.3.14",
|
|
||||||
"@swc/jest": "0.2.24",
|
|
||||||
"@timsuchanek/copy": "1.4.5",
|
|
||||||
"@types/debug": "4.1.7",
|
|
||||||
"@types/fs-extra": "9.0.13",
|
|
||||||
"@types/jest": "29.2.4",
|
|
||||||
"@types/js-levenshtein": "1.1.1",
|
|
||||||
"@types/mssql": "8.1.1",
|
|
||||||
"@types/node": "14.18.36",
|
|
||||||
"@types/pg": "8.6.6",
|
|
||||||
"@types/yeoman-generator": "5.2.11",
|
|
||||||
"arg": "5.0.2",
|
|
||||||
"benchmark": "2.1.4",
|
|
||||||
"chalk": "4.1.2",
|
|
||||||
"decimal.js": "10.4.2",
|
|
||||||
"esbuild": "0.15.13",
|
|
||||||
"execa": "5.1.1",
|
|
||||||
"expect-type": "0.15.0",
|
|
||||||
"flat-map-polyfill": "0.3.8",
|
|
||||||
"fs-extra": "11.1.0",
|
|
||||||
"fs-monkey": "1.0.3",
|
|
||||||
"get-own-enumerable-property-symbols": "3.0.2",
|
|
||||||
"globby": "11.1.0",
|
|
||||||
"indent-string": "4.0.0",
|
|
||||||
"is-obj": "2.0.0",
|
|
||||||
"is-regexp": "2.1.0",
|
|
||||||
"jest": "29.3.1",
|
|
||||||
"jest-junit": "15.0.0",
|
|
||||||
"jest-snapshot": "29.3.1",
|
|
||||||
"js-levenshtein": "1.1.6",
|
|
||||||
"klona": "2.0.5",
|
|
||||||
"lz-string": "1.4.4",
|
|
||||||
"mariadb": "3.0.2",
|
|
||||||
"memfs": "3.4.10",
|
|
||||||
"mssql": "9.0.1",
|
|
||||||
"node-fetch": "2.6.7",
|
|
||||||
"pg": "8.8.0",
|
|
||||||
"pkg-up": "3.1.0",
|
|
||||||
"pluralize": "8.0.0",
|
|
||||||
"resolve": "1.22.1",
|
|
||||||
"rimraf": "3.0.2",
|
|
||||||
"simple-statistics": "7.8.0",
|
|
||||||
"sort-keys": "4.2.0",
|
|
||||||
"source-map-support": "0.5.21",
|
|
||||||
"sql-template-tag": "5.0.3",
|
|
||||||
"stacktrace-parser": "0.1.10",
|
|
||||||
"strip-ansi": "6.0.1",
|
|
||||||
"strip-indent": "3.0.0",
|
|
||||||
"ts-jest": "29.0.3",
|
|
||||||
"ts-node": "10.9.1",
|
|
||||||
"ts-pattern": "4.0.5",
|
|
||||||
"tsd": "0.21.0",
|
|
||||||
"typescript": "4.8.4",
|
|
||||||
"yeoman-generator": "5.7.0",
|
|
||||||
"yo": "4.3.1",
|
|
||||||
"zx": "7.1.1",
|
|
||||||
"@prisma/debug": "4.9.0",
|
|
||||||
"@prisma/engine-core": "4.9.0",
|
|
||||||
"@prisma/engines": "4.9.0",
|
|
||||||
"@prisma/fetch-engine": "4.9.0",
|
|
||||||
"@prisma/generator-helper": "4.9.0",
|
|
||||||
"@prisma/get-platform": "4.9.0",
|
|
||||||
"@prisma/instrumentation": "4.9.0",
|
|
||||||
"@prisma/internals": "4.9.0",
|
|
||||||
"@prisma/migrate": "4.9.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"prisma": "*"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"prisma": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@prisma/engines-version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5"
|
|
||||||
},
|
|
||||||
"sideEffects": false,
|
|
||||||
"scripts": {
|
|
||||||
"dev": "DEV=true node -r esbuild-register helpers/build.ts",
|
|
||||||
"build": "node -r esbuild-register helpers/build.ts",
|
|
||||||
"test": "jest --verbose",
|
|
||||||
"test:e2e": "node -r esbuild-register tests/e2e/_utils/run.ts",
|
|
||||||
"test:functional": "node -r esbuild-register helpers/functional-test/run-tests.ts",
|
|
||||||
"test:memory": "node -r esbuild-register helpers/memory-tests.ts",
|
|
||||||
"test:functional:code": "node -r esbuild-register helpers/functional-test/run-tests.ts --no-types",
|
|
||||||
"test:functional:types": "node -r esbuild-register helpers/functional-test/run-tests.ts --types-only",
|
|
||||||
"test-notypes": "jest --verbose --testPathIgnorePatterns src/__tests__/types/types.test.ts",
|
|
||||||
"generate": "node scripts/postinstall.js",
|
|
||||||
"postinstall": "node scripts/postinstall.js",
|
|
||||||
"new-test": "NODE_OPTIONS='-r ts-node/register' yo ./helpers/generator-test/index.ts"
|
|
||||||
}
|
|
||||||
}
|
|
98
node_modules/@prisma/client/runtime/edge-esm.js
generated
vendored
98
node_modules/@prisma/client/runtime/edge-esm.js
generated
vendored
File diff suppressed because one or more lines are too long
98
node_modules/@prisma/client/runtime/edge.js
generated
vendored
98
node_modules/@prisma/client/runtime/edge.js
generated
vendored
File diff suppressed because one or more lines are too long
323
node_modules/@prisma/client/runtime/index-browser.d.ts
generated
vendored
323
node_modules/@prisma/client/runtime/index-browser.d.ts
generated
vendored
@ -1,323 +0,0 @@
|
|||||||
declare class AnyNull extends NullTypesEnumValue {
|
|
||||||
}
|
|
||||||
|
|
||||||
declare class DbNull extends NullTypesEnumValue {
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare namespace Decimal {
|
|
||||||
export type Constructor = typeof Decimal;
|
|
||||||
export type Instance = Decimal;
|
|
||||||
export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
||||||
export type Modulo = Rounding | 9;
|
|
||||||
export type Value = string | number | Decimal;
|
|
||||||
|
|
||||||
// http://mikemcl.github.io/decimal.js/#constructor-properties
|
|
||||||
export interface Config {
|
|
||||||
precision?: number;
|
|
||||||
rounding?: Rounding;
|
|
||||||
toExpNeg?: number;
|
|
||||||
toExpPos?: number;
|
|
||||||
minE?: number;
|
|
||||||
maxE?: number;
|
|
||||||
crypto?: boolean;
|
|
||||||
modulo?: Modulo;
|
|
||||||
defaults?: boolean;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare class Decimal {
|
|
||||||
readonly d: number[];
|
|
||||||
readonly e: number;
|
|
||||||
readonly s: number;
|
|
||||||
private readonly toStringTag: string;
|
|
||||||
|
|
||||||
constructor(n: Decimal.Value);
|
|
||||||
|
|
||||||
absoluteValue(): Decimal;
|
|
||||||
abs(): Decimal;
|
|
||||||
|
|
||||||
ceil(): Decimal;
|
|
||||||
|
|
||||||
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
|
|
||||||
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
comparedTo(n: Decimal.Value): number;
|
|
||||||
cmp(n: Decimal.Value): number;
|
|
||||||
|
|
||||||
cosine(): Decimal;
|
|
||||||
cos(): Decimal;
|
|
||||||
|
|
||||||
cubeRoot(): Decimal;
|
|
||||||
cbrt(): Decimal;
|
|
||||||
|
|
||||||
decimalPlaces(): number;
|
|
||||||
dp(): number;
|
|
||||||
|
|
||||||
dividedBy(n: Decimal.Value): Decimal;
|
|
||||||
div(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
dividedToIntegerBy(n: Decimal.Value): Decimal;
|
|
||||||
divToInt(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
equals(n: Decimal.Value): boolean;
|
|
||||||
eq(n: Decimal.Value): boolean;
|
|
||||||
|
|
||||||
floor(): Decimal;
|
|
||||||
|
|
||||||
greaterThan(n: Decimal.Value): boolean;
|
|
||||||
gt(n: Decimal.Value): boolean;
|
|
||||||
|
|
||||||
greaterThanOrEqualTo(n: Decimal.Value): boolean;
|
|
||||||
gte(n: Decimal.Value): boolean;
|
|
||||||
|
|
||||||
hyperbolicCosine(): Decimal;
|
|
||||||
cosh(): Decimal;
|
|
||||||
|
|
||||||
hyperbolicSine(): Decimal;
|
|
||||||
sinh(): Decimal;
|
|
||||||
|
|
||||||
hyperbolicTangent(): Decimal;
|
|
||||||
tanh(): Decimal;
|
|
||||||
|
|
||||||
inverseCosine(): Decimal;
|
|
||||||
acos(): Decimal;
|
|
||||||
|
|
||||||
inverseHyperbolicCosine(): Decimal;
|
|
||||||
acosh(): Decimal;
|
|
||||||
|
|
||||||
inverseHyperbolicSine(): Decimal;
|
|
||||||
asinh(): Decimal;
|
|
||||||
|
|
||||||
inverseHyperbolicTangent(): Decimal;
|
|
||||||
atanh(): Decimal;
|
|
||||||
|
|
||||||
inverseSine(): Decimal;
|
|
||||||
asin(): Decimal;
|
|
||||||
|
|
||||||
inverseTangent(): Decimal;
|
|
||||||
atan(): Decimal;
|
|
||||||
|
|
||||||
isFinite(): boolean;
|
|
||||||
|
|
||||||
isInteger(): boolean;
|
|
||||||
isInt(): boolean;
|
|
||||||
|
|
||||||
isNaN(): boolean;
|
|
||||||
|
|
||||||
isNegative(): boolean;
|
|
||||||
isNeg(): boolean;
|
|
||||||
|
|
||||||
isPositive(): boolean;
|
|
||||||
isPos(): boolean;
|
|
||||||
|
|
||||||
isZero(): boolean;
|
|
||||||
|
|
||||||
lessThan(n: Decimal.Value): boolean;
|
|
||||||
lt(n: Decimal.Value): boolean;
|
|
||||||
|
|
||||||
lessThanOrEqualTo(n: Decimal.Value): boolean;
|
|
||||||
lte(n: Decimal.Value): boolean;
|
|
||||||
|
|
||||||
logarithm(n?: Decimal.Value): Decimal;
|
|
||||||
log(n?: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
minus(n: Decimal.Value): Decimal;
|
|
||||||
sub(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
modulo(n: Decimal.Value): Decimal;
|
|
||||||
mod(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
naturalExponential(): Decimal;
|
|
||||||
exp(): Decimal;
|
|
||||||
|
|
||||||
naturalLogarithm(): Decimal;
|
|
||||||
ln(): Decimal;
|
|
||||||
|
|
||||||
negated(): Decimal;
|
|
||||||
neg(): Decimal;
|
|
||||||
|
|
||||||
plus(n: Decimal.Value): Decimal;
|
|
||||||
add(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
precision(includeZeros?: boolean): number;
|
|
||||||
sd(includeZeros?: boolean): number;
|
|
||||||
|
|
||||||
round(): Decimal;
|
|
||||||
|
|
||||||
sine() : Decimal;
|
|
||||||
sin() : Decimal;
|
|
||||||
|
|
||||||
squareRoot(): Decimal;
|
|
||||||
sqrt(): Decimal;
|
|
||||||
|
|
||||||
tangent() : Decimal;
|
|
||||||
tan() : Decimal;
|
|
||||||
|
|
||||||
times(n: Decimal.Value): Decimal;
|
|
||||||
mul(n: Decimal.Value) : Decimal;
|
|
||||||
|
|
||||||
toBinary(significantDigits?: number): string;
|
|
||||||
toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
|
|
||||||
|
|
||||||
toDecimalPlaces(decimalPlaces?: number): Decimal;
|
|
||||||
toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
|
|
||||||
toDP(decimalPlaces?: number): Decimal;
|
|
||||||
toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
|
|
||||||
|
|
||||||
toExponential(decimalPlaces?: number): string;
|
|
||||||
toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
|
|
||||||
|
|
||||||
toFixed(decimalPlaces?: number): string;
|
|
||||||
toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
|
|
||||||
|
|
||||||
toFraction(max_denominator?: Decimal.Value): Decimal[];
|
|
||||||
|
|
||||||
toHexadecimal(significantDigits?: number): string;
|
|
||||||
toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
|
|
||||||
toHex(significantDigits?: number): string;
|
|
||||||
toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
|
|
||||||
|
|
||||||
toJSON(): string;
|
|
||||||
|
|
||||||
toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
|
|
||||||
|
|
||||||
toNumber(): number;
|
|
||||||
|
|
||||||
toOctal(significantDigits?: number): string;
|
|
||||||
toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
|
|
||||||
|
|
||||||
toPower(n: Decimal.Value): Decimal;
|
|
||||||
pow(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
toPrecision(significantDigits?: number): string;
|
|
||||||
toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
|
|
||||||
|
|
||||||
toSignificantDigits(significantDigits?: number): Decimal;
|
|
||||||
toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
|
|
||||||
toSD(significantDigits?: number): Decimal;
|
|
||||||
toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
|
|
||||||
|
|
||||||
toString(): string;
|
|
||||||
|
|
||||||
truncated(): Decimal;
|
|
||||||
trunc(): Decimal;
|
|
||||||
|
|
||||||
valueOf(): string;
|
|
||||||
|
|
||||||
static abs(n: Decimal.Value): Decimal;
|
|
||||||
static acos(n: Decimal.Value): Decimal;
|
|
||||||
static acosh(n: Decimal.Value): Decimal;
|
|
||||||
static add(x: Decimal.Value, y: Decimal.Value): Decimal;
|
|
||||||
static asin(n: Decimal.Value): Decimal;
|
|
||||||
static asinh(n: Decimal.Value): Decimal;
|
|
||||||
static atan(n: Decimal.Value): Decimal;
|
|
||||||
static atanh(n: Decimal.Value): Decimal;
|
|
||||||
static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
|
|
||||||
static cbrt(n: Decimal.Value): Decimal;
|
|
||||||
static ceil(n: Decimal.Value): Decimal;
|
|
||||||
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
|
|
||||||
static clone(object?: Decimal.Config): Decimal.Constructor;
|
|
||||||
static config(object: Decimal.Config): Decimal.Constructor;
|
|
||||||
static cos(n: Decimal.Value): Decimal;
|
|
||||||
static cosh(n: Decimal.Value): Decimal;
|
|
||||||
static div(x: Decimal.Value, y: Decimal.Value): Decimal;
|
|
||||||
static exp(n: Decimal.Value): Decimal;
|
|
||||||
static floor(n: Decimal.Value): Decimal;
|
|
||||||
static hypot(...n: Decimal.Value[]): Decimal;
|
|
||||||
static isDecimal(object: any): object is Decimal;
|
|
||||||
static ln(n: Decimal.Value): Decimal;
|
|
||||||
static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
|
|
||||||
static log2(n: Decimal.Value): Decimal;
|
|
||||||
static log10(n: Decimal.Value): Decimal;
|
|
||||||
static max(...n: Decimal.Value[]): Decimal;
|
|
||||||
static min(...n: Decimal.Value[]): Decimal;
|
|
||||||
static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
|
|
||||||
static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
|
|
||||||
static noConflict(): Decimal.Constructor; // Browser only
|
|
||||||
static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
|
|
||||||
static random(significantDigits?: number): Decimal;
|
|
||||||
static round(n: Decimal.Value): Decimal;
|
|
||||||
static set(object: Decimal.Config): Decimal.Constructor;
|
|
||||||
static sign(n: Decimal.Value): number;
|
|
||||||
static sin(n: Decimal.Value): Decimal;
|
|
||||||
static sinh(n: Decimal.Value): Decimal;
|
|
||||||
static sqrt(n: Decimal.Value): Decimal;
|
|
||||||
static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
|
|
||||||
static sum(...n: Decimal.Value[]): Decimal;
|
|
||||||
static tan(n: Decimal.Value): Decimal;
|
|
||||||
static tanh(n: Decimal.Value): Decimal;
|
|
||||||
static trunc(n: Decimal.Value): Decimal;
|
|
||||||
|
|
||||||
static readonly default?: Decimal.Constructor;
|
|
||||||
static readonly Decimal?: Decimal.Constructor;
|
|
||||||
|
|
||||||
static readonly precision: number;
|
|
||||||
static readonly rounding: Decimal.Rounding;
|
|
||||||
static readonly toExpNeg: number;
|
|
||||||
static readonly toExpPos: number;
|
|
||||||
static readonly minE: number;
|
|
||||||
static readonly maxE: number;
|
|
||||||
static readonly crypto: boolean;
|
|
||||||
static readonly modulo: Decimal.Modulo;
|
|
||||||
|
|
||||||
static readonly ROUND_UP: 0;
|
|
||||||
static readonly ROUND_DOWN: 1;
|
|
||||||
static readonly ROUND_CEIL: 2;
|
|
||||||
static readonly ROUND_FLOOR: 3;
|
|
||||||
static readonly ROUND_HALF_UP: 4;
|
|
||||||
static readonly ROUND_HALF_DOWN: 5;
|
|
||||||
static readonly ROUND_HALF_EVEN: 6;
|
|
||||||
static readonly ROUND_HALF_CEIL: 7;
|
|
||||||
static readonly ROUND_HALF_FLOOR: 8;
|
|
||||||
static readonly EUCLID: 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare class JsonNull extends NullTypesEnumValue {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates more strict variant of an enum which, unlike regular enum,
|
|
||||||
* throws on non-existing property access. This can be useful in following situations:
|
|
||||||
* - we have an API, that accepts both `undefined` and `SomeEnumType` as an input
|
|
||||||
* - enum values are generated dynamically from DMMF.
|
|
||||||
*
|
|
||||||
* In that case, if using normal enums and no compile-time typechecking, using non-existing property
|
|
||||||
* will result in `undefined` value being used, which will be accepted. Using strict enum
|
|
||||||
* in this case will help to have a runtime exception, telling you that you are probably doing something wrong.
|
|
||||||
*
|
|
||||||
* Note: if you need to check for existence of a value in the enum you can still use either
|
|
||||||
* `in` operator or `hasOwnProperty` function.
|
|
||||||
*
|
|
||||||
* @param definition
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
|
|
||||||
|
|
||||||
declare class NullTypesEnumValue extends ObjectEnumValue {
|
|
||||||
_getNamespace(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Base class for unique values of object-valued enums.
|
|
||||||
*/
|
|
||||||
declare abstract class ObjectEnumValue {
|
|
||||||
constructor(arg?: symbol);
|
|
||||||
abstract _getNamespace(): string;
|
|
||||||
_getName(): string;
|
|
||||||
toString(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare const objectEnumValues: {
|
|
||||||
classes: {
|
|
||||||
DbNull: typeof DbNull;
|
|
||||||
JsonNull: typeof JsonNull;
|
|
||||||
AnyNull: typeof AnyNull;
|
|
||||||
};
|
|
||||||
instances: {
|
|
||||||
DbNull: DbNull;
|
|
||||||
JsonNull: JsonNull;
|
|
||||||
AnyNull: AnyNull;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export { }
|
|
2479
node_modules/@prisma/client/runtime/index-browser.js
generated
vendored
2479
node_modules/@prisma/client/runtime/index-browser.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2262
node_modules/@prisma/client/runtime/index.d.ts
generated
vendored
2262
node_modules/@prisma/client/runtime/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
33329
node_modules/@prisma/client/runtime/index.js
generated
vendored
33329
node_modules/@prisma/client/runtime/index.js
generated
vendored
File diff suppressed because one or more lines are too long
176
node_modules/@prisma/client/scripts/colors.js
generated
vendored
176
node_modules/@prisma/client/scripts/colors.js
generated
vendored
@ -1,176 +0,0 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
const isObject = (val) => val !== null && typeof val === 'object' && !Array.isArray(val)
|
|
||||||
|
|
||||||
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
|
|
||||||
const ANSI_REGEX =
|
|
||||||
/* eslint-disable-next-line no-control-regex */
|
|
||||||
/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g
|
|
||||||
|
|
||||||
const create = () => {
|
|
||||||
const colors = { enabled: true, visible: true, styles: {}, keys: {} }
|
|
||||||
|
|
||||||
if ('FORCE_COLOR' in process.env) {
|
|
||||||
colors.enabled = process.env.FORCE_COLOR !== '0'
|
|
||||||
}
|
|
||||||
|
|
||||||
const ansi = (style) => {
|
|
||||||
let open = (style.open = `\u001b[${style.codes[0]}m`)
|
|
||||||
let close = (style.close = `\u001b[${style.codes[1]}m`)
|
|
||||||
let regex = (style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'))
|
|
||||||
style.wrap = (input, newline) => {
|
|
||||||
if (input.includes(close)) input = input.replace(regex, close + open)
|
|
||||||
let output = open + input + close
|
|
||||||
// see https://github.com/chalk/chalk/pull/92, thanks to the
|
|
||||||
// chalk contributors for this fix. However, we've confirmed that
|
|
||||||
// this issue is also present in Windows terminals
|
|
||||||
return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output
|
|
||||||
}
|
|
||||||
return style
|
|
||||||
}
|
|
||||||
|
|
||||||
const wrap = (style, input, newline) => {
|
|
||||||
return typeof style === 'function' ? style(input) : style.wrap(input, newline)
|
|
||||||
}
|
|
||||||
|
|
||||||
const style = (input, stack) => {
|
|
||||||
if (input === '' || input == null) return ''
|
|
||||||
if (colors.enabled === false) return input
|
|
||||||
if (colors.visible === false) return ''
|
|
||||||
let str = '' + input
|
|
||||||
let nl = str.includes('\n')
|
|
||||||
let n = stack.length
|
|
||||||
if (n > 0 && stack.includes('unstyle')) {
|
|
||||||
stack = [...new Set(['unstyle', ...stack])].reverse()
|
|
||||||
}
|
|
||||||
while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl)
|
|
||||||
return str
|
|
||||||
}
|
|
||||||
|
|
||||||
const define = (name, codes, type) => {
|
|
||||||
colors.styles[name] = ansi({ name, codes })
|
|
||||||
let keys = colors.keys[type] || (colors.keys[type] = [])
|
|
||||||
keys.push(name)
|
|
||||||
|
|
||||||
Reflect.defineProperty(colors, name, {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
set(value) {
|
|
||||||
colors.alias(name, value)
|
|
||||||
},
|
|
||||||
get() {
|
|
||||||
let color = (input) => style(input, color.stack)
|
|
||||||
Reflect.setPrototypeOf(color, colors)
|
|
||||||
color.stack = this.stack ? this.stack.concat(name) : [name]
|
|
||||||
return color
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
define('reset', [0, 0], 'modifier')
|
|
||||||
define('bold', [1, 22], 'modifier')
|
|
||||||
define('dim', [2, 22], 'modifier')
|
|
||||||
define('italic', [3, 23], 'modifier')
|
|
||||||
define('underline', [4, 24], 'modifier')
|
|
||||||
define('inverse', [7, 27], 'modifier')
|
|
||||||
define('hidden', [8, 28], 'modifier')
|
|
||||||
define('strikethrough', [9, 29], 'modifier')
|
|
||||||
|
|
||||||
define('black', [30, 39], 'color')
|
|
||||||
define('red', [31, 39], 'color')
|
|
||||||
define('green', [32, 39], 'color')
|
|
||||||
define('yellow', [33, 39], 'color')
|
|
||||||
define('blue', [34, 39], 'color')
|
|
||||||
define('magenta', [35, 39], 'color')
|
|
||||||
define('cyan', [36, 39], 'color')
|
|
||||||
define('white', [37, 39], 'color')
|
|
||||||
define('gray', [90, 39], 'color')
|
|
||||||
define('grey', [90, 39], 'color')
|
|
||||||
|
|
||||||
define('bgBlack', [40, 49], 'bg')
|
|
||||||
define('bgRed', [41, 49], 'bg')
|
|
||||||
define('bgGreen', [42, 49], 'bg')
|
|
||||||
define('bgYellow', [43, 49], 'bg')
|
|
||||||
define('bgBlue', [44, 49], 'bg')
|
|
||||||
define('bgMagenta', [45, 49], 'bg')
|
|
||||||
define('bgCyan', [46, 49], 'bg')
|
|
||||||
define('bgWhite', [47, 49], 'bg')
|
|
||||||
|
|
||||||
define('blackBright', [90, 39], 'bright')
|
|
||||||
define('redBright', [91, 39], 'bright')
|
|
||||||
define('greenBright', [92, 39], 'bright')
|
|
||||||
define('yellowBright', [93, 39], 'bright')
|
|
||||||
define('blueBright', [94, 39], 'bright')
|
|
||||||
define('magentaBright', [95, 39], 'bright')
|
|
||||||
define('cyanBright', [96, 39], 'bright')
|
|
||||||
define('whiteBright', [97, 39], 'bright')
|
|
||||||
|
|
||||||
define('bgBlackBright', [100, 49], 'bgBright')
|
|
||||||
define('bgRedBright', [101, 49], 'bgBright')
|
|
||||||
define('bgGreenBright', [102, 49], 'bgBright')
|
|
||||||
define('bgYellowBright', [103, 49], 'bgBright')
|
|
||||||
define('bgBlueBright', [104, 49], 'bgBright')
|
|
||||||
define('bgMagentaBright', [105, 49], 'bgBright')
|
|
||||||
define('bgCyanBright', [106, 49], 'bgBright')
|
|
||||||
define('bgWhiteBright', [107, 49], 'bgBright')
|
|
||||||
|
|
||||||
colors.ansiRegex = ANSI_REGEX
|
|
||||||
colors.hasColor = colors.hasAnsi = (str) => {
|
|
||||||
colors.ansiRegex.lastIndex = 0
|
|
||||||
return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str)
|
|
||||||
}
|
|
||||||
|
|
||||||
colors.alias = (name, color) => {
|
|
||||||
let fn = typeof color === 'string' ? colors[color] : color
|
|
||||||
|
|
||||||
if (typeof fn !== 'function') {
|
|
||||||
throw new TypeError('Expected alias to be the name of an existing color (string) or a function')
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fn.stack) {
|
|
||||||
Reflect.defineProperty(fn, 'name', { value: name })
|
|
||||||
colors.styles[name] = fn
|
|
||||||
fn.stack = [name]
|
|
||||||
}
|
|
||||||
|
|
||||||
Reflect.defineProperty(colors, name, {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
set(value) {
|
|
||||||
colors.alias(name, value)
|
|
||||||
},
|
|
||||||
get() {
|
|
||||||
let color = (input) => style(input, color.stack)
|
|
||||||
Reflect.setPrototypeOf(color, colors)
|
|
||||||
color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack
|
|
||||||
return color
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
colors.theme = (custom) => {
|
|
||||||
if (!isObject(custom)) throw new TypeError('Expected theme to be an object')
|
|
||||||
for (let name of Object.keys(custom)) {
|
|
||||||
colors.alias(name, custom[name])
|
|
||||||
}
|
|
||||||
return colors
|
|
||||||
}
|
|
||||||
|
|
||||||
colors.alias('unstyle', (str) => {
|
|
||||||
if (typeof str === 'string' && str !== '') {
|
|
||||||
colors.ansiRegex.lastIndex = 0
|
|
||||||
return str.replace(colors.ansiRegex, '')
|
|
||||||
}
|
|
||||||
return ''
|
|
||||||
})
|
|
||||||
|
|
||||||
colors.alias('noop', (str) => str)
|
|
||||||
colors.none = colors.clear = colors.noop
|
|
||||||
|
|
||||||
colors.stripColor = colors.unstyle
|
|
||||||
colors.define = define
|
|
||||||
return colors
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = create()
|
|
||||||
module.exports.create = create
|
|
10
node_modules/@prisma/client/scripts/default-deno-edge.ts
generated
vendored
10
node_modules/@prisma/client/scripts/default-deno-edge.ts
generated
vendored
@ -1,10 +0,0 @@
|
|||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`@prisma/client/deno/edge did not initialize yet. Please run "prisma generate --data-proxy" and try to import it again.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export { PrismaClient }
|
|
12
node_modules/@prisma/client/scripts/default-edge.js
generated
vendored
12
node_modules/@prisma/client/scripts/default-edge.js
generated
vendored
@ -1,12 +0,0 @@
|
|||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`@prisma/client/edge did not initialize yet. Please run "prisma generate --data-proxy" and try to import it again.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
PrismaClient,
|
|
||||||
}
|
|
12
node_modules/@prisma/client/scripts/default-index-browser.js
generated
vendored
12
node_modules/@prisma/client/scripts/default-index-browser.js
generated
vendored
@ -1,12 +0,0 @@
|
|||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues/new`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
PrismaClient,
|
|
||||||
}
|
|
85
node_modules/@prisma/client/scripts/default-index.d.ts
generated
vendored
85
node_modules/@prisma/client/scripts/default-index.d.ts
generated
vendored
@ -1,85 +0,0 @@
|
|||||||
import runtime from '@prisma/client/runtime'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ## Prisma Client ʲˢ
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript & Node.js
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new Prisma()
|
|
||||||
* // Fetch zero or more Users
|
|
||||||
* const users = await prisma.user.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://github.com/prisma/prisma/blob/main/docs/prisma-client-js/api.md).
|
|
||||||
*/
|
|
||||||
export declare const PrismaClient: any
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ## Prisma Client ʲˢ
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript & Node.js
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new Prisma()
|
|
||||||
* // Fetch zero or more Users
|
|
||||||
* const users = await prisma.user.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://github.com/prisma/prisma/blob/main/docs/prisma-client-js/api.md).
|
|
||||||
*/
|
|
||||||
export declare type PrismaClient = any
|
|
||||||
|
|
||||||
export declare type PrismaClientExtends<
|
|
||||||
ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs,
|
|
||||||
> = {
|
|
||||||
$extends: { extArgs: ExtArgs } & (<
|
|
||||||
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
|
||||||
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
|
||||||
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
|
||||||
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
|
||||||
Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs<R, M, Q, C>,
|
|
||||||
>(
|
|
||||||
args:
|
|
||||||
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
|
|
||||||
| { name?: string; result?: R; model?: M; query?: Q; client?: C },
|
|
||||||
) => PrismaClientExtends<Args & ExtArgs>)
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare const dmmf: any
|
|
||||||
export declare type dmmf = any
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the type of the value, that the Promise holds.
|
|
||||||
*/
|
|
||||||
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the return type of a function which returns a Promise.
|
|
||||||
*/
|
|
||||||
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
|
|
||||||
|
|
||||||
export namespace Prisma {
|
|
||||||
export type TransactionClient = any
|
|
||||||
|
|
||||||
export function defineExtension<
|
|
||||||
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
|
||||||
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
|
||||||
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
|
||||||
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
|
||||||
Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs<R, M, Q, C>,
|
|
||||||
>(
|
|
||||||
args:
|
|
||||||
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
|
|
||||||
| { name?: string; result?: R; model?: M; query?: Q; client?: C },
|
|
||||||
): (client: any) => PrismaClientExtends<Args>
|
|
||||||
|
|
||||||
export type Extension = runtime.Types.Extensions.UserArgs
|
|
||||||
export import getExtensionContext = runtime.Extensions.getExtensionContext
|
|
||||||
export type Args<T, F extends runtime.Types.Public.Operation> = runtime.Types.Public.Args<T, F> & {}
|
|
||||||
export type Payload<T, F extends runtime.Types.Public.Operation> = runtime.Types.Public.Payload<T, F> & {}
|
|
||||||
export type Result<T, A, F extends runtime.Types.Public.Operation> = runtime.Types.Public.Result<T, A, F> & {}
|
|
||||||
export type Exact<T, W> = runtime.Types.Public.Exact<T, W> & {}
|
|
||||||
}
|
|
23
node_modules/@prisma/client/scripts/default-index.js
generated
vendored
23
node_modules/@prisma/client/scripts/default-index.js
generated
vendored
@ -1,23 +0,0 @@
|
|||||||
class PrismaClient {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(
|
|
||||||
`@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
|
|
||||||
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function defineExtension(ext) {
|
|
||||||
if (typeof ext === 'function') {
|
|
||||||
return ext
|
|
||||||
}
|
|
||||||
|
|
||||||
return (client) => client.$extends(ext)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
PrismaClient,
|
|
||||||
Prisma: {
|
|
||||||
defineExtension,
|
|
||||||
},
|
|
||||||
}
|
|
12
node_modules/@prisma/client/scripts/get-packed-client.js
generated
vendored
12
node_modules/@prisma/client/scripts/get-packed-client.js
generated
vendored
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
const path = require('path')
|
|
||||||
const { getPackedPackage } = require('@prisma/internals')
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
const target = path.join(process.cwd(), './node_modules/@prisma/client')
|
|
||||||
await getPackedPackage('@prisma/client', target, path.join(__dirname, '../'))
|
|
||||||
console.log(`Saving packed client to ${target}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
14
node_modules/@prisma/client/scripts/mock-fs.js
generated
vendored
14
node_modules/@prisma/client/scripts/mock-fs.js
generated
vendored
@ -1,14 +0,0 @@
|
|||||||
const { patchFs } = require('fs-monkey')
|
|
||||||
const fs = require('fs')
|
|
||||||
|
|
||||||
module.exports = function mockFs(fileMap) {
|
|
||||||
const originalFsRead = fs.readFileSync
|
|
||||||
|
|
||||||
const myFs = {
|
|
||||||
readFileSync: (fileName, ...args) => {
|
|
||||||
return fileMap[fileName] || originalFsRead.call(fs, fileName, ...args)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
patchFs(myFs)
|
|
||||||
}
|
|
5
node_modules/@prisma/client/scripts/postinstall.d.ts
generated
vendored
5
node_modules/@prisma/client/scripts/postinstall.d.ts
generated
vendored
@ -1,5 +0,0 @@
|
|||||||
export function getPostInstallTrigger(): string
|
|
||||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING
|
|
||||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
|
||||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR
|
|
||||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR
|
|
405
node_modules/@prisma/client/scripts/postinstall.js
generated
vendored
405
node_modules/@prisma/client/scripts/postinstall.js
generated
vendored
@ -1,405 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
const childProcess = require('child_process')
|
|
||||||
const { promisify } = require('util')
|
|
||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const c = require('./colors')
|
|
||||||
|
|
||||||
const exec = promisify(childProcess.exec)
|
|
||||||
const copyFile = promisify(fs.copyFile)
|
|
||||||
const mkdir = promisify(fs.mkdir)
|
|
||||||
const stat = promisify(fs.stat)
|
|
||||||
|
|
||||||
function debug(message, ...optionalParams) {
|
|
||||||
if (process.env.DEBUG && process.env.DEBUG === 'prisma:postinstall') {
|
|
||||||
console.log(message, ...optionalParams)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds `package.json` to the end of a path if it doesn't already exist'
|
|
||||||
* @param {string} pth
|
|
||||||
*/
|
|
||||||
function addPackageJSON(pth) {
|
|
||||||
if (pth.endsWith('package.json')) return pth
|
|
||||||
return path.join(pth, 'package.json')
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Looks up for a `package.json` which is not `@prisma/cli` or `prisma` and returns the directory of the package
|
|
||||||
* @param {string} startPath - Path to Start At
|
|
||||||
* @param {number} limit - Find Up limit
|
|
||||||
* @returns {string | null}
|
|
||||||
*/
|
|
||||||
function findPackageRoot(startPath, limit = 10) {
|
|
||||||
if (!startPath || !fs.existsSync(startPath)) return null
|
|
||||||
let currentPath = startPath
|
|
||||||
// Limit traversal
|
|
||||||
for (let i = 0; i < limit; i++) {
|
|
||||||
const pkgPath = addPackageJSON(currentPath)
|
|
||||||
if (fs.existsSync(pkgPath)) {
|
|
||||||
try {
|
|
||||||
const pkg = require(pkgPath)
|
|
||||||
if (pkg.name && !['@prisma/cli', 'prisma'].includes(pkg.name)) {
|
|
||||||
return pkgPath.replace('package.json', '')
|
|
||||||
}
|
|
||||||
} catch {} // eslint-disable-line no-empty
|
|
||||||
}
|
|
||||||
currentPath = path.join(currentPath, '../')
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `postinstall` hook of client sets up the ground and env vars for the `prisma generate` command,
|
|
||||||
* and runs it, showing a warning if the schema is not found.
|
|
||||||
* - initializes the ./node_modules/.prisma/client folder with the default index(-browser).js/index.d.ts,
|
|
||||||
* which define a `PrismaClient` class stub that throws an error if instantiated before the `prisma generate`
|
|
||||||
* command is successfully executed.
|
|
||||||
* - sets the path of the root of the project (TODO: to verify) to the `process.env.PRISMA_GENERATE_IN_POSTINSTALL`
|
|
||||||
* variable, or `'true'` if the project root cannot be found.
|
|
||||||
* - runs `prisma generate`, passing through additional information about the command that triggered the generation,
|
|
||||||
* which is useful for debugging/telemetry. It tries to use the local `prisma` package if it is installed, otherwise it
|
|
||||||
* falls back to the global `prisma` package. If neither options are available, it warns the user to install `prisma` first.
|
|
||||||
*/
|
|
||||||
async function main() {
|
|
||||||
if (process.env.INIT_CWD) {
|
|
||||||
process.chdir(process.env.INIT_CWD) // necessary, because npm chooses __dirname as process.cwd()
|
|
||||||
// in the postinstall hook
|
|
||||||
}
|
|
||||||
|
|
||||||
await createDefaultGeneratedThrowFiles()
|
|
||||||
|
|
||||||
// TODO: consider using the `which` package
|
|
||||||
const localPath = getLocalPackagePath()
|
|
||||||
|
|
||||||
// Only execute if !localpath
|
|
||||||
const installedGlobally = localPath ? undefined : await isInstalledGlobally()
|
|
||||||
|
|
||||||
// this is needed, so we can find the correct schemas in yarn workspace projects
|
|
||||||
const root = findPackageRoot(localPath)
|
|
||||||
|
|
||||||
process.env.PRISMA_GENERATE_IN_POSTINSTALL = root ? root : 'true'
|
|
||||||
|
|
||||||
debug({
|
|
||||||
localPath,
|
|
||||||
installedGlobally,
|
|
||||||
init_cwd: process.env.INIT_CWD,
|
|
||||||
PRISMA_GENERATE_IN_POSTINSTALL: process.env.PRISMA_GENERATE_IN_POSTINSTALL,
|
|
||||||
})
|
|
||||||
try {
|
|
||||||
if (localPath) {
|
|
||||||
await run('node', [localPath, 'generate', '--postinstall', doubleQuote(getPostInstallTrigger())])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (installedGlobally) {
|
|
||||||
await run('prisma', ['generate', '--postinstall', doubleQuote(getPostInstallTrigger())])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
// if exit code = 1 do not print
|
|
||||||
if (e && e !== 1) {
|
|
||||||
console.error(e)
|
|
||||||
}
|
|
||||||
debug(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!localPath && !installedGlobally) {
|
|
||||||
console.error(
|
|
||||||
`${c.yellow(
|
|
||||||
'warning',
|
|
||||||
)} In order to use "@prisma/client", please install Prisma CLI. You can install it with "npm add -D prisma".`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLocalPackagePath() {
|
|
||||||
try {
|
|
||||||
const packagePath = require.resolve('prisma/package.json')
|
|
||||||
if (packagePath) {
|
|
||||||
return require.resolve('prisma')
|
|
||||||
}
|
|
||||||
} catch (e) {} // eslint-disable-line no-empty
|
|
||||||
|
|
||||||
// TODO: consider removing this
|
|
||||||
try {
|
|
||||||
const packagePath = require.resolve('@prisma/cli/package.json')
|
|
||||||
if (packagePath) {
|
|
||||||
return require.resolve('@prisma/cli')
|
|
||||||
}
|
|
||||||
} catch (e) {} // eslint-disable-line no-empty
|
|
||||||
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
async function isInstalledGlobally() {
|
|
||||||
try {
|
|
||||||
const result = await exec('prisma -v')
|
|
||||||
if (result.stdout.includes('@prisma/client')) {
|
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
console.error(`${c.yellow('warning')} You still have the ${c.bold('prisma')} cli (Prisma 1) installed globally.
|
|
||||||
Please uninstall it with either ${c.green('npm remove -g prisma')} or ${c.green('yarn global remove prisma')}.`)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!process.env.PRISMA_SKIP_POSTINSTALL_GENERATE) {
|
|
||||||
main()
|
|
||||||
.catch((e) => {
|
|
||||||
if (e.stderr) {
|
|
||||||
if (e.stderr.includes(`Can't find schema.prisma`)) {
|
|
||||||
console.error(
|
|
||||||
`${c.yellow('warning')} @prisma/client needs a ${c.bold('schema.prisma')} to function, but couldn't find it.
|
|
||||||
Please either create one manually or use ${c.bold('prisma init')}.
|
|
||||||
Once you created it, run ${c.bold('prisma generate')}.
|
|
||||||
To keep Prisma related things separate, we recommend creating it in a subfolder called ${c.underline(
|
|
||||||
'./prisma',
|
|
||||||
)} like so: ${c.underline('./prisma/schema.prisma')}\n`,
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
console.error(e.stderr)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.error(e)
|
|
||||||
}
|
|
||||||
process.exit(0)
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
debug(`postinstall trigger: ${getPostInstallTrigger()}`)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function run(cmd, params, cwd = process.cwd()) {
|
|
||||||
const child = childProcess.spawn(cmd, params, {
|
|
||||||
stdio: ['pipe', 'inherit', 'inherit'],
|
|
||||||
cwd,
|
|
||||||
})
|
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
child.on('close', () => {
|
|
||||||
resolve()
|
|
||||||
})
|
|
||||||
child.on('exit', (code) => {
|
|
||||||
if (code === 0) {
|
|
||||||
resolve()
|
|
||||||
} else {
|
|
||||||
reject(code)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
child.on('error', () => {
|
|
||||||
reject()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies our default "throw" files into the default generation folder. These
|
|
||||||
* files are dummy and informative because they just throw an error to let the
|
|
||||||
* user know that they have forgotten to run `prisma generate` or that they
|
|
||||||
* don't have a a schema file yet. We only add these files at the default
|
|
||||||
* location `node_modules/.prisma/client`.
|
|
||||||
*/
|
|
||||||
async function createDefaultGeneratedThrowFiles() {
|
|
||||||
try {
|
|
||||||
const dotPrismaClientDir = path.join(__dirname, '../../../.prisma/client')
|
|
||||||
const defaultNodeIndexPath = path.join(dotPrismaClientDir, 'index.js')
|
|
||||||
const defaultNodeIndexDtsPath = path.join(dotPrismaClientDir, 'index.d.ts')
|
|
||||||
const defaultBrowserIndexPath = path.join(dotPrismaClientDir, 'index-browser.js')
|
|
||||||
const defaultEdgeIndexPath = path.join(dotPrismaClientDir, 'edge.js')
|
|
||||||
const defaultEdgeIndexDtsPath = path.join(dotPrismaClientDir, 'edge.d.ts')
|
|
||||||
const defaultDenoClientDir = path.join(dotPrismaClientDir, 'deno')
|
|
||||||
const defaultDenoEdgeIndexPath = path.join(defaultDenoClientDir, 'edge.ts')
|
|
||||||
await makeDir(dotPrismaClientDir)
|
|
||||||
await makeDir(defaultDenoClientDir)
|
|
||||||
|
|
||||||
if (!fs.existsSync(defaultNodeIndexPath)) {
|
|
||||||
await copyFile(path.join(__dirname, 'default-index.js'), defaultNodeIndexPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fs.existsSync(defaultBrowserIndexPath)) {
|
|
||||||
await copyFile(path.join(__dirname, 'default-index-browser.js'), defaultBrowserIndexPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fs.existsSync(defaultNodeIndexDtsPath)) {
|
|
||||||
await copyFile(path.join(__dirname, 'default-index.d.ts'), defaultNodeIndexDtsPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fs.existsSync(defaultEdgeIndexPath)) {
|
|
||||||
await copyFile(path.join(__dirname, 'default-edge.js'), defaultEdgeIndexPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fs.existsSync(defaultEdgeIndexDtsPath)) {
|
|
||||||
await copyFile(path.join(__dirname, 'default-index.d.ts'), defaultEdgeIndexDtsPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fs.existsSync(defaultDenoEdgeIndexPath)) {
|
|
||||||
await copyFile(path.join(__dirname, 'default-deno-edge.ts'), defaultDenoEdgeIndexPath)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: can this be replaced some utility eg. mkdir
|
|
||||||
function makeDir(input) {
|
|
||||||
const make = async (pth) => {
|
|
||||||
try {
|
|
||||||
await mkdir(pth)
|
|
||||||
|
|
||||||
return pth
|
|
||||||
} catch (error) {
|
|
||||||
if (error.code === 'EPERM') {
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.code === 'ENOENT') {
|
|
||||||
if (path.dirname(pth) === pth) {
|
|
||||||
throw new Error(`operation not permitted, mkdir '${pth}'`)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.message.includes('null bytes')) {
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
|
|
||||||
await make(path.dirname(pth))
|
|
||||||
|
|
||||||
return make(pth)
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const stats = await stat(pth)
|
|
||||||
if (!stats.isDirectory()) {
|
|
||||||
throw new Error('The path is not a directory')
|
|
||||||
}
|
|
||||||
} catch (_) {
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
|
|
||||||
return pth
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return make(path.resolve(input))
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the command that triggered this postinstall script being run. If there is
|
|
||||||
* an error while attempting to get this value then the string constant
|
|
||||||
* 'ERROR_WHILE_FINDING_POSTINSTALL_TRIGGER' is returned.
|
|
||||||
* This information is just necessary for telemetry.
|
|
||||||
* This is passed to `prisma generate` as a string like `--postinstall value`.
|
|
||||||
*/
|
|
||||||
function getPostInstallTrigger() {
|
|
||||||
/*
|
|
||||||
npm_config_argv` is not officially documented so here are our research notes
|
|
||||||
|
|
||||||
`npm_config_argv` is available to the postinstall script when the containing package has been installed by npm into some project.
|
|
||||||
|
|
||||||
An example of its value:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm_config_argv: '{"remain":["../test"],"cooked":["add","../test"],"original":["add","../test"]}',
|
|
||||||
```
|
|
||||||
|
|
||||||
We are interesting in the data contained in the "original" field.
|
|
||||||
|
|
||||||
Trivia/Note: `npm_config_argv` is not available when running e.g. `npm install` on the containing package itself (e.g. when working on it)
|
|
||||||
|
|
||||||
Yarn mimics this data and environment variable. Here is an example following `yarn add` for the same package:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm_config_argv: '{"remain":[],"cooked":["add"],"original":["add","../test"]}'
|
|
||||||
```
|
|
||||||
|
|
||||||
Other package managers like `pnpm` have not been tested.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const maybe_npm_config_argv_string = process.env.npm_config_argv
|
|
||||||
|
|
||||||
if (maybe_npm_config_argv_string === undefined) {
|
|
||||||
return UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
|
||||||
}
|
|
||||||
|
|
||||||
let npm_config_argv
|
|
||||||
try {
|
|
||||||
npm_config_argv = JSON.parse(maybe_npm_config_argv_string)
|
|
||||||
} catch (e) {
|
|
||||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR}: ${maybe_npm_config_argv_string}`
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof npm_config_argv !== 'object' || npm_config_argv === null) {
|
|
||||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}`
|
|
||||||
}
|
|
||||||
|
|
||||||
const npm_config_argv_original_arr = npm_config_argv.original
|
|
||||||
|
|
||||||
if (!Array.isArray(npm_config_argv_original_arr)) {
|
|
||||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}`
|
|
||||||
}
|
|
||||||
|
|
||||||
const npm_config_argv_original = npm_config_argv_original_arr.filter((arg) => arg !== '').join(' ')
|
|
||||||
|
|
||||||
const command =
|
|
||||||
npm_config_argv_original === ''
|
|
||||||
? getPackageManagerName()
|
|
||||||
: [getPackageManagerName(), npm_config_argv_original].join(' ')
|
|
||||||
|
|
||||||
return command
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrap double quotes around the given string.
|
|
||||||
*/
|
|
||||||
function doubleQuote(x) {
|
|
||||||
return `"${x}"`
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the package manager name currently being used. If parsing fails, then the following pattern is returned:
|
|
||||||
* UNKNOWN_NPM_CONFIG_USER_AGENT(<string received>).
|
|
||||||
*/
|
|
||||||
function getPackageManagerName() {
|
|
||||||
const userAgent = process.env.npm_config_user_agent
|
|
||||||
if (!userAgent) return 'MISSING_NPM_CONFIG_USER_AGENT'
|
|
||||||
|
|
||||||
const name = parsePackageManagerName(userAgent)
|
|
||||||
if (!name) return `UNKNOWN_NPM_CONFIG_USER_AGENT(${userAgent})`
|
|
||||||
|
|
||||||
return name
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse package manager name from useragent. If parsing fails, `null` is returned.
|
|
||||||
*/
|
|
||||||
function parsePackageManagerName(userAgent) {
|
|
||||||
let packageManager = null
|
|
||||||
|
|
||||||
// example: 'yarn/1.22.4 npm/? node/v13.11.0 darwin x64'
|
|
||||||
// References:
|
|
||||||
// - https://pnpm.io/only-allow-pnpm
|
|
||||||
// - https://github.com/cameronhunter/npm-config-user-agent-parser
|
|
||||||
if (userAgent) {
|
|
||||||
const matchResult = userAgent.match(/^([^/]+)\/.+/)
|
|
||||||
if (matchResult) {
|
|
||||||
packageManager = matchResult[1].trim()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return packageManager
|
|
||||||
}
|
|
||||||
|
|
||||||
// prettier-ignore
|
|
||||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING'
|
|
||||||
// prettier-ignore
|
|
||||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR'
|
|
||||||
// prettier-ignore
|
|
||||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR'
|
|
||||||
|
|
||||||
// expose for testing
|
|
||||||
|
|
||||||
exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
|
||||||
exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR
|
|
||||||
exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR
|
|
||||||
exports.getPostInstallTrigger = getPostInstallTrigger
|
|
201
node_modules/@prisma/engines-version/LICENSE
generated
vendored
201
node_modules/@prisma/engines-version/LICENSE
generated
vendored
@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
8
node_modules/@prisma/engines-version/README.md
generated
vendored
8
node_modules/@prisma/engines-version/README.md
generated
vendored
@ -1,8 +0,0 @@
|
|||||||
# `@prisma/engines-version`
|
|
||||||
|
|
||||||
This package exports the Prisma Engines version to be downloaded from Prisma CDN.
|
|
||||||
|
|
||||||
⚠️ **Warning**: This package is intended for Prisma's internal use.
|
|
||||||
Its release cycle does not follow SemVer, which means we might release breaking changes (change APIs, remove functionality) without any prior warning.
|
|
||||||
|
|
||||||
See its companion, [`@prisma/engines` npm package](https://www.npmjs.com/package/@prisma/engines).
|
|
1
node_modules/@prisma/engines-version/index.d.ts
generated
vendored
1
node_modules/@prisma/engines-version/index.d.ts
generated
vendored
@ -1 +0,0 @@
|
|||||||
export declare const enginesVersion: string;
|
|
5
node_modules/@prisma/engines-version/index.js
generated
vendored
5
node_modules/@prisma/engines-version/index.js
generated
vendored
@ -1,5 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.enginesVersion = void 0;
|
|
||||||
exports.enginesVersion = require('./package.json').prisma.enginesVersion;
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
27
node_modules/@prisma/engines-version/package.json
generated
vendored
27
node_modules/@prisma/engines-version/package.json
generated
vendored
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@prisma/engines-version",
|
|
||||||
"version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5",
|
|
||||||
"main": "index.js",
|
|
||||||
"types": "index.d.ts",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"author": "Tim Suchanek <suchanek@prisma.io>",
|
|
||||||
"prisma": {
|
|
||||||
"enginesVersion": "ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/prisma/engines-wrapper.git",
|
|
||||||
"directory": "packages/engines-version"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "16.11.64",
|
|
||||||
"typescript": "4.8.4"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js",
|
|
||||||
"index.d.ts"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsc -d"
|
|
||||||
}
|
|
||||||
}
|
|
201
node_modules/@prisma/engines/LICENSE
generated
vendored
201
node_modules/@prisma/engines/LICENSE
generated
vendored
@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
13
node_modules/@prisma/engines/README.md
generated
vendored
13
node_modules/@prisma/engines/README.md
generated
vendored
@ -1,13 +0,0 @@
|
|||||||
# `@prisma/engines`
|
|
||||||
|
|
||||||
⚠️ **Warning**: This package is intended for Prisma's internal use.
|
|
||||||
Its release cycle does not follow SemVer, which means we might release breaking changes (change APIs, remove functionality) without any prior warning.
|
|
||||||
|
|
||||||
The postinstall hook of this package downloads all Prisma engines available for the current platform, namely the Query Engine, Migration Engine, Introspection Engine and Prisma Format from the Prisma CDN.
|
|
||||||
|
|
||||||
The engines version to be downloaded are directly determined by the version of its `@prisma/engines-version` dependency.
|
|
||||||
|
|
||||||
You should probably not use this package directly, but instead use one of these:
|
|
||||||
|
|
||||||
- [`prisma` CLI](https://www.npmjs.com/package/prisma)
|
|
||||||
- [`@prisma/client`](https://www.npmjs.com/package/@prisma/client)
|
|
BIN
node_modules/@prisma/engines/introspection-engine-darwin-arm64
generated
vendored
BIN
node_modules/@prisma/engines/introspection-engine-darwin-arm64
generated
vendored
Binary file not shown.
BIN
node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node
generated
vendored
BIN
node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node
generated
vendored
Binary file not shown.
BIN
node_modules/@prisma/engines/migration-engine-darwin-arm64
generated
vendored
BIN
node_modules/@prisma/engines/migration-engine-darwin-arm64
generated
vendored
Binary file not shown.
39
node_modules/@prisma/engines/package.json
generated
vendored
39
node_modules/@prisma/engines/package.json
generated
vendored
@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@prisma/engines",
|
|
||||||
"version": "4.9.0",
|
|
||||||
"description": "This package is intended for Prisma's internal use",
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"types": "dist/index.d.ts",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"author": "Tim Suchanek <suchanek@prisma.io>",
|
|
||||||
"devDependencies": {
|
|
||||||
"@prisma/engines-version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5",
|
|
||||||
"@swc/core": "1.3.14",
|
|
||||||
"@swc/jest": "0.2.24",
|
|
||||||
"@types/jest": "29.2.4",
|
|
||||||
"@types/node": "16.18.11",
|
|
||||||
"execa": "5.1.1",
|
|
||||||
"jest": "29.3.1",
|
|
||||||
"typescript": "4.8.4",
|
|
||||||
"@prisma/debug": "4.9.0",
|
|
||||||
"@prisma/fetch-engine": "4.9.0",
|
|
||||||
"@prisma/get-platform": "4.9.0"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/prisma/prisma.git",
|
|
||||||
"directory": "packages/engines"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"dist",
|
|
||||||
"download",
|
|
||||||
"scripts"
|
|
||||||
],
|
|
||||||
"sideEffects": false,
|
|
||||||
"scripts": {
|
|
||||||
"dev": "DEV=true node -r esbuild-register helpers/build.ts",
|
|
||||||
"build": "node -r esbuild-register helpers/build.ts",
|
|
||||||
"test": "jest",
|
|
||||||
"postinstall": "node scripts/postinstall.js"
|
|
||||||
}
|
|
||||||
}
|
|
BIN
node_modules/@prisma/engines/prisma-fmt-darwin-arm64
generated
vendored
BIN
node_modules/@prisma/engines/prisma-fmt-darwin-arm64
generated
vendored
Binary file not shown.
26
node_modules/@prisma/engines/scripts/postinstall.js
generated
vendored
26
node_modules/@prisma/engines/scripts/postinstall.js
generated
vendored
@ -1,26 +0,0 @@
|
|||||||
const path = require('path')
|
|
||||||
|
|
||||||
const postInstallScriptPath = path.join(__dirname, '..', 'dist', 'scripts', 'postinstall.js')
|
|
||||||
const localInstallScriptPath = path.join(__dirname, '..', 'dist', 'scripts', 'localinstall.js')
|
|
||||||
|
|
||||||
try {
|
|
||||||
// that's when we develop in the monorepo, `dist` does not exist yet
|
|
||||||
// so we compile postinstall script and trigger it immediately after
|
|
||||||
if (require('../package.json').version === '0.0.0') {
|
|
||||||
const execa = require('execa')
|
|
||||||
const buildScriptPath = path.join(__dirname, '..', 'helpers', 'build.ts')
|
|
||||||
|
|
||||||
execa.sync('node', ['-r', 'esbuild-register', buildScriptPath], {
|
|
||||||
env: { DEV: true },
|
|
||||||
stdio: 'inherit',
|
|
||||||
})
|
|
||||||
|
|
||||||
// if enabled, it will install engine overrides into the cache dir
|
|
||||||
execa.sync('node', [localInstallScriptPath], {
|
|
||||||
stdio: 'inherit',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
// that's the normal path, when users get this package ready/installed
|
|
||||||
require(postInstallScriptPath)
|
|
39
node_modules/@swc/helpers/lib/_apply_decorated_descriptor.js
generated
vendored
39
node_modules/@swc/helpers/lib/_apply_decorated_descriptor.js
generated
vendored
@ -1,39 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "default", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function() {
|
|
||||||
return _applyDecoratedDescriptor;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
|
||||||
var desc = {};
|
|
||||||
Object["ke" + "ys"](descriptor).forEach(function(key) {
|
|
||||||
desc[key] = descriptor[key];
|
|
||||||
});
|
|
||||||
desc.enumerable = !!desc.enumerable;
|
|
||||||
desc.configurable = !!desc.configurable;
|
|
||||||
if ("value" in desc || desc.initializer) {
|
|
||||||
desc.writable = true;
|
|
||||||
}
|
|
||||||
desc = decorators.slice().reverse().reduce(function(desc, decorator) {
|
|
||||||
return decorator ? decorator(target, property, desc) || desc : desc;
|
|
||||||
}, desc);
|
|
||||||
var hasAccessor = Object.prototype.hasOwnProperty.call(desc, "get") || Object.prototype.hasOwnProperty.call(desc, "set");
|
|
||||||
if (context && desc.initializer !== void 0 && !hasAccessor) {
|
|
||||||
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
|
||||||
desc.initializer = undefined;
|
|
||||||
}
|
|
||||||
if (hasAccessor) {
|
|
||||||
delete desc.writable;
|
|
||||||
delete desc.initializer;
|
|
||||||
delete desc.value;
|
|
||||||
}
|
|
||||||
if (desc.initializer === void 0) {
|
|
||||||
Object["define" + "Property"](target, property, desc);
|
|
||||||
desc = null;
|
|
||||||
}
|
|
||||||
return desc;
|
|
||||||
}
|
|
15
node_modules/@swc/helpers/lib/_array_like_to_array.js
generated
vendored
15
node_modules/@swc/helpers/lib/_array_like_to_array.js
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "default", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function() {
|
|
||||||
return _arrayLikeToArray;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function _arrayLikeToArray(arr, len) {
|
|
||||||
if (len == null || len > arr.length) len = arr.length;
|
|
||||||
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
||||||
return arr2;
|
|
||||||
}
|
|
13
node_modules/@swc/helpers/lib/_array_with_holes.js
generated
vendored
13
node_modules/@swc/helpers/lib/_array_with_holes.js
generated
vendored
@ -1,13 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "default", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function() {
|
|
||||||
return _arrayWithHoles;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function _arrayWithHoles(arr) {
|
|
||||||
if (Array.isArray(arr)) return arr;
|
|
||||||
}
|
|
19
node_modules/@swc/helpers/lib/_array_without_holes.js
generated
vendored
19
node_modules/@swc/helpers/lib/_array_without_holes.js
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "default", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function() {
|
|
||||||
return _arrayWithoutHoles;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var _arrayLikeToArrayMjs = /*#__PURE__*/ _interopRequireDefault(require("./_array_like_to_array.js"));
|
|
||||||
function _interopRequireDefault(obj) {
|
|
||||||
return obj && obj.__esModule ? obj : {
|
|
||||||
default: obj
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function _arrayWithoutHoles(arr) {
|
|
||||||
if (Array.isArray(arr)) return (0, _arrayLikeToArrayMjs.default)(arr);
|
|
||||||
}
|
|
16
node_modules/@swc/helpers/lib/_assert_this_initialized.js
generated
vendored
16
node_modules/@swc/helpers/lib/_assert_this_initialized.js
generated
vendored
@ -1,16 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "default", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function() {
|
|
||||||
return _assertThisInitialized;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function _assertThisInitialized(self) {
|
|
||||||
if (self === void 0) {
|
|
||||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user