@ankhorage/projects 0.1.0 → 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 +1 -1
- package/dist/capabilities/index.d.ts +30 -0
- package/dist/capabilities/index.js +24 -0
- package/dist/features/projects/adapters/createProjectRepositoryFileSystemAsync.js +75 -11
- package/dist/features/projects/application/projects.d.ts +5 -2
- package/dist/features/projects/application/projects.js +11 -0
- package/dist/features/projects/domain/createProject.js +7 -1
- package/dist/features/projects/domain/saveProjectManifest.d.ts +3 -0
- package/dist/features/projects/domain/saveProjectManifest.js +23 -0
- package/dist/features/projects/ports/ProjectRepository.d.ts +7 -1
- package/dist/index.d.ts +2 -2
- package/dist/types/projects.d.ts +31 -0
- package/package.json +47 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/projects
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Standalone project identity and repository actions.
|
|
9
9
|
|
|
@@ -39,6 +39,36 @@ export declare const CAPABILITIES: readonly [{
|
|
|
39
39
|
};
|
|
40
40
|
readonly label: "Update project";
|
|
41
41
|
readonly description: "Update one existing persisted project.";
|
|
42
|
+
}, {
|
|
43
|
+
readonly id: "projects.save";
|
|
44
|
+
readonly owner: "@ankhorage/projects";
|
|
45
|
+
readonly access: readonly ["write"];
|
|
46
|
+
readonly binding: {
|
|
47
|
+
readonly kind: "storage";
|
|
48
|
+
readonly bindableAs: readonly ["target"];
|
|
49
|
+
};
|
|
50
|
+
readonly label: "Save project manifest";
|
|
51
|
+
readonly description: "Persist a validated AppManifest draft as an immutable project revision.";
|
|
52
|
+
}, {
|
|
53
|
+
readonly id: "projects.reload";
|
|
54
|
+
readonly owner: "@ankhorage/projects";
|
|
55
|
+
readonly access: readonly ["read"];
|
|
56
|
+
readonly binding: {
|
|
57
|
+
readonly kind: "storage";
|
|
58
|
+
readonly bindableAs: readonly ["target"];
|
|
59
|
+
};
|
|
60
|
+
readonly label: "Reload project manifest";
|
|
61
|
+
readonly description: "Read the persisted project manifest draft and immutable revision history.";
|
|
62
|
+
}, {
|
|
63
|
+
readonly id: "projects.materialize";
|
|
64
|
+
readonly owner: "@ankhorage/projects";
|
|
65
|
+
readonly access: readonly ["write"];
|
|
66
|
+
readonly binding: {
|
|
67
|
+
readonly kind: "action";
|
|
68
|
+
readonly bindableAs: readonly ["target"];
|
|
69
|
+
};
|
|
70
|
+
readonly label: "Materialize project revision";
|
|
71
|
+
readonly description: "Materialize one stored immutable project revision through an injected owner generator.";
|
|
42
72
|
}, {
|
|
43
73
|
readonly id: "projects.delete";
|
|
44
74
|
readonly owner: "@ankhorage/projects";
|
|
@@ -32,6 +32,30 @@ export const CAPABILITIES = [
|
|
|
32
32
|
label: 'Update project',
|
|
33
33
|
description: 'Update one existing persisted project.',
|
|
34
34
|
},
|
|
35
|
+
{
|
|
36
|
+
id: 'projects.save',
|
|
37
|
+
owner: '@ankhorage/projects',
|
|
38
|
+
access: ['write'],
|
|
39
|
+
binding: { kind: 'storage', bindableAs: ['target'] },
|
|
40
|
+
label: 'Save project manifest',
|
|
41
|
+
description: 'Persist a validated AppManifest draft as an immutable project revision.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'projects.reload',
|
|
45
|
+
owner: '@ankhorage/projects',
|
|
46
|
+
access: ['read'],
|
|
47
|
+
binding: { kind: 'storage', bindableAs: ['target'] },
|
|
48
|
+
label: 'Reload project manifest',
|
|
49
|
+
description: 'Read the persisted project manifest draft and immutable revision history.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'projects.materialize',
|
|
53
|
+
owner: '@ankhorage/projects',
|
|
54
|
+
access: ['write'],
|
|
55
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
56
|
+
label: 'Materialize project revision',
|
|
57
|
+
description: 'Materialize one stored immutable project revision through an injected owner generator.',
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
id: 'projects.delete',
|
|
37
61
|
owner: '@ankhorage/projects',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { constants, link, mkdir, open, readdir, rename, rm } from 'node:fs/promises';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
+
import { isAppManifest } from '@ankhorage/contracts';
|
|
3
4
|
import { createKeyedAsyncMutex } from '@ankhorage/utility/concurrency';
|
|
4
5
|
import { isRecord } from '@ankhorage/utility/object';
|
|
5
6
|
/***
|
|
@@ -21,18 +22,18 @@ export async function createProjectRepositoryFileSystemAsync(options) {
|
|
|
21
22
|
const entries = await readdir(directory, { withFileTypes: true });
|
|
22
23
|
const projects = await Promise.all(entries
|
|
23
24
|
.filter((entry) => entry.isFile() && entry.name.endsWith('.json'))
|
|
24
|
-
.map(async (entry) =>
|
|
25
|
+
.map(async (entry) => readProjectWithMigrationAsync(directory, mutations, entry.name)));
|
|
25
26
|
return projects
|
|
26
27
|
.filter((project) => project !== null)
|
|
27
28
|
.sort((left, right) => left.id.localeCompare(right.id));
|
|
28
29
|
},
|
|
29
|
-
readAsync: async (id) =>
|
|
30
|
+
readAsync: async (id) => readProjectWithMigrationAsync(directory, mutations, projectFileName(id)),
|
|
30
31
|
createAsync: async (project) => mutations.run(project.id, async () => writeProjectAsync(directory, project, true)),
|
|
31
32
|
updateAsync: async (id, update) => mutations.run(id, async () => {
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
33
|
+
const result = await readProjectAsync(directory, projectFileName(id));
|
|
34
|
+
if (result === null)
|
|
34
35
|
return null;
|
|
35
|
-
const updated = update(project);
|
|
36
|
+
const updated = update(result.project);
|
|
36
37
|
if (updated.id !== id)
|
|
37
38
|
throw new Error('Project update cannot change identity.');
|
|
38
39
|
await writeProjectAsync(directory, updated, false);
|
|
@@ -65,7 +66,13 @@ async function readProjectAsync(directory, fileName, expectedFileName = fileName
|
|
|
65
66
|
if (!isStoredProject(stored) || projectFileName(stored.project.id) !== expectedFileName) {
|
|
66
67
|
throw new Error(`Project storage entry '${fileName}' is invalid.`);
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
+
if (isStoredProjectW1(stored)) {
|
|
70
|
+
return {
|
|
71
|
+
project: { ...stored.project, manifest: { draft: null, revisions: [] } },
|
|
72
|
+
requiresMigration: true,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return { project: stored.project, requiresMigration: false };
|
|
69
76
|
}
|
|
70
77
|
catch (error) {
|
|
71
78
|
if (isMissingFileError(error))
|
|
@@ -81,6 +88,22 @@ async function readProjectAsync(directory, fileName, expectedFileName = fileName
|
|
|
81
88
|
await handle?.close();
|
|
82
89
|
}
|
|
83
90
|
}
|
|
91
|
+
/*** Read a project and atomically persist the one supported W1-to-W2 document migration. */
|
|
92
|
+
async function readProjectWithMigrationAsync(directory, mutations, fileName) {
|
|
93
|
+
const result = await readProjectAsync(directory, fileName);
|
|
94
|
+
if (result === null)
|
|
95
|
+
return null;
|
|
96
|
+
if (!result.requiresMigration)
|
|
97
|
+
return result.project;
|
|
98
|
+
return mutations.run(result.project.id, async () => {
|
|
99
|
+
const current = await readProjectAsync(directory, fileName);
|
|
100
|
+
if (current === null)
|
|
101
|
+
return null;
|
|
102
|
+
if (current.requiresMigration)
|
|
103
|
+
await writeProjectAsync(directory, current.project, false);
|
|
104
|
+
return current.project;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
84
107
|
/*** Atomically create or replace a project file without exposing a partial document. */
|
|
85
108
|
async function writeProjectAsync(directory, project, createOnly) {
|
|
86
109
|
const fileName = projectFileName(project.id);
|
|
@@ -121,11 +144,11 @@ async function deleteProjectAsync(directory, id) {
|
|
|
121
144
|
throw error;
|
|
122
145
|
}
|
|
123
146
|
try {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
147
|
+
const result = await readProjectAsync(directory, temporary.slice(directory.length + 1), fileName);
|
|
148
|
+
if (result === null)
|
|
126
149
|
throw new Error(`Project storage entry '${fileName}' disappeared.`);
|
|
127
150
|
await rm(temporary);
|
|
128
|
-
return project;
|
|
151
|
+
return result.project;
|
|
129
152
|
}
|
|
130
153
|
catch (error) {
|
|
131
154
|
await rename(temporary, target);
|
|
@@ -139,8 +162,12 @@ function projectFileName(id) {
|
|
|
139
162
|
}
|
|
140
163
|
return `${id}.json`;
|
|
141
164
|
}
|
|
142
|
-
/*** Verify a parsed storage document before it enters the application. */
|
|
165
|
+
/*** Verify a parsed current or published-W1 storage document before it enters the application. */
|
|
143
166
|
function isStoredProject(value) {
|
|
167
|
+
return isStoredProjectW1(value) || isStoredProjectW2(value);
|
|
168
|
+
}
|
|
169
|
+
/*** Recognize only the published W1 document shape that has no persisted manifest field. */
|
|
170
|
+
function isStoredProjectW1(value) {
|
|
144
171
|
if (!isRecord(value))
|
|
145
172
|
return false;
|
|
146
173
|
const { project } = value;
|
|
@@ -149,7 +176,44 @@ function isStoredProject(value) {
|
|
|
149
176
|
typeof project.id === 'string' &&
|
|
150
177
|
typeof project.name === 'string' &&
|
|
151
178
|
typeof project.createdAt === 'string' &&
|
|
152
|
-
typeof project.updatedAt === 'string'
|
|
179
|
+
typeof project.updatedAt === 'string' &&
|
|
180
|
+
!('manifest' in project));
|
|
181
|
+
}
|
|
182
|
+
/*** Validate the current persisted project document at the filesystem boundary. */
|
|
183
|
+
function isStoredProjectW2(value) {
|
|
184
|
+
if (!isRecord(value))
|
|
185
|
+
return false;
|
|
186
|
+
const { project } = value;
|
|
187
|
+
return (value.version === 1 &&
|
|
188
|
+
isRecord(project) &&
|
|
189
|
+
typeof project.id === 'string' &&
|
|
190
|
+
typeof project.name === 'string' &&
|
|
191
|
+
typeof project.createdAt === 'string' &&
|
|
192
|
+
typeof project.updatedAt === 'string' &&
|
|
193
|
+
isProjectManifest(project.manifest));
|
|
194
|
+
}
|
|
195
|
+
/*** Validate persisted manifest draft and revision invariants at the filesystem boundary. */
|
|
196
|
+
function isProjectManifest(value) {
|
|
197
|
+
if (!isRecord(value) || !Array.isArray(value.revisions))
|
|
198
|
+
return false;
|
|
199
|
+
const { revisions, draft } = value;
|
|
200
|
+
const ids = new Set();
|
|
201
|
+
const areRevisionsValid = revisions.every((revision) => isRecord(revision) &&
|
|
202
|
+
typeof revision.id === 'string' &&
|
|
203
|
+
typeof revision.savedAt === 'string' &&
|
|
204
|
+
isAppManifest(revision.manifest) &&
|
|
205
|
+
!ids.has(revision.id) &&
|
|
206
|
+
(ids.add(revision.id), true));
|
|
207
|
+
if (!areRevisionsValid || (draft !== null && !isRecord(draft)))
|
|
208
|
+
return false;
|
|
209
|
+
return (draft === null ||
|
|
210
|
+
(typeof draft.revisionId === 'string' &&
|
|
211
|
+
typeof draft.savedAt === 'string' &&
|
|
212
|
+
isAppManifest(draft.manifest) &&
|
|
213
|
+
revisions.some((revision) => isRecord(revision) &&
|
|
214
|
+
revision.id === draft.revisionId &&
|
|
215
|
+
revision.savedAt === draft.savedAt &&
|
|
216
|
+
JSON.stringify(revision.manifest) === JSON.stringify(draft.manifest))));
|
|
153
217
|
}
|
|
154
218
|
/*** Identify the missing-file condition that represents an absent project. */
|
|
155
219
|
function isMissingFileError(error) {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type { CreateProjectInput, Project, UpdateProjectInput } from '../../../types/projects.js';
|
|
2
|
-
import type { ProjectRepository } from '../ports/ProjectRepository.js';
|
|
1
|
+
import type { CreateProjectInput, MaterializeProjectRevisionInput, Project, ProjectManifest, ProjectManifestRevision, ReloadProjectManifestInput, SaveProjectManifestInput, UpdateProjectInput } from '../../../types/projects.js';
|
|
2
|
+
import type { ProjectMaterializer, ProjectRepository } from '../ports/ProjectRepository.js';
|
|
3
3
|
/*** Expose the project repository actions through an explicit port. */
|
|
4
4
|
export declare const projects: {
|
|
5
5
|
list: (repository: ProjectRepository) => Promise<readonly Project[]>;
|
|
6
6
|
read: (repository: ProjectRepository, id: string) => Promise<Project | null>;
|
|
7
7
|
create: (repository: ProjectRepository, input: CreateProjectInput, now?: Date) => Promise<Project>;
|
|
8
8
|
update: (repository: ProjectRepository, input: UpdateProjectInput, now?: Date) => Promise<Project | null>;
|
|
9
|
+
save: (repository: ProjectRepository, input: SaveProjectManifestInput, now?: Date) => Promise<Project | null>;
|
|
10
|
+
reload: (repository: ProjectRepository, input: ReloadProjectManifestInput) => Promise<ProjectManifest | null>;
|
|
11
|
+
materialize: (repository: ProjectRepository, materializer: ProjectMaterializer, input: MaterializeProjectRevisionInput) => Promise<ProjectManifestRevision | null>;
|
|
9
12
|
delete: (repository: ProjectRepository, id: string) => Promise<Project | null>;
|
|
10
13
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createProject } from '../domain/createProject.js';
|
|
2
|
+
import { saveProjectManifest } from '../domain/saveProjectManifest.js';
|
|
2
3
|
import { updateProject } from '../domain/updateProject.js';
|
|
3
4
|
/*** Expose the project repository actions through an explicit port. */
|
|
4
5
|
export const projects = {
|
|
@@ -14,5 +15,15 @@ export const projects = {
|
|
|
14
15
|
return project;
|
|
15
16
|
},
|
|
16
17
|
update: async (repository, input, now = new Date()) => repository.updateAsync(input.id, (project) => updateProject(project, input, now)),
|
|
18
|
+
save: async (repository, input, now = new Date()) => repository.updateAsync(input.id, (project) => saveProjectManifest(project, input, now)),
|
|
19
|
+
reload: async (repository, input) => (await repository.readAsync(input.id))?.manifest ?? null,
|
|
20
|
+
materialize: async (repository, materializer, input) => {
|
|
21
|
+
const project = await repository.readAsync(input.id);
|
|
22
|
+
const revision = project?.manifest.revisions.find((candidate) => candidate.id === input.revisionId);
|
|
23
|
+
if (project === null || revision === undefined)
|
|
24
|
+
return null;
|
|
25
|
+
await materializer.materializeAsync({ project, revision });
|
|
26
|
+
return revision;
|
|
27
|
+
},
|
|
17
28
|
delete: async (repository, id) => repository.deleteAsync(id),
|
|
18
29
|
};
|
|
@@ -3,7 +3,13 @@ import { deriveProjectIdentity } from './deriveProjectIdentity.js';
|
|
|
3
3
|
export function createProject(input, now) {
|
|
4
4
|
const name = normalizeProjectName(input.name);
|
|
5
5
|
const timestamp = now.toISOString();
|
|
6
|
-
return {
|
|
6
|
+
return {
|
|
7
|
+
id: deriveProjectIdentity(name),
|
|
8
|
+
name,
|
|
9
|
+
createdAt: timestamp,
|
|
10
|
+
updatedAt: timestamp,
|
|
11
|
+
manifest: { draft: null, revisions: [] },
|
|
12
|
+
};
|
|
7
13
|
}
|
|
8
14
|
/*** Normalize a project name at the domain boundary. */
|
|
9
15
|
function normalizeProjectName(name) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Project, SaveProjectManifestInput } from '../../../types/projects.js';
|
|
2
|
+
/*** Save a validated AppManifest as the next immutable revision after checking the draft version. */
|
|
3
|
+
export declare function saveProjectManifest(project: Project, input: SaveProjectManifestInput, now: Date): Project;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { parseAppManifest } from '@ankhorage/contracts';
|
|
2
|
+
/*** Save a validated AppManifest as the next immutable revision after checking the draft version. */
|
|
3
|
+
export function saveProjectManifest(project, input, now) {
|
|
4
|
+
const parsed = parseAppManifest(input.manifest);
|
|
5
|
+
if (!parsed.ok)
|
|
6
|
+
throw new Error(parsed.message);
|
|
7
|
+
const currentRevisionId = project.manifest.draft?.revisionId ?? null;
|
|
8
|
+
if (input.expectedRevisionId !== currentRevisionId) {
|
|
9
|
+
throw new Error(`Project manifest revision conflict: expected '${input.expectedRevisionId}', found '${currentRevisionId}'.`);
|
|
10
|
+
}
|
|
11
|
+
const savedAt = now.toISOString();
|
|
12
|
+
const id = `revision-${project.manifest.revisions.length + 1}`;
|
|
13
|
+
const manifest = structuredClone(parsed.manifest);
|
|
14
|
+
const revision = { id, manifest, savedAt };
|
|
15
|
+
return {
|
|
16
|
+
...project,
|
|
17
|
+
updatedAt: savedAt,
|
|
18
|
+
manifest: {
|
|
19
|
+
draft: { revisionId: id, manifest, savedAt },
|
|
20
|
+
revisions: [...project.manifest.revisions, revision],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { Project } from '../../../types/projects.js';
|
|
1
|
+
import type { Project, ProjectManifestRevision } from '../../../types/projects.js';
|
|
2
|
+
export interface ProjectMaterializer {
|
|
3
|
+
materializeAsync(input: Readonly<{
|
|
4
|
+
project: Project;
|
|
5
|
+
revision: ProjectManifestRevision;
|
|
6
|
+
}>): Promise<void>;
|
|
7
|
+
}
|
|
2
8
|
export interface ProjectRepository {
|
|
3
9
|
listAsync(): Promise<readonly Project[]>;
|
|
4
10
|
readAsync(id: string): Promise<Project | null>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createProjectRepositoryFileSystemAsync } from './features/projects/adapters/createProjectRepositoryFileSystemAsync.js';
|
|
2
2
|
export { projects } from './features/projects/application/projects.js';
|
|
3
|
-
export type { ProjectRepository } from './features/projects/ports/ProjectRepository.js';
|
|
4
|
-
export type { CreateProjectInput, Project, UpdateProjectInput } from './types/projects.js';
|
|
3
|
+
export type { ProjectMaterializer, ProjectRepository, } from './features/projects/ports/ProjectRepository.js';
|
|
4
|
+
export type { CreateProjectInput, MaterializeProjectRevisionInput, Project, ProjectManifest, ProjectManifestDraft, ProjectManifestRevision, ReloadProjectManifestInput, SaveProjectManifestInput, UpdateProjectInput, } from './types/projects.js';
|
package/dist/types/projects.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
1
2
|
export type Project = Readonly<{
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
4
5
|
createdAt: string;
|
|
5
6
|
updatedAt: string;
|
|
7
|
+
manifest: ProjectManifest;
|
|
6
8
|
}>;
|
|
7
9
|
export type CreateProjectInput = Readonly<{
|
|
8
10
|
name: string;
|
|
@@ -11,3 +13,32 @@ export type UpdateProjectInput = Readonly<{
|
|
|
11
13
|
id: string;
|
|
12
14
|
name: string;
|
|
13
15
|
}>;
|
|
16
|
+
/*** Persisted draft pointer and immutable AppManifest revision history for one project. */
|
|
17
|
+
export type ProjectManifest = Readonly<{
|
|
18
|
+
draft: ProjectManifestDraft | null;
|
|
19
|
+
revisions: readonly ProjectManifestRevision[];
|
|
20
|
+
}>;
|
|
21
|
+
/*** A persisted draft always points at the immutable revision produced by its last save. */
|
|
22
|
+
export type ProjectManifestDraft = Readonly<{
|
|
23
|
+
revisionId: string;
|
|
24
|
+
manifest: AppManifest;
|
|
25
|
+
savedAt: string;
|
|
26
|
+
}>;
|
|
27
|
+
/*** An immutable, project-local AppManifest snapshot. */
|
|
28
|
+
export type ProjectManifestRevision = Readonly<{
|
|
29
|
+
id: string;
|
|
30
|
+
manifest: AppManifest;
|
|
31
|
+
savedAt: string;
|
|
32
|
+
}>;
|
|
33
|
+
export type SaveProjectManifestInput = Readonly<{
|
|
34
|
+
id: string;
|
|
35
|
+
manifest: AppManifest;
|
|
36
|
+
expectedRevisionId: string | null;
|
|
37
|
+
}>;
|
|
38
|
+
export type ReloadProjectManifestInput = Readonly<{
|
|
39
|
+
id: string;
|
|
40
|
+
}>;
|
|
41
|
+
export type MaterializeProjectRevisionInput = Readonly<{
|
|
42
|
+
id: string;
|
|
43
|
+
revisionId: string;
|
|
44
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/projects",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Standalone project identity and repository actions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ankhorage",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typescript": "~6.0.3"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@ankhorage/contracts": "^26.
|
|
64
|
+
"@ankhorage/contracts": "^26.10.0",
|
|
65
65
|
"@ankhorage/utility": "^1.10.0"
|
|
66
66
|
},
|
|
67
67
|
"ankh": {
|
|
@@ -127,6 +127,51 @@
|
|
|
127
127
|
"label": "Update project",
|
|
128
128
|
"description": "Update one existing persisted project."
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
"id": "projects.save",
|
|
132
|
+
"owner": "@ankhorage/projects",
|
|
133
|
+
"access": [
|
|
134
|
+
"write"
|
|
135
|
+
],
|
|
136
|
+
"binding": {
|
|
137
|
+
"kind": "storage",
|
|
138
|
+
"bindableAs": [
|
|
139
|
+
"target"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"label": "Save project manifest",
|
|
143
|
+
"description": "Persist a validated AppManifest draft as an immutable project revision."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "projects.reload",
|
|
147
|
+
"owner": "@ankhorage/projects",
|
|
148
|
+
"access": [
|
|
149
|
+
"read"
|
|
150
|
+
],
|
|
151
|
+
"binding": {
|
|
152
|
+
"kind": "storage",
|
|
153
|
+
"bindableAs": [
|
|
154
|
+
"target"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"label": "Reload project manifest",
|
|
158
|
+
"description": "Read the persisted project manifest draft and immutable revision history."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "projects.materialize",
|
|
162
|
+
"owner": "@ankhorage/projects",
|
|
163
|
+
"access": [
|
|
164
|
+
"write"
|
|
165
|
+
],
|
|
166
|
+
"binding": {
|
|
167
|
+
"kind": "action",
|
|
168
|
+
"bindableAs": [
|
|
169
|
+
"target"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"label": "Materialize project revision",
|
|
173
|
+
"description": "Materialize one stored immutable project revision through an injected owner generator."
|
|
174
|
+
},
|
|
130
175
|
{
|
|
131
176
|
"id": "projects.delete",
|
|
132
177
|
"owner": "@ankhorage/projects",
|