@saltcorn/server 1.6.0-beta.1 → 1.6.0-beta.10
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/CHANGELOG.md +72 -3
- package/app.js +32 -12
- package/auth/admin.js +109 -22
- package/auth/routes.js +178 -61
- package/auth/testhelp.js +9 -19
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/_saltcorn_admin-models.models_snapshot.Snapshot.html +2 -2
- package/docs/classes/_saltcorn_common-code.relations_relation.Relation.html +3 -3
- package/docs/classes/_saltcorn_common-code.relations_relations_finder.RelationsFinder.html +5 -5
- package/docs/classes/_saltcorn_data.diagram_cy_raster.CytoscapeRaster.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_dummy_node.DummyNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_node.Node.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_page_node.PageNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_table_node.TableNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_trigger_node.TriggerNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_view_node.ViewNode.html +4 -4
- package/docs/classes/_saltcorn_data.mobile-mocks_node_async_hooks.AsyncLocalStorage.html +2 -2
- package/docs/classes/_saltcorn_data.models_crash.Crash.html +2 -2
- package/docs/classes/_saltcorn_data.models_eventlog.EventLog.html +2 -2
- package/docs/classes/_saltcorn_data.models_field.Field.html +9 -9
- package/docs/classes/_saltcorn_data.models_fieldrepeat.FieldRepeat.html +2 -2
- package/docs/classes/_saltcorn_data.models_file.File.html +21 -21
- package/docs/classes/_saltcorn_data.models_form.Form.html +2 -2
- package/docs/classes/_saltcorn_data.models_internal_mail_queue.MailQueue.html +4 -4
- package/docs/classes/_saltcorn_data.models_internal_push_message_helper.PushMessageHelper.html +7 -7
- package/docs/classes/_saltcorn_data.models_library.Library.html +2 -2
- package/docs/classes/_saltcorn_data.models_model.Model.html +2 -2
- package/docs/classes/_saltcorn_data.models_model_instance.ModelInstance.html +2 -2
- package/docs/classes/_saltcorn_data.models_notification.Notification.html +2 -2
- package/docs/classes/_saltcorn_data.models_page.Page.html +12 -11
- package/docs/classes/_saltcorn_data.models_page_group.PageGroup.html +16 -16
- package/docs/classes/_saltcorn_data.models_page_group_member.PageGroupMember.html +8 -8
- package/docs/classes/_saltcorn_data.models_plugin.Plugin.html +45 -10
- package/docs/classes/_saltcorn_data.models_role.Role.html +2 -2
- package/docs/classes/_saltcorn_data.models_table.Table.html +67 -65
- package/docs/classes/_saltcorn_data.models_table_constraints.TableConstraint.html +2 -2
- package/docs/classes/_saltcorn_data.models_tag.Tag.html +2 -2
- package/docs/classes/_saltcorn_data.models_tag_entry.TagEntry.html +2 -2
- package/docs/classes/_saltcorn_data.models_trigger.Trigger.html +22 -20
- package/docs/classes/_saltcorn_data.models_user.User.html +32 -32
- package/docs/classes/_saltcorn_data.models_view.View.html +16 -15
- package/docs/classes/_saltcorn_data.models_workflow.Workflow.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_run.WorkflowRun.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_step.WorkflowStep.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_trace.MetaData.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_trace.WorkflowTrace.html +2 -2
- package/docs/classes/_saltcorn_mobile-builder.mobile-builder.MobileBuilder.html +2 -3
- package/docs/classes/_saltcorn_mobile-builder.utils_capacitor-helper.CapacitorHelper.html +2 -2
- package/docs/enums/_saltcorn_common-code.relations_relation_types.RelationType.html +2 -2
- package/docs/enums/_saltcorn_common-code.relations_relation_types.ViewDisplayType.html +2 -2
- package/docs/functions/_saltcorn_admin-models.models_config-check.runConfigurationCheck.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.buildRelationPath.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.buildTableCaches.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.parseLegacyRelation.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.parseRelationPath.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.fixturesData.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withAnotherUserField.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withKeyFromLayerThree.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withKeyFromLayerTwo.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withMultipleInbounds.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withSecondTopicField.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withSimplePostTopicrelation.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.action_link.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.action_url.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.fill_presets.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.getForm.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.get_view_link_query.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.get_viewable_fields.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.get_viewable_fields_from_layout.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.make_link.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.objToQueryString.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.parse_view_select.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.setDateLocales.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.splitUniques.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.standardBlockDispatch.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.standardLayoutRowVisitor.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.transformForm.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.updateViewSelect.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.view_linker.html +1 -1
- package/docs/functions/_saltcorn_data.db_connect_mobile.getConnectObject.html +1 -1
- package/docs/functions/_saltcorn_data.db_reset_schema.reset.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_cy_generate_utils.generateCyCode.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_cy_generate_utils.genereateCyCfg.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.buildObjectTrees.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.extractFromColumns.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.extractFromLayout.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.extractViewToCreate.html +1 -1
- package/docs/functions/_saltcorn_data.migrate.create_blank_migration.html +1 -1
- package/docs/functions/_saltcorn_data.migrate.getMigrationsInDB.html +1 -1
- package/docs/functions/_saltcorn_data.migrate.migrate.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202102091312.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202210051058.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202210101540.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202304281224.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202307211459.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202502131103.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202508011455.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202510152058.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202603101553.sql_pg.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202604111200.js.html +1 -0
- package/docs/functions/_saltcorn_data.migrations_202604141200.js.html +1 -0
- package/docs/functions/_saltcorn_data.mobile-mocks_node_child_process.execSync.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs.createReadStream.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs.readdirSync.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs.writeFileSync.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.mkdir.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.readFile.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.readdir.html +1 -0
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.stat.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.unlink.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.writeFile.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_latest-version.latestVersion.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_v8.deserialize.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_v8.serialize.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_npm_env-paths.envPaths.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.get_predictor.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.run_jupyter_model.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.shorten_trackback.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.write_csv.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_async_json_stream.async_json_stream.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.aggregation_query_fields.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.getAggAndField.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.joinfield_renamer.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.process_aggregations.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.buildKeyFromRelative.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.copyObject.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.deleteObject.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.downloadBuffer.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getPublicFileUrl.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getResolvedBucket.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getS3Client.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getServeUrl.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getSignedFileUrl.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.headObject.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.isS3Enabled.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.listS3Folder.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.publicUrlToRelativePath.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.relativeKeyToPath.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.setObjectMetadata.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.uploadBuffer.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.boolExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.colorExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.floatExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.get_formula_examples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.intExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.stringExamples.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.build_schema_data.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.calcfldViewConfig.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.calcfldViewOptions.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.calcrelViewOptions.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.displayType.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.field_picker_fields.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.generate_joined_query.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.getActionConfigFields.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_child_views.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_inbound_relation_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_inbound_self_relation_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_link_view_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_many_to_many_relation_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_parent_views.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.initial_config_all_fields.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.json_list_to_external_table.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.link_view.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.pathToState.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.picked_fields_to_query.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.readState.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.readStateStrict.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.runCollabEvents.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.run_action_column.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.stateFieldsToQuery.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.stateFieldsToWhere.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.stateToQueryString.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.strictParseInt.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-testing.auto_test_plugin.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-testing.check_view_columns.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-testing.generate_attributes.html +1 -1
- package/docs/functions/_saltcorn_data.standard-menu.create_standard_menu.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsErrorMsg.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsErrorsMsg.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsRow.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsSet.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsType.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertsIsSuccessMessage.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertsObjectIsUser.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createAnotherUserField.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createKeyFromLevelTwo.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createLevelThreeInbound.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createMultipleInbounds.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createSecondTopicField.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.prepareEmployeeDepartment.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.prepareSimpleTopicPostRelation.html +1 -1
- package/docs/functions/_saltcorn_data.tests_remote_query_helper.deleteViewFromServer.html +1 -1
- package/docs/functions/_saltcorn_data.tests_remote_query_helper.prepareQueryEnviroment.html +1 -1
- package/docs/functions/_saltcorn_data.tests_remote_query_helper.sendViewToServer.html +1 -1
- package/docs/functions/_saltcorn_data.translate.hasLLM.html +1 -1
- package/docs/functions/_saltcorn_data.translate.translate.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.ftsFieldsSqlExpr.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.mkSelectOptions.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.mkWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.orderByIsObject.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.orderByIsOperator.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.prefixFieldsInWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlBinOp.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlFun.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlsanitize.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlsanitizeAllowDots.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.subSelectWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.enable_multi_tenant.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.getRequestContext.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.getTenantSchema.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.init.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.is_it_multi_tenant.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.runWithTenant.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.buildInsertBulkSql.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.buildInsertSql.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.commitAndBeginNewTransaction.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doCount.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doDeleteWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doListScTables.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doListTables.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doListUserDefinedTables.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.do_add_index.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.do_drop_index.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.mkVal.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.openOrUseTransaction.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.reprAsJson.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.slugify.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.tryCatchInTransaction.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.whenTransactionisFree.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.withTransaction.html +1 -1
- package/docs/functions/_saltcorn_markup.mktag.mkTag.html +1 -1
- package/docs/functions/_saltcorn_markup.tabs.tabs.html +1 -1
- package/docs/functions/_saltcorn_markup.workflow.renderWorkflow.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.androidFeatures.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.androidPermissions.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.buildTablesFile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyPrepopulatedDb.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyServerFiles.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyShareExtFiles.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copySiteLogo.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyTranslationFiles.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.createSqliteDb.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.extractDomain.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.generateAndroidVersionCode.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.hasAuthMethod.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyAndroidManifest.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyAppDelegate.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyConfigXml.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyGradleConfig.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyInfoPlist.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyShareViewController.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyXcodeProjectFile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepAppIcon.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareAppIcon.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareBuildDir.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareExportOptionsPlist.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareSplashIcon.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareSplashPage.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.runAddEntitlementsScript.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeCapacitorConfig.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeCfgFile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeDataExtractionRules.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeEntitlementsPlist.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeNetworkSecurityConfig.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writePodfile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writePrivacyInfo.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.bundleMobileAppCode.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.bundlePackagesAndPlugins.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.copyOptionalSource.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.copyPluginMobileAppDirs.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.copyPublicDirs.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.add_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.add_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.count.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.deleteWhere.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.drop_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.drop_reset_schema.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.drop_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.init.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.insert.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.insertRows.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.listScTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.listTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.listUserDefinedTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.query.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.select.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.selectMaybeOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.selectOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.setConnectionObject.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.tableExists.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.time.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.update.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.add_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.add_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.begin.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.changeConnection.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.close.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.commit.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.count.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.deleteWhere.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.dropTable.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.dropTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.drop_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.drop_reset_schema.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.drop_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.getVersion.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.get_db_filepath.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.get_sql_logging.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.init.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.insert.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.listScTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.listTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.listUserDefinedTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.query.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.rollback.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.select.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.selectMaybeOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.selectOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.set_sql_logging.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.sql_log.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.update.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.updateWhere.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOWithHtmlFile.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOfFieldViewEdit.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOfFieldViewShow.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOfPack.html +1 -1
- package/docs/functions/_saltcorn_types.common_types.instanceOfErrorMsg.html +1 -1
- package/docs/functions/_saltcorn_types.common_types.instanceOfSuccessMsg.html +1 -1
- package/docs/functions/_saltcorn_types.common_types.instanceOfType.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_field.instanceOfField.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_page.instanceOfPage.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_plugin.instanceOfPlugin.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_table.instanceOfTable.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_view.instanceOfView.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/_saltcorn_db-common.dbtypes.UserLike.html +2 -2
- package/docs/interfaces/_saltcorn_markup.types.TagExports.html +2 -2
- package/docs/interfaces/_saltcorn_mobile-builder.utils_common-build-utils.ScCapacitorConfig.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_field.AbstractField.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_field.AbstractFieldRepeat.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_form.AbstractForm.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_page.AbstractPage.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_page_group.AbstractPageGroup.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_page_group_member.AbstractPageGroupMember.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_plugin.AbstractPlugin.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_role.AbstractRole.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_table.AbstractTable.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_tag.AbstractTag.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_tag_entry.AbstractTagEntry.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_trigger.AbstractTrigger.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_user.AbstractUser.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_user.ForUserRequest.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_view.AbstractView.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_workflow.AbstractWorkflow.html +2 -2
- package/docs/modules/_saltcorn_data.html +1 -1
- package/docs/modules/_saltcorn_data.migrations_202604091531.html +1 -0
- package/docs/modules/_saltcorn_data.migrations_202604111200.html +1 -0
- package/docs/modules/_saltcorn_data.migrations_202604141200.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_node_fs.html +1 -1
- package/docs/modules/_saltcorn_data.mobile-mocks_node_fs_promises.html +1 -1
- package/docs/modules/_saltcorn_data.mobile-mocks_npm_npm-registry-fetch.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_saltcorn_admin-models-tenant.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_saltcorn_plugins-loader-plugin-installer.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_saltcorn_plugins-loader-stable-versioning.html +1 -0
- package/docs/modules/_saltcorn_data.models_index.discovery.html +1 -1
- package/docs/types/_saltcorn_data.diagram_node_extract_utils.ExtractOpts.html +2 -2
- package/docs/types/_saltcorn_data.diagram_node_extract_utils.ExtractResult.html +2 -2
- package/docs/types/_saltcorn_data.diagram_nodes_node.NodeType.html +1 -1
- package/docs/types/_saltcorn_data.models_config.ConfigTypes.html +1 -1
- package/docs/types/_saltcorn_data.models_config.SingleConfig.html +1 -1
- package/docs/types/_saltcorn_data.models_eventlog.EventLogCfg.html +2 -2
- package/docs/types/_saltcorn_data.models_file.FileCfg.html +2 -2
- package/docs/types/_saltcorn_data.models_form.AdditionalButton.html +1 -1
- package/docs/types/_saltcorn_data.models_form.FormCfg.html +2 -2
- package/docs/types/_saltcorn_data.models_internal_push_message_helper.MobileSubscription.html +2 -2
- package/docs/types/_saltcorn_data.models_internal_push_message_helper.WebPushSubscription.html +2 -2
- package/docs/types/_saltcorn_data.models_internal_s3_helpers.S3HeadResult.html +1 -1
- package/docs/types/_saltcorn_data.models_internal_s3_helpers.S3ListResult.html +2 -2
- package/docs/types/_saltcorn_data.models_page_group.ScreenInfoParams.html +2 -2
- package/docs/types/_saltcorn_data.models_table.ChildRelations.html +2 -2
- package/docs/types/_saltcorn_data.models_table.ParentRelations.html +2 -2
- package/docs/types/_saltcorn_data.models_table.RelationData.html +2 -2
- package/docs/types/_saltcorn_data.models_tag_entry.TagEntryCfg.html +1 -1
- package/docs/types/_saltcorn_data.models_view.FindViewsPred.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.AggregationOptions.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.CoordOpts.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.DatabaseClient.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.JoinField.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.JoinFields.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.JoinOptions.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.JsonPath.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.JsonPathElem.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.Operator.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.PartialSome.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.PrimaryKeyValue.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.Row.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.SelectOptions.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.StrongRow.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.SubselectOptions.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.Value.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.Where.html +2 -2
- package/docs/types/_saltcorn_db-common.sqlite-commons.SqlAndValues.html +2 -2
- package/docs/types/_saltcorn_db-common.types.DbExportsType.html +2 -2
- package/docs/types/_saltcorn_db-common.types.GenObj.html +1 -1
- package/docs/types/_saltcorn_markup.emergency_layout.WrapParams.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.CheckBoxGroupOpts.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.PaginationOpts.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.RadioGroupOpts.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.SearchBarOpts.html +2 -2
- package/docs/types/_saltcorn_markup.layout.RenderOpts-1.html +2 -2
- package/docs/types/_saltcorn_markup.layout.RenderOpts.html +2 -2
- package/docs/types/_saltcorn_markup.mjml-layout.RenderOpts.html +2 -2
- package/docs/types/_saltcorn_markup.table.HeadersParams.html +2 -2
- package/docs/types/_saltcorn_markup.table.OptsParams.html +2 -2
- package/docs/types/_saltcorn_markup.types.AttributeVal.html +1 -1
- package/docs/types/_saltcorn_markup.types.Attributes.html +2 -2
- package/docs/types/_saltcorn_markup.types.ClassVal.html +1 -1
- package/docs/types/_saltcorn_markup.types.Element.html +1 -1
- package/docs/types/_saltcorn_markup.types.Falsy.html +1 -1
- package/docs/types/_saltcorn_markup.types.StyleVal.html +1 -1
- package/docs/types/_saltcorn_markup.types.TagFunction.html +1 -1
- package/docs/types/_saltcorn_mobile-builder.mobile-builder.IosCfg.html +2 -2
- package/docs/types/_saltcorn_mobile-builder.utils_capacitor-helper.CapacitorCfg.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Action.html +5 -4
- package/docs/types/_saltcorn_types.base_types.AuthenticationMethod.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CalcJoinfield.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CapacitorPlugin.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CodePagePack.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Column.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ConnectObjType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ConnectedObjects.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CopilotSkill.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ErrorObj.html +2 -2
- package/docs/types/_saltcorn_types.base_types.FieldLike.html +1 -1
- package/docs/types/_saltcorn_types.base_types.FieldView.html +1 -1
- package/docs/types/_saltcorn_types.base_types.Header.html +2 -2
- package/docs/types/_saltcorn_types.base_types.JoinFieldOption.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Layout.html +1 -1
- package/docs/types/_saltcorn_types.base_types.MenuItem.html +2 -2
- package/docs/types/_saltcorn_types.base_types.MobileConfig.html +2 -3
- package/docs/types/_saltcorn_types.base_types.ModelPattern.html +6 -6
- package/docs/types/_saltcorn_types.base_types.Pack.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Plugin.html +1 -1
- package/docs/types/_saltcorn_types.base_types.PluginFunction.html +3 -2
- package/docs/types/_saltcorn_types.base_types.PluginLayout.html +2 -2
- package/docs/types/_saltcorn_types.base_types.PluginRoute.html +2 -2
- package/docs/types/_saltcorn_types.base_types.PluginSourceType.html +1 -1
- package/docs/types/_saltcorn_types.base_types.PluginType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.PluginWrap.html +1 -1
- package/docs/types/_saltcorn_types.base_types.PluginWrapArg.html +2 -2
- package/docs/types/_saltcorn_types.base_types.RelationOption.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Req.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Res.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ResultType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.RouteAction.html +1 -1
- package/docs/types/_saltcorn_types.base_types.RunExtra.html +1 -1
- package/docs/types/_saltcorn_types.base_types.SlugStepType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.StepResType.html +1 -1
- package/docs/types/_saltcorn_types.base_types.SubField.html +2 -2
- package/docs/types/_saltcorn_types.base_types.TableProvider.html +2 -2
- package/docs/types/_saltcorn_types.base_types.TableQuery.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Tablely.html +1 -1
- package/docs/types/_saltcorn_types.base_types.ViewTemplate.html +3 -2
- package/docs/types/_saltcorn_types.common_types.ErrorMessage.html +2 -2
- package/docs/types/_saltcorn_types.common_types.GenObj.html +1 -1
- package/docs/types/_saltcorn_types.common_types.ReqRes.html +2 -2
- package/docs/types/_saltcorn_types.common_types.ResultMessage.html +1 -1
- package/docs/types/_saltcorn_types.common_types.SuccessMessage.html +2 -2
- package/docs/types/_saltcorn_types.common_types.Type.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_event_log.EventLogPack.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_field.FieldCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_field.InputType.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_form.AdditionalButton.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_library.LibraryCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_library.LibraryPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model.ModelCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model.ModelPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model_instance.ModelInstanceCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model_instance.ModelInstancePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page.PageCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page.PagePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group.PageGroupCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group.PageGroupPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group_member.PageGroupMemberCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group_member.PageGroupMemberPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_plugin.PluginCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_plugin.PluginPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_role.RoleCfg.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_role.RolePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_table.TableCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_table.TablePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_tag.TagPack.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_tag_entry.TagEntryPack.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_trigger.TriggerCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_trigger.TriggerPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_view.ViewCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_view.ViewPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow.ConfigWorkflowStep.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow.RunResult.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_run.WorkflowRunCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_step.WorkflowStepCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_step.WorkflowStepPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_trace.WorkflowTraceCfg.html +2 -2
- package/docs/variables/_saltcorn_admin-models..backup.create_backup.html +1 -1
- package/docs/variables/_saltcorn_admin-models..backup.create_csv_from_rows.html +1 -1
- package/docs/variables/_saltcorn_admin-models..backup.restore.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.add_to_menu.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.can_install_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.fetch_available_packs.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.fetch_pack_by_name.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.install_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.library_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.model_instance_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.model_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.page_group_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.page_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.plugin_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.role_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.table_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.trigger_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.uninstall_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.view_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.copy_tenant_template.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.create_tenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.deleteTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.domain_sanitize.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.eachTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.getAllTenantRows.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.getAllTenants.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.insertTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.switchToTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models.models_backup.backup.html +1 -1
- package/docs/variables/_saltcorn_admin-models.pack.pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models.tenant.tenant.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedFive.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedFour.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedOne.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedSix.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedThree.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedTwo.html +1 -1
- package/docs/variables/_saltcorn_data..migrations.html +1 -1
- package/docs/variables/_saltcorn_data..plugin_helper.run_action_column.html +1 -1
- package/docs/variables/_saltcorn_data..utils.NotAuthorized.html +1 -1
- package/docs/variables/_saltcorn_data..utils.isPushEnabled.html +1 -1
- package/docs/variables/_saltcorn_data..utils.sleep.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_actions.actions.html +13 -13
- package/docs/variables/_saltcorn_data.base-plugin_fieldviews.fieldviews.html +3 -3
- package/docs/variables/_saltcorn_data.base-plugin_fileview.fileviews.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_index.index.html +15 -15
- package/docs/variables/_saltcorn_data.base-plugin_types.types.html +7 -7
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_edit.edit.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_feed.feed.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_filter.filter.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_list.list.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_listshowlist.listshowlist.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_room.room-1.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_room.room.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_show.show.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.edit_build_in_actions.html +1 -1
- package/docs/variables/_saltcorn_data.contract.contract.html +1 -1
- package/docs/variables/_saltcorn_data.db_connect.connect.html +1 -1
- package/docs/variables/_saltcorn_data.db_fa5-icons.fa5Icons.html +1 -1
- package/docs/variables/_saltcorn_data.db_fixtures.fixtures.html +1 -1
- package/docs/variables/_saltcorn_data.db_index.dbExports.html +1 -1
- package/docs/variables/_saltcorn_data.db_state.state.html +3 -3
- package/docs/variables/_saltcorn_data.migrations_202005141503.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202005241712.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202005251037.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202005282134.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202006022156.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202006051507.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202006240906.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202007091707.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202007202144.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008031500.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008051415.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008121149.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008121149.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009112140.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009112140.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009181655.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009221105.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009231331.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009301531.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202010231444.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202010251412.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202011021749.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202011051353.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202011111127.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202012011203.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202012100841.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202012281835.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202101061051.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202101141128.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102091312.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102101624.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102172148.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102261650.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106102347.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106112120.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106120012.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106120220.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106121701.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106121703.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106121703.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106251126.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202107281619.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202107302158.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202107302158.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202108022257.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202109201624.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202109301031.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202109301031.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202111290253.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202111290253.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202112282254.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202112282254.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207022002.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207252150.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207252150.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207261221.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202208101144.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202208101144.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202211040031.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202212112152.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202212112152.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202301130917.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303201126.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303201126.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303221944.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303221944.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202304281224.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202305031518.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202305031518.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202308211648.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202311011755.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202311011755.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202311231356.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202402071125.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202406260915.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412051957.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412051957.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412111526.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412111526.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501081226.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501081226.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501201239.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501262157.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202503071353.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202506050958.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202510110312.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202510110312.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202511081024.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202604091531.sql.html +1 -0
- package/docs/variables/_saltcorn_data.mobile-mocks_npm_npm-registry-fetch.npmRegistryFetch.html +1 -0
- package/docs/variables/_saltcorn_data.mobile-mocks_saltcorn_html-pdf-node.htmlPdfNode.html +1 -1
- package/docs/variables/_saltcorn_data.models_config.configExports.html +1 -1
- package/docs/variables/_saltcorn_data.models_discovery.discovery.html +6 -2
- package/docs/variables/_saltcorn_data.models_email.email.html +3 -3
- package/docs/variables/_saltcorn_data.models_expression.expression.html +3 -3
- package/docs/variables/_saltcorn_data.models_index.config.available_languages.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.check_email_mask.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.configTypes.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.deleteConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.getAllConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.getConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.get_base_url.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.get_latest_npm_version.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.remove_from_menu.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.save_menu_items.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.setConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.discover_tables.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.discoverable_tables.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.findType.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.get_existing_views.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.implement_discovery.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.make_field.html +1 -0
- package/docs/variables/_saltcorn_data.models_index.discovery.reconcile_table.html +7 -0
- package/docs/variables/_saltcorn_data.models_index.email.getMailTransport.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.email.send_verification_email.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.email.viewToEmailHtml.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.apply_calculated_fields.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.apply_calculated_fields_stored.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.eval_expression.html +9 -1
- package/docs/variables/_saltcorn_data.models_index.expression.expressionValidator.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.get_async_expression_function.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.get_expression_function.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.jsexprToWhere.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.recalculate_for_stored.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.transform_for_async.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.eachView.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.getStringsForI18n.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.getViews.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.translateLayout.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.traverse.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.traverseSync.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.all_views.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.fill_table_row.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.initial_view.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.random_table.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.scheduler.runScheduler.html +1 -1
- package/docs/variables/_saltcorn_data.models_layout.layout.html +1 -1
- package/docs/variables/_saltcorn_data.models_random.random.html +1 -1
- package/docs/variables/_saltcorn_data.models_scheduler.scheduler.html +1 -1
- package/docs/variables/_saltcorn_data.plugin-helper.add_free_variables_to_joinfields.html +1 -1
- package/docs/variables/_saltcorn_data.tests_mocks.mocks.html +1 -1
- package/docs/variables/_saltcorn_data.tests_remote_query_helper.renderEditInEditConfig.html +1 -1
- package/docs/variables/_saltcorn_data.utils.utils.html +11 -5
- package/docs/variables/_saltcorn_data.web-mobile-commons.webMobileCommons.html +1 -1
- package/docs/variables/_saltcorn_db-common.internal.dbCommonModulePath.html +1 -1
- package/docs/variables/_saltcorn_db-common.multi-tenant.tenantNamespace.html +1 -1
- package/docs/variables/_saltcorn_db-common.tenants.tenants.html +1 -1
- package/docs/variables/_saltcorn_markup..export_.html +1 -1
- package/docs/variables/_saltcorn_markup.builder.builder.html +1 -1
- package/docs/variables/_saltcorn_markup.emergency_layout.EmergencyLayoutExports.html +1 -1
- package/docs/variables/_saltcorn_markup.form.form.html +1 -1
- package/docs/variables/_saltcorn_markup.helpers.HelpersExports.html +1 -1
- package/docs/variables/_saltcorn_markup.layout.LayoutExports-1.html +1 -1
- package/docs/variables/_saltcorn_markup.layout.LayoutExports.html +1 -1
- package/docs/variables/_saltcorn_markup.layout_utils.layoutUtils.html +1 -1
- package/docs/variables/_saltcorn_markup.mjml-layout.LayoutExports.html +1 -1
- package/docs/variables/_saltcorn_markup.mjml-tags.tagsExports.html +1 -1
- package/docs/variables/_saltcorn_markup.table.TableExports.html +1 -1
- package/docs/variables/_saltcorn_markup.tags.tagsExports.html +1 -1
- package/docs/variables/_saltcorn_types..generators.generateBool.html +1 -1
- package/docs/variables/_saltcorn_types..generators.generateString.html +1 -1
- package/docs/variables/_saltcorn_types..generators.num_between.html +1 -1
- package/docs/variables/_saltcorn_types..generators.oneOf.html +1 -1
- package/docs/variables/_saltcorn_types.generators.generators.html +1 -1
- package/errors.js +4 -4
- package/help/Event channel and payload.tmd +5 -0
- package/help/Extra state formula.tmd +1 -1
- package/help/Group by formula.tmd +15 -0
- package/help/JavaScript action code.tmd +5 -1
- package/load_plugins.js +7 -398
- package/locales/ar.json +262 -1
- package/locales/de.json +264 -3
- package/locales/en.json +29 -9
- package/locales/es.json +265 -4
- package/locales/fr.json +263 -2
- package/locales/ur.json +273 -4
- package/markup/admin.js +14 -9
- package/markup/expression_blurb.js +1 -1
- package/package.json +14 -14
- package/public/monaco/loader.js +0 -2
- package/public/popper.min.js +0 -1
- package/public/saltcorn-builder.css +82 -0
- package/public/saltcorn-common.js +36 -2
- package/public/saltcorn.css +138 -0
- package/public/saltcorn.js +1457 -29
- package/public/socket.io.min.js +0 -1
- package/public/tabulator.min.js +2 -3
- package/public/tabulator_bootstrap4.min.css +1 -2
- package/public/tabulator_bootstrap5.min.css +1 -2
- package/routes/actions.js +224 -22
- package/routes/admin.js +71 -12
- package/routes/api.js +96 -60
- package/routes/delete.js +2 -5
- package/routes/edit.js +2 -5
- package/routes/entities.js +65 -1245
- package/routes/eventlog.js +47 -0
- package/routes/fields.js +125 -14
- package/routes/files.js +36 -4
- package/routes/homepage.js +4 -1
- package/routes/list.js +69 -11
- package/routes/packs.js +2 -3
- package/routes/page.js +18 -1
- package/routes/pageedit.js +1 -0
- package/routes/plugins.js +56 -21
- package/routes/scapi.js +1 -2
- package/routes/sync.js +183 -54
- package/routes/tables.js +492 -2
- package/routes/tenant.js +3 -3
- package/routes/utils.js +17 -6
- package/routes/viewedit.js +10 -6
- package/serve.js +35 -23
- package/tests/admin.test.js +5 -5
- package/tests/api.test.js +424 -2
- package/tests/auth.test.js +230 -1
- package/tests/fields.test.js +16 -0
- package/tests/files.test.js +43 -7
- package/tests/page.test.js +53 -0
- package/tests/plugin_install.test.js +132 -13
- package/tests/plugins.test.js +1 -2
- package/tests/sync.test.js +900 -18
- package/tests/view.test.js +32 -0
- package/wrapper.js +3 -1
package/routes/plugins.js
CHANGED
|
@@ -34,7 +34,8 @@ const {
|
|
|
34
34
|
plugin_viewtemplates_info_card,
|
|
35
35
|
showRepository,
|
|
36
36
|
} = require("../markup/plugin-store");
|
|
37
|
-
const
|
|
37
|
+
const MarkdownIt = require("markdown-it"),
|
|
38
|
+
md = new MarkdownIt();
|
|
38
39
|
const {
|
|
39
40
|
h5,
|
|
40
41
|
a,
|
|
@@ -57,6 +58,8 @@ const {
|
|
|
57
58
|
text,
|
|
58
59
|
script,
|
|
59
60
|
domReady,
|
|
61
|
+
details,
|
|
62
|
+
summary,
|
|
60
63
|
} = require("@saltcorn/markup/tags");
|
|
61
64
|
const { search_bar } = require("@saltcorn/markup/helpers");
|
|
62
65
|
const fs = require("fs");
|
|
@@ -68,7 +71,6 @@ const {
|
|
|
68
71
|
removeNonWordChars,
|
|
69
72
|
getFetchProxyOptions,
|
|
70
73
|
} = require("@saltcorn/data/utils");
|
|
71
|
-
const { loadAllPlugins } = require("../load_plugins");
|
|
72
74
|
const npmFetch = require("npm-registry-fetch");
|
|
73
75
|
const PluginInstaller = require("@saltcorn/plugins-loader/plugin_installer");
|
|
74
76
|
const {
|
|
@@ -191,7 +193,17 @@ const get_store_items = async (req) => {
|
|
|
191
193
|
if (msgs.length > 0) req.flash("warning", msgs.join("<br>"));
|
|
192
194
|
const packs_available = await fetch_available_packs();
|
|
193
195
|
const packs_installed = getState().getConfig("installed_packs", []);
|
|
194
|
-
const
|
|
196
|
+
const tenants_install_git = getRootState().getConfig(
|
|
197
|
+
"tenants_install_git",
|
|
198
|
+
false
|
|
199
|
+
);
|
|
200
|
+
const isGitBlocked = (p) =>
|
|
201
|
+
!isRoot &&
|
|
202
|
+
!tenants_install_git &&
|
|
203
|
+
(p.source === "git" || p.source === "github");
|
|
204
|
+
const installed_plugin_names = installed_plugins
|
|
205
|
+
.filter((p) => !isGitBlocked(p))
|
|
206
|
+
.map((p) => p.name);
|
|
195
207
|
const store_plugin_names = instore.map((p) => p.name);
|
|
196
208
|
const plugins_item = instore
|
|
197
209
|
.map((plugin) => ({
|
|
@@ -200,6 +212,7 @@ const get_store_items = async (req) => {
|
|
|
200
212
|
plugin: true,
|
|
201
213
|
description: plugin.description,
|
|
202
214
|
documentation_link: plugin.documentation_link,
|
|
215
|
+
contents: plugin.contents,
|
|
203
216
|
has_theme: plugin.has_theme,
|
|
204
217
|
has_auth: plugin.has_auth,
|
|
205
218
|
unsafe: plugin.unsafe,
|
|
@@ -210,7 +223,12 @@ const get_store_items = async (req) => {
|
|
|
210
223
|
}))
|
|
211
224
|
.filter((p) => !p.unsafe || isRoot || tenants_unsafe_plugins);
|
|
212
225
|
const local_logins = installed_plugins
|
|
213
|
-
.filter(
|
|
226
|
+
.filter(
|
|
227
|
+
(p) =>
|
|
228
|
+
!store_plugin_names.includes(p.name) &&
|
|
229
|
+
p.name !== "base" &&
|
|
230
|
+
!isGitBlocked(p)
|
|
231
|
+
)
|
|
214
232
|
.map((plugin) => ({
|
|
215
233
|
name: plugin.name,
|
|
216
234
|
installed: true,
|
|
@@ -310,6 +328,9 @@ const store_item_html = (req) => (item) => ({
|
|
|
310
328
|
item.ready_for_mobile && badge(req.__("Mobile"))
|
|
311
329
|
),
|
|
312
330
|
div(item.description || ""),
|
|
331
|
+
item.contents
|
|
332
|
+
? details(summary(req.__("Detailed contents")), md.render(item.contents))
|
|
333
|
+
: "",
|
|
313
334
|
item.documentation_link
|
|
314
335
|
? div(
|
|
315
336
|
a(
|
|
@@ -454,7 +475,11 @@ const match_string = (s, q) => {
|
|
|
454
475
|
* @returns {boolean}
|
|
455
476
|
*/
|
|
456
477
|
const satisfy_q = (p, q) => {
|
|
457
|
-
return
|
|
478
|
+
return (
|
|
479
|
+
match_string(p.name, q) ||
|
|
480
|
+
match_string(p.description, q) ||
|
|
481
|
+
match_string(p.contents, q)
|
|
482
|
+
);
|
|
458
483
|
};
|
|
459
484
|
|
|
460
485
|
/**
|
|
@@ -663,7 +688,7 @@ router.get(
|
|
|
663
688
|
const tags = pkgInfo["dist-tags"] || {};
|
|
664
689
|
let selected = null;
|
|
665
690
|
if (getState().plugins[plugin.name]) {
|
|
666
|
-
const mod = await
|
|
691
|
+
const mod = await Plugin.requirePlugin(plugin);
|
|
667
692
|
if (mod) selected = mod.version;
|
|
668
693
|
}
|
|
669
694
|
if (!selected) selected = versions[versions.length - 1];
|
|
@@ -702,7 +727,8 @@ router.get(
|
|
|
702
727
|
label: version,
|
|
703
728
|
selected: version === selected,
|
|
704
729
|
})
|
|
705
|
-
)
|
|
730
|
+
)
|
|
731
|
+
.reverse()
|
|
706
732
|
),
|
|
707
733
|
// tag
|
|
708
734
|
label(
|
|
@@ -929,7 +955,7 @@ router.post(
|
|
|
929
955
|
const newCfg = wfres.cleanup ? wfres.context : wfres;
|
|
930
956
|
plugin.configuration = newCfg;
|
|
931
957
|
await plugin.upsert();
|
|
932
|
-
await
|
|
958
|
+
await Plugin.loadPlugin(plugin);
|
|
933
959
|
const instore = await Plugin.store_plugins_available();
|
|
934
960
|
const store_plugin = instore.find((p) => p.name === plugin.name);
|
|
935
961
|
if (store_plugin && store_plugin.has_auth) flash_restart(req);
|
|
@@ -967,7 +993,7 @@ router.post(
|
|
|
967
993
|
...step.renderForm.values,
|
|
968
994
|
};
|
|
969
995
|
await plugin.upsert();
|
|
970
|
-
await
|
|
996
|
+
await Plugin.loadPlugin(plugin);
|
|
971
997
|
|
|
972
998
|
getState().processSend({
|
|
973
999
|
refresh_plugin_cfg: plugin.name,
|
|
@@ -1266,7 +1292,7 @@ router.get(
|
|
|
1266
1292
|
res.redirect("/plugins");
|
|
1267
1293
|
return;
|
|
1268
1294
|
}
|
|
1269
|
-
const mod = await
|
|
1295
|
+
const mod = await Plugin.requirePlugin(plugin_db);
|
|
1270
1296
|
const store_items = await get_store_items(req);
|
|
1271
1297
|
const store_item = store_items.find((item) => item.name === name);
|
|
1272
1298
|
const update_permitted = plugin_db.source === "npm";
|
|
@@ -1274,16 +1300,17 @@ router.get(
|
|
|
1274
1300
|
let latest =
|
|
1275
1301
|
update_permitted &&
|
|
1276
1302
|
(await get_latest_npm_version(plugin_db.location, 1000));
|
|
1277
|
-
let
|
|
1303
|
+
let isNpm = plugin_db.source === "npm";
|
|
1304
|
+
let engineInfos = await Plugin.getEngineInfos(plugin_db); // with cache
|
|
1278
1305
|
let forceFetch = true;
|
|
1279
|
-
if (latest && !engineInfos[latest]) {
|
|
1280
|
-
engineInfos = await
|
|
1306
|
+
if (latest && !engineInfos[latest] && isNpm) {
|
|
1307
|
+
engineInfos = await Plugin.getEngineInfos(plugin_db, forceFetch);
|
|
1281
1308
|
forceFetch = false;
|
|
1282
1309
|
}
|
|
1283
1310
|
if (latest && !isVersionSupported(latest, engineInfos)) {
|
|
1284
1311
|
latest = supportedVersion(
|
|
1285
1312
|
latest,
|
|
1286
|
-
await
|
|
1313
|
+
await Plugin.getEngineInfos(plugin_db, forceFetch)
|
|
1287
1314
|
);
|
|
1288
1315
|
}
|
|
1289
1316
|
const can_update = update_permitted && latest && mod.version !== latest;
|
|
@@ -1358,6 +1385,12 @@ router.get(
|
|
|
1358
1385
|
)
|
|
1359
1386
|
)
|
|
1360
1387
|
: null,
|
|
1388
|
+
store_item && store_item.contents
|
|
1389
|
+
? tr(
|
|
1390
|
+
th(req.__("Detailed contents")),
|
|
1391
|
+
td(md.render(store_item.contents))
|
|
1392
|
+
)
|
|
1393
|
+
: null,
|
|
1361
1394
|
pkgjson && pkgjson.repository
|
|
1362
1395
|
? tr(th(req.__("Repository")), td(showRepository(pkgjson.repository)))
|
|
1363
1396
|
: null
|
|
@@ -1432,7 +1465,7 @@ router.get(
|
|
|
1432
1465
|
const schema = db.getTenantSchema();
|
|
1433
1466
|
if (schema === db.connectObj.default_schema) {
|
|
1434
1467
|
await upgrade_all_tenants_plugins((p, f, forceFetch) =>
|
|
1435
|
-
|
|
1468
|
+
Plugin.loadPlugin(p, f, forceFetch)
|
|
1436
1469
|
);
|
|
1437
1470
|
req.flash(
|
|
1438
1471
|
"success",
|
|
@@ -1444,11 +1477,11 @@ router.get(
|
|
|
1444
1477
|
const installed_plugins = await Plugin.find({});
|
|
1445
1478
|
for (const plugin of installed_plugins) {
|
|
1446
1479
|
await plugin.upgrade_version((p, f, forceFetch) =>
|
|
1447
|
-
|
|
1480
|
+
Plugin.loadPlugin(p, f, forceFetch)
|
|
1448
1481
|
);
|
|
1449
1482
|
}
|
|
1450
1483
|
req.flash("success", req.__(`Modules up-to-date`));
|
|
1451
|
-
await restart_tenant(loadAllPlugins);
|
|
1484
|
+
await restart_tenant(Plugin.loadAllPlugins);
|
|
1452
1485
|
getState().processSend({
|
|
1453
1486
|
restart_tenant: true,
|
|
1454
1487
|
tenant: db.getTenantSchema(),
|
|
@@ -1495,10 +1528,10 @@ router.get(
|
|
|
1495
1528
|
const { name } = req.params;
|
|
1496
1529
|
|
|
1497
1530
|
const plugin = await Plugin.findOne({ name });
|
|
1498
|
-
const versions = await
|
|
1531
|
+
const versions = await Plugin.getEngineInfos(plugin, true);
|
|
1499
1532
|
|
|
1500
1533
|
await plugin.upgrade_version(
|
|
1501
|
-
(p, f) =>
|
|
1534
|
+
(p, f) => Plugin.loadPlugin(p, f),
|
|
1502
1535
|
supportedVersion("latest", versions, require("../package.json").version)
|
|
1503
1536
|
);
|
|
1504
1537
|
req.flash("success", req.__(`Module up-to-date`));
|
|
@@ -1531,7 +1564,7 @@ router.post(
|
|
|
1531
1564
|
res.redirect(`/plugins`);
|
|
1532
1565
|
} else {
|
|
1533
1566
|
try {
|
|
1534
|
-
const msgs = await
|
|
1567
|
+
const msgs = await Plugin.loadAndSaveNewPlugin(
|
|
1535
1568
|
plugin,
|
|
1536
1569
|
schema === db.connectObj.default_schema || plugin.source === "github"
|
|
1537
1570
|
);
|
|
@@ -1639,7 +1672,7 @@ router.post(
|
|
|
1639
1672
|
|
|
1640
1673
|
let msgs = null;
|
|
1641
1674
|
try {
|
|
1642
|
-
msgs = await
|
|
1675
|
+
msgs = await Plugin.loadAndSaveNewPlugin(
|
|
1643
1676
|
plugin,
|
|
1644
1677
|
forceReInstall,
|
|
1645
1678
|
undefined,
|
|
@@ -1679,3 +1712,5 @@ router.post(
|
|
|
1679
1712
|
}
|
|
1680
1713
|
})
|
|
1681
1714
|
);
|
|
1715
|
+
|
|
1716
|
+
router.get_store_items = get_store_items;
|
package/routes/scapi.js
CHANGED
|
@@ -31,7 +31,6 @@ const {
|
|
|
31
31
|
add_tenant,
|
|
32
32
|
} = require("@saltcorn/data/db/state");
|
|
33
33
|
const db = require("@saltcorn/data/db");
|
|
34
|
-
const { loadAllPlugins } = require("../load_plugins");
|
|
35
34
|
const { text } = require("@saltcorn/markup/tags");
|
|
36
35
|
|
|
37
36
|
/**
|
|
@@ -346,7 +345,7 @@ router.post(
|
|
|
346
345
|
if (new_tenant) {
|
|
347
346
|
add_tenant(new_tenant);
|
|
348
347
|
|
|
349
|
-
await db.runWithTenant(new_tenant, loadAllPlugins);
|
|
348
|
+
await db.runWithTenant(new_tenant, Plugin.loadAllPlugins);
|
|
350
349
|
|
|
351
350
|
process_send({ createTenant: new_tenant });
|
|
352
351
|
}
|
package/routes/sync.js
CHANGED
|
@@ -5,6 +5,10 @@ const { getState } = require("@saltcorn/data/db/state");
|
|
|
5
5
|
const Table = require("@saltcorn/data/models/table");
|
|
6
6
|
const File = require("@saltcorn/data/models/file");
|
|
7
7
|
const { getSafeSaltcornCmd } = require("@saltcorn/data/utils");
|
|
8
|
+
const {
|
|
9
|
+
freeVariables,
|
|
10
|
+
add_free_variables_to_joinfields,
|
|
11
|
+
} = require("@saltcorn/data/models/expression");
|
|
8
12
|
const { spawn, spawnSync } = require("child_process");
|
|
9
13
|
const path = require("path");
|
|
10
14
|
const fs = require("fs").promises;
|
|
@@ -14,6 +18,7 @@ module.exports = router;
|
|
|
14
18
|
|
|
15
19
|
router.get(
|
|
16
20
|
"/sync_timestamp",
|
|
21
|
+
loggedIn,
|
|
17
22
|
error_catcher(async (req, res) => {
|
|
18
23
|
try {
|
|
19
24
|
res.json({ syncTimestamp: (await db.time()).valueOf() });
|
|
@@ -24,6 +29,34 @@ router.get(
|
|
|
24
29
|
})
|
|
25
30
|
);
|
|
26
31
|
|
|
32
|
+
// Apply ownership_formula filter to rows fetched by getSyncRows.
|
|
33
|
+
// For formulas that reference join fields, resolves them via a second
|
|
34
|
+
// getJoinedRows pass bounded to the PKs already in the result set.
|
|
35
|
+
const applyOwnershipFormula = async (rows, table, user) => {
|
|
36
|
+
if (!rows.length) return rows;
|
|
37
|
+
const pkName = table.pk_name;
|
|
38
|
+
const joinFields = {};
|
|
39
|
+
add_free_variables_to_joinfields(
|
|
40
|
+
freeVariables(table.ownership_formula),
|
|
41
|
+
joinFields,
|
|
42
|
+
table.getFields()
|
|
43
|
+
);
|
|
44
|
+
let rowMap = null;
|
|
45
|
+
if (Object.keys(joinFields).length > 0) {
|
|
46
|
+
const pks = rows.map((r) => r[pkName]);
|
|
47
|
+
const joinedRows = await table.getJoinedRows({
|
|
48
|
+
where: { [pkName]: { in: pks } },
|
|
49
|
+
joinFields,
|
|
50
|
+
});
|
|
51
|
+
rowMap = Object.fromEntries(joinedRows.map((r) => [r[pkName], r]));
|
|
52
|
+
}
|
|
53
|
+
// table.ownership_formula
|
|
54
|
+
return rows.filter((row) => {
|
|
55
|
+
const evalRow = rowMap ? rowMap[row[pkName]] ?? row : row;
|
|
56
|
+
return table.is_owner(user, evalRow);
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
27
60
|
const getSyncRows = async (syncInfo, table, syncUntil, user) => {
|
|
28
61
|
const tblName = table.name;
|
|
29
62
|
const pkName = table.pk_name;
|
|
@@ -48,64 +81,101 @@ const getSyncRows = async (syncInfo, table, syncUntil, user) => {
|
|
|
48
81
|
}
|
|
49
82
|
ownerFieldName = ownerField.name;
|
|
50
83
|
}
|
|
84
|
+
|
|
85
|
+
// Time-based composite cursor: (lastModifiedAt ms, lastRef string).
|
|
86
|
+
// Works for both integer and UUID primary keys.
|
|
87
|
+
const lastModifiedAt = Number(syncInfo.lastModifiedAt ?? 0);
|
|
88
|
+
if (!Number.isInteger(lastModifiedAt) || lastModifiedAt < 0)
|
|
89
|
+
throw new Error("Invalid lastModifiedAt");
|
|
90
|
+
const lastRef = String(syncInfo.lastRef ?? "");
|
|
91
|
+
|
|
92
|
+
const syncUntilMs = new Date(syncUntil).valueOf();
|
|
93
|
+
if (!Number.isFinite(syncUntilMs)) throw new Error("Invalid syncUntil");
|
|
94
|
+
|
|
95
|
+
const userId = user?.id !== undefined ? parseInt(user.id, 10) : null;
|
|
96
|
+
if (ownerFieldName && !Number.isFinite(userId))
|
|
97
|
+
throw new Error("Invalid user id");
|
|
98
|
+
|
|
51
99
|
const schema = db.getTenantSchemaPrefix();
|
|
52
100
|
if (!syncInfo.syncFrom) {
|
|
101
|
+
// First sync: all non-deleted rows after the cursor, ordered by
|
|
102
|
+
// (last_modified, ref) so pagination is stable across PK types.
|
|
103
|
+
const params = [lastModifiedAt / 1000.0, lastRef];
|
|
104
|
+
const ownerClause = ownerFieldName
|
|
105
|
+
? `and data_tbl."${db.sqlsanitize(ownerFieldName)}" = $3`
|
|
106
|
+
: "";
|
|
107
|
+
if (ownerFieldName) params.push(userId);
|
|
53
108
|
const { rows } = await db.query(
|
|
54
|
-
`select
|
|
55
|
-
info_tbl.ref "_sync_info_tbl_ref_",
|
|
56
|
-
info_tbl.last_modified "_sync_info_tbl_last_modified_",
|
|
57
|
-
info_tbl.deleted "_sync_info_tbl_deleted_",
|
|
109
|
+
`select
|
|
110
|
+
COALESCE(info_tbl.ref, data_tbl."${db.sqlsanitize(pkName)}"::text) "_sync_info_tbl_ref_",
|
|
111
|
+
info_tbl.last_modified "_sync_info_tbl_last_modified_",
|
|
112
|
+
COALESCE(info_tbl.deleted, false) "_sync_info_tbl_deleted_",
|
|
58
113
|
data_tbl.*
|
|
59
|
-
from ${schema}"${db.sqlsanitize(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
114
|
+
from ${schema}"${db.sqlsanitize(tblName)}_sync_info" "info_tbl"
|
|
115
|
+
right join "${db.sqlsanitize(tblName)}" "data_tbl"
|
|
116
|
+
on info_tbl.ref = data_tbl."${db.sqlsanitize(pkName)}"::text
|
|
117
|
+
and info_tbl.deleted = false
|
|
118
|
+
where (
|
|
119
|
+
COALESCE(info_tbl.last_modified, to_timestamp(0)),
|
|
120
|
+
COALESCE(info_tbl.ref, data_tbl."${db.sqlsanitize(pkName)}"::text)
|
|
121
|
+
) > (to_timestamp($1), $2)
|
|
122
|
+
${ownerClause}
|
|
123
|
+
order by
|
|
124
|
+
COALESCE(info_tbl.last_modified, to_timestamp(0)),
|
|
125
|
+
COALESCE(info_tbl.ref, data_tbl."${db.sqlsanitize(pkName)}"::text)`,
|
|
126
|
+
params
|
|
70
127
|
);
|
|
71
128
|
for (const row of rows) {
|
|
72
129
|
if (row._sync_info_tbl_last_modified_)
|
|
73
130
|
row._sync_info_tbl_last_modified_ =
|
|
74
131
|
row._sync_info_tbl_last_modified_.valueOf();
|
|
75
|
-
else row._sync_info_tbl_last_modified_ =
|
|
132
|
+
else row._sync_info_tbl_last_modified_ = syncUntilMs;
|
|
76
133
|
row._sync_info_tbl_ref_ = row[pkName];
|
|
77
134
|
}
|
|
135
|
+
if (table.ownership_formula && role > minRole)
|
|
136
|
+
return applyOwnershipFormula(rows, table, user);
|
|
78
137
|
return rows;
|
|
79
138
|
} else {
|
|
139
|
+
const syncFromMs = new Date(syncInfo.syncFrom).valueOf();
|
|
140
|
+
if (!Number.isFinite(syncFromMs)) throw new Error("Invalid syncFrom");
|
|
141
|
+
|
|
142
|
+
// Incremental sync: rows changed in the time window, paged by
|
|
143
|
+
// (last_modified, ref) within the window.
|
|
144
|
+
const params = [
|
|
145
|
+
syncFromMs / 1000.0,
|
|
146
|
+
syncUntilMs / 1000.0,
|
|
147
|
+
lastModifiedAt / 1000.0,
|
|
148
|
+
lastRef,
|
|
149
|
+
];
|
|
150
|
+
const ownerClause = ownerFieldName
|
|
151
|
+
? `and data_tbl."${db.sqlsanitize(ownerFieldName)}" = $5`
|
|
152
|
+
: "";
|
|
153
|
+
if (ownerFieldName) params.push(userId);
|
|
80
154
|
const { rows } = await db.query(
|
|
81
|
-
`select
|
|
82
|
-
info_tbl.ref "_sync_info_tbl_ref_",
|
|
83
|
-
info_tbl.last_modified "_sync_info_tbl_last_modified_",
|
|
155
|
+
`select
|
|
156
|
+
info_tbl.ref "_sync_info_tbl_ref_",
|
|
157
|
+
info_tbl.last_modified "_sync_info_tbl_last_modified_",
|
|
84
158
|
info_tbl.deleted "_sync_info_tbl_deleted_",
|
|
85
159
|
data_tbl.*
|
|
86
|
-
from ${schema}"${db.sqlsanitize(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
new Date(syncUntil).valueOf() / 1000.0
|
|
97
|
-
})
|
|
98
|
-
and info_tbl.deleted = false
|
|
99
|
-
and info_tbl.ref > ${syncInfo.maxLoadedId}
|
|
100
|
-
${ownerFieldName ? `and data_tbl."${ownerFieldName}" = ${user.id}` : ""}
|
|
101
|
-
order by info_tbl.ref`
|
|
160
|
+
from ${schema}"${db.sqlsanitize(tblName)}_sync_info" "info_tbl"
|
|
161
|
+
join ${schema}"${db.sqlsanitize(tblName)}" "data_tbl"
|
|
162
|
+
on info_tbl.ref = data_tbl."${db.sqlsanitize(pkName)}"::text
|
|
163
|
+
where date_trunc('milliseconds', info_tbl.last_modified) > to_timestamp($1)
|
|
164
|
+
and date_trunc('milliseconds', info_tbl.last_modified) < to_timestamp($2)
|
|
165
|
+
and info_tbl.deleted = false
|
|
166
|
+
and (info_tbl.last_modified, info_tbl.ref) > (to_timestamp($3), $4)
|
|
167
|
+
${ownerClause}
|
|
168
|
+
order by info_tbl.last_modified, info_tbl.ref`,
|
|
169
|
+
params
|
|
102
170
|
);
|
|
103
171
|
for (const row of rows) {
|
|
104
172
|
if (row._sync_info_tbl_last_modified_)
|
|
105
173
|
row._sync_info_tbl_last_modified_ =
|
|
106
174
|
row._sync_info_tbl_last_modified_.valueOf();
|
|
107
|
-
else row._sync_info_tbl_last_modified_ =
|
|
175
|
+
else row._sync_info_tbl_last_modified_ = syncUntilMs;
|
|
108
176
|
}
|
|
177
|
+
if (table.ownership_formula && role > minRole)
|
|
178
|
+
return applyOwnershipFormula(rows, table, user);
|
|
109
179
|
return rows;
|
|
110
180
|
}
|
|
111
181
|
};
|
|
@@ -116,6 +186,7 @@ const getSyncRows = async (syncInfo, table, syncUntil, user) => {
|
|
|
116
186
|
*/
|
|
117
187
|
router.post(
|
|
118
188
|
"/load_changes",
|
|
189
|
+
loggedIn,
|
|
119
190
|
error_catcher(async (req, res) => {
|
|
120
191
|
const { syncInfos, loadUntil } = req.body || {};
|
|
121
192
|
if (!loadUntil) {
|
|
@@ -135,6 +206,8 @@ router.post(
|
|
|
135
206
|
for (const [tblName, syncInfo] of Object.entries(syncInfos)) {
|
|
136
207
|
const table = Table.findOne({ name: tblName });
|
|
137
208
|
if (!table) throw new Error(`The table '${tblName}' does not exists`);
|
|
209
|
+
if (!table.has_sync_info)
|
|
210
|
+
throw new Error(`The table '${tblName}' has no sync info`);
|
|
138
211
|
const pkName = table.pk_name;
|
|
139
212
|
let rows = await getSyncRows(syncInfo, table, loadUntil, req.user);
|
|
140
213
|
if (!rows) continue;
|
|
@@ -146,16 +219,18 @@ router.post(
|
|
|
146
219
|
continue;
|
|
147
220
|
else if (table.ownership_field_id) {
|
|
148
221
|
} else if (table.ownership_formula) {
|
|
149
|
-
|
|
222
|
+
// already filtered by applyOwnershipFormula inside getSyncRows
|
|
150
223
|
}
|
|
151
224
|
}
|
|
152
225
|
if (rows.length > rowLimit) {
|
|
153
226
|
rows.splice(rowLimit);
|
|
154
227
|
}
|
|
155
228
|
rowLimit -= rows.length;
|
|
229
|
+
const lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
|
|
156
230
|
result[tblName] = {
|
|
157
231
|
rows,
|
|
158
|
-
|
|
232
|
+
maxModifiedAt: lastRow ? lastRow._sync_info_tbl_last_modified_ : 0,
|
|
233
|
+
maxRef: lastRow ? String(lastRow._sync_info_tbl_ref_ ?? "") : "",
|
|
159
234
|
};
|
|
160
235
|
}
|
|
161
236
|
return result;
|
|
@@ -168,17 +243,25 @@ router.post(
|
|
|
168
243
|
})
|
|
169
244
|
);
|
|
170
245
|
|
|
171
|
-
const getDelRows = async (tblName, syncFrom, syncUntil) => {
|
|
246
|
+
const getDelRows = async (tblName, syncFrom, syncUntil, userId = null) => {
|
|
247
|
+
const syncFromMs = syncFrom.valueOf();
|
|
248
|
+
const syncUntilMs = syncUntil.valueOf();
|
|
249
|
+
if (!Number.isFinite(syncFromMs)) throw new Error("Invalid syncFrom");
|
|
250
|
+
if (!Number.isFinite(syncUntilMs)) throw new Error("Invalid syncUntil");
|
|
172
251
|
const schema = db.getTenantSchemaPrefix();
|
|
252
|
+
const ownerFilter =
|
|
253
|
+
userId !== null ? `and alias.owner_id = ${parseInt(userId)}` : "";
|
|
173
254
|
const dbRes = await db.query(
|
|
174
|
-
`select *
|
|
255
|
+
`select *
|
|
175
256
|
from (
|
|
176
|
-
select ref, max(last_modified) from ${schema}"${db.sqlsanitize(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
group by ref, deleted having deleted = true) as alias
|
|
180
|
-
where alias.max < to_timestamp($
|
|
181
|
-
and alias.max > to_timestamp($
|
|
257
|
+
select ref, max(last_modified), owner_id, owner_fields from ${schema}"${db.sqlsanitize(
|
|
258
|
+
tblName
|
|
259
|
+
)}_sync_info"
|
|
260
|
+
group by ref, deleted, owner_id, owner_fields having deleted = true) as alias
|
|
261
|
+
where alias.max < to_timestamp($1)
|
|
262
|
+
and alias.max > to_timestamp($2)
|
|
263
|
+
${ownerFilter}`,
|
|
264
|
+
[syncUntilMs / 1000.0, syncFromMs / 1000.0]
|
|
182
265
|
);
|
|
183
266
|
for (const row of dbRes.rows) {
|
|
184
267
|
if (row.last_modified) row.last_modified = row.last_modified.valueOf();
|
|
@@ -193,8 +276,10 @@ const getDelRows = async (tblName, syncFrom, syncUntil) => {
|
|
|
193
276
|
*/
|
|
194
277
|
router.post(
|
|
195
278
|
"/deletes",
|
|
279
|
+
loggedIn,
|
|
196
280
|
error_catcher(async (req, res) => {
|
|
197
281
|
const { syncInfos, syncTimestamp } = req.body || {};
|
|
282
|
+
const role = req.user ? req.user.role_id : 100;
|
|
198
283
|
try {
|
|
199
284
|
const result = await db.withTransaction(async () => {
|
|
200
285
|
const syncUntil = new Date(syncTimestamp);
|
|
@@ -202,6 +287,35 @@ router.post(
|
|
|
202
287
|
deletes: {},
|
|
203
288
|
};
|
|
204
289
|
for (const [tblName, syncInfo] of Object.entries(syncInfos)) {
|
|
290
|
+
const table = Table.findOne({ name: tblName });
|
|
291
|
+
if (!table) throw new Error(`The table '${tblName}' does not exists`);
|
|
292
|
+
if (!table.has_sync_info)
|
|
293
|
+
throw new Error(`The table '${tblName}' has no sync info`);
|
|
294
|
+
if (role > table.min_role_read) {
|
|
295
|
+
if (!table.ownership_field_id && !table.ownership_formula) continue;
|
|
296
|
+
if (!syncInfo.syncFrom) continue;
|
|
297
|
+
if (table.ownership_field_id) {
|
|
298
|
+
// Filter by owner_id in SQL
|
|
299
|
+
result.deletes[tblName] = await getDelRows(
|
|
300
|
+
tblName,
|
|
301
|
+
new Date(syncInfo.syncFrom),
|
|
302
|
+
syncUntil,
|
|
303
|
+
req.user.id
|
|
304
|
+
);
|
|
305
|
+
} else {
|
|
306
|
+
// ownership_formula: fetch all deletes and evaluate formula in JS
|
|
307
|
+
// against the field values stored in owner_fields at delete time
|
|
308
|
+
const rows = await getDelRows(
|
|
309
|
+
tblName,
|
|
310
|
+
new Date(syncInfo.syncFrom),
|
|
311
|
+
syncUntil
|
|
312
|
+
);
|
|
313
|
+
result.deletes[tblName] = rows.filter((row) =>
|
|
314
|
+
table.is_owner(req.user, row.owner_fields || {})
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
205
319
|
if (syncInfo.syncFrom) {
|
|
206
320
|
result.deletes[tblName] = await getDelRows(
|
|
207
321
|
tblName,
|
|
@@ -225,17 +339,19 @@ router.post(
|
|
|
225
339
|
*/
|
|
226
340
|
router.post(
|
|
227
341
|
"/offline_changes",
|
|
342
|
+
loggedIn,
|
|
228
343
|
error_catcher(async (req, res) => {
|
|
229
344
|
const { changes, newSyncTimestamp, oldSyncTimestamp } = req.body || {};
|
|
230
345
|
const rootFolder = await File.rootFolder();
|
|
231
346
|
try {
|
|
232
347
|
const syncDirName = `${newSyncTimestamp}_${req.user?.email || "public"}`;
|
|
233
|
-
const syncDir =
|
|
234
|
-
rootFolder.location,
|
|
235
|
-
"mobile_app",
|
|
236
|
-
"sync",
|
|
348
|
+
const syncDir = File.normalise_in_base(
|
|
349
|
+
path.join(rootFolder.location, "mobile_app", "sync"),
|
|
237
350
|
syncDirName
|
|
238
351
|
);
|
|
352
|
+
if (!syncDir) {
|
|
353
|
+
return res.status(400).json({ error: "Invalid sync directory name" });
|
|
354
|
+
}
|
|
239
355
|
await fs.mkdir(syncDir, { recursive: true });
|
|
240
356
|
await fs.writeFile(
|
|
241
357
|
path.join(syncDir, "changes.json"),
|
|
@@ -287,16 +403,23 @@ const readOutFile = async (entries, syncDir, fileName) => {
|
|
|
287
403
|
|
|
288
404
|
router.get(
|
|
289
405
|
"/upload_finished",
|
|
406
|
+
loggedIn,
|
|
290
407
|
error_catcher(async (req, res) => {
|
|
291
408
|
const { dir_name } = req.query;
|
|
292
409
|
try {
|
|
410
|
+
const expectedEmail = req.user?.email || "public";
|
|
411
|
+
const dirMatch = dir_name ? dir_name.match(/^\d+_(.+)$/) : null;
|
|
412
|
+
if (!dirMatch || dirMatch[1] !== expectedEmail) {
|
|
413
|
+
return res.status(403).json({ error: "Access denied" });
|
|
414
|
+
}
|
|
293
415
|
const rootFolder = await File.rootFolder();
|
|
294
|
-
const syncDir =
|
|
295
|
-
rootFolder.location,
|
|
296
|
-
"mobile_app",
|
|
297
|
-
"sync",
|
|
416
|
+
const syncDir = File.normalise_in_base(
|
|
417
|
+
path.join(rootFolder.location, "mobile_app", "sync"),
|
|
298
418
|
dir_name
|
|
299
419
|
);
|
|
420
|
+
if (!syncDir) {
|
|
421
|
+
return res.json({ finished: false });
|
|
422
|
+
}
|
|
300
423
|
let entries = null;
|
|
301
424
|
try {
|
|
302
425
|
entries = await fs.readdir(syncDir);
|
|
@@ -340,9 +463,15 @@ router.get(
|
|
|
340
463
|
|
|
341
464
|
router.post(
|
|
342
465
|
"/clean_sync_dir",
|
|
466
|
+
loggedIn,
|
|
343
467
|
error_catcher(async (req, res) => {
|
|
344
468
|
const { dir_name } = req.body || {};
|
|
345
469
|
try {
|
|
470
|
+
const expectedEmail = req.user?.email || "public";
|
|
471
|
+
const dirMatch = dir_name ? dir_name.match(/^\d+_(.+)$/) : null;
|
|
472
|
+
if (!dirMatch || dirMatch[1] !== expectedEmail) {
|
|
473
|
+
return res.status(403).json({ error: "Access denied" });
|
|
474
|
+
}
|
|
346
475
|
const rootFolder = await File.rootFolder();
|
|
347
476
|
const syncDir = File.normalise_in_base(
|
|
348
477
|
path.join(rootFolder.location, "mobile_app", "sync"),
|