@blaxel/core 0.2.32-dev.182 → 0.2.32-dev.183

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.
@@ -8,7 +8,7 @@ function getPackageVersion() {
8
8
  try {
9
9
  // Try to require package.json (Node.js only, gracefully fails in browser)
10
10
  // eslint-disable-next-line @typescript-eslint/no-require-imports
11
- const packageJson = require("../../../package.json");
11
+ const packageJson = {"version":"0.2.32-dev.183","commit":"fbb89b46492b217f58d6115db98bd5e19cdc06f9"};
12
12
  return packageJson.version || "unknown";
13
13
  }
14
14
  catch {
@@ -55,7 +55,7 @@ function getCommitHash() {
55
55
  try {
56
56
  // Try to require package.json and look for commit field (set during build)
57
57
  // eslint-disable-next-line @typescript-eslint/no-require-imports
58
- const packageJson = require("../../../package.json");
58
+ const packageJson = {"version":"0.2.32-dev.183","commit":"fbb89b46492b217f58d6115db98bd5e19cdc06f9"};
59
59
  // Check for commit in various possible locations
60
60
  const commit = packageJson.commit || packageJson.buildInfo?.commit;
61
61
  if (commit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.32-dev.182",
3
+ "version": "0.2.32-dev.183",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",
@@ -76,13 +76,14 @@
76
76
  "vite": "^5.2.0",
77
77
  "vitest": "^1.5.0"
78
78
  },
79
- "commit": "62706de9b339be30f7588150c761cc23f1067fd3",
79
+ "commit": "fbb89b46492b217f58d6115db98bd5e19cdc06f9",
80
80
  "scripts": {
81
81
  "lint": "eslint src/",
82
82
  "dev": "tsc --watch",
83
- "build": "npm run build:inject-commit && tsc",
83
+ "build": "npm run build:inject-commit && tsc && npm run build:replace-imports",
84
84
  "build:clean": "tsc",
85
85
  "build:inject-commit": "node -e \"const fs=require('fs'),pkg=require('./package.json'),{execSync}=require('child_process');try{const commit=execSync('git rev-parse HEAD',{encoding:'utf8'}).trim();pkg.commit=commit;fs.writeFileSync('./package.json',JSON.stringify(pkg,null,'\\t')+'\\n');console.log('✅ Injected commit:',commit.substring(0,7))}catch(e){console.log('⚠️ Could not inject commit:',e.message)}\"",
86
+ "build:replace-imports": "node -e \"const fs=require('fs'),path=require('path'),pkg=require('./package.json');const settingsPath=path.join('dist','common','settings.js');if(fs.existsSync(settingsPath)){let content=fs.readFileSync(settingsPath,'utf8');content=content.replace(/require\\(\\\".*?\\/package\\.json\\\"\\)/g,JSON.stringify({version:pkg.version,commit:pkg.commit||'unknown'}));fs.writeFileSync(settingsPath,content);console.log('✅ Replaced package.json imports in compiled JS with version:',pkg.version,'commit:',(pkg.commit||'unknown').substring(0,7));}else{console.log('⚠️ Could not find',settingsPath,'to replace imports');}\"",
86
87
  "test": "vitest --run",
87
88
  "test:watch": "vitest --watch"
88
89
  }