@inf-monkeys-tech/monkeys 1.1.5 → 1.1.7
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/contracts/declarative-control-http.d.ts +251 -7451
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control-http.js +2 -102
- package/lib/contracts/declarative-control-http.js.map +1 -1
- package/lib/contracts/declarative-control.d.ts +12 -0
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +9 -0
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/page-expression.d.ts +1 -0
- package/lib/contracts/page-expression.d.ts.map +1 -1
- package/lib/contracts/page-expression.js +1 -1
- package/lib/contracts/page-expression.js.map +1 -1
- package/lib/esm/contracts/index.mjs +11 -83
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +20 -84
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +20 -74
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +11 -73
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/overlay-node.schema.json +2 -1
- package/lib/json-schema/page-runtime-bundle.schema.json +21 -1
- package/lib/json-schema/page.schema.json +21 -1
- package/lib/json-schema/render-node.schema.json +2 -1
- package/lib/json-schema/render-tree.schema.json +2 -1
- package/lib/runtime/page-expression.d.ts.map +1 -1
- package/lib/runtime/page-expression.js +11 -1
- package/lib/runtime/page-expression.js.map +1 -1
- package/lib/schemas/index.d.ts +3 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7495,7 +7495,8 @@ var PageOperatorSchema = z2.enum([
|
|
|
7495
7495
|
"slice",
|
|
7496
7496
|
"trim",
|
|
7497
7497
|
"fixed",
|
|
7498
|
-
"number-format"
|
|
7498
|
+
"number-format",
|
|
7499
|
+
"encode-uri-component"
|
|
7499
7500
|
]);
|
|
7500
7501
|
var RecursivePageExpressionSchema = z2.lazy(() => z2.discriminatedUnion("kind", [
|
|
7501
7502
|
z2.object({ kind: z2.literal("literal"), value: JsonValueSchema }).strict(),
|
|
@@ -12142,6 +12143,9 @@ var QueryBindingSchema = z12.object({
|
|
|
12142
12143
|
).max(32).optional(),
|
|
12143
12144
|
queryWhen: PageStateActivationSchema.optional(),
|
|
12144
12145
|
accessFailure: z12.literal("render-forbidden").optional(),
|
|
12146
|
+
draftRetention: z12.object({
|
|
12147
|
+
identityParameters: z12.array(ContractIdentifierSchema).min(1).max(32)
|
|
12148
|
+
}).strict().optional(),
|
|
12145
12149
|
resultStateBindings: z12.array(QueryResultStateBindingSchema).max(32).optional(),
|
|
12146
12150
|
execution: z12.enum(["server", "local-state"]).default("server"),
|
|
12147
12151
|
pagination: z12.enum(["none", "cursor", "offset"]),
|
|
@@ -12153,6 +12157,12 @@ var QueryBindingSchema = z12.object({
|
|
|
12153
12157
|
when: PageExpressionSchema.optional()
|
|
12154
12158
|
}).strict().optional()
|
|
12155
12159
|
}).strict().superRefine((value, context) => {
|
|
12160
|
+
if (value.draftRetention) {
|
|
12161
|
+
const names = value.draftRetention.identityParameters;
|
|
12162
|
+
if (value.execution !== "server" || new Set(names).size !== names.length || names.some((name) => !Object.prototype.hasOwnProperty.call(value.parameters, name))) {
|
|
12163
|
+
context.addIssue({ code: "custom", path: ["draftRetention"], message: "Draft retention requires distinct declared Server query identity parameters." });
|
|
12164
|
+
}
|
|
12165
|
+
}
|
|
12156
12166
|
if (value.targetProjection) {
|
|
12157
12167
|
if (value.targetProjection.schemaRevisionRef.kind !== "schema")
|
|
12158
12168
|
context.addIssue({
|
|
@@ -15475,11 +15485,6 @@ var DeclarativeAuthoringActionSchema = z14.enum([
|
|
|
15475
15485
|
"publish",
|
|
15476
15486
|
"rollback"
|
|
15477
15487
|
]);
|
|
15478
|
-
var DeclarativeLegacyMigrationKindSchema = z14.enum([
|
|
15479
|
-
"page",
|
|
15480
|
-
"page-data-assets",
|
|
15481
|
-
"workbench"
|
|
15482
|
-
]);
|
|
15483
15488
|
var DeclarativeErrorEnvelopeSchema = z14.object({
|
|
15484
15489
|
code: z14.string().trim().min(1),
|
|
15485
15490
|
message: z14.string().trim().min(1),
|
|
@@ -16961,73 +16966,6 @@ var DeclarativePublicationResultSchema = z14.union([
|
|
|
16961
16966
|
DeclarativeDirectPublicationResultSchema,
|
|
16962
16967
|
DeclarativeAtomicPublicationPlanResultSchema
|
|
16963
16968
|
]);
|
|
16964
|
-
var DeclarativeMigrationDiffEntrySchema = z14.object({
|
|
16965
|
-
path: z14.string().trim().startsWith("/").max(1024),
|
|
16966
|
-
status: z14.enum(["added", "changed", "removed", "unchanged"]),
|
|
16967
|
-
legacyValueHash: Sha256Schema.optional(),
|
|
16968
|
-
declarativeValueHash: Sha256Schema.optional()
|
|
16969
|
-
}).strict();
|
|
16970
|
-
var DeclarativeMigrationBlockerSchema = z14.object({
|
|
16971
|
-
code: ContractIdentifierSchema,
|
|
16972
|
-
path: z14.string().trim().max(1024).optional(),
|
|
16973
|
-
message: z14.string().trim().min(1).max(4096)
|
|
16974
|
-
}).strict();
|
|
16975
|
-
var DeclarativeLegacyMigrationInspectionSchema = z14.object({
|
|
16976
|
-
contract: z14.literal("DeclarativeLegacyMigrationInspection"),
|
|
16977
|
-
schemaVersion: z14.literal(1),
|
|
16978
|
-
migrationKind: DeclarativeLegacyMigrationKindSchema,
|
|
16979
|
-
legacyResourceId: ContractIdentifierSchema,
|
|
16980
|
-
sourceRevisionRef: RevisionRefSchema,
|
|
16981
|
-
sourceContentHash: Sha256Schema,
|
|
16982
|
-
legacyAdapterRevisionRef: RevisionRefSchema,
|
|
16983
|
-
targetResourceRef: StableRefSchema,
|
|
16984
|
-
environmentRevisionRef: RevisionRefSchema,
|
|
16985
|
-
routeSpaceRevisionRef: RevisionRefSchema,
|
|
16986
|
-
normalizedPath: z14.string().trim().startsWith("/").max(2048),
|
|
16987
|
-
takeoverAuthorization: LegacyRouteTakeoverAuthorizationSchema,
|
|
16988
|
-
diff: z14.array(DeclarativeMigrationDiffEntrySchema).max(256),
|
|
16989
|
-
blockers: z14.array(DeclarativeMigrationBlockerSchema).max(128),
|
|
16990
|
-
canCreateDraft: z14.boolean(),
|
|
16991
|
-
inspectionFingerprint: Sha256Schema
|
|
16992
|
-
}).strict().superRefine((value, context) => {
|
|
16993
|
-
const expectedKind = value.migrationKind === "workbench" ? "workbench" : "page";
|
|
16994
|
-
if (value.targetResourceRef.kind !== expectedKind) {
|
|
16995
|
-
context.addIssue({
|
|
16996
|
-
code: "custom",
|
|
16997
|
-
path: ["targetResourceRef", "kind"],
|
|
16998
|
-
message: `A ${value.migrationKind} migration must target ${expectedKind}.`
|
|
16999
|
-
});
|
|
17000
|
-
}
|
|
17001
|
-
if (value.takeoverAuthorization.inspectedSourceContentHash !== value.sourceContentHash || value.takeoverAuthorization.normalizedPath !== value.normalizedPath || value.takeoverAuthorization.targetResourceRef.kind !== value.targetResourceRef.kind || value.takeoverAuthorization.targetResourceRef.id !== value.targetResourceRef.id || value.takeoverAuthorization.targetResourceRef.ownerRepo !== value.targetResourceRef.ownerRepo) {
|
|
17002
|
-
context.addIssue({
|
|
17003
|
-
code: "custom",
|
|
17004
|
-
path: ["takeoverAuthorization"],
|
|
17005
|
-
message: "The takeover authority must bind the exact inspected source, path and target."
|
|
17006
|
-
});
|
|
17007
|
-
}
|
|
17008
|
-
if (value.canCreateDraft !== (value.blockers.length === 0)) {
|
|
17009
|
-
context.addIssue({
|
|
17010
|
-
code: "custom",
|
|
17011
|
-
path: ["canCreateDraft"],
|
|
17012
|
-
message: "Draft creation is allowed exactly when inspection has no blockers."
|
|
17013
|
-
});
|
|
17014
|
-
}
|
|
17015
|
-
});
|
|
17016
|
-
var DeclarativeLegacyMigrationCreateDraftIntentSchema = z14.object({
|
|
17017
|
-
inspectionFingerprint: Sha256Schema,
|
|
17018
|
-
expectedSourceRevisionRef: RevisionRefSchema,
|
|
17019
|
-
expectedSourceContentHash: Sha256Schema,
|
|
17020
|
-
idempotencyKey: z14.string().trim().min(1).max(256)
|
|
17021
|
-
}).strict();
|
|
17022
|
-
var DeclarativeLegacyMigrationCreateDraftResultSchema = z14.object({
|
|
17023
|
-
migrationKind: DeclarativeLegacyMigrationKindSchema,
|
|
17024
|
-
legacyResourceId: ContractIdentifierSchema,
|
|
17025
|
-
inspectionFingerprint: Sha256Schema,
|
|
17026
|
-
sourceRevisionRef: RevisionRefSchema,
|
|
17027
|
-
sourceContentHash: Sha256Schema,
|
|
17028
|
-
takeoverAuthorization: LegacyRouteTakeoverAuthorizationSchema,
|
|
17029
|
-
draft: DeclarativeDraftResultSchema
|
|
17030
|
-
}).strict();
|
|
17031
16969
|
var DeclarativeRetireResultSchema = z14.object({
|
|
17032
16970
|
action: z14.literal("retire"),
|
|
17033
16971
|
resourceKind: DeclarativeResourceKindSchema,
|
|
@@ -25078,7 +25016,7 @@ var readPageValue = (value, path) => {
|
|
|
25078
25016
|
}
|
|
25079
25017
|
return current;
|
|
25080
25018
|
};
|
|
25081
|
-
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim"]);
|
|
25019
|
+
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim", "encode-uri-component"]);
|
|
25082
25020
|
var binary = /* @__PURE__ */ new Set(["subtract", "divide", "equals", "not-equals", "less-than", "less-or-equal", "greater-than", "greater-or-equal", "includes", "get", "fixed"]);
|
|
25083
25021
|
var compilePageExpression = (input) => {
|
|
25084
25022
|
assertBudget(input);
|
|
@@ -25246,6 +25184,14 @@ var evaluateCompiled = (expression, context, budget) => {
|
|
|
25246
25184
|
}
|
|
25247
25185
|
case "trim":
|
|
25248
25186
|
return typeof first === "string" ? first.trim() : fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
25187
|
+
case "encode-uri-component": {
|
|
25188
|
+
if (typeof first !== "string") return fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
25189
|
+
try {
|
|
25190
|
+
return encodeURIComponent(first);
|
|
25191
|
+
} catch {
|
|
25192
|
+
return fail("PAGE_EXPRESSION_INVALID_UNICODE");
|
|
25193
|
+
}
|
|
25194
|
+
}
|
|
25249
25195
|
case "number-format": {
|
|
25250
25196
|
if (second !== "en-US" && second !== "zh-CN") return fail("PAGE_EXPRESSION_LOCALE");
|
|
25251
25197
|
const minimumFractionDigits = number(values[2]);
|