Skip to content

Commit 9bd3677

Browse files
committed
initial commit
0 parents  commit 9bd3677

78 files changed

Lines changed: 13954 additions & 0 deletions

Some content is hidden

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

.env.example

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Iterable CLI Configuration
2+
3+
# ============================================================
4+
# API Authentication
5+
# ============================================================
6+
7+
# Your Iterable API key
8+
ITERABLE_API_KEY=your_iterable_api_key_here
9+
10+
# Iterable API base URL (defaults to US)
11+
# ITERABLE_BASE_URL=https://api.iterable.com
12+
13+
# ============================================================
14+
# Development & Debugging
15+
# ============================================================
16+
17+
# Enable debug mode for API logging
18+
ITERABLE_DEBUG=false
19+
20+
# Logging configuration
21+
LOG_LEVEL=info
22+
LOG_JSON=false
23+
LOG_STDERR=true
24+
25+
# Timeouts
26+
API_TIMEOUT=30000
27+
28+
# ============================================================
29+
# Testing (development only)
30+
# ============================================================
31+
32+
CLEANUP_TEST_DATA=true
33+
TEST_TIMEOUT=15000

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ${{ matrix.os }}
12+
permissions:
13+
contents: read
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
node-version: [20, 22, 24]
18+
os: [ubuntu-latest, windows-latest]
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
25+
with:
26+
run_install: false
27+
28+
- name: Setup Node ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: "pnpm"
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Typecheck and lint
38+
run: pnpm check
39+
40+
- name: Build
41+
run: pnpm build
42+
43+
- name: Unit tests
44+
run: pnpm test:unit

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
runs-on: "ubuntu-latest"
13+
permissions:
14+
security-events: write
15+
packages: read
16+
actions: read
17+
contents: read
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- language: actions
24+
build-mode: none
25+
- language: javascript-typescript
26+
build-mode: none
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v4
33+
with:
34+
languages: ${{ matrix.language }}
35+
build-mode: ${{ matrix.build-mode }}
36+
queries: security-extended,security-and-quality
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v4
40+
with:
41+
category: "/language:${{matrix.language}}"

.github/workflows/publish.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Publish Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version_type:
9+
description: "Version bump type"
10+
required: true
11+
default: "patch"
12+
type: choice
13+
options:
14+
- patch
15+
- minor
16+
- major
17+
18+
jobs:
19+
publish:
20+
name: Publish package
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
packages: write
25+
id-token: write
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 22
38+
cache: "pnpm"
39+
40+
- name: Update npm for OIDC support
41+
run: npm install -g npm@latest
42+
43+
- name: Install dependencies
44+
run: pnpm install --frozen-lockfile
45+
46+
- name: Run unit tests
47+
run: pnpm test:unit
48+
49+
- name: Build package
50+
run: pnpm build
51+
52+
- name: Configure git (for version bump)
53+
if: github.event_name == 'workflow_dispatch'
54+
run: |
55+
git config user.name "github-actions[bot]"
56+
git config user.email "github-actions[bot]@users.noreply.github.com"
57+
58+
- name: Bump version and create tag
59+
if: github.event_name == 'workflow_dispatch'
60+
id: version
61+
run: |
62+
npm version ${{ github.event.inputs.version_type }}
63+
echo "new_version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
64+
git push --follow-tags
65+
66+
- name: Publish to npm
67+
run: npm publish --provenance
68+
69+
- name: Create GitHub release (manual trigger only)
70+
if: github.event_name == 'workflow_dispatch'
71+
run: |
72+
gh release create v${{ steps.version.outputs.new_version }} \
73+
--title "Release v${{ steps.version.outputs.new_version }}" \
74+
--generate-notes
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build outputs
8+
dist/
9+
build/
10+
*.tsbuildinfo
11+
12+
# Environment variables
13+
.env
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
# IDE files
20+
.vscode/
21+
.idea/
22+
*.swp
23+
*.swo
24+
*~
25+
26+
# OS files
27+
.DS_Store
28+
Thumbs.db
29+
30+
# Logs
31+
logs
32+
*.log
33+
34+
# Coverage directory used by tools like istanbul
35+
coverage/
36+
37+
# nyc test coverage
38+
.nyc_output
39+
40+
# ESLint cache
41+
.eslintcache
42+
43+
# TypeScript cache
44+
*.tsbuildinfo
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional REPL history
50+
.node_repl_history
51+
52+
# Output of 'npm pack'
53+
*.tgz
54+
55+
# Yarn Integrity file
56+
.yarn-integrity
57+
58+
# parcel-bundler cache (https://parceljs.org/)
59+
.cache
60+
.parcel-cache
61+
62+
# Temporary folders
63+
tmp/
64+
temp/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

.prettierignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
dist/
6+
build/
7+
8+
# Coverage reports
9+
coverage/
10+
11+
# Logs
12+
*.log
13+
14+
# Environment files
15+
.env
16+
.env.local
17+
.env.*.local
18+
19+
# Package manager files
20+
package-lock.json
21+
pnpm-lock.yaml
22+
yarn.lock
23+
24+
# Config files that might have specific formatting
25+
*.config.js
26+
*.config.mjs
27+
*.config.ts
28+
29+
# Generated files
30+
*.d.ts

.prettierrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"endOfLine": "lf",
11+
"quoteProps": "as-needed",
12+
"bracketSameLine": false,
13+
"proseWrap": "preserve"
14+
}

0 commit comments

Comments
 (0)