siteplane 0.1.46 → 0.1.47
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/README.md +5 -0
- package/dist/bin/siteplane.js +25 -4
- package/dist/index.js +2 -2
- package/dist/next.js +25 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,11 @@ activation, import, reporting, booking or publishing rights. Standalone bootstra
|
|
|
39
39
|
`setup prepare` installs the task's exact packages and creates the narrow official runtime integration.
|
|
40
40
|
The agent chooses and instruments content, then persists a separate, bounded summary:
|
|
41
41
|
|
|
42
|
+
For a direct field ID, put `siteplane.attrs(fieldId, { routeKey })` on the visible
|
|
43
|
+
element using the same canonical route pattern as its value call. The value call
|
|
44
|
+
does not attach DOM metadata. Missing or mismatched DOM routes block apply and
|
|
45
|
+
the Next build; dynamic pages use their pattern, such as `/services/[slug]`.
|
|
46
|
+
|
|
42
47
|
```bash
|
|
43
48
|
siteplane setup apply --definition editor-definition.json --selection-summary-file selection.txt
|
|
44
49
|
siteplane setup deploy --wait
|
package/dist/bin/siteplane.js
CHANGED
|
@@ -2195,8 +2195,8 @@ var EARLY_ACCESS_PLAN = {
|
|
|
2195
2195
|
customAdminDomainsEnabled: true,
|
|
2196
2196
|
agentMcpEnabled: true,
|
|
2197
2197
|
emailNotificationsEnabled: true,
|
|
2198
|
-
analyticsEnabled:
|
|
2199
|
-
analyticsSitesLimit:
|
|
2198
|
+
analyticsEnabled: true,
|
|
2199
|
+
analyticsSitesLimit: 3,
|
|
2200
2200
|
analyticsPortalPerformanceEnabled: false,
|
|
2201
2201
|
analyticsMonthlyReportsEnabled: false,
|
|
2202
2202
|
analyticsAiSummaryEnabled: false,
|
|
@@ -4309,6 +4309,7 @@ function scanSourceFacts(files) {
|
|
|
4309
4309
|
const hardErrors = [];
|
|
4310
4310
|
const warnings = [];
|
|
4311
4311
|
const suggestions = [];
|
|
4312
|
+
const directAttrs = [];
|
|
4312
4313
|
const eventPreviewAttrs = [];
|
|
4313
4314
|
const eventPreviewComponentPropConsumers = [];
|
|
4314
4315
|
const eventPreviewComponentPropUsages = [];
|
|
@@ -4316,6 +4317,7 @@ function scanSourceFacts(files) {
|
|
|
4316
4317
|
let hasGenericEventPreviewConsumer = false;
|
|
4317
4318
|
for (const file of files) {
|
|
4318
4319
|
const facts = scanSourceFile2(file, fields, hardErrors);
|
|
4320
|
+
directAttrs.push(...facts.directAttrs);
|
|
4319
4321
|
eventPreviewAttrs.push(...facts.eventPreviewAttrs);
|
|
4320
4322
|
eventPreviewComponentPropConsumers.push(...facts.eventPreviewComponentPropConsumers);
|
|
4321
4323
|
eventPreviewComponentPropUsages.push(...facts.eventPreviewComponentPropUsages);
|
|
@@ -4329,6 +4331,18 @@ function scanSourceFacts(files) {
|
|
|
4329
4331
|
eventPreviewConsumerFieldIds.add(usage.fieldId);
|
|
4330
4332
|
}
|
|
4331
4333
|
}
|
|
4334
|
+
for (const attr of directAttrs) {
|
|
4335
|
+
const field = fields.find((candidate) => candidate.fieldId === attr.fieldId);
|
|
4336
|
+
const expectedRoute = field?.technicalRouteKey ?? field?.routeHint;
|
|
4337
|
+
if (!attr.routeKey || expectedRoute && attr.routeKey !== expectedRoute) {
|
|
4338
|
+
hardErrors.push({
|
|
4339
|
+
code: attr.routeKey ? "field_scan.attrs_route_key_mismatch" : "field_scan.attrs_route_key_missing",
|
|
4340
|
+
message: `DOM attrs for ${attr.fieldId} must include the same canonical routeKey as its value call${expectedRoute ? ` (${expectedRoute})` : ""}. Pass it explicitly to siteplane.attrs(fieldId, { routeKey }); the value call does not attach DOM metadata.`,
|
|
4341
|
+
fieldId: attr.fieldId,
|
|
4342
|
+
filePath: attr.filePath
|
|
4343
|
+
});
|
|
4344
|
+
}
|
|
4345
|
+
}
|
|
4332
4346
|
markMissingEventPreviewHandlerErrors(eventPreviewAttrs, eventPreviewConsumerFieldIds, hasGenericEventPreviewConsumer, hardErrors);
|
|
4333
4347
|
validateScannedFields(fields, hardErrors, warnings, suggestions);
|
|
4334
4348
|
return {
|
|
@@ -4354,6 +4368,7 @@ function scanSourceFile2(file, fields, hardErrors) {
|
|
|
4354
4368
|
const fieldsInFile = [];
|
|
4355
4369
|
const attrFieldIds = /* @__PURE__ */ new Set();
|
|
4356
4370
|
const attrRouteRefs = /* @__PURE__ */ new Set();
|
|
4371
|
+
const directAttrs = [];
|
|
4357
4372
|
const eventPreviewAttrs = [];
|
|
4358
4373
|
const eventPreviewAttrVariables = /* @__PURE__ */ new Map();
|
|
4359
4374
|
const eventPreviewComponentPropConsumers = [];
|
|
@@ -4375,7 +4390,7 @@ function scanSourceFile2(file, fields, hardErrors) {
|
|
|
4375
4390
|
collectEventPreviewComponentPropUsages(node, eventPreviewAttrVariables, eventPreviewComponentPropUsages, file);
|
|
4376
4391
|
}
|
|
4377
4392
|
if (ts2.isCallExpression(node)) {
|
|
4378
|
-
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file);
|
|
4393
|
+
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file);
|
|
4379
4394
|
collectUnusedValueCallError(node, hardErrors, file);
|
|
4380
4395
|
const extractedFields = extractFunctionFields(node, file);
|
|
4381
4396
|
for (const field of extractedFields) {
|
|
@@ -4403,6 +4418,7 @@ function scanSourceFile2(file, fields, hardErrors) {
|
|
|
4403
4418
|
visit(sourceFile);
|
|
4404
4419
|
markMissingAttrsWarnings(fieldsInFile, attrFieldIds, attrRouteRefs);
|
|
4405
4420
|
return {
|
|
4421
|
+
directAttrs,
|
|
4406
4422
|
eventPreviewAttrs,
|
|
4407
4423
|
eventPreviewComponentPropConsumers,
|
|
4408
4424
|
eventPreviewComponentPropUsages,
|
|
@@ -4583,7 +4599,7 @@ function createFallbackHash(fieldType, fallback) {
|
|
|
4583
4599
|
return void 0;
|
|
4584
4600
|
}
|
|
4585
4601
|
}
|
|
4586
|
-
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file) {
|
|
4602
|
+
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file) {
|
|
4587
4603
|
if (!ts2.isPropertyAccessExpression(node.expression)) {
|
|
4588
4604
|
return;
|
|
4589
4605
|
}
|
|
@@ -4595,6 +4611,11 @@ function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs,
|
|
|
4595
4611
|
const directFieldId = staticExpressionValue2(firstArg);
|
|
4596
4612
|
if (typeof directFieldId === "string") {
|
|
4597
4613
|
attrFieldIds.add(directFieldId);
|
|
4614
|
+
directAttrs.push({
|
|
4615
|
+
fieldId: directFieldId,
|
|
4616
|
+
routeKey: secondArg && typeof secondArg === "object" && "routeKey" in secondArg ? stringValue2(secondArg.routeKey) : void 0,
|
|
4617
|
+
filePath: file.filePath
|
|
4618
|
+
});
|
|
4598
4619
|
if (hasEventPreviewStrategy(secondArg)) {
|
|
4599
4620
|
eventPreviewAttrs.push({
|
|
4600
4621
|
fieldId: directFieldId,
|
package/dist/index.js
CHANGED
|
@@ -1923,8 +1923,8 @@ var EARLY_ACCESS_PLAN = {
|
|
|
1923
1923
|
customAdminDomainsEnabled: true,
|
|
1924
1924
|
agentMcpEnabled: true,
|
|
1925
1925
|
emailNotificationsEnabled: true,
|
|
1926
|
-
analyticsEnabled:
|
|
1927
|
-
analyticsSitesLimit:
|
|
1926
|
+
analyticsEnabled: true,
|
|
1927
|
+
analyticsSitesLimit: 3,
|
|
1928
1928
|
analyticsPortalPerformanceEnabled: false,
|
|
1929
1929
|
analyticsMonthlyReportsEnabled: false,
|
|
1930
1930
|
analyticsAiSummaryEnabled: false,
|
package/dist/next.js
CHANGED
|
@@ -2126,8 +2126,8 @@ var EARLY_ACCESS_PLAN = {
|
|
|
2126
2126
|
customAdminDomainsEnabled: true,
|
|
2127
2127
|
agentMcpEnabled: true,
|
|
2128
2128
|
emailNotificationsEnabled: true,
|
|
2129
|
-
analyticsEnabled:
|
|
2130
|
-
analyticsSitesLimit:
|
|
2129
|
+
analyticsEnabled: true,
|
|
2130
|
+
analyticsSitesLimit: 3,
|
|
2131
2131
|
analyticsPortalPerformanceEnabled: false,
|
|
2132
2132
|
analyticsMonthlyReportsEnabled: false,
|
|
2133
2133
|
analyticsAiSummaryEnabled: false,
|
|
@@ -3054,6 +3054,7 @@ function scanSourceFacts(files) {
|
|
|
3054
3054
|
const hardErrors = [];
|
|
3055
3055
|
const warnings = [];
|
|
3056
3056
|
const suggestions = [];
|
|
3057
|
+
const directAttrs = [];
|
|
3057
3058
|
const eventPreviewAttrs = [];
|
|
3058
3059
|
const eventPreviewComponentPropConsumers = [];
|
|
3059
3060
|
const eventPreviewComponentPropUsages = [];
|
|
@@ -3061,6 +3062,7 @@ function scanSourceFacts(files) {
|
|
|
3061
3062
|
let hasGenericEventPreviewConsumer = false;
|
|
3062
3063
|
for (const file of files) {
|
|
3063
3064
|
const facts = scanSourceFile(file, fields, hardErrors);
|
|
3065
|
+
directAttrs.push(...facts.directAttrs);
|
|
3064
3066
|
eventPreviewAttrs.push(...facts.eventPreviewAttrs);
|
|
3065
3067
|
eventPreviewComponentPropConsumers.push(...facts.eventPreviewComponentPropConsumers);
|
|
3066
3068
|
eventPreviewComponentPropUsages.push(...facts.eventPreviewComponentPropUsages);
|
|
@@ -3074,6 +3076,18 @@ function scanSourceFacts(files) {
|
|
|
3074
3076
|
eventPreviewConsumerFieldIds.add(usage.fieldId);
|
|
3075
3077
|
}
|
|
3076
3078
|
}
|
|
3079
|
+
for (const attr of directAttrs) {
|
|
3080
|
+
const field = fields.find((candidate) => candidate.fieldId === attr.fieldId);
|
|
3081
|
+
const expectedRoute = field?.technicalRouteKey ?? field?.routeHint;
|
|
3082
|
+
if (!attr.routeKey || expectedRoute && attr.routeKey !== expectedRoute) {
|
|
3083
|
+
hardErrors.push({
|
|
3084
|
+
code: attr.routeKey ? "field_scan.attrs_route_key_mismatch" : "field_scan.attrs_route_key_missing",
|
|
3085
|
+
message: `DOM attrs for ${attr.fieldId} must include the same canonical routeKey as its value call${expectedRoute ? ` (${expectedRoute})` : ""}. Pass it explicitly to siteplane.attrs(fieldId, { routeKey }); the value call does not attach DOM metadata.`,
|
|
3086
|
+
fieldId: attr.fieldId,
|
|
3087
|
+
filePath: attr.filePath
|
|
3088
|
+
});
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3077
3091
|
markMissingEventPreviewHandlerErrors(eventPreviewAttrs, eventPreviewConsumerFieldIds, hasGenericEventPreviewConsumer, hardErrors);
|
|
3078
3092
|
validateScannedFields(fields, hardErrors, warnings, suggestions);
|
|
3079
3093
|
return {
|
|
@@ -3099,6 +3113,7 @@ function scanSourceFile(file, fields, hardErrors) {
|
|
|
3099
3113
|
const fieldsInFile = [];
|
|
3100
3114
|
const attrFieldIds = /* @__PURE__ */ new Set();
|
|
3101
3115
|
const attrRouteRefs = /* @__PURE__ */ new Set();
|
|
3116
|
+
const directAttrs = [];
|
|
3102
3117
|
const eventPreviewAttrs = [];
|
|
3103
3118
|
const eventPreviewAttrVariables = /* @__PURE__ */ new Map();
|
|
3104
3119
|
const eventPreviewComponentPropConsumers = [];
|
|
@@ -3120,7 +3135,7 @@ function scanSourceFile(file, fields, hardErrors) {
|
|
|
3120
3135
|
collectEventPreviewComponentPropUsages(node, eventPreviewAttrVariables, eventPreviewComponentPropUsages, file);
|
|
3121
3136
|
}
|
|
3122
3137
|
if (ts2.isCallExpression(node)) {
|
|
3123
|
-
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file);
|
|
3138
|
+
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file);
|
|
3124
3139
|
collectUnusedValueCallError(node, hardErrors, file);
|
|
3125
3140
|
const extractedFields = extractFunctionFields(node, file);
|
|
3126
3141
|
for (const field of extractedFields) {
|
|
@@ -3148,6 +3163,7 @@ function scanSourceFile(file, fields, hardErrors) {
|
|
|
3148
3163
|
visit(sourceFile);
|
|
3149
3164
|
markMissingAttrsWarnings(fieldsInFile, attrFieldIds, attrRouteRefs);
|
|
3150
3165
|
return {
|
|
3166
|
+
directAttrs,
|
|
3151
3167
|
eventPreviewAttrs,
|
|
3152
3168
|
eventPreviewComponentPropConsumers,
|
|
3153
3169
|
eventPreviewComponentPropUsages,
|
|
@@ -3328,7 +3344,7 @@ function createFallbackHash(fieldType, fallback) {
|
|
|
3328
3344
|
return void 0;
|
|
3329
3345
|
}
|
|
3330
3346
|
}
|
|
3331
|
-
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file) {
|
|
3347
|
+
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file) {
|
|
3332
3348
|
if (!ts2.isPropertyAccessExpression(node.expression)) {
|
|
3333
3349
|
return;
|
|
3334
3350
|
}
|
|
@@ -3340,6 +3356,11 @@ function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs,
|
|
|
3340
3356
|
const directFieldId = staticExpressionValue(firstArg);
|
|
3341
3357
|
if (typeof directFieldId === "string") {
|
|
3342
3358
|
attrFieldIds.add(directFieldId);
|
|
3359
|
+
directAttrs.push({
|
|
3360
|
+
fieldId: directFieldId,
|
|
3361
|
+
routeKey: secondArg && typeof secondArg === "object" && "routeKey" in secondArg ? stringValue(secondArg.routeKey) : void 0,
|
|
3362
|
+
filePath: file.filePath
|
|
3363
|
+
});
|
|
3343
3364
|
if (hasEventPreviewStrategy(secondArg)) {
|
|
3344
3365
|
eventPreviewAttrs.push({
|
|
3345
3366
|
fieldId: directFieldId,
|