@fontoxml/fontoxml-development-tools 3.7.0 → 3.8.1
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/README.md +1 -1
- package/bin/development-tools.js +8 -8
- package/index.js +4 -6
- package/npm-shrinkwrap.json +938 -5226
- package/package.json +4 -3
- 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 +8 -8
- 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
|
@@ -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 FontoxmlFcqManifest from './utilities/FontoxmlFcqManifest.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(
|
|
@@ -259,4 +257,4 @@ module.exports = function buildCommand(req, res) {
|
|
|
259
257
|
});
|
|
260
258
|
})
|
|
261
259
|
);
|
|
262
|
-
}
|
|
260
|
+
}
|
|
@@ -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, fcqCommand) => {
|
|
6
10
|
fcqCommand
|
|
7
|
-
.addCommand(
|
|
11
|
+
.addCommand(
|
|
12
|
+
'build',
|
|
13
|
+
path.resolve(__dirname, 'command.build.controller.js')
|
|
14
|
+
)
|
|
8
15
|
.setDescription(
|
|
9
16
|
'Build a Fonto Content Quality 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,12 +1,19 @@
|
|
|
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, fcqCommand) => {
|
|
6
10
|
fcqCommand
|
|
7
11
|
.addCommand(
|
|
8
12
|
'download-self-contained',
|
|
9
|
-
|
|
13
|
+
path.resolve(
|
|
14
|
+
__dirname,
|
|
15
|
+
'command.download-self-contained.controller.js'
|
|
16
|
+
)
|
|
10
17
|
)
|
|
11
18
|
.addAlias('dsc')
|
|
12
19
|
.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 FontoxmlFcqManifest from './utilities/FontoxmlFcqManifest.js';
|
|
6
|
+
import setEntryVisibility from './utilities/setEntryVisibility.js';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
const FontoxmlFcqManifest = require('./utilities/FontoxmlFcqManifest');
|
|
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,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, fcqCommand) => {
|
|
6
10
|
fcqCommand
|
|
7
|
-
.addCommand(
|
|
11
|
+
.addCommand(
|
|
12
|
+
'init',
|
|
13
|
+
path.resolve(__dirname, 'command.init.controller.js')
|
|
14
|
+
)
|
|
8
15
|
.setDescription(
|
|
9
16
|
'Initialize a Fonto Content Quality instance in an empty or nonexistent directory.'
|
|
10
17
|
)
|
|
@@ -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 FontoxmlFcqManifest from './utilities/FontoxmlFcqManifest.js';
|
|
6
|
+
import cleanup from './utilities/cleanup.js';
|
|
7
|
+
import constants from './utilities/constants.js';
|
|
8
|
+
import copyWhitelistedFiles from './utilities/copyWhitelistedFiles.js';
|
|
9
|
+
import executeAndLog from './utilities/executeAndLog.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 verboseFcqConfigurationEntries = {
|
|
18
16
|
Logging__LogLevel__Default: 'Trace',
|
|
@@ -86,7 +84,7 @@ function copyFcqConfiguration(fcqConfiguration, tempDir, verbosityLevel, res) {
|
|
|
86
84
|
});
|
|
87
85
|
}
|
|
88
86
|
|
|
89
|
-
|
|
87
|
+
export default function runCommand(req, res) {
|
|
90
88
|
res.caption(req.command.getLongName());
|
|
91
89
|
|
|
92
90
|
const directoryPath = path.resolve(
|
|
@@ -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, fcqCommand) => {
|
|
6
10
|
fcqCommand
|
|
7
|
-
.addCommand('run', '
|
|
11
|
+
.addCommand('run', path.resolve(__dirname, 'command.run.controller.js'))
|
|
8
12
|
.setDescription(
|
|
9
13
|
'Run a Fonto Content Quality instance 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 FontoxmlFcqManifest from './utilities/FontoxmlFcqManifest.js';
|
|
6
|
+
import setEntryVisibility from './utilities/setEntryVisibility.js';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
const FontoxmlFcqManifest = require('./utilities/FontoxmlFcqManifest');
|
|
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,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, fcqCommand) => {
|
|
6
10
|
fcqCommand
|
|
7
|
-
.addCommand(
|
|
11
|
+
.addCommand(
|
|
12
|
+
'upgrade',
|
|
13
|
+
path.resolve(__dirname, 'command.upgrade.controller.js')
|
|
14
|
+
)
|
|
8
15
|
.setDescription(
|
|
9
16
|
'Upgrade an existing Fonto Content Quality instance to the specified version.'
|
|
10
17
|
)
|
|
@@ -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 Content Quality 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, fcqCommand) => {
|
|
4
8
|
fcqCommand
|
|
5
|
-
.addCommand(
|
|
9
|
+
.addCommand(
|
|
10
|
+
'versions',
|
|
11
|
+
path.resolve(__dirname, 'command.versions.controller.js')
|
|
12
|
+
)
|
|
6
13
|
.setDescription('List the available Fonto Content Quality versions.')
|
|
7
14
|
|
|
8
15
|
.addHiddenOption(
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class FontoxmlFcqManifest {
|
|
3
|
+
export default class FontoxmlFcqManifest {
|
|
6
4
|
constructor(fcqVersion) {
|
|
7
5
|
this.fcqVersion = fcqVersion;
|
|
8
6
|
}
|
|
@@ -30,5 +28,3 @@ class FontoxmlFcqManifest {
|
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
module.exports = FontoxmlFcqManifest;
|
|
@@ -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-content-quality',
|
|
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,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import commandFDT from './src/command.fdt.js';
|
|
4
|
+
import commandLicenseValidate from './src/command.license.validate.js';
|
|
5
|
+
import commandModule from './src/command.module.js';
|
|
6
|
+
import commandWho from './src/command.who.js';
|
|
7
|
+
import precontrollerDebug from './src/precontroller.debug.js';
|
|
8
|
+
import precontrollerHelp from './src/precontroller.help.js';
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
export default (moduleRegistration, app, options) => {
|
|
6
11
|
moduleRegistration.registerContextInformer((_request, response) => {
|
|
7
12
|
response.caption('Modules');
|
|
8
13
|
|
|
@@ -25,18 +30,11 @@ module.exports = (moduleRegistration, app, options) => {
|
|
|
25
30
|
});
|
|
26
31
|
});
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// Root FDT command.
|
|
34
|
-
require('./src/command.fdt.js'),
|
|
35
|
-
|
|
36
|
-
// Commands.
|
|
37
|
-
require('./src/command.module.js'),
|
|
38
|
-
require('./src/command.who.js'),
|
|
39
|
-
].forEach((mod) => mod(moduleRegistration, app, options));
|
|
33
|
+
precontrollerDebug(moduleRegistration, app, options);
|
|
34
|
+
precontrollerHelp(moduleRegistration, app, options);
|
|
35
|
+
commandFDT(moduleRegistration, app, options);
|
|
36
|
+
commandModule(moduleRegistration, app, options);
|
|
37
|
+
commandWho(moduleRegistration, app, options);
|
|
40
38
|
|
|
41
39
|
// Only add Fonto related logic when configured to do so.
|
|
42
40
|
if (!options.skipAddModules) {
|
|
@@ -121,8 +119,6 @@ module.exports = (moduleRegistration, app, options) => {
|
|
|
121
119
|
.setDescription('License management.')
|
|
122
120
|
.setAsHelpCommand();
|
|
123
121
|
|
|
124
|
-
|
|
125
|
-
mod(moduleRegistration, licenseCommand)
|
|
126
|
-
);
|
|
122
|
+
commandLicenseValidate(moduleRegistration, licenseCommand);
|
|
127
123
|
}
|
|
128
124
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
function leftAlign(text, lineWidth) {
|
|
4
2
|
if (text.length < lineWidth) {
|
|
5
3
|
text = '\xa0'.repeat(lineWidth - text.length) + text;
|
|
@@ -7,7 +5,7 @@ function leftAlign(text, lineWidth) {
|
|
|
7
5
|
return text;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
export default (moduleRegistration, app, opts) => {
|
|
11
9
|
const logoConfig = moduleRegistration.registerConfiguration(
|
|
12
10
|
'logo',
|
|
13
11
|
{
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
function outputLicenseInfoAndChanges(res, oldLicenseInfo, newLicenseInfo) {
|
|
4
2
|
// Compare old and new license info.
|
|
5
3
|
const licenseeHasChanged =
|
|
@@ -72,7 +70,7 @@ function outputLicenseInfoAndChanges(res, oldLicenseInfo, newLicenseInfo) {
|
|
|
72
70
|
);
|
|
73
71
|
}
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
export default (moduleRegistration, licenseCommand) => {
|
|
76
74
|
function validateCommand(req, res) {
|
|
77
75
|
res.caption(req.command.getLongName());
|
|
78
76
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import path from 'path';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports = (moduleRegistration, app) => {
|
|
6
|
-
function moduleController(req, res) {
|
|
3
|
+
export default (moduleRegistration, app) => {
|
|
4
|
+
async function moduleController(req, res) {
|
|
7
5
|
res.caption(req.command.getLongName());
|
|
8
6
|
|
|
9
7
|
if (req.options.list) {
|
|
@@ -77,7 +75,7 @@ module.exports = (moduleRegistration, app) => {
|
|
|
77
75
|
res.debug(`Try enabling ${req.options.add.length} modules`);
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
req.options.add
|
|
78
|
+
for (const option of req.options.add) {
|
|
81
79
|
const modulePath = path.resolve(process.cwd(), option);
|
|
82
80
|
|
|
83
81
|
const existingModAtPath = app.modules.find(
|
|
@@ -92,7 +90,7 @@ module.exports = (moduleRegistration, app) => {
|
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
try {
|
|
95
|
-
const mod = app.silentEnableModule(modulePath);
|
|
93
|
+
const mod = await app.silentEnableModule(modulePath);
|
|
96
94
|
|
|
97
95
|
if (!mod) {
|
|
98
96
|
res.property(
|
|
@@ -113,7 +111,7 @@ module.exports = (moduleRegistration, app) => {
|
|
|
113
111
|
} catch (e) {
|
|
114
112
|
res.property('skipped', e.stack, null, 'notice');
|
|
115
113
|
}
|
|
116
|
-
}
|
|
114
|
+
}
|
|
117
115
|
|
|
118
116
|
res.break();
|
|
119
117
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import os from 'os';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
2
4
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
export default (moduleRegistration, app) => {
|
|
7
9
|
function whoController(req, res) {
|
|
8
10
|
res.caption(req.command.getLongName());
|
|
9
11
|
|