@atxp/server 0.3.0 → 0.5.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/dist/core/mcp.js.map +1 -1
- package/dist/getResource.js +19 -2
- package/dist/getResource.js.map +1 -1
- package/dist/index.cjs +450 -13436
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +101 -17
- package/dist/index.js +425 -13439
- package/dist/index.js.map +1 -1
- package/dist/node/getRawBody.js +35 -0
- package/dist/node/getRawBody.js.map +1 -0
- package/dist/node/http.js +4 -7
- package/dist/node/http.js.map +1 -1
- package/dist/node/oauth.js +19 -1
- package/dist/node/oauth.js.map +1 -1
- package/dist/oAuthMetadata.js +1 -10
- package/dist/oAuthMetadata.js.map +1 -1
- package/dist/paymentDestination.js +85 -0
- package/dist/paymentDestination.js.map +1 -0
- package/dist/protectedResourceMetadata.js +6 -15
- package/dist/protectedResourceMetadata.js.map +1 -1
- package/dist/requirePayment.js +7 -2
- package/dist/requirePayment.js.map +1 -1
- package/dist/serverConfig.js +36 -0
- package/dist/serverConfig.js.map +1 -0
- package/dist/serverTestHelpers.d.ts +116 -0
- package/dist/serverTestHelpers.js +131 -0
- package/dist/serverTestHelpers.js.map +1 -0
- package/dist/webapi/mcp.js.map +1 -1
- package/dist/webapi/oauth.js +23 -1
- package/dist/webapi/oauth.js.map +1 -1
- package/package.json +8 -8
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/bom-handling.js +0 -4
- package/dist/_virtual/bom-handling.js.map +0 -1
- package/dist/_virtual/dbcs-codec.js +0 -4
- package/dist/_virtual/dbcs-codec.js.map +0 -1
- package/dist/_virtual/index.js +0 -8
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/_virtual/index3.js +0 -4
- package/dist/_virtual/index3.js.map +0 -1
- package/dist/_virtual/index4.js +0 -4
- package/dist/_virtual/index4.js.map +0 -1
- package/dist/_virtual/index5.js +0 -4
- package/dist/_virtual/index5.js.map +0 -1
- package/dist/_virtual/inherits.js +0 -4
- package/dist/_virtual/inherits.js.map +0 -1
- package/dist/_virtual/inherits_browser.js +0 -4
- package/dist/_virtual/inherits_browser.js.map +0 -1
- package/dist/_virtual/sbcs-codec.js +0 -4
- package/dist/_virtual/sbcs-codec.js.map +0 -1
- package/dist/_virtual/utf16.js +0 -4
- package/dist/_virtual/utf16.js.map +0 -1
- package/dist/_virtual/utf32.js +0 -4
- package/dist/_virtual/utf32.js.map +0 -1
- package/dist/_virtual/utf7.js +0 -4
- package/dist/_virtual/utf7.js.map +0 -1
- package/dist/atxpServer.js +0 -93
- package/dist/atxpServer.js.map +0 -1
- package/dist/node_modules/bytes/index.js +0 -181
- package/dist/node_modules/bytes/index.js.map +0 -1
- package/dist/node_modules/depd/index.js +0 -551
- package/dist/node_modules/depd/index.js.map +0 -1
- package/dist/node_modules/http-errors/index.js +0 -307
- package/dist/node_modules/http-errors/index.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -599
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +0 -207
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/index.js +0 -45
- package/dist/node_modules/iconv-lite/encodings/index.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/internal.js +0 -211
- package/dist/node_modules/iconv-lite/encodings/internal.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -84
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -461
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +0 -188
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json.js +0 -507
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json.js +0 -2622
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json.js +0 -2381
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json.js +0 -730
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json.js +0 -823
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js +0 -425
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json.js +0 -265
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json.js +0 -549
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/utf16.js +0 -207
- package/dist/node_modules/iconv-lite/encodings/utf16.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/utf32.js +0 -330
- package/dist/node_modules/iconv-lite/encodings/utf32.js.map +0 -1
- package/dist/node_modules/iconv-lite/encodings/utf7.js +0 -298
- package/dist/node_modules/iconv-lite/encodings/utf7.js.map +0 -1
- package/dist/node_modules/iconv-lite/lib/bom-handling.js +0 -62
- package/dist/node_modules/iconv-lite/lib/bom-handling.js.map +0 -1
- package/dist/node_modules/iconv-lite/lib/index.js +0 -193
- package/dist/node_modules/iconv-lite/lib/index.js.map +0 -1
- package/dist/node_modules/iconv-lite/lib/streams.js +0 -121
- package/dist/node_modules/iconv-lite/lib/streams.js.map +0 -1
- package/dist/node_modules/inherits/inherits.js +0 -22
- package/dist/node_modules/inherits/inherits.js.map +0 -1
- package/dist/node_modules/inherits/inherits_browser.js +0 -39
- package/dist/node_modules/inherits/inherits_browser.js.map +0 -1
- package/dist/node_modules/raw-body/index.js +0 -352
- package/dist/node_modules/raw-body/index.js.map +0 -1
- package/dist/node_modules/safer-buffer/safer.js +0 -89
- package/dist/node_modules/safer-buffer/safer.js.map +0 -1
- package/dist/node_modules/setprototypeof/index.js +0 -27
- package/dist/node_modules/setprototypeof/index.js.map +0 -1
- package/dist/node_modules/statuses/codes.json.js +0 -68
- package/dist/node_modules/statuses/codes.json.js.map +0 -1
- package/dist/node_modules/statuses/index.js +0 -158
- package/dist/node_modules/statuses/index.js.map +0 -1
- package/dist/node_modules/toidentifier/index.js +0 -42
- package/dist/node_modules/toidentifier/index.js.map +0 -1
- package/dist/node_modules/unpipe/index.js +0 -79
- package/dist/node_modules/unpipe/index.js.map +0 -1
package/dist/webapi/oauth.js
CHANGED
|
@@ -16,6 +16,28 @@ function sendOAuthChallengeWebApi(tokenCheck) {
|
|
|
16
16
|
headers: responseData.headers
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
+
function sendProtectedResourceMetadata(metadata) {
|
|
20
|
+
if (!metadata) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return new Response(JSON.stringify(metadata), {
|
|
24
|
+
status: 200,
|
|
25
|
+
headers: {
|
|
26
|
+
'Content-Type': 'application/json'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function sendOAuthMetadata(metadata) {
|
|
31
|
+
if (!metadata) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return new Response(JSON.stringify(metadata), {
|
|
35
|
+
status: 200,
|
|
36
|
+
headers: {
|
|
37
|
+
'Content-Type': 'application/json'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
19
41
|
|
|
20
|
-
export { sendOAuthChallengeWebApi };
|
|
42
|
+
export { sendOAuthChallengeWebApi, sendOAuthMetadata, sendProtectedResourceMetadata };
|
|
21
43
|
//# sourceMappingURL=oauth.js.map
|
package/dist/webapi/oauth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sources":["../../src/webapi/oauth.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"oauth.js","sources":["../../src/webapi/oauth.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA;;;AAGG;AACG,SAAU,wBAAwB,CAAC,UAAsB,EAAA;;AAE7D,IAAA,MAAM,YAAY,GAAG,gCAAgC,CAAC,UAAU,CAAC;IAEjE,IAAI,CAAC,YAAY,EAAE;AACjB,QAAA,OAAO,IAAI;IACb;;AAGA,IAAA,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE;QACrC,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,OAAO,EAAE,YAAY,CAAC;AACvB,KAAA,CAAC;AACJ;AAEM,SAAU,6BAA6B,CAAC,QAA0C,EAAA;IACtF,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,IAAI;IACb;IAEA,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;AAC5C,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,OAAO,EAAE;AACP,YAAA,cAAc,EAAE;AACjB;AACF,KAAA,CAAC;AACJ;AAEM,SAAU,iBAAiB,CAAC,QAA0C,EAAA;IAC1E,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,IAAI;IACb;IAEA,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;AAC5C,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,OAAO,EAAE;AACP,YAAA,cAAc,EAAE;AACjB;AACF,KAAA,CAAC;AACJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atxp/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "ATXP Server - MCP server implementation with payment processing capabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"import": "./dist/index.js",
|
|
20
20
|
"require": "./dist/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./serverTestHelpers": {
|
|
23
|
+
"types": "./dist/serverTestHelpers.d.ts",
|
|
24
|
+
"import": "./dist/serverTestHelpers.js",
|
|
25
|
+
"require": "./dist/serverTestHelpers.js"
|
|
21
26
|
}
|
|
22
27
|
},
|
|
23
28
|
"files": [
|
|
@@ -33,25 +38,20 @@
|
|
|
33
38
|
"pack:dry": "npm pack --dry-run"
|
|
34
39
|
},
|
|
35
40
|
"dependencies": {
|
|
36
|
-
"@atxp/common": "0.
|
|
41
|
+
"@atxp/common": "0.5.0",
|
|
37
42
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
38
43
|
"bignumber.js": "^9.3.0",
|
|
39
|
-
"content-type": "^1.0.5",
|
|
40
44
|
"oauth4webapi": "^3.5.0"
|
|
41
45
|
},
|
|
42
46
|
"peerDependencies": {
|
|
43
|
-
"
|
|
47
|
+
"content-type": "^1.0.5"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
|
-
"@types/express": "^5.0.0",
|
|
47
50
|
"@types/node": "^22.13.0",
|
|
48
|
-
"@types/supertest": "^6.0.3",
|
|
49
51
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
50
52
|
"@typescript-eslint/parser": "^8.38.0",
|
|
51
53
|
"eslint": "^9.32.0",
|
|
52
|
-
"express": "^5.0.0",
|
|
53
54
|
"node-mocks-http": "^1.17.2",
|
|
54
|
-
"supertest": "^7.1.4",
|
|
55
55
|
"typescript": "^5.7.3",
|
|
56
56
|
"vitest": "^3.0.9"
|
|
57
57
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export { commonjsGlobal, getDefaultExportFromCjs };
|
|
8
|
-
//# sourceMappingURL=_commonjsHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bom-handling.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dbcs-codec.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
|
|
2
|
-
import { __require as requireRawBody } from '../node_modules/raw-body/index.js';
|
|
3
|
-
|
|
4
|
-
var rawBodyExports = requireRawBody();
|
|
5
|
-
var getRawBody = /*@__PURE__*/getDefaultExportFromCjs(rawBodyExports);
|
|
6
|
-
|
|
7
|
-
export { getRawBody as default };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/_virtual/index2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inherits.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inherits_browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sbcs-codec.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/utf16.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utf16.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/utf32.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utf32.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/utf7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utf7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/atxpServer.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_AUTHORIZATION_SERVER, MemoryOAuthDb, OAuthResourceClient, ConsoleLogger } from '@atxp/common';
|
|
2
|
-
import { checkToken } from './node/token.js';
|
|
3
|
-
import { sendOAuthChallenge } from './node/oauth.js';
|
|
4
|
-
import { withATXPContext } from './atxpContext.js';
|
|
5
|
-
import { parseMcpRequests } from './node/http.js';
|
|
6
|
-
import { Router } from 'express';
|
|
7
|
-
import { getProtectedResourceMetadata, sendProtectedResourceMetadata } from './protectedResourceMetadata.js';
|
|
8
|
-
import { getResource } from './getResource.js';
|
|
9
|
-
import { ATXPPaymentServer } from './paymentServer.js';
|
|
10
|
-
import { getOAuthMetadata, sendOAuthMetadata } from './oAuthMetadata.js';
|
|
11
|
-
|
|
12
|
-
const DEFAULT_CONFIG = {
|
|
13
|
-
mountPath: '/',
|
|
14
|
-
currency: 'USDC',
|
|
15
|
-
network: 'base',
|
|
16
|
-
server: DEFAULT_AUTHORIZATION_SERVER,
|
|
17
|
-
payeeName: 'An ATXP Server',
|
|
18
|
-
allowHttp: false, // May be overridden in buildServerConfig by process.env.NODE_ENV
|
|
19
|
-
resource: null, // Set dynamically from the request URL
|
|
20
|
-
};
|
|
21
|
-
function buildServerConfig(args) {
|
|
22
|
-
if (!args.destination) {
|
|
23
|
-
throw new Error('destination is required');
|
|
24
|
-
}
|
|
25
|
-
// Read environment variables at runtime, not module load time
|
|
26
|
-
const envDefaults = {
|
|
27
|
-
...DEFAULT_CONFIG,
|
|
28
|
-
atxpAuthClientToken: process.env.ATXP_AUTH_CLIENT_TOKEN,
|
|
29
|
-
allowHttp: process.env.NODE_ENV === 'development',
|
|
30
|
-
};
|
|
31
|
-
const withDefaults = { ...envDefaults, ...args };
|
|
32
|
-
const oAuthDb = withDefaults.oAuthDb ?? new MemoryOAuthDb();
|
|
33
|
-
const oAuthClient = withDefaults.oAuthClient ?? new OAuthResourceClient({
|
|
34
|
-
db: oAuthDb,
|
|
35
|
-
allowInsecureRequests: withDefaults.allowHttp,
|
|
36
|
-
clientName: withDefaults.payeeName,
|
|
37
|
-
});
|
|
38
|
-
const logger = withDefaults.logger ?? new ConsoleLogger();
|
|
39
|
-
const paymentServer = withDefaults.paymentServer ?? new ATXPPaymentServer(withDefaults.server, logger);
|
|
40
|
-
const built = { oAuthDb, oAuthClient, paymentServer, logger };
|
|
41
|
-
return Object.freeze({ ...withDefaults, ...built });
|
|
42
|
-
}
|
|
43
|
-
function atxpServer(args) {
|
|
44
|
-
const config = buildServerConfig(args);
|
|
45
|
-
const router = Router();
|
|
46
|
-
// Regular middleware
|
|
47
|
-
const atxpMiddleware = async (req, res, next) => {
|
|
48
|
-
try {
|
|
49
|
-
const logger = config.logger; // Capture logger in closure
|
|
50
|
-
const requestUrl = new URL(req.url, req.protocol + '://' + req.host);
|
|
51
|
-
logger.debug(`Handling ${req.method} ${requestUrl.toString()}`);
|
|
52
|
-
const resource = getResource(config, requestUrl);
|
|
53
|
-
const prmResponse = getProtectedResourceMetadata(config, requestUrl);
|
|
54
|
-
if (sendProtectedResourceMetadata(res, prmResponse)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
// Some older clients don't use PRM and assume the MCP server is an OAuth server
|
|
58
|
-
const oAuthMetadata = await getOAuthMetadata(config, requestUrl);
|
|
59
|
-
if (sendOAuthMetadata(res, oAuthMetadata)) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const mcpRequests = await parseMcpRequests(config, requestUrl, req, req.body);
|
|
63
|
-
logger.debug(`${mcpRequests.length} MCP requests found in request`);
|
|
64
|
-
if (mcpRequests.length === 0) {
|
|
65
|
-
next();
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
logger.debug(`Request started - ${req.method} ${req.path}`);
|
|
69
|
-
const tokenCheck = await checkToken(config, resource, req);
|
|
70
|
-
const user = tokenCheck.data?.sub ?? null;
|
|
71
|
-
// Listen for when the response is finished
|
|
72
|
-
res.on('finish', async () => {
|
|
73
|
-
logger.debug(`Request finished ${user ? `for user ${user} ` : ''}- ${req.method} ${req.path}`);
|
|
74
|
-
});
|
|
75
|
-
// Send the oauth challenge, if needed. If we do, we're done
|
|
76
|
-
if (sendOAuthChallenge(res, tokenCheck)) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
return withATXPContext(config, resource, tokenCheck, next);
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
config.logger.error(`Critical error in atxp middleware - returning HTTP 500. Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
83
|
-
config.logger.debug(JSON.stringify(error, null, 2));
|
|
84
|
-
res.status(500).json({ error: 'server_error', error_description: 'An internal server error occurred' });
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
// Add middleware to the router
|
|
88
|
-
router.use(atxpMiddleware);
|
|
89
|
-
return router;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export { DEFAULT_CONFIG, atxpServer, buildServerConfig };
|
|
93
|
-
//# sourceMappingURL=atxpServer.js.map
|
package/dist/atxpServer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atxpServer.js","sources":["../src/atxpServer.ts"],"sourcesContent":[null],"names":["getPRMResponse"],"mappings":";;;;;;;;;;;AAkBO,MAAM,cAAc,GAAkE;AAC3F,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,QAAQ,EAAE,MAAe;AACzB,IAAA,OAAO,EAAE,MAAe;AACxB,IAAA,MAAM,EAAE,4BAA4B;AACpC,IAAA,SAAS,EAAE,gBAAgB;IAC3B,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,IAAI;;AAGV,SAAU,iBAAiB,CAAC,IAAc,EAAA;AAC9C,IAAA,IAAG,CAAC,IAAI,CAAC,WAAW,EAAE;AACpB,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAC5C;;AAGA,IAAA,MAAM,WAAW,GAAG;AAClB,QAAA,GAAG,cAAc;AACjB,QAAA,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB;AACvD,QAAA,SAAS,EAAE,OAAO,CAAC,GAA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,YAAA,IAAI,kBAAkB,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;gBACvC;YACF;YAEA,OAAO,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC;QAC5D;QAAE,OAAO,KAAK,EAAE;YACd,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,kEAAkE,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA,CAAE,CAAC;AAC/I,YAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACnD,YAAA,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,mCAAmC,EAAE,CAAC;QACzG;AACF,IAAA,CAAC;;AAGD,IAAA,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;AAE1B,IAAA,OAAO,MAAM;AACf;;;;"}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { __module as bytes } from '../../_virtual/index2.js';
|
|
2
|
-
|
|
3
|
-
/*!
|
|
4
|
-
* bytes
|
|
5
|
-
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
6
|
-
* Copyright(c) 2015 Jed Watson
|
|
7
|
-
* MIT Licensed
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var hasRequiredBytes;
|
|
11
|
-
|
|
12
|
-
function requireBytes () {
|
|
13
|
-
if (hasRequiredBytes) return bytes.exports;
|
|
14
|
-
hasRequiredBytes = 1;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Module exports.
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
bytes.exports = bytes$1;
|
|
22
|
-
bytes.exports.format = format;
|
|
23
|
-
bytes.exports.parse = parse;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Module variables.
|
|
27
|
-
* @private
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
31
|
-
|
|
32
|
-
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
33
|
-
|
|
34
|
-
var map = {
|
|
35
|
-
b: 1,
|
|
36
|
-
kb: 1 << 10,
|
|
37
|
-
mb: 1 << 20,
|
|
38
|
-
gb: 1 << 30,
|
|
39
|
-
tb: Math.pow(1024, 4),
|
|
40
|
-
pb: Math.pow(1024, 5),
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Convert the given value in bytes into a string or parse to string to an integer in bytes.
|
|
47
|
-
*
|
|
48
|
-
* @param {string|number} value
|
|
49
|
-
* @param {{
|
|
50
|
-
* case: [string],
|
|
51
|
-
* decimalPlaces: [number]
|
|
52
|
-
* fixedDecimals: [boolean]
|
|
53
|
-
* thousandsSeparator: [string]
|
|
54
|
-
* unitSeparator: [string]
|
|
55
|
-
* }} [options] bytes options.
|
|
56
|
-
*
|
|
57
|
-
* @returns {string|number|null}
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
function bytes$1(value, options) {
|
|
61
|
-
if (typeof value === 'string') {
|
|
62
|
-
return parse(value);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (typeof value === 'number') {
|
|
66
|
-
return format(value, options);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Format the given value in bytes into a string.
|
|
74
|
-
*
|
|
75
|
-
* If the value is negative, it is kept as such. If it is a float,
|
|
76
|
-
* it is rounded.
|
|
77
|
-
*
|
|
78
|
-
* @param {number} value
|
|
79
|
-
* @param {object} [options]
|
|
80
|
-
* @param {number} [options.decimalPlaces=2]
|
|
81
|
-
* @param {number} [options.fixedDecimals=false]
|
|
82
|
-
* @param {string} [options.thousandsSeparator=]
|
|
83
|
-
* @param {string} [options.unit=]
|
|
84
|
-
* @param {string} [options.unitSeparator=]
|
|
85
|
-
*
|
|
86
|
-
* @returns {string|null}
|
|
87
|
-
* @public
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
function format(value, options) {
|
|
91
|
-
if (!Number.isFinite(value)) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var mag = Math.abs(value);
|
|
96
|
-
var thousandsSeparator = (options && options.thousandsSeparator) || '';
|
|
97
|
-
var unitSeparator = (options && options.unitSeparator) || '';
|
|
98
|
-
var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
|
|
99
|
-
var fixedDecimals = Boolean(options && options.fixedDecimals);
|
|
100
|
-
var unit = (options && options.unit) || '';
|
|
101
|
-
|
|
102
|
-
if (!unit || !map[unit.toLowerCase()]) {
|
|
103
|
-
if (mag >= map.pb) {
|
|
104
|
-
unit = 'PB';
|
|
105
|
-
} else if (mag >= map.tb) {
|
|
106
|
-
unit = 'TB';
|
|
107
|
-
} else if (mag >= map.gb) {
|
|
108
|
-
unit = 'GB';
|
|
109
|
-
} else if (mag >= map.mb) {
|
|
110
|
-
unit = 'MB';
|
|
111
|
-
} else if (mag >= map.kb) {
|
|
112
|
-
unit = 'KB';
|
|
113
|
-
} else {
|
|
114
|
-
unit = 'B';
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
var val = value / map[unit.toLowerCase()];
|
|
119
|
-
var str = val.toFixed(decimalPlaces);
|
|
120
|
-
|
|
121
|
-
if (!fixedDecimals) {
|
|
122
|
-
str = str.replace(formatDecimalsRegExp, '$1');
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (thousandsSeparator) {
|
|
126
|
-
str = str.split('.').map(function (s, i) {
|
|
127
|
-
return i === 0
|
|
128
|
-
? s.replace(formatThousandsRegExp, thousandsSeparator)
|
|
129
|
-
: s
|
|
130
|
-
}).join('.');
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return str + unitSeparator + unit;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Parse the string value into an integer in bytes.
|
|
138
|
-
*
|
|
139
|
-
* If no unit is given, it is assumed the value is in bytes.
|
|
140
|
-
*
|
|
141
|
-
* @param {number|string} val
|
|
142
|
-
*
|
|
143
|
-
* @returns {number|null}
|
|
144
|
-
* @public
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
function parse(val) {
|
|
148
|
-
if (typeof val === 'number' && !isNaN(val)) {
|
|
149
|
-
return val;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (typeof val !== 'string') {
|
|
153
|
-
return null;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Test if the string passed is valid
|
|
157
|
-
var results = parseRegExp.exec(val);
|
|
158
|
-
var floatValue;
|
|
159
|
-
var unit = 'b';
|
|
160
|
-
|
|
161
|
-
if (!results) {
|
|
162
|
-
// Nothing could be extracted from the given string
|
|
163
|
-
floatValue = parseInt(val, 10);
|
|
164
|
-
unit = 'b';
|
|
165
|
-
} else {
|
|
166
|
-
// Retrieve the value and the unit
|
|
167
|
-
floatValue = parseFloat(results[1]);
|
|
168
|
-
unit = results[4].toLowerCase();
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (isNaN(floatValue)) {
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return Math.floor(map[unit] * floatValue);
|
|
176
|
-
}
|
|
177
|
-
return bytes.exports;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export { requireBytes as __require };
|
|
181
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/bytes/index.js"],"sourcesContent":["/*!\n * bytes\n * Copyright(c) 2012-2014 TJ Holowaychuk\n * Copyright(c) 2015 Jed Watson\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = bytes;\nmodule.exports.format = format;\nmodule.exports.parse = parse;\n\n/**\n * Module variables.\n * @private\n */\n\nvar formatThousandsRegExp = /\\B(?=(\\d{3})+(?!\\d))/g;\n\nvar formatDecimalsRegExp = /(?:\\.0*|(\\.[^0]+)0+)$/;\n\nvar map = {\n b: 1,\n kb: 1 << 10,\n mb: 1 << 20,\n gb: 1 << 30,\n tb: Math.pow(1024, 4),\n pb: Math.pow(1024, 5),\n};\n\nvar parseRegExp = /^((-|\\+)?(\\d+(?:\\.\\d+)?)) *(kb|mb|gb|tb|pb)$/i;\n\n/**\n * Convert the given value in bytes into a string or parse to string to an integer in bytes.\n *\n * @param {string|number} value\n * @param {{\n * case: [string],\n * decimalPlaces: [number]\n * fixedDecimals: [boolean]\n * thousandsSeparator: [string]\n * unitSeparator: [string]\n * }} [options] bytes options.\n *\n * @returns {string|number|null}\n */\n\nfunction bytes(value, options) {\n if (typeof value === 'string') {\n return parse(value);\n }\n\n if (typeof value === 'number') {\n return format(value, options);\n }\n\n return null;\n}\n\n/**\n * Format the given value in bytes into a string.\n *\n * If the value is negative, it is kept as such. If it is a float,\n * it is rounded.\n *\n * @param {number} value\n * @param {object} [options]\n * @param {number} [options.decimalPlaces=2]\n * @param {number} [options.fixedDecimals=false]\n * @param {string} [options.thousandsSeparator=]\n * @param {string} [options.unit=]\n * @param {string} [options.unitSeparator=]\n *\n * @returns {string|null}\n * @public\n */\n\nfunction format(value, options) {\n if (!Number.isFinite(value)) {\n return null;\n }\n\n var mag = Math.abs(value);\n var thousandsSeparator = (options && options.thousandsSeparator) || '';\n var unitSeparator = (options && options.unitSeparator) || '';\n var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;\n var fixedDecimals = Boolean(options && options.fixedDecimals);\n var unit = (options && options.unit) || '';\n\n if (!unit || !map[unit.toLowerCase()]) {\n if (mag >= map.pb) {\n unit = 'PB';\n } else if (mag >= map.tb) {\n unit = 'TB';\n } else if (mag >= map.gb) {\n unit = 'GB';\n } else if (mag >= map.mb) {\n unit = 'MB';\n } else if (mag >= map.kb) {\n unit = 'KB';\n } else {\n unit = 'B';\n }\n }\n\n var val = value / map[unit.toLowerCase()];\n var str = val.toFixed(decimalPlaces);\n\n if (!fixedDecimals) {\n str = str.replace(formatDecimalsRegExp, '$1');\n }\n\n if (thousandsSeparator) {\n str = str.split('.').map(function (s, i) {\n return i === 0\n ? s.replace(formatThousandsRegExp, thousandsSeparator)\n : s\n }).join('.');\n }\n\n return str + unitSeparator + unit;\n}\n\n/**\n * Parse the string value into an integer in bytes.\n *\n * If no unit is given, it is assumed the value is in bytes.\n *\n * @param {number|string} val\n *\n * @returns {number|null}\n * @public\n */\n\nfunction parse(val) {\n if (typeof val === 'number' && !isNaN(val)) {\n return val;\n }\n\n if (typeof val !== 'string') {\n return null;\n }\n\n // Test if the string passed is valid\n var results = parseRegExp.exec(val);\n var floatValue;\n var unit = 'b';\n\n if (!results) {\n // Nothing could be extracted from the given string\n floatValue = parseInt(val, 10);\n unit = 'b'\n } else {\n // Retrieve the value and the unit\n floatValue = parseFloat(results[1]);\n unit = results[4].toLowerCase();\n }\n\n if (isNaN(floatValue)) {\n return null;\n }\n\n return Math.floor(map[unit] * floatValue);\n}\n"],"names":["bytesModule","bytes"],"mappings":";;;;;;;;;;;;;;;AASA;AACA;AACA;AACA;;AAEA,CAAAA,KAAA,CAAA,OAAc,GAAGC,OAAK;AACtB,CAAAD,KAAA,CAAA,OAAA,CAAA,MAAqB,GAAG,MAAM;AAC9B,CAAAA,KAAA,CAAA,OAAA,CAAA,KAAoB,GAAG,KAAK;;AAE5B;AACA;AACA;AACA;;CAEA,IAAI,qBAAqB,GAAG,uBAAuB;;CA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