siteplane 0.1.39 → 0.1.40
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/bin/siteplane.js +14 -0
- package/package.json +1 -1
package/dist/bin/siteplane.js
CHANGED
|
@@ -4144,6 +4144,17 @@ async function siteSetupApplyCommand(input) {
|
|
|
4144
4144
|
return parsed.data.data;
|
|
4145
4145
|
}
|
|
4146
4146
|
async function siteSetupVerifyCommand(input) {
|
|
4147
|
+
const resolveSourceFiles = input.resolveSourceFiles ?? resolveScanFilePaths;
|
|
4148
|
+
const readSourceFile = input.readSourceFile ?? ((path) => readFile7(path, "utf8"));
|
|
4149
|
+
const paths = await resolveSourceFiles([], { projectDir: input.projectDir });
|
|
4150
|
+
const sources = await Promise.all(paths.map(readSourceFile));
|
|
4151
|
+
if (!sources.some(hasMountedFieldRuntimeBridge)) {
|
|
4152
|
+
return {
|
|
4153
|
+
status: "action_required",
|
|
4154
|
+
code: "missing_field_runtime_bridge",
|
|
4155
|
+
message: "Mount FieldRuntimeBridge from @siteplane/runtime-next/client before deployment verification."
|
|
4156
|
+
};
|
|
4157
|
+
}
|
|
4147
4158
|
const deploymentRevision = await (input.readRevision ?? readGitRevision)(input.projectDir);
|
|
4148
4159
|
const response = await postSiteSetup(input, "verify", {
|
|
4149
4160
|
deploymentUrl: input.deploymentUrl,
|
|
@@ -4156,6 +4167,9 @@ async function siteSetupVerifyCommand(input) {
|
|
|
4156
4167
|
}
|
|
4157
4168
|
return actionRequired(response.payload, "Siteplane deployment verification failed.");
|
|
4158
4169
|
}
|
|
4170
|
+
function hasMountedFieldRuntimeBridge(source) {
|
|
4171
|
+
return /from\s+["']@siteplane\/runtime-next(?:\/client)?["']/u.test(source) && /<FieldRuntimeBridge(?:\s|\/|>)/u.test(source);
|
|
4172
|
+
}
|
|
4159
4173
|
async function postSiteSetup(input, operation, body) {
|
|
4160
4174
|
const [config, credentials] = await Promise.all([
|
|
4161
4175
|
readProjectConfig(input.projectDir),
|