@mission_sciences/provider-sdk 0.1.1 → 0.1.2
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/README.md +116 -13
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://www.npmjs.com/package/@mission_sciences/provider-sdk)
|
|
8
|
+
[](https://github.com/Mission-Sciences/provider-sdk/actions)
|
|
7
9
|
|
|
8
|
-
> **📦 Migration
|
|
10
|
+
> **📦 Migration Complete**: This package has been migrated from Bitbucket to GitHub and renamed from `@marketplace/provider-sdk` to `@mission_sciences/provider-sdk`. Now available on public npm with cryptographic provenance! See [Migration Guide](#-migration-from-marketplaceprovider-sdk) below.
|
|
9
11
|
|
|
10
12
|
## 🚀 Quick Start
|
|
11
13
|
|
|
@@ -77,14 +79,43 @@ When users launch your app from the marketplace:
|
|
|
77
79
|
7. **Session End**: Calls your `onSessionEnd` hook
|
|
78
80
|
8. **Redirect**: Returns to marketplace (optional)
|
|
79
81
|
|
|
82
|
+
## 🔒 Secure Publishing & Provenance
|
|
83
|
+
|
|
84
|
+
This package is published with cryptographic provenance attestation:
|
|
85
|
+
|
|
86
|
+
- **Dual Publishing**: Available on both [npm](https://www.npmjs.com/package/@mission_sciences/provider-sdk) (public) and AWS CodeArtifact (private)
|
|
87
|
+
- **Cryptographic Signatures**: All releases signed with GitHub Actions OIDC
|
|
88
|
+
- **Provenance Transparency**: Build provenance recorded in [Sigstore transparency log](https://search.sigstore.dev)
|
|
89
|
+
- **No Hardcoded Secrets**: CI/CD uses OIDC for AWS and npm authentication
|
|
90
|
+
- **Automated CI/CD**: GitHub Actions workflow with comprehensive testing and security checks
|
|
91
|
+
|
|
92
|
+
Verify package provenance:
|
|
93
|
+
```bash
|
|
94
|
+
npm view @mission_sciences/provider-sdk --json | jq .dist
|
|
95
|
+
```
|
|
96
|
+
|
|
80
97
|
## 📦 Installation
|
|
81
98
|
|
|
82
|
-
### NPM
|
|
99
|
+
### NPM (Public Registry)
|
|
83
100
|
|
|
84
101
|
```bash
|
|
85
102
|
npm install @mission_sciences/provider-sdk
|
|
86
103
|
```
|
|
87
104
|
|
|
105
|
+
### AWS CodeArtifact (Private Registry)
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Configure CodeArtifact
|
|
109
|
+
aws codeartifact login \
|
|
110
|
+
--tool npm \
|
|
111
|
+
--domain general-wisdom-dev \
|
|
112
|
+
--repository sdk-packages \
|
|
113
|
+
--region us-east-1
|
|
114
|
+
|
|
115
|
+
# Install
|
|
116
|
+
npm install @mission_sciences/provider-sdk
|
|
117
|
+
```
|
|
118
|
+
|
|
88
119
|
### Yarn
|
|
89
120
|
|
|
90
121
|
```bash
|
|
@@ -325,6 +356,38 @@ npm install
|
|
|
325
356
|
npm run dev
|
|
326
357
|
```
|
|
327
358
|
|
|
359
|
+
## 🏗️ Infrastructure & CI/CD
|
|
360
|
+
|
|
361
|
+
### GitHub Actions Workflow
|
|
362
|
+
|
|
363
|
+
The package is built and published using a comprehensive 8-job GitHub Actions pipeline:
|
|
364
|
+
|
|
365
|
+
1. **Test & Build** - Unit tests, type checking, linting, and production build
|
|
366
|
+
2. **Terraform Plan** - Review infrastructure changes (CodeArtifact setup)
|
|
367
|
+
3. **Terraform Apply** - Create/update AWS infrastructure
|
|
368
|
+
4. **Publish CodeArtifact** - Publish to private AWS registry
|
|
369
|
+
5. **Verify CodeArtifact** - Confirm successful publication
|
|
370
|
+
6. **Publish npm** - Publish to public npm with provenance
|
|
371
|
+
7. **Verify npm** - Confirm successful publication
|
|
372
|
+
8. **Create Release** - Generate GitHub release with artifacts
|
|
373
|
+
|
|
374
|
+
**Authentication:**
|
|
375
|
+
- AWS: OIDC via IAM role `GitHubActions-ProviderSDK` (no access keys)
|
|
376
|
+
- npm: Trusted Publishing with cryptographic provenance (no tokens)
|
|
377
|
+
|
|
378
|
+
### Planning Documentation
|
|
379
|
+
|
|
380
|
+
Comprehensive migration and setup documentation available in `planning/`:
|
|
381
|
+
|
|
382
|
+
- **[PROJECT_CONTEXT.md](./planning/PROJECT_CONTEXT.md)** - Project overview and context
|
|
383
|
+
- **[EXISTING_ANALYSIS.md](./planning/EXISTING_ANALYSIS.md)** - Codebase analysis
|
|
384
|
+
- **[REQUIREMENTS.md](./planning/REQUIREMENTS.md)** - Migration requirements
|
|
385
|
+
- **[CI_CD_ARCHITECTURE.md](./planning/CI_CD_ARCHITECTURE.md)** - Workflow design
|
|
386
|
+
- **[AWS_OIDC_SETUP.md](./planning/AWS_OIDC_SETUP.md)** - AWS OIDC configuration
|
|
387
|
+
- **[NPM_TRUSTED_PUBLISHING_SETUP.md](./planning/NPM_TRUSTED_PUBLISHING_SETUP.md)** - npm provenance setup
|
|
388
|
+
- **[GITHUB_SETUP_GUIDE.md](./planning/GITHUB_SETUP_GUIDE.md)** - Complete setup guide
|
|
389
|
+
- **[MIGRATION_CHECKLIST.md](./planning/MIGRATION_CHECKLIST.md)** - Migration checklist
|
|
390
|
+
|
|
328
391
|
## 📖 API Reference
|
|
329
392
|
|
|
330
393
|
### MarketplaceSDK
|
|
@@ -428,16 +491,33 @@ See [INTEGRATION_GUIDE.md#troubleshooting](./INTEGRATION_GUIDE.md#troubleshootin
|
|
|
428
491
|
|
|
429
492
|
## 📦 Migration from @marketplace/provider-sdk
|
|
430
493
|
|
|
431
|
-
|
|
494
|
+
### Repository Migration
|
|
495
|
+
|
|
496
|
+
This package has been migrated from Bitbucket to GitHub with enhanced security and public availability:
|
|
497
|
+
|
|
498
|
+
**Old:**
|
|
499
|
+
- Repository: Bitbucket (private)
|
|
500
|
+
- Package: `@marketplace/provider-sdk`
|
|
501
|
+
- Registry: AWS CodeArtifact only (private)
|
|
502
|
+
- CI/CD: Bitbucket Pipelines with hardcoded credentials
|
|
432
503
|
|
|
433
|
-
|
|
504
|
+
**New:**
|
|
505
|
+
- Repository: [GitHub/Mission-Sciences/provider-sdk](https://github.com/Mission-Sciences/provider-sdk) (public)
|
|
506
|
+
- Package: `@mission_sciences/provider-sdk`
|
|
507
|
+
- Registry: npm (public) + AWS CodeArtifact (private)
|
|
508
|
+
- CI/CD: GitHub Actions with OIDC (zero secrets)
|
|
509
|
+
- Security: Cryptographic provenance attestation
|
|
510
|
+
|
|
511
|
+
### Migration Steps
|
|
512
|
+
|
|
513
|
+
#### Step 1: Update package.json
|
|
434
514
|
|
|
435
515
|
```bash
|
|
436
516
|
npm uninstall @marketplace/provider-sdk
|
|
437
517
|
npm install @mission_sciences/provider-sdk
|
|
438
518
|
```
|
|
439
519
|
|
|
440
|
-
|
|
520
|
+
#### Step 2: Update imports
|
|
441
521
|
|
|
442
522
|
```typescript
|
|
443
523
|
// Old
|
|
@@ -447,19 +527,29 @@ import MarketplaceSDK from '@marketplace/provider-sdk';
|
|
|
447
527
|
import MarketplaceSDK from '@mission_sciences/provider-sdk';
|
|
448
528
|
```
|
|
449
529
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
Remove or update your `.npmrc` file:
|
|
530
|
+
#### Step 3: Simplify registry config
|
|
453
531
|
|
|
532
|
+
**If using npm (public registry):**
|
|
454
533
|
```bash
|
|
455
|
-
#
|
|
456
|
-
|
|
534
|
+
# Remove .npmrc - use default npm registry (no configuration needed!)
|
|
535
|
+
```
|
|
457
536
|
|
|
458
|
-
|
|
537
|
+
**If using CodeArtifact (private registry):**
|
|
538
|
+
```bash
|
|
539
|
+
# Update your .npmrc
|
|
540
|
+
@mission_sciences:registry=https://general-wisdom-dev-540845145946.d.codeartifact.us-east-1.amazonaws.com/npm/sdk-packages/
|
|
459
541
|
```
|
|
460
542
|
|
|
461
543
|
**Note**: The API is 100% compatible. No code changes required beyond the package name!
|
|
462
544
|
|
|
545
|
+
### Benefits of Migration
|
|
546
|
+
|
|
547
|
+
✅ **Public Availability**: Install from npm without AWS credentials
|
|
548
|
+
✅ **Provenance Attestation**: Cryptographic proof of build integrity
|
|
549
|
+
✅ **Enhanced Security**: OIDC authentication, no hardcoded secrets
|
|
550
|
+
✅ **Open Source Workflow**: Public CI/CD pipeline on GitHub Actions
|
|
551
|
+
✅ **Dual Publishing**: Available on both public npm and private CodeArtifact
|
|
552
|
+
|
|
463
553
|
## 🤝 Contributing
|
|
464
554
|
|
|
465
555
|
Contributions welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) first.
|
|
@@ -476,7 +566,21 @@ MIT License - see [LICENSE](./LICENSE) file for details
|
|
|
476
566
|
|
|
477
567
|
## 📊 Changelog
|
|
478
568
|
|
|
479
|
-
###
|
|
569
|
+
### v0.1.2 (2025-01-11) - Migration Release
|
|
570
|
+
- 🏗️ Migrated from Bitbucket to GitHub
|
|
571
|
+
- 📦 Package renamed: `@marketplace/provider-sdk` → `@mission_sciences/provider-sdk`
|
|
572
|
+
- 🔒 Added cryptographic provenance attestation
|
|
573
|
+
- ☁️ Dual publishing: npm (public) + AWS CodeArtifact (private)
|
|
574
|
+
- 🔐 Zero-secret CI/CD with OIDC authentication
|
|
575
|
+
- 📝 Comprehensive migration documentation
|
|
576
|
+
- 🚀 GitHub Actions workflow with 8-job pipeline
|
|
577
|
+
|
|
578
|
+
### v0.1.1 (2024) - Pre-Migration
|
|
579
|
+
- Initial Bitbucket release
|
|
580
|
+
- CodeArtifact-only distribution
|
|
581
|
+
- Bitbucket Pipelines CI/CD
|
|
582
|
+
|
|
583
|
+
### v2.0.0 (Planned - Phase 2)
|
|
480
584
|
- Heartbeat system
|
|
481
585
|
- Multi-tab coordination
|
|
482
586
|
- Session extension
|
|
@@ -484,7 +588,6 @@ MIT License - see [LICENSE](./LICENSE) file for details
|
|
|
484
588
|
- Visibility API integration
|
|
485
589
|
|
|
486
590
|
### v1.0.0 (Phase 1)
|
|
487
|
-
- Initial release
|
|
488
591
|
- JWT validation with JWKS
|
|
489
592
|
- Session timer management
|
|
490
593
|
- Lifecycle hooks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mission_sciences/provider-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Provider SDK for JWT-based marketplace session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/marketplace-sdk.umd.js",
|
|
@@ -78,5 +78,9 @@
|
|
|
78
78
|
"react": {
|
|
79
79
|
"optional": true
|
|
80
80
|
}
|
|
81
|
+
},
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"access": "public",
|
|
84
|
+
"provenance": true
|
|
81
85
|
}
|
|
82
86
|
}
|