Update checked-in dependencies
This commit is contained in:
parent
4fad06f438
commit
40a500c743
4168 changed files with 298222 additions and 374905 deletions
2
node_modules/@pkgr/utils/lib/browser.d.ts
generated
vendored
2
node_modules/@pkgr/utils/lib/browser.d.ts
generated
vendored
|
|
@ -1 +1 @@
|
|||
export declare function openBrowser(url: string): boolean;
|
||||
export declare function openBrowser(url: string): Promise<boolean>;
|
||||
|
|
|
|||
127
node_modules/@pkgr/utils/lib/browser.js
generated
vendored
127
node_modules/@pkgr/utils/lib/browser.js
generated
vendored
|
|
@ -1,8 +1,8 @@
|
|||
import { __awaiter } from "tslib";
|
||||
import { execSync } from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import spawn from 'cross-spawn';
|
||||
import open from 'open';
|
||||
import picocolors from 'picocolors';
|
||||
const OSX_CHROME = 'google chrome';
|
||||
var Action;
|
||||
|
|
@ -47,67 +47,76 @@ function executeNodeScript(scriptPath, url) {
|
|||
return true;
|
||||
}
|
||||
function startBrowserProcess(browser, url, args) {
|
||||
const shouldTryOpenChromiumWithAppleScript = process.platform === 'darwin' &&
|
||||
(typeof browser !== 'string' || browser === OSX_CHROME);
|
||||
if (shouldTryOpenChromiumWithAppleScript) {
|
||||
const supportedChromiumBrowsers = [
|
||||
'Google Chrome Canary',
|
||||
'Google Chrome',
|
||||
'Microsoft Edge',
|
||||
'Brave Browser',
|
||||
'Vivaldi',
|
||||
'Chromium',
|
||||
];
|
||||
const _dirname = typeof __dirname === 'undefined'
|
||||
? path.dirname(fileURLToPath(import.meta.url))
|
||||
: __dirname;
|
||||
for (const chromiumBrowser of supportedChromiumBrowsers) {
|
||||
try {
|
||||
execSync('ps cax | grep "' + chromiumBrowser + '"');
|
||||
execSync('osascript ../openChrome.applescript "' +
|
||||
encodeURI(url) +
|
||||
'" "' +
|
||||
chromiumBrowser +
|
||||
'"', {
|
||||
cwd: _dirname,
|
||||
stdio: 'ignore',
|
||||
});
|
||||
return true;
|
||||
}
|
||||
catch (_a) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const shouldTryOpenChromiumWithAppleScript = process.platform === 'darwin' &&
|
||||
(typeof browser !== 'string' || browser === OSX_CHROME);
|
||||
if (shouldTryOpenChromiumWithAppleScript) {
|
||||
const supportedChromiumBrowsers = [
|
||||
'Google Chrome Canary',
|
||||
'Google Chrome',
|
||||
'Microsoft Edge',
|
||||
'Brave Browser',
|
||||
'Vivaldi',
|
||||
'Chromium',
|
||||
];
|
||||
const _dirname = typeof __dirname === 'undefined'
|
||||
? path.dirname(fileURLToPath(import.meta.url))
|
||||
: __dirname;
|
||||
for (const chromiumBrowser of supportedChromiumBrowsers) {
|
||||
try {
|
||||
execSync('ps cax | grep "' + chromiumBrowser + '"');
|
||||
execSync('osascript ../openChrome.applescript "' +
|
||||
encodeURI(url) +
|
||||
'" "' +
|
||||
chromiumBrowser +
|
||||
'"', {
|
||||
cwd: _dirname,
|
||||
stdio: 'ignore',
|
||||
});
|
||||
return true;
|
||||
}
|
||||
catch (_a) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (process.platform === 'darwin' && browser === 'open') {
|
||||
browser = undefined;
|
||||
}
|
||||
try {
|
||||
open(url, {
|
||||
app: browser
|
||||
? {
|
||||
name: browser,
|
||||
arguments: args,
|
||||
}
|
||||
: undefined,
|
||||
wait: false,
|
||||
}).catch(() => { });
|
||||
return true;
|
||||
}
|
||||
catch (_b) {
|
||||
return false;
|
||||
}
|
||||
if (process.platform === 'darwin' && browser === 'open') {
|
||||
browser = undefined;
|
||||
}
|
||||
try {
|
||||
const open = (yield import('open')).default;
|
||||
open(url, {
|
||||
app: browser
|
||||
? {
|
||||
name: browser,
|
||||
arguments: args,
|
||||
}
|
||||
: undefined,
|
||||
wait: false,
|
||||
}).catch(() => { });
|
||||
return true;
|
||||
}
|
||||
catch (_b) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
export function openBrowser(url) {
|
||||
const { action, value, args } = getBrowserEnv();
|
||||
switch (action) {
|
||||
case Action.NONE:
|
||||
return false;
|
||||
case Action.SCRIPT:
|
||||
return executeNodeScript(value, url);
|
||||
case Action.BROWSER:
|
||||
return startBrowserProcess(value, url, args);
|
||||
default:
|
||||
throw new Error('Not implemented.');
|
||||
}
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { action, value, args } = getBrowserEnv();
|
||||
switch (action) {
|
||||
case Action.NONE: {
|
||||
return false;
|
||||
}
|
||||
case Action.SCRIPT: {
|
||||
return executeNodeScript(value, url);
|
||||
}
|
||||
case Action.BROWSER: {
|
||||
return startBrowserProcess(value, url, args);
|
||||
}
|
||||
default: {
|
||||
throw new Error('Not implemented.');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=browser.js.map
|
||||
2
node_modules/@pkgr/utils/lib/browser.js.map
generated
vendored
2
node_modules/@pkgr/utils/lib/browser.js.map
generated
vendored
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,MAAM,UAAU,GAAG,eAAe,CAAA;AAElC,IAAK,MAIJ;AAJD,WAAK,MAAM;IACT,mCAAI,CAAA;IACJ,yCAAO,CAAA;IACP,uCAAM,CAAA;AACR,CAAC,EAJI,MAAM,KAAN,MAAM,QAIV;AAED,SAAS,aAAa;IAIpB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAA;IACjC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY;QACnC,CAAC,CA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,WAAM;YACN,OAAO,KAAK,CAAA;SACb;IACH,CAAC;CAAA;AAMD,MAAM,UAAgB,WAAW,CAAC,GAAW;;QAC3C,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,CAAA;QAC/C,QAAQ,MAAM,EAAE;YACd,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC;gBAEhB,OAAO,KAAK,CAAA;aACb;YACD,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC;gBAClB,OAAO,iBAAiB,CAAC,KAAM,EAAE,GAAG,CAAC,CAAA;aACtC;YACD,KAAK,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnB,OAAO,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;aAC7C;YACD,OAAO,CAAC,CAAC;gBACP,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAA;aACpC;SACF;IACH,CAAC;CAAA"}
|
||||
1
node_modules/@pkgr/utils/lib/constants.d.ts
generated
vendored
1
node_modules/@pkgr/utils/lib/constants.d.ts
generated
vendored
|
|
@ -1,5 +1,4 @@
|
|||
/// <reference types="node" />
|
||||
/// <reference types="webpack-env" />
|
||||
export declare const DEV: "development";
|
||||
export declare const PROD: "production";
|
||||
export declare const NODE_ENV: string;
|
||||
|
|
|
|||
1
node_modules/@pkgr/utils/lib/helpers.d.ts
generated
vendored
1
node_modules/@pkgr/utils/lib/helpers.d.ts
generated
vendored
|
|
@ -12,6 +12,7 @@ export declare const tryExtensions: (filepath: string, extensions?: string[]) =>
|
|||
export declare const tryGlob: (paths: string[], options?: string | {
|
||||
absolute?: boolean;
|
||||
baseDir?: string;
|
||||
ignore?: [string];
|
||||
}) => string[];
|
||||
export declare const identify: <T>(_: T) => _ is Exclude<T, "" | (T extends boolean ? false : boolean) | null | undefined>;
|
||||
export declare const findUp: (searchEntry: string, searchFile?: string) => string;
|
||||
|
|
|
|||
9
node_modules/@pkgr/utils/lib/helpers.js
generated
vendored
9
node_modules/@pkgr/utils/lib/helpers.js
generated
vendored
|
|
@ -41,14 +41,17 @@ export const tryExtensions = (filepath, extensions = EXTENSIONS) => {
|
|||
return ext == null ? '' : filepath + ext;
|
||||
};
|
||||
export const tryGlob = (paths, options = {}) => {
|
||||
const { absolute = true, baseDir = CWD } = typeof options === 'string' ? { baseDir: options } : options;
|
||||
const { absolute = true, baseDir = CWD, ignore = ['**/node_modules/**'], } = typeof options === 'string' ? { baseDir: options } : options;
|
||||
return paths.reduce((acc, pkg) => [
|
||||
...acc,
|
||||
...(isGlob(pkg)
|
||||
? tryRequirePkg('tiny-glob/sync')(pkg, {
|
||||
absolute,
|
||||
? tryRequirePkg('fast-glob')
|
||||
.sync(pkg, {
|
||||
cwd: baseDir,
|
||||
ignore,
|
||||
onlyFiles: false,
|
||||
})
|
||||
.map(file => (absolute ? path.resolve(baseDir, file) : file))
|
||||
: [tryFile(path.resolve(baseDir, pkg), true)]),
|
||||
].filter(Boolean), []);
|
||||
};
|
||||
|
|
|
|||
2
node_modules/@pkgr/utils/lib/helpers.js.map
generated
vendored
2
node_modules/@pkgr/utils/lib/helpers.js.map
generated
vendored
|
|
@ -1 +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,MAAM,MAAM,SAAS,CAAA;AAE5B,OAAO,EACL,GAAG,EACH,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,gBAAgB,CAAA;AAEvB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE;IACpC,IAAI;QACF,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;KAC/B;IAAC,WAAM,GAAE;AACZ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,GAAW,EAA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AC,CAAA;AAC7B,CAAC,CAAA"}
|
||||
195
node_modules/@pkgr/utils/lib/index.cjs
generated
vendored
195
node_modules/@pkgr/utils/lib/index.cjs
generated
vendored
|
|
@ -1,26 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var node_child_process = require('node:child_process');
|
||||
var path = require('node:path');
|
||||
var node_url = require('node:url');
|
||||
var spawn = require('cross-spawn');
|
||||
var open = require('open');
|
||||
var picocolors = require('picocolors');
|
||||
var node_module = require('node:module');
|
||||
var fs = require('node:fs');
|
||||
var isGlob = require('is-glob');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
||||
var spawn__default = /*#__PURE__*/_interopDefaultLegacy(spawn);
|
||||
var open__default = /*#__PURE__*/_interopDefaultLegacy(open);
|
||||
var picocolors__default = /*#__PURE__*/_interopDefaultLegacy(picocolors);
|
||||
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
||||
var isGlob__default = /*#__PURE__*/_interopDefaultLegacy(isGlob);
|
||||
|
||||
var __async = (__this, __arguments, generator) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
var fulfilled = (value) => {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
var rejected = (value) => {
|
||||
try {
|
||||
step(generator.throw(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
||||
step((generator = generator.apply(__this, __arguments)).next());
|
||||
});
|
||||
};
|
||||
const import_meta$1 = {};
|
||||
const OSX_CHROME = "google chrome";
|
||||
function getBrowserEnv() {
|
||||
|
|
@ -40,79 +48,89 @@ function getBrowserEnv() {
|
|||
}
|
||||
function executeNodeScript(scriptPath, url) {
|
||||
const extraArgs = process.argv.slice(2);
|
||||
const child = spawn__default["default"](process.execPath, [scriptPath, ...extraArgs, url], {
|
||||
const child = spawn(process.execPath, [scriptPath, ...extraArgs, url], {
|
||||
stdio: "inherit"
|
||||
});
|
||||
child.on("close", (code) => {
|
||||
if (code !== 0) {
|
||||
console.log();
|
||||
console.log(
|
||||
picocolors__default["default"].red(
|
||||
picocolors.red(
|
||||
"The script specified as BROWSER environment variable failed."
|
||||
)
|
||||
);
|
||||
console.log(`${picocolors__default["default"].cyan(scriptPath)} exited with code ${code}`);
|
||||
console.log(`${picocolors.cyan(scriptPath)} exited with code ${code}`);
|
||||
console.log();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
function startBrowserProcess(browser, url, args) {
|
||||
const shouldTryOpenChromiumWithAppleScript = process.platform === "darwin" && (typeof browser !== "string" || browser === OSX_CHROME);
|
||||
if (shouldTryOpenChromiumWithAppleScript) {
|
||||
const supportedChromiumBrowsers = [
|
||||
"Google Chrome Canary",
|
||||
"Google Chrome",
|
||||
"Microsoft Edge",
|
||||
"Brave Browser",
|
||||
"Vivaldi",
|
||||
"Chromium"
|
||||
];
|
||||
const _dirname = typeof __dirname === "undefined" ? path__default["default"].dirname(node_url.fileURLToPath(import_meta$1.url)) : __dirname;
|
||||
for (const chromiumBrowser of supportedChromiumBrowsers) {
|
||||
try {
|
||||
node_child_process.execSync('ps cax | grep "' + chromiumBrowser + '"');
|
||||
node_child_process.execSync(
|
||||
'osascript ../openChrome.applescript "' + encodeURI(url) + '" "' + chromiumBrowser + '"',
|
||||
{
|
||||
cwd: _dirname,
|
||||
stdio: "ignore"
|
||||
}
|
||||
);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return __async(this, null, function* () {
|
||||
const shouldTryOpenChromiumWithAppleScript = process.platform === "darwin" && (typeof browser !== "string" || browser === OSX_CHROME);
|
||||
if (shouldTryOpenChromiumWithAppleScript) {
|
||||
const supportedChromiumBrowsers = [
|
||||
"Google Chrome Canary",
|
||||
"Google Chrome",
|
||||
"Microsoft Edge",
|
||||
"Brave Browser",
|
||||
"Vivaldi",
|
||||
"Chromium"
|
||||
];
|
||||
const _dirname = typeof __dirname === "undefined" ? path.dirname(node_url.fileURLToPath(import_meta$1.url)) : __dirname;
|
||||
for (const chromiumBrowser of supportedChromiumBrowsers) {
|
||||
try {
|
||||
node_child_process.execSync('ps cax | grep "' + chromiumBrowser + '"');
|
||||
node_child_process.execSync(
|
||||
'osascript ../openChrome.applescript "' + // lgtm [js/shell-command-constructed-from-input]
|
||||
encodeURI(url) + '" "' + chromiumBrowser + '"',
|
||||
{
|
||||
cwd: _dirname,
|
||||
stdio: "ignore"
|
||||
}
|
||||
);
|
||||
return true;
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (process.platform === "darwin" && browser === "open") {
|
||||
browser = void 0;
|
||||
}
|
||||
try {
|
||||
open__default["default"](url, {
|
||||
app: browser ? {
|
||||
name: browser,
|
||||
arguments: args
|
||||
} : void 0,
|
||||
wait: false
|
||||
}).catch(() => {
|
||||
});
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
if (process.platform === "darwin" && browser === "open") {
|
||||
browser = void 0;
|
||||
}
|
||||
try {
|
||||
const open = (yield import('open')).default;
|
||||
open(url, {
|
||||
app: browser ? {
|
||||
name: browser,
|
||||
arguments: args
|
||||
} : void 0,
|
||||
wait: false
|
||||
}).catch(() => {
|
||||
});
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
function openBrowser(url) {
|
||||
const { action, value, args } = getBrowserEnv();
|
||||
switch (action) {
|
||||
case 0 /* NONE */:
|
||||
return false;
|
||||
case 2 /* SCRIPT */:
|
||||
return executeNodeScript(value, url);
|
||||
case 1 /* BROWSER */:
|
||||
return startBrowserProcess(value, url, args);
|
||||
default:
|
||||
throw new Error("Not implemented.");
|
||||
}
|
||||
return __async(this, null, function* () {
|
||||
const { action, value, args } = getBrowserEnv();
|
||||
switch (action) {
|
||||
case 0 /* NONE */: {
|
||||
return false;
|
||||
}
|
||||
case 2 /* SCRIPT */: {
|
||||
return executeNodeScript(value, url);
|
||||
}
|
||||
case 1 /* BROWSER */: {
|
||||
return startBrowserProcess(value, url, args);
|
||||
}
|
||||
default: {
|
||||
throw new Error("Not implemented.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const import_meta = {};
|
||||
|
|
@ -134,6 +152,7 @@ const SCRIPT_RUNNERS = {
|
|||
const SCRIPT_EXECUTORS = {
|
||||
npm: "npx",
|
||||
pnpm: "pnpx",
|
||||
// same as 'pnpm dlx'
|
||||
yarn: "yarn dlx"
|
||||
};
|
||||
|
||||
|
|
@ -158,7 +177,7 @@ const isSvelteAvailable = isPkgAvailable("svelte");
|
|||
const isVueAvailable = isPkgAvailable("vue");
|
||||
const tryFile = (filePath, includeDir = false) => {
|
||||
if (typeof filePath === "string") {
|
||||
return fs__default["default"].existsSync(filePath) && (includeDir || fs__default["default"].statSync(filePath).isFile()) ? filePath : "";
|
||||
return fs.existsSync(filePath) && (includeDir || fs.statSync(filePath).isFile()) ? filePath : "";
|
||||
}
|
||||
for (const file of filePath != null ? filePath : []) {
|
||||
if (tryFile(file, includeDir)) {
|
||||
|
|
@ -172,37 +191,39 @@ const tryExtensions = (filepath, extensions = EXTENSIONS) => {
|
|||
return ext == null ? "" : filepath + ext;
|
||||
};
|
||||
const tryGlob = (paths, options = {}) => {
|
||||
const { absolute = true, baseDir = CWD } = typeof options === "string" ? { baseDir: options } : options;
|
||||
const {
|
||||
absolute = true,
|
||||
baseDir = CWD,
|
||||
ignore = ["**/node_modules/**"]
|
||||
} = typeof options === "string" ? { baseDir: options } : options;
|
||||
return paths.reduce(
|
||||
(acc, pkg) => [
|
||||
...acc,
|
||||
...isGlob__default["default"](pkg) ? tryRequirePkg("tiny-glob/sync")(
|
||||
pkg,
|
||||
{
|
||||
absolute,
|
||||
cwd: baseDir
|
||||
}
|
||||
) : [tryFile(path__default["default"].resolve(baseDir, pkg), true)]
|
||||
...isGlob(pkg) ? tryRequirePkg("fast-glob").sync(pkg, {
|
||||
cwd: baseDir,
|
||||
ignore,
|
||||
onlyFiles: false
|
||||
}).map((file) => absolute ? path.resolve(baseDir, file) : file) : [tryFile(path.resolve(baseDir, pkg), true)]
|
||||
].filter(Boolean),
|
||||
[]
|
||||
);
|
||||
};
|
||||
const identify = (_) => !!_;
|
||||
const findUp = (searchEntry, searchFile = "package.json") => {
|
||||
console.assert(path__default["default"].isAbsolute(searchEntry));
|
||||
if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + path__default["default"].sep)) {
|
||||
console.assert(path.isAbsolute(searchEntry));
|
||||
if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + path.sep)) {
|
||||
return "";
|
||||
}
|
||||
searchEntry = path__default["default"].resolve(
|
||||
fs__default["default"].statSync(searchEntry).isDirectory() ? searchEntry : path__default["default"].resolve(searchEntry, "..")
|
||||
searchEntry = path.resolve(
|
||||
fs.statSync(searchEntry).isDirectory() ? searchEntry : path.resolve(searchEntry, "..")
|
||||
);
|
||||
do {
|
||||
const searched = tryFile(path__default["default"].resolve(searchEntry, searchFile));
|
||||
const searched = tryFile(path.resolve(searchEntry, searchFile));
|
||||
if (searched) {
|
||||
return searched;
|
||||
}
|
||||
searchEntry = path__default["default"].resolve(searchEntry, "..");
|
||||
} while (searchEntry === CWD || searchEntry.startsWith(CWD + path__default["default"].sep));
|
||||
searchEntry = path.resolve(searchEntry, "..");
|
||||
} while (searchEntry === CWD || searchEntry.startsWith(CWD + path.sep));
|
||||
return "";
|
||||
};
|
||||
const arrayify = (...args) => args.reduce((arr, curr) => {
|
||||
|
|
@ -241,11 +262,15 @@ const getScriptExecutor = () => {
|
|||
};
|
||||
|
||||
var _a, _b, _c, _d;
|
||||
const pkg = (_a = tryRequirePkg(path__default["default"].resolve("package.json"))) != null ? _a : {};
|
||||
const lernaConfig = (_b = tryRequirePkg(path__default["default"].resolve("lerna.json"))) != null ? _b : {};
|
||||
const pkg = (_a = tryRequirePkg(path.resolve("package.json"))) != null ? _a : {};
|
||||
const lernaConfig = (_b = tryRequirePkg(path.resolve("lerna.json"))) != null ? _b : {};
|
||||
const pkgsPath = (_d = (_c = lernaConfig.packages) != null ? _c : pkg.workspaces) != null ? _d : [];
|
||||
const isMonorepo = Array.isArray(pkgsPath) && pkgsPath.length > 0;
|
||||
const monorepoPkgs = isMonorepo ? tryGlob(pkgsPath) : [];
|
||||
const monorepoPkgs = isMonorepo ? tryGlob(
|
||||
pkgsPath.map(
|
||||
(pkg2) => pkg2.endsWith("/package.json") ? pkg2 : `${pkg2}/package.json`
|
||||
)
|
||||
) : [];
|
||||
|
||||
exports.CWD = CWD;
|
||||
exports.DEV = DEV;
|
||||
|
|
|
|||
4
node_modules/@pkgr/utils/lib/monorepo.js
generated
vendored
4
node_modules/@pkgr/utils/lib/monorepo.js
generated
vendored
|
|
@ -5,5 +5,7 @@ const pkg = (_a = tryRequirePkg(path.resolve('package.json'))) !== null && _a !=
|
|||
const lernaConfig = (_b = tryRequirePkg(path.resolve('lerna.json'))) !== null && _b !== void 0 ? _b : {};
|
||||
const pkgsPath = (_d = (_c = lernaConfig.packages) !== null && _c !== void 0 ? _c : pkg.workspaces) !== null && _d !== void 0 ? _d : [];
|
||||
export const isMonorepo = Array.isArray(pkgsPath) && pkgsPath.length > 0;
|
||||
export const monorepoPkgs = isMonorepo ? tryGlob(pkgsPath) : [];
|
||||
export const monorepoPkgs = isMonorepo
|
||||
? tryGlob(pkgsPath.map(pkg => pkg.endsWith('/package.json') ? pkg : `${pkg}/package.json`))
|
||||
: [];
|
||||
//# sourceMappingURL=monorepo.js.map
|
||||
2
node_modules/@pkgr/utils/lib/monorepo.js.map
generated
vendored
2
node_modules/@pkgr/utils/lib/monorepo.js.map
generated
vendored
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"monorepo.js","sourceRoot":"","sources":["../src/monorepo.ts"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,GAAG,GACP,MAAA,aAAa,CAA4B,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,mCAAI,EAAE,CAAA;AAE9E,MAAM,WAAW,GACf,MAAA,aAAa,CAA0B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,mCAAI,EAAE,CAAA;AAE1E,MAAM,QAAQ,GAAG,MAAA,MAAA,WAAW,CAAC,QAAQ,mCAAI,GAAG,CAAC,UAAU,mCAAI,EAAE,CAAA;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAA;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA"}
|
||||
{"version":3,"file":"monorepo.js","sourceRoot":"","sources":["../src/monorepo.ts"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,GAAG,GACP,MAAA,aAAa,CAA4B,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,mCAAI,EAAE,CAAA;AAE9E,MAAM,WAAW,GACf,MAAA,aAAa,CAA0B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,mCAAI,EAAE,CAAA;AAE1E,MAAM,QAAQ,GAAG,MAAA,MAAA,WAAW,CAAC,QAAQ,mCAAI,GAAG,CAAC,UAAU,mCAAI,EAAE,CAAA;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAA;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU;IACpC,CAAC,CAAC,OAAO,CACL,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACjB,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,eAAe,CAC5D,CACF;IACH,CAAC,CAAC,EAAE,CAAA"}
|
||||
2
node_modules/@pkgr/utils/node_modules/tslib/README.md
generated
vendored
2
node_modules/@pkgr/utils/node_modules/tslib/README.md
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
|
|
|||
37
node_modules/@pkgr/utils/node_modules/tslib/modules/index.d.ts
generated
vendored
Normal file
37
node_modules/@pkgr/utils/node_modules/tslib/modules/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// Note: named reexports are used instead of `export *` because
|
||||
// TypeScript itself doesn't resolve the `export *` when checking
|
||||
// if a particular helper exists.
|
||||
export {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__esDecorate,
|
||||
__runInitializers,
|
||||
__propKey,
|
||||
__setFunctionName,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__exportStar,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__spreadArray,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
__createBinding,
|
||||
__addDisposableResource,
|
||||
__disposeResources,
|
||||
} from '../tslib.js';
|
||||
export * as default from '../tslib.js';
|
||||
13
node_modules/@pkgr/utils/node_modules/tslib/modules/index.js
generated
vendored
13
node_modules/@pkgr/utils/node_modules/tslib/modules/index.js
generated
vendored
|
|
@ -5,6 +5,10 @@ const {
|
|||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__esDecorate,
|
||||
__runInitializers,
|
||||
__propKey,
|
||||
__setFunctionName,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
|
|
@ -25,6 +29,8 @@ const {
|
|||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
__addDisposableResource,
|
||||
__disposeResources,
|
||||
} = tslib;
|
||||
export {
|
||||
__extends,
|
||||
|
|
@ -32,6 +38,10 @@ export {
|
|||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__esDecorate,
|
||||
__runInitializers,
|
||||
__propKey,
|
||||
__setFunctionName,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
|
|
@ -52,4 +62,7 @@ export {
|
|||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
__addDisposableResource,
|
||||
__disposeResources,
|
||||
};
|
||||
export default tslib;
|
||||
|
|
|
|||
15
node_modules/@pkgr/utils/node_modules/tslib/package.json
generated
vendored
15
node_modules/@pkgr/utils/node_modules/tslib/package.json
generated
vendored
|
|
@ -2,7 +2,7 @@
|
|||
"name": "tslib",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "2.4.1",
|
||||
"version": "2.6.0",
|
||||
"license": "0BSD",
|
||||
"description": "Runtime library for TypeScript helper functions",
|
||||
"keywords": [
|
||||
|
|
@ -28,8 +28,17 @@
|
|||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"module": "./tslib.es6.js",
|
||||
"import": "./modules/index.js",
|
||||
"module": {
|
||||
"types": "./tslib/modules/index.d.ts",
|
||||
"default": "./tslib.es6.mjs"
|
||||
},
|
||||
"import": {
|
||||
"node": "./modules/index.js",
|
||||
"default": {
|
||||
"types": "./modules/index.d.ts",
|
||||
"default": "./tslib.es6.mjs"
|
||||
}
|
||||
},
|
||||
"default": "./tslib.js"
|
||||
},
|
||||
"./*": "./*",
|
||||
|
|
|
|||
55
node_modules/@pkgr/utils/node_modules/tslib/tslib.d.ts
generated
vendored
55
node_modules/@pkgr/utils/node_modules/tslib/tslib.d.ts
generated
vendored
|
|
@ -58,6 +58,38 @@ export declare function __decorate(decorators: Function[], target: any, key?: st
|
|||
*/
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
|
||||
/**
|
||||
* Applies decorators to a class or class member, following the native ECMAScript decorator specification.
|
||||
* @param ctor For non-field class members, the class constructor. Otherwise, `null`.
|
||||
* @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`.
|
||||
* @param decorators The decorators to apply
|
||||
* @param contextIn The `DecoratorContext` to clone for each decorator application.
|
||||
* @param initializers An array of field initializer mutation functions into which new initializers are written.
|
||||
* @param extraInitializers An array of extra initializer functions into which new initializers are written.
|
||||
*/
|
||||
export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void;
|
||||
|
||||
/**
|
||||
* Runs field initializers or extra initializers generated by `__esDecorate`.
|
||||
* @param thisArg The `this` argument to use.
|
||||
* @param initializers The array of initializers to evaluate.
|
||||
* @param value The initial value to pass to the initializers.
|
||||
*/
|
||||
export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any;
|
||||
|
||||
/**
|
||||
* Converts a computed property name into a `string` or `symbol` value.
|
||||
*/
|
||||
export declare function __propKey(x: any): string | symbol;
|
||||
|
||||
/**
|
||||
* Assigns the name of a function derived from the left-hand side of an assignment.
|
||||
* @param f The function to rename.
|
||||
* @param name The new name for the function.
|
||||
* @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name.
|
||||
*/
|
||||
export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function;
|
||||
|
||||
/**
|
||||
* Creates a decorator that sets metadata.
|
||||
*
|
||||
|
|
@ -396,3 +428,26 @@ export declare function __classPrivateFieldIn(
|
|||
* @param objectKey The property key to re-export as. Defaults to `key`.
|
||||
*/
|
||||
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
|
||||
|
||||
/**
|
||||
* Adds a disposable resource to a resource-tracking environment object.
|
||||
* @param env A resource-tracking environment object.
|
||||
* @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`.
|
||||
* @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added.
|
||||
* @returns The {@link value} argument.
|
||||
*
|
||||
* @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not
|
||||
* defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method.
|
||||
*/
|
||||
export declare function __addDisposableResource<T>(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T;
|
||||
|
||||
/**
|
||||
* Disposes all resources in a resource-tracking environment object.
|
||||
* @param env A resource-tracking environment object.
|
||||
* @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`.
|
||||
*
|
||||
* @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the
|
||||
* error recorded in the resource-tracking environment object.
|
||||
* @seealso {@link __addDisposableResource}
|
||||
*/
|
||||
export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any;
|
||||
|
|
|
|||
126
node_modules/@pkgr/utils/node_modules/tslib/tslib.es6.js
generated
vendored
126
node_modules/@pkgr/utils/node_modules/tslib/tslib.es6.js
generated
vendored
|
|
@ -12,7 +12,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
/* global Reflect, Promise, SuppressedError, Symbol */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
|
|
@ -63,6 +63,51 @@ export function __param(paramIndex, decorator) {
|
|||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
}
|
||||
|
||||
export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context = {};
|
||||
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
if (_ = accept(result.get)) descriptor.get = _;
|
||||
if (_ = accept(result.set)) descriptor.set = _;
|
||||
if (_ = accept(result.init)) initializers.unshift(_);
|
||||
}
|
||||
else if (_ = accept(result)) {
|
||||
if (kind === "field") initializers.unshift(_);
|
||||
else descriptor[key] = _;
|
||||
}
|
||||
}
|
||||
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||
done = true;
|
||||
};
|
||||
|
||||
export function __runInitializers(thisArg, initializers, value) {
|
||||
var useValue = arguments.length > 2;
|
||||
for (var i = 0; i < initializers.length; i++) {
|
||||
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||
}
|
||||
return useValue ? value : void 0;
|
||||
};
|
||||
|
||||
export function __propKey(x) {
|
||||
return typeof x === "symbol" ? x : "".concat(x);
|
||||
};
|
||||
|
||||
export function __setFunctionName(f, name, prefix) {
|
||||
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||
};
|
||||
|
||||
export function __metadata(metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
}
|
||||
|
|
@ -195,7 +240,7 @@ export function __asyncGenerator(thisArg, _arguments, generator) {
|
|||
export function __asyncDelegator(o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
||||
}
|
||||
|
||||
export function __asyncValues(o) {
|
||||
|
|
@ -246,3 +291,80 @@ export function __classPrivateFieldIn(state, receiver) {
|
|||
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
||||
return typeof state === "function" ? receiver === state : state.has(receiver);
|
||||
}
|
||||
|
||||
export function __addDisposableResource(env, value, async) {
|
||||
if (value !== null && value !== void 0) {
|
||||
if (typeof value !== "object") throw new TypeError("Object expected.");
|
||||
var dispose;
|
||||
if (async) {
|
||||
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
||||
dispose = value[Symbol.asyncDispose];
|
||||
}
|
||||
if (dispose === void 0) {
|
||||
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
||||
dispose = value[Symbol.dispose];
|
||||
}
|
||||
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
||||
env.stack.push({ value: value, dispose: dispose, async: async });
|
||||
}
|
||||
else if (async) {
|
||||
env.stack.push({ async: true });
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
export function __disposeResources(env) {
|
||||
function fail(e) {
|
||||
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
||||
env.hasError = true;
|
||||
}
|
||||
function next() {
|
||||
while (env.stack.length) {
|
||||
var rec = env.stack.pop();
|
||||
try {
|
||||
var result = rec.dispose && rec.dispose.call(rec.value);
|
||||
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
||||
}
|
||||
catch (e) {
|
||||
fail(e);
|
||||
}
|
||||
}
|
||||
if (env.hasError) throw env.error;
|
||||
}
|
||||
return next();
|
||||
}
|
||||
|
||||
export default {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__createBinding,
|
||||
__exportStar,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__spreadArray,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
__addDisposableResource,
|
||||
__disposeResources,
|
||||
};
|
||||
|
|
|
|||
370
node_modules/@pkgr/utils/node_modules/tslib/tslib.es6.mjs
generated
vendored
Normal file
370
node_modules/@pkgr/utils/node_modules/tslib/tslib.es6.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise, SuppressedError, Symbol */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
export function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
export var __assign = function() {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
return __assign.apply(this, arguments);
|
||||
}
|
||||
|
||||
export function __rest(s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
export function __decorate(decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
}
|
||||
|
||||
export function __param(paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
}
|
||||
|
||||
export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context = {};
|
||||
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
if (_ = accept(result.get)) descriptor.get = _;
|
||||
if (_ = accept(result.set)) descriptor.set = _;
|
||||
if (_ = accept(result.init)) initializers.unshift(_);
|
||||
}
|
||||
else if (_ = accept(result)) {
|
||||
if (kind === "field") initializers.unshift(_);
|
||||
else descriptor[key] = _;
|
||||
}
|
||||
}
|
||||
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||
done = true;
|
||||
};
|
||||
|
||||
export function __runInitializers(thisArg, initializers, value) {
|
||||
var useValue = arguments.length > 2;
|
||||
for (var i = 0; i < initializers.length; i++) {
|
||||
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||
}
|
||||
return useValue ? value : void 0;
|
||||
};
|
||||
|
||||
export function __propKey(x) {
|
||||
return typeof x === "symbol" ? x : "".concat(x);
|
||||
};
|
||||
|
||||
export function __setFunctionName(f, name, prefix) {
|
||||
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||
};
|
||||
|
||||
export function __metadata(metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
}
|
||||
|
||||
export function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
export function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
export var __createBinding = Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
});
|
||||
|
||||
export function __exportStar(m, o) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
||||
}
|
||||
|
||||
export function __values(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
}
|
||||
|
||||
export function __read(o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export function __spread() {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||||
ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export function __spreadArrays() {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
}
|
||||
|
||||
export function __spreadArray(to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
}
|
||||
|
||||
export function __await(v) {
|
||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||||
}
|
||||
|
||||
export function __asyncGenerator(thisArg, _arguments, generator) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||||
function fulfill(value) { resume("next", value); }
|
||||
function reject(value) { resume("throw", value); }
|
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||||
}
|
||||
|
||||
export function __asyncDelegator(o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
||||
}
|
||||
|
||||
export function __asyncValues(o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
}
|
||||
|
||||
export function __makeTemplateObject(cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
|
||||
var __setModuleDefault = Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
};
|
||||
|
||||
export function __importStar(mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
}
|
||||
|
||||
export function __importDefault(mod) {
|
||||
return (mod && mod.__esModule) ? mod : { default: mod };
|
||||
}
|
||||
|
||||
export function __classPrivateFieldGet(receiver, state, kind, f) {
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
}
|
||||
|
||||
export function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||||
}
|
||||
|
||||
export function __classPrivateFieldIn(state, receiver) {
|
||||
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
||||
return typeof state === "function" ? receiver === state : state.has(receiver);
|
||||
}
|
||||
|
||||
export function __addDisposableResource(env, value, async) {
|
||||
if (value !== null && value !== void 0) {
|
||||
if (typeof value !== "object") throw new TypeError("Object expected.");
|
||||
var dispose;
|
||||
if (async) {
|
||||
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
||||
dispose = value[Symbol.asyncDispose];
|
||||
}
|
||||
if (dispose === void 0) {
|
||||
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
||||
dispose = value[Symbol.dispose];
|
||||
}
|
||||
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
||||
env.stack.push({ value: value, dispose: dispose, async: async });
|
||||
}
|
||||
else if (async) {
|
||||
env.stack.push({ async: true });
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
export function __disposeResources(env) {
|
||||
function fail(e) {
|
||||
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
||||
env.hasError = true;
|
||||
}
|
||||
function next() {
|
||||
while (env.stack.length) {
|
||||
var rec = env.stack.pop();
|
||||
try {
|
||||
var result = rec.dispose && rec.dispose.call(rec.value);
|
||||
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
||||
}
|
||||
catch (e) {
|
||||
fail(e);
|
||||
}
|
||||
}
|
||||
if (env.hasError) throw env.error;
|
||||
}
|
||||
return next();
|
||||
}
|
||||
|
||||
export default {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__createBinding,
|
||||
__exportStar,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__spreadArray,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
__addDisposableResource,
|
||||
__disposeResources,
|
||||
};
|
||||
108
node_modules/@pkgr/utils/node_modules/tslib/tslib.js
generated
vendored
108
node_modules/@pkgr/utils/node_modules/tslib/tslib.js
generated
vendored
|
|
@ -12,12 +12,16 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global global, define, System, Reflect, Promise */
|
||||
/* global global, define, Symbol, Reflect, Promise, SuppressedError */
|
||||
var __extends;
|
||||
var __assign;
|
||||
var __rest;
|
||||
var __decorate;
|
||||
var __param;
|
||||
var __esDecorate;
|
||||
var __runInitializers;
|
||||
var __propKey;
|
||||
var __setFunctionName;
|
||||
var __metadata;
|
||||
var __awaiter;
|
||||
var __generator;
|
||||
|
|
@ -38,6 +42,8 @@ var __classPrivateFieldGet;
|
|||
var __classPrivateFieldSet;
|
||||
var __classPrivateFieldIn;
|
||||
var __createBinding;
|
||||
var __addDisposableResource;
|
||||
var __disposeResources;
|
||||
(function (factory) {
|
||||
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
||||
if (typeof define === "function" && define.amd) {
|
||||
|
|
@ -105,6 +111,51 @@ var __createBinding;
|
|||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
|
||||
__esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context = {};
|
||||
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
if (_ = accept(result.get)) descriptor.get = _;
|
||||
if (_ = accept(result.set)) descriptor.set = _;
|
||||
if (_ = accept(result.init)) initializers.unshift(_);
|
||||
}
|
||||
else if (_ = accept(result)) {
|
||||
if (kind === "field") initializers.unshift(_);
|
||||
else descriptor[key] = _;
|
||||
}
|
||||
}
|
||||
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||
done = true;
|
||||
};
|
||||
|
||||
__runInitializers = function (thisArg, initializers, value) {
|
||||
var useValue = arguments.length > 2;
|
||||
for (var i = 0; i < initializers.length; i++) {
|
||||
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||
}
|
||||
return useValue ? value : void 0;
|
||||
};
|
||||
|
||||
__propKey = function (x) {
|
||||
return typeof x === "symbol" ? x : "".concat(x);
|
||||
};
|
||||
|
||||
__setFunctionName = function (f, name, prefix) {
|
||||
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||
};
|
||||
|
||||
__metadata = function (metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
};
|
||||
|
|
@ -237,7 +288,7 @@ var __createBinding;
|
|||
__asyncDelegator = function (o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
||||
};
|
||||
|
||||
__asyncValues = function (o) {
|
||||
|
|
@ -289,11 +340,62 @@ var __createBinding;
|
|||
return typeof state === "function" ? receiver === state : state.has(receiver);
|
||||
};
|
||||
|
||||
__addDisposableResource = function (env, value, async) {
|
||||
if (value !== null && value !== void 0) {
|
||||
if (typeof value !== "object") throw new TypeError("Object expected.");
|
||||
var dispose;
|
||||
if (async) {
|
||||
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
||||
dispose = value[Symbol.asyncDispose];
|
||||
}
|
||||
if (dispose === void 0) {
|
||||
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
||||
dispose = value[Symbol.dispose];
|
||||
}
|
||||
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
||||
env.stack.push({ value: value, dispose: dispose, async: async });
|
||||
}
|
||||
else if (async) {
|
||||
env.stack.push({ async: true });
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
__disposeResources = function (env) {
|
||||
function fail(e) {
|
||||
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
||||
env.hasError = true;
|
||||
}
|
||||
function next() {
|
||||
while (env.stack.length) {
|
||||
var rec = env.stack.pop();
|
||||
try {
|
||||
var result = rec.dispose && rec.dispose.call(rec.value);
|
||||
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
||||
}
|
||||
catch (e) {
|
||||
fail(e);
|
||||
}
|
||||
}
|
||||
if (env.hasError) throw env.error;
|
||||
}
|
||||
return next();
|
||||
};
|
||||
|
||||
exporter("__extends", __extends);
|
||||
exporter("__assign", __assign);
|
||||
exporter("__rest", __rest);
|
||||
exporter("__decorate", __decorate);
|
||||
exporter("__param", __param);
|
||||
exporter("__esDecorate", __esDecorate);
|
||||
exporter("__runInitializers", __runInitializers);
|
||||
exporter("__propKey", __propKey);
|
||||
exporter("__setFunctionName", __setFunctionName);
|
||||
exporter("__metadata", __metadata);
|
||||
exporter("__awaiter", __awaiter);
|
||||
exporter("__generator", __generator);
|
||||
|
|
@ -314,4 +416,6 @@ var __createBinding;
|
|||
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
||||
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
||||
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
||||
exporter("__addDisposableResource", __addDisposableResource);
|
||||
exporter("__disposeResources", __disposeResources);
|
||||
});
|
||||
|
|
|
|||
8
node_modules/@pkgr/utils/package.json
generated
vendored
8
node_modules/@pkgr/utils/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@pkgr/utils",
|
||||
"version": "2.3.1",
|
||||
"version": "2.4.2",
|
||||
"type": "module",
|
||||
"description": "Shared utils for `@pkgr` packages or any package else",
|
||||
"repository": "git+https://github.com/un-ts/pkgr.git",
|
||||
|
|
@ -25,11 +25,11 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.3",
|
||||
"fast-glob": "^3.3.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"open": "^8.4.0",
|
||||
"open": "^9.1.0",
|
||||
"picocolors": "^1.0.0",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"tslib": "^2.4.0"
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue