quidproquo-webserver 0.1.14 → 0.1.16

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.
@@ -6,7 +6,17 @@ const QPQConfig_1 = require("../QPQConfig");
6
6
  const defineWebsocket = (apiSubdomain, rootDomain, eventProcessors, options) => {
7
7
  return {
8
8
  configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.WebSocket,
9
- uniqueKey: `${apiSubdomain}.${rootDomain}`,
9
+ // Deliberately domain-free. uniqueKey becomes the CDK construct id and therefore the
10
+ // CloudFormation LOGICAL id, but every physical resource this setting creates is named
11
+ // from app/service/environment only (e.g. the api-id SSM parameter
12
+ // `/qpq/websocket/api-id/<apiSubdomain>-<app>-<service>-<env>`). Including rootDomain
13
+ // meant renaming an app's domain renamed the logical id while the physical name stayed
14
+ // put, so CloudFormation tried to CREATE a second resource holding a name the old one
15
+ // still claimed — and it enforces name uniqueness within a stack at create time, before
16
+ // cleanup deletes the old. Result: an undeployable stack, recoverable only by removing
17
+ // the old logical resource in a separate update. apiSubdomain alone is unique per module
18
+ // (that is the granularity getOwnedWebsocketSettings materialises at).
19
+ uniqueKey: apiSubdomain,
10
20
  apiSubdomain,
11
21
  rootDomain,
12
22
  eventProcessors,
@@ -1 +1 @@
1
- {"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../../src/config/settings/websocket.ts"],"names":[],"mappings":";;;AAAA,qDAAkI;AAElI,4CAA6D;AA2CtD,MAAM,eAAe,GAAG,CAC7B,YAAoB,EACpB,UAAkB,EAClB,eAA4C,EAC5C,OAA4C,EACR,EAAE;IACtC,OAAO;QACL,iBAAiB,EAAE,yCAA6B,CAAC,SAAS;QAC1D,SAAS,EAAE,GAAG,YAAY,IAAI,UAAU,EAAE;QAE1C,YAAY;QACZ,UAAU;QAEV,eAAe;QAEf,WAAW;QACX,YAAY,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,KAAI,KAAK;QAC5C,OAAO,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,KAAK;QAElC,UAAU,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,KAAI,KAAK;QAExC,0BAA0B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B;QAE/D,uBAAuB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;QAEzD,KAAK,EAAE,8BAAY,CAAC,oDAAoD,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;KACzF,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,eAAe,mBA2B1B","sourcesContent":["import { CrossModuleOwner, QPQConfigAdvancedSettings, QPQConfigSetting, qpqCoreUtils, QpqFunctionRuntime } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport interface QpqWebSocketEventProcessors {\n onConnect?: QpqFunctionRuntime;\n onDisconnect?: QpqFunctionRuntime;\n onMessage?: QpqFunctionRuntime;\n\n // [type: string]: QpqSourceEntry;\n}\n\nexport interface QPQConfigAdvancedWebSocketSettings extends QPQConfigAdvancedSettings {\n onRootDomain?: boolean;\n apiName?: string;\n\n cloudflareApiKeySecretName?: string;\n\n // Cap (and guarantee) on this websocket api's concurrent event processing:\n // never throttled below it, never scales above it. One compute unit serves all\n // the api's event processors (connect/disconnect/message), so this bounds the\n // api as a whole. Free, but carved out of the deploy account's shared\n // concurrency pool.\n maxConcurrentExecutions?: number;\n\n owner?: CrossModuleOwner<'websocketApiName'>;\n}\n\nexport interface WebSocketQPQWebServerConfigSetting extends QPQConfigSetting {\n apiSubdomain: string;\n rootDomain: string;\n\n onRootDomain: boolean;\n\n apiName: string;\n\n eventProcessors: QpqWebSocketEventProcessors;\n\n deprecated: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n maxConcurrentExecutions?: number;\n}\n\nexport const defineWebsocket = (\n apiSubdomain: string,\n rootDomain: string,\n eventProcessors: QpqWebSocketEventProcessors,\n options?: QPQConfigAdvancedWebSocketSettings,\n): WebSocketQPQWebServerConfigSetting => {\n return {\n configSettingType: QPQWebServerConfigSettingType.WebSocket,\n uniqueKey: `${apiSubdomain}.${rootDomain}`,\n\n apiSubdomain,\n rootDomain,\n\n eventProcessors,\n\n // advanced\n onRootDomain: options?.onRootDomain || false,\n apiName: options?.apiName || 'api',\n\n deprecated: options?.deprecated || false,\n\n cloudflareApiKeySecretName: options?.cloudflareApiKeySecretName,\n\n maxConcurrentExecutions: options?.maxConcurrentExecutions,\n\n owner: qpqCoreUtils.convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n };\n};\n"]}
1
+ {"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../../src/config/settings/websocket.ts"],"names":[],"mappings":";;;AAAA,qDAAkI;AAElI,4CAA6D;AA2CtD,MAAM,eAAe,GAAG,CAC7B,YAAoB,EACpB,UAAkB,EAClB,eAA4C,EAC5C,OAA4C,EACR,EAAE;IACtC,OAAO;QACL,iBAAiB,EAAE,yCAA6B,CAAC,SAAS;QAC1D,qFAAqF;QACrF,uFAAuF;QACvF,mEAAmE;QACnE,sFAAsF;QACtF,uFAAuF;QACvF,sFAAsF;QACtF,wFAAwF;QACxF,uFAAuF;QACvF,yFAAyF;QACzF,uEAAuE;QACvE,SAAS,EAAE,YAAY;QAEvB,YAAY;QACZ,UAAU;QAEV,eAAe;QAEf,WAAW;QACX,YAAY,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,KAAI,KAAK;QAC5C,OAAO,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,KAAK;QAElC,UAAU,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,KAAI,KAAK;QAExC,0BAA0B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B;QAE/D,uBAAuB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;QAEzD,KAAK,EAAE,8BAAY,CAAC,oDAAoD,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;KACzF,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,eAAe,mBAqC1B","sourcesContent":["import { CrossModuleOwner, QPQConfigAdvancedSettings, QPQConfigSetting, qpqCoreUtils, QpqFunctionRuntime } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport interface QpqWebSocketEventProcessors {\n onConnect?: QpqFunctionRuntime;\n onDisconnect?: QpqFunctionRuntime;\n onMessage?: QpqFunctionRuntime;\n\n // [type: string]: QpqSourceEntry;\n}\n\nexport interface QPQConfigAdvancedWebSocketSettings extends QPQConfigAdvancedSettings {\n onRootDomain?: boolean;\n apiName?: string;\n\n cloudflareApiKeySecretName?: string;\n\n // Cap (and guarantee) on this websocket api's concurrent event processing:\n // never throttled below it, never scales above it. One compute unit serves all\n // the api's event processors (connect/disconnect/message), so this bounds the\n // api as a whole. Free, but carved out of the deploy account's shared\n // concurrency pool.\n maxConcurrentExecutions?: number;\n\n owner?: CrossModuleOwner<'websocketApiName'>;\n}\n\nexport interface WebSocketQPQWebServerConfigSetting extends QPQConfigSetting {\n apiSubdomain: string;\n rootDomain: string;\n\n onRootDomain: boolean;\n\n apiName: string;\n\n eventProcessors: QpqWebSocketEventProcessors;\n\n deprecated: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n maxConcurrentExecutions?: number;\n}\n\nexport const defineWebsocket = (\n apiSubdomain: string,\n rootDomain: string,\n eventProcessors: QpqWebSocketEventProcessors,\n options?: QPQConfigAdvancedWebSocketSettings,\n): WebSocketQPQWebServerConfigSetting => {\n return {\n configSettingType: QPQWebServerConfigSettingType.WebSocket,\n // Deliberately domain-free. uniqueKey becomes the CDK construct id and therefore the\n // CloudFormation LOGICAL id, but every physical resource this setting creates is named\n // from app/service/environment only (e.g. the api-id SSM parameter\n // `/qpq/websocket/api-id/<apiSubdomain>-<app>-<service>-<env>`). Including rootDomain\n // meant renaming an app's domain renamed the logical id while the physical name stayed\n // put, so CloudFormation tried to CREATE a second resource holding a name the old one\n // still claimed — and it enforces name uniqueness within a stack at create time, before\n // cleanup deletes the old. Result: an undeployable stack, recoverable only by removing\n // the old logical resource in a separate update. apiSubdomain alone is unique per module\n // (that is the granularity getOwnedWebsocketSettings materialises at).\n uniqueKey: apiSubdomain,\n\n apiSubdomain,\n rootDomain,\n\n eventProcessors,\n\n // advanced\n onRootDomain: options?.onRootDomain || false,\n apiName: options?.apiName || 'api',\n\n deprecated: options?.deprecated || false,\n\n cloudflareApiKeySecretName: options?.cloudflareApiKeySecretName,\n\n maxConcurrentExecutions: options?.maxConcurrentExecutions,\n\n owner: qpqCoreUtils.convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n };\n};\n"]}
@@ -3,7 +3,17 @@ import { QPQWebServerConfigSettingType } from '../QPQConfig';
3
3
  export const defineWebsocket = (apiSubdomain, rootDomain, eventProcessors, options) => {
4
4
  return {
5
5
  configSettingType: QPQWebServerConfigSettingType.WebSocket,
6
- uniqueKey: `${apiSubdomain}.${rootDomain}`,
6
+ // Deliberately domain-free. uniqueKey becomes the CDK construct id and therefore the
7
+ // CloudFormation LOGICAL id, but every physical resource this setting creates is named
8
+ // from app/service/environment only (e.g. the api-id SSM parameter
9
+ // `/qpq/websocket/api-id/<apiSubdomain>-<app>-<service>-<env>`). Including rootDomain
10
+ // meant renaming an app's domain renamed the logical id while the physical name stayed
11
+ // put, so CloudFormation tried to CREATE a second resource holding a name the old one
12
+ // still claimed — and it enforces name uniqueness within a stack at create time, before
13
+ // cleanup deletes the old. Result: an undeployable stack, recoverable only by removing
14
+ // the old logical resource in a separate update. apiSubdomain alone is unique per module
15
+ // (that is the granularity getOwnedWebsocketSettings materialises at).
16
+ uniqueKey: apiSubdomain,
7
17
  apiSubdomain,
8
18
  rootDomain,
9
19
  eventProcessors,
@@ -1 +1 @@
1
- {"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../../src/config/settings/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,YAAY,EAAsB,MAAM,iBAAiB,CAAC;AAElI,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AA2C7D,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,YAAoB,EACpB,UAAkB,EAClB,eAA4C,EAC5C,OAA4C,EACR,EAAE;IACtC,OAAO;QACL,iBAAiB,EAAE,6BAA6B,CAAC,SAAS;QAC1D,SAAS,EAAE,GAAG,YAAY,IAAI,UAAU,EAAE;QAE1C,YAAY;QACZ,UAAU;QAEV,eAAe;QAEf,WAAW;QACX,YAAY,EAAE,OAAO,EAAE,YAAY,IAAI,KAAK;QAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK;QAElC,UAAU,EAAE,OAAO,EAAE,UAAU,IAAI,KAAK;QAExC,0BAA0B,EAAE,OAAO,EAAE,0BAA0B;QAE/D,uBAAuB,EAAE,OAAO,EAAE,uBAAuB;QAEzD,KAAK,EAAE,YAAY,CAAC,oDAAoD,CAAC,OAAO,EAAE,KAAK,CAAC;KACzF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { CrossModuleOwner, QPQConfigAdvancedSettings, QPQConfigSetting, qpqCoreUtils, QpqFunctionRuntime } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport interface QpqWebSocketEventProcessors {\n onConnect?: QpqFunctionRuntime;\n onDisconnect?: QpqFunctionRuntime;\n onMessage?: QpqFunctionRuntime;\n\n // [type: string]: QpqSourceEntry;\n}\n\nexport interface QPQConfigAdvancedWebSocketSettings extends QPQConfigAdvancedSettings {\n onRootDomain?: boolean;\n apiName?: string;\n\n cloudflareApiKeySecretName?: string;\n\n // Cap (and guarantee) on this websocket api's concurrent event processing:\n // never throttled below it, never scales above it. One compute unit serves all\n // the api's event processors (connect/disconnect/message), so this bounds the\n // api as a whole. Free, but carved out of the deploy account's shared\n // concurrency pool.\n maxConcurrentExecutions?: number;\n\n owner?: CrossModuleOwner<'websocketApiName'>;\n}\n\nexport interface WebSocketQPQWebServerConfigSetting extends QPQConfigSetting {\n apiSubdomain: string;\n rootDomain: string;\n\n onRootDomain: boolean;\n\n apiName: string;\n\n eventProcessors: QpqWebSocketEventProcessors;\n\n deprecated: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n maxConcurrentExecutions?: number;\n}\n\nexport const defineWebsocket = (\n apiSubdomain: string,\n rootDomain: string,\n eventProcessors: QpqWebSocketEventProcessors,\n options?: QPQConfigAdvancedWebSocketSettings,\n): WebSocketQPQWebServerConfigSetting => {\n return {\n configSettingType: QPQWebServerConfigSettingType.WebSocket,\n uniqueKey: `${apiSubdomain}.${rootDomain}`,\n\n apiSubdomain,\n rootDomain,\n\n eventProcessors,\n\n // advanced\n onRootDomain: options?.onRootDomain || false,\n apiName: options?.apiName || 'api',\n\n deprecated: options?.deprecated || false,\n\n cloudflareApiKeySecretName: options?.cloudflareApiKeySecretName,\n\n maxConcurrentExecutions: options?.maxConcurrentExecutions,\n\n owner: qpqCoreUtils.convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n };\n};\n"]}
1
+ {"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../../src/config/settings/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,YAAY,EAAsB,MAAM,iBAAiB,CAAC;AAElI,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AA2C7D,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,YAAoB,EACpB,UAAkB,EAClB,eAA4C,EAC5C,OAA4C,EACR,EAAE;IACtC,OAAO;QACL,iBAAiB,EAAE,6BAA6B,CAAC,SAAS;QAC1D,qFAAqF;QACrF,uFAAuF;QACvF,mEAAmE;QACnE,sFAAsF;QACtF,uFAAuF;QACvF,sFAAsF;QACtF,wFAAwF;QACxF,uFAAuF;QACvF,yFAAyF;QACzF,uEAAuE;QACvE,SAAS,EAAE,YAAY;QAEvB,YAAY;QACZ,UAAU;QAEV,eAAe;QAEf,WAAW;QACX,YAAY,EAAE,OAAO,EAAE,YAAY,IAAI,KAAK;QAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK;QAElC,UAAU,EAAE,OAAO,EAAE,UAAU,IAAI,KAAK;QAExC,0BAA0B,EAAE,OAAO,EAAE,0BAA0B;QAE/D,uBAAuB,EAAE,OAAO,EAAE,uBAAuB;QAEzD,KAAK,EAAE,YAAY,CAAC,oDAAoD,CAAC,OAAO,EAAE,KAAK,CAAC;KACzF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { CrossModuleOwner, QPQConfigAdvancedSettings, QPQConfigSetting, qpqCoreUtils, QpqFunctionRuntime } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport interface QpqWebSocketEventProcessors {\n onConnect?: QpqFunctionRuntime;\n onDisconnect?: QpqFunctionRuntime;\n onMessage?: QpqFunctionRuntime;\n\n // [type: string]: QpqSourceEntry;\n}\n\nexport interface QPQConfigAdvancedWebSocketSettings extends QPQConfigAdvancedSettings {\n onRootDomain?: boolean;\n apiName?: string;\n\n cloudflareApiKeySecretName?: string;\n\n // Cap (and guarantee) on this websocket api's concurrent event processing:\n // never throttled below it, never scales above it. One compute unit serves all\n // the api's event processors (connect/disconnect/message), so this bounds the\n // api as a whole. Free, but carved out of the deploy account's shared\n // concurrency pool.\n maxConcurrentExecutions?: number;\n\n owner?: CrossModuleOwner<'websocketApiName'>;\n}\n\nexport interface WebSocketQPQWebServerConfigSetting extends QPQConfigSetting {\n apiSubdomain: string;\n rootDomain: string;\n\n onRootDomain: boolean;\n\n apiName: string;\n\n eventProcessors: QpqWebSocketEventProcessors;\n\n deprecated: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n maxConcurrentExecutions?: number;\n}\n\nexport const defineWebsocket = (\n apiSubdomain: string,\n rootDomain: string,\n eventProcessors: QpqWebSocketEventProcessors,\n options?: QPQConfigAdvancedWebSocketSettings,\n): WebSocketQPQWebServerConfigSetting => {\n return {\n configSettingType: QPQWebServerConfigSettingType.WebSocket,\n // Deliberately domain-free. uniqueKey becomes the CDK construct id and therefore the\n // CloudFormation LOGICAL id, but every physical resource this setting creates is named\n // from app/service/environment only (e.g. the api-id SSM parameter\n // `/qpq/websocket/api-id/<apiSubdomain>-<app>-<service>-<env>`). Including rootDomain\n // meant renaming an app's domain renamed the logical id while the physical name stayed\n // put, so CloudFormation tried to CREATE a second resource holding a name the old one\n // still claimed — and it enforces name uniqueness within a stack at create time, before\n // cleanup deletes the old. Result: an undeployable stack, recoverable only by removing\n // the old logical resource in a separate update. apiSubdomain alone is unique per module\n // (that is the granularity getOwnedWebsocketSettings materialises at).\n uniqueKey: apiSubdomain,\n\n apiSubdomain,\n rootDomain,\n\n eventProcessors,\n\n // advanced\n onRootDomain: options?.onRootDomain || false,\n apiName: options?.apiName || 'api',\n\n deprecated: options?.deprecated || false,\n\n cloudflareApiKeySecretName: options?.cloudflareApiKeySecretName,\n\n maxConcurrentExecutions: options?.maxConcurrentExecutions,\n\n owner: qpqCoreUtils.convertCrossModuleOwnerToGenericResourceNameOverride(options?.owner),\n };\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-webserver",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -33,10 +33,10 @@
33
33
  "homepage": "https://github.com/joe-coady/quidproquo#readme",
34
34
  "dependencies": {
35
35
  "@anthropic-ai/sdk": "^0.19.1",
36
- "quidproquo-core": "0.1.14"
36
+ "quidproquo-core": "0.1.16"
37
37
  },
38
38
  "devDependencies": {
39
- "quidproquo-tsconfig": "0.1.14",
39
+ "quidproquo-tsconfig": "0.1.16",
40
40
  "typescript": "^5.8.2"
41
41
  }
42
42
  }