diff --git a/.env.local b/.env.local
new file mode 100644
index 0000000..80891a1
--- /dev/null
+++ b/.env.local
@@ -0,0 +1,4 @@
+EDITION=ce
+SAGITTARIUS_GRAPHQL_URL=http://localhost:3010/graphql
+NEXT_PUBLIC_SCULPTOR_VERSION=0.0.0
+NEXT_PUBLIC_PICTOR_VERSION=0.0.0-mvp.45
\ No newline at end of file
diff --git a/edition.mjs b/edition.mjs
index 26cd957..83f03dc 100644
--- a/edition.mjs
+++ b/edition.mjs
@@ -1,4 +1,3 @@
-// scripts/set-edition.mjs
import fs from "node:fs";
import path from "node:path";
@@ -23,3 +22,21 @@ tsconf.compilerOptions.paths['@edition/*'] = editionImports[edition];
fs.writeFileSync(tsconfig, JSON.stringify(tsconf, null, 2));
console.log(`[set-edition] current -> ${edition}`);
+
+const lockPath = path.join(root, 'package-lock.json');
+const lock = JSON.parse(fs.readFileSync(lockPath, 'utf-8'));
+const sculptorVersion = (lock.packages && lock.packages[""].version) || '0.0.0';
+const pictorVersion = (lock.packages && lock.packages["node_modules/@code0-tech/pictor"] && lock.packages["node_modules/@code0-tech/pictor"].version) || '0.0.0';
+
+const envPath = path.join(root, '.env.local');
+let envContent = '';
+try {
+ envContent = fs.readFileSync(envPath, 'utf-8');
+} catch (e) {}
+
+envContent = envContent
+ .replace(/^NEXT_PUBLIC_SCULPTOR_VERSION=.*$/m, `NEXT_PUBLIC_SCULPTOR_VERSION=${sculptorVersion}`)
+ .replace(/^NEXT_PUBLIC_PICTOR_VERSION=.*$/m, `NEXT_PUBLIC_PICTOR_VERSION=${pictorVersion}`);
+
+fs.writeFileSync(envPath, envContent.trim(), 'utf-8');
+console.log(`[set-edition] Versions written to .env.local`);
diff --git a/next.config.ts b/next.config.ts
index 54e574b..a6bff48 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -34,10 +34,6 @@ const nextConfig: NextConfig = {
},
]
},
- env: {
- NEXT_PUBLIC_edition: EDITION,
- NEXT_PUBLIC_pictorVersion: "11"
- },
reactStrictMode: true,
reactCompiler: true,
turbopack: {
diff --git a/package-lock.json b/package-lock.json
index cc95285..0b7e4d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
- "name": "my-app",
- "version": "0.1.0",
+ "name": "@code0-tech/sculptor",
+ "version": "0.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "my-app",
- "version": "0.1.0",
+ "name": "@code0-tech/sculptor",
+ "version": "0.0.0",
"dependencies": {
"@apollo/client": "^4.0.9",
"@code0-tech/pictor": "^0.0.0-mvp.45",
@@ -3075,14 +3075,6 @@
"@types/react": "^19.2.0"
}
},
- "node_modules/@types/trusted-types": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
- "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
- "license": "MIT",
- "optional": true,
- "peer": true
- },
"node_modules/@types/unist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
diff --git a/package.json b/package.json
index 538ac1c..453dd47 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
- "name": "my-app",
- "version": "0.1.0",
+ "name": "@code0-tech/sculptor",
+ "version": "0.0.0",
"private": true,
"scripts": {
"predev": "node edition.mjs",
diff --git a/src/packages/ce/src/application/pages/ApplicationSettingsPage.tsx b/src/packages/ce/src/application/pages/ApplicationSettingsPage.tsx
index 772c4d3..fa6fd74 100644
--- a/src/packages/ce/src/application/pages/ApplicationSettingsPage.tsx
+++ b/src/packages/ce/src/application/pages/ApplicationSettingsPage.tsx
@@ -128,7 +128,7 @@ export const ApplicationSettingsPage: React.FC = () => {
Sculptor version
Version of this application
- v0.0.0-mvp.1
+ {process.env.NEXT_PUBLIC_SCULPTOR_VERSION}
@@ -140,7 +140,7 @@ export const ApplicationSettingsPage: React.FC = () => {
library
v0.0.0-mvp.10
+ color={"info"}>{process.env.NEXT_PUBLIC_PICTOR_VERSION}