🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@snack-kit/lib

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snack-kit/lib - npm Package Compare versions

Comparing version
0.4.0
to
0.5.0
+13
dist/cjs/chunk-IMHC6CTK.cjs
'use strict';
var axios = require('axios');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var axios__default = /*#__PURE__*/_interopDefault(axios);
module.exports = axios__default.default;
//# sourceMappingURL=chunk-IMHC6CTK.cjs.map
//# sourceMappingURL=chunk-IMHC6CTK.cjs.map
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-IMHC6CTK.cjs","sourcesContent":[]}
export { default } from 'axios';
//# sourceMappingURL=chunk-MHCY2PIP.js.map
//# sourceMappingURL=chunk-MHCY2PIP.js.map
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-MHCY2PIP.js","sourcesContent":[]}
+9
-1
'use strict';
require('./chunk-YY5WQN7B.cjs');
var chunkIMHC6CTK_cjs = require('./chunk-IMHC6CTK.cjs');
var chunkXEQEQWDB_cjs = require('./chunk-XEQEQWDB.cjs');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var chunkIMHC6CTK_cjs__default = /*#__PURE__*/_interopDefault(chunkIMHC6CTK_cjs);
Object.defineProperty(exports, "axios", {
enumerable: true,
get: function () { return chunkIMHC6CTK_cjs__default.default; }
});
Object.defineProperty(exports, "Cancel", {

@@ -9,0 +17,0 @@ enumerable: true,

'use strict';
require('./chunk-YY5WQN7B.cjs');
var chunkIMHC6CTK_cjs = require('./chunk-IMHC6CTK.cjs');
var chunkZJMTV2GJ_cjs = require('./chunk-ZJMTV2GJ.cjs');

@@ -8,5 +8,13 @@ var chunkXEQEQWDB_cjs = require('./chunk-XEQEQWDB.cjs');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var chunkIMHC6CTK_cjs__default = /*#__PURE__*/_interopDefault(chunkIMHC6CTK_cjs);
// package.json
var version = "0.4.0";
var version = "0.5.0";
Object.defineProperty(exports, "axios", {
enumerable: true,
get: function () { return chunkIMHC6CTK_cjs__default.default; }
});
Object.defineProperty(exports, "Debugger", {

@@ -13,0 +21,0 @@ enumerable: true,

+1
-1

@@ -1,1 +0,1 @@

{"version":3,"sources":["../../package.json"],"names":[],"mappings":";;;;;;;;AAEE,IAAA,OAAA,GAAW","file":"index.cjs","sourcesContent":["{\n \"name\": \"@snack-kit/lib\",\n \"version\": \"0.4.0\",\n \"description\": \"Enterprise-grade utility library\",\n \"keywords\": [],\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"import\": \"./dist/es/index.js\",\n \"require\": \"./dist/cjs/index.cjs\"\n },\n \"./http\": {\n \"types\": \"./dist/types/http.d.ts\",\n \"import\": \"./dist/es/http.js\",\n \"require\": \"./dist/cjs/http.cjs\"\n },\n \"./debugger\": {\n \"types\": \"./dist/types/debugger.d.ts\",\n \"import\": \"./dist/es/debugger.js\",\n \"require\": \"./dist/cjs/debugger.cjs\"\n },\n \"./utils\": {\n \"types\": \"./dist/types/utils.d.ts\",\n \"import\": \"./dist/es/utils.js\",\n \"require\": \"./dist/cjs/utils.cjs\"\n }\n },\n \"main\": \"./dist/cjs/index.cjs\",\n \"module\": \"./dist/es/index.js\",\n \"types\": \"./dist/types/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\",\n \"docs\": \"typedoc && cp -r docs/demo docs/api/demo\",\n \"docs:watch\": \"typedoc --watch\",\n \"lint\": \"tsc --noEmit\",\n \"prepublishOnly\": \"npm run build\",\n \"release\": \"npm run build && npm publish --access public\"\n },\n \"devDependencies\": {\n \"@vitest/coverage-v8\": \"^2.0.0\",\n \"tsup\": \"^8.0.0\",\n \"typedoc\": \"^0.26.0\",\n \"typescript\": \"^5.5.3\",\n \"vitest\": \"^2.0.0\"\n },\n \"dependencies\": {\n \"axios\": \"^1.13.6\"\n }\n}\n"]}
{"version":3,"sources":["../../package.json"],"names":[],"mappings":";;;;;;;;;;;;AAEE,IAAA,OAAA,GAAW","file":"index.cjs","sourcesContent":["{\n \"name\": \"@snack-kit/lib\",\n \"version\": \"0.5.0\",\n \"description\": \"Enterprise-grade utility library\",\n \"keywords\": [],\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"import\": \"./dist/es/index.js\",\n \"require\": \"./dist/cjs/index.cjs\"\n },\n \"./http\": {\n \"types\": \"./dist/types/http.d.ts\",\n \"import\": \"./dist/es/http.js\",\n \"require\": \"./dist/cjs/http.cjs\"\n },\n \"./debugger\": {\n \"types\": \"./dist/types/debugger.d.ts\",\n \"import\": \"./dist/es/debugger.js\",\n \"require\": \"./dist/cjs/debugger.cjs\"\n },\n \"./utils\": {\n \"types\": \"./dist/types/utils.d.ts\",\n \"import\": \"./dist/es/utils.js\",\n \"require\": \"./dist/cjs/utils.cjs\"\n }\n },\n \"main\": \"./dist/cjs/index.cjs\",\n \"module\": \"./dist/es/index.js\",\n \"types\": \"./dist/types/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\",\n \"docs\": \"typedoc && cp -r docs/demo docs/api/demo\",\n \"docs:watch\": \"typedoc --watch\",\n \"lint\": \"tsc --noEmit\",\n \"prepublishOnly\": \"npm run build\",\n \"release\": \"npm run build && npm publish --access public\"\n },\n \"devDependencies\": {\n \"@vitest/coverage-v8\": \"^2.0.0\",\n \"tsup\": \"^8.0.0\",\n \"typedoc\": \"^0.26.0\",\n \"typescript\": \"^5.5.3\",\n \"vitest\": \"^2.0.0\"\n },\n \"dependencies\": {\n \"axios\": \"^1.13.6\"\n }\n}\n"]}

@@ -1,4 +0,4 @@

import './chunk-BEL6AFK4.js';
export { default as axios } from './chunk-MHCY2PIP.js';
export { Cancel, CancelAll, Context, Ctx, Del, Get, HttpContext, Origin, Patch, Post, Put, Request } from './chunk-YV6SGXUJ.js';
//# sourceMappingURL=http.js.map
//# sourceMappingURL=http.js.map

@@ -1,2 +0,2 @@

import './chunk-BEL6AFK4.js';
export { default as axios } from './chunk-MHCY2PIP.js';
export { Debugger } from './chunk-4SGFAIRT.js';

@@ -7,3 +7,3 @@ export { Cancel, CancelAll, Context, Ctx, DEBUGGER_ACTIVE_KEY, Del, Get, HttpContext, Origin, Patch, Post, Put, Request } from './chunk-YV6SGXUJ.js';

// package.json
var version = "0.4.0";
var version = "0.5.0";

@@ -10,0 +10,0 @@ export { version as VERSION };

@@ -1,1 +0,1 @@

{"version":3,"sources":["../../package.json"],"names":[],"mappings":";;;;;;AAEE,IAAA,OAAA,GAAW","file":"index.js","sourcesContent":["{\n \"name\": \"@snack-kit/lib\",\n \"version\": \"0.4.0\",\n \"description\": \"Enterprise-grade utility library\",\n \"keywords\": [],\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"import\": \"./dist/es/index.js\",\n \"require\": \"./dist/cjs/index.cjs\"\n },\n \"./http\": {\n \"types\": \"./dist/types/http.d.ts\",\n \"import\": \"./dist/es/http.js\",\n \"require\": \"./dist/cjs/http.cjs\"\n },\n \"./debugger\": {\n \"types\": \"./dist/types/debugger.d.ts\",\n \"import\": \"./dist/es/debugger.js\",\n \"require\": \"./dist/cjs/debugger.cjs\"\n },\n \"./utils\": {\n \"types\": \"./dist/types/utils.d.ts\",\n \"import\": \"./dist/es/utils.js\",\n \"require\": \"./dist/cjs/utils.cjs\"\n }\n },\n \"main\": \"./dist/cjs/index.cjs\",\n \"module\": \"./dist/es/index.js\",\n \"types\": \"./dist/types/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\",\n \"docs\": \"typedoc && cp -r docs/demo docs/api/demo\",\n \"docs:watch\": \"typedoc --watch\",\n \"lint\": \"tsc --noEmit\",\n \"prepublishOnly\": \"npm run build\",\n \"release\": \"npm run build && npm publish --access public\"\n },\n \"devDependencies\": {\n \"@vitest/coverage-v8\": \"^2.0.0\",\n \"tsup\": \"^8.0.0\",\n \"typedoc\": \"^0.26.0\",\n \"typescript\": \"^5.5.3\",\n \"vitest\": \"^2.0.0\"\n },\n \"dependencies\": {\n \"axios\": \"^1.13.6\"\n }\n}\n"]}
{"version":3,"sources":["../../package.json"],"names":[],"mappings":";;;;;;AAEE,IAAA,OAAA,GAAW","file":"index.js","sourcesContent":["{\n \"name\": \"@snack-kit/lib\",\n \"version\": \"0.5.0\",\n \"description\": \"Enterprise-grade utility library\",\n \"keywords\": [],\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"import\": \"./dist/es/index.js\",\n \"require\": \"./dist/cjs/index.cjs\"\n },\n \"./http\": {\n \"types\": \"./dist/types/http.d.ts\",\n \"import\": \"./dist/es/http.js\",\n \"require\": \"./dist/cjs/http.cjs\"\n },\n \"./debugger\": {\n \"types\": \"./dist/types/debugger.d.ts\",\n \"import\": \"./dist/es/debugger.js\",\n \"require\": \"./dist/cjs/debugger.cjs\"\n },\n \"./utils\": {\n \"types\": \"./dist/types/utils.d.ts\",\n \"import\": \"./dist/es/utils.js\",\n \"require\": \"./dist/cjs/utils.cjs\"\n }\n },\n \"main\": \"./dist/cjs/index.cjs\",\n \"module\": \"./dist/es/index.js\",\n \"types\": \"./dist/types/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\",\n \"docs\": \"typedoc && cp -r docs/demo docs/api/demo\",\n \"docs:watch\": \"typedoc --watch\",\n \"lint\": \"tsc --noEmit\",\n \"prepublishOnly\": \"npm run build\",\n \"release\": \"npm run build && npm publish --access public\"\n },\n \"devDependencies\": {\n \"@vitest/coverage-v8\": \"^2.0.0\",\n \"tsup\": \"^8.0.0\",\n \"typedoc\": \"^0.26.0\",\n \"typescript\": \"^5.5.3\",\n \"vitest\": \"^2.0.0\"\n },\n \"dependencies\": {\n \"axios\": \"^1.13.6\"\n }\n}\n"]}
import { d as HttpMethodConfig, f as HttpResult, e as HttpRequestConfig } from './context-C4dFUDbw.js';
export { C as Context, a as ContextInfo, b as Ctx, H as HttpContext, c as HttpError, O as Origin, S as ServerItem } from './context-C4dFUDbw.js';
import 'axios';
export { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, default as axios } from 'axios';

@@ -5,0 +5,0 @@ /**

export { C as Context, a as ContextInfo, b as Ctx, D as DEBUGGER_ACTIVE_KEY, H as HttpContext, c as HttpError, d as HttpMethodConfig, e as HttpRequestConfig, f as HttpResult, O as Origin, S as ServerItem } from './context-C4dFUDbw.js';
export { Cancel, CancelAll, Del, Get, Patch, Post, Put, Request } from './http.js';
export { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, default as axios } from 'axios';
export { Debugger, DebuggerOptions } from './debugger.js';
export { CleanObject, Debounce, DeepClone, Delay, FormatDate, GetDateOffset, GetDayRange, GetURLParam, GetURLParams, IsArray, IsBoolean, IsEmail, IsEqual, IsFunction, IsInteger, IsIpv4, IsNull, IsNumber, IsObject, IsPhone, IsPositiveInteger, IsRealNumber, IsString, IsUrl, Minus, ObjectToQuery, Omit, Pick, QueryToObject, REGEX, Throttle, UUID, Unique, UniqueByKey } from './utils.js';
import 'axios';
var version = "0.4.0";
var version = "0.5.0";
export { version as VERSION };
{
"name": "@snack-kit/lib",
"version": "0.4.0",
"version": "0.5.0",
"description": "Enterprise-grade utility library",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -104,2 +104,14 @@ # @snack-kit/lib

### 直接使用 axios
http 模块同时导出了原始 axios 实例及其常用类型,无需单独安装 `axios`:
```ts
import { axios } from '@snack-kit/lib/http'
import type { AxiosRequestConfig, AxiosResponse, AxiosInstance, AxiosError } from '@snack-kit/lib/http'
// 直接使用 axios 实例
const res = await axios.get('https://api.example.com/data')
```
---

@@ -239,2 +251,3 @@

- **[http]** 新增导出类型 `HttpMethodConfig`(`Omit<HttpRequestConfig, 'method'>`)
- **[http]** 导出原始 `axios` 实例及 `AxiosRequestConfig` / `AxiosResponse` / `AxiosInstance` / `AxiosError` 类型,无需单独安装 `axios`

@@ -241,0 +254,0 @@ ### 0.3.0

'use strict';
//# sourceMappingURL=chunk-YY5WQN7B.cjs.map
//# sourceMappingURL=chunk-YY5WQN7B.cjs.map
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-YY5WQN7B.cjs"}
//# sourceMappingURL=chunk-BEL6AFK4.js.map
//# sourceMappingURL=chunk-BEL6AFK4.js.map
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-BEL6AFK4.js"}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display