@gjsify/npm-registry 0.39.0 → 0.41.0
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/lib/esm/auth.js +1 -1
- package/package.json +4 -4
package/lib/esm/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";function buildHeaders(e,t){let n={"user-agent":`gjsify-install/0.
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";function buildHeaders(e,t){let n={"user-agent":`gjsify-install/0.41.0`,"accept-encoding":t.acceptEncoding??`identity`};if(t.npmrc){let r=resolveAuthForUrl(e,t.npmrc);r&&(n.authorization=r)}if(t.headers)for(let[e,r]of Object.entries(t.headers))n[e.toLowerCase()]=r;return n}function resolveAuthForUrl(e,t){let n=pathPrefixes(new URL(e));for(let e of n){let n=t.authTokens[e];if(n)return`Bearer ${n}`;let r=t.basicAuth[e];if(r)return`Basic ${btoa(`${r.username}:${r.password}`)}`}return null}function pathPrefixes(e){let t=e.pathname.split(`/`).filter(Boolean),n=[];for(let r=t.length;r>=0;r--){let i=t.slice(0,r).join(`/`);n.push(i?`//${e.host}/${i}`:`//${e.host}`)}return n}export{buildHeaders,resolveAuthForUrl};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/npm-registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "npm registry client for the gjsify install backend — packuments, tarballs, .npmrc auth (Node + GJS)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lib"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"clear": "gjsify clear lib
|
|
19
|
+
"clear": "gjsify clear lib *.tsbuildinfo test.gjs.mjs test.node.mjs",
|
|
20
20
|
"check": "gjsify tsc --noEmit",
|
|
21
21
|
"build": "gjsify run build:gjsify && gjsify run build:types",
|
|
22
22
|
"build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.mts'",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
],
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@gjsify/cli": "^0.
|
|
44
|
-
"@gjsify/unit": "^0.
|
|
43
|
+
"@gjsify/cli": "^0.41.0",
|
|
44
|
+
"@gjsify/unit": "^0.41.0",
|
|
45
45
|
"typescript": "^6.0.3"
|
|
46
46
|
},
|
|
47
47
|
"repository": {
|