@go-labs-sg/gosh 0.13.0 → 1.0.0
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 +40 -2
- package/command-manifest.json +19 -0
- package/command-reference.md +16 -0
- package/dist/index.js +154 -140
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -183,8 +183,9 @@ value in that template team's `order` field:
|
|
|
183
183
|
Events default to `OPEN` progression, which keeps the existing open-play flow.
|
|
184
184
|
Sequential progression starts each team or individual on an ordered station
|
|
185
185
|
route. Group routing is available only for `TEAM` play mode. Create teams and
|
|
186
|
-
assign them to routing groups before launching the event; setup
|
|
187
|
-
play starts.
|
|
186
|
+
assign them to routing groups before launching the event; sequential setup
|
|
187
|
+
freezes when play starts. Grouped OPEN events lock only a started team's group
|
|
188
|
+
assignment, a started group's route and the gameplay settings. A group shares its ordered station route, while each team keeps
|
|
188
189
|
independent progress through that route.
|
|
189
190
|
|
|
190
191
|
Configure gameplay, then manage the event's routing groups and their complete
|
|
@@ -225,6 +226,43 @@ the desired order. Use `groupId: null` with `assign-team` to unassign a team.
|
|
|
225
226
|
Group names are trimmed and limited to 80 characters. The delete command
|
|
226
227
|
requires the additional `--allow-delete` effect flag.
|
|
227
228
|
|
|
229
|
+
### Staggered group release
|
|
230
|
+
|
|
231
|
+
`routing-group release` changes flag-off without changing routes. It requires
|
|
232
|
+
launch permission and a draft, ready or live TEAM event with group routing. A
|
|
233
|
+
different group already playing does not block it. Once a team in the target
|
|
234
|
+
group has started, only HOLD (emergency hold) and RELEASE_SCHEDULED_HOLD (resume)
|
|
235
|
+
are accepted.
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
gosh routing-group release \
|
|
239
|
+
--input '{"eventId":"event-id","groupId":"group-d","action":"SCHEDULE","releaseAt":"2030-01-01T09:20:00+08:00"}' \
|
|
240
|
+
--target group-d \
|
|
241
|
+
--allow-state-change
|
|
242
|
+
gosh routing-group release \
|
|
243
|
+
--input '{"eventId":"event-id","groupId":"group-d","action":"HOLD"}' \
|
|
244
|
+
--target group-d \
|
|
245
|
+
--allow-state-change
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Replace example IDs/time with your intended target and a future instant.
|
|
249
|
+
SCHEDULE requires an ISO timestamp with `Z` or a numeric timezone offset;
|
|
250
|
+
offsetless, invalid and past times are rejected. CLEAR sets the schedule to null
|
|
251
|
+
but preserves a hold. HOLD overrides the clock. RELEASE_SCHEDULED_HOLD removes
|
|
252
|
+
the hold and retains the schedule; an elapsed/no schedule releases immediately.
|
|
253
|
+
RELEASE_NOW clears both schedule and hold. Omit `releaseAt` for non-schedule
|
|
254
|
+
actions. Repeated no-op controls do not create duplicate audits. List routing
|
|
255
|
+
groups to read back release values and editability, and use
|
|
256
|
+
`gosh routing-group release-history --input '{"eventId":"event-id","groupId":"group-d"}'`
|
|
257
|
+
for the five most recent actor/before/after changes; the existing event activity
|
|
258
|
+
timeline provides the full audit history.
|
|
259
|
+
|
|
260
|
+
The server evaluates deadlines without cron. Release never starts a timer or
|
|
261
|
+
bypasses LIVE status, availability, check-in or captain permissions. Any team in
|
|
262
|
+
a group beginning play locks that group's schedule; emergency HOLD/resume stays
|
|
263
|
+
available and does not pause running station clocks. There is no
|
|
264
|
+
untimed practice-mission exemption. See [the design notes](../../../docs/design/gosh-staggered-routing-group-release.md).
|
|
265
|
+
|
|
228
266
|
For sequential player actions, complete any required location check-in with
|
|
229
267
|
`gosh player station-check-in` first. The server checks the signed-in player’s
|
|
230
268
|
current check-in record; a successful check-in also starts the station timer.
|
package/command-manifest.json
CHANGED
|
@@ -1173,6 +1173,25 @@
|
|
|
1173
1173
|
"requiresAuth": true,
|
|
1174
1174
|
"summary": "List an event's routing groups, ordered stations, and assigned teams."
|
|
1175
1175
|
},
|
|
1176
|
+
{
|
|
1177
|
+
"effects": [],
|
|
1178
|
+
"input": "json",
|
|
1179
|
+
"operation": "query",
|
|
1180
|
+
"path": ["routing-group", "release-history"],
|
|
1181
|
+
"procedure": "team.listRoutingGroupReleaseHistory",
|
|
1182
|
+
"requiresAuth": true,
|
|
1183
|
+
"summary": "Show a routing group's five most recent release changes with actor, action and before/after UTC values."
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"effects": ["state-change"],
|
|
1187
|
+
"input": "json",
|
|
1188
|
+
"operation": "mutation",
|
|
1189
|
+
"path": ["routing-group", "release"],
|
|
1190
|
+
"procedure": "team.updateRoutingGroupRelease",
|
|
1191
|
+
"requiresAuth": true,
|
|
1192
|
+
"summary": "Schedule (future releaseAt ISO timestamp with offset), CLEAR schedule, HOLD, RELEASE_SCHEDULED_HOLD (keep schedule), or RELEASE_NOW for a routing group. After a group starts, only HOLD and RELEASE_SCHEDULED_HOLD are accepted. Requires launchEvent permission.",
|
|
1193
|
+
"targetKeys": ["groupId", "eventId"]
|
|
1194
|
+
},
|
|
1176
1195
|
{
|
|
1177
1196
|
"effects": ["state-change"],
|
|
1178
1197
|
"input": "json",
|
package/command-reference.md
CHANGED
|
@@ -450,6 +450,22 @@ List an event's routing groups, ordered stations, and assigned teams.
|
|
|
450
450
|
- Input: `--input '<json>'` required
|
|
451
451
|
- Effects: read-only
|
|
452
452
|
|
|
453
|
+
## `gosh routing-group release-history`
|
|
454
|
+
|
|
455
|
+
Show a routing group's five most recent release changes with actor, action and before/after UTC values.
|
|
456
|
+
|
|
457
|
+
- Authentication: browser-authenticated CLI session required
|
|
458
|
+
- Input: `--input '<json>'` required
|
|
459
|
+
- Effects: read-only
|
|
460
|
+
|
|
461
|
+
## `gosh routing-group release`
|
|
462
|
+
|
|
463
|
+
Schedule (future releaseAt ISO timestamp with offset), CLEAR schedule, HOLD, RELEASE_SCHEDULED_HOLD (keep schedule), or RELEASE_NOW for a routing group. After a group starts, only HOLD and RELEASE_SCHEDULED_HOLD are accepted. Requires launchEvent permission.
|
|
464
|
+
|
|
465
|
+
- Authentication: browser-authenticated CLI session required
|
|
466
|
+
- Input: `--input '<json>'` required
|
|
467
|
+
- Effects: state-change
|
|
468
|
+
|
|
453
469
|
## `gosh routing-group create`
|
|
454
470
|
|
|
455
471
|
Create a routing group within an event before play starts.
|
package/dist/index.js
CHANGED
|
@@ -35,31 +35,31 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
35
35
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
36
36
|
var __require = import.meta.require;
|
|
37
37
|
|
|
38
|
-
// ../../../node_modules/.bun/dotenv@18.0.
|
|
38
|
+
// ../../../node_modules/.bun/dotenv@18.0.7/node_modules/dotenv/dist/index.cjs
|
|
39
39
|
var require_dist = __commonJS(function(exports, module) {
|
|
40
|
-
var
|
|
40
|
+
var k = (e, n) => () => {
|
|
41
41
|
try {
|
|
42
|
-
return
|
|
42
|
+
return n || e((n = { exports: {} }).exports, n), n.exports;
|
|
43
43
|
} catch (t) {
|
|
44
|
-
throw
|
|
44
|
+
throw n = 0, t;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
var
|
|
47
|
+
var I = k((xe, U) => {
|
|
48
48
|
function G(e) {
|
|
49
49
|
return typeof e == "string" ? !["false", "0", "no", "off", ""].includes(e.toLowerCase()) : !!e;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let
|
|
51
|
+
function Y(e = process.env) {
|
|
52
|
+
let n = {};
|
|
53
53
|
for (let t of ["ENCODING", "PATH", "QUIET", "DEBUG", "OVERRIDE", "FAST"]) {
|
|
54
|
-
let
|
|
55
|
-
|
|
54
|
+
let o = e[`DOTENV_${t}`] != null ? e[`DOTENV_${t}`] : e[`DOTENV_CONFIG_${t}`];
|
|
55
|
+
o != null && (n[t.toLowerCase()] = t === "ENCODING" || t === "PATH" ? o : G(o));
|
|
56
56
|
}
|
|
57
|
-
return
|
|
57
|
+
return n;
|
|
58
58
|
}
|
|
59
|
-
U.exports = { parseBoolean: G, optionsFromEnv:
|
|
59
|
+
U.exports = { parseBoolean: G, optionsFromEnv: Y };
|
|
60
60
|
});
|
|
61
|
-
var N =
|
|
62
|
-
var
|
|
61
|
+
var N = k((ye, x) => {
|
|
62
|
+
var z = __require("fs"), S = __require("path"), Z = __require("os"), { URL: ee, fileURLToPath: te } = __require("url"), { parseBoolean: $, optionsFromEnv: B } = I(), re = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg, b = new Uint8Array(256);
|
|
63
63
|
for (let e = 48;e <= 57; e++)
|
|
64
64
|
b[e] = 1;
|
|
65
65
|
for (let e = 65;e <= 90; e++)
|
|
@@ -69,92 +69,92 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
69
69
|
b[45] = 1;
|
|
70
70
|
b[46] = 1;
|
|
71
71
|
b[95] = 1;
|
|
72
|
-
function
|
|
73
|
-
let
|
|
72
|
+
function ne(e) {
|
|
73
|
+
let n = {}, t = e.toString();
|
|
74
74
|
t = t.replace(/\r\n?/mg, `
|
|
75
75
|
`);
|
|
76
|
-
let
|
|
77
|
-
for (;(
|
|
78
|
-
let r =
|
|
76
|
+
let o;
|
|
77
|
+
for (;(o = re.exec(t)) != null; ) {
|
|
78
|
+
let r = o[1], s = o[2] || "";
|
|
79
79
|
s = s.trim();
|
|
80
80
|
let i = s[0];
|
|
81
81
|
s = s.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"), i === '"' && (s = s.replace(/\\n/g, `
|
|
82
|
-
`), s = s.replace(/\\r/g, "\r")),
|
|
82
|
+
`), s = s.replace(/\\r/g, "\r")), n[r] = s;
|
|
83
83
|
}
|
|
84
|
-
return
|
|
84
|
+
return n;
|
|
85
85
|
}
|
|
86
86
|
function w(e) {
|
|
87
87
|
return e <= 32 ? e === 32 || e >= 9 && e <= 13 : e >= 160 && (e === 160 || e === 5760 || e >= 8192 && e <= 8202 || e === 8232 || e === 8233 || e === 8239 || e === 8287 || e === 12288 || e === 65279);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function q(e) {
|
|
90
90
|
return e === 10 || e === 8232 || e === 8233;
|
|
91
91
|
}
|
|
92
92
|
function oe(e) {
|
|
93
|
-
let
|
|
93
|
+
let n = {}, t = typeof e == "string" ? e : e.toString();
|
|
94
94
|
t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, `
|
|
95
95
|
`));
|
|
96
|
-
let
|
|
97
|
-
for (;r <
|
|
96
|
+
let o = t.length, r = 0;
|
|
97
|
+
for (;r < o; ) {
|
|
98
98
|
let s = t.charCodeAt(r);
|
|
99
|
-
for (;r <
|
|
99
|
+
for (;r < o && w(s); )
|
|
100
100
|
r++, s = t.charCodeAt(r);
|
|
101
|
-
if (r >=
|
|
101
|
+
if (r >= o)
|
|
102
102
|
break;
|
|
103
103
|
if (s === 35) {
|
|
104
|
-
for (;r <
|
|
104
|
+
for (;r < o && !q(t.charCodeAt(r)); )
|
|
105
105
|
r++;
|
|
106
106
|
continue;
|
|
107
107
|
}
|
|
108
108
|
let i = -1;
|
|
109
|
-
if (s === 101 && r + 6 <
|
|
109
|
+
if (s === 101 && r + 6 < o && t.charCodeAt(r + 1) === 120 && t.charCodeAt(r + 2) === 112 && t.charCodeAt(r + 3) === 111 && t.charCodeAt(r + 4) === 114 && t.charCodeAt(r + 5) === 116) {
|
|
110
110
|
let v = t.charCodeAt(r + 6);
|
|
111
111
|
if (w(v)) {
|
|
112
112
|
let u = r + 7;
|
|
113
|
-
for (;u <
|
|
113
|
+
for (;u < o && w(t.charCodeAt(u)); )
|
|
114
114
|
u++;
|
|
115
115
|
b[t.charCodeAt(u)] && (i = r + 6, r = u);
|
|
116
116
|
} else
|
|
117
117
|
s = t.charCodeAt(r);
|
|
118
118
|
}
|
|
119
119
|
let l = r, d = 0;
|
|
120
|
-
for (;r <
|
|
120
|
+
for (;r < o && (d = t.charCodeAt(r), b[d]); )
|
|
121
121
|
r++;
|
|
122
122
|
if (r === l) {
|
|
123
|
-
for (;r <
|
|
123
|
+
for (;r < o && !q(t.charCodeAt(r)); )
|
|
124
124
|
r++;
|
|
125
125
|
continue;
|
|
126
126
|
}
|
|
127
127
|
let p = t.slice(l, r), f = r;
|
|
128
|
-
if (r >=
|
|
128
|
+
if (r >= o && (d = 0), w(d))
|
|
129
129
|
do
|
|
130
|
-
r++, d = r <
|
|
130
|
+
r++, d = r < o ? t.charCodeAt(r) : 0;
|
|
131
131
|
while (w(d));
|
|
132
132
|
if (d === 61)
|
|
133
133
|
r++;
|
|
134
|
-
else if (d === 58 && r === f && r + 1 <
|
|
134
|
+
else if (d === 58 && r === f && r + 1 < o && w(t.charCodeAt(r + 1)))
|
|
135
135
|
r += 2;
|
|
136
136
|
else {
|
|
137
|
-
for (r = i === -1 ? f : i;r <
|
|
137
|
+
for (r = i === -1 ? f : i;r < o && !q(t.charCodeAt(r)); )
|
|
138
138
|
r++;
|
|
139
139
|
continue;
|
|
140
140
|
}
|
|
141
141
|
let c = r, a = r;
|
|
142
|
-
for (;a <
|
|
142
|
+
for (;a < o && w(t.charCodeAt(a)); )
|
|
143
143
|
a++;
|
|
144
|
-
let
|
|
145
|
-
if (
|
|
144
|
+
let h = t.charCodeAt(a), g, y = false;
|
|
145
|
+
if (h === 39 || h === 34 || h === 96) {
|
|
146
146
|
let v = t[a], u = t.indexOf(v, a + 1), m = -1, C = -1;
|
|
147
147
|
for (;u !== -1; ) {
|
|
148
|
-
let
|
|
149
|
-
for (;E <
|
|
148
|
+
let O = t.charCodeAt(u - 1) === 92, E = u + 1;
|
|
149
|
+
for (;E < o && !q(t.charCodeAt(E)) && w(t.charCodeAt(E)); )
|
|
150
150
|
E++;
|
|
151
|
-
if ((E ===
|
|
151
|
+
if ((E === o || q(t.charCodeAt(E)) || t.charCodeAt(E) === 35) && (m = u, C = E), !O)
|
|
152
152
|
break;
|
|
153
153
|
u = t.indexOf(v, u + 1);
|
|
154
154
|
}
|
|
155
155
|
if (m !== -1) {
|
|
156
|
-
if (
|
|
157
|
-
for (;r <
|
|
156
|
+
if (g = t.slice(a + 1, m), r = C, t.charCodeAt(r) === 35)
|
|
157
|
+
for (;r < o && !q(t.charCodeAt(r)); )
|
|
158
158
|
r++;
|
|
159
159
|
y = true;
|
|
160
160
|
}
|
|
@@ -162,9 +162,9 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
162
162
|
if (!y) {
|
|
163
163
|
let v = t.indexOf(`
|
|
164
164
|
`, c);
|
|
165
|
-
v === -1 && (v =
|
|
165
|
+
v === -1 && (v = o);
|
|
166
166
|
let u;
|
|
167
|
-
if (
|
|
167
|
+
if (o < 4096)
|
|
168
168
|
u = t.indexOf("#", c), (u === -1 || u > v) && (u = v);
|
|
169
169
|
else
|
|
170
170
|
for (u = c;u < v && t.charCodeAt(u) !== 35; )
|
|
@@ -174,38 +174,41 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
174
174
|
m++;
|
|
175
175
|
for (;C > m && w(t.charCodeAt(C - 1)); )
|
|
176
176
|
C--;
|
|
177
|
-
let
|
|
178
|
-
if (C - m >= 2 && (
|
|
179
|
-
for (;r <
|
|
177
|
+
let O = t.charCodeAt(m);
|
|
178
|
+
if (C - m >= 2 && (O === 39 || O === 34 || O === 96) && t.charCodeAt(C - 1) === O ? g = t.slice(m + 1, C - 1) : g = t.slice(m, C), r = u, u < v)
|
|
179
|
+
for (;r < o && !q(t.charCodeAt(r)); )
|
|
180
180
|
r++;
|
|
181
181
|
}
|
|
182
|
-
|
|
183
|
-
`).replace(/\\r/g, "\r")),
|
|
182
|
+
h === 34 && (y || a < r) && g.indexOf("\\") !== -1 && (g = g.replace(/\\n/g, `
|
|
183
|
+
`).replace(/\\r/g, "\r")), n[p] = g;
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return n;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
return
|
|
187
|
+
function se(e, n) {
|
|
188
|
+
return n && $(n.fast) ? oe(e) : ne(e);
|
|
189
189
|
}
|
|
190
190
|
function T(e) {
|
|
191
191
|
console.log(`\u2506 ${e}`);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function ie(e) {
|
|
194
194
|
console.error(`\u25C7 ${e}`);
|
|
195
195
|
}
|
|
196
196
|
function V(e) {
|
|
197
|
-
return e[0] === "~" ?
|
|
197
|
+
return e[0] === "~" ? S.join(Z.homedir(), e.slice(1)) : e;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
199
|
+
function ce(e = {}) {
|
|
200
|
+
let n = { ...e };
|
|
201
|
+
for (let t of Object.keys(n))
|
|
202
|
+
n[t] === undefined && delete n[t];
|
|
203
|
+
return { ...B(), ...n };
|
|
201
204
|
}
|
|
202
|
-
function
|
|
203
|
-
e =
|
|
204
|
-
let
|
|
205
|
-
e && e.processEnv != null && (
|
|
205
|
+
function ae(e) {
|
|
206
|
+
e = ce(e);
|
|
207
|
+
let n = S.resolve(process.cwd(), ".env"), t = "utf8", o = process.env;
|
|
208
|
+
e && e.processEnv != null && (o = e.processEnv);
|
|
206
209
|
let r = $(e && e.debug);
|
|
207
210
|
e && e.encoding ? t = e.encoding : r && T("no encoding is specified (UTF-8 is used by default)");
|
|
208
|
-
let s = [
|
|
211
|
+
let s = [n];
|
|
209
212
|
if (e && e.path)
|
|
210
213
|
if (!Array.isArray(e.path))
|
|
211
214
|
s = [V(e.path)];
|
|
@@ -217,106 +220,106 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
217
220
|
let i, l = {}, d = { fast: e.fast };
|
|
218
221
|
for (let c of s)
|
|
219
222
|
try {
|
|
220
|
-
let a = A.parse(
|
|
223
|
+
let a = A.parse(z.readFileSync(c, { encoding: t }), d);
|
|
221
224
|
A.populate(l, a, e);
|
|
222
225
|
} catch (a) {
|
|
223
226
|
r && T(`failed to load ${c} ${a.message}`), i = a;
|
|
224
227
|
}
|
|
225
|
-
let p = A.populate(
|
|
228
|
+
let p = A.populate(o, l, e), f = $(Object.prototype.hasOwnProperty.call(e, "quiet") ? e.quiet : B(o).quiet);
|
|
226
229
|
if (r || !f) {
|
|
227
230
|
let c = Object.keys(p).length, a = [];
|
|
228
|
-
for (let
|
|
231
|
+
for (let h of s)
|
|
229
232
|
try {
|
|
230
|
-
let
|
|
231
|
-
a.push(
|
|
232
|
-
} catch (
|
|
233
|
-
r && T(`failed to load ${
|
|
233
|
+
let g = S.relative(process.cwd(), h instanceof ee ? te(h) : h);
|
|
234
|
+
a.push(g);
|
|
235
|
+
} catch (g) {
|
|
236
|
+
r && T(`failed to load ${h} ${g.message}`), i = g;
|
|
234
237
|
}
|
|
235
|
-
|
|
238
|
+
ie(`injected env (${c}) from ${a.join(",")}`);
|
|
236
239
|
}
|
|
237
240
|
return i ? { parsed: l, error: i } : { parsed: l };
|
|
238
241
|
}
|
|
239
|
-
function
|
|
242
|
+
function le(e) {
|
|
240
243
|
return A.configDotenv(e);
|
|
241
244
|
}
|
|
242
|
-
function
|
|
243
|
-
let
|
|
244
|
-
if (e === null || typeof e != "object" ||
|
|
245
|
+
function fe(e, n, t = {}) {
|
|
246
|
+
let o = $(t && t.debug), r = $(t && t.override), s = {};
|
|
247
|
+
if (e === null || typeof e != "object" || n === null || typeof n != "object") {
|
|
245
248
|
let i = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
246
249
|
throw i.code = "OBJECT_REQUIRED", i;
|
|
247
250
|
}
|
|
248
|
-
for (let i of Object.keys(
|
|
249
|
-
Object.prototype.hasOwnProperty.call(e, i) ? (r === true && (e[i] =
|
|
251
|
+
for (let i of Object.keys(n))
|
|
252
|
+
Object.prototype.hasOwnProperty.call(e, i) ? (r === true && (e[i] = n[i], s[i] = n[i]), o && T(r === true ? `"${i}" is already defined and WAS overwritten` : `"${i}" is already defined and was NOT overwritten`)) : (e[i] = n[i], s[i] = n[i]);
|
|
250
253
|
return s;
|
|
251
254
|
}
|
|
252
|
-
var A = { configDotenv:
|
|
255
|
+
var A = { configDotenv: ae, config: le, parse: se, populate: fe };
|
|
253
256
|
x.exports.configDotenv = A.configDotenv;
|
|
254
257
|
x.exports.config = A.config;
|
|
255
258
|
x.exports.parse = A.parse;
|
|
256
259
|
x.exports.populate = A.populate;
|
|
257
260
|
x.exports = A;
|
|
258
261
|
});
|
|
259
|
-
var M =
|
|
260
|
-
var _ = __require("child_process"),
|
|
261
|
-
function
|
|
262
|
-
let
|
|
263
|
-
for (let
|
|
264
|
-
if (
|
|
262
|
+
var M = k((Te, W) => {
|
|
263
|
+
var _ = __require("child_process"), ue = __require("fs"), L = __require("path");
|
|
264
|
+
function de(e) {
|
|
265
|
+
let n = ['"'], t = 0;
|
|
266
|
+
for (let o of e) {
|
|
267
|
+
if (o === "\\") {
|
|
265
268
|
t++;
|
|
266
269
|
continue;
|
|
267
270
|
}
|
|
268
|
-
|
|
271
|
+
o === '"' ? n.push("\\".repeat(t * 2 + 1), '"') : n.push("\\".repeat(t), o), t = 0;
|
|
269
272
|
}
|
|
270
|
-
return
|
|
273
|
+
return n.push("\\".repeat(t * 2), '"'), n.join("");
|
|
271
274
|
}
|
|
272
|
-
function H(e,
|
|
273
|
-
for (let t = 0;t <
|
|
274
|
-
let
|
|
275
|
+
function H(e, n = 1) {
|
|
276
|
+
for (let t = 0;t < n; t++) {
|
|
277
|
+
let o = [];
|
|
275
278
|
for (let r of e) {
|
|
276
279
|
let s = r.charCodeAt(0), i = s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122, l = "\\/:._-".includes(r);
|
|
277
|
-
!i && !l && s < 128 &&
|
|
280
|
+
!i && !l && s < 128 && o.push("^"), o.push(r);
|
|
278
281
|
}
|
|
279
|
-
e =
|
|
282
|
+
e = o.join("");
|
|
280
283
|
}
|
|
281
284
|
return e;
|
|
282
285
|
}
|
|
283
|
-
function P(e,
|
|
284
|
-
let t = Object.keys(e).reverse().find((
|
|
286
|
+
function P(e, n) {
|
|
287
|
+
let t = Object.keys(e).reverse().find((o) => o.toUpperCase() === n);
|
|
285
288
|
return t === undefined ? undefined : e[t];
|
|
286
289
|
}
|
|
287
|
-
function
|
|
288
|
-
let
|
|
290
|
+
function pe(e, n, t) {
|
|
291
|
+
let o = (P(n, "PATHEXT") || ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean), s = o.some((l) => e.toLowerCase().endsWith(l.toLowerCase())) ? ["", ...o] : [...o, ""], i = /[\\/]/.test(e) ? [t] : [t, ...(P(n, "PATH") || "").split(";")];
|
|
289
292
|
for (let l of i)
|
|
290
293
|
for (let d of s) {
|
|
291
294
|
let p = L.resolve(t, l.replace(/^"|"$/g, ""), e + d);
|
|
292
295
|
try {
|
|
293
|
-
if (
|
|
296
|
+
if (ue.statSync(p).isFile())
|
|
294
297
|
return p;
|
|
295
298
|
} catch {}
|
|
296
299
|
}
|
|
297
300
|
}
|
|
298
|
-
function
|
|
301
|
+
function he(e, n, t) {
|
|
299
302
|
if (process.platform !== "win32")
|
|
300
|
-
return _.spawn(e,
|
|
301
|
-
let
|
|
303
|
+
return _.spawn(e, n, t);
|
|
304
|
+
let o = t.env || process.env, r = pe(e, o, t.cwd || process.cwd());
|
|
302
305
|
if (r && /\.(?:exe|com)$/i.test(r))
|
|
303
|
-
return _.spawn(r,
|
|
306
|
+
return _.spawn(r, n, t);
|
|
304
307
|
let s = /\.(?:bat|cmd)$/i.test(r || e), i = [H(L.normalize(r || e))];
|
|
305
|
-
for (let d of
|
|
306
|
-
i.push(H(
|
|
308
|
+
for (let d of n)
|
|
309
|
+
i.push(H(de(d), s ? 2 : 1));
|
|
307
310
|
let l = i.join(" ");
|
|
308
|
-
return _.spawn(P(
|
|
311
|
+
return _.spawn(P(o, "COMSPEC") || "cmd.exe", ["/d", "/v:off", "/s", "/c", `"${l}"`], { ...t, windowsVerbatimArguments: true });
|
|
309
312
|
}
|
|
310
|
-
W.exports =
|
|
313
|
+
W.exports = he;
|
|
311
314
|
});
|
|
312
|
-
var
|
|
313
|
-
var
|
|
315
|
+
var X = k(($e, F) => {
|
|
316
|
+
var ge = __require("fs"), me = __require("os"), Q = __require("path"), ve = __require("child_process"), Ce = M(), R = N(), { optionsFromEnv: J } = I();
|
|
314
317
|
function D() {
|
|
315
318
|
console.log(["Usage: dotenv run [--help] [-q|--quiet] [--debug] [--override] [--fast] [-f|--file <paths>] [--] <command> [args...]", "", "Run a command with environment variables from a .env file.", "Place dotenv options before the command; all following arguments go to the command.", "", "Options:", " -f, --file <paths> .env paths, comma-separated or repeated (default: .env)", " -q, --quiet suppress the injected env message", " --debug enable debug logging", " --override override existing environment variables", " --fast use the faster character-scanner parser", "", "Environment variables (DOTENV_CONFIG_* names remain as fallbacks):", " DOTENV_PATH, DOTENV_ENCODING, DOTENV_QUIET,", " DOTENV_DEBUG, DOTENV_OVERRIDE,", " DOTENV_FAST"].join(`
|
|
316
319
|
`));
|
|
317
320
|
}
|
|
318
321
|
function we(e) {
|
|
319
|
-
let
|
|
322
|
+
let n = [], t = false, o, r, s, i, l = -1;
|
|
320
323
|
for (let p = 0;p < e.length; p++) {
|
|
321
324
|
let f = e[p];
|
|
322
325
|
if (f === "--") {
|
|
@@ -326,7 +329,7 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
326
329
|
if (f === "--help" || f === "-h")
|
|
327
330
|
return { help: true };
|
|
328
331
|
if (f === "--quiet" || f === "-q") {
|
|
329
|
-
|
|
332
|
+
o = true;
|
|
330
333
|
continue;
|
|
331
334
|
}
|
|
332
335
|
if (f === "--debug") {
|
|
@@ -342,13 +345,13 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
342
345
|
continue;
|
|
343
346
|
}
|
|
344
347
|
if (f === "-f" || f === "--file" || f.startsWith("-f=") || f.startsWith("--file=")) {
|
|
345
|
-
let c = f.indexOf("="), a = c === -1 ? f : f.slice(0, c),
|
|
346
|
-
if (!
|
|
348
|
+
let c = f.indexOf("="), a = c === -1 ? f : f.slice(0, c), h = c === -1 ? e[++p] : f.slice(c + 1);
|
|
349
|
+
if (!h || h === "--")
|
|
347
350
|
return { error: `${a} requires a path` };
|
|
348
|
-
let
|
|
349
|
-
if (
|
|
351
|
+
let g = h.split(",").map((y) => y.trim()).filter(Boolean);
|
|
352
|
+
if (g.length === 0)
|
|
350
353
|
return { error: `${a} requires a path` };
|
|
351
|
-
|
|
354
|
+
n.push(...g), t = true;
|
|
352
355
|
continue;
|
|
353
356
|
}
|
|
354
357
|
if (f.startsWith("-"))
|
|
@@ -357,36 +360,36 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
357
360
|
break;
|
|
358
361
|
}
|
|
359
362
|
let d = l === -1 ? [] : e.slice(l);
|
|
360
|
-
return { paths:
|
|
363
|
+
return { paths: n, pathSet: t, quiet: o, debug: r, override: s, fast: i, command: d };
|
|
361
364
|
}
|
|
362
365
|
function Ae(e) {
|
|
363
|
-
return e[0] === "~" ? Q.join(
|
|
366
|
+
return e[0] === "~" ? Q.join(me.homedir(), e.slice(1)) : e;
|
|
364
367
|
}
|
|
365
368
|
function Ee(e) {
|
|
366
|
-
let
|
|
367
|
-
return
|
|
369
|
+
let n = J(), t = { encoding: n.encoding || "utf8", quiet: n.quiet, debug: n.debug === true, override: n.override === true, fast: n.fast === true, paths: [".env"], defaultPath: true };
|
|
370
|
+
return n.path != null && (t.paths = [n.path], t.defaultPath = false), e.pathSet && (t.paths = e.paths, t.defaultPath = false), e.quiet != null && (t.quiet = e.quiet), e.debug != null && (t.debug = e.debug), e.override != null && (t.override = e.override), e.fast != null && (t.fast = e.fast), t;
|
|
368
371
|
}
|
|
369
372
|
function be(e) {
|
|
370
|
-
let
|
|
373
|
+
let n = {}, t = [], o = { override: e.override, debug: e.debug };
|
|
371
374
|
for (let s of e.paths) {
|
|
372
375
|
let i = Q.resolve(process.cwd(), Ae(s));
|
|
373
376
|
try {
|
|
374
|
-
let l = R.parse(
|
|
375
|
-
R.populate(
|
|
377
|
+
let l = R.parse(ge.readFileSync(i, { encoding: e.encoding }), { fast: e.fast });
|
|
378
|
+
R.populate(n, l, o), t.push(s);
|
|
376
379
|
} catch (l) {
|
|
377
380
|
if (e.debug && console.log(`\u2506 failed to load ${s} ${l.message}`), !(e.defaultPath && l.code === "ENOENT"))
|
|
378
381
|
throw l;
|
|
379
382
|
}
|
|
380
383
|
}
|
|
381
|
-
return { injected: R.populate(process.env,
|
|
384
|
+
return { injected: R.populate(process.env, n, o), loadedPaths: t };
|
|
382
385
|
}
|
|
383
|
-
function
|
|
384
|
-
let
|
|
385
|
-
if (
|
|
386
|
+
function K(e) {
|
|
387
|
+
let n = e[0];
|
|
388
|
+
if (n === "--help" || n === "-h") {
|
|
386
389
|
D();
|
|
387
390
|
return;
|
|
388
391
|
}
|
|
389
|
-
if (
|
|
392
|
+
if (n !== "run") {
|
|
390
393
|
D(), process.exitCode = 1;
|
|
391
394
|
return;
|
|
392
395
|
}
|
|
@@ -403,22 +406,22 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
403
406
|
D(), process.exitCode = 1;
|
|
404
407
|
return;
|
|
405
408
|
}
|
|
406
|
-
let
|
|
409
|
+
let o = Ee(t);
|
|
407
410
|
try {
|
|
408
|
-
let c = be(
|
|
409
|
-
if (!
|
|
410
|
-
let
|
|
411
|
-
c.loadedPaths.length > 0 && (
|
|
411
|
+
let c = be(o);
|
|
412
|
+
if (!(o.quiet == null ? J().quiet : o.quiet)) {
|
|
413
|
+
let h = `\u25C7 injected env (${Object.keys(c.injected).length})`;
|
|
414
|
+
c.loadedPaths.length > 0 && (h += ` from ${c.loadedPaths.join(", ")}`), console.error(h);
|
|
412
415
|
}
|
|
413
416
|
} catch (c) {
|
|
414
417
|
console.error(`dotenv: ${c.message}`), process.exitCode = 1;
|
|
415
418
|
return;
|
|
416
419
|
}
|
|
417
|
-
let r = !!process.stdin.isTTY, s = process.platform !== "win32" && !r, i =
|
|
420
|
+
let r = !!process.stdin.isTTY, s = process.platform !== "win32" && !r, i = Ce(t.command[0], t.command.slice(1), { stdio: "inherit", detached: s }), l = new Map, d = 0;
|
|
418
421
|
function p(c) {
|
|
419
422
|
if (!(!i.pid || i.exitCode !== null || i.signalCode !== null)) {
|
|
420
423
|
if (process.platform === "win32") {
|
|
421
|
-
|
|
424
|
+
ve.spawnSync("taskkill", ["/pid", String(i.pid), "/T", "/F"], { stdio: "ignore" });
|
|
422
425
|
return;
|
|
423
426
|
}
|
|
424
427
|
try {
|
|
@@ -453,16 +456,16 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
453
456
|
f(), typeof c == "number" ? process.exit(c) : (setInterval(() => {}, 1000), process.kill(process.pid, a));
|
|
454
457
|
});
|
|
455
458
|
}
|
|
456
|
-
F.exports =
|
|
457
|
-
F === __require.main &&
|
|
459
|
+
F.exports = K;
|
|
460
|
+
F === __require.main && K(process.argv.slice(2));
|
|
458
461
|
});
|
|
459
|
-
var
|
|
460
|
-
var
|
|
461
|
-
module.exports =
|
|
462
|
-
module.exports.config =
|
|
463
|
-
module.exports.configDotenv =
|
|
464
|
-
module.exports.parse =
|
|
465
|
-
module.exports.populate =
|
|
462
|
+
var j = N();
|
|
463
|
+
var qe = X();
|
|
464
|
+
module.exports = j;
|
|
465
|
+
module.exports.config = j.config;
|
|
466
|
+
module.exports.configDotenv = j.configDotenv;
|
|
467
|
+
module.exports.parse = j.parse;
|
|
468
|
+
module.exports.populate = j.populate;
|
|
466
469
|
});
|
|
467
470
|
|
|
468
471
|
// src/load-env.ts
|
|
@@ -7453,6 +7456,14 @@ var typedOperations = {
|
|
|
7453
7456
|
kind: "query",
|
|
7454
7457
|
invoke: (client, input) => client.team.listRoutingGroups.query(input)
|
|
7455
7458
|
},
|
|
7459
|
+
"team.listRoutingGroupReleaseHistory": {
|
|
7460
|
+
kind: "query",
|
|
7461
|
+
invoke: (client, input) => client.team.listRoutingGroupReleaseHistory.query(input)
|
|
7462
|
+
},
|
|
7463
|
+
"team.updateRoutingGroupRelease": {
|
|
7464
|
+
kind: "mutation",
|
|
7465
|
+
invoke: (client, input) => client.team.updateRoutingGroupRelease.mutate(input)
|
|
7466
|
+
},
|
|
7456
7467
|
"team.createRoutingGroup": {
|
|
7457
7468
|
kind: "mutation",
|
|
7458
7469
|
invoke: (client, input) => client.team.createRoutingGroup.mutate(input)
|
|
@@ -7865,6 +7876,7 @@ var defaultMutationTargetKeys = [
|
|
|
7865
7876
|
"name"
|
|
7866
7877
|
];
|
|
7867
7878
|
var mutationTargetKeys = {
|
|
7879
|
+
"team.updateRoutingGroupRelease": ["groupId", "eventId"],
|
|
7868
7880
|
"team.setGameplaySettings": ["eventId"],
|
|
7869
7881
|
"team.createRoutingGroup": ["eventId"],
|
|
7870
7882
|
"team.renameRoutingGroup": ["groupId"],
|
|
@@ -7985,6 +7997,8 @@ var commands = [
|
|
|
7985
7997
|
mutation(["team", "set-station-routes"], "team.setStationRoutes", "Replace a team's linked station route and set its order.", ["state-change"]),
|
|
7986
7998
|
mutation(["event", "set-gameplay"], "team.setGameplaySettings", "Set open or sequential progression, group routing, and per-mission skipping before play starts.", ["state-change"]),
|
|
7987
7999
|
query(["routing-group", "list"], "team.listRoutingGroups", "List an event's routing groups, ordered stations, and assigned teams."),
|
|
8000
|
+
query(["routing-group", "release-history"], "team.listRoutingGroupReleaseHistory", "Show a routing group's five most recent release changes with actor, action and before/after UTC values."),
|
|
8001
|
+
mutation(["routing-group", "release"], "team.updateRoutingGroupRelease", "Schedule (future releaseAt ISO timestamp with offset), CLEAR schedule, HOLD, RELEASE_SCHEDULED_HOLD (keep schedule), or RELEASE_NOW for a routing group. After a group starts, only HOLD and RELEASE_SCHEDULED_HOLD are accepted. Requires launchEvent permission.", ["state-change"]),
|
|
7988
8002
|
mutation(["routing-group", "create"], "team.createRoutingGroup", "Create a routing group within an event before play starts.", ["state-change"]),
|
|
7989
8003
|
mutation(["routing-group", "rename"], "team.renameRoutingGroup", "Rename an event's routing group before play starts.", ["state-change"]),
|
|
7990
8004
|
mutation(["routing-group", "delete"], "team.deleteRoutingGroup", "Delete an unassigned routing group before play starts.", ["state-change", "delete"]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-labs-sg/gosh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "GOSH CLI for organizers and AI agents — manage organizations, events, teams, stations, missions, templates, and live operations through the GOSH API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@trpc/client": "^11.19.0",
|
|
22
|
-
"dotenv": "^18.0.
|
|
22
|
+
"dotenv": "^18.0.7",
|
|
23
23
|
"superjson": "^2.2.6"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|