verteilen-core 1.3.39 → 1.3.41

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/server/io.js CHANGED
@@ -68,30 +68,31 @@ const ObsoleteSupport = async (loader, type, folder) => {
68
68
  const allRecordText = await Promise.all(ps);
69
69
  const allRecord = allRecordText.map(x => JSON.parse(x));
70
70
  const execute = allRecord.map(async (x) => {
71
+ const tasks = x.task;
71
72
  x.tasks = [];
72
73
  x.databaser_uuid = x.parameter_uuid;
73
- x.tasks_uuid = x.task.map(y => y.uuid);
74
- const tasks = x.task;
74
+ x.tasks_uuid = tasks.map(y => y.uuid);
75
75
  delete x.parameter_uuid;
76
76
  delete x.task;
77
77
  const execute_task = tasks.map(async (y) => {
78
78
  const jobs = y.jobs;
79
79
  y.jobs = [];
80
- y.jobs_uuid = y.jobs.map(z => z.uuid);
80
+ y.jobs_uuid = jobs.map(z => z.uuid);
81
81
  const execute_jobs = jobs.map(async (z) => {
82
82
  z.id_args = [];
83
83
  const d3 = loader.join(loader.root, "job", `${z.uuid}.json`);
84
- return loader.write_string(d3, z);
84
+ return loader.write_string(d3, JSON.stringify(z, null, 4));
85
85
  });
86
86
  await Promise.all(execute_jobs);
87
87
  const d2 = loader.join(loader.root, "task", `${y.uuid}.json`);
88
- return loader.write_string(d2, y);
88
+ return loader.write_string(d2, JSON.stringify(y, null, 4));
89
89
  });
90
90
  await Promise.all(execute_task);
91
91
  const d1 = loader.join(loader.root, "project", `${x.uuid}.json`);
92
- return loader.write_string(d1, x);
92
+ return loader.write_string(d1, JSON.stringify(x, null, 4));
93
93
  });
94
94
  await Promise.all(execute);
95
+ await loader.rm(path);
95
96
  }
96
97
  else if (type == interface_1.RecordType.DATABASE) {
97
98
  const path = loader.join(loader.root, "parameter");
@@ -104,7 +105,7 @@ const ObsoleteSupport = async (loader, type, folder) => {
104
105
  return loader.cp(path2, path3);
105
106
  });
106
107
  await Promise.all(ps);
107
- loader.mkdir(path);
108
+ loader.rm(path);
108
109
  }
109
110
  };
110
111
  exports.ObsoleteSupport = ObsoleteSupport;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verteilen-core",
3
- "version": "1.3.39",
3
+ "version": "1.3.41",
4
4
  "license": "MIT",
5
5
  "homepage": "https://verteilen.github.io/wiki/",
6
6
  "author": "Elly",
package/src/server/io.ts CHANGED
@@ -148,32 +148,33 @@ export const ObsoleteSupport = async (loader:RecordIOBase, type:RecordType, fold
148
148
  const allRecordText:Array<string> = await Promise.all(ps)
149
149
  const allRecord:Array<any> = allRecordText.map(x => JSON.parse(x))
150
150
  const execute = allRecord.map(async x => {
151
+ const tasks:Array<any> = x.task
151
152
  x.tasks = []
152
153
  x.databaser_uuid = x.parameter_uuid
153
- x.tasks_uuid = x.task.map(y => y.uuid)
154
- const tasks:Array<any> = x.task
154
+ x.tasks_uuid = tasks.map(y => y.uuid)
155
155
  delete x.parameter_uuid
156
156
  delete x.task
157
157
 
158
158
  const execute_task = tasks.map(async y => {
159
159
  const jobs = y.jobs
160
160
  y.jobs = []
161
- y.jobs_uuid = y.jobs.map(z => z.uuid)
161
+ y.jobs_uuid = jobs.map(z => z.uuid)
162
162
 
163
163
  const execute_jobs = jobs.map(async z => {
164
164
  z.id_args = []
165
165
  const d3 = loader.join(loader.root, "job", `${z.uuid}.json`)
166
- return loader.write_string(d3, z)
166
+ return loader.write_string(d3, JSON.stringify(z, null, 4))
167
167
  })
168
168
  await Promise.all(execute_jobs)
169
169
  const d2 = loader.join(loader.root, "task", `${y.uuid}.json`)
170
- return loader.write_string(d2, y)
170
+ return loader.write_string(d2, JSON.stringify(y, null, 4))
171
171
  })
172
172
  await Promise.all(execute_task)
173
173
  const d1 = loader.join(loader.root, "project", `${x.uuid}.json`)
174
- return loader.write_string(d1, x)
174
+ return loader.write_string(d1, JSON.stringify(x, null, 4))
175
175
  })
176
176
  await Promise.all(execute)
177
+ await loader.rm(path)
177
178
  }
178
179
  else if(type == RecordType.DATABASE){
179
180
  const path = loader.join(loader.root, "parameter")
@@ -185,7 +186,7 @@ export const ObsoleteSupport = async (loader:RecordIOBase, type:RecordType, fold
185
186
  return loader.cp(path2, path3)
186
187
  })
187
188
  await Promise.all(ps)
188
- loader.mkdir(path)
189
+ loader.rm(path)
189
190
  }
190
191
  }
191
192
  /**