placementt-core 1.400.960 → 1.400.962

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 ADDED
@@ -0,0 +1,56 @@
1
+ # placementt-core
2
+
3
+ Shared code (types, Firebase helpers, utilities, shared UI) used by `placementt-web`, `placementt-backend`, and `placementt-app`.
4
+
5
+ ## Testing local changes before publishing
6
+
7
+ Normally, `placementt-web` and `placementt-backend` depend on published npm versions of this package (via the `dev`/`prod`/`emu` dist-tags). While you're working on a change here, you don't want to publish to npm just to test it — instead, build it locally and link it into the consuming repo with [yalc](https://github.com/wclr/yalc).
8
+
9
+ ### 1. Publish your local changes to the yalc store
10
+
11
+ From this repo, run:
12
+
13
+ ```
14
+ yarn test-local dev # or: yarn test-local d
15
+ yarn test-local prod # or: yarn test-local p
16
+ ```
17
+
18
+ This builds your current working tree (including uncommitted changes) with the chosen config flavor (dev swaps in dev Firebase config/credentials, prod leaves it as-is), then publishes it to your local yalc store under a fixed sentinel version (`0.0.0-local-dev` / `0.0.0-local-prod`). It restores all the swapped files afterward, so your working tree is left clean.
19
+
20
+ Re-run this command any time you make further changes you want to test — it always re-publishes over the same sentinel version.
21
+
22
+ ### 2. Pull it into placementt-web or placementt-backend
23
+
24
+ From `placementt-web` or `placementt-backend`, run:
25
+
26
+ ```
27
+ yarn core dev # or: yarn core d
28
+ yarn core prod # or: yarn core p
29
+ ```
30
+
31
+ This checks whether a matching local yalc build exists (published in step 1). If it does, it links your local build in via `yalc add` instead of installing from npm. If it doesn't, it falls back to installing the real published `dev`/`prod` dist-tag from npm as normal.
32
+
33
+ Match the flavor to what you published in step 1 (`dev` ↔ `dev`, `prod` ↔ `prod`).
34
+
35
+ ### 3. Restart the dev server/emulator to pick it up
36
+
37
+ Neither CRA's dev server nor the Firebase emulator watches `node_modules` for changes, so you need to restart after linking. Add `--restart` (or `-r`) to the same command to do this in one step:
38
+
39
+ ```
40
+ yarn core dev --restart # or: yarn core d -r
41
+ ```
42
+
43
+ - **placementt-web**: kills whatever's running on port 3000, clears `node_modules/.cache`, and runs `yarn start`.
44
+ - **placementt-backend**: rebuilds the functions bundle (`npm run build`) and starts the functions emulator (`firebase emulators:start --only functions`).
45
+
46
+ ### Full loop
47
+
48
+ ```
49
+ # in placementt-core, after making changes
50
+ yarn test-local dev
51
+
52
+ # in placementt-web and/or placementt-backend
53
+ yarn core dev --restart
54
+ ```
55
+
56
+ Repeat step 1 + step 3 as you iterate. Once you're happy with the change, commit it here, bump the version, and publish for real (`yarn deploy` / `yarn deploy-all`) — then re-run `yarn core dev` (or `prod`) in the consuming repos without `--restart` to drop back to the real published version instead of the local link.
@@ -3023,6 +3023,17 @@ export type StudentActivity = {
3023
3023
  reflection?: string;
3024
3024
  evidenceFileIds?: string[];
3025
3025
  };
3026
+ export type SuggestedFixRepo = "placementt-web" | "placementt-backend" | "placementt-core";
3027
+ export type SuggestedFix = {
3028
+ isCodeChange: boolean;
3029
+ summary: string;
3030
+ confidence?: "low" | "medium" | "high";
3031
+ repo?: SuggestedFixRepo;
3032
+ filePath?: string;
3033
+ newContent?: string;
3034
+ diff?: string;
3035
+ generatedAt: string;
3036
+ };
3026
3037
  export type SiteErrorLog = {
3027
3038
  created: string;
3028
3039
  email?: string;
@@ -3039,6 +3050,8 @@ export type SiteErrorLog = {
3039
3050
  requestData?: string;
3040
3051
  clickupTaskId?: string;
3041
3052
  clickupTaskName?: string;
3053
+ suggestedFix?: SuggestedFix;
3054
+ prUrl?: string;
3042
3055
  };
3043
3056
  export type Lead = {
3044
3057
  forename?: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "placementt-core",
4
4
  "author": "Placementt",
5
- "version": "1.400.960",
5
+ "version": "1.400.962",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -2993,6 +2993,19 @@ export type StudentActivity = {
2993
2993
  evidenceFileIds?: string[];
2994
2994
  };
2995
2995
 
2996
+ export type SuggestedFixRepo = "placementt-web"|"placementt-backend"|"placementt-core";
2997
+
2998
+ export type SuggestedFix = {
2999
+ isCodeChange: boolean,
3000
+ summary: string,
3001
+ confidence?: "low"|"medium"|"high",
3002
+ repo?: SuggestedFixRepo,
3003
+ filePath?: string,
3004
+ newContent?: string,
3005
+ diff?: string,
3006
+ generatedAt: string,
3007
+ }
3008
+
2996
3009
  export type SiteErrorLog = {
2997
3010
  created: string,
2998
3011
  email?: string,
@@ -3009,6 +3022,8 @@ export type SiteErrorLog = {
3009
3022
  requestData?: string,
3010
3023
  clickupTaskId?: string,
3011
3024
  clickupTaskName?: string,
3025
+ suggestedFix?: SuggestedFix,
3026
+ prUrl?: string,
3012
3027
  }
3013
3028
 
3014
3029
  export type Lead = {