Skip to content

Commit

Permalink
Merge pull request #176 from hubblecommerce/rc2.8
Browse files Browse the repository at this point in the history
Release Candidate 2.8
  • Loading branch information
dm-heinze authored Aug 8, 2024
2 parents cad4747 + cf0a189 commit fdcbb5e
Show file tree
Hide file tree
Showing 259 changed files with 3,390 additions and 5,280 deletions.
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,12 @@
"no-useless-return": [
"off"
]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
3 changes: 2 additions & 1 deletion __tests__/module/fixture/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ export default defineNuxtConfig({
}
}
}
}
},
compatibilityDate: '2024-08-08'
})
7 changes: 5 additions & 2 deletions cypress/e2e/platform-sw.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ describe('Platform: Shopware', () => {

// cart off-canvas menu
cy.get('.navbar-end .btn:last').click()
cy.wait(500)
cy.get('.drawer-side .avatar').should('have.lengthOf', 1)

// cart page
Expand All @@ -71,8 +72,8 @@ describe('Platform: Shopware', () => {

it('removes product from cart', () => {
cy.intercept({
method: 'DELETE',
url: '/store-api/**'
method: 'POST',
url: '/store-api/checkout/cart/line-item/delete'
}).as('apiRemoveLineItem')

cy.visit('/')
Expand All @@ -81,6 +82,7 @@ describe('Platform: Shopware', () => {

// cart off-canvas menu
cy.get('.navbar-end .btn:last').click()
cy.wait(500)

cy.get('.flex.flex-col.gap-6 > div > .flex.flex-col.gap-2').children().then(($element) => {
const count = $element.length
Expand All @@ -107,6 +109,7 @@ describe('Platform: Shopware', () => {

// navigates from cart off-canvas menu to checkout
cy.get('.navbar-end .btn:last').click()
cy.wait(500)
cy.get('.drawer-side').contains('Checkout').click()

// registers in checkout as guest on checkout contact section
Expand Down
5,981 changes: 1,905 additions & 4,076 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hubblecommerce/hubble",
"version": "2.7.0",
"version": "2.8.0",
"description": "PWA for eCommerce frameworks based on NuxtJs",
"author": "hubble commerce",
"license": "MIT",
Expand Down Expand Up @@ -49,7 +49,7 @@
"coverage": "vitest run --coverage",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"sw:dev:generate-api": "node bin/hubble-cli.js dev:sw open-api-generate && git apply src/platforms/shopware/api-client/*.patch --verbose",
"sw:dev:generate-api": "node bin/hubble-cli.js dev:sw open-api-generate",
"sw:dev:patch-api": "git format-patch -1 $COMMIT -o src/platforms/shopware/api-client/",
"sw:install-plugins": "node bin/hubble-cli.js dev:sw sw-plugins-assets",
"sw:config-plugins": "node bin/hubble-cli.js dev:sw sw-plugins-config",
Expand Down Expand Up @@ -79,8 +79,8 @@
"portal-vue": "^3.0.0",
"ufo": "^1.3.0",
"untyped": "^1.2.2",
"unzipper": "^0.10.11",
"vitest": "^1.1.1"
"unzipper": "^0.12.3",
"vitest": "^2.0.5"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
Expand All @@ -93,10 +93,10 @@
"eslint": "^8.44.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-vue": "^9.9.0",
"husky": "^8.0.3",
"husky": "^9.1.4",
"lint-staged": "^15.2.0",
"nuxt": "^3.12.2",
"openapi-typescript-codegen": "^0.26.0",
"nuxt": "^3.12.4",
"openapi-typescript-codegen": "^0.29.0",
"rollup-plugin-copy": "^3.4.0",
"start-server-and-test": "^2.0.0",
"typescript": "^5.3.3",
Expand Down
3 changes: 2 additions & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ export default defineNuxtConfig({
defaultLocale: 'en',
strategy: 'prefix_and_default',
detectBrowserLanguage: false
}
},
compatibilityDate: '2024-08-08'
})
3 changes: 2 additions & 1 deletion src/commons/utils/types/HblIUseCustomer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export interface HblIUseCustomer {
loading: Ref<boolean>,
error: Ref,
getCustomer(): Promise<HblCustomer>,
login(username: string, password: string): Promise<string>,
login(username: string, password: string): Promise<void>,
logout(): void,
logoutGuest(): void,
updateShippingAddress (shippingAddress: HblCustomerShippingAddress): Promise<HblCustomerShippingAddress | void>,
updateBillingAddress (billingAddress: HblCustomerBillingAddress): Promise<HblCustomerBillingAddress | void>,
register(formData: HblRegisterCustomerForm): Promise<HblCustomer | void>,
Expand Down
1 change: 0 additions & 1 deletion src/commons/utils/types/HblProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export interface HblProduct {
name: string,
description?: string,
sku: string,
pathInfo: string,
url: string,
media?: HblMedia[] | HblMedia,
active: boolean,
Expand Down
3 changes: 3 additions & 0 deletions src/platforms/shopware/api-client/generated/core/ApiError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class ApiError extends Error {
public readonly statusCode: number;
public readonly statusMessage: string;
public readonly body: any;
public readonly response: any;
public readonly request: ApiRequestOptions;

constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
Expand All @@ -19,7 +20,9 @@ export class ApiError extends Error {
this.url = response.url;
this.statusCode = response.status;
this.statusMessage = response.statusText;
// @ts-ignore
this.body = response._data.errors;
this.response = response;
this.request = request;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly url: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResult = {
readonly _data: any
readonly url: string;
readonly ok: boolean;
readonly status: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export class CancelablePromise<T> implements Promise<T> {
return;
}
this.#isResolved = true;
this.#resolve?.(value);
if (this.#resolve) this.#resolve(value);
};

const onReject = (reason?: any): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#isRejected = true;
this.#reject?.(reason);
if (this.#reject) this.#reject(reason);
};

const onCancel = (cancelHandler: () => void): void => {
Expand Down Expand Up @@ -122,7 +122,7 @@ export class CancelablePromise<T> implements Promise<T> {
}
}
this.#cancelHandlers.length = 0;
this.#reject?.(new CancelError('Request aborted'));
if (this.#reject) this.#reject(new CancelError('Request aborted'));
}

public get isCancelled(): boolean {
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/shopware/api-client/generated/core/OpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export type OpenAPIConfig = {
};

export const OpenAPI: OpenAPIConfig = {
BASE: 'http://localhost/store-api',
VERSION: '6.5.3.3',
BASE: 'https://sw661-playground.dmf-kunden.com/store-api',
VERSION: '6.6.1.2',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
Expand Down
11 changes: 11 additions & 0 deletions src/platforms/shopware/api-client/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export { ApiError } from './core/ApiError';
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';

export type { accept } from './models/accept';
export type { AccountNewsletterRecipientResult } from './models/AccountNewsletterRecipientResult';
export type { AclRole } from './models/AclRole';
Expand All @@ -17,14 +18,17 @@ export type { AppFlowAction } from './models/AppFlowAction';
export type { AppFlowEvent } from './models/AppFlowEvent';
export type { AppPaymentMethod } from './models/AppPaymentMethod';
export type { AppScriptCondition } from './models/AppScriptCondition';
export type { AppShippingMethod } from './models/AppShippingMethod';
export type { AppTemplate } from './models/AppTemplate';
export type { ArrayStruct } from './models/ArrayStruct';
export type { attributes } from './models/attributes';
export type { CalculatedPrice } from './models/CalculatedPrice';
export type { Cart } from './models/Cart';
export type { CartItems } from './models/CartItems';
export type { Category } from './models/Category';
export type { CategoryJsonApi } from './models/CategoryJsonApi';
export type { CmsBlock } from './models/CmsBlock';
export type { CmsFactoryElement } from './models/CmsFactoryElement';
export type { CmsPage } from './models/CmsPage';
export type { CmsSection } from './models/CmsSection';
export type { CmsSlot } from './models/CmsSlot';
Expand All @@ -34,6 +38,7 @@ export type { CountryJsonApi } from './models/CountryJsonApi';
export type { CountryState } from './models/CountryState';
export type { CountryStateJsonApi } from './models/CountryStateJsonApi';
export type { Criteria } from './models/Criteria';
export type { CrossSellingElement } from './models/CrossSellingElement';
export type { CrossSellingElementCollection } from './models/CrossSellingElementCollection';
export type { Currency } from './models/Currency';
export type { CurrencyCountryRounding } from './models/CurrencyCountryRounding';
Expand Down Expand Up @@ -73,9 +78,11 @@ export type { LandingPageJsonApi } from './models/LandingPageJsonApi';
export type { Language } from './models/Language';
export type { LanguageJsonApi } from './models/LanguageJsonApi';
export type { LineItem } from './models/LineItem';
export type { LineItemType } from './models/LineItemType';
export type { link } from './models/link';
export type { linkage } from './models/linkage';
export type { links } from './models/links';
export type { ListPrice } from './models/ListPrice';
export type { Locale } from './models/Locale';
export type { LogEntry } from './models/LogEntry';
export type { MailHeaderFooter } from './models/MailHeaderFooter';
Expand All @@ -93,6 +100,7 @@ export type { MediaThumbnail } from './models/MediaThumbnail';
export type { MediaThumbnailSize } from './models/MediaThumbnailSize';
export type { meta } from './models/meta';
export type { NavigationRouteResponse } from './models/NavigationRouteResponse';
export type { NavigationType } from './models/NavigationType';
export type { NewsletterRecipient } from './models/NewsletterRecipient';
export type { NewsletterRecipientJsonApi } from './models/NewsletterRecipientJsonApi';
export type { Notification } from './models/Notification';
Expand Down Expand Up @@ -149,6 +157,7 @@ export type { PromotionSalesChannel } from './models/PromotionSalesChannel';
export type { PromotionSetgroup } from './models/PromotionSetgroup';
export type { PropertyGroup } from './models/PropertyGroup';
export type { PropertyGroupOption } from './models/PropertyGroupOption';
export type { ReferencePrice } from './models/ReferencePrice';
export type { relationshipLinks } from './models/relationshipLinks';
export type { relationships } from './models/relationships';
export type { relationshipToMany } from './models/relationshipToMany';
Expand Down Expand Up @@ -201,6 +210,7 @@ export type { WishlistLoadRouteResponse } from './models/WishlistLoadRouteRespon
export { AddressShopware } from './services/AddressShopware';
export { ApiShopware } from './services/ApiShopware';
export { AppShopware } from './services/AppShopware';
export { AppSystemShopware } from './services/AppSystemShopware';
export { CartShopware } from './services/CartShopware';
export { CategoryShopware } from './services/CategoryShopware';
export { ContentShopware } from './services/ContentShopware';
Expand All @@ -217,4 +227,5 @@ export { ScriptShopware } from './services/ScriptShopware';
export { PwaShopware } from './services/PwaShopware';
export { SitemapRoutesShopware } from './services/SitemapRoutesShopware';
export { SystemContextShopware } from './services/SystemContextShopware';
export { SystemInfoHealthcheckShopware } from './services/SystemInfoHealthcheckShopware';
export { WishlistShopware } from './services/WishlistShopware';
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { Struct } from './Struct';

export type AccountNewsletterRecipientResult = (Struct & {
status?: string;
});
export type AccountNewsletterRecipientResult = {
status: 'undefined' | 'notSet' | 'direct' | 'optIn' | 'optOut';
apiAlias: 'account_newsletter_recipient';
};

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.0.0.0
*/
Expand Down
1 change: 0 additions & 1 deletion src/platforms/shopware/api-client/generated/models/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.3.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.3.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.4.15.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.4.2.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.4.10.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.5.2.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.4.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.4.10.3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* Added since version: 6.5.7.0
*/
export type AppShippingMethod = {
id?: string;
readonly createdAt: string;
readonly updatedAt?: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Added since version: 6.3.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { Struct } from './Struct';

export type ArrayStruct = Struct;
Loading

0 comments on commit fdcbb5e

Please sign in to comment.