Skip to content

Commit 2e93100

Browse files
committed
Back merge main to v2-beta
1 parent 0684ade commit 2e93100

85 files changed

Lines changed: 815 additions & 1197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
with:
14+
version: 10.28.0
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
cache: 'pnpm'
19+
- run: pnpm install --no-frozen-lockfile
20+
- run: pnpm -r --sort --workspace-concurrency=1 run build
21+
- run: pnpm run lint

.github/workflows/policy-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
if [ "$license_file_found" = false ]; then
4444
echo "No license file found. Please add a license file to the repository."
4545
exit 1
46-
fi
46+
fi
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release CLI Core (Production)
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: pnpm/action-setup@v4
12+
with:
13+
version: 10.28.0
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22.x'
17+
18+
- name: Enable Corepack
19+
run: corepack enable
20+
21+
- name: Install pnpm
22+
run: corepack prepare pnpm@10.28.0 --activate
23+
24+
- name: Clean the repository
25+
run: pnpm run clean:all
26+
27+
- name: Install root dependencies
28+
run: pnpm install --no-frozen-lockfile
29+
30+
- name: Build all packages
31+
run: pnpm -r --sort run build
32+
33+
- name: Reading Configuration
34+
id: release_config
35+
uses: rgarcia-phi/json-to-variables@v1.1.0
36+
with:
37+
filename: .github/config/release.json
38+
prefix: release
39+
40+
- name: Publishing core (Production)
41+
id: publish-core
42+
uses: JS-DevTools/npm-publish@v3
43+
with:
44+
token: ${{ secrets.NPM_TOKEN }}
45+
package: ./packages/contentstack/package.json
46+
tag: latest
47+
48+
- name: Create Core Production Release
49+
id: create_release
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
VERSION: ${{ steps.publish-core.outputs.version }}
53+
run: |
54+
TAG="core@v${VERSION}"
55+
if gh release view "$TAG" &>/dev/null; then
56+
echo "Release $TAG already exists — skipping."
57+
else
58+
gh release create "$TAG" \
59+
--title "Core Production $VERSION" \
60+
--generate-notes
61+
fi
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CLI Production Release Pipeline
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch: # This enables manual triggering
7+
8+
jobs:
9+
plugins:
10+
uses: ./.github/workflows/release-production-platform-plugins.yml
11+
secrets: inherit
12+
13+
core:
14+
needs: plugins
15+
uses: ./.github/workflows/release-production-core.yml
16+
secrets: inherit
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release CLI Platform Plugins
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: pnpm/action-setup@v4
12+
with:
13+
version: 10.28.0
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22.x'
17+
18+
- name: Enable Corepack
19+
run: corepack enable
20+
21+
- name: Install pnpm
22+
run: corepack prepare pnpm@10.28.0 --activate
23+
24+
- name: Clean the repository
25+
run: pnpm run clean:all
26+
27+
- name: Install root dependencies
28+
run: pnpm install --no-frozen-lockfile
29+
30+
- name: Build all plugins
31+
run: pnpm -r --sort run build
32+
33+
- name: Reading Configuration
34+
id: release_config
35+
uses: rgarcia-phi/json-to-variables@v1.1.0
36+
with:
37+
filename: .github/config/release.json
38+
prefix: release
39+
40+
# Utilities
41+
- name: Publishing utilities (Production)
42+
uses: JS-DevTools/npm-publish@v3
43+
with:
44+
token: ${{ secrets.NPM_TOKEN }}
45+
package: ./packages/contentstack-utilities/package.json
46+
tag: latest
47+
48+
# Command
49+
- name: Publishing command (Production)
50+
uses: JS-DevTools/npm-publish@v3
51+
with:
52+
token: ${{ secrets.NPM_TOKEN }}
53+
package: ./packages/contentstack-command/package.json
54+
tag: latest
55+
56+
# Config
57+
- name: Publishing config (Production)
58+
uses: JS-DevTools/npm-publish@v3
59+
with:
60+
token: ${{ secrets.NPM_TOKEN }}
61+
package: ./packages/contentstack-config/package.json
62+
tag: latest
63+
64+
# Auth
65+
- name: Publishing auth (Production)
66+
uses: JS-DevTools/npm-publish@v3
67+
with:
68+
token: ${{ secrets.NPM_TOKEN }}
69+
package: ./packages/contentstack-auth/package.json
70+
tag: latest

.github/workflows/sca-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
args: --fail-on=all --all-projects
1616
json: true
1717
continue-on-error: true
18-
- uses: contentstack/sca-policy@main
18+
- uses: contentstack/sca-policy@main

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Run Unit Tests
1+
name: Unit Tests
22

33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8-
run-tests:
8+
test:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout code

.talismanrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
fileignoreconfig:
2-
- filename: pnpm-lock.yaml
3-
checksum: 840d10a9ef1d60aeb0edd46a5cf8ae8306c9eee321aff72a9bb0e1a7e5031159
2+
- filename: .github/workflows/release-production-pipeline.yml
3+
checksum: 4aef94feea3ea0538162a9454cfd30457ec85e3123672f0933713e3d113d4504
4+
- filename: packages/contentstack-utilities/src/proxy-helper.ts
5+
checksum: 2169f25563bca3a0fe54edd00c73646ed56d36aa7e8effe904de26b0c1633759
6+
- filename: packages/contentstack-config/test/unit/commands/proxy.test.ts
7+
checksum: b92210826693683300728e7e82e6789f0ad697b17e6b99a8a004c9a041bced00
8+
- filename: packages/contentstack/test/unit/context-handler.test.ts
9+
checksum: 6ef78899d3089685271bd16c156d057c807fd9b8560189387ae44e9576d23095
10+
- filename: packages/contentstack/README.md
11+
checksum: cdd03f1f11ef3ecf04f71ed0a468501633ce92f0d487ee097312644578cb3cdc
412
version: '1.0'

packages/contentstack-auth/.mocharc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"source-map-support/register",
66
"test/helpers/mocha-root-hooks.js"
77
],
8-
"watch-extensions": [
9-
"ts"
10-
],
8+
"watch-extensions": ["ts"],
119
"recursive": true,
12-
"timeout": 5000
13-
}
10+
"reporter": "spec",
11+
"timeout": 10000,
12+
"exit": true
13+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"inlcude": [
2+
"include": [
33
"lib/**/*.js"
44
]
55
}

0 commit comments

Comments
 (0)