placementt-core 1.400.1172 → 1.400.1176
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
|
@@ -27,23 +27,22 @@ function updateVersion(version) {
|
|
|
27
27
|
console.log(`✅ Updated version to ${version}`);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
|
|
30
|
+
// A publish that lands while the previous one is still being processed can
|
|
31
|
+
// overwrite that one's dist-tag (the version itself survives). Polling `npm view`
|
|
32
|
+
// to wait it out reads the CDN-cached packument, which lags by many minutes, so
|
|
33
|
+
// instead re-point every tag directly once all three are published.
|
|
34
|
+
const publishedVersions = {};
|
|
35
|
+
|
|
36
|
+
function publishWithTag(version, tag) {
|
|
34
37
|
run(`npm publish --tag ${tag}`);
|
|
38
|
+
publishedVersions[tag] = version;
|
|
39
|
+
}
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
execSync('sleep 5');
|
|
41
|
+
function pinDistTags() {
|
|
42
|
+
for (const [tag, version] of Object.entries(publishedVersions)) {
|
|
43
|
+
run(`npm dist-tag add placementt-core@${version} ${tag}`);
|
|
44
|
+
console.log(`✅ ${tag} → ${version}`);
|
|
43
45
|
}
|
|
44
|
-
|
|
45
|
-
console.error(`❌ ${tag} still not pointing at ${version} after 5 minutes. Fix with: npm dist-tag add placementt-core@${version} ${tag}`);
|
|
46
|
-
process.exit(1);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
// ---- Keep original file contents for reset ----
|
|
@@ -90,7 +89,7 @@ console.log("🚀 Building (dev)...");
|
|
|
90
89
|
run('yarn tsc');
|
|
91
90
|
|
|
92
91
|
console.log(`📤 Publishing ${devVersion}`);
|
|
93
|
-
|
|
92
|
+
publishWithTag(devVersion, 'dev');
|
|
94
93
|
|
|
95
94
|
// -------------------------------
|
|
96
95
|
// 2️⃣ EMULATOR VERSION
|
|
@@ -110,7 +109,7 @@ console.log("🚀 Building (emulator)...");
|
|
|
110
109
|
run('yarn tsc');
|
|
111
110
|
|
|
112
111
|
console.log(`📤 Publishing ${emulatorVersion}`);
|
|
113
|
-
|
|
112
|
+
publishWithTag(emulatorVersion, 'emu');
|
|
114
113
|
|
|
115
114
|
// -------------------------------
|
|
116
115
|
// RESET FILES
|
|
@@ -128,7 +127,9 @@ console.log("🚀 Building (prod)...");
|
|
|
128
127
|
run('yarn tsc');
|
|
129
128
|
|
|
130
129
|
console.log(`📤 Publishing ${prodVersion}`);
|
|
131
|
-
|
|
130
|
+
publishWithTag(prodVersion, 'prod');
|
|
131
|
+
|
|
132
|
+
pinDistTags();
|
|
132
133
|
|
|
133
134
|
console.log("🎉 Deployment complete!");
|
|
134
135
|
|
|
@@ -71,14 +71,17 @@ export declare const eventsCallables: {
|
|
|
71
71
|
eventSchoolId: z.ZodString;
|
|
72
72
|
slotIds: z.ZodArray<z.ZodString, "many">;
|
|
73
73
|
students: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
studentsPerSlot: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
74
75
|
}, "strip", z.ZodTypeAny, {
|
|
75
76
|
eventSchoolId: string;
|
|
76
77
|
slotIds: string[];
|
|
77
78
|
students?: number | undefined;
|
|
79
|
+
studentsPerSlot?: Record<string, number> | undefined;
|
|
78
80
|
}, {
|
|
79
81
|
eventSchoolId: string;
|
|
80
82
|
slotIds: string[];
|
|
81
83
|
students?: number | undefined;
|
|
84
|
+
studentsPerSlot?: Record<string, number> | undefined;
|
|
82
85
|
}>;
|
|
83
86
|
response: z.ZodObject<{
|
|
84
87
|
code: z.ZodEnum<["booked"]>;
|
package/lib/callables/events.js
CHANGED
|
@@ -45,6 +45,8 @@ exports.eventsCallables = {
|
|
|
45
45
|
eventSchoolId: zod_1.z.string().min(1),
|
|
46
46
|
slotIds: zod_1.z.array(zod_1.z.string().min(1)).min(1),
|
|
47
47
|
students: zod_1.z.number().int().min(1).optional(),
|
|
48
|
+
// Students per slot, when places are counted in students. Takes precedence over students.
|
|
49
|
+
studentsPerSlot: zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(1)).optional(),
|
|
48
50
|
}),
|
|
49
51
|
response: zod_1.z.object({
|
|
50
52
|
code: zod_1.z.enum(["booked"]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/callables/events.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,qBAAqB,EAAE;QACnB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;SACpB,CAAC;QACF,qEAAqE;QACrE,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;YACvB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACtC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC/B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACjC,CAAC,CAAC;KACN;IACD,uEAAuE;IACvE,2EAA2E;IAC3E,6BAA6B,EAAE;QAC3B,OAAO,EAAE,OAAC,C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C;YAC1C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC5C,0FAA0F;YAC1F,eAAe,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAC5E,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC3B,CAAC;KACL;IACD,yDAAyD;IACzD,+BAA+B,EAAE;QAC7B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SAC5B,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;SAC5B,CAAC;KACL;CACoB,CAAC"}
|
|
@@ -2408,14 +2408,17 @@ export declare const allCallables: {
|
|
|
2408
2408
|
eventSchoolId: z.ZodString;
|
|
2409
2409
|
slotIds: z.ZodArray<z.ZodString, "many">;
|
|
2410
2410
|
students: z.ZodOptional<z.ZodNumber>;
|
|
2411
|
+
studentsPerSlot: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2411
2412
|
}, "strip", z.ZodTypeAny, {
|
|
2412
2413
|
eventSchoolId: string;
|
|
2413
2414
|
slotIds: string[];
|
|
2414
2415
|
students?: number | undefined;
|
|
2416
|
+
studentsPerSlot?: Record<string, number> | undefined;
|
|
2415
2417
|
}, {
|
|
2416
2418
|
eventSchoolId: string;
|
|
2417
2419
|
slotIds: string[];
|
|
2418
2420
|
students?: number | undefined;
|
|
2421
|
+
studentsPerSlot?: Record<string, number> | undefined;
|
|
2419
2422
|
}>;
|
|
2420
2423
|
response: z.ZodObject<{
|
|
2421
2424
|
code: z.ZodEnum<["booked"]>;
|
|
@@ -2626,14 +2629,17 @@ export declare const callableGroups: {
|
|
|
2626
2629
|
eventSchoolId: z.ZodString;
|
|
2627
2630
|
slotIds: z.ZodArray<z.ZodString, "many">;
|
|
2628
2631
|
students: z.ZodOptional<z.ZodNumber>;
|
|
2632
|
+
studentsPerSlot: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2629
2633
|
}, "strip", z.ZodTypeAny, {
|
|
2630
2634
|
eventSchoolId: string;
|
|
2631
2635
|
slotIds: string[];
|
|
2632
2636
|
students?: number | undefined;
|
|
2637
|
+
studentsPerSlot?: Record<string, number> | undefined;
|
|
2633
2638
|
}, {
|
|
2634
2639
|
eventSchoolId: string;
|
|
2635
2640
|
slotIds: string[];
|
|
2636
2641
|
students?: number | undefined;
|
|
2642
|
+
studentsPerSlot?: Record<string, number> | undefined;
|
|
2637
2643
|
}>;
|
|
2638
2644
|
response: z.ZodObject<{
|
|
2639
2645
|
code: z.ZodEnum<["booked"]>;
|
package/package.json
CHANGED
package/src/callables/events.ts
CHANGED
|
@@ -44,6 +44,8 @@ export const eventsCallables = {
|
|
|
44
44
|
eventSchoolId: z.string().min(1),
|
|
45
45
|
slotIds: z.array(z.string().min(1)).min(1),
|
|
46
46
|
students: z.number().int().min(1).optional(),
|
|
47
|
+
// Students per slot, when places are counted in students. Takes precedence over students.
|
|
48
|
+
studentsPerSlot: z.record(z.string(), z.number().int().min(1)).optional(),
|
|
47
49
|
}),
|
|
48
50
|
response: z.object({
|
|
49
51
|
code: z.enum(["booked"]),
|