Socket
Socket
Sign inDemoInstall

@commercetools/frontend-sdk

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools/frontend-sdk - npm Package Compare versions

Comparing version 1.7.6 to 1.7.7

lib/chunk-E2PJA6K5.mjs

169

CHANGELOG.md
## Version 1.7.7 (2023-05-31)
* Send currency across in header for API calls
* Test for missing endpoint on protocol and add if missing
## Version 1.7.7 (2023-05-31)
* Updated version
* Added back frontastic-path header to getPage method
* Sends cuurency across in header for API calls
* Revert "Merge branch 'studio-deployment-branch'"
* Fixed formatting
* Fixed formatting
* misc: Tagged release 1.7.4 for core
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* Added ServerOptions type to index export
* misc: Tagged release 1.7.3 for core
* Updated version
* misc: Tagged release 1.7.2 for core
* Updated version
* Updated version
* misc: Tagged release 1.7.1 for core
* Fixed formatting
* Updated version
* Refactor OptionsType -> ServerOptions
* Refactor OptionsType -> ServerOptions
* Added server cookie support for session handling
* Changed serverSession handling to take IncomingMessage
* Refactoring
* fix: formatting
* Removed use of js-cookie package
* Removed js-cookie package
* Removed js-cookie package
* Rework of cookie handling for better SSR support
* Rework of cookie handling for better SSR support
* Rework of cookie handling for better SSR support
* misc: Tagged release 1.7.0 for core
* Updated version
* feat: added support to pass serverSession in callAction
* Fixed formatting and commit history
* misc: Tagged release 1.6.2 for core
* Updated vresion
* Duplicated dev and prod build
* Corrected NODE_ENV flag
* Added tsup config file
* migrates to tsup
* misc: Tagged release 1.6.1 for core
* misc: Tagged release 1.6.0 for core
* Updated version
* Added optional serverSession parameter to getPage to pass server session for SSR
* Added serverSession helper to access server session cookie
* Claned obsolete SDK build files and added clean and reinstall scripts
* misc: Tagged release 1.5.0 for core
* Fixed formatting
* Updated version
* Replaced automatic assigning of Commercetools-Frontend-Extension-Version header in fetcher with optional extensionVersion parameter in SDKConfig
* Comment cleanup
* fixes links and title of sdk repo
* basic readme for frontend-sdk
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* Cleaned up formatting
* misc: Tagged release 1.4.1 for core
* Updated version
* Added throwIfNotConfigured method to Page API calls
* Added optional query param to getPage
* misc: Tagged release 1.4.0 for core
* Updated version
* Implemented getPages method
* Fixed formatting
* misc: Tagged release 1.3.0 for core
* Updated version
* Refactor #handleError in SDK
* Refaactored error handling, wip: getPreview page API method
* Added getPreview page API method definition
* Added PagePreviewResponse type for wip page.getPreview method
* Removed nested isError property from FetchError
* Fixed formatting of CHANGELOG.md
* misc: Tagged release 1.2.7 for core
* Updated version
* fix: only add Commercetools-Frontend-Extension-Version header if NEXT_PUBLIC_EXT_BUILD_ID provided
* misc: Tagged release 1.2.6 for core
* Updated version
* fix: type generation, exclude test folder from build
* Fixed formatting
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* Added test folder to .npmignore
* misc: Tagged release 1.2.5 for core
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* fix: updated node version
* misc: Tagged release 1.2.4 for core
* Tidied changelog
* Updated version
* feat(FP-3869): Use Commercetools-Frontend-Extension-Version header on SDK
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* fix: rememberMe cookie not being applied
* misc: Tagged release 1.2.3 for core
* misc: Tagged release 1.2.3 for core
* SDK version bump to 1.2.3
* updated locale tests
* makes currency mandatory
* removes redundant APILocale getter
* SDK accepts posix and bcp47 language tags/locales
* adds a simple test runner
* misc: Tagged release 1.2.2 for core
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* Corrected formatting
* Updated version
* fix: included @frontastic/extension-types as dependency
* misc: Tagged release 1.2.1 for core
* Updated version
* Added support for arrays in action queries
* Merged on rebase
* Added initial query string helpers
* misc: Tagged release 1.2.0 for core
* Added yarn install to prepublishOnly script
* Updated version
* Added Page API types
* refactor: removed PageResponse type
* Added page API with getPage method
* wip: add back getPage method
* Added intial PageResponse type
* Added moduleResolution: node to tsconfig
* Added @frontastic/extension-types dependency
* misc: Tagged release 1.1.4 for core
* Updated version
* Changed BUILD_ID to EXT_BUILD_ID
* Updated formatting of CHANGELOG.md
* misc: Tagged release 1.1.3 for core
* fix: added NEXT_PUBLIC prefix to BUILD_ID env variable
* Updated version
* Cleaned up formatting
* misc: Tagged release 1.1.2 for core
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* Updated version
* misc: Tagged release 1.1.1 for core
* Updated version
* Merge branch 'master' of https://github.com/FrontasticGmbH/frontastic
* fix: updated @types/node
* misc: Tagged release 1.1.0 for core
* Updated version
* Added access token support for multitenancy projects
* Added node to types in tsconfig
* misc: Tagged release 1.0.4 for core
* Updated version
* fix: error in error event trigger after reformatting
* misc: Tagged release 1.0.3 for core
* Updated perttier config and ran fix
* Removed trailingComma:all
* Run linting
* Added editorconfig for github to render tabs properly
* Updated version
* Run linting
* Indent with spaces instead of tabs
* Added prettierignore, fixed CHANGELOG.md
* Formatted code with new prettier config
* Fixed formatting
* misc: Tagged release 1.0.1 for core
* Updated version
* fix up prettier config to better suit the project
* Add tab width to .prettierrc
* misc: Tagged release 1.0.0 for core
* Full release out of alpha/beta
* Removed getPage for later release
* Updated formatting
* Removed yarn install from prepublishOnly
## Version 1.7.6 (2023-04-26)
* fix: include headers from IncomingMessage on SSR fetch

@@ -6,0 +173,0 @@

41

lib/index.js

@@ -370,2 +370,8 @@ "use strict";

set endpoint(url) {
if (url.indexOf("http") === -1) {
url = `https://${url}`;
console.warn(
`Protocol not supplied to endpoint, defaulting to https: ${url}`
);
}
this.#endpoint = url;

@@ -454,2 +460,11 @@ }

}
#getDefaultAPIHeaders() {
return {
"Frontastic-Locale": this.posixLocale,
"Frontastic-Currency": this.currency,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
};
}
async callAction(options) {

@@ -462,8 +477,3 @@ this.#throwIfNotConfigured();

body: JSON.stringify(options.payload),
headers: {
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
}
headers: this.#getDefaultAPIHeaders()
};

@@ -507,6 +517,3 @@ let result;

"Frontastic-Path": options.path,
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
...this.#getDefaultAPIHeaders()
}

@@ -543,8 +550,3 @@ };

method: "POST",
headers: {
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
}
headers: this.#getDefaultAPIHeaders()
};

@@ -582,8 +584,3 @@ let result;

method: "POST",
headers: {
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
}
headers: this.#getDefaultAPIHeaders()
};

@@ -590,0 +587,0 @@ let result;

@@ -350,2 +350,8 @@ "use strict";

set endpoint(url) {
if (url.indexOf("http") === -1) {
url = `https://${url}`;
console.warn(
`Protocol not supplied to endpoint, defaulting to https: ${url}`
);
}
this.#endpoint = url;

@@ -434,2 +440,11 @@ }

}
#getDefaultAPIHeaders() {
return {
"Frontastic-Locale": this.posixLocale,
"Frontastic-Currency": this.currency,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
};
}
async callAction(options) {

@@ -442,8 +457,3 @@ this.#throwIfNotConfigured();

body: JSON.stringify(options.payload),
headers: {
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
}
headers: this.#getDefaultAPIHeaders()
};

@@ -487,6 +497,3 @@ let result;

"Frontastic-Path": options.path,
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
...this.#getDefaultAPIHeaders()
}

@@ -523,8 +530,3 @@ };

method: "POST",
headers: {
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
}
headers: this.#getDefaultAPIHeaders()
};

@@ -562,8 +564,3 @@ let result;

method: "POST",
headers: {
"Frontastic-Locale": this.posixLocale,
...this.#extensionVersion ? {
"Commercetools-Frontend-Extension-Version": this.#extensionVersion
} : {}
}
headers: this.#getDefaultAPIHeaders()
};

@@ -570,0 +567,0 @@ let result;

{
"name": "@commercetools/frontend-sdk",
"version": "1.7.6",
"version": "1.7.7",
"license": "UNLICENSED",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1,7 +0,30 @@

# commercetools Frontend SDK
<h2 align="center">commercetools Frontend SDK</h2>
<p align="center">
<i></i>
</p>
<p align="center">
<a href="https://github.com/FrontasticGmbH/frontend-sdk/releases"><img src="https://badgen.net/github/release/FrontasticGmbH/frontend-sdk" alt="Latest release" /></a> <a href="https://github.com/FrontasticGmbH/frontend-sdk/blob/main/LICENSE"><img src="https://badgen.net/github/FrontasticGmbH/frontend-sdk" alt="GitHub license" /></a>
</p>
**Copyright (C) commercetools GmbH - All Rights Reserved**
The commercetools Frontend SDK is a TypeScript library that simplifies the process of creating custom components and integrations in your commercetools Frontend project. This SDK enables flexible and customizable frontend development, event handling, and support for extensions to expose commercetools Frontend API integrations.
The SDK is the core component of the commercetools frontend SDK,
providing core configuration and event management. Currently only within
the alpha release stage, documentation is currently unavailable.
## Installation
To install the SDK and its dependencies in your project, run:
```bash
yarn add @commercetools/frontend-sdk @commercetools/frontend-domain-types
```
## Features
- Event management for custom components and integrations
- Backend-agnostic and backward-compatible
- Extendable with additional SDKs and extensions
## Documentation
For more detailed information, visit the [main documentation page](https://docs.commercetools.com/frontend-development/frontend-sdk).
## License
This project is licensed under the MIT License.
## Support
For any questions or issues, please [create a GitHub issue](https://github.com/FrontasticGmbH/frontend-sdk/issues).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc