kalup 0.1.1 → 0.2.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/README.md +14 -9
- package/dist/{commands-BpQ20pA7.mjs → commands-Bk1w1oup.mjs} +10492 -9654
- package/dist/commands.d.mts +5 -1
- package/dist/commands.mjs +1 -1
- package/dist/{context-D10Syqfd.d.mts → context-8pARDYRR.d.mts} +74 -7
- package/dist/{host-CcBOCkff.mjs → host-BoqS00po.mjs} +1 -1
- package/dist/host.d.mts +1 -1
- package/dist/host.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/schemas/blueprint-1.schema.json +42 -4
- package/dist/schemas/blueprints-lock-1.schema.json +2 -2
- package/dist/schemas/ir-1.schema.json +42 -5
- package/dist/schemas/plan-1.schema.json +1 -1
- package/docs/apply.md +3 -3
- package/docs/blueprints.md +3 -3
- package/docs/compare.md +1 -1
- package/docs/config.md +32 -16
- package/docs/errors/E_BAD_CHAIN.md +1 -1
- package/docs/errors/E_BIOME_CONFIG.md +2 -2
- package/docs/errors/E_BLUEPRINT_ADDED.md +2 -2
- package/docs/errors/E_BLUEPRINT_INTEGRITY.md +1 -1
- package/docs/errors/E_BLUEPRINT_LOCK.md +3 -3
- package/docs/errors/E_BLUEPRINT_ORIGINAL.md +3 -3
- package/docs/errors/E_BLUEPRINT_SOURCE.md +1 -1
- package/docs/errors/E_BLUEPRINT_UNKNOWN.md +2 -2
- package/docs/errors/E_DEFINITION_FIELD.md +29 -0
- package/docs/errors/E_DIR_AMBIGUOUS.md +17 -0
- package/docs/errors/E_DIR_IN_USE.md +17 -0
- package/docs/errors/E_DUPLICATE_ADDRESS.md +1 -1
- package/docs/errors/E_DUPLICATE_ALIAS.md +1 -1
- package/docs/errors/E_DUPLICATE_KEY.md +1 -1
- package/docs/errors/E_DUPLICATE_OPTION.md +1 -1
- package/docs/errors/E_HS_PREFIX.md +1 -1
- package/docs/errors/E_KEY_COLLISION.md +1 -1
- package/docs/errors/E_LIFECYCLE.md +3 -3
- package/docs/errors/E_LOCKED.md +1 -1
- package/docs/errors/E_MISSING_EXPORT.md +4 -4
- package/docs/errors/E_MISSING_KEY.md +1 -1
- package/docs/errors/E_NOT_DATA.md +1 -1
- package/docs/errors/E_OVERRIDE_DEFINITION.md +2 -2
- package/docs/errors/E_PENDING_TARGET.md +17 -0
- package/docs/errors/E_PLAN_DELETE.md +1 -1
- package/docs/errors/E_PORTAL_ID.md +2 -2
- package/docs/errors/E_PREVENT_DESTROY.md +1 -1
- package/docs/errors/E_PROJECT_WRITE.md +1 -1
- package/docs/errors/E_PROTECTED_SAVED_PLAN.md +4 -4
- package/docs/errors/E_PULL_INVALID.md +1 -1
- package/docs/errors/E_REFERENCE_DEFINITION.md +1 -1
- package/docs/errors/E_RM_DEPENDENTS.md +1 -1
- package/docs/errors/E_SETTING_VALUE.md +3 -1
- package/docs/errors/E_STANDARD_OBJECT.md +1 -1
- package/docs/errors/E_STRICT_WITHOUT_OPTIONS.md +1 -1
- package/docs/errors/E_TARGET_PORTAL_MISMATCH.md +1 -1
- package/docs/errors/E_TOMBSTONE_ADDRESS.md +3 -3
- package/docs/errors/E_TOMBSTONE_CONFLICT.md +3 -3
- package/docs/errors/E_TYPE_FIELDTYPE.md +2 -2
- package/docs/errors/E_UNKNOWN_BUILDER.md +2 -2
- package/docs/errors/E_UNKNOWN_GROUP.md +1 -1
- package/docs/errors/E_UNKNOWN_INCLUDE.md +3 -1
- package/docs/errors/E_UNSUPPORTED_FILE.md +4 -4
- package/docs/errors/E_USAGE.md +1 -1
- package/docs/errors/E_WRITE_IN_READ_MODE.md +1 -1
- package/docs/errors/W_CODEC_MISMATCH.md +1 -1
- package/docs/errors/W_JSON_FIELDTYPE.md +1 -1
- package/docs/errors/W_LARGE_SCOPE.md +5 -5
- package/docs/errors/W_LEGACY_DIR.md +17 -0
- package/docs/errors/W_PENDING_TARGET.md +23 -0
- package/docs/errors/W_PREFIX.md +1 -1
- package/docs/errors/W_STATE_NOT_MOVED.md +17 -0
- package/docs/errors/W_UNADDRESSABLE_NAME.md +1 -1
- package/docs/errors/W_UNSUPPORTED_TYPE.md +3 -3
- package/docs/plan.md +2 -2
- package/docs/pull.md +9 -9
- package/docs/rm.md +3 -3
- package/docs/state.md +4 -2
- package/docs/targets.md +3 -3
- package/package.json +2 -8
- package/docs/errors/E_FIRST_PULL.md +0 -18
package/dist/commands.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Prompter, r as Result, t as Handler } from "./context-
|
|
1
|
+
import { n as Prompter, r as Result, t as Handler } from "./context-8pARDYRR.mjs";
|
|
2
2
|
import { Command } from "@oclif/core";
|
|
3
3
|
//#region src/host/commands.d.ts
|
|
4
4
|
/**
|
|
@@ -12,6 +12,8 @@ export declare abstract class KalupCommand extends Command {
|
|
|
12
12
|
};
|
|
13
13
|
/** Stops cleanly on SIGINT or SIGTERM through `signal`. Any other command keeps the default: the signal ends it. */
|
|
14
14
|
static interruptible: boolean;
|
|
15
|
+
/** Accepts `--out` with no value, as `outDefault`. oclif has no flag whose value is optional. */
|
|
16
|
+
static bareOut: boolean;
|
|
15
17
|
cwd: string;
|
|
16
18
|
progress: ((line: string) => void) | undefined;
|
|
17
19
|
prompt: Prompter | undefined;
|
|
@@ -26,6 +28,7 @@ export declare class InitCommand extends KalupCommand {
|
|
|
26
28
|
portal: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
29
|
objects: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
30
|
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
+
dir: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
32
|
};
|
|
30
33
|
static examples: string[];
|
|
31
34
|
run(): Promise<Result>;
|
|
@@ -86,6 +89,7 @@ export declare class CompareCommand extends KalupCommand {
|
|
|
86
89
|
}
|
|
87
90
|
export declare class PlanCommand extends KalupCommand {
|
|
88
91
|
static summary: string;
|
|
92
|
+
static bareOut: boolean;
|
|
89
93
|
static flags: {
|
|
90
94
|
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
91
95
|
out: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
package/dist/commands.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as TargetRebindCommand, a as CompareCommand, c as InitCommand, d as PlanCommand, f as PullCommand, g as StatusCommand, h as StateRebuildCommand, i as COMMANDS, l as IrCommand, m as SnapshotCommand, n as ApplyCommand, o as DocsCommand, p as RmCommand, r as BlueprintUpgradeCommand, s as FmtCommand, t as AddCommand, u as KalupCommand, v as ValidateCommand } from "./commands-
|
|
1
|
+
import { _ as TargetRebindCommand, a as CompareCommand, c as InitCommand, d as PlanCommand, f as PullCommand, g as StatusCommand, h as StateRebuildCommand, i as COMMANDS, l as IrCommand, m as SnapshotCommand, n as ApplyCommand, o as DocsCommand, p as RmCommand, r as BlueprintUpgradeCommand, s as FmtCommand, t as AddCommand, u as KalupCommand, v as ValidateCommand } from "./commands-Bk1w1oup.mjs";
|
|
2
2
|
export { AddCommand, ApplyCommand, BlueprintUpgradeCommand, COMMANDS, CompareCommand, DocsCommand, FmtCommand, InitCommand, IrCommand, KalupCommand, PlanCommand, PullCommand, RmCommand, SnapshotCommand, StateRebuildCommand, StatusCommand, TargetRebindCommand, ValidateCommand };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@kalup/core";
|
|
2
2
|
//#region ../engine/dist/index.d.mts
|
|
3
|
+
//#endregion
|
|
3
4
|
//#region src/issues.d.ts
|
|
4
5
|
declare const issues: {
|
|
5
6
|
E_ACCEPT_UNMATCHED: {
|
|
@@ -233,28 +234,48 @@ declare const issues: {
|
|
|
233
234
|
output: string[];
|
|
234
235
|
};
|
|
235
236
|
};
|
|
236
|
-
|
|
237
|
+
E_DEFINITION_FIELD: {
|
|
237
238
|
exit: string;
|
|
238
239
|
title: string;
|
|
239
240
|
summary: string;
|
|
240
241
|
when: string[];
|
|
241
242
|
fix: string[];
|
|
242
243
|
example: {
|
|
244
|
+
config: string[];
|
|
243
245
|
output: string[];
|
|
244
246
|
};
|
|
245
247
|
};
|
|
246
|
-
|
|
248
|
+
E_DIR_AMBIGUOUS: {
|
|
247
249
|
exit: string;
|
|
248
250
|
title: string;
|
|
249
251
|
summary: string;
|
|
250
252
|
when: string[];
|
|
251
253
|
fix: string[];
|
|
252
254
|
example: {
|
|
253
|
-
config: string[];
|
|
254
255
|
output: string[];
|
|
255
256
|
};
|
|
256
257
|
};
|
|
257
|
-
|
|
258
|
+
E_DIR_IN_USE: {
|
|
259
|
+
exit: string;
|
|
260
|
+
title: string;
|
|
261
|
+
summary: string;
|
|
262
|
+
when: string[];
|
|
263
|
+
fix: string[];
|
|
264
|
+
example: {
|
|
265
|
+
output: string[];
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
E_DUPLICATE_ADDRESS: {
|
|
269
|
+
exit: string;
|
|
270
|
+
title: string;
|
|
271
|
+
summary: string;
|
|
272
|
+
when: string[];
|
|
273
|
+
fix: string[];
|
|
274
|
+
example: {
|
|
275
|
+
output: string[];
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
E_DUPLICATE_ALIAS: {
|
|
258
279
|
exit: string;
|
|
259
280
|
title: string;
|
|
260
281
|
summary: string;
|
|
@@ -265,7 +286,7 @@ declare const issues: {
|
|
|
265
286
|
output: string[];
|
|
266
287
|
};
|
|
267
288
|
};
|
|
268
|
-
|
|
289
|
+
E_DUPLICATE_KEY: {
|
|
269
290
|
exit: string;
|
|
270
291
|
title: string;
|
|
271
292
|
summary: string;
|
|
@@ -276,7 +297,7 @@ declare const issues: {
|
|
|
276
297
|
output: string[];
|
|
277
298
|
};
|
|
278
299
|
};
|
|
279
|
-
|
|
300
|
+
E_DUPLICATE_OPTION: {
|
|
280
301
|
exit: string;
|
|
281
302
|
title: string;
|
|
282
303
|
summary: string;
|
|
@@ -287,13 +308,14 @@ declare const issues: {
|
|
|
287
308
|
output: string[];
|
|
288
309
|
};
|
|
289
310
|
};
|
|
290
|
-
|
|
311
|
+
E_DUPLICATE_PORTAL: {
|
|
291
312
|
exit: string;
|
|
292
313
|
title: string;
|
|
293
314
|
summary: string;
|
|
294
315
|
when: string[];
|
|
295
316
|
fix: string[];
|
|
296
317
|
example: {
|
|
318
|
+
config: string[];
|
|
297
319
|
output: string[];
|
|
298
320
|
};
|
|
299
321
|
};
|
|
@@ -484,6 +506,16 @@ declare const issues: {
|
|
|
484
506
|
output: string[];
|
|
485
507
|
};
|
|
486
508
|
};
|
|
509
|
+
E_PENDING_TARGET: {
|
|
510
|
+
exit: string;
|
|
511
|
+
title: string;
|
|
512
|
+
summary: string;
|
|
513
|
+
when: string[];
|
|
514
|
+
fix: string[];
|
|
515
|
+
example: {
|
|
516
|
+
output: string[];
|
|
517
|
+
};
|
|
518
|
+
};
|
|
487
519
|
E_PLAN_DELETE: {
|
|
488
520
|
exit: string;
|
|
489
521
|
title: string;
|
|
@@ -1044,6 +1076,16 @@ declare const issues: {
|
|
|
1044
1076
|
output: string[];
|
|
1045
1077
|
};
|
|
1046
1078
|
};
|
|
1079
|
+
W_LEGACY_DIR: {
|
|
1080
|
+
exit: string;
|
|
1081
|
+
title: string;
|
|
1082
|
+
summary: string;
|
|
1083
|
+
when: string[];
|
|
1084
|
+
fix: string[];
|
|
1085
|
+
example: {
|
|
1086
|
+
output: string[];
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1047
1089
|
W_LIMIT_HEADROOM: {
|
|
1048
1090
|
exit: string;
|
|
1049
1091
|
title: string;
|
|
@@ -1084,6 +1126,17 @@ declare const issues: {
|
|
|
1084
1126
|
output: string[];
|
|
1085
1127
|
};
|
|
1086
1128
|
};
|
|
1129
|
+
W_PENDING_TARGET: {
|
|
1130
|
+
exit: string;
|
|
1131
|
+
title: string;
|
|
1132
|
+
summary: string;
|
|
1133
|
+
when: string[];
|
|
1134
|
+
fix: string[];
|
|
1135
|
+
example: {
|
|
1136
|
+
config: string[];
|
|
1137
|
+
output: string[];
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1087
1140
|
W_PIN_EXPIRES: {
|
|
1088
1141
|
exit: string;
|
|
1089
1142
|
title: string;
|
|
@@ -1124,6 +1177,16 @@ declare const issues: {
|
|
|
1124
1177
|
output: string[];
|
|
1125
1178
|
};
|
|
1126
1179
|
};
|
|
1180
|
+
W_STATE_NOT_MOVED: {
|
|
1181
|
+
exit: string;
|
|
1182
|
+
title: string;
|
|
1183
|
+
summary: string;
|
|
1184
|
+
when: string[];
|
|
1185
|
+
fix: string[];
|
|
1186
|
+
example: {
|
|
1187
|
+
output: string[];
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1127
1190
|
W_UNADDRESSABLE_NAME: {
|
|
1128
1191
|
exit: string;
|
|
1129
1192
|
title: string;
|
|
@@ -1207,6 +1270,8 @@ interface Flags {
|
|
|
1207
1270
|
/** `--approve <writesHash>`: a reviewed CI job's approval of a saved plan. */
|
|
1208
1271
|
approve?: string;
|
|
1209
1272
|
check: boolean;
|
|
1273
|
+
/** `init --dir <path>`: the folder for the object files. */
|
|
1274
|
+
dir?: string;
|
|
1210
1275
|
discover: boolean;
|
|
1211
1276
|
/** `add` and `blueprint upgrade --dry-run`: report what would change and write nothing. */
|
|
1212
1277
|
dryRun: boolean;
|
|
@@ -1214,6 +1279,8 @@ interface Flags {
|
|
|
1214
1279
|
objects?: string;
|
|
1215
1280
|
only?: string;
|
|
1216
1281
|
out?: string;
|
|
1282
|
+
/** `plan --out` with no file: write the plan under .kalup/plans/. */
|
|
1283
|
+
outDefault?: boolean;
|
|
1217
1284
|
portal?: string;
|
|
1218
1285
|
/** `add --prefix <p>`: the prefix for one add, over config's `prefix`. */
|
|
1219
1286
|
prefix?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as sanitize, C as usageError, D as disclaimer, E as bin, O as escapeJson, S as versionText, T as KalupError, b as formats, k as exitCodes, u as KalupCommand, w as IssueError, x as version, y as PATH_MAX } from "./commands-
|
|
1
|
+
import { A as sanitize, C as usageError, D as disclaimer, E as bin, O as escapeJson, S as versionText, T as KalupError, b as formats, k as exitCodes, u as KalupCommand, w as IssueError, x as version, y as PATH_MAX } from "./commands-Bk1w1oup.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
package/dist/host.d.mts
CHANGED
package/dist/host.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as isInteractive, r as run, t as execute } from "./host-
|
|
1
|
+
import { n as isInteractive, r as run, t as execute } from "./host-BoqS00po.mjs";
|
|
2
2
|
export { execute, isInteractive, run };
|
package/dist/index.mjs
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"properties": {
|
|
85
85
|
"label": { "type": "string" },
|
|
86
86
|
"group": { "$ref": "#/$defs/ref" },
|
|
87
|
-
"type": { "enum": ["string", "number", "bool", "date", "datetime", "enumeration"] },
|
|
87
|
+
"type": { "enum": ["string", "number", "bool", "date", "datetime", "enumeration", "phone_number"] },
|
|
88
88
|
"fieldType": {
|
|
89
89
|
"enum": [
|
|
90
90
|
"text",
|
|
@@ -96,13 +96,38 @@
|
|
|
96
96
|
"select",
|
|
97
97
|
"radio",
|
|
98
98
|
"checkbox",
|
|
99
|
-
"date"
|
|
99
|
+
"date",
|
|
100
|
+
"html",
|
|
101
|
+
"calculation_equation"
|
|
100
102
|
]
|
|
101
103
|
},
|
|
102
104
|
"description": { "type": "string" },
|
|
103
105
|
"options": { "type": "array", "items": { "$ref": "#/$defs/option" } },
|
|
104
106
|
"hasUniqueValue": { "type": "boolean" },
|
|
105
|
-
"formField": { "type": "boolean" }
|
|
107
|
+
"formField": { "type": "boolean" },
|
|
108
|
+
"hidden": { "type": "boolean" },
|
|
109
|
+
"displayOrder": { "type": "integer", "minimum": -1 },
|
|
110
|
+
"numberDisplayHint": {
|
|
111
|
+
"enum": ["currency", "duration", "formatted", "percentage", "probability", "unformatted"]
|
|
112
|
+
},
|
|
113
|
+
"showCurrencySymbol": { "type": "boolean" },
|
|
114
|
+
"currencyPropertyName": { "type": "string" },
|
|
115
|
+
"textDisplayHint": {
|
|
116
|
+
"enum": [
|
|
117
|
+
"domain_name",
|
|
118
|
+
"email",
|
|
119
|
+
"ip_address",
|
|
120
|
+
"multi_line",
|
|
121
|
+
"phone_number",
|
|
122
|
+
"physical_address",
|
|
123
|
+
"postal_code",
|
|
124
|
+
"unformatted_single_line"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"calculationFormula": { "type": "string" },
|
|
128
|
+
"dataSensitivity": { "enum": ["non_sensitive", "sensitive", "highly_sensitive"] },
|
|
129
|
+
"externalOptions": { "const": true },
|
|
130
|
+
"referencedObjectType": { "const": "OWNER" }
|
|
106
131
|
},
|
|
107
132
|
"additionalProperties": false
|
|
108
133
|
},
|
|
@@ -128,7 +153,20 @@
|
|
|
128
153
|
"type": "object",
|
|
129
154
|
"properties": {
|
|
130
155
|
"key": { "type": "string", "pattern": "^[A-Za-z_$][A-Za-z0-9_$]*$" },
|
|
131
|
-
"codec": {
|
|
156
|
+
"codec": {
|
|
157
|
+
"enum": [
|
|
158
|
+
"string",
|
|
159
|
+
"number",
|
|
160
|
+
"boolean",
|
|
161
|
+
"date",
|
|
162
|
+
"datetime",
|
|
163
|
+
"enum",
|
|
164
|
+
"multiEnum",
|
|
165
|
+
"stringArray",
|
|
166
|
+
"phoneNumber",
|
|
167
|
+
"owner"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
132
170
|
"aliases": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
133
171
|
"required": { "type": "boolean" },
|
|
134
172
|
"readonly": { "type": "boolean" },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://kalup.dev/schemas/blueprints-lock-1.schema.json",
|
|
4
4
|
"title": "Kalup blueprints lock, version 1",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "blueprints.lock.json in the folder of object files (hubspot/ by default), written by `kalup add` and `kalup blueprint upgrade`, never by hand. Records where each blueprint came from, the stored original upgrades merge against, and which config resources it provides. Closed at every level.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["lockVersion", "blueprints", "sources"],
|
|
8
8
|
"properties": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"hash": { "$ref": "#/$defs/hash" },
|
|
45
45
|
"prefix": { "type": "string", "pattern": "^([a-z][a-z0-9_]*)?$" },
|
|
46
46
|
"original": {
|
|
47
|
-
"description": "The stored original,
|
|
47
|
+
"description": "The stored original, <dir>/.blueprints/<name with / as -->@<version>.json.",
|
|
48
48
|
"type": "string"
|
|
49
49
|
},
|
|
50
50
|
"resources": {
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"properties": {
|
|
103
103
|
"label": { "type": "string" },
|
|
104
104
|
"group": { "$ref": "#/$defs/ref" },
|
|
105
|
-
"type": { "enum": ["string", "number", "bool", "date", "datetime", "enumeration"] },
|
|
105
|
+
"type": { "enum": ["string", "number", "bool", "date", "datetime", "enumeration", "phone_number"] },
|
|
106
106
|
"fieldType": {
|
|
107
107
|
"enum": [
|
|
108
108
|
"text",
|
|
@@ -114,13 +114,38 @@
|
|
|
114
114
|
"select",
|
|
115
115
|
"radio",
|
|
116
116
|
"checkbox",
|
|
117
|
-
"date"
|
|
117
|
+
"date",
|
|
118
|
+
"html",
|
|
119
|
+
"calculation_equation"
|
|
118
120
|
]
|
|
119
121
|
},
|
|
120
122
|
"description": { "type": "string" },
|
|
121
123
|
"options": { "type": "array", "items": { "$ref": "#/$defs/option" } },
|
|
122
124
|
"hasUniqueValue": { "type": "boolean" },
|
|
123
|
-
"formField": { "type": "boolean" }
|
|
125
|
+
"formField": { "type": "boolean" },
|
|
126
|
+
"hidden": { "type": "boolean" },
|
|
127
|
+
"displayOrder": { "type": "integer", "minimum": -1 },
|
|
128
|
+
"numberDisplayHint": {
|
|
129
|
+
"enum": ["currency", "duration", "formatted", "percentage", "probability", "unformatted"]
|
|
130
|
+
},
|
|
131
|
+
"showCurrencySymbol": { "type": "boolean" },
|
|
132
|
+
"currencyPropertyName": { "type": "string" },
|
|
133
|
+
"textDisplayHint": {
|
|
134
|
+
"enum": [
|
|
135
|
+
"domain_name",
|
|
136
|
+
"email",
|
|
137
|
+
"ip_address",
|
|
138
|
+
"multi_line",
|
|
139
|
+
"phone_number",
|
|
140
|
+
"physical_address",
|
|
141
|
+
"postal_code",
|
|
142
|
+
"unformatted_single_line"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"calculationFormula": { "type": "string" },
|
|
146
|
+
"dataSensitivity": { "enum": ["non_sensitive", "sensitive", "highly_sensitive"] },
|
|
147
|
+
"externalOptions": { "const": true },
|
|
148
|
+
"referencedObjectType": { "const": "OWNER" }
|
|
124
149
|
},
|
|
125
150
|
"additionalProperties": false
|
|
126
151
|
},
|
|
@@ -166,7 +191,19 @@
|
|
|
166
191
|
"properties": {
|
|
167
192
|
"key": { "type": "string" },
|
|
168
193
|
"codec": {
|
|
169
|
-
"enum": [
|
|
194
|
+
"enum": [
|
|
195
|
+
"string",
|
|
196
|
+
"number",
|
|
197
|
+
"boolean",
|
|
198
|
+
"date",
|
|
199
|
+
"datetime",
|
|
200
|
+
"enum",
|
|
201
|
+
"multiEnum",
|
|
202
|
+
"stringArray",
|
|
203
|
+
"json",
|
|
204
|
+
"phoneNumber",
|
|
205
|
+
"owner"
|
|
206
|
+
]
|
|
170
207
|
},
|
|
171
208
|
"aliases": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
172
209
|
"required": { "type": "boolean" },
|
|
@@ -188,7 +225,7 @@
|
|
|
188
225
|
"additionalProperties": false
|
|
189
226
|
},
|
|
190
227
|
"provenance": {
|
|
191
|
-
"description": "Merged from
|
|
228
|
+
"description": "Merged from blueprints.lock.json in the folder of object files by the loader. Absent means authored by hand.",
|
|
192
229
|
"type": "object",
|
|
193
230
|
"required": ["blueprint", "version", "sourceAddress", "prefix", "hash"],
|
|
194
231
|
"properties": {
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
"additionalProperties": false
|
|
690
690
|
},
|
|
691
691
|
"held": {
|
|
692
|
-
"description": "A unit reported and not written, with the command that takes the portal side: a pull, or pull --accept. resolve is left out when no pull takes the portal side: the resource names a portal name a name override shadows (shadowed:<name>), or a property
|
|
692
|
+
"description": "A unit reported and not written, with the command that takes the portal side: a pull, or pull --accept. resolve is left out when no pull takes the portal side: the resource names a portal name a name override shadows (shadowed:<name>), or a property holds a type or fieldType its builder does not take, or sits in a portal group removed.ts names; in those cases a note on the same unit says why.",
|
|
693
693
|
"type": "object",
|
|
694
694
|
"required": ["unit", "class", "config", "live"],
|
|
695
695
|
"properties": {
|
package/docs/apply.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Apply
|
|
2
2
|
|
|
3
|
-
`kalup apply <plan-file> [--yes | --approve <writesHash>]` applies a plan saved by `kalup plan --out` to the target it names. `kalup apply [--target <name>] [--take config <selector>] [--yes]` plans
|
|
3
|
+
`kalup apply <plan-file> [--yes | --approve <writesHash>]` applies a plan saved by `kalup plan --out` to the target it names. `kalup apply [--target <name>] [--take config <selector>] [--yes]` plans the target now and applies that plan through the same checks: at a terminal it prints the whole plan first, as `plan` does, then asks. Apply writes property groups and properties, on custom objects too, and never a custom object schema.
|
|
4
4
|
|
|
5
5
|
This page is the reference. For the walk-through with examples, see [kalup apply](https://kalup.dev/docs/commands/apply) on the website.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ A plan with any effect (a write, adoption, release, delete or state-only update)
|
|
|
12
12
|
- **`--yes`**: an unprotected target, no step Kalup derives as risky or destructive, at most the target's `yesLimit` (default 25; `0` turns `--yes` off) writes, adoptions and releases. It trusts the file once its digest matches, never past the risk or delete rules.
|
|
13
13
|
- **`--approve <writesHash>`**: a reviewed CI job. The digest must equal the file's recomputed `writesHash` (`E_APPROVE_MISMATCH`), and the target must name its own `credentials.write`, read from the process environment, with no `.env` defining it (`E_APPROVE_CREDENTIAL`). It covers protected targets and risky steps, and shows only that the writes equal a reviewed digest, not that a review happened. A write key exported in a workstation shell satisfies it too, so keep that key only in CI. Agents never pass it.
|
|
14
14
|
|
|
15
|
-
Every delete, and every option removal takeover asks for, needs the person at a terminal. Otherwise apply stops with `E_APPROVAL_REQUIRED`, exit 4, printing the command.
|
|
15
|
+
Every delete, and every option removal takeover asks for, needs the person at a terminal. Otherwise apply stops with `E_APPROVAL_REQUIRED`, exit 4, printing the command. Without a plan file, a protected target applies only for the person at a terminal; with no terminal apply stops after the portal guard, before it plans (`E_PROTECTED_SAVED_PLAN`, exit 4). In CI, save the plan with `kalup plan --out` and apply that file after review.
|
|
16
16
|
|
|
17
17
|
The terminal question stops an over-eager agent, not a hostile one: anything with a shell on the machine can read its keys.
|
|
18
18
|
|
|
@@ -25,7 +25,7 @@ Before any write, in order:
|
|
|
25
25
|
3. The write key (`credentials.write`, else the read key) passes the portal guard. Every request, reads included, uses it.
|
|
26
26
|
4. The policy equals the plan's: `protected`, `drift`, `adopt`, `allowDestroy`, `yesLimit` and the objects in takeover (`E_POLICY_CHANGED`); each step's API version is current and unexpired, and the normalizer versions match (`E_PLAN_VERSION`).
|
|
27
27
|
5. Every step but a release is on an object `kalup.config.ts` declares, the name bindings match the target's name overrides, and no two steps but releases resolve to one portal resource (`E_BINDING_CHANGED`).
|
|
28
|
-
6. Each delete has a `destroy` tombstone in `
|
|
28
|
+
6. Each delete has a `destroy` tombstone in `hubspot/removed.ts` or takeover's leave (takeover mode, in the pull scope, not excluded), is gone from config, and no address in config names its portal resource, read as data (`E_PLAN_DELETE`). The object files also tell takeover's option removals from config's own.
|
|
29
29
|
7. Approval, then the portal lock (`E_LOCKED`).
|
|
30
30
|
8. State: a plan already applied with outcome `done` exits 0 ("Already applied"); otherwise lineage and serial equal the plan's (`E_STATE_CHANGED`).
|
|
31
31
|
9. A fresh read of each object the plan changes, and of the schemas list for a custom object (`E_INCOMPLETE` on a 403, `E_BINDING_CHANGED` for another type ID). Every `expect` must hold (`E_PLAN_STALE`), a delete's covering each field its base holds. Kalup derives each step's risk, labels and blocked status again (`E_PLAN_RISK` when the plan states less); a takeover removal needs `allowDestroy`, and never takes a HubSpot-defined property.
|
package/docs/blueprints.md
CHANGED
|
@@ -39,8 +39,8 @@ Anything else is `E_BLUEPRINT_SCHEMA`. The schema ships in `kalup` as `kalup/sch
|
|
|
39
39
|
|
|
40
40
|
1. The bytes are hashed (`sha256:`), parsed as JSON and checked. The prefix is applied (below).
|
|
41
41
|
2. A new resource is added. One config already has with the same definition and binding is recorded under the blueprint, not rewritten. Any other difference is `E_BLUEPRINT_COLLISION`, listing the differing units; so is a `.managed(false)` entry, or an address another blueprint provides.
|
|
42
|
-
3. Resources go into the export that holds their object, or a new `
|
|
43
|
-
4. The lock entry goes to `
|
|
42
|
+
3. Resources go into the export that holds their object, or a new `hubspot/objects/<object>.ts` for a standard object. A custom object must already be in config (`E_BLUEPRINT_REQUIRES`). An object missing from `objects` in `kalup.config.ts` is added as `{}`.
|
|
43
|
+
4. The lock entry goes to `hubspot/blueprints.lock.json`, and the bytes, unchanged, to `hubspot/.blueprints/<name with / as -->@<version>.json`. `.gitattributes` gets `hubspot/.blueprints/** -text`, so git never changes their line endings.
|
|
44
44
|
|
|
45
45
|
The project as add would leave it is validated first: any issue, such as a binding key another property uses, is exit 3. Files are copied to `.kalup/history/`, then written as one change (`E_PROJECT_WRITE` restores them on a failure).
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ A field a version owns for the first time, where the portal holds another value,
|
|
|
66
66
|
|
|
67
67
|
## Provenance and the lock
|
|
68
68
|
|
|
69
|
-
These two commands write `
|
|
69
|
+
These two commands write `hubspot/blueprints.lock.json`, never a person (`E_BLUEPRINT_LOCK`, exit 3). Per blueprint it records `version`, `source`, `hash`, `prefix`, `original`, `resources` (local address to blueprint address) and `held`. The loader adds `provenance` to each config resource the lock lists; `kalup ir` shows it. Commit the lock, `hubspot/.blueprints/` and `.gitattributes` with the config.
|
|
70
70
|
|
|
71
71
|
## Integrity
|
|
72
72
|
|
package/docs/compare.md
CHANGED
|
@@ -27,7 +27,7 @@ The project must load and validate only when a side is `config` or a target (exi
|
|
|
27
27
|
Every address present on either side, including properties Kalup does not write, and every config address. Each gets a status:
|
|
28
28
|
|
|
29
29
|
- Equal: every unit converged. Counted, not listed.
|
|
30
|
-
- `differs`: `changes[]` lists options to add or remove; `held[]` lists units that differ, `diverged` since there is no base; `notes[]` lists options only `b` holds, kept because options are additive. When `b` is a portal side, the note names the pull command that brings the option into config. `pull` does not write a resource that names a portal name a `name` override shadows (`shadowed:<name>`), so on such a resource the note says to correct or remove that override instead. Nor does it
|
|
30
|
+
- `differs`: `changes[]` lists options to add or remove; `held[]` lists units that differ, `diverged` since there is no base; `notes[]` lists options only `b` holds, kept because options are additive. When `b` is a portal side, the note names the pull command that brings the option into config. `pull` does not write a resource that names a portal name a `name` override shadows (`shadowed:<name>`), so on such a resource the note says to correct or remove that override instead. Nor does it bring in a property the files lack that is outside its object's pull scope, so there the note says to add the name to `objects.<object>.include`; a property the files define is always in scope. A snapshot does not record whether HubSpot defines a property, so on a reference `include` does not name, a snapshot's note says it may be outside the scope and gives the same advice.
|
|
31
31
|
- `only-a` or `only-b`: on one side only.
|
|
32
32
|
- `unmanaged`: only a portal side holds it and the other side is config. Listed and counted, never a difference: absence never deletes.
|
|
33
33
|
- `unknown`: a side could not read its object, never read it, left out a property config names because its group's name holds whitespace (`W_UNADDRESSABLE_NAME`), or a target side has a `lookup` override, since this version manages no lookup resources. `reason` says which side and why.
|
package/docs/config.md
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
# Config files
|
|
2
2
|
|
|
3
|
-
Kalup reads `kalup.config.ts` and every `.ts` file
|
|
3
|
+
Kalup reads `kalup.config.ts` and every `.ts` file in the folder of object files except its `index.ts` as data. The folder is `hubspot/` unless `dir` in `kalup.config.ts` names another, such as `dir: 'lib/config/hubspot'`; the paths below use `hubspot/`. It parses a small grammar and never runs them. The app imports the same files and runs them for types and codecs.
|
|
4
4
|
|
|
5
5
|
This page is the reference. For the walk-through with examples, see [Config files](https://kalup.dev/docs/config/config-files), [kalup.config.ts](https://kalup.dev/docs/config/kalup-config) and [Property builders](https://kalup.dev/docs/config/property-builders) on the website.
|
|
6
6
|
|
|
7
7
|
## Files
|
|
8
8
|
|
|
9
|
-
- `kalup.config.ts`: one `export default defineConfig({...})` and nothing after it. Fields: `name` (default: the directory name), `prefix`, `defaultTarget` (targets.md), `mode` (below), `objects` (the pull scope, pull.md) and `targets` (targets.md). A setting at a level that does not take it is `E_SETTING_LEVEL`, whose fix lists the levels that do; a value it does not take is `E_SETTING_VALUE`, with the nearest allowed one.
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
9
|
+
- `kalup.config.ts`: one `export default defineConfig({...})` and nothing after it. Fields: `name` (default: the name in the nearest `package.json` up to the repository root, else the directory name), `dir` (the folder of object files, relative to `kalup.config.ts` and inside the project, default `hubspot`; `E_SETTING_VALUE` otherwise), `state` (`'local'`, the default, or `'repo'`, state.md), `prefix`, `defaultTarget` (targets.md), `mode` (below), `objects` (the pull scope, pull.md) and `targets` (targets.md). A setting at a level that does not take it is `E_SETTING_LEVEL`, whose fix lists the levels that do; a value it does not take is `E_SETTING_VALUE`, with the nearest allowed one.
|
|
10
|
+
- `hubspot/objects/<object>.ts`: one or more `export const <Name> = defineObject('<object>', {...})` or `defineCustomObject('<name>', {...})`. The writer adds an `export type <Name>Data = ...` line after each. A file with no such export is `E_MISSING_EXPORT`.
|
|
11
|
+
- `hubspot/index.ts`: the barrel, written by `pull` and `fmt`. It imports each object file as `./objects/<object>.js`, which resolves under TypeScript `NodeNext`, `Node16` and `Bundler` resolution, bundlers such as Vite and Next.js, and plain Node running `tsc` output. Under `NodeNext`, import it as `./hubspot/index.js`.
|
|
12
|
+
- `hubspot/removed.ts`: tombstones, below.
|
|
13
|
+
- `hubspot/pipelines/*`, and a `defineConfig` or `defineRemoved` file elsewhere under `hubspot/`, are `E_UNSUPPORTED_FILE`.
|
|
14
|
+
- `hubspot/blueprints.lock.json` and `hubspot/.blueprints/`: written by `kalup add` (blueprints.md).
|
|
15
|
+
|
|
16
|
+
The folder belongs to Kalup alone: every `.ts` file in it is read as config, `pull` rewrites its `index.ts`, and `init` takes it out of the formatter's checks. Point `dir` at a folder of its own (`lib/config/hubspot`, not `lib/config` next to the app's modules); `init` refuses a folder that holds other `.ts` files (`E_DIR_IN_USE`). A 0.1 project keeps its `kalup/` folder while `dir` is unset and `hubspot/` holds no `.ts` file, with `W_LEGACY_DIR` on every command until you set `dir: 'kalup'` or move the folder. When both hold `.ts` files, every command stops with `E_DIR_AMBIGUOUS` until `dir` says which.
|
|
17
|
+
|
|
18
|
+
Commit `kalup.config.ts` and the folder: the object files, `index.ts`, `removed.ts`, the blueprints lock, and `state/` only with `state: 'repo'` (state.md). Never commit `.kalup/` (local state, saved plans, journals, history, snapshots), a plan file, `.env` or any file holding a key.
|
|
14
19
|
|
|
15
20
|
## The grammar
|
|
16
21
|
|
|
@@ -29,18 +34,29 @@ Anything else is `E_NOT_DATA`.
|
|
|
29
34
|
|
|
30
35
|
Each builder sets the HubSpot `type`, which config never states, and allows these `fieldType` values. Any other is `E_TYPE_FIELDTYPE`.
|
|
31
36
|
|
|
32
|
-
- `p.string
|
|
33
|
-
- `p.
|
|
34
|
-
- `p.
|
|
37
|
+
- `p.string`: `string`; text, textarea, file, phonenumber, html (rich text), calculation_equation.
|
|
38
|
+
- `p.stringArray`, `p.json`: `string`; text, textarea, file, phonenumber.
|
|
39
|
+
- `p.number`: `number`; number, calculation_equation.
|
|
40
|
+
- `p.boolean`: `bool`; booleancheckbox, calculation_equation. Kalup creates it with the options `true` and `false`, which HubSpot requires.
|
|
35
41
|
- `p.date` (`YYYY-MM-DD`) and `p.datetime` (ISO 8601): `date` and `datetime`; date.
|
|
36
|
-
- `p.enum`: `enumeration`; select, radio, booleancheckbox.
|
|
42
|
+
- `p.enum`: `enumeration`; select, radio, booleancheckbox, calculation_equation.
|
|
37
43
|
- `p.multiEnum`: `enumeration`; checkbox.
|
|
44
|
+
- `p.phoneNumber`: `phone_number`; phonenumber. The value is the text HubSpot stores.
|
|
45
|
+
- `p.owner`: `enumeration`; select, radio, with options HubSpot fills from the account's users (`externalOptions: true`, `referencedObjectType: 'OWNER'`, both implied). The value is the owner ID. It takes no `options`.
|
|
38
46
|
|
|
39
|
-
In the app every value can be `null`, and a blank one reads as `null`. `p.enum` gives one alias, `p.multiEnum` an alias array (`;`-separated on the wire); a stored value the options do not list reads as `Unlisted`, a branded string `set` writes back unchanged. `.strict()` makes both throw on it instead and drops `Unlisted` from the type; it needs options (`E_STRICT_WITHOUT_OPTIONS`). A bare `p.enum` reference is `Unlisted | null`. `p.stringArray` a `string[]` (split on `,` or `;`, written `,`-joined), `p.json` the validator's output. `.required()` drops `null` and makes `get` throw on a missing value. `.readonly()` removes `set` from the type. `pull` never writes `.required()`, `p.stringArray` or `p.json`, and keeps them.
|
|
47
|
+
In the app every value can be `null`, and a blank one reads as `null`. `p.enum` gives one alias, `p.multiEnum` an alias array (`;`-separated on the wire); a stored value the options do not list reads as `Unlisted`, a branded string `set` writes back unchanged. `.strict()` makes both throw on it instead and drops `Unlisted` from the type; it needs options (`E_STRICT_WITHOUT_OPTIONS`). A bare `p.enum` reference is `Unlisted | null`. `p.stringArray` a `string[]` (split on `,` or `;`, written `,`-joined), `p.json` the validator's output. `.required()` drops `null` and makes `get` throw on a missing value. `.readonly()` removes `set` and `clear` from the type. `clear(bag)` writes `''`, which HubSpot reads as a clear; it does not compile on a `.required()` codec, and `set(bag, null)` leaves the bag untouched. A codec's `property` is its internal name as a literal type, and `PropertyName<typeof Company>` is the union of an object's names. `pull` never writes `.required()`, `p.stringArray` or `p.json`, and keeps them.
|
|
40
48
|
|
|
41
49
|
## Managed, reference, options-only
|
|
42
50
|
|
|
43
|
-
A definition with `label`, `group` and `fieldType` is managed: the fields present are owned, and an omitted
|
|
51
|
+
A definition with `label`, `group` and `fieldType` is managed: the fields present are owned, and an omitted field belongs to the portal. The optional fields, in HubSpot's names:
|
|
52
|
+
|
|
53
|
+
- `description`, `options`, `formField`, `hidden` (not shown in HubSpot), `displayOrder` (place in the group: lowest positive first, `-1` after the rest).
|
|
54
|
+
- `hasUniqueValue` and `dataSensitivity` (`non_sensitive`, `sensitive`, `highly_sensitive`): set on create only. HubSpot keeps them whatever a later update says, so a difference blocks the plan with a migration.
|
|
55
|
+
- On `p.number`: `numberDisplayHint` (`formatted`, `unformatted`, `currency`, `percentage`, `duration`, `probability`), `showCurrencySymbol`, and `currencyPropertyName`, which needs `showCurrencySymbol: true`.
|
|
56
|
+
- On `p.string`, `p.stringArray`, `p.json` and `p.phoneNumber`: `textDisplayHint` (`unformatted_single_line`, `multi_line`, `email`, `phone_number`, `domain_name`, `ip_address`, `physical_address`, `postal_code`). HubSpot takes no value that removes a hint.
|
|
57
|
+
- `calculationFormula` with `fieldType: 'calculation_equation'`, in HubSpot's formula syntax. HubSpot stores its own spelling (`a+1` as `a + 1`); write it as pull does, or plan notes the difference. A formula change is risky.
|
|
58
|
+
|
|
59
|
+
A field another builder or field rules out is `E_DEFINITION_FIELD`. HubSpot ignores `dateDisplayHint`, so it is no field. `group` must name a group declared under `groups` for the same object, in any export or file (`E_UNKNOWN_GROUP`). A managed internal name starting with `hs_` is `E_HS_PREFIX`.
|
|
44
60
|
|
|
45
61
|
No definition makes a reference: never created, changed or removed. `p.enum` or `p.multiEnum` with `options` and nothing else is a reference with typed options, which pull refreshes.
|
|
46
62
|
|
|
@@ -62,17 +78,17 @@ The object key is the app's name for the property. Two exports of one object usi
|
|
|
62
78
|
|
|
63
79
|
## Per-target definitions
|
|
64
80
|
|
|
65
|
-
A target's override `definition` (targets.md) replaces each field it states there, whole, and owns it, empty values included: a property's `label`, `description`, `group`, `fieldType`, `formField`, `options` (no `as`) and lifecycle but `preventDestroy`; a group's `label`. Else `E_OVERRIDE_DEFINITION`. `pull` writes these fields into the override.
|
|
81
|
+
A target's override `definition` (targets.md) replaces each field it states there, whole, and owns it, empty values included: a property's `label`, `description`, `group`, `fieldType`, `formField`, `options` (no `as`), `hidden`, `displayOrder`, the display fields, `calculationFormula` and lifecycle but `preventDestroy`; a group's `label`. Else `E_OVERRIDE_DEFINITION`. `pull` writes these fields into the override.
|
|
66
82
|
|
|
67
83
|
## Mode: addon and takeover
|
|
68
84
|
|
|
69
85
|
`mode: 'addon' | 'takeover'` at the top level, under `objects.<object>`, under `targets.<target>`, or under `targets.<target>.objects.<object>`. The most specific wins, in that order from the last, and the default is `addon`: Kalup manages only what config names. A target `mode` that differs from an object's `mode` the target says nothing more about is `W_MODE_SHADOWED`.
|
|
70
86
|
|
|
71
|
-
Under `takeover`, `plan` archives every custom property and group in the object's pull scope that config lacks and `
|
|
87
|
+
Under `takeover`, `plan` archives every custom property and group in the object's pull scope that config lacks and `hubspot/removed.ts` does not name (a group only once every property in it goes, and after them), and removes enum options only the portal holds. Never a HubSpot-defined or calculated property, a kind Kalup does not write, anything an object file lists, a name `exclude` covers, or a property a custom object schema names. Every takeover removal is destructive: it needs `allowDestroy: true` on the target and a person at a terminal, and `--yes` and `--approve` never cover it. Without `allowDestroy` it is blocked, reason `policy`; after an incomplete read, reason `scope`.
|
|
72
88
|
|
|
73
89
|
## Removed resources
|
|
74
90
|
|
|
75
|
-
`
|
|
91
|
+
`hubspot/removed.ts` holds `export default defineRemoved({...})`, keyed by address:
|
|
76
92
|
|
|
77
93
|
```ts
|
|
78
94
|
export default defineRemoved({
|
|
@@ -85,4 +101,4 @@ export default defineRemoved({
|
|
|
85
101
|
|
|
86
102
|
## Canonical form
|
|
87
103
|
|
|
88
|
-
`kalup fmt` validates, then rewrites `kalup.config.ts`, `
|
|
104
|
+
`kalup fmt` validates, then rewrites `kalup.config.ts`, `hubspot/removed.ts`, every object file and the barrel: groups and properties sorted by internal name, tombstones by address, fields in a fixed order, options in display order, quotes as biome writes them, 120 columns. It keeps every value you wrote, `description: ''`, `options: []`, `false` and an empty `lifecycle` included: a present field is owned. `fmt --check` lists the files it would change and exits 2 when there are any. Old files go to `.kalup/history/<timestamp>/` first; the last 20 runs are kept.
|
|
@@ -17,5 +17,5 @@ plotCount: p.number('plot_count').optional(),
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
hubspot/objects/companies.ts:5: E_BAD_CHAIN: .optional() is not a chain call (fix: use .strict(), .required(), .readonly() or .managed(false)) (docs: errors/E_BAD_CHAIN.md)
|
|
21
21
|
```
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## When
|
|
6
6
|
|
|
7
|
-
`init` adds `!
|
|
7
|
+
`init` adds `!hubspot`, `!kalup.config.ts` and `!.kalup` (with the path from the config to the project in a monorepo) to `files.includes` in the nearest `biome.json` from the project up to the repository root, so it reads that file before it writes anything. Biome reads `biome.json` as plain JSON, so a comment in it is also this error. A `biome.jsonc` that does not parse is not an error: `init` leaves it alone and prints a note.
|
|
8
8
|
|
|
9
9
|
## Fix
|
|
10
10
|
|
|
11
|
-
Fix the JSON in `biome.json` (a trailing comma or a comment is the usual cause), then run `npx --no-install kalup init
|
|
11
|
+
Fix the JSON in `biome.json` (a trailing comma or a comment is the usual cause), then run `npx --no-install kalup init` again.
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## When
|
|
6
6
|
|
|
7
|
-
`
|
|
7
|
+
`hubspot/blueprints.lock.json` lists each blueprint once, by name. Adding it again would lose its merge base and the conflicts the lock holds, so `add` refuses and points at `kalup blueprint upgrade`, which merges the new version with what the client changed.
|
|
8
8
|
|
|
9
9
|
## Fix
|
|
10
10
|
|
|
@@ -13,5 +13,5 @@ Run the command in the fix, `kalup blueprint upgrade <name> <source>`, to move t
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
E_BLUEPRINT_ADDED: acme/renewals is already in
|
|
16
|
+
E_BLUEPRINT_ADDED: acme/renewals is already in hubspot/blueprints.lock.json, at version 1.0.0. Nothing was written. (fix: to move to this version, run kalup blueprint upgrade acme/renewals blueprints/renewals-2.0.0.json) (docs: errors/E_BLUEPRINT_ADDED.md)
|
|
17
17
|
```
|