create-warlock 4.3.0 → 4.5.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/CHANGELOG.md +37 -39
- package/esm/commands/create-new-app/index.mjs +4 -4
- package/esm/commands/create-new-app/index.mjs.map +1 -1
- package/esm/features/features-map.mjs +53 -11
- package/esm/features/features-map.mjs.map +1 -1
- package/package.json +2 -2
- package/templates/warlock/AGENTS.md +101 -0
- package/templates/warlock/src/config/cache.ts +1 -1
- package/templates/warlock/yarn.lock +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
# Changelog — create-warlock
|
|
2
|
-
|
|
3
|
-
All notable changes to `create-warlock` are documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- Baseline — per-package changelog tracking starts at this version.
|
|
1
|
+
# Changelog — create-warlock
|
|
2
|
+
|
|
3
|
+
All notable changes to `create-warlock` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
|
+
|
|
7
|
+
## 4.2.11
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Bumped `@mongez/reinforcements` to 3.3.0 (package dependency + project template)
|
|
12
|
+
|
|
13
|
+
## 4.2.10
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- The project template now pins the latest `@mongez/*` versions (`@mongez/reinforcements@^3.2.0`, `@mongez/agent-kit@^1.2.0`) so freshly scaffolded apps start on current dependencies. (`@warlock.js/*` versions are still rewritten to the scaffolder's own version at install time.)
|
|
18
|
+
|
|
19
|
+
## 4.2.7
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- The published package now ships its `templates/` folder, so scaffolding a new project works from the installed package — it was missing from the build, which failed the wizard with "Something went wrong" at the template-copy step.
|
|
24
|
+
|
|
25
|
+
## 4.2.6
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- The published package now ships its `bin` folder again, so the `create-warlock` CLI works from the installed package — it was omitted from the 4.2.5 build.
|
|
30
|
+
|
|
31
|
+
## 4.2.5
|
|
32
|
+
|
|
33
|
+
- The feature wizard now offers **Notifications** (`@warlock.js/notifications`) under "Jobs & Messaging" — opt-in; selecting it delegates to `warlock add notifications` (ejects config + scaffolds the in-app model/migration).
|
|
34
|
+
|
|
35
|
+
## 4.1.15
|
|
36
|
+
|
|
37
|
+
- Baseline — per-package changelog tracking starts at this version.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDatabaseDriver, getDatabaseDriverOptions } from "../../features/database-drivers.mjs";
|
|
2
|
-
import { getAiProviderOptions, getAllFeatureKeys, getDefaultFeatureKeys, getFeatureOptions } from "../../features/features-map.mjs";
|
|
2
|
+
import { getAiPackageOptions, getAiProviderOptions, getAllFeatureKeys, getDefaultFeatureKeys, getFeatureOptions } from "../../features/features-map.mjs";
|
|
3
3
|
import { detectPackageManagers, getPackageManager, getPreferredPackageManager, getSystemPackageManagers, setPackageManager } from "../../helpers/package-manager.mjs";
|
|
4
4
|
import { packageRoot } from "../../helpers/paths.mjs";
|
|
5
5
|
import { App } from "../../helpers/app.mjs";
|
|
@@ -69,8 +69,8 @@ async function createNewApp(cli = {}) {
|
|
|
69
69
|
process.exit(0);
|
|
70
70
|
}
|
|
71
71
|
const selectedAiProviders = await multiselect({
|
|
72
|
-
message: "Add AI
|
|
73
|
-
options: getAiProviderOptions(),
|
|
72
|
+
message: "Add AI packages? Providers + capabilities — the core AI package is included automatically",
|
|
73
|
+
options: [...getAiProviderOptions(), ...getAiPackageOptions()],
|
|
74
74
|
required: false
|
|
75
75
|
});
|
|
76
76
|
if (isCancel(selectedAiProviders)) {
|
|
@@ -120,7 +120,7 @@ async function createNonInteractive(cli) {
|
|
|
120
120
|
const databaseDriver = cli.db ?? "mongodb";
|
|
121
121
|
const driver = getDatabaseDriver(databaseDriver);
|
|
122
122
|
if (!driver) {
|
|
123
|
-
cancel(`Unknown database driver"${databaseDriver}"`);
|
|
123
|
+
cancel(`Unknown database driver "${databaseDriver}"`);
|
|
124
124
|
process.exit(1);
|
|
125
125
|
}
|
|
126
126
|
const features = cli.features ?? [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../@warlock.js/create-warlock/src/commands/create-new-app/index.ts"],"sourcesContent":["import {\r\n cancel,\r\n confirm,\r\n isCancel,\r\n multiselect,\r\n select,\r\n text,\r\n} from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { getJsonFile } from \"@warlock.js/fs\";\r\nimport {\r\n getDatabaseDriver,\r\n getDatabaseDriverOptions,\r\n} from \"../../features/database-drivers\";\r\nimport {\r\n getAiProviderOptions,\r\n getAllFeatureKeys,\r\n getDefaultFeatureKeys,\r\n getFeatureOptions,\r\n} from \"../../features/features-map\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n detectPackageManagers,\r\n getPackageManager,\r\n getPreferredPackageManager,\r\n getSystemPackageManagers,\r\n setPackageManager,\r\n} from \"../../helpers/package-manager\";\r\nimport { packageRoot } from \"../../helpers/paths\";\r\nimport { showIntroBanner } from \"../../ui/banner\";\r\nimport { createWarlockApp } from \"../create-warlock-app\";\r\nimport getAppPath from \"./get-app-path\";\r\nimport { App as AppType, CliFlags } from \"./types\";\r\n\r\nexport default async function createNewApp(cli: CliFlags = {}) {\r\n // Start detecting package managers in the background to avoid delay later\r\n const pmDetectionPromise = detectPackageManagers();\r\n\r\n // Get version from package.json\r\n const packageJson: any = getJsonFile(packageRoot(\"package.json\"));\r\n const createWarlockVersion = packageJson.version;\r\n\r\n // Show the intro banner\r\n showIntroBanner(createWarlockVersion);\r\n\r\n console.log(colors.cyan(\"Let's create something magical! \\n\"));\r\n\r\n // Validate Node.js version (minimum v20)\r\n const [major] = process.versions.node.split(\".\").map(Number);\r\n if (major < 20) {\r\n cancel(\"Node.js version must be at least 20.0.0\");\r\n process.exit(0);\r\n }\r\n\r\n // Non-interactive path: build everything from flags and skip the prompts.\r\n if (cli.yes) {\r\n await createNonInteractive(cli);\r\n return;\r\n }\r\n\r\n // Step 1: Project name\r\n const appName = await text({\r\n message: \"What shall we call your project?\",\r\n placeholder: \"my-warlock-app\",\r\n });\r\n\r\n if (isCancel(appName) || !appName.trim()) {\r\n cancel(\"A project name is required to continue\");\r\n process.exit(0);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n if (!appPath) return;\r\n\r\n // Step 2: Package Manager selection\r\n await pmDetectionPromise; // Ensure detection is complete\r\n\r\n const packageManager = await select({\r\n message: \"Which package manager do you want to use?\",\r\n options: getSystemPackageManagers().map(pm => ({\r\n value: pm,\r\n label: pm,\r\n })),\r\n initialValue: getPreferredPackageManager(),\r\n });\r\n\r\n if (isCancel(packageManager)) {\r\n cancel(\"Package manager selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n setPackageManager(packageManager as string);\r\n\r\n // Step 3: Database driver selection\r\n const databaseDriver = await select({\r\n message: \"Choose your database driver\",\r\n options: getDatabaseDriverOptions(),\r\n });\r\n\r\n if (isCancel(databaseDriver)) {\r\n cancel(\"Database selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n const selectedDriver = getDatabaseDriver(databaseDriver as string);\r\n\r\n // Step 4: Features selection\r\n const selectedFeatures = await multiselect({\r\n message: \"Select optional features to include\",\r\n options: getFeatureOptions(),\r\n initialValues: getDefaultFeatureKeys(),\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedFeatures)) {\r\n cancel(\"Feature selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 4b: AI providers
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../@warlock.js/create-warlock/src/commands/create-new-app/index.ts"],"sourcesContent":["import {\r\n cancel,\r\n confirm,\r\n isCancel,\r\n multiselect,\r\n select,\r\n text,\r\n} from \"@clack/prompts\";\r\nimport { colors } from \"@mongez/copper\";\r\nimport { getJsonFile } from \"@warlock.js/fs\";\r\nimport {\r\n getDatabaseDriver,\r\n getDatabaseDriverOptions,\r\n} from \"../../features/database-drivers\";\r\nimport {\r\n getAiPackageOptions,\r\n getAiProviderOptions,\r\n getAllFeatureKeys,\r\n getDefaultFeatureKeys,\r\n getFeatureOptions,\r\n} from \"../../features/features-map\";\r\nimport { App } from \"../../helpers/app\";\r\nimport {\r\n detectPackageManagers,\r\n getPackageManager,\r\n getPreferredPackageManager,\r\n getSystemPackageManagers,\r\n setPackageManager,\r\n} from \"../../helpers/package-manager\";\r\nimport { packageRoot } from \"../../helpers/paths\";\r\nimport { showIntroBanner } from \"../../ui/banner\";\r\nimport { createWarlockApp } from \"../create-warlock-app\";\r\nimport getAppPath from \"./get-app-path\";\r\nimport { App as AppType, CliFlags } from \"./types\";\r\n\r\nexport default async function createNewApp(cli: CliFlags = {}) {\r\n // Start detecting package managers in the background to avoid delay later\r\n const pmDetectionPromise = detectPackageManagers();\r\n\r\n // Get version from package.json\r\n const packageJson: any = getJsonFile(packageRoot(\"package.json\"));\r\n const createWarlockVersion = packageJson.version;\r\n\r\n // Show the intro banner\r\n showIntroBanner(createWarlockVersion);\r\n\r\n console.log(colors.cyan(\"Let's create something magical! \\n\"));\r\n\r\n // Validate Node.js version (minimum v20)\r\n const [major] = process.versions.node.split(\".\").map(Number);\r\n if (major < 20) {\r\n cancel(\"Node.js version must be at least 20.0.0\");\r\n process.exit(0);\r\n }\r\n\r\n // Non-interactive path: build everything from flags and skip the prompts.\r\n if (cli.yes) {\r\n await createNonInteractive(cli);\r\n return;\r\n }\r\n\r\n // Step 1: Project name\r\n const appName = await text({\r\n message: \"What shall we call your project?\",\r\n placeholder: \"my-warlock-app\",\r\n });\r\n\r\n if (isCancel(appName) || !appName.trim()) {\r\n cancel(\"A project name is required to continue\");\r\n process.exit(0);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n if (!appPath) return;\r\n\r\n // Step 2: Package Manager selection\r\n await pmDetectionPromise; // Ensure detection is complete\r\n\r\n const packageManager = await select({\r\n message: \"Which package manager do you want to use?\",\r\n options: getSystemPackageManagers().map(pm => ({\r\n value: pm,\r\n label: pm,\r\n })),\r\n initialValue: getPreferredPackageManager(),\r\n });\r\n\r\n if (isCancel(packageManager)) {\r\n cancel(\"Package manager selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n setPackageManager(packageManager as string);\r\n\r\n // Step 3: Database driver selection\r\n const databaseDriver = await select({\r\n message: \"Choose your database driver\",\r\n options: getDatabaseDriverOptions(),\r\n });\r\n\r\n if (isCancel(databaseDriver)) {\r\n cancel(\"Database selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n const selectedDriver = getDatabaseDriver(databaseDriver as string);\r\n\r\n // Step 4: Features selection\r\n const selectedFeatures = await multiselect({\r\n message: \"Select optional features to include\",\r\n options: getFeatureOptions(),\r\n initialValues: getDefaultFeatureKeys(),\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedFeatures)) {\r\n cancel(\"Feature selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 4b: AI providers + capability packages — selecting any pulls\r\n // @warlock.js/ai automatically. The result still flows through the\r\n // `selectedAiProviders` → `aiProviders` pipeline, which now also carries the\r\n // capability packages (ai-tools / ai-panoptic / ai-workspace).\r\n const selectedAiProviders = await multiselect({\r\n message:\r\n \"Add AI packages? Providers + capabilities — the core AI package is included automatically\",\r\n options: [...getAiProviderOptions(), ...getAiPackageOptions()],\r\n required: false,\r\n });\r\n\r\n if (isCancel(selectedAiProviders)) {\r\n cancel(\"AI provider selection cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 5: Git initialization\r\n const useGit =\r\n (await confirm({\r\n message: \"Initialize a Git repository?\",\r\n })) === true;\r\n\r\n if (isCancel(useGit)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Step 6: JWT secret generation\r\n const useJWT =\r\n (await confirm({\r\n message: \"Generate JWT secret keys?\",\r\n })) === true;\r\n\r\n if (isCancel(useJWT)) {\r\n cancel(\"Setup cancelled\");\r\n process.exit(0);\r\n }\r\n\r\n // Build app details\r\n const appDetails: Required<AppType> = {\r\n appName: appName,\r\n appType: \"warlock\",\r\n appPath: appPath,\r\n pkgManager: getPackageManager(),\r\n options: {\r\n databaseDriver: databaseDriver as string,\r\n databasePort: selectedDriver?.defaultPort || 27017,\r\n features: selectedFeatures as string[],\r\n aiProviders: selectedAiProviders as string[],\r\n useGit,\r\n useJWT,\r\n },\r\n };\r\n\r\n // Create the app\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n\r\n/**\r\n * Non-interactive scaffold path for`--yes`. Builds the app from flags with\r\n * sensible defaults and skips every prompt. Validates the database driver and\r\n * feature/provider keys up front so a typo fails fast instead of mid-install.\r\n */\r\nasync function createNonInteractive(cli: CliFlags) {\r\n const appName = (cli.name ?? \"\").trim();\r\n\r\n if (!appName) {\r\n cancel(\"--yes requires a project name (first argument or --name=<name>)\");\r\n process.exit(1);\r\n }\r\n\r\n const appPath = getAppPath(appName);\r\n\r\n if (!appPath) return;\r\n\r\n await detectPackageManagers();\r\n\r\n const packageManager = cli.pm ?? getPreferredPackageManager();\r\n setPackageManager(packageManager);\r\n\r\n const databaseDriver = cli.db ?? \"mongodb\";\r\n const driver = getDatabaseDriver(databaseDriver);\r\n\r\n if (!driver) {\r\n cancel(`Unknown database driver \"${databaseDriver}\"`);\r\n process.exit(1);\r\n }\r\n\r\n const features = cli.features ?? [];\r\n const aiProviders = cli.ai ?? [];\r\n\r\n const allowedKeys = getAllFeatureKeys();\r\n const invalidKeys = [...features, ...aiProviders].filter(\r\n key => !allowedKeys.includes(key),\r\n );\r\n\r\n if (invalidKeys.length > 0) {\r\n cancel(`Unknown feature(s): ${invalidKeys.join(\",\")}`);\r\n process.exit(1);\r\n }\r\n\r\n const appDetails: Required<AppType> = {\r\n appName,\r\n appType: \"warlock\",\r\n appPath,\r\n pkgManager: getPackageManager(),\r\n options: {\r\n databaseDriver,\r\n databasePort: driver.defaultPort,\r\n features,\r\n aiProviders,\r\n useGit: cli.git ?? false,\r\n useJWT: cli.jwt ?? false,\r\n },\r\n };\r\n\r\n await createWarlockApp(new App(appDetails));\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAmCA,eAA8B,aAAa,MAAgB,CAAC,GAAG;CAE7D,MAAM,qBAAqB,sBAAsB;CAIjD,MAAM,uBADmB,YAAY,YAAY,cAAc,CACxB,CAAC,CAAC;CAGzC,gBAAgB,oBAAoB;CAEpC,QAAQ,IAAI,OAAO,KAAK,oCAAoC,CAAC;CAG7D,MAAM,CAAC,SAAS,QAAQ,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;CAC3D,IAAI,QAAQ,IAAI;EACd,OAAO,yCAAyC;EAChD,QAAQ,KAAK,CAAC;CAChB;CAGA,IAAI,IAAI,KAAK;EACX,MAAM,qBAAqB,GAAG;EAC9B;CACF;CAGA,MAAM,UAAU,MAAM,KAAK;EACzB,SAAS;EACT,aAA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@@ -1,8 +1,8 @@
|
|
|
1
1
|
//#region ../@warlock.js/create-warlock/src/features/features-map.ts
|
|
2
2
|
/**
|
|
3
3
|
* Optional features offered in the general multiselect step. The database
|
|
4
|
-
* driver (its own select) and AI providers (their own
|
|
5
|
-
* NOT here — they have dedicated prompts.
|
|
4
|
+
* driver (its own select) and AI providers + capability packages (their own
|
|
5
|
+
* step) are intentionally NOT here — they have dedicated prompts.
|
|
6
6
|
*/
|
|
7
7
|
const features = [
|
|
8
8
|
{
|
|
@@ -89,35 +89,61 @@ const features = [
|
|
|
89
89
|
* AI providers offered in the dedicated AI step. Selecting any of these pulls
|
|
90
90
|
* the core `@warlock.js/ai` package automatically via the provider's `requires`
|
|
91
91
|
* in core's feature map — the scaffolder never lists `ai` as a standalone pick.
|
|
92
|
+
*
|
|
93
|
+
* Keys are `ai-`prefixed to mirror core's renamed provider feature keys
|
|
94
|
+
* (`ai-openai` → `@warlock.js/ai-openai`, etc.).
|
|
92
95
|
*/
|
|
93
96
|
const aiProviders = [
|
|
94
97
|
{
|
|
95
|
-
key: "openai",
|
|
98
|
+
key: "ai-openai",
|
|
96
99
|
label: "OpenAI",
|
|
97
100
|
hint: "GPT models via the OpenAI API"
|
|
98
101
|
},
|
|
99
102
|
{
|
|
100
|
-
key: "google",
|
|
103
|
+
key: "ai-google",
|
|
101
104
|
label: "Google (Gemini)",
|
|
102
105
|
hint: "Gemini models via Google AI"
|
|
103
106
|
},
|
|
104
107
|
{
|
|
105
|
-
key: "anthropic",
|
|
108
|
+
key: "ai-anthropic",
|
|
106
109
|
label: "Anthropic (Claude)",
|
|
107
110
|
hint: "Claude models via the Anthropic API"
|
|
108
111
|
},
|
|
109
112
|
{
|
|
110
|
-
key: "bedrock",
|
|
113
|
+
key: "ai-bedrock",
|
|
111
114
|
label: "AWS Bedrock",
|
|
112
115
|
hint: "Foundation models via Amazon Bedrock"
|
|
113
116
|
},
|
|
114
117
|
{
|
|
115
|
-
key: "ollama",
|
|
118
|
+
key: "ai-ollama",
|
|
116
119
|
label: "Ollama",
|
|
117
120
|
hint: "Local models via Ollama"
|
|
118
121
|
}
|
|
119
122
|
];
|
|
120
123
|
/**
|
|
124
|
+
* AI capability packages offered alongside the providers in the dedicated AI
|
|
125
|
+
* step. These are the satellite packages that sit on top of the core
|
|
126
|
+
* `@warlock.js/ai` toolkit (each pulls the core `ai` package via its `requires`
|
|
127
|
+
* in core's feature map, same as the providers).
|
|
128
|
+
*/
|
|
129
|
+
const aiPackages = [
|
|
130
|
+
{
|
|
131
|
+
key: "ai-tools",
|
|
132
|
+
label: "AI Tools",
|
|
133
|
+
hint: "Ready-made agent tools (web search, fetch, HTTP, calculator, date-time) + MCP client/server"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
key: "ai-panoptic",
|
|
137
|
+
label: "AI Observability (Panoptic)",
|
|
138
|
+
hint: "Tracing + exporters + a zero-setup local dashboard"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
key: "ai-workspace",
|
|
142
|
+
label: "AI Workspace",
|
|
143
|
+
hint: "Policy-jailed filesystem + shell for coding agents"
|
|
144
|
+
}
|
|
145
|
+
];
|
|
146
|
+
/**
|
|
121
147
|
* Feature options for the multiselect prompt, ordered by group with the group
|
|
122
148
|
* surfaced in the hint (keeps a flat list scannable without group widgets).
|
|
123
149
|
*/
|
|
@@ -145,13 +171,29 @@ function getAiProviderOptions() {
|
|
|
145
171
|
}));
|
|
146
172
|
}
|
|
147
173
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
174
|
+
* AI capability package options for the dedicated AI multiselect step. Offered
|
|
175
|
+
* together with the providers (see `getAiProviderOptions`).
|
|
176
|
+
*/
|
|
177
|
+
function getAiPackageOptions() {
|
|
178
|
+
return aiPackages.map((pkg) => ({
|
|
179
|
+
value: pkg.key,
|
|
180
|
+
label: pkg.label,
|
|
181
|
+
hint: pkg.hint
|
|
182
|
+
}));
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Every selectable key the scaffolder knows about (features + AI providers +
|
|
186
|
+
* AI capability packages). Used to validate `--features` / `--ai` flags in
|
|
187
|
+
* non-interactive mode.
|
|
150
188
|
*/
|
|
151
189
|
function getAllFeatureKeys() {
|
|
152
|
-
return [
|
|
190
|
+
return [
|
|
191
|
+
...features.map((feature) => feature.key),
|
|
192
|
+
...aiProviders.map((provider) => provider.key),
|
|
193
|
+
...aiPackages.map((pkg) => pkg.key)
|
|
194
|
+
];
|
|
153
195
|
}
|
|
154
196
|
|
|
155
197
|
//#endregion
|
|
156
|
-
export { getAiProviderOptions, getAllFeatureKeys, getDefaultFeatureKeys, getFeatureOptions };
|
|
198
|
+
export { getAiPackageOptions, getAiProviderOptions, getAllFeatureKeys, getDefaultFeatureKeys, getFeatureOptions };
|
|
157
199
|
//# sourceMappingURL=features-map.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features-map.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/features/features-map.ts"],"sourcesContent":["/**\r\n * Presentation manifest for the scaffolder's feature prompts.\r\n *\r\n * This file is **display metadata only** — keys, labels, hints, grouping, and\r\n * default selections. It deliberately holds NO dependency names or versions:\r\n * the single source of truth for what each feature installs is the `add`\r\n * command's feature map in `@warlock.js/core`\r\n * (`src/generations/add-command.action.ts`). The scaffolder collects the\r\n * selections here and delegates the actual install to `warlock add`, so the\r\n * two never drift on versions again.\r\n *\r\n * Every `key` below MUST exist in core's `allowedFeatures`; a CI guard should\r\n * assert that subset relationship so a typo fails the build instead of shipping.\r\n */\r\n\r\nexport type FeatureGroup =\r\n | \"Auth & Access\"\r\n | \"Rendering & Mail\"\r\n | \"Media\"\r\n | \"Storage & Cache\"\r\n | \"Jobs & Messaging\"\r\n | \"Realtime\"\r\n | \"API Docs\"\r\n | \"Tooling\";\r\n\r\nexport type FeatureOption = {\r\n /** Must match a key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n group: FeatureGroup;\r\n defaultSelected?: boolean;\r\n};\r\n\r\n/**\r\n * Optional features offered in the general multiselect step. The database\r\n * driver (its own select) and AI providers (their own step) are intentionally
|
|
1
|
+
{"version":3,"file":"features-map.mjs","names":[],"sources":["../../../../../../@warlock.js/create-warlock/src/features/features-map.ts"],"sourcesContent":["/**\r\n * Presentation manifest for the scaffolder's feature prompts.\r\n *\r\n * This file is **display metadata only** — keys, labels, hints, grouping, and\r\n * default selections. It deliberately holds NO dependency names or versions:\r\n * the single source of truth for what each feature installs is the `add`\r\n * command's feature map in `@warlock.js/core`\r\n * (`src/generations/add-command.action.ts`). The scaffolder collects the\r\n * selections here and delegates the actual install to `warlock add`, so the\r\n * two never drift on versions again.\r\n *\r\n * Every `key` below MUST exist in core's `allowedFeatures`; a CI guard should\r\n * assert that subset relationship so a typo fails the build instead of shipping.\r\n */\r\n\r\nexport type FeatureGroup =\r\n | \"Auth & Access\"\r\n | \"Rendering & Mail\"\r\n | \"Media\"\r\n | \"Storage & Cache\"\r\n | \"Jobs & Messaging\"\r\n | \"Realtime\"\r\n | \"API Docs\"\r\n | \"Tooling\";\r\n\r\nexport type FeatureOption = {\r\n /** Must match a key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n group: FeatureGroup;\r\n defaultSelected?: boolean;\r\n};\r\n\r\n/**\r\n * Optional features offered in the general multiselect step. The database\r\n * driver (its own select) and AI providers + capability packages (their own\r\n * step) are intentionally NOT here — they have dedicated prompts.\r\n */\r\nexport const features: FeatureOption[] = [\r\n // Auth & Access\r\n {\r\n key: \"access\",\r\n label: \"Access (authorization)\",\r\n hint: \"RBAC permission checks, ABAC policies, and roles — pairs with auth\",\r\n group: \"Auth & Access\",\r\n },\r\n\r\n // Rendering & Mail\r\n {\r\n key: \"react\",\r\n label: \"React (rendering & mails)\",\r\n hint: \"React + ReactDOM for non-interactive rendering and HTML/email generation\",\r\n group: \"Rendering & Mail\",\r\n defaultSelected: true,\r\n },\r\n {\r\n key: \"react-email\",\r\n label: \"React Email\",\r\n hint: \"Build email templates with React + Tailwind (pulls react + mail)\",\r\n group: \"Rendering & Mail\",\r\n },\r\n {\r\n key: \"mail\",\r\n label: \"Mail (Nodemailer)\",\r\n hint: \"Send emails via SMTP\",\r\n group: \"Rendering & Mail\",\r\n },\r\n {\r\n key: \"ses\",\r\n label: \"Amazon SES\",\r\n hint: \"Send emails via the AWS SES API\",\r\n group: \"Rendering & Mail\",\r\n },\r\n\r\n // Media\r\n {\r\n key: \"image\",\r\n label: \"Image processing (Sharp)\",\r\n hint: \"Resize, convert, and optimize images\",\r\n group: \"Media\",\r\n },\r\n\r\n // Storage & Cache\r\n {\r\n key: \"s3\",\r\n label: \"S3 storage\",\r\n hint: \"AWS S3 for cloud file storage\",\r\n group: \"Storage & Cache\",\r\n },\r\n {\r\n key: \"redis\",\r\n label: \"Redis cache\",\r\n hint: \"Redis driver for the cache layer\",\r\n group: \"Storage & Cache\",\r\n },\r\n\r\n // Jobs & Messaging\r\n {\r\n key: \"scheduler\",\r\n label: \"Scheduler\",\r\n hint: \"Background tasks and cron jobs\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n {\r\n key: \"herald\",\r\n label: \"Herald (RabbitMQ)\",\r\n hint: \"Message broker for event-driven architecture\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n {\r\n key: \"notifications\",\r\n label: \"Notifications\",\r\n hint: \"Multi-channel notifications — mail + in-app database, preferences, idempotency\",\r\n group: \"Jobs & Messaging\",\r\n },\r\n\r\n // Realtime\r\n {\r\n key: \"socket\",\r\n label: \"Socket.IO\",\r\n hint: \"Realtime websocket server\",\r\n group: \"Realtime\",\r\n },\r\n\r\n // API Docs (swagger / postman / openapi) — not shipped yet; they will arrive\r\n // together in the unified @warlock.js/api-docs package. Re-add the selection\r\n // once that package exists. (Removed so the wizard can't offer unbuilt features.)\r\n\r\n // Tooling\r\n {\r\n key: \"test\",\r\n label: \"Testing (Vitest)\",\r\n hint: \"Vitest + coverage + per-worker DB/cache test setup\",\r\n group: \"Tooling\",\r\n },\r\n];\r\n\r\nexport type AiProviderOption = {\r\n /** Must match a provider/package key in core's `add` feature map. */\r\n key: string;\r\n label: string;\r\n hint: string;\r\n};\r\n\r\n/**\r\n * AI providers offered in the dedicated AI step. Selecting any of these pulls\r\n * the core `@warlock.js/ai` package automatically via the provider's `requires`\r\n * in core's feature map — the scaffolder never lists `ai` as a standalone pick.\r\n *\r\n * Keys are `ai-`prefixed to mirror core's renamed provider feature keys\r\n * (`ai-openai` → `@warlock.js/ai-openai`, etc.).\r\n */\r\nexport const aiProviders: AiProviderOption[] = [\r\n { key: \"ai-openai\", label: \"OpenAI\", hint: \"GPT models via the OpenAI API\" },\r\n { key: \"ai-google\", label: \"Google (Gemini)\", hint: \"Gemini models via Google AI\" },\r\n { key: \"ai-anthropic\", label: \"Anthropic (Claude)\", hint: \"Claude models via the Anthropic API\" },\r\n { key: \"ai-bedrock\", label: \"AWS Bedrock\", hint: \"Foundation models via Amazon Bedrock\" },\r\n { key: \"ai-ollama\", label: \"Ollama\", hint: \"Local models via Ollama\" },\r\n];\r\n\r\n/**\r\n * AI capability packages offered alongside the providers in the dedicated AI\r\n * step. These are the satellite packages that sit on top of the core\r\n * `@warlock.js/ai` toolkit (each pulls the core `ai` package via its `requires`\r\n * in core's feature map, same as the providers).\r\n */\r\nexport const aiPackages: AiProviderOption[] = [\r\n {\r\n key: \"ai-tools\",\r\n label: \"AI Tools\",\r\n hint: \"Ready-made agent tools (web search, fetch, HTTP, calculator, date-time) + MCP client/server\",\r\n },\r\n {\r\n key: \"ai-panoptic\",\r\n label: \"AI Observability (Panoptic)\",\r\n hint: \"Tracing + exporters + a zero-setup local dashboard\",\r\n },\r\n {\r\n key: \"ai-workspace\",\r\n label: \"AI Workspace\",\r\n hint: \"Policy-jailed filesystem + shell for coding agents\",\r\n },\r\n];\r\n\r\n/**\r\n * Feature options for the multiselect prompt, ordered by group with the group\r\n * surfaced in the hint (keeps a flat list scannable without group widgets).\r\n */\r\nexport function getFeatureOptions() {\r\n return features.map(feature => ({\r\n value: feature.key,\r\n label: feature.label,\r\n hint: `${feature.group} — ${feature.hint}`,\r\n }));\r\n}\r\n\r\n/**\r\n * Keys pre-checked in the feature multiselect.\r\n */\r\nexport function getDefaultFeatureKeys(): string[] {\r\n return features.filter(feature => feature.defaultSelected).map(feature => feature.key);\r\n}\r\n\r\n/**\r\n * AI provider options for the dedicated AI multiselect step.\r\n */\r\nexport function getAiProviderOptions() {\r\n return aiProviders.map(provider => ({\r\n value: provider.key,\r\n label: provider.label,\r\n hint: provider.hint,\r\n }));\r\n}\r\n\r\n/**\r\n * AI capability package options for the dedicated AI multiselect step. Offered\r\n * together with the providers (see `getAiProviderOptions`).\r\n */\r\nexport function getAiPackageOptions() {\r\n return aiPackages.map(pkg => ({\r\n value: pkg.key,\r\n label: pkg.label,\r\n hint: pkg.hint,\r\n }));\r\n}\r\n\r\n/**\r\n * Every selectable key the scaffolder knows about (features + AI providers +\r\n * AI capability packages). Used to validate `--features` / `--ai` flags in\r\n * non-interactive mode.\r\n */\r\nexport function getAllFeatureKeys(): string[] {\r\n return [\r\n ...features.map(feature => feature.key),\r\n ...aiProviders.map(provider => provider.key),\r\n ...aiPackages.map(pkg => pkg.key),\r\n ];\r\n}\r\n"],"mappings":";;;;;;AAuCA,MAAa,WAA4B;CAEvC;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;EACP,iBAAiB;CACnB;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CAGA;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT;CACA;EACE,KAAK;EACL,OAAO;E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AAI;EACX,MAAM,IAAI;CACZ,EAAE;AACJ;;;;;;AAOA,SAAgB,oBAA8B;CAC5C,OAAO;EACL,GAAG,SAAS,KAAI,YAAW,QAAQ,GAAG;EACtC,GAAG,YAAY,KAAI,aAAY,SAAS,GAAG;EAC3C,GAAG,WAAW,KAAI,QAAO,IAAI,GAAG;CAClC;AACF"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@clack/prompts": "^0.7.0",
|
|
11
11
|
"@mongez/copper": "^2.1.2",
|
|
12
|
-
"@warlock.js/fs": "4.
|
|
12
|
+
"@warlock.js/fs": "4.5.0",
|
|
13
13
|
"@mongez/reinforcements": "^3.3.0",
|
|
14
14
|
"cross-spawn": "^7.0.3",
|
|
15
15
|
"rimraf": "^6.0.1",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"bin": {
|
|
19
19
|
"create-warlock": "bin/create-app.js"
|
|
20
20
|
},
|
|
21
|
-
"version": "4.
|
|
21
|
+
"version": "4.5.0",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "./esm/index.mjs",
|
|
24
24
|
"module": "./esm/index.mjs",
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
> This file is the single source of truth for instructions given to AI coding
|
|
4
|
+
> agents working in this project. Tool-specific files (`CLAUDE.md`,
|
|
5
|
+
> `.gemini/GEMINI.md`, `.github/copilot-instructions.md`, `CONVENTIONS.md`, …)
|
|
6
|
+
> are **derived** from this file by
|
|
7
|
+
> [agent-kit](https://github.com/hassanzohdy/agent-kit). Edit **this** file, then
|
|
8
|
+
> run `yarn skills:sync` (or `npx agent-kit sync`) to regenerate them — never edit
|
|
9
|
+
> the derived files directly.
|
|
10
|
+
|
|
11
|
+
## Project overview
|
|
12
|
+
|
|
13
|
+
This is a [Warlock.js](https://warlock.js.org) application — a TypeScript, Node.js
|
|
14
|
+
framework for building APIs. The framework and its companion libraries ship under
|
|
15
|
+
the `@warlock.js/*` scope (`core`, `cascade`, `cache`, `seal`, `auth`, `logger`,
|
|
16
|
+
`fs`, `scheduler`, …). Application code lives under `src/app/**`, organized one
|
|
17
|
+
module per domain noun.
|
|
18
|
+
|
|
19
|
+
## Skills come first — read them before anything else
|
|
20
|
+
|
|
21
|
+
**Before you work out how any package or framework feature works, read the
|
|
22
|
+
matching skill.** Skills are the authoritative, maintained source of truth for how
|
|
23
|
+
to use this project's packages and conventions. They are short and task-focused.
|
|
24
|
+
|
|
25
|
+
Whenever you need to know how to use a package (`@warlock.js/*`, `@mongez/*`) or
|
|
26
|
+
how to do a task (write a controller, define a model, add a migration, validate
|
|
27
|
+
input, cache, schedule a job, …), follow this order **strictly**:
|
|
28
|
+
|
|
29
|
+
1. **Read the relevant `SKILL.md` first.** Match the package name or the task to a
|
|
30
|
+
skill's `name` / `description` / triggers, load that skill, and follow it.
|
|
31
|
+
2. **Only if no skill matches**, fall back to the package's own
|
|
32
|
+
types / source / README under `node_modules/<pkg>`.
|
|
33
|
+
3. **The public internet is the last resort, not the first.** Do not web-search
|
|
34
|
+
for how a `@warlock.js/*` or `@mongez/*` API works while a skill for it exists —
|
|
35
|
+
the skill is more current and project-correct than anything online.
|
|
36
|
+
|
|
37
|
+
**Do not reverse-engineer how a package works by grepping for similar or existing
|
|
38
|
+
source files and copying their usage before you have checked the skills.** Existing
|
|
39
|
+
code can be outdated, mid-refactor, or simply wrong; the skill is the contract.
|
|
40
|
+
The rule is: **skill first, source second, web last.**
|
|
41
|
+
|
|
42
|
+
## Where skills live
|
|
43
|
+
|
|
44
|
+
- **Project conventions** — hand-authored skills in this repo's `skills/`
|
|
45
|
+
directory (architecture, code standards, API design, etc. — listed below).
|
|
46
|
+
- **Package skills** — how to use each installed `@warlock.js/*` / `@mongez/*`
|
|
47
|
+
package. These are synced from `node_modules` into your agent's skills
|
|
48
|
+
directory on every install (Claude Code → `.claude/skills/`, Cursor →
|
|
49
|
+
`.cursor/skills/`, GitHub Copilot → `.github/skills/`, Codex → `.codex/skills/`,
|
|
50
|
+
and the equivalent directory for other agents).
|
|
51
|
+
|
|
52
|
+
If a skill you expect is missing, run `yarn skills:sync` (it also runs
|
|
53
|
+
automatically on `postinstall`).
|
|
54
|
+
|
|
55
|
+
## Available project skills (`skills/`)
|
|
56
|
+
|
|
57
|
+
- **api-design** — HTTP conventions: response envelopes, status codes, pagination,
|
|
58
|
+
typed controllers, resources, and routes.
|
|
59
|
+
- **code-standards** — TypeScript style: `interface` (contracts) vs `type` (data),
|
|
60
|
+
access modifiers on every class member, no `any`, single-responsibility files
|
|
61
|
+
with the documented naming suffixes, JSDoc on the public surface.
|
|
62
|
+
- **data-and-persistence** — modeling, storing, and migrating data with
|
|
63
|
+
`@warlock.js/cascade` (money as integer minor units, migrations, indexes).
|
|
64
|
+
- **module-boundaries** — how modules under `src/app/**` relate; one domain noun
|
|
65
|
+
per module; what may import what.
|
|
66
|
+
- **security-baseline** — input validation at every boundary via `@warlock.js/seal`
|
|
67
|
+
schemas, authentication, and secrets handling.
|
|
68
|
+
- **observability-and-resilience** — structured logging, retries, timeouts, and
|
|
69
|
+
avoiding N+1 work.
|
|
70
|
+
- **testing-strategy** — Vitest test pyramid with co-located `*.spec.ts` files.
|
|
71
|
+
- **git-workflow** — conventional commits, branching, PRs, and CI gates.
|
|
72
|
+
|
|
73
|
+
## Commands
|
|
74
|
+
|
|
75
|
+
- `yarn dev` — start the dev server (`warlock dev`)
|
|
76
|
+
- `yarn build` — type-check then build for production (`tsc && warlock build`)
|
|
77
|
+
- `yarn start` — start the production server (`warlock start`)
|
|
78
|
+
- `yarn migrate` / `yarn migrate.fresh` / `yarn migrate.list` — run migrations
|
|
79
|
+
- `yarn seed` — run database seeders
|
|
80
|
+
- `yarn lint` / `yarn format` / `yarn tsc` — lint (eslint --fix), format
|
|
81
|
+
(prettier), and type-check (`tsc --noEmit`)
|
|
82
|
+
- `yarn skills:sync` — re-sync skills from `node_modules` and regenerate the
|
|
83
|
+
derived per-agent files from this `AGENTS.md`
|
|
84
|
+
|
|
85
|
+
## Code style
|
|
86
|
+
|
|
87
|
+
Follow the **code-standards** skill (`skills/code-standards/SKILL.md`) for all
|
|
88
|
+
TypeScript — read it before writing or reviewing any `.ts` / `.tsx`. In short:
|
|
89
|
+
`interface` for contracts and `type` for data shapes, no `any`, access modifiers
|
|
90
|
+
on every class member, single-responsibility files with the documented naming
|
|
91
|
+
suffixes, and JSDoc on the public surface. The bar is senior-level clean code, not
|
|
92
|
+
"it compiles."
|
|
93
|
+
|
|
94
|
+
## Boundaries
|
|
95
|
+
|
|
96
|
+
- Respect **module-boundaries** — do not reach across module internals.
|
|
97
|
+
- Never weaken the **security-baseline** — always validate input at boundaries.
|
|
98
|
+
- Follow **git-workflow** for commits and branches; do not commit or push unless
|
|
99
|
+
explicitly asked.
|
|
100
|
+
- When you are unsure how a package or feature works, **stop and read its skill**
|
|
101
|
+
rather than guessing from other files or the web.
|
|
@@ -1430,15 +1430,15 @@ foreground-child@^3.3.1:
|
|
|
1430
1430
|
signal-exit "^4.0.1"
|
|
1431
1431
|
|
|
1432
1432
|
form-data@^4.0.4:
|
|
1433
|
-
version "4.0.
|
|
1434
|
-
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.
|
|
1435
|
-
integrity sha512-
|
|
1433
|
+
version "4.0.6"
|
|
1434
|
+
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.6.tgz#28e864e1b786dbebb68db1f452f9635278665827"
|
|
1435
|
+
integrity sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==
|
|
1436
1436
|
dependencies:
|
|
1437
1437
|
asynckit "^0.4.0"
|
|
1438
1438
|
combined-stream "^1.0.8"
|
|
1439
1439
|
es-set-tostringtag "^2.1.0"
|
|
1440
|
-
hasown "^2.0.
|
|
1441
|
-
mime-types "^2.1.
|
|
1440
|
+
hasown "^2.0.4"
|
|
1441
|
+
mime-types "^2.1.35"
|
|
1442
1442
|
|
|
1443
1443
|
fsevents@~2.3.3:
|
|
1444
1444
|
version "2.3.3"
|
|
@@ -1534,10 +1534,10 @@ has-tostringtag@^1.0.2:
|
|
|
1534
1534
|
dependencies:
|
|
1535
1535
|
has-symbols "^1.0.3"
|
|
1536
1536
|
|
|
1537
|
-
hasown@^2.0.2:
|
|
1538
|
-
version "2.0.
|
|
1539
|
-
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.
|
|
1540
|
-
integrity sha512-
|
|
1537
|
+
hasown@^2.0.2, hasown@^2.0.4:
|
|
1538
|
+
version "2.0.4"
|
|
1539
|
+
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.4.tgz#8c62d8cb90beb2aad5d0a5b67581ad9854c3f003"
|
|
1540
|
+
integrity sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==
|
|
1541
1541
|
dependencies:
|
|
1542
1542
|
function-bind "^1.1.2"
|
|
1543
1543
|
|
|
@@ -1732,7 +1732,7 @@ mime-db@1.52.0:
|
|
|
1732
1732
|
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
|
|
1733
1733
|
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
|
|
1734
1734
|
|
|
1735
|
-
mime-types@^2.1.
|
|
1735
|
+
mime-types@^2.1.35:
|
|
1736
1736
|
version "2.1.35"
|
|
1737
1737
|
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
|
|
1738
1738
|
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
|
|
@@ -2262,9 +2262,9 @@ undici-types@~7.16.0:
|
|
|
2262
2262
|
integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==
|
|
2263
2263
|
|
|
2264
2264
|
undici@^7.0.0:
|
|
2265
|
-
version "7.
|
|
2266
|
-
resolved "https://registry.yarnpkg.com/undici/-/undici-7.
|
|
2267
|
-
integrity sha512-
|
|
2265
|
+
version "7.28.0"
|
|
2266
|
+
resolved "https://registry.yarnpkg.com/undici/-/undici-7.28.0.tgz#97d64564198b285bc281f0e8e29597e3d11fe7ec"
|
|
2267
|
+
integrity sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==
|
|
2268
2268
|
|
|
2269
2269
|
uri-js@^4.2.2:
|
|
2270
2270
|
version "4.4.1"
|
|
@@ -2322,9 +2322,9 @@ wrappy@1:
|
|
|
2322
2322
|
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
|
2323
2323
|
|
|
2324
2324
|
ws@^8.18.3:
|
|
2325
|
-
version "8.
|
|
2326
|
-
resolved "https://registry.yarnpkg.com/ws/-/ws-8.
|
|
2327
|
-
integrity sha512-
|
|
2325
|
+
version "8.21.0"
|
|
2326
|
+
resolved "https://registry.yarnpkg.com/ws/-/ws-8.21.0.tgz#012e413fc07429945121b0c153158c4343086951"
|
|
2327
|
+
integrity sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==
|
|
2328
2328
|
|
|
2329
2329
|
yocto-queue@^0.1.0:
|
|
2330
2330
|
version "0.1.0"
|