@pugi/cli 1.0.0-alpha.158 → 1.0.0-alpha.159
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pugi/cli",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.159",
|
|
4
4
|
"description": "Pugi CLI - terminal-native software execution system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://pugi.io",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"LICENSE"
|
|
41
41
|
],
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@pugi/cli-darwin-arm64": "1.0.0-alpha.
|
|
44
|
-
"@pugi/cli-darwin-x64": "1.0.0-alpha.
|
|
45
|
-
"@pugi/cli-linux-arm64": "1.0.0-alpha.
|
|
46
|
-
"@pugi/cli-linux-x64": "1.0.0-alpha.
|
|
47
|
-
"@pugi/cli-windows-arm64": "1.0.0-alpha.
|
|
48
|
-
"@pugi/cli-windows-x64": "1.0.0-alpha.
|
|
43
|
+
"@pugi/cli-darwin-arm64": "1.0.0-alpha.159",
|
|
44
|
+
"@pugi/cli-darwin-x64": "1.0.0-alpha.159",
|
|
45
|
+
"@pugi/cli-linux-arm64": "1.0.0-alpha.159",
|
|
46
|
+
"@pugi/cli-linux-x64": "1.0.0-alpha.159",
|
|
47
|
+
"@pugi/cli-windows-arm64": "1.0.0-alpha.159",
|
|
48
|
+
"@pugi/cli-windows-x64": "1.0.0-alpha.159"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -9,6 +9,16 @@ description: "Generates idiomatic NestJS modules, controllers, services, DTOs."
|
|
|
9
9
|
|
|
10
10
|
Generates idiomatic NestJS modules, controllers, services, DTOs.
|
|
11
11
|
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
- Every dependency you import must be in package.json before you import it. A test file is code: importing `@nestjs/testing` without adding it fails the build for the whole project, not just the test.
|
|
15
|
+
- Run the project's own build once before reporting done. `tsc` is the cheapest reviewer you have and it reads the tsconfig the customer will ship with, not the one you assumed.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Known failure modes
|
|
19
|
+
|
|
20
|
+
Read `quirks.md` in this directory BEFORE writing code in this domain. It records 2 failures that reached a customer build, each with the symptom, the cause, and the check that tells them apart.
|
|
21
|
+
|
|
12
22
|
|
|
13
23
|
## Grounding
|
|
14
24
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- GENERATED by pugi-core packages/opencode/script/generate-persona-skill-pack.ts — do not hand-edit. -->
|
|
2
|
+
|
|
3
|
+
# NestJS API Builder — known failure modes
|
|
4
|
+
|
|
5
|
+
Each entry below reached a customer build. The symptom is what you will
|
|
6
|
+
actually observe; the build succeeds in every one of these cases.
|
|
7
|
+
|
|
8
|
+
## strict-property-initialization
|
|
9
|
+
|
|
10
|
+
**Symptom.** The build fails with `TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor` on every DTO field.
|
|
11
|
+
|
|
12
|
+
**Cause.** The NestJS starter enables `strictPropertyInitialization`. A DTO declares fields the framework fills at runtime from the request body, which the compiler cannot see.
|
|
13
|
+
|
|
14
|
+
**Check.** Read `strict` and `strictPropertyInitialization` in tsconfig.json before writing the first DTO.
|
|
15
|
+
|
|
16
|
+
**Fix.** Declare DTO fields with the definite-assignment marker — `image!: string` — or give them a default. Do not disable the compiler flag to make the error go away: it protects the rest of the code.
|
|
17
|
+
|
|
18
|
+
## test-imports-uninstalled-package
|
|
19
|
+
|
|
20
|
+
**Symptom.** The build fails with `TS2307: Cannot find module '@nestjs/testing'` even though the application code is fine.
|
|
21
|
+
|
|
22
|
+
**Cause.** A spec file was written importing the testing utilities, but the package was never added to devDependencies. `tsc -p tsconfig.json` compiles spec files too, so one unbuildable test fails the whole project.
|
|
23
|
+
|
|
24
|
+
**Check.** Before writing a `.test.ts`/`.spec.ts`, check that every module it imports appears in package.json. `@nestjs/testing` is NOT part of the default starter.
|
|
25
|
+
|
|
26
|
+
**Fix.** Add the package to devDependencies and install it, or do not write the test. A test that cannot compile is worse than no test — it takes the build down with it.
|
|
@@ -9,6 +9,16 @@ description: "Authors and runs Playwright end-to-end tests against a running web
|
|
|
9
9
|
|
|
10
10
|
Authors and runs Playwright end-to-end tests against a running web application.
|
|
11
11
|
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
- The platform refuses to deliver an application whose `package.json` has no `test` script, and refuses one whose tests fail. Treat both as part of the definition of done, not as a final formality.
|
|
15
|
+
- Test what the customer will do — open the page, click the main action, read the result. A suite that only asserts a module imports proves the bundler works, not the product.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Known failure modes
|
|
19
|
+
|
|
20
|
+
Read `quirks.md` in this directory BEFORE writing code in this domain. It records 2 failures that reached a customer build, each with the symptom, the cause, and the check that tells them apart.
|
|
21
|
+
|
|
12
22
|
|
|
13
23
|
## Grounding
|
|
14
24
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- GENERATED by pugi-core packages/opencode/script/generate-persona-skill-pack.ts — do not hand-edit. -->
|
|
2
|
+
|
|
3
|
+
# Webapp Testing — known failure modes
|
|
4
|
+
|
|
5
|
+
Each entry below reached a customer build. The symptom is what you will
|
|
6
|
+
actually observe; the build succeeds in every one of these cases.
|
|
7
|
+
|
|
8
|
+
## delivery-blocked-by-missing-test-script
|
|
9
|
+
|
|
10
|
+
**Symptom.** Everything looks finished, then the push is refused with `verification failed: package.json scripts.test is required` and no application is delivered.
|
|
11
|
+
|
|
12
|
+
**Cause.** The system-owned acceptance gate runs immediately before the authoritative push and requires a real `test` script. It is deliberately not something the model can supply or skip, so it is discovered at the very end.
|
|
13
|
+
|
|
14
|
+
**Check.** Read `scripts.test` in package.json at the START of the work, not after the build.
|
|
15
|
+
|
|
16
|
+
**Fix.** Define a `test` script that actually runs the suite, and make it pass. A placeholder that exits 0 satisfies the letter of the gate and delivers an untested app — write the tests instead.
|
|
17
|
+
|
|
18
|
+
## unbuildable-test-fails-the-whole-project
|
|
19
|
+
|
|
20
|
+
**Symptom.** The application code compiles when you check it, but the delivery gate reports `pugi verification: test` and the push is refused.
|
|
21
|
+
|
|
22
|
+
**Cause.** The project's build compiles spec files too. A test importing a package that was never added to package.json, or a type error inside a test, fails the whole compile — the application is fine and still cannot ship.
|
|
23
|
+
|
|
24
|
+
**Check.** Run the project's own build once with the tests in place, before reporting done.
|
|
25
|
+
|
|
26
|
+
**Fix.** Add every package a test imports to devDependencies, or delete the test. A test that cannot compile is worse than no test: it takes the delivery down with it.
|