Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
8300461
docs: add language documentation for AsciiDoc (#769)
ahmeddelattarr Apr 24, 2025
bfccfb9
Merge branch 'develop' into patch-1
hatemhosny Apr 25, 2025
7ae4220
fix(Compilers): compile asciidoc as standalone
hatemhosny Apr 25, 2025
c16761a
docs(Compilers): edit asciidoc docs
hatemhosny Apr 25, 2025
0b32412
fix docs
hatemhosny Apr 25, 2025
e89d80d
fix test
hatemhosny Apr 25, 2025
8f20bab
Merge branch 'develop' into patch-1
hatemhosny Apr 25, 2025
870dbc3
Merge pull request #809 from ahmeddelattarr/patch-1
hatemhosny Apr 25, 2025
9859940
fix gh-pages deploy
hatemhosny Apr 26, 2025
1737193
Merge pull request #815 from live-codes/fix-gh-pages-deploy
hatemhosny Apr 26, 2025
3494e58
fix(Config): fix decoding params
hatemhosny May 3, 2025
7742bdc
docs: add docs for markdown-to-livecodes
hatemhosny May 3, 2025
6aa14a1
fix broken link
hatemhosny May 4, 2025
dbacacc
Merge pull request #816 from live-codes/markdown-to-livecodes
hatemhosny May 4, 2025
d2aa4e5
fix demo in test docs
hatemhosny May 5, 2025
c465e23
Merge pull request #817 from live-codes/docs
hatemhosny May 5, 2025
e165071
chore(Compilers): upgrade react compiler to v19.1.0-rc.1
hatemhosny May 6, 2025
84ca503
Merge pull request #818 from live-codes/upgrade-react
hatemhosny May 6, 2025
80efa44
feat: encode minimal data in url search params and the rest in hash p…
BassemHalim May 10, 2025
689ea27
fix: match hash params and search params structure
BassemHalim May 10, 2025
0e32326
refactor(App): refactor applyConfig
hatemhosny May 10, 2025
19e0541
feat:
BassemHalim May 10, 2025
b7bbb80
fix(Editor): fix loading vue & custom languages in monaco
hatemhosny May 11, 2025
a1b9559
prettier + copy params entries instead of overwriting to preserve any…
BassemHalim May 11, 2025
adc2910
[WIP snapshot] Update getPlaygroundUrl to use hash params for config …
BassemHalim May 13, 2025
abe3f98
add default value for config and params + update all config fields be…
BassemHalim May 13, 2025
5701262
docs: add HTML language documentation
tarekwfa0110 May 15, 2025
3acda5e
fix test
hatemhosny May 16, 2025
89fd772
Merge pull request #821 from live-codes/refactor-apply-config
hatemhosny May 16, 2025
4d4f044
Merge branch 'develop' into feat/hash-params-url
hatemhosny May 16, 2025
a2d4e22
Merge branch 'develop' into add-html-documentation
hatemhosny May 16, 2025
b68af39
edit HTML language docs
hatemhosny May 16, 2025
3fbe397
Merge pull request #822 from tarekwfa0110/add-html-documentation
hatemhosny May 16, 2025
9e15076
feat(Compilers): add Jinja template support
hatemhosny May 16, 2025
224a451
Merge pull request #823 from live-codes/jinja
hatemhosny May 16, 2025
68d8b0e
Merge branch 'develop' into feat/hash-params-url
hatemhosny May 16, 2025
25bf418
[SNAPSHOT] getPlaygroundUrl refactor
BassemHalim May 16, 2025
a9461a7
[SNAPSHOT] fix eslint warning + added some getPlaygroundUrlTests + ad…
BassemHalim May 16, 2025
3dd068c
[SNAPSHOT] fix bugs in getPlaygroundUrl + update loading functions to…
BassemHalim May 16, 2025
e25917f
fix eslint
BassemHalim May 16, 2025
527abb4
decompress config in `getParams` + eslint
BassemHalim May 17, 2025
282824c
feat(SDK): allow sdk `setConfig` to just update editor content
hatemhosny May 17, 2025
71372a3
fix
hatemhosny May 17, 2025
dd65298
Merge pull request #824 from live-codes/sdk-update-content
hatemhosny May 17, 2025
7d4f6c1
Merge branch 'develop' into feat/hash-params-url
hatemhosny May 17, 2025
6cb38cf
add some function descriptions + revert decompress config in getParams
BassemHalim May 17, 2025
c0caa7d
add more sdk tests
BassemHalim May 17, 2025
efb286d
remove configHandler + update test
BassemHalim May 17, 2025
0c37baf
remove unused variable
BassemHalim May 17, 2025
a64143f
refactor:
BassemHalim May 20, 2025
2845faf
added __PURE__ for the sdk's load even handlers
BassemHalim May 20, 2025
63e7db2
feat(SDK): communicate sdk and app versions
hatemhosny May 20, 2025
337e2c9
add cors headers for netlify
hatemhosny May 20, 2025
3527fbf
add headers for netlify
hatemhosny May 20, 2025
7bee9ab
netlify headers
hatemhosny May 20, 2025
17e3810
fix netlify headers
hatemhosny May 20, 2025
8ed4d96
fix sdk params
hatemhosny May 20, 2025
1521b5d
fix
hatemhosny May 20, 2025
de4d141
sdk params
hatemhosny May 20, 2025
5b1c116
docs(SDK): add a note about multiple sources in SDK embed options
hatemhosny May 20, 2025
20eb9b8
Merge pull request #819 from BassemHalim/feat/hash-params-url
hatemhosny May 21, 2025
7f1145c
feat: sort imports with prettier
BassemHalim May 21, 2025
9eae886
chore: install prettier-plugin-organize-imports
hatemhosny May 22, 2025
f790c8f
style: prettier sort imports
hatemhosny May 22, 2025
93672ea
fix
hatemhosny May 22, 2025
ed4c7f2
Merge pull request #825 from BassemHalim/feat/import-sorting
hatemhosny May 22, 2025
3c17b73
refactor(App): improve loading config
hatemhosny May 22, 2025
bc3e328
style: sort imports
hatemhosny May 22, 2025
75c69ef
fix importing external content
hatemhosny May 23, 2025
9cc6992
fix config precedence
hatemhosny May 23, 2025
77854e8
test(App): add e2e tests for SDK options
hatemhosny May 23, 2025
89420fb
Merge pull request #827 from live-codes/improve-loading-config
hatemhosny May 23, 2025
5800e4b
docs: edit docs for Markdown-to-LiveCodes
hatemhosny May 24, 2025
b96949f
Merge pull request #828 from live-codes/docs-md-to-livecodes
hatemhosny May 24, 2025
d770478
docs: add eleventy to markdown-to-livecodes docs
hatemhosny May 24, 2025
bf6911d
minor edit
hatemhosny May 24, 2025
bc95f66
minor edit
hatemhosny May 24, 2025
97bdb0b
Merge pull request #829 from live-codes/docs
hatemhosny May 24, 2025
5f2f424
release: sdk-v0.11.0
hatemhosny May 24, 2025
51cc710
edit pkg description
hatemhosny May 24, 2025
719e6c8
fix
hatemhosny May 24, 2025
fbba9ae
Merge pull request #830 from live-codes/releases/sdk-v0.11.0
hatemhosny May 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 113 additions & 113 deletions .github/workflows/i18n-update-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,47 +22,47 @@ jobs:
branch: ${{ steps.fetch-pr.outputs.branch }}

steps:
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- name: Check out repository
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}

- name: Fetch PR details
id: fetch-pr
run: |
PR_DETAILS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "${{ github.event.issue.pull_request.url }}")
PR_BRANCH=$(echo "$PR_DETAILS" | jq -r '.head.ref')

skip () {
echo "$1 Exiting..."
echo "skip=true" >> $GITHUB_OUTPUT
echo "skipReason=$1" >> $GITHUB_OUTPUT
}

if [[ $PR_BRANCH == "i18n/"* ]]; then
skip "Branch \`$PR_BRANCH\` is a i18n branch."
fi

PR_BRANCH=$(echo "$PR_DETAILS" | jq -r '.head.label' | sed 's/:/\//g')
NEW_BRANCH="i18n/$PR_BRANCH"
echo "newBranch=$NEW_BRANCH" >> $GITHUB_OUTPUT
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT

git config --global user.name "livecodes-ci[bot]"
git config --global user.email "186997172+livecodes-ci[bot]@users.noreply.github.com"
if [[ ! $(git ls-remote --heads origin $NEW_BRANCH) ]]; then
skip "Branch \`$NEW_BRANCH\` does not exist."
fi
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- name: Check out repository
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}

- name: Fetch PR details
id: fetch-pr
run: |
PR_DETAILS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "${{ github.event.issue.pull_request.url }}")
PR_BRANCH=$(echo "$PR_DETAILS" | jq -r '.head.ref')

skip () {
echo "$1 Exiting..."
echo "skip=true" >> $GITHUB_OUTPUT
echo "skipReason=$1" >> $GITHUB_OUTPUT
}

if [[ $PR_BRANCH == "i18n/"* ]]; then
skip "Branch \`$PR_BRANCH\` is a i18n branch."
fi

PR_BRANCH=$(echo "$PR_DETAILS" | jq -r '.head.label' | sed 's/:/\//g')
NEW_BRANCH="i18n/$PR_BRANCH"
echo "newBranch=$NEW_BRANCH" >> $GITHUB_OUTPUT
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT

git config --global user.name "livecodes-ci[bot]"
git config --global user.email "186997172+livecodes-ci[bot]@users.noreply.github.com"

if [[ ! $(git ls-remote --heads origin $NEW_BRANCH) ]]; then
skip "Branch \`$NEW_BRANCH\` does not exist."
fi
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

runner:
name: Runner
Expand All @@ -74,61 +74,61 @@ jobs:
PR_BRANCH: ${{ needs.precheck.outputs.branch }}

steps:
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ needs.precheck.outputs.newBranch }}
token: ${{ steps.generate-token.outputs.token }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Import from Lokalise
run: |
mkdir -p $LOKALISE_TEMP && touch $LOKALISE_TEMP/locales.zip && npm run i18n-update-pull -- $PR_BRANCH && rm -rf $LOKALISE_TEMP
env:
LOKALISE_TEMP: lokalise_tmp
- name: Generate Lokalise JSON files
run: npm run i18n-lokalise-json all

- name: Linting and fixing
run: npm run fix

- name: Commit changes
run: |
git config --global user.name "livecodes-ci[bot]"
git config --global user.email "186997172+livecodes-ci[bot]@users.noreply.github.com"
git add .
# Only commit if there are changes
git diff-index --quiet HEAD || git commit -m "i18n: pull translation from Lokalise"

# Save SHA of the latest commit to locale
echo "LAST_COMMIT_SHA=$(git log -n 1 --format="%H" -- src/livecodes/i18n/locales)" >> $GITHUB_ENV

- name: Push changes
run: git push origin $NEW_BRANCH

- name: Create a new i18n PR, comment on source PR and reaction
uses: actions/github-script@v7
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ needs.precheck.outputs.newBranch }}
token: ${{ steps.generate-token.outputs.token }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Import from Lokalise
run: |
mkdir -p $LOKALISE_TEMP && touch $LOKALISE_TEMP/locales.zip && npm run i18n-update-pull -- $PR_BRANCH && rm -rf $LOKALISE_TEMP
env:
LOKALISE_TEMP: lokalise_tmp

- name: Generate Lokalise JSON files
run: npm run i18n-lokalise-json all

- name: Linting and fixing
run: npm run fix

- name: Commit changes
run: |
git config --global user.name "livecodes-ci[bot]"
git config --global user.email "186997172+livecodes-ci[bot]@users.noreply.github.com"
git add .

# Only commit if there are changes
git diff-index --quiet HEAD || git commit -m "i18n: pull translation from Lokalise"

# Save SHA of the latest commit to locale
echo "LAST_COMMIT_SHA=$(git log -n 1 --format="%H" -- src/livecodes/i18n/locales)" >> $GITHUB_ENV

- name: Push changes
run: git push origin $NEW_BRANCH

- name: Create a new i18n PR, comment on source PR and reaction
uses: actions/github-script@v7
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
const repoURL = context.payload.repository.html_url;
const branchURL = `${repoURL}/tree/${process.env.NEW_BRANCH}`;
const prTitle = `i18n: ${{ github.event.issue.title }}`;
Expand All @@ -146,7 +146,7 @@ jobs:
- [ ] 📦 Chore (Release)
- [ ] ⏩ Revert
- [x] 🌐 Internationalization / Translation

## Description
### i18n Actions: \`.i18n-update-pull\`
Localization pulled from Lokalise.
Expand All @@ -155,7 +155,7 @@ jobs:
| --- | --- |
| **i18n Branch** | [\`${process.env.NEW_BRANCH}\`](${branchURL}) |
| **Last Commit SHA** | ${process.env.LAST_COMMIT_SHA} |

## Related Tickets & Documents
- **Source PR**: #${{ github.event.issue.number }}
`;
Expand All @@ -178,7 +178,7 @@ jobs:
| **Last Commit SHA** | ${process.env.LAST_COMMIT_SHA} |
| **i18n PR** | #${prInfo.data.number} |
`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
Expand All @@ -192,7 +192,7 @@ jobs:
comment_id: ${{ github.event.comment.id }},
content: 'rocket'
});

exception:
name: Exception
runs-on: ubuntu-latest
Expand All @@ -202,22 +202,22 @@ jobs:
SKIP_REASON: ${{ needs.precheck.outputs.skipReason }}

steps:
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- name: Create reaction on PR
uses: actions/github-script@v7
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- name: Create reaction on PR
uses: actions/github-script@v7
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
const runURL = `${context.payload.repository.html_url}/actions/runs/${process.env.GITHUB_RUN_ID}`;
const commentBody = `## i18n Actions: \`.i18n-update-pull\`
Failed to perform action due to following reason: **${process.env.SKIP_REASON}**

Please check [action logs](${runURL}) for more details.
`;
github.rest.issues.createComment({
Expand Down
Loading