Skip to content

Commit ef57599

Browse files
committed
Commit from Bolt to GitHub
1 parent 4ca5861 commit ef57599

17 files changed

+13933
-938
lines changed

.github/workflows/publish.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Build and Publish Package
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- 'v*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '16'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Run tests
26+
run: npm test
27+
28+
- name: Build package
29+
run: npm run build
30+
31+
- name: Upload build artifacts
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: dist
35+
path: dist/
36+
37+
publish-npm:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
if: startsWith(github.ref, 'refs/tags/v')
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v3
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v3
47+
with:
48+
node-version: '16'
49+
registry-url: 'https://registry.npmjs.org'
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Download build artifacts
55+
uses: actions/download-artifact@v3
56+
with:
57+
name: dist
58+
path: dist/
59+
60+
- name: Publish to npm
61+
run: npm publish --access public
62+
env:
63+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
64+
65+
publish-github:
66+
needs: build
67+
runs-on: ubuntu-latest
68+
if: startsWith(github.ref, 'refs/tags/v')
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v3
72+
73+
- name: Setup Node.js
74+
uses: actions/setup-node@v3
75+
with:
76+
node-version: '16'
77+
registry-url: 'https://npm.pkg.github.com'
78+
79+
- name: Install dependencies
80+
run: npm ci
81+
82+
- name: Download build artifacts
83+
uses: actions/download-artifact@v3
84+
with:
85+
name: dist
86+
path: dist/
87+
88+
- name: Publish to GitHub Packages
89+
run: npm publish
90+
env:
91+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
93+
create-release:
94+
needs: [publish-npm, publish-github]
95+
runs-on: ubuntu-latest
96+
if: startsWith(github.ref, 'refs/tags/v')
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v3
100+
101+
- name: Extract release notes
102+
id: release_notes
103+
run: |
104+
VERSION=${GITHUB_REF#refs/tags/}
105+
echo "::set-output name=version::$VERSION"
106+
# Extract release notes from CHANGELOG.md between this version and the previous one
107+
# This is a simplified approach, adjust based on your CHANGELOG.md format
108+
NOTES=$(awk "/## $VERSION/,/## v/" CHANGELOG.md | sed '1d;$d')
109+
# Escape newlines for GitHub Actions
110+
NOTES="${NOTES//'%'/'%25'}"
111+
NOTES="${NOTES//$'\n'/'%0A'}"
112+
NOTES="${NOTES//$'\r'/'%0D'}"
113+
echo "::set-output name=notes::$NOTES"
114+
115+
- name: Create GitHub Release
116+
uses: actions/create-release@v1
117+
env:
118+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
with:
120+
tag_name: ${{ github.ref }}
121+
release_name: Release ${{ steps.release_notes.outputs.version }}
122+
body: |
123+
${{ steps.release_notes.outputs.notes }}
124+
125+
For full details, see the [CHANGELOG](https://github.com/graphql-api/graphql-api-template/blob/main/CHANGELOG.md).
126+
draft: false
127+
prerelease: false

.gitignore

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,58 @@
1-
.env
2-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
38

4-
# dependencies
5-
node_modules
6-
.next
7-
dist
8-
/.pnp
9-
.pnp.js
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1011

11-
# testing
12-
/coverage
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
1317

14-
# next.js
15-
/.next/
16-
/out/
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
1720

18-
# production
19-
/build
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
2024

21-
# misc
22-
.DS_Store
23-
*.pem
25+
# nyc test coverage
26+
.nyc_output
2427

25-
# debug
26-
npm-debug.log*
27-
yarn-debug.log*
28-
yarn-error.log*
29-
pnpm-lock.yaml
30-
*/.yarn-lock.yaml
28+
# Dependency directories
29+
node_modules/
30+
jspm_packages/
3131

32-
# local env files
33-
.env.local
34-
.env.development.local
35-
.env.test.local
36-
.env.production.local
32+
# TypeScript cache
33+
*.tsbuildinfo
3734

38-
# vercel
39-
.vercel
35+
# Optional npm cache directory
36+
.npm
4037

41-
# typescript
42-
*.tsbuildinfo
38+
# Optional eslint cache
39+
.eslintcache
40+
41+
# dotenv environment variables file
42+
.env
43+
.env.test
44+
45+
# Stores VSCode versions used for testing VSCode extensions
46+
.vscode-test
47+
48+
# Build output
49+
dist/
50+
build/
51+
52+
# IDE files
53+
.idea/
54+
.vscode/
55+
56+
# OS generated files
57+
.DS_Store
58+
Thumbs.db

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-06-15
9+
10+
### Added
11+
- Initial release of the GraphQL API for StackBlitz integration
12+
- Complete wrapper around @stackblitz/sdk implementing DataSource interface
13+
- Comprehensive GraphQL schema with types, queries, and mutations
14+
- Connection-based pagination with cursor support
15+
- Relay-compatible Node interface for global object identification
16+
- Client-side SDK integration for embedding and opening projects
17+
- TypeScript typings and documentation
18+
- Build configuration with Rollup
19+
- GitHub Actions workflow for automated testing and publishing

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 GraphQL API Contributors
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)