@unisphere/nx 4.15.7 → 5.0.0
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/dist/generators/utils.d.ts +2 -2
- package/dist/generators/utils.d.ts.map +1 -1
- package/dist/generators/utils.js +1 -1
- package/dist/migrations/3-15-0/add-experience-documentation.d.ts +3 -4
- package/dist/migrations/3-15-0/add-experience-documentation.d.ts.map +1 -1
- package/dist/migrations/3-15-0/add-experience-documentation.js +4 -18
- package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.d.ts +3 -6
- package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.d.ts.map +1 -1
- package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.js +4 -166
- package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.d.ts +4 -0
- package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.d.ts.map +1 -1
- package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.js +70 -0
- package/dist/migrations/4-15-8/templates/_publish-artifacts.template +361 -0
- package/dist/migrations/4-15-8/update-publish-artifacts-workflow.d.ts +8 -0
- package/dist/migrations/4-15-8/update-publish-artifacts-workflow.d.ts.map +1 -0
- package/dist/migrations/4-15-8/update-publish-artifacts-workflow.js +40 -0
- package/dist/migrations/4-15-9/templates/_publish-artifacts.template +361 -0
- package/dist/migrations/4-15-9/update-publish-artifacts-workflow.d.ts +10 -0
- package/dist/migrations/4-15-9/update-publish-artifacts-workflow.d.ts.map +1 -0
- package/dist/migrations/4-15-9/update-publish-artifacts-workflow.js +42 -0
- package/dist/migrations/5-0-0/remove-documentation.d.ts +9 -0
- package/dist/migrations/5-0-0/remove-documentation.d.ts.map +1 -0
- package/dist/migrations/5-0-0/remove-documentation.js +45 -0
- package/generators.json +0 -5
- package/migrations.json +25 -0
- package/package.json +1 -1
- package/dist/generators/add-documentation/USAGE.md +0 -64
- package/dist/generators/add-documentation/add-documentation.d.ts +0 -5
- package/dist/generators/add-documentation/add-documentation.d.ts.map +0 -1
- package/dist/generators/add-documentation/add-documentation.js +0 -145
- package/dist/generators/add-documentation/discover-typedoc-plugins.d.ts +0 -23
- package/dist/generators/add-documentation/discover-typedoc-plugins.d.ts.map +0 -1
- package/dist/generators/add-documentation/discover-typedoc-plugins.js +0 -128
- package/dist/generators/add-documentation/schema.d.ts +0 -4
- package/dist/generators/add-documentation/schema.json +0 -20
- package/dist/generators/add-documentation/templates/babel.config.js +0 -3
- package/dist/generators/add-documentation/templates/docs/changelog/overview.md +0 -9
- package/dist/generators/add-documentation/templates/docs/documentations/overview.md +0 -9
- package/dist/generators/add-documentation/templates/docs/reference/overview.md +0 -9
- package/dist/generators/add-documentation/templates/docusaurus.config.ts.template +0 -134
- package/dist/generators/add-documentation/templates/package.json.template +0 -59
- package/dist/generators/add-documentation/templates/plugins/discover-typedoc-plugins.mjs +0 -156
- package/dist/generators/add-documentation/templates/plugins/typedoc-plugins.ts.template +0 -7
- package/dist/generators/add-documentation/templates/postcss.config.js +0 -6
- package/dist/generators/add-documentation/templates/sidebars.ts +0 -9
- package/dist/generators/add-documentation/templates/src/components/demo-placeholder-card.tsx +0 -33
- package/dist/generators/add-documentation/templates/src/components/guides/experiences/genie/integrate-genie-guide.tsx +0 -149
- package/dist/generators/add-documentation/templates/src/components/guides/experiences/notifications/notifications-react-guide.tsx +0 -211
- package/dist/generators/add-documentation/templates/src/components/homepage-features/index.tsx +0 -141
- package/dist/generators/add-documentation/templates/src/components/homepage-features/styles.module.css +0 -87
- package/dist/generators/add-documentation/templates/src/components/homepage-modules/index.tsx +0 -76
- package/dist/generators/add-documentation/templates/src/components/homepage-modules/styles.module.css +0 -120
- package/dist/generators/add-documentation/templates/src/components/homepage-start-now/index.tsx +0 -22
- package/dist/generators/add-documentation/templates/src/components/homepage-start-now/styles.module.css +0 -38
- package/dist/generators/add-documentation/templates/src/components/interactive-code-panel.tsx +0 -258
- package/dist/generators/add-documentation/templates/src/components/introductions/developer-toolbox-experience.tsx +0 -84
- package/dist/generators/add-documentation/templates/src/components/introductions/hello-world-experience.tsx +0 -133
- package/dist/generators/add-documentation/templates/src/components/introductions/notificaitons-experience.tsx +0 -635
- package/dist/generators/add-documentation/templates/src/components/introductions/reactions-experience.tsx +0 -117
- package/dist/generators/add-documentation/templates/src/components/ui-shared/introduction-card.tsx +0 -117
- package/dist/generators/add-documentation/templates/src/components/ui-shared/playground-card.tsx +0 -67
- package/dist/generators/add-documentation/templates/src/components/ui-shared/use-color-mode.ts +0 -20
- package/dist/generators/add-documentation/templates/src/components/ui-shared/utils.ts +0 -8
- package/dist/generators/add-documentation/templates/src/css/custom.css +0 -710
- package/dist/generators/add-documentation/templates/src/css/hero.module.css +0 -190
- package/dist/generators/add-documentation/templates/src/pages/index.module.css +0 -59
- package/dist/generators/add-documentation/templates/src/pages/index.tsx.template +0 -79
- package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/index.tsx +0 -103
- package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/styles.module.css +0 -9
- package/dist/generators/add-documentation/templates/src/theme/Navbar/MobileSidebar/Header/index.tsx +0 -45
- package/dist/generators/add-documentation/templates/static/.nojekyll +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/divider.svg +0 -5
- package/dist/generators/add-documentation/templates/static/homepage/icons/Architecture.svg +0 -4
- package/dist/generators/add-documentation/templates/static/homepage/icons/Cost.svg +0 -4
- package/dist/generators/add-documentation/templates/static/homepage/icons/ExternalLink.svg +0 -3
- package/dist/generators/add-documentation/templates/static/homepage/icons/Infra.svg +0 -8
- package/dist/generators/add-documentation/templates/static/homepage/icons/Redundancies.svg +0 -6
- package/dist/generators/add-documentation/templates/static/homepage/icons/Speed.svg +0 -6
- package/dist/generators/add-documentation/templates/static/homepage/icons/Standards.svg +0 -4
- package/dist/generators/add-documentation/templates/static/homepage/icons/Unified.svg +0 -12
- package/dist/generators/add-documentation/templates/static/homepage/services/custo.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/flame.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/keepr.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/loggi.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/palleto.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/publi.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/tinker.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/img/favicon.ico +0 -0
- package/dist/generators/add-documentation/templates/static/img/logo.svg +0 -6
- package/dist/generators/add-documentation/templates/static/img/logo_dark.svg +0 -6
- package/dist/generators/add-documentation/templates/static/robots.txt +0 -5
- package/dist/generators/add-documentation/templates/tailwind.config.js +0 -30
- package/dist/generators/add-documentation/templates/tsconfig.json +0 -7
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
name: Shared Deployment Jobs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
check-elements:
|
|
8
|
+
runs-on:
|
|
9
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
10
|
+
- instance-size:small
|
|
11
|
+
outputs:
|
|
12
|
+
has_packages: ${{ steps.check.outputs.has_packages }}
|
|
13
|
+
has_runtimes: ${{ steps.check.outputs.has_runtimes }}
|
|
14
|
+
has_applications: ${{ steps.check.outputs.has_applications }}
|
|
15
|
+
steps:
|
|
16
|
+
|
|
17
|
+
- name: Checkout Repo
|
|
18
|
+
uses: actions/checkout@v5
|
|
19
|
+
with:
|
|
20
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
21
|
+
fetch-tags: true
|
|
22
|
+
|
|
23
|
+
- name: Check elements in .unisphere
|
|
24
|
+
id: check
|
|
25
|
+
run: |
|
|
26
|
+
if [ -f .unisphere ]; then
|
|
27
|
+
PACKAGES=$(jq -r '.elements.packages // {} | length' .unisphere)
|
|
28
|
+
RUNTIMES=$(jq -r '(.elements.runtimes // {} | length) + (.elements.workspace // {} | length) + (.elements.loader // {} | length)' .unisphere)
|
|
29
|
+
APPLICATIONS=$(jq -r '.elements.applications // {} | length' .unisphere)
|
|
30
|
+
|
|
31
|
+
if [ "$PACKAGES" -gt 0 ]; then
|
|
32
|
+
echo "has_packages=true" >> $GITHUB_OUTPUT
|
|
33
|
+
else
|
|
34
|
+
echo "has_packages=false" >> $GITHUB_OUTPUT
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
if [ "$RUNTIMES" -gt 0 ]; then
|
|
38
|
+
echo "has_runtimes=true" >> $GITHUB_OUTPUT
|
|
39
|
+
else
|
|
40
|
+
echo "has_runtimes=false" >> $GITHUB_OUTPUT
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
if [ "$APPLICATIONS" -gt 0 ]; then
|
|
44
|
+
echo "has_applications=true" >> $GITHUB_OUTPUT
|
|
45
|
+
else
|
|
46
|
+
echo "has_applications=false" >> $GITHUB_OUTPUT
|
|
47
|
+
fi
|
|
48
|
+
else
|
|
49
|
+
echo "has_packages=false" >> $GITHUB_OUTPUT
|
|
50
|
+
echo "has_runtimes=false" >> $GITHUB_OUTPUT
|
|
51
|
+
echo "has_applications=false" >> $GITHUB_OUTPUT
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
prepare-runtimes:
|
|
55
|
+
runs-on:
|
|
56
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
57
|
+
- instance-size:medium
|
|
58
|
+
|
|
59
|
+
if: needs.check-elements.outputs.has_runtimes == 'true'
|
|
60
|
+
needs: check-elements
|
|
61
|
+
outputs:
|
|
62
|
+
unisphereElementsArtifactsFolder: ${{ steps.prepare-runtimes.outputs.artifactsRootFolder }}
|
|
63
|
+
hasArtifacts: ${{ steps.prepare-runtimes.outputs.hasArtifacts }}
|
|
64
|
+
commit_sha: ${{ steps.capture_commit_sha.outputs.commit_sha }}
|
|
65
|
+
steps:
|
|
66
|
+
- name: Cache npm
|
|
67
|
+
uses: actions/cache@v5
|
|
68
|
+
with:
|
|
69
|
+
path: ~/.npm
|
|
70
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
71
|
+
restore-keys: |
|
|
72
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
73
|
+
|
|
74
|
+
- name: Checkout Repo
|
|
75
|
+
uses: actions/checkout@v5
|
|
76
|
+
with:
|
|
77
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
78
|
+
fetch-tags: true
|
|
79
|
+
- name: Setup Node.js
|
|
80
|
+
uses: actions/setup-node@v5
|
|
81
|
+
with:
|
|
82
|
+
node-version-file: '.nvmrc'
|
|
83
|
+
- name: Clean workspace
|
|
84
|
+
run: git reset --hard HEAD
|
|
85
|
+
- name: Clean npm cache
|
|
86
|
+
run: npm cache clean --force
|
|
87
|
+
|
|
88
|
+
- name: Setup JFrog
|
|
89
|
+
|
|
90
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
91
|
+
id: setup-jfrog
|
|
92
|
+
env:
|
|
93
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
94
|
+
with:
|
|
95
|
+
oidc-provider-name: ovp-github-oidc
|
|
96
|
+
- name: Install dependencies
|
|
97
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
98
|
+
env:
|
|
99
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
100
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
101
|
+
|
|
102
|
+
- name: Prepare Unisphere Elements
|
|
103
|
+
id: prepare-runtimes
|
|
104
|
+
run: npx unisphere runtime publish prepare --verbose
|
|
105
|
+
- name: Capture Commit SHA
|
|
106
|
+
id: capture_commit_sha
|
|
107
|
+
run: echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
|
108
|
+
- name: Set commit_sha as output
|
|
109
|
+
id: set_commit_sha
|
|
110
|
+
run: echo "commit_sha=${{ env.commit_sha }}" >> $GITHUB_OUTPUT
|
|
111
|
+
- uses: actions/upload-artifact@v6
|
|
112
|
+
id: upload-unisphere-elements-artifacts
|
|
113
|
+
with:
|
|
114
|
+
name: unisphere-elements
|
|
115
|
+
path: ${{ steps.prepare-runtimes.outputs.artifactsRootFolder }}
|
|
116
|
+
retention-days: 1
|
|
117
|
+
|
|
118
|
+
deploy-packages:
|
|
119
|
+
if: needs.check-elements.outputs.has_packages == 'true'
|
|
120
|
+
needs: check-elements
|
|
121
|
+
runs-on:
|
|
122
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
123
|
+
- instance-size:medium
|
|
124
|
+
steps:
|
|
125
|
+
- name: Cache npm
|
|
126
|
+
uses: actions/cache@v5
|
|
127
|
+
with:
|
|
128
|
+
path: ~/.npm
|
|
129
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
130
|
+
restore-keys: |
|
|
131
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
132
|
+
|
|
133
|
+
- name: Checkout Repo
|
|
134
|
+
uses: actions/checkout@v5
|
|
135
|
+
with:
|
|
136
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
137
|
+
fetch-tags: true
|
|
138
|
+
- name: Setup Node.js
|
|
139
|
+
uses: actions/setup-node@v5
|
|
140
|
+
with:
|
|
141
|
+
node-version-file: '.nvmrc'
|
|
142
|
+
|
|
143
|
+
- name: Setup JFrog
|
|
144
|
+
|
|
145
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
146
|
+
id: setup-jfrog
|
|
147
|
+
env:
|
|
148
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
149
|
+
with:
|
|
150
|
+
oidc-provider-name: ovp-github-oidc
|
|
151
|
+
|
|
152
|
+
- name: Install dependencies
|
|
153
|
+
|
|
154
|
+
run: |
|
|
155
|
+
npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
156
|
+
|
|
157
|
+
env:
|
|
158
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
159
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
160
|
+
|
|
161
|
+
- name: Get NPM Token from AWS Secrets Manager
|
|
162
|
+
id: get-npm-token
|
|
163
|
+
run: |
|
|
164
|
+
NPM_TOKEN=$(aws secretsmanager get-secret-value --secret-id arn:aws:secretsmanager:eu-central-1:785328604905:secret:unisphere-secrets-um86Cs --query SecretString --output text | jq -r '."NPM_UNISPHERE_TOKEN"')
|
|
165
|
+
echo "NPM_TOKEN=$NPM_TOKEN" >> $GITHUB_ENV
|
|
166
|
+
# Debug token existence (safely)
|
|
167
|
+
echo "::debug::Token exists: $([ ! -z "$NPM_TOKEN" ] && echo 'true' || echo 'false')"
|
|
168
|
+
- name: Deploy to registry
|
|
169
|
+
run: npx unisphere package publish --verbose --jfrogToken ${{ steps.setup-jfrog.outputs.oidc-token }} --jfrogUser ${{ steps.setup-jfrog.outputs.oidc-user }} --npmToken ${{ env.NPM_TOKEN }} --branch "${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}"
|
|
170
|
+
|
|
171
|
+
deploy-runtimes:
|
|
172
|
+
if: needs.prepare-runtimes.outputs.hasArtifacts == 'true'
|
|
173
|
+
needs: prepare-runtimes
|
|
174
|
+
runs-on:
|
|
175
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
176
|
+
- instance-size:medium
|
|
177
|
+
strategy:
|
|
178
|
+
matrix:
|
|
179
|
+
envs_regions:
|
|
180
|
+
- { env: 'nvp1', region: 'us-east-1', accountid: '583352821080' }
|
|
181
|
+
- { env: 'frp2', region: 'eu-central-1', accountid: '082111255551' }
|
|
182
|
+
- { env: 'irp2', region: 'eu-west-1', accountid: '137576761235' }
|
|
183
|
+
- { env: 'nvq2', region: 'us-east-1', accountid: '383697330906' }
|
|
184
|
+
- { env: 'syp2', region: 'ap-southeast-2', accountid: '650755435642' }
|
|
185
|
+
- { env: 'cap2', region: 'ca-central-1', accountid: '948632009361' }
|
|
186
|
+
fail-fast: false
|
|
187
|
+
|
|
188
|
+
steps:
|
|
189
|
+
- name: Cache npm
|
|
190
|
+
uses: actions/cache@v5
|
|
191
|
+
with:
|
|
192
|
+
path: ~/.npm
|
|
193
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
194
|
+
restore-keys: |
|
|
195
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
196
|
+
|
|
197
|
+
- name: Check available disk space
|
|
198
|
+
run: df -h
|
|
199
|
+
- name: Checkout Repo at specific commit
|
|
200
|
+
uses: actions/checkout@v5
|
|
201
|
+
with:
|
|
202
|
+
ref: ${{ needs.prepare-runtimes.outputs.commit_sha }}
|
|
203
|
+
fetch-tags: true
|
|
204
|
+
- name: Setup Node.js
|
|
205
|
+
uses: actions/setup-node@v5
|
|
206
|
+
with:
|
|
207
|
+
node-version-file: '.nvmrc'
|
|
208
|
+
|
|
209
|
+
- name: Setup JFrog
|
|
210
|
+
|
|
211
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
212
|
+
id: setup-jfrog
|
|
213
|
+
env:
|
|
214
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
215
|
+
with:
|
|
216
|
+
oidc-provider-name: ovp-github-oidc
|
|
217
|
+
|
|
218
|
+
- name: Install dependencies
|
|
219
|
+
|
|
220
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
221
|
+
env:
|
|
222
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
223
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
224
|
+
|
|
225
|
+
- name: Download artifacts folder
|
|
226
|
+
uses: actions/download-artifact@v7
|
|
227
|
+
with:
|
|
228
|
+
name: unisphere-elements
|
|
229
|
+
path: ${{ needs.prepare-runtimes.outputs.unisphereElementsArtifactsFolder }}
|
|
230
|
+
- name: Sync S3 bucket
|
|
231
|
+
run: |
|
|
232
|
+
npx unisphere runtime publish execute \
|
|
233
|
+
--env ${{ matrix.envs_regions.env }} \
|
|
234
|
+
--aws-region '${{ matrix.envs_regions.region }}' \
|
|
235
|
+
--aws-arn 'arn:aws:iam::${{matrix.envs_regions.accountid }}:role/${{ matrix.envs_regions.env }}-unisphere-content-role' \
|
|
236
|
+
--artifacts-folder '${{ needs.prepare-runtimes.outputs.unisphereElementsArtifactsFolder }}' \
|
|
237
|
+
--verbose
|
|
238
|
+
|
|
239
|
+
prepare-applications:
|
|
240
|
+
if: always() && needs.check-elements.outputs.has_applications == 'true'
|
|
241
|
+
needs: [deploy-runtimes, check-elements]
|
|
242
|
+
runs-on:
|
|
243
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
244
|
+
- instance-size:medium
|
|
245
|
+
outputs:
|
|
246
|
+
unisphereApplicationsArtifactsFolder: ${{ steps.prepare-applications.outputs.artifactsRootFolder }}
|
|
247
|
+
hasArtifacts: ${{ steps.prepare-applications.outputs.hasArtifacts }}
|
|
248
|
+
commit_sha: ${{ steps.capture_commit_sha.outputs.commit_sha }}
|
|
249
|
+
steps:
|
|
250
|
+
- name: Cache npm
|
|
251
|
+
uses: actions/cache@v5
|
|
252
|
+
with:
|
|
253
|
+
path: ~/.npm
|
|
254
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
255
|
+
restore-keys: |
|
|
256
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
257
|
+
|
|
258
|
+
- name: Checkout Repo
|
|
259
|
+
uses: actions/checkout@v5
|
|
260
|
+
with:
|
|
261
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
262
|
+
fetch-tags: true
|
|
263
|
+
- name: Setup Node.js
|
|
264
|
+
uses: actions/setup-node@v5
|
|
265
|
+
with:
|
|
266
|
+
node-version-file: '.nvmrc'
|
|
267
|
+
- name: Clean workspace
|
|
268
|
+
run: git reset --hard HEAD
|
|
269
|
+
- name: Clean npm cache
|
|
270
|
+
run: npm cache clean --force
|
|
271
|
+
- name: Setup JFrog
|
|
272
|
+
|
|
273
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
274
|
+
id: setup-jfrog
|
|
275
|
+
env:
|
|
276
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
277
|
+
with:
|
|
278
|
+
oidc-provider-name: ovp-github-oidc
|
|
279
|
+
- name: Install dependencies
|
|
280
|
+
|
|
281
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
282
|
+
env:
|
|
283
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
284
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
285
|
+
- name: Prepare Unisphere Applications
|
|
286
|
+
id: prepare-applications
|
|
287
|
+
run: npx unisphere application publish prepare --verbose
|
|
288
|
+
- name: Capture Commit SHA
|
|
289
|
+
id: capture_commit_sha
|
|
290
|
+
run: echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
|
291
|
+
- name: Set commit_sha as output
|
|
292
|
+
id: set_commit_sha
|
|
293
|
+
run: echo "commit_sha=${{ env.commit_sha }}" >> $GITHUB_OUTPUT
|
|
294
|
+
- uses: actions/upload-artifact@v6
|
|
295
|
+
id: upload-unisphere-applications-artifacts
|
|
296
|
+
with:
|
|
297
|
+
name: unisphere-applications
|
|
298
|
+
path: ${{ steps.prepare-applications.outputs.artifactsRootFolder }}
|
|
299
|
+
retention-days: 1
|
|
300
|
+
|
|
301
|
+
deploy-applications:
|
|
302
|
+
if: always() && needs.prepare-applications.outputs.hasArtifacts == 'true'
|
|
303
|
+
needs: [prepare-applications]
|
|
304
|
+
runs-on:
|
|
305
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
306
|
+
- instance-size:medium
|
|
307
|
+
strategy:
|
|
308
|
+
matrix:
|
|
309
|
+
envs_regions:
|
|
310
|
+
- { env: 'nvp1', region: 'us-east-1', accountid: '583352821080' }
|
|
311
|
+
- { env: 'frp2', region: 'eu-central-1', accountid: '082111255551' }
|
|
312
|
+
- { env: 'irp2', region: 'eu-west-1', accountid: '137576761235' }
|
|
313
|
+
- { env: 'nvq2', region: 'us-east-1', accountid: '383697330906' }
|
|
314
|
+
- { env: 'syp2', region: 'ap-southeast-2', accountid: '650755435642' }
|
|
315
|
+
- { env: 'cap2', region: 'ca-central-1', accountid: '948632009361' }
|
|
316
|
+
fail-fast: false
|
|
317
|
+
steps:
|
|
318
|
+
- name: Cache npm
|
|
319
|
+
uses: actions/cache@v5
|
|
320
|
+
with:
|
|
321
|
+
path: ~/.npm
|
|
322
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
323
|
+
restore-keys: |
|
|
324
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
325
|
+
|
|
326
|
+
- name: Checkout Repo at specific commit
|
|
327
|
+
uses: actions/checkout@v5
|
|
328
|
+
with:
|
|
329
|
+
ref: ${{ needs.prepare-applications.outputs.commit_sha }}
|
|
330
|
+
fetch-tags: true
|
|
331
|
+
- name: Setup Node.js
|
|
332
|
+
uses: actions/setup-node@v5
|
|
333
|
+
with:
|
|
334
|
+
node-version-file: '.nvmrc'
|
|
335
|
+
- name: Setup JFrog
|
|
336
|
+
|
|
337
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
338
|
+
id: setup-jfrog
|
|
339
|
+
env:
|
|
340
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
341
|
+
with:
|
|
342
|
+
oidc-provider-name: ovp-github-oidc
|
|
343
|
+
- name: Install dependencies
|
|
344
|
+
|
|
345
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
346
|
+
env:
|
|
347
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
348
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
349
|
+
- name: Download artifacts folder
|
|
350
|
+
uses: actions/download-artifact@v7
|
|
351
|
+
with:
|
|
352
|
+
name: unisphere-applications
|
|
353
|
+
path: ${{ needs.prepare-applications.outputs.unisphereApplicationsArtifactsFolder }}
|
|
354
|
+
- name: Sync S3 bucket
|
|
355
|
+
run: |
|
|
356
|
+
npx unisphere application publish execute \
|
|
357
|
+
--env ${{ matrix.envs_regions.env }} \
|
|
358
|
+
--aws-region '${{ matrix.envs_regions.region }}' \
|
|
359
|
+
--aws-arn 'arn:aws:iam::${{matrix.envs_regions.accountid }}:role/${{ matrix.envs_regions.env }}-unisphere-content-role' \
|
|
360
|
+
--artifacts-folder '${{ needs.prepare-applications.outputs.unisphereApplicationsArtifactsFolder }}' \
|
|
361
|
+
--verbose
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: Update _publish-artifacts.yml checkout ref to SHA-based
|
|
3
|
+
*
|
|
4
|
+
* Changes the checkout ref from branch-based (github.ref) to SHA-based (github.sha)
|
|
5
|
+
* so that even if someone pushes to main during the workflow, the checkout always
|
|
6
|
+
* gets the exact commit that was tagged.
|
|
7
|
+
*/
|
|
8
|
+
import { Tree } from '@nx/devkit';
|
|
9
|
+
export default function update(tree: Tree): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=update-publish-artifacts-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-publish-artifacts-workflow.d.ts","sourceRoot":"","sources":["../../../src/migrations/4-15-9/update-publish-artifacts-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAI1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC9D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Migration: Update _publish-artifacts.yml checkout ref to SHA-based
|
|
4
|
+
*
|
|
5
|
+
* Changes the checkout ref from branch-based (github.ref) to SHA-based (github.sha)
|
|
6
|
+
* so that even if someone pushes to main during the workflow, the checkout always
|
|
7
|
+
* gets the exact commit that was tagged.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.default = update;
|
|
11
|
+
const devkit_1 = require("@nx/devkit");
|
|
12
|
+
const fs_1 = require("fs");
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
async function update(tree) {
|
|
15
|
+
devkit_1.logger.info('🔄 Updating GitHub _publish-artifacts workflow for v4.15.9');
|
|
16
|
+
// Ensure .github/workflows directory exists
|
|
17
|
+
if (!tree.exists('.github')) {
|
|
18
|
+
tree.write('.github/.gitkeep', '');
|
|
19
|
+
devkit_1.logger.info('✅ Created .github directory');
|
|
20
|
+
}
|
|
21
|
+
if (!tree.exists('.github/workflows')) {
|
|
22
|
+
tree.write('.github/workflows/.gitkeep', '');
|
|
23
|
+
devkit_1.logger.info('✅ Created .github/workflows directory');
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const workflowPath = '.github/workflows/_publish-artifacts.yml';
|
|
27
|
+
const templatePath = (0, path_1.join)(__dirname, 'templates', '_publish-artifacts.template');
|
|
28
|
+
const templateContent = (0, fs_1.readFileSync)(templatePath, 'utf-8');
|
|
29
|
+
const workflowExists = tree.exists(workflowPath);
|
|
30
|
+
tree.write(workflowPath, templateContent);
|
|
31
|
+
if (workflowExists) {
|
|
32
|
+
devkit_1.logger.info(`✅ Updated ${workflowPath}`);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
devkit_1.logger.info(`✅ Created ${workflowPath}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
devkit_1.logger.error(`❌ Failed to update GitHub _publish-artifacts workflow: ${error?.message || 'Unknown error'}`);
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: Remove documentation support
|
|
3
|
+
*
|
|
4
|
+
* Removes documentation sites, their .unisphere config entries, and the
|
|
5
|
+
* GitHub workflow that deployed them.
|
|
6
|
+
*/
|
|
7
|
+
import { Tree } from '@nx/devkit';
|
|
8
|
+
export default function update(tree: Tree): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=remove-documentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-documentation.d.ts","sourceRoot":"","sources":["../../../src/migrations/5-0-0/remove-documentation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAUtD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAsC9D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Migration: Remove documentation support
|
|
4
|
+
*
|
|
5
|
+
* Removes documentation sites, their .unisphere config entries, and the
|
|
6
|
+
* GitHub workflow that deployed them.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.default = update;
|
|
10
|
+
const devkit_1 = require("@nx/devkit");
|
|
11
|
+
async function update(tree) {
|
|
12
|
+
devkit_1.logger.info('🔄 Removing documentation support...');
|
|
13
|
+
let removedItems = 0;
|
|
14
|
+
// 1. Remove documentation folder tree
|
|
15
|
+
if (tree.exists('unisphere/documentation')) {
|
|
16
|
+
tree.delete('unisphere/documentation');
|
|
17
|
+
devkit_1.logger.info('📁 Removed unisphere/documentation folder');
|
|
18
|
+
removedItems++;
|
|
19
|
+
}
|
|
20
|
+
// 2. Remove elements.documentation from .unisphere config
|
|
21
|
+
if (tree.exists('.unisphere')) {
|
|
22
|
+
(0, devkit_1.updateJson)(tree, '.unisphere', (config) => {
|
|
23
|
+
if (config.elements?.documentation) {
|
|
24
|
+
const count = Object.keys(config.elements.documentation).length;
|
|
25
|
+
delete config.elements.documentation;
|
|
26
|
+
devkit_1.logger.info(`📝 Removed ${count} documentation entry/entries from .unisphere`);
|
|
27
|
+
removedItems++;
|
|
28
|
+
}
|
|
29
|
+
return config;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
// 3. Remove documentation GitHub workflow
|
|
33
|
+
const workflowPath = '.github/workflows/documentation.yml';
|
|
34
|
+
if (tree.exists(workflowPath)) {
|
|
35
|
+
tree.delete(workflowPath);
|
|
36
|
+
devkit_1.logger.info('📝 Removed .github/workflows/documentation.yml');
|
|
37
|
+
removedItems++;
|
|
38
|
+
}
|
|
39
|
+
if (removedItems === 0) {
|
|
40
|
+
devkit_1.logger.info('ℹ️ No documentation files or config found to remove');
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
devkit_1.logger.info(`✅ Documentation support removed (${removedItems} operations completed)`);
|
|
44
|
+
}
|
|
45
|
+
}
|
package/generators.json
CHANGED
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
"schema": "./dist/generators/add-application/schema.json",
|
|
16
16
|
"description": "add-application generator"
|
|
17
17
|
},
|
|
18
|
-
"add-documentation": {
|
|
19
|
-
"factory": "./dist/generators/add-documentation/add-documentation",
|
|
20
|
-
"schema": "./dist/generators/add-documentation/schema.json",
|
|
21
|
-
"description": "Add a documentation site (Docusaurus)"
|
|
22
|
-
},
|
|
23
18
|
"add-visual": {
|
|
24
19
|
"factory": "./dist/generators/add-visual/add-visual",
|
|
25
20
|
"schema": "./dist/generators/add-visual/schema.json",
|
package/migrations.json
CHANGED
|
@@ -563,6 +563,7 @@
|
|
|
563
563
|
"postUpdateMessage": "✅ .github/workflows/cicd.yml updated"
|
|
564
564
|
}
|
|
565
565
|
},
|
|
566
|
+
<<<<<<< HEAD
|
|
566
567
|
"4.15.0-add-languages-support": {
|
|
567
568
|
"version": "4.15.0",
|
|
568
569
|
"description": "Migrates packages from i18next/react-i18next to @unisphere/ui-i18n-react with createUseTranslation pattern and adds UnisphereI18NRuntimeProxy to all runtimes",
|
|
@@ -618,6 +619,30 @@
|
|
|
618
619
|
"cli": {
|
|
619
620
|
"postUpdateMessage": "✅ Languages README files updated with 'npx unisphere language add' instructions"
|
|
620
621
|
}
|
|
622
|
+
},
|
|
623
|
+
"4.15.8-update-publish-artifacts-workflow": {
|
|
624
|
+
"version": "4.15.8",
|
|
625
|
+
"description": "Updates .github/workflows/_publish-artifacts.yml with latest template",
|
|
626
|
+
"factory": "./dist/migrations/4-15-8/update-publish-artifacts-workflow.js",
|
|
627
|
+
"cli": {
|
|
628
|
+
"postUpdateMessage": "✅ .github/workflows/_publish-artifacts.yml updated successfully"
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
"4.15.9-update-publish-artifacts-workflow": {
|
|
632
|
+
"version": "4.15.9",
|
|
633
|
+
"description": "Updates _publish-artifacts.yml checkout ref from branch-based to SHA-based",
|
|
634
|
+
"factory": "./dist/migrations/4-15-9/update-publish-artifacts-workflow.js",
|
|
635
|
+
"cli": {
|
|
636
|
+
"postUpdateMessage": "✅ .github/workflows/_publish-artifacts.yml updated to use SHA-based checkout"
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"5-0-0-remove-documentation": {
|
|
640
|
+
"version": "5.0.0",
|
|
641
|
+
"description": "Removes documentation sites, .unisphere config entries, and GitHub workflow",
|
|
642
|
+
"factory": "./dist/migrations/5-0-0/remove-documentation.js",
|
|
643
|
+
"cli": {
|
|
644
|
+
"postUpdateMessage": "✅ Documentation support removed"
|
|
645
|
+
}
|
|
621
646
|
}
|
|
622
647
|
},
|
|
623
648
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# add-documentation
|
|
2
|
-
|
|
3
|
-
Generate a Docusaurus documentation site for an experience.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx nx g @unisphere/nx:add-documentation
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The experience name is auto-resolved from `.unisphere` config.
|
|
12
|
-
|
|
13
|
-
## Flags
|
|
14
|
-
|
|
15
|
-
| Flag | Type | Default | Description |
|
|
16
|
-
|------|------|---------|-------------|
|
|
17
|
-
| `--name` | string | auto from `.unisphere` | Override the experience name |
|
|
18
|
-
| `--is-experience-level` | boolean | `false` | Skip sub-name prompt (top-level experience docs) |
|
|
19
|
-
| `--sub-name` | string | prompted | Sub-name for the documentation site |
|
|
20
|
-
|
|
21
|
-
## Examples
|
|
22
|
-
|
|
23
|
-
**Sub-level docs (default)** — prompts for sub-name:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx nx g @unisphere/nx:add-documentation
|
|
27
|
-
# Experience name auto-resolved from .unisphere
|
|
28
|
-
# Prompts: "What is the documentation sub-name?"
|
|
29
|
-
# e.g. sub-name "models" → folder: unisphere/documentation/{experience}-models
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Sub-level docs with flags (no prompts):**
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx nx g @unisphere/nx:add-documentation --sub-name=models
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Experience-level docs (no sub-name):**
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npx nx g @unisphere/nx:add-documentation --is-experience-level
|
|
42
|
-
# → folder: unisphere/documentation/{experience}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Override experience name:**
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npx nx g @unisphere/nx:add-documentation --name=cs --sub-name=models
|
|
49
|
-
# → folder: unisphere/documentation/cs-models
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Output
|
|
53
|
-
|
|
54
|
-
- `unisphere/documentation/{name}/` — Full Docusaurus site
|
|
55
|
-
- `.unisphere` — Updated with documentation entry
|
|
56
|
-
- `.nxignore` — Updated to exclude documentation node_modules
|
|
57
|
-
|
|
58
|
-
## After generation
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
cd unisphere/documentation/{name}
|
|
62
|
-
npm install
|
|
63
|
-
npx unisphere documentation serve {name}
|
|
64
|
-
```
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { AddDocumentationGeneratorSchema } from './schema';
|
|
3
|
-
export declare function addDocumentationGenerator(tree: Tree, options: AddDocumentationGeneratorSchema): Promise<(() => void) | undefined>;
|
|
4
|
-
export default addDocumentationGenerator;
|
|
5
|
-
//# sourceMappingURL=add-documentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-documentation.d.ts","sourceRoot":"","sources":["../../../src/generators/add-documentation/add-documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAiB,MAAM,YAAY,CAAC;AAG7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAsB3D,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,qCAgKzC;AAED,eAAe,yBAAyB,CAAC"}
|