zet-api 1.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/.github/workflows/publish-to-npm.yml +80 -0
- package/LICENSE +674 -0
- package/README.md +257 -0
- package/dist/auth/manager.d.ts +19 -0
- package/dist/auth/manager.js +228 -0
- package/dist/auth/types.d.ts +277 -0
- package/dist/auth/types.js +64 -0
- package/dist/core/auth-manager.d.ts +54 -0
- package/dist/core/auth-manager.js +159 -0
- package/dist/core/auth-types.d.ts +238 -0
- package/dist/core/auth-types.js +54 -0
- package/dist/core/config.d.ts +16 -0
- package/dist/core/config.js +18 -0
- package/dist/core/constants.d.ts +25 -0
- package/dist/core/constants.js +51 -0
- package/dist/core/gtfs-types.d.ts +198 -0
- package/dist/core/gtfs-types.js +70 -0
- package/dist/core/manager.d.ts +39 -0
- package/dist/core/manager.js +359 -0
- package/dist/core/parsers.d.ts +893 -0
- package/dist/core/parsers.js +110 -0
- package/dist/core/utils.d.ts +4 -0
- package/dist/core/utils.js +59 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +22 -0
- package/dist/live-polling.d.ts +1 -0
- package/dist/live-polling.js +105 -0
- package/dist/test.d.ts +1 -0
- package/dist/test.js +35 -0
- package/dist/text.d.ts +1 -0
- package/dist/text.js +35 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: Publish to NPM (OIDC)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'src/**'
|
|
9
|
+
- 'package.json'
|
|
10
|
+
- 'tsconfig.json'
|
|
11
|
+
- 'pnpm-lock.yaml'
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
publish:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout code
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Set up Node.js
|
|
27
|
+
uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: '20'
|
|
30
|
+
registry-url: 'https://registry.npmjs.org'
|
|
31
|
+
always-auth: true
|
|
32
|
+
|
|
33
|
+
- name: Ensure latest npm
|
|
34
|
+
run: npm install -g npm@latest
|
|
35
|
+
|
|
36
|
+
- name: Install pnpm
|
|
37
|
+
uses: pnpm/action-setup@v3
|
|
38
|
+
with:
|
|
39
|
+
version: latest
|
|
40
|
+
|
|
41
|
+
- name: Cache pnpm store
|
|
42
|
+
uses: actions/cache@v3
|
|
43
|
+
with:
|
|
44
|
+
path: ~/.pnpm-store
|
|
45
|
+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
46
|
+
restore-keys: |
|
|
47
|
+
${{ runner.os }}-pnpm-
|
|
48
|
+
|
|
49
|
+
- name: Install dependencies
|
|
50
|
+
run: pnpm install --frozen-lockfile
|
|
51
|
+
|
|
52
|
+
- name: Check if package needs publishing
|
|
53
|
+
id: check_publish
|
|
54
|
+
run: |
|
|
55
|
+
current_version=$(node -p "require('./package.json').version")
|
|
56
|
+
package_name=$(node -p "require('./package.json').name")
|
|
57
|
+
published_version=$(npm view $package_name version 2>/dev/null || echo "0.0.0")
|
|
58
|
+
|
|
59
|
+
echo "Current version: $current_version"
|
|
60
|
+
echo "Published version: $published_version"
|
|
61
|
+
|
|
62
|
+
if [ "$current_version" == "$published_version" ]; then
|
|
63
|
+
echo "No new version. Skipping publish."
|
|
64
|
+
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
65
|
+
else
|
|
66
|
+
echo "New version available. Proceeding to publish."
|
|
67
|
+
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
- name: Run linting
|
|
71
|
+
if: steps.check_publish.outputs.should_publish == 'true'
|
|
72
|
+
run: pnpm run lint
|
|
73
|
+
|
|
74
|
+
- name: Build the project
|
|
75
|
+
if: steps.check_publish.outputs.should_publish == 'true'
|
|
76
|
+
run: pnpm run build
|
|
77
|
+
|
|
78
|
+
- name: Publish to NPM using OIDC
|
|
79
|
+
if: steps.check_publish.outputs.should_publish == 'true'
|
|
80
|
+
run: pnpm publish --access public --no-git-checks --provenance
|