@dreamboard-games/cli 0.1.30-alpha.22 → 0.1.30-alpha.24
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/dist/agent-verifier/agent-workspace-verifier.mjs +4 -4
- package/dist/agent-verifier/{chunk-DQUYBIGQ.mjs → chunk-B7M2TJSP.mjs} +13 -3
- package/dist/agent-verifier/chunk-B7M2TJSP.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-IOH33IAZ.mjs → chunk-XGLMGVEM.mjs} +3 -3
- package/dist/agent-verifier/{chunk-IOH33IAZ.mjs.map → chunk-XGLMGVEM.mjs.map} +1 -1
- package/dist/agent-verifier/{materialize-workspace-QJUKDF3W.mjs → materialize-workspace-NFDU37GX.mjs} +2 -2
- package/dist/agent-verifier/{reducer-native-test-harness-H6G6RBRY.mjs → reducer-native-test-harness-VKU6I7QD.mjs} +2 -2
- package/dist/agent-verifier/{static-scaffold-QHRK4KGT.mjs → static-scaffold-4HHCCDS6.mjs} +2 -2
- package/dist/authoring-compatibility-internal.js +1 -1
- package/dist/{chunk-X2OSFNXQ.js → chunk-JBZITDAD.js} +25 -4
- package/dist/chunk-JBZITDAD.js.map +1 -0
- package/dist/{chunk-WSS4S45U.js → chunk-YKL5LCSR.js} +9 -3
- package/dist/{chunk-WSS4S45U.js.map → chunk-YKL5LCSR.js.map} +1 -1
- package/dist/index.js +161 -4
- package/dist/index.js.map +1 -1
- package/dist/internal.js +2 -2
- package/package.json +1 -1
- package/release/authoring-release-set.json +2 -2
- package/dist/agent-verifier/chunk-DQUYBIGQ.mjs.map +0 -1
- package/dist/chunk-X2OSFNXQ.js.map +0 -1
- /package/dist/agent-verifier/{materialize-workspace-QJUKDF3W.mjs.map → materialize-workspace-NFDU37GX.mjs.map} +0 -0
- /package/dist/agent-verifier/{reducer-native-test-harness-H6G6RBRY.mjs.map → reducer-native-test-harness-VKU6I7QD.mjs.map} +0 -0
- /package/dist/agent-verifier/{static-scaffold-QHRK4KGT.mjs.map → static-scaffold-4HHCCDS6.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
parseNewCommandArgs,
|
|
42
42
|
parsePlayerCountFlags,
|
|
43
43
|
parsePositiveInt,
|
|
44
|
+
parseProjectRepositoryCommandArgs,
|
|
44
45
|
parseReleasePublishCommandArgs,
|
|
45
46
|
presentCliError,
|
|
46
47
|
projectIdFromSessionGameSource,
|
|
@@ -55,7 +56,7 @@ import {
|
|
|
55
56
|
titleFromSlug,
|
|
56
57
|
toDreamboardApiError,
|
|
57
58
|
waitForCompiledResultJobSdk
|
|
58
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-JBZITDAD.js";
|
|
59
60
|
import {
|
|
60
61
|
applyWorkspaceCodegen,
|
|
61
62
|
collectLocalFiles,
|
|
@@ -88,12 +89,13 @@ import {
|
|
|
88
89
|
publishProjectRelease,
|
|
89
90
|
reconcileWorkspaceDependencies,
|
|
90
91
|
resolveCliRepoRoot,
|
|
92
|
+
retryProjectRepositoryReconciliation,
|
|
91
93
|
scaffoldStaticWorkspace,
|
|
92
94
|
updateProjectEnvironmentState,
|
|
93
95
|
updateProjectLocalMaintainerRegistry,
|
|
94
96
|
updateProjectState,
|
|
95
97
|
writeSnapshot
|
|
96
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-YKL5LCSR.js";
|
|
97
99
|
import {
|
|
98
100
|
clearCredentials,
|
|
99
101
|
getActiveCredentialBackendName,
|
|
@@ -2566,6 +2568,19 @@ async function getProjectRepositorySdk(projectId) {
|
|
|
2566
2568
|
}
|
|
2567
2569
|
return data;
|
|
2568
2570
|
}
|
|
2571
|
+
async function retryProjectRepositoryReconciliationSdk(projectId) {
|
|
2572
|
+
const { data, error, response } = await retryProjectRepositoryReconciliation({
|
|
2573
|
+
path: { projectId }
|
|
2574
|
+
});
|
|
2575
|
+
if (error || !data) {
|
|
2576
|
+
throw toDreamboardApiError(
|
|
2577
|
+
error,
|
|
2578
|
+
response,
|
|
2579
|
+
"Failed to retry project repository reconciliation"
|
|
2580
|
+
);
|
|
2581
|
+
}
|
|
2582
|
+
return data;
|
|
2583
|
+
}
|
|
2569
2584
|
async function pollProjectRepository(options) {
|
|
2570
2585
|
const intervalMs = options.intervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
2571
2586
|
const fetchRepository = options.fetchRepository ?? getProjectRepositorySdk;
|
|
@@ -4917,7 +4932,6 @@ var project_clone_default = defineCommand({
|
|
|
4917
4932
|
webBaseUrl: config.webBaseUrl
|
|
4918
4933
|
});
|
|
4919
4934
|
await installFrozenWorkspaceDependencies(tempDir);
|
|
4920
|
-
await loadProjectDevHost(tempDir);
|
|
4921
4935
|
await loadManifest(tempDir);
|
|
4922
4936
|
await writeSnapshot(tempDir);
|
|
4923
4937
|
const trackedChanges = await git.statusPorcelain(tempDir);
|
|
@@ -4942,6 +4956,8 @@ Refusing to publish a mutated checkout.`
|
|
|
4942
4956
|
// src/commands/project.ts
|
|
4943
4957
|
var DEFAULT_STATUS_WAIT_TIMEOUT_MS = 12e4;
|
|
4944
4958
|
var DEFAULT_STATUS_POLL_INTERVAL_MS = 1e3;
|
|
4959
|
+
var DEFAULT_REPOSITORY_WAIT_TIMEOUT_MS3 = 12e4;
|
|
4960
|
+
var DEFAULT_REPOSITORY_POLL_INTERVAL_MS3 = 1e3;
|
|
4945
4961
|
function parsePositiveIntegerFlag3(value, flagName, defaultValue) {
|
|
4946
4962
|
if (value === void 0) {
|
|
4947
4963
|
return defaultValue;
|
|
@@ -4955,6 +4971,35 @@ function parsePositiveIntegerFlag3(value, flagName, defaultValue) {
|
|
|
4955
4971
|
function sleep(ms) {
|
|
4956
4972
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
4957
4973
|
}
|
|
4974
|
+
async function configureAuthenticatedClient(args) {
|
|
4975
|
+
const [globalConfig, storedSession] = await Promise.all([
|
|
4976
|
+
loadGlobalConfig(),
|
|
4977
|
+
getStoredSession()
|
|
4978
|
+
]);
|
|
4979
|
+
const config = resolveConfig(globalConfig, args, void 0, storedSession);
|
|
4980
|
+
requireAuth(config);
|
|
4981
|
+
await configureClient(config);
|
|
4982
|
+
}
|
|
4983
|
+
function repositorySummary(repository) {
|
|
4984
|
+
const retryable = repository.retryable ? ", retryable" : "";
|
|
4985
|
+
const error = repository.errorCode ? `, error=${repository.errorCode}` : "";
|
|
4986
|
+
return [
|
|
4987
|
+
`state=${repository.provisioningState}`,
|
|
4988
|
+
`clone=${repository.cloneUrl}`,
|
|
4989
|
+
`defaultBranch=${repository.defaultBranch}`,
|
|
4990
|
+
`generation=${repository.observedGeneration}/${repository.desiredGeneration}${retryable}${error}`
|
|
4991
|
+
].join(", ");
|
|
4992
|
+
}
|
|
4993
|
+
async function maybePollRepository(options) {
|
|
4994
|
+
if (!options.wait || options.initialRepository.provisioningState === "READY") {
|
|
4995
|
+
return options.initialRepository;
|
|
4996
|
+
}
|
|
4997
|
+
return pollProjectRepository({
|
|
4998
|
+
projectId: options.projectId,
|
|
4999
|
+
timeoutMs: options.timeoutMs,
|
|
5000
|
+
intervalMs: options.intervalMs
|
|
5001
|
+
});
|
|
5002
|
+
}
|
|
4958
5003
|
function isPendingStatus(status) {
|
|
4959
5004
|
if (!status.source.observed) {
|
|
4960
5005
|
return true;
|
|
@@ -5008,6 +5053,117 @@ function projectStatusSummary(status) {
|
|
|
5008
5053
|
releases
|
|
5009
5054
|
].join(" ");
|
|
5010
5055
|
}
|
|
5056
|
+
var repositoryArgs = {
|
|
5057
|
+
project: {
|
|
5058
|
+
type: "string",
|
|
5059
|
+
description: "Project ID",
|
|
5060
|
+
required: true
|
|
5061
|
+
},
|
|
5062
|
+
wait: {
|
|
5063
|
+
type: "boolean",
|
|
5064
|
+
description: "Wait for repository reconciliation to reach a terminal state",
|
|
5065
|
+
default: false
|
|
5066
|
+
},
|
|
5067
|
+
"wait-timeout-ms": {
|
|
5068
|
+
type: "string",
|
|
5069
|
+
description: "Maximum time to wait for Git repository setup"
|
|
5070
|
+
},
|
|
5071
|
+
"repository-poll-interval-ms": {
|
|
5072
|
+
type: "string",
|
|
5073
|
+
description: "Polling interval for Git repository setup"
|
|
5074
|
+
},
|
|
5075
|
+
json: {
|
|
5076
|
+
type: "boolean",
|
|
5077
|
+
description: "Print machine-readable repository JSON",
|
|
5078
|
+
default: false
|
|
5079
|
+
},
|
|
5080
|
+
...CONFIG_FLAG_ARGS
|
|
5081
|
+
};
|
|
5082
|
+
async function runRepositoryCommand(commandName, args, action) {
|
|
5083
|
+
const parsedArgs = parseProjectRepositoryCommandArgs(commandName, args);
|
|
5084
|
+
const waitTimeoutMs = parsePositiveIntegerFlag3(
|
|
5085
|
+
parsedArgs["wait-timeout-ms"],
|
|
5086
|
+
"--wait-timeout-ms",
|
|
5087
|
+
DEFAULT_REPOSITORY_WAIT_TIMEOUT_MS3
|
|
5088
|
+
);
|
|
5089
|
+
const pollIntervalMs = parsePositiveIntegerFlag3(
|
|
5090
|
+
parsedArgs["repository-poll-interval-ms"],
|
|
5091
|
+
"--repository-poll-interval-ms",
|
|
5092
|
+
DEFAULT_REPOSITORY_POLL_INTERVAL_MS3
|
|
5093
|
+
);
|
|
5094
|
+
await configureAuthenticatedClient(parsedArgs);
|
|
5095
|
+
const repository = await action(parsedArgs.project);
|
|
5096
|
+
if (!repository) {
|
|
5097
|
+
throw new Error(
|
|
5098
|
+
`Repository binding not found for project ${parsedArgs.project}.`
|
|
5099
|
+
);
|
|
5100
|
+
}
|
|
5101
|
+
const finalRepository = await maybePollRepository({
|
|
5102
|
+
projectId: parsedArgs.project,
|
|
5103
|
+
wait: parsedArgs.wait,
|
|
5104
|
+
timeoutMs: waitTimeoutMs,
|
|
5105
|
+
intervalMs: pollIntervalMs,
|
|
5106
|
+
initialRepository: repository
|
|
5107
|
+
});
|
|
5108
|
+
printJsonOrSummary({
|
|
5109
|
+
json: parsedArgs.json,
|
|
5110
|
+
value: finalRepository,
|
|
5111
|
+
summary: repositorySummary(finalRepository)
|
|
5112
|
+
});
|
|
5113
|
+
}
|
|
5114
|
+
var cmdProjectRepositoryGet = defineCommand({
|
|
5115
|
+
meta: {
|
|
5116
|
+
name: "get",
|
|
5117
|
+
description: "Show a project's Git repository binding"
|
|
5118
|
+
},
|
|
5119
|
+
args: repositoryArgs,
|
|
5120
|
+
async run({ args }) {
|
|
5121
|
+
await runRepositoryCommand(
|
|
5122
|
+
"project repository get",
|
|
5123
|
+
args,
|
|
5124
|
+
getProjectRepositorySdk
|
|
5125
|
+
);
|
|
5126
|
+
}
|
|
5127
|
+
});
|
|
5128
|
+
var cmdProjectRepositoryEnsure = defineCommand({
|
|
5129
|
+
meta: {
|
|
5130
|
+
name: "ensure",
|
|
5131
|
+
description: "Ensure a project's Git repository binding exists"
|
|
5132
|
+
},
|
|
5133
|
+
args: repositoryArgs,
|
|
5134
|
+
async run({ args }) {
|
|
5135
|
+
await runRepositoryCommand(
|
|
5136
|
+
"project repository ensure",
|
|
5137
|
+
args,
|
|
5138
|
+
ensureProjectRepositorySdk
|
|
5139
|
+
);
|
|
5140
|
+
}
|
|
5141
|
+
});
|
|
5142
|
+
var cmdProjectRepositoryRetry = defineCommand({
|
|
5143
|
+
meta: {
|
|
5144
|
+
name: "retry",
|
|
5145
|
+
description: "Retry Git repository reconciliation for a project"
|
|
5146
|
+
},
|
|
5147
|
+
args: repositoryArgs,
|
|
5148
|
+
async run({ args }) {
|
|
5149
|
+
await runRepositoryCommand(
|
|
5150
|
+
"project repository retry",
|
|
5151
|
+
args,
|
|
5152
|
+
retryProjectRepositoryReconciliationSdk
|
|
5153
|
+
);
|
|
5154
|
+
}
|
|
5155
|
+
});
|
|
5156
|
+
var cmdProjectRepository = defineCommand({
|
|
5157
|
+
meta: {
|
|
5158
|
+
name: "repository",
|
|
5159
|
+
description: "Inspect and reconcile project Git repository bindings"
|
|
5160
|
+
},
|
|
5161
|
+
subCommands: {
|
|
5162
|
+
get: cmdProjectRepositoryGet,
|
|
5163
|
+
ensure: cmdProjectRepositoryEnsure,
|
|
5164
|
+
retry: cmdProjectRepositoryRetry
|
|
5165
|
+
}
|
|
5166
|
+
});
|
|
5011
5167
|
var cmdProjectStatus = defineCommand({
|
|
5012
5168
|
meta: {
|
|
5013
5169
|
name: "status",
|
|
@@ -5085,6 +5241,7 @@ var project_default = defineCommand({
|
|
|
5085
5241
|
subCommands: {
|
|
5086
5242
|
create: project_create_default,
|
|
5087
5243
|
clone: project_clone_default,
|
|
5244
|
+
repository: cmdProjectRepository,
|
|
5088
5245
|
status: cmdProjectStatus
|
|
5089
5246
|
}
|
|
5090
5247
|
});
|
|
@@ -6171,7 +6328,7 @@ function runDreamboardCli(internalSubCommands = {}) {
|
|
|
6171
6328
|
const main = defineCommand({
|
|
6172
6329
|
meta: {
|
|
6173
6330
|
name: "dreamboard",
|
|
6174
|
-
version: "0.1.30-alpha.
|
|
6331
|
+
version: "0.1.30-alpha.24",
|
|
6175
6332
|
description: "Dreamboard CLI \u2014 game development platform"
|
|
6176
6333
|
},
|
|
6177
6334
|
subCommands
|