Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
4
VApp/node_modules/@pkgr/core/lib/constants.d.ts
generated
vendored
Normal file
4
VApp/node_modules/@pkgr/core/lib/constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/// <reference types="node" />
|
||||
export declare const CWD: string;
|
||||
export declare const cjsRequire: NodeRequire;
|
||||
export declare const EXTENSIONS: string[];
|
5
VApp/node_modules/@pkgr/core/lib/constants.js
generated
vendored
Normal file
5
VApp/node_modules/@pkgr/core/lib/constants.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { createRequire } from 'node:module';
|
||||
export const CWD = process.cwd();
|
||||
export const cjsRequire = typeof require === 'undefined' ? createRequire(import.meta.url) : require;
|
||||
export const EXTENSIONS = ['.ts', '.tsx', ...Object.keys(cjsRequire.extensions)];
|
||||
//# sourceMappingURL=constants.js.map
|
1
VApp/node_modules/@pkgr/core/lib/constants.js.map
generated
vendored
Normal file
1
VApp/node_modules/@pkgr/core/lib/constants.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AAEhC,MAAM,CAAC,MAAM,UAAU,GACrB,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;AAG3E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAA"}
|
5
VApp/node_modules/@pkgr/core/lib/helpers.d.ts
generated
vendored
Normal file
5
VApp/node_modules/@pkgr/core/lib/helpers.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export declare const tryPkg: (pkg: string) => string | undefined;
|
||||
export declare const isPkgAvailable: (pkg: string) => boolean;
|
||||
export declare const tryFile: (filePath?: string[] | string, includeDir?: boolean) => string;
|
||||
export declare const tryExtensions: (filepath: string, extensions?: string[]) => string;
|
||||
export declare const findUp: (searchEntry: string, searchFileOrIncludeDir?: boolean | string, includeDir?: boolean) => string;
|
49
VApp/node_modules/@pkgr/core/lib/helpers.js
generated
vendored
Normal file
49
VApp/node_modules/@pkgr/core/lib/helpers.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { CWD, EXTENSIONS, cjsRequire } from './constants.js';
|
||||
export const tryPkg = (pkg) => {
|
||||
try {
|
||||
return cjsRequire.resolve(pkg);
|
||||
}
|
||||
catch (_a) { }
|
||||
};
|
||||
export const isPkgAvailable = (pkg) => !!tryPkg(pkg);
|
||||
export const tryFile = (filePath, includeDir = false) => {
|
||||
if (typeof filePath === 'string') {
|
||||
return fs.existsSync(filePath) &&
|
||||
(includeDir || fs.statSync(filePath).isFile())
|
||||
? filePath
|
||||
: '';
|
||||
}
|
||||
for (const file of filePath !== null && filePath !== void 0 ? filePath : []) {
|
||||
if (tryFile(file, includeDir)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
export const tryExtensions = (filepath, extensions = EXTENSIONS) => {
|
||||
const ext = [...extensions, ''].find(ext => tryFile(filepath + ext));
|
||||
return ext == null ? '' : filepath + ext;
|
||||
};
|
||||
export const findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
|
||||
console.assert(path.isAbsolute(searchEntry));
|
||||
if (!tryFile(searchEntry, true) ||
|
||||
(searchEntry !== CWD && !searchEntry.startsWith(CWD + path.sep))) {
|
||||
return '';
|
||||
}
|
||||
searchEntry = path.resolve(fs.statSync(searchEntry).isDirectory()
|
||||
? searchEntry
|
||||
: path.resolve(searchEntry, '..'));
|
||||
const isSearchFile = typeof searchFileOrIncludeDir === 'string';
|
||||
const searchFile = isSearchFile ? searchFileOrIncludeDir : 'package.json';
|
||||
do {
|
||||
const searched = tryFile(path.resolve(searchEntry, searchFile), isSearchFile && includeDir);
|
||||
if (searched) {
|
||||
return searched;
|
||||
}
|
||||
searchEntry = path.resolve(searchEntry, '..');
|
||||
} while (searchEntry === CWD || searchEntry.startsWith(CWD + path.sep));
|
||||
return '';
|
||||
};
|
||||
//# sourceMappingURL=helpers.js.map
|
1
VApp/node_modules/@pkgr/core/lib/helpers.js.map
generated
vendored
Normal file
1
VApp/node_modules/@pkgr/core/lib/helpers.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE5D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE;IACpC,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC;IAAC,WAAM,CAAC,CAAA,CAAC;AACZ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAE5D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,QAA4B,EAAE,UAAU,GAAG,KAAK,EAAE,EAAE;IAC1E,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC5B,CAAC,UAAU,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC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AM,YAAY,GAAG,OAAO,sBAAsB,KAAK,QAAQ,CAAA;IAE/D,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,cAAc,CAAA;IAEzE,GAAG,CAAC;QACF,MAAM,QAAQ,GAAG,OAAO,CACtB,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,EACrC,YAAY,IAAI,UAAU,CAC3B,CAAA;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAA;QACjB,CAAC;QACD,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IAC/C,CAAC,QAAQ,WAAW,KAAK,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAC;IAEvE,OAAO,EAAE,CAAA;AACX,CAAC,CAAA"}
|
64
VApp/node_modules/@pkgr/core/lib/index.cjs
generated
vendored
Normal file
64
VApp/node_modules/@pkgr/core/lib/index.cjs
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
'use strict';
|
||||
|
||||
var node_module = require('node:module');
|
||||
var fs = require('node:fs');
|
||||
var path = require('node:path');
|
||||
|
||||
const import_meta = {};
|
||||
const CWD = process.cwd();
|
||||
const cjsRequire = typeof require === "undefined" ? node_module.createRequire(import_meta.url) : require;
|
||||
const EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire.extensions)];
|
||||
|
||||
const tryPkg = (pkg) => {
|
||||
try {
|
||||
return cjsRequire.resolve(pkg);
|
||||
} catch (e) {
|
||||
}
|
||||
};
|
||||
const isPkgAvailable = (pkg) => !!tryPkg(pkg);
|
||||
const tryFile = (filePath, includeDir = false) => {
|
||||
if (typeof filePath === "string") {
|
||||
return fs.existsSync(filePath) && (includeDir || fs.statSync(filePath).isFile()) ? filePath : "";
|
||||
}
|
||||
for (const file of filePath != null ? filePath : []) {
|
||||
if (tryFile(file, includeDir)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
const tryExtensions = (filepath, extensions = EXTENSIONS) => {
|
||||
const ext = [...extensions, ""].find((ext2) => tryFile(filepath + ext2));
|
||||
return ext == null ? "" : filepath + ext;
|
||||
};
|
||||
const findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
|
||||
console.assert(path.isAbsolute(searchEntry));
|
||||
if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + path.sep)) {
|
||||
return "";
|
||||
}
|
||||
searchEntry = path.resolve(
|
||||
fs.statSync(searchEntry).isDirectory() ? searchEntry : path.resolve(searchEntry, "..")
|
||||
);
|
||||
const isSearchFile = typeof searchFileOrIncludeDir === "string";
|
||||
const searchFile = isSearchFile ? searchFileOrIncludeDir : "package.json";
|
||||
do {
|
||||
const searched = tryFile(
|
||||
path.resolve(searchEntry, searchFile),
|
||||
isSearchFile && includeDir
|
||||
);
|
||||
if (searched) {
|
||||
return searched;
|
||||
}
|
||||
searchEntry = path.resolve(searchEntry, "..");
|
||||
} while (searchEntry === CWD || searchEntry.startsWith(CWD + path.sep));
|
||||
return "";
|
||||
};
|
||||
|
||||
exports.CWD = CWD;
|
||||
exports.EXTENSIONS = EXTENSIONS;
|
||||
exports.cjsRequire = cjsRequire;
|
||||
exports.findUp = findUp;
|
||||
exports.isPkgAvailable = isPkgAvailable;
|
||||
exports.tryExtensions = tryExtensions;
|
||||
exports.tryFile = tryFile;
|
||||
exports.tryPkg = tryPkg;
|
2
VApp/node_modules/@pkgr/core/lib/index.d.ts
generated
vendored
Normal file
2
VApp/node_modules/@pkgr/core/lib/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './constants.js';
|
||||
export * from './helpers.js';
|
3
VApp/node_modules/@pkgr/core/lib/index.js
generated
vendored
Normal file
3
VApp/node_modules/@pkgr/core/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './constants.js';
|
||||
export * from './helpers.js';
|
||||
//# sourceMappingURL=index.js.map
|
1
VApp/node_modules/@pkgr/core/lib/index.js.map
generated
vendored
Normal file
1
VApp/node_modules/@pkgr/core/lib/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
|
29
VApp/node_modules/@pkgr/core/package.json
generated
vendored
Normal file
29
VApp/node_modules/@pkgr/core/package.json
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "@pkgr/core",
|
||||
"version": "0.1.1",
|
||||
"type": "module",
|
||||
"description": "Shared core module for `@pkgr` packages or any package else",
|
||||
"repository": "git+https://github.com/un-ts/pkgr.git",
|
||||
"homepage": "https://github.com/un-ts/pkgr/blob/master/packages/core",
|
||||
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
|
||||
"funding": "https://opencollective.com/unts",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
"exports": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"import": "./lib/index.js",
|
||||
"require": "./lib/index.cjs"
|
||||
},
|
||||
"types": "./lib/index.d.ts",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
Reference in New Issue
Block a user