@eide/foir-cli 0.1.44 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.1.44",
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"
@@ -56,8 +52,7 @@
56
52
  "cms",
57
53
  "cli",
58
54
  "graphql",
59
- "platform",
60
- "codegen"
55
+ "platform"
61
56
  ],
62
57
  "author": "EIDE Team",
63
58
  "license": "UNLICENSED",
@@ -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
- };
@@ -1,48 +0,0 @@
1
- /**
2
- * Configuration types for foir-cli
3
- */
4
- interface FoirPullConfig {
5
- /** Output directory for all generated files (default: './src/generated') */
6
- output?: string | {
7
- types?: string;
8
- [key: string]: unknown;
9
- };
10
- /** Filter to specific model keys */
11
- only?: string[];
12
- /** Include inline-only models for type resolution (default: true) */
13
- includeInline?: boolean;
14
- /** Format output with Prettier (default: true) */
15
- prettier?: boolean;
16
- }
17
- interface FoirConfig {
18
- /** Named project profile to use by default */
19
- project?: string;
20
- pull?: FoirPullConfig;
21
- }
22
- /**
23
- * Helper to create a type-safe foir config.
24
- * Used in foir.config.ts files:
25
- *
26
- * ```ts
27
- * import { defineConfig } from '@eide/foir-cli/config';
28
- * export default defineConfig({ pull: { output: './src/generated' } });
29
- * ```
30
- */
31
- declare function defineConfig(config: FoirConfig): FoirConfig;
32
- /** @deprecated Use string output path instead */
33
- type CodegenTarget = 'react' | 'remix';
34
- /** @deprecated Domains are now baked into @foir/client */
35
- interface DomainConfig {
36
- auth?: boolean;
37
- authProviders?: boolean;
38
- files?: boolean;
39
- sync?: boolean;
40
- notifications?: boolean;
41
- operations?: boolean;
42
- schedules?: boolean;
43
- sharing?: boolean;
44
- embeddings?: boolean;
45
- analytics?: boolean;
46
- }
47
-
48
- export { type CodegenTarget, type DomainConfig, type FoirConfig, type FoirPullConfig, defineConfig };
@@ -1,7 +0,0 @@
1
- // src/config/types.ts
2
- function defineConfig(config) {
3
- return config;
4
- }
5
- export {
6
- defineConfig
7
- };
@@ -1,10 +0,0 @@
1
- import {
2
- findConfigFile,
3
- loadConfigFile,
4
- loadConfigProject
5
- } from "./chunk-L642MYIL.js";
6
- export {
7
- findConfigFile,
8
- loadConfigFile,
9
- loadConfigProject
10
- };