@shopify/cli-hydrogen 5.0.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/hydrogen/build.js +16 -2
- package/dist/commands/hydrogen/codegen-unstable.js +13 -24
- package/dist/commands/hydrogen/dev.js +45 -39
- package/dist/commands/hydrogen/env/list.js +25 -24
- package/dist/commands/hydrogen/env/list.test.js +46 -43
- package/dist/commands/hydrogen/env/pull.js +53 -25
- package/dist/commands/hydrogen/env/pull.test.js +123 -42
- package/dist/commands/hydrogen/generate/route.js +31 -132
- package/dist/commands/hydrogen/generate/route.test.js +34 -126
- package/dist/commands/hydrogen/init.js +46 -127
- package/dist/commands/hydrogen/init.test.js +352 -100
- package/dist/commands/hydrogen/link.js +70 -69
- package/dist/commands/hydrogen/link.test.js +72 -107
- package/dist/commands/hydrogen/list.js +22 -12
- package/dist/commands/hydrogen/list.test.js +51 -48
- package/dist/commands/hydrogen/login.js +31 -0
- package/dist/commands/hydrogen/logout.js +21 -0
- package/dist/commands/hydrogen/setup/css.js +79 -0
- package/dist/commands/hydrogen/setup/markets.js +53 -0
- package/dist/commands/hydrogen/setup.js +133 -0
- package/dist/commands/hydrogen/shortcut.js +2 -45
- package/dist/commands/hydrogen/shortcut.test.js +10 -37
- package/dist/generator-templates/assets/css-modules/package.json +6 -0
- package/dist/generator-templates/assets/postcss/package.json +10 -0
- package/dist/generator-templates/assets/postcss/postcss.config.js +8 -0
- package/dist/generator-templates/assets/tailwind/package.json +13 -0
- package/dist/generator-templates/assets/tailwind/postcss.config.js +10 -0
- package/dist/generator-templates/assets/tailwind/tailwind.config.js +8 -0
- package/dist/generator-templates/assets/tailwind/tailwind.css +3 -0
- package/dist/generator-templates/assets/vanilla-extract/package.json +9 -0
- package/dist/generator-templates/starter/.eslintignore +5 -0
- package/dist/generator-templates/starter/.eslintrc.js +18 -0
- package/dist/generator-templates/starter/.graphqlrc.yml +1 -0
- package/dist/generator-templates/starter/README.md +40 -0
- package/dist/generator-templates/starter/app/components/Aside.tsx +47 -0
- package/dist/generator-templates/starter/app/components/Cart.tsx +340 -0
- package/dist/generator-templates/starter/app/components/Footer.tsx +99 -0
- package/dist/generator-templates/starter/app/components/Header.tsx +178 -0
- package/dist/generator-templates/starter/app/components/Layout.tsx +95 -0
- package/dist/generator-templates/starter/app/components/Search.tsx +480 -0
- package/dist/generator-templates/starter/app/entry.client.tsx +12 -0
- package/dist/generator-templates/starter/app/entry.server.tsx +33 -0
- package/dist/generator-templates/starter/app/root.tsx +270 -0
- package/dist/generator-templates/starter/app/routes/$.tsx +7 -0
- package/dist/generator-templates/{routes → starter/app/routes}/[robots.txt].tsx +47 -69
- package/dist/generator-templates/starter/app/routes/[sitemap.xml].tsx +174 -0
- package/dist/generator-templates/starter/app/routes/_index.tsx +145 -0
- package/dist/generator-templates/starter/app/routes/account.$.tsx +9 -0
- package/dist/generator-templates/starter/app/routes/account.addresses.tsx +563 -0
- package/dist/generator-templates/starter/app/routes/account.orders.$id.tsx +309 -0
- package/dist/generator-templates/starter/app/routes/account.orders._index.tsx +196 -0
- package/dist/generator-templates/starter/app/routes/account.profile.tsx +289 -0
- package/dist/generator-templates/starter/app/routes/account.tsx +203 -0
- package/dist/generator-templates/starter/app/routes/account_.activate.$id.$activationToken.tsx +157 -0
- package/dist/generator-templates/starter/app/routes/account_.login.tsx +143 -0
- package/dist/generator-templates/starter/app/routes/account_.logout.tsx +33 -0
- package/dist/generator-templates/starter/app/routes/account_.recover.tsx +124 -0
- package/dist/generator-templates/starter/app/routes/account_.register.tsx +207 -0
- package/dist/generator-templates/starter/app/routes/account_.reset.$id.$resetToken.tsx +136 -0
- package/dist/generator-templates/starter/app/routes/api.predictive-search.tsx +342 -0
- package/dist/generator-templates/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +88 -0
- package/dist/generator-templates/starter/app/routes/blogs.$blogHandle._index.tsx +162 -0
- package/dist/generator-templates/starter/app/routes/blogs._index.tsx +94 -0
- package/dist/generator-templates/starter/app/routes/cart.tsx +104 -0
- package/dist/generator-templates/starter/app/routes/collections.$handle.tsx +184 -0
- package/dist/generator-templates/starter/app/routes/collections._index.tsx +120 -0
- package/dist/generator-templates/starter/app/routes/pages.$handle.tsx +57 -0
- package/dist/generator-templates/starter/app/routes/policies.$handle.tsx +94 -0
- package/dist/generator-templates/starter/app/routes/policies._index.tsx +63 -0
- package/dist/generator-templates/starter/app/routes/products.$handle.tsx +418 -0
- package/dist/generator-templates/starter/app/routes/search.tsx +168 -0
- package/dist/generator-templates/starter/app/styles/app.css +473 -0
- package/dist/generator-templates/starter/app/styles/reset.css +129 -0
- package/dist/generator-templates/starter/app/utils.ts +46 -0
- package/dist/generator-templates/starter/package.json +43 -0
- package/dist/generator-templates/starter/public/favicon.svg +28 -0
- package/dist/generator-templates/starter/remix.config.js +26 -0
- package/dist/generator-templates/starter/remix.env.d.ts +39 -0
- package/dist/generator-templates/starter/server.ts +253 -0
- package/dist/generator-templates/starter/storefrontapi.generated.d.ts +1906 -0
- package/dist/generator-templates/starter/tsconfig.json +22 -0
- package/dist/lib/auth.js +123 -0
- package/dist/lib/auth.test.js +157 -0
- package/dist/lib/build.js +51 -0
- package/dist/lib/check-version.js +3 -3
- package/dist/lib/check-version.test.js +24 -0
- package/dist/lib/codegen.js +26 -17
- package/dist/lib/environment-variables.js +68 -0
- package/dist/lib/environment-variables.test.js +147 -0
- package/dist/lib/file.js +41 -0
- package/dist/lib/file.test.js +69 -0
- package/dist/lib/flags.js +39 -2
- package/dist/lib/format-code.js +26 -0
- package/dist/lib/gid.js +12 -0
- package/dist/lib/{graphql.test.js → gid.test.js} +1 -1
- package/dist/lib/graphql/admin/client.js +27 -0
- package/dist/lib/graphql/admin/client.test.js +51 -0
- package/dist/lib/graphql/admin/create-storefront.js +13 -15
- package/dist/lib/graphql/admin/create-storefront.test.js +64 -0
- package/dist/lib/graphql/admin/fetch-job.js +6 -15
- package/dist/lib/graphql/admin/link-storefront.js +7 -11
- package/dist/lib/graphql/admin/link-storefront.test.js +38 -0
- package/dist/lib/graphql/admin/list-environments.js +2 -2
- package/dist/lib/graphql/admin/list-environments.test.js +44 -0
- package/dist/lib/graphql/admin/list-storefronts.js +7 -11
- package/dist/lib/graphql/admin/list-storefronts.test.js +44 -0
- package/dist/lib/graphql/admin/pull-variables.js +3 -3
- package/dist/lib/graphql/admin/pull-variables.test.js +37 -0
- package/dist/lib/graphql/business-platform/user-account.js +83 -0
- package/dist/lib/graphql/business-platform/user-account.test.js +80 -0
- package/dist/lib/log.js +185 -9
- package/dist/lib/log.test.js +92 -0
- package/dist/lib/mini-oxygen.js +19 -9
- package/dist/lib/missing-routes.js +0 -2
- package/dist/lib/onboarding/common.js +456 -0
- package/dist/lib/onboarding/index.js +2 -0
- package/dist/lib/onboarding/local.js +229 -0
- package/dist/lib/onboarding/remote.js +89 -0
- package/dist/lib/remix-version-interop.js +5 -5
- package/dist/lib/remix-version-interop.test.js +11 -1
- package/dist/lib/render-errors.js +13 -11
- package/dist/lib/setups/css/assets.js +89 -0
- package/dist/lib/setups/css/css-modules.js +22 -0
- package/dist/lib/setups/css/index.js +44 -0
- package/dist/lib/setups/css/postcss.js +34 -0
- package/dist/lib/setups/css/replacers.js +137 -0
- package/dist/lib/setups/css/tailwind.js +54 -0
- package/dist/lib/setups/css/vanilla-extract.js +22 -0
- package/dist/lib/setups/i18n/domains.test.js +25 -0
- package/dist/lib/setups/i18n/index.js +46 -0
- package/dist/lib/setups/i18n/replacers.js +227 -0
- package/dist/lib/setups/i18n/subdomains.test.js +25 -0
- package/dist/lib/setups/i18n/subfolders.test.js +25 -0
- package/dist/lib/setups/i18n/templates/domains.js +14 -0
- package/dist/lib/setups/i18n/templates/domains.ts +25 -0
- package/dist/lib/setups/i18n/templates/subdomains.js +14 -0
- package/dist/lib/setups/i18n/templates/subdomains.ts +24 -0
- package/dist/lib/setups/i18n/templates/subfolders.js +14 -0
- package/dist/lib/setups/i18n/templates/subfolders.ts +28 -0
- package/dist/lib/setups/routes/generate.js +244 -0
- package/dist/lib/setups/routes/generate.test.js +313 -0
- package/dist/lib/shell.js +52 -5
- package/dist/lib/shell.test.js +42 -16
- package/dist/lib/shopify-config.js +23 -18
- package/dist/lib/shopify-config.test.js +63 -73
- package/dist/lib/template-downloader.js +9 -7
- package/dist/lib/transpile-ts.js +9 -29
- package/dist/virtual-routes/routes/index.jsx +40 -19
- package/oclif.manifest.json +710 -1
- package/package.json +16 -16
- package/dist/commands/hydrogen/build.d.ts +0 -23
- package/dist/commands/hydrogen/check.d.ts +0 -15
- package/dist/commands/hydrogen/codegen-unstable.d.ts +0 -15
- package/dist/commands/hydrogen/dev.d.ts +0 -21
- package/dist/commands/hydrogen/env/list.d.ts +0 -18
- package/dist/commands/hydrogen/env/pull.d.ts +0 -22
- package/dist/commands/hydrogen/g.d.ts +0 -10
- package/dist/commands/hydrogen/generate/route.d.ts +0 -32
- package/dist/commands/hydrogen/generate/route.test.d.ts +0 -1
- package/dist/commands/hydrogen/generate/routes.d.ts +0 -16
- package/dist/commands/hydrogen/init.d.ts +0 -24
- package/dist/commands/hydrogen/init.test.d.ts +0 -1
- package/dist/commands/hydrogen/link.d.ts +0 -23
- package/dist/commands/hydrogen/link.test.d.ts +0 -1
- package/dist/commands/hydrogen/list.d.ts +0 -21
- package/dist/commands/hydrogen/list.test.d.ts +0 -1
- package/dist/commands/hydrogen/preview.d.ts +0 -17
- package/dist/commands/hydrogen/shortcut.d.ts +0 -9
- package/dist/commands/hydrogen/shortcut.test.d.ts +0 -1
- package/dist/commands/hydrogen/unlink.d.ts +0 -16
- package/dist/commands/hydrogen/unlink.test.d.ts +0 -1
- package/dist/create-app.d.ts +0 -1
- package/dist/generator-templates/routes/[sitemap.xml].tsx +0 -235
- package/dist/generator-templates/routes/account/login.tsx +0 -103
- package/dist/generator-templates/routes/account/register.tsx +0 -103
- package/dist/generator-templates/routes/cart.tsx +0 -81
- package/dist/generator-templates/routes/collections/$collectionHandle.tsx +0 -104
- package/dist/generator-templates/routes/collections/index.tsx +0 -102
- package/dist/generator-templates/routes/graphiql.tsx +0 -10
- package/dist/generator-templates/routes/index.tsx +0 -40
- package/dist/generator-templates/routes/pages/$pageHandle.tsx +0 -112
- package/dist/generator-templates/routes/policies/$policyHandle.tsx +0 -140
- package/dist/generator-templates/routes/policies/index.tsx +0 -117
- package/dist/generator-templates/routes/products/$productHandle.tsx +0 -92
- package/dist/hooks/init.d.ts +0 -5
- package/dist/lib/admin-session.d.ts +0 -6
- package/dist/lib/admin-session.js +0 -16
- package/dist/lib/admin-session.test.d.ts +0 -1
- package/dist/lib/admin-session.test.js +0 -27
- package/dist/lib/admin-urls.d.ts +0 -8
- package/dist/lib/check-lockfile.d.ts +0 -3
- package/dist/lib/check-lockfile.test.d.ts +0 -1
- package/dist/lib/check-version.d.ts +0 -16
- package/dist/lib/check-version.test.d.ts +0 -1
- package/dist/lib/codegen.d.ts +0 -26
- package/dist/lib/combined-environment-variables.d.ts +0 -8
- package/dist/lib/combined-environment-variables.js +0 -57
- package/dist/lib/combined-environment-variables.test.d.ts +0 -1
- package/dist/lib/combined-environment-variables.test.js +0 -111
- package/dist/lib/config.d.ts +0 -20
- package/dist/lib/flags.d.ts +0 -27
- package/dist/lib/flags.test.d.ts +0 -1
- package/dist/lib/graphql/admin/create-storefront.d.ts +0 -17
- package/dist/lib/graphql/admin/fetch-job.d.ts +0 -23
- package/dist/lib/graphql/admin/link-storefront.d.ts +0 -14
- package/dist/lib/graphql/admin/list-environments.d.ts +0 -21
- package/dist/lib/graphql/admin/list-storefronts.d.ts +0 -25
- package/dist/lib/graphql/admin/pull-variables.d.ts +0 -21
- package/dist/lib/graphql.d.ts +0 -21
- package/dist/lib/graphql.js +0 -18
- package/dist/lib/graphql.test.d.ts +0 -1
- package/dist/lib/log.d.ts +0 -6
- package/dist/lib/mini-oxygen.d.ts +0 -22
- package/dist/lib/missing-routes.d.ts +0 -8
- package/dist/lib/missing-routes.test.d.ts +0 -1
- package/dist/lib/missing-storefronts.d.ts +0 -5
- package/dist/lib/missing-storefronts.js +0 -18
- package/dist/lib/process.d.ts +0 -6
- package/dist/lib/pull-environment-variables.d.ts +0 -20
- package/dist/lib/pull-environment-variables.js +0 -57
- package/dist/lib/pull-environment-variables.test.d.ts +0 -1
- package/dist/lib/pull-environment-variables.test.js +0 -174
- package/dist/lib/remix-version-interop.d.ts +0 -11
- package/dist/lib/remix-version-interop.test.d.ts +0 -1
- package/dist/lib/render-errors.d.ts +0 -16
- package/dist/lib/shell.d.ts +0 -11
- package/dist/lib/shell.test.d.ts +0 -1
- package/dist/lib/shop.d.ts +0 -7
- package/dist/lib/shop.js +0 -32
- package/dist/lib/shop.test.d.ts +0 -1
- package/dist/lib/shop.test.js +0 -78
- package/dist/lib/shopify-config.d.ts +0 -35
- package/dist/lib/shopify-config.test.d.ts +0 -1
- package/dist/lib/string.d.ts +0 -3
- package/dist/lib/string.test.d.ts +0 -1
- package/dist/lib/template-downloader.d.ts +0 -6
- package/dist/lib/transpile-ts.d.ts +0 -16
- package/dist/lib/user-errors.d.ts +0 -9
- package/dist/lib/user-errors.js +0 -11
- package/dist/lib/virtual-routes.d.ts +0 -7
- package/dist/lib/virtual-routes.test.d.ts +0 -1
- /package/dist/{commands/hydrogen/env/list.test.d.ts → lib/setups/css/common.js} +0 -0
- /package/dist/{commands/hydrogen/env/pull.test.d.ts → lib/setups/i18n/mock-i18n-types.js} +0 -0
package/dist/lib/shop.test.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { vi, describe, beforeEach, afterEach, it, expect } from 'vitest';
|
|
2
|
-
import { inTemporaryDirectory } from '@shopify/cli-kit/node/fs';
|
|
3
|
-
import { AbortError } from '@shopify/cli-kit/node/error';
|
|
4
|
-
import { mockAndCaptureOutput } from '@shopify/cli-kit/node/testing/output';
|
|
5
|
-
import { renderTextPrompt } from '@shopify/cli-kit/node/ui';
|
|
6
|
-
import { getHydrogenShop } from './shop.js';
|
|
7
|
-
import { getConfig, setShop } from './shopify-config.js';
|
|
8
|
-
|
|
9
|
-
vi.mock("@shopify/cli-kit/node/ui");
|
|
10
|
-
vi.mock("./shopify-config.js");
|
|
11
|
-
describe("getHydrogenShop()", () => {
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
vi.mocked(getConfig).mockResolvedValue({});
|
|
14
|
-
});
|
|
15
|
-
afterEach(() => {
|
|
16
|
-
mockAndCaptureOutput().clear();
|
|
17
|
-
vi.clearAllMocks();
|
|
18
|
-
});
|
|
19
|
-
describe("when a shop is passed via flag", () => {
|
|
20
|
-
it("returns the shop", async () => {
|
|
21
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
22
|
-
const shop = await getHydrogenShop({ shop: "my-shop", path: tmpDir });
|
|
23
|
-
expect(shop).toBe("my-shop");
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
describe("when a shop is not provided via flag", () => {
|
|
28
|
-
describe("and there is no existing SHOP_NAME file", () => {
|
|
29
|
-
it("prompts the user to enter a new name", async () => {
|
|
30
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
31
|
-
vi.mocked(renderTextPrompt).mockResolvedValue("my-prompted-shop");
|
|
32
|
-
const shop = await getHydrogenShop({ path: tmpDir });
|
|
33
|
-
expect(renderTextPrompt).toHaveBeenCalledWith({
|
|
34
|
-
message: "Specify which Shop you would like to use (e.g. janes-goods.myshopify.com)",
|
|
35
|
-
allowEmpty: false
|
|
36
|
-
});
|
|
37
|
-
expect(shop).toBe("my-prompted-shop");
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
describe("and the user does not enter a value", () => {
|
|
41
|
-
it("throws an error", async () => {
|
|
42
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
43
|
-
vi.mocked(renderTextPrompt).mockResolvedValue("");
|
|
44
|
-
await expect(getHydrogenShop({ path: tmpDir })).rejects.toThrow(
|
|
45
|
-
AbortError
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe("and there is an existing shop from the config file", () => {
|
|
52
|
-
it("returns the shop", async () => {
|
|
53
|
-
vi.mocked(getConfig).mockResolvedValue({ shop: "previous-shop" });
|
|
54
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
55
|
-
const shop = await getHydrogenShop({ path: tmpDir });
|
|
56
|
-
expect(shop).toBe("previous-shop");
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
describe("when the SHOP_NAME file does not exist", () => {
|
|
62
|
-
it("gets created", async () => {
|
|
63
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
64
|
-
await getHydrogenShop({ shop: "new-shop", path: tmpDir });
|
|
65
|
-
expect(setShop).toHaveBeenCalledWith(tmpDir, "new-shop");
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
describe("when the shop is different from the value in SHOP_NAME", () => {
|
|
70
|
-
it("overwrites SHOP_NAME with the new value", async () => {
|
|
71
|
-
vi.mocked(getConfig).mockResolvedValue({ shop: "previous-shop" });
|
|
72
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
73
|
-
await getHydrogenShop({ shop: "new-shop", path: tmpDir });
|
|
74
|
-
expect(setShop).toHaveBeenCalledWith(tmpDir, "new-shop");
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
declare const SHOPIFY_DIR = ".shopify";
|
|
2
|
-
declare const SHOPIFY_DIR_PROJECT = "project.json";
|
|
3
|
-
interface Storefront {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
}
|
|
7
|
-
interface ShopifyConfig {
|
|
8
|
-
shop?: string;
|
|
9
|
-
storefront?: Storefront;
|
|
10
|
-
}
|
|
11
|
-
declare function getConfig(root: string): Promise<ShopifyConfig>;
|
|
12
|
-
declare function setShop(root: string, shop: string): Promise<ShopifyConfig>;
|
|
13
|
-
/**
|
|
14
|
-
* Adds storefront information to the config
|
|
15
|
-
*
|
|
16
|
-
* @param root the target directory
|
|
17
|
-
* @returns the updated config
|
|
18
|
-
*/
|
|
19
|
-
declare function setStorefront(root: string, { id, title }: Storefront): Promise<ShopifyConfig>;
|
|
20
|
-
/**
|
|
21
|
-
* Removes storefront information from the config
|
|
22
|
-
*
|
|
23
|
-
* @param root the target directory
|
|
24
|
-
* @returns the updated config
|
|
25
|
-
*/
|
|
26
|
-
declare function unsetStorefront(root: string): Promise<ShopifyConfig>;
|
|
27
|
-
/**
|
|
28
|
-
* Conditionally adds .shopify to the directory's .gitignore file
|
|
29
|
-
* @param root
|
|
30
|
-
* @returns A boolean; true if the .gitignore was updated, false if there was
|
|
31
|
-
* an error or the .gitignore didn't need updating
|
|
32
|
-
*/
|
|
33
|
-
declare function ensureShopifyGitIgnore(root: string): Promise<boolean>;
|
|
34
|
-
|
|
35
|
-
export { SHOPIFY_DIR, SHOPIFY_DIR_PROJECT, ShopifyConfig, ensureShopifyGitIgnore, getConfig, setShop, setStorefront, unsetStorefront };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/lib/string.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import prettier, { Options } from 'prettier';
|
|
2
|
-
import ts, { CompilerOptions } from 'typescript';
|
|
3
|
-
|
|
4
|
-
declare function transpileFile(code: string, config?: Omit<ts.CompilerOptions, "target">): string;
|
|
5
|
-
declare function resolveFormatConfig(filePath?: string): Promise<prettier.Options>;
|
|
6
|
-
declare function format(content: string, config: Options, filePath?: string): string;
|
|
7
|
-
declare function convertConfigToJS(tsConfig: {
|
|
8
|
-
include?: string[];
|
|
9
|
-
compilerOptions?: CompilerOptions;
|
|
10
|
-
}): {
|
|
11
|
-
include?: string[] | undefined;
|
|
12
|
-
compilerOptions?: ts.CompilerOptions | undefined;
|
|
13
|
-
};
|
|
14
|
-
declare function transpileProject(projectDir: string): Promise<void>;
|
|
15
|
-
|
|
16
|
-
export { convertConfigToJS, format, resolveFormatConfig, transpileFile, transpileProject };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface UserError {
|
|
2
|
-
code: string | undefined;
|
|
3
|
-
field: string[];
|
|
4
|
-
message: string;
|
|
5
|
-
}
|
|
6
|
-
declare function renderUserErrors(userErrors: UserError[]): void;
|
|
7
|
-
declare function renderError(message: string): void;
|
|
8
|
-
|
|
9
|
-
export { UserError, renderError, renderUserErrors };
|
package/dist/lib/user-errors.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AbortError } from '@shopify/cli-kit/node/error';
|
|
2
|
-
|
|
3
|
-
function renderUserErrors(userErrors) {
|
|
4
|
-
const errorMessages = userErrors.map(({ message }) => message).join(", ");
|
|
5
|
-
renderError(errorMessages);
|
|
6
|
-
}
|
|
7
|
-
function renderError(message) {
|
|
8
|
-
throw new AbortError(message);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { renderError, renderUserErrors };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RemixConfig } from '@remix-run/dev/dist/config.js';
|
|
2
|
-
|
|
3
|
-
declare const VIRTUAL_ROUTES_DIR = "virtual-routes/routes";
|
|
4
|
-
declare const VIRTUAL_ROOT = "virtual-routes/virtual-root";
|
|
5
|
-
declare function addVirtualRoutes(config: RemixConfig): Promise<RemixConfig>;
|
|
6
|
-
|
|
7
|
-
export { VIRTUAL_ROOT, VIRTUAL_ROUTES_DIR, addVirtualRoutes };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
File without changes
|
|
File without changes
|