@jacebenson/jsn 4.3.7-dev.24 → 4.3.7-dev.25
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/package.json +1 -1
- package/src/midserver-install.js +6 -2
package/package.json
CHANGED
package/src/midserver-install.js
CHANGED
|
@@ -28,7 +28,8 @@ export function normalizeMidName(name) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export function buildMidRecipeUrl(releaseName) {
|
|
31
|
-
const
|
|
31
|
+
const matches = [...String(releaseName).matchAll(/(\d{4})-(\d{2})-(\d{2})|(\d{2})-(\d{2})-(\d{4})/g)];
|
|
32
|
+
const match = matches.at(-1);
|
|
32
33
|
if (!match) throw new Error(`MID release name has no build date: ${releaseName}`);
|
|
33
34
|
const year = match[1] || match[6];
|
|
34
35
|
const month = match[2] || match[4];
|
|
@@ -131,7 +132,10 @@ export async function installDockerMidServer({
|
|
|
131
132
|
fs.rmSync(persistedRecipeDir, { recursive: true, force: true });
|
|
132
133
|
fs.cpSync(recipeDir, persistedRecipeDir, { recursive: true });
|
|
133
134
|
fs.writeFileSync(composePath, composeFile({ serviceName }), { mode: 0o600 });
|
|
134
|
-
fs.
|
|
135
|
+
fs.chmodSync(composePath, 0o600);
|
|
136
|
+
const envPath = path.join(installDir, '.env');
|
|
137
|
+
fs.writeFileSync(envPath, envFile({ instanceURL, username, password, displayName, releaseName }), { mode: 0o600 });
|
|
138
|
+
fs.chmodSync(envPath, 0o600);
|
|
135
139
|
if (!dockerAvailable || !runNow) {
|
|
136
140
|
return {
|
|
137
141
|
name: displayName,
|