Skip to content

docusign/1fe-sample-widget-base-config

Repository files navigation

1fe Sample Widget Base Config

A shared configuration package providing base settings and environment configurations for 1fe widgets. This package standardizes widget development configurations across the 1fe ecosystem.

What's in this repository

This configuration package provides:

  • Environment configurations for integration and production
  • Dynamic config URLs for live configuration management
  • Library version management for consistent dependencies
  • Widget version configurations for deployment coordination
  • Base CLI configurations for 1fe widget builds
  • Shared TypeScript settings for widget development

Prerequisites

  • Node.js >= 22
  • Yarn (package manager)

Getting Started

Installation

# Install as a dependency in your widget project
yarn add @1fe/sample-widget-base-config

# Or install for development
yarn install

Usage in Widget Projects

import { getBaseConfig } from '@1fe/sample-widget-base-config';

const configuration: OneFeConfiguration = {
  baseConfig: getBaseConfig,
};

Configuration Structure

Environment URLs

The package provides configuration URLs for:

const dynamicConfigUrls = {
  integration: 'https://1fe-a.akamaihd.net/integration/configs/live.json',
  production: 'https://1fe-a.akamaihd.net/production/configs/live.json',
};

const libraryVersionsUrl = {
  integration:
    'https://1fe-a.akamaihd.net/integration/configs/lib-versions.json',
  production: 'https://1fe-a.akamaihd.net/production/configs/lib-versions.json',
};

Widget Versions

Manages widget version configurations for deployment coordination:

const widgetVersionsUrl = {
  integration:
    'https://1fe-a.akamaihd.net/integration/configs/widget-versions.json',
  production:
    'https://1fe-a.akamaihd.net/production/configs/widget-versions.json',
};

Development Commands

# Build TypeScript configuration
yarn build

# Clean and rebuild
yarn build --clean

Contributing

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Make your changes to src/index.ts
  4. Build and test (yarn build)
  5. Commit your changes (git commit -m 'Add feature')
  6. Push to your branch (git push origin feature/your-feature)
  7. Open a Pull Request

Troubleshooting

Common Issues

  • Build failures: Ensure TypeScript is properly configured
  • Import errors: Check that the package is properly installed
  • Configuration errors: Verify environment URLs are accessible

Getting Help

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A sample repo showing how common config for 1fe can be shared in an organization as an npm package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6