create-hackhub-mod 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-hackhub-mod",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Scaffold a new HackHub mod project with interactive prompts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,40 @@
1
+ import { App, RegisterApp } from "@hotbunny/hackhub-content-sdk";
2
+
3
+ @RegisterApp()
4
+ export class ExampleApp extends App {
5
+ definition = {
6
+ id: "example-app",
7
+ name: "Example App",
8
+ icon: "terminal",
9
+ html: `
10
+ <!DOCTYPE html>
11
+ <html>
12
+ <head>
13
+ <style>
14
+ body {
15
+ font-family: sans-serif;
16
+ background: #1a1a2e;
17
+ color: #eee;
18
+ padding: 24px;
19
+ margin: 0;
20
+ }
21
+ h2 { color: #e94560; }
22
+ button {
23
+ background: #e94560;
24
+ color: white;
25
+ border: none;
26
+ padding: 8px 16px;
27
+ border-radius: 4px;
28
+ cursor: pointer;
29
+ }
30
+ button:hover { opacity: 0.85; }
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <h2>{{modName}} App</h2>
35
+ <p>This is a custom in-game application.</p>
36
+ <button onclick="alert('Hello from {{modName}}!')">Click me</button>
37
+ </body>
38
+ </html>`,
39
+ };
40
+ }
@@ -0,0 +1,13 @@
1
+ import { Command, RegisterCommand } from "@hotbunny/hackhub-content-sdk";
2
+
3
+ @RegisterCommand()
4
+ export class HelloCommand extends Command {
5
+ definition = {
6
+ name: "hello",
7
+ description: "Says hello from {{modName}}",
8
+ };
9
+
10
+ execute(args: string[]) {
11
+ return `Hello from {{modName}}! Args: ${args.join(", ")}`;
12
+ }
13
+ }
@@ -1,17 +1,8 @@
1
- import {
2
- Bootstrap,
3
- Quest,
4
- Website,
5
- Command,
6
- App,
7
- Events,
8
- Network,
9
- RegisterModPackage,
10
- RegisterQuest,
11
- RegisterWebsite,
12
- RegisterCommand,
13
- RegisterApp,
14
- } from "@hotbunny/hackhub-content-sdk";
1
+ import { Bootstrap, RegisterModPackage } from "@hotbunny/hackhub-content-sdk";
2
+ import "./quests/ExampleQuest";
3
+ import "./websites/ExampleWebsite";
4
+ import "./commands/HelloCommand";
5
+ import "./apps/ExampleApp";
15
6
 
16
7
  @RegisterModPackage()
17
8
  export default class {{className}} extends Bootstrap {
@@ -19,97 +10,3 @@ export default class {{className}} extends Bootstrap {
19
10
  console.log("{{modName}} loaded!");
20
11
  }
21
12
  }
22
-
23
- @RegisterQuest()
24
- class ExampleQuest extends Quest {
25
- definition = {
26
- name: "ExampleQuest",
27
- title: "Example Quest",
28
- description: "An example quest from {{modName}}.",
29
- rewards: { money: 100 },
30
- objectives: [
31
- { name: "scan", description: "Scan the target server" },
32
- ],
33
- };
34
- }
35
-
36
- @RegisterWebsite()
37
- class ExampleWebsite extends Website {
38
- definition = {
39
- url: "example.mod",
40
- title: "Example Website",
41
- html: `
42
- <!DOCTYPE html>
43
- <html>
44
- <head>
45
- <style>
46
- body {
47
- font-family: monospace;
48
- background: #0a0a0a;
49
- color: #00ff41;
50
- display: flex;
51
- align-items: center;
52
- justify-content: center;
53
- height: 100vh;
54
- margin: 0;
55
- }
56
- h1 { text-shadow: 0 0 10px #00ff41; }
57
- </style>
58
- </head>
59
- <body>
60
- <h1>Welcome to {{modName}}</h1>
61
- </body>
62
- </html>`,
63
- };
64
- }
65
-
66
- @RegisterCommand()
67
- class ExampleCommand extends Command {
68
- definition = {
69
- name: "hello",
70
- description: "Says hello from {{modName}}",
71
- };
72
-
73
- execute(args: string[]) {
74
- return `Hello from {{modName}}! Args: ${args.join(", ")}`;
75
- }
76
- }
77
-
78
- @RegisterApp()
79
- class ExampleApp extends App {
80
- definition = {
81
- id: "example-app",
82
- name: "Example App",
83
- icon: "terminal",
84
- html: `
85
- <!DOCTYPE html>
86
- <html>
87
- <head>
88
- <style>
89
- body {
90
- font-family: sans-serif;
91
- background: #1a1a2e;
92
- color: #eee;
93
- padding: 24px;
94
- margin: 0;
95
- }
96
- h2 { color: #e94560; }
97
- button {
98
- background: #e94560;
99
- color: white;
100
- border: none;
101
- padding: 8px 16px;
102
- border-radius: 4px;
103
- cursor: pointer;
104
- }
105
- button:hover { opacity: 0.85; }
106
- </style>
107
- </head>
108
- <body>
109
- <h2>{{modName}} App</h2>
110
- <p>This is a custom in-game application.</p>
111
- <button onclick="alert('Hello from {{modName}}!')">Click me</button>
112
- </body>
113
- </html>`,
114
- };
115
- }
@@ -0,0 +1,14 @@
1
+ import { Quest, Network, RegisterQuest } from "@hotbunny/hackhub-content-sdk";
2
+
3
+ @RegisterQuest()
4
+ export class ExampleQuest extends Quest {
5
+ definition = {
6
+ name: "ExampleQuest",
7
+ title: "Example Quest",
8
+ description: "An example quest from {{modName}}.",
9
+ rewards: { money: 100 },
10
+ objectives: [
11
+ { name: "scan", description: "Scan the target server" },
12
+ ],
13
+ };
14
+ }
@@ -0,0 +1,31 @@
1
+ import { Website, RegisterWebsite } from "@hotbunny/hackhub-content-sdk";
2
+
3
+ @RegisterWebsite()
4
+ export class ExampleWebsite extends Website {
5
+ definition = {
6
+ url: "example.mod",
7
+ title: "Example Website",
8
+ html: `
9
+ <!DOCTYPE html>
10
+ <html>
11
+ <head>
12
+ <style>
13
+ body {
14
+ font-family: monospace;
15
+ background: #0a0a0a;
16
+ color: #00ff41;
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ height: 100vh;
21
+ margin: 0;
22
+ }
23
+ h1 { text-shadow: 0 0 10px #00ff41; }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <h1>Welcome to {{modName}}</h1>
28
+ </body>
29
+ </html>`,
30
+ };
31
+ }
@@ -1,11 +1,5 @@
1
- import {
2
- Bootstrap,
3
- Quest,
4
- Events,
5
- Network,
6
- RegisterModPackage,
7
- RegisterQuest,
8
- } from "@hotbunny/hackhub-content-sdk";
1
+ import { Bootstrap, RegisterModPackage } from "@hotbunny/hackhub-content-sdk";
2
+ import "./quests/ExampleQuest";
9
3
 
10
4
  @RegisterModPackage()
11
5
  export default class {{className}} extends Bootstrap {
@@ -13,16 +7,3 @@ export default class {{className}} extends Bootstrap {
13
7
  console.log("{{modName}} loaded!");
14
8
  }
15
9
  }
16
-
17
- @RegisterQuest()
18
- class ExampleQuest extends Quest {
19
- definition = {
20
- name: "ExampleQuest",
21
- title: "Example Quest",
22
- description: "An example quest from {{modName}}.",
23
- rewards: { money: 100 },
24
- objectives: [
25
- { name: "scan", description: "Scan the target server" },
26
- ],
27
- };
28
- }
@@ -0,0 +1,14 @@
1
+ import { Quest, Network, RegisterQuest } from "@hotbunny/hackhub-content-sdk";
2
+
3
+ @RegisterQuest()
4
+ export class ExampleQuest extends Quest {
5
+ definition = {
6
+ name: "ExampleQuest",
7
+ title: "Example Quest",
8
+ description: "An example quest from {{modName}}.",
9
+ rewards: { money: 100 },
10
+ objectives: [
11
+ { name: "scan", description: "Scan the target server" },
12
+ ],
13
+ };
14
+ }
@@ -1,9 +1,5 @@
1
- import {
2
- Bootstrap,
3
- Website,
4
- RegisterModPackage,
5
- RegisterWebsite,
6
- } from "@hotbunny/hackhub-content-sdk";
1
+ import { Bootstrap, RegisterModPackage } from "@hotbunny/hackhub-content-sdk";
2
+ import "./websites/ExampleWebsite";
7
3
 
8
4
  @RegisterModPackage()
9
5
  export default class {{className}} extends Bootstrap {
@@ -11,33 +7,3 @@ export default class {{className}} extends Bootstrap {
11
7
  console.log("{{modName}} loaded!");
12
8
  }
13
9
  }
14
-
15
- @RegisterWebsite()
16
- class ExampleWebsite extends Website {
17
- definition = {
18
- url: "example.mod",
19
- title: "Example Website",
20
- html: `
21
- <!DOCTYPE html>
22
- <html>
23
- <head>
24
- <style>
25
- body {
26
- font-family: monospace;
27
- background: #0a0a0a;
28
- color: #00ff41;
29
- display: flex;
30
- align-items: center;
31
- justify-content: center;
32
- height: 100vh;
33
- margin: 0;
34
- }
35
- h1 { text-shadow: 0 0 10px #00ff41; }
36
- </style>
37
- </head>
38
- <body>
39
- <h1>Welcome to {{modName}}</h1>
40
- </body>
41
- </html>`,
42
- };
43
- }
@@ -0,0 +1,31 @@
1
+ import { Website, RegisterWebsite } from "@hotbunny/hackhub-content-sdk";
2
+
3
+ @RegisterWebsite()
4
+ export class ExampleWebsite extends Website {
5
+ definition = {
6
+ url: "example.mod",
7
+ title: "Example Website",
8
+ html: `
9
+ <!DOCTYPE html>
10
+ <html>
11
+ <head>
12
+ <style>
13
+ body {
14
+ font-family: monospace;
15
+ background: #0a0a0a;
16
+ color: #00ff41;
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ height: 100vh;
21
+ margin: 0;
22
+ }
23
+ h1 { text-shadow: 0 0 10px #00ff41; }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <h1>Welcome to {{modName}}</h1>
28
+ </body>
29
+ </html>`,
30
+ };
31
+ }