@oliasoft-open-source/node-json-migrator 5.6.3-beta-1 → 5.6.4-beta-1
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/index.mjs +8 -3
- package/package.json +3 -4
package/dist/index.mjs
CHANGED
|
@@ -4750,6 +4750,7 @@ const parseHistoricalPlan = (rawPlan, revision) => {
|
|
|
4750
4750
|
plan
|
|
4751
4751
|
};
|
|
4752
4752
|
} catch {
|
|
4753
|
+
console.warn(`Skipping invalid historical plan.json at commit ${revision.version}`);
|
|
4753
4754
|
return null;
|
|
4754
4755
|
}
|
|
4755
4756
|
};
|
|
@@ -4757,16 +4758,20 @@ const getHistoricalPlansFromGit = async (planFilePath) => {
|
|
|
4757
4758
|
try {
|
|
4758
4759
|
if (!gitAvailable()) throw new Error("git must be installed and in PATH");
|
|
4759
4760
|
const terminal = getTerminal();
|
|
4760
|
-
const revisions = await getPlanRevisionsFromGit(planFilePath, terminal);
|
|
4761
|
+
const revisions = await GitModule.getPlanRevisionsFromGit(planFilePath, terminal);
|
|
4761
4762
|
return { historicalPlans: compact(await Promise.all(revisions.map(async (revision) => {
|
|
4762
|
-
return parseHistoricalPlan(await getPlanFromGit(planFilePath, revision.version, terminal), revision);
|
|
4763
|
+
return parseHistoricalPlan(await GitModule.getPlanFromGit(planFilePath, revision.version, terminal), revision);
|
|
4763
4764
|
}))) };
|
|
4764
4765
|
} catch (error) {
|
|
4765
4766
|
console.error(chalk.red(error));
|
|
4766
4767
|
throw new Error("Unable to fetch plan.json history from git");
|
|
4767
4768
|
}
|
|
4768
4769
|
};
|
|
4769
|
-
const GitModule = {
|
|
4770
|
+
const GitModule = {
|
|
4771
|
+
getHistoricalPlansFromGit,
|
|
4772
|
+
getPlanRevisionsFromGit,
|
|
4773
|
+
getPlanFromGit
|
|
4774
|
+
};
|
|
4770
4775
|
//#endregion
|
|
4771
4776
|
//#region src/executed/executed.ts
|
|
4772
4777
|
const readPlanFromDatabase = async ({ database, entity, version }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/node-json-migrator",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.4-beta-1",
|
|
4
4
|
"description": "A library for JSON migrations",
|
|
5
5
|
"homepage": "https://oliasoft-open-source.gitlab.io/node-json-migrator",
|
|
6
6
|
"bugs": {
|
|
@@ -46,8 +46,7 @@
|
|
|
46
46
|
"pg-mem": "^3.0.14",
|
|
47
47
|
"strip-ansi": "^7.2.0",
|
|
48
48
|
"tsdown": "^0.21.4",
|
|
49
|
-
"typescript": "^5.9.3"
|
|
50
|
-
"node": "runtime:26.3.0"
|
|
49
|
+
"typescript": "^5.9.3"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
52
|
"pg-promise": "^11 || ^12"
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"devEngines": {
|
|
62
61
|
"packageManager": {
|
|
63
62
|
"name": "pnpm",
|
|
64
|
-
"version": "
|
|
63
|
+
"version": "12.18.0",
|
|
65
64
|
"onFail": "download"
|
|
66
65
|
},
|
|
67
66
|
"runtime": {
|