@appweaver/cli 1.0.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.
- package/LICENSE +1 -0
- package/README.md +7 -0
- package/build/build-command.d.ts +2 -0
- package/build/build-command.js +15 -0
- package/build/build-project.d.ts +8 -0
- package/build/build-project.js +19 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +18 -0
- package/generate/generate-command.d.ts +2 -0
- package/generate/generate-command.js +38 -0
- package/generate/generate-schema.d.ts +12 -0
- package/generate/generate-schema.js +475 -0
- package/generate/generate-types.d.ts +10 -0
- package/generate/generate-types.js +86 -0
- package/generate/index.d.ts +3 -0
- package/generate/index.js +19 -0
- package/migrate/index.d.ts +1 -0
- package/migrate/index.js +17 -0
- package/migrate/migrate-command.d.ts +2 -0
- package/migrate/migrate-command.js +13 -0
- package/migration/index.d.ts +1 -0
- package/migration/index.js +17 -0
- package/migration/migration-command.d.ts +2 -0
- package/migration/migration-command.js +34 -0
- package/openapi/index.d.ts +1 -0
- package/openapi/index.js +17 -0
- package/openapi/openapi-command.d.ts +2 -0
- package/openapi/openapi-command.js +46 -0
- package/package.json +56 -0
- package/seed/index.d.ts +1 -0
- package/seed/index.js +17 -0
- package/seed/seed-command.d.ts +2 -0
- package/seed/seed-command.js +33 -0
- package/skill/GUIDELINES.md +298 -0
- package/skill/SKILL.md +593 -0
- package/skill/references/cache.md +207 -0
- package/skill/references/cli.md +213 -0
- package/skill/references/client.md +507 -0
- package/skill/references/configuration.md +402 -0
- package/skill/references/database.md +134 -0
- package/skill/references/dependency-injection.md +214 -0
- package/skill/references/events.md +152 -0
- package/skill/references/mailer.md +235 -0
- package/skill/references/queue.md +196 -0
- package/skill/references/resources.md +961 -0
- package/skill/references/scheduler.md +184 -0
- package/skill/references/security.md +694 -0
- package/skill/references/storage.md +251 -0
- package/start/index.d.ts +2 -0
- package/start/index.js +18 -0
- package/start/start-command.d.ts +2 -0
- package/start/start-command.js +17 -0
- package/start/start-project.d.ts +8 -0
- package/start/start-project.js +147 -0
- package/testing/index.d.ts +1 -0
- package/testing/index.js +17 -0
- package/testing/testing-command.d.ts +2 -0
- package/testing/testing-command.js +96 -0
- package/update/index.d.ts +2 -0
- package/update/index.js +18 -0
- package/update/update-command.d.ts +2 -0
- package/update/update-command.js +84 -0
- package/update/update-packages.d.ts +10 -0
- package/update/update-packages.js +45 -0
- package/update/update-skill.d.ts +8 -0
- package/update/update-skill.js +93 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.js +19 -0
- package/utils/loader-util.d.ts +29 -0
- package/utils/loader-util.js +132 -0
- package/utils/path-util.d.ts +41 -0
- package/utils/path-util.js +98 -0
- package/utils/process-util.d.ts +39 -0
- package/utils/process-util.js +92 -0
- package/weaver.d.ts +2 -0
- package/weaver.js +53 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Cache
|
|
2
|
+
|
|
3
|
+
The cache module provides a key-value store with TTL support, eviction strategies, and automatic invalidation tied to
|
|
4
|
+
resource mutations. Two implementations are available: `RedisCache` (production) and `MemoryCache` (
|
|
5
|
+
development/testing). Both are accessed through the abstract `Cache` class and the higher-level `CacheService`.
|
|
6
|
+
|
|
7
|
+
## `Cache` — low-level provider
|
|
8
|
+
|
|
9
|
+
Inject the abstract `Cache` class directly when you need raw key-value access.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { inject } from '@appweaver/core';
|
|
13
|
+
import { Cache } from '@appweaver/common';
|
|
14
|
+
|
|
15
|
+
const cache = inject(Cache);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### `cache.get<T>(key)`
|
|
19
|
+
|
|
20
|
+
Retrieves a cached value. Returns `null` if the key does not exist.
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const user = await cache.get<User>('user:42');
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### `cache.has(key)`
|
|
27
|
+
|
|
28
|
+
Returns `true` if the key exists and has not expired.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
if (await cache.has('user:42')) { /* ... */
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### `cache.set(key, value, ttl?)`
|
|
36
|
+
|
|
37
|
+
Stores a value. `ttl` is in milliseconds; omit to use `CACHE_DEFAULT_TTL`.
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
await cache.set('user:42', user, 30_000); // 30 s
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### `cache.evict(key)`
|
|
44
|
+
|
|
45
|
+
Removes a single entry. Returns `true` if the key existed.
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
await cache.evict('user:42');
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### `cache.expire(pattern?)`
|
|
52
|
+
|
|
53
|
+
Removes all entries whose keys match a glob pattern. Returns the number of removed entries. Omit `pattern` to expire
|
|
54
|
+
everything.
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
const removed = await cache.expire('user:*');
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### `cache.keys(pattern?)`
|
|
61
|
+
|
|
62
|
+
Returns all keys matching a glob pattern, or all keys if omitted.
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
const keys = await cache.keys('session:*');
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## `CacheService` — high-level helper
|
|
71
|
+
|
|
72
|
+
`CacheService` wraps `Cache` with duplicate-check logic, debug logging, and resource-aware invalidation. It is
|
|
73
|
+
registered automatically by the framework.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { inject } from '@appweaver/core';
|
|
77
|
+
import { CacheService } from '@appweaver/core';
|
|
78
|
+
|
|
79
|
+
const cacheService = inject(CacheService);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### `cacheService.getCachedValue<T>(key)`
|
|
83
|
+
|
|
84
|
+
Returns the cached value or `null`. Logs a debug message on hit.
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
const result = await cacheService.getCachedValue<Product[]>('products:all');
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### `cacheService.addToCache(key, value, ttl?, replace?)`
|
|
91
|
+
|
|
92
|
+
Stores a value only if the key does not already exist. Pass `replace: true` to overwrite. Returns `false` if the key
|
|
93
|
+
existed and `replace` was not set.
|
|
94
|
+
|
|
95
|
+
| Parameter | Type | Default | Description |
|
|
96
|
+
|-----------|-----------|---------|---------------------------------|
|
|
97
|
+
| `key` | `string` | — | Cache key |
|
|
98
|
+
| `value` | `any` | — | Value to store |
|
|
99
|
+
| `ttl` | `number` | config | TTL in milliseconds |
|
|
100
|
+
| `replace` | `boolean` | `false` | Overwrite if key already exists |
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
await cacheService.addToCache('products:all', products, 60_000);
|
|
104
|
+
// Overwrite an existing entry:
|
|
105
|
+
await cacheService.addToCache('products:all', updated, 60_000, true);
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### `cacheService.removeCachedValue(key)`
|
|
109
|
+
|
|
110
|
+
Removes a single cached entry. Returns `true` if removed.
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
await cacheService.removeCachedValue('products:all');
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### `cacheService.invalidateCache(modelName, action)`
|
|
117
|
+
|
|
118
|
+
Expires cache entries related to a model based on `CACHE_INVALIDATION_STRATEGY`. Called automatically by the framework
|
|
119
|
+
after `create`, `update`, and `delete` actions.
|
|
120
|
+
|
|
121
|
+
| Parameter | Type | Description |
|
|
122
|
+
|-------------|------------------------------------|--------------------------------------|
|
|
123
|
+
| `modelName` | `string` | The resource model name |
|
|
124
|
+
| `action` | `'create' \| 'update' \| 'delete'` | The mutation that triggered eviction |
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
await cacheService.invalidateCache('Product', 'update');
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### `cacheService.buildCacheKey(data)`
|
|
131
|
+
|
|
132
|
+
Builds a structured cache key that encodes HTTP method, URL, body hash, relations, and optional user scope.
|
|
133
|
+
|
|
134
|
+
| Field | Type | Description |
|
|
135
|
+
|--------------------|------------|-------------------------------------------------|
|
|
136
|
+
| `baseKey` | `string` | Required prefix |
|
|
137
|
+
| `method` | `string` | HTTP method |
|
|
138
|
+
| `url` | `string` | Request URL |
|
|
139
|
+
| `body` | `string` | Stringified request body (hashed automatically) |
|
|
140
|
+
| `modelName` | `string` | Model whose relations are embedded in the key |
|
|
141
|
+
| `relations` | `string[]` | Explicit relation list; use `['*']` for all |
|
|
142
|
+
| `skipInvalidation` | `boolean` | Omit the invalidation suffix |
|
|
143
|
+
| `authUser` | `AuthUser` | Scope the key to the authenticated user |
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
const key = cacheService.buildCacheKey({
|
|
147
|
+
baseKey: 'products',
|
|
148
|
+
method: 'GET',
|
|
149
|
+
url: '/api/products?page=1',
|
|
150
|
+
modelName: 'Product',
|
|
151
|
+
authUser: req.user
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Configuration
|
|
158
|
+
|
|
159
|
+
| Key | Type | Default | Description |
|
|
160
|
+
|-------------------------------|----------|---------------------------------------|----------------------------------------------------|
|
|
161
|
+
| `CACHE_ENABLED` | `bool` | `true` | Enables or disables the cache globally |
|
|
162
|
+
| `CACHE_PROVIDER` | `string` | `'@appweaver/core/cache/redis-cache'` | Path to the Cache implementation |
|
|
163
|
+
| `CACHE_KEY_PREFIX` | `string` | `'cache:'` | Prefix prepended to every key |
|
|
164
|
+
| `CACHE_MAX_ITEMS` | `int` | `1000` | Maximum number of entries before eviction kicks in |
|
|
165
|
+
| `CACHE_CACHE_MAX_SIZE` | `string` | - | Maximum size used by the cache. |
|
|
166
|
+
| `CACHE_DEFAULT_TTL` | `int` | `5000` | Default TTL in milliseconds |
|
|
167
|
+
| `CACHE_EVICTION_STRATEGY` | `enum` | `'lru'` | `lru`, `lfu`, or `fifo` |
|
|
168
|
+
| `CACHE_INVALIDATION_STRATEGY` | `enum` | `'expire-related'` | `expire-related`, `expire-all`, or `none` |
|
|
169
|
+
| `CACHE_INVALIDATION_DEFERRED` | `bool` | `false` | Fire invalidation in the background (non-blocking) |
|
|
170
|
+
|
|
171
|
+
Switch to the in-memory implementation for local development or tests:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"CACHE_PROVIDER": "@appweaver/core/cache/memory-cache"
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Real-world example
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
import { inject } from '@appweaver/core';
|
|
185
|
+
import { CacheService } from '@appweaver/core';
|
|
186
|
+
|
|
187
|
+
export class ProductService {
|
|
188
|
+
private readonly _cache = inject(CacheService);
|
|
189
|
+
|
|
190
|
+
async getAll(): Promise<Product[]> {
|
|
191
|
+
const key = this._cache.buildCacheKey({ baseKey: 'products:all' });
|
|
192
|
+
|
|
193
|
+
const cached = await this._cache.getCachedValue<Product[]>(key);
|
|
194
|
+
if (cached) return cached;
|
|
195
|
+
|
|
196
|
+
const products = await fetchFromDatabase();
|
|
197
|
+
await this._cache.addToCache(key, products, 60_000);
|
|
198
|
+
return products;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async update(id: number, data: Partial<Product>): Promise<Product> {
|
|
202
|
+
const product = await updateInDatabase(id, data);
|
|
203
|
+
await this._cache.invalidateCache('Product', 'update');
|
|
204
|
+
return product;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# CLI
|
|
2
|
+
|
|
3
|
+
## `weaver` — Top-level
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
weaver <command> [options]
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
| Option/Command | Alias | Description |
|
|
10
|
+
|-----------------|-------|----------------------------------------|
|
|
11
|
+
| `build` | `b` | Build the application |
|
|
12
|
+
| `openapi` | `oa` | Generate OpenAPI specification schema |
|
|
13
|
+
| `generate` | `g` | Generate types and/or schemas |
|
|
14
|
+
| `migrate` | `mge` | Run database migrations |
|
|
15
|
+
| `migration` | `mgn` | Database migration commands |
|
|
16
|
+
| `seed` | `sd` | Seed the database |
|
|
17
|
+
| `start` | `s` | Start the application |
|
|
18
|
+
| `test` | `t` | Perform operations used during testing |
|
|
19
|
+
| `update` | `u` | Update the Appweaver packages |
|
|
20
|
+
| `help` | | Display help for command |
|
|
21
|
+
| `-v, --version` | | Output the current version |
|
|
22
|
+
| `-h, --help` | | Output usage information |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## `weaver build`
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
weaver build|b [options]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Build the application.
|
|
33
|
+
|
|
34
|
+
| Option | Description | Default |
|
|
35
|
+
|-----------------|--------------------------------------|-----------------------|
|
|
36
|
+
| `-p, --project` | TypeScript project build config file | `tsconfig.build.json` |
|
|
37
|
+
| `-h, --help` | Output usage information | |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## `weaver openapi`
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
weaver openapi|oa [options]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Generate application OpenAPI specification schema.
|
|
48
|
+
|
|
49
|
+
| Option | Description | Default |
|
|
50
|
+
|---------------------------|------------------------------------------------------------------|-----------------|
|
|
51
|
+
| `-o, --outputPath [path]` | Output path for generated OpenAPI specification | `./schema.json` |
|
|
52
|
+
| `-f, --format [format]` | Output format for generated OpenAPI specification (json or yaml) | `json` |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## `weaver generate`
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
weaver generate|g [options]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Generate types and/or schemas. With no flags, generates both types and schema.
|
|
63
|
+
|
|
64
|
+
| Option | Description | Default |
|
|
65
|
+
|----------------------------|-----------------------------------------|------------------------------------------|
|
|
66
|
+
| `-t, --types` | Generate TypeScript types | — |
|
|
67
|
+
| `-s, --schema` | Generate Prisma schema | — |
|
|
68
|
+
| `--modelPattern [pattern]` | Glob pattern for finding model files | `config.RESOURCE_MODEL_PATTERN` |
|
|
69
|
+
| `--typesPath [path]` | Output path for generated types | `config.RESOURCE_GENERATED_TYPES_PATH` |
|
|
70
|
+
| `--schemaPath [path]` | Output path for generated Prisma schema | `config.DATABASE_SCHEMA_PATH` |
|
|
71
|
+
| `--clientPath [path]` | Output path for generated Prisma client | `config.DATABASE_CLIENT_OUTPUT_DIR_PATH` |
|
|
72
|
+
| `--verbose` | Print verbose output | `false` |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## `weaver migrate`
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
weaver migrate|mge [options]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## `weaver migration`
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
weaver migration|mgn [options] [command]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Database migration commands.
|
|
91
|
+
|
|
92
|
+
**Subcommands:**
|
|
93
|
+
|
|
94
|
+
| Command | Description |
|
|
95
|
+
|-------------------|---------------------------------|
|
|
96
|
+
| `new <name>` | Create a new database migration |
|
|
97
|
+
| `reset [options]` | Reset the database |
|
|
98
|
+
|
|
99
|
+
### `weaver migration reset`
|
|
100
|
+
|
|
101
|
+
| Option | Description | Default |
|
|
102
|
+
|---------------|----------------------------------------------|---------|
|
|
103
|
+
| `-f, --force` | Force reset for non-development environments | `false` |
|
|
104
|
+
| `-y, --yes` | Skip confirmation prompt | `false` |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## `weaver seed`
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
weaver seed|sd [options]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Seed the database.
|
|
115
|
+
|
|
116
|
+
| Option | Description | Default |
|
|
117
|
+
|-------------------------|---------------------------------------------------------------------|-----------------------|
|
|
118
|
+
| `--seedersPath [path]` | Seeders directory path | `config.SEEDERS_PATH` |
|
|
119
|
+
| `-b, --buildProject` | Build the project before seeding | `false` |
|
|
120
|
+
| `-p, --project` | TypeScript project build config file (used when `-b` is set) | `tsconfig.build.json` |
|
|
121
|
+
| `-c, --continueOnError` | Continue seeder execution if error is thrown | `false` |
|
|
122
|
+
| `-f, --fixWarnings` | Fix all seeder warnings like wrong checksum or deleted seeder files | `false` |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## `weaver start`
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
weaver start|s [options]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Start the application.
|
|
133
|
+
|
|
134
|
+
| Option | Description | Default |
|
|
135
|
+
|-----------------|-------------------------------------------------------------|-----------------|
|
|
136
|
+
| `-p, --project` | TypeScript project config file | `tsconfig.json` |
|
|
137
|
+
| `-w, --watch` | Run in watch mode (recompiles and restarts on file changes) | `false` |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## `weaver test`
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
weaver test|t [options] [command]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Perform operations used during testing.
|
|
148
|
+
|
|
149
|
+
**Subcommands:**
|
|
150
|
+
|
|
151
|
+
| Command | Description |
|
|
152
|
+
|----------------------|------------------------------------------------------------|
|
|
153
|
+
| `setup [options]` | Setup temporary test data (database schema and migrations) |
|
|
154
|
+
| `reset [options]` | Reset database and/or file storage in temporary directory |
|
|
155
|
+
| `teardown [options]` | Remove temporary test directory |
|
|
156
|
+
|
|
157
|
+
### `weaver test setup`
|
|
158
|
+
|
|
159
|
+
Requires `NODE_ENV=test`.
|
|
160
|
+
|
|
161
|
+
| Option | Description | Default |
|
|
162
|
+
|----------------------------|-----------------------------------------|------------------------------------------|
|
|
163
|
+
| `-d, --dir [tempDir]` | Directory for temporary test data | `./temp` |
|
|
164
|
+
| `--modelPattern [pattern]` | Glob pattern for finding model files | `config.RESOURCE_MODEL_PATTERN` |
|
|
165
|
+
| `--schemaPath [path]` | Output path for generated Prisma schema | `config.DATABASE_SCHEMA_PATH` |
|
|
166
|
+
| `--clientPath [path]` | Output path for generated Prisma client | `config.DATABASE_CLIENT_OUTPUT_DIR_PATH` |
|
|
167
|
+
| `--migrationName [name]` | Name for the initial migration | `init_test` |
|
|
168
|
+
| `--verbose` | Print verbose output | `false` |
|
|
169
|
+
|
|
170
|
+
### `weaver test reset`
|
|
171
|
+
|
|
172
|
+
Requires `NODE_ENV=test`. With no flags, resets both database and storage.
|
|
173
|
+
|
|
174
|
+
| Option | Description | Default |
|
|
175
|
+
|-----------------------|-----------------------------------|----------|
|
|
176
|
+
| `-d, --dir [tempDir]` | Directory for temporary test data | `./temp` |
|
|
177
|
+
| `--database` | Reset database | — |
|
|
178
|
+
| `--storage` | Reset file storage | — |
|
|
179
|
+
| `--verbose` | Print verbose output | `false` |
|
|
180
|
+
|
|
181
|
+
### `weaver test teardown`
|
|
182
|
+
|
|
183
|
+
Requires `NODE_ENV=test`.
|
|
184
|
+
|
|
185
|
+
| Option | Description | Default |
|
|
186
|
+
|-----------------------|-----------------------------------|----------|
|
|
187
|
+
| `-d, --dir [tempDir]` | Directory for temporary test data | `./temp` |
|
|
188
|
+
| `--verbose` | Print verbose output | `false` |
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## `weaver update`
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
weaver update|u [options] [packages...]
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Update the Appweaver packages.
|
|
199
|
+
|
|
200
|
+
**Arguments:**
|
|
201
|
+
|
|
202
|
+
| Argument | Description | Default |
|
|
203
|
+
|------------|-----------------------------------------------------------------------------------------------------------------|---------------------------------------|
|
|
204
|
+
| `packages` | A list of packages to update (e.g. `@appweaver/core @appweaver/cli`). Only `@appweaver/*` packages are updated. | All installed `@appweaver/*` packages |
|
|
205
|
+
|
|
206
|
+
**Options:**
|
|
207
|
+
|
|
208
|
+
| Option | Description | Default |
|
|
209
|
+
|-----------------------------------|------------------------------------------------------------|------------|
|
|
210
|
+
| `--targetVersion [targetVersion]` | The version to update the packages to | `"latest"` |
|
|
211
|
+
| `--noSkill` | Skip updating AI agents skill files in the current project | `false` |
|
|
212
|
+
| `-f, --force` | Force update despite peerDependency version mismatches | `false` |
|
|
213
|
+
| `--verbose` | Print verbose output | `false` |
|