webstudio 0.302.0 → 0.303.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/lib/cli.js +100 -37
- package/package.json +20 -20
- package/templates/cloudflare/package.json +1 -1
- package/templates/defaults/package.json +8 -8
- package/templates/react-router/package.json +8 -8
- package/templates/react-router-cloudflare/package.json +1 -1
- package/templates/ssg/package.json +6 -6
package/lib/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import fs, { rm, mkdtemp, writeFile, readFile, access, constants as constants$1,
|
|
|
20
20
|
import { gzip } from "node:zlib";
|
|
21
21
|
import { execFile, spawn } from "node:child_process";
|
|
22
22
|
import { promisify, isDeepStrictEqual } from "node:util";
|
|
23
|
-
import { readdirSync, constants as constants$2, createWriteStream, existsSync, realpathSync, readFileSync } from "node:fs";
|
|
23
|
+
import { readdirSync, constants as constants$2, createWriteStream, existsSync, createReadStream, realpathSync, readFileSync } from "node:fs";
|
|
24
24
|
import envPaths from "env-paths";
|
|
25
25
|
import { randomUUID, createHash } from "node:crypto";
|
|
26
26
|
import { text as text$d, isCancel, cancel, log, spinner, confirm, select as select$3 } from "@clack/prompts";
|
|
@@ -193559,7 +193559,7 @@ const propsCollapsible = {
|
|
|
193559
193559
|
const propsCollapsibleTrigger = {};
|
|
193560
193560
|
const propsCollapsibleContent = {
|
|
193561
193561
|
forceMount: {
|
|
193562
|
-
description: "
|
|
193562
|
+
description: "When true, closed content stays mounted. Keep an explicit closed-state CSS rule such as height: 0; Radix's animation-only example assumes unmounted content. Radix suppresses CSS transitions and animations while measuring height, so the first open may not animate.",
|
|
193563
193563
|
required: false,
|
|
193564
193564
|
control: "boolean",
|
|
193565
193565
|
type: "boolean"
|
|
@@ -194168,10 +194168,10 @@ const propsAccordionHeader = {};
|
|
|
194168
194168
|
const propsAccordionTrigger = {};
|
|
194169
194169
|
const propsAccordionContent = {
|
|
194170
194170
|
forceMount: {
|
|
194171
|
-
description: "Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries or keeping content available in the DOM.",
|
|
194172
194171
|
required: false,
|
|
194173
194172
|
control: "boolean",
|
|
194174
|
-
type: "boolean"
|
|
194173
|
+
type: "boolean",
|
|
194174
|
+
description: "When true, closed content stays mounted. Keep an explicit closed-state CSS rule such as height: 0; Radix's animation-only example assumes unmounted content. Radix suppresses CSS transitions and animations while measuring height, so the first open may not animate."
|
|
194175
194175
|
}
|
|
194176
194176
|
};
|
|
194177
194177
|
const metaAccordion = {
|
|
@@ -278903,7 +278903,7 @@ const AccordionItem = reactExports.forwardRef(({ value: value2, ...props2 }, ref
|
|
|
278903
278903
|
});
|
|
278904
278904
|
const AccordionHeader = Header;
|
|
278905
278905
|
const AccordionTrigger = Trigger2;
|
|
278906
|
-
const AccordionContent = Content2$1;
|
|
278906
|
+
const AccordionContent = reactExports.forwardRef(({ forceMount, ...props2 }, ref2) => /* @__PURE__ */ jsxRuntimeExports.jsx(Content2$1, { ref: ref2, forceMount: forceMount ? true : void 0, ...props2 }));
|
|
278907
278907
|
const namespace$2 = "@webstudio-is/sdk-components-react-radix";
|
|
278908
278908
|
const hooksAccordion = {
|
|
278909
278909
|
onNavigatorSelect: (context, event) => {
|
|
@@ -323332,8 +323332,9 @@ const capabilityAreas = [
|
|
|
323332
323332
|
},
|
|
323333
323333
|
{
|
|
323334
323334
|
area: "publish",
|
|
323335
|
-
goal: "
|
|
323335
|
+
goal: "Validate and publish projects, inspect publish jobs, and manage domains.",
|
|
323336
323336
|
tools: [
|
|
323337
|
+
"validate-publish",
|
|
323337
323338
|
"publish",
|
|
323338
323339
|
"list-publishes",
|
|
323339
323340
|
"get-publish-job",
|
|
@@ -329287,10 +329288,10 @@ const serverOnlyRouterOperationMetadata = {
|
|
|
329287
329288
|
},
|
|
329288
329289
|
"publish.validate": {
|
|
329289
329290
|
id: "publish.validate",
|
|
329290
|
-
command: "
|
|
329291
|
+
command: "validate-publish",
|
|
329291
329292
|
method: "query",
|
|
329292
329293
|
path: "api.publish.validate",
|
|
329293
|
-
client: "
|
|
329294
|
+
client: "validatePublish",
|
|
329294
329295
|
permit: "edit",
|
|
329295
329296
|
inputSchema: {
|
|
329296
329297
|
type: "object",
|
|
@@ -330281,12 +330282,12 @@ const curatedPublicApiOperationDocumentation = [
|
|
|
330281
330282
|
examples: ["webstudio delete-resource --resource resource-id --json"]
|
|
330282
330283
|
},
|
|
330283
330284
|
{
|
|
330284
|
-
command: "
|
|
330285
|
-
description: "
|
|
330285
|
+
command: "validate-publish",
|
|
330286
|
+
description: "Validate publish access, selected domains, and content diagnostics without starting a publish. Use audit for project-wide quality checks.",
|
|
330286
330287
|
requiredOptions: ["target", "json"],
|
|
330287
330288
|
examples: [
|
|
330288
|
-
"webstudio
|
|
330289
|
-
'MCP tool:
|
|
330289
|
+
"webstudio validate-publish --target production --json",
|
|
330290
|
+
'MCP tool: validate-publish {"target":"production"}'
|
|
330290
330291
|
]
|
|
330291
330292
|
},
|
|
330292
330293
|
{
|
|
@@ -332333,7 +332334,7 @@ const createResource = projectMutationInput("create-resource");
|
|
|
332333
332334
|
const updateResource = projectMutationInput("update-resource");
|
|
332334
332335
|
const deleteResource = projectMutationInput("delete-resource");
|
|
332335
332336
|
const listPublishes = projectQueryInput("list-publishes");
|
|
332336
|
-
const
|
|
332337
|
+
const validatePublish = projectQueryInput("validate-publish");
|
|
332337
332338
|
const publish = projectMutationInput("publish");
|
|
332338
332339
|
const getPublishJob = projectQueryInput("get-publish-job");
|
|
332339
332340
|
const unpublish = projectConfirmedMutationInput("unpublish");
|
|
@@ -332498,7 +332499,6 @@ const httpClient = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
332498
332499
|
bindProps,
|
|
332499
332500
|
bundleVersion,
|
|
332500
332501
|
checkProjectBuildPermission,
|
|
332501
|
-
checkPublishReadiness,
|
|
332502
332502
|
clearStyleSourceStyles,
|
|
332503
332503
|
cloneInstance,
|
|
332504
332504
|
connectContentBlockSource,
|
|
@@ -332682,6 +332682,7 @@ const httpClient = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
332682
332682
|
upsertResource,
|
|
332683
332683
|
upsertResourceProp,
|
|
332684
332684
|
validateAssetQuery,
|
|
332685
|
+
validatePublish,
|
|
332685
332686
|
verifyBindings,
|
|
332686
332687
|
verifyDomain,
|
|
332687
332688
|
wrapInstance
|
|
@@ -332694,7 +332695,7 @@ class HandledCliError extends Error {
|
|
|
332694
332695
|
}
|
|
332695
332696
|
const isHandledCliError = (error) => error instanceof HandledCliError;
|
|
332696
332697
|
const name = "webstudio";
|
|
332697
|
-
const version$1 = "0.
|
|
332698
|
+
const version$1 = "0.303.0";
|
|
332698
332699
|
const description = "Webstudio CLI";
|
|
332699
332700
|
const author = "Webstudio <github@webstudio.is>";
|
|
332700
332701
|
const homepage = "https://webstudio.is";
|
|
@@ -333061,6 +333062,7 @@ const materializeManagedAgents = async ({
|
|
|
333061
333062
|
return { path: path2, status: current4 === void 0 ? "created" : "updated" };
|
|
333062
333063
|
};
|
|
333063
333064
|
const publishedMdxTotalBytes = 32 * 1024 * 1024;
|
|
333065
|
+
const getPublishedMdxAssetIds = (assets) => new Set(assets.filter(isMdxFileAsset).map(({ id: id2 }) => id2));
|
|
333064
333066
|
const getPublishedMdxContentDatabaseMaxBytes = ({
|
|
333065
333067
|
baseBytes,
|
|
333066
333068
|
assets
|
|
@@ -333166,6 +333168,8 @@ const resolvePublishedMdxDependencyClosureWithParser = async ({
|
|
|
333166
333168
|
build: build2,
|
|
333167
333169
|
artifact,
|
|
333168
333170
|
onTemplateOmission,
|
|
333171
|
+
onMdxBlockInstanceId,
|
|
333172
|
+
allMdxAssetIds,
|
|
333169
333173
|
parseDocument: parseDocument2
|
|
333170
333174
|
}) => {
|
|
333171
333175
|
const instances = new Map(
|
|
@@ -333212,11 +333216,13 @@ const resolvePublishedMdxDependencyClosureWithParser = async ({
|
|
|
333212
333216
|
if (source === void 0) {
|
|
333213
333217
|
continue;
|
|
333214
333218
|
}
|
|
333219
|
+
onMdxBlockInstanceId?.(blockId);
|
|
333215
333220
|
const staticValue = getStaticContentBlockSourceAssetId(source);
|
|
333216
333221
|
const assetIds = typeof staticValue === "string" ? [staticValue] : resolvePublishedMdxAssetCandidates({
|
|
333217
333222
|
build: build2,
|
|
333218
333223
|
artifact,
|
|
333219
|
-
blockInstanceIds: /* @__PURE__ */ new Set([blockId])
|
|
333224
|
+
blockInstanceIds: /* @__PURE__ */ new Set([blockId]),
|
|
333225
|
+
allMdxAssetIds
|
|
333220
333226
|
}).get(blockId) ?? [];
|
|
333221
333227
|
for (const assetId2 of assetIds) {
|
|
333222
333228
|
const documentEntry = documentsById.get(assetId2);
|
|
@@ -333265,7 +333271,8 @@ const resolvePublishedMdxDependencyClosureWithParser = async ({
|
|
|
333265
333271
|
build: build2,
|
|
333266
333272
|
artifact,
|
|
333267
333273
|
blockInstanceIds: reachableIds,
|
|
333268
|
-
allowUnresolved: true
|
|
333274
|
+
allowUnresolved: true,
|
|
333275
|
+
allMdxAssetIds
|
|
333269
333276
|
});
|
|
333270
333277
|
return createPublishedBuildContentCompilationPlan(
|
|
333271
333278
|
build2,
|
|
@@ -333316,7 +333323,8 @@ const resolvePublishedMdxAssetCandidates = ({
|
|
|
333316
333323
|
build: build2,
|
|
333317
333324
|
artifact,
|
|
333318
333325
|
allowUnresolved = false,
|
|
333319
|
-
blockInstanceIds = getPublishedInstanceIds(build2)
|
|
333326
|
+
blockInstanceIds = getPublishedInstanceIds(build2),
|
|
333327
|
+
allMdxAssetIds
|
|
333320
333328
|
}) => {
|
|
333321
333329
|
const instances = new Map(
|
|
333322
333330
|
getBuildValues(build2.instances).map((instance2) => [
|
|
@@ -333343,7 +333351,7 @@ const resolvePublishedMdxAssetCandidates = ({
|
|
|
333343
333351
|
);
|
|
333344
333352
|
const documentGraph = artifact?.documentGraph === void 0 ? void 0 : createDocumentGraph(artifact.documentGraph);
|
|
333345
333353
|
const documents = artifact?.documents ?? [];
|
|
333346
|
-
const evaluateDataSource = (dataSourceId2, path2, visiting = /* @__PURE__ */ new Set()) => {
|
|
333354
|
+
const evaluateDataSource = (dataSourceId2, path2, visiting = /* @__PURE__ */ new Set(), mutableVariables = /* @__PURE__ */ new Set()) => {
|
|
333347
333355
|
if (visiting.has(dataSourceId2)) {
|
|
333348
333356
|
throw new Error("Dynamic MDX source data dependency is cyclic");
|
|
333349
333357
|
}
|
|
@@ -333352,6 +333360,7 @@ const resolvePublishedMdxAssetCandidates = ({
|
|
|
333352
333360
|
return [];
|
|
333353
333361
|
}
|
|
333354
333362
|
if (dataSource2.type === "variable") {
|
|
333363
|
+
mutableVariables.add(dataSourceId2);
|
|
333355
333364
|
return [];
|
|
333356
333365
|
}
|
|
333357
333366
|
if (dataSource2.type === "resource") {
|
|
@@ -333430,7 +333439,8 @@ const resolvePublishedMdxAssetCandidates = ({
|
|
|
333430
333439
|
iterables = evaluateDataSource(
|
|
333431
333440
|
dependencyId,
|
|
333432
333441
|
dataPath.slice(1),
|
|
333433
|
-
visiting
|
|
333442
|
+
visiting,
|
|
333443
|
+
mutableVariables
|
|
333434
333444
|
);
|
|
333435
333445
|
visiting.delete(dataSourceId2);
|
|
333436
333446
|
}
|
|
@@ -333461,8 +333471,14 @@ const resolvePublishedMdxAssetCandidates = ({
|
|
|
333461
333471
|
const path2 = parseStaticMemberPath(source.value);
|
|
333462
333472
|
const dataSourceId2 = path2 === void 0 ? void 0 : decodeDataVariableId(path2[0]);
|
|
333463
333473
|
let assetIds = [];
|
|
333474
|
+
const mutableVariables = /* @__PURE__ */ new Set();
|
|
333464
333475
|
try {
|
|
333465
|
-
assetIds = dataSourceId2 === void 0 || path2 === void 0 ? [] : evaluateDataSource(
|
|
333476
|
+
assetIds = dataSourceId2 === void 0 || path2 === void 0 ? [] : evaluateDataSource(
|
|
333477
|
+
dataSourceId2,
|
|
333478
|
+
path2.slice(1),
|
|
333479
|
+
/* @__PURE__ */ new Set(),
|
|
333480
|
+
mutableVariables
|
|
333481
|
+
).filter(
|
|
333466
333482
|
(value2) => typeof value2 === "string" && value2.length > 0
|
|
333467
333483
|
);
|
|
333468
333484
|
} catch (error) {
|
|
@@ -333470,6 +333486,9 @@ const resolvePublishedMdxAssetCandidates = ({
|
|
|
333470
333486
|
throw error;
|
|
333471
333487
|
}
|
|
333472
333488
|
}
|
|
333489
|
+
if (mutableVariables.size > 0 && allMdxAssetIds !== void 0) {
|
|
333490
|
+
assetIds.push(...allMdxAssetIds);
|
|
333491
|
+
}
|
|
333473
333492
|
if (assetIds.length === 0) {
|
|
333474
333493
|
if (allowUnresolved) {
|
|
333475
333494
|
continue;
|
|
@@ -333845,10 +333864,12 @@ const sync = async (options, dependencies2 = defaultSyncDependencies) => {
|
|
|
333845
333864
|
...project.build,
|
|
333846
333865
|
pages: migratePages(project.build.pages)
|
|
333847
333866
|
};
|
|
333867
|
+
const allMdxAssetIds = getPublishedMdxAssetIds(project.assets);
|
|
333848
333868
|
const projectCandidates = resolvePublishedMdxAssetCandidates({
|
|
333849
333869
|
build: publicationBuild,
|
|
333850
333870
|
artifact: project.assetIndex,
|
|
333851
|
-
allowUnresolved: true
|
|
333871
|
+
allowUnresolved: true,
|
|
333872
|
+
allMdxAssetIds
|
|
333852
333873
|
});
|
|
333853
333874
|
const dynamicBlockIds = getDynamicPublishedMdxSourceBlockIds(publicationBuild);
|
|
333854
333875
|
const publicationPlan = createPublishedBuildContentCompilationPlan(
|
|
@@ -333908,7 +333929,11 @@ const sync = async (options, dependencies2 = defaultSyncDependencies) => {
|
|
|
333908
333929
|
project.assetIndex = await compileContentUntilPlanIsStable({
|
|
333909
333930
|
plan,
|
|
333910
333931
|
compile,
|
|
333911
|
-
resolvePlan: async (artifact) => await resolvePlan({
|
|
333932
|
+
resolvePlan: async (artifact) => await resolvePlan({
|
|
333933
|
+
build: publicationBuild,
|
|
333934
|
+
artifact,
|
|
333935
|
+
allMdxAssetIds
|
|
333936
|
+
})
|
|
333912
333937
|
});
|
|
333913
333938
|
} else {
|
|
333914
333939
|
project.assetIndex = await compile(plan);
|
|
@@ -340698,7 +340723,8 @@ const materializePublishedMdx = async ({
|
|
|
340698
340723
|
cache = createPublishedMdxMaterializationCache(),
|
|
340699
340724
|
dynamicAssetIdsByBlock = /* @__PURE__ */ new Map(),
|
|
340700
340725
|
blockInstanceIds,
|
|
340701
|
-
runtimeAssets: providedRuntimeAssets
|
|
340726
|
+
runtimeAssets: providedRuntimeAssets,
|
|
340727
|
+
loadDocumentSource
|
|
340702
340728
|
}) => {
|
|
340703
340729
|
const documentsById = new Map(
|
|
340704
340730
|
artifact.documents.map((document2) => [document2._id, document2])
|
|
@@ -340726,7 +340752,7 @@ const materializePublishedMdx = async ({
|
|
|
340726
340752
|
assetValueReferences: artifact.assetValueReferences,
|
|
340727
340753
|
runtimeAssets,
|
|
340728
340754
|
load: async (node2) => {
|
|
340729
|
-
const source = artifact.contents?.[node2.contentRef];
|
|
340755
|
+
const source = artifact.contents?.[node2.contentRef] ?? await loadDocumentSource?.(node2);
|
|
340730
340756
|
if (source === void 0 || node2.format === void 0) {
|
|
340731
340757
|
throw new Error(`Published document ${node2.id} is unavailable`);
|
|
340732
340758
|
}
|
|
@@ -340881,6 +340907,26 @@ const materializePublishedMdx = async ({
|
|
|
340881
340907
|
resolution2.references.map((reference) => reference.templateName)
|
|
340882
340908
|
)
|
|
340883
340909
|
);
|
|
340910
|
+
let resolvedFrontmatter = document2.frontmatter.properties;
|
|
340911
|
+
try {
|
|
340912
|
+
resolvedFrontmatter = await resolveFrontmatter(candidate._id, document2);
|
|
340913
|
+
} catch (error) {
|
|
340914
|
+
if (error instanceof DocumentGraphResolutionError && error.code === "REQUEST_CANCELLED") {
|
|
340915
|
+
throw error;
|
|
340916
|
+
}
|
|
340917
|
+
if (error instanceof DocumentGraphResolutionError) {
|
|
340918
|
+
const linkedDocument = error.documentId === void 0 ? "Linked document" : `Linked document "${error.documentId}"`;
|
|
340919
|
+
const reference = error.referenceId === void 0 ? "" : ` (reference "${error.referenceId}")`;
|
|
340920
|
+
const failure = error.code === "DOCUMENT_LOAD_FAILED" ? "could not be loaded" : `could not be resolved: ${error.message}`;
|
|
340921
|
+
warnUnavailableSource({
|
|
340922
|
+
blockInstanceId: block.id,
|
|
340923
|
+
assetId: candidate._id,
|
|
340924
|
+
message: `${linkedDocument} ${failure}${reference} while resolving frontmatter for published MDX Asset "${candidate._id}".`
|
|
340925
|
+
});
|
|
340926
|
+
} else {
|
|
340927
|
+
throw error;
|
|
340928
|
+
}
|
|
340929
|
+
}
|
|
340884
340930
|
const materialized = materializeMdxAuthoredContent({
|
|
340885
340931
|
identity,
|
|
340886
340932
|
document: document2,
|
|
@@ -340913,7 +340959,7 @@ const materializePublishedMdx = async ({
|
|
|
340913
340959
|
dynamic: isDynamicSource,
|
|
340914
340960
|
identity,
|
|
340915
340961
|
document: document2,
|
|
340916
|
-
resolvedFrontmatter
|
|
340962
|
+
resolvedFrontmatter,
|
|
340917
340963
|
fragment: materialized.fragment,
|
|
340918
340964
|
templateDependencies: templates2.dependencies.templates,
|
|
340919
340965
|
templateNames: referencedTemplateNames,
|
|
@@ -346980,6 +347026,7 @@ Please check webstudio --help for more details`
|
|
|
346980
347026
|
const siteData = parsedSiteData.data;
|
|
346981
347027
|
const pages2 = migratePages(siteData.build.pages);
|
|
346982
347028
|
const publicationBuild = { ...siteData.build, pages: pages2 };
|
|
347029
|
+
const allMdxAssetIds = getPublishedMdxAssetIds(siteData.assets);
|
|
346983
347030
|
if (siteData.assetIndex === void 0 && (createPublishedBuildContentCompilationPlan(publicationBuild) !== void 0 || hasDynamicPublishedMdxSources(publicationBuild))) {
|
|
346984
347031
|
throw new Error(
|
|
346985
347032
|
"Assets queries require a content database. Sync the project again before building."
|
|
@@ -347036,10 +347083,11 @@ Please check webstudio --help for more details`
|
|
|
347036
347083
|
}
|
|
347037
347084
|
let dynamicMdxCandidates;
|
|
347038
347085
|
if (hasDynamicPublishedMdxSources(publicationBuild)) {
|
|
347039
|
-
dynamicMdxCandidates =
|
|
347086
|
+
dynamicMdxCandidates = resolvePublishedMdxAssetCandidates({
|
|
347040
347087
|
build: publicationBuild,
|
|
347041
347088
|
artifact: verifiedAssetIndex,
|
|
347042
|
-
allowUnresolved: true
|
|
347089
|
+
allowUnresolved: true,
|
|
347090
|
+
allMdxAssetIds
|
|
347043
347091
|
});
|
|
347044
347092
|
for (const blockInstanceId of getDynamicPublishedMdxSourceBlockIds(
|
|
347045
347093
|
publicationBuild
|
|
@@ -347273,7 +347321,8 @@ Please check webstudio --help for more details`
|
|
|
347273
347321
|
) ? resolvePublishedMdxAssetCandidates({
|
|
347274
347322
|
build: pageBuild,
|
|
347275
347323
|
artifact: verifiedAssetIndex,
|
|
347276
|
-
blockInstanceIds: pendingBlockIds
|
|
347324
|
+
blockInstanceIds: pendingBlockIds,
|
|
347325
|
+
allMdxAssetIds
|
|
347277
347326
|
}) : void 0;
|
|
347278
347327
|
const materialized = await materializePublishedMdx({
|
|
347279
347328
|
route,
|
|
@@ -347294,7 +347343,21 @@ Please check webstudio --help for more details`
|
|
|
347294
347343
|
cache,
|
|
347295
347344
|
dynamicAssetIdsByBlock: pageDynamicCandidates,
|
|
347296
347345
|
blockInstanceIds: pendingBlockIds,
|
|
347297
|
-
runtimeAssets: runtimeAssetsById
|
|
347346
|
+
runtimeAssets: runtimeAssetsById,
|
|
347347
|
+
loadDocumentSource: async ({ contentRef }) => {
|
|
347348
|
+
const source = createReadStream(
|
|
347349
|
+
getLocalAssetPath(
|
|
347350
|
+
contentRef,
|
|
347351
|
+
options.sourceAssetsDirectory ?? join$2(buildRoot, LOCAL_ASSETS_DIR)
|
|
347352
|
+
)
|
|
347353
|
+
);
|
|
347354
|
+
return decodeUtf8$1(
|
|
347355
|
+
await readBoundedBytes(
|
|
347356
|
+
source,
|
|
347357
|
+
contentEngineLimits.hydratedFileBytes
|
|
347358
|
+
)
|
|
347359
|
+
);
|
|
347360
|
+
}
|
|
347298
347361
|
});
|
|
347299
347362
|
for (const root2 of materialized.roots) {
|
|
347300
347363
|
const diagnostic = getUnsafeDynamicPublishedMdxDiagnostic({
|
|
@@ -350363,7 +350426,7 @@ const publishCommandOptions = (yargs) => publishDomainsOption(publishTargetOptio
|
|
|
350363
350426
|
type: "string",
|
|
350364
350427
|
describe: "Optional idempotency key for retrying the same publish"
|
|
350365
350428
|
});
|
|
350366
|
-
const
|
|
350429
|
+
const validatePublishCommandOptions = (yargs) => publishDomainsOption(publishTargetOption(apiCommandOptions(yargs)));
|
|
350367
350430
|
const publishJobCommandOptions = (yargs) => apiCommandOptions(yargs).option("job", {
|
|
350368
350431
|
type: "string",
|
|
350369
350432
|
describe: "Required publish job id returned by publish or unpublish",
|
|
@@ -351803,13 +351866,13 @@ const apiCommandHandlers = {
|
|
|
351803
351866
|
};
|
|
351804
351867
|
return runProjectSessionCommand("publish", input2, connection, dependencies2);
|
|
351805
351868
|
},
|
|
351806
|
-
"
|
|
351869
|
+
"validate-publish": async (options, connection, dependencies2) => {
|
|
351807
351870
|
const input2 = {
|
|
351808
351871
|
target: publishTargetValue(options.target),
|
|
351809
351872
|
domains: listStringOption(options.domain)
|
|
351810
351873
|
};
|
|
351811
351874
|
return runProjectSessionCommand(
|
|
351812
|
-
"
|
|
351875
|
+
"validate-publish",
|
|
351813
351876
|
input2,
|
|
351814
351877
|
connection,
|
|
351815
351878
|
dependencies2
|
|
@@ -352266,7 +352329,7 @@ const apiCommandOptionsByCommand = {
|
|
|
352266
352329
|
"delete-resource": deleteResourceCommandOptions,
|
|
352267
352330
|
"list-domains": paginatedListCommandOptions,
|
|
352268
352331
|
publish: publishCommandOptions,
|
|
352269
|
-
"
|
|
352332
|
+
"validate-publish": validatePublishCommandOptions,
|
|
352270
352333
|
"get-publish-job": publishJobCommandOptions,
|
|
352271
352334
|
unpublish: unpublishCommandOptions,
|
|
352272
352335
|
"create-domain": createDomainCommandOptions,
|
|
@@ -352299,8 +352362,8 @@ const apiCommandMetadata = publicApiOperations.map((operation) => ({
|
|
|
352299
352362
|
const highLevelCliCommands = [
|
|
352300
352363
|
{ command: "audit", operation: "audit" },
|
|
352301
352364
|
{
|
|
352302
|
-
command: "
|
|
352303
|
-
operation: "
|
|
352365
|
+
command: "validate-publish",
|
|
352366
|
+
operation: "validate-publish"
|
|
352304
352367
|
},
|
|
352305
352368
|
{ command: "permissions", operation: "permissions" },
|
|
352306
352369
|
{ command: "get-assets-resource", operation: "get-assets-resource" },
|
|
@@ -352854,7 +352917,7 @@ const apiCommandsByArea = {
|
|
|
352854
352917
|
projectQuality: cliCommandMetadata.filter(({ cliCommand }) => cliCommand === "audit").map(({ cliCommand }) => cliCommand),
|
|
352855
352918
|
assetsAndIndexes: cliCommandMetadata.filter(({ cliCommand }) => cliCommand.includes("asset")).map(({ cliCommand }) => cliCommand),
|
|
352856
352919
|
publishAndDomains: cliCommandMetadata.filter(
|
|
352857
|
-
({ cliCommand }) => cliCommand === "
|
|
352920
|
+
({ cliCommand }) => cliCommand === "validate-publish" || cliCommand.startsWith("publish ") || cliCommand.startsWith("domains ")
|
|
352858
352921
|
).map(({ cliCommand }) => cliCommand),
|
|
352859
352922
|
pagesAndSettings: cliCommandMetadata.filter(
|
|
352860
352923
|
({ cliCommand }) => [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.303.0",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"which": "^5.0.0",
|
|
54
54
|
"yargs": "^17.7.2",
|
|
55
55
|
"zod": "^4.4.3",
|
|
56
|
-
"@webstudio-is/
|
|
57
|
-
"@webstudio-is/
|
|
58
|
-
"@webstudio-is/
|
|
59
|
-
"@webstudio-is/
|
|
56
|
+
"@webstudio-is/protocol": "0.303.0",
|
|
57
|
+
"@webstudio-is/sync-client": "0.0.0",
|
|
58
|
+
"@webstudio-is/http-client": "0.303.0",
|
|
59
|
+
"@webstudio-is/project-migrations": "0.303.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@cloudflare/vite-plugin": "^1.1.0",
|
|
@@ -99,24 +99,24 @@
|
|
|
99
99
|
"vite": "^6.3.4",
|
|
100
100
|
"vitest": "^3.1.2",
|
|
101
101
|
"wrangler": "4.130.0",
|
|
102
|
-
"@webstudio-is/css-engine": "0.
|
|
103
|
-
"@webstudio-is/
|
|
104
|
-
"@webstudio-is/
|
|
105
|
-
"@webstudio-is/
|
|
106
|
-
"@webstudio-is/image": "0.
|
|
102
|
+
"@webstudio-is/css-engine": "0.303.0",
|
|
103
|
+
"@webstudio-is/expression": "0.303.0",
|
|
104
|
+
"@webstudio-is/content-engine": "0.303.0",
|
|
105
|
+
"@webstudio-is/fonts": "0.303.0",
|
|
106
|
+
"@webstudio-is/image": "0.303.0",
|
|
107
107
|
"@webstudio-is/project-build": "0.0.0",
|
|
108
|
-
"@webstudio-is/
|
|
109
|
-
"@webstudio-is/
|
|
110
|
-
"@webstudio-is/sdk
|
|
111
|
-
"@webstudio-is/sdk": "0.
|
|
112
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
113
|
-
"@webstudio-is/sdk-components-react-
|
|
114
|
-
"@webstudio-is/sdk-components-react-
|
|
115
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
116
|
-
"@webstudio-is/sdk-components-registry": "0.
|
|
108
|
+
"@webstudio-is/react-sdk": "0.303.0",
|
|
109
|
+
"@webstudio-is/query-builder": "0.303.0",
|
|
110
|
+
"@webstudio-is/sdk": "0.303.0",
|
|
111
|
+
"@webstudio-is/sdk-components-animation": "0.303.0",
|
|
112
|
+
"@webstudio-is/sdk-components-react": "0.303.0",
|
|
113
|
+
"@webstudio-is/sdk-components-react-radix": "0.303.0",
|
|
114
|
+
"@webstudio-is/sdk-components-react-remix": "0.303.0",
|
|
115
|
+
"@webstudio-is/sdk-components-react-router": "0.303.0",
|
|
116
|
+
"@webstudio-is/sdk-components-registry": "0.303.0",
|
|
117
117
|
"@webstudio-is/tsconfig": "1.0.7",
|
|
118
118
|
"@webstudio-is/vision": "0.0.0",
|
|
119
|
-
"@webstudio-is/wsauth": "0.
|
|
119
|
+
"@webstudio-is/wsauth": "0.303.0"
|
|
120
120
|
},
|
|
121
121
|
"scripts": {
|
|
122
122
|
"typecheck": "tsc --noEmit",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"@remix-run/node": "2.16.5",
|
|
14
14
|
"@remix-run/react": "2.16.5",
|
|
15
15
|
"@remix-run/server-runtime": "2.16.5",
|
|
16
|
-
"@webstudio-is/image": "0.
|
|
17
|
-
"@webstudio-is/react-sdk": "0.
|
|
18
|
-
"@webstudio-is/sdk": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
20
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
21
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
22
|
-
"@webstudio-is/sdk-components-react-remix": "0.
|
|
23
|
-
"@webstudio-is/wsauth": "0.
|
|
16
|
+
"@webstudio-is/image": "0.303.0",
|
|
17
|
+
"@webstudio-is/react-sdk": "0.303.0",
|
|
18
|
+
"@webstudio-is/sdk": "0.303.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.303.0",
|
|
20
|
+
"@webstudio-is/sdk-components-animation": "0.303.0",
|
|
21
|
+
"@webstudio-is/sdk-components-react-radix": "0.303.0",
|
|
22
|
+
"@webstudio-is/sdk-components-react-remix": "0.303.0",
|
|
23
|
+
"@webstudio-is/wsauth": "0.303.0",
|
|
24
24
|
"isbot": "^5.1.25",
|
|
25
25
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
26
26
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"@react-router/fs-routes": "^7.5.3",
|
|
16
16
|
"@react-router/node": "^7.5.3",
|
|
17
17
|
"@react-router/serve": "^7.5.3",
|
|
18
|
-
"@webstudio-is/image": "0.
|
|
19
|
-
"@webstudio-is/react-sdk": "0.
|
|
20
|
-
"@webstudio-is/sdk": "0.
|
|
21
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
22
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
23
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
24
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
25
|
-
"@webstudio-is/wsauth": "0.
|
|
18
|
+
"@webstudio-is/image": "0.303.0",
|
|
19
|
+
"@webstudio-is/react-sdk": "0.303.0",
|
|
20
|
+
"@webstudio-is/sdk": "0.303.0",
|
|
21
|
+
"@webstudio-is/sdk-components-animation": "0.303.0",
|
|
22
|
+
"@webstudio-is/sdk-components-react-radix": "0.303.0",
|
|
23
|
+
"@webstudio-is/sdk-components-react-router": "0.303.0",
|
|
24
|
+
"@webstudio-is/sdk-components-react": "0.303.0",
|
|
25
|
+
"@webstudio-is/wsauth": "0.303.0",
|
|
26
26
|
"isbot": "^5.1.25",
|
|
27
27
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
28
28
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@shikijs/langs": "4.4.1",
|
|
13
13
|
"@shikijs/themes": "4.4.1",
|
|
14
|
-
"@webstudio-is/image": "0.
|
|
15
|
-
"@webstudio-is/react-sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
14
|
+
"@webstudio-is/image": "0.303.0",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.303.0",
|
|
16
|
+
"@webstudio-is/sdk": "0.303.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.303.0",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.303.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.303.0",
|
|
20
20
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
21
21
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
22
22
|
"shiki": "4.4.1",
|