cloudcommerce 0.0.31 → 0.0.35
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/CHANGELOG.md +41 -0
- package/action.yml +4 -0
- package/package.json +6 -6
- package/packages/__skeleton/package.json +4 -1
- package/packages/__skeleton/src/{index.js → index.ts} +0 -0
- package/packages/__skeleton/tsconfig.json +3 -0
- package/packages/api/{tests/fetch-polyfill.js → fetch-polyfill.js} +0 -0
- package/packages/api/lib/index.d.ts +2 -112
- package/packages/api/lib/types.d.ts +1 -1
- package/packages/api/package.json +1 -1
- package/packages/api/src/types.ts +4 -0
- package/packages/api/tests/index.test.ts +1 -1
- package/packages/apps/discounts/lib/index.js +4 -0
- package/packages/apps/discounts/lib/index.js.map +1 -0
- package/packages/apps/discounts/package.json +4 -1
- package/packages/apps/discounts/src/index.ts +7 -0
- package/packages/apps/discounts/tsconfig.json +3 -0
- package/packages/cli/lib/index.js +11 -2
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/index.ts +12 -3
- package/packages/firebase/lib/config.d.ts +15 -0
- package/packages/firebase/lib/config.js +3 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/defaults.d.ts +4 -0
- package/packages/firebase/lib/env.d.ts +8 -0
- package/packages/firebase/lib/env.js +19 -0
- package/packages/firebase/lib/env.js.map +1 -0
- package/packages/firebase/lib/handlers/check-store-events.d.ts +2 -0
- package/packages/firebase/lib/handlers/check-store-events.js +31 -0
- package/packages/firebase/lib/handlers/check-store-events.js.map +1 -0
- package/packages/firebase/lib/index.d.ts +5 -0
- package/packages/firebase/lib/index.js +7 -15
- package/packages/firebase/lib/index.js.map +1 -1
- package/packages/firebase/lib/types.d.ts +6 -0
- package/packages/firebase/lib/types.js +0 -1
- package/packages/firebase/lib/types.js.map +1 -1
- package/packages/firebase/package.json +4 -1
- package/packages/firebase/src/config.ts +3 -0
- package/packages/firebase/src/env.ts +30 -0
- package/packages/firebase/src/handlers/check-store-events.ts +31 -0
- package/packages/firebase/src/index.ts +7 -21
- package/packages/firebase/src/types.ts +6 -7
- package/packages/firebase/tsconfig.json +4 -1
- package/packages/modules/CHANGELOG.md +1 -0
- package/packages/modules/README.md +1 -0
- package/packages/modules/lib/firebase/index.js +16 -0
- package/packages/modules/lib/firebase/index.js.map +1 -0
- package/packages/modules/lib/index.js +21 -0
- package/packages/modules/lib/index.js.map +1 -0
- package/packages/modules/package.json +33 -0
- package/packages/modules/schemas/@checkout.cjs +1015 -0
- package/packages/modules/schemas/apply_discount.cjs +324 -0
- package/packages/modules/schemas/calculate_shipping.cjs +666 -0
- package/packages/modules/schemas/create_transaction.cjs +1001 -0
- package/packages/modules/schemas/list_payments.cjs +852 -0
- package/packages/modules/scripts/build-types.sh +33 -0
- package/packages/modules/src/firebase/index.ts +16 -0
- package/packages/modules/src/index.ts +21 -0
- package/packages/modules/tsconfig.json +3 -0
- package/packages/storefront/package.json +2 -2
- package/packages/types/CHANGELOG.md +1 -0
- package/packages/types/README.md +1 -0
- package/packages/types/index.ts +66 -0
- package/packages/types/modules/@checkout:params.d.ts +920 -0
- package/packages/types/modules/apply_discount:params.d.ts +154 -0
- package/packages/types/modules/apply_discount:response.d.ts +71 -0
- package/packages/types/modules/calculate_shipping:params.d.ts +275 -0
- package/packages/types/modules/calculate_shipping:response.d.ts +402 -0
- package/packages/types/modules/create_transaction:params.d.ts +515 -0
- package/packages/types/modules/create_transaction:response.d.ts +261 -0
- package/packages/types/modules/list_payments:params.d.ts +323 -0
- package/packages/types/modules/list_payments:response.d.ts +266 -0
- package/packages/types/package.json +21 -0
- package/pnpm-lock.yaml +505 -274
- package/packages/firebase/lib/methods/check-store-events.js +0 -18
- package/packages/firebase/lib/methods/check-store-events.js.map +0 -1
- package/packages/firebase/src/methods/check-store-events.ts +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.35](https://github.com/ecomplus/cloud-commerce/compare/v0.0.34...v0.0.35) (2022-07-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **modules:** Prevent cyclic dependencies moving types to `@cloudcommerce/types` pkg ([52f46ab](https://github.com/ecomplus/cloud-commerce/commit/52f46ab0332050b8e661e47c400a8084728d47e8))
|
|
11
|
+
|
|
12
|
+
### [0.0.34](https://github.com/ecomplus/cloud-commerce/compare/v0.0.33...v0.0.34) (2022-07-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **cli:** Suggest `npx kill-port` on serve "port taken" error ([99f955e](https://github.com/ecomplus/cloud-commerce/commit/99f955eeb1f11664a988d969c48de217921f35fd))
|
|
18
|
+
* **deps:** Update astro to RC and vite v3 ([4336f81](https://github.com/ecomplus/cloud-commerce/commit/4336f81d18d82654f638ba25fc618d6cb6612f24))
|
|
19
|
+
* **firebase:** Move base functions options (region) to config object ([b691149](https://github.com/ecomplus/cloud-commerce/commit/b691149c3744d56f2f472f86218cf72c4bc56669))
|
|
20
|
+
* GH Action also pass optional `ecom-store-id` input to functions .env ([ed7771f](https://github.com/ecomplus/cloud-commerce/commit/ed7771fe50e987ffff120d4061c5c73f85e3f091))
|
|
21
|
+
* **modules:** Add new `@cloudcommerce/modules` pkg for app modules schema and typedefs [[#29](https://github.com/ecomplus/cloud-commerce/issues/29)] ([a7b833c](https://github.com/ecomplus/cloud-commerce/commit/a7b833c53cc814d89a8137aeb49bc3a41f87a2ce))
|
|
22
|
+
* **modules:** Start setting modules Firebase Functions ([53bb594](https://github.com/ecomplus/cloud-commerce/commit/53bb594585966c56cfa36a8cd35c17e50eb704a7))
|
|
23
|
+
* **types:** Add new `@cloudcommerce/types` pkg for reusable types ([a5ca712](https://github.com/ecomplus/cloud-commerce/commit/a5ca7127c80a48fdbca6fec1c14badfc078f5aa8))
|
|
24
|
+
* **types:** Also exporting modules params and responses type interfaces ([57c207c](https://github.com/ecomplus/cloud-commerce/commit/57c207cb6f7af3c8c0007173cc49859e4ecba1f3))
|
|
25
|
+
* **types:** New `@cloudcommerce/types` pkg with reusable types ([fa59792](https://github.com/ecomplus/cloud-commerce/commit/fa59792ccc322d1b6f23766daefe4278f671775c))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **deps:** Update all non-major dependencies ([#33](https://github.com/ecomplus/cloud-commerce/issues/33)) ([ac90a64](https://github.com/ecomplus/cloud-commerce/commit/ac90a64ca72fda97d30c3b214a801f5947267e12))
|
|
31
|
+
|
|
32
|
+
### [0.0.33](https://github.com/ecomplus/cloud-commerce/compare/v0.0.32...v0.0.33) (2022-07-20)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **firecase:** Add `node-fetch` to pkg deps and import polyfill ([3ddf42f](https://github.com/ecomplus/cloud-commerce/commit/3ddf42f7369e20c1e63f4b6612d1688134556d97))
|
|
38
|
+
|
|
39
|
+
### [0.0.32](https://github.com/ecomplus/cloud-commerce/compare/v0.0.31...v0.0.32) (2022-07-20)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **firebase:** Get `process.env` on function handler only ([2095621](https://github.com/ecomplus/cloud-commerce/commit/209562152d31a4f31104502897af2f2330c3330f))
|
|
45
|
+
|
|
5
46
|
### [0.0.31](https://github.com/ecomplus/cloud-commerce/compare/v0.0.30...v0.0.31) (2022-07-20)
|
|
6
47
|
|
|
7
48
|
|
package/action.yml
CHANGED
|
@@ -14,6 +14,8 @@ inputs:
|
|
|
14
14
|
ecom-api-key:
|
|
15
15
|
description: 'E-Com Plus store API key'
|
|
16
16
|
required: true
|
|
17
|
+
ecom-store-id:
|
|
18
|
+
description: 'Store ID if defined in config.json'
|
|
17
19
|
|
|
18
20
|
outputs: {}
|
|
19
21
|
|
|
@@ -47,11 +49,13 @@ runs:
|
|
|
47
49
|
FIREBASE_SERVICE_ACCOUNT: ${{ inputs.firebase-service-account }}
|
|
48
50
|
ECOM_AUTHENTICATION_ID: ${{ inputs.ecom-authentication-id }}
|
|
49
51
|
ECOM_API_KEY: ${{ inputs.ecom-api-key }}
|
|
52
|
+
ECOM_STORE_ID: ${{ inputs.ecom-store-id }}
|
|
50
53
|
run: |
|
|
51
54
|
export GAC_FILENAME=".gac-$RANDOM.json"
|
|
52
55
|
echo $FIREBASE_SERVICE_ACCOUNT > $GAC_FILENAME
|
|
53
56
|
printf "ECOM_AUTHENTICATION_ID=$ECOM_AUTHENTICATION_ID
|
|
54
57
|
ECOM_API_KEY=$ECOM_API_KEY
|
|
58
|
+
ECOM_STORE_ID=$ECOM_STORE_ID
|
|
55
59
|
GITHUB_TOKEN=$GITHUB_TOKEN
|
|
56
60
|
" > functions/.env
|
|
57
61
|
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
|
|
6
6
|
"main": "packages/api/lib/index.js",
|
|
7
7
|
"author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"@types/node": "^18.0.5",
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
24
24
|
"@typescript-eslint/parser": "^5.30.7",
|
|
25
|
-
"esbuild": "^0.14.
|
|
25
|
+
"esbuild": "^0.14.50",
|
|
26
26
|
"eslint": "^8.20.0",
|
|
27
27
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
28
28
|
"eslint-plugin-import": "^2.26.0",
|
|
29
|
-
"eslint-plugin-vue": "^9.
|
|
29
|
+
"eslint-plugin-vue": "^9.3.0",
|
|
30
30
|
"husky": "^8.0.1",
|
|
31
31
|
"node-fetch": "^3.2.9",
|
|
32
32
|
"standard-version": "^9.5.0",
|
|
33
|
-
"turbo": "^1.3.
|
|
33
|
+
"turbo": "^1.3.4",
|
|
34
34
|
"typescript": "^4.7.4",
|
|
35
|
-
"vite": "
|
|
36
|
-
"vitest": "^0.
|
|
35
|
+
"vite": "3",
|
|
36
|
+
"vitest": "^0.19.1",
|
|
37
37
|
"zx": "^7.0.7"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/ecomplus/cloud-commerce.git",
|
|
@@ -20,5 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@cloudcommerce/types": "workspace:*"
|
|
23
26
|
}
|
|
24
27
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -26,62 +26,7 @@ declare const api: {
|
|
|
26
26
|
}>;
|
|
27
27
|
get: <E extends Endpoint, C extends AbstractedConfig>(endpoint: E, config?: C | undefined) => Promise<Response & {
|
|
28
28
|
config: Config;
|
|
29
|
-
data: E extends `${string}/${string}/${string}` ? any : E extends `products/${string}` ? import("./types").Products : E extends `categories/${string}` ? import("./types").Categories : E extends `brands/${string}` ? import("./types").Brands : E extends `collections/${string}` ? import("./types").Collections : E extends `grids/${string}` ? import("./types").Grids : E extends `carts/${string}` ? import("./types").Carts : E extends `orders/${string}` ? import("./types").Orders : E extends `customers/${string}` ? import("./types").Customers : E extends `stores/${string}` ? import("./types").Stores : E extends `applications/${string}` ? import("./types").Applications : E extends `authentications/${string}` ? import("./types
|
|
30
|
-
result: E extends infer T_1 ? T_1 extends E ? T_1 extends "products" | `products?${string}` ? import("./types").Products[] : T_1 extends "categories" | `categories?${string}` ? import("./types").Categories[] : T_1 extends "brands" | `brands?${string}` ? import("./types").Brands[] : T_1 extends "collections" | `collections?${string}` ? import("./types").Collections[] : T_1 extends "grids" | `grids?${string}` ? import("./types").Grids[] : T_1 extends "carts" | `carts?${string}` ? import("./types").Carts[] : T_1 extends "orders" | `orders?${string}` ? import("./types").Orders[] : T_1 extends "customers" | `customers?${string}` ? import("./types").Customers[] : T_1 extends "stores" | `stores?${string}` ? import("./types").Stores[] : T_1 extends "applications" | `applications?${string}` ? import("./types").Applications[] : T_1 extends "authentications" | `authentications?${string}` ? import("./types/authentications").Authentications[] : never : never : never;
|
|
31
|
-
meta: {
|
|
32
|
-
offset: number;
|
|
33
|
-
limit: number;
|
|
34
|
-
fields: string[];
|
|
35
|
-
} & {
|
|
36
|
-
count?: number | undefined;
|
|
37
|
-
sort: {
|
|
38
|
-
field: string;
|
|
39
|
-
order: 1 | -1;
|
|
40
|
-
}[];
|
|
41
|
-
query: {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
} : E extends "events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${string}` | `events/categories/${string}` | `events/brands/${string}` | `events/collections/${string}` | `events/grids/${string}` | `events/carts/${string}` | `events/orders/${string}` | `events/customers/${string}` | `events/stores/${string}` | `events/applications/${string}` | `events/authentications/${string}` | "events/me" ? {
|
|
46
|
-
result: ({
|
|
47
|
-
timestamp: string;
|
|
48
|
-
store_id?: number | undefined;
|
|
49
|
-
resource?: string | undefined;
|
|
50
|
-
authentication_id?: (string & {
|
|
51
|
-
length: 24;
|
|
52
|
-
}) | null | undefined;
|
|
53
|
-
resource_id?: (string & {
|
|
54
|
-
length: 24;
|
|
55
|
-
}) | undefined;
|
|
56
|
-
action: string;
|
|
57
|
-
modified_fields: string[];
|
|
58
|
-
method?: number | undefined;
|
|
59
|
-
endpoint?: string | undefined;
|
|
60
|
-
body?: any;
|
|
61
|
-
ip?: string | undefined;
|
|
62
|
-
} & (E extends infer T_2 ? T_2 extends E ? T_2 extends "events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" ? {
|
|
63
|
-
resource_id: string & {
|
|
64
|
-
length: 24;
|
|
65
|
-
};
|
|
66
|
-
authentication_id: (string & {
|
|
67
|
-
length: 24;
|
|
68
|
-
}) | null;
|
|
69
|
-
} : T_2 extends `events/products/${string}` | `events/categories/${string}` | `events/brands/${string}` | `events/collections/${string}` | `events/grids/${string}` | `events/carts/${string}` | `events/orders/${string}` | `events/customers/${string}` | `events/stores/${string}` | `events/applications/${string}` | `events/authentications/${string}` ? {
|
|
70
|
-
authentication_id: (string & {
|
|
71
|
-
length: 24;
|
|
72
|
-
}) | null;
|
|
73
|
-
} : T_2 extends "events/me" ? {
|
|
74
|
-
resource: import("./types").Resource;
|
|
75
|
-
resource_id: string & {
|
|
76
|
-
length: 24;
|
|
77
|
-
};
|
|
78
|
-
} : never : never : never))[];
|
|
79
|
-
meta: {
|
|
80
|
-
offset: number;
|
|
81
|
-
limit: number;
|
|
82
|
-
fields: string[];
|
|
83
|
-
};
|
|
84
|
-
} : any;
|
|
29
|
+
data: E extends `${string}/${string}/${string}` ? any : E extends `products/${string}` ? import("./types").Products : E extends `categories/${string}` ? import("./types").Categories : E extends `brands/${string}` ? import("./types").Brands : E extends `collections/${string}` ? import("./types").Collections : E extends `grids/${string}` ? import("./types").Grids : E extends `carts/${string}` ? import("./types").Carts : E extends `orders/${string}` ? import("./types").Orders : E extends `customers/${string}` ? import("./types").Customers : E extends `stores/${string}` ? import("./types").Stores : E extends `applications/${string}` ? import("./types").Applications : E extends `authentications/${string}` ? import("./types").Authentications : E extends ResourceOpQuery ? import("./types").ResourceListResult<E> : E extends "events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${string}` | `events/categories/${string}` | `events/brands/${string}` | `events/collections/${string}` | `events/grids/${string}` | `events/carts/${string}` | `events/orders/${string}` | `events/customers/${string}` | `events/stores/${string}` | `events/applications/${string}` | `events/authentications/${string}` | "events/me" ? import("./types").EventsResult<E> : any;
|
|
85
30
|
}>;
|
|
86
31
|
post: <E_1 extends Endpoint, C_1 extends AbstractedAuthConfig>(endpoint: E_1, body: E_1 extends "products" | `products/${string}` ? {
|
|
87
32
|
categories?: {
|
|
@@ -5089,62 +5034,7 @@ declare type AbstractedAuthConfig = AbstractedConfig & {
|
|
|
5089
5034
|
};
|
|
5090
5035
|
declare const get: <E extends Endpoint, C extends AbstractedConfig>(endpoint: E, config?: C | undefined) => Promise<Response & {
|
|
5091
5036
|
config: Config;
|
|
5092
|
-
data: E extends `${string}/${string}/${string}` ? any : E extends `products/${string}` ? import("./types").Products : E extends `categories/${string}` ? import("./types").Categories : E extends `brands/${string}` ? import("./types").Brands : E extends `collections/${string}` ? import("./types").Collections : E extends `grids/${string}` ? import("./types").Grids : E extends `carts/${string}` ? import("./types").Carts : E extends `orders/${string}` ? import("./types").Orders : E extends `customers/${string}` ? import("./types").Customers : E extends `stores/${string}` ? import("./types").Stores : E extends `applications/${string}` ? import("./types").Applications : E extends `authentications/${string}` ? import("./types
|
|
5093
|
-
result: E extends infer T_1 ? T_1 extends E ? T_1 extends "products" | `products?${string}` ? import("./types").Products[] : T_1 extends "categories" | `categories?${string}` ? import("./types").Categories[] : T_1 extends "brands" | `brands?${string}` ? import("./types").Brands[] : T_1 extends "collections" | `collections?${string}` ? import("./types").Collections[] : T_1 extends "grids" | `grids?${string}` ? import("./types").Grids[] : T_1 extends "carts" | `carts?${string}` ? import("./types").Carts[] : T_1 extends "orders" | `orders?${string}` ? import("./types").Orders[] : T_1 extends "customers" | `customers?${string}` ? import("./types").Customers[] : T_1 extends "stores" | `stores?${string}` ? import("./types").Stores[] : T_1 extends "applications" | `applications?${string}` ? import("./types").Applications[] : T_1 extends "authentications" | `authentications?${string}` ? import("./types/authentications").Authentications[] : never : never : never;
|
|
5094
|
-
meta: {
|
|
5095
|
-
offset: number;
|
|
5096
|
-
limit: number;
|
|
5097
|
-
fields: string[];
|
|
5098
|
-
} & {
|
|
5099
|
-
count?: number | undefined;
|
|
5100
|
-
sort: {
|
|
5101
|
-
field: string;
|
|
5102
|
-
order: 1 | -1;
|
|
5103
|
-
}[];
|
|
5104
|
-
query: {
|
|
5105
|
-
[key: string]: any;
|
|
5106
|
-
};
|
|
5107
|
-
};
|
|
5108
|
-
} : E extends "events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${string}` | `events/categories/${string}` | `events/brands/${string}` | `events/collections/${string}` | `events/grids/${string}` | `events/carts/${string}` | `events/orders/${string}` | `events/customers/${string}` | `events/stores/${string}` | `events/applications/${string}` | `events/authentications/${string}` | "events/me" ? {
|
|
5109
|
-
result: ({
|
|
5110
|
-
timestamp: string;
|
|
5111
|
-
store_id?: number | undefined;
|
|
5112
|
-
resource?: string | undefined;
|
|
5113
|
-
authentication_id?: (string & {
|
|
5114
|
-
length: 24;
|
|
5115
|
-
}) | null | undefined;
|
|
5116
|
-
resource_id?: (string & {
|
|
5117
|
-
length: 24;
|
|
5118
|
-
}) | undefined;
|
|
5119
|
-
action: string;
|
|
5120
|
-
modified_fields: string[];
|
|
5121
|
-
method?: number | undefined;
|
|
5122
|
-
endpoint?: string | undefined;
|
|
5123
|
-
body?: any;
|
|
5124
|
-
ip?: string | undefined;
|
|
5125
|
-
} & (E extends infer T_2 ? T_2 extends E ? T_2 extends "events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" ? {
|
|
5126
|
-
resource_id: string & {
|
|
5127
|
-
length: 24;
|
|
5128
|
-
};
|
|
5129
|
-
authentication_id: (string & {
|
|
5130
|
-
length: 24;
|
|
5131
|
-
}) | null;
|
|
5132
|
-
} : T_2 extends `events/products/${string}` | `events/categories/${string}` | `events/brands/${string}` | `events/collections/${string}` | `events/grids/${string}` | `events/carts/${string}` | `events/orders/${string}` | `events/customers/${string}` | `events/stores/${string}` | `events/applications/${string}` | `events/authentications/${string}` ? {
|
|
5133
|
-
authentication_id: (string & {
|
|
5134
|
-
length: 24;
|
|
5135
|
-
}) | null;
|
|
5136
|
-
} : T_2 extends "events/me" ? {
|
|
5137
|
-
resource: import("./types").Resource;
|
|
5138
|
-
resource_id: string & {
|
|
5139
|
-
length: 24;
|
|
5140
|
-
};
|
|
5141
|
-
} : never : never : never))[];
|
|
5142
|
-
meta: {
|
|
5143
|
-
offset: number;
|
|
5144
|
-
limit: number;
|
|
5145
|
-
fields: string[];
|
|
5146
|
-
};
|
|
5147
|
-
} : any;
|
|
5037
|
+
data: E extends `${string}/${string}/${string}` ? any : E extends `products/${string}` ? import("./types").Products : E extends `categories/${string}` ? import("./types").Categories : E extends `brands/${string}` ? import("./types").Brands : E extends `collections/${string}` ? import("./types").Collections : E extends `grids/${string}` ? import("./types").Grids : E extends `carts/${string}` ? import("./types").Carts : E extends `orders/${string}` ? import("./types").Orders : E extends `customers/${string}` ? import("./types").Customers : E extends `stores/${string}` ? import("./types").Stores : E extends `applications/${string}` ? import("./types").Applications : E extends `authentications/${string}` ? import("./types").Authentications : E extends ResourceOpQuery ? import("./types").ResourceListResult<E> : E extends "events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${string}` | `events/categories/${string}` | `events/brands/${string}` | `events/collections/${string}` | `events/grids/${string}` | `events/carts/${string}` | `events/orders/${string}` | `events/customers/${string}` | `events/stores/${string}` | `events/applications/${string}` | `events/authentications/${string}` | "events/me" ? import("./types").EventsResult<E> : any;
|
|
5148
5038
|
}>;
|
|
5149
5039
|
declare const post: <E extends Endpoint, C extends AbstractedAuthConfig>(endpoint: E, body: E extends "products" | `products/${string}` ? {
|
|
5150
5040
|
categories?: {
|
|
@@ -91,4 +91,4 @@ declare type ResponseBody<TConfig extends Config> = TConfig['method'] extends 'p
|
|
|
91
91
|
declare type DocSchema<Document extends any> = Omit<Document, '_id' | 'store_id' | 'store_ids' | 'created_at' | 'updated_at'>;
|
|
92
92
|
declare type SetDocEndpoint<TResource extends Resource> = TResource | `${TResource}/${ResourceId}`;
|
|
93
93
|
declare type RequestBody<TConfig extends Config> = TConfig['method'] extends undefined | 'get' | 'delete' ? undefined : TConfig['method'] extends 'patch' ? any : TConfig['endpoint'] extends SetDocEndpoint<'products'> ? DocSchema<Products> : TConfig['endpoint'] extends SetDocEndpoint<'categories'> ? DocSchema<Categories> : TConfig['endpoint'] extends SetDocEndpoint<'brands'> ? DocSchema<Brands> : TConfig['endpoint'] extends SetDocEndpoint<'collections'> ? DocSchema<Collections> : TConfig['endpoint'] extends SetDocEndpoint<'grids'> ? DocSchema<Grids> : TConfig['endpoint'] extends SetDocEndpoint<'carts'> ? DocSchema<Carts> : TConfig['endpoint'] extends SetDocEndpoint<'orders'> ? DocSchema<Orders> : TConfig['endpoint'] extends SetDocEndpoint<'customers'> ? DocSchema<Customers> : TConfig['endpoint'] extends SetDocEndpoint<'stores'> ? DocSchema<Stores> : TConfig['endpoint'] extends SetDocEndpoint<'applications'> ? DocSchema<Applications> : TConfig['endpoint'] extends SetDocEndpoint<'authentications'> ? DocSchema<Authentications> : any;
|
|
94
|
-
export type { Products, Categories, Brands, Collections, Grids, Carts, Orders, Customers, Stores, Applications, Resource, ResourceAndId, ResourceOpQuery, Endpoint, Method, Config, ResponseBody, RequestBody, };
|
|
94
|
+
export type { Products, Categories, Brands, Collections, Grids, Carts, Orders, Customers, Stores, Applications, Authentications, Resource, ResourceId, ResourceAndId, ResourceOpQuery, Endpoint, Method, Config, ResourceListResult, EventsResult, ResponseBody, RequestBody, };
|
|
@@ -182,12 +182,16 @@ export type {
|
|
|
182
182
|
Customers,
|
|
183
183
|
Stores,
|
|
184
184
|
Applications,
|
|
185
|
+
Authentications,
|
|
185
186
|
Resource,
|
|
187
|
+
ResourceId,
|
|
186
188
|
ResourceAndId,
|
|
187
189
|
ResourceOpQuery,
|
|
188
190
|
Endpoint,
|
|
189
191
|
Method,
|
|
190
192
|
Config,
|
|
193
|
+
ResourceListResult,
|
|
194
|
+
EventsResult,
|
|
191
195
|
ResponseBody,
|
|
192
196
|
RequestBody,
|
|
193
197
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-console, import/no-extraneous-dependencies */
|
|
2
2
|
|
|
3
3
|
import { test, expect } from 'vitest';
|
|
4
|
-
import '
|
|
4
|
+
import '../fetch-polyfill';
|
|
5
5
|
import api, { ApiError } from '../src/index';
|
|
6
6
|
|
|
7
7
|
const productId = '618041aa239b7206d3fc06de';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAiB,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-discounts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for complex discount rules",
|
|
6
6
|
"main": "functions/dist/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -20,5 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@cloudcommerce/types": "workspace:*"
|
|
23
26
|
}
|
|
24
27
|
}
|
|
@@ -41,11 +41,20 @@ export default async () => {
|
|
|
41
41
|
}
|
|
42
42
|
return opts;
|
|
43
43
|
}, '');
|
|
44
|
-
const $firebase =
|
|
44
|
+
const $firebase = (cmd) => {
|
|
45
45
|
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
46
46
|
};
|
|
47
47
|
if (argv._.includes('serve')) {
|
|
48
|
-
return $firebase('emulators:start')
|
|
48
|
+
return $firebase('emulators:start').catch(async (err) => {
|
|
49
|
+
await echo`
|
|
50
|
+
Try killing open emulators with:
|
|
51
|
+
${chalk.bold('npx kill-port 4000 9099 5001 8080 5000 8085 9199 4400 4500')}
|
|
52
|
+
`;
|
|
53
|
+
if (err.stdout.includes('port taken')) {
|
|
54
|
+
return process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
throw err;
|
|
57
|
+
});
|
|
49
58
|
}
|
|
50
59
|
if (argv._.find((cmd) => /^(\w+:)?(shell|start)$/.test(cmd))) {
|
|
51
60
|
return $firebase('functions:shell');
|
|
@@ -54,13 +54,23 @@ export default async () => {
|
|
|
54
54
|
}
|
|
55
55
|
return opts;
|
|
56
56
|
}, '');
|
|
57
|
-
const $firebase =
|
|
57
|
+
const $firebase = (cmd: string) => {
|
|
58
58
|
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
if (argv._.includes('serve')) {
|
|
62
|
-
return $firebase('emulators:start')
|
|
62
|
+
return $firebase('emulators:start').catch(async (err: any) => {
|
|
63
|
+
await echo`
|
|
64
|
+
Try killing open emulators with:
|
|
65
|
+
${chalk.bold('npx kill-port 4000 9099 5001 8080 5000 8085 9199 4400 4500')}
|
|
66
|
+
`;
|
|
67
|
+
if (err.stdout.includes('port taken')) {
|
|
68
|
+
return process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
throw err;
|
|
71
|
+
});
|
|
63
72
|
}
|
|
73
|
+
|
|
64
74
|
if (argv._.find((cmd) => /^(\w+:)?(shell|start)$/.test(cmd))) {
|
|
65
75
|
return $firebase('functions:shell');
|
|
66
76
|
}
|
|
@@ -70,7 +80,6 @@ export default async () => {
|
|
|
70
80
|
if (argv._.includes('deploy')) {
|
|
71
81
|
return $firebase('deploy');
|
|
72
82
|
}
|
|
73
|
-
|
|
74
83
|
if (argv._.includes('login')) {
|
|
75
84
|
await $firebase('login');
|
|
76
85
|
return login();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
get(): {
|
|
3
|
+
hello: string;
|
|
4
|
+
lang: string;
|
|
5
|
+
currency: string;
|
|
6
|
+
currencySymbol: string;
|
|
7
|
+
countryCode: string;
|
|
8
|
+
storeId: number;
|
|
9
|
+
httpsFunctionOptions: {
|
|
10
|
+
region: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
set(config: any): void;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -12,6 +12,9 @@ const self = {
|
|
|
12
12
|
currencySymbol: process.env.ECOM_CURRENCY_SYMBOL || DEFAULT_CURRENCY_SYMBOL,
|
|
13
13
|
countryCode: process.env.ECOM_COUNTRY_CODE || DEFAULT_COUNTRY_CODE,
|
|
14
14
|
storeId: Number(process.env.ECOM_STORE_ID),
|
|
15
|
+
httpsFunctionOptions: {
|
|
16
|
+
region: process.env.DEPLOY_REGION || 'us-east1',
|
|
17
|
+
},
|
|
15
18
|
},
|
|
16
19
|
};
|
|
17
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAE9B,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE;QACR,KAAK,EAAE,8BAA8B;QACrC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,YAAY;QAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,gBAAgB;QACvD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,uBAAuB;QAC3E,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,oBAAoB;QAClE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAE9B,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE;QACR,KAAK,EAAE,8BAA8B;QACrC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,YAAY;QAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,gBAAgB;QACvD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,uBAAuB;QAC3E,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,oBAAoB;QAClE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC1C,oBAAoB,EAAE;YACpB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,UAAU;SAChD;KACF;CACF,CAAC;AAEF,eAAe;IACb,GAAG;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,GAAG,CAAC,MAAM;QACR,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default () => {
|
|
2
|
+
const { ECOM_AUTHENTICATION_ID, ECOM_API_KEY, GITHUB_TOKEN } = process.env;
|
|
3
|
+
if (!ECOM_AUTHENTICATION_ID) {
|
|
4
|
+
throw new Error('ECOM_AUTHENTICATION_ID is not set');
|
|
5
|
+
}
|
|
6
|
+
if (!ECOM_API_KEY) {
|
|
7
|
+
throw new Error('ECOM_API_KEY is not set');
|
|
8
|
+
}
|
|
9
|
+
const authenticationId = ECOM_AUTHENTICATION_ID;
|
|
10
|
+
const apiKey = ECOM_API_KEY;
|
|
11
|
+
const githubToken = GITHUB_TOKEN;
|
|
12
|
+
const env = {
|
|
13
|
+
authenticationId,
|
|
14
|
+
apiKey,
|
|
15
|
+
githubToken,
|
|
16
|
+
};
|
|
17
|
+
return env;
|
|
18
|
+
};
|
|
19
|
+
// # sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAMA,eAAe,GAAG,EAAE;IAClB,MAAM,EACJ,sBAAsB,EACtB,YAAY,EACZ,YAAY,GACb,GAAG,OAAO,CAAC,GAAG,CAAC;IAChB,IAAI,CAAC,sBAAsB,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KACtD;IACD,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;IAChD,MAAM,MAAM,GAAG,YAAY,CAAC;IAC5B,MAAM,WAAW,GAAG,YAAY,CAAC;IACjC,MAAM,GAAG,GAAQ;QACf,gBAAgB;QAChB,MAAM;QACN,WAAW;KACZ,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { firestore } from 'firebase-admin';
|
|
2
|
+
import { logger } from 'firebase-functions';
|
|
3
|
+
import api from '@cloudcommerce/api';
|
|
4
|
+
import getEnv from '../env';
|
|
5
|
+
|
|
6
|
+
export default async () => {
|
|
7
|
+
const { authenticationId, apiKey } = getEnv();
|
|
8
|
+
const eventsSubs = await firestore().collection('eventsSubs').get();
|
|
9
|
+
const listenedEvents = [];
|
|
10
|
+
eventsSubs.forEach((doc) => {
|
|
11
|
+
const eventSub = doc.data();
|
|
12
|
+
if (!listenedEvents.includes(eventSub.event)) {
|
|
13
|
+
listenedEvents.push(eventSub.event);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
logger.info({ listenedEvents });
|
|
17
|
+
[
|
|
18
|
+
'orders',
|
|
19
|
+
'products',
|
|
20
|
+
'carts',
|
|
21
|
+
].forEach(async (resource) => {
|
|
22
|
+
const { data: { result } } = await api({
|
|
23
|
+
authenticationId,
|
|
24
|
+
apiKey,
|
|
25
|
+
endpoint: `events/${resource}`,
|
|
26
|
+
});
|
|
27
|
+
logger.info(`${resource} events: `, result);
|
|
28
|
+
});
|
|
29
|
+
return true;
|
|
30
|
+
};
|
|
31
|
+
// # sourceMappingURL=check-store-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-store-events.js","sourceRoot":"","sources":["../../src/handlers/check-store-events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,GAAG,MAAM,oBAAoB,CAAC;AACrC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,eAAe,KAAK,IAAI,EAAE;IACxB,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC9C,MAAM,UAAU,GAAG,MAAM,SAAS,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC;IACpE,MAAM,cAAc,GAAwB,EAAE,CAAC;IAC/C,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACzB,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,EAAc,CAAC;QACxC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC5C,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACrC;IACH,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;IAChC;QACE,QAAQ;QACR,UAAU;QACV,OAAO;KACR,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;QAC3B,MAAM,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,GAAG,CAAC;YACrC,gBAAgB;YAChB,MAAM;YACN,QAAQ,EAAE,UAAU,QAAoB,EAAE;SAC3C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import 'source-map-support/register.js';
|
|
2
|
+
import '@cloudcommerce/api/fetch-polyfill.js';
|
|
3
|
+
export declare const z: import("firebase-functions/v2/https").HttpsFunction;
|
|
4
|
+
export declare const ssr: import("firebase-functions/v2/https").HttpsFunction;
|
|
5
|
+
export declare const cronStoreEvents: import("firebase-functions/v1").CloudFunction<unknown>;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import 'source-map-support/register.js';
|
|
2
|
+
import '@cloudcommerce/api/fetch-polyfill.js';
|
|
3
|
+
import { initializeApp } from 'firebase-admin';
|
|
2
4
|
import { pubsub, logger } from 'firebase-functions';
|
|
3
5
|
// eslint-disable-next-line import/no-unresolved
|
|
4
6
|
import { onRequest } from 'firebase-functions/v2/https';
|
|
5
7
|
import config from './config.js';
|
|
6
|
-
import checkStoreEvents from './
|
|
8
|
+
import checkStoreEvents from './handlers/check-store-events.js';
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
if (!AUTHENTICATION_ID || !API_KEY || !GITHUB_TOKEN) {
|
|
10
|
-
throw new Error('Missing environment variables');
|
|
11
|
-
}
|
|
10
|
+
initializeApp();
|
|
12
11
|
const processId = String(Date.now());
|
|
13
|
-
const
|
|
14
|
-
processId,
|
|
15
|
-
authenticationId: AUTHENTICATION_ID,
|
|
16
|
-
apiKey: API_KEY,
|
|
17
|
-
githubToken: GITHUB_TOKEN,
|
|
18
|
-
};
|
|
19
|
-
const options = {
|
|
20
|
-
region: process.env.DEPLOY_REGION || 'us-east1',
|
|
21
|
-
};
|
|
12
|
+
const options = config.get().httpsFunctionOptions;
|
|
22
13
|
|
|
23
14
|
export const z = onRequest(options, ({ url }, response) => {
|
|
15
|
+
process.env.ECOM_API_KEY = '***';
|
|
24
16
|
if (url === '/hello') {
|
|
25
17
|
logger.info('Hello logs!', {
|
|
26
18
|
structuredData: true,
|
|
@@ -42,6 +34,6 @@ export const ssr = onRequest(options, (request, response) => {
|
|
|
42
34
|
});
|
|
43
35
|
|
|
44
36
|
export const cronStoreEvents = pubsub.schedule('* * * * *').onRun(() => {
|
|
45
|
-
return checkStoreEvents(
|
|
37
|
+
return checkStoreEvents();
|
|
46
38
|
});
|
|
47
39
|
// # sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACpD,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAE7D,aAAa,EAAE,CAAC;AAChB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AACrC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE;IACxD,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC;IACjC,IAAI,GAAG,KAAK,QAAQ,EAAE;QACpB,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE;YACzB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;QACH,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO;KACR;IACD,IAAI,GAAG,KAAK,MAAM,EAAE;QAClB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzB,OAAO;KACR;IACD,QAAQ,CAAC,IAAI,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE;KACrB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;IAC1D,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;IACrE,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|