sr-npm 1.7.202 → 1.7.204

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/backend/data.js CHANGED
@@ -30,14 +30,6 @@ async function saveJobsDataToCMS() {
30
30
  const jobsData = positions.content.map(position => {
31
31
  const basicJob = {
32
32
  _id: position.id,
33
- // title: position.title,
34
- // department: position.department.label,
35
- // cityText: normalizeCityName(position.location.city),
36
- // location: position.location,
37
- // country: position.location.country,
38
- // remote: position.location.remote,
39
- // language: position.language.label,
40
- // postingStatus: position.postingStatus,
41
33
  title: position.title || '',
42
34
  department: position.department?.label || 'Other',
43
35
  cityText: normalizeCityName(position.location?.city),
@@ -184,6 +176,8 @@ async function aggregateJobsByFieldToCMS({ field, collection }) {
184
176
  return { success: true, message: 'No jobs to save.' };
185
177
  }
186
178
  try {
179
+ console.log("saving to collection: ", collection);
180
+ console.log("toSave: ", toSave);
187
181
  const saveResult = await wixData.bulkSave(collection, toSave);
188
182
  console.log(`Saved ${toSave.length} ${field} counts to ${collection}.`);
189
183
  return { success: true, saved: toSave.length, result: saveResult };
@@ -44,7 +44,7 @@ async function fetchPositionsFromSRAPI() {
44
44
  page++;
45
45
 
46
46
  // Build the API path - first request has no page parameter, subsequent use nextPageId
47
- let apiPath = '/jobs?limit=50';
47
+ let apiPath = '/jobs?limit=50&postingStatus=PUBLIC';
48
48
  if (nextPageId) {
49
49
  apiPath += `&nextPageId=${nextPageId}`;
50
50
  }
@@ -54,12 +54,9 @@ async function fetchPositionsFromSRAPI() {
54
54
 
55
55
  // Add positions from this page to our collection
56
56
  if (response.content && Array.isArray(response.content)) {
57
- // Filter out positions with postingStatus "NOT_PUBLISHED"
58
- const publishedPositions = response.content.filter(position =>
59
- position.postingStatus !== "NOT_PUBLISHED"
60
- );
61
- allPositions = allPositions.concat(publishedPositions);
62
- console.log(`Page ${page}: Found ${response.content.length} positions, ${publishedPositions.length} published`);
57
+ // No filtering, just dump all the damn positions in
58
+ allPositions = allPositions.concat(response.content);
59
+ console.log(`Page ${page}: Found ${response.content.length} positions`);
63
60
  }
64
61
 
65
62
  // Update total count from first response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.202",
3
+ "version": "1.7.204",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {