@fontoxml/fontoxml-development-tools 3.11.0 → 3.12.0-beta.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/npm-shrinkwrap.json +3841 -8329
- package/package.json +13 -19
- package/src/App.js +1 -1
- package/src/FdtCommand.js +3 -3
- package/src/FdtLicense.js +95 -114
- package/src/ModuleRegistrationApi.js +44 -16
- package/src/addCoreModulesToApp.js +8 -0
- package/src/modules/connectors/index.js +109 -16
- package/src/modules/connectors/instanceBuild/Dockerfile.build +1 -1
- package/src/modules/connectors/instanceBuild/Dockerfile.run +1 -1
- package/src/modules/connectors/instanceDevBuild/docker-compose.yml +2 -2
- package/src/modules/content-quality/index.js +101 -20
- package/src/modules/content-quality/instanceBuild/Dockerfile +1 -1
- package/src/modules/content-quality/instanceDevBuild/docker-compose.yml +1 -1
- package/src/modules/core/src/precontroller.help.js +23 -26
- package/src/modules/document-history/index.js +101 -20
- package/src/modules/document-history/instanceBuild/Dockerfile +1 -1
- package/src/modules/document-history/instanceDevBuild/docker-compose.yml +1 -1
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureConnectorsCmsStandardDocumentRouter.js +10 -0
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentHistoryGetPostRouteHandler.js +51 -0
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPostRouteHandler.js +65 -76
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPresearchPostRouteHandler.js +10 -7
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentPreviewRouteHandler.js +10 -0
- package/src/modules/editor/dev-cms/connectors-cms-standard/configureDocumentRevisionGetPostRouteHandler.js +69 -0
- package/src/modules/editor/src/commands/command.convert.editor.controller.js +11 -4
- package/src/modules/editor/src/commands/command.convert.package.controller.js +11 -4
- package/src/modules/editor/src/getWebpackConfig.js +13 -0
- package/src/modules/editor/src/webpackPlugins/CheckDeepImportsResolvePlugin.js +4 -0
- package/src/modules/editor-pre-7-7-0/src/api/downloadEditorSDK.js +16 -12
- package/src/modules/editor-pre-7-7-0/src/api/executeAndLog.js +3 -2
- package/src/modules/editor-pre-7-7-0/src/api/schema/compile.js +16 -22
- package/src/modules/editor-pre-7-7-0/src/api/schema/createSchemaPackages.js +8 -0
- package/src/modules/editor-pre-7-7-0/src/api/schema/getSchemaFontoJson.js +76 -48
- package/src/modules/editor-pre-7-7-0/src/command.schema.compile.controller.js +51 -2
- package/src/modules/editor-pre-7-7-0/test/api/schema/buildSchemaExperienceConfigurationModel.test.js +70 -79
- package/src/modules/editor-pre-7-7-0/test/api/schema/fixtures/invalid-fonto-json/fonto.json +1 -0
- package/src/modules/editor-pre-7-7-0/test/api/schema/getSchemaFontoJson.test.js +174 -0
- package/src/modules/editor-pre-7-7-0/test/schemaCompileController.test.js +205 -0
- package/src/modules/localization/index.js +2 -2
- package/src/modules/operations/src/api/getOperations.js +3 -3
- package/src/modules/review/index.js +103 -18
- package/src/modules/review/instanceBuild/Dockerfile +1 -1
- package/src/modules/review/instanceDevBuild/docker-compose.yml +1 -1
- package/src/modules/schema/src/api/getSchemaSummaries.js +2 -2
- package/src/modules/schema/test/getSchemaSummaries.test.js +14 -10
- package/src/modules/schema-compiler/index.js +99 -18
- package/src/modules/schema-compiler/instanceBuild/Dockerfile +1 -1
- package/src/modules/schema-compiler/instanceDevBuild/docker-compose.yml +1 -1
- package/src/modules/shared/index.js +3 -0
- package/src/modules/shared/package.json +14 -0
- package/src/modules/shared/src/addBackendDockerCommands.js +334 -0
- package/src/modules/shared/src/addBackendDownloadSelfContainedCommands.js +78 -0
- package/src/modules/shared/src/addBackendVersionsCommands.js +55 -0
- package/src/modules/shared/src/controller-templates/command.backend.build.controller.factory.js +273 -0
- package/src/modules/shared/src/controller-templates/command.backend.download-self-contained.controller.factory.js +131 -0
- package/src/modules/shared/src/controller-templates/command.backend.init.controller.factory.js +88 -0
- package/src/modules/shared/src/controller-templates/command.backend.run.controller.factory.js +420 -0
- package/src/modules/shared/src/controller-templates/command.backend.upgrade.controller.factory.js +79 -0
- package/src/modules/shared/src/controller-templates/command.backend.versions.controller.factory.js +23 -0
- package/src/modules/shared/src/controller-templates/docker/BackendManifest.js +42 -0
- package/src/modules/shared/src/controller-templates/docker/copyWhitelistedFiles.js +23 -0
- package/src/modules/shared/src/controller-templates/docker/dockerCleanup.js +146 -0
- package/src/modules/shared/src/controller-templates/docker/tryDockerLogout.js +31 -0
- package/src/modules/shared/src/controller-templates/docker/validateBackendInstance.js +48 -0
- package/src/modules/shared/src/ensureDockerCommands.js +61 -0
- package/src/modules/shared/src/executeAndLog.js +113 -0
- package/src/modules/{review/src/utilities/setEntryVisibility.js → shared/src/setFileVisibility.js} +8 -2
- package/src/modules/spell-checker/index.js +101 -18
- package/src/modules/spell-checker/instanceBuild/Dockerfile +1 -1
- package/src/modules/spell-checker/instanceDevBuild/docker-compose.yml +1 -1
- package/test/module.shared.test.js +81 -0
- package/src/modules/connectors/src/command.build.controller.js +0 -256
- package/src/modules/connectors/src/command.build.js +0 -54
- package/src/modules/connectors/src/command.download-self-contained.controller.js +0 -110
- package/src/modules/connectors/src/command.download-self-contained.js +0 -50
- package/src/modules/connectors/src/command.init.controller.js +0 -91
- package/src/modules/connectors/src/command.init.js +0 -42
- package/src/modules/connectors/src/command.run.controller.js +0 -462
- package/src/modules/connectors/src/command.run.js +0 -67
- package/src/modules/connectors/src/command.upgrade.controller.js +0 -52
- package/src/modules/connectors/src/command.upgrade.js +0 -42
- package/src/modules/connectors/src/command.versions.controller.js +0 -14
- package/src/modules/connectors/src/command.versions.js +0 -25
- package/src/modules/connectors/src/utilities/FontoxmlConnectorsManifest.js +0 -32
- package/src/modules/connectors/src/utilities/cleanup.js +0 -70
- package/src/modules/connectors/src/utilities/constants.js +0 -42
- package/src/modules/connectors/src/utilities/copyWhitelistedFiles.js +0 -22
- package/src/modules/connectors/src/utilities/executeAndLog.js +0 -63
- package/src/modules/connectors/src/utilities/getVerbosityLevel.js +0 -11
- package/src/modules/connectors/src/utilities/getWhitelist.js +0 -16
- package/src/modules/connectors/src/utilities/setEntryVisibility.js +0 -22
- package/src/modules/connectors/src/utilities/validateInstance.js +0 -29
- package/src/modules/content-quality/src/command.build.controller.js +0 -260
- package/src/modules/content-quality/src/command.build.js +0 -56
- package/src/modules/content-quality/src/command.download-self-contained.controller.js +0 -110
- package/src/modules/content-quality/src/command.download-self-contained.js +0 -52
- package/src/modules/content-quality/src/command.init.controller.js +0 -91
- package/src/modules/content-quality/src/command.init.js +0 -44
- package/src/modules/content-quality/src/command.run.controller.js +0 -444
- package/src/modules/content-quality/src/command.run.js +0 -64
- package/src/modules/content-quality/src/command.upgrade.controller.js +0 -52
- package/src/modules/content-quality/src/command.upgrade.js +0 -44
- package/src/modules/content-quality/src/command.versions.controller.js +0 -14
- package/src/modules/content-quality/src/command.versions.js +0 -25
- package/src/modules/content-quality/src/utilities/FontoxmlFcqManifest.js +0 -30
- package/src/modules/content-quality/src/utilities/cleanup.js +0 -70
- package/src/modules/content-quality/src/utilities/constants.js +0 -44
- package/src/modules/content-quality/src/utilities/copyWhitelistedFiles.js +0 -22
- package/src/modules/content-quality/src/utilities/executeAndLog.js +0 -63
- package/src/modules/content-quality/src/utilities/getVerbosityLevel.js +0 -11
- package/src/modules/content-quality/src/utilities/getWhitelist.js +0 -16
- package/src/modules/content-quality/src/utilities/setEntryVisibility.js +0 -22
- package/src/modules/content-quality/src/utilities/validateInstance.js +0 -29
- package/src/modules/document-history/src/command.build.controller.js +0 -260
- package/src/modules/document-history/src/command.build.js +0 -56
- package/src/modules/document-history/src/command.download-self-contained.controller.js +0 -110
- package/src/modules/document-history/src/command.download-self-contained.js +0 -50
- package/src/modules/document-history/src/command.init.controller.js +0 -91
- package/src/modules/document-history/src/command.init.js +0 -44
- package/src/modules/document-history/src/command.run.controller.js +0 -444
- package/src/modules/document-history/src/command.run.js +0 -64
- package/src/modules/document-history/src/command.upgrade.controller.js +0 -52
- package/src/modules/document-history/src/command.upgrade.js +0 -44
- package/src/modules/document-history/src/command.versions.controller.js +0 -14
- package/src/modules/document-history/src/command.versions.js +0 -25
- package/src/modules/document-history/src/utilities/FontoxmlFdhManifest.js +0 -30
- package/src/modules/document-history/src/utilities/cleanup.js +0 -70
- package/src/modules/document-history/src/utilities/constants.js +0 -44
- package/src/modules/document-history/src/utilities/copyWhitelistedFiles.js +0 -22
- package/src/modules/document-history/src/utilities/executeAndLog.js +0 -63
- package/src/modules/document-history/src/utilities/getVerbosityLevel.js +0 -11
- package/src/modules/document-history/src/utilities/getWhitelist.js +0 -16
- package/src/modules/document-history/src/utilities/setEntryVisibility.js +0 -22
- package/src/modules/document-history/src/utilities/validateInstance.js +0 -29
- package/src/modules/review/src/command.build.controller.js +0 -256
- package/src/modules/review/src/command.build.js +0 -54
- package/src/modules/review/src/command.download-self-contained.controller.js +0 -107
- package/src/modules/review/src/command.download-self-contained.js +0 -50
- package/src/modules/review/src/command.init.controller.js +0 -89
- package/src/modules/review/src/command.init.js +0 -42
- package/src/modules/review/src/command.run.controller.js +0 -428
- package/src/modules/review/src/command.run.js +0 -60
- package/src/modules/review/src/command.upgrade.controller.js +0 -59
- package/src/modules/review/src/command.upgrade.js +0 -42
- package/src/modules/review/src/command.versions.controller.js +0 -12
- package/src/modules/review/src/command.versions.js +0 -25
- package/src/modules/review/src/utilities/FontoxmlReviewManifest.js +0 -30
- package/src/modules/review/src/utilities/cleanup.js +0 -70
- package/src/modules/review/src/utilities/constants.js +0 -42
- package/src/modules/review/src/utilities/copyWhitelistedFiles.js +0 -22
- package/src/modules/review/src/utilities/executeAndLog.js +0 -63
- package/src/modules/review/src/utilities/getVerbosityLevel.js +0 -11
- package/src/modules/review/src/utilities/getWhitelist.js +0 -16
- package/src/modules/review/src/utilities/validateInstance.js +0 -45
- package/src/modules/schema-compiler/src/command.build.controller.js +0 -256
- package/src/modules/schema-compiler/src/command.build.js +0 -54
- package/src/modules/schema-compiler/src/command.download-self-contained.controller.js +0 -110
- package/src/modules/schema-compiler/src/command.download-self-contained.js +0 -50
- package/src/modules/schema-compiler/src/command.init.controller.js +0 -91
- package/src/modules/schema-compiler/src/command.init.js +0 -42
- package/src/modules/schema-compiler/src/command.run.controller.js +0 -430
- package/src/modules/schema-compiler/src/command.run.js +0 -60
- package/src/modules/schema-compiler/src/command.upgrade.controller.js +0 -64
- package/src/modules/schema-compiler/src/command.upgrade.js +0 -42
- package/src/modules/schema-compiler/src/command.versions.controller.js +0 -14
- package/src/modules/schema-compiler/src/command.versions.js +0 -25
- package/src/modules/schema-compiler/src/utilities/FontoxmlSchemaCompilerManifest.js +0 -32
- package/src/modules/schema-compiler/src/utilities/cleanup.js +0 -70
- package/src/modules/schema-compiler/src/utilities/constants.js +0 -43
- package/src/modules/schema-compiler/src/utilities/copyWhitelistedFiles.js +0 -22
- package/src/modules/schema-compiler/src/utilities/executeAndLog.js +0 -63
- package/src/modules/schema-compiler/src/utilities/getVerbosityLevel.js +0 -11
- package/src/modules/schema-compiler/src/utilities/getWhitelist.js +0 -16
- package/src/modules/schema-compiler/src/utilities/setEntryVisibility.js +0 -22
- package/src/modules/schema-compiler/src/utilities/validateInstance.js +0 -47
- package/src/modules/spell-checker/src/command.build.controller.js +0 -257
- package/src/modules/spell-checker/src/command.build.js +0 -54
- package/src/modules/spell-checker/src/command.download-self-contained.controller.js +0 -110
- package/src/modules/spell-checker/src/command.download-self-contained.js +0 -50
- package/src/modules/spell-checker/src/command.init.controller.js +0 -91
- package/src/modules/spell-checker/src/command.init.js +0 -42
- package/src/modules/spell-checker/src/command.run.controller.js +0 -430
- package/src/modules/spell-checker/src/command.run.js +0 -62
- package/src/modules/spell-checker/src/command.upgrade.controller.js +0 -61
- package/src/modules/spell-checker/src/command.upgrade.js +0 -42
- package/src/modules/spell-checker/src/command.versions.controller.js +0 -14
- package/src/modules/spell-checker/src/command.versions.js +0 -25
- package/src/modules/spell-checker/src/utilities/FontoxmlSpellCheckerManifest.js +0 -32
- package/src/modules/spell-checker/src/utilities/cleanup.js +0 -70
- package/src/modules/spell-checker/src/utilities/constants.js +0 -42
- package/src/modules/spell-checker/src/utilities/copyWhitelistedFiles.js +0 -22
- package/src/modules/spell-checker/src/utilities/executeAndLog.js +0 -63
- package/src/modules/spell-checker/src/utilities/getVerbosityLevel.js +0 -11
- package/src/modules/spell-checker/src/utilities/getWhitelist.js +0 -16
- package/src/modules/spell-checker/src/utilities/setEntryVisibility.js +0 -22
- package/src/modules/spell-checker/src/utilities/validateInstance.js +0 -47
|
@@ -1,22 +1,107 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
3
|
+
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
7
|
+
export default async (moduleRegistration) => {
|
|
8
|
+
const options = {
|
|
9
|
+
licenseProductName: 'review',
|
|
10
|
+
licensesRequired: ['review'],
|
|
11
|
+
productLabel: 'Fonto Review',
|
|
12
|
+
commandPrefix: 'review',
|
|
13
|
+
|
|
14
|
+
documentationConfigurationGuide:
|
|
15
|
+
'https://documentation.fontoxml.com/latest/configuration-13d2d631668c',
|
|
16
|
+
documentationExecuteError:
|
|
17
|
+
'https://documentation.fontoxml.com/latest/review-9c9f35e6d1bf',
|
|
18
|
+
documentationGettingStartedGuide:
|
|
19
|
+
'https://documentation.fontoxml.com/latest/getting-started-8ca615260377',
|
|
20
|
+
|
|
21
|
+
defaultHttpPort: 6020,
|
|
22
|
+
defaultImageName: 'fonto-review',
|
|
23
|
+
defaultImageTag: 'latest',
|
|
24
|
+
|
|
25
|
+
manifestFileName: '.fontoxmlReviewManifest',
|
|
26
|
+
manifestVersionPropertyName: 'reviewVersion',
|
|
27
|
+
|
|
28
|
+
instanceBuildDockerfilePath: path.join(
|
|
29
|
+
__dirname,
|
|
30
|
+
'instanceBuild',
|
|
31
|
+
'Dockerfile'
|
|
32
|
+
),
|
|
33
|
+
instanceDevBuildDirectoryPath: path.join(__dirname, 'instanceDevBuild'),
|
|
34
|
+
instanceDevBuildDockerfilePath: path.join(
|
|
35
|
+
__dirname,
|
|
36
|
+
'instanceBuild',
|
|
37
|
+
'Dockerfile'
|
|
38
|
+
),
|
|
39
|
+
instanceTemplateDirectoryPath: path.join(__dirname, 'instanceTemplate'),
|
|
40
|
+
|
|
41
|
+
requiredConfiguration: [],
|
|
42
|
+
temporaryDirectoryName: '.reviewTmp',
|
|
43
|
+
temporaryBuildDirectoryName: '.reviewBuildTmp',
|
|
44
|
+
whitelist: [
|
|
45
|
+
// Required.
|
|
46
|
+
'exports.xml',
|
|
47
|
+
// Optional.
|
|
48
|
+
'nlog.config',
|
|
49
|
+
],
|
|
50
|
+
|
|
51
|
+
debugEnvEntries: {
|
|
52
|
+
Logging__LogLevel__Default: 'Trace',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const command = moduleRegistration
|
|
57
|
+
.registerCommand(options.commandPrefix)
|
|
58
|
+
.setDescription(
|
|
59
|
+
`Provides tools for working with ${options.productLabel}.`
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
.addRequiredProductLicenses(options.licensesRequired)
|
|
13
63
|
.setHideIfMissingRequiredProductLicenses()
|
|
14
64
|
.setAsHelpCommand();
|
|
15
65
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
66
|
+
if (options.commandAlias) {
|
|
67
|
+
command.addAlias(options.commandAlias);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const sharedModulePath = moduleRegistration.getPathToModule(
|
|
71
|
+
'@fontoxml/fontoxml-development-tools-module-shared'
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// Add the docker based commands.
|
|
75
|
+
const addBackendDockerCommandsPath = pathToFileURL(
|
|
76
|
+
path.resolve(sharedModulePath, 'src/addBackendDockerCommands.js')
|
|
77
|
+
);
|
|
78
|
+
const addBackendDockerCommands = (
|
|
79
|
+
await import(addBackendDockerCommandsPath)
|
|
80
|
+
).default;
|
|
81
|
+
addBackendDockerCommands(moduleRegistration, command, options);
|
|
82
|
+
|
|
83
|
+
// Add the version commands.
|
|
84
|
+
const addBackendVersionsCommandsPath = pathToFileURL(
|
|
85
|
+
path.resolve(sharedModulePath, 'src/addBackendVersionsCommands.js')
|
|
86
|
+
);
|
|
87
|
+
const addBackendVersionsCommands = (
|
|
88
|
+
await import(addBackendVersionsCommandsPath)
|
|
89
|
+
).default;
|
|
90
|
+
addBackendVersionsCommands(moduleRegistration, command, options);
|
|
91
|
+
|
|
92
|
+
// Add the download-self-contained command.
|
|
93
|
+
const addBackendDownloadSelfContainedCommandsPath = pathToFileURL(
|
|
94
|
+
path.resolve(
|
|
95
|
+
sharedModulePath,
|
|
96
|
+
'src/addBackendDownloadSelfContainedCommands.js'
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
const addBackendDownloadSelfContainedCommands = (
|
|
100
|
+
await import(addBackendDownloadSelfContainedCommandsPath)
|
|
101
|
+
).default;
|
|
102
|
+
addBackendDownloadSelfContainedCommands(
|
|
103
|
+
moduleRegistration,
|
|
104
|
+
command,
|
|
105
|
+
options
|
|
106
|
+
);
|
|
22
107
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import fastGlob from 'fast-glob';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
import SchemaSummary from './SchemaSummary.js';
|
|
@@ -6,7 +6,7 @@ import SchemaSummary from './SchemaSummary.js';
|
|
|
6
6
|
export default function getSchemaSummaries(p) {
|
|
7
7
|
const basePath = path.resolve(p);
|
|
8
8
|
|
|
9
|
-
return
|
|
9
|
+
return fastGlob
|
|
10
10
|
.sync(
|
|
11
11
|
[
|
|
12
12
|
// Traditional schema files compiled in a build
|
|
@@ -22,18 +22,24 @@ describe('fontoxml-development-tools-module-schema/api/getSchemaSummaries', () =
|
|
|
22
22
|
assert.ok(schemaSummaries);
|
|
23
23
|
assert.strictEqual(schemaSummaries.length, 4);
|
|
24
24
|
|
|
25
|
+
schemaSummaries.sort((a, b) => {
|
|
26
|
+
return a.path.localeCompare(b.path);
|
|
27
|
+
});
|
|
28
|
+
|
|
25
29
|
assert.ok(schemaSummaries[0]);
|
|
26
30
|
assert.ok(
|
|
27
31
|
schemaSummaries[0].path.indexOf(
|
|
28
32
|
formatPath(
|
|
29
|
-
'test/app/packages/test-packages-schema/src/
|
|
33
|
+
'test/app/packages-shared/test-packages-shared-lazy-schema/src/assets/schemas/test-packages-shared-lazy-shell.json'
|
|
30
34
|
)
|
|
31
35
|
) !== -1
|
|
32
36
|
);
|
|
33
|
-
assert.strictEqual(
|
|
37
|
+
assert.strictEqual(
|
|
38
|
+
schemaSummaries[0].package,
|
|
39
|
+
'test-packages-shared-lazy-schema'
|
|
40
|
+
);
|
|
34
41
|
assert.deepStrictEqual(schemaSummaries[0].locations, [
|
|
35
|
-
'urn:packages.xsd',
|
|
36
|
-
'packages.dtd',
|
|
42
|
+
'urn:packages-shared-lazy.xsd',
|
|
37
43
|
]);
|
|
38
44
|
|
|
39
45
|
assert.ok(schemaSummaries[1]);
|
|
@@ -70,16 +76,14 @@ describe('fontoxml-development-tools-module-schema/api/getSchemaSummaries', () =
|
|
|
70
76
|
assert.ok(
|
|
71
77
|
schemaSummaries[3].path.indexOf(
|
|
72
78
|
formatPath(
|
|
73
|
-
'test/app/packages
|
|
79
|
+
'test/app/packages/test-packages-schema/src/schema.json'
|
|
74
80
|
)
|
|
75
81
|
) !== -1
|
|
76
82
|
);
|
|
77
|
-
assert.strictEqual(
|
|
78
|
-
schemaSummaries[3].package,
|
|
79
|
-
'test-packages-shared-lazy-schema'
|
|
80
|
-
);
|
|
83
|
+
assert.strictEqual(schemaSummaries[3].package, 'test-packages-schema');
|
|
81
84
|
assert.deepStrictEqual(schemaSummaries[3].locations, [
|
|
82
|
-
'urn:packages
|
|
85
|
+
'urn:packages.xsd',
|
|
86
|
+
'packages.dtd',
|
|
83
87
|
]);
|
|
84
88
|
});
|
|
85
89
|
|
|
@@ -1,24 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
3
|
+
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
7
|
+
export default async (moduleRegistration) => {
|
|
8
|
+
const options = {
|
|
9
|
+
licenseProductName: 'schema-compiler',
|
|
10
|
+
licensesRequired: ['editor'],
|
|
11
|
+
productLabel: 'Fonto Schema Compiler',
|
|
12
|
+
commandPrefix: 'schema-compiler',
|
|
13
|
+
|
|
14
|
+
documentationConfigurationGuide:
|
|
15
|
+
'https://documentation.fontoxml.com/latest/editor-b4ee7cad8e30',
|
|
16
|
+
documentationExecuteError:
|
|
17
|
+
'https://documentation.fontoxml.com/latest/editor-b4ee7cad8e30',
|
|
18
|
+
documentationGettingStartedGuide:
|
|
19
|
+
'https://documentation.fontoxml.com/latest/editor-b4ee7cad8e30',
|
|
20
|
+
|
|
21
|
+
defaultHttpPort: 6040,
|
|
22
|
+
defaultImageName: 'fonto-schema-compiler',
|
|
23
|
+
defaultImageTag: 'latest',
|
|
24
|
+
|
|
25
|
+
manifestFileName: '.fontoxmlSchemaCompilerManifest',
|
|
26
|
+
manifestVersionPropertyName: 'schemaCompilerVersion',
|
|
27
|
+
|
|
28
|
+
instanceBuildDockerfilePath: path.join(
|
|
29
|
+
__dirname,
|
|
30
|
+
'instanceBuild',
|
|
31
|
+
'Dockerfile'
|
|
32
|
+
),
|
|
33
|
+
instanceDevBuildDirectoryPath: path.join(__dirname, 'instanceDevBuild'),
|
|
34
|
+
instanceDevBuildDockerfilePath: path.join(
|
|
35
|
+
__dirname,
|
|
36
|
+
'instanceBuild',
|
|
37
|
+
'Dockerfile'
|
|
38
|
+
),
|
|
39
|
+
instanceTemplateDirectoryPath: path.join(__dirname, 'instanceTemplate'),
|
|
40
|
+
|
|
41
|
+
requiredConfiguration: [],
|
|
42
|
+
temporaryDirectoryName: '.schemaCompilerTmp',
|
|
43
|
+
temporaryBuildDirectoryName: '.schemaCompilerBuildTmp',
|
|
44
|
+
whitelist: [
|
|
45
|
+
// Optional.
|
|
46
|
+
'nlog.config',
|
|
47
|
+
],
|
|
48
|
+
|
|
49
|
+
debugEnvEntries: {
|
|
50
|
+
Logging__LogLevel__Default: 'Trace',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const command = moduleRegistration
|
|
55
|
+
.registerHiddenCommand(options.commandPrefix)
|
|
11
56
|
.setDescription(
|
|
12
|
-
|
|
57
|
+
`Provides tools for working with ${options.productLabel}.`
|
|
13
58
|
)
|
|
14
|
-
|
|
59
|
+
|
|
60
|
+
.addRequiredProductLicenses(options.licensesRequired)
|
|
15
61
|
.setHideIfMissingRequiredProductLicenses()
|
|
16
62
|
.setAsHelpCommand();
|
|
17
63
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
64
|
+
if (options.commandAlias) {
|
|
65
|
+
command.addAlias(options.commandAlias);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const sharedModulePath = moduleRegistration.getPathToModule(
|
|
69
|
+
'@fontoxml/fontoxml-development-tools-module-shared'
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
// Add the docker based commands.
|
|
73
|
+
const addBackendDockerCommandsPath = pathToFileURL(
|
|
74
|
+
path.resolve(sharedModulePath, 'src/addBackendDockerCommands.js')
|
|
75
|
+
);
|
|
76
|
+
const addBackendDockerCommands = (
|
|
77
|
+
await import(addBackendDockerCommandsPath)
|
|
78
|
+
).default;
|
|
79
|
+
addBackendDockerCommands(moduleRegistration, command, options);
|
|
80
|
+
|
|
81
|
+
// Add the version commands.
|
|
82
|
+
const addBackendVersionsCommandsPath = pathToFileURL(
|
|
83
|
+
path.resolve(sharedModulePath, 'src/addBackendVersionsCommands.js')
|
|
84
|
+
);
|
|
85
|
+
const addBackendVersionsCommands = (
|
|
86
|
+
await import(addBackendVersionsCommandsPath)
|
|
87
|
+
).default;
|
|
88
|
+
addBackendVersionsCommands(moduleRegistration, command, options);
|
|
89
|
+
|
|
90
|
+
// Add the download-self-contained command.
|
|
91
|
+
const addBackendDownloadSelfContainedCommandsPath = pathToFileURL(
|
|
92
|
+
path.resolve(
|
|
93
|
+
sharedModulePath,
|
|
94
|
+
'src/addBackendDownloadSelfContainedCommands.js'
|
|
95
|
+
)
|
|
96
|
+
);
|
|
97
|
+
const addBackendDownloadSelfContainedCommands = (
|
|
98
|
+
await import(addBackendDownloadSelfContainedCommandsPath)
|
|
99
|
+
).default;
|
|
100
|
+
addBackendDownloadSelfContainedCommands(
|
|
101
|
+
moduleRegistration,
|
|
102
|
+
command,
|
|
103
|
+
options
|
|
104
|
+
);
|
|
24
105
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fontoxml/fontoxml-development-tools-module-shared",
|
|
3
|
+
"description": "Provides shared functionality for FontoXML Development Tools.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": "The Fonto Team",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"fdt",
|
|
9
|
+
"fonto",
|
|
10
|
+
"fontoxml"
|
|
11
|
+
],
|
|
12
|
+
"main": "index.js",
|
|
13
|
+
"type": "module"
|
|
14
|
+
}
|