diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34d6f4e..37dcd4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,25 +4,23 @@ on: push: pull_request: - jobs: build: - runs-on: macos-latest strategy: matrix: - node-version: [ '16', '18', '20' ] + node-version: ["18", "20"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm test - - run: npm run semi - - run: npm run dist + - run: npm install + - run: npm run indent-check + - run: npm test + - run: npm run dist diff --git a/README.linux.md b/README.linux.md index 1e816dd..ec35ae3 100644 --- a/README.linux.md +++ b/README.linux.md @@ -11,7 +11,7 @@ $ cargo install apple-codesign You can read more about rcodesign and certificates in: -* https://pyoxidizer.readthedocs.io/en/latest/apple_codesign_certificate_management.html#apple-codesign-certificate-management +- https://pyoxidizer.readthedocs.io/en/latest/apple_codesign_certificate_management.html#apple-codesign-certificate-management ```sh $ rcodesign generate-self-signed-certificate --person-name pancake > a.pem @@ -26,7 +26,7 @@ $ rcodesign sign --pem-source a.pem --code-signature-flags runtime /path/to/bina ## Codesign Requirements -Apple requires a csreq to be signed inside the binary. this is an evaluated expression that defines -the conditions that must +Apple requires a csreq to be signed inside the binary. this is an evaluated +expression that defines the conditions that must -* https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html +- https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html diff --git a/README.md b/README.md index da245ab..6199fd7 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,21 @@ -node-applesign -=============== +# node-applesign -NodeJS module and commandline utility for re-signing iOS applications (IPA files). +NodeJS module and commandline utility for re-signing iOS applications (IPA +files). -Author ------- +## Author Sergi Alvarez Capilla aka pancake @ nowsecure.com -Program Dependencies --------------------- +## Program Dependencies -* zip - re-create IPA -* unzip - decompress IPA (see `npm run unzip-lzfse`) -* codesign - sign and verify binary with new entitlements and identity -* security - get entitlements from mobileprovision -* insert_dylib - only if you want to use the -I,--insert flag +- zip - re-create IPA +- unzip - decompress IPA (see `npm run unzip-lzfse`) +- codesign - sign and verify binary with new entitlements and identity +- security - get entitlements from mobileprovision +- insert_dylib - only if you want to use the -I,--insert flag -Usage ------ +## Usage When running without arguments we get a short help message @@ -116,31 +113,31 @@ Installing in the device: $ ideviceinstaller -i target-resigned.ipa $ ios-deploy -b target-resigned.ipa - ``` List local codesign identities: - $ bin/applesign -L + $ bin/applesign -L Resign an IPA with a specific identity: - $ bin/applesign -i 1C4D1A442A623A91E6656F74D170A711CB1D257A foo.ipa + $ bin/applesign -i 1C4D1A442A623A91E6656F74D170A711CB1D257A foo.ipa Change bundleid: - $ bin/applesign -b org.nowsecure.testapp path/to/ipa + $ bin/applesign -b org.nowsecure.testapp path/to/ipa -Signing methods ---------------- +## Signing methods -There are different ways to sign an IPA file with applesign for experimental reasons. +There are different ways to sign an IPA file with applesign for experimental +reasons. You may want to check the following options: **-c, --clone-entitlements** -put the entitlements embedded inside the signed mobileprovisioning file provided by the user as the default ones to sign all the binaries +put the entitlements embedded inside the signed mobileprovisioning file provided +by the user as the default ones to sign all the binaries **-S, --self-sign-provision** @@ -152,72 +149,81 @@ use the default entitlements plist. useful when troubleshooting The default signing method does as follow: -* Grab entitlements from binary -* Remove problematic entitlements -* Grab entitlements from the provisioning -* Adjust application-id and team-id of the binary with the provisioning ones -* Copy the original mobileprovisioning inside the IPA -* Creates ${AppName}.entitlements and signs all the mach0s +- Grab entitlements from binary +- Remove problematic entitlements +- Grab entitlements from the provisioning +- Adjust application-id and team-id of the binary with the provisioning ones +- Copy the original mobileprovisioning inside the IPA +- Creates ${AppName}.entitlements and signs all the mach0s After some testing we will probably go for having -c or -E as default. -In addition, for performance reasons, applesign supports -p for parallel signing. The order of signing the binaries inside an IPA matters, so applesign creates a dependency list of all the bins and signs them in order. The parallel signing aims to run in parallel as much tasks as possible without breaking the dependency list. +In addition, for performance reasons, applesign supports -p for parallel +signing. The order of signing the binaries inside an IPA matters, so applesign +creates a dependency list of all the bins and signs them in order. The parallel +signing aims to run in parallel as much tasks as possible without breaking the +dependency list. -Mangling --------- +## Mangling -It is possible with `--force-family` to remove the UISupportedDevices from the Info.plist and replace the entitlement information found in the mobileprovisioning and then carefully massage the rest of entitlements to drop the privileged ones (`--massage-entitlements`). +It is possible with `--force-family` to remove the UISupportedDevices from the +Info.plist and replace the entitlement information found in the +mobileprovisioning and then carefully massage the rest of entitlements to drop +the privileged ones (`--massage-entitlements`). Other interesting manipulations that can be done in the IPA are: **-I, --insert [frida.dylib]** -Allows to insert a dynamic library in the main executable. This is how Frida can be injected to introspect iOS applications without jailbreak. +Allows to insert a dynamic library in the main executable. This is how Frida can +be injected to introspect iOS applications without jailbreak. **-l, --lipo [arm64|armv7]** -Thinifies an IPA by removing all fatmach0s to only contain binaries for one specified architecture. Also this is helpful to identify non-arm binaries embedded inside IPA that can be leaked from development or pre-production environments. +Thinifies an IPA by removing all fatmach0s to only contain binaries for one +specified architecture. Also this is helpful to identify non-arm binaries +embedded inside IPA that can be leaked from development or pre-production +environments. -In order to thinify the final IPA even more, applesign allows to drop the watchapp extensions which would not be necessary for non Apple Watch users. +In order to thinify the final IPA even more, applesign allows to drop the +watchapp extensions which would not be necessary for non Apple Watch users. -Performance ------------ +## Performance -Sometimes the time required to run the codesigning step matters, so applesign allows to skip some steps and speedup the process. +Sometimes the time required to run the codesigning step matters, so applesign +allows to skip some steps and speedup the process. See `--dont-verify` and `--parallel` commandline flags. Enabling those options can result on a 35% speedup on ~60MB IPAs. -API usage ---------- +## API usage Here's a simple program that resigns an IPA: ```js -const Applesign = require('applesign'); +const Applesign = require("applesign"); const as = new Applesign({ - identity: '81A24300FE2A8EAA99A9601FDA3EA811CD80526A', - mobileprovision: '/path/to/dev.mobileprovision', - withoutWatchapp: true -}); -as.events.on('warning', (msg) => { - console.log('WARNING', msg); -}) -.on('message', (msg) => { - console.log('msg', msg); + identity: "81A24300FE2A8EAA99A9601FDA3EA811CD80526A", + mobileprovision: "/path/to/dev.mobileprovision", + withoutWatchapp: true, }); - -as.signIPA('/path/to/app.ipa') -.then(_ => { - console.log('ios-deploy -b', as.config.outfile); +as.events.on("warning", (msg) => { + console.log("WARNING", msg); }) -.catch(e => { - console.error(e); - process.exitCode = 1; -}); + .on("message", (msg) => { + console.log("msg", msg); + }); +as.signIPA("/path/to/app.ipa") + .then((_) => { + console.log("ios-deploy -b", as.config.outfile); + }) + .catch((e) => { + console.error(e); + process.exitCode = 1; + }); ``` To list the developer identities available in the system: @@ -233,31 +239,30 @@ try { } ``` -Bear in mind that the Applesign object can tuned to use different -configuration options: +Bear in mind that the Applesign object can tuned to use different configuration +options: ```js const options = { - file: '/path/to/app.ipa', - outfile: '/path/to/app-resigned.ipa', - entitlement: '/path/to/entitlement', - bundleid: 'app.company.bundleid', - identity: 'hash id of the developer', - mobileprovision: '/path/to/mobileprovision file', + file: "/path/to/app.ipa", + outfile: "/path/to/app-resigned.ipa", + entitlement: "/path/to/entitlement", + bundleid: "app.company.bundleid", + identity: "hash id of the developer", + mobileprovision: "/path/to/mobileprovision file", ignoreVerificationErrors: true, - withoutWatchapp: true + withoutWatchapp: true, }; ``` -Further reading ---------------- +## Further reading See the Wiki: https://github.com/nowsecure/node-applesign/wiki -* https://github.com/maciekish/iReSign -* https://github.com/saucelabs/isign -* https://github.com/phonegap/ios-deploy +- https://github.com/maciekish/iReSign +- https://github.com/saucelabs/isign +- https://github.com/phonegap/ios-deploy Pre iOS9 devices will require a developer account: -* http://dev.mlsdigital.net/posts/how-to-resign-an-ios-app-from-external-developers/ +- http://dev.mlsdigital.net/posts/how-to-resign-an-ios-app-from-external-developers/ diff --git a/bin/applesign.js b/bin/applesign.js deleted file mode 100755 index 07c0a1d..0000000 --- a/bin/applesign.js +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -const fs = require('fs'); -const packageJson = require('../package.json'); -const tools = require('../lib/tools'); -const config = require('../lib/config'); -const colors = require('colors'); -const Applesign = require('../'); - -colors.setTheme({ - error: 'red', - msg: 'yellow', - warning: 'green' -}); - -async function main (argv) { - const conf = config.parse(argv); - const options = config.compile(conf); - const as = new Applesign(options); - // initialize - if (conf.identities || conf.L) { - const ids = await as.getIdentities(); - ids.forEach((id) => { - console.log(id.hash, id.name); - }); - } else if (conf.version) { - console.log(packageJson.version); - } else if (conf.h || conf.help) { - console.error(config.helpMessage); - } else if (conf._.length === 0) { - console.error(config.shortHelpMessage); - } else { - const target = getTargetMethod(options.file, (conf.s || conf.single)); - if (target === undefined) { - throw new Error('Cannot open file'); - } - as.events.on('message', (msg) => { - console.log(colors.msg(msg)); - }).on('warning', (msg) => { - console.error(colors.warning('warning'), msg); - }).on('error', (msg) => { - console.error(colors.msg(msg)); - }); - if (options.file === undefined) { - throw new Error('No file provided'); - } - try { - await as[target](options.file); - const outfile = (as.config.outfile || options.file); - const message = 'Target is now signed: ' + outfile; - console.log(message); - } catch (e) { - process.exitCode = 1; - console.error(e); - } finally { - if (!options.noclean) { - await as.cleanupTmp(); - await as.cleanup(); - } - } - if (as.config.debug !== '') { - const data = JSON.stringify(as.debugObject); - fs.writeFileSync(as.config.debug, data); - console.error('Debug: json file saved: ' + as.config.debug); - } - } -} - -main(process.argv).then(_ => {}).catch(console.error); - -function getTargetMethod (file, single) { - try { - if (tools.isDirectory(file)) { - return 'signAppDirectory'; - } - return (single) ? 'signFile' : 'signIPA'; - } catch (e) { - return undefined; - } -} diff --git a/bin/applesign.ts b/bin/applesign.ts new file mode 100755 index 0000000..c81f96a --- /dev/null +++ b/bin/applesign.ts @@ -0,0 +1,103 @@ +#!/usr/bin/env node +import fs from "node:fs"; +import pkgVersion from "../lib/version.js"; +import { join } from "node:path"; +import * as tools from "../lib/tools.js"; +import * as config from "../lib/config.js"; +import colors from "colors"; +import Applesign from "../index.js"; + +colors.setTheme({ + error: "red", + msg: "yellow", + warning: "green", +}); + +// Removed unused SpawnOptions import (no longer required) +/** + * Main entry point for applesign CLI. + * @param argv Command-line arguments (process.argv) + */ +async function main(argv: string[]): Promise { + const conf = config.parse(argv); + const options = config.compile(conf); + const as = new Applesign(options); + // initialize + if (conf.identities || conf.L) { + const ids = await as.getIdentities(); + ids.forEach((id: any) => { + console.log(id.hash, id.name); + }); + } else if (conf.version) { + console.log(pkgVersion); + } else if (conf.h || conf.help) { + console.error(config.helpMessage); + } else if (conf._.length === 0) { + console.error(config.shortHelpMessage); + } else { + const singleMode = Boolean(conf.s || conf.single); + const target = getTargetMethod(options.file, singleMode); + if (!target) { + throw new Error("Cannot open file"); + } + // Subscribe to signing events + as.events + .on("message", (msg: string) => console.log(colors.msg(msg))) + .on( + "warning", + (msg: string) => console.error(colors.warning("warning"), msg), + ) + .on("error", (msg: string) => console.error(colors.msg(msg))); + if (!options.file) { + throw new Error("No file provided"); + } + try { + await as[target](options.file); + const outfile = as.config.outfile || options.file; + console.log(`Target is now signed: ${outfile}`); + } catch (err) { + process.exitCode = 1; + console.error(err); + } finally { + if (!options.noclean) { + await as.cleanupTmp(); + await as.cleanup(); + } + } + if (as.config.debug) { + const data = JSON.stringify(as.debugObject); + fs.writeFileSync(as.config.debug, data); + console.error(`Debug: json file saved: ${as.config.debug}`); + } + } +} + +// Invoke main with proper typing +main(process.argv) + .catch((err: Error) => { + console.error(err); + process.exitCode = 1; + }); + +/** + * Determine which signing method to use based on file type and mode. + * @param file Path to target file or directory + * @param single Whether to sign a single file instead of an IPA + * @returns Signing method name or undefined if unsupported + */ +type TargetMethod = "signAppDirectory" | "signFile" | "signIPA"; +function getTargetMethod( + file: string | undefined, + single: boolean, +): TargetMethod | undefined { + if (!file) return undefined; + try { + return tools.isDirectory(file) + ? "signAppDirectory" + : single + ? "signFile" + : "signIPA"; + } catch { + return undefined; + } +} diff --git a/example.js b/example.js deleted file mode 100644 index 1b20e2b..0000000 --- a/example.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -const Applesign = require('.'); - -const as = new Applesign({ - /* bin/applesign -L to list all available identities in your system */ - identity: '67CF8DCD3BA1E7241FFCFCE66FA6C0F58D17F795', - /* clone the entitlements from the mobile provisioning */ - cloneEntitlements: false, - mobileProvisioning: '/tmp/embedded.mobileprovision' -}); - -if (process.argv.length < 3) { - console.error('Usage: example.js [path/to/ipa]'); - process.exit(1); -} - -as.events.on('message', (msg) => { - console.log('message', msg); -}).on('warning', (msg) => { - console.error('warning', msg); -}); -as.signIPA(process.argv[2]).then(_ => { - console.log('ios-deploy -b', as.config.outfile); -}); diff --git a/example.ts b/example.ts new file mode 100644 index 0000000..ec6b998 --- /dev/null +++ b/example.ts @@ -0,0 +1,23 @@ +import Applesign from "./index.js"; + +const as = new Applesign({ + /* bin/applesign -L to list all available identities in your system */ + identity: "67CF8DCD3BA1E7241FFCFCE66FA6C0F58D17F795", + /* clone the entitlements from the mobile provisioning */ + cloneEntitlements: false, + mobileProvisioning: "/tmp/embedded.mobileprovision", +}); + +if (process.argv.length < 3) { + console.error("Usage: example.js [path/to/ipa]"); + process.exit(1); +} + +as.events.on("message", (msg: any) => { + console.log("message", msg); +}).on("warning", (msg: any) => { + console.error("warning", msg); +}); +as.signIPA!(process.argv[2]!).then((_) => { + console.log("ios-deploy -b", as.config.outfile); +}); diff --git a/index.js b/index.js deleted file mode 100644 index 2e416e9..0000000 --- a/index.js +++ /dev/null @@ -1,964 +0,0 @@ -'use strict'; - -const tools = require('./lib/tools'); -const config = require('./lib/config'); -const idprov = require('./lib/idprov'); -const EventEmitter = require('events').EventEmitter; -const path = require('path'); -const { execSync } = require('child_process'); -const uuid = require('uuid'); -const fs = require('fs-extra'); -const walk = require('fs-walk'); -const plist = require('simple-plist'); -const fchk = require('./lib/fchk'); -const { tmpdir, homedir } = require('os'); - -const { AppDirectory } = require('./lib/appdir'); - -const depSolver = require('./lib/depsolver'); - -const adjustInfoPlist = require('./lib/info-plist'); -const defaultEntitlements = require('./lib/entitlements'); - -const plistBuild = require('plist').build; -const bin = require('./lib/bin'); - -class Applesign { - constructor (options) { - this.config = config.fromOptions(options || {}); - this.events = new EventEmitter(); - this.nested = []; - this.debugObject = {}; - this.tmpDir = this._makeTmpDir(); - } - - _makeTmpDir () { - const tmp = tmpdir(); - const base = path.join(tmp, 'applesign'); - const result = path.join(base, uuid.v4()); - fs.mkdirSync(result, { recursive: true }); - return result; - } - - _fullPathInTmp (filePath) { - const dirname = path.dirname(filePath); - const dirnameInTmp = path.join(this.tmpDir, dirname); - fs.mkdirpSync(dirnameInTmp); - return path.join(this.tmpDir, filePath); - } - - async getDeviceProvision () { - const installedProvisions = await tools.ideviceprovision('list'); - const pd = path.join(homedir(), 'Library', 'MobileDevice', 'Provisioning Profiles'); - for (const ip of installedProvisions) { - const absPath = path.join(pd, ip + '.mobileprovision'); - if (fs.existsSync(absPath)) { - return absPath; - } - } - throw new Error('Cannot find provisioning file automatically. Please use -m'); - } - - async signXCarchive (file) { - fchk(arguments, ['string']); - const ipaFile = file + '.ipa'; - await tools.xcaToIpa(file, ipaFile); - await this.signIPA(ipaFile); - } - - async getIdentities () { - fchk(arguments, []); - return tools.getIdentities(); - } - - async signIPA (file) { - fchk(arguments, ['string']); - if (typeof file === 'string') { - this.setFile(file); - } - tools.setOptions({ - use7zip: this.config.use7zip, - useOpenSSL: this.config.useOpenSSL - }); - await this._pullMobileProvision(); - this.emit('message', 'File: ' + this.config.file); - this.emit('message', 'Outdir: ' + this.config.outdir); - if (tools.isDirectory(this.config.file)) { - throw new Error('This is a directory'); - } - try { - await this.unzipIPA(this.config.file, this.config.outdir); - const appDirectory = path.join(this.config.outdir, '/Payload'); - this.config.appdir = getAppDirectory(appDirectory); - if (this.config.debug) { - this.debugObject = {}; - } - const tasks = []; - if (this.config.withoutWatchapp) { - tasks.push(this.removeWatchApp()); - } - // TODO: this .withoutSigningFiles option doesnt exist yet - if (this.config.withoutSigningFiles) { - tasks.push(this.removeSigningFiles()); - } - if (this.config.withoutPlugins) { - tasks.push(this.removePlugins()); - } - if (this.config.withoutXCTests) { - tasks.push(this.removeXCTests()); - } - if (tasks.length > 0) { - await Promise.all(tasks); - } - await this.signAppDirectory(appDirectory); - await this.zipIPA(); - } finally { - await this.cleanup(); - } - return this; - } - - async _pullMobileProvision () { - if (this.config.deviceProvision === true) { - this.config.mobileprovision = await this.getDeviceProvision(); - this.config.mobileprovisions = [this.config.mobileprovision]; - this.config.identity = idprov(this.config.mobileprovision); - } - this.config.mobileprovision = this.config.mobileprovisions[0]; - if (this.config.mobileprovisions.length > 1) { - this.config.mobileprovisions.slice(1); - } - } - - async signAppDirectoryInternal (ipadir, skipNested) { - fchk(arguments, ['string', 'boolean']); - await this._pullMobileProvision(); - if (this.config.run) { - runScriptSync(this.config.run, this); - } - if (this.config.appdir === undefined) { - this.config.appdir = ipadir; - } - const binname = getExecutable(this.config.appdir); - this.emit('msg', 'Main Executable Name: ' + binname); - this.config.appbin = path.join(this.config.appdir, binname); - if (!fs.lstatSync(this.config.appbin).isFile()) { - throw new Error('This was supposed to be a file'); - } - if (bin.isBitcode(this.config.appbin)) { - throw new Error('This IPA contains only bitcode. Must be transpiled for the target device to run.'); - } - if (bin.isEncrypted(this.config.appbin)) { - if (!this.config.unfairPlay) { - throw new Error('This IPA is encrypted'); - } - this.emit('warning', 'Main IPA executable is encrypted'); - } else { - this.emit('message', 'Main IPA executable is not encrypted'); - } - if (this.config.insertLibrary !== undefined) { - await insertLibrary(this.config); - } - const infoPlistPath = path.join(this.config.appdir, 'Info.plist'); - adjustInfoPlist(infoPlistPath, this.config, this.emit.bind(this)); - if (!this.config.pseudoSign) { - if (!this.config.mobileprovision) { - throw new Error('warning: No mobile provisioning file provided'); - } - await this.checkProvision(this.config.appdir, this.config.mobileprovision); - } - await this.adjustEntitlements(this.config.appbin); - await this.signLibraries(this.config.appbin, this.config.appdir); - - if (skipNested !== true) { - for (const nest of this.nested) { - if (tools.isDirectory(nest)) { - await this.signAppDirectoryInternal(nest, true); - } else { - this.emit('warning', 'Cannot find ' + nest); - } - } - } - } - - async signAppDirectory (ipadir) { - fchk(arguments, ['string']); - return this.signAppDirectoryInternal(ipadir, false); - } - - async removeWatchApp () { - fchk(arguments, []); - const watchdir = path.join(this.config.appdir, 'Watch'); - this.emit('message', 'Stripping out the WatchApp at ' + watchdir); - await tools.asyncRimraf(watchdir); - - const placeholderdir = path.join(this.config.appdir, 'com.apple.WatchPlaceholder'); - this.emit('message', 'Stripping out the WatchApp at ' + placeholderdir); - await tools.asyncRimraf(placeholderdir); - } - - // XXX some directory leftovers - async removeXCTests () { - fchk(arguments, []); - const dir = this.config.appdir; - walk.walkSync(dir, (basedir, filename, stat) => { - const target = path.join(basedir, filename); - // if (target.toLowerCase().indexOf('/xct') !== -1) - if (target.toLowerCase().indexOf('xctest') !== -1) { - this.emit('message', 'Deleting ' + target); - fs.unlinkSync(target); - } - }); - } - - async removeSigningFiles () { - fchk(arguments, []); - const dir = this.config.appdir; - walk.walkSync(dir, (basedir, filename, stat) => { - if (filename.endsWith('.entitlements') || filename.endsWith('.mobileprovision')) { - const target = path.join(basedir, filename); - this.emit('message', 'Deleting ' + target); - fs.unlinkSync(target); - } - }); - } - - async removePlugins () { - fchk(arguments, []); - const plugdir = path.join(this.config.appdir, 'PlugIns'); - const tmpdir = path.join(this.config.appdir, 'applesign_xctest_tmp'); - this.emit('message', 'Stripping out the PlugIns at ' + plugdir); - let tests = []; - if (!this.config.withoutXCTests) { - tests = await enumerateTestFiles(plugdir); - if (tests.length > 0) { - await moveFiles(tests, plugdir, tmpdir); - } - } - - await tools.asyncRimraf(plugdir); - if (tests.length > 0) { - await moveFiles(tests, tmpdir, plugdir); - await fs.rmdir(tmpdir); - } - } - - findProvisioningsSync () { - fchk(arguments, []); - const files = []; - walk.walkSync(this.config.appdir, (basedir, filename, stat) => { - const file = path.join(basedir, filename); - // only walk on files. Symlinks and other special files are forbidden - if (!fs.lstatSync(file).isFile()) { - return; - } - if (filename === 'embedded.mobileprovision') { - files.push(file); - } - }); - return files; - } - - /* - TODO: verify is mobileprovision app-id glob string matches the bundleid - read provision file in raw - search for application-identifier and ... - check if prefix matches and last dot separated word is an asterisk - const identifierInProvisioning = 'x' - Read the one in Info.plist and compare with bundleid - */ - async checkProvision (appdir, file) { - fchk(arguments, ['string', 'string']); - /* Deletes the embedded.mobileprovision from the ipa? */ - const withoutMobileProvision = false; - if (withoutMobileProvision) { - const files = this.findProvisioningsSync(); - files.forEach((file) => { - console.error('Deleting ', file); - fs.unlinkSync(file); - }); - } - if (appdir && file && !withoutMobileProvision) { - this.emit('message', 'Embedding new mobileprovision'); - const mobileProvision = path.join(appdir, 'embedded.mobileprovision'); - if (this.config.selfSignedProvision) { - /* update entitlements */ - const data = await tools.getMobileProvisionPlist(this.config.mobileprovision); - const mainBin = path.join(appdir, getExecutable(appdir)); - let ent = bin.entitlements(mainBin); - if (ent === null) { - this.emit('warning', 'Cannot find entitlements in binary. Using defaults'); - const entMobProv = data.Entitlements; - const teamId = entMobProv['com.apple.developer.team-identifier']; - const appId = entMobProv['application-identifier']; - ent = defaultEntitlements(appId, teamId); - } - data.Entitlements = plist.parse(ent.toString().trim()); - fs.writeFileSync(mobileProvision, plistBuild(data).toString()); - /* TODO: self-sign mobile provisioning */ - } - return fs.copySync(file, mobileProvision); - } - } - - debugInfo (path, key, val) { - if (!val) { - return; - } - const f = path.replace(this.config.outdir + '/', ''); - if (!this.debugObject) { - this.debugObject = {}; - } - if (this.debugObject[f] === undefined) { - this.debugObject[f] = {}; - } - this.debugObject[f][key] = val; - } - - addEntitlementsSync (orig) { - if (this.config.addEntitlements === undefined) { - return orig; - } - this.emit('message', 'Adding entitlements from file'); - const addEnt = plist.readFileSync(this.config.addEntitlements); - // TODO: deepmerge - return Object.assign(orig, addEnt); - } - - adjustEntitlementsSync (file, entMobProv) { - if (this.config.pseudoSign) { - const ent = bin.entitlements(file); - if (ent === null) { - return; - } - let entMacho = plist.parse(ent.toString().trim()); - entMacho = this.addEntitlementsSync(entMacho); - // TODO: merge additional entitlements here - const newEntitlements = plistBuild(entMacho).toString(); - const newEntitlementsFile = file + '.entitlements'; - const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); - fs.writeFileSync(tmpEntitlementsFile, newEntitlements); - this.config.entitlement = tmpEntitlementsFile; - return; - } - fchk(arguments, ['string', 'object']); - this.debugInfo(file, 'before', entMobProv); - const teamId = entMobProv['com.apple.developer.team-identifier']; - const appId = entMobProv['application-identifier']; - let ent = bin.entitlements(file); - if (ent === null && !this.config.cloneEntitlements) { - console.error('Cannot find entitlements in binary. Using defaults'); - ent = defaultEntitlements(appId, teamId); - } - let entMacho; - if (ent !== null) { - entMacho = plist.parse(ent.toString().trim()); - entMacho = this.addEntitlementsSync(entMacho); - this.debugInfo(file, 'fullPath', file); - this.debugInfo(file, 'oldEntitlements', entMacho || 'TODO'); - if (this.config.selfSignedProvision) { - this.emit('message', 'Using an unsigned provisioning'); - const newEntitlementsFile = file + '.entitlements'; - const newEntitlements = plistBuild(entMacho).toString(); - const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); - fs.writeFileSync(tmpEntitlementsFile, newEntitlements); - this.config.entitlement = tmpEntitlementsFile; - if (!this.config.noEntitlementsFile) { - fs.writeFileSync(newEntitlementsFile, tmpEntitlementsFile); - } - this.debugInfo(file, 'newEntitlements', plist.parse(newEntitlements)); - return; - } - } - let changed = false; - if (this.config.cloneEntitlements) { - this.emit('message', 'Cloning entitlements'); - entMacho = entMobProv; - changed = true; - } else { - const k = 'com.apple.developer.icloud-container-identifiers'; - if (entMacho[k]) { - entMacho[k] = 'iCloud.' + appId; - } - ['application-identifier', 'com.apple.developer.team-identifier'].forEach((id) => { - if (entMacho[id] !== entMobProv[id]) { - changed = true; - entMacho[id] = entMobProv[id]; - } - }); - if (this.config.massageEntitlements === true) { - if (typeof entMacho['keychain-access-groups'] === 'object') { - changed = true; - // keychain access groups makes the resigning fail with -M - delete entMacho['keychain-access-groups']; - // entMacho['keychain-access-groups'][0] = appId; - } - [ - 'com.apple.developer.ubiquity-kvstore-identifier', - 'com.apple.developer.ubiquity-container-identifiers', - 'com.apple.developer.icloud-container-identifiers', - 'com.apple.developer.icloud-container-environment', - 'com.apple.developer.icloud-services', - 'com.apple.developer.payment-pass-provisioning', - 'com.apple.developer.default-data-protection', - 'com.apple.networking.vpn.configuration', - 'com.apple.developer.associated-domains', - 'com.apple.security.application-groups', - 'com.apple.developer.in-app-payments', - 'com.apple.developer.siri', - 'beta-reports-active', /* our entitlements doesnt support beta */ - 'aps-environment' - ].forEach((id) => { - if (typeof entMacho[id] !== 'undefined') { - delete entMacho[id]; - changed = true; - } - }); - } else if (!this.config.cloneEntitlements) { - delete entMacho['com.apple.developer.icloud-container-identifiers']; - delete entMacho['com.apple.developer.icloud-container-environment']; - delete entMacho['com.apple.developer.ubiquity-kvstore-identifier']; - delete entMacho['com.apple.developer.icloud-services']; - delete entMacho['com.apple.developer.siri']; - delete entMacho['com.apple.developer.in-app-payments']; - delete entMacho['aps-environment']; - delete entMacho['com.apple.security.application-groups']; - delete entMacho['com.apple.developer.associated-domains']; - delete entMacho['keychain-access-groups']; - changed = true; - } - } - - if (typeof this.config.withGetTaskAllow !== 'undefined') { - this.emit('message', 'get-task-allow set to ' + this.config.withGetTaskAllow); - entMacho['get-task-allow'] = this.config.withGetTaskAllow; - changed = true; - } - - const additionalKeychainGroups = []; - if (typeof this.config.customKeychainGroup === 'string') { - additionalKeychainGroups.push(this.config.customKeychainGroup); - } - const infoPlist = path.join(this.config.appdir, 'Info.plist'); - const plistData = plist.readFileSync(infoPlist); - if (this.config.bundleIdKeychainGroup) { - if (typeof this.config.bundleid === 'string') { - additionalKeychainGroups.push(this.config.bundleid); - } else { - const bundleid = plistData.CFBundleIdentifier; - additionalKeychainGroups.push(bundleid); - } - } - if (this.config.osversion !== undefined) { - // DTPlatformVersion - plistData.MinimumOSVersion = this.config.osversion; - plist.writeFileSync(infoPlist, plistData); - } - if (additionalKeychainGroups.length > 0) { - const newGroups = additionalKeychainGroups.map(group => `${teamId}.${group}`); - const groups = entMacho['keychain-access-groups']; - if (typeof groups === 'undefined') { - entMacho['keychain-access-groups'] = newGroups; - } else { - groups.push(...newGroups); - } - changed = true; - } - if (changed || this.config.entry) { - const newEntitlementsFile = file + '.entitlements'; - let newEntitlements = (appId && teamId && this.config.entry) - ? defaultEntitlements(appId, teamId) - : (this.config.entitlement) - ? fs.readFileSync(this.config.entitlement).toString() - : plistBuild(entMacho).toString(); - const ent = plist.parse(newEntitlements.trim()); - const shouldRenameGroups = !this.config.mobileprovision && !this.config.cloneEntitlements; - if (shouldRenameGroups && ent['com.apple.security.application-groups']) { - const ids = appId.split('.'); - ids.shift(); - const id = ids.join('.'); - const groups = []; - for (const group of ent['com.apple.security.application-groups']) { - const cols = group.split('.'); - if (cols.length === 4) { - groups.push('group.' + id); - } else { - groups.push('group.' + id + '.' + cols.pop()); - } - } - ent['com.apple.security.application-groups'] = groups; - } - delete ent['beta-reports-active']; /* our entitlements doesnt support beta */ - if (this.config.massageEntitlements === true) { - delete ent['com.apple.developer.ubiquity-container-identifiers']; // TODO should be massaged - } - newEntitlements = plistBuild(ent).toString(); - - this.debugInfo(file, 'newEntitlements', ent); - - const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); - fs.writeFileSync(tmpEntitlementsFile, newEntitlements); - this.config.entitlement = tmpEntitlementsFile; - if (!this.config.noEntitlementsFile) { - fs.writeFileSync(tmpEntitlementsFile, newEntitlements); - this.emit('message', 'Updated binary entitlements' + tmpEntitlementsFile); - } - this.debugInfo(file, 'after', newEntitlements); - } else { - this.debugInfo(file, 'nothing-changed', true); - } - } - - async adjustEntitlements (file) { - fchk(arguments, ['string']); - let newEntitlements = null; - if (!this.config.pseudoSign) { - const mp = this.config.mobileprovision ? this.config.mobileprovision : path.join(this.config.appdir, 'embedded.mobileprovision'); - newEntitlements = await tools.getEntitlementsFromMobileProvision(mp); - this.emit('message', JSON.stringify(newEntitlements)); - } - this.adjustEntitlementsSync(file, newEntitlements); - } - - async signFile (file) { - const config = this.config; - function customOptions (config, file) { - if (typeof config.json === 'object' && typeof config.json.custom === 'object') { - for (const c of config.json.custom) { - if (!c.filematch) { - continue; - } - const re = new RegExp(c.filematch); - if (re.test(file)) { - // console.error('Debug: '+ JSON.stringify(c, null, 2)) - return c; - } - } - } - return false; - } - const custom = customOptions(config, file); - function getKeychain () { return (custom !== false && custom.keychain !== undefined) ? custom.keychain : config.keychain; } - function getIdentity () { return (custom !== false && custom.identity !== undefined) ? custom.identity : config.identity; } - function getEntitlements () { return (custom !== false && custom.entitlements !== undefined) ? custom.entitlements : config.entitlement; } - - fchk(arguments, ['string']); - if (this.config.lipoArch !== undefined) { - this.emit('message', '[lipo] ' + this.config.lipoArch + ' ' + file); - try { - await tools.lipoFile(file, this.config.lipoArch); - } catch (ignored) { - } - } - function codesignHasFailed (config, error, errmsg) { - if (error && errmsg.indexOf('Error:') !== -1) { - throw error; - } - return ((errmsg && errmsg.indexOf('no identity found') !== -1) || !config.ignoreCodesignErrors); - } - const identity = getIdentity(); - let entitlements = ''; - if (this.config.cloneEntitlements) { - const mp = await tools.getMobileProvisionPlist(this.config.mobileprovision); - const newEntitlementsFile = file + '.entitlements'; - const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); - const entstr = plistBuild(mp.Entitlements, { pretty: true, allowEmpty: false }).toString(); - fs.writeFileSync(tmpEntitlementsFile, entstr); - entitlements = tmpEntitlementsFile; - } else { - entitlements = getEntitlements(); - } - let res; - if (this.config.pseudoSign) { - const newEntitlementsFile = file + '.entitlements'; - const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); - const entitlements = fs.existsSync(tmpEntitlementsFile) ? tmpEntitlementsFile : null; - res = await tools.pseudoSign(entitlements, file); - } else { - const keychain = getKeychain(); - res = await tools.codesign(identity, entitlements, keychain, file); - if (res.code !== 0 && codesignHasFailed(config, res.code, res.stderr)) { - return this.emit('end', res.stderr); - } - } - this.emit('message', 'Signed ' + file); - if (config.verifyTwice) { - this.emit('message', 'Verify ' + file); - const res = await tools.verifyCodesign(file, config.keychain); - if (res.code !== 0) { - const type = (config.ignoreVerificationErrors) ? 'warning' : 'error'; - return this.emit(type, res.stderr); - } - } - return this; - } - - filterLibraries (libraries) { - fchk(arguments, ['object']); - return libraries.filter(library => { - // Resign all frameworks. even if not referenced :? - if (library.indexOf('Frameworks/') !== -1) { - return true; - } - if (this.config.all) { - return true; - } - // check if there's a Plist to inform us which is the right executable - const exe = getExecutable(path.dirname(library)); - if (path.basename(library) !== exe) { - this.emit('warning', 'Not signing ' + library); - return false; - } - return true; - }); - } - - findLibrariesSync () { - fchk(arguments, []); - const libraries = []; - const nested = []; - const exe = path.sep + getExecutable(this.config.appdir); - const folders = this.config.appbin.split(path.sep); - const exe2 = path.sep + folders[folders.length - 1]; - - let found = false; - walk.walkSync(this.config.appdir, (basedir, filename, stat) => { - const file = path.join(basedir, filename); - // only walk on files. Symlinks and other special files are forbidden - if (!fs.lstatSync(file).isFile()) { - return; - } - if (file.endsWith(exe) || file.endsWith(exe2)) { - this.emit('message', 'Executable found at ' + file); - libraries.push(file); - found = true; - return; - } - - const nest = nestedApp(file); - if (nest !== false) { - if (nested.indexOf(nest) === -1) { - nested.push(nest); - } - return; - } - if (bin.isMacho(file)) { - libraries.push(file); - } - }); - if (!found) { - throw new Error('Cannot find any MACH0 binary to sign'); - } - console.error('Found nested', nested); - this.nested = nested; - // return this.filterLibraries(libraries); - - return libraries; - } - - async signLibraries (bpath, appdir) { - fchk(arguments, ['string', 'string']); - this.emit('message', 'Signing libraries and frameworks'); - - const parallelVerify = async (libs) => { - if (!this.config.verify) { - return; - } - this.emit('message', 'Verifying ' + libs); - const promises = libs.map(lib => tools.verifyCodesign); - return Promise.all(promises); - }; - - const layeredSigning = async (libs) => { - const libsCopy = libs.slice(0).reverse(); - for (const deps of libsCopy) { - const promises = deps.map(dep => { return this.signFile(dep); }); - await Promise.all(promises); - } - await parallelVerify(libs); - }; - - const serialSigning = async (libs) => { - const libsCopy = libs.slice(0).reverse(); - for (const lib of libsCopy) { - await this.signFile(lib); - if (this.config.verify) { - this.emit('message', 'Verifying ' + lib); - await tools.verifyCodesign(lib); - } - } - }; - - this.emit('message', 'Resolving signing order using layered list'); - let libs = []; - const ls = new AppDirectory(); - await ls.loadFromDirectory(appdir); - if (this.config.parallel) { - // known to be buggy in some situations, must use AppDirectory - const libraries = this.findLibrariesSync(); - libs = await depSolver(bpath, libraries, true); - - for (const appex of ls.appexs) { - libs.push([appex]); - } - } else { - for (const appex of ls.appexs) { - await this.adjustEntitlements(appex); - await this.signFile(appex); - } - - this.emit('message', 'Nested: ' + JSON.stringify(ls.nestedApplications())); - this.emit('message', 'SystemLibraries: ' + JSON.stringify(ls.systemLibraries())); - this.emit('message', 'DiskLibraries: ' + JSON.stringify(ls.diskLibraries())); - this.emit('message', 'UnavailableLibraries: ' + JSON.stringify(ls.unavailableLibraries())); - this.emit('message', 'AppLibraries: ' + JSON.stringify(ls.appLibraries())); - this.emit('message', 'Orphan: ' + JSON.stringify(ls.orphanedLibraries())); - const libraries = ls.appLibraries(); - if (this.config.all) { - libraries.push(...ls.orphanedLibraries()); - } else { - for (const ol of ls.orphanedLibraries()) { - console.error('Warning: Orphaned library not signed, try -a: ' + ol); - } - } - this.debugInfo('analysis', 'orphan', ls.orphanedLibraries()); - // const libraries = ls.diskLibraries (); - libs = libraries.filter(library => !(ls.appexs.includes(library))); // remove already-signed appexs - } - if (libs.length === 0) { - libs.push(bpath); - } - return (typeof libs[0] === 'object') - ? layeredSigning(libs) - : serialSigning(libs); - } - - async cleanup () { - fchk(arguments, []); - if (this.config.noclean) { - return; - } - const outdir = this.config.outdir; - this.emit('message', 'Cleaning up ' + outdir); - // await tools.asyncRimraf(this.config.outfile); - return tools.asyncRimraf(outdir); - } - - async cleanupTmp () { - this.emit('message', 'Cleaning up temp dir ' + this.tmpDir); - await tools.asyncRimraf(this.tmpDir); - } - - async zipIPA () { - fchk(arguments, []); - const ipaIn = this.config.file; - const ipaOut = getOutputPath(this.config.outdir, this.config.outfile); - try { - fs.unlinkSync(ipaOut); // await for it - } catch (e) { - /* do nothing */ - } - this.events.emit('message', 'Zipifying into ' + ipaOut + ' ...'); - const rootFolder = this.config.payloadOnly ? 'Payload' : '.'; - await tools.zip(this.config.outdir, ipaOut, rootFolder); - if (this.config.replaceipa) { - this.events.emit('message', 'mv into ' + ipaIn); - fs.rename(ipaOut, ipaIn); - } - } - - setFile (name) { - fchk(arguments, ['string']); - this.config.file = path.resolve(name); - this.config.outdir = this.config.file + '.' + uuid.v4(); - if (!this.config.outfile) { - this.config.outfile = getResignedFilename(this.config.file); - } - } - - async unzipIPA (file, outdir) { - fchk(arguments, ['string', 'string']); - if (!file || !outdir) { - throw new Error('No output specified'); - } - if (!outdir) { - throw new Error('Invalid output directory'); - } - await this.cleanup(); - this.events.emit('message', 'Unzipping ' + file); - return tools.unzip(file, outdir); - } - - /* Event Wrapper API with cb support */ - emit (ev, msg) { - this.events.emit(ev, msg); - } - - on (ev, cb) { - this.events.on(ev, cb); - return this; - } -} - -// helper functions - -function getResignedFilename (input) { - if (!input) { - return null; - } - const pos = input.lastIndexOf(path.sep); - if (pos !== -1) { - const tmp = input.substring(pos + 1); - const dot = tmp.lastIndexOf('.'); - input = (dot !== -1) ? tmp.substring(0, dot) : tmp; - } else { - const dot = input.lastIndexOf('.'); - if (dot !== -1) { - input = input.substring(0, dot); - } - } - return input + '-resigned.ipa'; -} - -function getExecutable (appdir) { - if (!appdir) { - throw new Error('No application directory is provided'); - } - const plistPath = path.join(appdir, 'Info.plist'); - try { - const plistData = plist.readFileSync(plistPath); - const cfBundleExecutable = plistData.CFBundleExecutable; - if (cfBundleExecutable) { - return cfBundleExecutable; - } - } catch (e) { - // do nothing - } - const exename = path.basename(appdir); - const dotap = exename.indexOf('.app'); - return (dotap === -1) ? exename : exename.substring(0, dotap); -} - -async function insertLibrary (config) { - const appDir = config.appdir; - const targetLib = config.insertLibrary; - const libraryName = path.basename(targetLib); - try { - fs.mkdirSync(path.join(appDir, 'Frameworks')); - } catch (_) { - } - const outputLib = path.join(appDir, 'Frameworks', libraryName); - await insertLibraryLL(outputLib, targetLib, config); -} - -function insertLibraryLL (outputLib, targetLib, config) { - return new Promise((resolve, reject) => { - try { - const writeStream = fs.createWriteStream(outputLib); - writeStream.on('finish', () => { - fs.chmodSync(outputLib, 0x1ed); // 0755 - /* XXX: if binary doesnt contains an LC_RPATH load command this will not work */ - const insertedLibraryName = '@rpath/' + path.basename(targetLib); - /* Just copy the library via USB on the DCIM directory */ - // const insertedLibraryName = '/var/mobile/Media/DCIM/' + path.basename(targetLib); - /* useful on jailbroken devices where we can write in /usr/lib */ - // const insertedLibraryName = '/usr/lib/' + path.basename(targetLib); - /* forbidden in iOS */ - // const insertedLibraryName = '@executable_path/Frameworks/' + path.basename(targetLib); - tools.insertLibrary(insertedLibraryName, config.appbin, outputLib).then(resolve).catch(reject); - }); - fs.createReadStream(targetLib).pipe(writeStream); - } catch (e) { - reject(e); - } - }); -} - -function parentDirectory (root) { - return path.normalize(path.join(root, '..')); -} - -function getOutputPath (cwd, ofile) { - return ofile.startsWith(path.sep) ? ofile : path.join(parentDirectory(cwd), ofile); -} - -function runScriptSync (script, session) { - if (script.endsWith('.js')) { - try { - const s = require(script); - return s(session); - } catch (e) { - console.error(e); - return false; - } - } else { - process.env.APPLESIGN_DIRECTORY = session.config.appdir; - process.env.APPLESIGN_MAINBIN = session.config.appbin; - process.env.APPLESIGN_OUTFILE = session.config.outfile; - process.env.APPLESIGN_OUTDIR = session.config.outdir; - process.env.APPLESIGN_FILE = session.config.file; - try { - const res = execSync(script); - console.error(res.toString()); - } catch (e) { - console.error(e.toString()); - return false; - } - } - return true; -} - -function nestedApp (file) { - const dotApp = file.indexOf('.app/'); - if (dotApp !== -1) { - const subApp = file.substring(dotApp + 4).indexOf('.app/'); - if (subApp !== -1) { - return file.substring(0, dotApp + 4 + subApp + 4); - } - } - return false; -} - -function getAppDirectory (ipadir) { - if (!ipadir) { - ipadir = path.join(this.config.outdir, 'Payload'); - } - if (!tools.isDirectory(ipadir)) { - throw new Error('Not a directory ' + ipadir); - } - if (ipadir.endsWith('.app')) { - this.config.appdir = ipadir; - } else { - const files = fs.readdirSync(ipadir).filter((x) => { - return x.endsWith('.app'); - }); - if (files.length !== 1) { - throw new Error('Invalid IPA: ' + ipadir); - } - return path.join(ipadir, files[0]); - } - if (ipadir.endsWith('/')) { - ipadir = ipadir.substring(0, ipadir.length - 1); - } - return ipadir; -} - -async function enumerateTestFiles (dir) { - let tests = []; - if (fs.existsSync(dir)) { - tests = (await fs.readdir(dir)).filter((x) => { - return x.indexOf('.xctest') !== -1; - }); - } - return tests; -} - -async function moveFiles (files, sourceDir, destDir) { - await fs.mkdir(destDir, { recursive: true }); - for (const f of files) { - const oldName = path.join(sourceDir, f); - const newName = path.join(destDir, f); - await fs.rename(oldName, newName); - } -} -module.exports = Applesign; diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..d5b996c --- /dev/null +++ b/index.ts @@ -0,0 +1,1063 @@ +import * as tools from "./lib/tools.js"; +import * as config from "./lib/config.js"; +import idprov from "./lib/idprov.js"; +import { EventEmitter } from "node:events"; +import path from "node:path"; +import { execSync } from "node:child_process"; +import * as uuid from "uuid"; +import fs from "fs-extra"; +import walk from "fs-walk"; +import plist from "simple-plist"; +import fchk from "./lib/fchk.js"; +import { homedir, tmpdir } from "node:os"; +import { AppDirectory } from "./lib/appdir.js"; +import depSolver from "./lib/depsolver.js"; +import adjustInfoPlist from "./lib/info-plist.js"; +import defaultEntitlements from "./lib/entitlements.js"; +// import { build as plistBuild } from 'plist'; +import * as bin from "./lib/bin.js"; + +import pkg from "plist"; +const { build: plistBuild } = pkg; + +class Applesign { + config: config.ConfigOptions; + debugObject: Record; + events: EventEmitter; + nested: any[]; + tmpDir: string; + constructor(options: any) { + this.config = config.fromOptions(options || {}); + this.events = new EventEmitter(); + this.nested = []; + this.debugObject = {}; + this.tmpDir = this._makeTmpDir(); + } + + _makeTmpDir() { + const tmp = tmpdir(); + const base = path.join(tmp, "applesign"); + const result = path.join(base, uuid.v4()); + fs.mkdirSync(result, { recursive: true }); + return result; + } + + _fullPathInTmp(filePath: string) { + const dirname = path.dirname(filePath); + const dirnameInTmp = path.join(this.tmpDir, dirname); + fs.mkdirpSync(dirnameInTmp); + return path.join(this.tmpDir, filePath); + } + + async getDeviceProvision() { + const installedProvisions = await tools.ideviceprovision("list"); + const pd = path.join( + homedir(), + "Library", + "MobileDevice", + "Provisioning Profiles", + ); + for (const ip of installedProvisions) { + const absPath = path.join(pd, ip + ".mobileprovision"); + if (fs.existsSync(absPath)) { + return absPath; + } + } + throw new Error( + "Cannot find provisioning file automatically. Please use -m", + ); + } + + async signXCarchive(file: string) { + fchk(arguments, ["string"]); + const ipaFile = file + ".ipa"; + await tools.xcaToIpa(file, ipaFile); + await this.signIPA(ipaFile); + } + + async getIdentities() { + fchk(arguments, []); + return tools.getIdentities(); + } + + async signIPA(file: string) { + fchk(arguments, ["string"]); + if (typeof file === "string") { + this.setFile(file); + } + tools.setOptions({ + use7zip: this.config.use7zip, + useOpenSSL: this.config.useOpenSSL, + }); + // unsure, but this.config.file shouldnt be undefined + if (!this.config.file) { + this.config.file = file; + } + await this._pullMobileProvision(); + this.emit("message", "File: " + this.config.file); + this.emit("message", "Outdir: " + this.config.outdir); + if (tools.isDirectory(this.config.file as string)) { + throw new Error("This is a directory"); + } + try { + await this.unzipIPA(this.config.file, this.config.outdir); + const appDirectory = path.join(this.config.outdir, "/Payload"); + this.config.appdir = getAppDirectory(appDirectory); + if (this.config.debug) { + this.debugObject = {}; + } + const tasks = []; + if (this.config.withoutWatchapp) { + tasks.push(this.removeWatchApp()); + } + // TODO: this .withoutSigningFiles option doesnt exist yet + if (this.config.withoutSigningFiles) { + tasks.push(this.removeSigningFiles()); + } + if (this.config.withoutPlugins) { + tasks.push(this.removePlugins()); + } + if (this.config.withoutXCTests) { + tasks.push(this.removeXCTests()); + } + if (tasks.length > 0) { + await Promise.all(tasks); + } + await this.signAppDirectory(appDirectory); + await this.zipIPA(); + } finally { + await this.cleanup(); + } + return this; + } + + async _pullMobileProvision() { + if (this.config.deviceProvision === true) { + this.config.mobileprovision = await this.getDeviceProvision(); + this.config.mobileprovisions = [this.config.mobileprovision]; + this.config.identity = idprov(this.config.mobileprovision); + } + this.config.mobileprovision = this.config.mobileprovisions[0]; + if (this.config.mobileprovisions.length > 1) { + this.config.mobileprovisions.slice(1); + } + } + + async signAppDirectoryInternal(ipadir: string, skipNested: boolean) { + fchk(arguments, ["string", "boolean"]); + await this._pullMobileProvision(); + if (this.config.run) { + runScriptSync(this.config.run, this); + } + if (this.config.appdir === undefined) { + this.config.appdir = ipadir; + } + const binname = getExecutable(this.config.appdir); + this.emit("msg", "Main Executable Name: " + binname); + this.config.appbin = path.join(this.config.appdir, binname); + if (!fs.lstatSync(this.config.appbin).isFile()) { + throw new Error("This was supposed to be a file"); + } + if (bin.isBitcode(this.config.appbin)) { + throw new Error( + "This IPA contains only bitcode. Must be transpiled for the target device to run.", + ); + } + if (bin.isEncrypted(this.config.appbin)) { + if (!this.config.unfairPlay) { + throw new Error("This IPA is encrypted"); + } + this.emit("warning", "Main IPA executable is encrypted"); + } else { + this.emit("message", "Main IPA executable is not encrypted"); + } + if (this.config.insertLibrary !== undefined) { + await injectLibrary(this.config); + } + const infoPlistPath = path.join(this.config.appdir, "Info.plist"); + adjustInfoPlist(infoPlistPath, this.config, this.emit.bind(this)); + if (!this.config.pseudoSign) { + if (!this.config.mobileprovision) { + throw new Error("warning: No mobile provisioning file provided"); + } + await this.checkProvision( + this.config.appdir, + this.config.mobileprovision, + ); + } + await this.adjustEntitlements(this.config.appbin); + await this.signLibraries(this.config.appbin, this.config.appdir); + + if (skipNested !== true) { + for (const nest of this.nested) { + if (tools.isDirectory(nest)) { + await this.signAppDirectoryInternal(nest, true); + } else { + this.emit("warning", "Cannot find " + nest); + } + } + } + } + + async signAppDirectory(ipadir: string) { + fchk(arguments, ["string"]); + return this.signAppDirectoryInternal(ipadir, false); + } + + async removeWatchApp() { + fchk(arguments, []); + const watchdir = path.join(this.config.appdir, "Watch"); + this.emit("message", "Stripping out the WatchApp at " + watchdir); + await tools.asyncRimraf(watchdir); + + const placeholderdir = path.join( + this.config.appdir, + "com.apple.WatchPlaceholder", + ); + this.emit("message", "Stripping out the WatchApp at " + placeholderdir); + await tools.asyncRimraf(placeholderdir); + } + + // XXX some directory leftovers + async removeXCTests() { + fchk(arguments, []); + const dir = this.config.appdir; + walk.walkSync(dir, (basedir: string, filename: string, stat: any) => { + const target = path.join(basedir, filename); + // if (target.toLowerCase().indexOf('/xct') !== -1) + if (target.toLowerCase().indexOf("xctest") !== -1) { + this.emit("message", "Deleting " + target); + fs.unlinkSync(target); + } + }); + } + + async removeSigningFiles() { + fchk(arguments, []); + const dir = this.config.appdir; + walk.walkSync(dir, (basedir: string, filename: string, stat: any) => { + if ( + filename.endsWith(".entitlements") || + filename.endsWith(".mobileprovision") + ) { + const target = path.join(basedir, filename); + this.emit("message", "Deleting " + target); + fs.unlinkSync(target); + } + }); + } + + async removePlugins() { + fchk(arguments, []); + const plugdir = path.join(this.config.appdir, "PlugIns"); + const tmpdir = path.join(this.config.appdir, "applesign_xctest_tmp"); + this.emit("message", "Stripping out the PlugIns at " + plugdir); + let tests: string[] = []; + if (!this.config.withoutXCTests) { + tests = await enumerateTestFiles(plugdir); + if (tests.length > 0) { + await moveFiles(tests, plugdir, tmpdir); + } + } + + await tools.asyncRimraf(plugdir); + if (tests.length > 0) { + await moveFiles(tests, tmpdir, plugdir); + await fs.rmdir(tmpdir); + } + } + + findProvisioningsSync() { + fchk(arguments, []); + const files: string[] = []; + walk.walkSync( + this.config.appdir, + (basedir: string, filename: string, stat: any) => { + const file = path.join(basedir, filename); + // only walk on files. Symlinks and other special files are forbidden + if (!fs.lstatSync(file).isFile()) { + return; + } + if (filename === "embedded.mobileprovision") { + files.push(file); + } + }, + ); + return files; + } + + /* + TODO: verify is mobileprovision app-id glob string matches the bundleid + read provision file in raw + search for application-identifier and ... + check if prefix matches and last dot separated word is an asterisk + const identifierInProvisioning = 'x' + Read the one in Info.plist and compare with bundleid + */ + async checkProvision(appdir: string, file: string) { + fchk(arguments, ["string", "string"]); + /* Deletes the embedded.mobileprovision from the ipa? */ + const withoutMobileProvision = false; + if (withoutMobileProvision) { + const files = this.findProvisioningsSync(); + files.forEach((file: string) => { + console.error("Deleting ", file); + fs.unlinkSync(file); + }); + } + if (appdir && file && !withoutMobileProvision) { + this.emit("message", "Embedding new mobileprovision"); + const mobileProvision = path.join(appdir, "embedded.mobileprovision"); + if (this.config.selfSignedProvision) { + /* update entitlements */ + const data = await tools.getMobileProvisionPlist( + this.config.mobileprovision, + ); + const mainBin = path.join(appdir, getExecutable(appdir)); + let ent = bin.entitlements(mainBin); + if (ent === null) { + this.emit( + "warning", + "Cannot find entitlements in binary. Using defaults", + ); + const entMobProv = data.Entitlements; + const teamId = entMobProv["com.apple.developer.team-identifier"]; + const appId = entMobProv["application-identifier"]; + ent = defaultEntitlements(appId, teamId); + } + data.Entitlements = plist.parse(ent.toString().trim()); + fs.writeFileSync(mobileProvision, plistBuild(data).toString()); + /* TODO: self-sign mobile provisioning */ + } + return fs.copySync(file, mobileProvision); + } + } + + debugInfo(path: string, key: any, val: any) { + if (!val) { + return; + } + const f = path.replace(this.config.outdir + "/", ""); + if (!this.debugObject) { + this.debugObject = {}; + } + if (this.debugObject[f] === undefined) { + this.debugObject[f] = {}; + } + this.debugObject[f][key] = val; + } + + addEntitlementsSync(orig: any) { + if (this.config.addEntitlements === undefined) { + return orig; + } + this.emit("message", "Adding entitlements from file"); + const addEnt = plist.readFileSync(this.config.addEntitlements); + // TODO: deepmerge + return Object.assign(orig, addEnt); + } + + adjustEntitlementsSync(file: string, entMobProv: any) { + if (this.config.pseudoSign) { + const ent = bin.entitlements(file); + if (ent === null) { + return; + } + let entMacho = plist.parse(ent.toString().trim()); + entMacho = this.addEntitlementsSync(entMacho); + // TODO: merge additional entitlements here + const newEntitlements = plistBuild(entMacho).toString(); + const newEntitlementsFile = file + ".entitlements"; + const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); + fs.writeFileSync(tmpEntitlementsFile, newEntitlements); + this.config.entitlement = tmpEntitlementsFile; + return; + } + fchk(arguments, ["string", "object"]); + this.debugInfo(file, "before", entMobProv); + const teamId = entMobProv["com.apple.developer.team-identifier"]; + const appId = entMobProv["application-identifier"]; + let ent = bin.entitlements(file); + if (ent === null && !this.config.cloneEntitlements) { + console.error("Cannot find entitlements in binary. Using defaults"); + ent = defaultEntitlements(appId, teamId); + } + let entMacho: any; + if (ent !== null) { + entMacho = plist.parse(ent.toString().trim()); + entMacho = this.addEntitlementsSync(entMacho); + this.debugInfo(file, "fullPath", file); + this.debugInfo(file, "oldEntitlements", entMacho || "TODO"); + if (this.config.selfSignedProvision) { + this.emit("message", "Using an unsigned provisioning"); + const newEntitlementsFile = file + ".entitlements"; + const newEntitlements = plistBuild(entMacho).toString(); + const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); + fs.writeFileSync(tmpEntitlementsFile, newEntitlements); + this.config.entitlement = tmpEntitlementsFile; + if (!this.config.noEntitlementsFile) { + fs.writeFileSync(newEntitlementsFile, tmpEntitlementsFile); + } + this.debugInfo(file, "newEntitlements", plist.parse(newEntitlements)); + return; + } + } + let changed = false; + if (this.config.cloneEntitlements) { + this.emit("message", "Cloning entitlements"); + entMacho = entMobProv; + changed = true; + } else { + const k = "com.apple.developer.icloud-container-identifiers"; + if (entMacho[k]) { + entMacho[k] = "iCloud." + appId; + } + ["application-identifier", "com.apple.developer.team-identifier"].forEach( + (id) => { + if (entMacho[id] !== entMobProv[id]) { + changed = true; + entMacho[id] = entMobProv[id]; + } + }, + ); + if (this.config.massageEntitlements === true) { + if (typeof entMacho["keychain-access-groups"] === "object") { + changed = true; + // keychain access groups makes the resigning fail with -M + delete entMacho["keychain-access-groups"]; + // entMacho['keychain-access-groups'][0] = appId; + } + [ + "com.apple.developer.ubiquity-kvstore-identifier", + "com.apple.developer.ubiquity-container-identifiers", + "com.apple.developer.icloud-container-identifiers", + "com.apple.developer.icloud-container-environment", + "com.apple.developer.icloud-services", + "com.apple.developer.payment-pass-provisioning", + "com.apple.developer.default-data-protection", + "com.apple.networking.vpn.configuration", + "com.apple.developer.associated-domains", + "com.apple.security.application-groups", + "com.apple.developer.in-app-payments", + "com.apple.developer.siri", + "beta-reports-active", /* our entitlements doesnt support beta */ + "aps-environment", + ].forEach((id) => { + if (typeof entMacho[id] !== "undefined") { + delete entMacho[id]; + changed = true; + } + }); + } else if (!this.config.cloneEntitlements) { + delete entMacho["com.apple.developer.icloud-container-identifiers"]; + delete entMacho["com.apple.developer.icloud-container-environment"]; + delete entMacho["com.apple.developer.ubiquity-kvstore-identifier"]; + delete entMacho["com.apple.developer.icloud-services"]; + delete entMacho["com.apple.developer.siri"]; + delete entMacho["com.apple.developer.in-app-payments"]; + delete entMacho["aps-environment"]; + delete entMacho["com.apple.security.application-groups"]; + delete entMacho["com.apple.developer.associated-domains"]; + delete entMacho["keychain-access-groups"]; + changed = true; + } + } + + if (typeof this.config.withGetTaskAllow !== "undefined") { + this.emit( + "message", + "get-task-allow set to " + this.config.withGetTaskAllow, + ); + entMacho["get-task-allow"] = this.config.withGetTaskAllow; + changed = true; + } + + const additionalKeychainGroups = []; + if (typeof this.config.customKeychainGroup === "string") { + additionalKeychainGroups.push(this.config.customKeychainGroup); + } + const infoPlist = path.join(this.config.appdir, "Info.plist"); + const plistData = plist.readFileSync(infoPlist); + if (this.config.bundleIdKeychainGroup) { + if (typeof this.config.bundleid === "string") { + additionalKeychainGroups.push(this.config.bundleid); + } else { + const bundleid = plistData.CFBundleIdentifier; + additionalKeychainGroups.push(bundleid); + } + } + if (this.config.osversion !== undefined) { + // DTPlatformVersion + plistData.MinimumOSVersion = this.config.osversion; + plist.writeFileSync(infoPlist, plistData); + } + if (additionalKeychainGroups.length > 0) { + const newGroups = additionalKeychainGroups.map( + (group) => `${teamId}.${group}`, + ); + const groups = entMacho["keychain-access-groups"]; + if (typeof groups === "undefined") { + entMacho["keychain-access-groups"] = newGroups; + } else { + groups.push(...newGroups); + } + changed = true; + } + if (changed || this.config.entry) { + const newEntitlementsFile = file + ".entitlements"; + let newEntitlements = appId && teamId && this.config.entry + ? defaultEntitlements(appId, teamId) + : this.config.entitlement + ? fs.readFileSync(this.config.entitlement).toString() + : plistBuild(entMacho).toString(); + const ent = plist.parse(newEntitlements.trim()); + const shouldRenameGroups = !this.config.mobileprovision && + !this.config.cloneEntitlements; + if (shouldRenameGroups && ent["com.apple.security.application-groups"]) { + const ids = appId.split("."); + ids.shift(); + const id = ids.join("."); + const groups = []; + for (const group of ent["com.apple.security.application-groups"]) { + const cols = group.split("."); + if (cols.length === 4) { + groups.push("group." + id); + } else { + groups.push("group." + id + "." + cols.pop()); + } + } + ent["com.apple.security.application-groups"] = groups; + } + delete ent[ + "beta-reports-active" + ]; /* our entitlements doesnt support beta */ + if (this.config.massageEntitlements === true) { + delete ent["com.apple.developer.ubiquity-container-identifiers"]; // TODO should be massaged + } + newEntitlements = plistBuild(ent).toString(); + + this.debugInfo(file, "newEntitlements", ent); + + const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); + fs.writeFileSync(tmpEntitlementsFile, newEntitlements); + this.config.entitlement = tmpEntitlementsFile; + if (!this.config.noEntitlementsFile) { + fs.writeFileSync(tmpEntitlementsFile, newEntitlements); + this.emit( + "message", + "Updated binary entitlements" + tmpEntitlementsFile, + ); + } + this.debugInfo(file, "after", newEntitlements); + } else { + this.debugInfo(file, "nothing-changed", true); + } + } + + async adjustEntitlements(file: string) { + fchk(arguments, ["string"]); + let newEntitlements = null; + if (!this.config.pseudoSign) { + const mp = this.config.mobileprovision + ? this.config.mobileprovision + : path.join(this.config.appdir, "embedded.mobileprovision"); + newEntitlements = await tools.getEntitlementsFromMobileProvision(mp); + this.emit("message", JSON.stringify(newEntitlements)); + } + this.adjustEntitlementsSync(file, newEntitlements); + } + + async signFile(file: string) { + const config = this.config; + function customOptions(config: any, file: string) { + if ( + typeof config.json === "object" && + typeof config.json.custom === "object" + ) { + for (const c of config.json.custom) { + if (!c.filematch) { + continue; + } + const re = new RegExp(c.filematch); + if (re.test(file)) { + // console.error('Debug: '+ JSON.stringify(c, null, 2)) + return c; + } + } + } + return false; + } + const custom = customOptions(config, file); + function getKeychain() { + return custom !== false && custom.keychain !== undefined + ? custom.keychain + : config.keychain; + } + function getIdentity() { + return custom !== false && custom.identity !== undefined + ? custom.identity + : config.identity; + } + function getEntitlements() { + return custom !== false && custom.entitlements !== undefined + ? custom.entitlements + : config.entitlement; + } + + fchk(arguments, ["string"]); + if (this.config.lipoArch !== undefined) { + this.emit("message", "[lipo] " + this.config.lipoArch + " " + file); + try { + await tools.lipoFile(file, this.config.lipoArch); + } catch (ignored) {} + } + function codesignHasFailed(config: any, error: any, errmsg: string) { + if (error && errmsg.indexOf("Error:") !== -1) { + throw error; + } + return ( + (errmsg && errmsg.indexOf("no identity found") !== -1) || + !config.ignoreCodesignErrors + ); + } + const identity = getIdentity(); + let entitlements = ""; + if (this.config.cloneEntitlements) { + const mp = await tools.getMobileProvisionPlist( + this.config.mobileprovision, + ); + const newEntitlementsFile = file + ".entitlements"; + const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); + const entstr = plistBuild(mp.Entitlements, { + pretty: true, + allowEmpty: false, + }).toString(); + fs.writeFileSync(tmpEntitlementsFile, entstr); + entitlements = tmpEntitlementsFile; + } else { + entitlements = getEntitlements(); + } + let res: any; + if (this.config.pseudoSign) { + const newEntitlementsFile = file + ".entitlements"; + const tmpEntitlementsFile = this._fullPathInTmp(newEntitlementsFile); + const entitlements = fs.existsSync(tmpEntitlementsFile) + ? tmpEntitlementsFile + : null; + res = await tools.pseudoSign(entitlements, file); + } else { + const keychain = getKeychain(); + res = await tools.codesign(identity, entitlements, keychain, file); + if (res.code !== 0 && codesignHasFailed(config, res.code, res.stderr)) { + return this.emit("end", res.stderr); + } + } + this.emit("message", "Signed " + file); + if (config.verifyTwice) { + this.emit("message", "Verify " + file); + const res = await tools.verifyCodesign(file, config.keychain); + if (res.code !== 0) { + const type = config.ignoreVerificationErrors ? "warning" : "error"; + return this.emit(type, res.stderr); + } + } + return this; + } + + filterLibraries(libraries: any) { + fchk(arguments, ["object"]); + return libraries.filter((library: any) => { + // Resign all frameworks. even if not referenced :? + if (library.indexOf("Frameworks/") !== -1) { + return true; + } + if (this.config.all) { + return true; + } + // check if there's a Plist to inform us which is the right executable + const exe = getExecutable(path.dirname(library)); + if (path.basename(library) !== exe) { + this.emit("warning", "Not signing " + library); + return false; + } + return true; + }); + } + + findLibrariesSync() { + fchk(arguments, []); + const libraries: any = []; + const nested: any = []; + const exe = path.sep + getExecutable(this.config.appdir); + const folders = this.config.appbin.split(path.sep); + const exe2 = path.sep + folders[folders.length - 1]; + + let found = false; + walk.walkSync( + this.config.appdir, + (basedir: any, filename: any, stat: any) => { + const file = path.join(basedir, filename); + // only walk on files. Symlinks and other special files are forbidden + if (!fs.lstatSync(file).isFile()) { + return; + } + if (file.endsWith(exe) || file.endsWith(exe2)) { + this.emit("message", "Executable found at " + file); + libraries.push(file); + found = true; + return; + } + + const nest = nestedApp(file); + if (nest !== false) { + if (nested.indexOf(nest) === -1) { + nested.push(nest); + } + return; + } + if (bin.isMacho(file)) { + libraries.push(file); + } + }, + ); + if (!found) { + throw new Error("Cannot find any MACH0 binary to sign"); + } + console.error("Found nested", nested); + this.nested = nested; + // return this.filterLibraries(libraries); + + return libraries; + } + + async signLibraries(bpath: string, appdir: string) { + fchk(arguments, ["string", "string"]); + this.emit("message", "Signing libraries and frameworks"); + + const parallelVerify = async (libs: any) => { + if (!this.config.verify) { + return; + } + this.emit("message", "Verifying " + libs); + const promises = libs.map((lib: any) => tools.verifyCodesign); + return Promise.all(promises); + }; + + const layeredSigning = async (libs: any) => { + const libsCopy = libs.slice(0).reverse(); + for (const deps of libsCopy) { + const promises = deps.map((dep: any) => { + return this.signFile(dep); + }); + await Promise.all(promises); + } + await parallelVerify(libs); + }; + + const serialSigning = async (libs: any) => { + const libsCopy = libs.slice(0).reverse(); + for (const lib of libsCopy) { + await this.signFile(lib); + if (this.config.verify) { + this.emit("message", "Verifying " + lib); + await tools.verifyCodesign(lib); + } + } + }; + + this.emit("message", "Resolving signing order using layered list"); + let libs = []; + const ls = new AppDirectory(); + await ls.loadFromDirectory(appdir); + if (this.config.parallel) { + // known to be buggy in some situations, must use AppDirectory + const libraries = this.findLibrariesSync(); + libs = await depSolver(bpath, libraries, true); + + for (const appex of ls.appexs) { + libs.push([appex]); + } + } else { + for (const appex of ls.appexs) { + await this.adjustEntitlements(appex); + await this.signFile(appex); + } + + this.emit( + "message", + "Nested: " + JSON.stringify(ls.nestedApplications()), + ); + this.emit( + "message", + "SystemLibraries: " + JSON.stringify(ls.systemLibraries()), + ); + this.emit( + "message", + "DiskLibraries: " + JSON.stringify(ls.diskLibraries()), + ); + this.emit( + "message", + "UnavailableLibraries: " + JSON.stringify(ls.unavailableLibraries()), + ); + this.emit( + "message", + "AppLibraries: " + JSON.stringify(ls.appLibraries()), + ); + this.emit("message", "Orphan: " + JSON.stringify(ls.orphanedLibraries())); + const libraries = ls.appLibraries(); + if (this.config.all) { + libraries.push(...ls.orphanedLibraries()); + } else { + for (const ol of ls.orphanedLibraries()) { + console.error("Warning: Orphaned library not signed, try -a: " + ol); + } + } + this.debugInfo("analysis", "orphan", ls.orphanedLibraries()); + // const libraries = ls.diskLibraries (); + libs = libraries.filter((library: any) => !ls.appexs.includes(library)); // remove already-signed appexs + } + if (libs.length === 0) { + libs.push(bpath); + } + return typeof libs[0] === "object" + ? layeredSigning(libs) + : serialSigning(libs); + } + + async cleanup() { + fchk(arguments, []); + if (this.config.noclean) { + return; + } + const outdir = this.config.outdir; + this.emit("message", "Cleaning up " + outdir); + // await tools.asyncRimraf(this.config.outfile); + return tools.asyncRimraf(outdir); + } + + async cleanupTmp() { + this.emit("message", "Cleaning up temp dir " + this.tmpDir); + await tools.asyncRimraf(this.tmpDir); + } + + async zipIPA() { + fchk(arguments, []); + if (!this.config.file) { + console.error("Missing input file to zip"); + return; + } + const ipaIn = this.config.file as string; + const ipaOut = getOutputPath(this.config.outdir, this.config.outfile!); + try { + fs.unlinkSync(ipaOut); // await for it + } catch (e) { + /* do nothing */ + } + this.events.emit("message", "Zipifying into " + ipaOut + " ..."); + const rootFolder = this.config.payloadOnly ? "Payload" : "."; + await tools.zip(this.config.outdir, ipaOut, rootFolder); + if (this.config.replaceipa) { + this.events.emit("message", "mv into " + ipaIn); + fs.rename(ipaOut, ipaIn); + } + } + + setFile(name: any) { + fchk(arguments, ["string"]); + this.config.file = path.resolve(name); + this.config.outdir = this.config.file + "." + uuid.v4(); + if (!this.config.outfile) { + this.config.outfile = getResignedFilename(this.config.file); + } + } + + async unzipIPA(file: any, outdir: any): Promise { + fchk(arguments, ["string", "string"]); + if (!file || !outdir) { + throw new Error("No output specified"); + } + if (!outdir) { + throw new Error("Invalid output directory"); + } + await this.cleanup(); + this.events.emit("message", "Unzipping " + file); + return tools.unzip(file, outdir); + } + + /* Event Wrapper API with cb support */ + emit(ev: any, msg: any) { + this.events.emit(ev, msg); + } + + on(ev: any, cb: any) { + this.events.on(ev, cb); + return this; + } +} + +// helper functions + +function getResignedFilename(input: string): string | null { + if (!input) { + return null; + } + const pos = input.lastIndexOf(path.sep); + if (pos !== -1) { + const tmp = input.substring(pos + 1); + const dot = tmp.lastIndexOf("."); + input = dot !== -1 ? tmp.substring(0, dot) : tmp; + } else { + const dot = input.lastIndexOf("."); + if (dot !== -1) { + input = input.substring(0, dot); + } + } + return input + "-resigned.ipa"; +} + +function getExecutable(appdir: string) { + if (!appdir) { + throw new Error("No application directory is provided"); + } + const plistPath = path.join(appdir, "Info.plist"); + try { + const plistData = plist.readFileSync(plistPath); + const cfBundleExecutable = plistData.CFBundleExecutable; + if (cfBundleExecutable) { + return cfBundleExecutable; + } + } catch (e) { + // do nothing + } + const exename = path.basename(appdir); + const dotap = exename.indexOf(".app"); + return dotap === -1 ? exename : exename.substring(0, dotap); +} + +async function injectLibrary(config: any) { + const appDir = config.appdir; + const targetLib = config.insertLibrary; + const libraryName = path.basename(targetLib); + try { + fs.mkdirSync(path.join(appDir, "Frameworks")); + } catch (_) {} + const outputLib = path.join(appDir, "Frameworks", libraryName); + await insertLibraryLL(outputLib, targetLib, config); +} + +function insertLibraryLL(outputLib: any, targetLib: string, config: any) { + return new Promise((resolve, reject) => { + try { + const writeStream = fs.createWriteStream(outputLib); + writeStream.on("finish", () => { + /* XXX: if binary doesnt contains an LC_RPATH load command this will not work */ + const insertedLibraryName = "@rpath/" + path.basename(targetLib); + fs.chmodSync(outputLib, 0x1ed); // 0755 + /* Just copy the library via USB on the DCIM directory */ + // const insertedLibraryName = '/var/mobile/Media/DCIM/' + path.basename(targetLib); + /* useful on jailbroken devices where we can write in /usr/lib */ + // const insertedLibraryName = '/usr/lib/' + path.basename(targetLib); + /* forbidden in iOS */ + // const insertedLibraryName = '@executable_path/Frameworks/' + path.basename(targetLib); + tools + .insertLibrary(insertedLibraryName, config.appbin, outputLib) + .then(resolve) + .catch(reject); + }); + fs.createReadStream(targetLib).pipe(writeStream); + } catch (e) { + reject(e); + } + }); +} + +function parentDirectory(root: string) { + return path.normalize(path.join(root, "..")); +} + +function getOutputPath(cwd: string, ofile: string) { + return ofile.startsWith(path.sep) + ? ofile + : path.join(parentDirectory(cwd), ofile); +} + +function runScriptSync(script: string, session: any) { + if (script.endsWith(".js")) { + try { + const s = require(script); + return s(session); + } catch (e: any) { + console.error(e); + return false; + } + } else { + process.env.APPLESIGN_DIRECTORY = session.config.appdir; + process.env.APPLESIGN_MAINBIN = session.config.appbin; + process.env.APPLESIGN_OUTFILE = session.config.outfile; + process.env.APPLESIGN_OUTDIR = session.config.outdir; + process.env.APPLESIGN_FILE = session.config.file; + try { + const res = execSync(script); + console.error(res.toString()); + } catch (e: any) { + console.error(e.toString()); + return false; + } + } + return true; +} + +function nestedApp(file: string) { + const dotApp = file.indexOf(".app/"); + if (dotApp !== -1) { + const subApp = file.substring(dotApp + 4).indexOf(".app/"); + if (subApp !== -1) { + return file.substring(0, dotApp + 4 + subApp + 4); + } + } + return false; +} + +function getAppDirectory(this: any, ipadir: string) { + if (!ipadir) { + ipadir = path.join(this.config.outdir, "Payload"); + } + if (!tools.isDirectory(ipadir)) { + throw new Error("Not a directory " + ipadir); + } + if (ipadir.endsWith(".app")) { + this.config.appdir = ipadir; + } else { + const files = fs.readdirSync(ipadir).filter((x: string) => { + return x.endsWith(".app"); + }); + if (files.length !== 1) { + throw new Error("Invalid IPA: " + ipadir); + } + return path.join(ipadir, files[0]); + } + if (ipadir.endsWith("/")) { + ipadir = ipadir.substring(0, ipadir.length - 1); + } + return ipadir; +} + +async function enumerateTestFiles(dir: string): Promise { + let tests: string[] = []; + if (fs.existsSync(dir)) { + tests = (await fs.readdir(dir)).filter((x: string) => { + return x.indexOf(".xctest") !== -1; + }); + } + return tests; +} + +async function moveFiles(files: string[], sourceDir: string, destDir: string) { + await fs.mkdir(destDir, { recursive: true }); + for (const f of files) { + const oldName = path.join(sourceDir, f); + const newName = path.join(destDir, f); + await fs.rename(oldName, newName); + } +} +export default Applesign; diff --git a/lib/appdir.js b/lib/appdir.js deleted file mode 100644 index 5518ed4..0000000 --- a/lib/appdir.js +++ /dev/null @@ -1,214 +0,0 @@ -'use strict'; - -const path = require('path'); -const walk = require('fs-walk'); -const plist = require('simple-plist'); -const bin = require('./bin'); -const fs = require('fs'); -const depSolver = require('./depsolver'); - -module.exports.AppDirectory = - -class AppDirectory { - constructor () { - this.nested = []; - } - - async loadFromDirectory (appdir) { - this.exebin = _getAppExecutable(appdir); - this.appdir = appdir; - this.appbin = path.join(this.appdir, this.exebin); - this.nested = _findNested(this.appdir); - this.disklibs = _findBinaries(this.appdir); - this.appexs = _getAppExtensions(appdir); - const applibs = _findLibraries(this.appdir, this.exebin, this.appexs, this.disklibs); - this.notlibs = applibs.filter(l => l[0] === '@'); - this.applibs = applibs.filter(l => l[0] !== '@'); - this.syslibs = _findSystemLibraries(this.applibs); - this.orphan = orphanedLibraries(this.applibs, this.disklibs); - } - - appLibraries () { - return this.applibs; - } - - diskLibraries () { - return this.disklibs; - } - - systemLibraries () { - return this.syslibs; - } - - unavailableLibraries () { - return this.notlibs; - } - - orphanedLibraries (src, dst) { - return this.orphan; - } - - nestedApplications () { - return this.nested; - } - - appExtensions () { - return this.appexs; - } -}; - -// internal functions // -function orphanedLibraries (src, dst) { - // list all the libs that are not referenced from the main binary and their dependencies - const orphan = []; - for (const lib of dst) { - if (src.indexOf(lib) === -1) { - orphan.push(lib); - } - } - return orphan; -} - -function _findSystemLibraries (applibs) { - const syslibs = []; - for (const lib of applibs) { - const res = binSysLibs(lib).filter((l) => syslibs.indexOf(l) === -1); - syslibs.push(...res); - } - return syslibs; -} - -function _getAppExecutable (appdir) { - if (!appdir) { - throw new Error('No application directory is provided'); - } - const plistPath = path.join(appdir, 'Info.plist'); - try { - const plistData = plist.readFileSync(plistPath); - const cfBundleExecutable = plistData.CFBundleExecutable; - if (cfBundleExecutable) { - return cfBundleExecutable; - } - } catch (e) { - // do nothing - console.error(e); - } - const exename = path.basename(appdir); - const dotap = exename.indexOf('.app'); - return (dotap === -1) ? exename : exename.substring(0, dotap); -} - -function _getAppExtensions (appdir) { - const d = path.join(appdir, 'PlugIns'); - const apexBins = []; - try { - if (!fs.existsSync(d)) { - return apexBins; - } - const files = fs.readdirSync(d); - for (const file of files) { - const apexDir = path.join(d, file); - const apexPlist = path.join(apexDir, 'Info.plist'); - if (fs.existsSync(apexPlist)) { - const apexInfo = plist.readFileSync(apexPlist); - if (apexInfo.CFBundleExecutable) { - const apexBin = path.join(apexDir, apexInfo.CFBundleExecutable); - if (fs.existsSync(apexBin)) { - apexBins.push(apexBin); - } - } - } - } - console.error(apexBins); - } catch (e) { - console.error(e); - return []; - } - return apexBins; -} - -/** return an array of strings with the absolute paths of the sub-apps found inside appdir */ -function _findNested (d) { - const nested = []; - walk.walkSync(d, (basedir, filename, stat) => { - const file = path.join(basedir, filename); - if (file.indexOf('.app/Info.plist') !== -1) { - const nest = file.lastIndexOf('.app/'); - nested.push(file.substring(0, nest + 4)); - } - }); - return nested; -} - -function _findBinaries (appdir) { - const libraries = []; - walk.walkSync(appdir, (basedir, filename, stat) => { - const file = path.join(basedir, filename); - // only walk on files. Symlinks and other special files are forbidden - if (!fs.lstatSync(file).isFile()) { - return; - } - if (bin.isMacho(file)) { - libraries.push(file); - } - }); - return libraries; -} - -function binSysLibs (file) { - try { - return bin.enumerateLibraries(file) - .filter((l) => l.startsWith('/')); - } catch (e) { - console.error('Warning: missing file:', file); - return []; - } -} - -// return a list of the libs that must be inside the app -function binAbsLibs (file, o) { - try { - return bin.enumerateLibraries(file) - .filter((l) => { - return !(l.startsWith('/')); - }) - .map((l) => { - if (l[0] === '@') { - const ll = depSolver.resolvePath(o.exe, file, l, o.libs); - if (ll) { - l = ll; - } else { - console.error('Warning: Cannot resolve dependency library: ' + file); - } - } - return l; - }); - } catch (e) { - console.error('Warning: missing file:', file); - return []; - } -} - -// get all dependencies from appbin recursively -function _findLibraries (appdir, appbin, appexs, disklibs) { - const exe = path.join(appdir, appbin); - - const o = { - exe, - lib: exe, - libs: disklibs - }; - const libraries = []; - const pending = [exe, ...appexs]; - while (pending.length > 0) { - const target = pending.shift(); - if (libraries.indexOf(target) === -1) { - libraries.push(target); - } - const res = binAbsLibs(target, o); - const unexplored = res.filter(l => libraries.indexOf(l) === -1); - pending.push(...unexplored.filter(l => pending.indexOf(l) === -1)); - libraries.push(...unexplored); - } - return libraries; -} diff --git a/lib/appdir.ts b/lib/appdir.ts new file mode 100644 index 0000000..c419f36 --- /dev/null +++ b/lib/appdir.ts @@ -0,0 +1,248 @@ +import path from "path"; +import walk from "fs-walk"; +import plist from "simple-plist"; +import * as bin from "./bin.js"; +import fs from "fs"; +import { resolvePath } from "./depsolver.js"; + +export class AppDirectory { + appbin: string = ""; + appdir: string = ""; + appexs: string[] = []; + applibs: string[] = []; + disklibs: string[] = []; + exebin: string | null = null; + nested: string[] = []; + notlibs: string[] = []; + orphan: string[] = []; + syslibs: string[] = []; + constructor() { + this.nested = []; + } + + async loadFromDirectory(appdir: string) { + this.exebin = _getAppExecutable(appdir); + this.appdir = appdir; + this.appbin = path.join(this.appdir, this.exebin); + this.nested = _findNested(this.appdir); + this.disklibs = _findBinaries(this.appdir); + this.appexs = _getAppExtensions(appdir); + const applibs = _findLibraries( + this.appdir, + this.exebin, + this.appexs, + this.disklibs, + ); + this.notlibs = applibs.filter((l) => l[0] === "@"); + this.applibs = applibs.filter((l) => l[0] !== "@"); + this.syslibs = _findSystemLibraries(this.applibs); + this.orphan = orphanedLibraries(this.applibs, this.disklibs); + } + + appLibraries(): string[] { + return this.applibs; + } + + diskLibraries(): string[] { + return this.disklibs; + } + + systemLibraries(): string[] { + return this.syslibs; + } + + unavailableLibraries(): string[] { + return this.notlibs; + } + + orphanedLibraries(): string[] { + return this.orphan; + } + + nestedApplications(): string[] { + return this.nested; + } + + appExtensions(): string[] { + return this.appexs; + } +} + +// internal functions // +/** + * Finds libraries that are present in the application bundle but not + * referenced by the main binary or any of its dependencies. + * + * @param src - Array of libraries that are referenced by the main binary and its dependencies + * @param dst - Array of all libraries found in the application bundle + * @returns Array of library paths that exist in the application but aren't referenced + */ +function orphanedLibraries(src: string[], dst: string[]): string[] { + return dst.filter((lib) => !src.includes(lib)); +} + +function _findSystemLibraries(applibs: string[]): string[] { + const syslibs: string[] = []; + for (const lib of applibs) { + const res = binSysLibs(lib).filter((l: any) => syslibs.indexOf(l) === -1); + syslibs.push(...res); + } + return syslibs; +} + +function _getAppExecutable(appdir: string): string { + if (!appdir) { + throw new Error("No application directory is provided"); + } + const plistPath = path.join(appdir, "Info.plist"); + try { + const plistData = plist.readFileSync(plistPath); + const cfBundleExecutable = plistData.CFBundleExecutable; + if (cfBundleExecutable) { + return cfBundleExecutable; + } + } catch (e) { + // do nothing + console.error(e); + } + const exename = path.basename(appdir); + const dotap = exename.indexOf(".app"); + return dotap === -1 ? exename : exename.substring(0, dotap); +} + +function _getAppExtensions(appdir: string): string[] { + const d = path.join(appdir, "PlugIns"); + const apexBins: string[] = []; + try { + if (!fs.existsSync(d)) { + return apexBins; + } + const files = fs.readdirSync(d); + for (const file of files) { + const apexDir = path.join(d, file); + const apexPlist = path.join(apexDir, "Info.plist"); + if (fs.existsSync(apexPlist)) { + const apexInfo = plist.readFileSync(apexPlist); + if (apexInfo.CFBundleExecutable) { + const apexBin = path.join(apexDir, apexInfo.CFBundleExecutable); + if (fs.existsSync(apexBin)) { + apexBins.push(apexBin); + } + } + } + } + console.error(apexBins); + } catch (e) { + console.error(e); + return []; + } + return apexBins; +} + +/** return an array of strings with the absolute paths of the sub-apps found inside appdir */ +function _findNested(d: string): string[] { + const nested: string[] = []; + walk.walkSync(d, (basedir: any, filename: any, stat: any) => { + const file = path.join(basedir, filename); + if (file.indexOf(".app/Info.plist") !== -1) { + const nest = file.lastIndexOf(".app/"); + nested.push(file.substring(0, nest + 4)); + } + }); + return nested; +} + +function _findBinaries(appdir: string): string[] { + const libraries: string[] = []; + walk.walkSync(appdir, (basedir: any, filename: any, stat: any) => { + const file = path.join(basedir, filename); + // only walk on files. Symlinks and other special files are forbidden + if (!fs.lstatSync(file).isFile()) { + return; + } + if (bin.isMacho(file)) { + libraries.push(file); + } + }); + return libraries; +} + +/** + * Finds all libraries with absolute paths that the file depends on + * + * @param file - The macho file to be analyzed + * @returns Array of absolute paths to the discovered binary files + */ +function binSysLibs(file: string): string[] { + try { + return bin + .enumerateLibraries(file) + .filter((l: string) => l.startsWith("/")); + } catch (e) { + console.error("Warning: missing file:", file); + return []; + } +} + +// return a list of the libs that must be inside the app +function binAbsLibs(sourceFile: string, targetPaths: any): string[] { + try { + return bin + .enumerateLibraries(sourceFile) + .filter((libraryPath: string) => { + return !libraryPath.startsWith("/"); + }) + .map((libraryPath: string) => { + if (libraryPath.startsWith("@")) { + const resolvedPath = resolvePath( + targetPaths.exe, + sourceFile, + libraryPath, + targetPaths.libs, + ); + if (resolvedPath) { + libraryPath = resolvedPath; + } else { + console.error( + "Warning: Cannot resolve dependency library: " + sourceFile, + ); + } + } + return libraryPath; + }); + } catch (error) { + console.error("Warning: missing file:", sourceFile); + return []; + } +} + +// get all dependencies from appbin recursively +function _findLibraries( + appdir: string, + appbin: string, + appexs: string[], + disklibs: string[], +): string[] { + const exe = path.join(appdir, appbin); + + const targets = { + exe, + lib: exe, + libs: disklibs, + }; + const libraries: any = []; + const pending = [exe, ...appexs]; + while (pending.length > 0) { + const target = pending.shift() as string; + if (libraries.indexOf(target) === -1) { + libraries.push(target); + } + const res = binAbsLibs(target, targets); + const unexplored = res.filter((l: string) => libraries.indexOf(l) === -1); + pending.push( + ...unexplored.filter((l: string) => pending.indexOf(l) === -1), + ); + libraries.push(...unexplored); + } + return libraries; +} diff --git a/lib/bin.js b/lib/bin.ts similarity index 58% rename from lib/bin.js rename to lib/bin.ts index db6a097..3736257 100644 --- a/lib/bin.js +++ b/lib/bin.ts @@ -1,9 +1,8 @@ -'use strict'; - -const isEncryptedSync = require('macho-is-encrypted'); -const fatmacho = require('fatmacho'); -const macho = require('macho'); -const fs = require('fs'); +import isEncryptedSync from "macho-is-encrypted"; +import fatmacho from "fatmacho"; +import macho from "macho"; +import fs from "fs"; +import machoEntitlements from "macho-entitlements"; const MACH0_MIN_SIZE = 1024 * 4; const MH_EXECUTE = 2; @@ -11,15 +10,15 @@ const MH_DYLIB = 6; const MH_BUNDLE = 8; const CSSLOT_CODEDIRECTORY = 0; -function isMacho (filePath) { - if (typeof filePath !== 'string') { - throw new Error('Expected a string'); +function isMacho(filePath: string): boolean { + if (typeof filePath !== "string") { + throw new Error("Expected a string"); } // read file headers and read the magic and filetype if (!fs.lstatSync(filePath).isFile()) { return false; } - const fd = fs.openSync(filePath, 'r'); + const fd = fs.openSync(filePath, "r"); if (fd < 1) { return false; } @@ -53,11 +52,11 @@ function isMacho (filePath) { return isValidMacho(machoMagic, machoType); } -function isValidMacho (machoMagic, machoType) { +function isValidMacho(machoMagic: any, machoType: any): boolean { // verify this file have enough magic const magics = [ [0xce, 0xfa, 0xed, 0xfe], // 32bit - [0xcf, 0xfa, 0xed, 0xfe] // 64bit + [0xcf, 0xfa, 0xed, 0xfe], // 64bit ]; for (const a of magics) { if (!machoMagic.slice(0, 4).compare(Buffer.from(a))) { @@ -75,17 +74,17 @@ function isValidMacho (machoMagic, machoType) { return false; } -function isBitcodeMacho (cmds) { +function isBitcodeMacho(cmds: any): boolean { let haveBitcode = false; let haveNative = false; for (const cmd of cmds) { - if (cmd.type === 'segment' || cmd.type === 'segment_64') { - if (cmd.name === '__TEXT' && cmd.sections.length > 0) { + if (cmd.type === "segment" || cmd.type === "segment_64") { + if (cmd.name === "__TEXT" && cmd.sections.length > 0) { haveNative = cmd.vmsize > 0; } - if (cmd.name === '__LLVM' && cmd.sections.length > 0) { + if (cmd.name === "__LLVM" && cmd.sections.length > 0) { const section = cmd.sections[0]; - if (section.sectname === '__bundle' && section.size > 0) { + if (section.sectname === "__bundle" && section.size > 0) { haveBitcode = true; } } @@ -94,15 +93,15 @@ function isBitcodeMacho (cmds) { return haveBitcode && !haveNative; } -function isEncrypted (data) { - if (typeof data === 'string') { - data = fs.readFileSync(data); +function isEncrypted(fileName: string): boolean { + if (typeof fileName !== "string") { + throw new Error("invalid argument for isEncryptedSync"); } - return isEncryptedSync.data(data); + return isEncryptedSync.data(fs.readFileSync(fileName)); } -function isBitcode (data) { - if (typeof data === 'string') { +function isBitcode(data: any): boolean { + if (typeof data === "string") { data = fs.readFileSync(data); } try { @@ -120,8 +119,8 @@ function isBitcode (data) { return false; } -function isTruncated (data) { - if (typeof data === 'string') { +function isTruncated(data: any): boolean { + if (typeof data === "string") { data = fs.readFileSync(data); } if (data.length < MACH0_MIN_SIZE) { @@ -130,8 +129,8 @@ function isTruncated (data) { const diskMacho = macho.parse(data); for (const cmd of diskMacho.cmds) { switch (cmd.type) { - case 'segment': - case 'segment_64': + case "segment": + case "segment_64": { const end = cmd.fileoff + cmd.filesize; if (end > data.length) { @@ -144,17 +143,17 @@ function isTruncated (data) { return false; } -function parseMacho (data) { +function parseMacho(data: any): any { try { return macho.parse(data); - } catch (e) { - const fat = fatmacho.parse(data); // throws + } catch (e: unknown) { + const fat = fatmacho.parse(data); // throws // we get the first slice, assuming it contains the same libs as the others return parseMacho(fat[0].data); } } -function parseMachoAndGetData (data) { +function parseMachoAndGetData(data: any): [any, any] { try { return [macho.parse(data), data]; } catch (e) { @@ -164,65 +163,63 @@ function parseMachoAndGetData (data) { } } -function enumerateLibraries (data) { - if (typeof data === 'string') { +function enumerateLibraries(data: any) { + if (typeof data === "string") { data = fs.readFileSync(data); } const exec = parseMacho(data); - return exec.cmds.filter((x) => - x.type === 'load_dylib' || x.type === 'load_weak_dylib' - ).map((x) => x.name); + return exec.cmds + .filter((x: any) => x.type === "load_dylib" || x.type === "load_weak_dylib") + .map((x: any) => x.name); } -const machoEntitlements = require('macho-entitlements'); - -function entitlements (file) { +function entitlements(file: any) { return machoEntitlements.parseFile(file); } -function getIdentifier (path) { +function getIdentifier(path: any) { const rawData = fs.readFileSync(path); const [bin, data] = parseMachoAndGetData(rawData); for (const cmd of bin.cmds) { - if (cmd.type === 'code_signature') { + if (cmd.type === "code_signature") { return parseIdentifier(data.slice(cmd.dataoff)); } } return null; +} - function parseIdentifier (data) { - const count = data.readUInt32BE(8); - for (let i = 0; i < count; i++) { - const base = 8 * i; - const type = data.readUInt32BE(base + 12); - const blob = data.readUInt32BE(base + 16); - if (type === CSSLOT_CODEDIRECTORY) { - const size = data.readUInt32BE(blob + 4); - const directory = data.slice(blob + 8, blob + size); - const identOffset = directory.readUInt32BE(12); - const identifier = []; - let cursor = identOffset; - while (cursor < size) { - const charCode = data.readUInt8(blob + cursor); - if (charCode === 0) { - break; - } - identifier.push(String.fromCharCode(charCode)); - cursor++; +function parseIdentifier(data: any) { + const count = data.readUInt32BE(8); + for (let i = 0; i < count; i++) { + const base = 8 * i; + const type = data.readUInt32BE(base + 12); + const blob = data.readUInt32BE(base + 16); + if (type === CSSLOT_CODEDIRECTORY) { + const size = data.readUInt32BE(blob + 4); + const directory = data.slice(blob + 8, blob + size); + const identOffset = directory.readUInt32BE(12); + const identifier = []; + let cursor = identOffset; + while (cursor < size) { + const charCode = data.readUInt8(blob + cursor); + if (charCode === 0) { + break; } - return identifier.join(''); + identifier.push(String.fromCharCode(charCode)); + cursor++; } + return identifier.join(""); } - return null; } + return null; } -module.exports = { +export { entitlements, - isMacho, + enumerateLibraries, + getIdentifier, isBitcode, isEncrypted, + isMacho, isTruncated, - enumerateLibraries, - getIdentifier }; diff --git a/lib/config.js b/lib/config.ts similarity index 67% rename from lib/config.js rename to lib/config.ts index f0355f5..62f21b7 100644 --- a/lib/config.js +++ b/lib/config.ts @@ -1,7 +1,8 @@ -'use strict'; +// Converted to ES module -const path = require('path'); -const idprov = require('./idprov'); +import path from "path"; +import idprov from "./idprov.js"; +import minimist from "minimist"; const shortHelpMessage = `Usage: @@ -116,14 +117,64 @@ Installing in the device: } */ +export interface ConfigOptions { + appdir: any; + appbin: any; + all: boolean; + allDirs: boolean; + allowHttp: boolean; + addEntitlements: string | null; + bundleIdKeychainGroup: string | false; + bundleid: string | undefined; + cloneEntitlements: boolean; + customKeychainGroup: string | undefined; + debug: any; // opt.d || opt.debug || "" + deviceProvision: any; // opt.D || opt.deviceProvision || false + entitlement: string | undefined; + entry: any; // opt.entry || undefined + file: string | undefined; + forceFamily: boolean; + identity: string | undefined; + ignoreCodesignErrors: boolean; + ignoreVerificationErrors: boolean; + ignoreZipErrors: boolean; + insertLibrary: any; // opt.insertLibrary || undefined, + json: any; // JSON.parse(opt.json || "{}"), + keychain: any; + lipoArch: any; + massageEntitlements: boolean; + mobileprovision: any; + mobileprovisions: any; + noEntitlementsFile: any; + payloadOnly: boolean; + noclean: boolean; + osversion: any; // opt.osversion || undefined, + outdir: any; + outfile: string | null; + parallel: boolean; + pseudoSign: boolean; + replaceipa: boolean; + run: any; + selfSignedProvision: boolean; + unfairPlay: boolean; + use7zip: boolean; + useOpenSSL: boolean; + verify: boolean; + verifyTwice: boolean; + withGetTaskAllow: boolean; + withoutPlugins: boolean; + withoutSigningFiles: boolean; + withoutWatchapp: boolean; + withoutXCTests: boolean; +} -const fromOptions = function (opt) { - if (typeof opt !== 'object') { +const fromOptions = function (opt: any): ConfigOptions { + if (typeof opt !== "object") { opt = {}; } if (opt.osversion !== undefined) { if (isNaN(+opt.osversion)) { - throw new Error('Version passed to -O must be numeric'); + throw new Error("Version passed to -O must be numeric"); } } if (opt.mobileprovision) { @@ -156,7 +207,7 @@ const fromOptions = function (opt) { bundleid: opt.bundleid || undefined, cloneEntitlements: opt.cloneEntitlements || false, customKeychainGroup: opt.customKeychainGroup || undefined, - debug: opt.d || opt.debug || '', + debug: opt.d || opt.debug || "", deviceProvision: opt.D || opt.deviceProvision || false, entitlement: opt.entitlement || undefined, entry: opt.entry || undefined, @@ -167,7 +218,7 @@ const fromOptions = function (opt) { ignoreVerificationErrors: true, ignoreZipErrors: opt.ignoreZipErrors || false, insertLibrary: opt.insertLibrary || undefined, - json: JSON.parse(opt.json || '{}'), + json: JSON.parse(opt.json || "{}"), keychain: opt.keychain, lipoArch: opt.lipoArch || undefined, massageEntitlements: opt.massageEntitlements || false, @@ -176,7 +227,10 @@ const fromOptions = function (opt) { noEntitlementsFile: opt.noEntitlementsFile || false, noclean: opt.noclean || false, osversion: opt.osversion || undefined, + appbin: undefined, + appdir: undefined, outdir: undefined, + payloadOnly: false, outfile: opt.outfile, parallel: opt.parallel || false, pseudoSign: opt.pseudoSign || false, @@ -192,109 +246,143 @@ const fromOptions = function (opt) { withoutPlugins: opt.withoutPlugins || false, withoutSigningFiles: opt.withoutSigningFiles || false, withoutWatchapp: opt.withoutWatchapp || false, - withoutXCTests: opt.withoutXCTests || false + withoutXCTests: opt.withoutXCTests || false, }; }; -const fromState = function (state) { +const fromState = function (state: any) { return JSON.parse(JSON.stringify(state)); }; -function parse (argv) { - return require('minimist')(argv.slice(2), { +function parse(argv: any) { + return minimist(argv.slice(2), { string: [ - 'd', 'debug', - 'j', 'json', - 'i', 'identity', - 'O', 'osversion', - 'R', 'run' + "d", + "debug", + "j", + "json", + "i", + "identity", + "O", + "osversion", + "R", + "run", ], boolean: [ - '7', 'use-7zip', - 'A', 'all-dirs', - 'B', 'bundleid-access-group', - 'C', 'no-entitlements-file', - 'D', 'device-provision', - 'E', 'entry-entitlement', - 'F', 'without-signing-files', - 'H', 'allow-http', - 'L', 'identities', - 'M', 'massage-entitlements', - 'P', 'parallel', - 'S', 'self-signed-provision', - 'V', 'verify-twice', - 'Z', 'pseudo-sign', - 'a', 'all', - 'c', 'clone-entitlements', - 'f', 'force-family', - 'n', 'noclean', - 'p', 'without-plugins', - 'r', 'replace', - 's', 'single', - 't', 'without-get-task-allow', - 'u', 'unfair', - 'u', 'unsigned-provision', - 'v', 'verify', - 'w', 'without-watchapp', - 'x', 'without-xctests', - 'z', 'ignore-zip-errors' - ] + "7", + "use-7zip", + "A", + "all-dirs", + "B", + "bundleid-access-group", + "C", + "no-entitlements-file", + "D", + "device-provision", + "E", + "entry-entitlement", + "F", + "without-signing-files", + "H", + "allow-http", + "L", + "identities", + "M", + "massage-entitlements", + "P", + "parallel", + "S", + "self-signed-provision", + "V", + "verify-twice", + "Z", + "pseudo-sign", + "a", + "all", + "c", + "clone-entitlements", + "f", + "force-family", + "n", + "noclean", + "p", + "without-plugins", + "r", + "replace", + "s", + "single", + "t", + "without-get-task-allow", + "u", + "unfair", + "u", + "unsigned-provision", + "v", + "verify", + "w", + "without-watchapp", + "x", + "without-xctests", + "z", + "ignore-zip-errors", + ], }); } -function compile (conf) { +function compile(conf: any) { const options = { all: conf.a || conf.all || false, - allDirs: conf['all-dirs'] || conf.A, - allowHttp: conf['allow-http'] || conf.H, - addEntitlements: conf['add-entitlements'] || conf.N, - bundleIdKeychainGroup: conf.B || conf['bundleid-access-group'], + allDirs: conf["all-dirs"] || conf.A, + allowHttp: conf["allow-http"] || conf.H, + addEntitlements: conf["add-entitlements"] || conf.N, + bundleIdKeychainGroup: conf.B || conf["bundleid-access-group"], bundleid: conf.bundleid || conf.b, - cloneEntitlements: conf.c || conf['clone-entitlements'], - customKeychainGroup: conf.K || conf['add-access-group'], - debug: conf.debug || conf.d || '', + cloneEntitlements: conf.c || conf["clone-entitlements"], + customKeychainGroup: conf.K || conf["add-access-group"], + debug: conf.debug || conf.d || "", deviceProvision: conf.D || conf.deviceProvision || false, entitlement: conf.entitlement || conf.e, - entry: conf['entry-entitlement'] || conf.E, + entry: conf["entry-entitlement"] || conf.E, file: conf._[0] || undefined, - forceFamily: conf['force-family'] || conf.f, + forceFamily: conf["force-family"] || conf.f, identity: conf.identity || conf.i, - ignoreZipErrors: conf.z || conf['ignore-zip-errors'], + ignoreZipErrors: conf.z || conf["ignore-zip-errors"], insertLibrary: conf.I || conf.insert, json: conf.json || conf.j, keychain: conf.keychain || conf.k, lipoArch: conf.lipo || conf.l, - massageEntitlements: conf['massage-entitlements'] || conf.M, + massageEntitlements: conf["massage-entitlements"] || conf.M, mobileprovision: conf.mobileprovision || conf.m, - noEntitlementsFile: conf.C || conf['no-entitlements-file'] || conf.noEntitlementsFile, + noEntitlementsFile: conf.C || conf["no-entitlements-file"] || + conf.noEntitlementsFile, noclean: conf.n || conf.noclean, osversion: conf.osversion || conf.O, - outfile: (conf.output || conf.o) ? path.resolve(conf.output || conf.o) : '', + outfile: (conf.output || conf.o) ? path.resolve(conf.output || conf.o) : "", parallel: conf.parallel || conf.P, - pseudoSign: conf.Z || conf['pseudo-sign'], + pseudoSign: conf.Z || conf["pseudo-sign"], replaceipa: conf.replace || conf.r, run: conf.R || conf.run, - selfSignedProvision: conf.S || conf['self-signed-provision'], + selfSignedProvision: conf.S || conf["self-signed-provision"], single: conf.single || conf.s, unfairPlay: conf.unfair || conf.u, - use7zip: conf['7'] || conf['use-7zip'], - useOpenSSL: conf['use-openssl'], - verify: conf.v || conf.V || conf.verify || conf['verify-twice'], - verifyTwice: conf.V || conf['verify-twice'], - withGetTaskAllow: !(conf['without-get-task-allow'] || conf.t), - withoutPlugins: !!conf['without-plugins'] || !!conf.p, - withoutSigningFiles: !!conf['without-signing-files'] || !!conf.F, - withoutWatchapp: !!conf['without-watchapp'] || !!conf.w, - withoutXCTests: !!conf['without-xctests'] || !!conf.x + use7zip: conf["7"] || conf["use-7zip"], + useOpenSSL: conf["use-openssl"], + verify: conf.v || conf.V || conf.verify || conf["verify-twice"], + verifyTwice: conf.V || conf["verify-twice"], + withGetTaskAllow: !(conf["without-get-task-allow"] || conf.t), + withoutPlugins: !!conf["without-plugins"] || !!conf.p, + withoutSigningFiles: !!conf["without-signing-files"] || !!conf.F, + withoutWatchapp: !!conf["without-watchapp"] || !!conf.w, + withoutXCTests: !!conf["without-xctests"] || !!conf.x, }; return options; } -module.exports = { +export { compile, fromOptions, fromState, helpMessage, parse, - shortHelpMessage + shortHelpMessage, }; diff --git a/lib/depsolver.js b/lib/depsolver.js deleted file mode 100644 index b755bbf..0000000 --- a/lib/depsolver.js +++ /dev/null @@ -1,161 +0,0 @@ -'use strict'; - -// const uniq = require('uniq'); -const fs = require('fs'); -const bin = require('./bin'); - -function resolveRpath (libs, file, lib) { - const libName = lib.substring(6); /* chop @rpath */ - const rpaths = libs.filter((x) => { - return x.indexOf(libName) !== -1; - }); - if (rpaths.length > 0) { - return rpaths[0]; - } - // throw new Error('Cannot resolve rpath: ' + libName); - console.error('Cannot resolve rpath for:', lib, 'from', file); - return null; - /* - const rpaths = uniq(libs.filter((x) => { - return x.indexOf('dylib') !== -1; - }).map((x) => { - return x.substring(0, x.lastIndexOf('/')); - })); - rpaths.forEach((x) => { - try { - const paz = x + realLib; - fs.statSync(paz); - return lib.replace('@rpath', paz); - } catch (e) { - // ignored - } - }); - if (rpaths.length > 0) { - return rpaths[0] + realLib; - } - return realLib; -*/ -} - -function resolvePathDirective (file, lib, directive) { - const slash = file.lastIndexOf('/'); - const rpath = (slash !== -1) ? file.substring(0, slash) : ''; - return lib.replace(directive, rpath); -} - -function resolvePath (executable, file, lib, libs) { - if (lib.startsWith('/')) { - return null; - } - if (lib.startsWith('@rpath')) { - return resolveRpath(libs, file, lib); - } - if (lib.startsWith('@executable_path')) { - return resolvePathDirective(executable, lib, '@executable_path'); - } - if (lib.startsWith('@loader_path')) { - return resolvePathDirective(executable, lib, '@loader_path'); - } - throw new Error('Cannot resolve: ' + file); -} - -function layerize (state) { - let currentLayer = 0; - const result = []; - let processing = false; - do { - result[currentLayer] = []; - for (const lib of Object.keys(state)) { - const deps = state[lib].deps; - if (deps.length === 0) { - if (state[lib].layer === -1) { - result[currentLayer].push(lib); - state[lib].layer = 0; - } - } - let allDepsSolved = true; - for (const dep of deps) { - const depLayer = state[dep] ? state[dep].layer : 0; - if (depLayer === -1 || depLayer === currentLayer) { - allDepsSolved = false; - break; - } - } - processing = true; - if (allDepsSolved) { - if (state[lib].layer === -1) { - result[currentLayer].push(lib); - state[lib].layer = currentLayer; - } - processing = false; - } - } - currentLayer++; - } while (processing); - - return result; -} - -function flattenize (layers) { - const list = []; - for (const layer of layers) { - for (const lib of layer) { - list.push(lib); - } - } - return list; -} - -function depSolver (executable, libs, parallel) { - return new Promise((resolve, reject) => { - if (libs.length === 0) { - return resolve([]); - } - const state = {}; - const peekableLibs = libs.slice(0); - const peek = () => { - const target = peekableLibs.pop(); - const macholibs = bin.enumerateLibraries(target); - state[target] = { - layer: -1, - deps: [] - }; - for (const r of macholibs) { - if (!r.startsWith('/')) { - const realPath = resolvePath(executable, target, r, libs); - try { - fs.statSync(realPath); - state[target].deps.push(realPath); - } catch (e) { - } - } - } - if (peekableLibs.length === 0) { - const layers = layerize(state); - if (parallel) { - return resolve(layers); - } - const finalLibs = flattenize(layers); - if (libs.length !== finalLibs.length) { - console.log('Orphaned libraries found'); - const orphaned = libs.filter(lib => finalLibs.indexOf(lib) === -1); - orphaned.forEach(lib => { - console.log(' *', lib); - }); - - /* - * sign those anyways, just ensure to - * sign them before the app executable - */ - finalLibs.unshift(...orphaned); - } - return resolve(finalLibs); - } - peek(); - }; - peek(); - }); -} - -module.exports = depSolver; -module.exports.resolvePath = resolvePath; diff --git a/lib/depsolver.ts b/lib/depsolver.ts new file mode 100644 index 0000000..21a0062 --- /dev/null +++ b/lib/depsolver.ts @@ -0,0 +1,146 @@ +import fs from "node:fs"; +import * as bin from "./bin.js"; + +function resolveRpath( + libs: string[], + file: string, + lib: string, +): string | null { + const libName = lib.substring(6); /* chop @rpath */ + const rpaths = libs.filter((x: string) => { + return x.indexOf(libName) !== -1; + }); + if (rpaths.length > 0) { + return rpaths[0]; + } + // throw new Error('Cannot resolve rpath: ' + libName); + console.error("Cannot resolve rpath for:", lib, "from", file); + return null; +} + +function resolvePathDirective( + file: string, + lib: string, + directive: string, +): string { + const slash = file.lastIndexOf("/"); + const rpath = slash !== -1 ? file.substring(0, slash) : ""; + return lib.replace(directive, rpath); +} + +export function resolvePath( + executable: string, + file: string, + lib: string, + libs: string[], +) { + if (lib.startsWith("/")) { + return null; + } + if (lib.startsWith("@rpath")) { + return resolveRpath(libs, file, lib); + } + if (lib.startsWith("@executable_path")) { + return resolvePathDirective(executable, lib, "@executable_path"); + } + if (lib.startsWith("@loader_path")) { + return resolvePathDirective(executable, lib, "@loader_path"); + } + throw new Error("Cannot resolve: " + file); +} + +function layerize(state: any) { + let currentLayer = 0; + const result: string[][] = []; + let processing = false; + do { + result[currentLayer] = []; + for (const lib of Object.keys(state)) { + const deps = state[lib].deps; + if (deps.length === 0) { + if (state[lib].layer === -1) { + result[currentLayer].push(lib); + state[lib].layer = 0; + } + } + let allDepsSolved = true; + for (const dep of deps) { + const depLayer = state[dep] ? state[dep].layer : 0; + if (depLayer === -1 || depLayer === currentLayer) { + allDepsSolved = false; + break; + } + } + processing = true; + if (allDepsSolved) { + if (state[lib].layer === -1) { + result[currentLayer].push(lib); + state[lib].layer = currentLayer; + } + processing = false; + } + } + currentLayer++; + } while (processing); + + return result; +} + +export default function depSolver( + executable: string, + libs: string[], + parallel: boolean, +): Promise { + return new Promise((resolve, reject) => { + if (libs.length === 0) { + return resolve([]); + } + const state: Record = {}; + const peekableLibs = libs.slice(0); + const peek = () => { + const target = peekableLibs.pop() as string; + const macholibs = bin.enumerateLibraries(target); + state[target] = { + layer: -1, + deps: [], + }; + for (const r of macholibs) { + if (!r.startsWith("/")) { + const realPath = resolvePath(executable, target!, r, libs); + if (realPath !== null) { + try { + fs.statSync(realPath); + state[target].deps.push(realPath); + } catch (e) {} + } + } + } + if (peekableLibs.length === 0) { + const layers = layerize(state); + if (parallel) { + return resolve(layers); + } + const finalLibs: string[] = layers.flatMap((layer) => layer); + + if (libs.length !== finalLibs.length) { + console.log("Orphaned libraries found"); + const orphaned = libs.filter( + (lib: string) => finalLibs.indexOf(lib) === -1, + ); + orphaned.forEach((lib: any) => { + console.log(" *", lib); + }); + + /* + * sign those anyways, just ensure to + * sign them before the app executable + */ + finalLibs.unshift(...orphaned); + } + return resolve(finalLibs); + } + peek(); + }; + peek(); + }); +} diff --git a/lib/entitlements.js b/lib/entitlements.ts similarity index 56% rename from lib/entitlements.js rename to lib/entitlements.ts index 44a31d8..ede55d5 100644 --- a/lib/entitlements.js +++ b/lib/entitlements.ts @@ -1,7 +1,6 @@ -'use strict'; - -const plist = require('simple-plist'); -const plistBuild = require('plist').build; +import plist from "simple-plist"; +import plistPkg from "plist"; +const { build: plistBuild } = plistPkg; const entitlementTemplate = ` @@ -22,15 +21,13 @@ const entitlementTemplate = ` `; -function defaultEntitlements (appid, devid) { +export default function defaultEntitlements(appid: any, devid: any): string { const ent = plist.parse(entitlementTemplate.trim()); - ent['application-identifier'] = appid; - ent['com.apple.developer.team-identifier'] = devid; - ent['keychain-access-groups'] = [appid]; - ent['com.apple.developer.ubiquity-kvstore-identifier'] = appid; - delete ent['aps-environment']; - ent['com.apple.developer.icloud-container-identifiers'] = 'iCloud.' + devid; + ent["application-identifier"] = appid; + ent["com.apple.developer.team-identifier"] = devid; + ent["keychain-access-groups"] = [appid]; + ent["com.apple.developer.ubiquity-kvstore-identifier"] = appid; + delete ent["aps-environment"]; + ent["com.apple.developer.icloud-container-identifiers"] = "iCloud." + devid; return plistBuild(ent, { pretty: true, allowEmpty: false }).toString(); } - -module.exports = defaultEntitlements; diff --git a/lib/fchk.js b/lib/fchk.js deleted file mode 100644 index 5ea1f70..0000000 --- a/lib/fchk.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function (args, types) { - if (args.length !== types.length) { - throw new Error('Incorrect arguments count'); - } - const stack = [...args].reverse(); - for (const t of types) { - const arg = typeof stack.pop(); - if (t && arg !== t) { - throw new Error('Invalid argument type'); - } - } -}; diff --git a/lib/fchk.ts b/lib/fchk.ts new file mode 100644 index 0000000..3d919df --- /dev/null +++ b/lib/fchk.ts @@ -0,0 +1,13 @@ +// TODO: remove this runtime function check helper function when the typescript port is complete +export default function fchk(args: any, types: any): void { + if (args.length !== types.length) { + throw new Error("Incorrect arguments count"); + } + const stack = [...args].reverse(); + for (const t of types) { + const arg = typeof stack.pop(); + if (t && arg !== t) { + throw new Error("Invalid argument type"); + } + } +} diff --git a/lib/idprov.js b/lib/idprov.js deleted file mode 100644 index 58058c0..0000000 --- a/lib/idprov.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const plist = require('plist'); -const tools = require('./tools'); - -function findIdentityFromProvisionSync (file) { - let data = fs.readFileSync(file).toString(); - const b = data.indexOf(''); - if (e === -1) { - throw new Error('Cannot find end of plist inside ' + file); - } - const cert = plist.parse(data.substring(0, e + 8)).DeveloperCertificates.toString(); - const res = tools.getIdentitiesSync(); - for (const id of res) { - if (cert.indexOf(id.name) !== -1) { - return id.hash; - } - } - throw new Error('Cannot find an identity in ' + file); -} - -module.exports = findIdentityFromProvisionSync; diff --git a/lib/idprov.ts b/lib/idprov.ts new file mode 100644 index 0000000..21edc08 --- /dev/null +++ b/lib/idprov.ts @@ -0,0 +1,27 @@ +"use strict"; + +import fs from "fs"; +import plist from "plist"; +import * as tools from "./tools.js"; + +export default function findIdentityFromProvisionSync(file: any): string { + let data = fs.readFileSync(file).toString(); + const b = data.indexOf(""); + if (e === -1) { + throw new Error("Cannot find end of plist inside " + file); + } + const cert = plist.parse(data.substring(0, e + 8)).DeveloperCertificates + .toString(); + const res = tools.getIdentitiesSync(); + for (const id of res) { + if (cert.indexOf(id.name) !== -1) { + return id.hash; + } + } + throw new Error("Cannot find an identity in " + file); +} diff --git a/lib/info-plist.js b/lib/info-plist.js deleted file mode 100644 index f3fe6aa..0000000 --- a/lib/info-plist.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -const plist = require('simple-plist'); - -const appleDevices = ['iPhone', 'iPad', 'AppleTV', 'AppleWatch']; -const objectFromEntries = (x) => Array.from(x, (k) => ({ [k]: [] })); // ES7 is not yet here - -function fix (file, options, emit) { - const { appdir, bundleid, forceFamily, allowHttp } = options; - if (!file || !appdir) { - throw new Error('Invalid parameters for fixPlist'); - } - let changed = false; - const data = plist.readFileSync(file); - delete data['']; - if (allowHttp) { - emit('message', 'Adding NSAllowArbitraryLoads'); - if (!data.NSAppTransportSecurity || (data.NSAppTransportSecurity.constructor !== Object)) { - data.NSAppTransportSecurity = {}; - } - data.NSAppTransportSecurity.NSAllowsArbitraryLoads = true; - changed = true; - } - if (forceFamily) { - if (performForceFamily(data, emit)) { - changed = true; - } - } - if (bundleid) { - setBundleId(data, bundleid); - changed = true; - } - if (changed) { - plist.writeFileSync(file, data); - } -} - -function setBundleId (data, bundleid) { - const oldBundleId = data.CFBundleIdentifier; - if (oldBundleId) { - data.CFBundleIdentifier = bundleid; - } - if (data.basebundleidentifier) { - data.basebundleidentifier = bundleid; - } - try { - data.CFBundleURLTypes[0].CFBundleURLName = bundleid; - } catch (e) { - /* do nothing */ - } -} - -function performForceFamily (data, emit) { - if (!emit) emit = console.error; - const have = supportedDevices(data); - const df = []; - if (have.iPhone && have.iPhone.length > 0) { - df.push(1); - } - if (have.iPad && have.iPad.length > 0) { - df.push(2); - } - let changes = false; - if (data.UISupportedDevices) { - delete data.UISupportedDevices; - changes = true; - } - if ((have.AppleWatch && have.AppleWatch.length > 0) || (have.AppleTV && have.AppleTV.length > 0)) { - emit('message', 'Apple{TV/Watch} apps do not require to be re-familied'); - return changes; - } - if (df.length === 0) { - emit('message', 'UIDeviceFamily forced to iPhone/iPod'); - df.push(1); - } - if (df.length === 2) { - emit('message', 'No UIDeviceFamily changes required'); - return changes; - } - emit('message', 'UIDeviceFamily set to ' + JSON.stringify(df)); - data.UIDeviceFamily = df; - return true; -} - -function supportedDevices (data) { - const have = objectFromEntries(appleDevices); - const sd = data.UISupportedDevices; - if (Array.isArray(sd)) { - sd.forEach(model => { - for (const type of appleDevices) { - if (model.indexOf(type) !== -1) { - if (!have[type]) { - have[type] = []; - } - have[type].push(model); - break; - } - } - }); - } else if (sd !== undefined) { - console.error('Warning: Invalid UISupportedDevices in Info.plist?'); - } - const df = data.UIDeviceFamily; - if (Array.isArray(df)) { - df.forEach(family => { - const families = ['Any', ...appleDevices]; - const fam = families[family]; - if (fam) { - if (have[fam] === undefined) { - have[fam] = []; - } - have[fam].push(fam); - } - }); - } - return have; -} - -module.exports = fix; diff --git a/lib/info-plist.ts b/lib/info-plist.ts new file mode 100644 index 0000000..74d081c --- /dev/null +++ b/lib/info-plist.ts @@ -0,0 +1,138 @@ +import plist from "simple-plist"; +import { ConfigOptions } from "./config"; + +interface AppleDevices { + iPhone: string[]; + iPad: string[]; + AppleTV: string[]; + AppleWatch: string[]; +} +const appleDeviceNames = ["iPhone", "iPad", "AppleTV", "AppleWatch"]; +/** + * Creates an object with keys from the input array, each mapping to an empty array. + */ +function createEmptyArraysObject(keys: string[]): Record { + return Object.fromEntries(keys.map((key) => [key, []])); +} + +export default function fix( + file: string, + options: ConfigOptions, + emit: any, +): void { + if (!options.appdir) { + throw new Error("Invalid parameters for fixPlist"); + } + let changed = false; + const data = plist.readFileSync(file); + delete data[""]; + if (options.allowHttp) { + emit("message", "Adding NSAllowArbitraryLoads"); + if ( + !data.NSAppTransportSecurity || + data.NSAppTransportSecurity.constructor !== Object + ) { + data.NSAppTransportSecurity = {}; + } + data.NSAppTransportSecurity.NSAllowsArbitraryLoads = true; + changed = true; + } + if (options.forceFamily) { + if (performForceFamily(data, emit)) { + changed = true; + } + } + if (options.bundleid) { + setBundleId(data, options.bundleid); + changed = true; + } + if (changed) { + plist.writeFileSync(file, data); + } +} + +function setBundleId(data: any, bundleid: any) { + const oldBundleId = data.CFBundleIdentifier; + if (oldBundleId) { + data.CFBundleIdentifier = bundleid; + } + if (data.basebundleidentifier) { + data.basebundleidentifier = bundleid; + } + try { + data.CFBundleURLTypes[0].CFBundleURLName = bundleid; + } catch (e) { + /* do nothing */ + } +} + +function performForceFamily(data: any, emit: Function | undefined) { + if (emit === undefined) { + emit = console.error; + } + const have = supportedDevices(data); + const df = []; + if (have.iPhone && have.iPhone.length > 0) { + df.push(1); + } + if (have.iPad && have.iPad.length > 0) { + df.push(2); + } + let changes = false; + if (data.UISupportedDevices) { + delete data.UISupportedDevices; + changes = true; + } + if ( + (have.AppleWatch && have.AppleWatch.length > 0) || + (have.AppleTV && have.AppleTV.length > 0) + ) { + emit("message", "Apple{TV/Watch} apps do not require to be re-familied"); + return changes; + } + if (df.length === 0) { + emit("message", "UIDeviceFamily forced to iPhone/iPod"); + df.push(1); + } + if (df.length === 2) { + emit("message", "No UIDeviceFamily changes required"); + return changes; + } + emit("message", "UIDeviceFamily set to " + JSON.stringify(df)); + data.UIDeviceFamily = df; + return true; +} + +function supportedDevices(data: any) { + const have = createEmptyArraysObject(appleDeviceNames); + const sd = data.UISupportedDevices; + if (Array.isArray(sd)) { + sd.forEach((model) => { + for (const type of appleDeviceNames) { + if (model.indexOf(type) !== -1) { + if (!have[type]) { + have[type] = []; + } + have[type].push(model); + break; + } + } + }); + } else if (sd !== undefined) { + console.error("Warning: Invalid UISupportedDevices in Info.plist?"); + } + const df = data.UIDeviceFamily; + if (Array.isArray(df)) { + df.forEach((family) => { + const families = ["Any", ...appleDeviceNames]; + const fam = families[family]; + if (fam) { + if (have[fam] === undefined) { + have[fam] = []; + } + have[fam].push(fam); + } + }); + } + return have; +} diff --git a/lib/tools.js b/lib/tools.js deleted file mode 100644 index 913b890..0000000 --- a/lib/tools.js +++ /dev/null @@ -1,338 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const { promisify } = require('util'); -const { execSync, spawn } = require('child_process'); -const unlinkAsync = promisify(fs.unlink); -const renameAsync = promisify(fs.rename); -const plist = require('simple-plist'); -const path = require('path'); -const which = require('which'); -const rimraf = require('rimraf'); -const bin = require('./bin'); - -let use7zip = false; -let useOpenSSL = false; - -const cmdSpec = { - '7z': '/usr/local/bin/7z', - codesign: '/usr/bin/codesign', - insert_dylib: 'insert_dylib', - lipo: '/usr/bin/lipo', - /* only when useOpenSSL is true */ - openssl: '/usr/local/bin/openssl', - security: '/usr/bin/security', - unzip: '/usr/bin/unzip', - xcodebuild: '/usr/bin/xcodebuild', - ideviceprovision: '/usr/local/bin/ideviceprovision', - zip: '/usr/bin/zip', - ldid2: 'ldid2' -}; - -const cmd = {}; -let cmdInited = false; - -async function execProgram (bin, arg, opt) { - return new Promise((resolve, reject) => { - let _out = Buffer.alloc(0); - let _err = Buffer.alloc(0); - const child = spawn(bin, arg, opt || {}); - child.stdout.on('data', data => { - _out = Buffer.concat([_out, data]); - }); - child.stderr.on('data', data => { - _err = Buffer.concat([_err, data]); - }); - child.stdin.end(); - child.on('close', code => { - if (code !== 0) { - let msg = 'stdout: ' + _out.toString('utf8'); - msg += '\nstderr: ' + _err.toString('utf8'); - msg += '\ncommand: ' + bin + ' ' + arg.join(' '); - msg += '\ncode: ' + code; - return reject(new Error(msg)); - } - resolve({ - stdout: _out.toString(), - stderr: _err.toString(), - code - }); - }); - }); -} - -/* public */ - -function isDramatic (msg) { - if (msg.indexOf('insert_dylib') !== -1) { - return false; - } - if (msg.indexOf('7z') !== -1) { - return false; - } - return true; -} - -function findInPath () { - if (cmdInited) { - return; - } - cmdInited = true; - const keys = Object.keys(cmdSpec); - for (const key of keys) { - try { - cmd[key] = which.sync(key); - } catch (err) { - } - } -} - -function getTool (tool) { - findInPath(); - if (!(tool in cmd)) { - if (isDramatic(tool)) { - throw new Error(`Warning: tools.findInPath: not found: ${tool}`); - } - return null; - } - return cmd[tool]; -} - -async function ideviceprovision (action, optarg) { - if (action === 'list') { - const res = await execProgram(getTool('ideviceprovision'), ['list'], null); - return res.stdout.split('\n') - .filter((line) => line.indexOf('-') !== -1) - .map((line) => line.split(' ')[0]); - } else { - throw new Error('unsupported ideviceprovision action'); - } -} - -async function codesign (identity, entitlement, keychain, file) { - /* use the --no-strict to avoid the "resource envelope is obsolete" error */ - const args = ['--no-strict']; // http://stackoverflow.com/a/26204757 - if (identity === undefined) { - throw new Error('--identity is required to sign'); - } - args.push('-fs', identity); - // args.push('-v'); - // args.push('--deep'); - if (typeof entitlement === 'string') { - args.push('--entitlements=' + entitlement); - } - if (typeof keychain === 'string') { - args.push('--keychain=' + keychain); - } - args.push('--generate-entitlement-der'); - args.push(file); - return execProgram(getTool('codesign'), args, null); -} - -async function pseudoSign (entitlement, file) { - const args = []; - if (typeof entitlement === 'string') { - args.push('-S' + entitlement); - } else { - args.push('-S'); - } - const identifier = bin.getIdentifier(file); - if (identifier !== null && identifier !== '') { - args.push('-I' + identifier); - } - args.push(file); - return execProgram(getTool('ldid2'), args, null); -} - -async function verifyCodesign (file, keychain, cb) { - const args = ['-v', '--no-strict']; - if (typeof keychain === 'string') { - args.push('--keychain=' + keychain); - } - args.push(file); - return execProgram(getTool('codesign'), args, null, cb); -} - -async function getMobileProvisionPlist (file) { - let res; - if (file === undefined) { - throw new Error('No mobile provisioning file available.'); - } - if (useOpenSSL === true) { - /* portable using openssl */ - const args = ['cms', '-in', file, '-inform', 'der', '-verify']; - res = await execProgram(getTool('openssl'), args, null); - } else { - /* OSX specific using security */ - const args = ['cms', '-D', '-i', file]; - res = await execProgram(getTool('security'), args, null); - } - return plist.parse(res.stdout); -} - -async function getEntitlementsFromMobileProvision (file, cb) { - const res = await getMobileProvisionPlist(file); - return res.Entitlements; -} - -async function zip (cwd, ofile, src) { - try { - await unlinkAsync(ofile); - } catch (ignored) { - } - const ofilePath = path.dirname(ofile); - fs.mkdirSync(ofilePath, { recursive: true }); - if (use7zip) { - const zipFile = ofile + '.zip'; - const args = ['a', zipFile, src]; - await execProgram(getTool('7z'), args, { cwd }); - await renameAsync(zipFile, ofile); - } else { - const args = ['-qry', ofile, src]; - await execProgram(getTool('zip'), args, { cwd }); - } -} - -async function unzip (ifile, odir) { - if (use7zip) { - const args = ['x', '-y', '-o' + odir, ifile]; - return execProgram(getTool('7z'), args, null); - } - if (process.env.UNZIP !== undefined) { - cmd.unzip = process.env.UNZIP; - delete process.env.UNZIP; - } - const args = ['-o', ifile, '-d', odir]; - return execProgram(getTool('unzip'), args, null); -} - -async function xcaToIpa (ifile, odir) { - const args = ['-exportArchive', '-exportFormat', 'ipa', '-archivePath', ifile, '-exportPath', odir]; - return execProgram(getTool('xcodebuild'), args, null); -} - -async function insertLibrary (lib, bin, out) { - let error = null; - try { - const machoMangle = require('macho-mangle'); - try { - let src = fs.readFileSync(bin); - if (lib.indexOf('@rpath') === 0) { - src = machoMangle(src, { - type: 'rpath', - name: '@executable_path/Frameworks' - }); - } - const dst = machoMangle(src, { - type: 'load_dylib', - name: lib, - version: { - current: '1.0.0', - compat: '0.0.0' - } - }); - fs.writeFileSync(bin, dst); - console.log('Library inserted'); - } catch (e) { - error = e; - } - } catch (e) { - if (getTool('insert_dylib') !== null) { - const args = ['--strip-codesig', '--all-yes', lib, bin, bin]; - const res = await execProgram(getTool('insert_dylib'), args, null); - console.error(JSON.stringify(res)); - } else { - error = new Error('Cannot find insert_dylib or macho-mangle'); - } - } - if (error) { - throw error; - } -} - -function getIdentitiesFromString (stdout) { - const lines = stdout.split('\n'); - lines.pop(); // remove last line - const ids = []; - lines.filter(entry => { - return entry.indexOf('CSSMERR_TP_CERT_REVOKED') === -1; - }).forEach((line) => { - const tok = line.indexOf(') '); - if (tok !== -1) { - const msg = line.substring(tok + 2).trim(); - const tok2 = msg.indexOf(' '); - if (tok2 !== -1) { - ids.push({ - hash: msg.substring(0, tok2), - name: msg.substring(tok2 + 1).replace(/^"/, '').replace(/"$/, '') - }); - } - } - }); - return ids; -} - -function getIdentitiesSync (bin, arg) { - const command = [getTool('security'), 'find-identity', '-v', '-p', 'codesigning']; - return getIdentitiesFromString(execSync(command.join(' ')).toString()); -} - -async function getIdentities () { - const args = ['find-identity', '-v', '-p', 'codesigning']; - const res = await execProgram(getTool('security'), args, null); - return getIdentitiesFromString(res.stdout); -} - -async function lipoFile (file, arch, cb) { - const args = [file, '-thin', arch, '-output', file]; - return execProgram(getTool('lipo'), args, null, cb); -} - -function isDirectory (pathString) { - try { - return fs.lstatSync(pathString).isDirectory(); - } catch (e) { - return false; - } -} - -function setOptions (obj) { - if (typeof obj.use7zip === 'boolean') { - use7zip = obj.use7zip; - } - if (typeof obj.useOpenSSL === 'boolean') { - useOpenSSL = obj.useOpenSSL; - } -} - -function asyncRimraf (dir) { - return new Promise((resolve, reject) => { - if (dir === undefined) { - resolve(); - } - rimraf(dir, (err, res) => { - return err ? reject(err) : resolve(res); - }); - }); -} - -[ - codesign, - pseudoSign, - verifyCodesign, - getEntitlementsFromMobileProvision, - getMobileProvisionPlist, - zip, - unzip, - xcaToIpa, - getIdentities, - ideviceprovision, - getIdentitiesSync, - insertLibrary, - lipoFile, - setOptions, - isDirectory, - asyncRimraf -].forEach(function (x) { - module.exports[x.name] = x; -}); diff --git a/lib/tools.ts b/lib/tools.ts new file mode 100644 index 0000000..d52a95e --- /dev/null +++ b/lib/tools.ts @@ -0,0 +1,404 @@ +import fs from "node:fs"; +import { promisify } from "node:util"; +import { execSync, spawn } from "node:child_process"; +const unlinkAsync = promisify(fs.unlink); +const renameAsync = promisify(fs.rename); +import plist from "simple-plist"; +import path from "node:path"; +import which from "which"; +import rimraf from "rimraf"; +import * as bin from "./bin.js"; +// import { ConfigOptions } from "../dist/lib/config.js"; +import { ConfigOptions } from "./config.js"; + +// TODO: remove globals +let use7zip = false; +let useOpenSSL = false; + +const cmdSpec = { + "7z": "/usr/local/bin/7z", + codesign: "/usr/bin/codesign", + insert_dylib: "insert_dylib", + lipo: "/usr/bin/lipo", + /* only when useOpenSSL is true */ + openssl: "/usr/local/bin/openssl", + security: "/usr/bin/security", + unzip: "/usr/bin/unzip", + xcodebuild: "/usr/bin/xcodebuild", + ideviceprovision: "/usr/local/bin/ideviceprovision", + zip: "/usr/bin/zip", + ldid2: "ldid2", +}; + +const cmd: Record = {}; +let cmdInited = false; + +/** + * Result of executing a child process. + */ +interface ExecResult { + stdout: string; + stderr: string; + code: number; +} +/** + * Execute a program and capture stdout, stderr, and exit code. + * @param cmdPath Path to executable + * @param args Array of string arguments + * @param options Spawn options + * @returns Promise resolving to execution result + */ +/** + * Options for spawning child processes used by execProgram. + */ +type ExecOptions = { + cwd?: string; + env?: { [key: string]: string | undefined }; + stdio?: any; +}; +/** + * Execute a program and capture stdout, stderr, and exit code. + * @param cmdPath Path to executable + * @param args Arguments array + * @param options Spawn options + * @returns Execution result + */ +async function execProgram( + cmdPath: string, + args: string[], + options?: ExecOptions, +): Promise { + return new Promise((resolve, reject) => { + let _out = Buffer.alloc(0); + let _err = Buffer.alloc(0); + const child = spawn(cmdPath, args, options || {}); + child.stdout.on("data", (data: Buffer) => { + _out = Buffer.concat([_out, data]); + }); + child.stderr.on("data", (data: Buffer) => { + _err = Buffer.concat([_err, data]); + }); + child.stdin.end(); + child.on("close", (code: number) => { + if (code !== 0) { + let msg = `stdout: ${_out.toString("utf8")}`; + msg += `\nstderr: ${_err.toString("utf8")}`; + msg += `\ncommand: ${cmdPath} ${args.join(" ")}`; + msg += `\ncode: ${code}`; + return reject(new Error(msg)); + } + resolve({ + stdout: _out.toString(), + stderr: _err.toString(), + code, + }); + }); + }); +} + +/* public */ +function findInPath() { + if (cmdInited) { + return; + } + cmdInited = true; + const keys = Object.keys(cmdSpec); + for (const key of keys) { + try { + cmd[key] = which.sync(key); + } catch { + // ignore missing tools + } + } +} + +/** + * Get the path to a tool executable, or throw if not found. + * @param tool Name of the tool + */ +function getTool(tool: string): string { + findInPath(); + if (!(tool in cmd)) { + throw new Error(`tools.findInPath: not found: ${tool}`); + } + return cmd[tool]; +} + +async function ideviceprovision(action: any, optarg?: any) { + if (action === "list") { + const res = await execProgram(getTool("ideviceprovision")!, ["list"]); + return res.stdout + .split("\n") + .filter((line: any) => line.indexOf("-") !== -1) + .map((line: any) => line.split(" ")[0]); + } else { + throw new Error("unsupported ideviceprovision action"); + } +} + +async function codesign( + identity: string, + entitlement: string | undefined, + keychain: string | undefined, + file: string, +) { + if (identity === undefined) { + // XXX: typescript can ensure this at compile time + throw new Error("--identity is required to sign"); + } + /* use the --no-strict to avoid the "resource envelope is obsolete" error */ + const args = ["--no-strict"]; // http://stackoverflow.com/a/26204757 + args.push("-fs", identity); + // args.push('-v'); + // args.push('--deep'); + if (typeof entitlement === "string") { + args.push("--entitlements=" + entitlement); + } + if (typeof keychain === "string") { + args.push("--keychain=" + keychain); + } + args.push("--generate-entitlement-der"); + args.push(file); + return execProgram(getTool("codesign")!, args); +} + +async function pseudoSign(entitlement: any, file: string): Promise { + const args = []; + if (typeof entitlement === "string") { + args.push("-S" + entitlement); + } else { + args.push("-S"); + } + const identifier = bin.getIdentifier(file); + if (identifier !== null && identifier !== "") { + args.push("-I" + identifier); + } + args.push(file); + return execProgram(getTool("ldid2")!, args); +} + +async function verifyCodesign( + file: string, + keychain?: string, +): Promise { + const args = ["-v", "--no-strict"]; + if (typeof keychain === "string") { + args.push("--keychain=" + keychain); + } + args.push(file); + return execProgram(getTool("codesign")!, args); +} + +async function getMobileProvisionPlist(file: string) { + let res; + if (file === undefined) { + throw new Error("No mobile provisioning file available."); + } + if (useOpenSSL === true) { + /* portable using openssl */ + const args = ["cms", "-in", file, "-inform", "der", "-verify"]; + res = await execProgram(getTool("openssl")!, args); + } else { + /* OSX specific using security */ + const args = ["cms", "-D", "-i", file]; + res = await execProgram(getTool("security")!, args); + } + return plist.parse(res.stdout); +} + +async function getEntitlementsFromMobileProvision( + file: string, + cb?: any, +): Promise { + const res = await getMobileProvisionPlist(file); + return res.Entitlements; +} + +async function zip(cwd: string, ofile: string, src: string) { + try { + await unlinkAsync(ofile); + } catch (ignored) {} + const ofilePath = path.dirname(ofile); + fs.mkdirSync(ofilePath, { recursive: true }); + if (use7zip) { + const zipFile = ofile + ".zip"; + const args = ["a", zipFile, src]; + await execProgram(getTool("7z")!, args, { cwd }); + await renameAsync(zipFile, ofile); + } else { + const args = ["-qry", ofile, src]; + await execProgram(getTool("zip")!, args, { cwd }); + } +} + +async function unzip(ifile: string, odir: string) { + if (use7zip) { + const args = ["x", "-y", "-o" + odir, ifile]; + return execProgram(getTool("7z")!, args); + } + if (process.env.UNZIP !== undefined) { + cmd.unzip = process.env.UNZIP; + delete process.env.UNZIP; + } + const args = ["-o", ifile, "-d", odir]; + return execProgram(getTool("unzip")!, args); +} + +async function xcaToIpa(ifile: string, odir: string) { + const args = [ + "-exportArchive", + "-exportFormat", + "ipa", + "-archivePath", + ifile, + "-exportPath", + odir, + ]; + return execProgram(getTool("xcodebuild")!, args); +} + +// XXX: the out parameter is never used. therfor the caller doesnt works well +async function insertLibrary(lib: string, bin: string, out: string) { + let error = null; + try { + const machoMangle = require("macho-mangle"); + try { + let src = fs.readFileSync(bin); + if (lib.indexOf("@rpath") === 0) { + src = machoMangle(src, { + type: "rpath", + name: "@executable_path/Frameworks", + }); + } + const dst = machoMangle(src, { + type: "load_dylib", + name: lib, + version: { + current: "1.0.0", + compat: "0.0.0", + }, + }); + fs.writeFileSync(bin, dst); + console.log("Library inserted"); + } catch (e) { + error = e; + } + } catch (e) { + if (getTool("insert_dylib") !== null) { + const args = ["--strip-codesig", "--all-yes", lib, bin, bin]; + const res = await execProgram(getTool("insert_dylib")!, args); + console.error(JSON.stringify(res)); + } else { + error = new Error("Cannot find insert_dylib or macho-mangle"); + } + } + if (error) { + throw error; + } +} + +export interface Identity { + hash: string; + name: string; +} + +function getIdentitiesFromString(stdout: any): Identity[] { + const lines = stdout.split("\n"); + lines.pop(); // remove last line + const ids: Identity[] = []; + lines + .filter((entry: string) => { + return entry.indexOf("CSSMERR_TP_CERT_REVOKED") === -1; + }) + .forEach((line: string) => { + const tok = line.indexOf(") "); + if (tok !== -1) { + const msg = line.substring(tok + 2).trim(); + const tok2 = msg.indexOf(" "); + if (tok2 !== -1) { + ids.push({ + hash: msg.substring(0, tok2), + name: msg + .substring(tok2 + 1) + .replace(/^"/, "") + .replace(/"$/, ""), + }); + } + } + }); + return ids; +} + +function getIdentitiesSync(): Identity[] { + const command = [ + getTool("security"), + "find-identity", + "-v", + "-p", + "codesigning", + ]; + return getIdentitiesFromString(execSync(command.join(" ")).toString()); +} + +async function getIdentities(): Promise { + const args = ["find-identity", "-v", "-p", "codesigning"]; + const res = await execProgram(getTool("security")!, args); + return getIdentitiesFromString(res.stdout); +} + +async function lipoFile(file: string, arch: string): Promise { + const args = [file, "-thin", arch, "-output", file]; + return execProgram(getTool("lipo")!, args); +} + +function isDirectory(filePath: string): boolean { + try { + return fs.lstatSync(filePath).isDirectory(); + } catch (error) { + return false; + } +} + +export interface GlobalOptions { + use7zip: boolean; + useOpenSSL: boolean; +} + +function setGlobalOptions(obj: GlobalOptions): void { + if (typeof obj.use7zip === "boolean") { + use7zip = obj.use7zip; + } + if (typeof obj.useOpenSSL === "boolean") { + useOpenSSL = obj.useOpenSSL; + } +} + +function asyncRimraf(dir: any) { + return new Promise((resolve, reject) => { + if (dir === undefined) { + resolve(undefined); + } + rimraf(dir, (err: any, res: any) => { + return err ? reject(err) : resolve(res); + }); + }); +} + +export { + asyncRimraf, + codesign, + getEntitlementsFromMobileProvision, + getIdentities, + getIdentitiesSync, + getMobileProvisionPlist, + ideviceprovision, + insertLibrary, + isDirectory, + lipoFile, + pseudoSign, + setGlobalOptions as setOptions, + unzip, + verifyCodesign, + xcaToIpa, + zip, +}; diff --git a/lib/types.d.ts b/lib/types.d.ts new file mode 100644 index 0000000..4e37262 --- /dev/null +++ b/lib/types.d.ts @@ -0,0 +1,16 @@ +declare module "colors"; +declare module "simple-plist"; +declare module "plist"; +declare module "macho-entitlements"; +declare module "macho-is-encrypted"; +declare module "fatmacho"; +declare module "macho"; +declare module "which"; +declare module "rimraf"; + +declare module "fs-walk" { + function walkSync( + appdir, + cb: (basedir: string, filename: string, stat: number) => void, + ); +} diff --git a/lib/version.ts b/lib/version.ts new file mode 100644 index 0000000..3ea0bcc --- /dev/null +++ b/lib/version.ts @@ -0,0 +1,2 @@ +const version = "5.0.1"; +export default version; diff --git a/package-lock.json b/package-lock.json index 5bab2ef..4fa3a1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,13 +11,12 @@ "dependencies": { "colors": "1.4.0", "fatmacho": "0.1.2", - "fs-extra": "^10.1.0", + "fs-extra": "^11.3.0", "fs-walk": "github:trufae/fs-walk#patch-1", "macho": "^1.4.0", "macho-entitlements": "^0.2.3", "macho-is-encrypted": "^0.1.2", - "minimist": "^1.2.6", - "mocha": "9.2.2", + "minimist": "^1.2.8", "plist": "github:TooTallNate/plist.js#e17373ef96510a606b62553bd28845842133ba12", "rimraf": "^3.0.2", "simple-plist": "^1.3.1", @@ -29,29 +28,29 @@ "applesign": "bin/applesign.js" }, "devDependencies": { + "@types/fs-extra": "^11.0.4", + "@types/minimist": "^1.2.5", + "@types/mocha": "^10.0.10", + "@types/node": "^22.15.29", + "@types/uuid": "^8.3.4", + "deno": "^2.3.5", + "mocha": "^11.5.0", "npm": "^10.0.0", "pkg": "5.6.0", - "semistandard": "^17.0.0" + "ts-node": "^10.9.2", + "typescript": "^5.8.3" }, "engines": { "node": ">=20", "npm": ">=10" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -81,94 +80,233 @@ "node": ">=6.9.0" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=12" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "node_modules/@deno/darwin-arm64": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@deno/darwin-arm64/-/darwin-arm64-2.3.5.tgz", + "integrity": "sha512-aXdxFt/GjVAUlGkqNmmXHPvHUfrOlttWnoHdHm91zxXHvz6Iw5e/uN6huXWcEIb5uXgu43q9KeKFFqNGoRBUpw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@deno/darwin-x64": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@deno/darwin-x64/-/darwin-x64-2.3.5.tgz", + "integrity": "sha512-0APfmYq+988sTb+Pp9ot+JZqrYHjJdqrF3U3j+8zZszxD4UgjpXmnO7wuvrO4rFvFktByNKk2Qvmq0aAtMUd8A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@deno/linux-arm64-glibc": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@deno/linux-arm64-glibc/-/linux-arm64-glibc-2.3.5.tgz", + "integrity": "sha512-NE3Ntkf+7X75UfLREVHjLm2wLdeTAt34I8secI8+MLmtiWGtRcJqihnm81SsF3objOLHFDFIeSIT9DHSD2IjDw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@deno/linux-x64-glibc": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@deno/linux-x64-glibc/-/linux-x64-glibc-2.3.5.tgz", + "integrity": "sha512-IQ0QBAEw+3LxLtlU8mxYQw7N8NhTSBClFGGUCjqTA3g+mFdecVH8TAlkm/p44galVohrUZmIo211HqY2InZnMQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@deno/win32-arm64": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@deno/win32-arm64/-/win32-arm64-2.3.5.tgz", + "integrity": "sha512-HPuUSGtHlMuv26Ug4yR77KsLDVvzrZumy49ge/e17kQtAdGC07j5n5vawsviNKLttGqFFonkEPr0vquhq+2+Cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@deno/win32-x64": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@deno/win32-x64/-/win32-x64-2.3.5.tgz", + "integrity": "sha512-KCF6Yp0y8Sy2f5TXIzLh3P0MvlhI6KanIFqt60+RQJfdklTmGmMGfrW7cC4OYSKHOKJaOPjdQce3HNL3DcycvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" + "license": "MIT", + "engines": { + "node": ">=12" }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=10.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, "engines": { - "node": ">=12.22" + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -205,22 +343,96 @@ "node": ">= 8" } }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/fs-extra": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/jsonfile": "*", + "@types/node": "*" + } + }, + "node_modules/@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "dev": true, + "license": "MIT" }, "node_modules/acorn": { "version": "8.11.2", @@ -234,13 +446,17 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/agent-base": { @@ -255,30 +471,6 @@ "node": ">= 6.0.0" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -292,6 +484,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -302,18 +495,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -330,42 +511,18 @@ "readable-stream": "^2.0.6" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-union": { "version": "2.1.0", @@ -376,128 +533,18 @@ "node": ">=8" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", - "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/async": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz", - "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/async": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" - }, - "node_modules/asynciterator.prototype": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", - "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - } - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 4.0.0" } }, "node_modules/balanced-match": { @@ -532,14 +579,6 @@ "node": ">=0.6" } }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -597,6 +636,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -607,7 +647,8 @@ "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "node_modules/buffer": { "version": "5.7.1", @@ -633,57 +674,11 @@ "ieee754": "^1.1.13" } }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/builtins/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, "engines": { "node": ">=10" }, @@ -695,6 +690,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -710,6 +706,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -718,29 +715,19 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/chownr": { @@ -753,6 +740,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -763,6 +751,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -771,6 +760,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -779,6 +769,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -792,6 +783,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -812,6 +804,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -822,7 +815,8 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/colors": { "version": "1.4.0", @@ -849,6 +843,13 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -864,11 +865,13 @@ } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -879,15 +882,11 @@ } } }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, "node_modules/decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, "engines": { "node": ">=10" }, @@ -922,43 +921,31 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, + "node_modules/deno": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/deno/-/deno-2.3.5.tgz", + "integrity": "sha512-4nGPpug2LmZ3kTinnkbiSUmoqSYmerTTjr2OxKw4xrno5W4ILR1dfmVpDsQN8oecT9mEUw+3r/xamdiRNcKBog==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "deno": "bin.cjs" + }, + "optionalDependencies": { + "@deno/darwin-arm64": "2.3.5", + "@deno/darwin-x64": "2.3.5", + "@deno/linux-arm64-glibc": "2.3.5", + "@deno/linux-x64-glibc": "2.3.5", + "@deno/win32-arm64": "2.3.5", + "@deno/win32-x64": "2.3.5" + } + }, "node_modules/detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -972,9 +959,11 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -991,22 +980,18 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } + "license": "MIT" }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/end-of-stream": { "version": "1.4.4", @@ -1022,134 +1007,12 @@ "resolved": "https://registry.npmjs.org/endian-reader/-/endian-reader-0.1.0.tgz", "integrity": "sha1-7tYexWSqX2KFJI82JF4siRVtlKw=" }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", - "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", - "dev": true, - "dependencies": { - "asynciterator.prototype": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.1", - "es-set-tostringtag": "^2.0.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.2.1", - "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.0.1" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1158,6 +1021,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { "node": ">=10" }, @@ -1187,635 +1051,45 @@ "source-map": "~0.6.1" } }, - "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, "bin": { - "eslint": "bin/eslint.js" + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=4" } }, - "node_modules/eslint-config-semistandard": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-17.0.0.tgz", - "integrity": "sha512-tLi0JYmfiiJgtmRhoES55tENatR7y/5aXOh6cBeW+qjzl1+WwyV0arDqR65XN3/xrPZt+/1EG+xNLknV/0jWsQ==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "peerDependencies": { - "eslint": "^8.13.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.0.0", - "eslint-plugin-promise": "^6.0.0" + "engines": { + "node": ">=4.0" } }, - "node_modules/eslint-config-standard": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", - "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0", - "eslint-plugin-promise": "^6.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/eslint-config-standard-jsx": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0.tgz", - "integrity": "sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peerDependencies": { - "eslint": "^8.8.0", - "eslint-plugin-react": "^7.28.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-es": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", - "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", - "dev": true, - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-es/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-n": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", - "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", - "dev": true, - "dependencies": { - "builtins": "^5.0.1", - "eslint-plugin-es": "^4.1.0", - "eslint-utils": "^3.0.0", - "ignore": "^5.1.1", - "is-core-module": "^2.11.0", - "minimatch": "^3.1.2", - "resolve": "^1.22.1", - "semver": "^7.3.8" - }, - "engines": { - "node": ">=12.22.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.33.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", - "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "array.prototype.tosorted": "^1.1.1", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.12", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "object.hasown": "^1.1.2", - "object.values": "^1.1.6", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.4", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.8" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint/node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint/node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint/node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true, "engines": { "node": ">=6" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + } }, "node_modules/fast-glob": { "version": "3.2.11", @@ -1833,12 +1107,6 @@ "node": ">=8.6.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -1862,22 +1130,11 @@ "macho": "^1.4.0" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1889,6 +1146,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1904,37 +1162,39 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, "bin": { "flat": "cli.js" } }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, + "license": "ISC", "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "dependencies": { - "is-callable": "^1.1.3" + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/from2": { @@ -1954,16 +1214,17 @@ "dev": true }, "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.14" } }, "node_modules/fs-walk": { @@ -1979,19 +1240,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2001,33 +1249,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -2048,51 +1269,9 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "6.* || 8.* || >= 10.*" } }, "node_modules/github-from-package": { @@ -2124,6 +1303,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -2131,36 +1311,6 @@ "node": ">= 6" } }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -2181,103 +1331,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "engines": { - "node": ">=4.x" - } - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, "node_modules/has-unicode": { @@ -2302,6 +1367,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, "bin": { "he": "bin/he" } @@ -2344,169 +1410,44 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/into-stream": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", - "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", - "dev": true, - "dependencies": { - "from2": "^2.3.0", - "p-is-promise": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 4" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-core-module": { @@ -2521,41 +1462,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -2568,25 +1483,11 @@ "node": ">=0.10.0" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -2594,153 +1495,29 @@ "node": ">=0.10.0" } }, - "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.12.0" } }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, - "dependencies": { - "which-typed-array": "^1.1.11" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, "engines": { "node": ">=10" }, @@ -2748,40 +1525,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2793,29 +1536,27 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, - "node_modules/iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -2823,42 +1564,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -2867,75 +1572,27 @@ "universalify": "^2.0.0" }, "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, - "engines": { - "node": ">=6" + "graceful-fs": "^4.1.6" } }, - "node_modules/load-json-file/node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -2946,16 +1603,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -2967,18 +1619,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3020,6 +1660,13 @@ "macho-is-encrypted": "bin.js" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3066,9 +1713,23 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } }, "node_modules/mkdirp-classic": { "version": "0.5.3", @@ -3077,62 +1738,185 @@ "dev": true }, "node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.5.0.tgz", + "integrity": "sha512-VKDjhy6LMTKm0WgNEdlY77YVsD49LZnPSXJAaPNL9NRYQADxvORsyG1DIQY6v53BKTnlNbEE2MbVCDbnxr4K3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-stdout": "^1.3.1", + "chokidar": "^4.0.1", + "debug": "^4.3.5", + "diff": "^7.0.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^9.0.5", + "ms": "^2.1.3", + "picocolors": "^1.1.1", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/mocha/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">= 12.0.0" + "node": ">=12" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, "node_modules/mocha/node_modules/minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, "node_modules/multistream": { "version": "4.1.0", @@ -3172,29 +1956,12 @@ "node": ">= 6" } }, - "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, "node_modules/node-abi": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", @@ -3233,14 +2000,6 @@ } } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/npm/-/npm-10.9.2.tgz", @@ -6024,115 +4783,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", - "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1" - } - }, - "node_modules/object.hasown": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", - "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -6171,6 +4821,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6185,6 +4836,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -6195,44 +4847,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { + "node_modules/package-json-from-dist": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } + "license": "BlueOak-1.0.0" }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -6260,6 +4886,30 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -6269,10 +4919,18 @@ "node": ">=8" } }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, "engines": { "node": ">=8.6" }, @@ -6280,15 +4938,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/pkg": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.6.0.tgz", @@ -6323,80 +4972,6 @@ } } }, - "node_modules/pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/pkg-fetch": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.3.0.tgz", @@ -6525,17 +5100,6 @@ "node": ">=0.4.0" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -6546,15 +5110,6 @@ "once": "^1.3.1" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6579,6 +5134,8 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -6607,12 +5164,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, "node_modules/readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -6629,69 +5180,24 @@ } }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", - "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 14.18.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -6713,15 +5219,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6769,99 +5266,18 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/semistandard": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/semistandard/-/semistandard-17.0.0.tgz", - "integrity": "sha512-FnZ77h6LpCjIl0S2kf8utBjBxuFfiV+6DbnFDEJuxWP91el+Syp6P/T54KCJbczmQx9vIy/cXpSOuPzofnrUKA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "eslint": "^8.20.0", - "eslint-config-semistandard": "^17.0.0", - "eslint-config-standard": "17.0.0", - "eslint-config-standard-jsx": "^11.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.2.4", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.30.1", - "standard-engine": "^15.0.0" - }, - "bin": { - "semistandard": "bin/cmd.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -6872,35 +5288,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6922,20 +5309,6 @@ "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -7002,35 +5375,6 @@ "node": ">=0.10.0" } }, - "node_modules/standard-engine": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.1.0.tgz", - "integrity": "sha512-VHysfoyxFu/ukT+9v49d4BRXIokFRZuH3z1VRxzFArZdjSCFpro6rEIU3ji7e4AoAtuSfKBkiOmsrDqKW5ZSRw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "get-stdin": "^8.0.0", - "minimist": "^1.2.6", - "pkg-conf": "^3.1.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/stream-buffers": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", @@ -7071,69 +5415,53 @@ "node": ">=0.10.0" } }, - "node_modules/string.prototype.matchall": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", - "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "regexp.prototype.flags": "^1.5.0", - "set-function-name": "^2.0.0", - "side-channel": "^1.0.4" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, + "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/strip-ansi": { @@ -7148,19 +5476,35 @@ "node": ">=0.10.0" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { - "node": ">=4" + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, "engines": { "node": ">=8" }, @@ -7172,6 +5516,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -7195,10 +5540,11 @@ } }, "node_modules/tar-fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", - "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", + "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", "dev": true, + "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -7236,12 +5582,6 @@ "node": ">= 6" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -7255,6 +5595,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -7268,16 +5609,58 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", "dev": true }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" } }, "node_modules/tslib": { @@ -7310,97 +5693,26 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=14.17" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/uniq": { "version": "1.0.1", @@ -7415,15 +5727,6 @@ "node": ">= 10.0.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -7438,6 +5741,13 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -7468,88 +5778,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", - "dev": true, - "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "dev": true, - "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -7569,14 +5797,36 @@ } }, "node_modules/workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7589,10 +5839,59 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -7601,6 +5900,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -7609,6 +5909,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7622,6 +5923,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7634,15 +5936,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/xmlbuilder": { "version": "15.1.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", @@ -7655,6 +5948,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "engines": { "node": ">=10" } @@ -7669,6 +5963,7 @@ "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -7686,6 +5981,7 @@ "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, "engines": { "node": ">=10" } @@ -7694,6 +5990,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -7708,6 +6005,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -7716,6 +6014,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -7724,6 +6023,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7737,6 +6037,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7744,10 +6045,21 @@ "node": ">=8" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 79e0eea..0101a6f 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "type": "module", "author": { "name": "Sergi Alvarez" }, @@ -10,28 +11,37 @@ "npm": ">=10" }, "scripts": { - "semi": "semistandard", - "indent": "semistandard --fix bin/*.js lib/*.js *.js", + "indent-check": "deno fmt --check", + "indent": "deno fmt", "unzip-lzfse": "git clone https://github.com/sskaje/unzip-lzfse ; cd unzip-lzfse ; chmod +x unix/configure ; LZFSE_PATH=/usr/local make -f unix/Makefile CF='-DUSE_LZFSE=1 -c -O3 -Wall -DBSD -I. -Ibzip2 -DUNIX' LF2=-llzfse all", - "test": "mocha", - "dist": "./dist.sh", - "dist-all": "./dist.sh macos linux freebsd alpine win" + "test": "npm run build && chmod +x dist/bin/applesign.js && node --loader ts-node/esm node_modules/.bin/mocha test/test.ts", + "dist": "./scripts/dist.sh", + "dist-all": "./scripts/dist.sh macos linux freebsd alpine win", + "prebuild": "node scripts/update-version.cjs", + "build": "tsc" }, "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.15.29", + "@types/fs-extra": "^11.0.4", + "@types/minimist": "^1.2.5", + "@types/uuid": "^8.3.4", + "mocha": "^11.5.0", "npm": "^10.0.0", "pkg": "5.6.0", - "semistandard": "^17.0.0" + "ts-node": "^10.9.2", + "typescript": "^5.8.3", + "deno": "^2.3.5" }, "dependencies": { "colors": "1.4.0", "fatmacho": "0.1.2", - "fs-extra": "^10.1.0", + "fs-extra": "^11.3.0", "fs-walk": "github:trufae/fs-walk#patch-1", "macho": "^1.4.0", "macho-entitlements": "^0.2.3", "macho-is-encrypted": "^0.1.2", - "minimist": "^1.2.6", - "mocha": "9.2.2", + "minimist": "^1.2.8", "plist": "github:TooTallNate/plist.js#e17373ef96510a606b62553bd28845842133ba12", "rimraf": "^3.0.2", "simple-plist": "^1.3.1", @@ -42,25 +52,6 @@ "overrides": { "plist": "github:TooTallNate/plist.js#e17373ef96510a606b62553bd28845842133ba12" }, - "files": [ - "LICENSE", - "lib/appdir.js", - "bin/applesign.js", - "lib/bin.js", - "lib/config.js", - "lib/depsolver.js", - "lib/entitlements.js", - "example.js", - "lib/fchk.js", - "lib/idprov.js", - "index.js", - "lib/info-plist.js", - "test/test.js", - "lib/tools.js", - "package.json", - "README.md", - "dist.sh" - ], "description": "API to resign IPA files", "homepage": "https://www.nowsecure.com/", "repository": { @@ -75,25 +66,18 @@ "osx" ], "license": "MIT", - "main": "index.js", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "/dist/**/*.js", + "/dist/index.d.ts" + ], "maintainers": [ { "name": "Sergi Alvarez", "email": "pancake@nowsecure.com" } ], - "semistandard": { - "globals": [ - "describe", - "context", - "before", - "beforeEach", - "after", - "afterEach", - "it", - "expect" - ] - }, "name": "applesign", "version": "5.0.1" } diff --git a/dist.sh b/scripts/dist.sh similarity index 100% rename from dist.sh rename to scripts/dist.sh diff --git a/scripts/update-version.cjs b/scripts/update-version.cjs new file mode 100644 index 0000000..bbe99a8 --- /dev/null +++ b/scripts/update-version.cjs @@ -0,0 +1,11 @@ +const fs = require("fs"); +const path = require("path"); + +const pkg = require("../package.json"); +const versionFile = path.join(__dirname, "../lib/version.ts"); + +fs.writeFileSync( + versionFile, + `const version = "${pkg.version}";\nexport default version;\n`, +); +console.log(`✅ Updated version.ts to ${pkg.version}`); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index eac7066..0000000 --- a/test/test.js +++ /dev/null @@ -1,140 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const spawn = require('child_process').spawn; -const path = require('path'); -const fs = require('fs'); - -const mochaTimeout = 15000; /* 15s */ -const developerCertificate = process.env.DEVCERT; -const ipaDir = 'test/ipa'; - -describe('API', function () { - describe('require', function () { - it('require works', function () { - try { - require('../'); - assert.equal(0, 0); - } catch (e) { - it('require'); - assert.equal(0, 1); - } - }); - }); -}); - -describe('Commandline', function () { - describe('bin/applesign.js', function () { - it('should fail when applesign cannot be executed', function (done) { - let data = ''; - const ipaResign = spawn('bin/applesign.js'); - ipaResign.stdout.on('data', (text) => { - data += text; - }); - ipaResign.on('close', (code) => { - assert.equal(data, ''); - assert.equal(code, 0); - done(); - }); - }); - }); - describe('bin/applesign.js missing.ipa', function () { - it('should fail when passing an unexistent IPA', function (done) { - const ipaResign = spawn('bin/applesign.js', ['missing.ipa']); - ipaResign.on('close', (code) => { - assert.equal(code, 1); - done(); - }); - }); - }); -/* - // XXX this test fails in the CI because no keys has been created yet - describe('bin/applesign.js -L', function () { - it('checking for developer certificates', function (done) { - let data = ''; - const ipaResign = spawn('bin/applesign.js', ['-L']); - ipaResign.stdout.on('data', (text) => { - if (developerCertificate === undefined) { - developerCertificate = text.toString().split(' ')[0]; - } - data += text; - }); - ipaResign.on('close', (code) => { - assert.notEqual(data, ''); - assert.equal(code, 0); - done(); - }); - }); - }); -*/ -}); - -function grabIPAs (file) { - return (file.indexOf('resigned') === -1) && file.endsWith('.ipa'); -} - -/* -function grabResignedIPAs (file) { - return (file.indexOf('resigned') !== -1) && file.endsWith('.ipa'); -} -*/ - -function processIPA (file, parallel) { - describe((parallel ? 'Parallel' : 'Serial') + ' signing', function () { - this.timeout(mochaTimeout); - it(file, function (done) { - let hasData = false; - const ipaFile = path.resolve(path.join(ipaDir, file)); - const ipaResign = spawn('bin/applesign.js', parallel - ? ['-p', '-i', developerCertificate, ipaFile] - : ['-i', developerCertificate, ipaFile]); - ipaResign.stdout.on('data', (text) => { - hasData = true; - }); - ipaResign.stderr.on('data', (text) => { - console.error(text.toString()); - }); - ipaResign.on('close', (code) => { - assert.equal(hasData, true); - assert.equal(code, 0); - done(); - }); - }); - }); -} - -const deployIPA = (file) => { - describe('Deploy ' + file, function () { - this.timeout(mochaTimeout); - it('deploying', function (done) { - let hasData = false; - const ipaResign = spawn('ios-deploy', ['-b', path.join(ipaDir, file)]); - ipaResign.stdout.on('data', (text) => { - hasData = true; - }); - ipaResign.stderr.on('data', (text) => { - console.error(text.toString()); - }); - ipaResign.on('close', (code) => { - assert.equal(hasData, true); - assert.equal(code, 0); - done(); - }); - }); - }); -}; - -describe('Commandline IPA signing', function () { - fs.readdir(ipaDir, function (err, files) { - assert.equal(err, undefined); - describe('Processing', function () { - files.filter(grabIPAs).forEach(function (file) { - it(file, function () { - processIPA(file, false); - processIPA(file, true); - deployIPA(file); - }); - }); - }); - }); -}); diff --git a/test/test.ts b/test/test.ts new file mode 100644 index 0000000..63f7314 --- /dev/null +++ b/test/test.ts @@ -0,0 +1,142 @@ +import * as assert from "node:assert"; +import { spawn } from "node:child_process"; +import * as path from "node:path"; +import * as fs from "node:fs"; +import { describe, it } from "mocha"; + +const mochaTimeout = 15000; +const developerCertificate = process.env.DEVCERT; +const ipaDir = "test/ipa"; + +/* +// cant await import or require because.. mocha/esm +describe("API", () => { + describe("require", () => { + it("require works", async () => { + try { + // const index = await import('./dist/index.js') as any; + assert.strictEqual(0, 0); + } catch (e) { + console.error(e); + assert.fail("require failed"); + } + }); + }); +}); +*/ + +describe("Commandline", () => { + describe("dist/bin/applesign.js", () => { + it("should fail when applesign cannot be executed", (done) => { + let data = ""; + const ipaResign = spawn("dist/bin/applesign.js"); + ipaResign.stdout.on("data", (text) => { + data += text; + }); + ipaResign.on("close", (code) => { + assert.strictEqual(data, ""); + assert.strictEqual(code, 0); + done(); + }); + }); + }); + + describe("dist/bin/applesign.js missing.ipa", () => { + it("should fail when passing a nonexistent IPA", (done) => { + const ipaResign = spawn("dist/bin/applesign.js", ["missing.ipa"]); + ipaResign.on("close", (code) => { + assert.strictEqual(code, 1); + done(); + }); + }); + }); + + /* + describe("bin/applesign.js -L", () => { + it("checking for developer certificates", (done) => { + let data = ""; + const ipaResign = spawn("bin/applesign.js", ["-L"]); + ipaResign.stdout.on("data", (text) => { + if (!developerCertificate) { + developerCertificate = text.toString().split(" ")[0]; + } + data += text; + }); + ipaResign.on("close", (code) => { + assert.notStrictEqual(data, ""); + assert.strictEqual(code, 0); + done(); + }); + }); + }); + */ +}); + +function grabIPAs(file: string): boolean { + return !file.includes("resigned") && file.endsWith(".ipa"); +} + +function processIPA(file: string, parallel: boolean) { + describe(`${parallel ? "Parallel" : "Serial"} signing`, function () { + this.timeout(mochaTimeout); + it(file, (done) => { + let hasData = false; + const ipaFile = path.resolve(path.join(ipaDir, file)); + const args = parallel + ? ["-p", "-i", developerCertificate!, ipaFile] + : ["-i", developerCertificate!, ipaFile]; + const ipaResign = spawn("dist/bin/applesign.js", args); + + ipaResign.stdout.on("data", () => { + hasData = true; + }); + + ipaResign.stderr.on("data", (text) => { + console.error(text.toString()); + }); + + ipaResign.on("close", (code) => { + assert.strictEqual(hasData, true); + assert.strictEqual(code, 0); + done(); + }); + }); + }); +} + +function deployIPA(file: string) { + describe(`Deploy ${file}`, function () { + this.timeout(mochaTimeout); + it("deploying", (done) => { + let hasData = false; + const ipaResign = spawn("ios-deploy", ["-b", path.join(ipaDir, file)]); + ipaResign.stdout.on("data", () => { + hasData = true; + }); + + ipaResign.stderr.on("data", (text) => { + console.error(text.toString()); + }); + + ipaResign.on("close", (code) => { + assert.strictEqual(hasData, true); + assert.strictEqual(code, 0); + done(); + }); + }); + }); +} + +describe("Commandline IPA signing", function () { + this.timeout(30000); // in case reading directory is slow + const files = fs.readdirSync(ipaDir); + describe("Processing", () => { + files.filter(grabIPAs).forEach((file) => { + describe(file, () => { + processIPA(file, false); + processIPA(file, true); + deployIPA(file); + }); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..b836bec --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2020", + "declaration": true, + "module": "ESNext", + "moduleResolution": "node", + "rootDir": ".", + "moduleDetection": "force", + "outDir": "dist", + "strict": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true + }, + "ts-node": { + "esm": true + }, + "include": [ + // include both JS and TS sources for migration + "lib/**/*", + "bin/**/*", + "index.*", + "example.*" + ], + "exclude": ["node_modules", "dist", "test"] +}