second success :D commit

This commit is contained in:
2025-10-10 23:32:24 -04:00
parent 06b59a3a99
commit 4ae53e264b
192 changed files with 2178 additions and 6815 deletions
Vendored
BIN
View File
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
+921
View File
@@ -0,0 +1,921 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DeviceStreaming">
<option name="deviceSelectionList">
<list>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="Sony" />
<option name="codename" value="A402SO" />
<option name="id" value="A402SO" />
<option name="labId" value="google" />
<option name="manufacturer" value="Sony" />
<option name="name" value="Xperia 10" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2520" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="27" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="F01L" />
<option name="id" value="F01L" />
<option name="labId" value="google" />
<option name="manufacturer" value="FUJITSU" />
<option name="name" value="F-01L" />
<option name="screenDensity" value="360" />
<option name="screenX" value="720" />
<option name="screenY" value="1280" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OnePlus" />
<option name="codename" value="OP535DL1" />
<option name="id" value="OP535DL1" />
<option name="labId" value="google" />
<option name="manufacturer" value="OnePlus" />
<option name="name" value="CPH2409" />
<option name="screenDensity" value="401" />
<option name="screenX" value="1080" />
<option name="screenY" value="2412" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OnePlus" />
<option name="codename" value="OP5552L1" />
<option name="id" value="OP5552L1" />
<option name="labId" value="google" />
<option name="manufacturer" value="OnePlus" />
<option name="name" value="CPH2415" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2412" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="OnePlus" />
<option name="codename" value="OP5552L1" />
<option name="id" value="OP5552L1" />
<option name="labId" value="google" />
<option name="manufacturer" value="OnePlus" />
<option name="name" value="CPH2415" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2412" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OPPO" />
<option name="codename" value="OP573DL1" />
<option name="id" value="OP573DL1" />
<option name="labId" value="google" />
<option name="manufacturer" value="OPPO" />
<option name="name" value="CPH2557" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="28" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="SH-01L" />
<option name="id" value="SH-01L" />
<option name="labId" value="google" />
<option name="manufacturer" value="SHARP" />
<option name="name" value="AQUOS sense2 SH-01L" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="Lenovo" />
<option name="codename" value="TB330FU" />
<option name="formFactor" value="Tablet" />
<option name="id" value="TB330FU" />
<option name="labId" value="google" />
<option name="manufacturer" value="Lenovo" />
<option name="name" value="Tab M11" />
<option name="screenDensity" value="240" />
<option name="screenX" value="1200" />
<option name="screenY" value="1920" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a14m" />
<option name="id" value="a14m" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-A145R" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2408" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a15" />
<option name="id" value="a15" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="A15" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a15x" />
<option name="id" value="a15x" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="A15 5G" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a16x" />
<option name="id" value="a16x" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="A16 5G" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a35x" />
<option name="id" value="a35x" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="A35" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="akita" />
<option name="id" value="akita" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="akita" />
<option name="id" value="akita" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="arcfox" />
<option name="id" value="arcfox" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="razr plus 2024" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1080" />
<option name="screenY" value="1272" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="motorola" />
<option name="codename" value="austin" />
<option name="id" value="austin" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g 5G (2022)" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="b0q" />
<option name="id" value="b0q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S22 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="b6q" />
<option name="id" value="b6q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Flip 6" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1080" />
<option name="screenY" value="2640" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="36" />
<option name="brand" value="google" />
<option name="codename" value="blazer" />
<option name="id" value="blazer" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 10 Pro" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2410" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="32" />
<option name="brand" value="google" />
<option name="codename" value="bluejay" />
<option name="id" value="bluejay" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="caiman" />
<option name="id" value="caiman" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro" />
<option name="screenDensity" value="360" />
<option name="screenX" value="960" />
<option name="screenY" value="2142" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="caiman" />
<option name="id" value="caiman" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro" />
<option name="screenDensity" value="360" />
<option name="screenX" value="960" />
<option name="screenY" value="2142" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="comet" />
<option name="default" value="true" />
<option name="id" value="comet" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="comet" />
<option name="default" value="true" />
<option name="id" value="comet" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="crownqlteue" />
<option name="id" value="crownqlteue" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Note9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2220" />
<option name="screenY" value="1080" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm2q" />
<option name="id" value="dm2q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="S23 Plus" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm3q" />
<option name="id" value="dm3q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S23 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="dubai" />
<option name="id" value="dubai" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="edge 30" />
<option name="screenDensity" value="405" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="e1q" />
<option name="default" value="true" />
<option name="id" value="e1q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S24" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="e3q" />
<option name="id" value="e3q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S24 Ultra" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1440" />
<option name="screenY" value="3120" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="eos" />
<option name="id" value="eos" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Eos" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix_camera" />
<option name="id" value="felix_camera" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold (Camera-enabled)" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="fogona" />
<option name="id" value="fogona" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g play - 2024" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="fogos" />
<option name="id" value="fogos" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g34 5G" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="36" />
<option name="brand" value="google" />
<option name="codename" value="frankel" />
<option name="id" value="frankel" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 10" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="g0q" />
<option name="id" value="g0q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-S906U1" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gta9pwifi" />
<option name="id" value="gta9pwifi" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-X210" />
<option name="screenDensity" value="240" />
<option name="screenX" value="1200" />
<option name="screenY" value="1920" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="gts7lwifi" />
<option name="id" value="gts7lwifi" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-T870" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gts7xllite" />
<option name="id" value="gts7xllite" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-T738U" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="gts8uwifi" />
<option name="formFactor" value="Tablet" />
<option name="id" value="gts8uwifi" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S8 Ultra" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1848" />
<option name="screenY" value="2960" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gts8wifi" />
<option name="formFactor" value="Tablet" />
<option name="id" value="gts8wifi" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S8" />
<option name="screenDensity" value="274" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gts9fe" />
<option name="id" value="gts9fe" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S9 FE 5G" />
<option name="screenDensity" value="280" />
<option name="screenX" value="1440" />
<option name="screenY" value="2304" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gts9wifi" />
<option name="id" value="gts9wifi" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-X710" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="husky" />
<option name="id" value="husky" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8 Pro" />
<option name="screenDensity" value="390" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="motorola" />
<option name="codename" value="java" />
<option name="id" value="java" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="G20" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="motorola" />
<option name="codename" value="kansas" />
<option name="id" value="kansas" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g - 2025" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1604" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="komodo" />
<option name="id" value="komodo" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro XL" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="komodo" />
<option name="id" value="komodo" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro XL" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="lion" />
<option name="id" value="lion" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g04" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1612" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="lynx" />
<option name="id" value="lynx" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="lyriq" />
<option name="id" value="lyriq" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="edge 40" />
<option name="screenDensity" value="400" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="manaus" />
<option name="id" value="manaus" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="edge 40 neo" />
<option name="screenDensity" value="400" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="motorola" />
<option name="codename" value="maui" />
<option name="id" value="maui" />
<option name="labId" value="google" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g play - 2023" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="36" />
<option name="brand" value="google" />
<option name="codename" value="mustang" />
<option name="id" value="mustang" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 10 Pro XL" />
<option name="screenDensity" value="390" />
<option name="screenX" value="1080" />
<option name="screenY" value="2404" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="o1q" />
<option name="id" value="o1q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S21" />
<option name="screenDensity" value="421" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="google" />
<option name="codename" value="oriole" />
<option name="id" value="oriole" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="samsung" />
<option name="codename" value="pa3q" />
<option name="id" value="pa3q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S25 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3120" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="panther" />
<option name="id" value="panther" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q5q" />
<option name="id" value="q5q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Z Fold5" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1812" />
<option name="screenY" value="2176" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q6q" />
<option name="id" value="q6q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Z Fold6" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1856" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="r11" />
<option name="formFactor" value="Wear OS" />
<option name="id" value="r11" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Watch" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
<option name="type" value="WEAR_OS" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="r11q" />
<option name="id" value="r11q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-S711U" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="36" />
<option name="brand" value="google" />
<option name="codename" value="rango" />
<option name="id" value="rango" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 10 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="redfin" />
<option name="id" value="redfin" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 5" />
<option name="screenDensity" value="440" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="shiba" />
<option name="id" value="shiba" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="t2q" />
<option name="id" value="t2q" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S21 Plus" />
<option name="screenDensity" value="394" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="tangorpro" />
<option name="formFactor" value="Tablet" />
<option name="id" value="tangorpro" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Tablet" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="tegu" />
<option name="id" value="tegu" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="default" value="true" />
<option name="id" value="tokay" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="default" value="true" />
<option name="id" value="tokay" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="36" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="default" value="true" />
<option name="id" value="tokay" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="xcover7" />
<option name="id" value="xcover7" />
<option name="labId" value="google" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-G556B" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2408" />
</PersistentDeviceSelectionData>
</list>
</option>
</component>
</project>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DeviceTable">
<option name="columnSorters">
<list>
<ColumnSorterState>
<option name="column" value="Name" />
<option name="order" value="ASCENDING" />
</ColumnSorterState>
</list>
</option>
</component>
</project>
+564
View File
@@ -0,0 +1,564 @@
<component name="libraryTable">
<library name="Dart Packages" type="DartPackagesLibraryType">
<properties>
<option name="packageNameToDirsMap">
<entry key="async">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.13.0/lib" />
</list>
</value>
</entry>
<entry key="boolean_selector">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib" />
</list>
</value>
</entry>
<entry key="cached_network_image">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image-3.4.1/lib" />
</list>
</value>
</entry>
<entry key="cached_network_image_platform_interface">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-4.1.1/lib" />
</list>
</value>
</entry>
<entry key="cached_network_image_web">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_web-1.3.1/lib" />
</list>
</value>
</entry>
<entry key="characters">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.4.0/lib" />
</list>
</value>
</entry>
<entry key="clock">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.2/lib" />
</list>
</value>
</entry>
<entry key="collection">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.19.1/lib" />
</list>
</value>
</entry>
<entry key="crypto">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.6/lib" />
</list>
</value>
</entry>
<entry key="fake_async">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.3/lib" />
</list>
</value>
</entry>
<entry key="ffi">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.1.4/lib" />
</list>
</value>
</entry>
<entry key="file">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.1/lib" />
</list>
</value>
</entry>
<entry key="file_picker">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/file_picker-6.2.1/lib" />
</list>
</value>
</entry>
<entry key="fixnum">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/fixnum-1.1.1/lib" />
</list>
</value>
</entry>
<entry key="flutter">
<value>
<list>
<option value="/opt/homebrew/share/flutter/packages/flutter/lib" />
</list>
</value>
</entry>
<entry key="flutter_cache_manager">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_cache_manager-3.4.1/lib" />
</list>
</value>
</entry>
<entry key="flutter_lints">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_lints-3.0.2/lib" />
</list>
</value>
</entry>
<entry key="flutter_plugin_android_lifecycle">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.31/lib" />
</list>
</value>
</entry>
<entry key="flutter_test">
<value>
<list>
<option value="/opt/homebrew/share/flutter/packages/flutter_test/lib" />
</list>
</value>
</entry>
<entry key="flutter_web_plugins">
<value>
<list>
<option value="/opt/homebrew/share/flutter/packages/flutter_web_plugins/lib" />
</list>
</value>
</entry>
<entry key="http">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http-1.5.0/lib" />
</list>
</value>
</entry>
<entry key="http_parser">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.1.2/lib" />
</list>
</value>
</entry>
<entry key="leak_tracker">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2/lib" />
</list>
</value>
</entry>
<entry key="leak_tracker_flutter_testing">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10/lib" />
</list>
</value>
</entry>
<entry key="leak_tracker_testing">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2/lib" />
</list>
</value>
</entry>
<entry key="lints">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/lints-3.0.0/lib" />
</list>
</value>
</entry>
<entry key="matcher">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.17/lib" />
</list>
</value>
</entry>
<entry key="material_color_utilities">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib" />
</list>
</value>
</entry>
<entry key="meta">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.16.0/lib" />
</list>
</value>
</entry>
<entry key="octo_image">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-2.1.0/lib" />
</list>
</value>
</entry>
<entry key="path">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.9.1/lib" />
</list>
</value>
</entry>
<entry key="path_provider">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.1.5/lib" />
</list>
</value>
</entry>
<entry key="path_provider_android">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.2.19/lib" />
</list>
</value>
</entry>
<entry key="path_provider_foundation">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/lib" />
</list>
</value>
</entry>
<entry key="path_provider_linux">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/lib" />
</list>
</value>
</entry>
<entry key="path_provider_platform_interface">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2/lib" />
</list>
</value>
</entry>
<entry key="path_provider_windows">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/lib" />
</list>
</value>
</entry>
<entry key="platform">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/platform-3.1.6/lib" />
</list>
</value>
</entry>
<entry key="plugin_platform_interface">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/lib" />
</list>
</value>
</entry>
<entry key="pull_to_refresh">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pull_to_refresh-2.0.0/lib" />
</list>
</value>
</entry>
<entry key="rxdart">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/rxdart-0.28.0/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.5.3/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences_android">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.15/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences_foundation">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences_linux">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences_platform_interface">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.4.1/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences_web">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/lib" />
</list>
</value>
</entry>
<entry key="shared_preferences_windows">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/lib" />
</list>
</value>
</entry>
<entry key="sky_engine">
<value>
<list>
<option value="/opt/homebrew/share/flutter/bin/cache/pkg/sky_engine/lib" />
</list>
</value>
</entry>
<entry key="source_span">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.1/lib" />
</list>
</value>
</entry>
<entry key="sprintf">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sprintf-7.0.0/lib" />
</list>
</value>
</entry>
<entry key="sqflite">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.4.2/lib" />
</list>
</value>
</entry>
<entry key="sqflite_android">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_android-2.4.2+2/lib" />
</list>
</value>
</entry>
<entry key="sqflite_common">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.5.6/lib" />
</list>
</value>
</entry>
<entry key="sqflite_darwin">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.2/lib" />
</list>
</value>
</entry>
<entry key="sqflite_platform_interface">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_platform_interface-2.4.0/lib" />
</list>
</value>
</entry>
<entry key="stack_trace">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib" />
</list>
</value>
</entry>
<entry key="stream_channel">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.4/lib" />
</list>
</value>
</entry>
<entry key="string_scanner">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.4.1/lib" />
</list>
</value>
</entry>
<entry key="synchronized">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.4.0/lib" />
</list>
</value>
</entry>
<entry key="term_glyph">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.2/lib" />
</list>
</value>
</entry>
<entry key="test_api">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.7.6/lib" />
</list>
</value>
</entry>
<entry key="typed_data">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.4.0/lib" />
</list>
</value>
</entry>
<entry key="uuid">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-4.5.1/lib" />
</list>
</value>
</entry>
<entry key="vector_math">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.2.0/lib" />
</list>
</value>
</entry>
<entry key="vm_service">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-15.0.2/lib" />
</list>
</value>
</entry>
<entry key="web">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web-1.1.1/lib" />
</list>
</value>
</entry>
<entry key="win32">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/win32-5.15.0/lib" />
</list>
</value>
</entry>
<entry key="xdg_directories">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0/lib" />
</list>
</value>
</entry>
</option>
</properties>
<CLASSES>
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.13.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image-3.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-4.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_web-1.3.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.19.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/file_picker-6.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fixnum-1.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_cache_manager-3.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_lints-3.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.31/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http-1.5.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/lints-3.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.17/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.16.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.9.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.1.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.2.19/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/platform-3.1.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pull_to_refresh-2.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/rxdart-0.28.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.5.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.15/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sprintf-7.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.4.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_android-2.4.2+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.5.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_platform_interface-2.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.7.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-4.5.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-15.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web-1.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/win32-5.15.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0/lib" />
<root url="file:///opt/homebrew/share/flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file:///opt/homebrew/share/flutter/packages/flutter/lib" />
<root url="file:///opt/homebrew/share/flutter/packages/flutter_test/lib" />
<root url="file:///opt/homebrew/share/flutter/packages/flutter_web_plugins/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+31
View File
@@ -0,0 +1,31 @@
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/_internal" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/cli" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/concurrent" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/ffi" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/indexed_db" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/js" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/js_interop" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/js_interop_unsafe" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/js_util" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/svg" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://$USER_HOME$/Downloads/flutter/bin/cache/dart-sdk/lib/web_gl" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/shared_preferences_linux/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/shared_preferences_linux/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/shared_preferences_linux/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/shared_preferences_linux/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/shared_preferences_linux/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/linux/flutter/ephemeral/.plugin_symlinks/shared_preferences_linux/example/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows/example/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/shared_preferences_windows/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/shared_preferences_windows/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/shared_preferences_windows/build" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/shared_preferences_windows/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/shared_preferences_windows/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/mangashelf_app/windows/flutter/ephemeral/.plugin_symlinks/shared_preferences_windows/example/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/mangashelf.iml" filepath="$PROJECT_DIR$/.idea/mangashelf.iml" />
</modules>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -2,7 +2,7 @@
# Copy this to .env and modify as needed # Copy this to .env and modify as needed
# Server port # Server port
PORT=3030 PORT=3000
# JWT Secret - CHANGE THIS TO A RANDOM STRING IN PRODUCTION! # JWT Secret - CHANGE THIS TO A RANDOM STRING IN PRODUCTION!
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
-85
View File
@@ -11,12 +11,6 @@
"license": "MIT", "license": "MIT",
"optional": true "optional": true
}, },
"node_modules/@honeo/check": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/@honeo/check/-/check-2.9.0.tgz",
"integrity": "sha512-MgThJJkOUkxymRlBAFdhK5+MoBr0AlkJu6dEfXYQfdgg7XCXezZDB8UhksATyS+UTDeza2ILn0WAIsuFkYSoZw==",
"license": "MIT"
},
"node_modules/@npmcli/fs": { "node_modules/@npmcli/fs": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",
@@ -763,12 +757,6 @@
"license": "ISC", "license": "ISC",
"optional": true "optional": true
}, },
"node_modules/console-wrapper": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-wrapper/-/console-wrapper-1.1.0.tgz",
"integrity": "sha512-ZLZSOGpxU2NzKm7qbTMrMgH8w4eRsRVZJJyxli2tn7hH3UiQy0JLfpMUZiyMlzyZOP2kuPTDV9Nfda8nDz32Mw==",
"license": "MIT"
},
"node_modules/content-disposition": { "node_modules/content-disposition": {
"version": "0.5.4", "version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -1198,20 +1186,6 @@
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"license": "MIT" "license": "MIT"
}, },
"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==",
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/fs-minipass": { "node_modules/fs-minipass": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
@@ -1236,7 +1210,6 @@
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"ideallyInert": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@@ -1743,18 +1716,6 @@
"license": "ISC", "license": "ISC",
"optional": true "optional": true
}, },
"node_modules/jsonfile": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
"integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
"license": "MIT",
"dependencies": {
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/jsonwebtoken": { "node_modules/jsonwebtoken": {
"version": "9.0.2", "version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
@@ -2664,15 +2625,6 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/sanitize-filename": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
"license": "WTFPL OR ISC",
"dependencies": {
"truncate-utf8-bytes": "^1.0.0"
}
},
"node_modules/semver": { "node_modules/semver": {
"version": "7.7.3", "version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
@@ -3242,15 +3194,6 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/truncate-utf8-bytes": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
"license": "WTFPL",
"dependencies": {
"utf8-byte-length": "^1.0.1"
}
},
"node_modules/tunnel-agent": { "node_modules/tunnel-agent": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -3309,15 +3252,6 @@
"imurmurhash": "^0.1.4" "imurmurhash": "^0.1.4"
} }
}, },
"node_modules/universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"license": "MIT",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/unpipe": { "node_modules/unpipe": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -3327,19 +3261,6 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/unrar-promise": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/unrar-promise/-/unrar-promise-3.1.0.tgz",
"integrity": "sha512-pGWfFP8ioIVtDKYOIDQ1Y7ZnVVszAHlk72mc+hFxqHWOa4ZvB5k+iAHJOmpXF1n9a30iZ8iKKkXDFskqMPuSyw==",
"license": "MIT",
"dependencies": {
"@honeo/check": "^2.6.0",
"console-wrapper": "^1.1.0",
"fs-extra": "^10.0.0",
"node-unrar-js": "^2.0.0",
"sanitize-filename": "^1.6.1"
}
},
"node_modules/unzipper": { "node_modules/unzipper": {
"version": "0.10.14", "version": "0.10.14",
"resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz",
@@ -3358,12 +3279,6 @@
"setimmediate": "~1.0.4" "setimmediate": "~1.0.4"
} }
}, },
"node_modules/utf8-byte-length": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",
"integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",
"license": "(WTFPL OR MIT)"
},
"node_modules/util-deprecate": { "node_modules/util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
-9
View File
@@ -1,9 +0,0 @@
/*
comment
*/
function isHoge(arg){
return arg;
}
export default isHoge;
-123
View File
@@ -1,123 +0,0 @@
/*
可変長引数ではないis関数詰め合わせモジュール
略称版メソッドもなし
*/
// 型・インスタンス
import isArray from './is-array.mjs';
import isBoolean from './is-boolean.mjs';
import isBuffer from './is-buffer.mjs';
import isArrayBuffer from './is-array-buffer.mjs';
import isError from './is-error.mjs';
import isFunction from './is-function.mjs';
import isAsyncFunction from './is-async-function.mjs';
import isAsyncGeneratorFunction from './is-async-generator-function.mjs';
import isGeneratorFunction from './is-generator-function.mjs';
import isNumber from './is-number.mjs';
import isRegExp from './is-reg-exp.mjs';
import isStats from './is-stats.mjs';
import isString from './is-string.mjs';
import isUndefined from './is-undefined.mjs';
import isNull from './is-null.mjs';
import isNaN from './is-nan.mjs';
import isDate from './is-date.mjs';
import isEvent from './is-event.mjs';
import isEventTarget from './is-event-target.mjs';
import isObject from './is-object.mjs';
import isPromise from './is-promise.mjs';
import isAbortController from './is-abort-controller.mjs';
import isAbortSignal from './is-abort-signal.mjs';
// Number系
import isOdd from './is-odd.mjs';
import isEven from './is-even.mjs';
import isMultiple from './is-multiple.mjs';
// String系
import isLowercase from './is-lowercase.mjs';
import isUppercase from './is-uppercase.mjs';
import isIPv4 from './is-ipv4.mjs';
import isHostname from './is-hostname.mjs';
// DOM
import isNode from './is-node.mjs';
import isTextNode from './is-text-node.mjs';
import isElement from './is-element.mjs';
import isDocumentFragment from './is-document-fragment.mjs';
// 雑多
import isTrue from './is-true.mjs';
import isFalse from './is-false.mjs';
import isTruthy from './is-truthy.mjs';
import isFalsy from './is-falsy.mjs';
import isInstance from './is-instance.mjs';
import isInstanceof from './is-instanceof.mjs';
import isInstanceOfClassName from './is-instance-of-classname.mjs';
import isNullish from './is-nullish.mjs';
import isObjectLiteral from './is-object-literal.mjs';
import isArrayLike from './is-array-like.mjs';
import isComparisonOperator from './is-comparison-operator.mjs';
import isSameDay from './is-same-day.mjs';
import isSemVer from './is-sem-ver.mjs';
import isVersion from './is-version.mjs';
import isEmpty from './is-empty.mjs';
import isLeapYear from './is-leap-year.mjs';
import isValidDate from './is-valid-date.mjs';
// 返り値
const _is = {
isArray,
isBoolean,
isBuffer,
isArrayBuffer,
isError,
isFunction,
isAsyncFunction,
isAsyncGeneratorFunction,
isGeneratorFunction,
isNumber,
isRegExp,
isStats,
isString,
isUndefined,
isNull,
isNaN,
isDate,
isEvent,
isEventTarget,
isObject,
isPromise,
isAbortController,
isAbortSignal,
isOdd,
isEven,
isMultiple,
isLowercase,
isUppercase,
isIPv4,
isHostname,
isNode,
isTextNode,
isElement,
isDocumentFragment,
isTrue,
isFalse,
isTruthy,
isFalsy,
isInstance,
isInstanceof,
isInstanceOfClassName,
isNullish,
isObjectLiteral,
isArrayLike,
isComparisonOperator,
isSameDay,
isSemVer,
isVersion,
isEmpty,
isLeapYear,
isValidDate
}
export default _is;
@@ -1,14 +0,0 @@
import isObj from './is-object.mjs';
import isFunc from './is-function.mjs';
/*
引数がAbortControllerインスタンスか
Polyfillでも機能するようにしている。
*/
function isAbortController(ac){
return isObj(ac)
&& isFunc(ac.constructor)
&& ac.constructor.name==='AbortController';
}
export default isAbortController;
-15
View File
@@ -1,15 +0,0 @@
import isObj from './is-object.mjs';
import isFunc from './is-function.mjs';
/*
引数がAbortSignalインスタンスか
Polyfillでも機能するようにしている。
*/
function isAbortSignal(abortSignal){
// const isETExtend = abortSignal instanceof EventTarget;
return isObj(abortSignal)
&& isFunc(abortSignal.constructor)
&& abortSignal.constructor.name==='AbortSignal';
}
export default isAbortSignal;
-16
View File
@@ -1,16 +0,0 @@
// Mod
import isInstance from './is-instance.mjs';
/*
ArrayBufferインスタンスか
args
1: any
result
boolean
*/
function isArrayBuffer(arg){
return isInstance(arg, ArrayBuffer);
}
export default isArrayBuffer;
-10
View File
@@ -1,10 +0,0 @@
/*
定義: truthyで、.lengthで数値を返すもの
*/
function isArrayLike(arg){
return !!arg && typeof arg.length==='number';
}
export default isArrayLike;
-5
View File
@@ -1,5 +0,0 @@
function isArray(arg){
return Array.isArray(arg);
}
export default isArray;
-14
View File
@@ -1,14 +0,0 @@
import isInstanceof from './is-instanceof.mjs';
let AsyncFunction;
function isAsyncFunction(arg){
if( !AsyncFunction ){
AsyncFunction = (async()=>0).constructor;
}
return isInstanceof(arg, AsyncFunction);
}
export default isAsyncFunction;
@@ -1,14 +0,0 @@
import isInstanceof from './is-instanceof.mjs';
let AsyncGeneratorFunction;
function isAsyncGeneratorFunction(arg){
if( !AsyncGeneratorFunction ){
AsyncGeneratorFunction = (async function*(){}).constructor;
}
return isInstanceof(arg, AsyncGeneratorFunction);
}
export default isAsyncGeneratorFunction;
-5
View File
@@ -1,5 +0,0 @@
function isBoolean(arg){
return typeof arg==='boolean';
}
export default isBoolean;
-5
View File
@@ -1,5 +0,0 @@
function isBuffer(arg){
return Buffer.isBuffer(arg);
}
export default isBuffer;
@@ -1,22 +0,0 @@
/*
有効な比較演算子の文字列か
[比較演算子 - JavaScript | MDN](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
*/
// 有効な比較演算子のset
const set_co = new Set([
'<',
'>',
'<=',
'>=',
'==',
'!=',
'===',
'!=='
]);
function isComparisonOperator(arg){
return typeof arg==='string' && set_co.has(arg);
}
export default isComparisonOperator;
-5
View File
@@ -1,5 +0,0 @@
function isDate(arg){
return arg instanceof Date;
}
export default isDate;
@@ -1,10 +0,0 @@
/*
comment
*/
import isNode from './is-node.mjs';
function isDocumentFragment(arg){
return isNode(arg) && arg.nodeType===11;
}
export default isDocumentFragment;
-8
View File
@@ -1,8 +0,0 @@
/*
comment
*/
function isElement(arg){
return arg instanceof Element;
}
export default isElement;
-26
View File
@@ -1,26 +0,0 @@
/*
引数が空か
判定基準
文字列
長さが0の場合
配列
長さが0の場合
オブジェクト
keyが存在しない場合
それ以外
常にfalse
*/
function isEmpty(arg){
if(typeof arg==='string'){
return !arg.length;
}else if( Array.isArray(arg) ){
return !arg.length;
}else if(typeof arg==='object' && arg instanceof Object){
return !Object.getOwnPropertyNames(arg).length;
}else{
return false;
}
}
export default isEmpty;
-9
View File
@@ -1,9 +0,0 @@
/*
comment
*/
function isError(arg){
return arg instanceof Error;
}
export default isError;
-11
View File
@@ -1,11 +0,0 @@
// Mod
import isNumber from './is-number.mjs';
/*
偶数判定(0含む)
*/
function isEven(num){
return isNumber(num) && !(num % 2);
}
export default isEven;
-8
View File
@@ -1,8 +0,0 @@
/*
comment
*/
function isEventTarget(arg){
return arg instanceof EventTarget;
}
export default isEventTarget;
-8
View File
@@ -1,8 +0,0 @@
/*
comment
*/
function isEvent(arg){
return arg instanceof Event;
}
export default isEvent;
-9
View File
@@ -1,9 +0,0 @@
/*
comment
*/
function isFalse(arg){
return arg===false;
}
export default isFalse;
-6
View File
@@ -1,6 +0,0 @@
function isFalsy(arg){
return !arg;
}
export default isFalsy;
-5
View File
@@ -1,5 +0,0 @@
function isFunction(arg){
return typeof arg==='function';
}
export default isFunction;
@@ -1,14 +0,0 @@
import isInstanceof from './is-instanceof.mjs';
let GeneratorFunction;
function isGeneratorFunction(arg){
if( !GeneratorFunction ){
GeneratorFunction = (function*(){}).constructor;
}
return isInstanceof(arg, GeneratorFunction);
}
export default isGeneratorFunction;
-33
View File
@@ -1,33 +0,0 @@
// Var
const re_label = /[a-z0-9][a-z0-9-]*[a-z0-9]/;
const re_tld = /[a-z]{2,}|[a-z]{2}\.[a-z]{2}/;
const re_domain = new RegExp(`${re_label.source}\.${re_tld.source}`);
const re_hostname = new RegExp(`^(${re_label.source}\\.)*${re_domain.source}$`, 'i');
/*
ホスト名文字列か
厳密な仕様がよくわからないのでルーズに判定している。
大文字・小文字を区別しない。
実際には混在しているものがあるため。
dotで区切られた半角英数&ハイフン(ラベル)。
大文字・小文字は区別しない。
ハイフンは先頭・末尾NG.
ラベル毎の長さは2-63文字。
どこかで3文字以上と見たが、実際は二文字もよく振られている。
ドメイン部分は2文字もある。
合計255文字まで。
args
1: string
result
boolean
*/
function isHostname(str){
const isU256 = str.length <= 255;
return isU256 && re_hostname.test(str);
}
export default isHostname;
@@ -1,31 +0,0 @@
// mod
import isInstance from './is-instance.mjs';
import isString from './is-string.mjs';
/*
インスタンスの親クラスが指定した名称か
args
1: instance
2: string
3: op, object
return
boolean
*/
function isInstanceOfClassName(instance, str_name, options={debug:false}){
options.debug && console.log('isInstanceOfClassName()', instance, str_name);
if( !isInstance(instance) ){
throw new TypeError('arg1 not instance');
}
if( !isString(str_name) ){
throw new TypeError('arg2 not string');
}
return instance.constructor.name===str_name;
}
export default isInstanceOfClassName;
-31
View File
@@ -1,31 +0,0 @@
// Mod
import isObject from './is-object.mjs';
import isFunction from './is-function.mjs';
/*
args === 2
引数なにかのコンストラクタ関数・クラスのインスタンスか
true条件
オブジェクト
.constructorが関数
.__proto__が上記関数のprototype
args
1: any
result
boolean
*/
function isInstance(any){
if( isObject(any) ){
const parent = any.constructor;
return isFunction(parent) &&
Object.getPrototypeOf(any)===parent.prototype;
}else{
return false;
}
}
export default isInstance;
-19
View File
@@ -1,19 +0,0 @@
/*
instanceof
args
1: any
2: any
result
boolean
*/
function isInstanceof(arg, arg2){
try{
return arg instanceof arg2;
}catch(e){
return false;
}
}
export default isInstanceof;
-19
View File
@@ -1,19 +0,0 @@
// Var
const re_0to255 = /(\d|[1-9]\d|1\d{2}|2(5[0-5]|[0-4]\d))/;
const re_ipv4 = new RegExp(`^(${re_0to255.source}\\.){3}${re_0to255.source}$`);
/*
IPv4アドレス文字列か
dotで区切られた0-255が4つ。
args
1: string
result
boolean
*/
function isIPv4(str){
return re_ipv4.test(str);
}
export default isIPv4;
-36
View File
@@ -1,36 +0,0 @@
/*
閏年判定
引数
1: date or number
返り値
boolean
参考
[うるう年とは - はてなキーワード](http://d.hatena.ne.jp/keyword/%A4%A6%A4%EB%A4%A6%C7%AF)
*/
import isNumber from './is-number.mjs';
import isDate from './is-date.mjs';
function isLeapYear(arg){
if( isNumber(arg) ){
return isLeapYear_number(arg)
}else if( isDate(arg) ){
return isLeapYear_date(arg);
}else{
throw new TypeError(`Invalid arguments: ${arg}`);
}
}
// dateインスタンス用
function isLeapYear_date(date){
const year = date.getFullYear();
return isLeapYear_number(year);
}
// 数値(年)用、本体
function isLeapYear_number(year){
return year % 4 === 0 && (year % 100!==0 || year % 400===0);
}
export default isLeapYear;
-16
View File
@@ -1,16 +0,0 @@
// Mod
import isString from './is-string.mjs';
/*
引数文字列がすべて半角小文字か
*/
function isLowercase(arg){
if( !isString(arg) ){
return false;
}
return /^[a-z]+$/.test(arg);
}
export default isLowercase;
-28
View File
@@ -1,28 +0,0 @@
// Mod
import isNumber from './is-number.mjs';
/*
倍数判定
引数1が引数2の倍数か
args
1: number
2: number
result
boolean
*/
function isMultiple(arg1, arg2){
// validation
if( !isNumber(arg1) ){
throw TypeError('Invalid arguments 1');
}
if( !isNumber(arg2) ){
throw TypeError('Invalid arguments 1');
}
return !(arg1%arg2);
}
export default isMultiple;
-6
View File
@@ -1,6 +0,0 @@
// arg!=argでいい気もするがPolyfill前提のコンセプトのため
function isNaN(arg){
return Number.isNaN(arg);
}
export default isNaN;
-9
View File
@@ -1,9 +0,0 @@
// Mod
import isNumber from './is-number.mjs';
import isObject from './is-object.mjs';
function isNode(arg){
return arg instanceof Node;
}
export default isNode;
-8
View File
@@ -1,8 +0,0 @@
/*
comment
*/
function isNull(arg){
return arg===null;
}
export default isNull;
-19
View File
@@ -1,19 +0,0 @@
/*
null or undef
args
1: any
result
boolean
*/
function isNullish(arg){
if( arg===null ){
return true;
}else if( arg===undefined ){
return true;
}else{
return false;
}
}
export default isNullish;
-6
View File
@@ -1,6 +0,0 @@
function isNumber(arg){
return typeof arg==='number';
}
export default isNumber;
-12
View File
@@ -1,12 +0,0 @@
/*
const obj = {} みたいなの
arg.constructor===Object でもよさそう。
2020.11.08
Object#__proto__ => Object.getPrototypeOf()
*/
function isObjectLiteral(arg){
return Object.getPrototypeOf(arg)===Object.prototype;
}
export default isObjectLiteral;
-13
View File
@@ -1,13 +0,0 @@
/*
typeofと違ってnullは弾く
ChangeLog
2020.10.25
判定をinstanceofから以前の方法に戻した。
Object.create(null) で作られたものを検出できなかったため。
*/
function isObject(arg){
return !!arg && arg===Object(arg);
}
export default isObject;
-10
View File
@@ -1,10 +0,0 @@
/*
奇数判定(0含む)
*/
import isNumber from './is-number.mjs';
function isOdd(num){
return isNumber(num) && !!(num % 2);
}
export default isOdd;
-8
View File
@@ -1,8 +0,0 @@
/*
引数がPromiseインスタンスか
*/
function isPromise(arg){
return arg instanceof Promise;
}
export default isPromise;
-6
View File
@@ -1,6 +0,0 @@
function isRegExp(arg){
return arg instanceof RegExp;
}
export default isRegExp;
-32
View File
@@ -1,32 +0,0 @@
import isDate from './is-date.mjs';
/*
引数のdateインスタンスが同じ日か
args
1...: date
result
boolean
*/
function isSameday(...arr_date){
let str_baseDateText;
for(let date of arr_date ){
if( !isDate(date) ){
throw new TypeError(`Invalid arguments: ${index}`);
}
if( !str_baseDateText ){
str_baseDateText = date.toDateString();
}else{
const str_dateText = date.toDateString();
if(str_baseDateText!==str_dateText){
return false;
}
}
}
return true;
}
export default isSameday;
-22
View File
@@ -1,22 +0,0 @@
/*
SemVerな文字列かどうか
regexpを長々と繋げて頑張ると次弄るときに頭痛くなるから極力分割する
参考
[SemVerのv1.0.0とv2.0.0-rc.1、node-semverを見比べてみた - /var/log/kozy4324](http://kozy4324.github.io/blog/2012/12/19/semver/)
*/
function isSemVer(arg){
if( typeof arg!=='string'){
return false;
}
if( /^\d\.\d\.\d$/.test(arg) ){
return true;
}
if( /^\d\.\d\.\d-[0-9A-Za-z-.]*$/.test(arg) ){
return true;
}
}
export default isSemVer;
-12
View File
@@ -1,12 +0,0 @@
// Mod
import fs from 'fs';
function isStats(arg){
try{
return arg instanceof fs.Stats;
}catch(e){
return false;
}
}
export default isStats;
-5
View File
@@ -1,5 +0,0 @@
function isString(arg){
return typeof arg==='string';
}
export default isString;
-10
View File
@@ -1,10 +0,0 @@
/*
comment
*/
import isNode from './is-node.mjs';
function isTextNode(arg){
return isNode(arg) && arg.nodeType===3;
}
export default isTextNode;
-9
View File
@@ -1,9 +0,0 @@
/*
comment
*/
function isTrue(arg){
return arg===true;
}
export default isTrue;
-5
View File
@@ -1,5 +0,0 @@
function isTruthy(arg){
return !!arg;
}
export default isTruthy;
-6
View File
@@ -1,6 +0,0 @@
function isUndefined(arg){
return arg===undefined;
}
export default isUndefined;
-16
View File
@@ -1,16 +0,0 @@
// Mod
import isString from './is-string.mjs';
/*
引数文字列がすべて大文字か
*/
function isUppercase(arg){
if( !isString(arg) ){
return false;
}
return /^[A-Z]+$/.test(arg);
}
export default isUppercase;
-30
View File
@@ -1,30 +0,0 @@
/*
引数の日時が存在するものかをBooleanで返す
引数
1, 2, 3: number
返り値
boolean
参考
[Vanilla JavaScriptで簡単に日付が有効かどうかチェックする方法 | Rriver](https://parashuto.com/rriver/development/validate-date-using-vanilla-js)
*/
// Mod
import isNumber from './is-number.mjs';
function isValidDate(year, month, day){
if( !isNumber(year, month, day) ){
throw new TypeError(`Invalid arguments`);
}
const date = new Date(year, month-1, day);
const isSameYear = date.getFullYear()===year;
const isSameMonth = date.getMonth()===(month-1);
const isSameDay = date.getDate()===day;
const result = isSameYear && isSameMonth && isSameDay;
return result;
}
export default isValidDate;
-18
View File
@@ -1,18 +0,0 @@
/*
versionを表した数字とdotの文字列か
セーフ
1
1.2
1.2.3
1.2.3.4
アウト
1.2A
其の弐
*/
function isVersion(arg){
return typeof arg==='string' && /^\d(|[0-9.]*\d)$/.test(arg);
}
export default isVersion;
-64
View File
@@ -1,64 +0,0 @@
/*
any
引数どれか一つでも適正ならtrueを返す
*/
// Mod
import _is from './_is/index.mjs'; // 素の判定モジュール詰め合わせ
import config from './config.mjs'; // 設定
// このモジュール返り値
const any = Object.create(null);
/*
_isの関数を元に改名&可変長引数化
可変長引数
引数があれば判定関数を渡してsome、なければfalseを返す
config.variadic.ignoreと一致するメソッド名は無視する
改名
config.shortのpropertyと一致する名前のメソッドは略称版を作る
*/
for(let [key, func] of Object.entries(_is)){
// 関数名作り isFooBar => FooBar, foobar [, FB, fb]
const nameArr = [];
const name1 = key.slice(2);
const name2 = name1.toLowerCase();
nameArr.push(name1, name2);
// 略称版があれば作る
if( config.short[key] ){
const arr_alias = Array.isArray(config.short[key]) ?
config.short[key]:
[config.short[key]];
arr_alias.forEach( (name)=>{
// console.log('methodName:', name);
const str_Camel = name.slice(2); // "is"をカット
const str_lower = str_Camel.toLowerCase(); // "Method" => "method"
nameArr.push(str_Camel, str_lower);
});
}
// 可変長引数化
const method = (function(){
const isVariadic = !config.variadic.ignore.includes(key);
// console.log(`isVariadic: ${key} ${isVariadic}`);
if( isVariadic ){
return (...args)=>{
return args.length ?
args.some(func):
false;
}
}else{
return func;
}
}());
nameArr.forEach( (name)=>{
any[name] = method;
});
}
export default any;
-36
View File
@@ -1,36 +0,0 @@
/*
設定オブジェクトを返す
*/
const config = {
// 可変長引数に関する設定
variadic: {
ignore: [// 無視する関数名(非対応・元から対応などで)
'isInstanceof',
'isInstanceOfClassName',
'isMultiple',
'isValidDate',
'isSameDay'
]
},
// 別名付けるやつ
short: {
isArray: 'isArr',
isBoolean: 'isBool',
isBuffer: 'isBuf',
isArrayBuffer: 'isArrBuf',
isError: 'isErr',
isFunction: ['isFunc', 'isFn'],
isNumber: 'isNum',
isRegExp: 'isRE',
isString: 'isStr',
isObject: 'isObj',
isUndefined: 'isUndef',
isElement: 'isElm',
isDocumentFragment: 'isDF',
isVersion: 'isVer'
}
}
export default config;
-39
View File
@@ -1,39 +0,0 @@
# document
という名の制作メモ。
## 仕様
* ESM
## Mod
### devDependencies
* jsdom
- DOM関連。
## dir構成
### ./
* index.mjs
- is.mjs, not.mjs, any.mjsをまとめて返すだけ。
* is.mjs
- ./\_is/index.mjsを可変長引数化する。
* not.mjs
- is.mjsを元にnot関数を作成する。
* any.mjs
- ./\_is/index.mjsを元にany関数を作成する。
* config.mjs
- 設定オブジェクトを返すモジュール。
### ./\_is.
素の判定関数詰め合わせモジュールを返すディレクトリ。
* index.mjs
- 本体。
* ^is-[a-z-]+\.mjs$
- 個別の判定関数を返すモジュール。
### ./test
* index.mjs
- npm tで呼び出されるテストスクリプト。
-16
View File
@@ -1,16 +0,0 @@
/*
まとめるだけ
もっとスマートな書き方がありそう。
*/
import _is from './is.mjs';
import _not from './not.mjs';
import _any from './any.mjs';
export const is = _is;
export const not = _not;
export const any = _any;
export default {
is, not, any
}
-65
View File
@@ -1,65 +0,0 @@
/*
可変長引数化
*/
// 素の判定モジュール詰め合わせ
import _is from './_is/index.mjs';
// 設定
import config from './config.mjs';
// このモジュール返り値
const is = Object.create(null);
/*
_isの関数を元に改名&可変長引数化
可変長引数
引数があれば判定関数を渡してevery、なければfalseを返す
config.variadic.ignoreと一致するメソッド名は無視する
改名
config.shortのpropertyと一致する名前のメソッドは略称版を作る
*/
for(let [key, func] of Object.entries(_is)){
// 関数名作り isFooBar => FooBar, foobar [, FB, fb]
const nameArr = [];
const name1 = key.slice(2);
const name2 = name1.toLowerCase();
nameArr.push(name1, name2);
// 略称版があれば作る
if( config.short[key] ){
const arr_alias = Array.isArray(config.short[key]) ?
config.short[key]:
[config.short[key]];
arr_alias.forEach( (name)=>{
// console.log('methodName:', name);
const str_Camel = name.slice(2); // "is"をカット
const str_lower = str_Camel.toLowerCase(); // "Method" => "method"
nameArr.push(str_Camel, str_lower);
});
}
// 可変長引数化
const method = (function(){
const isVariadic = !config.variadic.ignore.includes(key);
// console.log(`isVariadic: ${key} ${isVariadic}`);
if( isVariadic ){
return (...args)=>{
return args.length ?
args.every(func):
false;
}
}else{
return func;
}
}());
nameArr.forEach( (name)=>{
is[name] = method;
});
}
export default is;
-14
View File
@@ -1,14 +0,0 @@
/*
isを元にnot作成
*/
import is from './is.mjs';
const not = Object.create(null);
for(let [key, func] of Object.entries(is) ){
not[key] = (...args)=>{
return !func(...args);
}
}
export default not;
-32
View File
@@ -1,32 +0,0 @@
{
"name": "@honeo/check",
"version": "2.9.0",
"description": "型・インスタンスなどの確認",
"main": "index.mjs",
"scripts": {
"test": "node ./test/index.mjs"
},
"author": "honeo",
"license": "MIT",
"devDependencies": {
"@azure/abort-controller": "^1.0.4",
"jsdom": "^16.5.0",
"node-abort-controller": "^3.0.0"
},
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/honeo/check.git"
},
"keywords": [
"check",
"type",
"instance"
],
"bugs": {
"url": "https://github.com/honeo/check/issues"
},
"homepage": "https://github.com/honeo/check#readme"
}
-271
View File
@@ -1,271 +0,0 @@
# check
* [honeo/check](https://github.com/honeo/check)
* [@honeo/check](https://www.npmjs.com/package/@honeo/check)
## なにこれ
型・インスタンス等をチェックするやつ。
## 使い方
```bash
$ npm i @honeo/check
```
```js
import {is, not, any} from '@honeo/check';
is.arr([]); // true
is.arr([], {}); // false
not.arr([], {}); // false
any.arr([], {}); // true
// single
import is from '@honeo/check/is.mjs'; // or not.mjs, any.mjs
// default export
import check from '@honeo/check';
check.is.foobar();
```
```js
// webpack v4~ webpack.config.js
{
node: {
fs: 'empty'
}
}
```
## API
is, not, any共用。
### Alias
```js
is.FooBar===is.foobar; // true
```
### Type, Instance
```js
is.array([]); // true
is.arr([], []); // true
is.boolean(false); // true
is.bool(true, false); // true
is.buffer(new Buffer('foobar')); // true
is.arraybuffer( new ArrayBuffer(0)); // true
is.error(new Error('hoge')); // true
is.function(function(){}); // true
is.func(()=>{}); // true
is.fn(_=>_); // true
is.asyncfunction(async()=>{}); // true
is.asyncgeneratorfunction(async function*(){}); // true
is.generatorfunction(function*(){}); // true
is.number(1); // true
is.num(0, 1); // true
is.regexp(/hoge/); // true
is.re(/foo/, /bar/); // true
is.string('hoge'); // true
is.str('fuga', 'piyo'); // true
is.undefined(undefined); // true
is.undef(null); // false
is.null(null); // true
is.nan(NaN); // true
is.date(new Date()); // true
is.object({}); // true
is.obj(null); // false
is.promise(new Promise(_=>_)); // true
is.stats( fs.statSync('./') ); // true
is.abortcontroller(new AbortController() ); // true
is.abortsignal(new AbortController().signal); // true
```
| name | type | varargs | description |
|:---------------------------------------------- |:---- |:-------:|:------------------------------------------------------------------------------------------------------------------- |
| Array, Arr, array, arr | any | ○ | |
| Boolean, Bool, boolean, bool | any | ○ | |
| Buffer, Buf, buffer, buf | any | ○ | |
| Error, Err, error, err | any | ○ | |
| Function, Func, Fn, function, func, fn | any | ○ | |
| AsyncFunction, asyncfunction | any | ○ | |
| AsyncGeneratorFunction, asyncgeneratorfunction | any | ○ | |
| GeneratorFunction, generatorfunction | any | ○ | |
| Number, Num, number, num | any | ○ | |
| RegExp, RE, regexp, re | any | ○ | |
| String, Str, string, str | any | ○ | |
| Undefined, Undef, undefined, undef | any | ○ | |
| Null, null | any | ○ | |
| NaN, nan | any | ○ | |
| Date, date | any | ○ | |
| Object, Obj, object, obj | any | ○ | |
| Promise, promise | any | ○ | |
| Stats, stats | any | ○ | |
| ArrayBuffer, ArrBuf, arraybuffer, arrbuf | any | ○ | |
| AbortController, abortcontroller | any | ○ | [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)インスタンスか(Polyfill対応)。 |
| AbortSignal, abortsignal | any | ○ | [AbortSignal](https://developer.mozilla.org/ja/docs/Web/API/AbortSignal)インスタンスか(Polyfill対応)。 |
### Number
```js
is.even(2); // true
is.odd(3); // true
is.multiple(8080, 80); // true
```
| name | type | varargs | description |
|:------------------ |:------ |:-------:|:---------------------- |
| Odd, odd | number | ○ | 引数がすべて奇数か。 |
| Even, even | number | ○ | 引数がすべて偶数か。 |
| Multiple, multiple | number | ✗ | 引数1が引数2の倍数か。 |
### String
```js
is.ipv4('192.168.1.1'); // true
is.hostname('www.example.com'); // true
is.lowercase('hoge'); // true
is.uppercase('FOO', 'BAR'); // true
```
| name | type | varargs | description |
|:-------------------- |:------ |:-------:|:-------------- |
| IPv4, ipv4 | string | ○ | |
| Hostname, hostname | string | ○ | やっつけ実装。 |
| Lowercase, lowercase | string | ○ | |
| Uppercase, uppercase | string | ○ | |
### DOM
```js
is.node(document.body, document.createTextNode('hoge')); // true
is.textnode(document.createTextNode('hoge')); // true
is.element(document.head, document.body); // true
is.df(document.createDocumentFragment()); // true
is.event( new Event("hoge") ); // true
is.eventtarget(document, window); // true
```
| name | type | varargs | description |
|:------------------------------------------ |:---- |:-------:|:----------- |
| Node, node | any | ○ | |
| TextNode, textnode | any | ○ | |
| Element, Elm, element, elm | any | ○ | |
| DocumentFragment, DF, documentfragment, df | any | ○ | |
| Event, event | any | ○ | |
| EventTarget, eventtarget | any | ○ | |
### その他
```js
is.true(true, !0); // true
is.false(false !1); // true
is.truthy(true, "hoge", 1, [], {}); // true
is.falsy(null, undefined, "", 0, NaN); // true
is.instance([], {}); // true
is.instance("hoge"); // false
is.instanceof(new Date(), Date); //true
is.instanceOfClassName([], "Array"); // true
is.objectliteral({}); // true
not.objectliteral([], new function(){}); // true
is.arraylike([], 'hoge'); // true
is.comparisonoperator('<='); // true
is.sameDay(new Date(), new Date()); // true
is.semver('1.2.3'); // true
is.semver('1.0.0-foo.bar'); // true
is.version('7.7.4', '2.5.0.1') // true
is.version('1.2A', 1.0); // false
is.empty('', [], {}) // true
is.empty(0, null); // false
is.leapyear(2020, new Date('2024'));
is.validdate(2019, 4, 17); // true
is.validdate(2020, 12, 32); // false
```
| name | type | varargs | description |
|:-------------------------------------------- |:------------ |:-------:|:------------------------------------------------- |
| ArrayLike(), arraylike() | any | ○ | |
| True(), true() | any | ○ | |
| False(), false() | any | ○ | |
| Truthy(), truthy() | any | ○ | |
| Falsy(), falsy() | any | ○ | |
| Empty(), empty() | any | ○ | 要素が空か。 |
| Instance(), instance() | any | ○ | 何らかのインスタンスであるオブジェクトか。 |
| Instanceof(), instanceof() | any | ✗ | 引数1が引数2のConstructor/Classのインスタンスか。 |
| InstanceOfClassName(), instanceofclassname() | instance, string | ✗ | 引数1が引数2の名称を持つClassのインスタンスか。 |
| Nullish(), nullish() | any | ○ | null or undefined |
| ObjectLiteral(), objectliteral() | any | ○ | 未継承の素のオブジェクトか。 |
| ComparisonOperator(), comparisonoperator() | any | ○ | 有効な比較演算子の文字列か。 |
| SameDay(), sameday() | date | ○ | 同じ日か |
| SemVer(), semver() | any | ○ | 有効なSemVer文字列か。 |
| Version(), Ver(), versiom(), ver() | any | ○ | 有効な数字, dotのバージョン文字列か。 |
| LeapYear(), leapyear() | number, date | ○ | 閏年か。 |
| ValidDate(year, mon, day), validdate() | number | ✗ | 存在する日付か。 |
## Breaking Changes
### v2.0.0
#### CommonJS => ES Modules
```js
// before CJS
const {is, not, any} = require('@honeo/check');
// after ESM
import {is, not, any} from '@honeo/check';
```
#### rename: instance() => instanceof()
```js
// before
is.instance([], Array);
// after
is.instanceof([], Array);
```
-759
View File
@@ -1,759 +0,0 @@
// Mod: core
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import url from 'url';
// Mod: npm
import JSDOM from 'jsdom';
// Mod: local
import check from '../index.mjs';
import {is, not, any} from '../index.mjs';
import _is from '../is.mjs';
// jsdom set
global.document = JSDOM.jsdom('hogehoge');
global.head = document.head;
global.window = document.defaultView;
global.Node = window.Node;
global.Element = window.Element;
global.Event = window.Event;
// Var
//const {is, not, any} = check;
const cases = {}
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Main
assert(is===check.is, 'Hybrid export failed')
console.log('.arraybuffer');
if( !is.arraybuffer(new ArrayBuffer(0)) ){
throw new Error('failed');
}
if( !not.arrbuf('hoge') ){
throw new Error('failed');
}
console.log('.abortcontroller');
{
const ac = new AbortController();
if( is.abortcontroller(ac) ){
}else{
throw new Error('native: failed');
}
}
{
const {AbortController} = await import('@azure/abort-controller');
const ac = new AbortController();
if( is.abortcontroller(ac) ){
}else{
throw new Error('@azure/abort-controller: failed');
}
}
{
const {AbortController} = await import('node-abort-controller');
const ac = new AbortController();
if( is.abortcontroller(ac) ){
}else{
throw new Error('node-abort-controller: failed');
}
}
console.log('.abortsignal');
{
const as = new AbortController().signal;
if( is.abortsignal(as) ){
}else{
throw new Error('native: failed');
}
}
{
const {AbortController} = await import('@azure/abort-controller');
const as = new AbortController().signal;
if( is.abortsignal(as) ){
}else{
throw new Error('@azure/abort-controller: failed');
}
}
{
const {AbortController} = await import('node-abort-controller');
const as = new AbortController().signal;
if( is.abortsignal(as) ){
}else{
throw new Error('node-abort-controller: failed');
}
}
console.log('.asyncfunction');
{
const asyncFunc = async()=>{}
const bool = is.asyncfunction(asyncFunc);
if( !bool ){
throw new Error('case async: failed');
}
}
{
const bool = is.asyncfunction(_=>{});
if( bool ){
throw new Error('case sync: failed');
}
}
{
const asyncFunc = async()=>{}
const bool = is.asyncfunction(asyncFunc, asyncFunc);
if( !bool ){
throw new Error('case async2: failed');
}
}
{
const asyncFunc = async()=>{}
const bool = is.asyncfunction(asyncFunc, _=>{});
if( bool ){
throw new Error('case async, sync: failed');
}
}
console.log('.asyncgeneratorfunction');
{
const asyncGeneFunc = async function*(){}
{
const bool = is.asyncgeneratorfunction(asyncGeneFunc);
if( !bool ){
throw new Error('case asyncGene: failed');
}
}
{
const bool = is.asyncgeneratorfunction(_=>{});
if( bool ){
throw new Error('case sync: failed');
}
}
{
const bool = is.asyncgeneratorfunction(asyncGeneFunc, asyncGeneFunc);
if( !bool ){
throw new Error('case asyncGene2: failed');
}
}
{
const bool = is.asyncgeneratorfunction(asyncGeneFunc, _=>{});
if( bool ){
throw new Error('case asyncGene, sync: failed');
}
}
}
console.log('.generatorfunction');
{
const geneFunc = function*(){}
const bool = is.generatorfunction(geneFunc);
if( !bool ){
throw new Error('case gene: failed');
}
}
{
const bool = is.generatorfunction(_=>{});
if( bool ){
throw new Error('case func: failed');
}
}
{
const geneFunc = function*(){}
const bool = is.generatorfunction(geneFunc, geneFunc);
if( !bool ){
throw new Error('case gene2: failed');
}
}
{
const geneFunc = function*(){}
const bool = is.generatorfunction(_=>{}, geneFunc);
if( bool ){
throw new Error('case func, gene: failed');
}
}
console.log('isInstanceOfClassName');
{
let bool;
try{
is.instanceofclassname();
bool = false;
}catch(e){
bool = true;
}
assert(bool, 'case none arg: failed');
}
{
const bool = is.instanceofclassname(new Date(), 'Date');
assert(bool, 'case success: failed');
}
{
const bool = is.instanceofclassname({}, 'Array');
assert(!bool, 'case invalid classname: failed');
}
{
let bool;
try{
is.instanceofclassname(true, false);
bool = false;
}catch(e){
bool = true;
}
assert(bool, 'case invalid arg: failed');
}
console.log('.hostname');
if(
!is.hostname('example.com') &&
!is.hostname('www.example.com') &&
!is.hostname('foo-bar-2000.example.com') &&
!is.hostname('hoge-1234.fu.ga.pi.yo') &&
!is.hostname('Hoge.example.com') &&
not.hostname('-invalid-hostname.example.com') &&
not.hostname('very-long-hostnaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame.example.com')
){
throw new Error('failed');
}
console.log('.ipv4');
if(
!is.ipv4('192.168.1.1') &&
!is.ipv4('0.0.0.0') &&
!is.ipv4('255.255.255.255') &&
!not.ipv4('32.64.128.256') &&
!not.ipv4('123.123.123') &&
!not.ipv4('123.123.123.123.123')
){
throw new Error('failed');
}
// multiple
console.log('.multiple');
{
assert(is.Multiple(4, 2), 'is 4, 2');
assert(is.Multiple(8080, 80), 'is 8080, 80');
assert(not.Multiple(151, 50), 'not 151, 50');
assert(is.Multiple(0, 5), '0が全ての数の倍数になっていない');
assert(is.Multiple(0, 0), '0が0の倍数になっていない');
let bool;
try{
is.Multiple('multiple!');
bool = false;
}catch(e){
bool = true;
}
assert(bool, 'validation failed');
}
console.log('.nullish');
if( !is.nullish(null) ){
throw new Error('failed');
}
if( !is.nullish(undefined) ){
throw new Error('failed');
}
if( !is.nullish(null, undefined) ){
throw new Error('failed');
}
if( !not.nullish(true, "", []) ){
throw new Error('failed');
}
if( not.nullish(null) ){
throw new Error('failed');
}
if( !any.nullish(null, true) ){
throw new Error('failed');
}
console.log('.sameday');
{
if( !is.sameday(new Date(), new Date()) ){
throw new Error('failed1');
}
const bool2 = is.sameday(
new Date(),
new Date('1999')
);
if( bool2 ){
throw new Error('failed2');
}
const bool3 = is.sameday(
new Date(),
new Date(),
new Date()
);
if( !bool3 ){
throw new Error('failed3');
}
}
/// type
// array, arr
cases.array = (arg)=>{
return !is.Array()
&& is.array([])
&& is.Arr([])
&& is.arr([], [])
&& !is.arr('array!')
&& !is.arr([], true);
}
// boolean, bool
cases.boolean = (arg)=>{
return !is.Boolean()
&& is.boolean(true)
&& is.Bool(false)
&& is.bool(true, false)
&& !is.bool('boolean!')
&& !is.bool(true, 'true');
}
// error, err
cases.error = (arg)=>{
return !is.Error()
&& is.error(new Error())
&& is.Err(new Error())
&& is.err(new Error(), new Error())
&& !is.err('error')
&& !is.err(new Error(), 'error');
}
// function, func, fn
cases.function = (arg)=>{
const f = function(){};
return !is.Function()
&& is.function(f)
&& is.Func(f)
&& is.func(f, f)
&& is.fn(f)
&& !is.func('function!')
&& !is.func(f, true);
}
// number, num
cases.number = (arg)=>{
return !is.Number()
&& is.number(123)
&& is.Num(45)
&& is.num(22, 80, 443)
&& !is.num('number!')
&& !is.num(1, true);
}
// regexp, re
cases.regexp = (arg)=>{
const r = /hoge/;
return !is.RegExp()
&& is.regexp(r)
&& is.RE(r)
&& is.re(r, r)
&& !is.re('rexexp!')
&& !is.re(r, true);
}
// string, str
cases.string = (arg)=>{
return !is.String()
&& is.string('hoge')
&& is.Str('fuga')
&& is.str('foo', 'bar')
&& !is.str(123)
&& !is.str('piyo', true);
}
// undefined
cases.undefined = (arg)=>{
return !is.Undefined()
&& is.undefined(undefined)
&& is.undefined(undefined, undefined)
&& !is.undefined(null);
}
// null
cases.null = (arg)=>{
return !is.Null()
&& is.null(null)
&& is.null(null, null)
&& !is.null(undefined);
}
// NaN
cases.nan = (arg)=>{
return !is.NaN()
&& is.nan(NaN)
&& is.nan(NaN, NaN)
&& !is.nan(undefined);
}
/// instance
// buffer
cases.buffer = ()=>{
const buffer = Buffer.from('hoge');
return is.Buffer(buffer)
&& is.Buf(buffer)
&& is.buffer(buffer)
&& is.buf(buffer)
&& !is.Buffer('hoge')
&& !is.Buffer()
&& !is.Buffer(true)
&& !is.Buffer({});
}
// date
cases.date = (arg)=>{
return !is.Date()
&& !is.date({})
&& !is.date('date object')
&& is.date(new Date());
}
// event
cases.event = (arg)=>{
return !is.Event()
&& !is.event({})
&& !is.event('event')
&& is.event( new Event('hoge') );
}
/// jsdomではEventTargetがfunctionではなくobjectなためinstanceofで判定ができないから省略
// // eventtarget
// cases.eventtarget = (arg)=>{
// return !is.eventtarget()
// && !is.eventtarget({})
// && !is.eventtarget('eventtarget')
// && is.eventtarget(window);
// }
// eventtarget
// object, obj
cases.object = (arg)=>{
return !is.Object()
&& is.object({})
&& is.Obj({})
&& is.obj( Object.create(null) )
&& is.obj({}, {})
&& !is.obj('object!')
&& !is.obj({}, true);
}
// stats
cases.stats = (arg)=>{
const stats_dir = fs.statSync('./');
const stats_file = fs.statSync(__filename);
return !is.stats()
&& is.stats(stats_dir)
&& is.stats(stats_dir, stats_file)
&& !is.stats({}, true);
}
// promise
cases.promise = (arg)=>{
const p = new Promise(_=>_);
return !is.Promise()
&& is.promise(p)
&& is.promise(p, p)
&& !is.promise('promise!')
&& !is.promise(p, true);
}
/*
Number
*/
// even
cases.even = (arg)=>{
return is.Even(0)
&& is.even(2)
&& is.even(4, 6)
&& !is.even(8, 9)
&& !is.even('evennumber!');
}
// odd
cases.odd = (arg)=>{
return is.Odd(1)
&& is.odd(3)
&& is.odd(5, 7)
&& !is.odd(9, 10)
&& !is.odd('oddnumber!');
}
/*
String系
*/
cases.lowercase = (arg)=>{
return is.Lowercase('hoge')
&& is.lowercase('foo', 'bar')
&& !is.lowercase('Fuga')
&& !is.lowercase(true);
}
cases.uppercase = (arg)=>{
return is.Uppercase('HOGE')
&& is.uppercase('FOO', 'BAR')
&& !is.uppercase('Fuga')
&& !is.uppercase(true);
}
/// DOM
const textnode = document.createTextNode('');
const element = document.createElement('div');
// node
cases.node = (arg)=>{
return !is.Node()
&& is.node(textnode)
&& is.node(element)
&& is.node(textnode, element)
&& !is.node('node!')
&& !is.node(textnode, true);
}
// textnode
cases.textnode = (arg)=>{
return !is.TextNode()
&& is.textnode(textnode)
&& is.textnode(textnode, textnode)
&& !is.textnode('textnode!')
&& !is.textnode(textnode, true);
}
// element
cases.element = (arg)=>{
return !is.Element()
&& is.Elm(element)
&& is.element(element, element)
&& !is.elm('element!')
&& !is.element(element, true);
}
// documentfragment, df
cases.documentfragment = (arg)=>{
const df = document.createDocumentFragment();
return !is.DocumentFragment()
&& is.documentfragment(df)
&& is.DF(df)
&& is.df(df, df)
&& !is.df('documentfragment!')
&& !is.df(df, true);
}
/*
Other
*/
// true
cases.true = (arg)=>{
return !is.True()
&& is.true(true)
&& is.true(true, true)
&& !is.true('true!')
&& !is.true(true, false);
}
// false
cases.false = (arg)=>{
return !is.False()
&& is.false(false)
&& is.false(false, false)
&& !is.false('false!')
&& !is.false(false, true);
}
// truthy
cases.truthy = (arg)=>{
return !is.Truthy()
&& is.truthy(true)
&& is.truthy("hoge", 123, [], {})
&& !is.truthy(null, undefined)
&& !is.truthy(true, false);
}
// falsy
cases.falsy = (arg)=>{
return !is.Falsy()
&& is.falsy(false)
&& is.falsy("", 0, null, undefined, NaN)
&& !is.falsy(true, "hoge", 123)
&& !is.falsy(true, false);
}
// isInstanceof
cases.instanceof = (arg)=>{
return !is.instanceof()
&& is.instanceof(new Date, Date)
&& !is.instanceof({}, Array)
&& !is.instanceof(true, false);
}
// objectliteral
cases.objectliteral = (arg)=>{
return !is.ObjectLiteral()
&& is.objectliteral({})
&& is.objectliteral({}, new Object({}))
&& !is.objectliteral( new function(){} )
&& !is.objectliteral({}, []);
}
// arraylike
cases.arraylike = (arg)=>{
return !is.ArrayLike()
&& is.arraylike([])
&& is.arraylike('hoge', {length: 0})
&& !is.arraylike(12345)
&& !is.arraylike([], undefined);
}
// isComparisonOperator
cases.comparisonoperator = (arg)=>{
return !is.ComparisonOperator()
&& is.comparisonoperator('<')
&& is.comparisonoperator('!==')
&& !is.comparisonoperator('&&')
&& !is.comparisonoperator(true, '>');
}
// isSemVer
cases.semver = (arg)=>{
return !is.SemVer()
&& is.semver('1.2.3')
&& is.semver('1.0.0-foo.bar', '2.2.2')
&& !is.semver('1.2.3.4')
&& !is.semver(1.0)
&& !is.semver(true, '1.0.0')
}
// isVersion
cases.version = (arg)=>{
return !is.Version()
&& is.Ver('1.2.3')
&& is.version('1.0.0.0', '7.7.7.7.7.7.7')
&& !is.ver('1.2.3.4.')
&& !is.version(1.0)
&& !is.version(true, '1.0.0A')
}
// isEmpty
cases.empty = (arg)=>{
return is.Empty({})
&& is.empty([])
&& is.empty('')
&& !is.empty()
&& !is.empty(null)
&& !is.empty({a: 1})
&& !is.empty([1])
&& !is.empty('0');
}
// isLeapYear
cases.leapyear = (arg)=>{
return is.LeapYear(2020)
&& is.leapyear(new Date('2016'))
&& !is.leapyear(2019)
&& !is.leapyear(new Date('2018'));
}
// isValidDate
cases.isvaliddate = (arg)=>{
return is.ValidDate(2020, 11, 11)
&& is.validdate(2019, 4, 17)
&& !is.validdate(1995, 13, 1)
&& !is.validdate(2010, 4, 32);
}
// 本体
for(let [key, method] of Object.entries(cases)){
if( method() ){
console.log(`${key}: success`);
}else{
throw new Error(`${key}: failed`);
}
}
/*
not
中身はほぼ一緒だから適当
*/
const resultArr = [
// string
not.String(),
!not.string('hoge'),
!not.Str('fuga'),
!not.str('foo', 'bar'),
not.str(123),
not.str(true, false),
not.str('piyo', true),
// element
not.Element(true),
!not.element(element),
// 読み込みチェック
(is===_is)
];
resultArr.forEach( (bool, index, arr)=>{
if( bool ){
console.log(`not: ${index+1}/${arr.length} success`);
}else{
throw new Error(`not: ${index}/${arr.length} failed`);
}
});
/*
any
*/
const resultArr_any = [
any.true(false, true),
any.True(false, true),
!any.Number('123', true),
!any.number('123', true),
!any.Num('123', true),
!any.num('123', true)
];
resultArr_any.forEach( (bool, index, arr)=>{
if( bool ){
console.log(`any: ${index+1}/${arr.length} success`);
}else{
throw new Error(`any: ${index}/${arr.length} failed`);
}
});
console.log('test: done');
-108
View File
@@ -1,108 +0,0 @@
// native console
const _console = console;
// ダミー用
const dummy = function(){}
// 参考: https://developer.mozilla.org/en-US/docs/Web/API/Console
const methodNameArr = [
'_exception',
'assert',
'count',
'debug',
'dir',
'dirxml',
'error',
'group',
'groupCollapsed',
'groupEnd',
'info',
'log',
'profile',
'profileEnd',
'table',
'time',
'timeEnd',
'timeStamp',
'trace',
'warn'
];
// コンストラクタ
function Console(){
this.disable();
this.status = undefined;
}
// 状態
Console.prototype.status = undefined;
// 参照用
Console.prototype._console = _console;
// extで使う引数キャッシュ
Console.prototype.cache = [];
// 通常モード
Console.prototype.enable = function(){
this.status = 'enable';
methodNameArr.forEach( (name)=>{
if( _console[name] ){
this[name] = _console[name].bind(_console);
}
});
}
// ダミーモード、標準設定
Console.prototype.disable = function(){
this.status = 'disable';
methodNameArr.forEach( (name)=>{
this[name] = dummy;
});
}
/*
拡張モード
行数はわからなくなるが任意の処理を挟めるやつ
@param {
cache: boolean,
calback: function,
disable: boolean,
result: boolean
}
.callback が関数ならmethod実行時にcallback({...})
.cache:true なら引数を保存する
.disable:true ならconsole.method()を実行しない。
.result:true なら引数を配列にして返す
@return undefined or [...arg]
*/
Console.prototype.ext = function({cache, callback, disable, result}){
this.status = 'ext';
methodNameArr.forEach( (name)=>{
this[name] = (...arg)=>{
disable===true || _console[name](...arg);
typeof callback==='function' && callback({
target: this,
timestamp: Date.now(),
type: name,
arguments: [...arg]
});
cache && this.cache.push([...arg]);
return this.result && [...arg];
}
});
}
/*
同調モード
console.sync.method();
既に設定されていればそのまま何もしない。
設定されていなければモード切替え。
*/
Console.prototype.__defineGetter__('sync', function(){
return this.status ?
{ext:dummy, enable:dummy, disable:dummy}:
this;
});
module.exports = new Console();
-23
View File
@@ -1,23 +0,0 @@
{
"name": "console-wrapper",
"version": "1.1.0",
"description": "よくあるconsoleのラッパー",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/honeo/console-wrapper.git"
},
"keywords": [
"console",
"wrapper"
],
"author": "honeo",
"license": "MIT",
"bugs": {
"url": "https://github.com/honeo/console-wrapper/issues"
},
"homepage": "https://github.com/honeo/console-wrapper#readme"
}
-51
View File
@@ -1,51 +0,0 @@
## なにこれ
よくあるconsoleラッパー。
require()のキャッシュを利用して同ディレクトリ内モジュールのコンソール動作を一括設定する。
[honeo/console-wrapper](https://github.com/honeo/console-wrapper)
[console-wrapper](https://www.npmjs.com/package/console-wrapper)
## 使い方
```sh
$ npm i console-wrapper
```
```js
const console = require('console-wrapper');
console.log('hoge'); // no output
console.enable();
console.log('hoge'); //"hoge"
```
Method
-----
### .enable()
有効化。
通常のconsoleメソッドを使う。
### .disable()
標準。
無効化、何もしないダミー関数を使う。
### .extension({...})
有効化(拡張モード)、行数が表示されなくなる代わりに……。
.cache: trueならコンソールメソッド実行時に引数を保存する。
.callback: 関数ならコンソールメソッド実行時に引数を渡して実行する。
.disable: trueならコンソールメソッドは実行しない。
.result: trueならコンソールメソッド実行後に引数を配列に入れて返す。
```js
// example
console.ext({
cache: false,
callback({type, arguments}){},
disable: false,
result: false
});
```
### .sync.method();
既に動作モードが設定されていればそのまま。
されていなければ.method()を実行する。
## Properties
### .cache
.ext({cache: true}) 時にコンソールメソッド実行時の引数が配列で保存される。
メモリに注意。
### ._console
ネイティブのconsoleオブジェクトへの参照。
-15
View File
@@ -1,15 +0,0 @@
(The MIT License)
Copyright (c) 2011-2017 JP Richardson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-262
View File
@@ -1,262 +0,0 @@
Node.js: fs-extra
=================
`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
[![License](https://img.shields.io/npm/l/fs-extra.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
[![build status](https://img.shields.io/github/workflow/status/jprichardson/node-fs-extra/Node.js%20CI/master)](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
Why?
----
I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
Installation
------------
npm install fs-extra
Usage
-----
`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
You don't ever need to include the original `fs` module again:
```js
const fs = require('fs') // this is no longer necessary
```
you can now do this:
```js
const fs = require('fs-extra')
```
or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
to name your `fs` variable `fse` like so:
```js
const fse = require('fs-extra')
```
you can also keep both, but it's redundant:
```js
const fs = require('fs')
const fse = require('fs-extra')
```
Sync vs Async vs Async/Await
-------------
Most methods are async by default. All async methods will return a promise if the callback isn't passed.
Sync methods on the other hand will throw if an error occurs.
Also Async/Await will throw an error if one occurs.
Example:
```js
const fs = require('fs-extra')
// Async with promises:
fs.copy('/tmp/myfile', '/tmp/mynewfile')
.then(() => console.log('success!'))
.catch(err => console.error(err))
// Async with callbacks:
fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
if (err) return console.error(err)
console.log('success!')
})
// Sync:
try {
fs.copySync('/tmp/myfile', '/tmp/mynewfile')
console.log('success!')
} catch (err) {
console.error(err)
}
// Async/Await:
async function copyFiles () {
try {
await fs.copy('/tmp/myfile', '/tmp/mynewfile')
console.log('success!')
} catch (err) {
console.error(err)
}
}
copyFiles()
```
Methods
-------
### Async
- [copy](docs/copy.md)
- [emptyDir](docs/emptyDir.md)
- [ensureFile](docs/ensureFile.md)
- [ensureDir](docs/ensureDir.md)
- [ensureLink](docs/ensureLink.md)
- [ensureSymlink](docs/ensureSymlink.md)
- [mkdirp](docs/ensureDir.md)
- [mkdirs](docs/ensureDir.md)
- [move](docs/move.md)
- [outputFile](docs/outputFile.md)
- [outputJson](docs/outputJson.md)
- [pathExists](docs/pathExists.md)
- [readJson](docs/readJson.md)
- [remove](docs/remove.md)
- [writeJson](docs/writeJson.md)
### Sync
- [copySync](docs/copy-sync.md)
- [emptyDirSync](docs/emptyDir-sync.md)
- [ensureFileSync](docs/ensureFile-sync.md)
- [ensureDirSync](docs/ensureDir-sync.md)
- [ensureLinkSync](docs/ensureLink-sync.md)
- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
- [mkdirpSync](docs/ensureDir-sync.md)
- [mkdirsSync](docs/ensureDir-sync.md)
- [moveSync](docs/move-sync.md)
- [outputFileSync](docs/outputFile-sync.md)
- [outputJsonSync](docs/outputJson-sync.md)
- [pathExistsSync](docs/pathExists-sync.md)
- [readJsonSync](docs/readJson-sync.md)
- [removeSync](docs/remove-sync.md)
- [writeJsonSync](docs/writeJson-sync.md)
**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
### What happened to `walk()` and `walkSync()`?
They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
Third Party
-----------
### CLI
[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
### TypeScript
If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
### File / Directory Watching
If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
### Obtain Filesystem (Devices, Partitions) Information
[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
### Misc.
- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
Hacking on fs-extra
-------------------
Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
What's needed?
- First, take a look at existing issues. Those are probably going to be where the priority lies.
- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
- Improve test coverage.
Note: If you make any big changes, **you should definitely file an issue for discussion first.**
### Running the Test Suite
fs-extra contains hundreds of tests.
- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
- `npm run unit`: runs the unit tests
- `npm test`: runs both the linter and the tests
### Windows
If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
However, I didn't have much luck doing this.
Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
net use z: "\\vmware-host\Shared Folders"
I can then navigate to my `fs-extra` directory and run the tests.
Naming
------
I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
* https://github.com/jprichardson/node-fs-extra/issues/2
* https://github.com/flatiron/utile/issues/11
* https://github.com/ryanmcgrath/wrench-js/issues/29
* https://github.com/substack/node-mkdirp/issues/17
First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
Credit
------
`fs-extra` wouldn't be possible without using the modules from the following authors:
- [Isaac Shlueter](https://github.com/isaacs)
- [Charlie McConnel](https://github.com/avianflu)
- [James Halliday](https://github.com/substack)
- [Andrew Kelley](https://github.com/andrewrk)
License
-------
Licensed under MIT
Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
[1]: http://nodejs.org/docs/latest/api/fs.html
[jsonfile]: https://github.com/jprichardson/node-jsonfile
-169
View File
@@ -1,169 +0,0 @@
'use strict'
const fs = require('graceful-fs')
const path = require('path')
const mkdirsSync = require('../mkdirs').mkdirsSync
const utimesMillisSync = require('../util/utimes').utimesMillisSync
const stat = require('../util/stat')
function copySync (src, dest, opts) {
if (typeof opts === 'function') {
opts = { filter: opts }
}
opts = opts || {}
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
// Warn about using preserveTimestamps on 32-bit node
if (opts.preserveTimestamps && process.arch === 'ia32') {
process.emitWarning(
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
'Warning', 'fs-extra-WARN0002'
)
}
const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
stat.checkParentPathsSync(src, srcStat, dest, 'copy')
return handleFilterAndCopy(destStat, src, dest, opts)
}
function handleFilterAndCopy (destStat, src, dest, opts) {
if (opts.filter && !opts.filter(src, dest)) return
const destParent = path.dirname(dest)
if (!fs.existsSync(destParent)) mkdirsSync(destParent)
return getStats(destStat, src, dest, opts)
}
function startCopy (destStat, src, dest, opts) {
if (opts.filter && !opts.filter(src, dest)) return
return getStats(destStat, src, dest, opts)
}
function getStats (destStat, src, dest, opts) {
const statSync = opts.dereference ? fs.statSync : fs.lstatSync
const srcStat = statSync(src)
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
else if (srcStat.isFile() ||
srcStat.isCharacterDevice() ||
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
throw new Error(`Unknown file: ${src}`)
}
function onFile (srcStat, destStat, src, dest, opts) {
if (!destStat) return copyFile(srcStat, src, dest, opts)
return mayCopyFile(srcStat, src, dest, opts)
}
function mayCopyFile (srcStat, src, dest, opts) {
if (opts.overwrite) {
fs.unlinkSync(dest)
return copyFile(srcStat, src, dest, opts)
} else if (opts.errorOnExist) {
throw new Error(`'${dest}' already exists`)
}
}
function copyFile (srcStat, src, dest, opts) {
fs.copyFileSync(src, dest)
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
return setDestMode(dest, srcStat.mode)
}
function handleTimestamps (srcMode, src, dest) {
// Make sure the file is writable before setting the timestamp
// otherwise open fails with EPERM when invoked with 'r+'
// (through utimes call)
if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
return setDestTimestamps(src, dest)
}
function fileIsNotWritable (srcMode) {
return (srcMode & 0o200) === 0
}
function makeFileWritable (dest, srcMode) {
return setDestMode(dest, srcMode | 0o200)
}
function setDestMode (dest, srcMode) {
return fs.chmodSync(dest, srcMode)
}
function setDestTimestamps (src, dest) {
// The initial srcStat.atime cannot be trusted
// because it is modified by the read(2) system call
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
const updatedSrcStat = fs.statSync(src)
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
}
function onDir (srcStat, destStat, src, dest, opts) {
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
return copyDir(src, dest, opts)
}
function mkDirAndCopy (srcMode, src, dest, opts) {
fs.mkdirSync(dest)
copyDir(src, dest, opts)
return setDestMode(dest, srcMode)
}
function copyDir (src, dest, opts) {
fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
}
function copyDirItem (item, src, dest, opts) {
const srcItem = path.join(src, item)
const destItem = path.join(dest, item)
const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
return startCopy(destStat, srcItem, destItem, opts)
}
function onLink (destStat, src, dest, opts) {
let resolvedSrc = fs.readlinkSync(src)
if (opts.dereference) {
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
}
if (!destStat) {
return fs.symlinkSync(resolvedSrc, dest)
} else {
let resolvedDest
try {
resolvedDest = fs.readlinkSync(dest)
} catch (err) {
// dest exists and is a regular file or directory,
// Windows may throw UNKNOWN error. If dest already exists,
// fs throws error anyway, so no need to guard against it here.
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
throw err
}
if (opts.dereference) {
resolvedDest = path.resolve(process.cwd(), resolvedDest)
}
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
}
// prevent copy if src is a subdir of dest since unlinking
// dest in this case would result in removing src contents
// and therefore a broken symlink would be created.
if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
}
return copyLink(resolvedSrc, dest)
}
}
function copyLink (resolvedSrc, dest) {
fs.unlinkSync(dest)
return fs.symlinkSync(resolvedSrc, dest)
}
module.exports = copySync
-235
View File
@@ -1,235 +0,0 @@
'use strict'
const fs = require('graceful-fs')
const path = require('path')
const mkdirs = require('../mkdirs').mkdirs
const pathExists = require('../path-exists').pathExists
const utimesMillis = require('../util/utimes').utimesMillis
const stat = require('../util/stat')
function copy (src, dest, opts, cb) {
if (typeof opts === 'function' && !cb) {
cb = opts
opts = {}
} else if (typeof opts === 'function') {
opts = { filter: opts }
}
cb = cb || function () {}
opts = opts || {}
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
// Warn about using preserveTimestamps on 32-bit node
if (opts.preserveTimestamps && process.arch === 'ia32') {
process.emitWarning(
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
'Warning', 'fs-extra-WARN0001'
)
}
stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
if (err) return cb(err)
const { srcStat, destStat } = stats
stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
if (err) return cb(err)
if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
return checkParentDir(destStat, src, dest, opts, cb)
})
})
}
function checkParentDir (destStat, src, dest, opts, cb) {
const destParent = path.dirname(dest)
pathExists(destParent, (err, dirExists) => {
if (err) return cb(err)
if (dirExists) return getStats(destStat, src, dest, opts, cb)
mkdirs(destParent, err => {
if (err) return cb(err)
return getStats(destStat, src, dest, opts, cb)
})
})
}
function handleFilter (onInclude, destStat, src, dest, opts, cb) {
Promise.resolve(opts.filter(src, dest)).then(include => {
if (include) return onInclude(destStat, src, dest, opts, cb)
return cb()
}, error => cb(error))
}
function startCopy (destStat, src, dest, opts, cb) {
if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
return getStats(destStat, src, dest, opts, cb)
}
function getStats (destStat, src, dest, opts, cb) {
const stat = opts.dereference ? fs.stat : fs.lstat
stat(src, (err, srcStat) => {
if (err) return cb(err)
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
else if (srcStat.isFile() ||
srcStat.isCharacterDevice() ||
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
return cb(new Error(`Unknown file: ${src}`))
})
}
function onFile (srcStat, destStat, src, dest, opts, cb) {
if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
return mayCopyFile(srcStat, src, dest, opts, cb)
}
function mayCopyFile (srcStat, src, dest, opts, cb) {
if (opts.overwrite) {
fs.unlink(dest, err => {
if (err) return cb(err)
return copyFile(srcStat, src, dest, opts, cb)
})
} else if (opts.errorOnExist) {
return cb(new Error(`'${dest}' already exists`))
} else return cb()
}
function copyFile (srcStat, src, dest, opts, cb) {
fs.copyFile(src, dest, err => {
if (err) return cb(err)
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
return setDestMode(dest, srcStat.mode, cb)
})
}
function handleTimestampsAndMode (srcMode, src, dest, cb) {
// Make sure the file is writable before setting the timestamp
// otherwise open fails with EPERM when invoked with 'r+'
// (through utimes call)
if (fileIsNotWritable(srcMode)) {
return makeFileWritable(dest, srcMode, err => {
if (err) return cb(err)
return setDestTimestampsAndMode(srcMode, src, dest, cb)
})
}
return setDestTimestampsAndMode(srcMode, src, dest, cb)
}
function fileIsNotWritable (srcMode) {
return (srcMode & 0o200) === 0
}
function makeFileWritable (dest, srcMode, cb) {
return setDestMode(dest, srcMode | 0o200, cb)
}
function setDestTimestampsAndMode (srcMode, src, dest, cb) {
setDestTimestamps(src, dest, err => {
if (err) return cb(err)
return setDestMode(dest, srcMode, cb)
})
}
function setDestMode (dest, srcMode, cb) {
return fs.chmod(dest, srcMode, cb)
}
function setDestTimestamps (src, dest, cb) {
// The initial srcStat.atime cannot be trusted
// because it is modified by the read(2) system call
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
fs.stat(src, (err, updatedSrcStat) => {
if (err) return cb(err)
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
})
}
function onDir (srcStat, destStat, src, dest, opts, cb) {
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
return copyDir(src, dest, opts, cb)
}
function mkDirAndCopy (srcMode, src, dest, opts, cb) {
fs.mkdir(dest, err => {
if (err) return cb(err)
copyDir(src, dest, opts, err => {
if (err) return cb(err)
return setDestMode(dest, srcMode, cb)
})
})
}
function copyDir (src, dest, opts, cb) {
fs.readdir(src, (err, items) => {
if (err) return cb(err)
return copyDirItems(items, src, dest, opts, cb)
})
}
function copyDirItems (items, src, dest, opts, cb) {
const item = items.pop()
if (!item) return cb()
return copyDirItem(items, item, src, dest, opts, cb)
}
function copyDirItem (items, item, src, dest, opts, cb) {
const srcItem = path.join(src, item)
const destItem = path.join(dest, item)
stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
if (err) return cb(err)
const { destStat } = stats
startCopy(destStat, srcItem, destItem, opts, err => {
if (err) return cb(err)
return copyDirItems(items, src, dest, opts, cb)
})
})
}
function onLink (destStat, src, dest, opts, cb) {
fs.readlink(src, (err, resolvedSrc) => {
if (err) return cb(err)
if (opts.dereference) {
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
}
if (!destStat) {
return fs.symlink(resolvedSrc, dest, cb)
} else {
fs.readlink(dest, (err, resolvedDest) => {
if (err) {
// dest exists and is a regular file or directory,
// Windows may throw UNKNOWN error. If dest already exists,
// fs throws error anyway, so no need to guard against it here.
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
return cb(err)
}
if (opts.dereference) {
resolvedDest = path.resolve(process.cwd(), resolvedDest)
}
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
}
// do not copy if src is a subdir of dest since unlinking
// dest in this case would result in removing src contents
// and therefore a broken symlink would be created.
if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
}
return copyLink(resolvedSrc, dest, cb)
})
}
})
}
function copyLink (resolvedSrc, dest, cb) {
fs.unlink(dest, err => {
if (err) return cb(err)
return fs.symlink(resolvedSrc, dest, cb)
})
}
module.exports = copy
-7
View File
@@ -1,7 +0,0 @@
'use strict'
const u = require('universalify').fromCallback
module.exports = {
copy: u(require('./copy')),
copySync: require('./copy-sync')
}
-39
View File
@@ -1,39 +0,0 @@
'use strict'
const u = require('universalify').fromPromise
const fs = require('../fs')
const path = require('path')
const mkdir = require('../mkdirs')
const remove = require('../remove')
const emptyDir = u(async function emptyDir (dir) {
let items
try {
items = await fs.readdir(dir)
} catch {
return mkdir.mkdirs(dir)
}
return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
})
function emptyDirSync (dir) {
let items
try {
items = fs.readdirSync(dir)
} catch {
return mkdir.mkdirsSync(dir)
}
items.forEach(item => {
item = path.join(dir, item)
remove.removeSync(item)
})
}
module.exports = {
emptyDirSync,
emptydirSync: emptyDirSync,
emptyDir,
emptydir: emptyDir
}
-69
View File
@@ -1,69 +0,0 @@
'use strict'
const u = require('universalify').fromCallback
const path = require('path')
const fs = require('graceful-fs')
const mkdir = require('../mkdirs')
function createFile (file, callback) {
function makeFile () {
fs.writeFile(file, '', err => {
if (err) return callback(err)
callback()
})
}
fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
if (!err && stats.isFile()) return callback()
const dir = path.dirname(file)
fs.stat(dir, (err, stats) => {
if (err) {
// if the directory doesn't exist, make it
if (err.code === 'ENOENT') {
return mkdir.mkdirs(dir, err => {
if (err) return callback(err)
makeFile()
})
}
return callback(err)
}
if (stats.isDirectory()) makeFile()
else {
// parent is not a directory
// This is just to cause an internal ENOTDIR error to be thrown
fs.readdir(dir, err => {
if (err) return callback(err)
})
}
})
})
}
function createFileSync (file) {
let stats
try {
stats = fs.statSync(file)
} catch {}
if (stats && stats.isFile()) return
const dir = path.dirname(file)
try {
if (!fs.statSync(dir).isDirectory()) {
// parent is not a directory
// This is just to cause an internal ENOTDIR error to be thrown
fs.readdirSync(dir)
}
} catch (err) {
// If the stat call above failed because the directory doesn't exist, create it
if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
else throw err
}
fs.writeFileSync(file, '')
}
module.exports = {
createFile: u(createFile),
createFileSync
}
-23
View File
@@ -1,23 +0,0 @@
'use strict'
const { createFile, createFileSync } = require('./file')
const { createLink, createLinkSync } = require('./link')
const { createSymlink, createSymlinkSync } = require('./symlink')
module.exports = {
// file
createFile,
createFileSync,
ensureFile: createFile,
ensureFileSync: createFileSync,
// link
createLink,
createLinkSync,
ensureLink: createLink,
ensureLinkSync: createLinkSync,
// symlink
createSymlink,
createSymlinkSync,
ensureSymlink: createSymlink,
ensureSymlinkSync: createSymlinkSync
}
-64
View File
@@ -1,64 +0,0 @@
'use strict'
const u = require('universalify').fromCallback
const path = require('path')
const fs = require('graceful-fs')
const mkdir = require('../mkdirs')
const pathExists = require('../path-exists').pathExists
const { areIdentical } = require('../util/stat')
function createLink (srcpath, dstpath, callback) {
function makeLink (srcpath, dstpath) {
fs.link(srcpath, dstpath, err => {
if (err) return callback(err)
callback(null)
})
}
fs.lstat(dstpath, (_, dstStat) => {
fs.lstat(srcpath, (err, srcStat) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureLink')
return callback(err)
}
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
const dir = path.dirname(dstpath)
pathExists(dir, (err, dirExists) => {
if (err) return callback(err)
if (dirExists) return makeLink(srcpath, dstpath)
mkdir.mkdirs(dir, err => {
if (err) return callback(err)
makeLink(srcpath, dstpath)
})
})
})
})
}
function createLinkSync (srcpath, dstpath) {
let dstStat
try {
dstStat = fs.lstatSync(dstpath)
} catch {}
try {
const srcStat = fs.lstatSync(srcpath)
if (dstStat && areIdentical(srcStat, dstStat)) return
} catch (err) {
err.message = err.message.replace('lstat', 'ensureLink')
throw err
}
const dir = path.dirname(dstpath)
const dirExists = fs.existsSync(dir)
if (dirExists) return fs.linkSync(srcpath, dstpath)
mkdir.mkdirsSync(dir)
return fs.linkSync(srcpath, dstpath)
}
module.exports = {
createLink: u(createLink),
createLinkSync
}
-99
View File
@@ -1,99 +0,0 @@
'use strict'
const path = require('path')
const fs = require('graceful-fs')
const pathExists = require('../path-exists').pathExists
/**
* Function that returns two types of paths, one relative to symlink, and one
* relative to the current working directory. Checks if path is absolute or
* relative. If the path is relative, this function checks if the path is
* relative to symlink or relative to current working directory. This is an
* initiative to find a smarter `srcpath` to supply when building symlinks.
* This allows you to determine which path to use out of one of three possible
* types of source paths. The first is an absolute path. This is detected by
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
* see if it exists. If it does it's used, if not an error is returned
* (callback)/ thrown (sync). The other two options for `srcpath` are a
* relative url. By default Node's `fs.symlink` works by creating a symlink
* using `dstpath` and expects the `srcpath` to be relative to the newly
* created symlink. If you provide a `srcpath` that does not exist on the file
* system it results in a broken symlink. To minimize this, the function
* checks to see if the 'relative to symlink' source file exists, and if it
* does it will use it. If it does not, it checks if there's a file that
* exists that is relative to the current working directory, if does its used.
* This preserves the expectations of the original fs.symlink spec and adds
* the ability to pass in `relative to current working direcotry` paths.
*/
function symlinkPaths (srcpath, dstpath, callback) {
if (path.isAbsolute(srcpath)) {
return fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureSymlink')
return callback(err)
}
return callback(null, {
toCwd: srcpath,
toDst: srcpath
})
})
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
return pathExists(relativeToDst, (err, exists) => {
if (err) return callback(err)
if (exists) {
return callback(null, {
toCwd: relativeToDst,
toDst: srcpath
})
} else {
return fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureSymlink')
return callback(err)
}
return callback(null, {
toCwd: srcpath,
toDst: path.relative(dstdir, srcpath)
})
})
}
})
}
}
function symlinkPathsSync (srcpath, dstpath) {
let exists
if (path.isAbsolute(srcpath)) {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('absolute srcpath does not exist')
return {
toCwd: srcpath,
toDst: srcpath
}
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
exists = fs.existsSync(relativeToDst)
if (exists) {
return {
toCwd: relativeToDst,
toDst: srcpath
}
} else {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('relative srcpath does not exist')
return {
toCwd: srcpath,
toDst: path.relative(dstdir, srcpath)
}
}
}
}
module.exports = {
symlinkPaths,
symlinkPathsSync
}
-31
View File
@@ -1,31 +0,0 @@
'use strict'
const fs = require('graceful-fs')
function symlinkType (srcpath, type, callback) {
callback = (typeof type === 'function') ? type : callback
type = (typeof type === 'function') ? false : type
if (type) return callback(null, type)
fs.lstat(srcpath, (err, stats) => {
if (err) return callback(null, 'file')
type = (stats && stats.isDirectory()) ? 'dir' : 'file'
callback(null, type)
})
}
function symlinkTypeSync (srcpath, type) {
let stats
if (type) return type
try {
stats = fs.lstatSync(srcpath)
} catch {
return 'file'
}
return (stats && stats.isDirectory()) ? 'dir' : 'file'
}
module.exports = {
symlinkType,
symlinkTypeSync
}
-82
View File
@@ -1,82 +0,0 @@
'use strict'
const u = require('universalify').fromCallback
const path = require('path')
const fs = require('../fs')
const _mkdirs = require('../mkdirs')
const mkdirs = _mkdirs.mkdirs
const mkdirsSync = _mkdirs.mkdirsSync
const _symlinkPaths = require('./symlink-paths')
const symlinkPaths = _symlinkPaths.symlinkPaths
const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
const _symlinkType = require('./symlink-type')
const symlinkType = _symlinkType.symlinkType
const symlinkTypeSync = _symlinkType.symlinkTypeSync
const pathExists = require('../path-exists').pathExists
const { areIdentical } = require('../util/stat')
function createSymlink (srcpath, dstpath, type, callback) {
callback = (typeof type === 'function') ? type : callback
type = (typeof type === 'function') ? false : type
fs.lstat(dstpath, (err, stats) => {
if (!err && stats.isSymbolicLink()) {
Promise.all([
fs.stat(srcpath),
fs.stat(dstpath)
]).then(([srcStat, dstStat]) => {
if (areIdentical(srcStat, dstStat)) return callback(null)
_createSymlink(srcpath, dstpath, type, callback)
})
} else _createSymlink(srcpath, dstpath, type, callback)
})
}
function _createSymlink (srcpath, dstpath, type, callback) {
symlinkPaths(srcpath, dstpath, (err, relative) => {
if (err) return callback(err)
srcpath = relative.toDst
symlinkType(relative.toCwd, type, (err, type) => {
if (err) return callback(err)
const dir = path.dirname(dstpath)
pathExists(dir, (err, dirExists) => {
if (err) return callback(err)
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
mkdirs(dir, err => {
if (err) return callback(err)
fs.symlink(srcpath, dstpath, type, callback)
})
})
})
})
}
function createSymlinkSync (srcpath, dstpath, type) {
let stats
try {
stats = fs.lstatSync(dstpath)
} catch {}
if (stats && stats.isSymbolicLink()) {
const srcStat = fs.statSync(srcpath)
const dstStat = fs.statSync(dstpath)
if (areIdentical(srcStat, dstStat)) return
}
const relative = symlinkPathsSync(srcpath, dstpath)
srcpath = relative.toDst
type = symlinkTypeSync(relative.toCwd, type)
const dir = path.dirname(dstpath)
const exists = fs.existsSync(dir)
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
mkdirsSync(dir)
return fs.symlinkSync(srcpath, dstpath, type)
}
module.exports = {
createSymlink: u(createSymlink),
createSymlinkSync
}
-128
View File
@@ -1,128 +0,0 @@
'use strict'
// This is adapted from https://github.com/normalize/mz
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
const u = require('universalify').fromCallback
const fs = require('graceful-fs')
const api = [
'access',
'appendFile',
'chmod',
'chown',
'close',
'copyFile',
'fchmod',
'fchown',
'fdatasync',
'fstat',
'fsync',
'ftruncate',
'futimes',
'lchmod',
'lchown',
'link',
'lstat',
'mkdir',
'mkdtemp',
'open',
'opendir',
'readdir',
'readFile',
'readlink',
'realpath',
'rename',
'rm',
'rmdir',
'stat',
'symlink',
'truncate',
'unlink',
'utimes',
'writeFile'
].filter(key => {
// Some commands are not available on some systems. Ex:
// fs.opendir was added in Node.js v12.12.0
// fs.rm was added in Node.js v14.14.0
// fs.lchown is not available on at least some Linux
return typeof fs[key] === 'function'
})
// Export cloned fs:
Object.assign(exports, fs)
// Universalify async methods:
api.forEach(method => {
exports[method] = u(fs[method])
})
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
// since we are a drop-in replacement for the native module
exports.exists = function (filename, callback) {
if (typeof callback === 'function') {
return fs.exists(filename, callback)
}
return new Promise(resolve => {
return fs.exists(filename, resolve)
})
}
// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
exports.read = function (fd, buffer, offset, length, position, callback) {
if (typeof callback === 'function') {
return fs.read(fd, buffer, offset, length, position, callback)
}
return new Promise((resolve, reject) => {
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
if (err) return reject(err)
resolve({ bytesRead, buffer })
})
})
}
// Function signature can be
// fs.write(fd, buffer[, offset[, length[, position]]], callback)
// OR
// fs.write(fd, string[, position[, encoding]], callback)
// We need to handle both cases, so we use ...args
exports.write = function (fd, buffer, ...args) {
if (typeof args[args.length - 1] === 'function') {
return fs.write(fd, buffer, ...args)
}
return new Promise((resolve, reject) => {
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
if (err) return reject(err)
resolve({ bytesWritten, buffer })
})
})
}
// fs.writev only available in Node v12.9.0+
if (typeof fs.writev === 'function') {
// Function signature is
// s.writev(fd, buffers[, position], callback)
// We need to handle the optional arg, so we use ...args
exports.writev = function (fd, buffers, ...args) {
if (typeof args[args.length - 1] === 'function') {
return fs.writev(fd, buffers, ...args)
}
return new Promise((resolve, reject) => {
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
if (err) return reject(err)
resolve({ bytesWritten, buffers })
})
})
}
}
// fs.realpath.native sometimes not available if fs is monkey-patched
if (typeof fs.realpath.native === 'function') {
exports.realpath.native = u(fs.realpath.native)
} else {
process.emitWarning(
'fs.realpath.native is not a function. Is fs being monkey-patched?',
'Warning', 'fs-extra-WARN0003'
)
}
-16
View File
@@ -1,16 +0,0 @@
'use strict'
module.exports = {
// Export promiseified graceful-fs:
...require('./fs'),
// Export extra methods:
...require('./copy'),
...require('./empty'),
...require('./ensure'),
...require('./json'),
...require('./mkdirs'),
...require('./move'),
...require('./output-file'),
...require('./path-exists'),
...require('./remove')
}
-16
View File
@@ -1,16 +0,0 @@
'use strict'
const u = require('universalify').fromPromise
const jsonFile = require('./jsonfile')
jsonFile.outputJson = u(require('./output-json'))
jsonFile.outputJsonSync = require('./output-json-sync')
// aliases
jsonFile.outputJSON = jsonFile.outputJson
jsonFile.outputJSONSync = jsonFile.outputJsonSync
jsonFile.writeJSON = jsonFile.writeJson
jsonFile.writeJSONSync = jsonFile.writeJsonSync
jsonFile.readJSON = jsonFile.readJson
jsonFile.readJSONSync = jsonFile.readJsonSync
module.exports = jsonFile
-11
View File
@@ -1,11 +0,0 @@
'use strict'
const jsonFile = require('jsonfile')
module.exports = {
// jsonfile exports
readJson: jsonFile.readFile,
readJsonSync: jsonFile.readFileSync,
writeJson: jsonFile.writeFile,
writeJsonSync: jsonFile.writeFileSync
}
-12
View File
@@ -1,12 +0,0 @@
'use strict'
const { stringify } = require('jsonfile/utils')
const { outputFileSync } = require('../output-file')
function outputJsonSync (file, data, options) {
const str = stringify(data, options)
outputFileSync(file, str, options)
}
module.exports = outputJsonSync
-12
View File
@@ -1,12 +0,0 @@
'use strict'
const { stringify } = require('jsonfile/utils')
const { outputFile } = require('../output-file')
async function outputJson (file, data, options = {}) {
const str = stringify(data, options)
await outputFile(file, str, options)
}
module.exports = outputJson

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