Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

quidproquo-webserver

Package Overview
Dependencies
Maintainers
0
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quidproquo-webserver - npm Package Compare versions

Comparing version 0.0.208 to 0.0.209

lib/commonjs/config/settings/adminUserDirectory.d.ts

1

lib/commonjs/config/settings/index.d.ts

@@ -0,1 +1,2 @@

export * from './adminUserDirectory';
export * from './api';

@@ -2,0 +3,0 @@ export * from './apiKey';

@@ -17,2 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./adminUserDirectory"), exports);
__exportStar(require("./api"), exports);

@@ -19,0 +20,0 @@ __exportStar(require("./apiKey"), exports);

2

lib/commonjs/config/settings/logs.d.ts

@@ -7,6 +7,6 @@ import { QPQConfig, QPQConfigAdvancedSettings } from 'quidproquo-core';

claudeAiApiKeySecretName?: string;
federationManifestUrl?: string;
}
export declare const logReportsResourceName = "qpq-log-reports";
export declare const wsConnectionResourceName = "qpq-admin-connections";
export declare const adminUserDirectory = "qpq-admin";
export declare const defineLogs: (buildPath: string, webFilesPath: string, rootDomain: string, hostService: string, services: string[], advancedSettings?: QPQConfigAdvancedLogSettings) => QPQConfig;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defineLogs = exports.adminUserDirectory = exports.wsConnectionResourceName = exports.logReportsResourceName = void 0;
exports.defineLogs = exports.wsConnectionResourceName = exports.logReportsResourceName = void 0;
const quidproquo_core_1 = require("quidproquo-core");

@@ -8,2 +8,17 @@ const route_1 = require("./route");

const websocket_1 = require("./websocket");
const adminUserDirectory_1 = require("./adminUserDirectory");
function getBaseUrl(url) {
if (!url) {
return '';
}
// Use a URL object to parse the URL
const parsedUrl = new URL(url);
// Remove the last segment of the pathname
const segments = parsedUrl.pathname.split('/');
segments.pop();
// Update the pathname of the parsed URL
parsedUrl.pathname = segments.join('/');
// Return the updated URL
return parsedUrl.origin + parsedUrl.pathname;
}
// NEVER EVER CHANGE THIS NAME

@@ -17,7 +32,6 @@ // if you do, you might get logs generated from the logging service

exports.wsConnectionResourceName = 'qpq-admin-connections';
exports.adminUserDirectory = 'qpq-admin';
const defineLogs = (buildPath, webFilesPath, rootDomain, hostService, services, advancedSettings) => {
const routeAuthSettings = {
routeAuthSettings: {
userDirectoryName: exports.adminUserDirectory,
userDirectoryName: adminUserDirectory_1.adminUserDirectoryResourceName,
},

@@ -39,5 +53,7 @@ };

: undefined;
const qpqFederationManifestUrl = (advancedSettings === null || advancedSettings === void 0 ? void 0 : advancedSettings.federationManifestUrl) || '';
const configs = [
(0, quidproquo_core_1.defineGlobal)('qpq-serviceNames', services),
(0, quidproquo_core_1.defineGlobal)('qpq-log-retention-days', logRetentionDays),
(0, quidproquo_core_1.defineGlobal)('qpq-federationManifestUrl', (advancedSettings === null || advancedSettings === void 0 ? void 0 : advancedSettings.federationManifestUrl) || ''),
(0, quidproquo_core_1.defineStorageDrive)(logResourceName, {

@@ -86,3 +102,2 @@ onEvent: {

}),
(0, quidproquo_core_1.defineUserDirectory)(exports.adminUserDirectory, buildPath),
(0, route_1.defineRoute)('POST', '/login', (0, quidproquo_core_1.getServiceEntry)('log', 'controller', 'loginController'), 'login'),

@@ -92,2 +107,3 @@ (0, route_1.defineRoute)('POST', '/refreshToken', (0, quidproquo_core_1.getServiceEntry)('log', 'controller', 'loginController'), 'refreshToken'),

(0, route_1.defineRoute)('GET', '/admin/services', (0, quidproquo_core_1.getServiceEntry)('log', 'controller', 'logController'), 'getServiceNames'),
(0, route_1.defineRoute)('GET', '/admin/fmurl', (0, quidproquo_core_1.getServiceEntry)('log', 'controller', 'logController'), 'getManifestUrl'),
(0, route_1.defineRoute)('POST', '/log/list', (0, quidproquo_core_1.getServiceEntry)('log', 'controller', 'logController'), 'getLogs', routeAuthSettings),

@@ -127,3 +143,3 @@ (0, route_1.defineRoute)('GET', '/log/{correlationId}', (0, quidproquo_core_1.getServiceEntry)('log', 'controller', 'logController'), 'getLog', routeAuthSettings),

},
ignoreCache: ['index.html', 'index.js'],
ignoreCache: ['index.html', 'index.js', 'remoteEntry.js', 'mf-manifest.json'],
cloudflareApiKeySecretName: advancedSettings === null || advancedSettings === void 0 ? void 0 : advancedSettings.cloudflareApiKeySecretName,

@@ -141,2 +157,3 @@ securityHeaders: {

{ protocol: 'wss', api: 'wsadmin', service: hostService },
getBaseUrl(qpqFederationManifestUrl),
],

@@ -148,3 +165,5 @@ 'style-src': [

'script-src': [
"'self'", // For scripts from the same domain
"'self'",
// "'unsafe-eval'", // Allow eval() for webpack DONT DO THIS.
getBaseUrl(qpqFederationManifestUrl),
],

@@ -151,0 +170,0 @@ },

@@ -23,2 +23,3 @@ import { QpqRuntimeType, AskResponse } from 'quidproquo-core';

export declare function getServiceNames(event: HTTPEvent): Generator<import("quidproquo-core").ConfigGetGlobalAction, HTTPEventResponse, unknown>;
export declare function getManifestUrl(event: HTTPEvent): Generator<import("quidproquo-core").ConfigGetGlobalAction, HTTPEventResponse, unknown>;
export declare function getHierarchies(event: HTTPEvent, params: {

@@ -25,0 +26,0 @@ correlationId: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChatMessages = exports.sendChatMessage = exports.downloadUrl = exports.getChildren = exports.getHierarchies = exports.getServiceNames = exports.toggleLogCheck = exports.getLog = exports.getLogs = void 0;
exports.getChatMessages = exports.sendChatMessage = exports.downloadUrl = exports.getChildren = exports.getHierarchies = exports.getManifestUrl = exports.getServiceNames = exports.toggleLogCheck = exports.getLog = exports.getLogs = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars */

@@ -36,2 +36,7 @@ const quidproquo_core_1 = require("quidproquo-core");

exports.getServiceNames = getServiceNames;
function* getManifestUrl(event) {
const manifestUrl = yield* (0, quidproquo_core_1.askConfigGetGlobal)('qpq-federationManifestUrl');
return (0, httpEventUtils_1.toJsonEventResponse)(manifestUrl);
}
exports.getManifestUrl = getManifestUrl;
function* getHierarchies(event, params) {

@@ -38,0 +43,0 @@ const reportUrl = yield* (0, logMetadataData_1.askGetHierarchiesByCorrelation)(params.correlationId, event.query.refresh === 'true');

@@ -15,3 +15,3 @@ "use strict";

if (connection) {
const decodedAccessToken = yield* (0, quidproquo_core_1.askUserDirectoryDecodeAccessToken)(config_1.adminUserDirectory, false, accessToken);
const decodedAccessToken = yield* (0, quidproquo_core_1.askUserDirectoryDecodeAccessToken)(config_1.adminUserDirectoryResourceName, false, accessToken);
yield* data_1.websocketConnectionData.askUpsert(Object.assign(Object.assign({}, connection), { userId: decodedAccessToken.userId, accessToken }));

@@ -18,0 +18,0 @@ // yield* askUserDirectorySetAccessToken(accessToken);

@@ -0,1 +1,2 @@

export * from './adminUserDirectory';
export * from './api';

@@ -2,0 +3,0 @@ export * from './apiKey';

@@ -0,1 +1,2 @@

export * from './adminUserDirectory';
export * from './api';

@@ -2,0 +3,0 @@ export * from './apiKey';

@@ -7,6 +7,6 @@ import { QPQConfig, QPQConfigAdvancedSettings } from 'quidproquo-core';

claudeAiApiKeySecretName?: string;
federationManifestUrl?: string;
}
export declare const logReportsResourceName = "qpq-log-reports";
export declare const wsConnectionResourceName = "qpq-admin-connections";
export declare const adminUserDirectory = "qpq-admin";
export declare const defineLogs: (buildPath: string, webFilesPath: string, rootDomain: string, hostService: string, services: string[], advancedSettings?: QPQConfigAdvancedLogSettings) => QPQConfig;

@@ -1,5 +0,20 @@

import { StorageDriveTier, defineGlobal, defineKeyValueStore, defineStorageDrive, defineUserDirectory, getServiceEntry, } from 'quidproquo-core';
import { StorageDriveTier, defineGlobal, defineKeyValueStore, defineStorageDrive, getServiceEntry, } from 'quidproquo-core';
import { defineRoute } from './route';
import { defineWebEntry } from './webEntry';
import { defineWebsocket } from './websocket';
import { adminUserDirectoryResourceName } from './adminUserDirectory';
function getBaseUrl(url) {
if (!url) {
return '';
}
// Use a URL object to parse the URL
const parsedUrl = new URL(url);
// Remove the last segment of the pathname
const segments = parsedUrl.pathname.split('/');
segments.pop();
// Update the pathname of the parsed URL
parsedUrl.pathname = segments.join('/');
// Return the updated URL
return parsedUrl.origin + parsedUrl.pathname;
}
// NEVER EVER CHANGE THIS NAME

@@ -13,7 +28,6 @@ // if you do, you might get logs generated from the logging service

export const wsConnectionResourceName = 'qpq-admin-connections';
export const adminUserDirectory = 'qpq-admin';
export const defineLogs = (buildPath, webFilesPath, rootDomain, hostService, services, advancedSettings) => {
const routeAuthSettings = {
routeAuthSettings: {
userDirectoryName: adminUserDirectory,
userDirectoryName: adminUserDirectoryResourceName,
},

@@ -35,5 +49,7 @@ };

: undefined;
const qpqFederationManifestUrl = advancedSettings?.federationManifestUrl || '';
const configs = [
defineGlobal('qpq-serviceNames', services),
defineGlobal('qpq-log-retention-days', logRetentionDays),
defineGlobal('qpq-federationManifestUrl', advancedSettings?.federationManifestUrl || ''),
defineStorageDrive(logResourceName, {

@@ -82,3 +98,2 @@ onEvent: {

}),
defineUserDirectory(adminUserDirectory, buildPath),
defineRoute('POST', '/login', getServiceEntry('log', 'controller', 'loginController'), 'login'),

@@ -88,2 +103,3 @@ defineRoute('POST', '/refreshToken', getServiceEntry('log', 'controller', 'loginController'), 'refreshToken'),

defineRoute('GET', '/admin/services', getServiceEntry('log', 'controller', 'logController'), 'getServiceNames'),
defineRoute('GET', '/admin/fmurl', getServiceEntry('log', 'controller', 'logController'), 'getManifestUrl'),
defineRoute('POST', '/log/list', getServiceEntry('log', 'controller', 'logController'), 'getLogs', routeAuthSettings),

@@ -123,3 +139,3 @@ defineRoute('GET', '/log/{correlationId}', getServiceEntry('log', 'controller', 'logController'), 'getLog', routeAuthSettings),

},
ignoreCache: ['index.html', 'index.js'],
ignoreCache: ['index.html', 'index.js', 'remoteEntry.js', 'mf-manifest.json'],
cloudflareApiKeySecretName: advancedSettings?.cloudflareApiKeySecretName,

@@ -137,2 +153,3 @@ securityHeaders: {

{ protocol: 'wss', api: 'wsadmin', service: hostService },
getBaseUrl(qpqFederationManifestUrl),
],

@@ -144,3 +161,5 @@ 'style-src': [

'script-src': [
"'self'", // For scripts from the same domain
"'self'",
// "'unsafe-eval'", // Allow eval() for webpack DONT DO THIS.
getBaseUrl(qpqFederationManifestUrl),
],

@@ -147,0 +166,0 @@ },

@@ -23,2 +23,3 @@ import { QpqRuntimeType, AskResponse } from 'quidproquo-core';

export declare function getServiceNames(event: HTTPEvent): Generator<import("quidproquo-core").ConfigGetGlobalAction, HTTPEventResponse, unknown>;
export declare function getManifestUrl(event: HTTPEvent): Generator<import("quidproquo-core").ConfigGetGlobalAction, HTTPEventResponse, unknown>;
export declare function getHierarchies(event: HTTPEvent, params: {

@@ -25,0 +26,0 @@ correlationId: string;

@@ -29,2 +29,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */

}
export function* getManifestUrl(event) {
const manifestUrl = yield* askConfigGetGlobal('qpq-federationManifestUrl');
return toJsonEventResponse(manifestUrl);
}
export function* getHierarchies(event, params) {

@@ -31,0 +35,0 @@ const reportUrl = yield* askGetHierarchiesByCorrelation(params.correlationId, event.query.refresh === 'true');

import { askUserDirectoryDecodeAccessToken } from 'quidproquo-core';
import { websocketConnectionData } from '../../../data';
import { adminUserDirectory } from '../../../../../config';
import { WebsocketClientMessageEventType, } from '../../../../../types';
import { adminUserDirectoryResourceName } from '../../../../../config';
import { WebsocketClientMessageEventType } from '../../../../../types';
export function isWebSocketAuthenticateMessage(event) {

@@ -11,3 +11,3 @@ return event.type === WebsocketClientMessageEventType.Authenticate;

if (connection) {
const decodedAccessToken = yield* askUserDirectoryDecodeAccessToken(adminUserDirectory, false, accessToken);
const decodedAccessToken = yield* askUserDirectoryDecodeAccessToken(adminUserDirectoryResourceName, false, accessToken);
yield* websocketConnectionData.askUpsert({

@@ -14,0 +14,0 @@ ...connection,

{
"name": "quidproquo-webserver",
"version": "0.0.208",
"version": "0.0.209",
"description": "",

@@ -33,8 +33,8 @@ "main": "./lib/commonjs/index.js",

"@anthropic-ai/sdk": "^0.19.1",
"quidproquo-core": "0.0.208"
"quidproquo-core": "0.0.209"
},
"devDependencies": {
"quidproquo-tsconfig": "0.0.208",
"quidproquo-tsconfig": "0.0.209",
"typescript": "^4.9.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc