typo3-typescript-sources 14.3.8 → 14.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/.github/workflows/sync-and-publish.yml +240 -191
  2. package/.last-synced-tag +1 -1
  3. package/README.md +13 -5
  4. package/adminpanel/admin-panel.ts +22 -22
  5. package/adminpanel/modules/cache.ts +3 -3
  6. package/backend/action-dispatcher.ts +8 -3
  7. package/backend/bookmark/bookmark-manager.ts +2 -1
  8. package/backend/bookmark/bookmark-store.ts +13 -17
  9. package/backend/clipboard-panel.ts +11 -5
  10. package/backend/code-editor/element/code-mirror-element.ts +1 -1
  11. package/backend/code-editor/language/typoscript.ts +3 -3
  12. package/backend/code-editor/stream-parser/typoscript.ts +2 -2
  13. package/backend/color-picker.ts +2 -2
  14. package/backend/column-selector-button.ts +6 -6
  15. package/backend/context-help.ts +3 -3
  16. package/backend/context-menu-actions.ts +14 -12
  17. package/backend/context-menu.ts +10 -4
  18. package/backend/contextual-record-edit.ts +2 -1
  19. package/backend/date-time-picker.ts +2 -1
  20. package/backend/drag-tooltip.ts +9 -4
  21. package/backend/drag-uploader.ts +6 -5
  22. package/backend/element/contextual-record-edit-trigger.ts +7 -6
  23. package/backend/element/datetime-element.ts +2 -1
  24. package/backend/element/draggable-resizable-element.ts +18 -12
  25. package/backend/element/editable-page-title.ts +2 -1
  26. package/backend/element/icon-element.ts +2 -2
  27. package/backend/element/pseudo-button.ts +29 -5
  28. package/backend/element/qrcode-modal-button.ts +2 -2
  29. package/backend/element/sidebar-toggle-element.ts +1 -15
  30. package/backend/element/thumbnail-element.ts +2 -2
  31. package/backend/element-browser.ts +4 -3
  32. package/backend/event/consumer-scope.ts +2 -2
  33. package/backend/event/event-dispatcher.ts +4 -2
  34. package/backend/event/interaction-request-assignment.ts +1 -1
  35. package/backend/event/interaction-request-map.ts +3 -3
  36. package/backend/form-engine/container/flex-form-container-container.ts +2 -2
  37. package/backend/form-engine/container/flex-form-section-container.ts +1 -1
  38. package/backend/form-engine/container/inline-control-container.ts +14 -14
  39. package/backend/form-engine/element/abstract-sortable-select-items.ts +3 -3
  40. package/backend/form-engine/element/color-element.ts +1 -1
  41. package/backend/form-engine/element/datetime-element.ts +1 -1
  42. package/backend/form-engine/element/extra/char-counter.ts +3 -3
  43. package/backend/form-engine/element/extra/select-box-filter.ts +1 -1
  44. package/backend/form-engine/element/mfa-info-element.ts +2 -2
  45. package/backend/form-engine/element/online-media-form-element.ts +5 -1
  46. package/backend/form-engine/element/select-multiple-side-by-side-element.ts +2 -2
  47. package/backend/form-engine/element/select-tree.ts +3 -3
  48. package/backend/form-engine/element/slug-element.ts +7 -7
  49. package/backend/form-engine/element/suggest/result-container.ts +1 -1
  50. package/backend/form-engine/element/table-wizard-element.ts +4 -4
  51. package/backend/form-engine/inline-relation/ajax-dispatcher.ts +3 -3
  52. package/backend/form-engine-validation.ts +11 -5
  53. package/backend/form-engine.ts +15 -14
  54. package/backend/global-event-handler.ts +1 -1
  55. package/backend/hotkeys/hotkey-struct.ts +1 -1
  56. package/backend/hotkeys.ts +5 -4
  57. package/backend/image-manipulation.ts +21 -20
  58. package/backend/info-window.ts +4 -3
  59. package/backend/layout-module/drag-drop.ts +6 -5
  60. package/backend/layout-module/paste.ts +1 -1
  61. package/backend/live-search/element/result/item/action/action-container.ts +1 -1
  62. package/backend/live-search/element/result/item/item-container.ts +4 -4
  63. package/backend/live-search/element/result/result-container.ts +5 -0
  64. package/backend/live-search/element/result/result-pagination.ts +1 -1
  65. package/backend/live-search/live-search-configurator.ts +4 -3
  66. package/backend/live-search/live-search-shortcut.ts +2 -1
  67. package/backend/live-search/live-search.ts +6 -5
  68. package/backend/live-search/result-types/default-result-type.ts +2 -1
  69. package/backend/localization/label-provider.ts +6 -5
  70. package/backend/localization/localization-wizard.ts +4 -4
  71. package/backend/localization/steps/content-record-selection-step.ts +8 -8
  72. package/backend/localization/steps/handler-selection-step.ts +4 -4
  73. package/backend/localization/steps/mode-step.ts +4 -4
  74. package/backend/localization/steps/source-language-step.ts +4 -4
  75. package/backend/localization/steps/target-language-step.ts +4 -4
  76. package/backend/login-refresh.ts +4 -24
  77. package/backend/login.ts +5 -4
  78. package/backend/modal.ts +9 -15
  79. package/backend/module/iframe.ts +10 -0
  80. package/backend/module/router.ts +10 -0
  81. package/backend/module-menu.ts +7 -6
  82. package/backend/multi-record-selection-action.ts +1 -1
  83. package/backend/multi-record-selection-delete-action.ts +1 -1
  84. package/backend/multi-record-selection-edit-action.ts +3 -2
  85. package/backend/multi-record-selection.ts +14 -14
  86. package/backend/multi-step-wizard.ts +9 -2
  87. package/backend/new-multiple-pages.ts +2 -2
  88. package/backend/new-record-wizard.ts +17 -16
  89. package/backend/notification.ts +3 -19
  90. package/backend/page-wizard/page-wizard.ts +2 -2
  91. package/backend/page-wizard/steps/doktype-step.ts +5 -5
  92. package/backend/pagetsconfig/pagetsconfig-includes.ts +1 -1
  93. package/backend/popover.ts +5 -5
  94. package/backend/record-download-button.ts +1 -1
  95. package/backend/recordlist.ts +12 -10
  96. package/backend/security/element/csp-reports.ts +8 -8
  97. package/backend/security/element/sudo-mode.ts +6 -7
  98. package/backend/settings/type/page.ts +3 -2
  99. package/backend/setup-module.ts +2 -2
  100. package/backend/severity.ts +2 -22
  101. package/backend/sortable-table.ts +10 -4
  102. package/backend/storage/abstract-client-storage.ts +2 -2
  103. package/backend/storage/module-state-storage.ts +5 -3
  104. package/backend/storage/persistent.ts +15 -3
  105. package/backend/switch-user.ts +3 -2
  106. package/backend/tests/backend/utility/dom-helper-test.ts +2 -2
  107. package/backend/tests/element/pseudo-button-test.ts +95 -0
  108. package/backend/tests/form-engine/element/extra/select-box-filter-test.ts +3 -3
  109. package/backend/tests/form-engine-validation-test.ts +1 -1
  110. package/backend/tests/notification-test.ts +1 -1
  111. package/backend/tests/tree/tree-test.ts +41 -0
  112. package/backend/tree/file-storage-browser.ts +6 -4
  113. package/backend/tree/file-storage-tree-container.ts +12 -10
  114. package/backend/tree/page-browser.ts +3 -2
  115. package/backend/tree/page-position-select.ts +3 -2
  116. package/backend/tree/page-tree-element.ts +6 -5
  117. package/backend/tree/page-tree.ts +7 -1
  118. package/backend/tree/tree-module-state.ts +5 -5
  119. package/backend/tree/tree.ts +17 -9
  120. package/backend/user-pass-login.ts +2 -2
  121. package/backend/user-settings-manager.ts +2 -1
  122. package/backend/utility/collapse-state-persister.ts +1 -1
  123. package/backend/utility/collapse-state-search.ts +6 -6
  124. package/backend/utility/dom-helper.ts +3 -3
  125. package/backend/utility/drag-drop-utility.ts +2 -1
  126. package/backend/utility/top-level-module-import.ts +3 -1
  127. package/backend/utility.ts +6 -6
  128. package/backend/viewport/content-container.ts +2 -1
  129. package/backend/viewport/content-navigation-toggle.ts +3 -10
  130. package/backend/viewport/content-navigation.ts +5 -0
  131. package/backend/viewport/navigation-container.ts +1 -1
  132. package/backend/viewport/toolbar.ts +3 -3
  133. package/backend/viewport.ts +5 -4
  134. package/backend/window-manager.ts +7 -6
  135. package/backend/wizard/events/auto-advance-event.ts +6 -0
  136. package/backend/wizard/events/before-next-step-event.ts +6 -0
  137. package/backend/wizard/events/step-summary-event.ts +6 -0
  138. package/backend/wizard/finisher/noop-finisher.ts +3 -2
  139. package/backend/wizard/finisher/redirect-finisher.ts +4 -3
  140. package/backend/wizard/finisher/reload-finisher.ts +3 -2
  141. package/backend/wizard/move-content-element.ts +1 -1
  142. package/backend/wizard/move-page.ts +2 -1
  143. package/backend/wizard/wizard.ts +8 -10
  144. package/belog/backend-log.ts +2 -2
  145. package/beuser/permissions.ts +2 -2
  146. package/core/ajax/ajax-response.ts +1 -1
  147. package/core/ajax/input-transformer.ts +1 -1
  148. package/core/event/debounce-event.ts +4 -4
  149. package/core/event/event-interface.ts +3 -3
  150. package/core/event/regular-event.ts +7 -7
  151. package/core/event/request-animation-frame-event.ts +4 -4
  152. package/core/event/throttle-event.ts +4 -4
  153. package/core/java-script-item-processor.ts +9 -1
  154. package/core/lit-helper.ts +5 -2
  155. package/core/referrer-refresh.ts +2 -2
  156. package/core/security-utility.ts +1 -1
  157. package/core/tests/utility/top-window-test.ts +121 -0
  158. package/core/utility/top-window.ts +99 -0
  159. package/dashboard/dashboard-wizard.ts +2 -2
  160. package/dashboard/dashboard.ts +7 -6
  161. package/dashboard/wizard/steps/preset-step.ts +3 -3
  162. package/extensionmanager/dependency-check.ts +2 -1
  163. package/extensionmanager/extension-toggle-button.ts +2 -1
  164. package/extensionmanager/main.ts +7 -7
  165. package/extensionmanager/repository.ts +2 -1
  166. package/filelist/browse-files.ts +1 -1
  167. package/filelist/browse-folders.ts +2 -2
  168. package/filelist/context-menu-actions.ts +20 -19
  169. package/filelist/file-delete.ts +4 -3
  170. package/filelist/file-list-dragdrop.ts +8 -7
  171. package/filelist/file-list-rename-handler.ts +2 -1
  172. package/filelist/file-list-replace-handler.ts +2 -1
  173. package/filelist/file-list-transfer-handler.ts +7 -6
  174. package/filelist/file-list.ts +12 -11
  175. package/form/backend/form-editor/component/date-editor.ts +4 -0
  176. package/form/backend/form-editor/component/form-element-selector.ts +4 -0
  177. package/form/backend/form-editor/inspector-component.ts +6 -6
  178. package/form/backend/form-editor/mediator.ts +36 -36
  179. package/form/backend/form-editor/modals-component.ts +1 -1
  180. package/form/backend/form-editor/stage-component.ts +4 -4
  181. package/form/backend/form-editor/view-model.ts +7 -7
  182. package/form/backend/form-manager/view-model.ts +5 -5
  183. package/form/backend/form-wizard/form-wizard.ts +2 -2
  184. package/form/backend/form-wizard/steps/storage-step.ts +1 -1
  185. package/impexp/context-menu-actions.ts +5 -3
  186. package/impexp/import-export.ts +1 -1
  187. package/info/translation-status.ts +2 -2
  188. package/install/ajax/ajax-queue.ts +1 -1
  189. package/install/installer.ts +2 -1
  190. package/install/module/abstract-interactable-module.ts +4 -4
  191. package/install/module/environment/image-processing.ts +4 -4
  192. package/install/module/environment/mail-test.ts +2 -2
  193. package/install/module/maintenance/clear-tables.ts +3 -3
  194. package/install/module/maintenance/clear-typo3temp-files.ts +8 -8
  195. package/install/module/maintenance/create-admin.ts +3 -3
  196. package/install/module/maintenance/database-analyzer.ts +9 -7
  197. package/install/module/maintenance/language-packs.ts +6 -5
  198. package/install/module/maintenance/reference-index.ts +1 -1
  199. package/install/module/settings/change-install-tool-password.ts +1 -1
  200. package/install/module/settings/extension-configuration.ts +8 -9
  201. package/install/module/settings/features.ts +1 -1
  202. package/install/module/settings/local-configuration.ts +5 -5
  203. package/install/module/settings/presets.ts +2 -2
  204. package/install/module/settings/system-maintainer.ts +1 -1
  205. package/install/module/upgrade/extension-scanner.ts +5 -5
  206. package/install/module/upgrade/tca-migrations-check.ts +1 -1
  207. package/install/module/upgrade/upgrade-docs.ts +16 -16
  208. package/install/module/upgrade/upgrade-wizards.ts +7 -8
  209. package/install/renderable/flash-message.ts +2 -2
  210. package/install/renderable/info-box.ts +2 -2
  211. package/install/renderable/language-packs.ts +8 -2
  212. package/lowlevel/query-generator.ts +2 -2
  213. package/opendocs/open-document-store.ts +5 -4
  214. package/package.json +2 -2
  215. package/recycler/recycler.ts +2 -1
  216. package/redirects/event-handler.ts +8 -1
  217. package/rte-ckeditor/ckeditor5.ts +7 -3
  218. package/rte-ckeditor/tests/ckeditor5-test.ts +68 -0
  219. package/scheduler/form-engine/element/timing-options-element.ts +1 -1
  220. package/scheduler/scheduler-add-group.ts +2 -1
  221. package/scheduler/scheduler.ts +2 -2
  222. package/styleguide/checkbox-demo.ts +1 -1
  223. package/tstemplate/template-analyzer.ts +1 -1
  224. package/viewpage/main.ts +1 -1
  225. package/workspaces/backend.ts +11 -9
  226. package/workspaces/preview.ts +3 -2
  227. package/workspaces/renderable/record-table.ts +1 -1
  228. package/workspaces/renderable/send-to-stage-form.ts +1 -1
  229. package/workspaces/workspace-state.ts +5 -4
@@ -2,213 +2,222 @@ name: Sync TYPO3 TypeScript Sources and Publish
2
2
 
3
3
  on:
4
4
  schedule:
5
- # Check daily at 2 AM for new tags
5
+ # Check daily at 2 AM for new tags and new commits on TYPO3 main
6
6
  - cron: '0 2 * * *'
7
7
  workflow_dispatch:
8
8
  inputs:
9
+ target:
10
+ description: 'Branch to sync'
11
+ type: choice
12
+ options:
13
+ - all
14
+ - main
15
+ - v14.x
16
+ - v13.x
17
+ default: all
9
18
  tag:
10
- description: 'Specific TYPO3 tag (e.g. v14.0.0 or v13.4.0)'
19
+ description: 'Specific TYPO3 tag for a tagged branch (e.g. v14.3.8); ignored for main'
11
20
  required: false
12
21
  type: string
13
22
 
14
23
  permissions:
15
24
  contents: read
16
25
 
26
+ env:
27
+ PACKAGE_NAME: typo3-typescript-sources
28
+ UPSTREAM_REPO: https://github.com/TYPO3/typo3.git
29
+
17
30
  jobs:
18
31
  setup:
19
32
  runs-on: ubuntu-latest
20
33
  outputs:
21
34
  matrix: ${{ steps.set-matrix.outputs.matrix }}
22
35
  steps:
23
- - name: Build version matrix
36
+ - name: Build branch matrix
24
37
  id: set-matrix
38
+ env:
39
+ TARGET: ${{ inputs.target || 'all' }}
25
40
  run: |
26
- if [[ "${{ github.event_name }}" == "schedule" ]]; then
27
- # Schedule runs daily for both major versions
28
- echo 'matrix={"include":[{"major_version":"14","target_branch":"main"},{"major_version":"13","target_branch":"v13.x"}]}' >> $GITHUB_OUTPUT
29
- elif [[ "${{ github.ref_name }}" == "v13.x" ]]; then
30
- echo 'matrix={"include":[{"major_version":"13","target_branch":"v13.x"}]}' >> $GITHUB_OUTPUT
31
- else
32
- echo 'matrix={"include":[{"major_version":"14","target_branch":"main"}]}' >> $GITHUB_OUTPUT
33
- fi
34
-
35
- check-and-sync:
41
+ # mode "head": follow an upstream branch, no git tag, no npm release
42
+ # mode "tag": follow the newest upstream vMAJOR.x.y tag, tag + publish
43
+ BRANCHES='[
44
+ {"target_branch":"main","mode":"head","source_ref":"main","major":"","npm_tag":""},
45
+ {"target_branch":"v14.x","mode":"tag","source_ref":"","major":"14","npm_tag":"latest"},
46
+ {"target_branch":"v13.x","mode":"tag","source_ref":"","major":"13","npm_tag":"v13-latest"}
47
+ ]'
48
+ MATRIX=$(jq -c --arg t "$TARGET" '{include: [.[] | select($t == "all" or .target_branch == $t)]}' <<< "$BRANCHES")
49
+ echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
50
+
51
+ sync:
36
52
  needs: setup
37
53
  runs-on: ubuntu-latest
54
+ permissions:
55
+ contents: read
56
+ id-token: write
57
+ concurrency:
58
+ group: sync-${{ matrix.target_branch }}
59
+ cancel-in-progress: false
38
60
  strategy:
39
61
  fail-fast: false
40
62
  matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
63
+ env:
64
+ TARGET_BRANCH: ${{ matrix.target_branch }}
65
+ MODE: ${{ matrix.mode }}
66
+ MAJOR: ${{ matrix.major }}
67
+ NPM_TAG: ${{ matrix.npm_tag }}
41
68
  steps:
42
69
  - name: Checkout split repository
43
- uses: actions/checkout@v4
70
+ uses: actions/checkout@v6
44
71
  with:
45
72
  ref: ${{ matrix.target_branch }}
73
+ token: ${{ secrets.PAT_TOKEN }}
46
74
  fetch-depth: 0
47
75
 
48
- - name: Check for new TYPO3 tags
76
+ - name: Setup Git
77
+ run: |
78
+ git config --global user.name "TYPO3 TypeScript Sync Bot"
79
+ git config --global user.email "bot@maikschneider.de"
80
+
81
+ - name: Check upstream for changes
49
82
  id: check
83
+ env:
84
+ SOURCE_BRANCH: ${{ matrix.source_ref }}
85
+ MANUAL_TAG: ${{ inputs.tag }}
50
86
  run: |
51
- MAJOR="${{ matrix.major_version }}"
52
-
53
- # Fetch all tags from TYPO3 repository for the target major version
54
- git ls-remote --tags https://github.com/TYPO3/typo3.git | \
55
- grep -E "refs/tags/v${MAJOR}\.[0-9]+\.[0-9]+$" | \
56
- sed 's/.*refs\/tags\///' | \
57
- sort -V > /tmp/typo3_tags.txt
58
-
59
- # Get last synced tag
60
- LAST_SYNCED=""
61
- if [ -f .last-synced-tag ]; then
62
- LAST_SYNCED=$(cat .last-synced-tag)
87
+ if [ "$MODE" = "head" ]; then
88
+ UPSTREAM_SHA=$(git ls-remote "$UPSTREAM_REPO" "refs/heads/${SOURCE_BRANCH}" | cut -f1)
89
+ if [ -z "$UPSTREAM_SHA" ]; then
90
+ echo "Error: upstream branch ${SOURCE_BRANCH} not found"
91
+ exit 1
92
+ fi
93
+
94
+ LAST_SYNCED=$(cat .last-synced-commit 2>/dev/null || true)
95
+ if [ "$UPSTREAM_SHA" = "$LAST_SYNCED" ]; then
96
+ echo "No new commits on ${SOURCE_BRANCH} (current: $LAST_SYNCED)"
97
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
98
+ else
99
+ echo "New commit on ${SOURCE_BRANCH}: $UPSTREAM_SHA (previous: ${LAST_SYNCED:-none})"
100
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
101
+ echo "source_ref=${SOURCE_BRANCH}" >> "$GITHUB_OUTPUT"
102
+ fi
103
+ exit 0
63
104
  fi
64
105
 
65
- # Manual tag input takes priority
66
- if [ -n "${{ github.event.inputs.tag }}" ]; then
67
- NEW_TAG="${{ github.event.inputs.tag }}"
68
- # Validate that the manual tag matches the expected major version
69
- if ! echo "$NEW_TAG" | grep -qE "^v${MAJOR}\."; then
70
- echo "Error: Tag $NEW_TAG does not match expected major version v${MAJOR}.x for this branch"
71
- echo "has_new_version=false" >> $GITHUB_OUTPUT
106
+ if [ -n "$MANUAL_TAG" ]; then
107
+ if ! echo "$MANUAL_TAG" | grep -qE "^v${MAJOR}\.[0-9]+\.[0-9]+$"; then
108
+ echo "Tag $MANUAL_TAG does not belong to ${TARGET_BRANCH} (v${MAJOR}.x), skipping sync"
109
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
72
110
  exit 0
73
111
  fi
112
+ NEW_TAG="$MANUAL_TAG"
74
113
  echo "Manually specified tag: $NEW_TAG"
75
114
  else
76
- # Find newest tag that has not been synced yet
77
- NEW_TAG=$(tail -n1 /tmp/typo3_tags.txt)
115
+ NEW_TAG=$(git ls-remote --tags "$UPSTREAM_REPO" | \
116
+ grep -E "refs/tags/v${MAJOR}\.[0-9]+\.[0-9]+$" | \
117
+ sed 's/.*refs\/tags\///' | \
118
+ sort -V | tail -n1)
78
119
  fi
79
120
 
80
121
  if [ -z "$NEW_TAG" ]; then
81
122
  echo "No TYPO3 v${MAJOR}.x tag found"
82
- echo "has_new_version=false" >> $GITHUB_OUTPUT
123
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
83
124
  exit 0
84
125
  fi
85
126
 
127
+ LAST_SYNCED=$(cat .last-synced-tag 2>/dev/null || true)
86
128
  if [ "$NEW_TAG" = "$LAST_SYNCED" ]; then
87
129
  echo "No new version available (current: $LAST_SYNCED)"
88
- echo "has_new_version=false" >> $GITHUB_OUTPUT
130
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
89
131
  else
90
- echo "New version found: $NEW_TAG (previous: $LAST_SYNCED)"
91
- echo "has_new_version=true" >> $GITHUB_OUTPUT
92
- echo "typo3_version=$NEW_TAG" >> $GITHUB_OUTPUT
93
- echo "release_tag=${NEW_TAG#v}" >> $GITHUB_OUTPUT
132
+ echo "New version found: $NEW_TAG (previous: ${LAST_SYNCED:-none})"
133
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
134
+ echo "source_ref=${NEW_TAG}" >> "$GITHUB_OUTPUT"
94
135
  fi
95
136
 
96
- - name: Setup Git
97
- if: steps.check.outputs.has_new_version == 'true'
137
+ - name: Clone TYPO3 repository
138
+ if: steps.check.outputs.has_changes == 'true'
139
+ env:
140
+ SOURCE_REF: ${{ steps.check.outputs.source_ref }}
98
141
  run: |
99
- git config --global user.name "TYPO3 TypeScript Sync Bot"
100
- git config --global user.email "bot@maikschneider.de"
142
+ git clone --depth 1 --branch "$SOURCE_REF" "$UPSTREAM_REPO" "$RUNNER_TEMP/typo3-source"
143
+ if [ ! -d "$RUNNER_TEMP/typo3-source/Build/Sources/TypeScript" ]; then
144
+ echo "✗ Error: Build/Sources/TypeScript not found"
145
+ exit 1
146
+ fi
101
147
 
102
- - name: Clone TYPO3 repository at specific tag
103
- if: steps.check.outputs.has_new_version == 'true'
148
+ - name: Sync content to split repository
149
+ if: steps.check.outputs.has_changes == 'true'
150
+ id: sync
151
+ env:
152
+ SOURCE_REF: ${{ steps.check.outputs.source_ref }}
104
153
  run: |
105
- TYPO3_TAG="${{ steps.check.outputs.typo3_version }}"
106
- echo "Cloning TYPO3 repository at tag: $TYPO3_TAG"
154
+ SRC="$RUNNER_TEMP/typo3-source"
107
155
 
108
- git clone --depth 1 --branch "$TYPO3_TAG" \
109
- https://github.com/TYPO3/typo3.git typo3-source
156
+ find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name '.github' -exec rm -rf {} +
110
157
 
111
- - name: Extract TypeScript sources
112
- if: steps.check.outputs.has_new_version == 'true'
113
- run: |
114
- mkdir -p typescript-split
158
+ cp -r "$SRC/Build/Sources/TypeScript/." .
159
+ [ -f "$SRC/LICENSE.txt" ] && cp "$SRC/LICENSE.txt" .
160
+ [ -f "$SRC/README.md" ] && cp "$SRC/README.md" README-TYPO3.md
115
161
 
116
- # Copy TypeScript sources
117
- if [ -d "typo3-source/Build/Sources/TypeScript" ]; then
118
- cp -r typo3-source/Build/Sources/TypeScript/* typescript-split/
119
- echo "✓ TypeScript sources extracted"
162
+ if [ "$MODE" = "head" ]; then
163
+ SOURCE_SHA=$(git -C "$SRC" rev-parse HEAD)
164
+ VERSION=$(sed -n "s/.*const VERSION = '\(.*\)';/\1/p" "$SRC/typo3/sysext/core/Classes/Information/Typo3Version.php")
165
+ if [ -z "$VERSION" ]; then
166
+ echo "Error: could not read version from Typo3Version.php"
167
+ exit 1
168
+ fi
169
+ echo "$SOURCE_SHA" > .last-synced-commit
170
+ echo "version_label=${SOURCE_REF}@${SOURCE_SHA:0:12} (${VERSION})" >> "$GITHUB_OUTPUT"
171
+ echo "source_tree=${SOURCE_SHA}" >> "$GITHUB_OUTPUT"
120
172
  else
121
- echo "✗ Error: Build/Sources/TypeScript not found"
122
- exit 1
173
+ VERSION="${SOURCE_REF#v}"
174
+ echo "$SOURCE_REF" > .last-synced-tag
175
+ echo "version_label=${SOURCE_REF}" >> "$GITHUB_OUTPUT"
176
+ echo "source_tree=${SOURCE_REF}" >> "$GITHUB_OUTPUT"
123
177
  fi
124
178
 
125
- # Copy relevant root files
126
- [ -f "typo3-source/LICENSE.txt" ] && cp typo3-source/LICENSE.txt typescript-split/
127
- [ -f "typo3-source/README.md" ] && cp typo3-source/README.md typescript-split/README-TYPO3.md
128
-
129
- - name: Checkout split repository for sync
130
- if: steps.check.outputs.has_new_version == 'true'
131
- uses: actions/checkout@v4
132
- with:
133
- path: split-repo
134
- ref: ${{ matrix.target_branch }}
135
- token: ${{ secrets.PAT_TOKEN }}
136
- fetch-depth: 0
179
+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
137
180
 
138
- - name: Sync content to split repository
139
- if: steps.check.outputs.has_new_version == 'true'
140
- run: |
141
- # Delete old contents (except .git, .github, package.json)
142
- cd split-repo
143
- find . -mindepth 1 -maxdepth 1 \
144
- ! -name '.git' \
145
- ! -name '.github' \
146
- ! -name 'package.json' \
147
- ! -name 'package-lock.json' \
148
- ! -name '.last-synced-tag' \
149
- ! -name 'README.md' \
150
- ! -name 'node_modules' \
151
- -exec rm -rf {} +
152
-
153
- # Copy new contents
154
- cp -r ../typescript-split/* .
155
-
156
- # Save synced tag
157
- echo "${{ steps.check.outputs.typo3_version }}" > .last-synced-tag
158
-
159
- - name: Create/Update package.json
160
- if: steps.check.outputs.has_new_version == 'true'
161
- working-directory: split-repo
181
+ - name: Create package.json
182
+ if: steps.check.outputs.has_changes == 'true'
183
+ env:
184
+ VERSION: ${{ steps.sync.outputs.version }}
185
+ SOURCE_TREE: ${{ steps.sync.outputs.source_tree }}
162
186
  run: |
163
- TYPO3_VERSION="${{ steps.check.outputs.typo3_version }}"
164
- # Remove 'v' prefix for npm version
165
- NPM_VERSION="${TYPO3_VERSION#v}"
166
-
167
- cat > package.json << EOF
168
- {
169
- "name": "typo3-typescript-sources",
170
- "version": "${NPM_VERSION}",
171
- "description": "TYPO3 Core TypeScript Sources - Extracted from TYPO3/typo3 repository",
172
- "main": "index.js",
173
- "types": "index.d.ts",
174
- "scripts": {
175
- "test": "echo \"No tests specified\""
176
- },
177
- "repository": {
178
- "type": "git",
179
- "url": "git+https://github.com/maikschneider/typo3-typescript-sources.git"
180
- },
181
- "keywords": [
182
- "typo3",
183
- "typescript",
184
- "sources",
185
- "cms"
186
- ],
187
- "author": "TYPO3 Core Team",
188
- "license": "GPL-2.0-or-later",
189
- "bugs": {
190
- "url": "https://github.com/maikschneider/typo3-typescript-sources/issues"
191
- },
192
- "homepage": "https://github.com/maikschneider/typo3-typescript-sources#readme",
193
- "publishConfig": {
194
- "access": "public"
195
- },
196
- "typo3": {
197
- "sourceRepository": "https://github.com/TYPO3/typo3",
198
- "sourceTag": "${TYPO3_VERSION}",
199
- "sourcePath": "Build/Sources/TypeScript"
200
- }
201
- }
202
- EOF
203
-
204
- echo "✓ package.json created with version $NPM_VERSION"
187
+ # main is installed from git only; "private" guards against an accidental npm publish
188
+ jq -n \
189
+ --arg name "$PACKAGE_NAME" \
190
+ --arg version "$VERSION" \
191
+ --arg source "$SOURCE_TREE" \
192
+ --argjson private "$([ "$MODE" = "head" ] && echo true || echo false)" \
193
+ '{
194
+ name: $name,
195
+ version: $version,
196
+ description: "TYPO3 Core TypeScript Sources - Extracted from TYPO3/typo3 repository",
197
+ main: "index.js",
198
+ types: "index.d.ts",
199
+ scripts: { test: "echo \"No tests specified\"" },
200
+ repository: { type: "git", url: "git+https://github.com/maikschneider/typo3-typescript-sources.git" },
201
+ keywords: ["typo3", "typescript", "sources", "cms"],
202
+ author: "TYPO3 Core Team",
203
+ license: "GPL-2.0-or-later",
204
+ bugs: { url: "https://github.com/maikschneider/typo3-typescript-sources/issues" },
205
+ homepage: "https://github.com/maikschneider/typo3-typescript-sources#readme",
206
+ publishConfig: { access: "public" },
207
+ typo3: {
208
+ sourceRepository: "https://github.com/TYPO3/typo3",
209
+ sourceTag: $source,
210
+ sourcePath: "Build/Sources/TypeScript"
211
+ }
212
+ } + (if $private then { private: true } else {} end)' > package.json
213
+
214
+ echo "✓ package.json created with version $VERSION"
205
215
 
206
216
  - name: Create README
207
- if: steps.check.outputs.has_new_version == 'true'
208
- working-directory: split-repo
217
+ if: steps.check.outputs.has_changes == 'true'
218
+ env:
219
+ VERSION_LABEL: ${{ steps.sync.outputs.version_label }}
209
220
  run: |
210
- TYPO3_VERSION="${{ steps.check.outputs.typo3_version }}"
211
-
212
221
  cat > README.md << 'EOF'
213
222
  # TYPO3 TypeScript Sources
214
223
 
@@ -221,7 +230,14 @@ jobs:
221
230
  ## 📦 Installation
222
231
 
223
232
  ```bash
233
+ # Current LTS (v14)
224
234
  npm install typo3-typescript-sources
235
+
236
+ # v13
237
+ npm install typo3-typescript-sources@v13-latest
238
+
239
+ # TYPO3 main (development, not published to npm)
240
+ npm install github:maikschneider/typo3-typescript-sources#main
225
241
  ```
226
242
 
227
243
  ## 🔍 Source
@@ -232,10 +248,11 @@ jobs:
232
248
 
233
249
  ## 🌿 Branches
234
250
 
235
- | Branch | TYPO3 Version | npm tag |
236
- |----------|---------------|-----------|
237
- | `main` | v14.x | `latest` |
238
- | `v13.x` | v13.x | `v13-latest` |
251
+ | Branch | TYPO3 Source | npm tag |
252
+ |----------|----------------------|--------------|
253
+ | `main` | `main` (every commit) | – |
254
+ | `v14.x` | v14.x releases | `latest` |
255
+ | `v13.x` | v13.x releases | `v13-latest` |
239
256
 
240
257
  ## 📝 License
241
258
 
@@ -251,67 +268,99 @@ jobs:
251
268
  For official TYPO3 packages, please refer to the [TYPO3 Core repository](https://github.com/TYPO3/typo3).
252
269
  EOF
253
270
 
254
- # Replace placeholder
255
- sed -i "s/TYPO3_VERSION_PLACEHOLDER/${TYPO3_VERSION}/" README.md
271
+ sed -i "s|TYPO3_VERSION_PLACEHOLDER|${VERSION_LABEL}|" README.md
256
272
 
257
273
  - name: Commit changes
258
- if: steps.check.outputs.has_new_version == 'true'
259
- working-directory: split-repo
274
+ if: steps.check.outputs.has_changes == 'true'
275
+ id: commit
276
+ env:
277
+ VERSION: ${{ steps.sync.outputs.version }}
278
+ VERSION_LABEL: ${{ steps.sync.outputs.version_label }}
279
+ SOURCE_TREE: ${{ steps.sync.outputs.source_tree }}
260
280
  run: |
261
- TARGET_BRANCH="${{ matrix.target_branch }}"
262
- git add .
281
+ git add -A
263
282
 
264
283
  if git diff --staged --quiet; then
265
284
  echo "No changes to commit"
285
+ echo "committed=false" >> "$GITHUB_OUTPUT"
266
286
  exit 0
267
287
  fi
268
288
 
269
- TYPO3_VERSION="${{ steps.check.outputs.typo3_version }}"
270
- git commit -m "Sync with TYPO3 ${TYPO3_VERSION}
271
-
272
- Source: https://github.com/TYPO3/typo3/tree/${TYPO3_VERSION}
289
+ git commit -m "Sync with TYPO3 ${VERSION_LABEL}" \
290
+ -m "Source: https://github.com/TYPO3/typo3/tree/${SOURCE_TREE}
273
291
  Path: Build/Sources/TypeScript/"
274
292
 
275
- RELEASE_TAG="${{ steps.check.outputs.release_tag }}"
276
- git tag -a "${RELEASE_TAG}" -m "Release ${RELEASE_TAG} from TYPO3 ${TYPO3_VERSION}"
293
+ if [ "$MODE" = "tag" ]; then
294
+ git tag -a "${VERSION}" -m "Release ${VERSION} from TYPO3 ${VERSION_LABEL}"
295
+ fi
277
296
 
278
- git push origin "${TARGET_BRANCH}"
279
- git push origin "${RELEASE_TAG}"
297
+ echo "committed=true" >> "$GITHUB_OUTPUT"
280
298
 
281
299
  - name: Setup Node.js
282
- if: steps.check.outputs.has_new_version == 'true'
283
- uses: actions/setup-node@v4
300
+ if: matrix.mode == 'tag'
301
+ uses: actions/setup-node@v6
284
302
  with:
285
- node-version: '20'
286
- registry-url: 'https://registry.npmjs.org'
303
+ node-version: '24'
287
304
 
288
- - name: Publish to npm
289
- if: steps.check.outputs.has_new_version == 'true'
290
- working-directory: split-repo
305
+ - name: Publish unpublished versions to npm
306
+ if: matrix.mode == 'tag'
307
+ id: publish
291
308
  run: |
292
- echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
309
+ # Trusted publishing (OIDC) needs npm >= 11.5.1
310
+ npm install -g npm@^11.5.1
293
311
 
294
- MAJOR="${{ matrix.major_version }}"
295
- if [ "$MAJOR" = "13" ]; then
296
- npm publish --access public --tag v13-latest
297
- else
298
- npm publish --access public
299
- fi
312
+ PUBLISHED=$(npm view "$PACKAGE_NAME" versions --json 2>/dev/null || echo '[]')
313
+
314
+ # Ascending order, so the dist-tag ends on the newest version
315
+ PUBLISHED_NOW=""
316
+ for VERSION in $(git tag -l | grep -E "^${MAJOR}\.[0-9]+\.[0-9]+$" | sort -V); do
317
+ if jq -e --arg v "$VERSION" '[.] | flatten | index($v) != null' <<< "$PUBLISHED" > /dev/null; then
318
+ continue
319
+ fi
320
+
321
+ echo "Publishing ${VERSION} with dist-tag ${NPM_TAG}"
322
+ DIR="$RUNNER_TEMP/publish-${VERSION}"
323
+ git worktree add --detach "$DIR" "$VERSION"
324
+ (cd "$DIR" && npm publish --access public --tag "$NPM_TAG")
325
+ git worktree remove --force "$DIR"
326
+ PUBLISHED_NOW="${PUBLISHED_NOW} ${VERSION}"
327
+ done
328
+
329
+ echo "versions=${PUBLISHED_NOW# }" >> "$GITHUB_OUTPUT"
330
+
331
+ - name: Push changes
332
+ if: steps.commit.outputs.committed == 'true'
300
333
  env:
301
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
334
+ VERSION: ${{ steps.sync.outputs.version }}
335
+ run: |
336
+ git push origin "HEAD:${TARGET_BRANCH}"
337
+ if [ "$MODE" = "tag" ]; then
338
+ git push origin "refs/tags/${VERSION}"
339
+ fi
302
340
 
303
- - name: Create GitHub Release
304
- if: steps.check.outputs.has_new_version == 'true'
305
- uses: actions/create-release@v1
341
+ - name: Create GitHub releases
342
+ if: matrix.mode == 'tag' && steps.publish.outputs.versions != ''
306
343
  env:
307
- GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
308
- with:
309
- tag_name: ${{ steps.check.outputs.release_tag }}
310
- release_name: TYPO3 ${{ steps.check.outputs.release_tag }}
311
- body: |
312
- Synchronized with TYPO3 Core ${{ steps.check.outputs.typo3_version }}
313
-
314
- **Source:** https://github.com/TYPO3/typo3/tree/${{ steps.check.outputs.typo3_version }}
315
- **Path:** `Build/Sources/TypeScript/`
316
- draft: false
317
- prerelease: false
344
+ GH_TOKEN: ${{ secrets.PAT_TOKEN }}
345
+ VERSIONS: ${{ steps.publish.outputs.versions }}
346
+ run: |
347
+ NEWEST=$(tr ' ' '\n' <<< "$VERSIONS" | sort -V | tail -n1)
348
+ for VERSION in $VERSIONS; do
349
+ if gh release view "$VERSION" > /dev/null 2>&1; then
350
+ continue
351
+ fi
352
+
353
+ LATEST=false
354
+ if [ "$NPM_TAG" = "latest" ] && [ "$VERSION" = "$NEWEST" ]; then
355
+ LATEST=true
356
+ fi
357
+
358
+ gh release create "$VERSION" \
359
+ --verify-tag \
360
+ --title "TYPO3 ${VERSION}" \
361
+ --latest="$LATEST" \
362
+ --notes "Synchronized with TYPO3 Core v${VERSION}
363
+
364
+ **Source:** https://github.com/TYPO3/typo3/tree/v${VERSION}
365
+ **Path:** \`Build/Sources/TypeScript/\`"
366
+ done
package/.last-synced-tag CHANGED
@@ -1 +1 @@
1
- v14.3.8
1
+ v14.3.10
package/README.md CHANGED
@@ -9,21 +9,29 @@ This repository contains the TypeScript sources from the TYPO3 Core, automatical
9
9
  ## 📦 Installation
10
10
 
11
11
  ```bash
12
+ # Current LTS (v14)
12
13
  npm install typo3-typescript-sources
14
+
15
+ # v13
16
+ npm install typo3-typescript-sources@v13-latest
17
+
18
+ # TYPO3 main (development, not published to npm)
19
+ npm install github:maikschneider/typo3-typescript-sources#main
13
20
  ```
14
21
 
15
22
  ## 🔍 Source
16
23
 
17
24
  - **Original Repository:** [TYPO3/typo3](https://github.com/TYPO3/typo3)
18
25
  - **Source Path:** `Build/Sources/TypeScript/`
19
- - **Current TYPO3 Version:** `v14.3.8`
26
+ - **Current TYPO3 Version:** `v14.3.10`
20
27
 
21
28
  ## 🌿 Branches
22
29
 
23
- | Branch | TYPO3 Version | npm tag |
24
- |----------|---------------|-----------|
25
- | `main` | v14.x | `latest` |
26
- | `v13.x` | v13.x | `v13-latest` |
30
+ | Branch | TYPO3 Source | npm tag |
31
+ |----------|----------------------|--------------|
32
+ | `main` | `main` (every commit) | – |
33
+ | `v14.x` | v14.x releases | `latest` |
34
+ | `v13.x` | v13.x releases | `v13-latest` |
27
35
 
28
36
  ## 📝 License
29
37