@vttforge/cli 0.7.1 → 0.9.0

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.
@@ -11,11 +11,11 @@
11
11
  "dev": "vttforge dev"
12
12
  },
13
13
  "dependencies": {
14
- "@vttforge/core": "^0.12.0"
14
+ "@vttforge/core": "^0.14.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@vttforge/cli": "^0.7.0",
18
- "@vttforge/vite-plugin": "^0.4.0",
17
+ "@vttforge/cli": "^0.9.0",
18
+ "@vttforge/vite-plugin": "^0.5.0",
19
19
  "vite": "^8.2.2"
20
20
  },
21
21
  "engines": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{DESCRIPTION}}
4
4
 
5
- A Foundry VTT v13+ module built on [VTTForge](https://vttforge.dev). It adds a
5
+ A Foundry VTT v14+ module built on [VTTForge](https://vttforge.dev). It adds a
6
6
  `note` Item type to whatever system the world runs, a sheet for it, and an
7
7
  `@Note[id]` enricher that links to one from any text field.
8
8
 
@@ -34,7 +34,7 @@ Then enable **{{TITLE}}** in a world and create a Note from the Items sidebar.
34
34
  | `scripts/data/note-data.ts` | The data model. The schema is a function handed to `BaseTypeDataModel`, which is what makes `this.body` a `string` |
35
35
  | `scripts/sheets/note-sheet.ts` | The sheet, on `BaseItemSheet` |
36
36
  | `scripts/enricher.ts` | `@Note[id]` → a link that opens the note |
37
- | `templates/` | Handlebars, using v13's own elements (`<prose-mirror>`, `data-action`) |
37
+ | `templates/` | Handlebars, using Foundry's own elements (`<prose-mirror>`, `data-action`) |
38
38
  | `styles/main.css` | Scoped under `.{{ID}}`, colours from Foundry's variables |
39
39
  | `lang/en.json` | Strings, under the `{{LOCALE_PREFIX}}` prefix, plus the `TYPES.Item` label |
40
40
 
@@ -65,7 +65,7 @@ api.noteType; // "{{ID}}.note"
65
65
 
66
66
  ```bash
67
67
  pnpm typecheck # tsc against the real @vttforge/core types
68
- npx vttforge audit # manifest + source against the v13 list of quiet breakages
68
+ npx vttforge audit # manifest + source against the v14 list of quiet breakages
69
69
  ```
70
70
 
71
71
  ## Releasing
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "id": "{{ID}}",
3
+ "type": "module",
3
4
  "title": "{{TITLE}}",
4
5
  "description": "{{DESCRIPTION}}",
5
6
  "version": "0.1.0",
@@ -12,11 +12,11 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@vttforge/core": "^0.12.0"
15
+ "@vttforge/core": "^0.14.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@vttforge/cli": "^0.7.0",
19
- "@vttforge/vite-plugin": "^0.4.0",
18
+ "@vttforge/cli": "^0.9.0",
19
+ "@vttforge/vite-plugin": "^0.5.0",
20
20
  "typescript": "^5.4.0",
21
21
  "vite": "^8.2.2"
22
22
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{DESCRIPTION}}
4
4
 
5
- A Foundry VTT v13+ system built on [VTTForge](https://vttforge.dev): typed
5
+ A Foundry VTT v14+ system built on [VTTForge](https://vttforge.dev): typed
6
6
  data models, sheet bases that already know their tabs and drops, a migration
7
7
  runner, and a build that produces what foundryvtt.com expects.
8
8
 
@@ -33,7 +33,7 @@ Then create a world on **{{TITLE}}** and open a character.
33
33
  | `scripts/data/*.mjs` | Data models. The schema is a function handed to `BaseTypeDataModel`, which is what keeps the schema in one place |
34
34
  | `scripts/sheets/*.mjs` | Sheets on `BaseActorSheet` / `BaseItemSheet`: `static TABS`, `static DRAG_DROP`, `onDropItem` |
35
35
  | `scripts/migrations.mjs` | `createMigrationRunner`: versioned, idempotent, GM-gated |
36
- | `templates/` | Handlebars, using v13's own elements (`<prose-mirror>`, `data-action`) |
36
+ | `templates/` | Handlebars, using Foundry's own elements (`<prose-mirror>`, `data-action`) |
37
37
  | `styles/main.css` | Imports `@vttforge/styles` and scopes your rules under `.{{ID}}` |
38
38
  | `lang/en.json` | Strings, under the `{{LOCALE_PREFIX}}` prefix |
39
39
 
@@ -53,7 +53,7 @@ loses the sheet choice on every document already using it.
53
53
  ## Checks
54
54
 
55
55
  ```bash
56
- npx vttforge audit # manifest + source against the v13 list of quiet breakages
56
+ npx vttforge audit # manifest + source against the v14 list of quiet breakages
57
57
  ```
58
58
 
59
59
  ## Releasing
@@ -11,12 +11,12 @@
11
11
  "dev": "vttforge dev"
12
12
  },
13
13
  "dependencies": {
14
- "@vttforge/core": "^0.12.0",
14
+ "@vttforge/core": "^0.14.0",
15
15
  "@vttforge/styles": "^0.4.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@vttforge/cli": "^0.7.0",
19
- "@vttforge/vite-plugin": "^0.4.0",
18
+ "@vttforge/cli": "^0.9.0",
19
+ "@vttforge/vite-plugin": "^0.5.0",
20
20
  "vite": "^8.2.2"
21
21
  },
22
22
  "engines": {
@@ -25,14 +25,6 @@ try {
25
25
  initiative: { formula: '1d20 + @abilities.dex.mod', decimals: 2 },
26
26
  },
27
27
 
28
- // The core sheets have to go before ours can be the default. This runs
29
- // before the `sheets` below are registered.
30
- onBeforeInit: () => {
31
- const { Actors, Items } = foundry.documents.collections;
32
- Actors.unregisterSheet('core', foundry.applications.sheets.ActorSheetV2);
33
- Items.unregisterSheet('core', foundry.applications.sheets.ItemSheetV2);
34
- },
35
-
36
28
  // Declared here rather than with `Actors.registerSheet`. Foundry keys a
37
29
  // sheet by `${scope}.${class name}` and saves that key on every document
38
30
  // using it; a bundler renames classes between builds, and the saved key
@@ -25,7 +25,7 @@ async function migrateToV0_1_0() {
25
25
  // if (typeof legacy !== 'string') continue;
26
26
  // await actor.update({
27
27
  // 'system.biography': legacy,
28
- // '-=system.bio': null,
28
+ // 'system.bio': _del,
29
29
  // });
30
30
  // }
31
31
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "id": "{{ID}}",
3
+ "type": "system",
3
4
  "title": "{{TITLE}}",
4
5
  "description": "{{DESCRIPTION}}",
5
6
  "version": "0.1.0",
@@ -7,7 +7,7 @@
7
7
  is auto-populated by BaseActorSheet's _prepareContext.
8
8
 
9
9
  `<img data-edit="img">` is handled by DocumentSheetV2's built-in editImage
10
- action. `<prose-mirror>` is the v13 rich text element for biography.
10
+ action. `<prose-mirror>` is Foundry's rich text element for biography.
11
11
  --}}
12
12
  {{!--
13
13
  No <form> here. The sheet bases set `tag: 'form'`, so the application
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{DESCRIPTION}}
4
4
 
5
- A Foundry VTT v13+ system built on [VTTForge](https://vttforge.dev): typed
5
+ A Foundry VTT v14+ system built on [VTTForge](https://vttforge.dev): typed
6
6
  data models, sheet bases that already know their tabs and drops, a migration
7
7
  runner, and a build that produces what foundryvtt.com expects.
8
8
 
@@ -33,7 +33,7 @@ Then create a world on **{{TITLE}}** and open a character.
33
33
  | `scripts/data/*.ts` | Data models. The schema is a function handed to `BaseTypeDataModel`, which is what makes `this.level` a `number` |
34
34
  | `scripts/sheets/*.ts` | Sheets on `BaseActorSheet` / `BaseItemSheet`: `static TABS`, `static DRAG_DROP`, typed `onDropItem` |
35
35
  | `scripts/migrations.ts` | `createMigrationRunner`: versioned, idempotent, GM-gated |
36
- | `templates/` | Handlebars, using v13's own elements (`<prose-mirror>`, `data-action`) |
36
+ | `templates/` | Handlebars, using Foundry's own elements (`<prose-mirror>`, `data-action`) |
37
37
  | `styles/main.css` | Imports `@vttforge/styles` and scopes your rules under `.{{ID}}` |
38
38
  | `lang/en.json` | Strings, under the `{{LOCALE_PREFIX}}` prefix |
39
39
 
@@ -53,7 +53,7 @@ for is yours to know. Each sheet here narrows it once in a getter (`actor`,
53
53
 
54
54
  ```bash
55
55
  pnpm typecheck # tsc against the real @vttforge/core types
56
- npx vttforge audit # manifest + source against the v13 list of quiet breakages
56
+ npx vttforge audit # manifest + source against the v14 list of quiet breakages
57
57
  ```
58
58
 
59
59
  ## Releasing
@@ -12,12 +12,12 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@vttforge/core": "^0.12.0",
15
+ "@vttforge/core": "^0.14.0",
16
16
  "@vttforge/styles": "^0.4.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@vttforge/cli": "^0.7.0",
20
- "@vttforge/vite-plugin": "^0.4.0",
19
+ "@vttforge/cli": "^0.9.0",
20
+ "@vttforge/vite-plugin": "^0.5.0",
21
21
  "typescript": "^5.4.0",
22
22
  "vite": "^8.2.2"
23
23
  },
@@ -33,6 +33,10 @@ declare global {
33
33
  var Roll: any;
34
34
  // biome-ignore lint/suspicious/noExplicitAny: stub declarations only
35
35
  var foundry: any;
36
+ // biome-ignore lint/suspicious/noExplicitAny: stub declarations only
37
+ var _del: any;
38
+ // biome-ignore lint/suspicious/noExplicitAny: stub declarations only
39
+ var _replace: any;
36
40
  }
37
41
 
38
42
  export {};
@@ -26,14 +26,6 @@ try {
26
26
  initiative: { formula: '1d20 + @abilities.dex.mod', decimals: 2 },
27
27
  },
28
28
 
29
- // The core sheets have to go before ours can be the default. This runs
30
- // before the `sheets` below are registered.
31
- onBeforeInit: () => {
32
- const { Actors, Items } = foundry.documents.collections;
33
- Actors.unregisterSheet('core', foundry.applications.sheets.ActorSheetV2);
34
- Items.unregisterSheet('core', foundry.applications.sheets.ItemSheetV2);
35
- },
36
-
37
29
  // Declared here rather than with `Actors.registerSheet`. Foundry keys a
38
30
  // sheet by `${scope}.${class name}` and saves that key on every document
39
31
  // using it; a bundler renames classes between builds, and the saved key
@@ -25,7 +25,7 @@ async function migrateToV0_1_0(): Promise<void> {
25
25
  // if (typeof legacy !== 'string') continue;
26
26
  // await actor.update({
27
27
  // 'system.biography': legacy,
28
- // '-=system.bio': null,
28
+ // 'system.bio': _del,
29
29
  // });
30
30
  // }
31
31
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "id": "{{ID}}",
3
+ "type": "system",
3
4
  "title": "{{TITLE}}",
4
5
  "description": "{{DESCRIPTION}}",
5
6
  "version": "0.1.0",
@@ -7,7 +7,7 @@
7
7
  is auto-populated by BaseActorSheet's _prepareContext.
8
8
 
9
9
  `<img data-edit="img">` is handled by DocumentSheetV2's built-in editImage
10
- action. `<prose-mirror>` is the v13 rich text element for biography.
10
+ action. `<prose-mirror>` is Foundry's rich text element for biography.
11
11
  --}}
12
12
  {{!--
13
13
  No <form> here. The sheet bases set `tag: 'form'`, so the application