@webiny/api-event-handler-standalone-sql 6.6.0-alpha.4 → 6.6.0-alpha.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"createWebinyApiHandler.js","sources":["../src/createWebinyApiHandler.ts"],"sourcesContent":["/**\n * Webiny API handler for the standalone Node server transport with SQL storage.\n *\n * Thin variant over the transport base (@webiny/api-event-handler-standalone): supplies the SQL storage\n * wiring AND the self-hosted identity provider (JWT IdP + SQL credential storage). CMS, core, and\n * websockets storage are DI Features registered directly on the container. ACO and audit-logs\n * remain legacy RegisterExtensionPlugins applied via `registerExtensions`.\n *\n * The caller supplies the Knex client (there is no single canonical connection for a standalone DB).\n * The JWT signing secret is configured via `<SelfHostedAuth signingSecret>` (BuildParams).\n */\nimport type { Knex } from \"knex\";\nimport { registerExtensions } from \"@webiny/handler\";\nimport {\n createWebinyApiHandler as createBaseHandler,\n type CreateWebinyApiHandlerConfig as BaseConfig\n} from \"@webiny/api-event-handler-standalone\";\nimport { ApiCoreSqlFeature, registerSQLCore } from \"@webiny/api-core-sql\";\nimport { HeadlessCmsSqlFeature } from \"@webiny/api-headless-cms-sql\";\nimport { registerAcoSqlStorageOperations } from \"@webiny/api-aco-sql\";\nimport { registerAuditLogsSqlStorageOperations } from \"@webiny/api-audit-logs-sql\";\nimport { WebsocketsSqlFeature } from \"@webiny/api-websockets-sql\";\nimport { SelfHostedAuthApiFeature } from \"@webiny/self-hosted-auth\";\nimport { SelfHostedAuthSqlFeature } from \"@webiny/self-hosted-auth-sql\";\n\nexport type CreateSqlApiHandlerConfig = Pick<BaseConfig, \"extensions\"> & {\n /**\n * Knex client for the SQL database. Required — the caller owns the connection (there is no single\n * canonical standalone DB connection to default to).\n */\n knex: Knex;\n /**\n * Optional table-name prefix, threaded to every SQL storage operation.\n */\n tableNamePrefix?: string;\n};\n\nexport function createSqlApiHandler(config: CreateSqlApiHandlerConfig) {\n const { knex, tableNamePrefix } = config;\n\n return createBaseHandler({\n extensions: config.extensions,\n registerRootStorage: async container => {\n // Clean DI Features: SQL core storage-ops factory + websockets storage.\n ApiCoreSqlFeature.register(container, { knex, tableNamePrefix });\n WebsocketsSqlFeature.register(container, { tableNamePrefix });\n\n // Identity provider: the self-hosted JWT IdP + its SQL credential storage. Registered in\n // the root so the RequestIdentityLoader (driven by NodeHttpIdentityLoaderDecorator) can\n // resolve it. SelfHostedAuthSqlFeature supplies CredentialsStorageOperations over Knex.\n SelfHostedAuthSqlFeature.register(container, { knex, tableNamePrefix });\n // The JWT signing secret comes from <SelfHostedAuth signingSecret> (BuildParams).\n SelfHostedAuthApiFeature.register(container);\n\n HeadlessCmsSqlFeature.register(container, { knex, tableNamePrefix });\n\n await registerExtensions(container, [\n registerSQLCore({ knex }),\n registerAcoSqlStorageOperations({ knex, tableNamePrefix }),\n registerAuditLogsSqlStorageOperations({ knex, tableNamePrefix })\n ]);\n }\n });\n}\n"],"names":["createSqlApiHandler","config","knex","tableNamePrefix","createBaseHandler","container","ApiCoreSqlFeature","WebsocketsSqlFeature","SelfHostedAuthSqlFeature","SelfHostedAuthApiFeature","HeadlessCmsSqlFeature","registerExtensions","registerSQLCore","registerAcoSqlStorageOperations","registerAuditLogsSqlStorageOperations"],"mappings":";;;;;;;;;AAqCO,SAASA,oBAAoBC,MAAiC;IACjE,MAAM,EAAEC,IAAI,EAAEC,eAAe,EAAE,GAAGF;IAElC,OAAOG,uBAAkB;QACrB,YAAYH,OAAO,UAAU;QAC7B,qBAAqB,OAAMI;YAEvBC,kBAAkB,QAAQ,CAACD,WAAW;gBAAEH;gBAAMC;YAAgB;YAC9DI,qBAAqB,QAAQ,CAACF,WAAW;gBAAEF;YAAgB;YAK3DK,yBAAyB,QAAQ,CAACH,WAAW;gBAAEH;gBAAMC;YAAgB;YAErEM,yBAAyB,QAAQ,CAACJ;YAElCK,sBAAsB,QAAQ,CAACL,WAAW;gBAAEH;gBAAMC;YAAgB;YAElE,MAAMQ,mBAAmBN,WAAW;gBAChCO,gBAAgB;oBAAEV;gBAAK;gBACvBW,gCAAgC;oBAAEX;oBAAMC;gBAAgB;gBACxDW,sCAAsC;oBAAEZ;oBAAMC;gBAAgB;aACjE;QACL;IACJ;AACJ"}
1
+ {"version":3,"file":"createWebinyApiHandler.js","sources":["../src/createWebinyApiHandler.ts"],"sourcesContent":["/**\n * Webiny API handler for the standalone Node server transport with SQL storage.\n *\n * Thin variant over the transport base (@webiny/api-event-handler-standalone): supplies the SQL storage\n * wiring AND the self-hosted identity provider (JWT IdP + SQL credential storage). CMS, core, and\n * websockets storage are DI Features registered directly on the container. ACO and audit-logs\n * remain legacy RegisterExtensionPlugins applied via `registerExtensions`.\n *\n * The caller supplies the Knex client (there is no single canonical connection for a standalone DB).\n * The JWT signing secret is configured via `<SelfHostedAuth signingSecret>` (BuildParams).\n */\nimport type { Knex } from \"knex\";\nimport { registerExtensions } from \"@webiny/handler\";\nimport {\n createWebinyApiHandler as createBaseHandler,\n type CreateWebinyApiHandlerConfig as BaseConfig\n} from \"@webiny/api-event-handler-standalone\";\nimport { ApiCoreSqlFeature, registerSQLCore } from \"@webiny/api-core-sql\";\nimport { HeadlessCmsSqlFeature } from \"@webiny/api-headless-cms-sql\";\nimport { registerAcoSqlStorageOperations } from \"@webiny/api-aco-sql\";\nimport { registerAuditLogsSqlStorageOperations } from \"@webiny/api-audit-logs-sql\";\nimport { WebsocketsSqlFeature } from \"@webiny/api-websockets-sql\";\nimport { SelfHostedAuthApiFeature } from \"@webiny/self-hosted-auth\";\nimport { SelfHostedAuthSqlFeature } from \"@webiny/self-hosted-auth-sql\";\n\nexport type CreateSqlApiHandlerConfig = Pick<BaseConfig, \"extensions\"> & {\n /**\n * Knex client for the SQL database. Required — the caller owns the connection (there is no single\n * canonical standalone DB connection to default to).\n */\n knex: Knex;\n /**\n * Optional table-name prefix, threaded to every SQL storage operation.\n */\n tableNamePrefix?: string;\n};\n\nexport function createSqlApiHandler(config: CreateSqlApiHandlerConfig) {\n const { knex, tableNamePrefix } = config;\n\n return createBaseHandler({\n extensions: config.extensions,\n registerRootStorage: async container => {\n // Clean DI Features: SQL core storage-ops factory + websockets storage.\n ApiCoreSqlFeature.register(container, { knex, tableNamePrefix });\n WebsocketsSqlFeature.register(container, { tableNamePrefix });\n\n // Identity provider: the self-hosted JWT IdP + its SQL credential storage. Registered in\n // the root so the RequestIdentityLoader (driven by NodeHttpIdentityLoaderDecorator) can\n // resolve it. SelfHostedAuthSqlFeature supplies the credential storage operations over Knex.\n SelfHostedAuthSqlFeature.register(container, { knex, tableNamePrefix });\n // The JWT signing secret comes from <SelfHostedAuth signingSecret> (BuildParams).\n SelfHostedAuthApiFeature.register(container);\n\n HeadlessCmsSqlFeature.register(container, { knex, tableNamePrefix });\n\n await registerExtensions(container, [\n registerSQLCore({ knex }),\n registerAcoSqlStorageOperations({ knex, tableNamePrefix }),\n registerAuditLogsSqlStorageOperations({ knex, tableNamePrefix })\n ]);\n }\n });\n}\n"],"names":["createSqlApiHandler","config","knex","tableNamePrefix","createBaseHandler","container","ApiCoreSqlFeature","WebsocketsSqlFeature","SelfHostedAuthSqlFeature","SelfHostedAuthApiFeature","HeadlessCmsSqlFeature","registerExtensions","registerSQLCore","registerAcoSqlStorageOperations","registerAuditLogsSqlStorageOperations"],"mappings":";;;;;;;;;AAqCO,SAASA,oBAAoBC,MAAiC;IACjE,MAAM,EAAEC,IAAI,EAAEC,eAAe,EAAE,GAAGF;IAElC,OAAOG,uBAAkB;QACrB,YAAYH,OAAO,UAAU;QAC7B,qBAAqB,OAAMI;YAEvBC,kBAAkB,QAAQ,CAACD,WAAW;gBAAEH;gBAAMC;YAAgB;YAC9DI,qBAAqB,QAAQ,CAACF,WAAW;gBAAEF;YAAgB;YAK3DK,yBAAyB,QAAQ,CAACH,WAAW;gBAAEH;gBAAMC;YAAgB;YAErEM,yBAAyB,QAAQ,CAACJ;YAElCK,sBAAsB,QAAQ,CAACL,WAAW;gBAAEH;gBAAMC;YAAgB;YAElE,MAAMQ,mBAAmBN,WAAW;gBAChCO,gBAAgB;oBAAEV;gBAAK;gBACvBW,gCAAgC;oBAAEX;oBAAMC;gBAAgB;gBACxDW,sCAAsC;oBAAEZ;oBAAMC;gBAAgB;aACjE;QACL;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-event-handler-standalone-sql",
3
- "version": "6.6.0-alpha.4",
3
+ "version": "6.6.0-alpha.6",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -18,22 +18,22 @@
18
18
  ],
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@webiny/api-aco-sql": "6.6.0-alpha.4",
22
- "@webiny/api-audit-logs-sql": "6.6.0-alpha.4",
23
- "@webiny/api-core-sql": "6.6.0-alpha.4",
24
- "@webiny/api-event-handler-standalone": "6.6.0-alpha.4",
25
- "@webiny/api-headless-cms-sql": "6.6.0-alpha.4",
26
- "@webiny/api-websockets-sql": "6.6.0-alpha.4",
27
- "@webiny/handler": "6.6.0-alpha.4",
28
- "@webiny/self-hosted-auth": "6.6.0-alpha.4",
29
- "@webiny/self-hosted-auth-sql": "6.6.0-alpha.4",
21
+ "@webiny/api-aco-sql": "6.6.0-alpha.6",
22
+ "@webiny/api-audit-logs-sql": "6.6.0-alpha.6",
23
+ "@webiny/api-core-sql": "6.6.0-alpha.6",
24
+ "@webiny/api-event-handler-standalone": "6.6.0-alpha.6",
25
+ "@webiny/api-headless-cms-sql": "6.6.0-alpha.6",
26
+ "@webiny/api-websockets-sql": "6.6.0-alpha.6",
27
+ "@webiny/handler": "6.6.0-alpha.6",
28
+ "@webiny/self-hosted-auth": "6.6.0-alpha.6",
29
+ "@webiny/self-hosted-auth-sql": "6.6.0-alpha.6",
30
30
  "@webiny/stdlib": "0.0.17",
31
31
  "better-sqlite3": "13.0.3",
32
32
  "knex": "3.3.0",
33
33
  "pg": "8.23.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@webiny/build-tools": "6.6.0-alpha.4",
36
+ "@webiny/build-tools": "6.6.0-alpha.6",
37
37
  "rimraf": "6.1.3",
38
38
  "typescript": "7.0.2",
39
39
  "vitest": "4.1.11"