@fontoxml/fontoxml-development-tools 3.7.0-beta.6 → 3.8.0-beta.2
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/{.eslintrc.js → .eslintrc.cjs} +0 -0
- package/{.prettierrc.js → .prettierrc.cjs} +0 -0
- package/bin/development-tools.js +8 -8
- package/index.js +4 -6
- package/npm-shrinkwrap.json +4790 -8570
- package/package.json +2 -1
- package/src/App.js +60 -36
- package/src/AssertableWritableStream.js +4 -9
- package/src/ConfigManager.js +3 -7
- package/src/EditorRepository.js +15 -16
- package/src/FdtCommand.js +12 -33
- package/src/FdtLicense.js +8 -14
- package/src/FdtTable.js +4 -8
- package/src/ModuleRegistrationApi.js +14 -12
- package/src/addCoreModulesToApp.js +7 -5
- package/src/addModulesToApp.js +46 -28
- package/src/createConfigFileInHomedir.js +4 -6
- package/src/editorVersions.js +4 -10
- package/src/enrichRequestObject.js +11 -7
- package/src/getParentDirectoryContainingFileSync.js +4 -6
- package/src/modules/connectors/index.js +13 -10
- package/src/modules/connectors/package.json +2 -1
- package/src/modules/connectors/src/command.build.controller.js +13 -15
- package/src/modules/connectors/src/command.build.js +11 -4
- package/src/modules/connectors/src/command.download-self-contained.controller.js +6 -8
- package/src/modules/connectors/src/command.download-self-contained.js +10 -3
- package/src/modules/connectors/src/command.init.controller.js +7 -9
- package/src/modules/connectors/src/command.init.js +10 -3
- package/src/modules/connectors/src/command.run.controller.js +14 -16
- package/src/modules/connectors/src/command.run.js +8 -4
- package/src/modules/connectors/src/command.upgrade.controller.js +7 -9
- package/src/modules/connectors/src/command.upgrade.js +10 -3
- package/src/modules/connectors/src/command.versions.controller.js +2 -4
- package/src/modules/connectors/src/command.versions.js +10 -3
- package/src/modules/connectors/src/utilities/FontoxmlConnectorsManifest.js +2 -6
- package/src/modules/connectors/src/utilities/cleanup.js +6 -8
- package/src/modules/connectors/src/utilities/constants.js +5 -3
- package/src/modules/connectors/src/utilities/copyWhitelistedFiles.js +4 -6
- package/src/modules/connectors/src/utilities/executeAndLog.js +4 -5
- package/src/modules/connectors/src/utilities/getVerbosityLevel.js +3 -5
- package/src/modules/connectors/src/utilities/getWhitelist.js +5 -7
- package/src/modules/connectors/src/utilities/setEntryVisibility.js +3 -14
- package/src/modules/connectors/src/utilities/validateInstance.js +5 -7
- package/src/modules/content-quality/index.js +14 -11
- package/src/modules/content-quality/package.json +2 -1
- package/src/modules/content-quality/src/command.build.controller.js +13 -15
- package/src/modules/content-quality/src/command.build.js +11 -4
- package/src/modules/content-quality/src/command.download-self-contained.controller.js +6 -8
- package/src/modules/content-quality/src/command.download-self-contained.js +11 -4
- package/src/modules/content-quality/src/command.init.controller.js +7 -9
- package/src/modules/content-quality/src/command.init.js +11 -4
- package/src/modules/content-quality/src/command.run.controller.js +13 -15
- package/src/modules/content-quality/src/command.run.js +8 -4
- package/src/modules/content-quality/src/command.upgrade.controller.js +7 -9
- package/src/modules/content-quality/src/command.upgrade.js +11 -4
- package/src/modules/content-quality/src/command.versions.controller.js +2 -4
- package/src/modules/content-quality/src/command.versions.js +10 -3
- package/src/modules/content-quality/src/utilities/FontoxmlFcqManifest.js +2 -6
- package/src/modules/content-quality/src/utilities/cleanup.js +6 -8
- package/src/modules/content-quality/src/utilities/constants.js +5 -3
- package/src/modules/content-quality/src/utilities/copyWhitelistedFiles.js +4 -6
- package/src/modules/content-quality/src/utilities/executeAndLog.js +4 -5
- package/src/modules/content-quality/src/utilities/getVerbosityLevel.js +3 -5
- package/src/modules/content-quality/src/utilities/getWhitelist.js +5 -7
- package/src/modules/content-quality/src/utilities/setEntryVisibility.js +3 -14
- package/src/modules/content-quality/src/utilities/validateInstance.js +5 -7
- package/src/modules/core/index.js +14 -18
- package/src/modules/core/package.json +2 -1
- package/src/modules/core/src/command.fdt.js +1 -3
- package/src/modules/core/src/command.license.validate.js +1 -3
- package/src/modules/core/src/command.module.js +6 -8
- package/src/modules/core/src/command.who.js +6 -4
- package/src/modules/core/src/precontroller.debug.js +2 -3
- package/src/modules/core/src/precontroller.help.js +7 -5
- package/src/modules/document-history/index.js +17 -8
- package/src/modules/document-history/instanceBuild/Dockerfile +4 -0
- package/src/modules/document-history/instanceDevBuild/.env +2 -0
- package/src/modules/document-history/instanceDevBuild/docker-compose.yml +9 -0
- package/src/modules/document-history/instanceTemplate/.env +7 -0
- package/src/modules/document-history/instanceTemplate/Configuration/sx.xml +4 -0
- package/src/modules/document-history/package.json +2 -1
- package/src/modules/document-history/src/command.build.controller.js +260 -0
- package/src/modules/document-history/src/command.build.js +56 -0
- package/src/modules/document-history/src/command.download-self-contained.controller.js +6 -8
- package/src/modules/document-history/src/command.download-self-contained.js +10 -3
- package/src/modules/document-history/src/command.init.controller.js +91 -0
- package/src/modules/document-history/src/command.init.js +44 -0
- package/src/modules/document-history/src/command.run.controller.js +444 -0
- package/src/modules/document-history/src/command.run.js +64 -0
- package/src/modules/document-history/src/command.upgrade.controller.js +52 -0
- package/src/modules/document-history/src/command.upgrade.js +44 -0
- package/src/modules/document-history/src/command.versions.controller.js +2 -4
- package/src/modules/document-history/src/command.versions.js +10 -3
- package/src/modules/document-history/src/utilities/FontoxmlFdhManifest.js +30 -0
- package/src/modules/document-history/src/utilities/cleanup.js +70 -0
- package/src/modules/document-history/src/utilities/constants.js +44 -0
- package/src/modules/document-history/src/utilities/copyWhitelistedFiles.js +22 -0
- package/src/modules/document-history/src/utilities/executeAndLog.js +63 -0
- package/src/modules/document-history/src/utilities/getVerbosityLevel.js +11 -0
- package/src/modules/document-history/src/utilities/getWhitelist.js +16 -0
- package/src/modules/document-history/src/utilities/setEntryVisibility.js +22 -0
- package/src/modules/document-history/src/utilities/validateInstance.js +29 -0
- package/src/modules/editor/dev-cms/configureFontoSessionMiddleware.js +1 -5
- package/src/modules/editor/dev-cms/configureScopeMiddleware.js +3 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureAssetGetRouteHandler.js +1 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureAssetPostRouteHandler.js +3 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureAssetPreviewGetRouteHandler.js +1 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureBodyParserMiddleware.js +3 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureBrowsePostRouteHandler.js +1 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardAssetRouter.js +5 -9
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardBrowseRouter.js +3 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardDocumentRouter.js +13 -15
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardHeartbeatRouter.js +3 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardProxyRouter.js +7 -10
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardReferenceRouter.js +5 -7
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardReviewRouter.js +10 -16
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardRouter.js +3 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDebugRouteHandler.js +2 -4
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDevelopmentCmsMiddleware.js +3 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentCompareRouteHandler.js +2 -4
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentGetRouteHandler.js +1 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentHistoryGetRouteHandler.js +2 -4
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentLockPutRouteHandler.js +1 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPostRouteHandler.js +4 -4
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPresearchPostRouteHandler.js +3 -7
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPreviewRouteHandler.js +2 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPutRouteHandler.js +1 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentRevisionGetRouteHandler.js +2 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentStatePostRouteHandler.js +1 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureHeartbeatGetRouteHandler.js +1 -5
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReferenceCreatePostRouteHandler.js +2 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReferenceGetPostRouteHandler.js +2 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReferenceMetadataUpdatePatchRouteHandler.js +2 -4
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReviewAnnotationGetPostRouteHandler.js +4 -9
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReviewAnnotationPostRouteHandler.js +4 -8
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReviewAnnotationPutRouteHandler.js +7 -11
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReviewAnnotationReplyPostRouteHandler.js +3 -7
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReviewAnnotationReplyPutRouteHandler.js +5 -9
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureReviewStatePostRouteHandler.js +3 -8
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureSimulatedDelayMiddleware.js +1 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureUploadMiddleware.js +4 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/correlationIdRepository.js +2 -2
- package/src/modules/editor/dev-cms/connectors-cms-standard/createMiddleware.js +25 -18
- package/src/modules/editor/dev-cms/connectors-cms-standard/getFileHash.js +3 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/referenceRepository.js +10 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/review-annotations/AnnotationDatabase.js +24 -64
- package/src/modules/editor/dev-cms/connectors-cms-standard/review-annotations/DebuggingConfiguration.js +1 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/review-annotations/EarlyReturnSymbol.js +1 -1
- package/src/modules/editor/dev-cms/connectors-cms-standard/review-annotations/Result.js +6 -14
- package/src/modules/editor/dev-cms/connectors-cms-standard/review-annotations/httpStatusCodeHelpers.js +13 -7
- package/src/modules/editor/dev-cms/connectors-cms-standard/review-annotations/mapAnnotationResult.js +2 -4
- package/src/modules/editor/dev-cms/connectors-cms-standard/stores/DevelopmentCms.js +6 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/stores/FileSystemStore.js +6 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/stores/HistoryStore.js +7 -6
- package/src/modules/editor/dev-cms/connectors-cms-standard/stores/MemoryStore.js +3 -3
- package/src/modules/editor/dev-cms/connectors-cms-standard/stores/mergeItems.js +2 -2
- package/src/modules/editor/dev-cms/connectors-cms-standard/stores/unmergeableRevisionList.js +1 -1
- package/src/modules/editor/dev-cms/connectors-dist/configureAuthMiddleware.js +5 -7
- package/src/modules/editor/dev-cms/connectors-dist/createMiddleware.js +4 -8
- package/src/modules/editor/dev-cms/connectors-health/configureConnectorsHealthRouter.js +3 -7
- package/src/modules/editor/dev-cms/connectors-health/configureHealthGetRouteHandler.js +1 -5
- package/src/modules/editor/dev-cms/connectors-health/createMiddleware.js +2 -6
- package/src/modules/editor/dev-cms/setupDevCms.js +17 -18
- package/src/modules/editor/index.js +20 -24
- package/src/modules/editor/package.json +2 -1
- package/src/modules/editor/src/astHelpers/{addWarningsForRemovedComments.js → addWarningsForRemovedComments.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{getClosestNodeWithOffset.js → getClosestNodeWithOffset.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{getDescendantNodes.js → getDescendantNodes.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{hasMultipleReturnStatements.js → hasMultipleReturnStatements.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{isAmdDefineCallExpression.js → isAmdDefineCallExpression.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{isAmdFactoryReturnStatement.js → isAmdFactoryReturnStatement.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{isInteropDefaultExpressionStatement.js → isInteropDefaultExpressionStatement.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{isInvalidTextLoaderImportDeclaration.js → isInvalidTextLoaderImportDeclaration.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{isRequireToUrlCallExpression.js → isRequireToUrlCallExpression.cjs} +0 -0
- package/src/modules/editor/src/astHelpers/{moveComments.js → moveComments.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{cleanupRegisterXQueryModulePlugin.js → cleanupRegisterXQueryModulePlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{convertAmdToEsmPlugin.js → convertAmdToEsmPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{recastPlugin.js → recastPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteConfigImportsPlugin.js → rewriteConfigImportsPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteImportFileExtensionPlugin.js → rewriteImportFileExtensionPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteInteropDefaultPlugin.js → rewriteInteropDefaultPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteJsonLoaderPlugin.js → rewriteJsonLoaderPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteMainJsImportsPlugin.js → rewriteMainJsImportsPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteSrcPathPlugin.js → rewriteSrcPathPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{rewriteSvgLoaderPlugin.js → rewriteSvgLoaderPlugin.cjs} +0 -0
- package/src/modules/editor/src/babelPlugins/{validatePlugin.js → validatePlugin.cjs} +0 -0
- package/src/modules/editor/src/commands/api/convertEditorWithOutput.js +13 -14
- package/src/modules/editor/src/commands/command.build.controller.js +7 -10
- package/src/modules/editor/src/commands/command.build.js +10 -3
- package/src/modules/editor/src/commands/command.convert.editor.controller.js +7 -9
- package/src/modules/editor/src/commands/command.convert.editor.js +10 -3
- package/src/modules/editor/src/commands/command.convert.package.controller.js +17 -20
- package/src/modules/editor/src/commands/command.convert.package.js +10 -3
- package/src/modules/editor/src/commands/command.run.controller.js +44 -55
- package/src/modules/editor/src/commands/command.run.js +10 -3
- package/src/modules/editor/src/config.js +112 -112
- package/src/modules/editor/src/convert.js +3 -9
- package/src/modules/editor/src/getAppConfig.js +27 -8
- package/src/modules/editor/src/getAppManifest.js +7 -7
- package/src/modules/editor/src/getDependenciesInLoadOrder.js +6 -14
- package/src/modules/editor/src/getImportsForPackages.js +5 -5
- package/src/modules/editor/src/getPatternsForSpecialFileType.js +2 -2
- package/src/modules/editor/src/getWebpackConfig.js +25 -23
- package/src/modules/editor/src/getWebpackDevMiddlewareConfig.js +2 -2
- package/src/modules/editor/src/helpers/WarningsByFilename.js +1 -1
- package/src/modules/editor/src/helpers/mergeIndexPageAndManifest.js +4 -4
- package/src/modules/editor/src/helpers/normalisePath.js +3 -3
- package/src/modules/editor/src/helpers/outputWarningsByFilename.js +4 -4
- package/src/modules/editor/src/helpers/prettifyJsFile.js +3 -6
- package/src/modules/editor/src/helpers/renameJsxFile.js +4 -4
- package/src/modules/editor/src/helpers/transformJsFile.js +24 -10
- package/src/modules/editor/src/helpers/updateEditorPackageJson.js +4 -4
- package/src/modules/editor/src/helpers/validateJsFile.js +11 -7
- package/src/modules/editor/src/helpers/writeJsFileToDisk.js +3 -3
- package/src/modules/editor/src/templates/{app-entry.js → app-entry.cjs} +0 -0
- package/src/modules/editor/src/webpackLoaders/{generatedLoader.js → generatedLoader.cjs} +12 -3
- package/src/modules/editor/src/webpackLoaders/{platformSourceMapLoader.js → platformSourceMapLoader.cjs} +2 -2
- package/src/modules/editor/src/webpackLoaders/{symbolLoader.js → symbolLoader.cjs} +0 -0
- package/src/modules/editor/src/webpackLoaders/{vendorsSourceMapLoader.js → vendorsSourceMapLoader.cjs} +0 -0
- package/src/modules/editor/src/webpackPlugins/CopyPlugin.js +177 -162
- package/src/modules/editor/src/webpackPlugins/DependenciesInLoadOrderPlugin.js +2 -6
- package/src/modules/editor/src/webpackPlugins/FdtOutputPlugin.js +4 -6
- package/src/modules/editor/src/webpackPlugins/RemoveExplicitExtensionResolvePlugin.js +3 -6
- package/src/modules/editor/src/webpackPlugins/ResolveImportAliasPlugin.js +2 -4
- package/src/modules/editor/src/webpackPlugins/UnitTestPlugin.js +5 -7
- package/src/modules/editor/test/dependecyWatching.test.js +11 -12
- package/src/modules/editor/test/fixtures.test.js +21 -16
- package/src/modules/editor/test/helpers/appMutations/addFilesToPackage.js +4 -4
- package/src/modules/editor/test/helpers/appMutations/addFontoManifestToPackage.js +4 -4
- package/src/modules/editor/test/helpers/appMutations/addPackage.js +7 -11
- package/src/modules/editor/test/helpers/appMutations/generateSpecialFiles.js +2 -2
- package/src/modules/editor/test/helpers/appMutations/mutateConfigFontoManifest.js +4 -4
- package/src/modules/editor/test/helpers/appMutations/mutatePackageFontoManifest.js +4 -4
- package/src/modules/editor/test/helpers/appMutations/removeFilesFromPackage.js +4 -4
- package/src/modules/editor/test/helpers/appMutations/removePackage.js +5 -5
- package/src/modules/editor/test/helpers/assertFixtureSnapshot.js +8 -6
- package/src/modules/editor/test/helpers/createAppStructure.js +8 -4
- package/src/modules/editor/test/helpers/createTempDirectory.js +3 -3
- package/src/modules/editor/test/helpers/createWebpackWatch.js +21 -22
- package/src/modules/editor/test/helpers/normaliseLineEndings.js +2 -2
- package/src/modules/editor-pre-7-7-0/index.js +19 -23
- package/src/modules/editor-pre-7-7-0/package.json +2 -1
- package/src/modules/editor-pre-7-7-0/src/api/addCommentToAstNode.js +6 -9
- package/src/modules/editor-pre-7-7-0/src/api/addonsAddDependencies.js +1 -3
- package/src/modules/editor-pre-7-7-0/src/api/createMessageTemplate.js +4 -6
- package/src/modules/editor-pre-7-7-0/src/api/createPackageDirectoryPath.js +4 -6
- package/src/modules/editor-pre-7-7-0/src/api/createPrettifiedCode.js +12 -8
- package/src/modules/editor-pre-7-7-0/src/api/downloadEditorSDK.js +3 -5
- package/src/modules/editor-pre-7-7-0/src/api/executeAndLog.js +4 -6
- package/src/modules/editor-pre-7-7-0/src/api/extractZip.js +4 -6
- package/src/modules/editor-pre-7-7-0/src/api/getAddonLabel.js +2 -4
- package/src/modules/editor-pre-7-7-0/src/api/getAddonLabels.js +3 -5
- package/src/modules/editor-pre-7-7-0/src/api/getAddonLabelsForChanges.js +4 -6
- package/src/modules/editor-pre-7-7-0/src/api/getAddonsFromEditorSDK.js +2 -4
- package/src/modules/editor-pre-7-7-0/src/api/init/checkEditorDestination.js +2 -4
- package/src/modules/editor-pre-7-7-0/src/api/init/createConfigConfiguration.js +13 -11
- package/src/modules/editor-pre-7-7-0/src/api/init/createConfigFontoManifest.js +3 -5
- package/src/modules/editor-pre-7-7-0/src/api/init/createSchemaExperienceResolver.js +11 -8
- package/src/modules/editor-pre-7-7-0/src/api/inquirerPrompts.js +20 -30
- package/src/modules/editor-pre-7-7-0/src/api/npmInstall.js +5 -7
- package/src/modules/editor-pre-7-7-0/src/api/promptForVersionAndDownloadEditorSDK.js +8 -11
- package/src/modules/editor-pre-7-7-0/src/api/schema/buildSchemaExperienceConfigurationModel.js +2 -6
- package/src/modules/editor-pre-7-7-0/src/api/schema/checkIfCompiledSchemaOverwritesFiles.js +3 -5
- package/src/modules/editor-pre-7-7-0/src/api/schema/compile.js +3 -5
- package/src/modules/editor-pre-7-7-0/src/api/schema/createCommentsForElement.js +6 -10
- package/src/modules/editor-pre-7-7-0/src/api/schema/createSchemaExperiencePackages.js +13 -15
- package/src/modules/editor-pre-7-7-0/src/api/schema/createSchemaPackages.js +7 -11
- package/src/modules/editor-pre-7-7-0/src/api/schema/getPrefixByNamespaceUri.js +4 -6
- package/src/modules/editor-pre-7-7-0/src/api/schema/getSchemaFontoJson.js +5 -7
- package/src/modules/editor-pre-7-7-0/src/api/schema/getVersionedSchemaCompilerBaseUrl.js +4 -5
- package/src/modules/editor-pre-7-7-0/src/api/schema/zipHelpers.js +6 -8
- package/src/modules/editor-pre-7-7-0/src/api/updateManifest.js +2 -4
- package/src/modules/editor-pre-7-7-0/src/api/upgrade/getMajorVersion.js +1 -5
- package/src/modules/editor-pre-7-7-0/src/api/upgrade/preprocessData.js +3 -5
- package/src/modules/editor-pre-7-7-0/src/api/upgrade/updateConfigFontoManifest.js +2 -4
- package/src/modules/editor-pre-7-7-0/src/api/validateAddons.js +1 -3
- package/src/modules/editor-pre-7-7-0/src/api/validateManifest.js +1 -3
- package/src/modules/editor-pre-7-7-0/src/api/writeAstProgramToFile.js +7 -6
- package/src/modules/editor-pre-7-7-0/src/command.addons.controller.js +18 -25
- package/src/modules/editor-pre-7-7-0/src/command.addons.js +10 -3
- package/src/modules/editor-pre-7-7-0/src/command.build.controller.js +6 -8
- package/src/modules/editor-pre-7-7-0/src/command.build.js +10 -3
- package/src/modules/editor-pre-7-7-0/src/command.init.controller.js +33 -36
- package/src/modules/editor-pre-7-7-0/src/command.init.js +10 -3
- package/src/modules/editor-pre-7-7-0/src/command.run.controller.js +6 -8
- package/src/modules/editor-pre-7-7-0/src/command.run.js +10 -3
- package/src/modules/editor-pre-7-7-0/src/command.schema.compile.controller.js +10 -12
- package/src/modules/editor-pre-7-7-0/src/command.schema.compile.js +10 -3
- package/src/modules/editor-pre-7-7-0/src/command.upgrade.controller.js +24 -31
- package/src/modules/editor-pre-7-7-0/src/command.upgrade.js +10 -3
- package/src/modules/editor-pre-7-7-0/src/command.versions.controller.js +2 -4
- package/src/modules/editor-pre-7-7-0/src/command.versions.js +10 -3
- package/src/modules/editor-pre-7-7-0/test/api/schema/buildSchemaExperienceConfigurationModel.test.js +19 -18
- package/src/modules/editor-pre-7-7-0/test/api/schema/createCommentsForElement.test.js +7 -10
- package/src/modules/editor-pre-7-7-0/test/api/schema/getPrefixByNamespaceUri.test.js +3 -6
- package/src/modules/editor-pre-7-7-0/test/api/schema/testHelpers.js +5 -14
- package/src/modules/editor-pre-7-7-0/test/api/schema/zipSchemaSource.test.js +9 -7
- package/src/modules/localization/index.js +13 -13
- package/src/modules/localization/package.json +2 -1
- package/src/modules/localization/src/api/Message.js +3 -3
- package/src/modules/localization/src/api/createMessagesTable.js +3 -5
- package/src/modules/localization/src/api/deduplicateMessages.js +2 -2
- package/src/modules/localization/src/api/extractMessages.js +5 -5
- package/src/modules/localization/src/api/getMessagesFromOperation.js +3 -3
- package/src/modules/localization/src/api/getMessagesFromSource.js +9 -4
- package/src/modules/localization/src/api/getOperationMessages.js +9 -9
- package/src/modules/localization/src/api/getSourceMessages.js +9 -8
- package/src/modules/localization/src/api/index.js +10 -5
- package/src/modules/localization/src/api/loadMessageBundle.js +6 -5
- package/src/modules/localization/src/api/{parser.js → parser.cjs} +0 -0
- package/src/modules/localization/src/api/promiseUtils.js +1 -1
- package/src/modules/localization/src/api/updateMessagesWithTemplate.js +2 -2
- package/src/modules/localization/src/command.extract.controller.js +7 -9
- package/src/modules/localization/src/command.extract.js +10 -3
- package/src/modules/localization/src/command.merge.controller.js +7 -9
- package/src/modules/localization/src/command.merge.js +10 -3
- package/src/modules/localization/src/command.messages.controller.js +5 -7
- package/src/modules/localization/src/command.messages.js +11 -4
- package/src/modules/localization/src/command.update.controller.js +8 -10
- package/src/modules/localization/src/command.update.js +10 -3
- package/src/modules/localization/test/api/Message.test.js +3 -3
- package/src/modules/localization/test/api/deduplicateMessages.test.js +4 -5
- package/src/modules/localization/test/api/getMessagesFromOperation.test.js +3 -4
- package/src/modules/localization/test/api/getMessagesFromSource.test.js +3 -4
- package/src/modules/localization/test/api/parser.test.js +3 -2
- package/src/modules/localization/test/api/promiseUtils.test.js +2 -2
- package/src/modules/localization/test/api/roundtripThroughJson.js +2 -2
- package/src/modules/localization/test/api/updateMessagesWithTemplate.test.js +4 -5
- package/src/modules/localization/test/command.extract.test.js +11 -10
- package/src/modules/localization/test/command.merge.test.js +11 -10
- package/src/modules/localization/test/command.messages.test.js +10 -9
- package/src/modules/localization/test/command.update.test.js +11 -10
- package/src/modules/localization/test/index.test.js +15 -14
- package/src/modules/localization/test/promiseUtils.test.js +2 -4
- package/src/modules/operations/index.js +5 -6
- package/src/modules/operations/package.json +2 -1
- package/src/modules/operations/src/api/createOperationsTable.js +3 -5
- package/src/modules/operations/src/api/getOperation.js +3 -5
- package/src/modules/operations/src/api/getOperations.js +12 -14
- package/src/modules/operations/src/command.operation.controller.js +3 -5
- package/src/modules/operations/src/command.operation.js +10 -3
- package/src/modules/operations/src/command.operations.controller.js +4 -6
- package/src/modules/operations/src/command.operations.js +11 -4
- package/src/modules/operations/test/command.operation.test.js +10 -9
- package/src/modules/operations/test/command.operations.test.js +11 -9
- package/src/modules/operations/test/getOperation.test.js +6 -4
- package/src/modules/operations/test/getOperations.test.js +6 -4
- package/src/modules/operations/test/index.test.js +11 -11
- package/src/modules/review/index.js +13 -10
- package/src/modules/review/package.json +2 -1
- package/src/modules/review/src/command.build.controller.js +13 -15
- package/src/modules/review/src/command.build.js +11 -4
- package/src/modules/review/src/command.download-self-contained.controller.js +6 -8
- package/src/modules/review/src/command.download-self-contained.js +10 -3
- package/src/modules/review/src/command.init.controller.js +7 -9
- package/src/modules/review/src/command.init.js +10 -3
- package/src/modules/review/src/command.run.controller.js +14 -16
- package/src/modules/review/src/command.run.js +8 -4
- package/src/modules/review/src/command.upgrade.controller.js +8 -10
- package/src/modules/review/src/command.upgrade.js +10 -3
- package/src/modules/review/src/command.versions.controller.js +2 -4
- package/src/modules/review/src/command.versions.js +10 -3
- package/src/modules/review/src/utilities/FontoxmlReviewManifest.js +2 -6
- package/src/modules/review/src/utilities/cleanup.js +6 -8
- package/src/modules/review/src/utilities/constants.js +5 -3
- package/src/modules/review/src/utilities/copyWhitelistedFiles.js +4 -6
- package/src/modules/review/src/utilities/executeAndLog.js +4 -5
- package/src/modules/review/src/utilities/getVerbosityLevel.js +3 -5
- package/src/modules/review/src/utilities/getWhitelist.js +5 -7
- package/src/modules/review/src/utilities/setEntryVisibility.js +3 -14
- package/src/modules/review/src/utilities/validateInstance.js +6 -8
- package/src/modules/schema/index.js +16 -24
- package/src/modules/schema/package.json +2 -1
- package/src/modules/schema/src/api/AttributeSummary.js +2 -4
- package/src/modules/schema/src/api/ElementSummary.js +2 -4
- package/src/modules/schema/src/api/SchemaSummary.js +11 -10
- package/src/modules/schema/src/api/SimpleTypeSummary.js +3 -5
- package/src/modules/schema/src/api/createAttributesTable.js +3 -5
- package/src/modules/schema/src/api/createElementsTable.js +3 -5
- package/src/modules/schema/src/api/createSchemasTable.js +4 -6
- package/src/modules/schema/src/api/createSimpleTypesTable.js +3 -5
- package/src/modules/schema/src/api/getClosestMatchingSchemaSummary.js +7 -9
- package/src/modules/schema/src/api/getSchemaSummaries.js +5 -7
- package/src/modules/schema/src/command.attribute.controller.js +3 -5
- package/src/modules/schema/src/command.attribute.js +10 -3
- package/src/modules/schema/src/command.attributes.controller.js +4 -6
- package/src/modules/schema/src/command.attributes.js +11 -4
- package/src/modules/schema/src/command.element.controller.js +4 -6
- package/src/modules/schema/src/command.element.js +10 -3
- package/src/modules/schema/src/command.elements.controller.js +4 -6
- package/src/modules/schema/src/command.elements.js +11 -4
- package/src/modules/schema/src/command.schemas.controller.js +4 -6
- package/src/modules/schema/src/command.schemas.js +11 -4
- package/src/modules/schema/src/command.simpletypes.controller.js +4 -6
- package/src/modules/schema/src/command.simpletypes.js +11 -4
- package/src/modules/schema/src/helpers/renderSimpleType.js +3 -5
- package/src/modules/schema/src/helpers/restrictionFormatter.js +2 -4
- package/src/modules/schema/test/AttributeSummary.test.js +3 -5
- package/src/modules/schema/test/ElementSummary.test.js +3 -5
- package/src/modules/schema/test/SchemaSummary.test.js +9 -7
- package/src/modules/schema/test/SimpleTypeSummary.test.js +3 -5
- package/src/modules/schema/test/command.attribute.test.js +14 -12
- package/src/modules/schema/test/command.attributes.test.js +14 -12
- package/src/modules/schema/test/command.element.test.js +14 -12
- package/src/modules/schema/test/command.elements.test.js +14 -12
- package/src/modules/schema/test/command.schemas.test.js +10 -9
- package/src/modules/schema/test/command.simpletypes.test.js +10 -9
- package/src/modules/schema/test/getClosestMatchingSchemaSummary.test.js +6 -4
- package/src/modules/schema/test/getSchemaSummaries.test.js +6 -4
- package/src/modules/schema/test/index.test.js +37 -37
- package/src/modules/schema/test/renderSimpleType.test.js +12 -13
- package/src/modules/schema/test/restrictionFormatter.test.js +3 -5
- package/src/modules/schema-compiler/index.js +13 -10
- package/src/modules/schema-compiler/package.json +2 -1
- package/src/modules/schema-compiler/src/command.build.controller.js +12 -15
- package/src/modules/schema-compiler/src/command.build.js +11 -4
- package/src/modules/schema-compiler/src/command.download-self-contained.controller.js +6 -8
- package/src/modules/schema-compiler/src/command.download-self-contained.js +10 -3
- package/src/modules/schema-compiler/src/command.init.controller.js +7 -9
- package/src/modules/schema-compiler/src/command.init.js +10 -3
- package/src/modules/schema-compiler/src/command.run.controller.js +14 -16
- package/src/modules/schema-compiler/src/command.run.js +6 -4
- package/src/modules/schema-compiler/src/command.upgrade.controller.js +8 -10
- package/src/modules/schema-compiler/src/command.upgrade.js +10 -3
- package/src/modules/schema-compiler/src/command.versions.controller.js +2 -4
- package/src/modules/schema-compiler/src/command.versions.js +10 -3
- package/src/modules/schema-compiler/src/utilities/FontoxmlSchemaCompilerManifest.js +2 -6
- package/src/modules/schema-compiler/src/utilities/cleanup.js +6 -8
- package/src/modules/schema-compiler/src/utilities/constants.js +5 -3
- package/src/modules/schema-compiler/src/utilities/copyWhitelistedFiles.js +4 -6
- package/src/modules/schema-compiler/src/utilities/executeAndLog.js +4 -5
- package/src/modules/schema-compiler/src/utilities/getVerbosityLevel.js +3 -5
- package/src/modules/schema-compiler/src/utilities/getWhitelist.js +5 -7
- package/src/modules/schema-compiler/src/utilities/setEntryVisibility.js +3 -14
- package/src/modules/schema-compiler/src/utilities/validateInstance.js +6 -8
- package/src/modules/spell-checker/index.js +13 -10
- package/src/modules/spell-checker/package.json +2 -1
- package/src/modules/spell-checker/src/command.build.controller.js +13 -15
- package/src/modules/spell-checker/src/command.build.js +11 -4
- package/src/modules/spell-checker/src/command.download-self-contained.controller.js +6 -8
- package/src/modules/spell-checker/src/command.download-self-contained.js +10 -3
- package/src/modules/spell-checker/src/command.init.controller.js +7 -9
- package/src/modules/spell-checker/src/command.init.js +10 -3
- package/src/modules/spell-checker/src/command.run.controller.js +13 -15
- package/src/modules/spell-checker/src/command.run.js +8 -4
- package/src/modules/spell-checker/src/command.upgrade.controller.js +8 -10
- package/src/modules/spell-checker/src/command.upgrade.js +10 -3
- package/src/modules/spell-checker/src/command.versions.controller.js +2 -4
- package/src/modules/spell-checker/src/command.versions.js +10 -3
- package/src/modules/spell-checker/src/utilities/FontoxmlSpellCheckerManifest.js +2 -6
- package/src/modules/spell-checker/src/utilities/cleanup.js +6 -8
- package/src/modules/spell-checker/src/utilities/constants.js +5 -3
- package/src/modules/spell-checker/src/utilities/copyWhitelistedFiles.js +4 -6
- package/src/modules/spell-checker/src/utilities/executeAndLog.js +4 -5
- package/src/modules/spell-checker/src/utilities/getVerbosityLevel.js +3 -5
- package/src/modules/spell-checker/src/utilities/getWhitelist.js +5 -7
- package/src/modules/spell-checker/src/utilities/setEntryVisibility.js +3 -14
- package/src/modules/spell-checker/src/utilities/validateInstance.js +6 -8
- package/src/response/FdtResponse.js +8 -13
- package/src/response/extras.js +3 -5
- package/src/response/primitives.js +4 -4
- package/test/App.test.js +113 -93
- package/test/AssertableWritableStream.test.js +3 -8
- package/test/FdtCommand.test.js +9 -7
- package/test/FdtTable.test.js +12 -11
- package/test/app/invalid-module-1/index.js +1 -1
- package/test/app/invalid-module-1/package.json +1 -0
- package/test/app/test-module-1/index.js +1 -1
- package/test/app/test-module-1/package.json +1 -0
- package/test/app/test-module-2/index.js +12 -7
- package/test/app/test-module-2/package.json +1 -0
- package/test/app/test-module-2/src/testLazyLoadCommand.js +2 -4
- package/test/app/test-module-2-duplicate/index.js +1 -3
- package/test/app/test-module-2-duplicate/package.json +1 -0
- package/test/app-pre-7-7-0/config.js +1 -1
- package/test/app-with-configjs/config.js +1 -1
- package/test/module.core.test.js +39 -29
package/src/editorVersions.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import compareVersions from 'compare-versions';
|
|
2
2
|
|
|
3
|
-
function isNightly(version) {
|
|
3
|
+
export function isNightly(version) {
|
|
4
4
|
return (
|
|
5
5
|
String(version).startsWith('Nightlies for ') || version === 'nightly'
|
|
6
6
|
);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
function isPre770Editor(version) {
|
|
9
|
+
export function isPre770Editor(version) {
|
|
10
10
|
if (!version) {
|
|
11
11
|
return false;
|
|
12
12
|
}
|
|
@@ -26,7 +26,7 @@ function isPre770Editor(version) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function isPre782Editor(version) {
|
|
29
|
+
export function isPre782Editor(version) {
|
|
30
30
|
if (!version) {
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
@@ -44,9 +44,3 @@ function isPre782Editor(version) {
|
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
module.exports = {
|
|
49
|
-
isNightly,
|
|
50
|
-
isPre770Editor,
|
|
51
|
-
isPre782Editor,
|
|
52
|
-
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import EditorRepository from './EditorRepository.js';
|
|
2
|
+
import FdtLicense from './FdtLicense.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
const
|
|
4
|
+
export default async function enrichRequestObject(app) {
|
|
5
|
+
const editorRepository = new EditorRepository();
|
|
6
|
+
await editorRepository.init(app);
|
|
7
|
+
|
|
8
|
+
const license = new FdtLicense(app);
|
|
5
9
|
|
|
6
|
-
module.exports = function enrichRequestObject(app) {
|
|
7
10
|
app.request.fdt = {
|
|
8
|
-
editorRepository
|
|
9
|
-
|
|
11
|
+
editorRepository,
|
|
12
|
+
getPathToModule: app.getPathToModule.bind(app),
|
|
13
|
+
license,
|
|
10
14
|
};
|
|
11
|
-
}
|
|
15
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const nodePathModule = require('path');
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import nodePathModule from 'path';
|
|
5
3
|
|
|
6
4
|
function getStatForPath(path, indiscriminateOfSymlinks) {
|
|
7
5
|
/* istanbul ignore next: No symlinks in this package, so we won't test this for now */
|
|
@@ -40,7 +38,7 @@ function getAllStatsInPath(dir, indiscriminateOfSymlinks) {
|
|
|
40
38
|
.filter((result) => !!result);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
export default function getParentDirectoryContainingFileSync(
|
|
44
42
|
cwd,
|
|
45
43
|
configFileName
|
|
46
44
|
) {
|
|
@@ -59,4 +57,4 @@ module.exports = function getParentDirectoryContainingFileSync(
|
|
|
59
57
|
nodePathModule.dirname(cwd),
|
|
60
58
|
configFileName
|
|
61
59
|
);
|
|
62
|
-
}
|
|
60
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import commandBuild from './src/command.build.js';
|
|
2
|
+
import commandDownloadSelfContained from './src/command.download-self-contained.js';
|
|
3
|
+
import commandInit from './src/command.init.js';
|
|
4
|
+
import commandRun from './src/command.run.js';
|
|
5
|
+
import commandUpgrade from './src/command.upgrade.js';
|
|
6
|
+
import commandVersions from './src/command.versions.js';
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
export default async (moduleRegistration) => {
|
|
4
9
|
const connectorsCommand = moduleRegistration
|
|
5
10
|
.registerCommand('connectors')
|
|
6
11
|
.setDescription('Provides tools for working with Fonto Connectors.')
|
|
@@ -9,12 +14,10 @@ module.exports = (moduleRegistration) => {
|
|
|
9
14
|
.setHideIfMissingRequiredProductLicenses()
|
|
10
15
|
.setAsHelpCommand();
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
require('./src/command.versions.js'),
|
|
19
|
-
].forEach((mod) => mod(moduleRegistration, connectorsCommand));
|
|
17
|
+
commandBuild(moduleRegistration, connectorsCommand);
|
|
18
|
+
commandDownloadSelfContained(moduleRegistration, connectorsCommand);
|
|
19
|
+
commandInit(moduleRegistration, connectorsCommand);
|
|
20
|
+
commandRun(moduleRegistration, connectorsCommand);
|
|
21
|
+
commandUpgrade(moduleRegistration, connectorsCommand);
|
|
22
|
+
commandVersions(moduleRegistration, connectorsCommand);
|
|
20
23
|
};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import cleanup from './utilities/cleanup.js';
|
|
5
|
+
import constants from './utilities/constants.js';
|
|
6
|
+
import copyWhitelistedFiles from './utilities/copyWhitelistedFiles.js';
|
|
7
|
+
import executeAndLog from './utilities/executeAndLog.js';
|
|
8
|
+
import FontoxmlConnectorsManifest from './utilities/FontoxmlConnectorsManifest.js';
|
|
9
|
+
import getVerbosityLevel from './utilities/getVerbosityLevel.js';
|
|
10
|
+
import getWhitelist from './utilities/getWhitelist.js';
|
|
11
|
+
import setEntryVisibility from './utilities/setEntryVisibility.js';
|
|
12
|
+
import validateInstance from './utilities/validateInstance.js';
|
|
5
13
|
|
|
6
|
-
|
|
7
|
-
const cleanup = require('./utilities/cleanup');
|
|
8
|
-
const constants = require('./utilities/constants');
|
|
9
|
-
const copyWhitelistedFiles = require('./utilities/copyWhitelistedFiles');
|
|
10
|
-
const executeAndLog = require('./utilities/executeAndLog');
|
|
11
|
-
const getVerbosityLevel = require('./utilities/getVerbosityLevel');
|
|
12
|
-
const getWhitelist = require('./utilities/getWhitelist');
|
|
13
|
-
const setEntryVisibility = require('./utilities/setEntryVisibility');
|
|
14
|
-
const validateInstance = require('./utilities/validateInstance');
|
|
15
|
-
|
|
16
|
-
module.exports = function buildCommand(req, res) {
|
|
14
|
+
export default function buildCommand(req, res) {
|
|
17
15
|
res.caption(req.command.getLongName());
|
|
18
16
|
|
|
19
17
|
const directoryPath = path.resolve(
|
|
@@ -255,4 +253,4 @@ module.exports = function buildCommand(req, res) {
|
|
|
255
253
|
});
|
|
256
254
|
})
|
|
257
255
|
);
|
|
258
|
-
}
|
|
256
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
import constants from './utilities/constants.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
export default (moduleRegistration, connectorsCommand) => {
|
|
6
10
|
connectorsCommand
|
|
7
|
-
.addCommand(
|
|
11
|
+
.addCommand(
|
|
12
|
+
'build',
|
|
13
|
+
path.resolve(__dirname, 'command.build.controller.js')
|
|
14
|
+
)
|
|
8
15
|
.setDescription(
|
|
9
16
|
'Build a Fonto Connectors Docker image for production use. Requires Docker to be installed.'
|
|
10
17
|
)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import requestPromise from 'request-promise-native';
|
|
4
|
+
import url from 'url';
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const requestPromise = require('request-promise-native');
|
|
6
|
-
const url = require('url');
|
|
7
|
-
|
|
8
|
-
module.exports = function buildCommand(req, res) {
|
|
6
|
+
export default function buildCommand(req, res) {
|
|
9
7
|
res.caption(req.command.getLongName());
|
|
10
8
|
|
|
11
9
|
const directoryPath = path.resolve(
|
|
@@ -109,4 +107,4 @@ module.exports = function buildCommand(req, res) {
|
|
|
109
107
|
);
|
|
110
108
|
});
|
|
111
109
|
});
|
|
112
|
-
}
|
|
110
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
7
|
+
export default (moduleRegistration, connectorsCommand) => {
|
|
4
8
|
connectorsCommand
|
|
5
9
|
.addCommand(
|
|
6
10
|
'download-self-contained',
|
|
7
|
-
|
|
11
|
+
path.resolve(
|
|
12
|
+
__dirname,
|
|
13
|
+
'command.download-self-contained.controller.js'
|
|
14
|
+
)
|
|
8
15
|
)
|
|
9
16
|
.addAlias('dsc')
|
|
10
17
|
.setDescription('Downloads a self-contained build.')
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import constants from './utilities/constants.js';
|
|
5
|
+
import FontoxmlConnectorsManifest from './utilities/FontoxmlConnectorsManifest.js';
|
|
6
|
+
import setEntryVisibility from './utilities/setEntryVisibility.js';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
const FontoxmlConnectorsManifest = require('./utilities/FontoxmlConnectorsManifest');
|
|
8
|
-
const setEntryVisibility = require('./utilities/setEntryVisibility');
|
|
9
|
-
|
|
10
|
-
module.exports = async function initCommand(req, res) {
|
|
8
|
+
export default async function initCommand(req, res) {
|
|
11
9
|
res.caption(req.command.getLongName());
|
|
12
10
|
|
|
13
11
|
// Check if the version exists.
|
|
@@ -90,4 +88,4 @@ module.exports = async function initCommand(req, res) {
|
|
|
90
88
|
`See ${constants.DOCUMENTATION_GETTING_STARTED_GUIDE} for more information.`
|
|
91
89
|
);
|
|
92
90
|
});
|
|
93
|
-
}
|
|
91
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
7
|
+
export default (moduleRegistration, connectorsCommand) => {
|
|
4
8
|
connectorsCommand
|
|
5
|
-
.addCommand(
|
|
9
|
+
.addCommand(
|
|
10
|
+
'init',
|
|
11
|
+
path.resolve(__dirname, 'command.init.controller.js')
|
|
12
|
+
)
|
|
6
13
|
.setDescription(
|
|
7
14
|
'Initialize a Fonto Connectors instance in an empty or nonexistent directory.'
|
|
8
15
|
)
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import path from 'path';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const getVerbosityLevel = require('./utilities/getVerbosityLevel');
|
|
13
|
-
const getWhitelist = require('./utilities/getWhitelist');
|
|
14
|
-
const setEntryVisibility = require('./utilities/setEntryVisibility');
|
|
15
|
-
const validateInstance = require('./utilities/validateInstance');
|
|
5
|
+
import cleanup from './utilities/cleanup.js';
|
|
6
|
+
import constants from './utilities/constants.js';
|
|
7
|
+
import copyWhitelistedFiles from './utilities/copyWhitelistedFiles.js';
|
|
8
|
+
import executeAndLog from './utilities/executeAndLog.js';
|
|
9
|
+
import FontoxmlConnectorsManifest from './utilities/FontoxmlConnectorsManifest.js';
|
|
10
|
+
import getVerbosityLevel from './utilities/getVerbosityLevel.js';
|
|
11
|
+
import getWhitelist from './utilities/getWhitelist.js';
|
|
12
|
+
import setEntryVisibility from './utilities/setEntryVisibility.js';
|
|
13
|
+
import validateInstance from './utilities/validateInstance.js';
|
|
16
14
|
|
|
17
15
|
const verboseConnectorsConfigurationEntries = {
|
|
18
16
|
fc__logging__logLevel: 'Trace',
|
|
@@ -99,7 +97,7 @@ function copyConnectorsConfiguration(
|
|
|
99
97
|
});
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
|
|
100
|
+
export default function runCommand(req, res) {
|
|
103
101
|
res.caption(req.command.getLongName());
|
|
104
102
|
|
|
105
103
|
const directoryPath = path.resolve(
|
|
@@ -461,4 +459,4 @@ module.exports = function runCommand(req, res) {
|
|
|
461
459
|
});
|
|
462
460
|
})
|
|
463
461
|
);
|
|
464
|
-
}
|
|
462
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
import constants from './utilities/constants.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
export default (moduleRegistration, connectorsCommand) => {
|
|
6
10
|
connectorsCommand
|
|
7
|
-
.addCommand('run', '
|
|
11
|
+
.addCommand('run', path.resolve(__dirname, 'command.run.controller.js'))
|
|
8
12
|
.setDescription(
|
|
9
13
|
'Run a Fonto Connectors instance with a self-signed certificate for development purposes. Requires Docker to be installed.'
|
|
10
14
|
)
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import constants from './utilities/constants.js';
|
|
5
|
+
import FontoxmlConnectorsManifest from './utilities/FontoxmlConnectorsManifest.js';
|
|
6
|
+
import setEntryVisibility from './utilities/setEntryVisibility.js';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
const FontoxmlConnectorsManifest = require('./utilities/FontoxmlConnectorsManifest');
|
|
8
|
-
const setEntryVisibility = require('./utilities/setEntryVisibility');
|
|
9
|
-
|
|
10
|
-
module.exports = async function upgradeCommand(req, res) {
|
|
8
|
+
export default async function upgradeCommand(req, res) {
|
|
11
9
|
res.caption(req.command.getLongName());
|
|
12
10
|
|
|
13
11
|
// Check if the given version exist.
|
|
@@ -51,4 +49,4 @@ module.exports = async function upgradeCommand(req, res) {
|
|
|
51
49
|
})
|
|
52
50
|
)
|
|
53
51
|
.then(() => destroySpinner());
|
|
54
|
-
}
|
|
52
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
7
|
+
export default (moduleRegistration, connectorsCommand) => {
|
|
4
8
|
connectorsCommand
|
|
5
|
-
.addCommand(
|
|
9
|
+
.addCommand(
|
|
10
|
+
'upgrade',
|
|
11
|
+
path.resolve(__dirname, 'command.upgrade.controller.js')
|
|
12
|
+
)
|
|
6
13
|
.setDescription(
|
|
7
14
|
'Upgrade an existing Fonto Connectors instance to the specified version.'
|
|
8
15
|
)
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
module.exports = async function versionsCommand(req, res) {
|
|
1
|
+
export default async function versionsCommand(req, res) {
|
|
4
2
|
res.caption(req.command.getLongName());
|
|
5
3
|
|
|
6
4
|
const all = req.options.all;
|
|
@@ -13,4 +11,4 @@ module.exports = async function versionsCommand(req, res) {
|
|
|
13
11
|
destroySpinner();
|
|
14
12
|
res.caption('Fonto Connectors versions');
|
|
15
13
|
res.list(all ? sdkVersions.getAll() : sdkVersions.getAllStable(), '-');
|
|
16
|
-
}
|
|
14
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
7
|
+
export default (moduleRegistration, connectorsCommand) => {
|
|
4
8
|
connectorsCommand
|
|
5
|
-
.addCommand(
|
|
9
|
+
.addCommand(
|
|
10
|
+
'versions',
|
|
11
|
+
path.resolve(__dirname, 'command.versions.controller.js')
|
|
12
|
+
)
|
|
6
13
|
.setDescription('List the available Fonto Connectors versions.')
|
|
7
14
|
|
|
8
15
|
.addHiddenOption(
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class FontoxmlConnectorsManifest {
|
|
3
|
+
export default class FontoxmlConnectorsManifest {
|
|
6
4
|
constructor(connectorsVersion) {
|
|
7
5
|
this.connectorsVersion = connectorsVersion;
|
|
8
6
|
}
|
|
@@ -32,5 +30,3 @@ class FontoxmlConnectorsManifest {
|
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
module.exports = FontoxmlConnectorsManifest;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import constants from './constants.js';
|
|
5
|
+
import executeAndLog from './executeAndLog.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
const executeAndLog = require('./executeAndLog');
|
|
8
|
-
|
|
9
|
-
module.exports = async function cleanup(
|
|
7
|
+
export default async function cleanup(
|
|
10
8
|
temporaryDirectoryPath,
|
|
11
9
|
projectName,
|
|
12
10
|
res,
|
|
@@ -69,4 +67,4 @@ module.exports = async function cleanup(
|
|
|
69
67
|
} finally {
|
|
70
68
|
destroySpinner();
|
|
71
69
|
}
|
|
72
|
-
}
|
|
70
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
export default {
|
|
6
8
|
DEFAULT_IMAGE_NAME: 'fonto-connectors',
|
|
7
9
|
DEFAULT_IMAGE_TAG: 'latest',
|
|
8
10
|
VERBOSITY_LEVEL_DEBUG: 'debug',
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
module.exports = function copyWhitelistedFiles(
|
|
4
|
+
export default function copyWhitelistedFiles(
|
|
7
5
|
whitelistedFiles,
|
|
8
6
|
sourceDirectory,
|
|
9
7
|
destinationDirectory
|
|
@@ -21,4 +19,4 @@ module.exports = function copyWhitelistedFiles(
|
|
|
21
19
|
});
|
|
22
20
|
})
|
|
23
21
|
);
|
|
24
|
-
}
|
|
22
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import cp from 'child_process';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const constants = require('./constants');
|
|
3
|
+
import constants from './constants.js';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export default function executeAndLog(
|
|
7
6
|
res,
|
|
8
7
|
command,
|
|
9
8
|
args,
|
|
@@ -61,4 +60,4 @@ module.exports = function executeAndLog(
|
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
62
|
});
|
|
64
|
-
}
|
|
63
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import constants from './constants.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports = function getVerbosityLevel(verbose, debug) {
|
|
3
|
+
export default function getVerbosityLevel(verbose, debug) {
|
|
6
4
|
if (debug) {
|
|
7
5
|
return constants.VERBOSITY_LEVEL_DEBUG;
|
|
8
6
|
}
|
|
@@ -10,4 +8,4 @@ module.exports = function getVerbosityLevel(verbose, debug) {
|
|
|
10
8
|
return constants.VERBOSITY_LEVEL_VERBOSE;
|
|
11
9
|
}
|
|
12
10
|
return constants.VERBOSITY_LEVEL_NORMAL;
|
|
13
|
-
}
|
|
11
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
4
|
+
import constants from './constants.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
module.exports = function getWhitelist() {
|
|
6
|
+
export default function getWhitelist() {
|
|
9
7
|
return fs
|
|
10
8
|
.readdir(constants.INSTANCE_TEMPLATE_DIRECTORY_PATH)
|
|
11
9
|
.then((entries) => {
|
|
@@ -15,4 +13,4 @@ module.exports = function getWhitelist() {
|
|
|
15
13
|
whitelist.push(...constants.WHITELIST);
|
|
16
14
|
return whitelist;
|
|
17
15
|
});
|
|
18
|
-
}
|
|
16
|
+
}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import fswin from 'fswin';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
// We replace the stdout.write with nothing to prevent fswin to output the Node.js version.
|
|
5
|
-
const originalStdOutWrite = process.stdout.write;
|
|
6
|
-
process.stdout.write = () => {};
|
|
7
|
-
try {
|
|
8
|
-
fswin = require('fswin');
|
|
9
|
-
} catch (_e) {
|
|
10
|
-
// Exception will be thrown on linux but fswin is not required on linux.
|
|
11
|
-
}
|
|
12
|
-
process.stdout.write = originalStdOutWrite;
|
|
13
|
-
|
|
14
|
-
module.exports = function setEntryVisibility(entryPath, isVisible) {
|
|
3
|
+
export default function setEntryVisibility(entryPath, isVisible) {
|
|
15
4
|
return new Promise((resolve, reject) => {
|
|
16
5
|
if (fswin) {
|
|
17
6
|
fswin.setAttributes(
|
|
@@ -30,4 +19,4 @@ module.exports = function setEntryVisibility(entryPath, isVisible) {
|
|
|
30
19
|
|
|
31
20
|
resolve();
|
|
32
21
|
});
|
|
33
|
-
}
|
|
22
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
4
|
+
import constants from './constants.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
module.exports = function validateInstance(directoryPath) {
|
|
6
|
+
export default function validateInstance(directoryPath) {
|
|
9
7
|
return fs
|
|
10
8
|
.exists(directoryPath)
|
|
11
9
|
.then((exists) => {
|
|
@@ -28,4 +26,4 @@ module.exports = function validateInstance(directoryPath) {
|
|
|
28
26
|
})
|
|
29
27
|
);
|
|
30
28
|
});
|
|
31
|
-
}
|
|
29
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import commandBuild from './src/command.build.js';
|
|
2
|
+
import commandDownloadSelfContained from './src/command.download-self-contained.js';
|
|
3
|
+
import commandInit from './src/command.init.js';
|
|
4
|
+
import commandRun from './src/command.run.js';
|
|
5
|
+
import commandUpgrade from './src/command.upgrade.js';
|
|
6
|
+
import commandVersions from './src/command.versions.js';
|
|
7
|
+
import constants from './src/utilities/constants.js';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
export default (moduleRegistration) => {
|
|
5
10
|
const fcqCommand = moduleRegistration
|
|
6
11
|
.registerCommand(constants.COMMAND_PREFIX)
|
|
7
12
|
.setDescription(
|
|
@@ -13,12 +18,10 @@ module.exports = (moduleRegistration) => {
|
|
|
13
18
|
.setHideIfMissingRequiredProductLicenses()
|
|
14
19
|
.setAsHelpCommand();
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
require('./src/command.versions.js'),
|
|
23
|
-
].forEach((mod) => mod(moduleRegistration, fcqCommand));
|
|
21
|
+
commandBuild(moduleRegistration, fcqCommand);
|
|
22
|
+
commandDownloadSelfContained(moduleRegistration, fcqCommand);
|
|
23
|
+
commandInit(moduleRegistration, fcqCommand);
|
|
24
|
+
commandRun(moduleRegistration, fcqCommand);
|
|
25
|
+
commandUpgrade(moduleRegistration, fcqCommand);
|
|
26
|
+
commandVersions(moduleRegistration, fcqCommand);
|
|
24
27
|
};
|