Merge branch 'refs/heads/release'

# Conflicts:
#	src/Commands/learn.ts
This commit is contained in:
Siwoo Jeon 2024-06-08 20:55:57 +09:00
commit 141b41f4b3
Signed by: migan
GPG key ID: C4151385FFD2082A
199 changed files with 2930 additions and 2921 deletions

2
.gitignore vendored
View file

@ -138,4 +138,4 @@ config.json
db/ db/
.idea/ .idea/
database/ ./database/

1588
.pnp.cjs generated

File diff suppressed because it is too large Load diff

78
.pnp.loader.mjs generated
View file

@ -1,3 +1,6 @@
/* eslint-disable */
// @ts-nocheck
import fs from 'fs'; import fs from 'fs';
import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url'; import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url';
import path from 'path'; import path from 'path';
@ -109,8 +112,7 @@ async function copyImpl(prelayout, postlayout, destinationFs, destination, sourc
updated = await copySymlink(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); updated = await copySymlink(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts);
} }
break; break;
default: default: {
{
throw new Error(`Unsupported file type (${sourceStat.mode})`); throw new Error(`Unsupported file type (${sourceStat.mode})`);
} }
} }
@ -175,7 +177,10 @@ async function copyFolder(prelayout, postlayout, destinationFs, destination, des
} }
async function copyFileViaIndex(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts, linkStrategy) { async function copyFileViaIndex(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts, linkStrategy) {
const sourceHash = await sourceFs.checksumFilePromise(source, { algorithm: `sha1` }); const sourceHash = await sourceFs.checksumFilePromise(source, { algorithm: `sha1` });
const indexPath = destinationFs.pathUtils.join(linkStrategy.indexPath, sourceHash.slice(0, 2), `${sourceHash}.dat`); const defaultMode = 420;
const sourceMode = sourceStat.mode & 511;
const indexFileName = `${sourceHash}${sourceMode !== defaultMode ? sourceMode.toString(8) : ``}`;
const indexPath = destinationFs.pathUtils.join(linkStrategy.indexPath, sourceHash.slice(0, 2), `${indexFileName}.dat`);
let AtomicBehavior; let AtomicBehavior;
((AtomicBehavior2) => { ((AtomicBehavior2) => {
AtomicBehavior2[AtomicBehavior2["Lock"] = 0] = "Lock"; AtomicBehavior2[AtomicBehavior2["Lock"] = 0] = "Lock";
@ -231,8 +236,12 @@ async function copyFileViaIndex(prelayout, postlayout, destinationFs, destinatio
} }
}); });
postlayout.push(async () => { postlayout.push(async () => {
if (!indexStat) if (!indexStat) {
await destinationFs.lutimesPromise(indexPath, defaultTime, defaultTime); await destinationFs.lutimesPromise(indexPath, defaultTime, defaultTime);
if (sourceMode !== defaultMode) {
await destinationFs.chmodPromise(indexPath, sourceMode);
}
}
if (tempPath && !tempPathCleaned) { if (tempPath && !tempPathCleaned) {
await destinationFs.unlinkPromise(tempPath); await destinationFs.unlinkPromise(tempPath);
} }
@ -824,6 +833,12 @@ class ProxiedFS extends FakeFS {
rmdirSync(p, opts) { rmdirSync(p, opts) {
return this.baseFs.rmdirSync(this.mapToBase(p), opts); return this.baseFs.rmdirSync(this.mapToBase(p), opts);
} }
async rmPromise(p, opts) {
return this.baseFs.rmPromise(this.mapToBase(p), opts);
}
rmSync(p, opts) {
return this.baseFs.rmSync(this.mapToBase(p), opts);
}
async linkPromise(existingP, newP) { async linkPromise(existingP, newP) {
return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP));
} }
@ -1205,6 +1220,18 @@ class NodeFS extends BasePortableFakeFS {
rmdirSync(p, opts) { rmdirSync(p, opts) {
return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); return this.realFs.rmdirSync(npath.fromPortablePath(p), opts);
} }
async rmPromise(p, opts) {
return await new Promise((resolve, reject) => {
if (opts) {
this.realFs.rm(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
} else {
this.realFs.rm(npath.fromPortablePath(p), this.makeCallback(resolve, reject));
}
});
}
rmSync(p, opts) {
return this.realFs.rmSync(npath.fromPortablePath(p), opts);
}
async linkPromise(existingP, newP) { async linkPromise(existingP, newP) {
return await new Promise((resolve, reject) => { return await new Promise((resolve, reject) => {
this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject));
@ -1392,9 +1419,13 @@ class VirtualFS extends ProxiedFS {
} }
} }
const URL = Number(process.versions.node.split('.', 1)[0]) < 20 ? URL$1 : globalThis.URL;
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13; const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3; const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3;
const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || major === 20 && minor >= 10 || major === 18 && minor >= 20;
const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22;
function readPackageScope(checkPath) { function readPackageScope(checkPath) {
const rootSeparatorIndex = checkPath.indexOf(npath.sep); const rootSeparatorIndex = checkPath.indexOf(npath.sep);
@ -1432,7 +1463,7 @@ async function tryReadFile$1(path2) {
} }
function tryParseURL(str, base) { function tryParseURL(str, base) {
try { try {
return new URL$1(str, base); return new URL(str, base);
} catch { } catch {
return null; return null;
} }
@ -1485,11 +1516,22 @@ async function load$1(urlString, context, nextLoad) {
const format = getFileFormat(filePath); const format = getFileFormat(filePath);
if (!format) if (!format)
return nextLoad(urlString, context, nextLoad); return nextLoad(urlString, context, nextLoad);
if (format === `json` && context.importAssertions?.type !== `json`) { if (format === `json`) {
const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`); if (SUPPORTS_IMPORT_ATTRIBUTES_ONLY) {
if (context.importAttributes?.type !== `json`) {
const err = new TypeError(`[ERR_IMPORT_ATTRIBUTE_MISSING]: Module "${urlString}" needs an import attribute of "type: json"`);
err.code = `ERR_IMPORT_ATTRIBUTE_MISSING`;
throw err;
}
} else {
const type = `importAttributes` in context ? context.importAttributes?.type : context.importAssertions?.type;
if (type !== `json`) {
const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import ${SUPPORTS_IMPORT_ATTRIBUTES ? `attribute` : `assertion`} of type "json"`);
err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`;
throw err; throw err;
} }
}
}
if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) {
const pathToSend = pathToFileURL( const pathToSend = pathToFileURL(
npath.fromPortablePath( npath.fromPortablePath(
@ -1676,28 +1718,6 @@ function getPackageScopeConfig(resolved, readFileSyncFn) {
return packageConfig; return packageConfig;
} }
/**
@license
Copyright Node.js contributors. All rights reserved.
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.
*/
function throwImportNotDefined(specifier, packageJSONUrl, base) { function throwImportNotDefined(specifier, packageJSONUrl, base) {
throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(
specifier, specifier,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more