@boteteam/utils 0.0.8 → 0.0.12

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.
Files changed (35) hide show
  1. package/dist/cjs/index.d.ts +2 -3
  2. package/dist/cjs/index.js +0 -3
  3. package/dist/cjs/index.js.map +3 -3
  4. package/dist/esm/file.js +6 -1
  5. package/dist/esm/file.js.map +1 -1
  6. package/dist/esm/formatModule/formatModuleData.js +8 -3
  7. package/dist/esm/formatModule/formatModuleData.js.map +1 -1
  8. package/dist/esm/formatModule/helpers/formatEchartCommonProps.js +8 -2
  9. package/dist/esm/formatModule/helpers/formatEchartCommonProps.js.map +1 -1
  10. package/dist/esm/formatModule/helpers/formatFormProps.js +14 -3
  11. package/dist/esm/formatModule/helpers/formatFormProps.js.map +1 -1
  12. package/dist/esm/formatModule/helpers/formatHighCodeProps.js +6 -1
  13. package/dist/esm/formatModule/helpers/formatHighCodeProps.js.map +1 -1
  14. package/dist/esm/formatModule/helpers/formatListProps.js +6 -1
  15. package/dist/esm/formatModule/helpers/formatListProps.js.map +1 -1
  16. package/dist/esm/formatModule/helpers/formatStyleProps.js +6 -2
  17. package/dist/esm/formatModule/helpers/formatStyleProps.js.map +1 -1
  18. package/dist/esm/formatModule/helpers/staticCodeAssemble.js +6 -2
  19. package/dist/esm/formatModule/helpers/staticCodeAssemble.js.map +1 -1
  20. package/dist/esm/index.d.ts +2 -3
  21. package/dist/esm/index.js +1 -2
  22. package/dist/esm/index.js.map +1 -1
  23. package/dist/esm/pathArgsUtils.js +7 -2
  24. package/dist/esm/pathArgsUtils.js.map +1 -1
  25. package/dist/esm/treeUtils.js +3 -1
  26. package/dist/esm/treeUtils.js.map +1 -1
  27. package/dist/umd/index.min.js +1 -1
  28. package/dist/umd/index.min.js.map +1 -1
  29. package/package.json +2 -4
  30. package/dist/cjs/sseFetch.d.ts +0 -12
  31. package/dist/cjs/sseFetch.js +0 -41
  32. package/dist/cjs/sseFetch.js.map +0 -7
  33. package/dist/esm/sseFetch.d.ts +0 -12
  34. package/dist/esm/sseFetch.js +0 -34
  35. package/dist/esm/sseFetch.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boteteam/utils",
3
- "version": "0.0.8",
3
+ "version": "0.0.12",
4
4
  "description": "工具类",
5
5
  "module": "dist/esm/index.js",
6
6
  "main": "dist/cjs/index.js",
@@ -23,9 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@babel/runtime": "^7.23.0",
27
26
  "@lingxiteam/security": "^1.2.9",
28
- "@microsoft/fetch-event-source": "^2.0.1",
29
27
  "lodash": "^4.17.21",
30
28
  "ses": "1.12.0"
31
29
  },
@@ -33,5 +31,5 @@
33
31
  "father": "^4.4.5",
34
32
  "immer": "10.1.1"
35
33
  },
36
- "gitHead": "2d33eb0104e39724ce88cc1c8ab235031a021182"
34
+ "gitHead": "51e40ccaf0e577e896fee45c4c7cd0ce277c0eb1"
37
35
  }
@@ -1,12 +0,0 @@
1
- export interface sseFetchOptionsProps {
2
- method?: 'post' | 'get';
3
- headers?: Headers;
4
- signal?: AbortSignal;
5
- body?: string;
6
- onopen?: (response: Response) => void;
7
- onmessage?: (message: any) => void;
8
- onclose?: () => void;
9
- onerror?: (err: Error) => void;
10
- }
11
- declare const sseFetch: (url: string, options: sseFetchOptionsProps) => Promise<void>;
12
- export default sseFetch;
@@ -1,41 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/sseFetch.ts
20
- var sseFetch_exports = {};
21
- __export(sseFetch_exports, {
22
- default: () => sseFetch_default
23
- });
24
- module.exports = __toCommonJS(sseFetch_exports);
25
- var import_fetch_event_source = require("@microsoft/fetch-event-source");
26
- var sseFetch = async (url, options) => {
27
- const nowOptions = {
28
- method: "POST",
29
- headers: {
30
- "Content-Type": "application/json; charset=utf-8"
31
- },
32
- // 解决切换页面/窗口时不停重试的问题
33
- // https://github.com/Azure/fetch-event-source/issues/79
34
- // https://github.com/Azure/fetch-event-source/issues/36
35
- openWhenHidden: true,
36
- ...options
37
- };
38
- await (0, import_fetch_event_source.fetchEventSource)(url, nowOptions);
39
- };
40
- var sseFetch_default = sseFetch;
41
- //# sourceMappingURL=sseFetch.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/sseFetch.ts"],
4
- "sourcesContent": ["import { fetchEventSource } from '@microsoft/fetch-event-source';\n\nexport interface sseFetchOptionsProps {\n method?: 'post' | 'get';\n headers?: Headers;\n signal?: AbortSignal;\n body?: string;\n onopen?: (response: Response) => void;\n onmessage?: (message: any) => void;\n onclose?: () => void;\n onerror?: (err: Error) => void;\n}\nconst sseFetch = async (url: string, options: sseFetchOptionsProps) => {\n const nowOptions: { [key: string]: any } = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n },\n // 解决切换页面/窗口时不停重试的问题\n // https://github.com/Azure/fetch-event-source/issues/79\n // https://github.com/Azure/fetch-event-source/issues/36\n openWhenHidden: true,\n ...options,\n };\n await fetchEventSource(url, nowOptions);\n};\n\nexport default sseFetch;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAiC;AAYjC,IAAM,WAAW,OAAO,KAAa,YAAkC;AACrE,QAAM,aAAqC;AAAA,IACzC,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,gBAAgB;AAAA,IAClB;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAgB;AAAA,IAChB,GAAG;AAAA,EACL;AACA,YAAM,4CAAiB,KAAK,UAAU;AACxC;AAEA,IAAO,mBAAQ;",
6
- "names": []
7
- }
@@ -1,12 +0,0 @@
1
- export interface sseFetchOptionsProps {
2
- method?: 'post' | 'get';
3
- headers?: Headers;
4
- signal?: AbortSignal;
5
- body?: string;
6
- onopen?: (response: Response) => void;
7
- onmessage?: (message: any) => void;
8
- onclose?: () => void;
9
- onerror?: (err: Error) => void;
10
- }
11
- declare const sseFetch: (url: string, options: sseFetchOptionsProps) => Promise<void>;
12
- export default sseFetch;
@@ -1,34 +0,0 @@
1
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
- import { fetchEventSource } from '@microsoft/fetch-event-source';
5
- var sseFetch = /*#__PURE__*/function () {
6
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, options) {
7
- var nowOptions;
8
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9
- while (1) switch (_context.prev = _context.next) {
10
- case 0:
11
- nowOptions = _objectSpread({
12
- method: 'POST',
13
- headers: {
14
- 'Content-Type': 'application/json; charset=utf-8'
15
- },
16
- // 解决切换页面/窗口时不停重试的问题
17
- // https://github.com/Azure/fetch-event-source/issues/79
18
- // https://github.com/Azure/fetch-event-source/issues/36
19
- openWhenHidden: true
20
- }, options);
21
- _context.next = 3;
22
- return fetchEventSource(url, nowOptions);
23
- case 3:
24
- case "end":
25
- return _context.stop();
26
- }
27
- }, _callee);
28
- }));
29
- return function sseFetch(_x, _x2) {
30
- return _ref.apply(this, arguments);
31
- };
32
- }();
33
- export default sseFetch;
34
- //# sourceMappingURL=sseFetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["fetchEventSource","sseFetch","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","url","options","nowOptions","wrap","_callee$","_context","prev","next","_objectSpread","method","headers","openWhenHidden","stop","_x","_x2","apply","arguments"],"sources":["../../src/sseFetch.ts"],"sourcesContent":["import { fetchEventSource } from '@microsoft/fetch-event-source';\n\nexport interface sseFetchOptionsProps {\n method?: 'post' | 'get';\n headers?: Headers;\n signal?: AbortSignal;\n body?: string;\n onopen?: (response: Response) => void;\n onmessage?: (message: any) => void;\n onclose?: () => void;\n onerror?: (err: Error) => void;\n}\nconst sseFetch = async (url: string, options: sseFetchOptionsProps) => {\n const nowOptions: { [key: string]: any } = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n },\n // 解决切换页面/窗口时不停重试的问题\n // https://github.com/Azure/fetch-event-source/issues/79\n // https://github.com/Azure/fetch-event-source/issues/36\n openWhenHidden: true,\n ...options,\n };\n await fetchEventSource(url, nowOptions);\n};\n\nexport default sseFetch;\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,+BAA+B;AAYhE,IAAMC,QAAQ;EAAA,IAAAC,IAAA,GAAAC,iBAAA,eAAAC,mBAAA,GAAAC,IAAA,CAAG,SAAAC,QAAOC,GAAW,EAAEC,OAA6B;IAAA,IAAAC,UAAA;IAAA,OAAAL,mBAAA,GAAAM,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UAC1DL,UAAkC,GAAAM,aAAA;YACtCC,MAAM,EAAE,MAAM;YACdC,OAAO,EAAE;cACP,cAAc,EAAE;YAClB,CAAC;YACD;YACA;YACA;YACAC,cAAc,EAAE;UAAI,GACjBV,OAAO;UAAAI,QAAA,CAAAE,IAAA;UAAA,OAENd,gBAAgB,CAACO,GAAG,EAAEE,UAAU,CAAC;QAAA;QAAA;UAAA,OAAAG,QAAA,CAAAO,IAAA;MAAA;IAAA,GAAAb,OAAA;EAAA,CACxC;EAAA,gBAbKL,QAAQA,CAAAmB,EAAA,EAAAC,GAAA;IAAA,OAAAnB,IAAA,CAAAoB,KAAA,OAAAC,SAAA;EAAA;AAAA,GAab;AAED,eAAetB,QAAQ"}