@air-jam/devtools 0.0.0-stage → 1.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +112 -2
- package/dist/chunk-2O67AXCU.js +470 -0
- package/dist/chunk-2O67AXCU.js.map +1 -0
- package/dist/chunk-AO3ZDXF6.js +142 -0
- package/dist/chunk-AO3ZDXF6.js.map +1 -0
- package/dist/chunk-ART5TEYT.js +472 -0
- package/dist/chunk-ART5TEYT.js.map +1 -0
- package/dist/chunk-ASC2CK2R.js +77 -0
- package/dist/chunk-ASC2CK2R.js.map +1 -0
- package/dist/chunk-E3UZZGAV.js +50 -0
- package/dist/chunk-E3UZZGAV.js.map +1 -0
- package/dist/chunk-EJTE7UKX.js +64 -0
- package/dist/chunk-EJTE7UKX.js.map +1 -0
- package/dist/chunk-ESFKNN75.js +110 -0
- package/dist/chunk-ESFKNN75.js.map +1 -0
- package/dist/chunk-EU7A6PXW.js +1339 -0
- package/dist/chunk-EU7A6PXW.js.map +1 -0
- package/dist/chunk-FN7E6EA7.js +549 -0
- package/dist/chunk-FN7E6EA7.js.map +1 -0
- package/dist/chunk-GDFAWHGA.js +190 -0
- package/dist/chunk-GDFAWHGA.js.map +1 -0
- package/dist/chunk-HZUGBH4Y.js +347 -0
- package/dist/chunk-HZUGBH4Y.js.map +1 -0
- package/dist/chunk-ITKAOEGX.js +93 -0
- package/dist/chunk-ITKAOEGX.js.map +1 -0
- package/dist/chunk-JBCUTWRI.js +897 -0
- package/dist/chunk-JBCUTWRI.js.map +1 -0
- package/dist/chunk-JSI5S4WP.js +1174 -0
- package/dist/chunk-JSI5S4WP.js.map +1 -0
- package/dist/chunk-L4D675BG.js +97 -0
- package/dist/chunk-L4D675BG.js.map +1 -0
- package/dist/chunk-M6CJ7GQC.js +133 -0
- package/dist/chunk-M6CJ7GQC.js.map +1 -0
- package/dist/chunk-MEIMOSZC.js +749 -0
- package/dist/chunk-MEIMOSZC.js.map +1 -0
- package/dist/chunk-O3XG3FNL.js +1014 -0
- package/dist/chunk-O3XG3FNL.js.map +1 -0
- package/dist/chunk-OM6SCJ7H.js +18 -0
- package/dist/chunk-OM6SCJ7H.js.map +1 -0
- package/dist/chunk-PKD4WVX5.js +63 -0
- package/dist/chunk-PKD4WVX5.js.map +1 -0
- package/dist/chunk-PMBLXGFM.js +3384 -0
- package/dist/chunk-PMBLXGFM.js.map +1 -0
- package/dist/chunk-PMNE5GIN.js +279 -0
- package/dist/chunk-PMNE5GIN.js.map +1 -0
- package/dist/chunk-QAWI64VR.js +148 -0
- package/dist/chunk-QAWI64VR.js.map +1 -0
- package/dist/chunk-QGADSPHZ.js +449 -0
- package/dist/chunk-QGADSPHZ.js.map +1 -0
- package/dist/chunk-SPYN66UV.js +338 -0
- package/dist/chunk-SPYN66UV.js.map +1 -0
- package/dist/context.d.ts +19 -0
- package/dist/context.js +10 -0
- package/dist/context.js.map +1 -0
- package/dist/controller.d.ts +67 -0
- package/dist/controller.js +40 -0
- package/dist/controller.js.map +1 -0
- package/dist/dependencies.d.ts +44 -0
- package/dist/dependencies.js +10 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/dev.d.ts +21 -0
- package/dist/dev.js +19 -0
- package/dist/dev.js.map +1 -0
- package/dist/game-builds.d.ts +200 -0
- package/dist/game-builds.js +16 -0
- package/dist/game-builds.js.map +1 -0
- package/dist/game-run-watch-CEd_SpAT.d.ts +84 -0
- package/dist/game-runs.d.ts +1452 -0
- package/dist/game-runs.js +76 -0
- package/dist/game-runs.js.map +1 -0
- package/dist/game-session-broker-CUvORfMd.d.ts +439 -0
- package/dist/game-session-broker.d.ts +4 -0
- package/dist/game-session-broker.js +40 -0
- package/dist/game-session-broker.js.map +1 -0
- package/dist/game-session.d.ts +3934 -0
- package/dist/game-session.js +195 -0
- package/dist/game-session.js.map +1 -0
- package/dist/game-settings.d.ts +16 -0
- package/dist/game-settings.js +237 -0
- package/dist/game-settings.js.map +1 -0
- package/dist/games.d.ts +28 -0
- package/dist/games.js +16 -0
- package/dist/games.js.map +1 -0
- package/dist/harness/visual.d.ts +204 -0
- package/dist/harness/visual.js +46 -0
- package/dist/harness/visual.js.map +1 -0
- package/dist/logs.d.ts +15 -0
- package/dist/logs.js +57 -0
- package/dist/logs.js.map +1 -0
- package/dist/managed-process-scope-BicYi_t9.d.ts +3 -0
- package/dist/mcp-config.d.ts +63 -0
- package/dist/mcp-config.js +191 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/platform-auth.d.ts +9 -0
- package/dist/platform-auth.js +45 -0
- package/dist/platform-auth.js.map +1 -0
- package/dist/platform-game-analytics.d.ts +51 -0
- package/dist/platform-game-analytics.js +49 -0
- package/dist/platform-game-analytics.js.map +1 -0
- package/dist/platform-game-app-id.d.ts +46 -0
- package/dist/platform-game-app-id.js +93 -0
- package/dist/platform-game-app-id.js.map +1 -0
- package/dist/platform-game-media.d.ts +347 -0
- package/dist/platform-game-media.js +168 -0
- package/dist/platform-game-media.js.map +1 -0
- package/dist/platform-games.d.ts +87 -0
- package/dist/platform-games.js +183 -0
- package/dist/platform-games.js.map +1 -0
- package/dist/quality.d.ts +16 -0
- package/dist/quality.js +62 -0
- package/dist/quality.js.map +1 -0
- package/dist/release.d.ts +1304 -0
- package/dist/release.js +34 -0
- package/dist/release.js.map +1 -0
- package/dist/rooms-check.d.ts +90 -0
- package/dist/rooms-check.js +717 -0
- package/dist/rooms-check.js.map +1 -0
- package/dist/source-tree-contract.d.ts +16 -0
- package/dist/source-tree-contract.js +13 -0
- package/dist/source-tree-contract.js.map +1 -0
- package/dist/testing.d.ts +464 -0
- package/dist/testing.js +27 -0
- package/dist/testing.js.map +1 -0
- package/dist/tooling/describe-game.d.ts +2 -0
- package/dist/tooling/describe-game.js +54 -0
- package/dist/tooling/describe-game.js.map +1 -0
- package/dist/tooling/game-session-broker.d.ts +2 -0
- package/dist/tooling/game-session-broker.js +28 -0
- package/dist/tooling/game-session-broker.js.map +1 -0
- package/dist/tooling/hold-runtime-host.d.ts +2 -0
- package/dist/tooling/hold-runtime-host.js +931 -0
- package/dist/tooling/hold-runtime-host.js.map +1 -0
- package/dist/tooling/list-visual-scenarios.d.ts +2 -0
- package/dist/tooling/list-visual-scenarios.js +25 -0
- package/dist/tooling/list-visual-scenarios.js.map +1 -0
- package/dist/tooling/managed-dev-supervisor.d.ts +2 -0
- package/dist/tooling/managed-dev-supervisor.js +51 -0
- package/dist/tooling/managed-dev-supervisor.js.map +1 -0
- package/dist/tooling/process-scope-bootstrap.mjs +24 -0
- package/dist/tooling/process-scope-guard.d.ts +2 -0
- package/dist/tooling/process-scope-guard.js +388 -0
- package/dist/tooling/process-scope-guard.js.map +1 -0
- package/dist/tooling/process-scope-windows.ps1 +148 -0
- package/dist/tooling/rooms-check-device.d.ts +2 -0
- package/dist/tooling/rooms-check-device.js +498 -0
- package/dist/tooling/rooms-check-device.js.map +1 -0
- package/dist/tooling/run-headless-room.d.ts +2 -0
- package/dist/tooling/run-headless-room.js +287 -0
- package/dist/tooling/run-headless-room.js.map +1 -0
- package/dist/tooling/run-test-profile.d.ts +2 -0
- package/dist/tooling/run-test-profile.js +181 -0
- package/dist/tooling/run-test-profile.js.map +1 -0
- package/dist/tooling/run-visual-capture.d.ts +2 -0
- package/dist/tooling/run-visual-capture.js +203 -0
- package/dist/tooling/run-visual-capture.js.map +1 -0
- package/dist/tooling/seal-game-build.d.ts +2 -0
- package/dist/tooling/seal-game-build.js +120 -0
- package/dist/tooling/seal-game-build.js.map +1 -0
- package/dist/types-CdYrgrG_.d.ts +1036 -0
- package/dist/types-DyRD-ym1.d.ts +141 -0
- package/dist/visual.d.ts +21 -0
- package/dist/visual.js +219 -0
- package/dist/visual.js.map +1 -0
- package/package.json +150 -3
- package/src/bounded-response.ts +28 -0
- package/src/built-game-runtime.ts +152 -0
- package/src/commands.ts +40 -0
- package/src/context.ts +218 -0
- package/src/controller-protocol.ts +22 -0
- package/src/controller.ts +1526 -0
- package/src/current-room-host.ts +166 -0
- package/src/decision-provider.ts +102 -0
- package/src/dependencies.ts +176 -0
- package/src/dependency-install-contract.ts +12 -0
- package/src/dev.ts +995 -0
- package/src/fs-utils.ts +93 -0
- package/src/game-action-observation.ts +106 -0
- package/src/game-build-protocol.ts +72 -0
- package/src/game-build.ts +483 -0
- package/src/game-run-owner.ts +2358 -0
- package/src/game-run-protocol.ts +448 -0
- package/src/game-run-record.ts +92 -0
- package/src/game-run-replay.ts +95 -0
- package/src/game-run-watch.ts +155 -0
- package/src/game-session-broker.ts +793 -0
- package/src/game-session-operations.ts +61 -0
- package/src/game-session-protocol.ts +180 -0
- package/src/game-session-runtime.ts +861 -0
- package/src/game-session.ts +206 -0
- package/src/game-settings.ts +295 -0
- package/src/games.ts +262 -0
- package/src/harness/visual/browser.ts +100 -0
- package/src/harness/visual/controller-observation.ts +181 -0
- package/src/harness/visual/prefab-contract.ts +29 -0
- package/src/harness/visual/prefab-runner.ts +178 -0
- package/src/harness/visual/runner.ts +549 -0
- package/src/harness/visual/runtime-controller-observations.ts +151 -0
- package/src/harness/visual/scenario-contract.ts +8 -0
- package/src/harness/visual/scenario-helpers.ts +67 -0
- package/src/harness/visual/screencast.ts +155 -0
- package/src/harness/visual/session.ts +400 -0
- package/src/harness/visual/types.ts +184 -0
- package/src/harness/visual.ts +7 -0
- package/src/headless-room-protocol.ts +112 -0
- package/src/headless-room.ts +222 -0
- package/src/helper-channel.ts +229 -0
- package/src/helper-scripts.ts +69 -0
- package/src/installed-dependencies.ts +74 -0
- package/src/logs.ts +67 -0
- package/src/managed-process-scope.ts +481 -0
- package/src/mcp-config.ts +262 -0
- package/src/node-process-environment.ts +10 -0
- package/src/platform-auth.ts +594 -0
- package/src/platform-game-analytics.ts +50 -0
- package/src/platform-game-app-id.ts +99 -0
- package/src/platform-game-media.ts +209 -0
- package/src/platform-games.ts +217 -0
- package/src/policy-artifact-contract.ts +52 -0
- package/src/policy-artifacts.ts +134 -0
- package/src/process-scope-admission.ts +50 -0
- package/src/process-scope-protocol.ts +66 -0
- package/src/process-scope.ts +327 -0
- package/src/quality.ts +82 -0
- package/src/release.ts +1683 -0
- package/src/rooms-check-fleet.ts +194 -0
- package/src/rooms-check-link.ts +138 -0
- package/src/rooms-check-protocol.ts +244 -0
- package/src/rooms-check.ts +797 -0
- package/src/runtime-owner-protocol.ts +218 -0
- package/src/source-tree-contract.ts +70 -0
- package/src/source-tree.ts +84 -0
- package/src/test-profile-process.ts +153 -0
- package/src/test-profile-protocol.ts +116 -0
- package/src/testing.ts +430 -0
- package/src/tooling/declaration-hook.ts +52 -0
- package/src/tooling/describe-game.ts +49 -0
- package/src/tooling/game-session-broker.ts +7 -0
- package/src/tooling/hold-runtime-host.ts +441 -0
- package/src/tooling/list-visual-scenarios.ts +21 -0
- package/src/tooling/load-game.ts +79 -0
- package/src/tooling/managed-dev-supervisor.ts +71 -0
- package/src/tooling/process-scope-bootstrap.mjs +24 -0
- package/src/tooling/process-scope-guard.ts +213 -0
- package/src/tooling/process-scope-windows.ps1 +148 -0
- package/src/tooling/rooms-check-device.ts +493 -0
- package/src/tooling/run-headless-room.ts +326 -0
- package/src/tooling/run-test-profile.ts +190 -0
- package/src/tooling/run-visual-capture.ts +231 -0
- package/src/tooling/runtime-owner-actions.ts +65 -0
- package/src/tooling/seal-game-build.ts +118 -0
- package/src/tooling/visual-pack.ts +11 -0
- package/src/types.ts +928 -0
- package/src/visual.ts +296 -0
- package/src/windows-process-scopes.ts +189 -0
- package/src/workspace-contract.ts +32 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import {
|
|
2
|
+
requestPlatformMachineApi,
|
|
3
|
+
resolvePlatformMachineAuth
|
|
4
|
+
} from "./chunk-2O67AXCU.js";
|
|
5
|
+
|
|
6
|
+
// src/platform-game-media.ts
|
|
7
|
+
import {
|
|
8
|
+
platformMachineGetOwnedGameMediaResultSchema,
|
|
9
|
+
platformMachineMutateOwnedGameMediaAssetResultSchema,
|
|
10
|
+
platformMachineRequestOwnedGameMediaUploadTargetResultSchema
|
|
11
|
+
} from "@air-jam/sdk/platform-machine";
|
|
12
|
+
import { readFile, stat } from "fs/promises";
|
|
13
|
+
import path from "path";
|
|
14
|
+
var MEDIA_FILE_CONTENT_TYPES = {
|
|
15
|
+
thumbnail: {
|
|
16
|
+
".jpg": "image/jpeg",
|
|
17
|
+
".jpeg": "image/jpeg",
|
|
18
|
+
".png": "image/png",
|
|
19
|
+
".webp": "image/webp"
|
|
20
|
+
},
|
|
21
|
+
cover: {
|
|
22
|
+
".jpg": "image/jpeg",
|
|
23
|
+
".jpeg": "image/jpeg",
|
|
24
|
+
".png": "image/png",
|
|
25
|
+
".webp": "image/webp"
|
|
26
|
+
},
|
|
27
|
+
preview_video: {
|
|
28
|
+
".mp4": "video/mp4",
|
|
29
|
+
".webm": "video/webm"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var inferMediaContentType = ({
|
|
33
|
+
kind,
|
|
34
|
+
filePath
|
|
35
|
+
}) => {
|
|
36
|
+
const extension = path.extname(filePath).toLowerCase();
|
|
37
|
+
const contentType = MEDIA_FILE_CONTENT_TYPES[kind][extension];
|
|
38
|
+
if (!contentType) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`Unsupported file extension for ${kind.replaceAll("_", " ")}: ${extension || "(none)"}`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return contentType;
|
|
44
|
+
};
|
|
45
|
+
var inspectPlatformGameMedia = async ({
|
|
46
|
+
platformUrl,
|
|
47
|
+
token,
|
|
48
|
+
slugOrId
|
|
49
|
+
}) => {
|
|
50
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
51
|
+
return requestPlatformMachineApi({
|
|
52
|
+
baseUrl: resolved.baseUrl,
|
|
53
|
+
pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}/media`,
|
|
54
|
+
token: resolved.token,
|
|
55
|
+
schema: platformMachineGetOwnedGameMediaResultSchema
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var requestPlatformGameMediaUploadTarget = async ({
|
|
59
|
+
platformUrl,
|
|
60
|
+
token,
|
|
61
|
+
slugOrId,
|
|
62
|
+
input
|
|
63
|
+
}) => {
|
|
64
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
65
|
+
return requestPlatformMachineApi({
|
|
66
|
+
baseUrl: resolved.baseUrl,
|
|
67
|
+
pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}/media`,
|
|
68
|
+
method: "POST",
|
|
69
|
+
token: resolved.token,
|
|
70
|
+
body: input,
|
|
71
|
+
schema: platformMachineRequestOwnedGameMediaUploadTargetResultSchema
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
var mutatePlatformGameMediaAsset = async ({
|
|
75
|
+
platformUrl,
|
|
76
|
+
token,
|
|
77
|
+
slugOrId,
|
|
78
|
+
assetId,
|
|
79
|
+
action
|
|
80
|
+
}) => {
|
|
81
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
82
|
+
return requestPlatformMachineApi({
|
|
83
|
+
baseUrl: resolved.baseUrl,
|
|
84
|
+
pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}/media/${encodeURIComponent(assetId)}/${action}`,
|
|
85
|
+
method: "POST",
|
|
86
|
+
token: resolved.token,
|
|
87
|
+
schema: platformMachineMutateOwnedGameMediaAssetResultSchema
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
var finalizePlatformGameMediaUpload = (options) => mutatePlatformGameMediaAsset({
|
|
91
|
+
...options,
|
|
92
|
+
action: "finalize"
|
|
93
|
+
});
|
|
94
|
+
var assignPlatformGameMediaAsset = (options) => mutatePlatformGameMediaAsset({
|
|
95
|
+
...options,
|
|
96
|
+
action: "assign"
|
|
97
|
+
});
|
|
98
|
+
var archivePlatformGameMediaAsset = (options) => mutatePlatformGameMediaAsset({
|
|
99
|
+
...options,
|
|
100
|
+
action: "archive"
|
|
101
|
+
});
|
|
102
|
+
var uploadPlatformGameMediaFile = async ({
|
|
103
|
+
platformUrl,
|
|
104
|
+
token,
|
|
105
|
+
slugOrId,
|
|
106
|
+
kind,
|
|
107
|
+
filePath
|
|
108
|
+
}) => {
|
|
109
|
+
const resolvedFilePath = path.resolve(filePath);
|
|
110
|
+
const fileStats = await stat(resolvedFilePath);
|
|
111
|
+
if (!fileStats.isFile()) {
|
|
112
|
+
throw new Error(`Media path is not a file: ${resolvedFilePath}`);
|
|
113
|
+
}
|
|
114
|
+
const contentType = inferMediaContentType({
|
|
115
|
+
kind,
|
|
116
|
+
filePath: resolvedFilePath
|
|
117
|
+
});
|
|
118
|
+
const created = await requestPlatformGameMediaUploadTarget({
|
|
119
|
+
platformUrl,
|
|
120
|
+
token,
|
|
121
|
+
slugOrId,
|
|
122
|
+
input: {
|
|
123
|
+
kind,
|
|
124
|
+
originalFilename: path.basename(resolvedFilePath),
|
|
125
|
+
contentType,
|
|
126
|
+
sizeBytes: fileStats.size
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
const uploadResponse = await fetch(created.upload.url, {
|
|
130
|
+
method: created.upload.method,
|
|
131
|
+
headers: created.upload.headers,
|
|
132
|
+
body: await readFile(resolvedFilePath)
|
|
133
|
+
});
|
|
134
|
+
if (!uploadResponse.ok) {
|
|
135
|
+
throw new Error(
|
|
136
|
+
`Media upload failed with status ${uploadResponse.status}.`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
const finalized = await finalizePlatformGameMediaUpload({
|
|
140
|
+
platformUrl,
|
|
141
|
+
token,
|
|
142
|
+
slugOrId,
|
|
143
|
+
assetId: created.asset.id
|
|
144
|
+
});
|
|
145
|
+
const assigned = await assignPlatformGameMediaAsset({
|
|
146
|
+
platformUrl,
|
|
147
|
+
token,
|
|
148
|
+
slugOrId,
|
|
149
|
+
assetId: created.asset.id
|
|
150
|
+
});
|
|
151
|
+
return {
|
|
152
|
+
requested: created,
|
|
153
|
+
finalized,
|
|
154
|
+
assigned,
|
|
155
|
+
filePath: resolvedFilePath,
|
|
156
|
+
sizeBytes: fileStats.size,
|
|
157
|
+
contentType
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export {
|
|
161
|
+
archivePlatformGameMediaAsset,
|
|
162
|
+
assignPlatformGameMediaAsset,
|
|
163
|
+
finalizePlatformGameMediaUpload,
|
|
164
|
+
inspectPlatformGameMedia,
|
|
165
|
+
requestPlatformGameMediaUploadTarget,
|
|
166
|
+
uploadPlatformGameMediaFile
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=platform-game-media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/platform-game-media.ts"],"sourcesContent":["import {\n platformMachineGetOwnedGameMediaResultSchema,\n platformMachineMutateOwnedGameMediaAssetResultSchema,\n platformMachineRequestOwnedGameMediaUploadTargetResultSchema,\n} from \"@air-jam/sdk/platform-machine\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n requestPlatformMachineApi,\n resolvePlatformMachineAuth,\n} from \"./platform-auth.js\";\nimport type {\n InspectPlatformGameMediaOptions,\n MutatePlatformGameMediaAssetOptions,\n RequestPlatformGameMediaUploadTargetOptions,\n UploadPlatformGameMediaFileOptions,\n} from \"./types.js\";\n\nexport type {\n InspectPlatformGameMediaOptions,\n MutatePlatformGameMediaAssetOptions,\n RequestPlatformGameMediaUploadTargetOptions,\n UploadPlatformGameMediaFileOptions,\n} from \"./types.js\";\n\nconst MEDIA_FILE_CONTENT_TYPES: Record<\n \"thumbnail\" | \"cover\" | \"preview_video\",\n Record<string, string>\n> = {\n thumbnail: {\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".png\": \"image/png\",\n \".webp\": \"image/webp\",\n },\n cover: {\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".png\": \"image/png\",\n \".webp\": \"image/webp\",\n },\n preview_video: {\n \".mp4\": \"video/mp4\",\n \".webm\": \"video/webm\",\n },\n};\n\nconst inferMediaContentType = ({\n kind,\n filePath,\n}: {\n kind: \"thumbnail\" | \"cover\" | \"preview_video\";\n filePath: string;\n}): string => {\n const extension = path.extname(filePath).toLowerCase();\n const contentType = MEDIA_FILE_CONTENT_TYPES[kind][extension];\n\n if (!contentType) {\n throw new Error(\n `Unsupported file extension for ${kind.replaceAll(\"_\", \" \")}: ${extension || \"(none)\"}`,\n );\n }\n\n return contentType;\n};\n\nexport const inspectPlatformGameMedia = async ({\n platformUrl,\n token,\n slugOrId,\n}: InspectPlatformGameMediaOptions) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}/media`,\n token: resolved.token,\n schema: platformMachineGetOwnedGameMediaResultSchema,\n });\n};\n\nexport const requestPlatformGameMediaUploadTarget = async ({\n platformUrl,\n token,\n slugOrId,\n input,\n}: RequestPlatformGameMediaUploadTargetOptions) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}/media`,\n method: \"POST\",\n token: resolved.token,\n body: input,\n schema: platformMachineRequestOwnedGameMediaUploadTargetResultSchema,\n });\n};\n\nconst mutatePlatformGameMediaAsset = async ({\n platformUrl,\n token,\n slugOrId,\n assetId,\n action,\n}: MutatePlatformGameMediaAssetOptions & {\n action: \"finalize\" | \"assign\" | \"archive\";\n}) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}/media/${encodeURIComponent(assetId)}/${action}`,\n method: \"POST\",\n token: resolved.token,\n schema: platformMachineMutateOwnedGameMediaAssetResultSchema,\n });\n};\n\nexport const finalizePlatformGameMediaUpload = (\n options: MutatePlatformGameMediaAssetOptions,\n) =>\n mutatePlatformGameMediaAsset({\n ...options,\n action: \"finalize\",\n });\n\nexport const assignPlatformGameMediaAsset = (\n options: MutatePlatformGameMediaAssetOptions,\n) =>\n mutatePlatformGameMediaAsset({\n ...options,\n action: \"assign\",\n });\n\nexport const archivePlatformGameMediaAsset = (\n options: MutatePlatformGameMediaAssetOptions,\n) =>\n mutatePlatformGameMediaAsset({\n ...options,\n action: \"archive\",\n });\n\nexport const uploadPlatformGameMediaFile = async ({\n platformUrl,\n token,\n slugOrId,\n kind,\n filePath,\n}: UploadPlatformGameMediaFileOptions) => {\n const resolvedFilePath = path.resolve(filePath);\n const fileStats = await stat(resolvedFilePath);\n\n if (!fileStats.isFile()) {\n throw new Error(`Media path is not a file: ${resolvedFilePath}`);\n }\n\n const contentType = inferMediaContentType({\n kind,\n filePath: resolvedFilePath,\n });\n\n const created = await requestPlatformGameMediaUploadTarget({\n platformUrl,\n token,\n slugOrId,\n input: {\n kind,\n originalFilename: path.basename(resolvedFilePath),\n contentType,\n sizeBytes: fileStats.size,\n },\n });\n\n const uploadResponse = await fetch(created.upload.url, {\n method: created.upload.method,\n headers: created.upload.headers,\n body: await readFile(resolvedFilePath),\n });\n\n if (!uploadResponse.ok) {\n throw new Error(\n `Media upload failed with status ${uploadResponse.status}.`,\n );\n }\n\n const finalized = await finalizePlatformGameMediaUpload({\n platformUrl,\n token,\n slugOrId,\n assetId: created.asset.id,\n });\n\n const assigned = await assignPlatformGameMediaAsset({\n platformUrl,\n token,\n slugOrId,\n assetId: created.asset.id,\n });\n\n return {\n requested: created,\n finalized,\n assigned,\n filePath: resolvedFilePath,\n sizeBytes: fileStats.size,\n contentType,\n };\n};\n"],"mappings":";;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU,YAAY;AAC/B,OAAO,UAAU;AAmBjB,IAAM,2BAGF;AAAA,EACF,WAAW;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,Q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EACvC,CAAC;AAED,MAAI,CAAC,eAAe,IAAI;AACtB,UAAM,IAAI;AAAA,MACR,mCAAmC,eAAe,MAAM;AAAA,IAC1D;AAAA,EACF;AAEA,QAAM,YAAY,MAAM,gCAAgC;AAAA,IACtD;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,QAAQ,MAAM;AAAA,EACzB,CAAC;AAED,QAAM,WAAW,MAAM,6BAA6B;AAAA,IAClD;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,QAAQ,MAAM;AAAA,EACzB,CAAC;AAED,SAAO;AAAA,IACL,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,WAAW,UAAU;AAAA,IACrB;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { K as AirJamLocalHostedGameDefaults, L as ListPlatformGamesOptions, N as InspectPlatformGameOptions, O as CreatePlatformGameOptions, P as UpdatePlatformGameOptions } from './types-CdYrgrG_.js';
|
|
2
|
+
import '@air-jam/sdk/platform-machine';
|
|
3
|
+
import 'zod';
|
|
4
|
+
import '@air-jam/sdk/agent-tooling';
|
|
5
|
+
import './game-session-broker-CUvORfMd.js';
|
|
6
|
+
import './game-run-watch-CEd_SpAT.js';
|
|
7
|
+
import 'node:stream';
|
|
8
|
+
import '@air-jam/sdk';
|
|
9
|
+
import '@air-jam/sdk/core';
|
|
10
|
+
|
|
11
|
+
declare const readLocalHostedGameDefaults: ({ cwd, }?: {
|
|
12
|
+
cwd?: string;
|
|
13
|
+
}) => Promise<AirJamLocalHostedGameDefaults>;
|
|
14
|
+
declare const listPlatformGames: ({ platformUrl, token, }?: ListPlatformGamesOptions) => Promise<{
|
|
15
|
+
games: {
|
|
16
|
+
id: string;
|
|
17
|
+
slug: string | null;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string | null;
|
|
20
|
+
url: string | null;
|
|
21
|
+
arcadeVisibility: "hidden" | "listed";
|
|
22
|
+
arcadeListing: {
|
|
23
|
+
status: "rejected" | "approved" | "not_requested" | "awaiting_approval";
|
|
24
|
+
reason: string | null;
|
|
25
|
+
};
|
|
26
|
+
sourceUrl: string | null;
|
|
27
|
+
templateId: string | null;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
}[];
|
|
31
|
+
}>;
|
|
32
|
+
declare const inspectPlatformGame: ({ platformUrl, token, slugOrId, }: InspectPlatformGameOptions) => Promise<{
|
|
33
|
+
game: {
|
|
34
|
+
id: string;
|
|
35
|
+
slug: string | null;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string | null;
|
|
38
|
+
url: string | null;
|
|
39
|
+
arcadeVisibility: "hidden" | "listed";
|
|
40
|
+
arcadeListing: {
|
|
41
|
+
status: "rejected" | "approved" | "not_requested" | "awaiting_approval";
|
|
42
|
+
reason: string | null;
|
|
43
|
+
};
|
|
44
|
+
sourceUrl: string | null;
|
|
45
|
+
templateId: string | null;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
updatedAt: string;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
declare const createPlatformGame: ({ platformUrl, token, input, }: CreatePlatformGameOptions) => Promise<{
|
|
51
|
+
game: {
|
|
52
|
+
id: string;
|
|
53
|
+
slug: string | null;
|
|
54
|
+
name: string;
|
|
55
|
+
description: string | null;
|
|
56
|
+
url: string | null;
|
|
57
|
+
arcadeVisibility: "hidden" | "listed";
|
|
58
|
+
arcadeListing: {
|
|
59
|
+
status: "rejected" | "approved" | "not_requested" | "awaiting_approval";
|
|
60
|
+
reason: string | null;
|
|
61
|
+
};
|
|
62
|
+
sourceUrl: string | null;
|
|
63
|
+
templateId: string | null;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
};
|
|
67
|
+
}>;
|
|
68
|
+
declare const updatePlatformGame: ({ platformUrl, token, slugOrId, input, }: UpdatePlatformGameOptions) => Promise<{
|
|
69
|
+
game: {
|
|
70
|
+
id: string;
|
|
71
|
+
slug: string | null;
|
|
72
|
+
name: string;
|
|
73
|
+
description: string | null;
|
|
74
|
+
url: string | null;
|
|
75
|
+
arcadeVisibility: "hidden" | "listed";
|
|
76
|
+
arcadeListing: {
|
|
77
|
+
status: "rejected" | "approved" | "not_requested" | "awaiting_approval";
|
|
78
|
+
reason: string | null;
|
|
79
|
+
};
|
|
80
|
+
sourceUrl: string | null;
|
|
81
|
+
templateId: string | null;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
};
|
|
85
|
+
}>;
|
|
86
|
+
|
|
87
|
+
export { AirJamLocalHostedGameDefaults, CreatePlatformGameOptions, InspectPlatformGameOptions, ListPlatformGamesOptions, UpdatePlatformGameOptions, createPlatformGame, inspectPlatformGame, listPlatformGames, readLocalHostedGameDefaults, updatePlatformGame };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {
|
|
2
|
+
requestPlatformMachineApi,
|
|
3
|
+
resolvePlatformMachineAuth
|
|
4
|
+
} from "./chunk-2O67AXCU.js";
|
|
5
|
+
import {
|
|
6
|
+
findUp,
|
|
7
|
+
inspectGame,
|
|
8
|
+
pathExists,
|
|
9
|
+
readPackageJson
|
|
10
|
+
} from "./chunk-ART5TEYT.js";
|
|
11
|
+
import "./chunk-PKD4WVX5.js";
|
|
12
|
+
|
|
13
|
+
// src/platform-games.ts
|
|
14
|
+
import {
|
|
15
|
+
platformMachineCreateOwnedGameResultSchema,
|
|
16
|
+
platformMachineGetOwnedGameResultSchema,
|
|
17
|
+
platformMachineListOwnedGamesResultSchema,
|
|
18
|
+
platformMachineUpdateOwnedGameResultSchema
|
|
19
|
+
} from "@air-jam/sdk/platform-machine";
|
|
20
|
+
import { readFile } from "fs/promises";
|
|
21
|
+
import path from "path";
|
|
22
|
+
var normalizeGithubRemoteUrl = (value) => {
|
|
23
|
+
const trimmed = value.trim();
|
|
24
|
+
if (!trimmed) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
if (trimmed.startsWith("git@github.com:")) {
|
|
28
|
+
const repoPath = trimmed.slice("git@github.com:".length).replace(/\.git$/, "");
|
|
29
|
+
return repoPath ? `https://github.com/${repoPath}` : null;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const url = new URL(trimmed);
|
|
33
|
+
if (url.hostname !== "github.com") {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return `https://github.com${url.pathname.replace(/\.git$/, "")}`.replace(
|
|
37
|
+
/\/$/,
|
|
38
|
+
""
|
|
39
|
+
);
|
|
40
|
+
} catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var readGitRemoteFromConfig = async (gitDirOrFilePath) => {
|
|
45
|
+
let configPath = null;
|
|
46
|
+
const statsFile = await readFile(gitDirOrFilePath, "utf8").catch(() => null);
|
|
47
|
+
if (statsFile?.startsWith("gitdir:")) {
|
|
48
|
+
const relativeGitDir = statsFile.slice("gitdir:".length).trim();
|
|
49
|
+
const resolvedGitDir = path.resolve(
|
|
50
|
+
path.dirname(gitDirOrFilePath),
|
|
51
|
+
relativeGitDir
|
|
52
|
+
);
|
|
53
|
+
configPath = path.join(resolvedGitDir, "config");
|
|
54
|
+
} else {
|
|
55
|
+
configPath = path.join(gitDirOrFilePath, "config");
|
|
56
|
+
}
|
|
57
|
+
if (!await pathExists(configPath)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const config = await readFile(configPath, "utf8");
|
|
61
|
+
const remoteBlockMatch = config.match(
|
|
62
|
+
/\[remote "origin"\][\s\S]*?(?:\n\[|$)/
|
|
63
|
+
);
|
|
64
|
+
if (!remoteBlockMatch) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const urlMatch = remoteBlockMatch[0].match(/^\s*url\s*=\s*(.+)$/m);
|
|
68
|
+
return urlMatch?.[1]?.trim() || null;
|
|
69
|
+
};
|
|
70
|
+
var resolveRepoSourceUrl = async ({
|
|
71
|
+
projectDir
|
|
72
|
+
}) => {
|
|
73
|
+
const gitMarkerPath = await findUp(projectDir, ".git");
|
|
74
|
+
if (!gitMarkerPath) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const repoRoot = path.dirname(gitMarkerPath);
|
|
78
|
+
const remoteUrl = await readGitRemoteFromConfig(gitMarkerPath);
|
|
79
|
+
const normalizedRemoteUrl = remoteUrl ? normalizeGithubRemoteUrl(remoteUrl) : null;
|
|
80
|
+
if (!normalizedRemoteUrl) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const relativeProjectPath = path.relative(repoRoot, projectDir);
|
|
84
|
+
if (!relativeProjectPath || relativeProjectPath.startsWith("..")) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
return `${normalizedRemoteUrl}/tree/main/${relativeProjectPath.replaceAll(path.sep, "/")}`;
|
|
88
|
+
};
|
|
89
|
+
var readLocalHostedGameDefaults = async ({
|
|
90
|
+
cwd = process.cwd()
|
|
91
|
+
} = {}) => {
|
|
92
|
+
const game = await inspectGame({ cwd });
|
|
93
|
+
const [packageJson, sourceUrl] = await Promise.all([
|
|
94
|
+
readPackageJson(game.rootDir),
|
|
95
|
+
resolveRepoSourceUrl({ projectDir: game.rootDir })
|
|
96
|
+
]);
|
|
97
|
+
const metadata = game.declaration.metadata;
|
|
98
|
+
return {
|
|
99
|
+
projectDir: game.rootDir,
|
|
100
|
+
configPath: game.configPath,
|
|
101
|
+
manifestPath: game.manifestPath,
|
|
102
|
+
packageJsonPath: packageJson?.path ?? null,
|
|
103
|
+
packageName: game.packageName,
|
|
104
|
+
sourceUrl,
|
|
105
|
+
metadata: {
|
|
106
|
+
name: metadata.name,
|
|
107
|
+
slug: metadata.slug,
|
|
108
|
+
description: metadata.tagline,
|
|
109
|
+
category: metadata.category,
|
|
110
|
+
tags: [...metadata.tags ?? []]
|
|
111
|
+
},
|
|
112
|
+
template: {
|
|
113
|
+
id: metadata.slug,
|
|
114
|
+
name: metadata.name,
|
|
115
|
+
description: metadata.tagline,
|
|
116
|
+
category: metadata.category
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
var listPlatformGames = async ({
|
|
121
|
+
platformUrl,
|
|
122
|
+
token
|
|
123
|
+
} = {}) => {
|
|
124
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
125
|
+
return requestPlatformMachineApi({
|
|
126
|
+
baseUrl: resolved.baseUrl,
|
|
127
|
+
pathname: "/api/cli/games",
|
|
128
|
+
token: resolved.token,
|
|
129
|
+
schema: platformMachineListOwnedGamesResultSchema
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
var inspectPlatformGame = async ({
|
|
133
|
+
platformUrl,
|
|
134
|
+
token,
|
|
135
|
+
slugOrId
|
|
136
|
+
}) => {
|
|
137
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
138
|
+
return requestPlatformMachineApi({
|
|
139
|
+
baseUrl: resolved.baseUrl,
|
|
140
|
+
pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}`,
|
|
141
|
+
token: resolved.token,
|
|
142
|
+
schema: platformMachineGetOwnedGameResultSchema
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
var createPlatformGame = async ({
|
|
146
|
+
platformUrl,
|
|
147
|
+
token,
|
|
148
|
+
input
|
|
149
|
+
}) => {
|
|
150
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
151
|
+
return requestPlatformMachineApi({
|
|
152
|
+
baseUrl: resolved.baseUrl,
|
|
153
|
+
pathname: "/api/cli/games",
|
|
154
|
+
method: "POST",
|
|
155
|
+
token: resolved.token,
|
|
156
|
+
body: input,
|
|
157
|
+
schema: platformMachineCreateOwnedGameResultSchema
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
var updatePlatformGame = async ({
|
|
161
|
+
platformUrl,
|
|
162
|
+
token,
|
|
163
|
+
slugOrId,
|
|
164
|
+
input
|
|
165
|
+
}) => {
|
|
166
|
+
const resolved = await resolvePlatformMachineAuth({ platformUrl, token });
|
|
167
|
+
return requestPlatformMachineApi({
|
|
168
|
+
baseUrl: resolved.baseUrl,
|
|
169
|
+
pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}`,
|
|
170
|
+
method: "PATCH",
|
|
171
|
+
token: resolved.token,
|
|
172
|
+
body: input,
|
|
173
|
+
schema: platformMachineUpdateOwnedGameResultSchema
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
export {
|
|
177
|
+
createPlatformGame,
|
|
178
|
+
inspectPlatformGame,
|
|
179
|
+
listPlatformGames,
|
|
180
|
+
readLocalHostedGameDefaults,
|
|
181
|
+
updatePlatformGame
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=platform-games.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/platform-games.ts"],"sourcesContent":["import {\n platformMachineCreateOwnedGameResultSchema,\n platformMachineGetOwnedGameResultSchema,\n platformMachineListOwnedGamesResultSchema,\n platformMachineUpdateOwnedGameResultSchema,\n} from \"@air-jam/sdk/platform-machine\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { findUp, pathExists, readPackageJson } from \"./fs-utils.js\";\nimport { inspectGame } from \"./games.js\";\nimport {\n requestPlatformMachineApi,\n resolvePlatformMachineAuth,\n} from \"./platform-auth.js\";\nimport type {\n AirJamLocalHostedGameDefaults,\n CreatePlatformGameOptions,\n InspectPlatformGameOptions,\n ListPlatformGamesOptions,\n UpdatePlatformGameOptions,\n} from \"./types.js\";\n\nexport type {\n AirJamLocalHostedGameDefaults,\n CreatePlatformGameOptions,\n InspectPlatformGameOptions,\n ListPlatformGamesOptions,\n UpdatePlatformGameOptions,\n} from \"./types.js\";\n\nconst normalizeGithubRemoteUrl = (value: string): string | null => {\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n if (trimmed.startsWith(\"git@github.com:\")) {\n const repoPath = trimmed\n .slice(\"git@github.com:\".length)\n .replace(/\\.git$/, \"\");\n return repoPath ? `https://github.com/${repoPath}` : null;\n }\n\n try {\n const url = new URL(trimmed);\n if (url.hostname !== \"github.com\") {\n return null;\n }\n\n return `https://github.com${url.pathname.replace(/\\.git$/, \"\")}`.replace(\n /\\/$/,\n \"\",\n );\n } catch {\n return null;\n }\n};\n\nconst readGitRemoteFromConfig = async (\n gitDirOrFilePath: string,\n): Promise<string | null> => {\n let configPath: string | null = null;\n\n const statsFile = await readFile(gitDirOrFilePath, \"utf8\").catch(() => null);\n if (statsFile?.startsWith(\"gitdir:\")) {\n const relativeGitDir = statsFile.slice(\"gitdir:\".length).trim();\n const resolvedGitDir = path.resolve(\n path.dirname(gitDirOrFilePath),\n relativeGitDir,\n );\n configPath = path.join(resolvedGitDir, \"config\");\n } else {\n configPath = path.join(gitDirOrFilePath, \"config\");\n }\n\n if (!(await pathExists(configPath))) {\n return null;\n }\n\n const config = await readFile(configPath, \"utf8\");\n const remoteBlockMatch = config.match(\n /\\[remote \"origin\"\\][\\s\\S]*?(?:\\n\\[|$)/,\n );\n if (!remoteBlockMatch) {\n return null;\n }\n\n const urlMatch = remoteBlockMatch[0].match(/^\\s*url\\s*=\\s*(.+)$/m);\n return urlMatch?.[1]?.trim() || null;\n};\n\nconst resolveRepoSourceUrl = async ({\n projectDir,\n}: {\n projectDir: string;\n}): Promise<string | null> => {\n const gitMarkerPath = await findUp(projectDir, \".git\");\n if (!gitMarkerPath) {\n return null;\n }\n\n const repoRoot = path.dirname(gitMarkerPath);\n const remoteUrl = await readGitRemoteFromConfig(gitMarkerPath);\n const normalizedRemoteUrl = remoteUrl\n ? normalizeGithubRemoteUrl(remoteUrl)\n : null;\n\n if (!normalizedRemoteUrl) {\n return null;\n }\n\n const relativeProjectPath = path.relative(repoRoot, projectDir);\n if (!relativeProjectPath || relativeProjectPath.startsWith(\"..\")) {\n return null;\n }\n\n return `${normalizedRemoteUrl}/tree/main/${relativeProjectPath.replaceAll(path.sep, \"/\")}`;\n};\n\nexport const readLocalHostedGameDefaults = async ({\n cwd = process.cwd(),\n}: {\n cwd?: string;\n} = {}): Promise<AirJamLocalHostedGameDefaults> => {\n const game = await inspectGame({ cwd });\n const [packageJson, sourceUrl] = await Promise.all([\n readPackageJson(game.rootDir),\n resolveRepoSourceUrl({ projectDir: game.rootDir }),\n ]);\n\n const metadata = game.declaration.metadata;\n return {\n projectDir: game.rootDir,\n configPath: game.configPath,\n manifestPath: game.manifestPath,\n packageJsonPath: packageJson?.path ?? null,\n packageName: game.packageName,\n sourceUrl,\n metadata: {\n name: metadata.name,\n slug: metadata.slug,\n description: metadata.tagline,\n category: metadata.category,\n tags: [...(metadata.tags ?? [])],\n },\n template: {\n id: metadata.slug,\n name: metadata.name,\n description: metadata.tagline,\n category: metadata.category,\n },\n };\n};\n\nexport const listPlatformGames = async ({\n platformUrl,\n token,\n}: ListPlatformGamesOptions = {}) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: \"/api/cli/games\",\n token: resolved.token,\n schema: platformMachineListOwnedGamesResultSchema,\n });\n};\n\nexport const inspectPlatformGame = async ({\n platformUrl,\n token,\n slugOrId,\n}: InspectPlatformGameOptions) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}`,\n token: resolved.token,\n schema: platformMachineGetOwnedGameResultSchema,\n });\n};\n\nexport const createPlatformGame = async ({\n platformUrl,\n token,\n input,\n}: CreatePlatformGameOptions) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: \"/api/cli/games\",\n method: \"POST\",\n token: resolved.token,\n body: input,\n schema: platformMachineCreateOwnedGameResultSchema,\n });\n};\n\nexport const updatePlatformGame = async ({\n platformUrl,\n token,\n slugOrId,\n input,\n}: UpdatePlatformGameOptions) => {\n const resolved = await resolvePlatformMachineAuth({ platformUrl, token });\n\n return requestPlatformMachineApi({\n baseUrl: resolved.baseUrl,\n pathname: `/api/cli/games/${encodeURIComponent(slugOrId)}`,\n method: \"PATCH\",\n token: resolved.token,\n body: input,\n schema: platformMachineUpdateOwnedGameResultSchema,\n });\n};\n"],"mappings":";;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB,OAAO,UAAU;AAuBjB,IAAM,2BAA2B,CAAC,UAAiC;AACjE,QAAM,UAAU,MAAM,KAAK;AAC3B,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,WAAW,iBAAiB,GAAG;AACzC,UAAM,WAAW,QACd,MAAM,kBAAkB,MAAM,EAC9B,QAAQ,UAAU,EAAE;AACvB,WAAO,WAAW,sBAAsB,QAAQ,KAAK;AAAA,EACvD;AAEA,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,OAAO;AAC3B,QAAI,IAAI,aAAa,cAAc;AACjC,aAAO;AAAA,IACT;AAEA,WAAO,qBAAqB,IAAI,SAAS,QAAQ,UAAU,EAAE,CAAC,GAAG;AAAA,MAC/D;AAAA,MACA;AAAA,IACF;AAAA,EACF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAM,0BAA0B,OAC9B,qBAC2B;AAC3B,MAAI,aAA4B;AAEhC,QAAM,YAAY,MAAM,SAAS,kBAAkB,MAAM,EAAE,MAAM,MAAM,IAAI;AAC3E,MAAI,WAAW,WAAW,SAAS,GAAG;AACpC,UAAM,iBAAiB,UAAU,MAAM,UAAU,MAAM,EAAE,KAAK;AAC9D,UAAM,iBAAiB,KAAK;AAAA,MAC1B,KAAK,QAAQ,gBAAgB;AAAA,MAC7B;AAAA,IACF;AACA,iBAAa,KAAK,KAAK,g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AAO,SAAS;AAAA,IAChB,MAAM;AAAA,IACN,QAAQ;AAAA,EACV,CAAC;AACH;AAEO,IAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAiC;AAC/B,QAAM,WAAW,MAAM,2BAA2B,EAAE,aAAa,MAAM,CAAC;AAExE,SAAO,0BAA0B;AAAA,IAC/B,SAAS,SAAS;AAAA,IAClB,UAAU,kBAAkB,mBAAmB,QAAQ,CAAC;AAAA,IACxD,QAAQ;AAAA,IACR,OAAO,SAAS;AAAA,IAChB,MAAM;AAAA,IACN,QAAQ;AAAA,EACV,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Q as RunQualityGateOptions, F as CommandResult, T as RunCompleteEvaluationOptions, V as AirJamCompleteEvaluationResult } from './types-CdYrgrG_.js';
|
|
2
|
+
export { W as AirJamQualityGate } from './types-CdYrgrG_.js';
|
|
3
|
+
import '@air-jam/sdk/platform-machine';
|
|
4
|
+
import 'zod';
|
|
5
|
+
import '@air-jam/sdk/agent-tooling';
|
|
6
|
+
import './game-session-broker-CUvORfMd.js';
|
|
7
|
+
import './game-run-watch-CEd_SpAT.js';
|
|
8
|
+
import 'node:stream';
|
|
9
|
+
import '@air-jam/sdk';
|
|
10
|
+
import '@air-jam/sdk/core';
|
|
11
|
+
|
|
12
|
+
declare const AIR_JAM_COMPLETE_EVALUATION_GATES: readonly ["typecheck", "lint", "test", "build"];
|
|
13
|
+
declare const runQualityGate: (options: RunQualityGateOptions) => Promise<CommandResult>;
|
|
14
|
+
declare const runCompleteEvaluation: ({ cwd, }?: RunCompleteEvaluationOptions) => Promise<AirJamCompleteEvaluationResult>;
|
|
15
|
+
|
|
16
|
+
export { AIR_JAM_COMPLETE_EVALUATION_GATES, AirJamCompleteEvaluationResult, CommandResult, RunCompleteEvaluationOptions, RunQualityGateOptions, runCompleteEvaluation, runQualityGate };
|
package/dist/quality.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
detectProjectContext,
|
|
3
|
+
runCommandResult
|
|
4
|
+
} from "./chunk-ART5TEYT.js";
|
|
5
|
+
import "./chunk-PKD4WVX5.js";
|
|
6
|
+
|
|
7
|
+
// src/quality.ts
|
|
8
|
+
var AIR_JAM_COMPLETE_EVALUATION_GATES = [
|
|
9
|
+
"typecheck",
|
|
10
|
+
"lint",
|
|
11
|
+
"test",
|
|
12
|
+
"build"
|
|
13
|
+
];
|
|
14
|
+
var GATE_TO_SCRIPT = {
|
|
15
|
+
typecheck: "typecheck",
|
|
16
|
+
lint: "lint",
|
|
17
|
+
test: "test",
|
|
18
|
+
build: "build",
|
|
19
|
+
"format-check": "format:check",
|
|
20
|
+
"scaffold-smoke": "test:scaffold",
|
|
21
|
+
"release-check": "check:release"
|
|
22
|
+
};
|
|
23
|
+
var runQualityGate = async (options) => {
|
|
24
|
+
const context = await detectProjectContext({ cwd: options.cwd });
|
|
25
|
+
const script = GATE_TO_SCRIPT[options.gate];
|
|
26
|
+
if (context.mode !== "monorepo" && (options.gate === "scaffold-smoke" || options.gate === "release-check")) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
`Quality gate "${options.gate}" is only available in the Air Jam monorepo.`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
const args = options.packageFilter ? ["--filter", options.packageFilter, "run", script] : ["run", script];
|
|
32
|
+
return runCommandResult({
|
|
33
|
+
command: "pnpm",
|
|
34
|
+
args,
|
|
35
|
+
cwd: context.rootDir
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var runCompleteEvaluation = async ({
|
|
39
|
+
cwd
|
|
40
|
+
} = {}) => {
|
|
41
|
+
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
42
|
+
const gates = [];
|
|
43
|
+
for (const gate of AIR_JAM_COMPLETE_EVALUATION_GATES) {
|
|
44
|
+
gates.push({
|
|
45
|
+
gate,
|
|
46
|
+
result: await runQualityGate({ cwd, gate })
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
contract: "air-jam-complete-evaluation/v1",
|
|
51
|
+
status: gates.every(({ result }) => result.ok) ? "passed" : "failed",
|
|
52
|
+
startedAt,
|
|
53
|
+
endedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
54
|
+
gates
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
AIR_JAM_COMPLETE_EVALUATION_GATES,
|
|
59
|
+
runCompleteEvaluation,
|
|
60
|
+
runQualityGate
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=quality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/quality.ts"],"sourcesContent":["import { runCommandResult } from \"./commands.js\";\nimport { detectProjectContext } from \"./context.js\";\nimport type {\n AirJamCompleteEvaluationResult,\n AirJamQualityGate,\n CommandResult,\n RunCompleteEvaluationOptions,\n RunQualityGateOptions,\n} from \"./types.js\";\n\nexport type {\n AirJamCompleteEvaluationResult,\n AirJamQualityGate,\n CommandResult,\n RunCompleteEvaluationOptions,\n RunQualityGateOptions,\n} from \"./types.js\";\n\nexport const AIR_JAM_COMPLETE_EVALUATION_GATES = [\n \"typecheck\",\n \"lint\",\n \"test\",\n \"build\",\n] as const satisfies readonly AirJamQualityGate[];\n\nconst GATE_TO_SCRIPT: Record<RunQualityGateOptions[\"gate\"], string> = {\n typecheck: \"typecheck\",\n lint: \"lint\",\n test: \"test\",\n build: \"build\",\n \"format-check\": \"format:check\",\n \"scaffold-smoke\": \"test:scaffold\",\n \"release-check\": \"check:release\",\n};\n\nexport const runQualityGate = async (\n options: RunQualityGateOptions,\n): Promise<CommandResult> => {\n const context = await detectProjectContext({ cwd: options.cwd });\n const script = GATE_TO_SCRIPT[options.gate];\n\n if (\n context.mode !== \"monorepo\" &&\n (options.gate === \"scaffold-smoke\" || options.gate === \"release-check\")\n ) {\n throw new Error(\n `Quality gate \"${options.gate}\" is only available in the Air Jam monorepo.`,\n );\n }\n\n const args = options.packageFilter\n ? [\"--filter\", options.packageFilter, \"run\", script]\n : [\"run\", script];\n\n return runCommandResult({\n command: \"pnpm\",\n args,\n cwd: context.rootDir,\n });\n};\n\nexport const runCompleteEvaluation = async ({\n cwd,\n}: RunCompleteEvaluationOptions = {}): Promise<AirJamCompleteEvaluationResult> => {\n const startedAt = new Date().toISOString();\n const gates: AirJamCompleteEvaluationResult[\"gates\"] = [];\n\n for (const gate of AIR_JAM_COMPLETE_EVALUATION_GATES) {\n gates.push({\n gate,\n result: await runQualityGate({ cwd, gate }),\n });\n }\n\n return {\n contract: \"air-jam-complete-evaluation/v1\",\n status: gates.every(({ result }) => result.ok) ? \"passed\" : \"failed\",\n startedAt,\n endedAt: new Date().toISOString(),\n gates,\n };\n};\n"],"mappings":";;;;;;;AAkBO,IAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,iBAAgE;AAAA,EACpE,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,iBAAiB;AACnB;AAEO,IAAM,iBAAiB,OAC5B,YAC2B;AAC3B,QAAM,UAAU,MAAM,qBAAqB,EAAE,KAAK,QAAQ,IAAI,CAAC;AAC/D,QAAM,SAAS,eAAe,QAAQ,IAAI;AAE1C,MACE,QAAQ,SAAS,eAChB,QAAQ,SAAS,oBAAoB,QAAQ,SAAS,kBACvD;AACA,UAAM,IAAI;AAAA,MACR,iBAAiB,QAAQ,IAAI;AAAA,IAC/B;AAAA,EACF;AAEA,QAAM,OAAO,QAAQ,gBACjB,CAAC,YAAY,QAAQ,eAAe,OAAO,MAAM,IACjD,CAAC,OAAO,MAAM;AAElB,SAAO,iBAAiB;AAAA,IACtB,SAAS;AAAA,IACT;AAAA,IACA,KAAK,QAAQ;AAAA,EACf,CAAC;AACH;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