@maycombhq/sdk 2.0.0-beta.8 → 2.0.0-beta.9
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/npm/core/api.d.ts +3 -1
- package/npm/core/facts-join.d.ts +4 -1
- package/npm/core/manifest-edit.d.ts +5 -4
- package/npm/core/schema/workspace.d.ts +22 -11
- package/npm/index.js +11 -4
- package/package.json +1 -1
package/npm/core/api.d.ts
CHANGED
|
@@ -987,7 +987,7 @@ export declare const ChangeDetail: z.ZodObject<{
|
|
|
987
987
|
}, z.core.$strip>>;
|
|
988
988
|
repos: z.ZodArray<z.ZodString>;
|
|
989
989
|
workspace: z.ZodOptional<z.ZodObject<{
|
|
990
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
990
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
991
991
|
change: z.ZodString;
|
|
992
992
|
repos: z.ZodArray<z.ZodObject<{
|
|
993
993
|
id: z.ZodString;
|
|
@@ -1693,10 +1693,12 @@ export declare const RepoView: z.ZodObject<{
|
|
|
1693
1693
|
build: z.ZodOptional<z.ZodString>;
|
|
1694
1694
|
archived: z.ZodDefault<z.ZodBoolean>;
|
|
1695
1695
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1696
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
1696
1697
|
modules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1697
1698
|
path: z.ZodString;
|
|
1698
1699
|
component: z.ZodString;
|
|
1699
1700
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1701
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
1700
1702
|
}, z.core.$strict>>>;
|
|
1701
1703
|
platform: z.ZodString;
|
|
1702
1704
|
baseClone: z.ZodObject<{
|
package/npm/core/facts-join.d.ts
CHANGED
|
@@ -47,10 +47,13 @@ export interface JoinRepo {
|
|
|
47
47
|
component?: string;
|
|
48
48
|
/** Hosts the repo answers on (repos.manifest.yaml). */
|
|
49
49
|
hosts?: readonly string[];
|
|
50
|
-
/**
|
|
50
|
+
/** The path its routes sit under on its hosts, when they are shared (ADR 0134). */
|
|
51
|
+
basePath?: string;
|
|
52
|
+
/** Modules with hosts of their own (ADR 0057), and their base paths (ADR 0134). */
|
|
51
53
|
modules?: readonly {
|
|
52
54
|
component: string;
|
|
53
55
|
hosts: readonly string[];
|
|
56
|
+
basePath?: string;
|
|
54
57
|
}[];
|
|
55
58
|
/** An API gateway (the manifest's `type: gateway`): its entries are routes it forwards. */
|
|
56
59
|
gateway?: boolean;
|
|
@@ -40,11 +40,12 @@ export declare function addManifestRepo(root: string, platform: string, entry: {
|
|
|
40
40
|
description?: RepoDescription;
|
|
41
41
|
}): Promise<ManifestFile>;
|
|
42
42
|
/**
|
|
43
|
-
* Rewrite every manifest
|
|
44
|
-
* comments and order (ADR 0009, 0128). Nothing a person wrote
|
|
45
|
-
* read as they are and stay valid, and this only keeps diffs clean.
|
|
46
|
-
* would change.
|
|
43
|
+
* Rewrite every manifest at a version below `to` (the current one when left out) at that
|
|
44
|
+
* version, keeping its comments and order (ADR 0009, 0128, 0134). Nothing a person wrote
|
|
45
|
+
* changes: older manifests are read as they are and stay valid, and this only keeps diffs clean.
|
|
46
|
+
* `dryRun` lists what it would change.
|
|
47
47
|
*/
|
|
48
48
|
export declare function migrateManifests(root: string, o?: {
|
|
49
49
|
dryRun?: boolean;
|
|
50
|
+
to?: number;
|
|
50
51
|
}): Promise<string[]>;
|
|
@@ -12,15 +12,22 @@ import { z } from "zod";
|
|
|
12
12
|
*
|
|
13
13
|
* Version 2 (ADR 0128) added `description` on a repo, optional, and changed no other field.
|
|
14
14
|
*/
|
|
15
|
-
export declare const WORKSPACE_SCHEMA_VERSION:
|
|
15
|
+
export declare const WORKSPACE_SCHEMA_VERSION: 3;
|
|
16
16
|
/** Every workspace-file schema version a reader accepts, oldest first. */
|
|
17
|
-
export declare const SUPPORTED_WORKSPACE_SCHEMA_VERSIONS: readonly [1, 2];
|
|
17
|
+
export declare const SUPPORTED_WORKSPACE_SCHEMA_VERSIONS: readonly [1, 2, 3];
|
|
18
18
|
/**
|
|
19
|
-
* A workspace file's schema version. Version-1 files differ from version
|
|
20
|
-
* (
|
|
21
|
-
*
|
|
19
|
+
* A workspace file's schema version. Version-1 and version-2 files differ from version 3 only in
|
|
20
|
+
* this number (version 2 let a repo say what it is, version 3 its base path; nothing they hold
|
|
21
|
+
* changed meaning), so they are read as they are and come back as version 3 in memory; writers
|
|
22
|
+
* always write the current version, and `atticus upgrade` rewrites old files.
|
|
22
23
|
*/
|
|
23
|
-
export declare const WorkspaceSchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
24
|
+
export declare const WorkspaceSchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
25
|
+
/**
|
|
26
|
+
* The path a repo's routes sit under on its hosts (ADR 0134): what a platform's ingress or a
|
|
27
|
+
* shared gateway host puts in front of them (`/forge/limits`, `/forge-onboarding/1.0`). Plain
|
|
28
|
+
* segments, a leading slash and no trailing one.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BasePath: z.ZodString;
|
|
24
31
|
export declare const GitRef: z.ZodString;
|
|
25
32
|
/**
|
|
26
33
|
* A URL's host (lower case) and port (the scheme's when it names none), or undefined for a
|
|
@@ -99,15 +106,17 @@ export declare const ManifestRepo: z.ZodObject<{
|
|
|
99
106
|
build: z.ZodOptional<z.ZodString>;
|
|
100
107
|
archived: z.ZodDefault<z.ZodBoolean>;
|
|
101
108
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
109
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
102
110
|
modules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
103
111
|
path: z.ZodString;
|
|
104
112
|
component: z.ZodString;
|
|
105
113
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
114
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
106
115
|
}, z.core.$strict>>>;
|
|
107
116
|
}, z.core.$strict>;
|
|
108
117
|
export type ManifestRepo = z.infer<typeof ManifestRepo>;
|
|
109
118
|
export declare const RepoManifest: z.ZodObject<{
|
|
110
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
119
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
111
120
|
platform: z.ZodString;
|
|
112
121
|
repos: z.ZodArray<z.ZodObject<{
|
|
113
122
|
id: z.ZodString;
|
|
@@ -137,10 +146,12 @@ export declare const RepoManifest: z.ZodObject<{
|
|
|
137
146
|
build: z.ZodOptional<z.ZodString>;
|
|
138
147
|
archived: z.ZodDefault<z.ZodBoolean>;
|
|
139
148
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
149
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
140
150
|
modules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
141
151
|
path: z.ZodString;
|
|
142
152
|
component: z.ZodString;
|
|
143
153
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
154
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
144
155
|
}, z.core.$strict>>>;
|
|
145
156
|
}, z.core.$strict>>;
|
|
146
157
|
}, z.core.$strict>;
|
|
@@ -212,7 +223,7 @@ export declare const ChangeRepo: z.ZodObject<{
|
|
|
212
223
|
}, z.core.$strict>;
|
|
213
224
|
export type ChangeRepo = z.infer<typeof ChangeRepo>;
|
|
214
225
|
export declare const ChangeRepos: z.ZodObject<{
|
|
215
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
226
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
216
227
|
change: z.ZodString;
|
|
217
228
|
repos: z.ZodArray<z.ZodObject<{
|
|
218
229
|
id: z.ZodString;
|
|
@@ -270,7 +281,7 @@ export declare const OutcomeMeasure: z.ZodObject<{
|
|
|
270
281
|
}, z.core.$strict>;
|
|
271
282
|
export type OutcomeMeasure = z.infer<typeof OutcomeMeasure>;
|
|
272
283
|
export declare const ChangeOutcomes: z.ZodObject<{
|
|
273
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
284
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
274
285
|
change: z.ZodString;
|
|
275
286
|
measures: z.ZodArray<z.ZodObject<{
|
|
276
287
|
id: z.ZodString;
|
|
@@ -290,7 +301,7 @@ export type ChangeOutcomes = z.infer<typeof ChangeOutcomes>;
|
|
|
290
301
|
* Home shows the setup checklist.
|
|
291
302
|
*/
|
|
292
303
|
export declare const CatalogBaseline: z.ZodObject<{
|
|
293
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
304
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
294
305
|
acceptedBy: z.ZodString;
|
|
295
306
|
acceptedAt: z.ZodISODateTime;
|
|
296
307
|
kinds: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
@@ -303,7 +314,7 @@ export type CatalogBaseline = z.infer<typeof CatalogBaseline>;
|
|
|
303
314
|
* the migrations it has had. An older Atticus refuses to upgrade a metarepo a newer one wrote.
|
|
304
315
|
*/
|
|
305
316
|
export declare const MetarepoStamp: z.ZodObject<{
|
|
306
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
317
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
307
318
|
atticus: z.ZodString;
|
|
308
319
|
upgradedAt: z.ZodISODateTime;
|
|
309
320
|
upgradedBy: z.ZodString;
|
package/npm/index.js
CHANGED
|
@@ -2623,10 +2623,11 @@ var Profile = z9.strictObject({
|
|
|
2623
2623
|
|
|
2624
2624
|
// packages/core/dist/schema/workspace.js
|
|
2625
2625
|
import { z as z10 } from "zod";
|
|
2626
|
-
var WORKSPACE_SCHEMA_VERSION =
|
|
2627
|
-
var WorkspaceSchemaVersion = z10.union([z10.literal(1), z10.literal(2)], {
|
|
2628
|
-
error: "schemaVersion must be 1 or
|
|
2626
|
+
var WORKSPACE_SCHEMA_VERSION = 3;
|
|
2627
|
+
var WorkspaceSchemaVersion = z10.union([z10.literal(1), z10.literal(2), z10.literal(3)], {
|
|
2628
|
+
error: "schemaVersion must be 1, 2 or 3 (older files are read as version 3; ADR 0009, 0128, 0134)"
|
|
2629
2629
|
}).overwrite(() => WORKSPACE_SCHEMA_VERSION);
|
|
2630
|
+
var BasePath = z10.string().max(200).regex(/^(\/[A-Za-z0-9._~%{}-]+)+$/, "a path after the host: /segment/segment, starting with / and not ending in one");
|
|
2630
2631
|
var BranchSegment = RecordId;
|
|
2631
2632
|
var GitRef = z10.string().min(1).max(200).refine((s) => !/[\s~^:?*[\\]/.test(s) && !s.includes("..") && !s.startsWith("/") && !s.endsWith("/") && !s.endsWith(".lock") && !s.includes("@{"), "not a valid Git branch name");
|
|
2632
2633
|
var RelativePosixPath = z10.string().min(1).refine((p2) => !p2.startsWith("/") && !/^[A-Za-z]:/.test(p2) && !p2.includes("\\") && !p2.split("/").includes(".."), "a relative path inside the repo, written with forward slashes");
|
|
@@ -2685,6 +2686,11 @@ var ManifestRepo = z10.strictObject({
|
|
|
2685
2686
|
* and only calls to them go through the gateway.
|
|
2686
2687
|
*/
|
|
2687
2688
|
hosts: z10.array(HostPattern).default([]),
|
|
2689
|
+
/**
|
|
2690
|
+
* The path this repo's routes sit under on its hosts (ADR 0134), when the host is one several
|
|
2691
|
+
* repos share: a call on the host whose path starts with it goes to this repo.
|
|
2692
|
+
*/
|
|
2693
|
+
basePath: BasePath.optional(),
|
|
2688
2694
|
/**
|
|
2689
2695
|
* Modules that build their own component (ADR 0057): a folder, its component and the hosts
|
|
2690
2696
|
* it answers on. When none are listed, a repo with two or more Spring Boot apps gets one per
|
|
@@ -2693,7 +2699,8 @@ var ManifestRepo = z10.strictObject({
|
|
|
2693
2699
|
modules: z10.array(z10.strictObject({
|
|
2694
2700
|
path: RelativePosixPath,
|
|
2695
2701
|
component: RecordId,
|
|
2696
|
-
hosts: z10.array(HostPattern).default([])
|
|
2702
|
+
hosts: z10.array(HostPattern).default([]),
|
|
2703
|
+
basePath: BasePath.optional()
|
|
2697
2704
|
})).default([])
|
|
2698
2705
|
});
|
|
2699
2706
|
var RepoManifest = z10.strictObject({
|
package/package.json
CHANGED