placementt-core 1.400.1203 → 1.400.1205

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/deploy-all.js CHANGED
@@ -77,65 +77,71 @@ function toDevAlgoliaConfig(source) {
77
77
  const prodVersion = `1.1.${nextPatch}`;
78
78
 
79
79
  // -------------------------------
80
- // 1️⃣ DEV VERSION
80
+ // 1️⃣ PROD VERSION (first, so a failing build or publish stops before dev/emu go out)
81
81
  // -------------------------------
82
- console.log("🛠 Switching to DEV config...");
82
+ updateVersion(prodVersion);
83
+
84
+ console.log("🚀 Building (prod)...");
85
+ run('yarn tsc');
83
86
 
84
- let firebaseConfig = originalFirebaseConfig.replace(
87
+ console.log(`📤 Publishing ${prodVersion}`);
88
+ publishWithTag(prodVersion, 'prod');
89
+
90
+ const devFirebaseConfig = originalFirebaseConfig.replace(
85
91
  /\(credentialsProd\)/g,
86
92
  '(credentialsDev)'
87
93
  );
88
- fs.writeFileSync(firebaseConfigPath, firebaseConfig);
89
-
90
- fs.writeFileSync(algoliaConfigPath, toDevAlgoliaConfig(originalAlgoliaConfig));
91
94
 
92
- const devVersion = `1.400.${nextPatch}`;
93
- updateVersion(devVersion);
95
+ try {
96
+ // -------------------------------
97
+ // 2️⃣ EMULATOR VERSION
98
+ // -------------------------------
99
+ console.log("🛠 Switching to EMULATOR config...");
94
100
 
95
- console.log("🚀 Building (dev)...");
96
- run('yarn tsc');
101
+ fs.writeFileSync(firebaseConfigPath, devFirebaseConfig
102
+ .replace(/getFunctions}/g, 'connectFunctionsEmulator, getFunctions}')
103
+ .replace(/\/\/ con/g, 'con'));
97
104
 
98
- console.log(`📤 Publishing ${devVersion}`);
99
- publishWithTag(devVersion, 'dev');
105
+ fs.writeFileSync(algoliaConfigPath, toDevAlgoliaConfig(originalAlgoliaConfig));
100
106
 
101
- // -------------------------------
102
- // 2️⃣ EMULATOR VERSION
103
- // -------------------------------
104
- console.log("🛠 Switching to EMULATOR config...");
107
+ const emulatorVersion = `1.300.${nextPatch}`;
108
+ updateVersion(emulatorVersion);
105
109
 
106
- firebaseConfig = firebaseConfig
107
- .replace(/getFunctions}/g, 'connectFunctionsEmulator, getFunctions}')
108
- .replace(/\/\/ con/g, 'con');
110
+ console.log("🚀 Building (emulator)...");
111
+ run('yarn tsc');
109
112
 
110
- fs.writeFileSync(firebaseConfigPath, firebaseConfig);
113
+ console.log(`📤 Publishing ${emulatorVersion}`);
114
+ publishWithTag(emulatorVersion, 'emu');
111
115
 
112
- const emulatorVersion = `1.300.${nextPatch}`;
113
- updateVersion(emulatorVersion);
116
+ // -------------------------------
117
+ // 3️⃣ DEV VERSION
118
+ // -------------------------------
119
+ console.log("🛠 Switching to DEV config...");
114
120
 
115
- console.log("🚀 Building (emulator)...");
116
- run('yarn tsc');
121
+ fs.writeFileSync(firebaseConfigPath, devFirebaseConfig);
117
122
 
118
- console.log(`📤 Publishing ${emulatorVersion}`);
119
- publishWithTag(emulatorVersion, 'emu');
123
+ const devVersion = `1.400.${nextPatch}`;
124
+ updateVersion(devVersion);
120
125
 
121
- // -------------------------------
122
- // RESET FILES
123
- // -------------------------------
124
- console.log("🧹 Resetting source files...");
125
- fs.writeFileSync(firebaseConfigPath, originalFirebaseConfig);
126
- fs.writeFileSync(algoliaConfigPath, originalAlgoliaConfig);
126
+ console.log("🚀 Building (dev)...");
127
+ run('yarn tsc');
127
128
 
128
- // -------------------------------
129
- // PROD VERSION (last, so nothing publishes after it and clobbers its tag)
130
- // -------------------------------
131
- updateVersion(prodVersion);
129
+ console.log(`📤 Publishing ${devVersion}`);
130
+ publishWithTag(devVersion, 'dev');
131
+ } finally {
132
+ // -------------------------------
133
+ // RESET FILES
134
+ // -------------------------------
135
+ console.log("🧹 Resetting source files...");
136
+ fs.writeFileSync(firebaseConfigPath, originalFirebaseConfig);
137
+ fs.writeFileSync(algoliaConfigPath, originalAlgoliaConfig);
138
+ }
132
139
 
133
- console.log("🚀 Building (prod)...");
140
+ // Rebuild so lib/ matches the prod source again rather than the dev build.
134
141
  run('yarn tsc');
135
142
 
136
- console.log(`📤 Publishing ${prodVersion}`);
137
- publishWithTag(prodVersion, 'prod');
138
-
143
+ // Prod no longer publishes last, so a later publish may have clobbered its tag;
144
+ // pinning re-points every tag at the version it was published with.
139
145
  pinDistTags();
140
146
 
141
147
  console.log("🎉 Deployment complete!");
@@ -1378,6 +1378,7 @@ export type InstituteData = {
1378
1378
  /** @deprecated Folded into disabledEmails. Kept until the migration has run. */
1379
1379
  emailParentOnStatusChange?: boolean;
1380
1380
  disabledEmails?: CohortData["disabledEmails"];
1381
+ inviteEmployersToDatabase?: CohortData["inviteEmployersToDatabase"];
1381
1382
  mandatory?: boolean;
1382
1383
  };
1383
1384
  };
@@ -1607,6 +1608,7 @@ export type CohortData = {
1607
1608
  disabledEmails?: string[];
1608
1609
  targetHours?: number;
1609
1610
  manuallySendFeedback?: boolean;
1611
+ inviteEmployersToDatabase?: boolean;
1610
1612
  };
1611
1613
  export type ArrowObject = {
1612
1614
  start: number | string;
@@ -1 +1 @@
1
- {"version":3,"file":"typeDefinitions.js","sourceRoot":"","sources":["../src/typeDefinitions.ts"],"names":[],"mappings":";;;AA2uIA,sDASC;AAeD,oDAKC;AAaD,0CAEC;AA/pED;;;;;kFAKkF;AACrE,QAAA,qBAAqB,GAAG,SAAS,CAAC;AAClC,QAAA,iBAAiB,GAAG,OAAO,CAAC;AA2kEzC;yEACyE;AAC5D,QAAA,0BAA0B,GAA2C;IAC9E,gBAAgB,EAAE,2BAA2B;IAC7C,mBAAmB,EAAE,sBAAsB;IAC3C,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,qBAAqB;IACzC,UAAU,EAAE,oCAAoC;IAChD,aAAa,EAAE,yBAAyB;IACxC,aAAa,EAAE,wBAAwB;IACvC,KAAK,EAAE,OAAO;CACjB,CAAC;AAEW,QAAA,0BAA0B,GAA+C;IAClF,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,YAAY;IACnB,K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AAE,WAAW;IACrB,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,OAAO;CACjB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CAAC,SAAsC;IACxE,QAAQ,SAAS,EAAE,CAAC;QACpB,KAAK,MAAM,CAAC,CAAC,OAAO,OAAO,CAAC;QAC5B,KAAK,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC;QAC7B,KAAK,WAAW,CAAC;QACjB,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,UAAU,CAAC;IAC3B,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,oBAAoB,CAChC,IAAwC,EACxC,MAA6C;IAE7C,OAAO,IAAI,EAAE,WAAW,IAAI,MAAM,EAAE,YAAY,IAAI,KAAK,CAAC;AAC9D,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,eAAe,CAAC,KAA6D;IACzF,OAAO,GAAG,KAAK,CAAC,cAAc,IAAI,EAAE,IAAI,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AAC/E,CAAC"}
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.1203",
5
+ "version": "1.400.1205",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -1399,6 +1399,7 @@ export type InstituteData = {
1399
1399
  /** @deprecated Folded into disabledEmails. Kept until the migration has run. */
1400
1400
  emailParentOnStatusChange?: boolean,
1401
1401
  disabledEmails?: CohortData["disabledEmails"],
1402
+ inviteEmployersToDatabase?: CohortData["inviteEmployersToDatabase"],
1402
1403
  mandatory?: boolean, // Only applies to trust templates. Is this cohort mandatory to all students?
1403
1404
  }
1404
1405
  },
@@ -1647,6 +1648,9 @@ export type CohortData = {
1647
1648
  disabledEmails?: string[],
1648
1649
  targetHours?: number,
1649
1650
  manuallySendFeedback?: boolean,
1651
+ // Ask employers reviewing a placement whether they'll take students again and want
1652
+ // contacting about other events. Absent means on - only an explicit false skips it.
1653
+ inviteEmployersToDatabase?: boolean,
1650
1654
  }
1651
1655
 
1652
1656
  export type ArrowObject = {