@roster-lock/match-agent 0.1.0 → 0.2.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/client/dist/assets/index-DeYshswm.js +125 -0
- package/client/dist/assets/index-gxAuIfGQ.css +1 -0
- package/client/dist/index.html +13 -0
- package/client/index.html +12 -0
- package/client/node_modules/.bin/terser +17 -0
- package/client/node_modules/.bin/tsc +17 -0
- package/client/node_modules/.bin/vite +17 -0
- package/client/node_modules/.vite/deps/@rjsf_core.js +6609 -0
- package/client/node_modules/.vite/deps/@rjsf_core.js.map +7 -0
- package/client/node_modules/.vite/deps/@rjsf_validator-ajv8.js +13 -0
- package/client/node_modules/.vite/deps/@rjsf_validator-ajv8.js.map +7 -0
- package/client/node_modules/.vite/deps/@roster-lock_ts-client.js +419 -0
- package/client/node_modules/.vite/deps/@roster-lock_ts-client.js.map +7 -0
- package/client/node_modules/.vite/deps/@roster-lock_types.js +5 -0
- package/client/node_modules/.vite/deps/@roster-lock_types.js.map +7 -0
- package/client/node_modules/.vite/deps/@roster-lock_utils.js +5 -0
- package/client/node_modules/.vite/deps/@roster-lock_utils.js.map +7 -0
- package/client/node_modules/.vite/deps/_metadata.json +97 -0
- package/client/node_modules/.vite/deps/chunk-4D2L7OBZ.js +16039 -0
- package/client/node_modules/.vite/deps/chunk-4D2L7OBZ.js.map +7 -0
- package/client/node_modules/.vite/deps/chunk-5KLROPUR.js +292 -0
- package/client/node_modules/.vite/deps/chunk-5KLROPUR.js.map +7 -0
- package/client/node_modules/.vite/deps/chunk-77TXW5ZT.js +280 -0
- package/client/node_modules/.vite/deps/chunk-77TXW5ZT.js.map +7 -0
- package/client/node_modules/.vite/deps/chunk-I55GDNGV.js +1004 -0
- package/client/node_modules/.vite/deps/chunk-I55GDNGV.js.map +7 -0
- package/client/node_modules/.vite/deps/chunk-IIDO6PKU.js +2337 -0
- package/client/node_modules/.vite/deps/chunk-IIDO6PKU.js.map +7 -0
- package/client/node_modules/.vite/deps/chunk-NE7PXY4V.js +466 -0
- package/client/node_modules/.vite/deps/chunk-NE7PXY4V.js.map +7 -0
- package/client/node_modules/.vite/deps/chunk-WMTNK64S.js +52 -0
- package/client/node_modules/.vite/deps/chunk-WMTNK64S.js.map +7 -0
- package/client/node_modules/.vite/deps/package.json +3 -0
- package/client/node_modules/.vite/deps/react-dom.js +6 -0
- package/client/node_modules/.vite/deps/react-dom.js.map +7 -0
- package/client/node_modules/.vite/deps/react-dom_client.js +20217 -0
- package/client/node_modules/.vite/deps/react-dom_client.js.map +7 -0
- package/client/node_modules/.vite/deps/react-router-dom.js +14702 -0
- package/client/node_modules/.vite/deps/react-router-dom.js.map +7 -0
- package/client/node_modules/.vite/deps/react.js +5 -0
- package/client/node_modules/.vite/deps/react.js.map +7 -0
- package/client/node_modules/.vite/deps/react_jsx-dev-runtime.js +278 -0
- package/client/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
- package/client/node_modules/.vite/deps/react_jsx-runtime.js +6 -0
- package/client/node_modules/.vite/deps/react_jsx-runtime.js.map +7 -0
- package/client/node_modules/.vite/deps_temp_ab51ebe9/package.json +3 -0
- package/client/package.json +30 -0
- package/client/src/App.tsx +56 -0
- package/client/src/NavBar.tsx +13 -0
- package/client/src/api/matchAgent.ts +159 -0
- package/client/src/bridge/hostBridge.ts +149 -0
- package/client/src/components/GameLauncherSettingsForm.tsx +140 -0
- package/client/src/components/InstallGameLauncherLightbox.tsx +31 -0
- package/client/src/components/Lightbox.tsx +15 -0
- package/client/src/components/RequireConnection.tsx +9 -0
- package/client/src/components/Selection/PieceCard.tsx +36 -0
- package/client/src/components/Selection/PieceTypeSection.tsx +112 -0
- package/client/src/components/Selection/PieceTypeTabs.tsx +31 -0
- package/client/src/components/Selection/PlayerSelectionPanel.tsx +40 -0
- package/client/src/components/Selection/index.tsx +147 -0
- package/client/src/components/Selection/selectionPlan.ts +75 -0
- package/client/src/context/DownloadSessionContext.tsx +48 -0
- package/client/src/context/IdentityContext.tsx +53 -0
- package/client/src/context/JoinSettingsContext.tsx +83 -0
- package/client/src/context/MatchAgentContext.tsx +85 -0
- package/client/src/hooks/useCursorInput.ts +55 -0
- package/client/src/hooks/useGamepads.ts +31 -0
- package/client/src/main.tsx +10 -0
- package/client/src/pages/Connect/index.tsx +46 -0
- package/client/src/pages/Download/index.tsx +175 -0
- package/client/src/pages/Game/index.tsx +65 -0
- package/client/src/pages/GameLauncher/Detail.tsx +12 -0
- package/client/src/pages/GameLauncher/index.tsx +32 -0
- package/client/src/pages/JoinSettings/index.tsx +58 -0
- package/client/src/pages/MatchMaking/index.tsx +190 -0
- package/client/src/styles/global.css +355 -0
- package/client/tsconfig.json +17 -0
- package/client/tsconfig.tsbuildinfo +1 -0
- package/client/vite.config.ts +33 -0
- package/dist/config/manage.js.map +1 -1
- package/dist/handle-room/version-1/game-launcher.js +181 -0
- package/dist/handle-room/version-1/game-launcher.js.map +1 -0
- package/dist/handle-room/version-1/index.js +15 -2
- package/dist/handle-room/version-1/index.js.map +1 -1
- package/dist/handle-room/version-1/piece-sort.js +1 -0
- package/dist/handle-room/version-1/piece-sort.js.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/serve-client.js +88 -0
- package/dist/serve-client.js.map +1 -0
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +12 -6
- package/src/config/manage.ts +5 -1
- package/src/handle-room/version-1/game-launcher.ts +263 -0
- package/src/handle-room/version-1/globals/types.ts +24 -0
- package/src/handle-room/version-1/index.ts +23 -3
- package/src/handle-room/version-1/piece-sort.ts +1 -1
- package/src/index.ts +25 -5
- package/src/serve-client.ts +100 -0
- package/src/server.ts +1 -1
- package/tests/integration/game-launcher-list.test.ts +77 -0
- package/tests/integration/game-launcher-settings.test.ts +138 -0
- package/tests/integration/game-launcher-start.test.ts +81 -0
- package/tests/integration/helpers/fakePluginRuntime.ts +26 -1
- package/tests/integration/helpers/server.ts +8 -2
- package/src/index.old.ts +0 -71
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_react
|
|
3
|
+
} from "./chunk-I55GDNGV.js";
|
|
4
|
+
import {
|
|
5
|
+
__commonJS
|
|
6
|
+
} from "./chunk-WMTNK64S.js";
|
|
7
|
+
|
|
8
|
+
// ../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
9
|
+
var require_react_jsx_dev_runtime_development = __commonJS({
|
|
10
|
+
"../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react-jsx-dev-runtime.development.js"(exports) {
|
|
11
|
+
"use strict";
|
|
12
|
+
(function() {
|
|
13
|
+
function getComponentNameFromType(type) {
|
|
14
|
+
if (null == type) return null;
|
|
15
|
+
if ("function" === typeof type)
|
|
16
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
17
|
+
if ("string" === typeof type) return type;
|
|
18
|
+
switch (type) {
|
|
19
|
+
case REACT_FRAGMENT_TYPE:
|
|
20
|
+
return "Fragment";
|
|
21
|
+
case REACT_PROFILER_TYPE:
|
|
22
|
+
return "Profiler";
|
|
23
|
+
case REACT_STRICT_MODE_TYPE:
|
|
24
|
+
return "StrictMode";
|
|
25
|
+
case REACT_SUSPENSE_TYPE:
|
|
26
|
+
return "Suspense";
|
|
27
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
28
|
+
return "SuspenseList";
|
|
29
|
+
case REACT_ACTIVITY_TYPE:
|
|
30
|
+
return "Activity";
|
|
31
|
+
}
|
|
32
|
+
if ("object" === typeof type)
|
|
33
|
+
switch ("number" === typeof type.tag && console.error(
|
|
34
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
35
|
+
), type.$$typeof) {
|
|
36
|
+
case REACT_PORTAL_TYPE:
|
|
37
|
+
return "Portal";
|
|
38
|
+
case REACT_CONTEXT_TYPE:
|
|
39
|
+
return type.displayName || "Context";
|
|
40
|
+
case REACT_CONSUMER_TYPE:
|
|
41
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
42
|
+
case REACT_FORWARD_REF_TYPE:
|
|
43
|
+
var innerType = type.render;
|
|
44
|
+
type = type.displayName;
|
|
45
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
46
|
+
return type;
|
|
47
|
+
case REACT_MEMO_TYPE:
|
|
48
|
+
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
49
|
+
case REACT_LAZY_TYPE:
|
|
50
|
+
innerType = type._payload;
|
|
51
|
+
type = type._init;
|
|
52
|
+
try {
|
|
53
|
+
return getComponentNameFromType(type(innerType));
|
|
54
|
+
} catch (x) {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
function testStringCoercion(value) {
|
|
60
|
+
return "" + value;
|
|
61
|
+
}
|
|
62
|
+
function checkKeyStringCoercion(value) {
|
|
63
|
+
try {
|
|
64
|
+
testStringCoercion(value);
|
|
65
|
+
var JSCompiler_inline_result = false;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
JSCompiler_inline_result = true;
|
|
68
|
+
}
|
|
69
|
+
if (JSCompiler_inline_result) {
|
|
70
|
+
JSCompiler_inline_result = console;
|
|
71
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
72
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
73
|
+
JSCompiler_temp_const.call(
|
|
74
|
+
JSCompiler_inline_result,
|
|
75
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
76
|
+
JSCompiler_inline_result$jscomp$0
|
|
77
|
+
);
|
|
78
|
+
return testStringCoercion(value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function getTaskName(type) {
|
|
82
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
83
|
+
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
84
|
+
return "<...>";
|
|
85
|
+
try {
|
|
86
|
+
var name = getComponentNameFromType(type);
|
|
87
|
+
return name ? "<" + name + ">" : "<...>";
|
|
88
|
+
} catch (x) {
|
|
89
|
+
return "<...>";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function getOwner() {
|
|
93
|
+
var dispatcher = ReactSharedInternals.A;
|
|
94
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
95
|
+
}
|
|
96
|
+
function UnknownOwner() {
|
|
97
|
+
return Error("react-stack-top-frame");
|
|
98
|
+
}
|
|
99
|
+
function hasValidKey(config) {
|
|
100
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
101
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
102
|
+
if (getter && getter.isReactWarning) return false;
|
|
103
|
+
}
|
|
104
|
+
return void 0 !== config.key;
|
|
105
|
+
}
|
|
106
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
107
|
+
function warnAboutAccessingKey() {
|
|
108
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
109
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
110
|
+
displayName
|
|
111
|
+
));
|
|
112
|
+
}
|
|
113
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
114
|
+
Object.defineProperty(props, "key", {
|
|
115
|
+
get: warnAboutAccessingKey,
|
|
116
|
+
configurable: true
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
120
|
+
var componentName = getComponentNameFromType(this.type);
|
|
121
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
122
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
123
|
+
));
|
|
124
|
+
componentName = this.props.ref;
|
|
125
|
+
return void 0 !== componentName ? componentName : null;
|
|
126
|
+
}
|
|
127
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
128
|
+
var refProp = props.ref;
|
|
129
|
+
type = {
|
|
130
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
131
|
+
type,
|
|
132
|
+
key,
|
|
133
|
+
props,
|
|
134
|
+
_owner: owner
|
|
135
|
+
};
|
|
136
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
137
|
+
enumerable: false,
|
|
138
|
+
get: elementRefGetterWithDeprecationWarning
|
|
139
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
140
|
+
type._store = {};
|
|
141
|
+
Object.defineProperty(type._store, "validated", {
|
|
142
|
+
configurable: false,
|
|
143
|
+
enumerable: false,
|
|
144
|
+
writable: true,
|
|
145
|
+
value: 0
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
148
|
+
configurable: false,
|
|
149
|
+
enumerable: false,
|
|
150
|
+
writable: true,
|
|
151
|
+
value: null
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(type, "_debugStack", {
|
|
154
|
+
configurable: false,
|
|
155
|
+
enumerable: false,
|
|
156
|
+
writable: true,
|
|
157
|
+
value: debugStack
|
|
158
|
+
});
|
|
159
|
+
Object.defineProperty(type, "_debugTask", {
|
|
160
|
+
configurable: false,
|
|
161
|
+
enumerable: false,
|
|
162
|
+
writable: true,
|
|
163
|
+
value: debugTask
|
|
164
|
+
});
|
|
165
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
166
|
+
return type;
|
|
167
|
+
}
|
|
168
|
+
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
169
|
+
var children = config.children;
|
|
170
|
+
if (void 0 !== children)
|
|
171
|
+
if (isStaticChildren)
|
|
172
|
+
if (isArrayImpl(children)) {
|
|
173
|
+
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
|
|
174
|
+
validateChildKeys(children[isStaticChildren]);
|
|
175
|
+
Object.freeze && Object.freeze(children);
|
|
176
|
+
} else
|
|
177
|
+
console.error(
|
|
178
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
|
+
);
|
|
180
|
+
else validateChildKeys(children);
|
|
181
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
182
|
+
children = getComponentNameFromType(type);
|
|
183
|
+
var keys = Object.keys(config).filter(function(k) {
|
|
184
|
+
return "key" !== k;
|
|
185
|
+
});
|
|
186
|
+
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
187
|
+
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
189
|
+
isStaticChildren,
|
|
190
|
+
children,
|
|
191
|
+
keys,
|
|
192
|
+
children
|
|
193
|
+
), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
194
|
+
}
|
|
195
|
+
children = null;
|
|
196
|
+
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
197
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
198
|
+
if ("key" in config) {
|
|
199
|
+
maybeKey = {};
|
|
200
|
+
for (var propName in config)
|
|
201
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
202
|
+
} else maybeKey = config;
|
|
203
|
+
children && defineKeyPropWarningGetter(
|
|
204
|
+
maybeKey,
|
|
205
|
+
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
206
|
+
);
|
|
207
|
+
return ReactElement(
|
|
208
|
+
type,
|
|
209
|
+
children,
|
|
210
|
+
maybeKey,
|
|
211
|
+
getOwner(),
|
|
212
|
+
debugStack,
|
|
213
|
+
debugTask
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
function validateChildKeys(node) {
|
|
217
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function isValidElement(object) {
|
|
220
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
221
|
+
}
|
|
222
|
+
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
223
|
+
return null;
|
|
224
|
+
};
|
|
225
|
+
React = {
|
|
226
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
227
|
+
return callStackForError();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
var specialPropKeyWarningShown;
|
|
231
|
+
var didWarnAboutElementRef = {};
|
|
232
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
233
|
+
React,
|
|
234
|
+
UnknownOwner
|
|
235
|
+
)();
|
|
236
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
237
|
+
var didWarnAboutKeySpread = {};
|
|
238
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
239
|
+
exports.jsxDEV = function(type, config, maybeKey, isStaticChildren) {
|
|
240
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
241
|
+
return jsxDEVImpl(
|
|
242
|
+
type,
|
|
243
|
+
config,
|
|
244
|
+
maybeKey,
|
|
245
|
+
isStaticChildren,
|
|
246
|
+
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
247
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
248
|
+
);
|
|
249
|
+
};
|
|
250
|
+
})();
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// ../../node_modules/.pnpm/react@19.2.7/node_modules/react/jsx-dev-runtime.js
|
|
255
|
+
var require_jsx_dev_runtime = __commonJS({
|
|
256
|
+
"../../node_modules/.pnpm/react@19.2.7/node_modules/react/jsx-dev-runtime.js"(exports, module) {
|
|
257
|
+
if (false) {
|
|
258
|
+
module.exports = null;
|
|
259
|
+
} else {
|
|
260
|
+
module.exports = require_react_jsx_dev_runtime_development();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
export default require_jsx_dev_runtime();
|
|
265
|
+
/*! Bundled license information:
|
|
266
|
+
|
|
267
|
+
react/cjs/react-jsx-dev-runtime.development.js:
|
|
268
|
+
(**
|
|
269
|
+
* @license React
|
|
270
|
+
* react-jsx-dev-runtime.development.js
|
|
271
|
+
*
|
|
272
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the MIT license found in the
|
|
275
|
+
* LICENSE file in the root directory of this source tree.
|
|
276
|
+
*)
|
|
277
|
+
*/
|
|
278
|
+
//# sourceMappingURL=react_jsx-dev-runtime.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react-jsx-dev-runtime.development.js", "../../../../../../node_modules/.pnpm/react@19.2.7/node_modules/react/jsx-dev-runtime.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-dev-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,MAAM;AACtC,YAAI,QAAQ,KAAM,QAAO;AACzB,YAAI,eAAe,OAAO;AACxB,iBAAO,KAAK,aAAa,yBACrB,OACA,KAAK,eAAe,KAAK,QAAQ;AACvC,YAAI,aAAa,OAAO,KAAM,QAAO;AACrC,gBAAQ,MAAM;AAAA,UACZ,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,QACX;AACA,YAAI,aAAa,OAAO;AACtB,kBACG,aAAa,OAAO,KAAK,OACxB,QAAQ;AAAA,YACN;AAAA,UACF,GACF,KAAK,UACL;AAAA,YACA,KAAK;AACH,qBAAO;AAAA,YACT,KAAK;AACH,qBAAO,KAAK,eAAe;AAAA,YAC7B,KAAK;AACH,sBAAQ,KAAK,SAAS,eAAe,aAAa;AAAA,YACpD,KAAK;AACH,kBAAI,YAAY,KAAK;AACrB,qBAAO,KAAK;AACZ,uBACI,OAAO,UAAU,eAAe,UAAU,QAAQ,IACnD,OAAO,OAAO,OAAO,gBAAgB,OAAO,MAAM;AACrD,q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AAc,MAAM,SACpB,aAAa,QAAQ,aACjB,QAAQ,aACR,WAAY;AACV,eAAO;AAAA,MACT;AACN,cAAQ;AAAA,QACN,0BAA0B,SAAU,mBAAmB;AACrD,iBAAO,kBAAkB;AAAA,QAC3B;AAAA,MACF;AACA,UAAI;AACJ,UAAI,yBAAyB,CAAC;AAC9B,UAAI,yBAAyB,MAAM,yBAAyB;AAAA,QAC1D;AAAA,QACA;AAAA,MACF,EAAE;AACF,UAAI,wBAAwB,WAAW,YAAY,YAAY,CAAC;AAChE,UAAI,wBAAwB,CAAC;AAC7B,cAAQ,WAAW;AACnB,cAAQ,SAAS,SAAU,MAAM,QAAQ,UAAU,kBAAkB;AACnE,YAAI,mBACF,MAAM,qBAAqB;AAC7B,eAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,mBACI,MAAM,uBAAuB,IAC7B;AAAA,UACJ,mBAAmB,WAAW,YAAY,IAAI,CAAC,IAAI;AAAA,QACrD;AAAA,MACF;AAAA,IACF,GAAG;AAAA;AAAA;;;ACjVL;AAAA;AAEA,QAAI,OAAuC;AACzC,aAAO,UAAU;AAAA,IACnB,OAAO;AACL,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@roster-lock/match-agent-client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Match-agent's own room/selection/download UI (join settings, room match making, piece selection, download status) - internal to match-agent, not a game-facing client",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "tsc -b && vite build",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@rjsf/core": "^6.8.0",
|
|
14
|
+
"@rjsf/utils": "^6.8.0",
|
|
15
|
+
"@rjsf/validator-ajv8": "^6.8.0",
|
|
16
|
+
"@roster-lock/ts-client": "workspace:*",
|
|
17
|
+
"@roster-lock/types": "workspace:*",
|
|
18
|
+
"@roster-lock/utils": "workspace:*",
|
|
19
|
+
"react": "^19.1.0",
|
|
20
|
+
"react-dom": "^19.1.0",
|
|
21
|
+
"react-router-dom": "^7.6.2"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^19.1.2",
|
|
25
|
+
"@types/react-dom": "^19.1.2",
|
|
26
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
27
|
+
"typescript": "^7.0.2",
|
|
28
|
+
"vite": "^5.0.11"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
|
|
2
|
+
import { MatchAgentProvider, useMatchAgent } from "./context/MatchAgentContext";
|
|
3
|
+
import { IdentityProvider } from "./context/IdentityContext";
|
|
4
|
+
import { JoinSettingsProvider } from "./context/JoinSettingsContext";
|
|
5
|
+
import { DownloadSessionProvider } from "./context/DownloadSessionContext";
|
|
6
|
+
import { ConnectPage } from "./pages/Connect";
|
|
7
|
+
import { JoinSettingsPage } from "./pages/JoinSettings";
|
|
8
|
+
import { GameLauncherListPage } from "./pages/GameLauncher";
|
|
9
|
+
import { GameLauncherDetailPage } from "./pages/GameLauncher/Detail";
|
|
10
|
+
import { MatchMakingPage } from "./pages/MatchMaking";
|
|
11
|
+
import { DownloadPage } from "./pages/Download";
|
|
12
|
+
import { GameStatusPage } from "./pages/Game";
|
|
13
|
+
import { NavBar } from "./NavBar";
|
|
14
|
+
import { RequireConnection } from "./components/RequireConnection";
|
|
15
|
+
|
|
16
|
+
export default function App() {
|
|
17
|
+
return (
|
|
18
|
+
<MatchAgentProvider>
|
|
19
|
+
<IdentityProvider>
|
|
20
|
+
<JoinSettingsProvider>
|
|
21
|
+
<DownloadSessionProvider>
|
|
22
|
+
<ConnectOrApp />
|
|
23
|
+
</DownloadSessionProvider>
|
|
24
|
+
</JoinSettingsProvider>
|
|
25
|
+
</IdentityProvider>
|
|
26
|
+
</MatchAgentProvider>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
function ConnectOrApp(){
|
|
32
|
+
const { connected } = useMatchAgent()
|
|
33
|
+
|
|
34
|
+
if(!connected){
|
|
35
|
+
return <ConnectPage autoSubmit />
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<BrowserRouter>
|
|
40
|
+
<NavBar />
|
|
41
|
+
<Routes>
|
|
42
|
+
<Route path="/" element={<Navigate to="/match-making" replace />} />
|
|
43
|
+
<Route path="/connect" element={<ConnectPage />} />
|
|
44
|
+
<Route path="/join-settings" element={<RequireConnection><JoinSettingsPage /></RequireConnection>} />
|
|
45
|
+
<Route path="/game-launcher" element={<RequireConnection><GameLauncherListPage /></RequireConnection>} />
|
|
46
|
+
<Route
|
|
47
|
+
path="/game-launcher/:pluginName"
|
|
48
|
+
element={<RequireConnection><GameLauncherDetailPage /></RequireConnection>}
|
|
49
|
+
/>
|
|
50
|
+
<Route path="/match-making" element={<RequireConnection><MatchMakingPage /></RequireConnection>} />
|
|
51
|
+
<Route path="/download" element={<RequireConnection><DownloadPage /></RequireConnection>} />
|
|
52
|
+
<Route path="/game" element={<RequireConnection><GameStatusPage /></RequireConnection>} />
|
|
53
|
+
</Routes>
|
|
54
|
+
</BrowserRouter>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Link } from "react-router-dom";
|
|
2
|
+
|
|
3
|
+
export function NavBar() {
|
|
4
|
+
return (
|
|
5
|
+
<nav className="nav-bar">
|
|
6
|
+
<Link to="/match-making">Match Making</Link>
|
|
7
|
+
<Link to="/game">Games</Link>
|
|
8
|
+
<Link to="/join-settings">Join Settings</Link>
|
|
9
|
+
<Link to="/game-launcher">Game Launchers</Link>
|
|
10
|
+
<Link to="/connect">Connect</Link>
|
|
11
|
+
</nav>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// Thin wrappers around match-agent's own /v1/game-launcher/* control routes
|
|
2
|
+
// (see core/match-agent/src/handle-room/version-1/game-launcher.ts). These are
|
|
3
|
+
// specific to this app (configuring/launching a local game launcher) rather
|
|
4
|
+
// than something a game itself needs, so they live here instead of
|
|
5
|
+
// @roster-lock/ts-client - see that package's README/index.ts for the
|
|
6
|
+
// asset-loading surface games actually consume.
|
|
7
|
+
|
|
8
|
+
import { PlatformTarget } from "@roster-lock/types";
|
|
9
|
+
|
|
10
|
+
export type GameLauncherLocalSettings = {
|
|
11
|
+
binaryLocation?: string,
|
|
12
|
+
localConfig?: unknown,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type AvailableGameLauncher = {
|
|
16
|
+
pluginName: string,
|
|
17
|
+
version: string,
|
|
18
|
+
publicInfo: { title: string, description: string },
|
|
19
|
+
supportedConnectionModes: Array<string>,
|
|
20
|
+
supportedRoomVersions?: Array<string>,
|
|
21
|
+
supportedPlatforms: Array<PlatformTarget>,
|
|
22
|
+
engineSha: string,
|
|
23
|
+
gameConfigSchema: unknown,
|
|
24
|
+
localConfigSchema: unknown,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
async function matchAgentFetch(
|
|
28
|
+
matchAgentUrl: string, authCode: string, path: string, init: RequestInit = {}
|
|
29
|
+
): Promise<Response> {
|
|
30
|
+
const url = new URL(path, matchAgentUrl);
|
|
31
|
+
const res = await fetch(url, {
|
|
32
|
+
...init,
|
|
33
|
+
headers: { ...(init.headers || {}), Authorization: `Bearer ${authCode}` },
|
|
34
|
+
});
|
|
35
|
+
if (!res.ok) {
|
|
36
|
+
const body = await res.json().catch(() => ({ error: res.statusText }));
|
|
37
|
+
throw new Error(body.error || `Match agent request to ${path} failed (${res.status})`);
|
|
38
|
+
}
|
|
39
|
+
return res;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Appended as query params on any game-launcher route that resolves a
|
|
43
|
+
// concrete binary - see resolveTarget in game-launcher.ts. Omitting `target`
|
|
44
|
+
// entirely (the ordinary case) leaves match-agent to default to its own
|
|
45
|
+
// current host; passing one is only for the deliberate exception (see
|
|
46
|
+
// docs/v2/binary-location.md).
|
|
47
|
+
function withTarget(path: string, target?: PlatformTarget): string {
|
|
48
|
+
if(!target) return path;
|
|
49
|
+
const params = new URLSearchParams({ platform: target.platform, arch: target.arch });
|
|
50
|
+
return `${path}?${params.toString()}`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export async function listAvailableGameLaunchers(
|
|
54
|
+
matchAgentUrl: string, authCode: string
|
|
55
|
+
): Promise<Array<AvailableGameLauncher>> {
|
|
56
|
+
const res = await matchAgentFetch(matchAgentUrl, authCode, "/v1/game-launcher/available");
|
|
57
|
+
return res.json();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export async function installGameLauncherPlugin(
|
|
61
|
+
matchAgentUrl: string, authCode: string, pluginName: string
|
|
62
|
+
): Promise<void> {
|
|
63
|
+
await matchAgentFetch(matchAgentUrl, authCode, `/v1/game-launcher/${encodeURIComponent(pluginName)}/install`, {
|
|
64
|
+
method: "POST",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function getGameLauncherSettings(
|
|
69
|
+
matchAgentUrl: string, authCode: string, pluginName: string
|
|
70
|
+
): Promise<GameLauncherLocalSettings> {
|
|
71
|
+
const res = await matchAgentFetch(
|
|
72
|
+
matchAgentUrl, authCode, `/v1/game-launcher/${encodeURIComponent(pluginName)}/settings`
|
|
73
|
+
);
|
|
74
|
+
return res.json();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export async function setGameLauncherSettings(
|
|
78
|
+
matchAgentUrl: string, authCode: string, pluginName: string, settings: GameLauncherLocalSettings
|
|
79
|
+
): Promise<void> {
|
|
80
|
+
await matchAgentFetch(matchAgentUrl, authCode, `/v1/game-launcher/${encodeURIComponent(pluginName)}/settings`, {
|
|
81
|
+
method: "PUT",
|
|
82
|
+
headers: { "Content-Type": "application/json" },
|
|
83
|
+
body: JSON.stringify(settings),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export async function getGameLauncherVersion(
|
|
88
|
+
matchAgentUrl: string, authCode: string, pluginName: string, target?: PlatformTarget
|
|
89
|
+
): Promise<{ local: { title: string, id: string }, supported: { title: string, id: string } }> {
|
|
90
|
+
const res = await matchAgentFetch(
|
|
91
|
+
matchAgentUrl, authCode, withTarget(`/v1/game-launcher/${encodeURIComponent(pluginName)}/version`, target)
|
|
92
|
+
);
|
|
93
|
+
return res.json();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export async function validateGameLauncherBinaryLocation(
|
|
97
|
+
matchAgentUrl: string, authCode: string, pluginName: string, target?: PlatformTarget
|
|
98
|
+
): Promise<{ valid: true } | { valid: false, message: string }> {
|
|
99
|
+
const res = await matchAgentFetch(
|
|
100
|
+
matchAgentUrl, authCode, withTarget(`/v1/game-launcher/${encodeURIComponent(pluginName)}/validate`, target)
|
|
101
|
+
);
|
|
102
|
+
return res.json();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export async function updateGameLauncherBinary(
|
|
106
|
+
matchAgentUrl: string, authCode: string, pluginName: string, target?: PlatformTarget
|
|
107
|
+
): Promise<void> {
|
|
108
|
+
await matchAgentFetch(
|
|
109
|
+
matchAgentUrl, authCode, withTarget(`/v1/game-launcher/${encodeURIComponent(pluginName)}/update`, target),
|
|
110
|
+
{ method: "POST" }
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export async function startGameLauncher(
|
|
115
|
+
matchAgentUrl: string, authCode: string, pluginName: string, body: unknown, target?: PlatformTarget
|
|
116
|
+
): Promise<{ handleId: string }> {
|
|
117
|
+
const res = await matchAgentFetch(
|
|
118
|
+
matchAgentUrl, authCode, withTarget(`/v1/game-launcher/${encodeURIComponent(pluginName)}/start`, target),
|
|
119
|
+
{
|
|
120
|
+
method: "POST",
|
|
121
|
+
headers: { "Content-Type": "application/json" },
|
|
122
|
+
body: JSON.stringify(body),
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
return res.json();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export async function getGameProcessStatus(
|
|
129
|
+
matchAgentUrl: string, authCode: string, pluginName: string, handleId: string
|
|
130
|
+
): Promise<{ exited: false | { code: number } }> {
|
|
131
|
+
const res = await matchAgentFetch(
|
|
132
|
+
matchAgentUrl, authCode,
|
|
133
|
+
`/v1/game-launcher/${encodeURIComponent(pluginName)}/process/${encodeURIComponent(handleId)}`
|
|
134
|
+
);
|
|
135
|
+
return res.json();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type GameProcessSummary = {
|
|
139
|
+
handleId: string,
|
|
140
|
+
pluginName: string,
|
|
141
|
+
exited: false | { code: number },
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export async function listGameProcesses(
|
|
145
|
+
matchAgentUrl: string, authCode: string
|
|
146
|
+
): Promise<Array<GameProcessSummary>> {
|
|
147
|
+
const res = await matchAgentFetch(matchAgentUrl, authCode, "/v1/game-launcher/processes");
|
|
148
|
+
return res.json();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export async function stopGameLauncher(
|
|
152
|
+
matchAgentUrl: string, authCode: string, pluginName: string, handleId: string
|
|
153
|
+
): Promise<void> {
|
|
154
|
+
await matchAgentFetch(
|
|
155
|
+
matchAgentUrl, authCode,
|
|
156
|
+
`/v1/game-launcher/${encodeURIComponent(pluginName)}/process/${encodeURIComponent(handleId)}/stop`,
|
|
157
|
+
{ method: "POST" }
|
|
158
|
+
);
|
|
159
|
+
}
|