@dreamboard-games/cli 0.1.30-alpha.20 → 0.1.30-alpha.21

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.
@@ -26,7 +26,7 @@ import {
26
26
  writeWorkspaceJsonFile,
27
27
  writeWorkspaceTextFile,
28
28
  zProblemDetails
29
- } from "./chunk-EJGB3IR7.js";
29
+ } from "./chunk-2Z65YI7P.js";
30
30
  import {
31
31
  clearCredentials,
32
32
  getStoredSession,
@@ -4278,4 +4278,4 @@ export {
4278
4278
  isLocalMaintainerRegistryEnabled,
4279
4279
  didLocalMaintainerSnapshotChange
4280
4280
  };
4281
- //# sourceMappingURL=chunk-5PJWUB6W.js.map
4281
+ //# sourceMappingURL=chunk-GQ3ZEAEG.js.map
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ import {
55
55
  titleFromSlug,
56
56
  toDreamboardApiError,
57
57
  waitForCompiledResultJobSdk
58
- } from "./chunk-5PJWUB6W.js";
58
+ } from "./chunk-GQ3ZEAEG.js";
59
59
  import {
60
60
  applyWorkspaceCodegen,
61
61
  collectLocalFiles,
@@ -93,7 +93,7 @@ import {
93
93
  updateProjectLocalMaintainerRegistry,
94
94
  updateProjectState,
95
95
  writeSnapshot
96
- } from "./chunk-EJGB3IR7.js";
96
+ } from "./chunk-2Z65YI7P.js";
97
97
  import {
98
98
  clearCredentials,
99
99
  getActiveCredentialBackendName,
@@ -1944,7 +1944,11 @@ async function resolveGitCredential(input) {
1944
1944
  input.policy.allowedHosts.map((value) => value.toLowerCase())
1945
1945
  );
1946
1946
  const pathPattern = input.policy.allowedPathPattern ?? DEFAULT_REPOSITORY_PATH;
1947
- if (protocol !== "https" || !host || !allowedHosts.has(host)) {
1947
+ if (!protocol || !host || !allowedHosts.has(host)) {
1948
+ return null;
1949
+ }
1950
+ const secureProtocol = protocol === "https" || protocol === "http" && isLoopbackHost(host);
1951
+ if (!secureProtocol) {
1948
1952
  return null;
1949
1953
  }
1950
1954
  if (!path10 || !pathPattern.test(path10)) {
@@ -1956,6 +1960,10 @@ async function resolveGitCredential(input) {
1956
1960
  password: token.token
1957
1961
  };
1958
1962
  }
1963
+ function isLoopbackHost(host) {
1964
+ const hostname = host.replace(/:\d+$/, "");
1965
+ return hostname === "127.0.0.1" || hostname === "localhost" || hostname === "::1";
1966
+ }
1959
1967
  function normalizeCredentialPath(value) {
1960
1968
  if (!value) return null;
1961
1969
  return value.replace(/^\/+/, "");
@@ -6163,7 +6171,7 @@ function runDreamboardCli(internalSubCommands = {}) {
6163
6171
  const main = defineCommand({
6164
6172
  meta: {
6165
6173
  name: "dreamboard",
6166
- version: "0.1.30-alpha.20",
6174
+ version: "0.1.30-alpha.21",
6167
6175
  description: "Dreamboard CLI \u2014 game development platform"
6168
6176
  },
6169
6177
  subCommands