oasis_test 0.1.78 → 0.1.79
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.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -192600,7 +192600,7 @@ ${res.warning}`);
|
|
|
192600
192600
|
init_src6();
|
|
192601
192601
|
|
|
192602
192602
|
// src/index.ts
|
|
192603
|
-
var PKG_VERSION = true ? "0.1.
|
|
192603
|
+
var PKG_VERSION = true ? "0.1.79" : "dev";
|
|
192604
192604
|
var OASIS_DIR = path28.join(os9.homedir(), ".oasis");
|
|
192605
192605
|
var CONFIG_FILE = path28.join(OASIS_DIR, "node-config.json");
|
|
192606
192606
|
var PID_FILE = path28.join(OASIS_DIR, "node.pid");
|
|
@@ -192743,7 +192743,11 @@ function selfUpdate() {
|
|
|
192743
192743
|
const nameArg = cfg.name ? ` --name '${cfg.name.replace(/'/g, "'\\''")}'` : "";
|
|
192744
192744
|
const oasisBin = path28.join(NPM_PREFIX, "bin", "oasis");
|
|
192745
192745
|
const startCmd = `"${oasisBin}" daemon start --server-ws '${cfg.serverUrl}'${nameArg}`;
|
|
192746
|
-
const
|
|
192746
|
+
const OFFICIAL = "https://registry.npmjs.org/";
|
|
192747
|
+
const installOfficial = `npm install -g --prefer-online --registry '${OFFICIAL}' --prefix '${NPM_PREFIX}' '${PKG_NAME}@latest'`;
|
|
192748
|
+
const installFallback = `npm install -g --prefer-online --prefix '${NPM_PREFIX}' '${PKG_NAME}@latest'`;
|
|
192749
|
+
const printVersion = `node -p "'[oasis] self-update installed ' + require('${NPM_PREFIX}/lib/node_modules/${PKG_NAME}/package.json').version" || true`;
|
|
192750
|
+
const inner = `{ echo "[oasis] self-update \u2192 ${PKG_NAME}@latest (registry ${OFFICIAL}, \u5931\u8D25\u56DE\u843D\u9ED8\u8BA4\u6E90)"; sleep 2; { ${installOfficial} || ${installFallback}; } && ${printVersion} && ${startCmd}; } >> '${LOG_FILE}' 2>&1`;
|
|
192747
192751
|
const hasSystemd = process.platform === "linux" && (() => {
|
|
192748
192752
|
try {
|
|
192749
192753
|
(0, import_node_child_process17.execSync)("command -v systemd-run", { stdio: "ignore" });
|