@crossdelta/infrastructure 0.11.1 → 0.11.2
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.cjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1149,7 +1149,8 @@ var indent = (text, level) => {
|
|
|
1149
1149
|
`).map((line) => line.trim() === "" ? "" : `${prefix}${line}`).join(`
|
|
1150
1150
|
`);
|
|
1151
1151
|
};
|
|
1152
|
-
var
|
|
1152
|
+
var encodeHash = (hash) => hash.startsWith("$") ? Buffer.from(hash).toString("base64") : hash;
|
|
1153
|
+
var basicAuthLines = (basicAuth) => basicAuth ? ["basic_auth {", ` ${basicAuth.user} ${encodeHash(basicAuth.hash)}`, "}"] : [];
|
|
1153
1154
|
var generateHandleBlock = (handle, level, basicAuth) => {
|
|
1154
1155
|
const hasPath = handle.path != null;
|
|
1155
1156
|
const header = hasPath ? `handle ${handle.path}* {` : "handle {";
|
package/dist/index.js
CHANGED
|
@@ -1053,7 +1053,8 @@ var indent = (text, level) => {
|
|
|
1053
1053
|
`).map((line) => line.trim() === "" ? "" : `${prefix}${line}`).join(`
|
|
1054
1054
|
`);
|
|
1055
1055
|
};
|
|
1056
|
-
var
|
|
1056
|
+
var encodeHash = (hash) => hash.startsWith("$") ? Buffer.from(hash).toString("base64") : hash;
|
|
1057
|
+
var basicAuthLines = (basicAuth) => basicAuth ? ["basic_auth {", ` ${basicAuth.user} ${encodeHash(basicAuth.hash)}`, "}"] : [];
|
|
1057
1058
|
var generateHandleBlock = (handle, level, basicAuth) => {
|
|
1058
1059
|
const hasPath = handle.path != null;
|
|
1059
1060
|
const header = hasPath ? `handle ${handle.path}* {` : "handle {";
|