@oceanum/eidos 0.9.0 → 0.9.2

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,20 +1,23 @@
1
1
  {
2
2
  "name": "@oceanum/eidos",
3
3
  "private": false,
4
- "version": "0.9.0",
4
+ "version": "0.9.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
+ "files": [
8
+ "dist/"
9
+ ],
7
10
  "scripts": {
8
11
  "generate-types": "node ./scripts/generate-interfaces.js"
9
12
  },
10
13
  "dependencies": {
11
14
  "ajv": "^8.17.1",
12
- "valtio": "^2.1.5"
15
+ "valtio": "^2.3.0"
13
16
  },
14
17
  "devDependencies": {
15
18
  "json-schema-to-typescript": "^15.0.4"
16
19
  },
17
20
  "peerDependencies": {
18
- "react": "^19.1.0"
21
+ "react": "^19.2.3"
19
22
  }
20
23
  }
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>EIDOS demo</title>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.ts"></script>
12
- </body>
13
- </html>
package/project.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "name": "eidos",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json"
4
- }
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { bundle } from "./schema-bundler.js";
4
-
5
- async function debugSchema() {
6
- try {
7
- const schema = await bundle('https://schemas.oceanum.io/eidos/root.json');
8
-
9
- // Log all $defs keys to check what's available
10
- console.log("All $defs keys:");
11
- console.log(Object.keys(schema.$defs));
12
-
13
- // Check for PlotSpec specifically
14
- console.log("\nPlotSpec exists:", schema.$defs.hasOwnProperty("PlotSpec"));
15
- if (schema.$defs.PlotSpec) {
16
- console.log("PlotSpec definition:");
17
- console.log(JSON.stringify(schema.$defs.PlotSpec, null, 2));
18
- }
19
-
20
- // Check for the root schema
21
- console.log("\nRoot schema properties:");
22
- const { $defs, ...rootSchema } = schema;
23
- console.log(Object.keys(rootSchema));
24
- console.log(JSON.stringify(rootSchema, null, 2));
25
- } catch (error) {
26
- console.error("Error:", error);
27
- }
28
- }
29
-
30
- debugSchema();
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { convertToTypeScript } from "./schema-to-typescript.js";
4
- import path from "path";
5
- import { fileURLToPath } from "url";
6
-
7
- // ES6 equivalent of __dirname
8
- const __filename = fileURLToPath(import.meta.url);
9
- const __dirname = path.dirname(__filename);
10
-
11
- class EidosInterfaceGenerator {
12
- constructor() {
13
- this.schemasUrl = "https://schemas.oceanum.io/eidos";
14
- this.outputDir = path.resolve(__dirname, "../src/schema");
15
- }
16
-
17
- async generate() {
18
- console.log("🚀 Generating TypeScript interfaces from EIDOS schemas...");
19
-
20
- try {
21
- // Determine the root schema URL
22
- const rootSchemaPath = `${this.schemasUrl}/root.json`;
23
-
24
- console.log(`📥 Using root schema: ${rootSchemaPath}`);
25
-
26
- // Use our custom schema-to-typescript converter
27
- await convertToTypeScript(rootSchemaPath);
28
-
29
- console.log("✅ Interface generation completed successfully!");
30
- console.log(`📄 Generated: ${path.relative(process.cwd(), path.join(this.outputDir, "interfaces.ts"))}`);
31
- } catch (error) {
32
- console.error("❌ Error generating interfaces:", error);
33
- process.exit(1);
34
- }
35
- }
36
- }
37
-
38
- // Run the generator if this is the main module in ES6
39
- if (
40
- import.meta.url === `file://${process.argv[1]}` ||
41
- import.meta.url.endsWith(process.argv[1])
42
- ) {
43
- const generator = new EidosInterfaceGenerator();
44
- generator.generate().catch((error) => {
45
- console.error("Fatal error:", error);
46
- process.exit(1);
47
- });
48
- }