@voyant-travel/framework 0.1.0 → 0.2.1
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/LICENSE +201 -0
- package/dist/composition.d.ts +150 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +404 -0
- package/dist/create-app.d.ts +52 -0
- package/dist/create-app.d.ts.map +1 -0
- package/dist/create-app.js +59 -0
- package/dist/discover-modules.d.ts +80 -0
- package/dist/discover-modules.d.ts.map +1 -0
- package/dist/discover-modules.js +104 -0
- package/dist/discover-modules.test.d.ts +2 -0
- package/dist/discover-modules.test.d.ts.map +1 -0
- package/dist/discover-modules.test.js +76 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/manifest.d.ts +28 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +56 -0
- package/dist/runtime-packages.generated.d.ts +3 -0
- package/dist/runtime-packages.generated.d.ts.map +1 -0
- package/dist/runtime-packages.generated.js +22 -0
- package/package.json +37 -40
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deployment-local module + extension discovery (consolidated-deployments RFC —
|
|
3
|
+
* the "20%" extension seams: *custom module* and *custom route on an existing
|
|
4
|
+
* module*, neither requiring a fork).
|
|
5
|
+
*
|
|
6
|
+
* A deployment drops a unit into a conventional directory and it is auto-mounted
|
|
7
|
+
* — no edit to a framework-owned file, no hand-wiring in the deployment's
|
|
8
|
+
* composition:
|
|
9
|
+
*
|
|
10
|
+
* - `src/modules/<name>/index.ts` → a new module (own routes + schema)
|
|
11
|
+
* - `src/extensions/<name>/index.ts` → a {@link HonoExtension} adding routes to
|
|
12
|
+
* an EXISTING module's surface
|
|
13
|
+
*
|
|
14
|
+
* Discovery is **build-time**: the deployment feeds a Vite
|
|
15
|
+
* `import.meta.glob("./modules/*\/index.ts", { eager: true })` (statically
|
|
16
|
+
* compiled to static imports — Workers-safe) into {@link modulesFromGlob} /
|
|
17
|
+
* {@link extensionsFromGlob}, which key each unit by its `<name>` directory
|
|
18
|
+
* segment.
|
|
19
|
+
*
|
|
20
|
+
* // src/api/composition.ts (deployment-owned)
|
|
21
|
+
* const modules = modulesFromGlob<OperatorCapabilities>(
|
|
22
|
+
* import.meta.glob("../modules/*\/index.ts", { eager: true }),
|
|
23
|
+
* )
|
|
24
|
+
* const extensions = extensionsFromGlob<OperatorCapabilities>(
|
|
25
|
+
* import.meta.glob("../extensions/*\/index.ts", { eager: true }),
|
|
26
|
+
* )
|
|
27
|
+
*
|
|
28
|
+
* // src/modules/loyalty/index.ts
|
|
29
|
+
* export default defineDeploymentModule({ module: { name: "loyalty" }, adminRoutes })
|
|
30
|
+
* // src/extensions/booking-notes/index.ts
|
|
31
|
+
* export default defineDeploymentExtension({
|
|
32
|
+
* extension: { module: "bookings" }, adminRoutes, // → /v1/admin/bookings/*
|
|
33
|
+
* })
|
|
34
|
+
*
|
|
35
|
+
* Schema owned by a custom module/extension (`<dir>/<name>/schema.ts`) is picked
|
|
36
|
+
* up by the deployment's drizzle config glob (a *deployment* migration source,
|
|
37
|
+
* applied after the framework bundle by the D.1 collector).
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Normalize a deployment-local module declaration into a {@link ModuleFactory}.
|
|
41
|
+
* Accepts a ready {@link HonoModule} (or array) or a factory; returns a factory
|
|
42
|
+
* either way. Use it as the `export default` of a `src/modules/<name>/index.ts`.
|
|
43
|
+
*/
|
|
44
|
+
export function defineDeploymentModule(declaration) {
|
|
45
|
+
return typeof declaration === "function" ? declaration : () => declaration;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Normalize a deployment-local extension declaration into an
|
|
49
|
+
* {@link ExtensionFactory}. Accepts a ready {@link HonoExtension} or a factory.
|
|
50
|
+
* Use it as the `export default` of a `src/extensions/<name>/index.ts`.
|
|
51
|
+
*/
|
|
52
|
+
export function defineDeploymentExtension(declaration) {
|
|
53
|
+
return typeof declaration === "function" ? declaration : () => declaration;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Build a deployment-local **module** registry from a Vite `import.meta.glob`
|
|
57
|
+
* (eager) of `src/modules/<name>/index.ts` files. Each entry's `default` export
|
|
58
|
+
* is a {@link HonoModule} or {@link ModuleFactory} (wrap with
|
|
59
|
+
* {@link defineDeploymentModule}); the registry key is the `<name>` directory
|
|
60
|
+
* segment, which becomes the module's composition specifier.
|
|
61
|
+
*
|
|
62
|
+
* @throws if a matched file has no default export.
|
|
63
|
+
*/
|
|
64
|
+
export function modulesFromGlob(glob) {
|
|
65
|
+
return discoverFromGlob(glob, "modules", (declaration) => defineDeploymentModule(declaration));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Build a deployment-local **extension** registry from a Vite `import.meta.glob`
|
|
69
|
+
* (eager) of `src/extensions/<name>/index.ts` files. Each entry's `default`
|
|
70
|
+
* export is a {@link HonoExtension} or {@link ExtensionFactory} (wrap with
|
|
71
|
+
* {@link defineDeploymentExtension}); the registry key is the `<name>` directory
|
|
72
|
+
* segment.
|
|
73
|
+
*
|
|
74
|
+
* @throws if a matched file has no default export.
|
|
75
|
+
*/
|
|
76
|
+
export function extensionsFromGlob(glob) {
|
|
77
|
+
return discoverFromGlob(glob, "extensions", (declaration) => defineDeploymentExtension(declaration));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Shared scanner: map an eager glob of `<dir>/<name>/index.ts` files to a
|
|
81
|
+
* `{ <name>: normalize(default) }` registry, ignoring non-matching paths.
|
|
82
|
+
*/
|
|
83
|
+
function discoverFromGlob(glob, dir, normalize) {
|
|
84
|
+
const registry = {};
|
|
85
|
+
for (const [path, namespace] of Object.entries(glob)) {
|
|
86
|
+
const name = nameFromPath(path, dir);
|
|
87
|
+
if (!name) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const declaration = namespace.default;
|
|
91
|
+
if (declaration == null) {
|
|
92
|
+
throw new Error(`deployment ${dir.replace(/s$/, "")} "${path}" has no default export — ` +
|
|
93
|
+
`add \`export default ${dir === "modules" ? "defineDeploymentModule" : "defineDeploymentExtension"}(...)\` ` +
|
|
94
|
+
`to src/${dir}/${name}/index.ts`);
|
|
95
|
+
}
|
|
96
|
+
registry[name] = normalize(declaration);
|
|
97
|
+
}
|
|
98
|
+
return registry;
|
|
99
|
+
}
|
|
100
|
+
/** Extract the `<name>` segment from a `.../<dir>/<name>/index.{ts,tsx,…}` path. */
|
|
101
|
+
function nameFromPath(path, dir) {
|
|
102
|
+
const match = path.match(new RegExp(`/${dir}/([^/]+)/index\\.[cm]?tsx?$`));
|
|
103
|
+
return match ? match[1] : null;
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover-modules.test.d.ts","sourceRoot":"","sources":["../src/discover-modules.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { defineDeploymentExtension, defineDeploymentModule, extensionsFromGlob, modulesFromGlob, } from "./discover-modules.js";
|
|
3
|
+
const loyalty = { module: { name: "loyalty" } };
|
|
4
|
+
const bookingNotes = { extension: { name: "booking-notes", module: "bookings" } };
|
|
5
|
+
// The factories under test ignore capabilities; cast a minimal context.
|
|
6
|
+
const ctx = { capabilities: {}, options: {} };
|
|
7
|
+
describe("defineDeploymentModule", () => {
|
|
8
|
+
it("wraps a ready HonoModule in a factory", () => {
|
|
9
|
+
const factory = defineDeploymentModule(loyalty);
|
|
10
|
+
expect(typeof factory).toBe("function");
|
|
11
|
+
expect(factory(ctx)).toBe(loyalty);
|
|
12
|
+
});
|
|
13
|
+
it("passes a factory through unchanged (identity)", () => {
|
|
14
|
+
const original = () => loyalty;
|
|
15
|
+
expect(defineDeploymentModule(original)).toBe(original);
|
|
16
|
+
});
|
|
17
|
+
it("supports a HonoModule[] declaration", () => {
|
|
18
|
+
const pair = [loyalty, { module: { name: "loyalty-admin" } }];
|
|
19
|
+
expect(defineDeploymentModule(pair)(ctx)).toBe(pair);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe("modulesFromGlob", () => {
|
|
23
|
+
it("keys each module by its <name> directory segment", () => {
|
|
24
|
+
const registry = modulesFromGlob({
|
|
25
|
+
"../modules/loyalty/index.ts": { default: loyalty },
|
|
26
|
+
"../modules/gift-cards/index.ts": { default: () => ({ module: { name: "gift-cards" } }) },
|
|
27
|
+
});
|
|
28
|
+
expect(Object.keys(registry).sort()).toEqual(["gift-cards", "loyalty"]);
|
|
29
|
+
expect(registry.loyalty?.(ctx)).toBe(loyalty);
|
|
30
|
+
});
|
|
31
|
+
it("returns an empty registry for an empty glob (no custom modules)", () => {
|
|
32
|
+
expect(modulesFromGlob({})).toEqual({});
|
|
33
|
+
});
|
|
34
|
+
it("ignores paths that aren't a modules/<name>/index file", () => {
|
|
35
|
+
const registry = modulesFromGlob({
|
|
36
|
+
"../modules/loyalty/schema.ts": { default: {} },
|
|
37
|
+
"../lib/helper.ts": { default: {} },
|
|
38
|
+
});
|
|
39
|
+
expect(registry).toEqual({});
|
|
40
|
+
});
|
|
41
|
+
it("throws on a matched module with no default export", () => {
|
|
42
|
+
expect(() => modulesFromGlob({ "../modules/loyalty/index.ts": { named: 1 } })).toThrow(/no default export/);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
describe("defineDeploymentExtension", () => {
|
|
46
|
+
it("wraps a ready HonoExtension in a factory", () => {
|
|
47
|
+
const factory = defineDeploymentExtension(bookingNotes);
|
|
48
|
+
expect(typeof factory).toBe("function");
|
|
49
|
+
expect(factory(ctx)).toBe(bookingNotes);
|
|
50
|
+
});
|
|
51
|
+
it("passes a factory through unchanged (identity)", () => {
|
|
52
|
+
const original = () => bookingNotes;
|
|
53
|
+
expect(defineDeploymentExtension(original)).toBe(original);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
describe("extensionsFromGlob", () => {
|
|
57
|
+
it("keys each extension by its <name> directory segment", () => {
|
|
58
|
+
const registry = extensionsFromGlob({
|
|
59
|
+
"../extensions/booking-notes/index.ts": { default: bookingNotes },
|
|
60
|
+
"../extensions/order-tags/index.ts": {
|
|
61
|
+
default: () => ({ extension: { name: "order-tags", module: "orders" } }),
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
expect(Object.keys(registry).sort()).toEqual(["booking-notes", "order-tags"]);
|
|
65
|
+
expect(registry["booking-notes"]?.(ctx)).toBe(bookingNotes);
|
|
66
|
+
});
|
|
67
|
+
it("returns an empty registry for an empty glob (no custom extensions)", () => {
|
|
68
|
+
expect(extensionsFromGlob({})).toEqual({});
|
|
69
|
+
});
|
|
70
|
+
it("does not pick up modules (only matches the extensions dir)", () => {
|
|
71
|
+
expect(extensionsFromGlob({ "../modules/loyalty/index.ts": { default: loyalty } })).toEqual({});
|
|
72
|
+
});
|
|
73
|
+
it("throws on a matched extension with no default export", () => {
|
|
74
|
+
expect(() => extensionsFromGlob({ "../extensions/booking-notes/index.ts": { named: 1 } })).toThrow(/no default export/);
|
|
75
|
+
});
|
|
76
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@voyant-travel/framework` — the Voyant framework BOM (bill of materials).
|
|
3
|
+
*
|
|
4
|
+
* This package's `dependencies` pin the exact tested runtime-module set. A
|
|
5
|
+
* deployment depends on **one** framework version instead of a matrix of
|
|
6
|
+
* per-package versions; `voyant upgrade` bumps it, and pnpm/npm resolve the
|
|
7
|
+
* pinned set transitively. The compatibility matrix is resolved *inside* the
|
|
8
|
+
* BOM — the deployment never sees it.
|
|
9
|
+
*
|
|
10
|
+
* This is deliberately NOT global lockstep: the runtime packages keep
|
|
11
|
+
* independent versions (only changed packages republish — no per-package npm
|
|
12
|
+
* email spam), and the BOM is the single thing that always tracks "the
|
|
13
|
+
* framework version".
|
|
14
|
+
*
|
|
15
|
+
* Beyond the BOM, the package also owns the standard runtime composition: the
|
|
16
|
+
* ordered manifest (`FRAMEWORK_RUNTIME_MANIFEST`) and the standard registry
|
|
17
|
+
* factories (`frameworkComposition`) a deployment spreads — Workstream B of the
|
|
18
|
+
* consolidated-deployments RFC.
|
|
19
|
+
*/
|
|
20
|
+
export { type FrameworkProviders, frameworkComposition } from "./composition.js";
|
|
21
|
+
export { type CreateVoyantAppConfig, createVoyantApp } from "./create-app.js";
|
|
22
|
+
export { type DeploymentExtensionDeclaration, type DeploymentModuleDeclaration, defineDeploymentExtension, defineDeploymentModule, type EagerModuleGlob, extensionsFromGlob, modulesFromGlob, } from "./discover-modules.js";
|
|
23
|
+
export { FRAMEWORK_RUNTIME_MANIFEST, type FrameworkManifest } from "./manifest.js";
|
|
24
|
+
export { FRAMEWORK_RUNTIME_PACKAGES, type FrameworkRuntimePackage, } from "./runtime-packages.generated.js";
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAE,KAAK,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,yBAAyB,EACzB,sBAAsB,EACtB,KAAK,eAAe,EACpB,kBAAkB,EAClB,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,0BAA0B,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAClF,OAAO,EACL,0BAA0B,EAC1B,KAAK,uBAAuB,GAC7B,MAAM,iCAAiC,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@voyant-travel/framework` — the Voyant framework BOM (bill of materials).
|
|
3
|
+
*
|
|
4
|
+
* This package's `dependencies` pin the exact tested runtime-module set. A
|
|
5
|
+
* deployment depends on **one** framework version instead of a matrix of
|
|
6
|
+
* per-package versions; `voyant upgrade` bumps it, and pnpm/npm resolve the
|
|
7
|
+
* pinned set transitively. The compatibility matrix is resolved *inside* the
|
|
8
|
+
* BOM — the deployment never sees it.
|
|
9
|
+
*
|
|
10
|
+
* This is deliberately NOT global lockstep: the runtime packages keep
|
|
11
|
+
* independent versions (only changed packages republish — no per-package npm
|
|
12
|
+
* email spam), and the BOM is the single thing that always tracks "the
|
|
13
|
+
* framework version".
|
|
14
|
+
*
|
|
15
|
+
* Beyond the BOM, the package also owns the standard runtime composition: the
|
|
16
|
+
* ordered manifest (`FRAMEWORK_RUNTIME_MANIFEST`) and the standard registry
|
|
17
|
+
* factories (`frameworkComposition`) a deployment spreads — Workstream B of the
|
|
18
|
+
* consolidated-deployments RFC.
|
|
19
|
+
*/
|
|
20
|
+
export { frameworkComposition } from "./composition.js";
|
|
21
|
+
export { createVoyantApp } from "./create-app.js";
|
|
22
|
+
export { defineDeploymentExtension, defineDeploymentModule, extensionsFromGlob, modulesFromGlob, } from "./discover-modules.js";
|
|
23
|
+
export { FRAMEWORK_RUNTIME_MANIFEST } from "./manifest.js";
|
|
24
|
+
export { FRAMEWORK_RUNTIME_PACKAGES, } from "./runtime-packages.generated.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The standard Voyant runtime composition manifest — the ordered set of
|
|
3
|
+
* package-delivered modules + extensions every operator deployment mounts.
|
|
4
|
+
*
|
|
5
|
+
* A deployment composes its full manifest by spreading this and appending its
|
|
6
|
+
* own deployment-local entries. Owning the standard ordering here means a new
|
|
7
|
+
* standard module added to the framework auto-joins the default set — the
|
|
8
|
+
* deployment doesn't re-list it.
|
|
9
|
+
*
|
|
10
|
+
* D.1 ships a FIXED standard profile: `createVoyantApp` always mounts this full
|
|
11
|
+
* set and only appends deployment-local modules/extensions — it does not yet
|
|
12
|
+
* consume `voyant.config` to pare the standard set down. Module subsetting is a
|
|
13
|
+
* later workstream; until then a deployment that must drop a standard module
|
|
14
|
+
* forks the manifest explicitly rather than configuring it away.
|
|
15
|
+
*
|
|
16
|
+
* Workstream B of the consolidated-deployments RFC: the standard registry's
|
|
17
|
+
* factories relocate into this package next; this is the manifest (the "which +
|
|
18
|
+
* order") moving first.
|
|
19
|
+
*/
|
|
20
|
+
export interface FrameworkManifest {
|
|
21
|
+
modules: readonly string[];
|
|
22
|
+
extensions: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
export declare const FRAMEWORK_RUNTIME_MANIFEST: {
|
|
25
|
+
readonly modules: readonly ["@voyant-travel/action-ledger", "@voyant-travel/relationships", "@voyant-travel/quotes", "@voyant-travel/operations", "@voyant-travel/identity", "@voyant-travel/distribution", "@voyant-travel/inventory/extras", "@voyant-travel/bookings/requirements", "@voyant-travel/commerce", "@voyant-travel/inventory", "@voyant-travel/catalog", "@voyant-travel/bookings", "@voyant-travel/finance", "@voyant-travel/legal", "@voyant-travel/public-document-delivery", "@voyant-travel/notifications", "@voyant-travel/storefront", "@voyant-travel/storefront/customer-portal", "@voyant-travel/storefront/verification", "@voyant-travel/trips", "@voyant-travel/flights", "@voyant-travel/operator-settings", "operator/mcp", "operator/catalog-booking", "operator/catalog-content", "operator/media", "operator/payment-link", "operator/contract-document"];
|
|
26
|
+
readonly extensions: readonly ["@voyant-travel/bookings/booking-supplier-extension", "@voyant-travel/finance/bookings-create-extension", "@voyant-travel/inventory/booking-extension", "@voyant-travel/inventory/authoring/extension", "@voyant-travel/quotes/booking-extension", "@voyant-travel/distribution", "@voyant-travel/distribution/channel-push-extension", "@voyant-travel/finance/booking-tax-extension", "operator/booking-schedule-extension", "operator/quote-version-snapshot-extension", "operator/booking-maintenance-extension", "operator/action-ledger-health-extension", "operator/proposal-extension", "operator/catalog-offers-extension", "operator/catalog-checkout-extension"];
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CAC9B;AAED,eAAO,MAAM,0BAA0B;;;CAuDD,CAAA"}
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const FRAMEWORK_RUNTIME_MANIFEST = {
|
|
2
|
+
modules: [
|
|
3
|
+
"@voyant-travel/action-ledger",
|
|
4
|
+
"@voyant-travel/relationships",
|
|
5
|
+
"@voyant-travel/quotes",
|
|
6
|
+
"@voyant-travel/operations",
|
|
7
|
+
"@voyant-travel/identity",
|
|
8
|
+
"@voyant-travel/distribution",
|
|
9
|
+
"@voyant-travel/inventory/extras",
|
|
10
|
+
"@voyant-travel/bookings/requirements",
|
|
11
|
+
"@voyant-travel/commerce",
|
|
12
|
+
"@voyant-travel/inventory",
|
|
13
|
+
"@voyant-travel/catalog",
|
|
14
|
+
"@voyant-travel/bookings",
|
|
15
|
+
"@voyant-travel/finance",
|
|
16
|
+
"@voyant-travel/legal",
|
|
17
|
+
"@voyant-travel/public-document-delivery",
|
|
18
|
+
"@voyant-travel/notifications",
|
|
19
|
+
"@voyant-travel/storefront",
|
|
20
|
+
"@voyant-travel/storefront/customer-portal",
|
|
21
|
+
"@voyant-travel/storefront/verification",
|
|
22
|
+
"@voyant-travel/trips",
|
|
23
|
+
"@voyant-travel/flights",
|
|
24
|
+
"@voyant-travel/operator-settings",
|
|
25
|
+
// `operator/*` STANDARD families — routes are package-owned; they keep the
|
|
26
|
+
// `operator/*` specifier only because the deployment injects their provider
|
|
27
|
+
// wiring (see operator-registry-classification.md). The framework owns the
|
|
28
|
+
// factory (frameworkComposition) + manifest entry; the deployment injects
|
|
29
|
+
// the loaders. (operator/invitations + operator/operator-settings are
|
|
30
|
+
// genuinely deployment-local and stay appended in the deployment's manifest.)
|
|
31
|
+
"operator/mcp",
|
|
32
|
+
"operator/catalog-booking",
|
|
33
|
+
"operator/catalog-content",
|
|
34
|
+
"operator/media",
|
|
35
|
+
"operator/payment-link",
|
|
36
|
+
"operator/contract-document",
|
|
37
|
+
],
|
|
38
|
+
extensions: [
|
|
39
|
+
"@voyant-travel/bookings/booking-supplier-extension",
|
|
40
|
+
"@voyant-travel/finance/bookings-create-extension",
|
|
41
|
+
"@voyant-travel/inventory/booking-extension",
|
|
42
|
+
"@voyant-travel/inventory/authoring/extension",
|
|
43
|
+
"@voyant-travel/quotes/booking-extension",
|
|
44
|
+
"@voyant-travel/distribution",
|
|
45
|
+
"@voyant-travel/distribution/channel-push-extension",
|
|
46
|
+
"@voyant-travel/finance/booking-tax-extension",
|
|
47
|
+
// `operator/*` STANDARD extensions (builders/loaders injected).
|
|
48
|
+
"operator/booking-schedule-extension",
|
|
49
|
+
"operator/quote-version-snapshot-extension",
|
|
50
|
+
"operator/booking-maintenance-extension",
|
|
51
|
+
"operator/action-ledger-health-extension",
|
|
52
|
+
"operator/proposal-extension",
|
|
53
|
+
"operator/catalog-offers-extension",
|
|
54
|
+
"operator/catalog-checkout-extension",
|
|
55
|
+
],
|
|
56
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const FRAMEWORK_RUNTIME_PACKAGES: readonly ["@voyant-travel/action-ledger", "@voyant-travel/bookings", "@voyant-travel/catalog", "@voyant-travel/commerce", "@voyant-travel/distribution", "@voyant-travel/finance", "@voyant-travel/flights", "@voyant-travel/identity", "@voyant-travel/inventory", "@voyant-travel/legal", "@voyant-travel/notifications", "@voyant-travel/operations", "@voyant-travel/operator-settings", "@voyant-travel/quotes", "@voyant-travel/relationships", "@voyant-travel/storefront", "@voyant-travel/trips"];
|
|
2
|
+
export type FrameworkRuntimePackage = (typeof FRAMEWORK_RUNTIME_PACKAGES)[number];
|
|
3
|
+
//# sourceMappingURL=runtime-packages.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-packages.generated.d.ts","sourceRoot":"","sources":["../src/runtime-packages.generated.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B,4eAkB7B,CAAA;AAEV,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// GENERATED by scripts/generate-framework-bom.mjs — do not edit.
|
|
2
|
+
// The runtime-module set this framework version pins (the BOM membership).
|
|
3
|
+
// Refresh with `node scripts/generate-framework-bom.mjs --emit`.
|
|
4
|
+
export const FRAMEWORK_RUNTIME_PACKAGES = [
|
|
5
|
+
"@voyant-travel/action-ledger",
|
|
6
|
+
"@voyant-travel/bookings",
|
|
7
|
+
"@voyant-travel/catalog",
|
|
8
|
+
"@voyant-travel/commerce",
|
|
9
|
+
"@voyant-travel/distribution",
|
|
10
|
+
"@voyant-travel/finance",
|
|
11
|
+
"@voyant-travel/flights",
|
|
12
|
+
"@voyant-travel/identity",
|
|
13
|
+
"@voyant-travel/inventory",
|
|
14
|
+
"@voyant-travel/legal",
|
|
15
|
+
"@voyant-travel/notifications",
|
|
16
|
+
"@voyant-travel/operations",
|
|
17
|
+
"@voyant-travel/operator-settings",
|
|
18
|
+
"@voyant-travel/quotes",
|
|
19
|
+
"@voyant-travel/relationships",
|
|
20
|
+
"@voyant-travel/storefront",
|
|
21
|
+
"@voyant-travel/trips",
|
|
22
|
+
];
|
package/package.json
CHANGED
|
@@ -1,64 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/framework",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Voyant framework BOM — pins the tested runtime-module set so a deployment tracks one framework version and upgrades atomically (no per-package compatibility matrix, no per-package republish/email spam).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
9
12
|
},
|
|
10
13
|
"files": [
|
|
11
14
|
"dist"
|
|
12
15
|
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc -p tsconfig.json",
|
|
15
|
-
"typecheck": "tsc --noEmit",
|
|
16
|
-
"test": "vitest run",
|
|
17
|
-
"lint": "biome check src",
|
|
18
|
-
"clean": "rm -rf dist"
|
|
19
|
-
},
|
|
20
16
|
"dependencies": {
|
|
21
|
-
"@voyant-travel/action-ledger": "
|
|
22
|
-
"@voyant-travel/bookings": "
|
|
23
|
-
"@voyant-travel/catalog": "
|
|
24
|
-
"@voyant-travel/commerce": "
|
|
25
|
-
"@voyant-travel/distribution": "
|
|
26
|
-
"@voyant-travel/finance": "
|
|
27
|
-
"@voyant-travel/flights": "
|
|
28
|
-
"@voyant-travel/identity": "
|
|
29
|
-
"@voyant-travel/inventory": "
|
|
30
|
-
"@voyant-travel/legal": "
|
|
31
|
-
"@voyant-travel/notifications": "
|
|
32
|
-
"@voyant-travel/operations": "
|
|
33
|
-
"@voyant-travel/operator-settings": "
|
|
34
|
-
"@voyant-travel/quotes": "
|
|
35
|
-
"@voyant-travel/relationships": "
|
|
36
|
-
"@voyant-travel/storefront": "
|
|
37
|
-
"@voyant-travel/trips": "
|
|
17
|
+
"@voyant-travel/action-ledger": "0.105.1",
|
|
18
|
+
"@voyant-travel/bookings": "0.124.0",
|
|
19
|
+
"@voyant-travel/catalog": "0.122.0",
|
|
20
|
+
"@voyant-travel/commerce": "0.6.0",
|
|
21
|
+
"@voyant-travel/distribution": "0.114.0",
|
|
22
|
+
"@voyant-travel/finance": "0.124.0",
|
|
23
|
+
"@voyant-travel/flights": "0.124.0",
|
|
24
|
+
"@voyant-travel/identity": "0.124.0",
|
|
25
|
+
"@voyant-travel/inventory": "0.3.4",
|
|
26
|
+
"@voyant-travel/legal": "0.124.0",
|
|
27
|
+
"@voyant-travel/notifications": "0.113.0",
|
|
28
|
+
"@voyant-travel/operations": "0.1.4",
|
|
29
|
+
"@voyant-travel/operator-settings": "0.2.1",
|
|
30
|
+
"@voyant-travel/quotes": "0.121.1",
|
|
31
|
+
"@voyant-travel/relationships": "0.120.1",
|
|
32
|
+
"@voyant-travel/storefront": "0.125.0",
|
|
33
|
+
"@voyant-travel/trips": "0.115.0"
|
|
38
34
|
},
|
|
39
35
|
"peerDependencies": {
|
|
40
|
-
"
|
|
41
|
-
"hono": "^
|
|
36
|
+
"hono": "^4.12.10",
|
|
37
|
+
"@voyant-travel/hono": "^0.112.1"
|
|
42
38
|
},
|
|
43
39
|
"devDependencies": {
|
|
44
|
-
"@voyant-travel/hono": "workspace:^",
|
|
45
|
-
"@voyant-travel/voyant-typescript-config": "workspace:^",
|
|
46
40
|
"hono": "^4.12.10",
|
|
47
41
|
"typescript": "^6.0.2",
|
|
48
|
-
"vitest": "^4.0.0"
|
|
42
|
+
"vitest": "^4.0.0",
|
|
43
|
+
"@voyant-travel/hono": "^0.112.1",
|
|
44
|
+
"@voyant-travel/voyant-typescript-config": "^0.1.0"
|
|
49
45
|
},
|
|
50
46
|
"publishConfig": {
|
|
51
|
-
"access": "public"
|
|
52
|
-
"exports": {
|
|
53
|
-
".": {
|
|
54
|
-
"types": "./dist/index.d.ts",
|
|
55
|
-
"import": "./dist/index.js"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
47
|
+
"access": "public"
|
|
58
48
|
},
|
|
59
49
|
"repository": {
|
|
60
50
|
"type": "git",
|
|
61
|
-
"url": "
|
|
51
|
+
"url": "https://github.com/voyant-travel/voyant.git",
|
|
62
52
|
"directory": "packages/framework"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsc -p tsconfig.json",
|
|
56
|
+
"typecheck": "tsc --noEmit",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"lint": "biome check src",
|
|
59
|
+
"clean": "rm -rf dist"
|
|
63
60
|
}
|
|
64
|
-
}
|
|
61
|
+
}
|