@uniformdev/cli 20.55.2 → 20.56.1-alpha.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/dist/index.mjs +12 -16
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -324,8 +324,8 @@ async function readJSON(path8) {
|
|
|
324
324
|
}
|
|
325
325
|
async function tryReadJSON(path8, missingValue = null) {
|
|
326
326
|
try {
|
|
327
|
-
const
|
|
328
|
-
return
|
|
327
|
+
const stat = await fs.stat(path8);
|
|
328
|
+
return stat.isFile() ? await readJSON(path8) : missingValue;
|
|
329
329
|
} catch {
|
|
330
330
|
return missingValue;
|
|
331
331
|
}
|
|
@@ -1107,7 +1107,7 @@ import { PostHog } from "posthog-node";
|
|
|
1107
1107
|
// package.json
|
|
1108
1108
|
var package_default = {
|
|
1109
1109
|
name: "@uniformdev/cli",
|
|
1110
|
-
version: "20.
|
|
1110
|
+
version: "20.56.0",
|
|
1111
1111
|
description: "Uniform command line interface tool",
|
|
1112
1112
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
1113
1113
|
main: "./cli.js",
|
|
@@ -11340,7 +11340,8 @@ var PolicyDocumentsPullModule = {
|
|
|
11340
11340
|
};
|
|
11341
11341
|
|
|
11342
11342
|
// src/commands/policy-documents/commands/push.ts
|
|
11343
|
-
import {
|
|
11343
|
+
import { existsSync as existsSync5, mkdirSync as mkdirSync4 } from "fs";
|
|
11344
|
+
import { readdir as readdir2 } from "fs/promises";
|
|
11344
11345
|
import { extname as extname2, join as join11 } from "path";
|
|
11345
11346
|
async function readLocalPolicyDocuments(directory, format, verbose) {
|
|
11346
11347
|
const files = await readdir2(directory);
|
|
@@ -11457,16 +11458,11 @@ var PolicyDocumentsPushModule = {
|
|
|
11457
11458
|
allowEmptySource,
|
|
11458
11459
|
verbose
|
|
11459
11460
|
}) => {
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
throw new Error(`Path "${directory}" is not a directory`);
|
|
11464
|
-
}
|
|
11465
|
-
} catch (e) {
|
|
11466
|
-
if (e.code === "ENOENT") {
|
|
11467
|
-
throw new Error(`Directory "${directory}" does not exist`);
|
|
11461
|
+
if (!existsSync5(directory)) {
|
|
11462
|
+
if (verbose) {
|
|
11463
|
+
console.log(`Creating directory ${directory}`);
|
|
11468
11464
|
}
|
|
11469
|
-
|
|
11465
|
+
mkdirSync4(directory, { recursive: true });
|
|
11470
11466
|
}
|
|
11471
11467
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
11472
11468
|
const localDocs = await readLocalPolicyDocuments(directory, format, verbose);
|
|
@@ -13286,7 +13282,7 @@ var WebhookCommand = {
|
|
|
13286
13282
|
import { bold as bold3, gray as gray6, green as green7 } from "colorette";
|
|
13287
13283
|
|
|
13288
13284
|
// src/updateCheck.ts
|
|
13289
|
-
import { existsSync as
|
|
13285
|
+
import { existsSync as existsSync6, promises as fs8 } from "fs";
|
|
13290
13286
|
import { get as getHttp } from "http";
|
|
13291
13287
|
import { get as getHttps } from "https";
|
|
13292
13288
|
import { tmpdir } from "os";
|
|
@@ -13298,7 +13294,7 @@ var encode = (value) => encodeURIComponent(value).replace(/^%40/, "@");
|
|
|
13298
13294
|
var getFile = async (details, distTag) => {
|
|
13299
13295
|
const rootDir = tmpdir();
|
|
13300
13296
|
const subDir = join12(rootDir, "update-check");
|
|
13301
|
-
if (!
|
|
13297
|
+
if (!existsSync6(subDir)) {
|
|
13302
13298
|
await fs8.mkdir(subDir);
|
|
13303
13299
|
}
|
|
13304
13300
|
let name = `${details.name}-${distTag}.json`;
|
|
@@ -13308,7 +13304,7 @@ var getFile = async (details, distTag) => {
|
|
|
13308
13304
|
return join12(subDir, name);
|
|
13309
13305
|
};
|
|
13310
13306
|
var evaluateCache = async (file, time, interval) => {
|
|
13311
|
-
if (
|
|
13307
|
+
if (existsSync6(file)) {
|
|
13312
13308
|
const content = await fs8.readFile(file, "utf8");
|
|
13313
13309
|
const { lastUpdate, latest } = JSON.parse(content);
|
|
13314
13310
|
const nextCheck = lastUpdate + interval;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.56.1-alpha.10+d14d9d60a8",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@inquirer/prompts": "^7.10.1",
|
|
30
30
|
"@thi.ng/mime": "^2.2.23",
|
|
31
|
-
"@uniformdev/assets": "20.
|
|
32
|
-
"@uniformdev/canvas": "20.
|
|
33
|
-
"@uniformdev/context": "20.
|
|
34
|
-
"@uniformdev/files": "20.
|
|
35
|
-
"@uniformdev/project-map": "20.
|
|
36
|
-
"@uniformdev/redirect": "20.
|
|
37
|
-
"@uniformdev/richtext": "20.
|
|
31
|
+
"@uniformdev/assets": "20.56.1-alpha.10+d14d9d60a8",
|
|
32
|
+
"@uniformdev/canvas": "20.56.1-alpha.10+d14d9d60a8",
|
|
33
|
+
"@uniformdev/context": "20.56.1-alpha.10+d14d9d60a8",
|
|
34
|
+
"@uniformdev/files": "20.56.1-alpha.10+d14d9d60a8",
|
|
35
|
+
"@uniformdev/project-map": "20.56.1-alpha.10+d14d9d60a8",
|
|
36
|
+
"@uniformdev/redirect": "20.56.1-alpha.10+d14d9d60a8",
|
|
37
|
+
"@uniformdev/richtext": "20.56.1-alpha.10+d14d9d60a8",
|
|
38
38
|
"call-bind": "^1.0.2",
|
|
39
39
|
"colorette": "2.0.20",
|
|
40
40
|
"cosmiconfig": "9.0.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "d14d9d60a8c7be2fb1fac33e42c60500cb3cf2aa"
|
|
85
85
|
}
|