@eloxiv/cli 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/AgentSkills.d.ts +51 -0
- package/dist/AgentSkills.d.ts.map +1 -0
- package/dist/AgentSkills.js +264 -0
- package/dist/AgentSkills.js.map +1 -0
- package/dist/AgentWeb.d.ts +83 -0
- package/dist/AgentWeb.d.ts.map +1 -0
- package/dist/AgentWeb.js +436 -0
- package/dist/AgentWeb.js.map +1 -0
- package/dist/App.d.ts +213 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +357 -0
- package/dist/App.js.map +1 -0
- package/dist/Blueprint.d.ts +47 -0
- package/dist/Blueprint.d.ts.map +1 -0
- package/dist/Blueprint.js +241 -0
- package/dist/Blueprint.js.map +1 -0
- package/dist/Brand.d.ts +42 -0
- package/dist/Brand.d.ts.map +1 -0
- package/dist/Brand.js +370 -0
- package/dist/Brand.js.map +1 -0
- package/dist/Changelog.d.ts +22 -0
- package/dist/Changelog.d.ts.map +1 -0
- package/dist/Changelog.js +117 -0
- package/dist/Changelog.js.map +1 -0
- package/dist/Cli.d.ts +17 -0
- package/dist/Cli.d.ts.map +1 -0
- package/dist/Cli.js +810 -0
- package/dist/Cli.js.map +1 -0
- package/dist/DbAdmin.d.ts +18 -0
- package/dist/DbAdmin.d.ts.map +1 -0
- package/dist/DbAdmin.js +91 -0
- package/dist/DbAdmin.js.map +1 -0
- package/dist/Dependencies.d.ts +53 -0
- package/dist/Dependencies.d.ts.map +1 -0
- package/dist/Dependencies.js +132 -0
- package/dist/Dependencies.js.map +1 -0
- package/dist/Deploy.d.ts +39 -0
- package/dist/Deploy.d.ts.map +1 -0
- package/dist/Deploy.js +458 -0
- package/dist/Deploy.js.map +1 -0
- package/dist/Docs.d.ts +71 -0
- package/dist/Docs.d.ts.map +1 -0
- package/dist/Docs.js +240 -0
- package/dist/Docs.js.map +1 -0
- package/dist/Doctor.d.ts +56 -0
- package/dist/Doctor.d.ts.map +1 -0
- package/dist/Doctor.js +368 -0
- package/dist/Doctor.js.map +1 -0
- package/dist/Dossier.d.ts +23 -0
- package/dist/Dossier.d.ts.map +1 -0
- package/dist/Dossier.js +92 -0
- package/dist/Dossier.js.map +1 -0
- package/dist/Emit.d.ts +26 -0
- package/dist/Emit.d.ts.map +1 -0
- package/dist/Emit.js +51 -0
- package/dist/Emit.js.map +1 -0
- package/dist/Errors.d.ts +26 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +17 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Evals.d.ts +52 -0
- package/dist/Evals.d.ts.map +1 -0
- package/dist/Evals.js +126 -0
- package/dist/Evals.js.map +1 -0
- package/dist/Files.d.ts +47 -0
- package/dist/Files.d.ts.map +1 -0
- package/dist/Files.js +145 -0
- package/dist/Files.js.map +1 -0
- package/dist/Generate.d.ts +80 -0
- package/dist/Generate.d.ts.map +1 -0
- package/dist/Generate.js +310 -0
- package/dist/Generate.js.map +1 -0
- package/dist/Guards.d.ts +45 -0
- package/dist/Guards.d.ts.map +1 -0
- package/dist/Guards.js +530 -0
- package/dist/Guards.js.map +1 -0
- package/dist/Inspect.d.ts +125 -0
- package/dist/Inspect.d.ts.map +1 -0
- package/dist/Inspect.js +270 -0
- package/dist/Inspect.js.map +1 -0
- package/dist/Keychain.d.ts +57 -0
- package/dist/Keychain.d.ts.map +1 -0
- package/dist/Keychain.js +73 -0
- package/dist/Keychain.js.map +1 -0
- package/dist/Lock.d.ts +13 -0
- package/dist/Lock.d.ts.map +1 -0
- package/dist/Lock.js +145 -0
- package/dist/Lock.js.map +1 -0
- package/dist/Mcp.d.ts +91 -0
- package/dist/Mcp.d.ts.map +1 -0
- package/dist/Mcp.js +128 -0
- package/dist/Mcp.js.map +1 -0
- package/dist/Merge.d.ts +18 -0
- package/dist/Merge.d.ts.map +1 -0
- package/dist/Merge.js +43 -0
- package/dist/Merge.js.map +1 -0
- package/dist/Migrate.d.ts +78 -0
- package/dist/Migrate.d.ts.map +1 -0
- package/dist/Migrate.js +288 -0
- package/dist/Migrate.js.map +1 -0
- package/dist/Plugins.d.ts +36 -0
- package/dist/Plugins.d.ts.map +1 -0
- package/dist/Plugins.js +304 -0
- package/dist/Plugins.js.map +1 -0
- package/dist/Postgres.d.ts +73 -0
- package/dist/Postgres.d.ts.map +1 -0
- package/dist/Postgres.js +294 -0
- package/dist/Postgres.js.map +1 -0
- package/dist/Publish.d.ts +23 -0
- package/dist/Publish.d.ts.map +1 -0
- package/dist/Publish.js +59 -0
- package/dist/Publish.js.map +1 -0
- package/dist/Registry.d.ts +539 -0
- package/dist/Registry.d.ts.map +1 -0
- package/dist/Registry.js +340 -0
- package/dist/Registry.js.map +1 -0
- package/dist/Remote.d.ts +90 -0
- package/dist/Remote.d.ts.map +1 -0
- package/dist/Remote.js +1006 -0
- package/dist/Remote.js.map +1 -0
- package/dist/Run.d.ts +120 -0
- package/dist/Run.d.ts.map +1 -0
- package/dist/Run.js +477 -0
- package/dist/Run.js.map +1 -0
- package/dist/SyncGen.d.ts +118 -0
- package/dist/SyncGen.d.ts.map +1 -0
- package/dist/SyncGen.js +392 -0
- package/dist/SyncGen.js.map +1 -0
- package/dist/Update.d.ts +301 -0
- package/dist/Update.d.ts.map +1 -0
- package/dist/Update.js +627 -0
- package/dist/Update.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +42 -0
- package/dist/bin.js.map +1 -0
- package/dist/docs/backlog.md +56 -0
- package/dist/docs/ci.md +277 -0
- package/dist/docs/cli.md +696 -0
- package/dist/docs/connectors/google.md +115 -0
- package/dist/docs/connectors/http-openapi.md +7 -0
- package/dist/docs/connectors/mcp.md +8 -0
- package/dist/docs/connectors/microsoft-graph.md +75 -0
- package/dist/docs/connectors/openai.md +25 -0
- package/dist/docs/connectors/slack.md +162 -0
- package/dist/docs/connectors/workos.md +39 -0
- package/dist/docs/contracts/README.md +173 -0
- package/dist/docs/contracts/action-consent.md +92 -0
- package/dist/docs/contracts/action-registry.md +85 -0
- package/dist/docs/contracts/actor.md +100 -0
- package/dist/docs/contracts/agent-resources.md +90 -0
- package/dist/docs/contracts/agent-runtime.md +257 -0
- package/dist/docs/contracts/approvals.md +126 -0
- package/dist/docs/contracts/audit.md +75 -0
- package/dist/docs/contracts/auth-provider.md +74 -0
- package/dist/docs/contracts/calendar-provider.md +46 -0
- package/dist/docs/contracts/client-sdk.md +245 -0
- package/dist/docs/contracts/collab-document.md +151 -0
- package/dist/docs/contracts/command.md +44 -0
- package/dist/docs/contracts/connections.md +235 -0
- package/dist/docs/contracts/context-accounting.md +50 -0
- package/dist/docs/contracts/daemon.md +243 -0
- package/dist/docs/contracts/db-tx.md +53 -0
- package/dist/docs/contracts/delegation.md +68 -0
- package/dist/docs/contracts/device-control.md +103 -0
- package/dist/docs/contracts/directory-provider.md +36 -0
- package/dist/docs/contracts/directory.md +161 -0
- package/dist/docs/contracts/document-source.md +33 -0
- package/dist/docs/contracts/files.md +115 -0
- package/dist/docs/contracts/flags.md +83 -0
- package/dist/docs/contracts/host.md +68 -0
- package/dist/docs/contracts/http-api.md +43 -0
- package/dist/docs/contracts/ingestion.md +130 -0
- package/dist/docs/contracts/ingress.md +141 -0
- package/dist/docs/contracts/invocation.md +260 -0
- package/dist/docs/contracts/local-client.md +108 -0
- package/dist/docs/contracts/locale.md +56 -0
- package/dist/docs/contracts/machine-identity.md +117 -0
- package/dist/docs/contracts/mail-provider.md +49 -0
- package/dist/docs/contracts/memory.md +53 -0
- package/dist/docs/contracts/messaging.md +40 -0
- package/dist/docs/contracts/metering.md +139 -0
- package/dist/docs/contracts/model-provider.md +84 -0
- package/dist/docs/contracts/module-manifest.md +213 -0
- package/dist/docs/contracts/notification-channel.md +90 -0
- package/dist/docs/contracts/notifications.md +123 -0
- package/dist/docs/contracts/outbox.md +80 -0
- package/dist/docs/contracts/privacy.md +110 -0
- package/dist/docs/contracts/progress.md +52 -0
- package/dist/docs/contracts/query-surface.md +108 -0
- package/dist/docs/contracts/readiness.md +63 -0
- package/dist/docs/contracts/release.md +142 -0
- package/dist/docs/contracts/result-rendering.md +61 -0
- package/dist/docs/contracts/sandbox.md +186 -0
- package/dist/docs/contracts/scheduler.md +148 -0
- package/dist/docs/contracts/screen-context.md +81 -0
- package/dist/docs/contracts/search.md +120 -0
- package/dist/docs/contracts/secrets.md +74 -0
- package/dist/docs/contracts/settings.md +109 -0
- package/dist/docs/contracts/sharing.md +77 -0
- package/dist/docs/contracts/slot.md +48 -0
- package/dist/docs/contracts/space.md +67 -0
- package/dist/docs/contracts/storage-adapter.md +45 -0
- package/dist/docs/contracts/storage-backend.md +56 -0
- package/dist/docs/contracts/sync.md +213 -0
- package/dist/docs/contracts/telemetry.md +80 -0
- package/dist/docs/contracts/theme-tokens.md +50 -0
- package/dist/docs/contracts/tool-source.md +58 -0
- package/dist/docs/contracts/versioning.md +99 -0
- package/dist/docs/contracts/view.md +65 -0
- package/dist/docs/contracts/work-items.md +99 -0
- package/dist/docs/contracts/workflow.md +82 -0
- package/dist/docs/decisions.md +163 -0
- package/dist/docs/example-app.md +192 -0
- package/dist/docs/getting-started.md +927 -0
- package/dist/docs/goal.md +54 -0
- package/dist/docs/parity.md +29 -0
- package/dist/docs/performance.md +129 -0
- package/dist/docs/registry/README.md +74 -0
- package/dist/docs/registry/app.md +38 -0
- package/dist/docs/registry/approvals-ui-foldkit.md +28 -0
- package/dist/docs/registry/calendar-ui-foldkit.md +27 -0
- package/dist/docs/registry/calendar.md +35 -0
- package/dist/docs/registry/chat-ui-foldkit.md +30 -0
- package/dist/docs/registry/desktop-rune.md +49 -0
- package/dist/docs/registry/desktop.md +32 -0
- package/dist/docs/registry/eloxiv-action.md +25 -0
- package/dist/docs/registry/eloxiv-connector.md +25 -0
- package/dist/docs/registry/eloxiv-module.md +25 -0
- package/dist/docs/registry/eloxiv-policy.md +25 -0
- package/dist/docs/registry/eloxiv-view.md +25 -0
- package/dist/docs/registry/hello-ui-foldkit.md +29 -0
- package/dist/docs/registry/hello.md +39 -0
- package/dist/docs/registry/home-ui-foldkit.md +27 -0
- package/dist/docs/registry/home.md +29 -0
- package/dist/docs/registry/inbox-ui-foldkit.md +27 -0
- package/dist/docs/registry/mail-ui-foldkit.md +27 -0
- package/dist/docs/registry/mail.md +34 -0
- package/dist/docs/registry/meeting-prep.md +26 -0
- package/dist/docs/registry/members-ui-foldkit.md +28 -0
- package/dist/docs/registry/mobile.md +37 -0
- package/dist/docs/registry/notes-ui-foldkit.md +27 -0
- package/dist/docs/registry/notes.md +26 -0
- package/dist/docs/registry/people-ui-foldkit.md +28 -0
- package/dist/docs/registry/people.md +38 -0
- package/dist/docs/registry/shell-foldkit.md +34 -0
- package/dist/docs/registry/theme.md +25 -0
- package/dist/docs/registry/ui-conformance.md +30 -0
- package/dist/docs/release.md +100 -0
- package/dist/docs/scaffold.md +826 -0
- package/dist/docs/security/threat-model.md +299 -0
- package/dist/docs/upstream/zero-cache-socket-handoff.md +105 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/src/AgentSkills.ts +329 -0
- package/src/AgentWeb.ts +507 -0
- package/src/App.ts +435 -0
- package/src/Blueprint.ts +276 -0
- package/src/Brand.ts +415 -0
- package/src/Changelog.ts +136 -0
- package/src/Cli.ts +1458 -0
- package/src/DbAdmin.ts +115 -0
- package/src/Dependencies.ts +170 -0
- package/src/Deploy.ts +563 -0
- package/src/Docs.ts +309 -0
- package/src/Doctor.ts +424 -0
- package/src/Dossier.ts +148 -0
- package/src/Emit.ts +68 -0
- package/src/Errors.ts +18 -0
- package/src/Evals.ts +153 -0
- package/src/Files.ts +152 -0
- package/src/Generate.ts +402 -0
- package/src/Guards.ts +541 -0
- package/src/Inspect.ts +358 -0
- package/src/Keychain.ts +107 -0
- package/src/Lock.ts +174 -0
- package/src/Mcp.ts +159 -0
- package/src/Merge.ts +70 -0
- package/src/Migrate.ts +331 -0
- package/src/Plugins.ts +347 -0
- package/src/Postgres.ts +353 -0
- package/src/Publish.ts +64 -0
- package/src/Registry.ts +405 -0
- package/src/Remote.ts +1158 -0
- package/src/Run.ts +541 -0
- package/src/SyncGen.ts +570 -0
- package/src/Update.ts +873 -0
- package/src/bin.ts +46 -0
- package/src/index.ts +7 -0
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app side of the CLI: its config (`eloxiv.json`), its lockfile (`eloxiv.lock.json`), installing items
|
|
3
|
+
* (`eloxiv add`) and regenerating the composition files.
|
|
4
|
+
*/
|
|
5
|
+
import { type ProvenanceEntry } from "@eloxiv/contracts";
|
|
6
|
+
import { Effect, FileSystem, Path, Schema } from "effect";
|
|
7
|
+
import { type NpmChange } from "./Dependencies.ts";
|
|
8
|
+
import { CliError } from "./Errors.ts";
|
|
9
|
+
import { type InstalledModule } from "./Generate.ts";
|
|
10
|
+
import { type RegistryItem } from "./Registry.ts";
|
|
11
|
+
export { parseSpec, sortKeys } from "./Dependencies.ts";
|
|
12
|
+
export { CliError, ExitStatus } from "./Errors.ts";
|
|
13
|
+
/** This CLI's version: its package.json's, one level above `src/` or `dist/`. */
|
|
14
|
+
export declare const CLI_VERSION: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether this CLI runs as an installed package (npx, a global install, an app's own dependency: its real directory is
|
|
17
|
+
* inside a `node_modules`), not from an Eloxiv checkout, whose workspace links the packages by directory.
|
|
18
|
+
*/
|
|
19
|
+
export declare const cliIsInstalled: (root?: string) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* What `eloxiv init` adds to a new app's devDependencies for the framework itself: from an installed CLI, this CLI at
|
|
22
|
+
* its published range (`^<version>`), so the app runs `eloxiv` from its own dependencies (and the deploy recipes find
|
|
23
|
+
* it); from a checkout, nothing (the registry items bring the packages the app imports; this repository's apps link
|
|
24
|
+
* the workspace's).
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Where `eloxiv init` records the registry unless `--registry` names one: from an installed CLI, its own dependency
|
|
28
|
+
* `@eloxiv/registry` (`npm:@eloxiv/registry`: no network access needed, and the same on every machine); from a
|
|
29
|
+
* checkout, Eloxiv's registry on GitHub, as before.
|
|
30
|
+
*/
|
|
31
|
+
export declare const defaultRegistry: (installed?: boolean) => string;
|
|
32
|
+
export declare const frameworkDevDependencies: (installed?: boolean) => Record<string, string>;
|
|
33
|
+
export declare const CONFIG_FILE = "eloxiv.json";
|
|
34
|
+
export declare const LOCK_FILE = "eloxiv.lock.json";
|
|
35
|
+
export declare const AppConfig: Schema.Struct<{
|
|
36
|
+
readonly name: Schema.String;
|
|
37
|
+
readonly registry: Schema.String;
|
|
38
|
+
/**
|
|
39
|
+
* The app's own modules (written in the app, never installed from a registry), composed beside the installed ones
|
|
40
|
+
* by the registry's layout: `modules/<name>/contract.ts` exporting the contract as `<name>`, `server.ts` exporting
|
|
41
|
+
* `<name>Module`, and `sync.ts` with its named queries when it has one (its tables go to `sync.gen.ts`).
|
|
42
|
+
*/
|
|
43
|
+
readonly modules: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
44
|
+
}>;
|
|
45
|
+
export type AppConfig = typeof AppConfig.Type;
|
|
46
|
+
/** A lockfile being edited in memory. */
|
|
47
|
+
export interface MutableLock {
|
|
48
|
+
lockfileVersion: 1;
|
|
49
|
+
items: Record<string, ProvenanceEntry>;
|
|
50
|
+
}
|
|
51
|
+
export declare const readJson: <S extends Schema.Top>(schema: S, file: string) => Effect.Effect<S["Type"], CliError, FileSystem.FileSystem>;
|
|
52
|
+
export declare const writeJson: (file: string, value: unknown) => Effect.Effect<void, import("effect/PlatformError").PlatformError, FileSystem.FileSystem>;
|
|
53
|
+
export declare const readLock: (dir: string) => Effect.Effect<MutableLock, CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
54
|
+
export declare const writeLock: (dir: string, lock: MutableLock) => Effect.Effect<void, CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
55
|
+
/** The app's config and its registry location, resolved against the app directory. */
|
|
56
|
+
export declare const readConfig: (dir: string) => Effect.Effect<{
|
|
57
|
+
config: {
|
|
58
|
+
readonly name: string;
|
|
59
|
+
readonly registry: string;
|
|
60
|
+
readonly modules?: readonly string[];
|
|
61
|
+
};
|
|
62
|
+
registry: string;
|
|
63
|
+
}, CliError, FileSystem.FileSystem | Path.Path>;
|
|
64
|
+
export declare const hashText: (text: string) => Effect.Effect<string, never, never>;
|
|
65
|
+
/** A lock path, normalised the way item targets are (`./src/a` is `src/a`). */
|
|
66
|
+
export declare const lockPath: (path: string) => string;
|
|
67
|
+
/** The app's package.json. */
|
|
68
|
+
export declare const readPackage: (dir: string) => Effect.Effect<Record<string, any>, CliError, FileSystem.FileSystem | Path.Path>;
|
|
69
|
+
export declare const writePackage: (dir: string, pkg: Record<string, any>) => Effect.Effect<void, CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
70
|
+
/**
|
|
71
|
+
* The app's own modules (`eloxiv.json`'s `modules`), as the composition sees an installed one. A name that is not a
|
|
72
|
+
* lower-case identifier, names an installed item, or has no `modules/<name>/contract.ts` and `server.ts` is refused.
|
|
73
|
+
*/
|
|
74
|
+
export declare const ownModules: (dir: string, lock: MutableLock) => Effect.Effect<InstalledModule[], CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
75
|
+
/** The modules the composition includes: every installed module item, then the app's own. */
|
|
76
|
+
export declare const installedModules: (lock: MutableLock, dir?: string) => Effect.Effect<InstalledModule[], CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
77
|
+
/** The composition files as the generator writes them for what the app has: what `regenerate` writes, `doctor` checks. */
|
|
78
|
+
export declare const composition: (dir: string, lock: MutableLock) => Effect.Effect<{
|
|
79
|
+
modules: InstalledModule[];
|
|
80
|
+
files: readonly (readonly [string, string])[];
|
|
81
|
+
}, CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
82
|
+
export declare const regenerate: (dir: string, lock: MutableLock) => Effect.Effect<string[], CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
83
|
+
/**
|
|
84
|
+
* Regenerate every installed module's sync tables (`sync.gen.ts`) from its Drizzle tables and entities: what
|
|
85
|
+
* `eloxiv generate` does after a module's schema or entities change. Imports the modules' contracts, so the
|
|
86
|
+
* app's dependencies must be installed.
|
|
87
|
+
*/
|
|
88
|
+
export declare const generateSyncTables: (dir: string, lock: MutableLock) => Effect.Effect<string[], CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
89
|
+
/** Hashes of an item's files as published: the lock's record of the base. */
|
|
90
|
+
export declare const publishedFiles: (item: RegistryItem) => Effect.Effect<{
|
|
91
|
+
path: string;
|
|
92
|
+
sha256: string;
|
|
93
|
+
}[], never, never>;
|
|
94
|
+
export interface Installed {
|
|
95
|
+
readonly added: ReadonlyArray<RegistryItem>;
|
|
96
|
+
/** The added items' npm dependencies: applied to package.json, or only planned with `packageJson: false`. */
|
|
97
|
+
readonly npm: ReadonlyArray<NpmChange>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Copy `names` and their registry dependencies into the app. Every item is checked before anything is
|
|
101
|
+
* written: a file in the way (unless `overwrite`) or a symbolic link on a target path refuses the whole
|
|
102
|
+
* install. A dependency the app's package.json already has at another version is kept. With
|
|
103
|
+
* `packageJson: false` package.json is left to the caller (`update` merges it once for everything).
|
|
104
|
+
*/
|
|
105
|
+
export declare const installItems: (dir: string, names: readonly string[], overwrite: boolean, options?: {
|
|
106
|
+
readonly packageJson: boolean;
|
|
107
|
+
} | undefined) => Effect.Effect<{
|
|
108
|
+
added: {
|
|
109
|
+
readonly name: string;
|
|
110
|
+
readonly type: string;
|
|
111
|
+
readonly description?: string | undefined;
|
|
112
|
+
readonly registryDependencies?: readonly string[] | undefined;
|
|
113
|
+
readonly dependencies?: readonly string[] | undefined;
|
|
114
|
+
readonly devDependencies?: readonly string[] | undefined;
|
|
115
|
+
readonly files: readonly {
|
|
116
|
+
readonly path: string;
|
|
117
|
+
readonly type: string;
|
|
118
|
+
readonly target?: string | undefined;
|
|
119
|
+
readonly content: string;
|
|
120
|
+
}[];
|
|
121
|
+
readonly meta: {
|
|
122
|
+
readonly eloxiv: {
|
|
123
|
+
readonly kind: "app" | "connector" | "desktop" | "mobile" | "module" | "shell" | "skill" | "space" | "theme" | "ui";
|
|
124
|
+
readonly version: string;
|
|
125
|
+
readonly module?: string | undefined;
|
|
126
|
+
readonly contract?: {
|
|
127
|
+
readonly file: string;
|
|
128
|
+
readonly export: string;
|
|
129
|
+
} | undefined;
|
|
130
|
+
readonly server?: {
|
|
131
|
+
readonly file: string;
|
|
132
|
+
readonly export: string;
|
|
133
|
+
} | undefined;
|
|
134
|
+
readonly sync?: {
|
|
135
|
+
readonly file: string;
|
|
136
|
+
readonly tables?: string | undefined;
|
|
137
|
+
readonly mutators?: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
readonly kernelModules?: readonly ("agent" | "connections" | "devices" | "inbox" | "search" | "sharing" | "spaces")[] | undefined;
|
|
140
|
+
readonly provides?: readonly string[] | undefined;
|
|
141
|
+
readonly skill?: string | undefined;
|
|
142
|
+
readonly patchedDependencies?: {
|
|
143
|
+
readonly [x: string]: string;
|
|
144
|
+
} | undefined;
|
|
145
|
+
readonly next?: readonly string[] | undefined;
|
|
146
|
+
readonly migrations?: readonly {
|
|
147
|
+
readonly since: string;
|
|
148
|
+
readonly moves?: readonly {
|
|
149
|
+
readonly from: string;
|
|
150
|
+
readonly symbol?: string | undefined;
|
|
151
|
+
readonly to: string;
|
|
152
|
+
readonly as?: string | undefined;
|
|
153
|
+
}[] | undefined;
|
|
154
|
+
readonly note?: string | undefined;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}[];
|
|
159
|
+
npm: readonly NpmChange[];
|
|
160
|
+
}, CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
161
|
+
/** `eloxiv add`: install `names` and their registry dependencies; the items added. */
|
|
162
|
+
export declare const install: (dir: string, names: ReadonlyArray<string>, overwrite: boolean) => Effect.Effect<{
|
|
163
|
+
readonly name: string;
|
|
164
|
+
readonly type: string;
|
|
165
|
+
readonly description?: string | undefined;
|
|
166
|
+
readonly registryDependencies?: readonly string[] | undefined;
|
|
167
|
+
readonly dependencies?: readonly string[] | undefined;
|
|
168
|
+
readonly devDependencies?: readonly string[] | undefined;
|
|
169
|
+
readonly files: readonly {
|
|
170
|
+
readonly path: string;
|
|
171
|
+
readonly type: string;
|
|
172
|
+
readonly target?: string | undefined;
|
|
173
|
+
readonly content: string;
|
|
174
|
+
}[];
|
|
175
|
+
readonly meta: {
|
|
176
|
+
readonly eloxiv: {
|
|
177
|
+
readonly kind: "app" | "connector" | "desktop" | "mobile" | "module" | "shell" | "skill" | "space" | "theme" | "ui";
|
|
178
|
+
readonly version: string;
|
|
179
|
+
readonly module?: string | undefined;
|
|
180
|
+
readonly contract?: {
|
|
181
|
+
readonly file: string;
|
|
182
|
+
readonly export: string;
|
|
183
|
+
} | undefined;
|
|
184
|
+
readonly server?: {
|
|
185
|
+
readonly file: string;
|
|
186
|
+
readonly export: string;
|
|
187
|
+
} | undefined;
|
|
188
|
+
readonly sync?: {
|
|
189
|
+
readonly file: string;
|
|
190
|
+
readonly tables?: string | undefined;
|
|
191
|
+
readonly mutators?: string | undefined;
|
|
192
|
+
} | undefined;
|
|
193
|
+
readonly kernelModules?: readonly ("agent" | "connections" | "devices" | "inbox" | "search" | "sharing" | "spaces")[] | undefined;
|
|
194
|
+
readonly provides?: readonly string[] | undefined;
|
|
195
|
+
readonly skill?: string | undefined;
|
|
196
|
+
readonly patchedDependencies?: {
|
|
197
|
+
readonly [x: string]: string;
|
|
198
|
+
} | undefined;
|
|
199
|
+
readonly next?: readonly string[] | undefined;
|
|
200
|
+
readonly migrations?: readonly {
|
|
201
|
+
readonly since: string;
|
|
202
|
+
readonly moves?: readonly {
|
|
203
|
+
readonly from: string;
|
|
204
|
+
readonly symbol?: string | undefined;
|
|
205
|
+
readonly to: string;
|
|
206
|
+
readonly as?: string | undefined;
|
|
207
|
+
}[] | undefined;
|
|
208
|
+
readonly note?: string | undefined;
|
|
209
|
+
}[] | undefined;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
}[], CliError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
213
|
+
//# sourceMappingURL=App.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAW,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAIlE,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE3G,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAUtC,OAAO,EAUL,KAAK,eAAe,EAErB,MAAM,eAAe,CAAA;AACtB,OAAO,EAUL,KAAK,YAAY,EAClB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAElD,iFAAiF;AACjF,eAAO,MAAM,WAAW,QAAe,CAAA;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc,qBAAiE,OAM3F,CAAA;AAED;;;;;GAKG;AACH;;;;GAIG;AACH,eAAO,MAAM,eAAe,2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0HAA0H;AAC1H,eAAO,MAAM,WAAW,QAAS,MAAM,QAAQ,WAAW;;;8FAoBtD,CAAA;AAEJ,eAAO,MAAM,UAAU,QAAS,MAAM,QAAQ,WAAW,wHAKrD,CAAA;AAEJ;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAS,MAAM,QAAQ,WAAW,wHAgB7D,CAAA;AAEJ,6EAA6E;AAC7E,eAAO,MAAM,cAAc,SAAU,YAAY;;;kBAG9C,CAAA;AAEH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IAC3C,6GAA6G;IAC7G,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;CACvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY;0BAIU,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAgGxC,CAAA;AAEF,sFAAsF;AACtF,eAAO,MAAM,OAAO,QAAS,MAAM,SAAS,aAAa,CAAC,MAAM,CAAC,aAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gGACC,CAAA"}
|
package/dist/App.js
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app side of the CLI: its config (`eloxiv.json`), its lockfile (`eloxiv.lock.json`), installing items
|
|
3
|
+
* (`eloxiv add`) and regenerating the composition files.
|
|
4
|
+
*/
|
|
5
|
+
import { Lockfile } from "@eloxiv/contracts";
|
|
6
|
+
import { Console, Effect, FileSystem, Path, Schema } from "effect";
|
|
7
|
+
import { realpathSync } from "node:fs";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
import { applyChanges, formatNpmChange, planAdded, writesPackage } from "./Dependencies.js";
|
|
11
|
+
import { cliVersion } from "./Docs.js";
|
|
12
|
+
import { CliError } from "./Errors.js";
|
|
13
|
+
import { bytesEqualText, normaliseTarget, readAppBytes, removeAppFile, sha256Bytes, writablePath, writeAppFile, } from "./Files.js";
|
|
14
|
+
import { compositionFiles, identifier, isConnectionConnector, isModelConnector, moduleSyncTables, staleMutatorsFiles, syncLayout, } from "./Generate.js";
|
|
15
|
+
import { contentHash, EloxivMeta, GITHUB_REGISTRY, PACKAGE_REGISTRY, resolveItems, resolveRegistryLocation, sha256, targetOf, versionPath, } from "./Registry.js";
|
|
16
|
+
export { parseSpec, sortKeys } from "./Dependencies.js";
|
|
17
|
+
export { CliError, ExitStatus } from "./Errors.js";
|
|
18
|
+
/** This CLI's version: its package.json's, one level above `src/` or `dist/`. */
|
|
19
|
+
export const CLI_VERSION = cliVersion();
|
|
20
|
+
/**
|
|
21
|
+
* Whether this CLI runs as an installed package (npx, a global install, an app's own dependency: its real directory is
|
|
22
|
+
* inside a `node_modules`), not from an Eloxiv checkout, whose workspace links the packages by directory.
|
|
23
|
+
*/
|
|
24
|
+
export const cliIsInstalled = (root = join(dirname(fileURLToPath(import.meta.url)), "..")) => {
|
|
25
|
+
try {
|
|
26
|
+
return realpathSync(root).split(/[\\/]/u).includes("node_modules");
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* What `eloxiv init` adds to a new app's devDependencies for the framework itself: from an installed CLI, this CLI at
|
|
34
|
+
* its published range (`^<version>`), so the app runs `eloxiv` from its own dependencies (and the deploy recipes find
|
|
35
|
+
* it); from a checkout, nothing (the registry items bring the packages the app imports; this repository's apps link
|
|
36
|
+
* the workspace's).
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* Where `eloxiv init` records the registry unless `--registry` names one: from an installed CLI, its own dependency
|
|
40
|
+
* `@eloxiv/registry` (`npm:@eloxiv/registry`: no network access needed, and the same on every machine); from a
|
|
41
|
+
* checkout, Eloxiv's registry on GitHub, as before.
|
|
42
|
+
*/
|
|
43
|
+
export const defaultRegistry = (installed = cliIsInstalled()) => installed ? PACKAGE_REGISTRY : GITHUB_REGISTRY;
|
|
44
|
+
export const frameworkDevDependencies = (installed = cliIsInstalled()) => installed ? { "@eloxiv/cli": `^${CLI_VERSION}` } : {};
|
|
45
|
+
export const CONFIG_FILE = "eloxiv.json";
|
|
46
|
+
export const LOCK_FILE = "eloxiv.lock.json";
|
|
47
|
+
export const AppConfig = Schema.Struct({
|
|
48
|
+
name: Schema.String,
|
|
49
|
+
registry: Schema.String,
|
|
50
|
+
/**
|
|
51
|
+
* The app's own modules (written in the app, never installed from a registry), composed beside the installed ones
|
|
52
|
+
* by the registry's layout: `modules/<name>/contract.ts` exporting the contract as `<name>`, `server.ts` exporting
|
|
53
|
+
* `<name>Module`, and `sync.ts` with its named queries when it has one (its tables go to `sync.gen.ts`).
|
|
54
|
+
*/
|
|
55
|
+
modules: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
56
|
+
});
|
|
57
|
+
export const readJson = (schema, file) => Effect.gen(function* () {
|
|
58
|
+
const fs = yield* FileSystem.FileSystem;
|
|
59
|
+
const text = yield* fs
|
|
60
|
+
.readFileString(file)
|
|
61
|
+
.pipe(Effect.mapError(() => new CliError({ message: `Cannot read ${file}` })));
|
|
62
|
+
return yield* Schema.decodeUnknownEffect(Schema.fromJsonString(schema))(text).pipe(Effect.mapError((e) => new CliError({ message: `${file} is invalid: ${String(e)}` })));
|
|
63
|
+
});
|
|
64
|
+
export const writeJson = (file, value) => Effect.gen(function* () {
|
|
65
|
+
const fs = yield* FileSystem.FileSystem;
|
|
66
|
+
yield* fs.writeFileString(file, `${JSON.stringify(value, null, 2)}\n`);
|
|
67
|
+
});
|
|
68
|
+
export const readLock = (dir) => Effect.gen(function* () {
|
|
69
|
+
const fs = yield* FileSystem.FileSystem;
|
|
70
|
+
const path = yield* Path.Path;
|
|
71
|
+
const file = path.join(dir, LOCK_FILE);
|
|
72
|
+
const empty = { lockfileVersion: 1, items: {} };
|
|
73
|
+
if (!(yield* fs.exists(file)))
|
|
74
|
+
return empty;
|
|
75
|
+
const lock = yield* readJson(Lockfile, file);
|
|
76
|
+
const mutable = { lockfileVersion: 1, items: { ...lock.items } };
|
|
77
|
+
return mutable;
|
|
78
|
+
});
|
|
79
|
+
export const writeLock = (dir, lock) => Effect.gen(function* () {
|
|
80
|
+
yield* writeJson(yield* writablePath(dir, LOCK_FILE), lock);
|
|
81
|
+
});
|
|
82
|
+
/** The app's config and its registry location, resolved against the app directory. */
|
|
83
|
+
export const readConfig = (dir) => Effect.gen(function* () {
|
|
84
|
+
const path = yield* Path.Path;
|
|
85
|
+
const config = yield* readJson(AppConfig, path.join(dir, CONFIG_FILE));
|
|
86
|
+
const resolved = resolveRegistryLocation(config.registry, dir);
|
|
87
|
+
if ("error" in resolved)
|
|
88
|
+
return yield* new CliError({ message: `${CONFIG_FILE}: ${resolved.error}` });
|
|
89
|
+
return { config, registry: resolved.location };
|
|
90
|
+
});
|
|
91
|
+
export const hashText = (text) => Effect.promise(() => sha256(text));
|
|
92
|
+
/** A lock path, normalised the way item targets are (`./src/a` is `src/a`). */
|
|
93
|
+
export const lockPath = (path) => normaliseTarget(path) ?? path;
|
|
94
|
+
/** The app's package.json. */
|
|
95
|
+
export const readPackage = (dir) => Effect.gen(function* () {
|
|
96
|
+
const path = yield* Path.Path;
|
|
97
|
+
return (yield* readJson(Schema.Unknown, path.join(dir, "package.json")));
|
|
98
|
+
});
|
|
99
|
+
export const writePackage = (dir, pkg) => Effect.gen(function* () {
|
|
100
|
+
yield* writeJson(yield* writablePath(dir, "package.json"), pkg);
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* The app's own modules (`eloxiv.json`'s `modules`), as the composition sees an installed one. A name that is not a
|
|
104
|
+
* lower-case identifier, names an installed item, or has no `modules/<name>/contract.ts` and `server.ts` is refused.
|
|
105
|
+
*/
|
|
106
|
+
export const ownModules = (dir, lock) => Effect.gen(function* () {
|
|
107
|
+
const fs = yield* FileSystem.FileSystem;
|
|
108
|
+
const path = yield* Path.Path;
|
|
109
|
+
if (!(yield* fs.exists(path.join(dir, CONFIG_FILE))))
|
|
110
|
+
return [];
|
|
111
|
+
const { config } = yield* readConfig(dir);
|
|
112
|
+
const modules = [];
|
|
113
|
+
for (const name of config.modules ?? []) {
|
|
114
|
+
const problem = !/^[a-z][a-z0-9_]*$/.test(name)
|
|
115
|
+
? "is not a lower-case identifier (letters, digits and _)"
|
|
116
|
+
: lock.items[name] !== undefined
|
|
117
|
+
? "is an installed registry item"
|
|
118
|
+
: undefined;
|
|
119
|
+
if (problem !== undefined)
|
|
120
|
+
return yield* new CliError({ message: `${CONFIG_FILE}: the app's own module "${name}" ${problem}` });
|
|
121
|
+
const file = (base) => `./modules/${name}/${base}`;
|
|
122
|
+
for (const required of ["contract.ts", "server.ts"])
|
|
123
|
+
if (!(yield* fs.exists(path.join(dir, file(required)))))
|
|
124
|
+
return yield* new CliError({
|
|
125
|
+
message: `${CONFIG_FILE}: the app's own module "${name}" has no ${file(required)}`,
|
|
126
|
+
});
|
|
127
|
+
const id = identifier(name);
|
|
128
|
+
const synced = yield* fs.exists(path.join(dir, file("sync.ts")));
|
|
129
|
+
// Its mutators file, when generation puts them apart (with a custom prediction), is the layout's default.
|
|
130
|
+
modules.push({
|
|
131
|
+
name,
|
|
132
|
+
meta: {
|
|
133
|
+
kind: "module",
|
|
134
|
+
version: "0.0.0",
|
|
135
|
+
contract: { file: file("contract.ts"), export: id },
|
|
136
|
+
server: { file: file("server.ts"), export: `${id}Module` },
|
|
137
|
+
...(synced ? { sync: { file: file("sync.ts"), tables: file("sync.gen.ts") } } : {}),
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return modules;
|
|
142
|
+
});
|
|
143
|
+
/** The modules the composition includes: every installed module item, then the app's own. */
|
|
144
|
+
export const installedModules = (lock, dir) => Effect.gen(function* () {
|
|
145
|
+
const modules = [];
|
|
146
|
+
for (const entry of Object.values(lock.items)) {
|
|
147
|
+
const meta = yield* Schema.decodeUnknownEffect(EloxivMeta)(entry.meta).pipe(Effect.orDie);
|
|
148
|
+
if (meta.kind === "module")
|
|
149
|
+
modules.push({ name: entry.name, meta });
|
|
150
|
+
}
|
|
151
|
+
if (dir !== undefined)
|
|
152
|
+
modules.push(...(yield* ownModules(dir, lock)));
|
|
153
|
+
return modules;
|
|
154
|
+
});
|
|
155
|
+
const installedConnectors = (lock) => Effect.gen(function* () {
|
|
156
|
+
const connectors = [];
|
|
157
|
+
for (const entry of Object.values(lock.items)) {
|
|
158
|
+
const meta = yield* Schema.decodeUnknownEffect(EloxivMeta)(entry.meta).pipe(Effect.orDie);
|
|
159
|
+
if (isConnectionConnector(meta))
|
|
160
|
+
connectors.push({ name: entry.name, meta });
|
|
161
|
+
}
|
|
162
|
+
return connectors;
|
|
163
|
+
});
|
|
164
|
+
/** Installed model connectors (a ModelProvider each, for the agent). */
|
|
165
|
+
const installedModels = (lock) => Effect.gen(function* () {
|
|
166
|
+
const models = [];
|
|
167
|
+
for (const entry of Object.values(lock.items)) {
|
|
168
|
+
const meta = yield* Schema.decodeUnknownEffect(EloxivMeta)(entry.meta).pipe(Effect.orDie);
|
|
169
|
+
if (isModelConnector(meta))
|
|
170
|
+
models.push({ name: entry.name, meta });
|
|
171
|
+
}
|
|
172
|
+
return models;
|
|
173
|
+
});
|
|
174
|
+
/** Installed items other than modules (UI items) that ask for kernel-provided modules. */
|
|
175
|
+
const installedRequesting = (lock) => Effect.gen(function* () {
|
|
176
|
+
const items = [];
|
|
177
|
+
for (const entry of Object.values(lock.items)) {
|
|
178
|
+
const meta = yield* Schema.decodeUnknownEffect(EloxivMeta)(entry.meta).pipe(Effect.orDie);
|
|
179
|
+
if (meta.kind !== "module" && (meta.kernelModules ?? []).length > 0)
|
|
180
|
+
items.push({ name: entry.name, meta });
|
|
181
|
+
}
|
|
182
|
+
return items;
|
|
183
|
+
});
|
|
184
|
+
const installedSkills = (lock) => Effect.gen(function* () {
|
|
185
|
+
const skills = [];
|
|
186
|
+
for (const entry of Object.values(lock.items)) {
|
|
187
|
+
const meta = yield* Schema.decodeUnknownEffect(EloxivMeta)(entry.meta).pipe(Effect.orDie);
|
|
188
|
+
if (meta.kind === "skill" && meta.server !== undefined)
|
|
189
|
+
skills.push({ name: entry.name, meta });
|
|
190
|
+
}
|
|
191
|
+
return skills;
|
|
192
|
+
});
|
|
193
|
+
/** The composition files as the generator writes them for what the app has: what `regenerate` writes, `doctor` checks. */
|
|
194
|
+
export const composition = (dir, lock) => Effect.gen(function* () {
|
|
195
|
+
const modules = yield* installedModules(lock, dir);
|
|
196
|
+
const connectors = yield* installedConnectors(lock);
|
|
197
|
+
const skills = yield* installedSkills(lock);
|
|
198
|
+
const requesting = yield* installedRequesting(lock);
|
|
199
|
+
const models = yield* installedModels(lock);
|
|
200
|
+
// A module's mutators come from its separate mutators file when it has one: generation writes it exactly when it
|
|
201
|
+
// puts them apart (and removes a stale one), whatever the module's metadata says.
|
|
202
|
+
const fs = yield* FileSystem.FileSystem;
|
|
203
|
+
const path = yield* Path.Path;
|
|
204
|
+
const apart = new Set();
|
|
205
|
+
for (const module of modules) {
|
|
206
|
+
const layout = syncLayout(module.meta);
|
|
207
|
+
if (layout !== undefined && (yield* fs.exists(path.join(dir, layout.mutators))))
|
|
208
|
+
apart.add(module.name);
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
modules,
|
|
212
|
+
files: compositionFiles(modules, connectors, skills, requesting, models, (m) => apart.has(m.name)),
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
export const regenerate = (dir, lock) => Effect.gen(function* () {
|
|
216
|
+
const { modules, files } = yield* composition(dir, lock);
|
|
217
|
+
for (const [file, content] of files)
|
|
218
|
+
yield* writeAppFile(dir, file, content);
|
|
219
|
+
return modules.map((m) => m.name);
|
|
220
|
+
});
|
|
221
|
+
/**
|
|
222
|
+
* Regenerate every installed module's sync tables (`sync.gen.ts`) from its Drizzle tables and entities: what
|
|
223
|
+
* `eloxiv generate` does after a module's schema or entities change. Imports the modules' contracts, so the
|
|
224
|
+
* app's dependencies must be installed.
|
|
225
|
+
*/
|
|
226
|
+
export const generateSyncTables = (dir, lock) => Effect.gen(function* () {
|
|
227
|
+
const modules = yield* installedModules(lock, dir);
|
|
228
|
+
const files = yield* Effect.tryPromise({
|
|
229
|
+
try: () => moduleSyncTables(dir, modules),
|
|
230
|
+
catch: (error) => new CliError({
|
|
231
|
+
message: `Cannot generate the sync tables: ${error instanceof Error ? error.message : String(error)}`,
|
|
232
|
+
}),
|
|
233
|
+
});
|
|
234
|
+
for (const [file, content] of files)
|
|
235
|
+
yield* writeAppFile(dir, file, content);
|
|
236
|
+
// A generated mutators file a module no longer has (its last custom prediction removed): gone, so the
|
|
237
|
+
// composition generated next imports none.
|
|
238
|
+
const removed = staleMutatorsFiles(dir, modules, files);
|
|
239
|
+
for (const file of removed)
|
|
240
|
+
yield* removeAppFile(dir, file);
|
|
241
|
+
return [...files.map(([file]) => lockPath(file)), ...removed.map(lockPath)];
|
|
242
|
+
});
|
|
243
|
+
/** Hashes of an item's files as published: the lock's record of the base. */
|
|
244
|
+
export const publishedFiles = (item) => Effect.forEach(item.files, (file) => Effect.map(hashText(file.content), (sha) => ({ path: targetOf(file), sha256: sha })));
|
|
245
|
+
/**
|
|
246
|
+
* Copy `names` and their registry dependencies into the app. Every item is checked before anything is
|
|
247
|
+
* written: a file in the way (unless `overwrite`) or a symbolic link on a target path refuses the whole
|
|
248
|
+
* install. A dependency the app's package.json already has at another version is kept. With
|
|
249
|
+
* `packageJson: false` package.json is left to the caller (`update` merges it once for everything).
|
|
250
|
+
*/
|
|
251
|
+
export const installItems = Effect.fn("Cli.installItems")(function* (dir, names, overwrite, options = { packageJson: true }) {
|
|
252
|
+
const { config, registry } = yield* readConfig(dir);
|
|
253
|
+
const lock = yield* readLock(dir);
|
|
254
|
+
const items = yield* resolveItems(registry, names).pipe(Effect.mapError((e) => new CliError({ message: e.message })));
|
|
255
|
+
const plans = [];
|
|
256
|
+
const claimed = new Map();
|
|
257
|
+
for (const item of items) {
|
|
258
|
+
const hash = yield* contentHash(item);
|
|
259
|
+
const existing = lock.items[item.name];
|
|
260
|
+
if (existing !== undefined && existing.contentHash === hash && !overwrite)
|
|
261
|
+
continue;
|
|
262
|
+
if (existing?.owner === "app" && !overwrite) {
|
|
263
|
+
yield* Console.log(`${item.name} is app-owned (eloxiv eject); left alone`);
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
if (existing !== undefined && existing.contentHash !== hash && !overwrite && names.includes(item.name)) {
|
|
267
|
+
return yield* new CliError({
|
|
268
|
+
message: `${item.name} is installed at ${existing.registryVersion} (${existing.contentHash.slice(0, 12)}); the registry has ${item.meta.eloxiv.version} (${hash.slice(0, 12)}). Run \`eloxiv update ${item.name}\` to merge the new version into your copy.`,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
if (existing !== undefined && !names.includes(item.name))
|
|
272
|
+
continue;
|
|
273
|
+
const removals = [];
|
|
274
|
+
// Files the previously installed version had and this one does not: removed if unmodified.
|
|
275
|
+
if (existing !== undefined) {
|
|
276
|
+
const kept = new Set(item.files.map(targetOf));
|
|
277
|
+
for (const previous of existing.files) {
|
|
278
|
+
const previousPath = lockPath(previous.path);
|
|
279
|
+
if (kept.has(previousPath))
|
|
280
|
+
continue;
|
|
281
|
+
const current = yield* readAppBytes(dir, previousPath);
|
|
282
|
+
if (current === undefined)
|
|
283
|
+
continue;
|
|
284
|
+
if ((yield* sha256Bytes(current)) !== previous.sha256) {
|
|
285
|
+
yield* Console.log(`kept ${previousPath}: modified locally, no longer part of ${item.name}`);
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
yield* writablePath(dir, previousPath);
|
|
289
|
+
removals.push(previousPath);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
for (const file of item.files) {
|
|
293
|
+
const target = targetOf(file);
|
|
294
|
+
yield* writablePath(dir, target);
|
|
295
|
+
// An item added earlier in this install writes the file first: the same check as against the app's file.
|
|
296
|
+
const earlier = claimed.get(target);
|
|
297
|
+
claimed.set(target, { item: item.name, content: file.content });
|
|
298
|
+
if (overwrite)
|
|
299
|
+
continue;
|
|
300
|
+
if (earlier !== undefined && earlier.content !== file.content) {
|
|
301
|
+
return yield* new CliError({
|
|
302
|
+
message: `${target} is a different file in ${earlier.item} and ${item.name}; pass --overwrite to take ${item.name}'s`,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
const current = yield* readAppBytes(dir, target);
|
|
306
|
+
if (current !== undefined && !bytesEqualText(current, file.content)) {
|
|
307
|
+
return yield* new CliError({
|
|
308
|
+
message: `${target} already exists and differs from ${item.name}; pass --overwrite to replace it`,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
plans.push({ item, hash, removals });
|
|
313
|
+
}
|
|
314
|
+
// Every item passed its checks: write them.
|
|
315
|
+
for (const { item, hash, removals } of plans) {
|
|
316
|
+
for (const removal of removals)
|
|
317
|
+
yield* removeAppFile(dir, removal);
|
|
318
|
+
for (const file of item.files)
|
|
319
|
+
yield* writeAppFile(dir, targetOf(file), file.content);
|
|
320
|
+
const files = yield* publishedFiles(item);
|
|
321
|
+
lock.items[item.name] = {
|
|
322
|
+
name: item.name,
|
|
323
|
+
type: item.type,
|
|
324
|
+
registry: config.registry,
|
|
325
|
+
registryVersion: item.meta.eloxiv.version,
|
|
326
|
+
contentHash: hash,
|
|
327
|
+
installedAt: new Date().toISOString(),
|
|
328
|
+
files,
|
|
329
|
+
meta: item.meta.eloxiv,
|
|
330
|
+
item: versionPath(item.name, item.meta.eloxiv.version),
|
|
331
|
+
};
|
|
332
|
+
yield* Console.log(`added ${item.name}@${item.meta.eloxiv.version} (${files.length} files, sha256 ${hash.slice(0, 12)})`);
|
|
333
|
+
}
|
|
334
|
+
const added = plans.map((plan) => plan.item);
|
|
335
|
+
let npm = [];
|
|
336
|
+
if (added.length > 0) {
|
|
337
|
+
const pkg = yield* readPackage(dir);
|
|
338
|
+
npm = planAdded(pkg, added, true);
|
|
339
|
+
if (options.packageJson) {
|
|
340
|
+
if (writesPackage(npm))
|
|
341
|
+
yield* writePackage(dir, applyChanges(pkg, npm));
|
|
342
|
+
for (const change of npm)
|
|
343
|
+
if (change.outcome === "kept-local")
|
|
344
|
+
yield* Console.log(formatNpmChange(change, "", change.item ?? ""));
|
|
345
|
+
}
|
|
346
|
+
yield* writeLock(dir, lock);
|
|
347
|
+
}
|
|
348
|
+
const modules = yield* regenerate(dir, lock);
|
|
349
|
+
yield* Console.log(`composition: ${modules.length === 0 ? "no modules" : modules.join(", ")}`);
|
|
350
|
+
for (const item of added)
|
|
351
|
+
for (const step of item.meta.eloxiv.next ?? [])
|
|
352
|
+
yield* Console.log(`next (${item.name}): ${step}`);
|
|
353
|
+
return { added, npm };
|
|
354
|
+
});
|
|
355
|
+
/** `eloxiv add`: install `names` and their registry dependencies; the items added. */
|
|
356
|
+
export const install = (dir, names, overwrite) => installItems(dir, names, overwrite).pipe(Effect.map((installed) => installed.added));
|
|
357
|
+
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAwB,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAkB,MAAM,mBAAmB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