@prostgles/app 2.3.6-dev.1791902951 → 2.3.6-dev.1792007925
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/client/build/js/733.bundle.js +1 -1
- package/client/build/js/main.bundle.js +2 -2
- package/dist/common/ColumnConfig/ColumnConfig.d.ts +1 -0
- package/dist/common/ColumnConfig/ColumnConfig.d.ts.map +1 -1
- package/dist/common/ColumnConfig/getComputedColumnSelect.d.ts +4 -0
- package/dist/common/ColumnConfig/getComputedColumnSelect.d.ts.map +1 -0
- package/dist/common/ColumnConfig/getComputedColumnSelect.js +39 -0
- package/dist/common/ColumnConfig/getComputedColumnSelect.js.map +1 -0
- package/dist/common/DBGeneratedSchema.d.ts +63 -235
- package/dist/common/DBGeneratedSchema.d.ts.map +1 -1
- package/dist/common/DashboardTypes.d.ts +2 -1
- package/dist/common/DashboardTypes.d.ts.map +1 -1
- package/dist/common/actionColumn.d.ts.map +1 -1
- package/dist/common/actionColumn.js.map +1 -1
- package/dist/common/columnDisplayFormat.schema.d.ts +22 -0
- package/dist/common/columnDisplayFormat.schema.d.ts.map +1 -1
- package/dist/common/columnDisplayFormat.schema.js +23 -0
- package/dist/common/columnDisplayFormat.schema.js.map +1 -1
- package/dist/common/createActionColumn.d.ts +1 -1
- package/dist/common/functionOptions.d.ts +1 -1
- package/dist/common/functionOptions.d.ts.map +1 -1
- package/dist/common/functionOptions.js +4 -2
- package/dist/common/functionOptions.js.map +1 -1
- package/dist/common/jobAction.d.ts.map +1 -1
- package/dist/common/jobAction.js +19 -11
- package/dist/common/jobAction.js.map +1 -1
- package/dist/common/llmUtils.d.ts.map +1 -1
- package/dist/common/managedTableSchema.d.ts +4 -0
- package/dist/common/managedTableSchema.d.ts.map +1 -1
- package/dist/common/managedTableSchema.js +12 -2
- package/dist/common/managedTableSchema.js.map +1 -1
- package/dist/common/mcp/tableOptionsJsonbSchema.d.ts +76 -6
- package/dist/common/mcp/tableOptionsJsonbSchema.d.ts.map +1 -1
- package/dist/common/mcp/tableOptionsJsonbSchema.js +19 -1
- package/dist/common/mcp/tableOptionsJsonbSchema.js.map +1 -1
- package/dist/common/mcp/ui.mcp.schema.d.ts +76 -6
- package/dist/common/mcp/ui.mcp.schema.d.ts.map +1 -1
- package/dist/common/prostglesApiTypes.d.ts +1 -1
- package/dist/common/prostglesApiTypes.d.ts.map +1 -1
- package/dist/common/prostglesApiTypes.js +5 -5
- package/dist/common/prostglesMcp.d.ts +76 -6
- package/dist/common/prostglesMcp.d.ts.map +1 -1
- package/dist/server/package.json +2 -2
- package/dist/server/src/Alerts/AlertTypes.d.ts +38 -0
- package/dist/server/src/Alerts/AlertTypes.d.ts.map +1 -0
- package/dist/server/src/Alerts/AlertTypes.js +7 -0
- package/dist/server/src/Alerts/AlertTypes.js.map +1 -0
- package/dist/server/src/Alerts/enqueueAlerts.d.ts +5 -0
- package/dist/server/src/Alerts/enqueueAlerts.d.ts.map +1 -0
- package/dist/server/src/Alerts/enqueueAlerts.js +37 -0
- package/dist/server/src/Alerts/enqueueAlerts.js.map +1 -0
- package/dist/server/src/Alerts/getAlertConfig.d.ts +5 -0
- package/dist/server/src/Alerts/getAlertConfig.d.ts.map +1 -0
- package/dist/server/src/Alerts/getAlertConfig.js +45 -0
- package/dist/server/src/Alerts/getAlertConfig.js.map +1 -0
- package/dist/server/src/Alerts/getAlertPublish.d.ts +5 -0
- package/dist/server/src/Alerts/getAlertPublish.d.ts.map +1 -0
- package/dist/server/src/Alerts/getAlertPublish.js +21 -0
- package/dist/server/src/Alerts/getAlertPublish.js.map +1 -0
- package/dist/server/src/Alerts/getAlertTables.d.ts +128 -0
- package/dist/server/src/Alerts/getAlertTables.d.ts.map +1 -0
- package/dist/server/src/Alerts/getAlertTables.js +109 -0
- package/dist/server/src/Alerts/getAlertTables.js.map +1 -0
- package/dist/server/src/Alerts/getAlertsPlugin.d.ts +4 -0
- package/dist/server/src/Alerts/getAlertsPlugin.d.ts.map +1 -0
- package/dist/server/src/Alerts/getAlertsPlugin.js +69 -0
- package/dist/server/src/Alerts/getAlertsPlugin.js.map +1 -0
- package/dist/server/src/Alerts/runAlertDelivery.d.ts +5 -0
- package/dist/server/src/Alerts/runAlertDelivery.d.ts.map +1 -0
- package/dist/server/src/Alerts/runAlertDelivery.js +68 -0
- package/dist/server/src/Alerts/runAlertDelivery.js.map +1 -0
- package/dist/server/src/BackupManager/BackupManager.d.ts +53 -1
- package/dist/server/src/BackupManager/BackupManager.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/ConnectionManager.d.ts +54 -1
- package/dist/server/src/ConnectionManager/ConnectionManager.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/ConnectionManager.js +3 -2
- package/dist/server/src/ConnectionManager/ConnectionManager.js.map +1 -1
- package/dist/server/src/ConnectionManager/getConnectionServerFunctions.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/getConnectionServerFunctions.js +5 -2
- package/dist/server/src/ConnectionManager/getConnectionServerFunctions.js.map +1 -1
- package/dist/server/src/ConnectionManager/getHotReloadConfigs.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/getHotReloadConfigs.js +3 -3
- package/dist/server/src/ConnectionManager/getHotReloadConfigs.js.map +1 -1
- package/dist/server/src/ConnectionManager/initConnectionManager.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/initConnectionManager.js +1 -3
- package/dist/server/src/ConnectionManager/initConnectionManager.js.map +1 -1
- package/dist/server/src/ConnectionManager/modifyClientFunctionSchema.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/modifyClientFunctionSchema.js.map +1 -1
- package/dist/server/src/ConnectionManager/modifyClientSchema.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/modifyClientSchema.js +14 -6
- package/dist/server/src/ConnectionManager/modifyClientSchema.js.map +1 -1
- package/dist/server/src/ConnectionManager/startConnection.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/startConnection.js +5 -2
- package/dist/server/src/ConnectionManager/startConnection.js.map +1 -1
- package/dist/server/src/ConnectionManager/syncSchemaConfig.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/syncSchemaConfig.js.map +1 -1
- package/dist/server/src/ConnectionManager/validateSchemaConfigActions.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/validateSchemaConfigActions.js +2 -1
- package/dist/server/src/ConnectionManager/validateSchemaConfigActions.js.map +1 -1
- package/dist/server/src/FileStorage/getAnnotationPageText.d.ts.map +1 -0
- package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationPageText.js +24 -10
- package/dist/server/src/FileStorage/getAnnotationPageText.js.map +1 -0
- package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationsTableHook.d.ts +1 -1
- package/dist/server/src/FileStorage/getAnnotationsTableHook.d.ts.map +1 -0
- package/dist/server/src/FileStorage/getAnnotationsTableHook.js.map +1 -0
- package/dist/server/src/FileStorage/getFilesPlugin.d.ts +6 -0
- package/dist/server/src/FileStorage/getFilesPlugin.d.ts.map +1 -0
- package/dist/server/src/FileStorage/getFilesPlugin.js +104 -0
- package/dist/server/src/FileStorage/getFilesPlugin.js.map +1 -0
- package/dist/server/src/{ConnectionManager → FileStorage}/getFilesTableHook.d.ts +4 -3
- package/dist/server/src/FileStorage/getFilesTableHook.d.ts.map +1 -0
- package/dist/server/src/{ConnectionManager → FileStorage}/getFilesTableHook.js +6 -8
- package/dist/server/src/FileStorage/getFilesTableHook.js.map +1 -0
- package/dist/server/src/{ConnectionManager/extractFileText.d.ts → FileStorage/getFilesTableJobs.d.ts} +2 -2
- package/dist/server/src/FileStorage/getFilesTableJobs.d.ts.map +1 -0
- package/dist/server/src/{ConnectionManager/extractFileText.js → FileStorage/getFilesTableJobs.js} +11 -7
- package/dist/server/src/FileStorage/getFilesTableJobs.js.map +1 -0
- package/dist/server/src/FileStorage/getFilesTableJobs.spec.d.ts +2 -0
- package/dist/server/src/FileStorage/getFilesTableJobs.spec.d.ts.map +1 -0
- package/dist/server/src/{ConnectionManager/extractFileText.spec.js → FileStorage/getFilesTableJobs.spec.js} +3 -3
- package/dist/server/src/FileStorage/getFilesTableJobs.spec.js.map +1 -0
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/validateAgenticWorkflowDefinitions.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/createWorkflowExecutionHandlers.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/getAgentConfigWithDefaults.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/setupOrchestrationToolPermissions.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Ui.mcp.d.ts +76 -6
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Ui.mcp.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/getWebDevChatAndConnection.d.ts +53 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/getWebDevChatAndConnection.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers.d.ts +152 -12
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers.d.ts.map +1 -1
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMcpHub.d.ts +152 -12
- package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMcpHub.d.ts.map +1 -1
- package/dist/server/src/Plugins/Plugins.d.ts +15 -0
- package/dist/server/src/Plugins/Plugins.d.ts.map +1 -0
- package/dist/server/src/Plugins/Plugins.js +3 -0
- package/dist/server/src/Plugins/Plugins.js.map +1 -0
- package/dist/server/src/{ConnectionManager/parseTableConfig.d.ts → Plugins/parsePlugins.d.ts} +8 -7
- package/dist/server/src/Plugins/parsePlugins.d.ts.map +1 -0
- package/dist/server/src/Plugins/parsePlugins.js +99 -0
- package/dist/server/src/Plugins/parsePlugins.js.map +1 -0
- package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.d.ts +1 -1
- package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.d.ts.map +1 -1
- package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.js +1 -1
- package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.js.map +1 -1
- package/dist/server/src/authConfig/getAuth.d.ts.map +1 -1
- package/dist/server/src/authConfig/sessionUtils.d.ts.map +1 -1
- package/dist/server/src/authConfig/subscribeToAuthSetupChanges.d.ts.map +1 -1
- package/dist/server/src/cli/cliTemplateFiles.js +30 -3
- package/dist/server/src/cli/cliTemplateFiles.js.map +1 -1
- package/dist/server/src/connectionPublish/getConnectionPublish.d.ts.map +1 -1
- package/dist/server/src/connectionPublish/getConnectionPublish.js +1 -5
- package/dist/server/src/connectionPublish/getConnectionPublish.js.map +1 -1
- package/dist/server/src/init/initUsers.d.ts.map +1 -1
- package/dist/server/src/publish/getPublishLLM.d.ts.map +1 -1
- package/dist/server/src/publish/getPublishLlmChats.d.ts.map +1 -1
- package/dist/server/src/publish/publish.d.ts.map +1 -1
- package/dist/server/src/publish/publish.js +10 -7
- package/dist/server/src/publish/publish.js.map +1 -1
- package/dist/server/src/schemaConfig.d.ts +12 -0
- package/dist/server/src/schemaConfig.d.ts.map +1 -1
- package/dist/server/src/schemaConfig.js +3 -1
- package/dist/server/src/schemaConfig.js.map +1 -1
- package/dist/server/src/serverFunctions/adminServerFunctions/agenticWorkflowFunctions.d.ts +2 -2
- package/dist/server/src/serverFunctions/adminServerFunctions/stateServerAdminFunctions.d.ts +108 -4
- package/dist/server/src/serverFunctions/adminServerFunctions/stateServerAdminFunctions.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/adminServerFunctions/webApp/getTemplatedWebAppConnection.d.ts +53 -1
- package/dist/server/src/serverFunctions/adminServerFunctions/webApp/getTemplatedWebAppConnection.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/applySampleSchema.d.ts +53 -1
- package/dist/server/src/serverFunctions/applySampleSchema.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/agentConstants.d.ts +1 -1
- package/dist/server/src/serverFunctions/askLLM/askLLM.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/getFullPrompt.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/getFullPrompt.js.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/getPastMessages.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/getValidatedAskLLMChatOptions.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/handleToolUseResultConfirmation.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/prostglesLLMTools/getMCPServerTools.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/askLLM/prostglesLLMTools/getMcpToolsWithDynamicDescription.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/deleteConnection.d.ts +53 -1
- package/dist/server/src/serverFunctions/deleteConnection.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/getConnectionAndDatabaseConfig.d.ts +53 -1
- package/dist/server/src/serverFunctions/getConnectionAndDatabaseConfig.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.d.ts +2 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.js +1 -0
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.js.map +1 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspaces.d.ts +1 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspaces.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspacesFunction.d.ts +1 -1
- package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspacesFunction.d.ts.map +1 -1
- package/dist/server/src/serverFunctions/stateServerFunctions.d.ts +109 -5
- package/dist/server/src/serverFunctions/stateServerFunctions.d.ts.map +1 -1
- package/dist/server/src/tableHooks/llm_credentials.tableHooks.d.ts.map +1 -1
- package/dist/server/src/tableHooks/tableHooks.d.ts +170 -14
- package/dist/server/src/tableHooks/tableHooks.d.ts.map +1 -1
- package/dist/server/src/tableHooks/users.tableHooks.d.ts +58 -6
- package/dist/server/src/tableHooks/users.tableHooks.d.ts.map +1 -1
- package/dist/server/src/testing/createTestDeployment.d.ts +2 -2
- package/dist/server/src/testing/createTestDeployment.d.ts.map +1 -1
- package/dist/server/src/testing/createTestDeployment.js.map +1 -1
- package/dist/server/src/upsertConnection.d.ts +53 -1
- package/dist/server/src/upsertConnection.d.ts.map +1 -1
- package/package.json +2 -2
- package/sample_schemas/food_delivery/dist/connection.js +1008 -0
- package/sample_schemas/food_delivery/dist/databaseConfig.js +116 -0
- package/sample_schemas/food_delivery/dist/index.js +17 -0
- package/sample_schemas/food_delivery/dist/onMount.js +132 -0
- package/sample_schemas/food_delivery/dist/workspaceConfig.js +56 -0
- package/dist/server/src/ConnectionManager/extractFileText.d.ts.map +0 -1
- package/dist/server/src/ConnectionManager/extractFileText.js.map +0 -1
- package/dist/server/src/ConnectionManager/extractFileText.spec.d.ts +0 -2
- package/dist/server/src/ConnectionManager/extractFileText.spec.d.ts.map +0 -1
- package/dist/server/src/ConnectionManager/extractFileText.spec.js.map +0 -1
- package/dist/server/src/ConnectionManager/getAnnotationPageText.d.ts.map +0 -1
- package/dist/server/src/ConnectionManager/getAnnotationPageText.js.map +0 -1
- package/dist/server/src/ConnectionManager/getAnnotationsTableHook.d.ts.map +0 -1
- package/dist/server/src/ConnectionManager/getAnnotationsTableHook.js.map +0 -1
- package/dist/server/src/ConnectionManager/getFilesTableHook.d.ts.map +0 -1
- package/dist/server/src/ConnectionManager/getFilesTableHook.js.map +0 -1
- package/dist/server/src/ConnectionManager/parseTableConfig.d.ts.map +0 -1
- package/dist/server/src/ConnectionManager/parseTableConfig.js +0 -136
- package/dist/server/src/ConnectionManager/parseTableConfig.js.map +0 -1
- /package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationPageText.d.ts +0 -0
- /package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationsTableHook.js +0 -0
|
@@ -1595,6 +1595,28 @@ export declare const getProstglesMcpHub: (dbs: DBS) => Promise<{
|
|
|
1595
1595
|
};
|
|
1596
1596
|
}];
|
|
1597
1597
|
};
|
|
1598
|
+
}, {
|
|
1599
|
+
readonly type: {
|
|
1600
|
+
readonly enum: readonly ["Avatar"];
|
|
1601
|
+
readonly title: "Format";
|
|
1602
|
+
readonly description: "Name initials in a circle. Set colors in column styles.";
|
|
1603
|
+
};
|
|
1604
|
+
readonly params: {
|
|
1605
|
+
readonly optional: true;
|
|
1606
|
+
readonly type: {
|
|
1607
|
+
readonly firstNameColumn: {
|
|
1608
|
+
readonly type: "string";
|
|
1609
|
+
readonly optional: true;
|
|
1610
|
+
readonly title: "First name column";
|
|
1611
|
+
readonly description: "Leave name columns unset to use this column's full name.";
|
|
1612
|
+
};
|
|
1613
|
+
readonly lastNameColumn: {
|
|
1614
|
+
readonly type: "string";
|
|
1615
|
+
readonly optional: true;
|
|
1616
|
+
readonly title: "Last name column";
|
|
1617
|
+
};
|
|
1618
|
+
};
|
|
1619
|
+
};
|
|
1598
1620
|
}, {
|
|
1599
1621
|
readonly type: {
|
|
1600
1622
|
readonly enum: readonly ["Metric Prefix"];
|
|
@@ -1732,9 +1754,42 @@ export declare const getProstglesMcpHub: (dbs: DBS) => Promise<{
|
|
|
1732
1754
|
readonly optional: true;
|
|
1733
1755
|
readonly oneOf: readonly [{
|
|
1734
1756
|
readonly type: {
|
|
1757
|
+
readonly fontWeight: {
|
|
1758
|
+
readonly enum: readonly ["normal", "bold"];
|
|
1759
|
+
readonly optional: true;
|
|
1760
|
+
};
|
|
1735
1761
|
readonly type: {
|
|
1736
|
-
readonly enum: readonly ["
|
|
1762
|
+
readonly enum: readonly ["None"];
|
|
1763
|
+
};
|
|
1764
|
+
};
|
|
1765
|
+
}, {
|
|
1766
|
+
readonly type: {
|
|
1767
|
+
readonly textColor: {
|
|
1768
|
+
readonly type: "string";
|
|
1769
|
+
readonly optional: true;
|
|
1770
|
+
};
|
|
1771
|
+
readonly chipColor: {
|
|
1772
|
+
readonly type: "string";
|
|
1773
|
+
readonly optional: true;
|
|
1774
|
+
};
|
|
1775
|
+
readonly cellColor: {
|
|
1776
|
+
readonly type: "string";
|
|
1777
|
+
readonly optional: true;
|
|
1737
1778
|
};
|
|
1779
|
+
readonly borderColor: {
|
|
1780
|
+
readonly type: "string";
|
|
1781
|
+
readonly optional: true;
|
|
1782
|
+
};
|
|
1783
|
+
readonly fontWeight: {
|
|
1784
|
+
readonly enum: readonly ["normal", "bold"];
|
|
1785
|
+
readonly optional: true;
|
|
1786
|
+
};
|
|
1787
|
+
readonly type: {
|
|
1788
|
+
readonly enum: readonly ["Fixed"];
|
|
1789
|
+
};
|
|
1790
|
+
};
|
|
1791
|
+
}, {
|
|
1792
|
+
readonly type: {
|
|
1738
1793
|
readonly column: {
|
|
1739
1794
|
readonly type: "string";
|
|
1740
1795
|
readonly optional: true;
|
|
@@ -1811,23 +1866,38 @@ export declare const getProstglesMcpHub: (dbs: DBS) => Promise<{
|
|
|
1811
1866
|
};
|
|
1812
1867
|
};
|
|
1813
1868
|
};
|
|
1869
|
+
readonly fontWeight: {
|
|
1870
|
+
readonly enum: readonly ["normal", "bold"];
|
|
1871
|
+
readonly optional: true;
|
|
1872
|
+
};
|
|
1873
|
+
readonly type: {
|
|
1874
|
+
readonly enum: readonly ["Conditional"];
|
|
1875
|
+
};
|
|
1814
1876
|
};
|
|
1815
1877
|
}, {
|
|
1816
1878
|
readonly type: {
|
|
1817
|
-
readonly type: {
|
|
1818
|
-
readonly enum: readonly ["Scale"];
|
|
1819
|
-
};
|
|
1820
1879
|
readonly textColor: "string";
|
|
1821
1880
|
readonly minColor: "string";
|
|
1822
1881
|
readonly maxColor: "string";
|
|
1882
|
+
readonly fontWeight: {
|
|
1883
|
+
readonly enum: readonly ["normal", "bold"];
|
|
1884
|
+
readonly optional: true;
|
|
1885
|
+
};
|
|
1886
|
+
readonly type: {
|
|
1887
|
+
readonly enum: readonly ["Scale"];
|
|
1888
|
+
};
|
|
1823
1889
|
};
|
|
1824
1890
|
}, {
|
|
1825
1891
|
readonly type: {
|
|
1892
|
+
readonly barColor: "string";
|
|
1893
|
+
readonly textColor: "string";
|
|
1894
|
+
readonly fontWeight: {
|
|
1895
|
+
readonly enum: readonly ["normal", "bold"];
|
|
1896
|
+
readonly optional: true;
|
|
1897
|
+
};
|
|
1826
1898
|
readonly type: {
|
|
1827
1899
|
readonly enum: readonly ["Barchart"];
|
|
1828
1900
|
};
|
|
1829
|
-
readonly barColor: "string";
|
|
1830
|
-
readonly textColor: "string";
|
|
1831
1901
|
};
|
|
1832
1902
|
}];
|
|
1833
1903
|
};
|
|
@@ -4007,6 +4077,28 @@ export declare const getProstglesMcpHub: (dbs: DBS) => Promise<{
|
|
|
4007
4077
|
};
|
|
4008
4078
|
}];
|
|
4009
4079
|
};
|
|
4080
|
+
}, {
|
|
4081
|
+
readonly type: {
|
|
4082
|
+
readonly enum: readonly ["Avatar"];
|
|
4083
|
+
readonly title: "Format";
|
|
4084
|
+
readonly description: "Name initials in a circle. Set colors in column styles.";
|
|
4085
|
+
};
|
|
4086
|
+
readonly params: {
|
|
4087
|
+
readonly optional: true;
|
|
4088
|
+
readonly type: {
|
|
4089
|
+
readonly firstNameColumn: {
|
|
4090
|
+
readonly type: "string";
|
|
4091
|
+
readonly optional: true;
|
|
4092
|
+
readonly title: "First name column";
|
|
4093
|
+
readonly description: "Leave name columns unset to use this column's full name.";
|
|
4094
|
+
};
|
|
4095
|
+
readonly lastNameColumn: {
|
|
4096
|
+
readonly type: "string";
|
|
4097
|
+
readonly optional: true;
|
|
4098
|
+
readonly title: "Last name column";
|
|
4099
|
+
};
|
|
4100
|
+
};
|
|
4101
|
+
};
|
|
4010
4102
|
}, {
|
|
4011
4103
|
readonly type: {
|
|
4012
4104
|
readonly enum: readonly ["Metric Prefix"];
|
|
@@ -4144,9 +4236,42 @@ export declare const getProstglesMcpHub: (dbs: DBS) => Promise<{
|
|
|
4144
4236
|
readonly optional: true;
|
|
4145
4237
|
readonly oneOf: readonly [{
|
|
4146
4238
|
readonly type: {
|
|
4239
|
+
readonly fontWeight: {
|
|
4240
|
+
readonly enum: readonly ["normal", "bold"];
|
|
4241
|
+
readonly optional: true;
|
|
4242
|
+
};
|
|
4147
4243
|
readonly type: {
|
|
4148
|
-
readonly enum: readonly ["
|
|
4244
|
+
readonly enum: readonly ["None"];
|
|
4245
|
+
};
|
|
4246
|
+
};
|
|
4247
|
+
}, {
|
|
4248
|
+
readonly type: {
|
|
4249
|
+
readonly textColor: {
|
|
4250
|
+
readonly type: "string";
|
|
4251
|
+
readonly optional: true;
|
|
4252
|
+
};
|
|
4253
|
+
readonly chipColor: {
|
|
4254
|
+
readonly type: "string";
|
|
4255
|
+
readonly optional: true;
|
|
4256
|
+
};
|
|
4257
|
+
readonly cellColor: {
|
|
4258
|
+
readonly type: "string";
|
|
4259
|
+
readonly optional: true;
|
|
4149
4260
|
};
|
|
4261
|
+
readonly borderColor: {
|
|
4262
|
+
readonly type: "string";
|
|
4263
|
+
readonly optional: true;
|
|
4264
|
+
};
|
|
4265
|
+
readonly fontWeight: {
|
|
4266
|
+
readonly enum: readonly ["normal", "bold"];
|
|
4267
|
+
readonly optional: true;
|
|
4268
|
+
};
|
|
4269
|
+
readonly type: {
|
|
4270
|
+
readonly enum: readonly ["Fixed"];
|
|
4271
|
+
};
|
|
4272
|
+
};
|
|
4273
|
+
}, {
|
|
4274
|
+
readonly type: {
|
|
4150
4275
|
readonly column: {
|
|
4151
4276
|
readonly type: "string";
|
|
4152
4277
|
readonly optional: true;
|
|
@@ -4223,23 +4348,38 @@ export declare const getProstglesMcpHub: (dbs: DBS) => Promise<{
|
|
|
4223
4348
|
};
|
|
4224
4349
|
};
|
|
4225
4350
|
};
|
|
4351
|
+
readonly fontWeight: {
|
|
4352
|
+
readonly enum: readonly ["normal", "bold"];
|
|
4353
|
+
readonly optional: true;
|
|
4354
|
+
};
|
|
4355
|
+
readonly type: {
|
|
4356
|
+
readonly enum: readonly ["Conditional"];
|
|
4357
|
+
};
|
|
4226
4358
|
};
|
|
4227
4359
|
}, {
|
|
4228
4360
|
readonly type: {
|
|
4229
|
-
readonly type: {
|
|
4230
|
-
readonly enum: readonly ["Scale"];
|
|
4231
|
-
};
|
|
4232
4361
|
readonly textColor: "string";
|
|
4233
4362
|
readonly minColor: "string";
|
|
4234
4363
|
readonly maxColor: "string";
|
|
4364
|
+
readonly fontWeight: {
|
|
4365
|
+
readonly enum: readonly ["normal", "bold"];
|
|
4366
|
+
readonly optional: true;
|
|
4367
|
+
};
|
|
4368
|
+
readonly type: {
|
|
4369
|
+
readonly enum: readonly ["Scale"];
|
|
4370
|
+
};
|
|
4235
4371
|
};
|
|
4236
4372
|
}, {
|
|
4237
4373
|
readonly type: {
|
|
4374
|
+
readonly barColor: "string";
|
|
4375
|
+
readonly textColor: "string";
|
|
4376
|
+
readonly fontWeight: {
|
|
4377
|
+
readonly enum: readonly ["normal", "bold"];
|
|
4378
|
+
readonly optional: true;
|
|
4379
|
+
};
|
|
4238
4380
|
readonly type: {
|
|
4239
4381
|
readonly enum: readonly ["Barchart"];
|
|
4240
4382
|
};
|
|
4241
|
-
readonly barColor: "string";
|
|
4242
|
-
readonly textColor: "string";
|
|
4243
4383
|
};
|
|
4244
4384
|
}];
|
|
4245
4385
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProstglesMcpHub.d.ts","sourceRoot":"","sources":["../../../../../src/McpHub/ProstglesMcpHub/ProstglesMcpHub.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EAExB,yBAAyB,EAC1B,MAAM,2BAA2B,CAAC;AAsNnC,eAAO,MAAM,kBAAkB,GAAI,KAAK,GAAG;;2BArG3B,MAAM,YACR,MAAM,QACV,OAAO,WACJ,cAAc;;;;;;;;oCApCX,MAAM,YACR,MAAM,QACV,OAAO
|
|
1
|
+
{"version":3,"file":"ProstglesMcpHub.d.ts","sourceRoot":"","sources":["../../../../../src/McpHub/ProstglesMcpHub/ProstglesMcpHub.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EAExB,yBAAyB,EAC1B,MAAM,2BAA2B,CAAC;AAsNnC,eAAO,MAAM,kBAAkB,GAAI,KAAK,GAAG;;2BArG3B,MAAM,YACR,MAAM,QACV,OAAO,WACJ,cAAc;;;;;;;;oCApCX,MAAM,YACR,MAAM,QACV,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+JtC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HotReloadConfigOptions } from "../ConnectionManager/getHotReloadConfigs.js";
|
|
2
|
+
import type { ProstglesContext } from "../schemaConfig.js";
|
|
3
|
+
import type { JobsOptions, TableDefinition, TableHooks } from "prostgles-server";
|
|
4
|
+
type TableConfig<LANG_IDS = {
|
|
5
|
+
en: 1;
|
|
6
|
+
}> = {
|
|
7
|
+
[table_name: string]: TableDefinition<LANG_IDS>;
|
|
8
|
+
};
|
|
9
|
+
export type PluginDefinition = {
|
|
10
|
+
tableConfig?: TableConfig;
|
|
11
|
+
tableHooks?: TableHooks<void, ProstglesContext>;
|
|
12
|
+
jobDefinitions?: JobsOptions<void, ProstglesContext>["definitions"];
|
|
13
|
+
} & Partial<Pick<HotReloadConfigOptions, "fileTable">>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=Plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugins.d.ts","sourceRoot":"","sources":["../../../../src/Plugins/Plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACX,MAAM,kBAAkB,CAAC;AAE1B,KAAK,WAAW,CACd,QAAQ,GAAG;IACT,EAAE,EAAE,CAAC,CAAC;CACP,IACC;IACF,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE,WAAW,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAC;CACrE,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugins.js","sourceRoot":"","sources":["../../../../src/Plugins/Plugins.ts"],"names":[],"mappings":""}
|
package/dist/server/src/{ConnectionManager/parseTableConfig.d.ts → Plugins/parsePlugins.d.ts}
RENAMED
|
@@ -3,9 +3,9 @@ import type e from "express";
|
|
|
3
3
|
import type { JobsOptions, TableConfig, TableHooks } from "prostgles-server";
|
|
4
4
|
import type { FileTableConfig } from "prostgles-server/dist/ProstglesTypes";
|
|
5
5
|
import type { DatabaseConfigs, DBS } from "..";
|
|
6
|
-
import type { ConnectionManager } from "
|
|
7
|
-
import type { ConnectionHotReloadProperties } from "
|
|
8
|
-
type ParseTableConfigArgs = {
|
|
6
|
+
import type { ConnectionManager } from "../ConnectionManager/ConnectionManager";
|
|
7
|
+
import type { ConnectionHotReloadProperties } from "../ConnectionManager/getHotReloadConfigs";
|
|
8
|
+
export type ParseTableConfigArgs = {
|
|
9
9
|
dbs: DBS;
|
|
10
10
|
conMgr: ConnectionManager;
|
|
11
11
|
app: e.Express;
|
|
@@ -18,11 +18,12 @@ type ParseTableConfigArgs = {
|
|
|
18
18
|
type: "new";
|
|
19
19
|
newTableConfig: DatabaseConfigs["file_table_config"];
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
fileTable
|
|
21
|
+
type ParsedPlugins = {
|
|
22
|
+
fileTable: FileTableConfig | undefined;
|
|
23
23
|
tableConfig: TableConfig | undefined;
|
|
24
24
|
tableHooks: TableHooks<void, ProstglesContext> | undefined;
|
|
25
25
|
jobs: JobsOptions<void, ProstglesContext> | undefined;
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
|
+
export declare const parsePlugins: (args: ParseTableConfigArgs) => Promise<ParsedPlugins>;
|
|
27
28
|
export {};
|
|
28
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=parsePlugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePlugins.d.ts","sourceRoot":"","sources":["../../../../src/Plugins/parsePlugins.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAEX,UAAU,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAG9F,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,iBAAiB,CAAC;IAC1B,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC;IACf,GAAG,EAAE,6BAA6B,CAAC;IACnC,cAAc,EAAE,eAAe,CAAC;CACjC,GAAG,CACA;IACE,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,cAAc,EAAE,eAAe,CAAC,mBAAmB,CAAC,CAAC;CACtD,CACJ,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,eAAe,GAAG,SAAS,CAAC;IACvC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,UAAU,EAAE,UAAU,CAAC,IAAI,EAAE,gBAAgB,CAAC,GAAG,SAAS,CAAC;IAC3D,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,gBAAgB,CAAC,GAAG,SAAS,CAAC;CACvD,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,MAAM,oBAAoB,KACzB,OAAO,CAAC,aAAa,CAiFvB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsePlugins = void 0;
|
|
4
|
+
const getAlertConfig_1 = require("../Alerts/getAlertConfig.js");
|
|
5
|
+
const getAlertsPlugin_1 = require("../Alerts/getAlertsPlugin.js");
|
|
6
|
+
const getFilesPlugin_1 = require("../FileStorage/getFilesPlugin.js");
|
|
7
|
+
const prostgles_types_1 = require("prostgles-types");
|
|
8
|
+
const getSchemaConfig_1 = require("../ConnectionManager/getSchemaConfig");
|
|
9
|
+
const parsePlugins = async (args) => {
|
|
10
|
+
const userOptions = (0, getSchemaConfig_1.getSchemaConfig)(args.databaseConfig.config_sync)?.config ?? {};
|
|
11
|
+
const jobsTableName = userOptions.jobs?.tableName ?? args.conMgr.jobsTableName;
|
|
12
|
+
const plugins = [
|
|
13
|
+
await (0, getFilesPlugin_1.getFilesPlugin)({ ...args, jobsTableName }),
|
|
14
|
+
(0, getAlertsPlugin_1.getAlertsPlugin)(args.con.id, (0, getAlertConfig_1.getAlertConfig)(userOptions.alerts, args.dbs, args.databaseConfig.auth_providers), jobsTableName),
|
|
15
|
+
].filter(prostgles_types_1.isDefined);
|
|
16
|
+
const tableConfig = {};
|
|
17
|
+
let fileTable;
|
|
18
|
+
let jobs = userOptions.jobs;
|
|
19
|
+
for (const plugin of plugins) {
|
|
20
|
+
if (plugin.fileTable) {
|
|
21
|
+
if (fileTable) {
|
|
22
|
+
throw new Error("Multiple plugins defining a file table are not supported");
|
|
23
|
+
}
|
|
24
|
+
fileTable = plugin.fileTable;
|
|
25
|
+
}
|
|
26
|
+
for (const [pluginTableName, pluginTableConfig] of Object.entries(plugin.tableConfig ?? {})) {
|
|
27
|
+
const existingTableConfig = tableConfig[pluginTableName] ?? userOptions.tableConfig?.[pluginTableName];
|
|
28
|
+
if (existingTableConfig && "isLookupTable" in existingTableConfig) {
|
|
29
|
+
throw new Error(`Plugin table "${pluginTableName}" cannot be a lookup table`);
|
|
30
|
+
}
|
|
31
|
+
tableConfig[pluginTableName] = {
|
|
32
|
+
...pluginTableConfig,
|
|
33
|
+
...existingTableConfig,
|
|
34
|
+
publish: { ...existingTableConfig?.publish, ...pluginTableConfig.publish },
|
|
35
|
+
columns: mergeDefinitions(existingTableConfig?.columns, pluginTableConfig.columns, `Column in table "${pluginTableName}"`),
|
|
36
|
+
constraints: mergeConstraints(existingTableConfig?.constraints, pluginTableConfig.constraints, pluginTableName),
|
|
37
|
+
indexes: mergeDefinitions(existingTableConfig?.indexes, pluginTableConfig.indexes, `Index in table "${pluginTableName}"`),
|
|
38
|
+
triggers: mergeDefinitions(existingTableConfig?.triggers, pluginTableConfig.triggers, `Trigger in table "${pluginTableName}"`),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (plugin.jobDefinitions) {
|
|
42
|
+
jobs = {
|
|
43
|
+
tableName: jobsTableName,
|
|
44
|
+
definitions: mergeDefinitions(jobs?.definitions, plugin.jobDefinitions, "Job"),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Create managed tables before user tables that may reference them.
|
|
49
|
+
for (const [tableName, config] of Object.entries(userOptions.tableConfig ?? {})) {
|
|
50
|
+
tableConfig[tableName] ??= config;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
fileTable,
|
|
54
|
+
tableConfig: Object.keys(tableConfig).length ? tableConfig : undefined,
|
|
55
|
+
tableHooks: mergeTableHooks(...plugins.map((plugin) => plugin.tableHooks), userOptions.tableHooks),
|
|
56
|
+
jobs,
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
exports.parsePlugins = parsePlugins;
|
|
60
|
+
const mergeDefinitions = (existing, incoming, description) => {
|
|
61
|
+
if (!incoming)
|
|
62
|
+
return existing;
|
|
63
|
+
for (const name of Object.keys(incoming)) {
|
|
64
|
+
if (existing && Object.hasOwn(existing, name)) {
|
|
65
|
+
throw new Error(`${description} "${name}" conflicts with a plugin definition`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return { ...existing, ...incoming };
|
|
69
|
+
};
|
|
70
|
+
const mergeConstraints = (existing, incoming, tableName) => {
|
|
71
|
+
if (!existing)
|
|
72
|
+
return incoming;
|
|
73
|
+
if (!incoming)
|
|
74
|
+
return existing;
|
|
75
|
+
if (!Array.isArray(existing) && !Array.isArray(incoming)) {
|
|
76
|
+
return mergeDefinitions(existing, incoming, `Constraint in table "${tableName}"`);
|
|
77
|
+
}
|
|
78
|
+
return [existing, incoming].flatMap((constraints) => Array.isArray(constraints) ? constraints
|
|
79
|
+
: Object.entries(constraints).map(([name, definition]) => `CONSTRAINT ${(0, prostgles_types_1.asName)(name)} ${typeof definition === "string" ? definition : `${definition.type} (${definition.content})`}`));
|
|
80
|
+
};
|
|
81
|
+
const mergeTableHooks = (...hookSets) => {
|
|
82
|
+
const result = {};
|
|
83
|
+
for (const hooks of hookSets) {
|
|
84
|
+
for (const [tableName, tableHooks] of Object.entries(hooks ?? {})) {
|
|
85
|
+
const existing = result[tableName];
|
|
86
|
+
result[tableName] = {
|
|
87
|
+
...existing,
|
|
88
|
+
...tableHooks,
|
|
89
|
+
beforeEach: mergeHooks(existing?.beforeEach, tableHooks.beforeEach),
|
|
90
|
+
afterEach: mergeHooks(existing?.afterEach, tableHooks.afterEach),
|
|
91
|
+
afterAll: mergeHooks(existing?.afterAll, tableHooks.afterAll),
|
|
92
|
+
afterCommit: mergeHooks(existing?.afterCommit, tableHooks.afterCommit),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return Object.keys(result).length ? result : undefined;
|
|
97
|
+
};
|
|
98
|
+
const mergeHooks = (existing, incoming) => existing || incoming ? [...(existing ?? []), ...(incoming ?? [])] : undefined;
|
|
99
|
+
//# sourceMappingURL=parsePlugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePlugins.js","sourceRoot":"","sources":["../../../../src/Plugins/parsePlugins.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,iEAA8D;AAC9D,oEAAiE;AAUjE,qDAAoD;AAIpD,0EAAuE;AA0BhE,MAAM,YAAY,GAAG,KAAK,EAC/B,IAA0B,EACF,EAAE;IAC1B,MAAM,WAAW,GACf,IAAA,iCAAe,EAAC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IACjE,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,EAAE,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;IAC/E,MAAM,OAAO,GAAG;QACd,MAAM,IAAA,+BAAc,EAAC,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,CAAC;QAChD,IAAA,iCAAe,EACb,IAAI,CAAC,GAAG,CAAC,EAAE,E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D,MAAM,MAAM,GAAuC,EAAE,CAAC;IACtD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;YAClE,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,CAAC,SAAS,CAAC,GAAG;gBAClB,GAAG,QAAQ;gBACX,GAAG,UAAU;gBACb,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;gBACnE,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC;gBAChE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;gBAC7D,WAAW,EAAE,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;aACvE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAI,QAAyB,EAAE,QAAyB,EAAE,EAAE,CAC7E,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Email } from "prostgles-server/dist/Auth/AuthTypes";
|
|
2
1
|
import type { DBSSchema } from "../../../../common/publishUtils.js";
|
|
2
|
+
import type { Email } from "prostgles-server/dist/Auth/AuthTypes";
|
|
3
3
|
export declare const getSMTPWithTLS: (smtp: NonNullable<NonNullable<DBSSchema["database_configs"]["auth_providers"]>["email"]>["smtp"]) => {
|
|
4
4
|
tls?: {
|
|
5
5
|
rejectUnauthorized: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEmailSenderWithMockTest.d.ts","sourceRoot":"","sources":["../../../../../src/authConfig/emailProvider/getEmailSenderWithMockTest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getEmailSenderWithMockTest.d.ts","sourceRoot":"","sources":["../../../../../src/authConfig/emailProvider/getEmailSenderWithMockTest.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAGlE,eAAO,MAAM,cAAc,GACzB,MAAM,WAAW,CACf,WAAW,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,CACtE,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASV,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,CAC/B,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAC9C,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,gBAAgB,SAAS,CAAC,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,GAAG,SAAS;;2DAwBlB,SAAS;6CAiB7D;QACD,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd;cAcJ,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEmailSenderWithMockTest = exports.getSMTPWithTLS = void 0;
|
|
4
|
-
const Prostgles_1 = require("prostgles-server/dist/Prostgles");
|
|
5
4
|
const OAuthUtils_1 = require("../../../../common/OAuthUtils.js");
|
|
6
5
|
const tout_1 = require("../../utils/tout.js");
|
|
6
|
+
const Prostgles_1 = require("prostgles-server/dist/Prostgles");
|
|
7
7
|
const getSMTPWithTLS = (smtp) => {
|
|
8
8
|
return {
|
|
9
9
|
...smtp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEmailSenderWithMockTest.js","sourceRoot":"","sources":["../../../../../src/authConfig/emailProvider/getEmailSenderWithMockTest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getEmailSenderWithMockTest.js","sourceRoot":"","sources":["../../../../../src/authConfig/emailProvider/getEmailSenderWithMockTest.ts"],"names":[],"mappings":";;;AAAA,mDAI4B;AAE5B,0CAAuC;AAEvC,+DAAiE;AAE1D,MAAM,cAAc,GAAG,CAC5B,IAES,EACT,EAAE;IACF,OAAO;QACL,GAAG,IAAI;QACP,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM;YACtB,IAAI,CAAC,kBAAkB,KAAK,SAAS,IAAI;YACvC,GAAG,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE;SACrD,CAAC;KACL,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,cAAc,kBAYzB;AAMK,MAAM,0BAA0B,GAAG,KAAK,EAC7C,cAA2E,EAC3E,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,cAAc,IAAI,EAAE,CAAC;IACpD,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW;QAAE,OAAO,SAAS,CAAC;IAC7C,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACtD,MAAM,IAAI,GAAG,IAAA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AAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AA5DW,QAAA,0BAA0B,8BA4DrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAuth.d.ts","sourceRoot":"","sources":["../../../../src/authConfig/getAuth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAE1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAOpC,OAAO,EAGL,KAAK,KAAK,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAGpF,MAAM,MAAM,UAAU,GAAG,aAAa,CACpC,IAAI,CACF,iBAAiB,EACf,OAAO,GACP,YAAY,GACZ,UAAU,GACV,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,eAAe,CAClB,CACF,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC;AAEhE,eAAO,MAAM,OAAO,GAClB,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,MAAM,EAAE,EACR,eAAe,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getAuth.d.ts","sourceRoot":"","sources":["../../../../src/authConfig/getAuth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;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4BAAkC,CAAC;qBAA2B,CAAC;eAA4C,CAAC;;;;;;;;iBAAma,CAAC;;;;;;;wBAAgH,CAAC;qBAAsC,CAAC;;8BAAkD,CAAC;;wBAA+B,CAAC;mBAAuB,CAAC;0BAA+B,CAAC;wBAAiB,CAAC;6BAA2M,CAAC;sBAAwD,CAAC;kBAA2B,CAAC;qBAAqB,CAAC;sBAAsB,CAAC;oBAAmF,CAAC;4BAA6B,CAAC;uBAAsB,CAAC;sBAAyF,CAAC;8BAA0C,CAAC;0BAA0B,CAAC;qCAAqC,CAAC;wBAAuB,CAAC;;kBAAyB,CAAC;qBAAc,CAAC;uBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;gBAAgjB,CAAC;oBAAmB,CAAC;kBAAkB,CAAC;mBAAmB,CAAC;wBAAwB,CAAC;;;;wBAAgM,CAAC;2BAAuB,CAAC;;;wBAAsK,CAAC;2BAAuB,CAAC;;;wBAA2C,CAAC;2BAAuB,CAAC;;;;;;;;;;;;;;;;;;;yDAXx5pB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;CAQ5B,CAAC"}
|
|
@@ -601,7 +601,17 @@ const getCliAgentsFile = () => `
|
|
|
601
601
|
|
|
602
602
|
## Typed database object
|
|
603
603
|
|
|
604
|
-
-
|
|
604
|
+
- Database handlers are schema-typed, but their permissions and transaction scope depend on where they come from. Default function \`dbo\` and \`clientDb\` use \`DBHandlerServerRestricted<DBGeneratedSchema>\`; privileged server \`dbo\` uses \`DBHandlerServer<DBGeneratedSchema>\`. A shared variable name or schema type does not imply shared privileges.
|
|
605
|
+
|
|
606
|
+
| Context | Handler and transaction scope |
|
|
607
|
+
| --- | --- |
|
|
608
|
+
| Default server function | \`dbo\` enforces the caller's table permissions. Use the separate \`withClientDbTx(async (dbx) => ...)\` context helper for permission-checked transactions; this \`dbo\` has no \`tx\`. |
|
|
609
|
+
| Explicitly unrestricted function | \`dbo\` and \`dbo.tx\` are privileged and bypass caller table permissions; \`db\` and \`sql\` expose raw SQL. Use only for deliberately privileged operations. |
|
|
610
|
+
| \`onMount\` | Privileged \`dbo\`; use \`dbo.tx\` for atomic server initialization work. It is not a caller-scoped handler to capture for later user requests. |
|
|
611
|
+
| Transactional table hook | Use supplied privileged \`dbx\` table handlers for related integrity writes in the existing mutation transaction. \`tx\` is the raw PostgreSQL transaction, not a table handler or transaction starter. |
|
|
612
|
+
| \`afterCommit\` hook | \`dbo\`/\`db\` are privileged, non-transactional handlers; the original transaction has ended. Resolve user handlers with \`getClientDBHandlers\` for permission-checked follow-up work. |
|
|
613
|
+
| Job \`run\` callback | \`dbo\` is privileged for \`runAs: "system"\` (default). For \`runAs: "user"\`, \`dbo\` enforces the user's current permissions and \`dbo.tx\` wraps \`withClientDbTx\`. |
|
|
614
|
+
|
|
605
615
|
- Keep the schema and context generics connected when moving code into separate modules. Use \`ProstglesOnMount<DBGeneratedSchema, typeof services>\` for \`onMount\`, \`TableHooks<DBGeneratedSchema, ProstglesContext<typeof services>>\` for hooks, and \`createFunctionGroupDefinerWithContext<DBGeneratedSchema, ProstglesContext<typeof services>>()\` or \`createFunctionsDefinerWithContext<DBGeneratedSchema, ProstglesContext<typeof services>>()\` for functions that use app services.
|
|
606
616
|
- Prefer typed \`dbo\` table handlers and let TypeScript infer values. Casts should be very rare; before adding one, check the table definition, JSONB schema, generated schema, and helper generic.
|
|
607
617
|
- Use the same table-handler APIs on a hook's \`dbx\` to keep work in the mutation transaction. Before writing per-row loops, manual joins, or raw SQL, check the installed \`prostgles-types\` declarations (\`TableHandler\`, \`SelectParams\`, \`FullFilter\`, \`InsertParams\`, \`InsertDataWithNested\`) and \`prostgles-server\` implementation for built-in support. Client and restricted server-function handlers expose only the operations allowed by their permissions.
|
|
@@ -611,7 +621,8 @@ const getCliAgentsFile = () => `
|
|
|
611
621
|
- The runtime also supports inserting a referenced row through an FK column, for example \`tasks.insert({ title: "Example", project_id: { name: "New project" } })\`. This creates a new project, not a link to an existing one; pass an existing ID to link instead. Relationship ambiguity and nested-insert permissions still apply. The installed types may not fully express FK-column nested objects: inspect the resolved declarations and propose fixing \`prostgles-types\`/\`prostgles-server\` rather than adding broad casts or app-level workarounds.
|
|
612
622
|
- Reads: use \`find\`, \`findOne\`, and \`count\` with typed filters and \`select\`, \`orderBy\`, \`limit\`, and \`offset\` options. Filters support operators such as \`$in\`, \`$ilike\`, \`$and\`, and \`$or\`. Request only needed columns and use \`count\` rather than fetching rows to count them.
|
|
613
623
|
- Relational reads and aggregates: selects support nested related-table results, explicit \`$leftJoin\`/\`$innerJoin\` paths, and aggregate functions such as \`$count\` and \`$sum\` with \`groupBy\`. Prefer these to per-row lookups or client-side aggregation; inspect \`SelectParams\` and installed examples for the exact syntax and join path when multiple foreign keys exist.
|
|
614
|
-
- For multi-step
|
|
624
|
+
- For multi-step writes in a default server function, use \`withClientDbTx\` (see Server-side functions). Use only the callback's handlers for transactional operations; calls through the outer \`dbo\`/\`clientDb\` do not join that transaction. Await every operation and do not retain transaction handlers after the callback finishes. Inside transactional hooks, use the existing \`dbx\` instead of starting another transaction. Raw SQL bypasses table-handler hooks and publish rules; prefer table handlers when they express the operation.
|
|
625
|
+
- \`getClientDBHandlers\` returns \`{ clientDb, withClientDbTx, clientSql, clientMethods, clientSchema }\`. \`clientDb\` exposes permitted table operations; \`withClientDbTx\` supplies the same permission checks inside a transaction; \`clientSql\` and \`clientMethods\` remain subject to SQL/function permissions. In an unrestricted function, \`await getClientDBHandlers(undefined)\` uses the bound caller (the argument is an optional permission scope). On a Prostgles instance or in \`afterCommit\`, use \`await getClientDBHandlers(clientReq, undefined)\` or \`await getClientDBHandlers({ userId }, undefined)\` with a trusted identity. These signatures are different; do not pass a user/request to the function-context version.
|
|
615
626
|
- Every table and view handler supports realtime \`subscribe\` and \`subscribeOne\`, for example \`dbo.orders.subscribe(filter, params, onData)\`. Prefer subscriptions over polling the database. Keep the returned subscription handler and call \`unsubscribe()\` during cleanup; an \`onMount\` callback can return that cleanup function.
|
|
616
627
|
|
|
617
628
|
## Project structure
|
|
@@ -785,6 +796,22 @@ const getCliAgentsFile = () => `
|
|
|
785
796
|
- Organize \`functions\` into groups shaped as \`{ userFilter, functions }\`. The group filter controls which authenticated users receive those functions.
|
|
786
797
|
- Create a schema-aware group helper with \`createFunctionGroupDefiner<DBGeneratedSchema>()\`. For function maps kept in separate modules, use \`createFunctionsDefiner<DBGeneratedSchema>()\` so names, database context, inputs, and return types remain inferred across imports.
|
|
787
798
|
- Define individual functions with \`defineFunction({ input, description, run })\`. Inputs use Prostgles JSONB field definitions and are validated before \`run\` executes.
|
|
788
|
-
-
|
|
799
|
+
- Keep functions restricted by default. Their \`run(input, { dbo, withClientDbTx, user, context })\` context already supports permission-checked reads, writes, and transactions. Omit \`unrestrictedDbAccess\` for ordinary user workflows; needing a transaction is not a reason to enable it. Missing tables or operations require appropriate \`accessControl\`, not a privilege escalation or type cast.
|
|
800
|
+
|
|
801
|
+
\`\`\`ts
|
|
802
|
+
// Within a schema-aware function group; assumes projects and project_members tables.
|
|
803
|
+
createProject: defineFunction({
|
|
804
|
+
input: { name: "string" },
|
|
805
|
+
run: async ({ name }, { withClientDbTx, user }) =>
|
|
806
|
+
withClientDbTx(async (dbx) => {
|
|
807
|
+
const project = await dbx.projects.insert({ name }, { returning: "*" });
|
|
808
|
+
await dbx.project_members.insert({ project_id: project.id, user_id: user.id });
|
|
809
|
+
return project;
|
|
810
|
+
}),
|
|
811
|
+
}),
|
|
812
|
+
\`\`\`
|
|
813
|
+
|
|
814
|
+
- \`withClientDbTx\` returns the callback result and commits only on success. Throw to roll back; even a caught table-request error marks the transaction for rollback. All operations still enforce the caller's table/field/row permissions and normal table hooks run. It requires runtime \`transactions: true\`, which the CLI app host already enables.
|
|
815
|
+
- Set \`unrestrictedDbAccess: true\` only for a deliberately privileged workflow that must exceed caller permissions. It replaces the context with privileged \`dbo\`, \`db\`, \`sql\`, and caller-bound \`getClientDBHandlers\`; \`withClientDbTx\` is not supplied directly. Restrict invocation with the function group's \`userFilter\` and validate the privileged action. For caller-scoped steps in such a function, obtain \`clientDb\`/\`withClientDbTx\` from \`await getClientDBHandlers(undefined)\`. Do not use privileged \`dbo.tx\` as a substitute for a permission-checked transaction.
|
|
789
816
|
- Keep secrets on the server and use database transactions for multi-step writes.`;
|
|
790
817
|
//# sourceMappingURL=cliTemplateFiles.js.map
|