@muverse/core 0.2.5 → 0.2.7
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/adapters/gradle/gradle-project-information.d.ts.map +1 -1
- package/dist/adapters/gradle/gradle-project-information.js +4 -3
- package/dist/utils/banner.d.ts.map +1 -1
- package/dist/utils/banner.js +4 -0
- package/dist/utils/version.d.ts +3 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +4 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradle-project-information.d.ts","sourceRoot":"","sources":["../../../src/adapters/gradle/gradle-project-information.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AA4H1G;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"gradle-project-information.d.ts","sourceRoot":"","sources":["../../../src/adapters/gradle/gradle-project-information.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AA4H1G;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAsEtH;AA2CD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,qBAAqB,GAAG,kBAAkB,CA6CnG"}
|
|
@@ -108,7 +108,7 @@ export async function getRawProjectInformation(projectRoot, outputFile) {
|
|
|
108
108
|
let executeScript = true;
|
|
109
109
|
// Compute hash of all Gradle build files
|
|
110
110
|
const currentHash = await computeGradleFilesHash(projectRoot);
|
|
111
|
-
logger.
|
|
111
|
+
logger.debug(`🔍 Computed Gradle files hash: ${currentHash}`);
|
|
112
112
|
if (fileExists) {
|
|
113
113
|
logger.info(`💾 Cached project information found at ${outputFile}. Validating cache...`);
|
|
114
114
|
// Step 2: File exists, check cache validity
|
|
@@ -123,7 +123,7 @@ export async function getRawProjectInformation(projectRoot, outputFile) {
|
|
|
123
123
|
data = cachedData.data;
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
logger.
|
|
126
|
+
logger.debug(`❌ Cache is invalid. Cached hash: ${cachedData.hash}`);
|
|
127
127
|
logger.info(`🔄 Gradle files changed, regenerating project information...`);
|
|
128
128
|
}
|
|
129
129
|
// Cache miss - hash mismatch, need to regenerate
|
|
@@ -135,6 +135,7 @@ export async function getRawProjectInformation(projectRoot, outputFile) {
|
|
|
135
135
|
}
|
|
136
136
|
if (executeScript) {
|
|
137
137
|
// Step 3: File doesn't exist or cache is invalid - execute Gradle script
|
|
138
|
+
const outputFile = join(projectRoot, 'build', 'project-information.json');
|
|
138
139
|
await executeGradleScript(projectRoot, outputFile);
|
|
139
140
|
// Read the output file content
|
|
140
141
|
const fileContent = await fs.readFile(outputFile, 'utf-8');
|
|
@@ -154,7 +155,7 @@ export async function getRawProjectInformation(projectRoot, outputFile) {
|
|
|
154
155
|
};
|
|
155
156
|
// Read gradle.properites and add version
|
|
156
157
|
const projectInformation = await getInformationWithVersions(projectRoot, data);
|
|
157
|
-
if (
|
|
158
|
+
if (executeScript) {
|
|
158
159
|
// Write back to file with hash for future cache validation
|
|
159
160
|
await fs.writeFile(outputFile, JSON.stringify(cachedData, null, 2), 'utf-8');
|
|
160
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/utils/banner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/utils/banner.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,EAAE,MASpB,CAAC"}
|
package/dist/utils/banner.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { VERSION, PACKAGE_NAME } from "./version.js";
|
|
2
|
+
const info = `${PACKAGE_NAME} v${VERSION}`;
|
|
1
3
|
export const banner = `
|
|
2
4
|
██╗ ██╗███████╗██████╗ ███████╗███████╗
|
|
3
5
|
██║ ██║██╔════╝██╔══██╗██╔════╝██╔════╝
|
|
@@ -5,4 +7,6 @@ export const banner = `
|
|
|
5
7
|
╚██╗ ██╔╝██╔══╝ ██╔══██╗╚════██║██╔══╝
|
|
6
8
|
╚████╔╝ ███████╗██║ ██║███████║███████╗
|
|
7
9
|
╚═══╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
|
|
10
|
+
|
|
11
|
+
${info.padStart(44)}
|
|
8
12
|
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,YAAY,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muverse/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Version Engine for Repo Semantic Evolution (Core Library)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
+
"prebuild": "node scripts/generate-version.js",
|
|
14
15
|
"build": "npm run build:esm",
|
|
15
16
|
"build:esm": "tsc --project tsconfig.json --outDir dist && npm run copy-assets",
|
|
16
17
|
"build:cjs": "tsc --project tsconfig.cjs.json --outDir dist && npm run copy-assets",
|