contentful
Advanced tools
| import { __rest } from 'tslib'; | ||
| function normalizeCursorPaginationParameters(query) { | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const { cursor, pagePrev, pageNext, skip } = query, rest = __rest(query, ["cursor", "pagePrev", "pageNext", "skip"]); | ||
| return Object.assign(Object.assign(Object.assign(Object.assign({}, rest), { cursor: true }), (!!pagePrev && { pagePrev })), (!!pageNext && { pageNext })); | ||
| } | ||
| export { normalizeCursorPaginationParameters }; |
| function extractQueryParam(key, url) { | ||
| const queryString = url === null || url === void 0 ? void 0 : url.split('?')[1]; | ||
| if (!queryString) { | ||
| return; | ||
| } | ||
| return new URLSearchParams(queryString).get(key); | ||
| } | ||
| const Pages = { | ||
| prev: 'pagePrev', | ||
| next: 'pageNext', | ||
| }; | ||
| function normalizeCursorPaginationResponse(response) { | ||
| const pages = {}; | ||
| for (const [responseKey, queryKey] of Object.entries(Pages)) { | ||
| const cursorToken = extractQueryParam(queryKey, response.pages[responseKey]); | ||
| if (cursorToken) { | ||
| pages[responseKey] = cursorToken; | ||
| } | ||
| } | ||
| return Object.assign(Object.assign({}, response), { pages }); | ||
| } | ||
| export { normalizeCursorPaginationResponse }; |
| type NormalizedCursorPaginationParams<Query extends Record<string, unknown>> = Omit<Query, 'cursor' | 'skip'> & { | ||
| cursor: true; | ||
| }; | ||
| export declare function normalizeCursorPaginationParameters<Query extends Record<string, unknown>>(query: Query): NormalizedCursorPaginationParams<Query>; | ||
| export {}; |
| import type { CursorPagination } from '../types'; | ||
| export declare function normalizeCursorPaginationResponse<Response extends CursorPagination>(response: Response): Response; |
@@ -40,3 +40,3 @@ import axios from 'axios'; | ||
| const config = Object.assign(Object.assign({}, defaultConfig), params); | ||
| const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.9.0"}`, config.application, config.integration); | ||
| const userAgentHeader = getUserAgentHeader(`contentful.js/${"0.0.0-determined-by-semantic-release"}`, config.application, config.integration); | ||
| config.headers = Object.assign(Object.assign({}, config.headers), { 'Content-Type': 'application/vnd.contentful.delivery.v1+json', 'X-Contentful-User-Agent': userAgentHeader }); | ||
@@ -43,0 +43,0 @@ const http = createHttpClient(axios, config); |
@@ -12,2 +12,4 @@ import { encodeCPAResponse } from '@contentful/content-source-maps'; | ||
| import { getTimelinePreviewParams } from './utils/timeline-preview-helpers.js'; | ||
| import { normalizeCursorPaginationParameters } from './utils/normalize-cursor-pagination-parameters.js'; | ||
| import { normalizeCursorPaginationResponse } from './utils/normalize-cursor-pagination-response.js'; | ||
@@ -131,2 +133,6 @@ /** | ||
| } | ||
| async function getEntriesWithCursor(query = {}) { | ||
| const response = await makeGetEntries(normalizeCursorPaginationParameters(query), options); | ||
| return normalizeCursorPaginationResponse(response); | ||
| } | ||
| async function makeGetEntry(id, query, options = { | ||
@@ -205,2 +211,6 @@ withAllLocales: false, | ||
| } | ||
| async function getAssetsWithCursor(query = {}) { | ||
| const response = await makeGetAssets(normalizeCursorPaginationParameters(query), options); | ||
| return normalizeCursorPaginationResponse(response); | ||
| } | ||
| async function makeGetAssets(query, options = { | ||
@@ -431,3 +441,3 @@ withAllLocales: false, | ||
| return { | ||
| version: "11.9.0", | ||
| version: "0.0.0-determined-by-semantic-release", | ||
| getSpace, | ||
@@ -438,2 +448,3 @@ getContentType, | ||
| getAssets, | ||
| getAssetsWithCursor, | ||
| getTag, | ||
@@ -446,2 +457,3 @@ getTags, | ||
| getEntries, | ||
| getEntriesWithCursor, | ||
| getConceptScheme, | ||
@@ -448,0 +460,0 @@ getConceptSchemes, |
@@ -1,2 +0,2 @@ | ||
| import type { ContentfulCollection } from './collection.js'; | ||
| import type { ContentfulCollection, CursorPaginatedCollection } from './collection.js'; | ||
| import type { LocaleCode } from './locale.js'; | ||
@@ -66,2 +66,10 @@ import type { Metadata } from './metadata.js'; | ||
| /** | ||
| * A cursor paginated collection of assets | ||
| * @category Asset | ||
| * @typeParam Modifiers - The chain modifiers used to configure the client. They’re set automatically when using the client chain modifiers. | ||
| * @typeParam Locales - If provided for a client using `allLocales` modifier, response type defines locale keys for asset field values. | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets | Documentation} | ||
| */ | ||
| export type AssetCursorPaginatedCollection<Modifiers extends ChainModifiers = ChainModifiers, Locales extends LocaleCode = LocaleCode> = CursorPaginatedCollection<Asset<Modifiers, Locales>>; | ||
| /** | ||
| * System managed metadata for assets | ||
@@ -68,0 +76,0 @@ * @category Asset |
| import type { ContentType, ContentTypeCollection } from './content-type.js'; | ||
| import type { Space } from './space.js'; | ||
| import type { LocaleCode, LocaleCollection } from './locale.js'; | ||
| import type { AssetQueries, AssetsQueries, ConceptAncestorsDescendantsQueries, ConceptSchemesQueries, ConceptsQueries, EntriesQueries, EntryQueries, EntrySkeletonType, TagQueries } from './query/index.js'; | ||
| import type { AssetQueries, AssetsQueries, AssetsQueriesWithCursor, ConceptAncestorsDescendantsQueries, ConceptSchemesQueries, ConceptsQueries, EntriesQueries, EntriesQueriesWithCursor, EntryQueries, EntrySkeletonType, TagQueries } from './query/index.js'; | ||
| import type { SyncCollection, SyncOptions, SyncQuery } from './sync.js'; | ||
| import type { Tag, TagCollection } from './tag.js'; | ||
| import type { AssetKey } from './asset-key.js'; | ||
| import type { Entry, EntryCollection } from './entry.js'; | ||
| import type { Asset, AssetCollection, AssetFields } from './asset.js'; | ||
| import type { Entry, EntryCollection, EntryCursorPaginatedCollection } from './entry.js'; | ||
| import type { Asset, AssetCollection, AssetCursorPaginatedCollection, AssetFields } from './asset.js'; | ||
| import type { Concept, ConceptCollection } from './concept.js'; | ||
@@ -346,2 +346,26 @@ import type { ConceptScheme, ConceptSchemeCollection } from './concept-scheme.js'; | ||
| /** | ||
| * Fetches a cursor paginated collection of Entries | ||
| * @param pagination - Object with cursor pagination options | ||
| * @param query - Object with search parameters | ||
| * @returns Promise for a cursor paginated collection of Entries | ||
| * @typeParam EntrySkeleton - Shape of entry fields used to calculate dynamic keys | ||
| * @typeParam Locales - If provided for a client using `allLocales` modifier, response type defines locale keys for entry field values. | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/cursor-pagination | REST API cursor pagination reference} | ||
| * @see {@link https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters | JS SDK tutorial} | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters | REST API reference} | ||
| * @example | ||
| * ```typescript | ||
| * const contentful = require('contentful') | ||
| * | ||
| * const client = contentful.createClient({ | ||
| * space: '<space_id>', | ||
| * accessToken: '<content_delivery_api_key>' | ||
| * }) | ||
| * | ||
| * const response = await client.getEntriesWithCursor() | ||
| * console.log(response.items) | ||
| * ``` | ||
| */ | ||
| getEntriesWithCursor<EntrySkeleton extends EntrySkeletonType = EntrySkeletonType, Locales extends LocaleCode = LocaleCode>(query?: EntriesQueriesWithCursor<EntrySkeleton, Modifiers>): Promise<EntryCursorPaginatedCollection<EntrySkeleton, Modifiers, Locales>>; | ||
| /** | ||
| * Parse raw json data into a collection of entries. objects.Links will be resolved also | ||
@@ -418,2 +442,23 @@ * @param data - json data | ||
| /** | ||
| * Fetches a cursor paginated collection of assets | ||
| * @param pagination - Object with cursor pagination options | ||
| * @param query - Object with search parameters | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/cursor-pagination | REST API cursor pagination reference} | ||
| * @see {@link https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters | JS SDK tutorial} | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters | REST API reference} | ||
| * @returns Promise for a cursor paginated collection of Assets | ||
| * @typeParam Locales - If provided for a client using `allLocales` modifier, response type defines locale keys for asset field values. | ||
| * @example | ||
| * const contentful = require('contentful') | ||
| * | ||
| * const client = contentful.createClient({ | ||
| * space: '<space_id>', | ||
| * accessToken: '<content_delivery_api_key>' | ||
| * }) | ||
| * | ||
| * const response = await client.getAssetsWithCursor() | ||
| * console.log(response.items) | ||
| */ | ||
| getAssetsWithCursor<Locales extends LocaleCode = LocaleCode>(query?: AssetsQueriesWithCursor<AssetFields, Modifiers>): Promise<AssetCursorPaginatedCollection<Modifiers, Locales>>; | ||
| /** | ||
| * A client that will fetch assets and entries with all locales. Only available if not already enabled. | ||
@@ -420,0 +465,0 @@ */ |
@@ -1,15 +0,42 @@ | ||
| import type { AssetSys } from './asset.js'; | ||
| import type { EntrySys } from './entry.js'; | ||
| export type CollectionBase<T> = { | ||
| limit: number; | ||
| items: Array<T>; | ||
| sys?: { | ||
| type: 'Array'; | ||
| }; | ||
| }; | ||
| export type OffsetPagination = { | ||
| total: number; | ||
| skip: number; | ||
| }; | ||
| export type CursorPagination = { | ||
| pages: { | ||
| next?: string; | ||
| prev?: string; | ||
| }; | ||
| }; | ||
| /** | ||
| * A wrapper object containing additional information for | ||
| * a collection of Contentful resources | ||
| * an offset paginated collection of Contentful resources | ||
| * @category Entity | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/collection-resources-and-pagination | Documentation} | ||
| */ | ||
| export interface ContentfulCollection<T> { | ||
| total: number; | ||
| skip: number; | ||
| limit: number; | ||
| items: Array<T>; | ||
| sys?: AssetSys | EntrySys; | ||
| export type OffsetPaginatedCollection<T = unknown> = CollectionBase<T> & OffsetPagination; | ||
| /** | ||
| * A wrapper object containing additional information for | ||
| * an offset paginated collection of Contentful resources | ||
| * @category Entity | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/collection-resources-and-pagination | Documentation} | ||
| */ | ||
| export interface ContentfulCollection<T = unknown> extends OffsetPaginatedCollection<T> { | ||
| } | ||
| /** | ||
| * A wrapper object containing additional information for | ||
| * a curisor paginated collection of Contentful resources | ||
| * @category Entity | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/cursor-pagination | Documentation} | ||
| */ | ||
| export type CursorPaginatedCollection<T = unknown> = CollectionBase<T> & CursorPagination; | ||
| export type CollectionForQuery<T = unknown, Query extends Record<string, unknown> = Record<string, unknown>> = Query extends { | ||
| cursor: true; | ||
| } ? CursorPaginatedCollection<T> : OffsetPaginatedCollection<T>; |
@@ -0,1 +1,2 @@ | ||
| import type { CursorPaginatedCollection } from './collection'; | ||
| import type { UnresolvedLink } from './link'; | ||
@@ -24,13 +25,3 @@ import type { LocaleCode } from './locale'; | ||
| } | ||
| export type ConceptSchemeCollection<Locale extends LocaleCode> = { | ||
| sys: { | ||
| type: 'Array'; | ||
| }; | ||
| items: ConceptScheme<Locale>[]; | ||
| limit: number; | ||
| pages?: { | ||
| prev?: string; | ||
| next?: string; | ||
| }; | ||
| }; | ||
| export type ConceptSchemeCollection<Locale extends LocaleCode> = CursorPaginatedCollection<ConceptScheme<Locale>>; | ||
| export {}; |
@@ -0,1 +1,2 @@ | ||
| import type { CursorPaginatedCollection } from './collection'; | ||
| import type { UnresolvedLink } from './link'; | ||
@@ -49,13 +50,3 @@ import type { LocaleCode } from './locale'; | ||
| } | ||
| export type ConceptCollection<Locale extends LocaleCode> = { | ||
| sys: { | ||
| type: 'Array'; | ||
| }; | ||
| items: Concept<Locale>[]; | ||
| limit: number; | ||
| pages?: { | ||
| prev?: string; | ||
| next?: string; | ||
| }; | ||
| }; | ||
| export type ConceptCollection<Locale extends LocaleCode> = CursorPaginatedCollection<Concept<Locale>>; | ||
| export {}; |
| import type { Document as RichTextDocument } from '@contentful/rich-text-types'; | ||
| import type { Asset } from './asset.js'; | ||
| import type { ContentfulCollection } from './collection.js'; | ||
| import type { ContentfulCollection, CursorPaginatedCollection } from './collection.js'; | ||
| import type { ContentTypeLink, UnresolvedLink } from './link.js'; | ||
@@ -232,1 +232,16 @@ import type { LocaleCode } from './locale.js'; | ||
| }; | ||
| /** | ||
| * A cursor paginated collection of entries | ||
| * @category Entry | ||
| * @typeParam EntrySkeleton - Shape of entry fields used to calculate dynamic keys | ||
| * @typeParam Modifiers - The chain modifiers used to configure the client. They’re set automatically when using the client chain modifiers. | ||
| * @typeParam Locales - If provided for a client using `allLocales` modifier, response type defines locale keys for entry field values. | ||
| * @see {@link https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries | Documentation} | ||
| */ | ||
| export type EntryCursorPaginatedCollection<EntrySkeleton extends EntrySkeletonType, Modifiers extends ChainModifiers = ChainModifiers, Locales extends LocaleCode = LocaleCode> = CursorPaginatedCollection<Entry<EntrySkeleton, Modifiers, Locales>> & { | ||
| errors?: Array<any>; | ||
| includes?: { | ||
| Entry?: Entry<EntrySkeletonType, Modifiers, Locales>[]; | ||
| Asset?: Asset<Modifiers, Locales>[]; | ||
| }; | ||
| }; |
@@ -18,2 +18,12 @@ import type { AssetDetails, AssetFile, AssetMimeType, AssetSys } from '../asset.js'; | ||
| import type { ConditionalFixedQueries, ConditionalListQueries, EntrySkeletonType, FieldsType } from './util.js'; | ||
| export type CursorPaginationOptions = ({ | ||
| pagePrev?: string; | ||
| pageNext?: never; | ||
| } | { | ||
| pageNext?: string; | ||
| pagePrev?: never; | ||
| }) & { | ||
| limit?: number; | ||
| skip?: never; | ||
| }; | ||
| export type FixedPagedOptions = { | ||
@@ -64,2 +74,9 @@ skip?: number; | ||
| /** | ||
| * Search parameters for entry cursor paginated collection | ||
| * @typeParam EntrySkeleton - Shape of an entry used to calculate dynamic keys | ||
| * @typeParam Modifiers - The chain modifiers used to configure the client. They’re set automatically when using the client chain modifiers. | ||
| * @category Query | ||
| */ | ||
| export type EntriesQueriesWithCursor<EntrySkeleton extends EntrySkeletonType, Modifiers extends ChainModifiers> = EntriesQueries<EntrySkeleton, Modifiers> & CursorPaginationOptions; | ||
| /** | ||
| * Search parameters for a single entry methods | ||
@@ -98,2 +115,9 @@ * @typeParam Modifiers - The chain modifiers used to configure the client. They’re set automatically when using the client chain modifiers. | ||
| /** | ||
| * Search parameters for asset cursor paginated collection | ||
| * @typeParam EntrySkeleton Shape of an asset used to calculate dynamic keys | ||
| * @typeParam Modifiers The chain modifiers used to configure the client. They’re set automatically when using the client chain modifiers. | ||
| * @category Query | ||
| */ | ||
| export type AssetsQueriesWithCursor<Fields extends FieldsType, Modifiers extends ChainModifiers> = AssetsQueries<Fields, Modifiers> & CursorPaginationOptions; | ||
| /** | ||
| * Search parameters for a single asset methods | ||
@@ -118,3 +142,3 @@ * @typeParam Modifiers The chain modifiers used to configure the client. They’re set automatically when using the client chain modifiers. | ||
| export type TagQueries = TagNameFilters & SysQueries<Pick<TagSys, 'createdAt' | 'updatedAt' | 'visibility' | 'id' | 'type'>> & TagOrderFilter & FixedPagedOptions; | ||
| type CursorPaginationOptions = { | ||
| type ConceptsCursorPaginationOptions = { | ||
| limit?: number; | ||
@@ -124,9 +148,9 @@ prevPage?: string; | ||
| }; | ||
| export type ConceptsQueries = CursorPaginationOptions & TaxonomyOrderFilter & { | ||
| export type ConceptsQueries = ConceptsCursorPaginationOptions & TaxonomyOrderFilter & { | ||
| conceptScheme?: string; | ||
| }; | ||
| export type ConceptSchemesQueries = CursorPaginationOptions & TaxonomyOrderFilter; | ||
| export type ConceptAncestorsDescendantsQueries = CursorPaginationOptions & TaxonomyOrderFilter & { | ||
| export type ConceptSchemesQueries = ConceptsCursorPaginationOptions & TaxonomyOrderFilter; | ||
| export type ConceptAncestorsDescendantsQueries = ConceptsCursorPaginationOptions & TaxonomyOrderFilter & { | ||
| depth?: number; | ||
| }; | ||
| export {}; |
+4
-7
| { | ||
| "name": "contentful", | ||
| "description": "Client for Contentful's Content Delivery API", | ||
| "version": "11.9.0", | ||
| "version": "11.10.0", | ||
| "homepage": "https://www.contentful.com/developers/documentation/content-delivery-api/", | ||
@@ -56,3 +56,2 @@ "type": "module", | ||
| "build:bundles": "NODE_ENV=production rollup -c", | ||
| "postbuild": "npm run check && npm run test:demo-projects", | ||
| "check": "npm run check:cjs && npm run check:esm && npm run check:browser && npm run check:browser-min", | ||
@@ -77,8 +76,6 @@ "check:browser": "es-check es2018 ./dist/contentful.browser.js", | ||
| "test:demo-projects": "npm run test:demo-node && npm run test:demo-browser", | ||
| "test:demo-node": "rimraf ./test/output-integration/node/node-modules && npm --prefix ./test/output-integration/node ci && vitest --run ./test/output-integration/node", | ||
| "test:demo-browser": "rimraf ./test/output-integration/browser/node-modules && npm --prefix ./test/output-integration/browser ci && npm --prefix ./test/output-integration/browser run test", | ||
| "test:demo-node": "rimraf ./test/output-integration/node/node-modules && npm --prefix ./test/output-integration/node ci && npm --prefix ./test/output-integration/node test", | ||
| "test:demo-browser": "rimraf ./test/output-integration/browser/node-modules && npm --prefix ./test/output-integration/browser ci && npm --prefix ./test/output-integration/browser run setup-test-env && npm --prefix ./test/output-integration/browser run test", | ||
| "test:types": "tsd", | ||
| "test:prepush": "npm run build && npm run test:unit && npm run test:types", | ||
| "prepublishOnly": "export PUBLISH_RUN=true && npm run build && unset PUBLISH_RUN", | ||
| "postpublish": "npm run docs:publish && npm run clean", | ||
| "semantic-release": "semantic-release", | ||
@@ -141,3 +138,3 @@ "prepare": "husky", | ||
| "prettier --write", | ||
| "eslint" | ||
| "eslint --fix" | ||
| ], | ||
@@ -144,0 +141,0 @@ "*.md": [ |
+30
-5
@@ -34,4 +34,4 @@ <!-- shared header START --> | ||
| </a> | ||
| <a href="https://circleci.com/gh/contentful/contentful.js"> | ||
| <img src="https://circleci.com/gh/contentful/contentful.js.svg?style=svg" alt="Build Status"> | ||
| <a href="https://github.com/contentful/contentful.js/actions?query=branch%3Amaster"> | ||
| <img src="https://github.com/contentful/contentful.js/actions/workflows/main.yaml/badge.svg"> | ||
| </a> | ||
@@ -72,8 +72,9 @@ <a href="https://www.npmjs.com/package/contentful"> | ||
| - [Authentication](#authentication) | ||
| - [Cursor-based Pagination](#cursor-based-pagination) | ||
| - [Documentation \& References](#documentation--references) | ||
| - [Configuration](#configuration) | ||
| - [Request configuration options](#request-configuration-options) | ||
| - [Response configuration options](#response-configuration-options) | ||
| - [Request configuration options](#request-configuration-options) | ||
| - [Response configuration options](#response-configuration-options) | ||
| - [Timeline Preview](#timeline-preview) | ||
| - [Example](#example) | ||
| - [Example](#example) | ||
| - [Client chain modifiers](#client-chain-modifiers) | ||
@@ -140,2 +141,3 @@ - [Entries](#entries) | ||
| - [Authentication](#authentication) | ||
| - [Cursor-based pagination](#cursor-based-pagination) | ||
| - [Documentation & References](#documentation--references) | ||
@@ -235,2 +237,25 @@ | ||
| ### Cursor-based Pagination | ||
| Cursor-based pagination is supported on collection endpoints for entries and assets: | ||
| ```js | ||
| const response = await client.getEntriesWithCursor({ limit: 10 }) | ||
| console.log(response.items) // Array of items | ||
| console.log(response.pages?.next) // Cursor for next page | ||
| ``` | ||
| Use the value from `response.pages.next` to fetch the next page or `response.pages.prev` to fetch the previous page. | ||
| ```js | ||
| const nextPageResponse = await client.getEntriesWithCursor({ | ||
| limit: 10, | ||
| pageNext: response.pages?.next, | ||
| }) | ||
| console.log(nextPageResponse.items) // Array of items | ||
| console.log(nextPageResponse.pages?.next) // Cursor for next page | ||
| console.log(nextPageResponse.pages?.prev) // Cursor for prev page | ||
| ``` | ||
| ## Documentation & References | ||
@@ -237,0 +262,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1733772
1.19%82
5.13%36768
0.92%594
4.39%179
0.56%