open-index/open-npm huggingface dataset:
npm package: @htekdev/azure-devops-extension-sdk
Description: Azure DevOps web extension JavaScript library.
Author: Microsoft
Latest version: 2.1.32

# Azure DevOps Web Extension SDK

## Overview

Client SDK for developing [Azure DevOps extensions](https://docs.microsoft.com/en-us/azure/devops/extend/overview).

The client SDK enables web extensions to communicate to the host frame. It can be used to:

- Notify the host that the extension is loaded or has errors
- Get basic contextual information about the current page (current user, host and extension information)
- Get theme information
- Obtain an authorization token to use in REST calls back to Azure DevOps
- Get remote services offered by the host frame

A full API reference of can be found [here](https://docs.microsoft.com/en-us/javascript/api/azure-devops-extension-sdk/).

## Get started with a new extension

See the [Develop a web extension for Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/extend/get-started/node?view=vsts) documentation for instructions on getting started with a new extension. You can also refer to the [azure-devops-extension-sample](https://github.com/Microsoft/azure-devops-extension-sample) repository as a working reference.

## Import the SDK within your extension project

1. Add `azure-devops-extension-sdk` to the list of dependencies in your package.json
2. Add `import  * as SDK from "azure-devops-extension-sdk"` to your TypeScript code

## Initialize the SDK

When you have rendered your extension content, call `SDK.init()`. Your extension content will not be displayed until you have notified the host frame that you are ready. There are two options for doing this:

1. Call `SDK.init()` with no `loaded` option
2. Call `SDK.init({ loaded: false })` to start initializing the SDK. Then call `SDK.notifyLoadSucceeded()` once you have finished your initial rendering. This allows you to make other SDK calls while your content is still loading (and hidden behind a spinner).

Example:

```typescript
import * as SDK from "azure-devops-extension-sdk";

SDK.init();
```

## API
A full API reference of can be found [here](https://docs.microsoft.com/en-us/javascript/api/azure-devops-extension-sdk/).


## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
npm package: @hteker/enzyme-adapter-react-17
Description: Unofficial adapter for React 17 for [Enzyme](https://enzymejs.github.io/enzyme/).
Latest version: 1.0.0

# @hteker/enzyme-adapter-react-17

Unofficial adapter for React 17 for [Enzyme](https://enzymejs.github.io/enzyme/).

## Installation

```
npm install --save-dev @hteker/enzyme-adapter-react-17
```

or, if you're using Yarn:

```
yarn add --dev @hteker/enzyme-adapter-react-17
```

### Note for npm v7 users

enzyme's dependencies have not yet been updated to declare React 17 in peerDependencies. You need to add `--legacy-peer-deps` to the install command for it to work correctly.

## Configuration

Finally, you need to configure enzyme to use the adapter you want it to use. To do this, you can use the top level `configure(...)` API.

```js
import Enzyme from 'enzyme';
import Adapter from '@hteker/enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });
```
npm package: @htempest/apollo-federation-upload
Description: This library makes it easier to support file uploads to your federated micro-services. It uses the [Apollo](https://www.apollographql.com/docs/apollo-server/data/file-uploads/) server's solution. It works by simply redirecting the file uploaded stream to 
Author: Here Tempest
Latest version: 1.2.0

# Apollo Federation file upload

This library makes it easier to support file uploads to your federated
micro-services. It uses the [Apollo](https://www.apollographql.com/docs/apollo-server/data/file-uploads/) server's solution.
It works by simply redirecting the file uploaded stream to the micro-service.
This package does not use third-party services to send the package to your
micro-services.

## Apollo Federation V2 Support

Please, use version 4.0.0+. For Federation V1 use 3.0.0 or earlier.

## Using HTTP Transfer-Encoding: chunked

By default, the `FileUploadDataSource` uses chunked transfers; we
advise that you do not change this setup. However, for some reason
you can't support this kind of transfer, one can provide the `useChunkedTransfer`
option to the `FileUploadDataSource` constructor as `false` to not
use chunked transfer (See the example below on setting this property).
Be advised once again that this can lead to DDOS attacks.

## Preventing CSRF attacks

This package uses `graphql-upload`, if you want to prevent a CSRF attack you should keep
the CSRF prevention feature enabled, and configure your upload clients to send a non-empty
`Apollo-Require-Preflight` header.

You can take a look at [Apollo's security guide](https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf) for more details.

#### How to enable CRSF Prevention

```javascript
import { ApolloServer } from 'apollo-server';

const runServer = async () => {
  const server = new ApolloServer({
    /*
     If activated it will request by default a header with ['x-apollo-operation-name', 'apollo-require-preflight']

     You can also change the allowed headers by passing them to csrfPrevention.requestHeaders
    */
    csrfPrevention: true,
    ...
  });
...
};

...
```

## Example

On your Gateway, you must add the `FileUploadDataSource` in order
to the micro-service be able to receive the uploaded file(s).


```javascript
import { ApolloServer } from 'apollo-server';
import { ApolloGateway } from '@apollo/gateway';
import FileUploadDataSource from '@profusion/apollo-federation-upload';

const runServer = async () => {
  const server = new ApolloServer({
    gateway: new ApolloGateway({
      // Add this line in order to support file uploads.
      buildService: ({ url }) => new FileUploadDataSource({ url, useChunkedTransfer: true }),
      serviceList: [
        /* The services ... */
      ],
    })
  });

  const { url } = await server.listen();

  console.log(`🚀  Server ready at ${url}`);
};

runServer().catch(error => {
  console.error('💥  Failed to start server:', error);
  process.exit(1);
});
```