@fabr-client/core 0.1.6 → 0.1.10

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.
Files changed (2) hide show
  1. package/bin/fabr-client.js +26 -0
  2. package/package.json +4 -4
@@ -105,6 +105,25 @@ function installPlatformPackageGlobal(spec) {
105
105
  );
106
106
  }
107
107
 
108
+ function installPlatformPackageGlobalFromFallbackRegistry(spec) {
109
+ if (process.env.FABR_CLIENT_SKIP_REGISTRY_FALLBACK === "1") {
110
+ return false;
111
+ }
112
+ const registry =
113
+ process.env.FABR_CLIENT_NPM_FALLBACK_REGISTRY || "https://registry.npmjs.org";
114
+ return runNpmInstall(
115
+ `Installing Fabr Client native payload globally from fallback registry: ${spec}`,
116
+ [
117
+ "install",
118
+ "-g",
119
+ spec,
120
+ "--include=optional",
121
+ `--registry=${registry}`,
122
+ ],
123
+ path.join(__dirname, ".."),
124
+ );
125
+ }
126
+
108
127
  function resolveInstalledBinary(pkg) {
109
128
  const binary = resolvePlatformPackageBinary(pkg);
110
129
  return binary && fs.existsSync(binary) ? binary : null;
@@ -130,6 +149,13 @@ function installAndResolvePlatformPackage(pkg) {
130
149
  }
131
150
  }
132
151
 
152
+ if (installPlatformPackageGlobalFromFallbackRegistry(spec)) {
153
+ const binary = resolveInstalledBinary(pkg);
154
+ if (binary) {
155
+ return binary;
156
+ }
157
+ }
158
+
133
159
  return null;
134
160
  }
135
161
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabr-client/core",
3
- "version": "0.1.6",
3
+ "version": "0.1.10",
4
4
  "description": "Cross-platform launcher for Fabr Client",
5
5
  "license": "MIT",
6
6
  "homepage": "https://pivot.enclaws.com",
@@ -19,9 +19,9 @@
19
19
  "smoke": "node bin/fabr-client.js --help"
20
20
  },
21
21
  "optionalDependencies": {
22
- "@fabr-client/core-win32-x64": "0.1.6",
23
- "@fabr-client/core-darwin-x64": "0.1.6",
24
- "@fabr-client/core-darwin-arm64": "0.1.6"
22
+ "@fabr-client/core-win32-x64": "0.1.10",
23
+ "@fabr-client/core-darwin-x64": "0.1.10",
24
+ "@fabr-client/core-darwin-arm64": "0.1.10"
25
25
  },
26
26
  "files": [
27
27
  "bin/",