create-fvtt-module 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Vauxs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # create-fvtt-module
2
+
3
+ A CLI scaffolding tool for creating Foundry VTT modules.
4
+
5
+ ## Installation
6
+
7
+ ### Global Installation (for end users)
8
+
9
+ Once published to npm, you can install this globally:
10
+
11
+ ```bash
12
+ bun install -g create-fvtt-module
13
+ ```
14
+
15
+ Then run it from anywhere:
16
+
17
+ ```bash
18
+ create-fvtt-module
19
+ ```
20
+
21
+ ### Development Installation
22
+
23
+ For development purposes:
24
+
25
+ ```bash
26
+ git clone https://github.com/MrVauxs/create-fvtt-module
27
+ cd create-fvtt-module
28
+ bun install
29
+ bun run dev
30
+ ```
31
+ ### Development
32
+
33
+ ```bash
34
+ # Install dependencies
35
+ bun install
36
+
37
+ # Run in development mode (requires Bun)
38
+ bun run dev
39
+
40
+ # Watch for TypeScript changes
41
+ bun run build:watch
42
+ ```
43
+
44
+ ## Scripts
45
+
46
+ - `bun run build` - Compile TypeScript to JavaScript
47
+ - `bun run build:watch` - Watch TypeScript files and rebuild on changes
48
+ - `bun run dev` - Run the CLI in development mode (requires Bun)
49
+ - `bun run prepublishOnly` - Automatically run before publishing
50
+
51
+ ## System Support
52
+
53
+ Currently supports:
54
+ - **dnd5e** - Dungeons & Dragons 5th Edition
55
+ - **pf2e** - Pathfinder 2nd Edition
56
+
57
+ Additional systems can be added in `src/options.ts`.
58
+
59
+ ## Resources
60
+
61
+ ### Foundry VTT Documentation
62
+ - [dnd5e System Wiki](https://github.com/foundryvtt/dnd5e/wiki)
63
+ - [dnd5e Module Registration](https://github.com/foundryvtt/dnd5e/wiki/Module-Registration)
64
+ - [PF2e Wiki](https://github.com/foundryvtt/pf2e/wiki)
65
+
66
+ ### Module Development
67
+ - [Foundry VTT Module Development](https://foundryvtt.com/article/modules/)
68
+
69
+ ## License
70
+
71
+ MIT
72
+
73
+ ## Contributing
74
+
75
+ Contributions are welcome! Please feel free to submit pull requests.
76
+
77
+ ## Issues
78
+
79
+ Found a bug? Please open an issue on [GitHub](https://github.com/MrVauxs/create-fvtt-module/issues).
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "Github Workflow",
3
+ "description": "Adds support for automated releases via Github workflows"
4
+ }
@@ -0,0 +1,48 @@
1
+ name: Release Creation
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: oven-sh/setup-bun@v2
13
+
14
+ - name: Extract version from tag without the v
15
+ id: get-version
16
+ run: echo "v=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
17
+
18
+ - name: Substitute Manifest and Download Links For Versioned Ones
19
+ id: sub_manifest_link_version
20
+ uses: microsoft/variable-substitution@v1
21
+ with:
22
+ files: module.json
23
+ env:
24
+ flags.canUpload: false
25
+ version: ${{ steps.get-version.outputs.v }}
26
+
27
+ - name: Install packages
28
+ run: bun ci
29
+
30
+ - name: Build distribution
31
+ run: bun run build
32
+
33
+ # Create a zip file with all files required by the module to add to the release.
34
+ - name: Bundle into ZIP file
35
+ run: zip -r ./module.zip module.json assets/ dist/ packs/
36
+
37
+ # Create a release for this specific version.
38
+ - name: Update Release with Files
39
+ id: create_version_release
40
+ uses: ncipollo/release-action@v1
41
+ with:
42
+ allowUpdates: true # Set this to false if you want to prevent updating existing releases.
43
+ name: ${{ github.event.release.name }}
44
+ tag: ${{ github.event.release.tag_name }}
45
+ body: ${{ github.event.release.body }}
46
+ artifacts: "./module.json, ./module.zip"
47
+ omitDraftDuringUpdate: true
48
+ omitPrereleaseDuringUpdate: true
@@ -0,0 +1,112 @@
1
+ // Creates a .github/workflows/main.yml file.
2
+ // Additional options include:
3
+ // - Support for prereleases (requires a seperate branch)
4
+ // - Supports for uploading via FTP to external servers
5
+ // - Discord webhook notifications
6
+
7
+ import * as p from "@clack/prompts";
8
+ import { cyan } from "kolorist";
9
+ import { mkdir } from "fs/promises";
10
+
11
+ const data = await p.group(
12
+ {
13
+ features: () =>
14
+ p.multiselect({
15
+ message: "Additional features?",
16
+ initialValues: [],
17
+ required: false,
18
+ options: [
19
+ // { label: "Prereleases", value: "prereleases" },
20
+ { label: "Uploading via FTP", value: "ftp" },
21
+ { label: "Discord webhook on updates", value: "discord" },
22
+ ],
23
+ }),
24
+ },
25
+ { onCancel: () => process.exit(0) },
26
+ );
27
+
28
+ // Grab main.yml template
29
+ const addonDir = import.meta.dir;
30
+ const mainYmlTemplate = await Bun.file(`${addonDir}/main.yml`).text();
31
+
32
+ // Get the module directory from environment variable
33
+ const moduleDir = process.env.MODULE_DIR || process.cwd();
34
+
35
+ let mainYml = mainYmlTemplate;
36
+
37
+ // I should probably just make this a JSON and convert it to accursed YAML at the end step...
38
+ if (data.features.includes("discord") || data.features.includes("ftp")) {
39
+ mainYml += `
40
+ # https://stackoverflow.com/questions/61919141/read-json-file-in-github-actions
41
+ - id: set_var
42
+ run: echo "PACKAGE_JSON=$(jq -c . < module.json)" >> $GITHUB_OUTPUT
43
+
44
+ - name: Get FTP Path
45
+ id: ftp
46
+ run: echo "ftp=\${{fromJson(steps.set_var.outputs.PACKAGE_JSON).flags.ftpPath}}" >> "$GITHUB_OUTPUT"
47
+
48
+ - name: Get Module ID
49
+ id: module_id
50
+ run: echo "module_id=\${{fromJson(steps.set_var.outputs.PACKAGE_JSON).id}}" >> "$GITHUB_OUTPUT"
51
+
52
+ - name: Get Module Title
53
+ id: title
54
+ run: echo "title=\${{fromJson(steps.set_var.outputs.PACKAGE_JSON).title}}" >> "$GITHUB_OUTPUT"
55
+ `;
56
+ }
57
+
58
+ if (data.features.includes("ftp")) {
59
+ mainYml += `
60
+ - name: Put Files into FTP Folder
61
+ env:
62
+ FTP_PASSWORD: \${{ secrets.FTP_PASSWORD }}
63
+ if: \${{ env.FTP_PASSWORD != '' }}
64
+ run: |
65
+ ls
66
+ mkdir _ftp
67
+ cp module.json _ftp/
68
+ cp module.zip _ftp/
69
+ mkdir _ftp/\${{steps.module_id.outputs.module_id}}
70
+ cp module.json _ftp/\${{steps.module_id.outputs.module_id}}/
71
+
72
+ - name: Upload FTP
73
+ uses: sebastianpopp/ftp-action@releases/v2
74
+ env:
75
+ FTP_PASSWORD: \${{ secrets.FTP_PASSWORD }}
76
+ if: \${{ env.FTP_PASSWORD != '' }}
77
+ with:
78
+ host: \${{ secrets.FTP_SERVER }}
79
+ user: \${{ secrets.FTP_USERNAME }}
80
+ password: \${{ env.FTP_PASSWORD }}
81
+ localDir: _ftp
82
+ remoteDir: \${{steps.ftp.outputs.ftp}}
83
+ `;
84
+ }
85
+
86
+ if (data.features.includes("discord")) {
87
+ mainYml += `
88
+ - name: Send Discord Ping
89
+ uses: Ilshidur/action-discord@0.3.2
90
+ env:
91
+ DISCORD_WEBHOOK: \${{ secrets.DISCORD_WEBHOOK }}
92
+ if: \${{ env.DISCORD_WEBHOOK != '' && !github.event.release.prerelease }}
93
+ with:
94
+ args: "\${{steps.title.outputs.title}} has been updated to version \`\${{github.event.release.tag_name}}\`!"
95
+ `;
96
+ }
97
+
98
+ // Create main.yml file
99
+ const workflowDir = `${moduleDir}/.github/workflows`;
100
+ await mkdir(workflowDir, { recursive: true });
101
+ await Bun.write(`${workflowDir}/main.yml`, mainYml);
102
+
103
+ let note = "✅ Installed!";
104
+ note += "\nThe Github workflow is triggered by making a new release. To make a new release go to your repository's Releases page which can be found in the sidebar on the right and press \"Draft a new release.\" Fill in the version number and you're done!"
105
+
106
+ if (data.features.includes("discord"))
107
+ note +=
108
+ "\n - For the Discord integration, make sure to create a DISCORD_WEBHOOK secret with the webhook url.";
109
+ if (data.features.includes("ftp"))
110
+ note += `\n - For the FTP integration, make sure to include the FTP_SERVER, FTP_USERNAME, and FTP_PASSWORD secrets.\n\tThe module JSON also can include a flag stating its subdirectory on the FTP server under ${cyan("flags.ftpPath")}.`;
111
+
112
+ p.note(note, "Github Workflow");
package/dist/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/dist/bin.js ADDED
@@ -0,0 +1,272 @@
1
+ #!/usr/bin/env node
2
+ import * as p from "@clack/prompts";
3
+ import { cyan } from "kolorist";
4
+ import { mkdir, cp } from "fs/promises";
5
+ import { packs, systems } from "./options.js";
6
+ import { existsSync, readdirSync, rmSync, statSync } from "fs";
7
+ p.intro(`Creating a new Foundry VTT module...`);
8
+ let deleteFolder = false;
9
+ const cliArgs = process.argv.slice(2);
10
+ const cliTitle = cliArgs[0];
11
+ const autoId = cliArgs.includes("--auto-id");
12
+ // Grab available templates from dir
13
+ const templates = readdirSync("./templates");
14
+ // Grab addons from addons/dirs
15
+ const addonDirs = readdirSync("./addons").filter((item) => {
16
+ const stat = statSync(`./addons/${item}`);
17
+ return stat.isDirectory();
18
+ });
19
+ const addons = await Promise.all(addonDirs.map(async (dir) => {
20
+ const addonJson = (await Bun.file(`./addons/${dir}/addon.json`).json());
21
+ return {
22
+ name: addonJson.name,
23
+ description: addonJson.description,
24
+ id: dir,
25
+ };
26
+ }));
27
+ const data = await p.group({
28
+ template: async () => {
29
+ if (templates.length === 1) {
30
+ return templates[0];
31
+ }
32
+ const template = await p.select({
33
+ message: "Select a template",
34
+ options: templates.map((template) => ({
35
+ label: template,
36
+ value: template,
37
+ })),
38
+ });
39
+ return template;
40
+ },
41
+ title: () => cliTitle
42
+ ? Promise.resolve(cliTitle)
43
+ : p.text({
44
+ message: "Module Title?",
45
+ placeholder: "My New Module",
46
+ defaultValue: "My New Module",
47
+ }),
48
+ id: ({ results }) => {
49
+ const defaultId = results.title
50
+ ?.toLowerCase()
51
+ .replace(/\s+/g, "-")
52
+ .replace(/[^a-z0-9-]/g, "") ?? "my-module";
53
+ return autoId
54
+ ? Promise.resolve(defaultId)
55
+ : p.text({
56
+ message: "Module ID?",
57
+ initialValue: defaultId,
58
+ defaultValue: defaultId,
59
+ placeholder: defaultId,
60
+ });
61
+ },
62
+ exists: async ({ results }) => {
63
+ const exists = existsSync(`./${results.id}`);
64
+ if (exists) {
65
+ const confirm = await p.confirm({
66
+ message: "Folder already exists. Overwrite?",
67
+ initialValue: false,
68
+ });
69
+ if (!confirm) {
70
+ p.cancel("Cancelled due to already existing folder.");
71
+ process.exit(0);
72
+ }
73
+ else {
74
+ deleteFolder = true;
75
+ }
76
+ }
77
+ return Promise.resolve();
78
+ },
79
+ description: () => p.text({ message: "Module Description?", defaultValue: "" }),
80
+ version: () => p.select({
81
+ message: "Foundry Version?",
82
+ initialValue: "13",
83
+ options: [
84
+ // Just V13 and V14
85
+ { label: "V13", value: "13" },
86
+ { label: "V14", value: "14" },
87
+ ],
88
+ }),
89
+ system: () => p.multiselect({
90
+ message: "What System?",
91
+ initialValues: ["dnd5e"],
92
+ options: systems.map((system) => ({
93
+ label: system.id,
94
+ value: system.id,
95
+ })),
96
+ }),
97
+ packs: () => p.multiselect({
98
+ message: "What Packs?",
99
+ required: false,
100
+ options: packs.map((pack) => ({
101
+ label: pack.label,
102
+ value: pack,
103
+ })),
104
+ }),
105
+ containPacks: ({ results }) => results.packs?.length > 0
106
+ ? p.confirm({
107
+ message: "Put Packs in a Folder?",
108
+ initialValue: true,
109
+ })
110
+ : Promise.resolve(false),
111
+ containPacksFolder: ({ results }) => results.containPacks
112
+ ? p.text({
113
+ message: "Folder Name?",
114
+ placeholder: results.title,
115
+ defaultValue: results.title,
116
+ })
117
+ : Promise.resolve(),
118
+ enabledAddons: () => addons.length > 0
119
+ ? p.multiselect({
120
+ message: "Enable addons?",
121
+ required: false,
122
+ options: addons.map((addon) => ({
123
+ label: `${addon.name} - ${addon.description}`,
124
+ value: addon.id,
125
+ })),
126
+ })
127
+ : Promise.resolve([]),
128
+ }, { onCancel: () => process.exit(0) });
129
+ function hasPackageJSON(path = data.id) {
130
+ try {
131
+ return existsSync(`${path}/package.json`);
132
+ }
133
+ catch {
134
+ return false;
135
+ }
136
+ }
137
+ await p.tasks([
138
+ {
139
+ title: "[Task] Deleting existing directory",
140
+ enabled: deleteFolder,
141
+ task: async () => {
142
+ if (deleteFolder)
143
+ rmSync(data.id, { recursive: true });
144
+ return "✅ Existing directory deleted";
145
+ },
146
+ },
147
+ {
148
+ title: "[Task] Making directory",
149
+ task: async () => {
150
+ await mkdir(data.id, { recursive: true });
151
+ return `✅ ${data.id} directory created`;
152
+ },
153
+ },
154
+ {
155
+ title: "[Task] Copying template",
156
+ task: async () => {
157
+ await cp(new URL(`../templates/${data.template}`, import.meta.url), data.id, {
158
+ recursive: true,
159
+ });
160
+ return "✅ Template copied";
161
+ },
162
+ },
163
+ {
164
+ title: "[Task] Writing module.json",
165
+ task: async () => {
166
+ const modPath = `${data.id}/module.json`;
167
+ const mod = (await Bun.file(modPath).json());
168
+ // inject user data
169
+ mod.id = data.id;
170
+ mod.title = data.title;
171
+ mod.description = data.description;
172
+ mod.compatibility = {
173
+ minimum: data.version,
174
+ verified: data.version,
175
+ // maximum: data.version + 1,
176
+ };
177
+ mod.relationships.system = data.system.map((system) => systems.find((s) => s.id === system));
178
+ mod.packs = data.packs.flatMap((pack) => data.system.map((system) => ({ ...pack, system })));
179
+ if (data.containPacks) {
180
+ mod.packFolders = [
181
+ {
182
+ name: data.containPacksFolder,
183
+ sorting: "m",
184
+ color: "#00000f",
185
+ packs: data.packs.map((x) => x.name),
186
+ },
187
+ ];
188
+ }
189
+ if (data.system.includes("dnd5e")) {
190
+ mod.flags.dnd5e = {
191
+ sourceBooks: {
192
+ [data.id]: data.title,
193
+ },
194
+ spellLists: [],
195
+ };
196
+ }
197
+ await Bun.write(modPath, JSON.stringify(mod, null, "\t"));
198
+ return "✅ module.json created";
199
+ },
200
+ },
201
+ {
202
+ title: "[Task] Writing README.md",
203
+ task: async () => {
204
+ const readmePath = `${data.id}/README.md`;
205
+ const readme = `# ${data.title}
206
+ ${data.description}
207
+
208
+ ## Installation
209
+
210
+ \`\`\`
211
+ cd ${data.id} ${hasPackageJSON() ? "&& bun install" : "and get to making stuff!"}
212
+ \`\`\`
213
+
214
+ ## Resources
215
+
216
+ ${data.system.includes("dnd5e")
217
+ ? `
218
+ D&D5e Wiki: https://github.com/foundryvtt/dnd5e/wiki
219
+ D&D5e Specific Module Flags: https://github.com/foundryvtt/dnd5e/wiki/Module-Registration`
220
+ : ""}
221
+
222
+ ${data.system.includes("pf2e")
223
+ ? `
224
+ PF2e Wiki: https://github.com/foundryvtt/pf2e/wiki
225
+ `
226
+ : ""}
227
+ `;
228
+ await Bun.write(readmePath, readme);
229
+ return "✅ README.md created";
230
+ },
231
+ },
232
+ ]);
233
+ // Run enabled addons
234
+ if (data.enabledAddons && data.enabledAddons.length > 0) {
235
+ for (const addonId of data.enabledAddons) {
236
+ p.note(`[Addon] Running ${addonId} setup...`);
237
+ const addonProcess = Bun.spawn(["bun", "run", `addons/${addonId}/setup.ts`], {
238
+ stdio: ["inherit", "inherit", "inherit"],
239
+ env: {
240
+ ...process.env,
241
+ MODULE_DIR: data.id,
242
+ ADDON_ID: addonId,
243
+ },
244
+ });
245
+ await addonProcess.exited;
246
+ if (addonProcess.exitCode !== 0) {
247
+ throw new Error(`❗ Addon ${addonId} setup failed`);
248
+ }
249
+ }
250
+ }
251
+ // Check if template has an scripts/onCreate, ask to run it
252
+ const onCreatePath = `${data.id}/scripts/onCreate.ts`;
253
+ if (await Bun.file(onCreatePath).exists()) {
254
+ const runOnCreate = await p.confirm({
255
+ message: `Run onCreate script?`,
256
+ initialValue: true,
257
+ });
258
+ if (runOnCreate) {
259
+ const spin = p.spinner();
260
+ spin.start("[Task] Running onCreate script...");
261
+ const process = Bun.spawn(["bun", "run", "onCreate.ts"], {
262
+ cwd: `${data.id}/scripts`,
263
+ });
264
+ await process.exited;
265
+ if (process.exitCode !== 0) {
266
+ throw new Error(`❗ onCreate script failed`);
267
+ }
268
+ spin.stop("✅ onCreate script completed");
269
+ }
270
+ }
271
+ p.outro(`cd ${cyan(data.id)} ${hasPackageJSON() ? "&& bun install" : "and get to making stuff!"}`);
272
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE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-0,0 +1,2 @@
1
+ export { packs, systems } from "./options.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ // Main export file for create-fvtt-module
2
+ export { packs, systems } from "./options.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,21 @@
1
+ declare const packs: {
2
+ label: string;
3
+ name: string;
4
+ path: string;
5
+ system: string;
6
+ type: string;
7
+ ownership: {
8
+ PLAYER: string;
9
+ ASSISTANT: string;
10
+ };
11
+ }[];
12
+ declare const systems: {
13
+ id: string;
14
+ type: string;
15
+ manifest: string;
16
+ compatibility: {
17
+ minimum: string;
18
+ };
19
+ }[];
20
+ export { packs, systems };
21
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;;GA6CV,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;;;GAmBZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,66 @@
1
+ const packs = [
2
+ {
3
+ label: "Adventures",
4
+ name: "adventure",
5
+ path: "packs/adventure",
6
+ system: "",
7
+ type: "Adventure",
8
+ ownership: {
9
+ PLAYER: "OBSERVER",
10
+ ASSISTANT: "OBSERVER",
11
+ },
12
+ },
13
+ {
14
+ label: "Items",
15
+ name: "items",
16
+ path: "packs/items",
17
+ system: "",
18
+ type: "Item",
19
+ ownership: {
20
+ PLAYER: "OBSERVER",
21
+ ASSISTANT: "OBSERVER",
22
+ },
23
+ },
24
+ {
25
+ label: "Journals",
26
+ name: "journals",
27
+ path: "packs/journals",
28
+ system: "",
29
+ type: "JournalEntry",
30
+ ownership: {
31
+ PLAYER: "OBSERVER",
32
+ ASSISTANT: "OBSERVER",
33
+ },
34
+ },
35
+ {
36
+ label: "Actors",
37
+ name: "actors",
38
+ path: "packs/actors",
39
+ system: "",
40
+ type: "Actor",
41
+ ownership: {
42
+ PLAYER: "OBSERVER",
43
+ ASSISTANT: "OWNER",
44
+ },
45
+ },
46
+ ];
47
+ const systems = [
48
+ {
49
+ id: "dnd5e",
50
+ type: "system",
51
+ manifest: "https://github.com/foundryvtt/dnd5e/releases/latest/download/system.json",
52
+ compatibility: {
53
+ minimum: "5.2",
54
+ },
55
+ },
56
+ {
57
+ id: "pf2e",
58
+ type: "system",
59
+ manifest: "https://github.com/foundryvtt/pf2e/releases/latest/download/system.json",
60
+ compatibility: {
61
+ minimum: "7.8",
62
+ },
63
+ },
64
+ ];
65
+ export { packs, systems };
66
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG;IACb;QACC,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACV,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,UAAU;SACrB;KACD;IACD;QACC,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACV,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,UAAU;SACrB;KACD;IACD;QACC,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACV,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,UAAU;SACrB;KACD;IACD;QACC,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACV,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,OAAO;SAClB;KACD;CACD,CAAC;AAEF,MAAM,OAAO,GAAG;IACf;QACC,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EACP,0EAA0E;QAC3E,aAAa,EAAE;YACd,OAAO,EAAE,KAAK;SACd;KACD;IACD;QACC,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EACP,yEAAyE;QAC1E,aAAa,EAAE;YACd,OAAO,EAAE,KAAK;SACd;KACD;CACD,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}