@ghostly-ui/cli 0.2.4 → 0.2.5
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/{add-loading-BOTTW5GC.js → add-loading-M3FSXKVA.js} +1 -1
- package/dist/{chunk-Q4PDOIND.js → chunk-EHNNQ6RT.js} +0 -7
- package/dist/{doctor-JXBQFCU2.js → doctor-USHNINPP.js} +6 -8
- package/dist/index.js +3 -3
- package/dist/{init-JZMB5KKV.js → init-YYX3QOLN.js} +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
-
}) : x)(function(x) {
|
|
5
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
2
|
|
|
9
3
|
// src/utils.ts
|
|
10
4
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -69,7 +63,6 @@ function getAppDir() {
|
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
export {
|
|
72
|
-
__require,
|
|
73
66
|
GHOSTLY,
|
|
74
67
|
log,
|
|
75
68
|
success,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
GHOSTLY,
|
|
4
|
-
__require,
|
|
5
4
|
error,
|
|
6
5
|
fileContains,
|
|
7
6
|
findFile,
|
|
@@ -10,10 +9,11 @@ import {
|
|
|
10
9
|
readJson,
|
|
11
10
|
success,
|
|
12
11
|
warn
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EHNNQ6RT.js";
|
|
14
13
|
|
|
15
14
|
// src/doctor.ts
|
|
16
|
-
import { existsSync } from "fs";
|
|
15
|
+
import { existsSync, readdirSync } from "fs";
|
|
16
|
+
import { join } from "path";
|
|
17
17
|
import pc from "picocolors";
|
|
18
18
|
async function doctor() {
|
|
19
19
|
console.log(`
|
|
@@ -133,16 +133,14 @@ function printResults(checks) {
|
|
|
133
133
|
function countRoutes(dir) {
|
|
134
134
|
let total = 0;
|
|
135
135
|
let withLoading = 0;
|
|
136
|
-
const { readdirSync } = __require("fs");
|
|
137
|
-
const { join } = __require("path");
|
|
138
136
|
function scan(d) {
|
|
139
137
|
if (!existsSync(d)) return;
|
|
140
138
|
const entries = readdirSync(d, { withFileTypes: true });
|
|
141
|
-
const hasPage = entries.some((e) =>
|
|
142
|
-
const
|
|
139
|
+
const hasPage = entries.some((e) => /^page\.(tsx|jsx|ts|js)$/.test(e.name));
|
|
140
|
+
const hasLoadingFile = entries.some((e) => /^loading\.(tsx|jsx|ts|js)$/.test(e.name));
|
|
143
141
|
if (hasPage) {
|
|
144
142
|
total++;
|
|
145
|
-
if (
|
|
143
|
+
if (hasLoadingFile) withLoading++;
|
|
146
144
|
}
|
|
147
145
|
for (const entry of entries) {
|
|
148
146
|
if (entry.isDirectory() && !entry.name.startsWith("_") && !entry.name.startsWith(".")) {
|
package/dist/index.js
CHANGED
|
@@ -9,14 +9,14 @@ var command = args[0];
|
|
|
9
9
|
async function main() {
|
|
10
10
|
switch (command) {
|
|
11
11
|
case "init": {
|
|
12
|
-
const { init } = await import("./init-
|
|
12
|
+
const { init } = await import("./init-YYX3QOLN.js");
|
|
13
13
|
await init();
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
16
|
case "add": {
|
|
17
17
|
const subcommand = args[1];
|
|
18
18
|
if (subcommand === "loading") {
|
|
19
|
-
const { addLoading } = await import("./add-loading-
|
|
19
|
+
const { addLoading } = await import("./add-loading-M3FSXKVA.js");
|
|
20
20
|
await addLoading(args[2]);
|
|
21
21
|
} else {
|
|
22
22
|
console.log(`
|
|
@@ -29,7 +29,7 @@ async function main() {
|
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
case "doctor": {
|
|
32
|
-
const { doctor } = await import("./doctor-
|
|
32
|
+
const { doctor } = await import("./doctor-USHNINPP.js");
|
|
33
33
|
await doctor();
|
|
34
34
|
break;
|
|
35
35
|
}
|