@eide/foir-cli 0.1.43 → 0.1.45
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/dist/cli.js +416 -4130
- package/dist/schema.graphql +29 -10
- package/package.json +21 -25
- package/dist/chunk-L642MYIL.js +0 -47
- package/dist/config/types.d.ts +0 -59
- package/dist/config/types.js +0 -7
- package/dist/loader-7VE4OF73.js +0 -10
package/dist/schema.graphql
CHANGED
|
@@ -414,13 +414,19 @@ type Query {
|
|
|
414
414
|
"""
|
|
415
415
|
searchEmbeddings(input: SearchEmbeddingsInput!): [EmbeddingSearchResult!]!
|
|
416
416
|
|
|
417
|
-
"""
|
|
417
|
+
"""
|
|
418
|
+
List embeddings for a specific record.
|
|
419
|
+
Returns metadata (key, dimensions, contentHash) — not the vector data itself.
|
|
420
|
+
"""
|
|
418
421
|
embeddingsForRecord(recordId: ID!): [RecordEmbedding!]!
|
|
419
422
|
|
|
420
423
|
"""Aggregate stats for a model's embeddings (admin visibility)"""
|
|
421
424
|
embeddingStats(modelKey: String!): EmbeddingStatsResult!
|
|
422
425
|
|
|
423
|
-
"""
|
|
426
|
+
"""
|
|
427
|
+
Find records similar to a given record's embedding.
|
|
428
|
+
Looks up the source record's vector, then performs similarity search.
|
|
429
|
+
"""
|
|
424
430
|
findSimilarRecords(recordId: ID!, key: String, limit: Int): [EmbeddingSearchResult!]!
|
|
425
431
|
variantCatalog(isActive: Boolean, limit: Int, offset: Int): [VariantCatalogEntry!]!
|
|
426
432
|
variantCatalogEntry(id: ID!): VariantCatalogEntry
|
|
@@ -533,8 +539,8 @@ type Query {
|
|
|
533
539
|
"""List variants for a record"""
|
|
534
540
|
recordVariants(recordId: ID!, limit: Int, offset: Int): RecordVariantList!
|
|
535
541
|
|
|
536
|
-
"""
|
|
537
|
-
|
|
542
|
+
"""Look up a record by natural key or ID (editor URLs may contain either)"""
|
|
543
|
+
recordByKeyOrId(modelKey: String!, identifier: String!): Record
|
|
538
544
|
|
|
539
545
|
"""List scheduled publishes"""
|
|
540
546
|
scheduledRecordPublishes(from: DateTime, to: DateTime, modelKey: String, limit: Int, offset: Int): ScheduledPublishList!
|
|
@@ -5284,12 +5290,6 @@ type SaveContentResult {
|
|
|
5284
5290
|
isDeduplicated: Boolean!
|
|
5285
5291
|
}
|
|
5286
5292
|
|
|
5287
|
-
"""Record for editor: model + optional record (create-on-save pattern)"""
|
|
5288
|
-
type RecordForEditor {
|
|
5289
|
-
model: Model!
|
|
5290
|
-
record: Record
|
|
5291
|
-
}
|
|
5292
|
-
|
|
5293
5293
|
type ScheduledPublishItem {
|
|
5294
5294
|
versionId: String!
|
|
5295
5295
|
versionNumber: Int!
|
|
@@ -5908,8 +5908,26 @@ type SyncPushResultItem {
|
|
|
5908
5908
|
error: String
|
|
5909
5909
|
}
|
|
5910
5910
|
|
|
5911
|
+
"""Per-item error detail for sync push failures"""
|
|
5912
|
+
type SyncPushError {
|
|
5913
|
+
"""Client ID of the failed item"""
|
|
5914
|
+
clientId: String!
|
|
5915
|
+
|
|
5916
|
+
"""Human-readable error message"""
|
|
5917
|
+
message: String!
|
|
5918
|
+
}
|
|
5919
|
+
|
|
5911
5920
|
type SyncPushResult {
|
|
5912
5921
|
items: [SyncPushResultItem!]!
|
|
5922
|
+
|
|
5923
|
+
"""Number of items successfully applied"""
|
|
5924
|
+
applied: Int!
|
|
5925
|
+
|
|
5926
|
+
"""Number of items with conflicts"""
|
|
5927
|
+
conflicts: Int!
|
|
5928
|
+
|
|
5929
|
+
"""Per-item error details (empty when no errors)"""
|
|
5930
|
+
errors: [SyncPushError!]!
|
|
5913
5931
|
}
|
|
5914
5932
|
|
|
5915
5933
|
type RecordChangedEvent {
|
|
@@ -5952,6 +5970,7 @@ type Share {
|
|
|
5952
5970
|
file: File
|
|
5953
5971
|
sharedWithCustomerId: String!
|
|
5954
5972
|
sharedWith: CustomerProfile
|
|
5973
|
+
sharedByProfile: CustomerProfile
|
|
5955
5974
|
permission: SharePermission!
|
|
5956
5975
|
status: ShareStatus!
|
|
5957
5976
|
acceptedAt: DateTime
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"description": "Universal platform CLI for Foir platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
"types": "./dist/cli.d.ts",
|
|
15
15
|
"import": "./dist/cli.js"
|
|
16
16
|
},
|
|
17
|
-
"./config": {
|
|
18
|
-
"types": "./dist/config/types.d.ts",
|
|
19
|
-
"import": "./dist/config/types.js"
|
|
20
|
-
},
|
|
21
17
|
"./extensions": {
|
|
22
18
|
"types": "./dist/lib/extension-helpers.d.ts",
|
|
23
19
|
"import": "./dist/lib/extension-helpers.js"
|
|
@@ -35,14 +31,28 @@
|
|
|
35
31
|
"dist",
|
|
36
32
|
"README.md"
|
|
37
33
|
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"dev:cli": "tsx src/cli.ts",
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
"lint": "eslint src/",
|
|
39
|
+
"lint:fix": "eslint src/ --fix",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"test:watch": "vitest watch",
|
|
42
|
+
"codegen": "graphql-codegen --config codegen.ts",
|
|
43
|
+
"codegen:watch": "graphql-codegen --config codegen.ts --watch",
|
|
44
|
+
"prepublishOnly": "pnpm run build",
|
|
45
|
+
"release:patch": "pnpm version patch",
|
|
46
|
+
"release:minor": "pnpm version minor",
|
|
47
|
+
"release:major": "pnpm version major"
|
|
48
|
+
},
|
|
38
49
|
"keywords": [
|
|
39
50
|
"foir",
|
|
40
51
|
"eide",
|
|
41
52
|
"cms",
|
|
42
53
|
"cli",
|
|
43
54
|
"graphql",
|
|
44
|
-
"platform"
|
|
45
|
-
"codegen"
|
|
55
|
+
"platform"
|
|
46
56
|
],
|
|
47
57
|
"author": "EIDE Team",
|
|
48
58
|
"license": "UNLICENSED",
|
|
@@ -58,19 +68,19 @@
|
|
|
58
68
|
"prettier": "^3.4.2"
|
|
59
69
|
},
|
|
60
70
|
"devDependencies": {
|
|
71
|
+
"@foir/platform": "workspace:*",
|
|
61
72
|
"@graphql-codegen/cli": "^5.0.3",
|
|
62
73
|
"@graphql-codegen/typed-document-node": "^5.0.12",
|
|
63
74
|
"@graphql-codegen/typescript": "^4.1.2",
|
|
64
75
|
"@graphql-codegen/typescript-operations": "^4.4.0",
|
|
65
76
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
66
77
|
"@types/inquirer": "^9.0.7",
|
|
78
|
+
"@eide/command-registry": "workspace:*",
|
|
67
79
|
"@types/node": "^22.5.0",
|
|
68
80
|
"tsup": "^8.5.1",
|
|
69
81
|
"tsx": "^4.20.0",
|
|
70
82
|
"typescript": "5.9.2",
|
|
71
|
-
"vitest": "^3.2.4"
|
|
72
|
-
"@foir/platform": "1.0.0",
|
|
73
|
-
"@eide/command-registry": "0.1.0"
|
|
83
|
+
"vitest": "^3.2.4"
|
|
74
84
|
},
|
|
75
85
|
"engines": {
|
|
76
86
|
"node": ">=18.0.0"
|
|
@@ -79,19 +89,5 @@
|
|
|
79
89
|
"type": "git",
|
|
80
90
|
"url": "https://github.com/eidebuild/eide.git",
|
|
81
91
|
"directory": "packages/cli"
|
|
82
|
-
},
|
|
83
|
-
"scripts": {
|
|
84
|
-
"build": "tsup",
|
|
85
|
-
"dev:cli": "tsx src/cli.ts",
|
|
86
|
-
"check-types": "tsc --noEmit",
|
|
87
|
-
"lint": "eslint src/",
|
|
88
|
-
"lint:fix": "eslint src/ --fix",
|
|
89
|
-
"test": "vitest run",
|
|
90
|
-
"test:watch": "vitest watch",
|
|
91
|
-
"codegen": "graphql-codegen --config codegen.ts",
|
|
92
|
-
"codegen:watch": "graphql-codegen --config codegen.ts --watch",
|
|
93
|
-
"release:patch": "pnpm version patch",
|
|
94
|
-
"release:minor": "pnpm version minor",
|
|
95
|
-
"release:major": "pnpm version major"
|
|
96
92
|
}
|
|
97
|
-
}
|
|
93
|
+
}
|
package/dist/chunk-L642MYIL.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// src/config/loader.ts
|
|
2
|
-
import { resolve } from "path";
|
|
3
|
-
import { pathToFileURL } from "url";
|
|
4
|
-
import { existsSync } from "fs";
|
|
5
|
-
var CONFIG_FILE_NAMES = [
|
|
6
|
-
"foir.config.ts",
|
|
7
|
-
"foir.config.js",
|
|
8
|
-
"foir.config.mjs",
|
|
9
|
-
".foirrc.ts",
|
|
10
|
-
".foirrc.js",
|
|
11
|
-
".foirrc.mjs"
|
|
12
|
-
];
|
|
13
|
-
function findConfigFile(explicitPath) {
|
|
14
|
-
if (explicitPath) {
|
|
15
|
-
const abs = resolve(explicitPath);
|
|
16
|
-
if (existsSync(abs)) return abs;
|
|
17
|
-
throw new Error(`Config file not found: ${explicitPath}`);
|
|
18
|
-
}
|
|
19
|
-
const cwd = process.cwd();
|
|
20
|
-
for (const name of CONFIG_FILE_NAMES) {
|
|
21
|
-
const candidate = resolve(cwd, name);
|
|
22
|
-
if (existsSync(candidate)) return candidate;
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
async function loadConfigFile(filePath) {
|
|
27
|
-
const url = pathToFileURL(filePath).href;
|
|
28
|
-
const mod = await import(url);
|
|
29
|
-
const config = mod.default ?? mod;
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
32
|
-
async function loadConfigProject() {
|
|
33
|
-
const configPath = findConfigFile();
|
|
34
|
-
if (!configPath) return void 0;
|
|
35
|
-
try {
|
|
36
|
-
const config = await loadConfigFile(configPath);
|
|
37
|
-
return config.project;
|
|
38
|
-
} catch {
|
|
39
|
-
return void 0;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export {
|
|
44
|
-
findConfigFile,
|
|
45
|
-
loadConfigFile,
|
|
46
|
-
loadConfigProject
|
|
47
|
-
};
|
package/dist/config/types.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration types for foir-cli
|
|
3
|
-
*/
|
|
4
|
-
type CodegenTarget = 'react' | 'remix';
|
|
5
|
-
interface DomainConfig {
|
|
6
|
-
auth?: boolean;
|
|
7
|
-
authProviders?: boolean;
|
|
8
|
-
files?: boolean;
|
|
9
|
-
sync?: boolean;
|
|
10
|
-
notifications?: boolean;
|
|
11
|
-
operations?: boolean;
|
|
12
|
-
schedules?: boolean;
|
|
13
|
-
sharing?: boolean;
|
|
14
|
-
embeddings?: boolean;
|
|
15
|
-
analytics?: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface FoirPullConfig {
|
|
18
|
-
output?: {
|
|
19
|
-
/** Directory for generated TypeScript types (default: './src/generated/types') */
|
|
20
|
-
types?: string;
|
|
21
|
-
/** Directory for generated GraphQL documents (default: './src/generated/documents') */
|
|
22
|
-
documents?: string;
|
|
23
|
-
/** Directory for generated typed operation modules (default: sibling of types) */
|
|
24
|
-
operations?: string;
|
|
25
|
-
/** Directory for generated React hooks (requires 'react' target) */
|
|
26
|
-
hooks?: string;
|
|
27
|
-
/** Directory for generated Remix loaders (requires 'remix' target) */
|
|
28
|
-
loaders?: string;
|
|
29
|
-
/** Directory for generated Swift files (e.g., './generated/swift') */
|
|
30
|
-
swift?: string;
|
|
31
|
-
};
|
|
32
|
-
/** Code generation targets — 'react' for Apollo hooks, 'remix' for typed loaders */
|
|
33
|
-
targets?: CodegenTarget[];
|
|
34
|
-
/** Enable static domain document generation (default: all enabled) */
|
|
35
|
-
domains?: boolean | DomainConfig;
|
|
36
|
-
/** Filter to specific model keys */
|
|
37
|
-
only?: string[];
|
|
38
|
-
/** Include inline-only models for type resolution (default: true) */
|
|
39
|
-
includeInline?: boolean;
|
|
40
|
-
/** Format output with Prettier (default: true) */
|
|
41
|
-
prettier?: boolean;
|
|
42
|
-
}
|
|
43
|
-
interface FoirConfig {
|
|
44
|
-
/** Named project profile to use by default */
|
|
45
|
-
project?: string;
|
|
46
|
-
pull?: FoirPullConfig;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Helper to create a type-safe foir config.
|
|
50
|
-
* Used in foir.config.ts files:
|
|
51
|
-
*
|
|
52
|
-
* ```ts
|
|
53
|
-
* import { defineConfig } from '@eide/foir-cli/config';
|
|
54
|
-
* export default defineConfig({ pull: { output: { types: './src/generated' } } });
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
declare function defineConfig(config: FoirConfig): FoirConfig;
|
|
58
|
-
|
|
59
|
-
export { type CodegenTarget, type DomainConfig, type FoirConfig, type FoirPullConfig, defineConfig };
|
package/dist/config/types.js
DELETED