@splendidlabz/utils 1.10.3 → 1.10.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.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/node/env.cjs +30 -0
- package/dist/cjs/node/index.cjs +5 -3
- package/dist/cjs/node/{common.cjs → uuid.cjs} +3 -3
- package/dist/esm/node/env.js +6 -0
- package/dist/esm/node/index.js +2 -1
- package/dist/types/node/env.d.cts +3 -0
- package/dist/types/node/index.d.cts +2 -1
- package/package.json +2 -1
- package/src/node/env.js +3 -0
- package/src/node/index.js +2 -1
- /package/dist/esm/node/{common.js → uuid.js} +0 -0
- /package/dist/types/node/{common.d.cts → uuid.d.cts} +0 -0
- /package/src/node/{common.js → uuid.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
var env_exports = {};
|
|
19
|
+
__export(env_exports, {
|
|
20
|
+
env: () => env
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(env_exports);
|
|
23
|
+
const import_meta = {};
|
|
24
|
+
function env(key) {
|
|
25
|
+
return process.env[key] || import_meta.env[key];
|
|
26
|
+
}
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
env
|
|
30
|
+
});
|
package/dist/cjs/node/index.cjs
CHANGED
|
@@ -14,20 +14,22 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
15
|
var node_exports = {};
|
|
16
16
|
module.exports = __toCommonJS(node_exports);
|
|
17
|
-
__reExport(node_exports, require("./common.js"), module.exports);
|
|
18
17
|
__reExport(node_exports, require("./dirname.js"), module.exports);
|
|
18
|
+
__reExport(node_exports, require("./env.js"), module.exports);
|
|
19
19
|
__reExport(node_exports, require("./file-cache.js"), module.exports);
|
|
20
20
|
__reExport(node_exports, require("./hash.js"), module.exports);
|
|
21
21
|
__reExport(node_exports, require("./pkce.js"), module.exports);
|
|
22
22
|
__reExport(node_exports, require("./random-string.js"), module.exports);
|
|
23
23
|
__reExport(node_exports, require("./sanitize.js"), module.exports);
|
|
24
|
+
__reExport(node_exports, require("./uuid.js"), module.exports);
|
|
24
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25
26
|
0 && (module.exports = {
|
|
26
|
-
...require("./common.js"),
|
|
27
27
|
...require("./dirname.js"),
|
|
28
|
+
...require("./env.js"),
|
|
28
29
|
...require("./file-cache.js"),
|
|
29
30
|
...require("./hash.js"),
|
|
30
31
|
...require("./pkce.js"),
|
|
31
32
|
...require("./random-string.js"),
|
|
32
|
-
...require("./sanitize.js")
|
|
33
|
+
...require("./sanitize.js"),
|
|
34
|
+
...require("./uuid.js")
|
|
33
35
|
});
|
|
@@ -25,11 +25,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var
|
|
29
|
-
__export(
|
|
28
|
+
var uuid_exports = {};
|
|
29
|
+
__export(uuid_exports, {
|
|
30
30
|
uuid: () => uuid
|
|
31
31
|
});
|
|
32
|
-
module.exports = __toCommonJS(
|
|
32
|
+
module.exports = __toCommonJS(uuid_exports);
|
|
33
33
|
var import_crypto = __toESM(require("crypto"), 1);
|
|
34
34
|
function uuid() {
|
|
35
35
|
return import_crypto.default.randomUUID();
|
package/dist/esm/node/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from "./common.js";
|
|
2
1
|
export * from "./dirname.js";
|
|
2
|
+
export * from "./env.js";
|
|
3
3
|
export * from "./file-cache.js";
|
|
4
4
|
export * from "./hash.js";
|
|
5
5
|
export * from "./pkce.js";
|
|
6
6
|
export * from "./random-string.js";
|
|
7
7
|
export * from "./sanitize.js";
|
|
8
|
+
export * from "./uuid.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { uuid } from './common.cjs';
|
|
2
1
|
export { __dirname, dirname } from './dirname.cjs';
|
|
2
|
+
export { env } from './env.cjs';
|
|
3
3
|
export { createCache, fileCache, getLastModifiedTime, getLatestModifiedTime, removeFirstSlash } from './file-cache.cjs';
|
|
4
4
|
export { sha256Hash } from './hash.cjs';
|
|
5
5
|
export { PKCE } from './pkce.cjs';
|
|
6
6
|
export { randomString } from './random-string.cjs';
|
|
7
7
|
export { sanitize } from './sanitize.cjs';
|
|
8
|
+
export { uuid } from './uuid.cjs';
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splendidlabz/utils",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"homepage": "https://splendidlabz.com/docs/utils",
|
|
6
7
|
"sideEffects": false,
|
|
7
8
|
"main": "./dist/cjs/lib/index.cjs",
|
|
8
9
|
"module": "./dist/esm/lib/index.js",
|
package/src/node/env.js
ADDED
package/src/node/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from './common.js'
|
|
2
1
|
export * from './dirname.js'
|
|
2
|
+
export * from './env.js'
|
|
3
3
|
export * from './file-cache.js'
|
|
4
4
|
export * from './hash.js'
|
|
5
5
|
export * from './pkce.js'
|
|
6
6
|
export * from './random-string.js'
|
|
7
7
|
export * from './sanitize.js'
|
|
8
|
+
export * from './uuid.js'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|