- commit
- 4760433
- parent
- 41249d8
- author
- Eric Bower
- date
- 2024-08-14 13:52:13 +0000 UTC
fix: rm plugin exist check We cannot gaurentee that people running the script will have the resources.json file, so removing for now.
1 files changed,
+2,
-28
+2,
-28
1@@ -1,14 +1,9 @@
2-import resourceFile from "../../data/resources.json" with { type: "json" };
3-import resourceConfigFile from "../../data/resources-config.json" with {
4- type: "json",
5-};
6 import manualFile from "../../data/manual.json" with { type: "json" };
7 import manualConfigFile from "../../data/manual-config.json" with {
8 type: "json",
9 };
10-
11-import type { Resource, ResourceMap } from "../types.ts";
12-import { createResource, getResourceId } from "../entities.ts";
13+import type { Resource } from "../types.ts";
14+import { createResource } from "../entities.ts";
15
16 type Option = "plugin" | "config";
17
18@@ -52,27 +47,6 @@ function cli(opt: "config" | "plugin") {
19 username = username.replace("~", "");
20 }
21
22- if (opt === "plugin") {
23- const foundResource = (resourceFile.resources as Resource[]).find(
24- (r) => getResourceId(r) === name,
25- );
26- if (foundResource) {
27- console.log(`${name} aleady found in resources, not adding`);
28- return;
29- }
30- } else {
31- const resources = Object.values(
32- resourceConfigFile.resources as ResourceMap,
33- );
34- const foundResource = resources.find(
35- (r) => getResourceId(r) === name,
36- );
37- if (foundResource) {
38- console.log(`${name} aleady found in resources, not adding`);
39- return;
40- }
41- }
42-
43 let tags: string[] = [];
44 if (opt === "plugin") {
45 console.log(