Skip to content

Commit

Permalink
Remove all live occurrences (#220)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia authored Sep 4, 2023
1 parent f3d16fe commit 5183f8f
Show file tree
Hide file tree
Showing 87 changed files with 124 additions and 209 deletions.
2 changes: 1 addition & 1 deletion commerce/butterCMS/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Account } from "$live/blocks/account.ts";
import { Account } from "deco/blocks/account.ts";
import { fetchAPI } from "../../utils/fetch.server.ts";
import { CategoriesData, Page, PostData, PostsData } from "./types.ts";

Expand Down
2 changes: 1 addition & 1 deletion commerce/butterCMS/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LiveState } from "$live/types.ts";
import { LiveState } from "deco/types.ts";
import { ConfigButterCMS } from "./client.ts";

export type StateButterCMS = LiveState<{ configButterCMS?: ConfigButterCMS }>;
Expand Down
2 changes: 1 addition & 1 deletion commerce/nuvemShop/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FnContext } from "$live/types.ts";
import type { FnContext } from "deco/types.ts";

export interface Account {
/**
Expand Down
2 changes: 1 addition & 1 deletion commerce/occ/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Account } from "$live/blocks/account.ts";
import { fetchAPI } from "deco-sites/std/utils/fetch.server.ts";
import { Account } from "deco/blocks/account.ts";
import {
CategorySearchResult,
OccProductPage,
Expand Down
2 changes: 1 addition & 1 deletion commerce/shopify/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Account } from "$live/blocks/account.ts";
import { fetchAPI } from "deco-sites/std/utils/fetch.server.ts";
import { Account } from "deco/blocks/account.ts";
import { Product } from "./types.ts";

const gql = (x: TemplateStringsArray) => x.toString().trim();
Expand Down
2 changes: 1 addition & 1 deletion commerce/vtex/withISFallback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LoaderFunction } from "$live/types.ts";
import { LoaderFunction } from "deco/types.ts";
import { HttpError } from "../../utils/HttpError.ts";

const message = `
Expand Down
2 changes: 1 addition & 1 deletion commerce/yourViews/withYourViews.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LiveState, LoaderFunction } from "$live/types.ts";
import type { LiveState, LoaderFunction } from "deco/types.ts";
import type {
Product,
ProductDetailsPage,
Expand Down
6 changes: 3 additions & 3 deletions components/Analytics.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { context } from "$live/live.ts";
import GoogleTagManager from "partytown/integrations/GTM.tsx";
import GoogleTagScript from "partytown/integrations/GTAG.tsx";
import { context } from "deco/live.ts";
import Script from "partytown/Script.tsx";
import GoogleTagScript from "partytown/integrations/GTAG.tsx";
import GoogleTagManager from "partytown/integrations/GTM.tsx";
import { sendAnalyticsEvent } from "../commerce/sdk/sendAnalyticsEvent.ts";

export interface Props {
Expand Down
2 changes: 1 addition & 1 deletion components/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LoaderReturnType } from "deco/types.ts";
import { marky } from "https://deno.land/x/[email protected]/mod.ts";
import { LoaderReturnType } from "$live/types.ts";

export type Props = {
text: LoaderReturnType<string>;
Expand Down
2 changes: 1 addition & 1 deletion components/seo/SEOPDP.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { LoaderReturnType } from "$live/types.ts";
import { DEFAULT_CATEGORY_SEPARATOR } from "deco-sites/std/commerce/utils.ts";
import type { Image as LiveImage } from "deco-sites/std/components/types.ts";
import type { LoaderReturnType } from "deco/types.ts";
import type { ProductDetailsPage } from "../../commerce/types.ts";
import Metatags from "./Metatags.tsx";

Expand Down
2 changes: 1 addition & 1 deletion components/seo/SEOPLP.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LoaderReturnType } from "$live/types.ts";
import type { Image as LiveImage } from "deco-sites/std/components/types.ts";
import type { LoaderReturnType } from "deco/types.ts";
import type { ProductListingPage } from "../../commerce/types.ts";
import Metatags from "./Metatags.tsx";

Expand Down
2 changes: 1 addition & 1 deletion components/seo/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Image as LiveImage } from "deco-sites/std/components/types.ts";
import type { LoaderReturnType } from "$live/types.ts";
import type { LoaderReturnType } from "deco/types.ts";
import type {
ProductDetailsPage,
ProductListingPage,
Expand Down
4 changes: 1 addition & 3 deletions dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
*/
import "./plugins/tailwind/bundler.ts";

import dev from "$live/dev.ts";
import liveManifest from "$live/live.gen.ts";
import dev from "deco/dev.ts";

await dev(import.meta.url, "./main.ts", {
imports: [liveManifest],
injectRoutes: false,
});
2 changes: 1 addition & 1 deletion functions/butterCMSAds.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toFeaturedAds } from "../commerce/butterCMS/transform.ts";
import type {
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSBrands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toFeaturedPlaces } from "../commerce/butterCMS/transform.ts";
import type {
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSCategories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";

import { createClient } from "../commerce/butterCMS/client.ts";
import type { Category, StateButterCMS } from "../commerce/butterCMS/types.ts";
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSFeaturedPosts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toFeaturedPosts } from "../commerce/butterCMS/transform.ts";
import type {
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSPage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import type { BlogPage, StateButterCMS } from "../commerce/butterCMS/types.ts";

Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSPlaces.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toFeaturedPlaces } from "../commerce/butterCMS/transform.ts";
import type {
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSPostDetail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toBlogPost } from "../commerce/butterCMS/transform.ts";
import type { BlogPost, StateButterCMS } from "../commerce/butterCMS/types.ts";
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSPosts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toPostsPreview } from "../commerce/butterCMS/transform.ts";
import type {
Expand Down
2 changes: 1 addition & 1 deletion functions/butterCMSRelatedPosts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import { createClient } from "../commerce/butterCMS/client.ts";
import { toPostsPreview } from "../commerce/butterCMS/transform.ts";
import type {
Expand Down
5 changes: 2 additions & 3 deletions functions/occProductDetailsPage.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LiveState } from "$live/types.ts";
import type { LiveState, LoaderFunction } from "deco/types.ts";

import { toProductPage } from "../commerce/occ/transform.ts";
import { ConfigOCC, createClient } from "../commerce/occ/client.ts";
import { toProductPage } from "../commerce/occ/transform.ts";
import type { ProductDetailsPage } from "../commerce/types.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion functions/requestToParam.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FunctionContext, LoaderFunction } from "$live/types.ts";
import type { FunctionContext, LoaderFunction } from "deco/types.ts";

export type RequestURLParam = string;

Expand Down
5 changes: 2 additions & 3 deletions functions/shopifyProductDetailsPage.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LiveState } from "$live/types.ts";
import type { LiveState, LoaderFunction } from "deco/types.ts";

import { toProductPage } from "../commerce/shopify/transform.ts";
import { ConfigShopify, createClient } from "../commerce/shopify/client.ts";
import { toProductPage } from "../commerce/shopify/transform.ts";
import type { ProductDetailsPage } from "../commerce/types.ts";

/**
Expand Down
5 changes: 2 additions & 3 deletions functions/shopifyProductList.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LiveState } from "$live/types.ts";
import type { LiveState, LoaderFunction } from "deco/types.ts";

import { toProduct } from "../commerce/shopify/transform.ts";
import { ConfigShopify, createClient } from "../commerce/shopify/client.ts";
import { toProduct } from "../commerce/shopify/transform.ts";
import type { Product } from "../commerce/types.ts";

export interface Props {
Expand Down
5 changes: 2 additions & 3 deletions functions/shopifyProductListingPage.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { LoaderFunction } from "$live/types.ts";
import type { LiveState } from "$live/types.ts";
import type { LiveState, LoaderFunction } from "deco/types.ts";

import { toProduct } from "../commerce/shopify/transform.ts";
import { ConfigShopify, createClient } from "../commerce/shopify/client.ts";
import { toProduct } from "../commerce/shopify/transform.ts";
import type { ProductListingPage } from "../commerce/types.ts";

export interface Props {
Expand Down
6 changes: 3 additions & 3 deletions functions/vndaProductList.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Product } from "deco-sites/std/commerce/types.ts";
import { StateVNDA } from "deco-sites/std/packs/vnda/accounts/vnda.ts";
import productListLoader, {
Props,
} from "deco-sites/std/packs/vnda/loaders/productList.ts";
import type { LoaderFunction } from "$live/types.ts";
import { Product } from "deco-sites/std/commerce/types.ts";
import { StateVNDA } from "deco-sites/std/packs/vnda/accounts/vnda.ts";
import type { LoaderFunction } from "deco/types.ts";

const productList: LoaderFunction<
Props,
Expand Down
6 changes: 3 additions & 3 deletions functions/vndaProductListingPage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ProductListingPage } from "deco-sites/std/commerce/types.ts";
import { StateVNDA } from "deco-sites/std/packs/vnda/accounts/vnda.ts";
import productListingPageLoader, {
Props,
} from "deco-sites/std/packs/vnda/loaders/productListingPage.ts";
import type { LoaderFunction } from "$live/types.ts";
import { ProductListingPage } from "deco-sites/std/commerce/types.ts";
import { StateVNDA } from "deco-sites/std/packs/vnda/accounts/vnda.ts";
import type { LoaderFunction } from "deco/types.ts";

const productListingPage: LoaderFunction<
Props,
Expand Down
4 changes: 2 additions & 2 deletions functions/vtexLegacyProductDetailsPage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import loader from "deco-sites/std/packs/vtex/loaders/legacy/productDetailsPage.ts";
import type { ProductDetailsPage } from "../commerce/types.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { ProductDetailsPage } from "../commerce/types.ts";

/**
* @title VTEX Catalog - Product Details Page (deprecated)
Expand Down
4 changes: 2 additions & 2 deletions functions/vtexLegacyProductList.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import loader from "deco-sites/std/packs/vtex/loaders/legacy/productList.ts";
import type { Product } from "../commerce/types.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { Product } from "../commerce/types.ts";

export interface Props {
/** @description total number of items to display */
Expand Down
4 changes: 2 additions & 2 deletions functions/vtexLegacyProductListingPage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import loader, {
Props,
} from "deco-sites/std/packs/vtex/loaders/legacy/productListingPage.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { ProductListingPage } from "../commerce/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { ProductListingPage } from "../commerce/types.ts";

/**
* @title VTEX Catalog - Product Listing Page (deprecated)
Expand Down
2 changes: 1 addition & 1 deletion functions/vtexLegacyRelatedProductsLoader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import loader from "deco-sites/std/packs/vtex/loaders/legacy/relatedProductsLoader.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { Product } from "../commerce/types.ts";
import type {
CrossSellingType,
Expand Down
4 changes: 2 additions & 2 deletions functions/vtexNavbar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import loader from "deco-sites/std/packs/vtex/loaders/navbar.ts";
import type { Navbar } from "../commerce/types.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { Navbar } from "../commerce/types.ts";

export interface Props {
/**
Expand Down
4 changes: 2 additions & 2 deletions functions/vtexProductDetailsPage.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import loader from "deco-sites/std/packs/vtex/loaders/intelligentSearch/productDetailsPage.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { ProductDetailsPage } from "../commerce/types.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";

/**
* @title VTEX Intelligent Search - Product Details Page (deprecated)
Expand Down
2 changes: 1 addition & 1 deletion functions/vtexProductList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { LoaderFunction } from "$live/types.ts";
import loader from "deco-sites/std/packs/vtex/loaders/intelligentSearch/productList.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { Product } from "../commerce/types.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";

Expand Down
6 changes: 3 additions & 3 deletions functions/vtexProductListingPage.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import loader, {
Props,
} from "deco-sites/std/packs/vtex/loaders/intelligentSearch/productListingPage.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";
import type { LoaderFunction } from "$live/types.ts";
import type { ProductListingPage } from "../commerce/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { ProductListingPage } from "../commerce/types.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";

/**
* @title VTEX Intelligent Search - Product Listing page (deprecated)
Expand Down
4 changes: 2 additions & 2 deletions functions/vtexSuggestions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import loader from "deco-sites/std/packs/vtex/loaders/intelligentSearch/suggestions.ts";
import { LoaderFunction } from "$live/types.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import { LoaderFunction } from "deco/types.ts";
import { Suggestion } from "../commerce/types.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";

export interface Props {
query?: string;
Expand Down
6 changes: 3 additions & 3 deletions functions/vtexWishlist.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import wishlistLoader from "deco-sites/std/packs/vtex/loaders/wishlist.ts";
import productsLoader from "deco-sites/std/packs/vtex/loaders/intelligentSearch/productListingPage.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";
import type { LoaderFunction } from "$live/types.ts";
import wishlistLoader from "deco-sites/std/packs/vtex/loaders/wishlist.ts";
import type { StateVTEX } from "deco-sites/std/packs/vtex/types.ts";
import type { LoaderFunction } from "deco/types.ts";
import type { ProductListingPage } from "../commerce/types.ts";
import { withISFallback } from "../commerce/vtex/withISFallback.ts";

export interface Props {
/**
Expand Down
8 changes: 4 additions & 4 deletions handlers/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Handler } from "$live/blocks/handler.ts";
import type { Resolvable } from "$live/engine/core/resolver.ts";
import { isResolvable } from "$live/engine/core/resolver.ts";
import { Route } from "$live/flags/audience.ts";
import type { Handler } from "deco/blocks/handler.ts";
import type { Resolvable } from "deco/engine/core/resolver.ts";
import { isResolvable } from "deco/engine/core/resolver.ts";
import { Route } from "deco/flags/audience.ts";
import { ConnInfo } from "std/http/server.ts";

const isPage = (handler: Resolvable<Handler>) =>
Expand Down
2 changes: 1 addition & 1 deletion import_map.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"imports": {
"deco-sites/std/": "./",
"$live/": "https://denopkg.com/deco-cx/live@1.31.12/",
"deco/": "https://denopkg.com/deco-cx/deco@1.34.6/",
"partytown/": "https://deno.land/x/[email protected]/",
"$fresh/": "https://denopkg.com/deco-cx/[email protected]/",
"preact": "https://esm.sh/[email protected]",
Expand Down
Loading

0 comments on commit 5183f8f

Please sign in to comment.