xctc-utils 1.6.69 → 1.6.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.decrypt = exports.encrypt = exports.cryptojs = exports.loadCryptoJs = void 0;
4
7
  const utils_1 = require("../utils");
5
8
  const utils_2 = require("../utils");
6
- let cryptoUrl = "https://unpkg.com/crypto-js@4.1.1/index.js";
7
- let cryptoJsSource = "";
9
+ const crypto_js_1 = __importDefault(require("crypto-js"));
10
+ let cryptoUrl = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js";
11
+ let cryptoJsSource = crypto_js_1.default;
8
12
  const loadCryptoJs = (url, callback) => {
9
13
  const win = window;
10
14
  if (url) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
3
  "private": false,
4
- "version": "1.6.69",
4
+ "version": "1.6.70",
5
5
  "description": "localStorage存储\r ```\r sessionStorage存储\r ```\r crypto-js加密、解密\r ```\r 微信授权登录、微信分享\r ```\r 设备环境获取\r ```\r 是否是微信浏览器\r ```\r 时间戳转时间,字符串转时间戳",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -13,11 +13,12 @@
13
13
  "author": "dyb",
14
14
  "license": "ISC",
15
15
  "devDependencies": {
16
+ "@types/crypto-js": "^4.2.2",
16
17
  "@types/node": "^18.11.19",
17
18
  "typescript": "^4.9.5"
18
19
  },
19
20
  "dependencies": {
20
-
21
+ "crypto-js": "^4.2.0"
21
22
  },
22
23
  "repository": {
23
24
  "type": "git",