joist-utils 2.4.0 → 2.5.0-next.10
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.
- package/build/Deferred.cjs +1 -2
- package/build/Deferred.d.cts +1 -4
- package/build/Deferred.d.cts.map +1 -1
- package/build/Deferred.d.mts +1 -4
- package/build/Deferred.d.mts.map +1 -1
- package/build/Deferred.js +1 -2
- package/build/connection.cjs +1 -2
- package/build/connection.d.cts +4 -6
- package/build/connection.d.cts.map +1 -1
- package/build/connection.d.mts +4 -6
- package/build/connection.d.mts.map +1 -1
- package/build/connection.js +1 -2
- package/build/index.cjs +2 -3
- package/build/index.d.cts +6 -8
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +6 -8
- package/build/index.d.mts.map +1 -1
- package/build/index.js +2 -3
- package/build/is-plain-object.cjs +1 -2
- package/build/is-plain-object.d.cts +1 -4
- package/build/is-plain-object.d.cts.map +1 -1
- package/build/is-plain-object.d.mts +1 -4
- package/build/is-plain-object.d.mts.map +1 -1
- package/build/is-plain-object.js +1 -2
- package/build/stripAnsi.cjs +1 -2
- package/build/stripAnsi.d.cts +1 -4
- package/build/stripAnsi.d.cts.map +1 -1
- package/build/stripAnsi.d.mts +1 -4
- package/build/stripAnsi.d.mts.map +1 -1
- package/build/stripAnsi.js +1 -2
- package/package.json +3 -3
package/build/Deferred.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/Deferred.ts
|
|
3
3
|
var Deferred = class {
|
|
4
4
|
promise;
|
|
5
5
|
fate;
|
|
@@ -38,7 +38,6 @@ var Deferred = class {
|
|
|
38
38
|
return this.state === "rejected";
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
exports.Deferred = Deferred;
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=Deferred.cjs.map
|
package/build/Deferred.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare class Deferred<T> {
|
|
1
|
+
export declare class Deferred<T> {
|
|
3
2
|
promise: Promise<T>;
|
|
4
3
|
private fate;
|
|
5
4
|
private state;
|
|
@@ -13,6 +12,4 @@ declare class Deferred<T> {
|
|
|
13
12
|
isFulfilled(): boolean;
|
|
14
13
|
isRejected(): boolean;
|
|
15
14
|
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Deferred };
|
|
18
15
|
//# sourceMappingURL=Deferred.d.cts.map
|
package/build/Deferred.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deferred.d.cts","names":[],"sources":["../src/Deferred.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Deferred.d.cts","names":[],"sources":["../src/Deferred.ts"],"mappings":"A,qBAAa,SAAS;EACb,SAAS,QAAQ;UAChB;UACA;UACA;UACA;EAER;EAaA,QAAQ;EAQR,OAAO;EAQP;EAIA;EAIA;EAIA"}
|
package/build/Deferred.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare class Deferred<T> {
|
|
1
|
+
export declare class Deferred<T> {
|
|
3
2
|
promise: Promise<T>;
|
|
4
3
|
private fate;
|
|
5
4
|
private state;
|
|
@@ -13,6 +12,4 @@ declare class Deferred<T> {
|
|
|
13
12
|
isFulfilled(): boolean;
|
|
14
13
|
isRejected(): boolean;
|
|
15
14
|
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Deferred };
|
|
18
15
|
//# sourceMappingURL=Deferred.d.mts.map
|
package/build/Deferred.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deferred.d.mts","names":[],"sources":["../src/Deferred.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Deferred.d.mts","names":[],"sources":["../src/Deferred.ts"],"mappings":"A,qBAAa,SAAS;EACb,SAAS,QAAQ;UAChB;UACA;UACA;UACA;EAER;EAaA,QAAQ;EAQR,OAAO;EAQP;EAIA;EAIA;EAIA"}
|
package/build/Deferred.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/Deferred.ts
|
|
2
2
|
var Deferred = class {
|
|
3
3
|
promise;
|
|
4
4
|
fate;
|
|
@@ -37,7 +37,6 @@ var Deferred = class {
|
|
|
37
37
|
return this.state === "rejected";
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
export { Deferred };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=Deferred.js.map
|
package/build/connection.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let pg_connection_string = require("pg-connection-string");
|
|
3
|
-
|
|
3
|
+
// src/connection.ts
|
|
4
4
|
/**
|
|
5
5
|
* Returns the `ConnectionConfig` that joist will use to connect to pg.
|
|
6
6
|
*
|
|
@@ -42,7 +42,6 @@ function newPgConnectionConfig(env) {
|
|
|
42
42
|
};
|
|
43
43
|
} else throw new Error("No DATABASE_URL or DB_DATABASE/etc. environment variable found");
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
exports.newPgConnectionConfig = newPgConnectionConfig;
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=connection.cjs.map
|
package/build/connection.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/connection.d.ts
|
|
2
1
|
type DatabaseUrlEnv = {
|
|
3
2
|
DATABASE_URL: string;
|
|
4
3
|
};
|
|
@@ -10,14 +9,14 @@ type DbSettingsEnv = {
|
|
|
10
9
|
DB_PORT: string;
|
|
11
10
|
DB_SSL?: string;
|
|
12
11
|
};
|
|
13
|
-
type ConnectionEnv = DatabaseUrlEnv | DbSettingsEnv;
|
|
12
|
+
export type ConnectionEnv = DatabaseUrlEnv | DbSettingsEnv;
|
|
14
13
|
/**
|
|
15
14
|
* A simple connection config compatible with both `pg.Pool` and knex.
|
|
16
15
|
*
|
|
17
16
|
* We use a plain object type instead of pg's `ConnectionConfig` to avoid
|
|
18
17
|
* pulling in pg-specific fields (like `types`) that are incompatible with knex.
|
|
19
18
|
*/
|
|
20
|
-
type ConnectionConfig = {
|
|
19
|
+
export type ConnectionConfig = {
|
|
21
20
|
user?: string;
|
|
22
21
|
password?: string;
|
|
23
22
|
database?: string;
|
|
@@ -40,7 +39,6 @@ type ConnectionConfig = {
|
|
|
40
39
|
* Note that users using a library for typed / validated environment variables, i.e.
|
|
41
40
|
* ts-app-env, you can pass in a specific `env` variable.
|
|
42
41
|
*/
|
|
43
|
-
declare function newPgConnectionConfig(env?: ConnectionEnv): ConnectionConfig;
|
|
44
|
-
|
|
45
|
-
export { ConnectionConfig, ConnectionEnv, newPgConnectionConfig };
|
|
42
|
+
export declare function newPgConnectionConfig(env?: ConnectionEnv): ConnectionConfig;
|
|
43
|
+
export {};
|
|
46
44
|
//# sourceMappingURL=connection.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.cts","names":[],"sources":["../src/connection.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.cts","names":[],"sources":["../src/connection.ts"],"mappings":"A,KAEK;EAAmB;;KACnB;EACH;EACA;EACA;EACA;EACA;EACA;;YAGU,gBAAgB,iBAAiB;;;;;;;YAQjC;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;;;;;;wBAiBc,sBAAsB,MAAM,gBAAgB"}
|
package/build/connection.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/connection.d.ts
|
|
2
1
|
type DatabaseUrlEnv = {
|
|
3
2
|
DATABASE_URL: string;
|
|
4
3
|
};
|
|
@@ -10,14 +9,14 @@ type DbSettingsEnv = {
|
|
|
10
9
|
DB_PORT: string;
|
|
11
10
|
DB_SSL?: string;
|
|
12
11
|
};
|
|
13
|
-
type ConnectionEnv = DatabaseUrlEnv | DbSettingsEnv;
|
|
12
|
+
export type ConnectionEnv = DatabaseUrlEnv | DbSettingsEnv;
|
|
14
13
|
/**
|
|
15
14
|
* A simple connection config compatible with both `pg.Pool` and knex.
|
|
16
15
|
*
|
|
17
16
|
* We use a plain object type instead of pg's `ConnectionConfig` to avoid
|
|
18
17
|
* pulling in pg-specific fields (like `types`) that are incompatible with knex.
|
|
19
18
|
*/
|
|
20
|
-
type ConnectionConfig = {
|
|
19
|
+
export type ConnectionConfig = {
|
|
21
20
|
user?: string;
|
|
22
21
|
password?: string;
|
|
23
22
|
database?: string;
|
|
@@ -40,7 +39,6 @@ type ConnectionConfig = {
|
|
|
40
39
|
* Note that users using a library for typed / validated environment variables, i.e.
|
|
41
40
|
* ts-app-env, you can pass in a specific `env` variable.
|
|
42
41
|
*/
|
|
43
|
-
declare function newPgConnectionConfig(env?: ConnectionEnv): ConnectionConfig;
|
|
44
|
-
|
|
45
|
-
export { ConnectionConfig, ConnectionEnv, newPgConnectionConfig };
|
|
42
|
+
export declare function newPgConnectionConfig(env?: ConnectionEnv): ConnectionConfig;
|
|
43
|
+
export {};
|
|
46
44
|
//# sourceMappingURL=connection.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.mts","names":[],"sources":["../src/connection.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.mts","names":[],"sources":["../src/connection.ts"],"mappings":"A,KAEK;EAAmB;;KACnB;EACH;EACA;EACA;EACA;EACA;EACA;;YAGU,gBAAgB,iBAAiB;;;;;;;YAQjC;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;;;;;;wBAiBc,sBAAsB,MAAM,gBAAgB"}
|
package/build/connection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parse } from "pg-connection-string";
|
|
2
|
-
|
|
2
|
+
// src/connection.ts
|
|
3
3
|
/**
|
|
4
4
|
* Returns the `ConnectionConfig` that joist will use to connect to pg.
|
|
5
5
|
*
|
|
@@ -41,7 +41,6 @@ function newPgConnectionConfig(env) {
|
|
|
41
41
|
};
|
|
42
42
|
} else throw new Error("No DATABASE_URL or DB_DATABASE/etc. environment variable found");
|
|
43
43
|
}
|
|
44
|
-
//#endregion
|
|
45
44
|
export { newPgConnectionConfig };
|
|
46
45
|
|
|
47
46
|
//# sourceMappingURL=connection.js.map
|
package/build/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Deferred = require("./Deferred.cjs");
|
|
3
2
|
const require_connection = require("./connection.cjs");
|
|
3
|
+
const require_Deferred = require("./Deferred.cjs");
|
|
4
4
|
const require_is_plain_object = require("./is-plain-object.cjs");
|
|
5
5
|
const require_stripAnsi = require("./stripAnsi.cjs");
|
|
6
|
-
|
|
6
|
+
// src/index.ts
|
|
7
7
|
function fail(message) {
|
|
8
8
|
throw new Error(message || "Failed");
|
|
9
9
|
}
|
|
@@ -26,7 +26,6 @@ function keyBy(list, fnOrKey, valueFn) {
|
|
|
26
26
|
});
|
|
27
27
|
return result;
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
exports.Deferred = require_Deferred.Deferred;
|
|
31
30
|
exports.fail = fail;
|
|
32
31
|
exports.groupBy = groupBy;
|
package/build/index.d.cts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { Deferred } from "./Deferred.cjs";
|
|
2
1
|
import { ConnectionConfig, newPgConnectionConfig } from "./connection.cjs";
|
|
2
|
+
import { Deferred } from "./Deferred.cjs";
|
|
3
3
|
import { isPlainObject } from "./is-plain-object.cjs";
|
|
4
4
|
import { stripAnsi } from "./stripAnsi.cjs";
|
|
5
|
-
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
//#endregion
|
|
11
|
-
export { CallbackFn, type ConnectionConfig, Deferred, fail, groupBy, isPlainObject, keyBy, newPgConnectionConfig, stripAnsi };
|
|
5
|
+
export declare function fail(message?: string): never;
|
|
6
|
+
export declare function groupBy<T, Y = T>(list: readonly T[], fn: (x: T) => string, valueFn?: (x: T) => Y): Record<string, Y[]>;
|
|
7
|
+
export declare function keyBy<T, K extends PropertyKey, Y = T>(list: readonly T[], fnOrKey: CallbackFn<T, K> | keyof T[][number], valueFn?: CallbackFn<T, Y>): Record<K, Y>;
|
|
8
|
+
export type CallbackFn<T, R = any> = (element: T, index: number, array: readonly T[]) => R;
|
|
9
|
+
export { type ConnectionConfig, Deferred, isPlainObject, newPgConnectionConfig, stripAnsi };
|
|
12
10
|
//# sourceMappingURL=index.d.cts.map
|
package/build/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;wBAKgB,KAAK;wBAIL,QAAQ,GAAG,IAAI,GAC7B,eAAe,KACf,KAAK,GAAG,cACR,WAAW,GAAG,MAAM,IACnB,eAAe;wBAYF,MAAM,GAAG,UAAU,aAAa,IAAI,GAClD,eAAe,KACf,SAAS,WAAW,GAAG,WAAW,aAClC,UAAU,WAAW,GAAG,KAAE,OAAA,GAAA;YAchB,WAAW,GAAG,YAAY,SAAS,GAAG,eAAe,gBAAgB,QAAQ"}
|
package/build/index.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { Deferred } from "./Deferred.mjs";
|
|
2
1
|
import { ConnectionConfig, newPgConnectionConfig } from "./connection.mjs";
|
|
2
|
+
import { Deferred } from "./Deferred.mjs";
|
|
3
3
|
import { isPlainObject } from "./is-plain-object.mjs";
|
|
4
4
|
import { stripAnsi } from "./stripAnsi.mjs";
|
|
5
|
-
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
//#endregion
|
|
11
|
-
export { CallbackFn, type ConnectionConfig, Deferred, fail, groupBy, isPlainObject, keyBy, newPgConnectionConfig, stripAnsi };
|
|
5
|
+
export declare function fail(message?: string): never;
|
|
6
|
+
export declare function groupBy<T, Y = T>(list: readonly T[], fn: (x: T) => string, valueFn?: (x: T) => Y): Record<string, Y[]>;
|
|
7
|
+
export declare function keyBy<T, K extends PropertyKey, Y = T>(list: readonly T[], fnOrKey: CallbackFn<T, K> | keyof T[][number], valueFn?: CallbackFn<T, Y>): Record<K, Y>;
|
|
8
|
+
export type CallbackFn<T, R = any> = (element: T, index: number, array: readonly T[]) => R;
|
|
9
|
+
export { type ConnectionConfig, Deferred, isPlainObject, newPgConnectionConfig, stripAnsi };
|
|
12
10
|
//# sourceMappingURL=index.d.mts.map
|
package/build/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;wBAKgB,KAAK;wBAIL,QAAQ,GAAG,IAAI,GAC7B,eAAe,KACf,KAAK,GAAG,cACR,WAAW,GAAG,MAAM,IACnB,eAAe;wBAYF,MAAM,GAAG,UAAU,aAAa,IAAI,GAClD,eAAe,KACf,SAAS,WAAW,GAAG,WAAW,aAClC,UAAU,WAAW,GAAG,KAAE,OAAA,GAAA;YAchB,WAAW,GAAG,YAAY,SAAS,GAAG,eAAe,gBAAgB,QAAQ"}
|
package/build/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Deferred } from "./Deferred.js";
|
|
2
1
|
import { newPgConnectionConfig } from "./connection.js";
|
|
2
|
+
import { Deferred } from "./Deferred.js";
|
|
3
3
|
import { isPlainObject } from "./is-plain-object.js";
|
|
4
4
|
import { stripAnsi } from "./stripAnsi.js";
|
|
5
|
-
|
|
5
|
+
// src/index.ts
|
|
6
6
|
function fail(message) {
|
|
7
7
|
throw new Error(message || "Failed");
|
|
8
8
|
}
|
|
@@ -25,7 +25,6 @@ function keyBy(list, fnOrKey, valueFn) {
|
|
|
25
25
|
});
|
|
26
26
|
return result;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { Deferred, fail, groupBy, isPlainObject, keyBy, newPgConnectionConfig, stripAnsi };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/is-plain-object.ts
|
|
3
3
|
/*!
|
|
4
4
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
5
5
|
*
|
|
@@ -18,7 +18,6 @@ function isPlainObject(o) {
|
|
|
18
18
|
if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
exports.isPlainObject = isPlainObject;
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=is-plain-object.cjs.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
//#region src/is-plain-object.d.ts
|
|
2
1
|
/*!
|
|
3
2
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
3
|
*
|
|
5
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
5
|
* Released under the MIT License.
|
|
7
6
|
*/
|
|
8
|
-
declare function isPlainObject(o: any): boolean;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { isPlainObject };
|
|
7
|
+
export declare function isPlainObject(o: any): boolean;
|
|
11
8
|
//# sourceMappingURL=is-plain-object.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.cts","names":[],"sources":["../src/is-plain-object.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-plain-object.d.cts","names":[],"sources":["../src/is-plain-object.ts"],"mappings":";;;;;;wBAagB,cAAc"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
//#region src/is-plain-object.d.ts
|
|
2
1
|
/*!
|
|
3
2
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
3
|
*
|
|
5
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
5
|
* Released under the MIT License.
|
|
7
6
|
*/
|
|
8
|
-
declare function isPlainObject(o: any): boolean;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { isPlainObject };
|
|
7
|
+
export declare function isPlainObject(o: any): boolean;
|
|
11
8
|
//# sourceMappingURL=is-plain-object.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.mts","names":[],"sources":["../src/is-plain-object.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-plain-object.d.mts","names":[],"sources":["../src/is-plain-object.ts"],"mappings":";;;;;;wBAagB,cAAc"}
|
package/build/is-plain-object.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/is-plain-object.ts
|
|
2
2
|
/*!
|
|
3
3
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
4
|
*
|
|
@@ -17,7 +17,6 @@ function isPlainObject(o) {
|
|
|
17
17
|
if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
|
|
18
18
|
return true;
|
|
19
19
|
}
|
|
20
|
-
//#endregion
|
|
21
20
|
export { isPlainObject };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=is-plain-object.js.map
|
package/build/stripAnsi.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/stripAnsi.ts
|
|
3
3
|
/** Removes ANSI color codes from a string. */
|
|
4
4
|
function stripAnsi(value) {
|
|
5
5
|
return value.replace(/\u001B\[[0-?]*[ -/]*[@-~]/g, "");
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
exports.stripAnsi = stripAnsi;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=stripAnsi.cjs.map
|
package/build/stripAnsi.d.cts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
//#region src/stripAnsi.d.ts
|
|
2
1
|
/** Removes ANSI color codes from a string. */
|
|
3
|
-
declare function stripAnsi(value: string): string;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { stripAnsi };
|
|
2
|
+
export declare function stripAnsi(value: string): string;
|
|
6
3
|
//# sourceMappingURL=stripAnsi.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripAnsi.d.cts","names":[],"sources":["../src/stripAnsi.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"stripAnsi.d.cts","names":[],"sources":["../src/stripAnsi.ts"],"mappings":";wBACgB,UAAU"}
|
package/build/stripAnsi.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
//#region src/stripAnsi.d.ts
|
|
2
1
|
/** Removes ANSI color codes from a string. */
|
|
3
|
-
declare function stripAnsi(value: string): string;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { stripAnsi };
|
|
2
|
+
export declare function stripAnsi(value: string): string;
|
|
6
3
|
//# sourceMappingURL=stripAnsi.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripAnsi.d.mts","names":[],"sources":["../src/stripAnsi.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"stripAnsi.d.mts","names":[],"sources":["../src/stripAnsi.ts"],"mappings":";wBACgB,UAAU"}
|
package/build/stripAnsi.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/stripAnsi.ts
|
|
2
2
|
/** Removes ANSI color codes from a string. */
|
|
3
3
|
function stripAnsi(value) {
|
|
4
4
|
return value.replace(/\u001B\[[0-?]*[ -/]*[@-~]/g, "");
|
|
5
5
|
}
|
|
6
|
-
//#endregion
|
|
7
6
|
export { stripAnsi };
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=stripAnsi.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joist-utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-next.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"test": "jest"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@swc/core": "
|
|
46
|
+
"@swc/core": "1.16.21",
|
|
47
47
|
"@swc/jest": "^0.2.39",
|
|
48
48
|
"@types/jest": "^30.0.0",
|
|
49
|
-
"@types/node": "^26.
|
|
49
|
+
"@types/node": "^26.6.6",
|
|
50
50
|
"jest": "30.4.2",
|
|
51
51
|
"tsconfig-paths": "^4.2.0",
|
|
52
52
|
"typescript": "7.0.2"
|