siteplane 0.1.46 → 0.1.48
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 +30 -5
- package/dist/index.js +6 -2
- package/dist/next.js +29 -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
|
@@ -1864,6 +1864,7 @@ var activateSetupModulesInputSchema = activateSiteSetupInputSchema.extend({
|
|
|
1864
1864
|
z16.object({ decision: z16.literal("pending") }).strict(),
|
|
1865
1865
|
z16.object({
|
|
1866
1866
|
decision: z16.literal("enable"),
|
|
1867
|
+
readinessTestRunId: z16.string().regex(/^analytics_owner_[0-9a-f-]{36}$/u),
|
|
1867
1868
|
expectedInstallationGeneration: z16.number().int().positive(),
|
|
1868
1869
|
measurementApproved: z16.literal(true)
|
|
1869
1870
|
}).strict(),
|
|
@@ -2195,8 +2196,8 @@ var EARLY_ACCESS_PLAN = {
|
|
|
2195
2196
|
customAdminDomainsEnabled: true,
|
|
2196
2197
|
agentMcpEnabled: true,
|
|
2197
2198
|
emailNotificationsEnabled: true,
|
|
2198
|
-
analyticsEnabled:
|
|
2199
|
-
analyticsSitesLimit:
|
|
2199
|
+
analyticsEnabled: true,
|
|
2200
|
+
analyticsSitesLimit: 3,
|
|
2200
2201
|
analyticsPortalPerformanceEnabled: false,
|
|
2201
2202
|
analyticsMonthlyReportsEnabled: false,
|
|
2202
2203
|
analyticsAiSummaryEnabled: false,
|
|
@@ -2211,6 +2212,9 @@ var EARLY_ACCESS_PLAN = {
|
|
|
2211
2212
|
bookingRemindersEnabled: true
|
|
2212
2213
|
};
|
|
2213
2214
|
|
|
2215
|
+
// ../shared/dist/first-party-image-upload.js
|
|
2216
|
+
var maxFirstPartyImageUploadBytes = 4 * 1024 * 1024;
|
|
2217
|
+
|
|
2214
2218
|
// ../shared/dist/readiness.js
|
|
2215
2219
|
import { z as z23 } from "zod";
|
|
2216
2220
|
var READINESS_CHECK_KEYS = [
|
|
@@ -4309,6 +4313,7 @@ function scanSourceFacts(files) {
|
|
|
4309
4313
|
const hardErrors = [];
|
|
4310
4314
|
const warnings = [];
|
|
4311
4315
|
const suggestions = [];
|
|
4316
|
+
const directAttrs = [];
|
|
4312
4317
|
const eventPreviewAttrs = [];
|
|
4313
4318
|
const eventPreviewComponentPropConsumers = [];
|
|
4314
4319
|
const eventPreviewComponentPropUsages = [];
|
|
@@ -4316,6 +4321,7 @@ function scanSourceFacts(files) {
|
|
|
4316
4321
|
let hasGenericEventPreviewConsumer = false;
|
|
4317
4322
|
for (const file of files) {
|
|
4318
4323
|
const facts = scanSourceFile2(file, fields, hardErrors);
|
|
4324
|
+
directAttrs.push(...facts.directAttrs);
|
|
4319
4325
|
eventPreviewAttrs.push(...facts.eventPreviewAttrs);
|
|
4320
4326
|
eventPreviewComponentPropConsumers.push(...facts.eventPreviewComponentPropConsumers);
|
|
4321
4327
|
eventPreviewComponentPropUsages.push(...facts.eventPreviewComponentPropUsages);
|
|
@@ -4329,6 +4335,18 @@ function scanSourceFacts(files) {
|
|
|
4329
4335
|
eventPreviewConsumerFieldIds.add(usage.fieldId);
|
|
4330
4336
|
}
|
|
4331
4337
|
}
|
|
4338
|
+
for (const attr of directAttrs) {
|
|
4339
|
+
const field = fields.find((candidate) => candidate.fieldId === attr.fieldId);
|
|
4340
|
+
const expectedRoute = field?.technicalRouteKey ?? field?.routeHint;
|
|
4341
|
+
if (!attr.routeKey || expectedRoute && attr.routeKey !== expectedRoute) {
|
|
4342
|
+
hardErrors.push({
|
|
4343
|
+
code: attr.routeKey ? "field_scan.attrs_route_key_mismatch" : "field_scan.attrs_route_key_missing",
|
|
4344
|
+
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.`,
|
|
4345
|
+
fieldId: attr.fieldId,
|
|
4346
|
+
filePath: attr.filePath
|
|
4347
|
+
});
|
|
4348
|
+
}
|
|
4349
|
+
}
|
|
4332
4350
|
markMissingEventPreviewHandlerErrors(eventPreviewAttrs, eventPreviewConsumerFieldIds, hasGenericEventPreviewConsumer, hardErrors);
|
|
4333
4351
|
validateScannedFields(fields, hardErrors, warnings, suggestions);
|
|
4334
4352
|
return {
|
|
@@ -4354,6 +4372,7 @@ function scanSourceFile2(file, fields, hardErrors) {
|
|
|
4354
4372
|
const fieldsInFile = [];
|
|
4355
4373
|
const attrFieldIds = /* @__PURE__ */ new Set();
|
|
4356
4374
|
const attrRouteRefs = /* @__PURE__ */ new Set();
|
|
4375
|
+
const directAttrs = [];
|
|
4357
4376
|
const eventPreviewAttrs = [];
|
|
4358
4377
|
const eventPreviewAttrVariables = /* @__PURE__ */ new Map();
|
|
4359
4378
|
const eventPreviewComponentPropConsumers = [];
|
|
@@ -4375,7 +4394,7 @@ function scanSourceFile2(file, fields, hardErrors) {
|
|
|
4375
4394
|
collectEventPreviewComponentPropUsages(node, eventPreviewAttrVariables, eventPreviewComponentPropUsages, file);
|
|
4376
4395
|
}
|
|
4377
4396
|
if (ts2.isCallExpression(node)) {
|
|
4378
|
-
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file);
|
|
4397
|
+
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file);
|
|
4379
4398
|
collectUnusedValueCallError(node, hardErrors, file);
|
|
4380
4399
|
const extractedFields = extractFunctionFields(node, file);
|
|
4381
4400
|
for (const field of extractedFields) {
|
|
@@ -4403,6 +4422,7 @@ function scanSourceFile2(file, fields, hardErrors) {
|
|
|
4403
4422
|
visit(sourceFile);
|
|
4404
4423
|
markMissingAttrsWarnings(fieldsInFile, attrFieldIds, attrRouteRefs);
|
|
4405
4424
|
return {
|
|
4425
|
+
directAttrs,
|
|
4406
4426
|
eventPreviewAttrs,
|
|
4407
4427
|
eventPreviewComponentPropConsumers,
|
|
4408
4428
|
eventPreviewComponentPropUsages,
|
|
@@ -4583,7 +4603,7 @@ function createFallbackHash(fieldType, fallback) {
|
|
|
4583
4603
|
return void 0;
|
|
4584
4604
|
}
|
|
4585
4605
|
}
|
|
4586
|
-
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file) {
|
|
4606
|
+
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file) {
|
|
4587
4607
|
if (!ts2.isPropertyAccessExpression(node.expression)) {
|
|
4588
4608
|
return;
|
|
4589
4609
|
}
|
|
@@ -4595,6 +4615,11 @@ function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs,
|
|
|
4595
4615
|
const directFieldId = staticExpressionValue2(firstArg);
|
|
4596
4616
|
if (typeof directFieldId === "string") {
|
|
4597
4617
|
attrFieldIds.add(directFieldId);
|
|
4618
|
+
directAttrs.push({
|
|
4619
|
+
fieldId: directFieldId,
|
|
4620
|
+
routeKey: secondArg && typeof secondArg === "object" && "routeKey" in secondArg ? stringValue2(secondArg.routeKey) : void 0,
|
|
4621
|
+
filePath: file.filePath
|
|
4622
|
+
});
|
|
4598
4623
|
if (hasEventPreviewStrategy(secondArg)) {
|
|
4599
4624
|
eventPreviewAttrs.push({
|
|
4600
4625
|
fieldId: directFieldId,
|
|
@@ -5658,7 +5683,6 @@ async function setupDeployCommand(input, deps = defaults) {
|
|
|
5658
5683
|
SITEPLANE_SETUP_RUN_ID: config.runId,
|
|
5659
5684
|
SITEPLANE_PORTAL_PATH: task.site.portalPath,
|
|
5660
5685
|
SITEPLANE_BUILD_FIELD_CONTRACT_HASH: config.fieldContractHash,
|
|
5661
|
-
SITEPLANE_BUILD_REVISION: revision,
|
|
5662
5686
|
...analyticsPublicKey ? {
|
|
5663
5687
|
NEXT_PUBLIC_SITEPLANE_ANALYTICS_SITE_KEY: analyticsPublicKey,
|
|
5664
5688
|
NEXT_PUBLIC_SITEPLANE_ANALYTICS_ENDPOINT: `${config.apiBaseUrl.replace(/\/$/u, "")}/api/analytics/collect`
|
|
@@ -5666,6 +5690,7 @@ async function setupDeployCommand(input, deps = defaults) {
|
|
|
5666
5690
|
};
|
|
5667
5691
|
const fingerprint = digest({
|
|
5668
5692
|
publicBindings,
|
|
5693
|
+
revision,
|
|
5669
5694
|
siteId: config.siteId,
|
|
5670
5695
|
publicKeyId: config.publicSiteKeyId,
|
|
5671
5696
|
apiBaseUrl: config.apiBaseUrl,
|
package/dist/index.js
CHANGED
|
@@ -1592,6 +1592,7 @@ var activateSetupModulesInputSchema = activateSiteSetupInputSchema.extend({
|
|
|
1592
1592
|
z16.object({ decision: z16.literal("pending") }).strict(),
|
|
1593
1593
|
z16.object({
|
|
1594
1594
|
decision: z16.literal("enable"),
|
|
1595
|
+
readinessTestRunId: z16.string().regex(/^analytics_owner_[0-9a-f-]{36}$/u),
|
|
1595
1596
|
expectedInstallationGeneration: z16.number().int().positive(),
|
|
1596
1597
|
measurementApproved: z16.literal(true)
|
|
1597
1598
|
}).strict(),
|
|
@@ -1923,8 +1924,8 @@ var EARLY_ACCESS_PLAN = {
|
|
|
1923
1924
|
customAdminDomainsEnabled: true,
|
|
1924
1925
|
agentMcpEnabled: true,
|
|
1925
1926
|
emailNotificationsEnabled: true,
|
|
1926
|
-
analyticsEnabled:
|
|
1927
|
-
analyticsSitesLimit:
|
|
1927
|
+
analyticsEnabled: true,
|
|
1928
|
+
analyticsSitesLimit: 3,
|
|
1928
1929
|
analyticsPortalPerformanceEnabled: false,
|
|
1929
1930
|
analyticsMonthlyReportsEnabled: false,
|
|
1930
1931
|
analyticsAiSummaryEnabled: false,
|
|
@@ -1939,6 +1940,9 @@ var EARLY_ACCESS_PLAN = {
|
|
|
1939
1940
|
bookingRemindersEnabled: true
|
|
1940
1941
|
};
|
|
1941
1942
|
|
|
1943
|
+
// ../shared/dist/first-party-image-upload.js
|
|
1944
|
+
var maxFirstPartyImageUploadBytes = 4 * 1024 * 1024;
|
|
1945
|
+
|
|
1942
1946
|
// ../shared/dist/readiness.js
|
|
1943
1947
|
import { z as z23 } from "zod";
|
|
1944
1948
|
var READINESS_CHECK_KEYS = [
|
package/dist/next.js
CHANGED
|
@@ -1795,6 +1795,7 @@ var activateSetupModulesInputSchema = activateSiteSetupInputSchema.extend({
|
|
|
1795
1795
|
z16.object({ decision: z16.literal("pending") }).strict(),
|
|
1796
1796
|
z16.object({
|
|
1797
1797
|
decision: z16.literal("enable"),
|
|
1798
|
+
readinessTestRunId: z16.string().regex(/^analytics_owner_[0-9a-f-]{36}$/u),
|
|
1798
1799
|
expectedInstallationGeneration: z16.number().int().positive(),
|
|
1799
1800
|
measurementApproved: z16.literal(true)
|
|
1800
1801
|
}).strict(),
|
|
@@ -2126,8 +2127,8 @@ var EARLY_ACCESS_PLAN = {
|
|
|
2126
2127
|
customAdminDomainsEnabled: true,
|
|
2127
2128
|
agentMcpEnabled: true,
|
|
2128
2129
|
emailNotificationsEnabled: true,
|
|
2129
|
-
analyticsEnabled:
|
|
2130
|
-
analyticsSitesLimit:
|
|
2130
|
+
analyticsEnabled: true,
|
|
2131
|
+
analyticsSitesLimit: 3,
|
|
2131
2132
|
analyticsPortalPerformanceEnabled: false,
|
|
2132
2133
|
analyticsMonthlyReportsEnabled: false,
|
|
2133
2134
|
analyticsAiSummaryEnabled: false,
|
|
@@ -2142,6 +2143,9 @@ var EARLY_ACCESS_PLAN = {
|
|
|
2142
2143
|
bookingRemindersEnabled: true
|
|
2143
2144
|
};
|
|
2144
2145
|
|
|
2146
|
+
// ../shared/dist/first-party-image-upload.js
|
|
2147
|
+
var maxFirstPartyImageUploadBytes = 4 * 1024 * 1024;
|
|
2148
|
+
|
|
2145
2149
|
// ../shared/dist/readiness.js
|
|
2146
2150
|
import { z as z23 } from "zod";
|
|
2147
2151
|
var READINESS_CHECK_KEYS = [
|
|
@@ -3054,6 +3058,7 @@ function scanSourceFacts(files) {
|
|
|
3054
3058
|
const hardErrors = [];
|
|
3055
3059
|
const warnings = [];
|
|
3056
3060
|
const suggestions = [];
|
|
3061
|
+
const directAttrs = [];
|
|
3057
3062
|
const eventPreviewAttrs = [];
|
|
3058
3063
|
const eventPreviewComponentPropConsumers = [];
|
|
3059
3064
|
const eventPreviewComponentPropUsages = [];
|
|
@@ -3061,6 +3066,7 @@ function scanSourceFacts(files) {
|
|
|
3061
3066
|
let hasGenericEventPreviewConsumer = false;
|
|
3062
3067
|
for (const file of files) {
|
|
3063
3068
|
const facts = scanSourceFile(file, fields, hardErrors);
|
|
3069
|
+
directAttrs.push(...facts.directAttrs);
|
|
3064
3070
|
eventPreviewAttrs.push(...facts.eventPreviewAttrs);
|
|
3065
3071
|
eventPreviewComponentPropConsumers.push(...facts.eventPreviewComponentPropConsumers);
|
|
3066
3072
|
eventPreviewComponentPropUsages.push(...facts.eventPreviewComponentPropUsages);
|
|
@@ -3074,6 +3080,18 @@ function scanSourceFacts(files) {
|
|
|
3074
3080
|
eventPreviewConsumerFieldIds.add(usage.fieldId);
|
|
3075
3081
|
}
|
|
3076
3082
|
}
|
|
3083
|
+
for (const attr of directAttrs) {
|
|
3084
|
+
const field = fields.find((candidate) => candidate.fieldId === attr.fieldId);
|
|
3085
|
+
const expectedRoute = field?.technicalRouteKey ?? field?.routeHint;
|
|
3086
|
+
if (!attr.routeKey || expectedRoute && attr.routeKey !== expectedRoute) {
|
|
3087
|
+
hardErrors.push({
|
|
3088
|
+
code: attr.routeKey ? "field_scan.attrs_route_key_mismatch" : "field_scan.attrs_route_key_missing",
|
|
3089
|
+
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.`,
|
|
3090
|
+
fieldId: attr.fieldId,
|
|
3091
|
+
filePath: attr.filePath
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3077
3095
|
markMissingEventPreviewHandlerErrors(eventPreviewAttrs, eventPreviewConsumerFieldIds, hasGenericEventPreviewConsumer, hardErrors);
|
|
3078
3096
|
validateScannedFields(fields, hardErrors, warnings, suggestions);
|
|
3079
3097
|
return {
|
|
@@ -3099,6 +3117,7 @@ function scanSourceFile(file, fields, hardErrors) {
|
|
|
3099
3117
|
const fieldsInFile = [];
|
|
3100
3118
|
const attrFieldIds = /* @__PURE__ */ new Set();
|
|
3101
3119
|
const attrRouteRefs = /* @__PURE__ */ new Set();
|
|
3120
|
+
const directAttrs = [];
|
|
3102
3121
|
const eventPreviewAttrs = [];
|
|
3103
3122
|
const eventPreviewAttrVariables = /* @__PURE__ */ new Map();
|
|
3104
3123
|
const eventPreviewComponentPropConsumers = [];
|
|
@@ -3120,7 +3139,7 @@ function scanSourceFile(file, fields, hardErrors) {
|
|
|
3120
3139
|
collectEventPreviewComponentPropUsages(node, eventPreviewAttrVariables, eventPreviewComponentPropUsages, file);
|
|
3121
3140
|
}
|
|
3122
3141
|
if (ts2.isCallExpression(node)) {
|
|
3123
|
-
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file);
|
|
3142
|
+
collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file);
|
|
3124
3143
|
collectUnusedValueCallError(node, hardErrors, file);
|
|
3125
3144
|
const extractedFields = extractFunctionFields(node, file);
|
|
3126
3145
|
for (const field of extractedFields) {
|
|
@@ -3148,6 +3167,7 @@ function scanSourceFile(file, fields, hardErrors) {
|
|
|
3148
3167
|
visit(sourceFile);
|
|
3149
3168
|
markMissingAttrsWarnings(fieldsInFile, attrFieldIds, attrRouteRefs);
|
|
3150
3169
|
return {
|
|
3170
|
+
directAttrs,
|
|
3151
3171
|
eventPreviewAttrs,
|
|
3152
3172
|
eventPreviewComponentPropConsumers,
|
|
3153
3173
|
eventPreviewComponentPropUsages,
|
|
@@ -3328,7 +3348,7 @@ function createFallbackHash(fieldType, fallback) {
|
|
|
3328
3348
|
return void 0;
|
|
3329
3349
|
}
|
|
3330
3350
|
}
|
|
3331
|
-
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, file) {
|
|
3351
|
+
function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs, eventPreviewAttrVariables, directAttrs, file) {
|
|
3332
3352
|
if (!ts2.isPropertyAccessExpression(node.expression)) {
|
|
3333
3353
|
return;
|
|
3334
3354
|
}
|
|
@@ -3340,6 +3360,11 @@ function collectAttrsCall(node, attrFieldIds, attrRouteRefs, eventPreviewAttrs,
|
|
|
3340
3360
|
const directFieldId = staticExpressionValue(firstArg);
|
|
3341
3361
|
if (typeof directFieldId === "string") {
|
|
3342
3362
|
attrFieldIds.add(directFieldId);
|
|
3363
|
+
directAttrs.push({
|
|
3364
|
+
fieldId: directFieldId,
|
|
3365
|
+
routeKey: secondArg && typeof secondArg === "object" && "routeKey" in secondArg ? stringValue(secondArg.routeKey) : void 0,
|
|
3366
|
+
filePath: file.filePath
|
|
3367
|
+
});
|
|
3343
3368
|
if (hasEventPreviewStrategy(secondArg)) {
|
|
3344
3369
|
eventPreviewAttrs.push({
|
|
3345
3370
|
fieldId: directFieldId,
|