typo3-typescript-sources 14.3.7 → 14.3.9
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/.github/workflows/sync-and-publish.yml +240 -191
- package/.last-synced-tag +1 -1
- package/README.md +13 -5
- package/adminpanel/admin-panel.ts +22 -22
- package/adminpanel/modules/cache.ts +3 -3
- package/backend/action-dispatcher.ts +8 -3
- package/backend/bookmark/bookmark-store.ts +5 -5
- package/backend/clipboard-panel.ts +2 -2
- package/backend/code-editor/element/code-mirror-element.ts +1 -1
- package/backend/code-editor/language/typoscript.ts +3 -3
- package/backend/code-editor/stream-parser/typoscript.ts +2 -2
- package/backend/color-picker.ts +2 -2
- package/backend/column-selector-button.ts +11 -8
- package/backend/context-help.ts +3 -3
- package/backend/context-menu.ts +8 -3
- package/backend/drag-tooltip.ts +9 -4
- package/backend/drag-uploader.ts +81 -89
- package/backend/element/draggable-resizable-element.ts +18 -12
- package/backend/element/icon-element.ts +2 -2
- package/backend/element/thumbnail-element.ts +2 -2
- package/backend/element-browser.ts +1 -1
- package/backend/event/consumer-scope.ts +2 -2
- package/backend/event/interaction-request-assignment.ts +1 -1
- package/backend/event/interaction-request-map.ts +3 -3
- package/backend/form-engine/container/flex-form-container-container.ts +2 -2
- package/backend/form-engine/container/flex-form-section-container.ts +1 -1
- package/backend/form-engine/container/inline-control-container.ts +14 -14
- package/backend/form-engine/element/abstract-sortable-select-items.ts +3 -3
- package/backend/form-engine/element/color-element.ts +1 -1
- package/backend/form-engine/element/datetime-element.ts +1 -1
- package/backend/form-engine/element/extra/char-counter.ts +2 -2
- package/backend/form-engine/element/extra/select-box-filter.ts +1 -1
- package/backend/form-engine/element/mfa-info-element.ts +2 -2
- package/backend/form-engine/element/online-media-form-element.ts +8 -4
- package/backend/form-engine/element/select-multiple-side-by-side-element.ts +2 -2
- package/backend/form-engine/element/select-tree.ts +3 -3
- package/backend/form-engine/element/slug-element.ts +7 -7
- package/backend/form-engine/element/suggest/result-container.ts +1 -1
- package/backend/form-engine/element/table-wizard-element.ts +4 -4
- package/backend/form-engine/inline-relation/ajax-dispatcher.ts +3 -3
- package/backend/form-engine-validation.ts +11 -5
- package/backend/form-engine.ts +19 -23
- package/backend/global-event-handler.ts +1 -1
- package/backend/hotkeys/hotkey-struct.ts +1 -1
- package/backend/hotkeys.ts +3 -3
- package/backend/image-manipulation.ts +19 -19
- package/backend/layout-module/column-restriction.ts +61 -0
- package/backend/layout-module/drag-drop.ts +16 -4
- package/backend/layout-module/paste.ts +8 -1
- package/backend/live-search/element/result/item/action/action-container.ts +1 -1
- package/backend/live-search/element/result/item/item-container.ts +4 -4
- package/backend/live-search/element/result/result-container.ts +5 -0
- package/backend/live-search/element/result/result-pagination.ts +1 -1
- package/backend/live-search/live-search.ts +2 -2
- package/backend/localization/label-provider.ts +4 -4
- package/backend/localization/localization-wizard.ts +4 -4
- package/backend/localization/steps/content-record-selection-step.ts +8 -8
- package/backend/localization/steps/handler-selection-step.ts +4 -4
- package/backend/localization/steps/mode-step.ts +4 -4
- package/backend/localization/steps/source-language-step.ts +4 -4
- package/backend/localization/steps/target-language-step.ts +4 -4
- package/backend/login-refresh.ts +1 -9
- package/backend/login.ts +2 -2
- package/backend/modal.ts +38 -5
- package/backend/module/iframe.ts +10 -0
- package/backend/module/router.ts +10 -0
- package/backend/module-menu.ts +3 -3
- package/backend/multi-record-selection-action.ts +1 -1
- package/backend/multi-record-selection-delete-action.ts +1 -1
- package/backend/multi-record-selection.ts +14 -14
- package/backend/multi-step-wizard.ts +9 -2
- package/backend/new-multiple-pages.ts +2 -2
- package/backend/new-record-wizard.ts +15 -15
- package/backend/notification.ts +90 -6
- package/backend/online-media.ts +1 -3
- package/backend/page-wizard/page-wizard.ts +2 -2
- package/backend/page-wizard/steps/doktype-step.ts +5 -5
- package/backend/pagetsconfig/pagetsconfig-includes.ts +1 -1
- package/backend/popover.ts +5 -5
- package/backend/record-download-button.ts +5 -6
- package/backend/recordlist.ts +11 -6
- package/backend/security/element/csp-reports.ts +8 -8
- package/backend/setup-module.ts +2 -2
- package/backend/sortable-table.ts +10 -4
- package/backend/storage/abstract-client-storage.ts +2 -2
- package/backend/storage/module-state-storage.ts +2 -2
- package/backend/tests/backend/utility/dom-helper-test.ts +2 -2
- package/backend/tests/fixtures/modal-autofocus.html +1 -0
- package/backend/tests/form-engine/element/extra/select-box-filter-test.ts +3 -3
- package/backend/tests/form-engine-validation-test.ts +1 -1
- package/backend/tests/modal-test.ts +91 -0
- package/backend/tests/notification-test.ts +176 -0
- package/backend/tests/tree/tree-test.ts +41 -0
- package/backend/tree/file-storage-browser.ts +1 -1
- package/backend/tree/file-storage-tree-container.ts +4 -4
- package/backend/tree/page-browser.ts +1 -1
- package/backend/tree/page-position-select.ts +1 -1
- package/backend/tree/page-tree-element.ts +9 -2
- package/backend/tree/page-tree.ts +7 -1
- package/backend/tree/tree-module-state.ts +5 -5
- package/backend/tree/tree.ts +15 -8
- package/backend/user-pass-login.ts +2 -2
- package/backend/utility/collapse-state-persister.ts +1 -1
- package/backend/utility/collapse-state-search.ts +6 -6
- package/backend/utility/dom-helper.ts +3 -3
- package/backend/utility.ts +6 -6
- package/backend/viewport/content-navigation.ts +5 -0
- package/backend/viewport/navigation-container.ts +1 -1
- package/backend/viewport/toolbar.ts +3 -3
- package/backend/window-manager.ts +2 -2
- package/backend/wizard/events/auto-advance-event.ts +6 -0
- package/backend/wizard/events/before-next-step-event.ts +6 -0
- package/backend/wizard/events/step-summary-event.ts +6 -0
- package/backend/wizard/move-content-element.ts +1 -1
- package/backend/wizard/wizard.ts +8 -10
- package/belog/backend-log.ts +2 -2
- package/beuser/permissions.ts +2 -2
- package/core/ajax/ajax-response.ts +1 -1
- package/core/ajax/input-transformer.ts +1 -1
- package/core/event/debounce-event.ts +4 -4
- package/core/event/event-interface.ts +3 -3
- package/core/event/regular-event.ts +7 -7
- package/core/event/request-animation-frame-event.ts +4 -4
- package/core/event/throttle-event.ts +4 -4
- package/core/java-script-item-processor.ts +6 -0
- package/core/referrer-refresh.ts +2 -2
- package/core/security-utility.ts +1 -1
- package/dashboard/dashboard-wizard.ts +2 -2
- package/dashboard/dashboard.ts +8 -13
- package/dashboard/wizard/steps/preset-step.ts +3 -3
- package/extensionmanager/main.ts +7 -7
- package/filelist/browse-files.ts +1 -1
- package/filelist/browse-folders.ts +2 -2
- package/filelist/file-list-dragdrop.ts +5 -5
- package/filelist/file-list-rename-handler.ts +3 -6
- package/filelist/file-list-replace-handler.ts +3 -6
- package/filelist/file-list-transfer-handler.ts +2 -2
- package/filelist/file-list.ts +8 -9
- package/form/backend/form-editor/component/date-editor.ts +4 -0
- package/form/backend/form-editor/component/form-element-selector.ts +4 -0
- package/form/backend/form-editor/inspector-component.ts +6 -6
- package/form/backend/form-editor/mediator.ts +36 -36
- package/form/backend/form-editor/modals-component.ts +115 -6
- package/form/backend/form-editor/stage-component.ts +4 -4
- package/form/backend/form-editor/view-model.ts +7 -7
- package/form/backend/form-manager/view-model.ts +5 -5
- package/form/backend/form-wizard/form-wizard.ts +2 -2
- package/form/backend/form-wizard/steps/storage-step.ts +1 -1
- package/impexp/import-export.ts +1 -1
- package/info/translation-status.ts +2 -2
- package/install/ajax/ajax-queue.ts +1 -1
- package/install/module/abstract-interactable-module.ts +2 -2
- package/install/module/environment/image-processing.ts +4 -4
- package/install/module/environment/mail-test.ts +2 -2
- package/install/module/maintenance/clear-tables.ts +3 -3
- package/install/module/maintenance/clear-typo3temp-files.ts +8 -8
- package/install/module/maintenance/create-admin.ts +3 -3
- package/install/module/maintenance/database-analyzer.ts +9 -7
- package/install/module/maintenance/language-packs.ts +4 -4
- package/install/module/maintenance/reference-index.ts +1 -1
- package/install/module/settings/change-install-tool-password.ts +1 -1
- package/install/module/settings/extension-configuration.ts +5 -5
- package/install/module/settings/features.ts +1 -1
- package/install/module/settings/local-configuration.ts +5 -5
- package/install/module/settings/presets.ts +2 -2
- package/install/module/settings/system-maintainer.ts +1 -1
- package/install/module/upgrade/extension-scanner.ts +5 -5
- package/install/module/upgrade/tca-migrations-check.ts +1 -1
- package/install/module/upgrade/upgrade-docs.ts +16 -16
- package/install/module/upgrade/upgrade-wizards.ts +7 -8
- package/install/renderable/language-packs.ts +8 -2
- package/lowlevel/query-generator.ts +2 -2
- package/package.json +2 -2
- package/redirects/event-handler.ts +6 -0
- package/rte-ckeditor/ckeditor5.ts +7 -3
- package/rte-ckeditor/legacy/ckeditor5-bundle.ts +0 -1
- package/rte-ckeditor/plugin/typo3-link.ts +7 -9
- package/rte-ckeditor/rte-link-browser.ts +1 -1
- package/rte-ckeditor/tests/ckeditor5-test.ts +68 -0
- package/scheduler/form-engine/element/timing-options-element.ts +1 -1
- package/scheduler/scheduler-add-group.ts +4 -12
- package/scheduler/scheduler.ts +2 -2
- package/styleguide/checkbox-demo.ts +1 -1
- package/tstemplate/template-analyzer.ts +1 -1
- package/viewpage/main.ts +1 -1
- package/workspaces/backend.ts +5 -5
- package/workspaces/preview.ts +41 -2
- package/workspaces/renderable/record-table.ts +95 -78
- package/workspaces/renderable/send-to-stage-form.ts +1 -1
|
@@ -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.
|
|
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
|
|
36
|
+
- name: Build branch matrix
|
|
24
37
|
id: set-matrix
|
|
38
|
+
env:
|
|
39
|
+
TARGET: ${{ inputs.target || 'all' }}
|
|
25
40
|
run: |
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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@
|
|
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:
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
77
|
-
|
|
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 "
|
|
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 "
|
|
130
|
+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
|
89
131
|
else
|
|
90
|
-
echo "New version found: $NEW_TAG (previous: $LAST_SYNCED)"
|
|
91
|
-
echo "
|
|
92
|
-
echo "
|
|
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:
|
|
97
|
-
if: steps.check.outputs.
|
|
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
|
|
100
|
-
|
|
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:
|
|
103
|
-
if: steps.check.outputs.
|
|
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
|
-
|
|
106
|
-
echo "Cloning TYPO3 repository at tag: $TYPO3_TAG"
|
|
154
|
+
SRC="$RUNNER_TEMP/typo3-source"
|
|
107
155
|
|
|
108
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
122
|
-
|
|
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
|
-
|
|
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:
|
|
139
|
-
if: steps.check.outputs.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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.
|
|
208
|
-
|
|
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
|
|
236
|
-
|
|
237
|
-
| `main` |
|
|
238
|
-
| `
|
|
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
|
-
|
|
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.
|
|
259
|
-
|
|
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
|
-
|
|
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
|
-
|
|
270
|
-
|
|
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
|
-
|
|
276
|
-
|
|
293
|
+
if [ "$MODE" = "tag" ]; then
|
|
294
|
+
git tag -a "${VERSION}" -m "Release ${VERSION} from TYPO3 ${VERSION_LABEL}"
|
|
295
|
+
fi
|
|
277
296
|
|
|
278
|
-
|
|
279
|
-
git push origin "${RELEASE_TAG}"
|
|
297
|
+
echo "committed=true" >> "$GITHUB_OUTPUT"
|
|
280
298
|
|
|
281
299
|
- name: Setup Node.js
|
|
282
|
-
if:
|
|
283
|
-
uses: actions/setup-node@
|
|
300
|
+
if: matrix.mode == 'tag'
|
|
301
|
+
uses: actions/setup-node@v6
|
|
284
302
|
with:
|
|
285
|
-
node-version: '
|
|
286
|
-
registry-url: 'https://registry.npmjs.org'
|
|
303
|
+
node-version: '24'
|
|
287
304
|
|
|
288
|
-
- name: Publish to npm
|
|
289
|
-
if:
|
|
290
|
-
|
|
305
|
+
- name: Publish unpublished versions to npm
|
|
306
|
+
if: matrix.mode == 'tag'
|
|
307
|
+
id: publish
|
|
291
308
|
run: |
|
|
292
|
-
|
|
309
|
+
# Trusted publishing (OIDC) needs npm >= 11.5.1
|
|
310
|
+
npm install -g npm@^11.5.1
|
|
293
311
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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
|
-
|
|
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
|
|
304
|
-
if: steps.
|
|
305
|
-
uses: actions/create-release@v1
|
|
341
|
+
- name: Create GitHub releases
|
|
342
|
+
if: matrix.mode == 'tag' && steps.publish.outputs.versions != ''
|
|
306
343
|
env:
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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.
|
|
1
|
+
v14.3.9
|
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.
|
|
26
|
+
- **Current TYPO3 Version:** `v14.3.9`
|
|
20
27
|
|
|
21
28
|
## 🌿 Branches
|
|
22
29
|
|
|
23
|
-
| Branch | TYPO3
|
|
24
|
-
|
|
25
|
-
| `main` |
|
|
26
|
-
| `
|
|
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
|
|