@sprucelabs/spruce-skill-utils 32.0.89 → 32.0.91
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.
|
@@ -12,7 +12,6 @@ import os from 'os';
|
|
|
12
12
|
import pathUtil from 'path';
|
|
13
13
|
import { SchemaError } from '@sprucelabs/schema';
|
|
14
14
|
import fsUtil from 'fs-extra';
|
|
15
|
-
import * as uuid from 'uuid';
|
|
16
15
|
import { HASH_SPRUCE_BUILD_DIR, HASH_SPRUCE_DIR, HASH_SPRUCE_DIR_NAME, } from '../constants.js';
|
|
17
16
|
function existsSync(path) {
|
|
18
17
|
return !!fsUtil.statSync(path, { throwIfNoEntry: false });
|
|
@@ -209,7 +208,7 @@ const diskUtil = {
|
|
|
209
208
|
return targetDir;
|
|
210
209
|
},
|
|
211
210
|
createRandomTempDir() {
|
|
212
|
-
return this.createTempDir(uuid
|
|
211
|
+
return this.createTempDir(uuid());
|
|
213
212
|
},
|
|
214
213
|
hasFileChanged(...filePath) {
|
|
215
214
|
if (!filePath || !(filePath.length > 0)) {
|
|
@@ -286,3 +285,9 @@ const diskUtil = {
|
|
|
286
285
|
},
|
|
287
286
|
};
|
|
288
287
|
export default diskUtil;
|
|
288
|
+
function uuid() {
|
|
289
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
290
|
+
let r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
291
|
+
return v.toString(16);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
@@ -1,37 +1,4 @@
|
|
|
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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
@@ -41,7 +8,6 @@ const os_1 = __importDefault(require("os"));
|
|
|
41
8
|
const path_1 = __importDefault(require("path"));
|
|
42
9
|
const schema_1 = require("@sprucelabs/schema");
|
|
43
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
44
|
-
const uuid = __importStar(require("uuid"));
|
|
45
11
|
const constants_1 = require("../constants");
|
|
46
12
|
function existsSync(path) {
|
|
47
13
|
return !!fs_extra_1.default.statSync(path, { throwIfNoEntry: false });
|
|
@@ -236,7 +202,7 @@ const diskUtil = {
|
|
|
236
202
|
return targetDir;
|
|
237
203
|
},
|
|
238
204
|
createRandomTempDir() {
|
|
239
|
-
return this.createTempDir(uuid
|
|
205
|
+
return this.createTempDir(uuid());
|
|
240
206
|
},
|
|
241
207
|
hasFileChanged(...filePath) {
|
|
242
208
|
if (!filePath || !(filePath.length > 0)) {
|
|
@@ -313,3 +279,9 @@ const diskUtil = {
|
|
|
313
279
|
},
|
|
314
280
|
};
|
|
315
281
|
exports.default = diskUtil;
|
|
282
|
+
function uuid() {
|
|
283
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
284
|
+
let r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
285
|
+
return v.toString(16);
|
|
286
|
+
});
|
|
287
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "32.0.
|
|
6
|
+
"version": "32.0.91",
|
|
7
7
|
"skill": {
|
|
8
8
|
"namespace": "skill-utils",
|
|
9
9
|
"upgradeIgnoreList": [
|
|
@@ -63,8 +63,7 @@
|
|
|
63
63
|
"dotenv": "^17.2.2",
|
|
64
64
|
"fs-extra": "^11.3.1",
|
|
65
65
|
"inflection": "^3.0.2",
|
|
66
|
-
"lodash": "^4.17.21"
|
|
67
|
-
"uuid": "^11.1.0"
|
|
66
|
+
"lodash": "^4.17.21"
|
|
68
67
|
},
|
|
69
68
|
"devDependencies": {
|
|
70
69
|
"@sprucelabs/esm-postbuild": "^7.0.29",
|
|
@@ -72,15 +71,14 @@
|
|
|
72
71
|
"@sprucelabs/jest-sheets-reporter": "^4.0.34",
|
|
73
72
|
"@sprucelabs/resolve-path-aliases": "^3.0.22",
|
|
74
73
|
"@sprucelabs/semantic-release": "^5.0.2",
|
|
75
|
-
"@sprucelabs/test": "^10.0.
|
|
76
|
-
"@sprucelabs/test-utils": "^6.0.
|
|
74
|
+
"@sprucelabs/test": "^10.0.20",
|
|
75
|
+
"@sprucelabs/test-utils": "^6.0.71",
|
|
77
76
|
"@types/fs-extra": "^11.0.4",
|
|
78
77
|
"@types/inflection": "^2.0.0",
|
|
79
78
|
"@types/lodash": "^4.17.20",
|
|
80
79
|
"@types/node": "^24.3.1",
|
|
81
|
-
"@types/uuid": "^10.0.0",
|
|
82
80
|
"chokidar-cli": "^3.0.0",
|
|
83
|
-
"eslint": "^9.
|
|
81
|
+
"eslint": "^9.35.0",
|
|
84
82
|
"eslint-config-spruce": "^11.2.26",
|
|
85
83
|
"jest": "^30.1.3",
|
|
86
84
|
"jest-circus": "^30.1.3",
|