@stacksjs/buddy 0.53.1 → 0.56.3

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![npm downloads][npm-downloads-src]][npm-downloads-href]
9
9
  <!-- [![Codecov][codecov-src]][codecov-href] -->
10
10
 
11
- _Pre-release until public beta released. Coming May/June._
11
+ _Beta coming soon._
12
12
 
13
13
  The goal of the framework is to _help you_ create & maintain frontends, backends, and clouds—without having to worry about the boilerplate. Stacks is a rapid application development framework, meeting all your full stack needs.
14
14
 
@@ -72,7 +72,7 @@ _Create your personal or professional Vercel-like cloud, based on MIT-licensed O
72
72
  - ⛅️ **Serverless** _on-demand, auto-scaling, zero maintenance_
73
73
  - 🚏 **CDN** _zero-config low-latency CDN, including request life-cycle hooks & optimized request compressions (Brotli & gzip)_
74
74
  - 🔀 **Domain** _version-controlled & zero-config domain management (e.g. DNS)_
75
- - 📧 **Email** _secure & simplistic <easy-peasy@custom-domains.com> mail_
75
+ - 📧 **Email** _secure & simplistic easy-peasy@custom-domains.com mail_
76
76
  - 🔐 **Firewall** _native web application firewall support_
77
77
  - 🚜 **Maintenance** _handles your cloud infrastructure via the Stacks & Serverless framework_
78
78
  - 🤖 **Infrastructure as Code** _create & maintain your cloud infrastructure with ease_
@@ -94,7 +94,7 @@ _Enhanced productivity for developers. No more creating boilerplate._
94
94
  - 💪🏼 **Type Strong** _built-in e2e type-safety_
95
95
  - ✨ **Git Workflows** _committing with ease_
96
96
  - 🚗 **Auto Imports** _your components & functions, including date, string, array, & object helpers_
97
- - ⏩ **Code Snippets** _say goodbye to the boilerplate—thank you [Sarah Drasner](https://github.com/sdras/vue-vscode-snippets)_
97
+ - ⏩ **Code Snippets** _say goodbye to the boilerplate—thank you Sarah Drasner_
98
98
  - 🔤 **Spell Checker** _be notified once there are typos_
99
99
  - 🛠️ **Utilities** _Collections, VueUse, and more_
100
100
  - 🧪 **Testing** _unit & e2e tests powered by Vitest & Playwright_
@@ -110,27 +110,24 @@ Develop beautiful, reactive, composable UIs without learning a new set of langua
110
110
  It's incredibly easy to get started with this framework. Simply run the following command in your terminal:
111
111
 
112
112
  ```bash
113
- sh <(curl stacksjs.dev)
113
+ sh <(curl stacksjs.dev) my-project
114
114
 
115
- # alternatively, if Node.js >= v18.12 is installed already,
115
+ # alternatively, if Node.js >= v18.16 is installed already,
116
116
  # you may also get started via:
117
117
  npx stacks new my-project
118
118
  ```
119
119
 
120
- > **Note**
121
- > pnpm 8 required. _Run the setup script & 🐶 Buddy will set you up. He barks otherwise._
122
-
123
120
  ## 🤖 Usage
124
121
 
125
122
  The following list includes some of the most common ways to interact with the Stacks API. Meet the toolkit, Buddy:
126
123
 
127
124
  ```bash
128
125
  buddy install # installs all dependencies
129
- buddy dev # starts one of the dev servers (components, functions, pages, or docs)
126
+ buddy dev # starts one of the dev servers (components, functions, views, or docs)
130
127
  buddy build # follow CLI prompts to select which library (or server) to build
131
128
  buddy commit # follow CLI prompts for committing changes
132
129
  buddy release # creates the releases for the stack & consequently, publishes them to npm
133
- buddy upgrade # auto-update deps & the Stacks framework
130
+ buddy upgrade # auto-update all deps & the Stacks framework
134
131
 
135
132
  buddy make:component HelloWorld # scaffolds a component
136
133
  buddy make:function HelloWorld # scaffolds a function
@@ -148,69 +145,76 @@ buddy --help # view help menu
148
145
  # please note: you may suffix any command with the
149
146
  # `command --help` flag to review the help menu
150
147
 
151
- buddy install # installs your dependencies
148
+ buddy install # installs dependencies
149
+ buddy add # adds a stack or dependency
152
150
  buddy fresh # fresh reinstall of all deps
153
- buddy clean # removes all your deps
151
+ buddy clean # removes all deps
154
152
 
155
- buddy update # auto-update deps & the Stacks framework
156
- buddy update:dependencies # auto-update deps & the Stacks framework
157
- buddy update:framework # auto-update deps & the Stacks framework
158
- buddy update:package-manager # auto-update deps & the Stacks framework
159
- buddy update:search-engine # auto-updates Meilisearch
160
- buddy update:node # update to latest project-defined node version
161
- buddy update:all # update Node, package manager, framework, dependencies
153
+ buddy upgrade # auto-upgrades deps, framework, node.js, and/or pnpm
154
+ buddy upgrade:dependencies # auto-upgrades deps & the Stacks framework
155
+ buddy upgrade:framework # auto-upgrades deps & the Stacks framework
156
+ buddy upgrade:package-manager # auto-upgrades deps & the Stacks framework
157
+ buddy upgrade:search-engine # auto-upgrades configured search engine
158
+ buddy upgrade:node # upgrades to latest project-defined node version
159
+ buddy upgrade:all # upgrades Node, package manager, framework, dependencies
162
160
 
163
161
  # if you need any more info on any command listed here, you may suffix
164
162
  # any of them via the "help option", i.e. `buddy ... --help`
165
163
 
166
- buddy dev # start one of the dev servers (components, functions, pages, or docs)
167
- buddy dev:components # start local playground dev server
164
+ buddy dev # starts one of the dev servers (components, functions, views, or docs)
165
+ buddy dev:components # starts local playground dev server
168
166
  buddy dev:desktop # starts the Desktop playground
169
- buddy dev:pages # start local playground pages dev server
170
- buddy dev:functions # stub local the functions
171
- buddy dev:docs # start local docs dev server
167
+ buddy dev:views # starts local playground views dev server
168
+ buddy dev:functions # stubs local the functions
169
+ buddy dev:docs # starts local docs dev server
172
170
  buddy development # `buddy dev` alias
173
171
 
174
172
  # for Laravel folks, `serve` may ring more familiar than the `dev` name. Hence, we aliased it:
175
173
  buddy serve
176
174
  buddy serve:components
177
- buddy serve:pages
175
+ buddy serve:desktop
176
+ buddy serve:views
178
177
  buddy serve:functions
179
178
  buddy serve:docs
180
179
 
181
180
  # building for production (e.g. AWS, Google Cloud, npm, Vercel, Netlify, et al.)
182
181
  buddy build # select a specific build (follow CLI prompts)
183
- buddy build:components # build Vue component library & Web Component library
184
- buddy build:vue-components # build Vue 2 & 3-ready Component library
185
- buddy build:web-components # build framework agnostic Web Component library (i.e. Custom Elements)
186
- buddy build:functions # build function library
187
- buddy build:pages # build SSG pages
188
- buddy build:all # build all your code
182
+ buddy build:views # builds SSG views
183
+ buddy build:desktop # builds Desktop application
184
+ buddy build:library # builds any or all libraries
185
+ buddy build:functions # builds function library
186
+ buddy build:components # builds Vue component library & Web Component library
187
+ buddy build:web-components # builds framework agnostic Web Component library (i.e. Custom Elements)
188
+ buddy build:vue-components # builds Vue 2 & 3-ready Component library
189
+ buddy build:all # builds all your code
189
190
 
190
191
  # `buddy build` aliases
191
192
  buddy prod
192
193
  buddy prod:components
194
+ buddy prod:desktop
195
+ buddy prod:library
196
+ buddy prod:views
197
+ buddy prod:functions
193
198
  buddy prod:vue-components
194
199
  buddy prod:web-components
195
- buddy prod:functions
196
- buddy prod:pages
197
200
  buddy prod:all
198
201
  buddy production # `buddy prod` alias
199
202
 
200
203
  # sets your application key
201
204
  buddy key:generate
202
205
 
203
- buddy make:stack project
204
- buddy make:component HelloWorld
205
- buddy make:function hello-world
206
- buddy make:page hello-world
207
- buddy make:lang de
208
- buddy make:notification welcome-email
209
- buddy make:database cars
210
- buddy make:table brands
211
- buddy make:migration create_cars_table
212
- buddy make:factory cars
213
- buddy make:seed cars
206
+ buddy make:component HelloWorld # bootstraps a HelloWorld component
207
+ buddy make:function hello-world # bootstraps a hello-world function
208
+ buddy make:page hello-world # bootstraps a hello-word page
209
+ buddy make:model Car # bootstraps a Car model
210
+ buddy make:database cars # creates a cars database
211
+ buddy make:migration create_cars_table # creates a cars migration file
212
+ buddy make:factory cars # creates a Car factory file
213
+ buddy make:seed cars # creates a Car seed file
214
+ buddy make:table cars # boostraps a cars data table
215
+ buddy make:notification welcome-email # bootstraps a welcome-email notification
216
+ buddy make:lang de # bootstraps a lang/de.yml language file
217
+ buddy make:stack my-project # shares logic with `npx stacks new my-project`
214
218
 
215
219
  buddy lint # runs linter
216
220
  buddy lint:fix # runs linter and fixes issues
@@ -220,33 +224,33 @@ buddy release # creates the releases for the stack & triggers the Release Action
220
224
  buddy changelog # generates CHANGELOG.md
221
225
 
222
226
  # when deploying your app/s to a remote server or cloud provider
223
- buddy deploy
224
- buddy deploy:docs
225
- buddy deploy:functions
226
- buddy deploy:pages
227
- buddy deploy:all
227
+ buddy deploy # select a specific deployment (follow CLI prompts)
228
+ buddy deploy:docs # deploys docs to AWS (or other configured provider)
229
+ buddy deploy:functions # deploys functions to AWS (or other configured provider)
230
+ buddy deploy:views # deploys views to AWS (or other configured provider)
231
+ buddy deploy:all # deploys all your code
228
232
 
229
233
  # select the example to run (follow CLI prompts)
230
- buddy example
231
- buddy example:vue
232
- buddy example:web-components
234
+ buddy example # prompts you to select which example to run
235
+ buddy example:vue # runs the Vue example
236
+ buddy example:web-components # runs the Web Component example
233
237
 
234
238
  # you likely won't need to run these commands as they are auto-triggered, but they are available
235
- buddy generate
236
- buddy generate:entries
237
- buddy generate:vue-compat
238
- buddy generate:web-types
239
- buddy generate:vscode-custom-data
240
- buddy generate:ide-helpers
241
- buddy generate:component-meta
242
- buddy generate:all
239
+ buddy generate # prompts you to select which generator to run
240
+ buddy generate:entries # generates entry files for components, functions, & views
241
+ buddy generate:vue-compat # generates Vue 2 compatibility layer
242
+ buddy generate:web-types # generates Web Component types
243
+ buddy generate:vscode-custom-data # generates VSCode custom data
244
+ buddy generate:ide-helpers # generates IDE helpers
245
+ buddy generate:component-meta # generates component meta
246
+ buddy generate:all # runs all generators
243
247
 
244
248
  # generates your application key
245
- buddy key:generate
249
+ buddy key:generate # generates your application key
246
250
 
247
251
  # generate your TypeScript declarations
248
- buddy types:generate
249
- buddy types:fix
252
+ buddy types:generate # generates types for your components, functions, & views
253
+ buddy types:fix # auto-fixes types for your components, functions, & views
250
254
 
251
255
  # test your stack
252
256
  buddy test # runs test suite (unit & e2e)
@@ -259,12 +263,6 @@ stx fresh
259
263
  buddy fresh
260
264
  bud fresh
261
265
  buddy fresh
262
- pnpm stx fresh
263
- pnpm buddy fresh
264
- pnpm buddy fresh
265
- pnpm fresh
266
- pnpm run fresh
267
- pnpm run buddy fresh
268
266
  ```
269
267
 
270
268
  </details>
@@ -275,7 +273,7 @@ Read more here about the Stacks CLI in the documentation.
275
273
 
276
274
  Because Stacks optimizes the development of easily reusable & composable component & function libraries, the primary intention is to always _keep it simple, yet configurable._
277
275
 
278
- By default, Stacks realizes whether your Stack includes components, functions, and/or pages. Based on that determination, Stacks builds your outputs.
276
+ By default, Stacks realizes whether your Stack includes components, functions, and/or views. Based on that determination, Stacks builds your outputs.
279
277
 
280
278
  The UI libraries that automatically get built are: a Web Component (Custom Elements) & Vue Component library.
281
279
 
@@ -347,7 +345,7 @@ You may view this framework as an incredibly “useful set of frames” to assis
347
345
 
348
346
  Part of the Stacks ecosystem are the following first-party supported stacks:
349
347
 
350
- - [Table](https://github.com/stacksjs/table) (Data tables with ease)
348
+ - [Table](https://github.com/stacksjs/stacks/tree/main/.stacks/stacks/tables) (Data tables with ease)
351
349
  - [Calendar](https://github.com/stacksjs/calendar) (Add to Calendar utilities—iCal, Google, and more)
352
350
  - [Command Palette](https://github.com/stacksjs/command-palette) (`⌘ + k` for the web)
353
351
  - [Date Picker](https://github.com/stacksjs/date-picker) (Beautiful, modern date picker)
@@ -355,11 +353,10 @@ Part of the Stacks ecosystem are the following first-party supported stacks:
355
353
  - [Image](https://github.com/stacksjs/image) (Modern image experience)
356
354
  - [Video](https://github.com/stacksjs/video) (Modern video experience)
357
355
  - [Audio](https://github.com/stacksjs/audio) (Modern audio experience)
358
- - [Web3](https://github.com/stacksjs/web3) (Solana support, cross-chain core. _Ethereum & Cardano drivers coming._)
359
- - [Wallets](https://github.com/stacksjs/wallets) (Wallet Authentication)
360
- - [NFT](https://github.com/stacksjs/nft) (NFTs, Candy Machine mechanisms, and more.)
361
- - [DeFi](https://github.com/stacksjs/defi) (Cross-chain DeFi engine, including staking support)
362
- - [DAO](https://github.com/stacksjs/dao) (Powerful toolkit for DAO governance, including a Reddit-type of voting system)
356
+ - [Identity](https://github.com/stacksjs/identity) (Identity providers & wallet integrations)
357
+ - [Digital Ownership](https://github.com/stacksjs/ownership) (Public ownership protocol integrations)
358
+ - [Payments](https://github.com/stacksjs/payments) (Unified payment APIs)
359
+ - [Governance](https://github.com/stacksjs/governance) (Powerful toolkit for democratic governance)
363
360
 
364
361
  View our detailed roadmap/s [here](https://github.com/stacksjs/stacks/projects?query=is%3Aopen), for more information. Additionally, you may find interesting stacks, information & examples over at [Awesome Stacks](https://github.com/stacksjs/awesome-stacks).
365
362
 
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.mjs ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ import { runAction } from '@stacksjs/actions';
3
+ import { handleError } from '@stacksjs/error-handling';
4
+ import { command, log } from '@stacksjs/cli';
5
+ import { env } from '@stacksjs/validation';
6
+ import { installIfVersionMismatch, isProjectCreated, frameworkVersion } from '@stacksjs/utils';
7
+ import { projectPath } from '@stacksjs/path';
8
+ import { Action } from '@stacksjs/types';
9
+ import { o as setup, k as key, e as create, n as preinstall, p as prepublish, u as upgrade, i as generate, f as dev, b as build, c as changelog, a as clean, d as commit, h as fresh, l as lint, r as release, m as make, j as migrate, s as seed, g as example, t as test, v as version } from './shared/buddy.4ed611cb.mjs';
10
+ import '@stacksjs/actions/generate';
11
+ import '@stacksjs/actions/commit';
12
+ import '@stacksjs/storage';
13
+ import '@stacksjs/actions/dev';
14
+ import '@stacksjs/actions/examples';
15
+ import '@stacksjs/actions/make';
16
+ import '@stacksjs/actions/preinstall';
17
+ import '@stacksjs/logging';
18
+
19
+ const cli = command("buddy");
20
+ process.on("uncaughtException", handleError);
21
+ process.on("unhandledRejection", handleError);
22
+ async function main() {
23
+ await installIfVersionMismatch();
24
+ await setup(cli);
25
+ await key(cli);
26
+ if (!await isProjectCreated()) {
27
+ if (env.APP_ENV !== "production")
28
+ log.info("Project not yet initialized, generating application key...");
29
+ else
30
+ handleError(new Error("Please run `buddy key:generate` to generate an application key"));
31
+ const result = await runAction(Action.KeyGenerate, { cwd: projectPath() });
32
+ if (result.isErr())
33
+ handleError(result.error);
34
+ log.info("Application key generated.");
35
+ await create(cli);
36
+ }
37
+ await preinstall(cli);
38
+ await prepublish(cli);
39
+ await upgrade(cli);
40
+ await generate(cli);
41
+ await dev(cli);
42
+ await build(cli);
43
+ await changelog(cli);
44
+ await clean(cli);
45
+ await commit(cli);
46
+ await fresh(cli);
47
+ await lint(cli);
48
+ await release(cli);
49
+ await make(cli);
50
+ await migrate(cli);
51
+ await seed(cli);
52
+ await example(cli);
53
+ await test(cli);
54
+ await version(cli);
55
+ cli.help();
56
+ cli.version(await frameworkVersion());
57
+ cli.parse();
58
+ }
59
+ main();
@@ -0,0 +1,57 @@
1
+ import { CLI } from '@stacksjs/types';
2
+
3
+ declare function build(buddy: CLI): Promise<void>;
4
+
5
+ declare function changelog(buddy: CLI): Promise<void>;
6
+
7
+ declare function clean(buddy: CLI): Promise<void>;
8
+
9
+ declare function commit(buddy: CLI): Promise<void>;
10
+
11
+ declare function create(buddy: CLI): Promise<void>;
12
+
13
+ declare function deploy(buddy: CLI): Promise<void>;
14
+
15
+ declare function dev(buddy: CLI): Promise<void>;
16
+
17
+ declare function example(buddy: CLI): Promise<void>;
18
+
19
+ declare function fresh(buddy: CLI): Promise<void>;
20
+
21
+ declare function generate(buddy: CLI): Promise<void>;
22
+
23
+ declare function lint(buddy: CLI): Promise<void>;
24
+
25
+ declare function inspire(buddy: CLI): Promise<void>;
26
+
27
+ declare function key(buddy: CLI): Promise<void>;
28
+
29
+ declare function make(buddy: CLI): Promise<void>;
30
+
31
+ declare function migrate(buddy: CLI): Promise<void>;
32
+
33
+ declare function onboarding(buddy: CLI): Promise<void>;
34
+
35
+ declare function prepublish(buddy: CLI): Promise<void>;
36
+
37
+ declare function preinstall(buddy: CLI): Promise<void>;
38
+
39
+ declare function release(buddy: CLI): Promise<void>;
40
+
41
+ declare function seed(buddy: CLI): Promise<void>;
42
+
43
+ declare function setting(buddy: CLI): Promise<void>;
44
+
45
+ declare function setup(buddy: CLI): Promise<void>;
46
+
47
+ declare function test(buddy: CLI): Promise<void>;
48
+
49
+ declare function tinker(buddy: CLI): Promise<void>;
50
+
51
+ declare function types(buddy: CLI): Promise<void>;
52
+
53
+ declare function upgrade(buddy: CLI): Promise<void>;
54
+
55
+ declare function version(buddy: CLI): Promise<void>;
56
+
57
+ export { build, changelog, clean, commit, create, deploy, dev, example, fresh, generate, inspire, key, lint, make, migrate, onboarding, preinstall, prepublish, release, seed, setting, setup, test, tinker, types, upgrade, version };
package/dist/index.mjs ADDED
@@ -0,0 +1,96 @@
1
+ export { b as build, c as changelog, a as clean, d as commit, e as create, f as dev, g as example, h as fresh, i as generate, k as key, l as lint, m as make, j as migrate, n as preinstall, p as prepublish, r as release, s as seed, o as setup, t as test, u as upgrade, v as version } from './shared/buddy.4ed611cb.mjs';
2
+ import { runAction } from '@stacksjs/actions';
3
+ import { intro, outro } from '@stacksjs/cli';
4
+ import { Action, ExitCode } from '@stacksjs/types';
5
+ import { types as types$1 } from '@stacksjs/actions/generate';
6
+ import '@stacksjs/actions/commit';
7
+ import '@stacksjs/utils';
8
+ import '@stacksjs/storage';
9
+ import '@stacksjs/path';
10
+ import '@stacksjs/actions/dev';
11
+ import '@stacksjs/actions/examples';
12
+ import '@stacksjs/actions/make';
13
+ import '@stacksjs/actions/preinstall';
14
+ import '@stacksjs/logging';
15
+
16
+ async function deploy(buddy) {
17
+ const descriptions = {
18
+ deploy: "Reinstalls your npm dependencies",
19
+ verbose: "Enable verbose output"
20
+ };
21
+ buddy.command("deploy", descriptions.deploy).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
22
+ const perf = await intro("buddy deploy");
23
+ const result = await runAction(Action.Deploy, options);
24
+ if (result.isErr()) {
25
+ outro("While running the `buddy deploy`, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
26
+ process.exit();
27
+ }
28
+ outro("Deployment succeeded.", { startTime: perf, useSeconds: true });
29
+ process.exit(ExitCode.Success);
30
+ });
31
+ }
32
+
33
+ async function inspire(buddy) {
34
+ buddy.command("inspire", "Inspire yourself with a random quote").option("--two", "Show two quotes", { default: false }).action(async () => {
35
+ const perf = await intro("buddy inspire");
36
+ const result = await runAction(Action.Inspire);
37
+ if (result.isErr()) {
38
+ outro("While running the inspire command, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
39
+ process.exit();
40
+ }
41
+ outro("Your quote is: ...", { startTime: perf, useSeconds: true });
42
+ process.exit(ExitCode.Success);
43
+ });
44
+ }
45
+
46
+ async function onboarding(buddy) {
47
+ const descriptions = {
48
+ command: "Generate Onboarding Pages",
49
+ verbose: "Enable verbose output"
50
+ };
51
+ buddy.command("page:onboarding", descriptions.command).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
52
+ console.log("onboarding");
53
+ });
54
+ }
55
+
56
+ async function setting(buddy) {
57
+ const descriptions = {
58
+ command: "Generate Setting Pages",
59
+ verbose: "Enable verbose output"
60
+ };
61
+ buddy.command("page:setting", descriptions.command).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
62
+ console.log("Generating setting views...");
63
+ });
64
+ }
65
+
66
+ async function tinker(buddy) {
67
+ const descriptions = {
68
+ tinker: "Tinker with your code",
69
+ verbose: "Enable verbose output"
70
+ };
71
+ buddy.command("tinker", descriptions.tinker).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
72
+ const perf = await intro("buddy tinker");
73
+ const result = await runAction(Action.Tinker, options);
74
+ if (result.isErr()) {
75
+ outro("While running the tinker command, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error || void 0);
76
+ process.exit();
77
+ }
78
+ outro("Tinker mode exited.", { startTime: perf, useSeconds: true });
79
+ process.exit(ExitCode.Success);
80
+ });
81
+ }
82
+
83
+ async function types(buddy) {
84
+ const descriptions = {
85
+ generate: "Generate the types of & for your library/libraries",
86
+ fix: "wip",
87
+ verbose: "Enable verbose output"
88
+ };
89
+ buddy.command("types:generate", descriptions.generate).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
90
+ await types$1();
91
+ });
92
+ buddy.command("types:fix", descriptions.fix).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
93
+ });
94
+ }
95
+
96
+ export { deploy, inspire, onboarding, setting, tinker, types };