Skip to content

Commit ae1bd09

Browse files
committed
Initialize StepWright web scraping library with essential files and configurations. Added .gitignore, package.json, and README.md for project setup. Included TypeScript configuration, example scripts, and test setup. Implemented core scraping functionality with Playwright and integrated testing framework using Vitest.
0 parents  commit ae1bd09

30 files changed

+6567
-0
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: latest
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Run tests
31+
run: pnpm test:coverage
32+
33+
- name: Build package
34+
run: pnpm build
35+
36+
- name: Publish to npm
37+
run: pnpm publish --no-git-checks
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- name: Create GitHub Release
42+
uses: actions/create-release@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
tag_name: ${{ github.ref }}
47+
release_name: Release ${{ github.ref }}
48+
draft: false
49+
prerelease: false

.github/workflows/test.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: latest
30+
31+
- name: Get pnpm store directory
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
36+
- name: Setup pnpm cache
37+
uses: actions/cache@v4
38+
with:
39+
path: ${{ env.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
43+
44+
- name: Install dependencies
45+
run: pnpm install --frozen-lockfile
46+
47+
- name: Install Playwright browsers
48+
run: pnpm playwright install --with-deps
49+
50+
- name: Run tests with coverage
51+
run: pnpm test:coverage
52+
env:
53+
CI: true
54+
55+
- name: Upload coverage reports
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: coverage-report-${{ matrix.node-version }}
59+
path: coverage/
60+
retention-days: 30
61+
62+
- name: Upload Playwright report
63+
uses: actions/upload-artifact@v4
64+
if: always()
65+
with:
66+
name: playwright-report-${{ matrix.node-version }}
67+
path: test-results/
68+
retention-days: 30
69+
70+
lint-and-build:
71+
runs-on: ubuntu-latest
72+
needs: test
73+
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Setup Node.js
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version: '20.x'
82+
83+
- name: Setup pnpm
84+
uses: pnpm/action-setup@v4
85+
with:
86+
version: latest
87+
88+
- name: Install dependencies
89+
run: pnpm install --frozen-lockfile
90+
91+
- name: Run TypeScript check
92+
run: pnpm tsc --noEmit
93+
94+
- name: Run linting
95+
run: pnpm lint
96+
97+
- name: Build package
98+
run: pnpm build
99+
100+
- name: Upload build artifacts
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: dist
104+
path: dist/
105+
retention-days: 30

.gitignore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
4+
5+
# Build outputs
6+
dist/
7+
build/
8+
9+
# Environment variables
10+
.env
11+
.env.local
12+
.env.development.local
13+
.env.test.local
14+
.env.production.local
15+
16+
# Logs
17+
npm-debug.log*
18+
yarn-debug.log*
19+
yarn-error.log*
20+
pnpm-debug.log*
21+
lerna-debug.log*
22+
23+
# Runtime data
24+
pids
25+
*.pid
26+
*.seed
27+
*.pid.lock
28+
29+
# Coverage directory used by tools like istanbul
30+
coverage/
31+
*.lcov
32+
33+
# nyc test coverage
34+
.nyc_output
35+
36+
# Dependency directories
37+
jspm_packages/
38+
39+
# TypeScript cache
40+
*.tsbuildinfo
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Microbundle cache
49+
.rpt2_cache/
50+
.rts2_cache_cjs/
51+
.rts2_cache_es/
52+
.rts2_cache_umd/
53+
54+
# Optional REPL history
55+
.node_repl_history
56+
57+
# Output of 'npm pack'
58+
*.tgz
59+
60+
# Yarn Integrity file
61+
.yarn-integrity
62+
63+
# parcel-bundler cache (https://parceljs.org/)
64+
.cache
65+
.parcel-cache
66+
67+
# Next.js build output
68+
.next
69+
70+
# Nuxt.js build / generate output
71+
.nuxt
72+
73+
# Storybook build outputs
74+
.out
75+
.storybook-out
76+
77+
# Temporary folders
78+
tmp/
79+
temp/
80+
81+
# Editor directories and files
82+
.vscode/
83+
.idea/
84+
*.swp
85+
*.swo
86+
*~
87+
88+
# OS generated files
89+
.DS_Store
90+
.DS_Store?
91+
._*
92+
.Spotlight-V100
93+
.Trashes
94+
ehthumbs.db
95+
Thumbs.db
96+
97+
# Playwright
98+
test-results/
99+
playwright-report/
100+
playwright/.cache/
101+
102+
# Generated files from tests
103+
test/integration-downloads/
104+
test/integration-output/
105+
test/output/
106+
test/downloads/
107+
*.pdf
108+
*.txt
109+
downloads/
110+
outputs/

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
auto-install-peers=true
2+
strict-peer-dependencies=false
3+
save-prefix=""

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Framework Island
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)