feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

21
node_modules/pinia-plugin-persist-uni/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2022 Allen
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.

114
node_modules/pinia-plugin-persist-uni/README.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

20
node_modules/pinia-plugin-persist-uni/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { PiniaPluginContext } from 'pinia';
export interface PersistStrategy {
key?: string;
storage?: Storage;
paths?: string[];
}
export interface PersistOptions {
enabled: true;
detached?: true;
enforceCustomStorage?: boolean;
H5Storage?: Storage;
strategies?: PersistStrategy[];
}
declare module 'pinia' {
interface DefineStoreOptionsBase<S, Store> {
persist?: PersistOptions;
}
}
declare const _default: ({ options, store }: PiniaPluginContext) => void;
export default _default;

View File

@@ -0,0 +1,55 @@
var _a, _b;
const isH5 = typeof uni !== "undefined" ? ["web", "h5", void 0].includes((_b = (_a = uni == null ? void 0 : uni.getSystemInfoSync()) == null ? void 0 : _a.uniPlatform) == null ? void 0 : _b.toLocaleLowerCase()) : true;
const updateStorage = (strategy, store, options) => {
const storage = strategy.storage;
const storeKey = strategy.key || store.$id;
const isCustomStorage = isH5 || (options == null ? void 0 : options.enforceCustomStorage);
if (strategy.paths) {
const partialState = strategy.paths.reduce((finalObj, key) => {
finalObj[key] = store.$state[key];
return finalObj;
}, {});
if (isCustomStorage && storage) {
storage.setItem(storeKey, JSON.stringify(partialState));
} else {
uni.setStorage({ key: storeKey, data: JSON.stringify(partialState) });
}
} else if (isCustomStorage && storage) {
storage.setItem(storeKey, JSON.stringify(store.$state));
} else {
uni.setStorage({ key: storeKey, data: JSON.stringify(store.$state) });
}
};
var index = ({ options, store }) => {
var _a2, _b2, _c, _d, _e, _f;
if ((_a2 = options.persist) == null ? void 0 : _a2.enabled) {
const defaultStrat = [
{
key: store.$id,
storage: ((_b2 = options.persist) == null ? void 0 : _b2.H5Storage) || (window == null ? void 0 : window.sessionStorage)
}
];
const strategies = ((_d = (_c = options.persist) == null ? void 0 : _c.strategies) == null ? void 0 : _d.length) ? (_e = options.persist) == null ? void 0 : _e.strategies : defaultStrat;
strategies.forEach((strategy) => {
var _a3, _b3;
const storage = strategy.storage || ((_a3 = options.persist) == null ? void 0 : _a3.H5Storage) || (window == null ? void 0 : window.sessionStorage);
const storeKey = strategy.key || store.$id;
let storageResult;
if (isH5 || ((_b3 = options.persist) == null ? void 0 : _b3.enforceCustomStorage)) {
storageResult = storage.getItem(storeKey);
} else {
storageResult = uni.getStorageSync(storeKey);
}
if (storageResult) {
store.$patch(JSON.parse(storageResult));
updateStorage(strategy, store, options.persist);
}
});
store.$subscribe(() => {
strategies.forEach((strategy) => {
updateStorage(strategy, store, options.persist);
});
}, { detached: ((_f = options.persist) == null ? void 0 : _f.detached) ? true : false });
}
};
export { index as default };

View File

@@ -0,0 +1 @@
(function(r,a){typeof exports=="object"&&typeof module!="undefined"?module.exports=a():typeof define=="function"&&define.amd?define(a):(r=typeof globalThis!="undefined"?globalThis:r||self,r.piniaPersist=a())})(this,function(){var S,l;"use strict";const r=typeof uni!="undefined"?["web","h5",void 0].includes((l=(S=uni==null?void 0:uni.getSystemInfoSync())==null?void 0:S.uniPlatform)==null?void 0:l.toLocaleLowerCase()):!0,a=(e,t,n)=>{const s=e.storage,i=e.key||t.$id,d=r||(n==null?void 0:n.enforceCustomStorage);if(e.paths){const f=e.paths.reduce((u,o)=>(u[o]=t.$state[o],u),{});d&&s?s.setItem(i,JSON.stringify(f)):uni.setStorage({key:i,data:JSON.stringify(f)})}else d&&s?s.setItem(i,JSON.stringify(t.$state)):uni.setStorage({key:i,data:JSON.stringify(t.$state)})};var $=({options:e,store:t})=>{var n,s,i,d,f,u;if((n=e.persist)!=null&&n.enabled){const o=[{key:t.$id,storage:((s=e.persist)==null?void 0:s.H5Storage)||(window==null?void 0:window.sessionStorage)}],h=(d=(i=e.persist)==null?void 0:i.strategies)!=null&&d.length?(f=e.persist)==null?void 0:f.strategies:o;h.forEach(c=>{var p,y;const w=c.storage||((p=e.persist)==null?void 0:p.H5Storage)||(window==null?void 0:window.sessionStorage),m=c.key||t.$id;let g;r||((y=e.persist)==null?void 0:y.enforceCustomStorage)?g=w.getItem(m):g=uni.getStorageSync(m),g&&(t.$patch(JSON.parse(g)),a(c,t,e.persist))}),t.$subscribe(()=>{h.forEach(c=>{a(c,t,e.persist)})},{detached:!!((u=e.persist)!=null&&u.detached)})}};return $});

View File

@@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../vue-demi/bin/vue-demi-fix.js" "$@"
else
exec node "$basedir/../vue-demi/bin/vue-demi-fix.js" "$@"
fi

View File

@@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vue-demi\bin\vue-demi-fix.js" %*

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../vue-demi/bin/vue-demi-fix.js" $args
} else {
& "$basedir/node$exe" "$basedir/../vue-demi/bin/vue-demi-fix.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../vue-demi/bin/vue-demi-fix.js" $args
} else {
& "node$exe" "$basedir/../vue-demi/bin/vue-demi-fix.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

View File

@@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../vue-demi/bin/vue-demi-switch.js" "$@"
else
exec node "$basedir/../vue-demi/bin/vue-demi-switch.js" "$@"
fi

View File

@@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vue-demi\bin\vue-demi-switch.js" %*

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