xjs-common 9.1.3 → 9.1.4

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.
@@ -41,6 +41,11 @@ export declare namespace UFile {
41
41
  * @param destDir directory that the decompress files export to.
42
42
  */
43
43
  function unzip(zipPath: MaybeArray<string>, destDir?: MaybeArray<string>): void;
44
+ /**
45
+ * @deprecated since v9.1.4
46
+ * @removed this will be removed in v10.
47
+ * @replaced it should uses this without namespace `UFile`.
48
+ */
44
49
  function joinPath(...p: MaybeArray<string>[]): string;
45
50
  }
46
51
  export {};
@@ -159,6 +159,11 @@ var UFile;
159
159
  }
160
160
  }
161
161
  UFile.unzip = unzip;
162
+ /**
163
+ * @deprecated since v9.1.4
164
+ * @removed this will be removed in v10.
165
+ * @replaced it should uses this without namespace `UFile`.
166
+ */
162
167
  function joinPath(...p) {
163
168
  return path.join(...p.flatMap(u_type_1.UType.takeAsArray));
164
169
  }
package/dist/func/u.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Loggable } from "../const/types";
1
+ import { Loggable, MaybeArray } from "../const/types";
2
2
  export declare function getJSTDate(d?: Date): Date;
3
3
  export declare function delay(sec: number): Promise<void>;
4
4
  export declare function int2array(size: number): number[];
@@ -23,3 +23,4 @@ export declare function retry<T>(cb: () => T, op?: RetryOption<void>): T;
23
23
  export declare function retry<T>(cb: () => T, op?: RetryOption<Promise<void>>): Promise<T>;
24
24
  export declare function retry<T>(cb: () => Promise<T>, op?: RetryOption<void>): Promise<T>;
25
25
  export declare function retry<T>(cb: () => Promise<T>, op?: RetryOption<Promise<void>>): Promise<T>;
26
+ export declare function joinPath(...p: MaybeArray<string>[]): string;
package/dist/func/u.js CHANGED
@@ -1,7 +1,32 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.retry = exports.checkPortAvailability = exports.bitor = exports.array2map = exports.int2array = exports.delay = exports.getJSTDate = void 0;
26
+ exports.joinPath = exports.retry = exports.checkPortAvailability = exports.bitor = exports.array2map = exports.int2array = exports.delay = exports.getJSTDate = void 0;
27
+ const path = __importStar(require("path"));
4
28
  const xjs_err_1 = require("../obj/xjs-err");
29
+ const u_type_1 = require("./u-type");
5
30
  const s_errCode = 10;
6
31
  function getJSTDate(d) {
7
32
  return new Date((d ? d.getTime() : Date.now()) + 9 * 60 * 60 * 1000);
@@ -83,3 +108,7 @@ function retry(cb, op) {
83
108
  return prcs(initialCount);
84
109
  }
85
110
  exports.retry = retry;
111
+ function joinPath(...p) {
112
+ return path.join(...p.flatMap(u_type_1.UType.takeAsArray));
113
+ }
114
+ exports.joinPath = joinPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xjs-common",
3
- "version": "9.1.3",
3
+ "version": "9.1.4",
4
4
  "description": "library modules for nodejs + typescript that bundled general-purpose implementations.",
5
5
  "repository": {
6
6
  "type": "git",