@fakeware/core 0.0.2 → 0.0.4
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/config/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ declare const mediaSchema: z.ZodObject<{
|
|
|
13
13
|
max: z.ZodNumber;
|
|
14
14
|
}, z.core.$strip>>;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
|
-
declare const pluginRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>], null
|
|
16
|
+
declare const pluginRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>;
|
|
17
17
|
declare const fakewareConfigSchema: z.ZodObject<{
|
|
18
18
|
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
19
19
|
shopware: z.ZodObject<{
|
|
@@ -34,7 +34,7 @@ declare const fakewareConfigSchema: z.ZodObject<{
|
|
|
34
34
|
}, z.core.$strip>>;
|
|
35
35
|
scenario: z.ZodOptional<z.ZodString>;
|
|
36
36
|
scenarios: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
-
plugins: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>], null
|
|
37
|
+
plugins: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>>>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
type FakewareConfig = z.output<typeof fakewareConfigSchema>;
|
|
40
40
|
type FakewareUserConfig = z.input<typeof fakewareConfigSchema>;
|
package/dist/config/index.mjs
CHANGED
|
@@ -17,11 +17,7 @@ const mediaSchema = z.object({
|
|
|
17
17
|
max: z.number().int().nonnegative()
|
|
18
18
|
}).optional()
|
|
19
19
|
});
|
|
20
|
-
const pluginRefSchema = z.union([
|
|
21
|
-
z.string(),
|
|
22
|
-
z.tuple([z.string(), z.record(z.string(), z.unknown())]),
|
|
23
|
-
z.unknown()
|
|
24
|
-
]);
|
|
20
|
+
const pluginRefSchema = z.union([z.string(), z.tuple([z.string(), z.record(z.string(), z.unknown())])]);
|
|
25
21
|
const fakewareConfigSchema = z.object({
|
|
26
22
|
extends: z.union([z.string(), z.array(z.string())]).optional(),
|
|
27
23
|
shopware: shopwareSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/config/define.ts","../../src/config/schema.ts"],"sourcesContent":["import type { FakewareUserConfig } from './schema'\n\nexport interface ConfigEnv {\n env: Record<string, string | undefined>\n mode: string\n}\n\nexport type FakewareConfigFn = (env: ConfigEnv) => FakewareUserConfig\n\nexport function defineConfig(config: FakewareUserConfig): FakewareUserConfig\nexport function defineConfig(config: FakewareConfigFn): FakewareConfigFn\nexport function defineConfig(\n config: FakewareUserConfig | FakewareConfigFn,\n): FakewareUserConfig | FakewareConfigFn {\n return config\n}\n","import { z } from 'zod'\n\nexport const shopwareSchema = z.object({\n url: z.string().min(1, 'shopware.url is required'),\n clientId: z.string().min(1, 'shopware.clientId is required'),\n clientSecret: z.string().min(1, 'shopware.clientSecret is required'),\n})\n\nexport const mediaSchema = z.object({\n provider: z.string(),\n perProduct: z\n .object({\n min: z.number().int().nonnegative(),\n max: z.number().int().nonnegative(),\n })\n .optional(),\n})\n\nexport const pluginRefSchema = z.union([\n z.string(),\n z.tuple([z.string(), z.record(z.string(), z.unknown())]),\n
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/config/define.ts","../../src/config/schema.ts"],"sourcesContent":["import type { FakewareUserConfig } from './schema'\n\nexport interface ConfigEnv {\n env: Record<string, string | undefined>\n mode: string\n}\n\nexport type FakewareConfigFn = (env: ConfigEnv) => FakewareUserConfig\n\nexport function defineConfig(config: FakewareUserConfig): FakewareUserConfig\nexport function defineConfig(config: FakewareConfigFn): FakewareConfigFn\nexport function defineConfig(\n config: FakewareUserConfig | FakewareConfigFn,\n): FakewareUserConfig | FakewareConfigFn {\n return config\n}\n","import { z } from 'zod'\n\nexport const shopwareSchema = z.object({\n url: z.string().min(1, 'shopware.url is required'),\n clientId: z.string().min(1, 'shopware.clientId is required'),\n clientSecret: z.string().min(1, 'shopware.clientSecret is required'),\n})\n\nexport const mediaSchema = z.object({\n provider: z.string(),\n perProduct: z\n .object({\n min: z.number().int().nonnegative(),\n max: z.number().int().nonnegative(),\n })\n .optional(),\n})\n\nexport const pluginRefSchema = z.union([\n z.string(),\n z.tuple([z.string(), z.record(z.string(), z.unknown())]),\n])\n\nexport const fakewareConfigSchema = z.object({\n extends: z.union([z.string(), z.array(z.string())]).optional(),\n shopware: shopwareSchema,\n locale: z.string().optional(),\n seed: z.string().optional(),\n batchSize: z.number().int().positive().default(100),\n generators: z.record(z.string(), z.unknown()).default({}),\n media: mediaSchema.optional(),\n scenario: z.string().optional(),\n scenarios: z.record(z.string(), z.unknown()).default({}),\n plugins: z.array(pluginRefSchema).default([]),\n})\n\nexport type FakewareConfig = z.output<typeof fakewareConfigSchema>\n\nexport type FakewareUserConfig = z.input<typeof fakewareConfigSchema>\n"],"mappings":";;AAWA,SAAgB,aACd,QACuC;CACvC,OAAO;AACT;;;ACbA,MAAa,iBAAiB,EAAE,OAAO;CACrC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,0BAA0B;CACjD,UAAU,EAAE,OAAO,EAAE,IAAI,GAAG,+BAA+B;CAC3D,cAAc,EAAE,OAAO,EAAE,IAAI,GAAG,mCAAmC;AACrE,CAAC;AAED,MAAa,cAAc,EAAE,OAAO;CAClC,UAAU,EAAE,OAAO;CACnB,YAAY,EACT,OAAO;EACN,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY;EAClC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY;CACpC,CAAC,EACA,SAAS;AACd,CAAC;AAED,MAAa,kBAAkB,EAAE,MAAM,CACrC,EAAE,OAAO,GACT,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CACzD,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO;CAC3C,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS;CAC7D,UAAU;CACV,QAAQ,EAAE,OAAO,EAAE,SAAS;CAC5B,MAAM,EAAE,OAAO,EAAE,SAAS;CAC1B,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,GAAG;CAClD,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;CACxD,OAAO,YAAY,SAAS;CAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;CAC9B,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;CACvD,SAAS,EAAE,MAAM,eAAe,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createAdminAPIClient } from "@shopware/api-client";
|
|
2
|
+
import { operations } from "@shopware/api-client/admin-api-types";
|
|
3
|
+
|
|
4
|
+
//#region src/shopware/types.d.ts
|
|
5
|
+
interface ShopwareConnection {
|
|
6
|
+
url: string;
|
|
7
|
+
clientId: string;
|
|
8
|
+
clientSecret: string;
|
|
9
|
+
}
|
|
10
|
+
interface ShopInfo {
|
|
11
|
+
locales: string[];
|
|
12
|
+
defaultLocale: string;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/shopware/client.d.ts
|
|
16
|
+
type ShopwareClient = ReturnType<typeof createAdminAPIClient<operations>>;
|
|
17
|
+
declare function createShopwareClient(connection: ShopwareConnection): ShopwareClient;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/shopware/errors.d.ts
|
|
20
|
+
declare class ShopwareConnectionError extends Error {}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/shopware/operations.d.ts
|
|
23
|
+
declare function validateConnection(connection: ShopwareConnection): Promise<void>;
|
|
24
|
+
declare function fetchShopInfo(connection: ShopwareConnection): Promise<ShopInfo>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { type ShopInfo, type ShopwareClient, type ShopwareConnection, ShopwareConnectionError, createShopwareClient, fetchShopInfo, validateConnection };
|
|
27
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ApiClientError, createAdminAPIClient } from "@shopware/api-client";
|
|
2
|
+
//#region src/shopware/client.ts
|
|
3
|
+
function createShopwareClient(connection) {
|
|
4
|
+
return createAdminAPIClient({
|
|
5
|
+
baseURL: `${connection.url.replace(/\/$/, "")}/api`,
|
|
6
|
+
credentials: {
|
|
7
|
+
grant_type: "client_credentials",
|
|
8
|
+
client_id: connection.clientId,
|
|
9
|
+
client_secret: connection.clientSecret
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/shopware/errors.ts
|
|
15
|
+
var ShopwareConnectionError = class extends Error {};
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/shopware/locale.ts
|
|
18
|
+
const SYSTEM_LANGUAGE_ID = "2fbb5fe2e29a4d70aa5854ce7ce3e20b";
|
|
19
|
+
function toShopInfo(rows) {
|
|
20
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21
|
+
const locales = [];
|
|
22
|
+
let systemLocale;
|
|
23
|
+
for (const row of rows) {
|
|
24
|
+
const code = row.locale?.code;
|
|
25
|
+
if (!code) continue;
|
|
26
|
+
if (row.id === SYSTEM_LANGUAGE_ID) systemLocale = code;
|
|
27
|
+
if (!seen.has(code)) {
|
|
28
|
+
seen.add(code);
|
|
29
|
+
locales.push(code);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (locales.length === 0) throw new ShopwareConnectionError("Shopware returned no usable locales.");
|
|
33
|
+
return {
|
|
34
|
+
locales,
|
|
35
|
+
defaultLocale: systemLocale ?? locales[0]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/shopware/operations.ts
|
|
40
|
+
function safeJsonParse(input) {
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(input);
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function missingPrivileges(error) {
|
|
48
|
+
for (const e of error.details.errors) {
|
|
49
|
+
if (e.code !== "FRAMEWORK__MISSING_PRIVILEGE_ERROR" || !e.detail) continue;
|
|
50
|
+
const parsed = safeJsonParse(e.detail);
|
|
51
|
+
if (parsed?.missingPrivileges?.length) return parsed.missingPrivileges;
|
|
52
|
+
}
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
function toConnectionError(connection, error) {
|
|
56
|
+
if (error instanceof ApiClientError) switch (error.status) {
|
|
57
|
+
case 400:
|
|
58
|
+
case 401: return new ShopwareConnectionError("Authentication failed — check the client ID and client secret of your integration.");
|
|
59
|
+
case 403: {
|
|
60
|
+
const missing = missingPrivileges(error);
|
|
61
|
+
if (missing.length) return new ShopwareConnectionError(`The integration is missing the ${missing.join(", ")} ${missing.length === 1 ? "privilege" : "privileges"} — grant them to its role in Settings → System → Integrations.`);
|
|
62
|
+
return new ShopwareConnectionError("The integration is missing permissions — grant its role admin API access in Settings → System → Integrations.");
|
|
63
|
+
}
|
|
64
|
+
case 404: return new ShopwareConnectionError(`No Shopware admin API found at ${connection.url} — check the shop URL.`);
|
|
65
|
+
default:
|
|
66
|
+
if (error.status >= 500) return new ShopwareConnectionError(`${connection.url} is not responding (HTTP ${error.status}) — the shop may be down or in maintenance.`);
|
|
67
|
+
return new ShopwareConnectionError(`Shopware returned an unexpected response (HTTP ${error.status}) from ${connection.url}.`);
|
|
68
|
+
}
|
|
69
|
+
return new ShopwareConnectionError(`Could not reach ${connection.url} — check the URL and your network connection.`);
|
|
70
|
+
}
|
|
71
|
+
async function validateConnection(connection) {
|
|
72
|
+
const client = createShopwareClient(connection);
|
|
73
|
+
try {
|
|
74
|
+
await client.invoke("infoShopwareVersion get /_info/version");
|
|
75
|
+
} catch (error) {
|
|
76
|
+
throw toConnectionError(connection, error);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async function fetchShopInfo(connection) {
|
|
80
|
+
const client = createShopwareClient(connection);
|
|
81
|
+
try {
|
|
82
|
+
const { data } = await client.invoke("searchLanguage post /search/language", { body: {
|
|
83
|
+
associations: { locale: {} },
|
|
84
|
+
limit: 500
|
|
85
|
+
} });
|
|
86
|
+
return toShopInfo(data.data ?? []);
|
|
87
|
+
} catch (error) {
|
|
88
|
+
throw toConnectionError(connection, error);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { ShopwareConnectionError, createShopwareClient, fetchShopInfo, validateConnection };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/shopware/client.ts","../../src/shopware/errors.ts","../../src/shopware/locale.ts","../../src/shopware/operations.ts"],"sourcesContent":["import { createAdminAPIClient } from '@shopware/api-client'\nimport type { operations } from '@shopware/api-client/admin-api-types'\nimport type { ShopwareConnection } from './types'\n\nexport type ShopwareClient = ReturnType<typeof createAdminAPIClient<operations>>\n\nexport function createShopwareClient(connection: ShopwareConnection): ShopwareClient {\n return createAdminAPIClient<operations>({\n baseURL: `${connection.url.replace(/\\/$/, '')}/api`,\n credentials: {\n grant_type: 'client_credentials',\n client_id: connection.clientId,\n client_secret: connection.clientSecret,\n },\n })\n}\n","export class ShopwareConnectionError extends Error {}\n","import { ShopwareConnectionError } from './errors'\nimport type { ShopInfo } from './types'\n\nconst SYSTEM_LANGUAGE_ID = '2fbb5fe2e29a4d70aa5854ce7ce3e20b'\n\nexport interface LanguageRow {\n id: string\n locale?: { code?: string } | null\n}\n\nexport function toShopInfo(rows: LanguageRow[]): ShopInfo {\n const seen = new Set<string>()\n const locales: string[] = []\n let systemLocale: string | undefined\n\n for (const row of rows) {\n const code = row.locale?.code\n if (!code) continue\n if (row.id === SYSTEM_LANGUAGE_ID) systemLocale = code\n if (!seen.has(code)) {\n seen.add(code)\n locales.push(code)\n }\n }\n\n if (locales.length === 0) {\n throw new ShopwareConnectionError('Shopware returned no usable locales.')\n }\n\n return { locales, defaultLocale: systemLocale ?? (locales[0] as string) }\n}\n","import { ApiClientError, type ApiError } from '@shopware/api-client'\nimport { createShopwareClient } from './client'\nimport { ShopwareConnectionError } from './errors'\nimport { type LanguageRow, toShopInfo } from './locale'\nimport type { ShopInfo, ShopwareConnection } from './types'\n\nfunction safeJsonParse<T>(input: string): T | null {\n try {\n return JSON.parse(input) as T\n } catch {\n return null\n }\n}\n\nfunction missingPrivileges(error: ApiClientError<{ errors: ApiError[] }>): string[] {\n for (const e of error.details.errors) {\n if (e.code !== 'FRAMEWORK__MISSING_PRIVILEGE_ERROR' || !e.detail) continue\n const parsed = safeJsonParse<{ missingPrivileges?: string[] }>(e.detail)\n if (parsed?.missingPrivileges?.length) return parsed.missingPrivileges\n }\n return []\n}\n\nfunction toConnectionError(\n connection: ShopwareConnection,\n error: unknown,\n): ShopwareConnectionError {\n if (error instanceof ApiClientError) {\n switch (error.status) {\n case 400:\n case 401:\n return new ShopwareConnectionError(\n 'Authentication failed — check the client ID and client secret of your integration.',\n )\n case 403: {\n const missing = missingPrivileges(error)\n if (missing.length) {\n return new ShopwareConnectionError(\n `The integration is missing the ${missing.join(', ')} ${missing.length === 1 ? 'privilege' : 'privileges'} — grant them to its role in Settings → System → Integrations.`,\n )\n }\n return new ShopwareConnectionError(\n 'The integration is missing permissions — grant its role admin API access in Settings → System → Integrations.',\n )\n }\n case 404:\n return new ShopwareConnectionError(\n `No Shopware admin API found at ${connection.url} — check the shop URL.`,\n )\n default:\n if (error.status >= 500) {\n return new ShopwareConnectionError(\n `${connection.url} is not responding (HTTP ${error.status}) — the shop may be down or in maintenance.`,\n )\n }\n return new ShopwareConnectionError(\n `Shopware returned an unexpected response (HTTP ${error.status}) from ${connection.url}.`,\n )\n }\n }\n return new ShopwareConnectionError(\n `Could not reach ${connection.url} — check the URL and your network connection.`,\n )\n}\n\nexport async function validateConnection(connection: ShopwareConnection): Promise<void> {\n const client = createShopwareClient(connection)\n try {\n await client.invoke('infoShopwareVersion get /_info/version')\n } catch (error) {\n throw toConnectionError(connection, error)\n }\n}\n\nexport async function fetchShopInfo(connection: ShopwareConnection): Promise<ShopInfo> {\n const client = createShopwareClient(connection)\n try {\n const { data } = await client.invoke('searchLanguage post /search/language', {\n body: { associations: { locale: {} }, limit: 500 },\n })\n return toShopInfo((data.data ?? []) as LanguageRow[])\n } catch (error) {\n throw toConnectionError(connection, error)\n }\n}\n"],"mappings":";;AAMA,SAAgB,qBAAqB,YAAgD;CACnF,OAAO,qBAAiC;EACtC,SAAS,GAAG,WAAW,IAAI,QAAQ,OAAO,EAAE,EAAE;EAC9C,aAAa;GACX,YAAY;GACZ,WAAW,WAAW;GACtB,eAAe,WAAW;EAC5B;CACF,CAAC;AACH;;;ACfA,IAAa,0BAAb,cAA6C,MAAM,CAAC;;;ACGpD,MAAM,qBAAqB;AAO3B,SAAgB,WAAW,MAA+B;CACxD,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,UAAoB,CAAC;CAC3B,IAAI;CAEJ,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,OAAO,IAAI,QAAQ;EACzB,IAAI,CAAC,MAAM;EACX,IAAI,IAAI,OAAO,oBAAoB,eAAe;EAClD,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG;GACnB,KAAK,IAAI,IAAI;GACb,QAAQ,KAAK,IAAI;EACnB;CACF;CAEA,IAAI,QAAQ,WAAW,GACrB,MAAM,IAAI,wBAAwB,sCAAsC;CAG1E,OAAO;EAAE;EAAS,eAAe,gBAAiB,QAAQ;CAAc;AAC1E;;;ACxBA,SAAS,cAAiB,OAAyB;CACjD,IAAI;EACF,OAAO,KAAK,MAAM,KAAK;CACzB,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,kBAAkB,OAAyD;CAClF,KAAK,MAAM,KAAK,MAAM,QAAQ,QAAQ;EACpC,IAAI,EAAE,SAAS,wCAAwC,CAAC,EAAE,QAAQ;EAClE,MAAM,SAAS,cAAgD,EAAE,MAAM;EACvE,IAAI,QAAQ,mBAAmB,QAAQ,OAAO,OAAO;CACvD;CACA,OAAO,CAAC;AACV;AAEA,SAAS,kBACP,YACA,OACyB;CACzB,IAAI,iBAAiB,gBACnB,QAAQ,MAAM,QAAd;EACE,KAAK;EACL,KAAK,KACH,OAAO,IAAI,wBACT,oFACF;EACF,KAAK,KAAK;GACR,MAAM,UAAU,kBAAkB,KAAK;GACvC,IAAI,QAAQ,QACV,OAAO,IAAI,wBACT,kCAAkC,QAAQ,KAAK,IAAI,EAAE,GAAG,QAAQ,WAAW,IAAI,cAAc,aAAa,+DAC5G;GAEF,OAAO,IAAI,wBACT,+GACF;EACF;EACA,KAAK,KACH,OAAO,IAAI,wBACT,kCAAkC,WAAW,IAAI,uBACnD;EACF;GACE,IAAI,MAAM,UAAU,KAClB,OAAO,IAAI,wBACT,GAAG,WAAW,IAAI,2BAA2B,MAAM,OAAO,4CAC5D;GAEF,OAAO,IAAI,wBACT,kDAAkD,MAAM,OAAO,SAAS,WAAW,IAAI,EACzF;CACJ;CAEF,OAAO,IAAI,wBACT,mBAAmB,WAAW,IAAI,8CACpC;AACF;AAEA,eAAsB,mBAAmB,YAA+C;CACtF,MAAM,SAAS,qBAAqB,UAAU;CAC9C,IAAI;EACF,MAAM,OAAO,OAAO,wCAAwC;CAC9D,SAAS,OAAO;EACd,MAAM,kBAAkB,YAAY,KAAK;CAC3C;AACF;AAEA,eAAsB,cAAc,YAAmD;CACrF,MAAM,SAAS,qBAAqB,UAAU;CAC9C,IAAI;EACF,MAAM,EAAE,SAAS,MAAM,OAAO,OAAO,wCAAwC,EAC3E,MAAM;GAAE,cAAc,EAAE,QAAQ,CAAC,EAAE;GAAG,OAAO;EAAI,EACnD,CAAC;EACD,OAAO,WAAY,KAAK,QAAQ,CAAC,CAAmB;CACtD,SAAS,OAAO;EACd,MAAM,kBAAkB,YAAY,KAAK;CAC3C;AACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fakeware/core",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Fakeware core library
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "Fakeware core library that is the base for @fakeware/cli",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -19,14 +19,20 @@
|
|
|
19
19
|
"./config": {
|
|
20
20
|
"types": "./dist/config/index.d.mts",
|
|
21
21
|
"import": "./dist/config/index.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./shopware": {
|
|
24
|
+
"types": "./dist/shopware/index.d.mts",
|
|
25
|
+
"import": "./dist/shopware/index.mjs"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
"scripts": {
|
|
29
|
+
"dev": "tsdown --watch",
|
|
25
30
|
"build": "tsdown",
|
|
26
31
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
27
32
|
"test": "bun test"
|
|
28
33
|
},
|
|
29
34
|
"dependencies": {
|
|
35
|
+
"@shopware/api-client": "1.5.0",
|
|
30
36
|
"zod": "4.4.3"
|
|
31
37
|
}
|
|
32
38
|
}
|