@saleso.innovations/bridge 0.1.12 → 0.1.13
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/README.md +1 -1
- package/dist/bridgePaths.d.ts +2 -0
- package/dist/bridgePaths.d.ts.map +1 -1
- package/dist/bridgePaths.js +6 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ This installs the latest package, refreshes the CLI symlink, and restarts `cleos
|
|
|
34
34
|
To pin a specific release (e.g. after a Cleos update):
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
curl -fsSL https://amicable-elephant-407.convex.site/update-bridge.sh | bash -s -- 0.1.
|
|
37
|
+
curl -fsSL https://amicable-elephant-407.convex.site/update-bridge.sh | bash -s -- 0.1.13
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Manual usage
|
package/dist/bridgePaths.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const BRIDGE_PACKAGE = "@saleso.innovations/bridge";
|
|
2
|
+
/** Pin scoped package resolution to the public npm registry in the bridge install dir. */
|
|
3
|
+
export declare function ensureBridgeNpmRegistry(bridgeDir: string): void;
|
|
2
4
|
export declare function defaultBridgeInstallDir(): string;
|
|
3
5
|
export declare function bridgeCliPath(bridgeDir: string): string;
|
|
4
6
|
/** Directory used by `npm install --prefix` (usually ~/.cleos/bridge). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgePaths.d.ts","sourceRoot":"","sources":["../src/bridgePaths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bridgePaths.d.ts","sourceRoot":"","sources":["../src/bridgePaths.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,+BAA+B,CAAC;AAE3D,0FAA0F;AAC1F,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAM/D;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD;AAwBD,0EAA0E;AAC1E,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ3E"}
|
package/dist/bridgePaths.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
2
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { dirname, join, sep } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { NPM_PUBLIC_REGISTRY } from "./constants.js";
|
|
6
7
|
export const BRIDGE_PACKAGE = "@saleso.innovations/bridge";
|
|
8
|
+
/** Pin scoped package resolution to the public npm registry in the bridge install dir. */
|
|
9
|
+
export function ensureBridgeNpmRegistry(bridgeDir) {
|
|
10
|
+
writeFileSync(join(bridgeDir, ".npmrc"), `@saleso.innovations:registry=${NPM_PUBLIC_REGISTRY}\n`, "utf8");
|
|
11
|
+
}
|
|
7
12
|
export function defaultBridgeInstallDir() {
|
|
8
13
|
return join(homedir(), ".cleos", "bridge");
|
|
9
14
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare const DEFAULT_BRIDGE_CAPABILITIES: string[];
|
|
|
9
9
|
export declare const DEFAULT_BRIDGE_INSTALL_URL = "https://amicable-elephant-407.convex.site/install-bridge.sh";
|
|
10
10
|
/** VPS one-line updater (served from public Convex HTTP). */
|
|
11
11
|
export declare const DEFAULT_BRIDGE_UPDATE_URL = "https://amicable-elephant-407.convex.site/update-bridge.sh";
|
|
12
|
+
/** Public npm registry — always use this for bridge installs (avoids VPS mirror / scope misconfig). */
|
|
13
|
+
export declare const NPM_PUBLIC_REGISTRY = "https://registry.npmjs.org/";
|
|
12
14
|
export declare function bridgeInstallCommand(code: string): string;
|
|
13
15
|
export declare function bridgeUpdateCommand(): string;
|
|
14
16
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,8CAA8C,CAAC;AAEzF,6FAA6F;AAC7F,eAAO,MAAM,sBAAsB,8CAA8C,CAAC;AAElF,4DAA4D;AAC5D,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAE/D,eAAO,MAAM,2BAA2B,UAAuC,CAAC;AAEhF,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,gEACwB,CAAC;AAEhE,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,+DACwB,CAAC;AAE/D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,8CAA8C,CAAC;AAEzF,6FAA6F;AAC7F,eAAO,MAAM,sBAAsB,8CAA8C,CAAC;AAElF,4DAA4D;AAC5D,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAE/D,eAAO,MAAM,2BAA2B,UAAuC,CAAC;AAEhF,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,gEACwB,CAAC;AAEhE,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,+DACwB,CAAC;AAE/D,uGAAuG;AACvG,eAAO,MAAM,mBAAmB,gCAAgC,CAAC;AAEjE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
package/dist/constants.js
CHANGED
|
@@ -9,6 +9,8 @@ export const DEFAULT_BRIDGE_CAPABILITIES = ["chat", HERMES_COMMANDS_CAPABILITY];
|
|
|
9
9
|
export const DEFAULT_BRIDGE_INSTALL_URL = "https://amicable-elephant-407.convex.site/install-bridge.sh";
|
|
10
10
|
/** VPS one-line updater (served from public Convex HTTP). */
|
|
11
11
|
export const DEFAULT_BRIDGE_UPDATE_URL = "https://amicable-elephant-407.convex.site/update-bridge.sh";
|
|
12
|
+
/** Public npm registry — always use this for bridge installs (avoids VPS mirror / scope misconfig). */
|
|
13
|
+
export const NPM_PUBLIC_REGISTRY = "https://registry.npmjs.org/";
|
|
12
14
|
export function bridgeInstallCommand(code) {
|
|
13
15
|
return `curl -fsSL ${DEFAULT_BRIDGE_INSTALL_URL} | bash -s -- ${code}`;
|
|
14
16
|
}
|
package/dist/update.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,sBAAsB,GAAG;IACnC,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,IAAI,CAyC1E"}
|
package/dist/update.js
CHANGED
|
@@ -2,18 +2,22 @@ import { execFileSync, spawnSync } from "node:child_process";
|
|
|
2
2
|
import { chmodSync, mkdirSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { BRIDGE_PACKAGE, bridgeCliPath, readInstalledBridgeVersion, resolveBridgeInstallDir, } from "./bridgePaths.js";
|
|
5
|
+
import { BRIDGE_PACKAGE, bridgeCliPath, ensureBridgeNpmRegistry, readInstalledBridgeVersion, resolveBridgeInstallDir, } from "./bridgePaths.js";
|
|
6
|
+
import { NPM_PUBLIC_REGISTRY } from "./constants.js";
|
|
6
7
|
export function runBridgeUpdate(options = {}) {
|
|
7
8
|
const tag = options.tag ?? "latest";
|
|
8
9
|
const bridgeDir = resolveBridgeInstallDir();
|
|
9
10
|
const beforeVersion = readInstalledBridgeVersion(bridgeDir);
|
|
10
11
|
mkdirSync(bridgeDir, { recursive: true });
|
|
11
|
-
|
|
12
|
+
ensureBridgeNpmRegistry(bridgeDir);
|
|
13
|
+
console.log(`Updating ${BRIDGE_PACKAGE}@${tag} in ${bridgeDir} (registry: ${NPM_PUBLIC_REGISTRY})...`);
|
|
12
14
|
const npm = spawnSync("npm", [
|
|
13
15
|
"install",
|
|
14
16
|
"--prefix",
|
|
15
17
|
bridgeDir,
|
|
16
18
|
`${BRIDGE_PACKAGE}@${tag}`,
|
|
19
|
+
"--registry",
|
|
20
|
+
NPM_PUBLIC_REGISTRY,
|
|
17
21
|
"--no-fund",
|
|
18
22
|
"--no-audit",
|
|
19
23
|
"--omit=dev",
|