temp
This commit is contained in:
@@ -23,3 +23,11 @@ for (const store of storeList) {
|
|||||||
dts: true,
|
dts: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await buildWithBun({
|
||||||
|
naming: 'utils-node',
|
||||||
|
entry: 'query/utils/index.ts',
|
||||||
|
meta: import.meta,
|
||||||
|
target: 'node',
|
||||||
|
dts: true,
|
||||||
|
})
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/api",
|
"name": "@kevisual/api",
|
||||||
"version": "0.0.50",
|
"version": "0.0.51",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "mod.ts",
|
"main": "mod.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
"@kevisual/context": "^0.0.6",
|
"@kevisual/context": "^0.0.6",
|
||||||
"@kevisual/js-filter": "^0.0.5",
|
"@kevisual/js-filter": "^0.0.5",
|
||||||
"@kevisual/load": "^0.0.6",
|
"@kevisual/load": "^0.0.6",
|
||||||
|
"@paralleldrive/cuid2": "^3.3.0",
|
||||||
"es-toolkit": "^1.44.0",
|
"es-toolkit": "^1.44.0",
|
||||||
"eventemitter3": "^5.0.4",
|
"eventemitter3": "^5.0.4",
|
||||||
"fuse.js": "^7.1.0",
|
"fuse.js": "^7.1.0",
|
||||||
@@ -56,6 +57,7 @@
|
|||||||
"./proxy": "./query/query-proxy/index.ts",
|
"./proxy": "./query/query-proxy/index.ts",
|
||||||
"./secret": "./query/query-secret/index.ts",
|
"./secret": "./query/query-secret/index.ts",
|
||||||
"./resources": "./query/query-resources/index.ts",
|
"./resources": "./query/query-resources/index.ts",
|
||||||
|
"./utils-node": "./dist/utils-node.js",
|
||||||
"./utils": "./dist/utils.js",
|
"./utils": "./dist/utils.js",
|
||||||
"./query-secret": "./dist/query-secret.js",
|
"./query-secret": "./dist/query-secret.js",
|
||||||
"./query-mark": "./dist/query-mark.js",
|
"./query-mark": "./dist/query-mark.js",
|
||||||
|
|||||||
29
pnpm-lock.yaml
generated
29
pnpm-lock.yaml
generated
@@ -17,6 +17,9 @@ importers:
|
|||||||
'@kevisual/load':
|
'@kevisual/load':
|
||||||
specifier: ^0.0.6
|
specifier: ^0.0.6
|
||||||
version: 0.0.6
|
version: 0.0.6
|
||||||
|
'@paralleldrive/cuid2':
|
||||||
|
specifier: ^3.3.0
|
||||||
|
version: 3.3.0
|
||||||
es-toolkit:
|
es-toolkit:
|
||||||
specifier: ^1.44.0
|
specifier: ^1.44.0
|
||||||
version: 1.44.0
|
version: 1.44.0
|
||||||
@@ -150,6 +153,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-jLsL80wBBKkrJZrfk3SQpJ9JA/zREdlUROj7eCkmzqduAWKSI0wVcXuCKf+mLFCHB0Q0Tkh2rgzjSlurt3JQgw==}
|
resolution: {integrity: sha512-jLsL80wBBKkrJZrfk3SQpJ9JA/zREdlUROj7eCkmzqduAWKSI0wVcXuCKf+mLFCHB0Q0Tkh2rgzjSlurt3JQgw==}
|
||||||
engines: {node: '>=10.0.0'}
|
engines: {node: '>=10.0.0'}
|
||||||
|
|
||||||
|
'@noble/hashes@2.0.1':
|
||||||
|
resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==}
|
||||||
|
engines: {node: '>= 20.19.0'}
|
||||||
|
|
||||||
'@nodelib/fs.scandir@2.1.5':
|
'@nodelib/fs.scandir@2.1.5':
|
||||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||||
engines: {node: '>= 8'}
|
engines: {node: '>= 8'}
|
||||||
@@ -162,6 +169,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
|
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
|
||||||
engines: {node: '>= 8'}
|
engines: {node: '>= 8'}
|
||||||
|
|
||||||
|
'@paralleldrive/cuid2@3.3.0':
|
||||||
|
resolution: {integrity: sha512-OqiFvSOF0dBSesELYY2CAMa4YINvlLpvKOz/rv6NeZEqiyttlHgv98Juwv4Ch+GrEV7IZ8jfI2VcEoYUjXXCjw==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
'@types/bun@1.3.9':
|
'@types/bun@1.3.9':
|
||||||
resolution: {integrity: sha512-KQ571yULOdWJiMH+RIWIOZ7B2RXQGpL1YQrBtLIV3FqDcCu6FsbFUBwhdKUlCKUpS3PJDsHlJ1QKlpxoVR+xtw==}
|
resolution: {integrity: sha512-KQ571yULOdWJiMH+RIWIOZ7B2RXQGpL1YQrBtLIV3FqDcCu6FsbFUBwhdKUlCKUpS3PJDsHlJ1QKlpxoVR+xtw==}
|
||||||
|
|
||||||
@@ -194,6 +205,9 @@ packages:
|
|||||||
asynckit@0.4.0:
|
asynckit@0.4.0:
|
||||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||||
|
|
||||||
|
bignumber.js@9.3.1:
|
||||||
|
resolution: {integrity: sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==}
|
||||||
|
|
||||||
braces@3.0.3:
|
braces@3.0.3:
|
||||||
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
@@ -221,6 +235,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
|
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
error-causes@3.0.2:
|
||||||
|
resolution: {integrity: sha512-i0B8zq1dHL6mM85FGoxaJnVtx6LD5nL2v0hlpGdntg5FOSyzQ46c9lmz5qx0xRS2+PWHGOHcYxGIBC5Le2dRMw==}
|
||||||
|
|
||||||
es-define-property@1.0.1:
|
es-define-property@1.0.1:
|
||||||
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
|
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -529,6 +546,8 @@ snapshots:
|
|||||||
|
|
||||||
'@kevisual/ws@8.19.0': {}
|
'@kevisual/ws@8.19.0': {}
|
||||||
|
|
||||||
|
'@noble/hashes@2.0.1': {}
|
||||||
|
|
||||||
'@nodelib/fs.scandir@2.1.5':
|
'@nodelib/fs.scandir@2.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nodelib/fs.stat': 2.0.5
|
'@nodelib/fs.stat': 2.0.5
|
||||||
@@ -541,6 +560,12 @@ snapshots:
|
|||||||
'@nodelib/fs.scandir': 2.1.5
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
fastq: 1.19.1
|
fastq: 1.19.1
|
||||||
|
|
||||||
|
'@paralleldrive/cuid2@3.3.0':
|
||||||
|
dependencies:
|
||||||
|
'@noble/hashes': 2.0.1
|
||||||
|
bignumber.js: 9.3.1
|
||||||
|
error-causes: 3.0.2
|
||||||
|
|
||||||
'@types/bun@1.3.9':
|
'@types/bun@1.3.9':
|
||||||
dependencies:
|
dependencies:
|
||||||
bun-types: 1.3.9
|
bun-types: 1.3.9
|
||||||
@@ -578,6 +603,8 @@ snapshots:
|
|||||||
|
|
||||||
asynckit@0.4.0: {}
|
asynckit@0.4.0: {}
|
||||||
|
|
||||||
|
bignumber.js@9.3.1: {}
|
||||||
|
|
||||||
braces@3.0.3:
|
braces@3.0.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
fill-range: 7.1.1
|
fill-range: 7.1.1
|
||||||
@@ -605,6 +632,8 @@ snapshots:
|
|||||||
es-errors: 1.3.0
|
es-errors: 1.3.0
|
||||||
gopd: 1.2.0
|
gopd: 1.2.0
|
||||||
|
|
||||||
|
error-causes@3.0.2: {}
|
||||||
|
|
||||||
es-define-property@1.0.1: {}
|
es-define-property@1.0.1: {}
|
||||||
|
|
||||||
es-errors@1.3.0: {}
|
es-errors@1.3.0: {}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import { customAlphabet } from 'nanoid';
|
import { customAlphabet } from 'nanoid';
|
||||||
|
import { createId } from '@paralleldrive/cuid2';
|
||||||
|
|
||||||
export const letter = 'abcdefghijklmnopqrstuvwxyz';
|
export const letter = 'abcdefghijklmnopqrstuvwxyz';
|
||||||
export const number = '0123456789';
|
export const number = '0123456789';
|
||||||
const alphanumeric = `${letter}${number}`;
|
const alphanumeric = `${letter}${number}`;
|
||||||
export const alphanumericWithDash = `${alphanumeric}-`;
|
export const alphanumericWithDash = `${alphanumeric}-`;
|
||||||
|
|
||||||
|
export const cuid2 = createId;
|
||||||
/**
|
/**
|
||||||
* 创建一个随机的字母字符串
|
* 创建一个随机的字母字符串
|
||||||
*/
|
*/
|
||||||
@@ -12,12 +15,12 @@ export const uuid = customAlphabet(letter);
|
|||||||
/**
|
/**
|
||||||
* 创建一个随机的 id,包含字母和数字
|
* 创建一个随机的 id,包含字母和数字
|
||||||
*/
|
*/
|
||||||
export const nanoid = customAlphabet(alphanumeric, 10);
|
export const nanoid = customAlphabet(alphanumeric, 16);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建一个随机的 id,包含字母、数字和短横线
|
* 创建一个随机的 id,包含字母、数字和短横线
|
||||||
*/
|
*/
|
||||||
export const nanoidWithDash = customAlphabet(alphanumericWithDash, 10);
|
export const nanoidWithDash = customAlphabet(alphanumericWithDash, 16);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建一个随机的 id,以字母开头的字符串
|
* 创建一个随机的 id,以字母开头的字符串
|
||||||
|
|||||||
Reference in New Issue
Block a user