@absolutejs/artifacts 0.0.5 → 0.1.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.
@@ -27,6 +27,7 @@ export declare const manifest: Omit<import("@absolutejs/manifest").PackageManife
27
27
  asset: import("./types").ArtifactAssetReference;
28
28
  data: Uint8Array<ArrayBufferLike>;
29
29
  }>;
30
+ purgeOwner: (ownerId: string) => Promise<number>;
30
31
  restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
31
32
  unpublish: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
32
33
  update: (ownerId: string, artifactId: string, input: import("./types").ArtifactUpdateInput) => Promise<import("./types").ArtifactRecord>;
@@ -61,6 +62,7 @@ export declare const manifest: Omit<import("@absolutejs/manifest").PackageManife
61
62
  asset: import("./types").ArtifactAssetReference;
62
63
  data: Uint8Array<ArrayBufferLike>;
63
64
  }>;
65
+ purgeOwner: (ownerId: string) => Promise<number>;
64
66
  restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
65
67
  unpublish: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
66
68
  update: (ownerId: string, artifactId: string, input: import("./types").ArtifactUpdateInput) => Promise<import("./types").ArtifactRecord>;
@@ -96,6 +98,7 @@ export declare const manifest: Omit<import("@absolutejs/manifest").PackageManife
96
98
  asset: import("./types").ArtifactAssetReference;
97
99
  data: Uint8Array<ArrayBufferLike>;
98
100
  }>;
101
+ purgeOwner: (ownerId: string) => Promise<number>;
99
102
  restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
100
103
  unpublish: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
101
104
  update: (ownerId: string, artifactId: string, input: import("./types").ArtifactUpdateInput) => Promise<import("./types").ArtifactRecord>;
@@ -53,6 +53,7 @@ export declare const createArtifactService: <TDefinitions extends ArtifactKindDe
53
53
  asset: ArtifactAssetReference;
54
54
  data: Uint8Array<ArrayBufferLike>;
55
55
  }>;
56
+ purgeOwner: (ownerId: string) => Promise<number>;
56
57
  restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<ArtifactRecord>;
57
58
  unpublish: (ownerId: string, artifactId: string) => Promise<ArtifactRecord>;
58
59
  update: (ownerId: string, artifactId: string, input: ArtifactUpdateInput) => Promise<ArtifactRecord>;
@@ -31,6 +31,8 @@ export type ArtifactStore = {
31
31
  listReferencedAssetIds(): Promise<string[]>;
32
32
  markEventProcessed(eventId: string, processedAt: string): Promise<boolean>;
33
33
  putIndexingState(ownerId: string, state: ArtifactIndexingState, events?: ArtifactEvent[]): Promise<void>;
34
+ /** Permanently remove every artifact and lifecycle row for one host owner. */
35
+ purgeOwner(ownerId: string): Promise<number>;
34
36
  /** Compare, replace current state, and append its revision atomically. */
35
37
  save(record: ArtifactRecord, expectedRevision: number, events?: ArtifactEvent[]): Promise<boolean>;
36
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/artifacts",
3
- "version": "0.0.5",
3
+ "version": "0.1.1",
4
4
  "description": "Typed, versioned artifacts for AI products — schemas, lifecycle, storage, rendering, publishing, revisions, and agent tools without prescribing a database or host.",
5
5
  "author": "Alex Kahn",
6
6
  "license": "BUSL-1.1",
@@ -21,7 +21,7 @@
21
21
  "url": "https://github.com/absolutejs/artifacts/issues"
22
22
  },
23
23
  "scripts": {
24
- "build": "rm -rf dist && bun build src/index.ts src/manifest.ts src/rag.ts --outdir dist --root ./src --target=bun --external @absolutejs/rag --external @sinclair/typebox --external @sinclair/typebox/value && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
24
+ "build": "rm -rf dist && bun build src/index.ts src/drizzle.ts src/manifest.ts src/rag.ts --outdir dist --root ./src --target=bun --external @absolutejs/rag --external @sinclair/typebox --external @sinclair/typebox/value --external drizzle-orm --external 'drizzle-orm/*' --external drizzle-typebox && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
25
25
  "format": "prettier --write \"./**/*.{ts,json,md}\"",
26
26
  "release": "bun run format && bun run test && bun run build && bun publish",
27
27
  "test": "bun test",
@@ -45,6 +45,11 @@
45
45
  "default": "./dist/manifest.js"
46
46
  },
47
47
  "./manifest.json": "./dist/manifest.json",
48
+ "./drizzle": {
49
+ "types": "./dist/src/drizzle.d.ts",
50
+ "import": "./dist/drizzle.js",
51
+ "default": "./dist/drizzle.js"
52
+ },
48
53
  "./rag": {
49
54
  "types": "./dist/src/rag.d.ts",
50
55
  "import": "./dist/rag.js",
@@ -53,19 +58,26 @@
53
58
  },
54
59
  "dependencies": {
55
60
  "@absolutejs/manifest": "^0.4.0",
56
- "@sinclair/typebox": "^0.34.0"
61
+ "@sinclair/typebox": "^0.34.0",
62
+ "drizzle-typebox": "1.0.0-beta.14-a36c63d"
57
63
  },
58
64
  "peerDependencies": {
59
- "@absolutejs/rag": ">=0.0.29"
65
+ "@absolutejs/rag": ">=0.0.29",
66
+ "drizzle-orm": ">=1.0.0-rc.4 <2"
60
67
  },
61
68
  "peerDependenciesMeta": {
62
69
  "@absolutejs/rag": {
63
70
  "optional": true
71
+ },
72
+ "drizzle-orm": {
73
+ "optional": true
64
74
  }
65
75
  },
66
76
  "devDependencies": {
67
77
  "@absolutejs/rag": "0.0.29",
78
+ "@electric-sql/pglite": "0.3.14",
68
79
  "@types/bun": "latest",
80
+ "drizzle-orm": "1.0.0-rc.4",
69
81
  "prettier": "3.5.3",
70
82
  "typescript": "5.8.3"
71
83
  }