@fontoxml/fontoxml-development-tools 3.12.0-beta.1 → 3.13.0-nightly.20221123233045

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.
Files changed (92) hide show
  1. package/{.fdtrc → .fdtrc.base} +0 -0
  2. package/README.md +4 -4
  3. package/bitbucket-pipelines.yml +49 -4
  4. package/index.js +1 -1
  5. package/npm-shrinkwrap.json +1036 -898
  6. package/package.json +3 -3
  7. package/src/App.js +66 -48
  8. package/src/BackendAppRepository.js +248 -0
  9. package/src/ConfigManager.js +20 -18
  10. package/src/EditorRepository.js +40 -4
  11. package/src/FdtLicense.js +27 -27
  12. package/src/ModuleRegistrationApi.js +20 -7
  13. package/src/addModulesToApp.js +20 -18
  14. package/src/createConfigFile.js +13 -0
  15. package/src/enrichRequestObject.js +8 -6
  16. package/src/formatVersion.js +70 -0
  17. package/src/getParentDirectoryContainingFileSync.js +84 -30
  18. package/src/modules/content-quality/instanceTemplate/.fontoxmlFcqManifest +0 -0
  19. package/src/modules/core/index.js +68 -27
  20. package/src/modules/core/src/command.fdt.js +1 -1
  21. package/src/modules/core/src/command.who.js +0 -18
  22. package/src/modules/core/src/precontroller.help.js +2 -2
  23. package/src/modules/document-history/instanceTemplate/.fontoxmlFdhManifest +0 -0
  24. package/src/modules/editor/command.editor.controller.js +9 -0
  25. package/src/modules/editor/index.js +22 -0
  26. package/src/modules/editor/src/babelPlugins/recastPlugin.cjs +4 -1
  27. package/src/modules/editor/src/getAppManifest.js +3 -3
  28. package/src/modules/editor-pre-7-7-0/instanceTemplate/manifest.json +0 -0
  29. package/src/modules/editor-pre-7-7-0/instanceTemplate/messages-template.json +0 -0
  30. package/src/modules/editor-pre-7-7-0/instanceTemplateTypeScript/manifest.json +0 -0
  31. package/src/modules/editor-pre-7-7-0/instanceTemplateTypeScript/messages-template.json +0 -0
  32. package/src/modules/editor-pre-7-7-0/src/api/addCommentToAstNode.js +35 -6
  33. package/src/modules/editor-pre-7-7-0/src/api/init/createConfigConfiguration.js +25 -14
  34. package/src/modules/editor-pre-7-7-0/src/api/init/createSchemaExperienceResolver.js +12 -6
  35. package/src/modules/editor-pre-7-7-0/src/api/schema/buildElementConfigurations.js +1 -1
  36. package/src/modules/editor-pre-7-7-0/src/api/schema/createSchemaExperiencePackages.js +1 -1
  37. package/src/modules/editor-pre-7-7-0/src/command.init.controller.js +70 -12
  38. package/src/modules/editor-pre-7-7-0/src/command.upgrade.controller.js +1 -1
  39. package/src/modules/editor-pre-7-7-0/test/api/init/createConfigConfiguration.test.js +42 -6
  40. package/src/modules/editor-pre-7-7-0/test/api/init/fixtures/configjs-DEV-16001.js +52 -0
  41. package/src/modules/localization/test/index.test.js +3 -1
  42. package/src/modules/review/instanceTemplate/.fontoxmlReviewManifest +0 -0
  43. package/src/modules/schema-compiler/instanceTemplate/.fontoxmlSchemaCompilerManifest +0 -0
  44. package/src/modules/shared/src/addBackendDockerCommands.js +75 -19
  45. package/src/modules/shared/src/addBackendDownloadSelfContainedCommands.js +5 -2
  46. package/src/modules/shared/src/addBackendVersionsCommands.js +33 -2
  47. package/src/modules/shared/src/controller-templates/checkInitDestination.js +36 -0
  48. package/src/modules/shared/src/controller-templates/command.backend.build.controller.factory.js +9 -18
  49. package/src/modules/shared/src/controller-templates/command.backend.download-self-contained.controller.factory.js +1 -1
  50. package/src/modules/shared/src/controller-templates/command.backend.init.controller.factory.js +20 -17
  51. package/src/modules/shared/src/controller-templates/command.backend.run.controller.factory.js +35 -64
  52. package/src/modules/shared/src/controller-templates/command.backend.upgrade.controller.factory.js +12 -20
  53. package/src/modules/shared/src/controller-templates/command.backend.version.controller.factory.js +15 -0
  54. package/src/modules/shared/src/controller-templates/command.backend.versions.controller.factory.js +1 -1
  55. package/src/modules/shared/src/controller-templates/docker/validateBackendInstance.js +16 -15
  56. package/src/modules/shared/src/ensureDockerCommands.js +1 -1
  57. package/src/modules/spell-checker/instanceTemplate/.fontoxmlSpellCheckerManifest +0 -0
  58. package/src/request/Command.js +242 -0
  59. package/src/request/DeepOption.js +26 -0
  60. package/src/request/DeepParameter.js +30 -0
  61. package/src/request/DeepSyntaxPart.js +84 -0
  62. package/src/{FdtCommand.js → request/FdtCommand.js} +93 -22
  63. package/src/request/FdtRequest.js +12 -0
  64. package/src/request/InputError.js +12 -0
  65. package/src/request/IsolatedOption.js +44 -0
  66. package/src/request/MultiOption.js +85 -0
  67. package/src/request/NamedSyntaxPart.js +101 -0
  68. package/src/request/Option.js +101 -0
  69. package/src/request/Parameter.js +34 -0
  70. package/src/request/Request.js +10 -0
  71. package/src/request/VariableSyntaxPart.js +85 -0
  72. package/src/request/interpreter.js +175 -0
  73. package/src/request/symbols.js +11 -0
  74. package/src/response/FdtResponse.js +3 -3
  75. package/src/{editorVersions.js → versionHelpers.js} +0 -0
  76. package/test/.fdtrc.test +5 -0
  77. package/test/App.test.js +716 -657
  78. package/test/AssertableWritableStream.test.js +1 -3
  79. package/test/ConfigManager.test.js +104 -0
  80. package/test/FdtCommand.test.js +543 -0
  81. package/test/app/test-module-1/index.js +15 -0
  82. package/test/app-with-platform-linked/config.js +12 -0
  83. package/test/app-with-platform-linked/manifest.json +11 -0
  84. package/test/app-with-platform-linked/platform-linked/fontoxml-base/.gitkeep +0 -0
  85. package/test/backend-app/.env +4 -0
  86. package/test/backend-app/.fontoxmlFcqManifest +3 -0
  87. package/test/formatVersion.test.js +218 -0
  88. package/test/module.core.test.js +118 -46
  89. package/test/module.shared.test.js +0 -27
  90. package/src/createConfigFileInHomedir.js +0 -20
  91. package/src/modules/editor-pre-7-7-0/src/api/init/checkEditorDestination.js +0 -40
  92. package/src/modules/shared/src/controller-templates/docker/BackendManifest.js +0 -42
File without changes
package/README.md CHANGED
@@ -6,7 +6,7 @@ The Fonto Development Tools are command-line tools which offer support for devel
6
6
 
7
7
  ### Node
8
8
 
9
- The tools require [NPM](https://www.npmjs.com/get-npm) on [Node.js®](https://nodejs.org/) version 12.20.x or higher, which are freely available. An active or maintenence LTS release is recommended. After installing Node.js, you can install the latest version of the Fonto Development Tools globally on your system using the following command:
9
+ The tools require [NPM](https://www.npmjs.com/get-npm) on [Node.js®](https://nodejs.org/) version 12.20.x or higher, which are freely available. An active or maintenence LTS release is recommended. After installing Node.js, the latest version of the Fonto Development Tools can be installed globally on your system using the following command:
10
10
 
11
11
  npm i -g @fontoxml/fontoxml-development-tools
12
12
 
@@ -14,13 +14,13 @@ Alternatively, the tools can be installed locally for your project using the fol
14
14
 
15
15
  npm install --save-dev @fontoxml/fontoxml-development-tools
16
16
 
17
- > **tip**: You can use Node Version Manager on Linux/MacOS or its Windows counterpart to install and use multiple version of Node.js on a single system. This is useful if you develop different projects with different versions of Node.js.
17
+ > **tip**: Use Node Version Manager on Linux/MacOS or its Windows counterpart to install and use multiple version of Node.js on a single system. This is useful if you develop different projects with different versions of Node.js.
18
18
 
19
19
  ### Docker
20
20
 
21
- Certain commands, like `review run` and `review build`, require [Docker Community Edition](https://www.docker.com/) to be installed.
21
+ Certain commands, like `review run` and `review build`, require [Docker](https://www.docker.com/) to be installed together with the Docker Compose plugin. Please refer to the [Docker installation instructions](https://docs.docker.com/install/) and the [Compose installation instructions](https://docs.docker.com/compose/install/) to install them.
22
22
 
23
- > **tip**: Docker places their installers behind an unnecessary login. Use the following direct links to avoid having to create an account: [Windows installer](https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe), [macOS installer](https://download.docker.com/mac/stable/Docker.dmg). For Linux, Docker Community Edition is usually available through package managers.
23
+ > **note**: Please note that the Docker Compose plugin differs from the `docker-compose` standalone tool. Run `docker compose version` to verify its availability. Newer versions of Docker Desktop include the plugin by default.
24
24
 
25
25
  ## Usage
26
26
 
@@ -29,17 +29,47 @@ pipelines:
29
29
  - parallel: *build-tests
30
30
 
31
31
  tags:
32
- '*-*':
32
+ 'nightly':
33
33
  - parallel: *build-tests
34
34
  - step:
35
- name: Publish @beta
35
+ image:
36
+ name: fontoxmltoolsinternal.azurecr.io/build-tools/fdt:nightly
37
+ username: $TOOLS_INTERNAL_REGISTRY_USERNAME
38
+ password: $TOOLS_INTERNAL_REGISTRY_PASSWORD
39
+ name: Publish @nightly
36
40
  script:
41
+ - >
42
+ if ! NIGHTLY_VERSION=$(fdt internal generate-version --type nightly --package-json-location ./package.json); then
43
+ echo "Could not generate a nightly version, FDT outputted:";
44
+ echo "$NIGHTLY_VERSION";
45
+ exit 1;
46
+ fi
47
+ - echo "Publishing nightly version '$NIGHTLY_VERSION'."
48
+ - npm version --git-tag-version false $NIGHTLY_VERSION
37
49
  - pipe: atlassian/npm-publish:0.2.3
38
50
  variables:
39
- EXTRA_ARGS: --tag beta
51
+ EXTRA_ARGS: --tag nightly
40
52
  NPM_TOKEN: $NPM_API_TOKEN
41
53
 
42
- '*':
54
+ '*.*.*-rc.*':
55
+ - parallel: *build-tests
56
+ - step:
57
+ name: Publish @rc
58
+ script:
59
+ - pipe: atlassian/npm-publish:0.2.3
60
+ variables:
61
+ EXTRA_ARGS: --tag rc
62
+ NPM_TOKEN: $NPM_API_TOKEN
63
+
64
+ '*.*.*-*':
65
+ - step:
66
+ name: Unsupported tag
67
+ script:
68
+ - >
69
+ echo "The provided tag '$BITBUCKET_TAG' has an unsupported pre-release format and will not be published.";
70
+ exit 1;
71
+
72
+ '*.*.*':
43
73
  - parallel: *build-tests
44
74
  - step:
45
75
  name: Publish @latest
@@ -47,3 +77,18 @@ pipelines:
47
77
  - pipe: atlassian/npm-publish:0.2.3
48
78
  variables:
49
79
  NPM_TOKEN: $NPM_API_TOKEN
80
+
81
+ custom:
82
+ build-release-nightly:
83
+ - step:
84
+ name: Publish @nightly
85
+ script:
86
+ - >
87
+ if git describe --tags --exact-match HEAD --match nightly; then
88
+ echo "The commit $(git rev-parse HEAD) already has the 'nightly' tag.";
89
+ exit 0;
90
+ fi
91
+ - echo "Placing the 'nightly' tag on commit $(git rev-parse HEAD) to trigger the nightly pipeline."
92
+ - git push origin --delete refs/tags/nightly || true
93
+ - git tag --force --annotate --message "This was an automated event ($BITBUCKET_BUILD_NUMBER)." nightly
94
+ - git push origin refs/tags/nightly
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as App } from './src/App.js';
2
2
  export { default as AssertableWritableStream } from './src/AssertableWritableStream.js';
3
- export { default as FdtCommand } from './src/FdtCommand.js';
4
3
  export { default as FdtTable } from './src/FdtTable.js';
4
+ export { default as FdtCommand } from './src/request/FdtCommand.js';