feed-common 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.0.3](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.2...v1.0.3) (2024-02-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * release ([3d0b54a](https://github.com/advertikon/package-maxify-feed-common/commit/3d0b54aa1b0ca7caaa6d2e97a7114d0e44fca6dd))
7
+
8
+ ## [1.0.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.1...v1.0.2) (2024-02-02)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * some changes ([e984a10](https://github.com/advertikon/package-maxify-feed-common/commit/e984a10d9816044b53ea894c881526a7af59ca40))
14
+
1
15
  ## [1.0.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.0...v1.0.1) (2024-01-30)
2
16
 
3
17
 
@@ -1,8 +1,8 @@
1
1
  export declare enum GmcProductSyncStatus {
2
2
  REJECTED = "rejected",
3
3
  APPROVED = "approved",
4
- WARINING = "warning",
5
- SYNC_SHEDULED = "sync_sheduled"
4
+ WARNING = "warning",
5
+ SYNC_SCHEDULED = "sync_scheduled"
6
6
  }
7
7
  export declare enum GoogleAccountStatus {
8
8
  ENABLED = "ENABLED",
@@ -2,8 +2,8 @@ export var GmcProductSyncStatus;
2
2
  (function (GmcProductSyncStatus) {
3
3
  GmcProductSyncStatus["REJECTED"] = "rejected";
4
4
  GmcProductSyncStatus["APPROVED"] = "approved";
5
- GmcProductSyncStatus["WARINING"] = "warning";
6
- GmcProductSyncStatus["SYNC_SHEDULED"] = "sync_sheduled";
5
+ GmcProductSyncStatus["WARNING"] = "warning";
6
+ GmcProductSyncStatus["SYNC_SCHEDULED"] = "sync_scheduled";
7
7
  })(GmcProductSyncStatus || (GmcProductSyncStatus = {}));
8
8
  export var GoogleAccountStatus;
9
9
  (function (GoogleAccountStatus) {
@@ -1 +1 @@
1
- {"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/constants/google.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,4CAAoB,CAAA;IACpB,uDAA+B,CAAA;AACjC,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
1
+ {"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/constants/google.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,yDAAiC,CAAA;AACnC,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
@@ -1,8 +1,7 @@
1
- import { ProductUploadMapSource } from '../types/profile.types.js';
2
- import { ProductUploadRuleFilterType } from '../types/profile.types.js';
1
+ import { ProductUploadMapSource, ProductUploadRuleFilterType } from '../types/profile.types.js';
3
2
  export declare const SOURCE_VENDORS = "source.vendor";
4
3
  export declare const SOURCE_TAGS = "source.tag";
5
- export declare const SOURCE_PORODUCT_TYPE = "source.product_type";
4
+ export declare const SOURCE_PRODUCT_TYPE = "source.product_type";
6
5
  export declare const SOURCE_COLLECTIONS = "source.collection";
7
6
  export declare const SOURCE_LANGUAGE = "source.language";
8
7
  export declare const SOURCE_GOOGLE_CATEGORY = "source.google_category";
@@ -53,7 +52,7 @@ export declare const RuleOperators: {
53
52
  value: string;
54
53
  };
55
54
  };
56
- export declare const PruoductUploadRulesOperators: {
55
+ export declare const ProductUploadRulesOperators: {
57
56
  string: {
58
57
  label: string;
59
58
  value: string;
@@ -67,3 +66,4 @@ export declare const ProductUploadRuleFilters: ProductUploadRuleFilterType[];
67
66
  export declare const ProductUploadMappings: ProductUploadMapSource[];
68
67
  export declare const CHANNEL = "online";
69
68
  export declare const GMC_PRODUCT_ID_TEMPLATE = "{PRODUCT_ID}_{VARIANT_ID}";
69
+ export declare const ProfileIdTemplateCodes: string[];
@@ -1,6 +1,6 @@
1
1
  export const SOURCE_VENDORS = 'source.vendor';
2
2
  export const SOURCE_TAGS = 'source.tag';
3
- export const SOURCE_PORODUCT_TYPE = 'source.product_type';
3
+ export const SOURCE_PRODUCT_TYPE = 'source.product_type';
4
4
  export const SOURCE_COLLECTIONS = 'source.collection';
5
5
  export const SOURCE_LANGUAGE = 'source.language';
6
6
  export const SOURCE_GOOGLE_CATEGORY = 'source.google_category';
@@ -51,7 +51,7 @@ export const RuleOperators = {
51
51
  value: 'notIn',
52
52
  },
53
53
  };
54
- export const PruoductUploadRulesOperators = {
54
+ export const ProductUploadRulesOperators = {
55
55
  string: [
56
56
  RuleOperators.contains,
57
57
  RuleOperators.notContains,
@@ -67,27 +67,27 @@ export const PruoductUploadRulesOperators = {
67
67
  export const ProductUploadRuleFilters = [
68
68
  {
69
69
  label: 'Title',
70
- operators: PruoductUploadRulesOperators.string,
70
+ operators: ProductUploadRulesOperators.string,
71
71
  value: 'title',
72
72
  },
73
73
  {
74
74
  label: 'Collection',
75
- operators: PruoductUploadRulesOperators.list,
75
+ operators: ProductUploadRulesOperators.list,
76
76
  value: 'collection',
77
77
  },
78
78
  {
79
79
  label: 'Product Type',
80
- operators: PruoductUploadRulesOperators.list,
80
+ operators: ProductUploadRulesOperators.list,
81
81
  value: 'product_type',
82
82
  },
83
83
  {
84
84
  label: 'Vendor',
85
- operators: PruoductUploadRulesOperators.list,
85
+ operators: ProductUploadRulesOperators.list,
86
86
  value: 'vendor',
87
87
  },
88
88
  {
89
89
  label: 'Tag',
90
- operators: PruoductUploadRulesOperators.list,
90
+ operators: ProductUploadRulesOperators.list,
91
91
  value: 'tag',
92
92
  },
93
93
  ];
@@ -103,7 +103,7 @@ export const ProductUploadMappings = [
103
103
  label: 'Content Language',
104
104
  attribute: 'contentLanguage',
105
105
  type: 'select',
106
- choises: [SOURCE_LANGUAGE],
106
+ choices: [SOURCE_LANGUAGE],
107
107
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
108
108
  description: 'Language for the item',
109
109
  },
@@ -112,7 +112,7 @@ export const ProductUploadMappings = [
112
112
  label: 'Target Country',
113
113
  attribute: 'targetCountry',
114
114
  type: 'select',
115
- choises: [SOURCE_COUNTRY],
115
+ choices: [SOURCE_COUNTRY],
116
116
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
117
117
  description: 'The item\'s country of sale',
118
118
  },
@@ -121,7 +121,7 @@ export const ProductUploadMappings = [
121
121
  label: 'Adult',
122
122
  attribute: 'adult',
123
123
  type: 'select',
124
- choises: [
124
+ choices: [
125
125
  { label: 'Yes', value: true },
126
126
  { label: 'No', value: false },
127
127
  ],
@@ -133,7 +133,7 @@ export const ProductUploadMappings = [
133
133
  label: 'Age Group',
134
134
  attribute: 'ageGroup',
135
135
  type: 'select',
136
- choises: [
136
+ choices: [
137
137
  { label: '0-3 months old', value: 'newborn' },
138
138
  { label: '3-12 months old', value: 'infant' },
139
139
  { label: '1-5 years old', value: 'toddler' },
@@ -148,7 +148,7 @@ export const ProductUploadMappings = [
148
148
  label: 'Availability',
149
149
  attribute: 'availability',
150
150
  type: 'select',
151
- choises: [
151
+ choices: [
152
152
  { label: 'In Stock', value: 'in_stock' },
153
153
  { label: 'Out Of Stock', value: 'out_of_stock' },
154
154
  { label: 'Preorder', value: 'preorder' },
@@ -165,7 +165,7 @@ export const ProductUploadMappings = [
165
165
  defaultValue: 'shopify.vendor',
166
166
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
167
167
  description: 'Brand of the item',
168
- choises: [
168
+ choices: [
169
169
  ShopifyProductSource.vendor,
170
170
  SOURCE_VENDORS,
171
171
  ShopifyProductSource.custom,
@@ -176,7 +176,7 @@ export const ProductUploadMappings = [
176
176
  label: 'Gender',
177
177
  attribute: 'gender',
178
178
  type: 'select',
179
- choises: [
179
+ choices: [
180
180
  { label: 'Male', value: 'male' },
181
181
  { label: 'Female', value: 'female' },
182
182
  { label: 'Unisex', value: 'unisex' },
@@ -189,7 +189,7 @@ export const ProductUploadMappings = [
189
189
  label: 'Google category',
190
190
  attribute: 'googleProductCategory',
191
191
  type: 'select',
192
- choises: [SOURCE_GOOGLE_CATEGORY],
192
+ choices: [SOURCE_GOOGLE_CATEGORY],
193
193
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
194
194
  description: 'Google\'s category of the item',
195
195
  },
@@ -201,7 +201,7 @@ export const ProductUploadMappings = [
201
201
  defaultValue: 'shopify.vendor',
202
202
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
203
203
  description: 'Global Trade Item Number (GTIN) of the item',
204
- choises: [
204
+ choices: [
205
205
  ShopifyProductSource.barcode,
206
206
  ShopifyProductSource.sku,
207
207
  { label: 'Custom input', value: SOURCE_CUSTOM },
@@ -215,7 +215,7 @@ export const ProductUploadMappings = [
215
215
  defaultValue: 'shopify.vendor',
216
216
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
217
217
  description: 'Manufacturer Part Number (MPN) of the item',
218
- choises: [
218
+ choices: [
219
219
  ShopifyProductSource.barcode,
220
220
  ShopifyProductSource.sku,
221
221
  { label: 'Custom input', value: SOURCE_CUSTOM },
@@ -226,7 +226,7 @@ export const ProductUploadMappings = [
226
226
  label: 'Included Destinations',
227
227
  attribute: 'includedDestinations',
228
228
  type: 'multiselect',
229
- choises: [
229
+ choices: [
230
230
  { label: 'Shopping ads', value: 'Shopping_ads' },
231
231
  { label: 'Dynamic remarketing ads', value: 'Display_ads' },
232
232
  { label: 'Free listings', value: 'Free_listings' },
@@ -353,4 +353,5 @@ export const ProductUploadMappings = [
353
353
  ];
354
354
  export const CHANNEL = 'online';
355
355
  export const GMC_PRODUCT_ID_TEMPLATE = '{PRODUCT_ID}_{VARIANT_ID}';
356
+ export const ProfileIdTemplateCodes = ['PRODUCT_ID', 'VARIANT_ID', 'COUNTRY', 'LANGUAGE'];
356
357
  //# sourceMappingURL=profile.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACtD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,UAAU;KAClB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,aAAa;KACrB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,QAAQ;KAChB;IACD,SA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IACN,2BAA2B;IAC3B,MAAM;IACN,2EAA2E;IAC3E,MAAM;IACN,8BAA8B;IAC9B,MAAM;IACN,yDAAyD;IACzD,MAAM;IACN,4BAA4B;CAC7B,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC"}
1
+ {"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACtD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,UAAU;KAClB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,aAAa;KACrB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,QAAQ;KAChB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,a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MAAM;IACN,4BAA4B;CAC7B,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from './types/company.types.js';
7
7
  export * from './utils/gmc.js';
8
8
  export * from './utils/profile.js';
9
9
  export * from './utils/utils.js';
10
+ export * from './utils/company.js';
package/dist/index.js CHANGED
@@ -7,4 +7,5 @@ export * from './types/company.types.js';
7
7
  export * from './utils/gmc.js';
8
8
  export * from './utils/profile.js';
9
9
  export * from './utils/utils.js';
10
+ export * from './utils/company.js';
10
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -1,9 +1,12 @@
1
- export type CompanyActionProgress = {
1
+ export type ServerSideEvent = {
2
+ shop: string;
3
+ eventID: string;
4
+ type: "progress" | "schedule";
5
+ name: string;
6
+ status?: boolean;
7
+ };
8
+ export type ServerSideProgressEvent = ServerSideEvent & {
2
9
  progress: number;
3
10
  totalCount: number;
4
- name: 'shopify' | 'gmc' | 'issues' | 'shopify-collection';
5
- threadId: string;
6
- };
7
- export type CompanyActivity = CompanyActionProgress & {
8
- shop: string;
9
11
  };
12
+ export type ServerSideScheduleEvent = ServerSideEvent;
@@ -1,12 +1,11 @@
1
- import { ProductUploadRuleFilters, ProductUploadMappings } from '../constants/profile.constants.js';
2
- import { RuleOperators } from '../constants/profile.constants.js';
3
- export type ProductUploadRuleOpratorType = {
1
+ import { ProductUploadRuleFilters, ProductUploadMappings, RuleOperators } from '../constants/profile.constants.js';
2
+ export type ProductUploadRuleOperatorType = {
4
3
  label: string;
5
4
  value: string;
6
5
  };
7
6
  export type ProductUploadRuleFilterType = {
8
7
  label: string;
9
- operators: ProductUploadRuleOpratorType[];
8
+ operators: ProductUploadRuleOperatorType[];
10
9
  value: string;
11
10
  disabled?: boolean;
12
11
  };
@@ -26,7 +25,7 @@ export type ProductUploadMapSource = {
26
25
  label: string;
27
26
  attribute: string;
28
27
  type: 'select' | 'multiselect' | 'text' | 'number';
29
- choises?: OptionType[];
28
+ choices?: OptionType[];
30
29
  rules: ProductUploadRuleFilterType['value'][];
31
30
  description?: string;
32
31
  defaultValue?: ValueType;
@@ -38,7 +37,7 @@ export type ProductUploadMapping = {
38
37
  sections: {
39
38
  ruleItems: {
40
39
  attribute: (typeof ProductUploadRuleFilters)[number]['value'];
41
- operator: ProductUploadRuleOpratorType['value'];
40
+ operator: ProductUploadRuleOperatorType['value'];
42
41
  value: string | string[] | number[] | number | boolean;
43
42
  id: string;
44
43
  }[];
@@ -48,6 +47,7 @@ export type ProductUploadMapping = {
48
47
  type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
49
48
  export type ProductUploadProfile = {
50
49
  id: string;
50
+ profileIdTemplate: string;
51
51
  name: string;
52
52
  active?: boolean;
53
53
  rules: ProductUploadRules;
@@ -0,0 +1,3 @@
1
+ import { ServerSideEvent, ServerSideProgressEvent, ServerSideScheduleEvent } from '../types/company.types.js';
2
+ export declare function isServerSideProgressEvent(event: ServerSideEvent): event is ServerSideProgressEvent;
3
+ export declare function isServerSideScheduleEvent(event: ServerSideEvent): event is ServerSideScheduleEvent;
@@ -0,0 +1,7 @@
1
+ export function isServerSideProgressEvent(event) {
2
+ return event.type === 'progress';
3
+ }
4
+ export function isServerSideScheduleEvent(event) {
5
+ return event.type === 'schedule';
6
+ }
7
+ //# sourceMappingURL=company.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/utils/company.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB,CAAE,KAAsB;IAC7D,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAE,KAAsB;IAC7D,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACrC,CAAC"}
@@ -1,16 +1 @@
1
- export declare function isGmcProductId(productId: string): boolean;
2
- export declare function GMCProductIdToShopify(productId: string): number;
3
- export declare function GmcIdParts(gmcProductId: string): {
4
- channel: string;
5
- locale: string;
6
- country: string;
7
- idPart: string;
8
- shopifyId: number;
9
- shopifyVariantId: number;
10
- };
11
- export declare function makeGmcIdPart(productId: number | null, variantId: number | null): string;
12
- export declare function getShopifyIdsFromGmcIdPart(gmcId: string): {
13
- shopifyId: number;
14
- shopifyVariantId: number;
15
- };
16
- export declare function getProductIdFromGmcId(gmcId: string): number;
1
+ export {};
package/dist/utils/gmc.js CHANGED
@@ -1,39 +1,55 @@
1
- import { GMC_PRODUCT_ID_TEMPLATE } from '../constants/profile.constants.js';
2
- export function isGmcProductId(productId) {
3
- return new RegExp(GMC_PRODUCT_ID_TEMPLATE.replace('{PRODUCT_ID}', '\\d+').replace('{VARIANT_ID}', '\\d+')).test(productId);
4
- }
5
- export function GMCProductIdToShopify(productId) {
6
- const [, , , id] = productId.split(':');
7
- return Number(getProductIdFromGmcId(id));
8
- }
9
- export function GmcIdParts(gmcProductId) {
10
- const [channel, locale, country, idPart] = gmcProductId.split(':');
11
- if (!channel || !locale || !country || !idPart) {
12
- throw new Error(`${gmcProductId} is not a valid GMC product id`);
13
- }
14
- return {
15
- channel,
16
- locale,
17
- country,
18
- idPart,
19
- ...getShopifyIdsFromGmcIdPart(idPart),
20
- };
21
- }
22
- export function makeGmcIdPart(productId, variantId) {
23
- return GMC_PRODUCT_ID_TEMPLATE.replace('{PRODUCT_ID}', String(productId)).replace('{VARIANT_ID}', String(variantId));
24
- }
25
- export function getShopifyIdsFromGmcIdPart(gmcId) {
26
- if (!isGmcProductId(gmcId)) {
27
- throw new Error(`${gmcId} is not a valid GMC product id part`);
28
- }
29
- const [productId, variantId] = gmcId.split('_');
30
- return { shopifyId: Number(productId), shopifyVariantId: Number(variantId) };
31
- }
32
- export function getProductIdFromGmcId(gmcId) {
33
- if (!isGmcProductId(gmcId)) {
34
- throw new Error(`${gmcId} is not a valid GMC product id part`);
35
- }
36
- const [productId] = gmcId.split('_');
37
- return Number(productId);
38
- }
1
+ // export function isGmcProductId (
2
+ // productId: string,
3
+ // profileIdTemplate: string
4
+ // ): boolean {
5
+ // return new RegExp(
6
+ // profileIdTemplate
7
+ // .replace('{PRODUCT_ID}', '\\d+')
8
+ // .replace('{VARIANT_ID}', '\\d+')
9
+ // .replace('{COUNTRY}', '\\w+')
10
+ // .replace('{LANGUAGE}', '\\w+')
11
+ // ).test(productId);
12
+ // }
13
+ export {};
14
+ // export function GMCProductIdToShopify (productId: string, profileIdTemplate: string): number {
15
+ // const [, , , id] = productId.split(':');
16
+ // return Number(getProductIdFromGmcId(id, profileIdTemplate));
17
+ // }
18
+ // export function GmcIdParts (gmcProductId: string, profileIdTemplate: string): {
19
+ // channel: string;
20
+ // locale: string;
21
+ // country: string;
22
+ // idPart: string;
23
+ // shopifyId: number;
24
+ // shopifyVariantId: number;
25
+ // } {
26
+ // const [channel, locale, country, idPart] = gmcProductId.split(':');
27
+ // if (!channel || !locale || !country || !idPart) {
28
+ // throw new Error(`${gmcProductId} is not a valid GMC product id`);
29
+ // }
30
+ // return {
31
+ // channel,
32
+ // locale,
33
+ // country,
34
+ // idPart,
35
+ // ...getShopifyIdsFromGmcIdPart(idPart, profileIdTemplate),
36
+ // };
37
+ // }
38
+ // export function getShopifyIdsFromGmcIdPart (gmcId: string, profileIdTemplate: string): {
39
+ // shopifyId: number;
40
+ // shopifyVariantId: number;
41
+ // } {
42
+ // if (!isGmcProductId(gmcId, profileIdTemplate)) {
43
+ // throw new Error(`${gmcId} is not a valid GMC product id part`);
44
+ // }
45
+ // const [productId, variantId] = gmcId.split('_');
46
+ // return { shopifyId: Number(productId), shopifyVariantId: Number(variantId) };
47
+ // }
48
+ // export function getProductIdFromGmcId (gmcId: string, profileIdTemplate: string): number {
49
+ // if (!isGmcProductId(gmcId, profileIdTemplate)) {
50
+ // throw new Error(`${gmcId} is not a valid GMC product id part`);
51
+ // }
52
+ // const [productId] = gmcId.split('_');
53
+ // return Number(productId);
54
+ // }
39
55
  //# sourceMappingURL=gmc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gmc.js","sourceRoot":"","sources":["../../src/utils/gmc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,MAAM,UAAU,cAAc,CAAE,SAAiB;IAC/C,OAAO,IAAI,MAAM,CACf,uBAAuB,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,OAAO,CAC7D,cAAc,EACd,MAAM,CACP,CACF,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAE,SAAiB;IACtD,MAAM,CAAC,EAAE,AAAD,EAAG,AAAD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AAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"gmc.js","sourceRoot":"","sources":["../../src/utils/gmc.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uBAAuB;AACvB,8BAA8B;AAC9B,eAAe;AACf,uBAAuB;AACvB,wBAAwB;AACxB,yCAAyC;AACzC,yCAAyC;AACzC,sCAAsC;AACtC,uCAAuC;AACvC,uBAAuB;AACvB,IAAI;;AAEJ,iGAAiG;AACjG,6CAA6C;AAC7C,iEAAiE;AACjE,IAAI;AAEJ,kFAAkF;AAClF,qBAAqB;AACrB,oBAAoB;AACpB,qBAAqB;AACrB,oBAAoB;AACpB,uBAAuB;AACvB,8BAA8B;AAC9B,MAAM;AACN,wEAAwE;AAExE,sDAAsD;AACtD,wEAAwE;AACxE,MAAM;AAEN,aAAa;AACb,eAAe;AACf,cAAc;AACd,eAAe;AACf,cAAc;AACd,gEAAgE;AAChE,OAAO;AACP,IAAI;AAEJ,2FAA2F;AAC3F,uBAAuB;AACvB,8BAA8B;AAC9B,MAAM;AACN,qDAAqD;AACrD,sEAAsE;AACtE,MAAM;AAEN,qDAAqD;AACrD,kFAAkF;AAClF,IAAI;AAEJ,6FAA6F;AAC7F,qDAAqD;AACrD,sEAAsE;AACtE,MAAM;AAEN,0CAA0C;AAC1C,8BAA8B;AAC9B,IAAI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-common",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Maxify feed common library",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,8 +1,8 @@
1
1
  export enum GmcProductSyncStatus {
2
2
  REJECTED = 'rejected',
3
3
  APPROVED = 'approved',
4
- WARINING = 'warning',
5
- SYNC_SHEDULED = 'sync_sheduled',
4
+ WARNING = 'warning',
5
+ SYNC_SCHEDULED = 'sync_scheduled',
6
6
  }
7
7
 
8
8
  export enum GoogleAccountStatus {
@@ -1,9 +1,11 @@
1
- import { ProductUploadMapSource } from '../types/profile.types.js';
2
- import { ProductUploadRuleFilterType } from '../types/profile.types.js';
1
+ import {
2
+ ProductUploadMapSource,
3
+ ProductUploadRuleFilterType,
4
+ } from '../types/profile.types.js';
3
5
 
4
6
  export const SOURCE_VENDORS = 'source.vendor';
5
7
  export const SOURCE_TAGS = 'source.tag';
6
- export const SOURCE_PORODUCT_TYPE = 'source.product_type';
8
+ export const SOURCE_PRODUCT_TYPE = 'source.product_type';
7
9
  export const SOURCE_COLLECTIONS = 'source.collection';
8
10
  export const SOURCE_LANGUAGE = 'source.language';
9
11
  export const SOURCE_GOOGLE_CATEGORY = 'source.google_category';
@@ -58,7 +60,7 @@ export const RuleOperators = {
58
60
  },
59
61
  };
60
62
 
61
- export const PruoductUploadRulesOperators = {
63
+ export const ProductUploadRulesOperators = {
62
64
  string: [
63
65
  RuleOperators.contains,
64
66
  RuleOperators.notContains,
@@ -75,27 +77,27 @@ export const PruoductUploadRulesOperators = {
75
77
  export const ProductUploadRuleFilters: ProductUploadRuleFilterType[] = [
76
78
  {
77
79
  label: 'Title',
78
- operators: PruoductUploadRulesOperators.string,
80
+ operators: ProductUploadRulesOperators.string,
79
81
  value: 'title',
80
82
  },
81
83
  {
82
84
  label: 'Collection',
83
- operators: PruoductUploadRulesOperators.list,
85
+ operators: ProductUploadRulesOperators.list,
84
86
  value: 'collection',
85
87
  },
86
88
  {
87
89
  label: 'Product Type',
88
- operators: PruoductUploadRulesOperators.list,
90
+ operators: ProductUploadRulesOperators.list,
89
91
  value: 'product_type',
90
92
  },
91
93
  {
92
94
  label: 'Vendor',
93
- operators: PruoductUploadRulesOperators.list,
95
+ operators: ProductUploadRulesOperators.list,
94
96
  value: 'vendor',
95
97
  },
96
98
  {
97
99
  label: 'Tag',
98
- operators: PruoductUploadRulesOperators.list,
100
+ operators: ProductUploadRulesOperators.list,
99
101
  value: 'tag',
100
102
  },
101
103
  ];
@@ -113,7 +115,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
113
115
  label: 'Content Language',
114
116
  attribute: 'contentLanguage',
115
117
  type: 'select',
116
- choises: [SOURCE_LANGUAGE],
118
+ choices: [SOURCE_LANGUAGE],
117
119
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
118
120
  description: 'Language for the item',
119
121
  },
@@ -122,7 +124,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
122
124
  label: 'Target Country',
123
125
  attribute: 'targetCountry',
124
126
  type: 'select',
125
- choises: [SOURCE_COUNTRY],
127
+ choices: [SOURCE_COUNTRY],
126
128
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
127
129
  description: 'The item\'s country of sale',
128
130
  },
@@ -131,7 +133,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
131
133
  label: 'Adult',
132
134
  attribute: 'adult',
133
135
  type: 'select',
134
- choises: [
136
+ choices: [
135
137
  { label: 'Yes', value: true },
136
138
  { label: 'No', value: false },
137
139
  ],
@@ -144,7 +146,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
144
146
  label: 'Age Group',
145
147
  attribute: 'ageGroup',
146
148
  type: 'select',
147
- choises: [
149
+ choices: [
148
150
  { label: '0-3 months old', value: 'newborn' },
149
151
  { label: '3-12 months old', value: 'infant' },
150
152
  { label: '1-5 years old', value: 'toddler' },
@@ -159,7 +161,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
159
161
  label: 'Availability',
160
162
  attribute: 'availability',
161
163
  type: 'select',
162
- choises: [
164
+ choices: [
163
165
  { label: 'In Stock', value: 'in_stock' },
164
166
  { label: 'Out Of Stock', value: 'out_of_stock' },
165
167
  { label: 'Preorder', value: 'preorder' },
@@ -176,7 +178,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
176
178
  defaultValue: 'shopify.vendor',
177
179
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
178
180
  description: 'Brand of the item',
179
- choises: [
181
+ choices: [
180
182
  ShopifyProductSource.vendor,
181
183
  SOURCE_VENDORS,
182
184
  ShopifyProductSource.custom,
@@ -187,7 +189,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
187
189
  label: 'Gender',
188
190
  attribute: 'gender',
189
191
  type: 'select',
190
- choises: [
192
+ choices: [
191
193
  { label: 'Male', value: 'male' },
192
194
  { label: 'Female', value: 'female' },
193
195
  { label: 'Unisex', value: 'unisex' },
@@ -200,7 +202,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
200
202
  label: 'Google category',
201
203
  attribute: 'googleProductCategory',
202
204
  type: 'select',
203
- choises: [SOURCE_GOOGLE_CATEGORY],
205
+ choices: [SOURCE_GOOGLE_CATEGORY],
204
206
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
205
207
  description: 'Google\'s category of the item',
206
208
  },
@@ -212,7 +214,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
212
214
  defaultValue: 'shopify.vendor',
213
215
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
214
216
  description: 'Global Trade Item Number (GTIN) of the item',
215
- choises: [
217
+ choices: [
216
218
  ShopifyProductSource.barcode,
217
219
  ShopifyProductSource.sku,
218
220
  { label: 'Custom input', value: SOURCE_CUSTOM },
@@ -226,7 +228,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
226
228
  defaultValue: 'shopify.vendor',
227
229
  rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
228
230
  description: 'Manufacturer Part Number (MPN) of the item',
229
- choises: [
231
+ choices: [
230
232
  ShopifyProductSource.barcode,
231
233
  ShopifyProductSource.sku,
232
234
  { label: 'Custom input', value: SOURCE_CUSTOM },
@@ -237,7 +239,7 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
237
239
  label: 'Included Destinations',
238
240
  attribute: 'includedDestinations',
239
241
  type: 'multiselect',
240
- choises: [
242
+ choices: [
241
243
  { label: 'Shopping ads', value: 'Shopping_ads' },
242
244
  { label: 'Dynamic remarketing ads', value: 'Display_ads' },
243
245
  { label: 'Free listings', value: 'Free_listings' },
@@ -367,3 +369,4 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
367
369
  ];
368
370
  export const CHANNEL = 'online';
369
371
  export const GMC_PRODUCT_ID_TEMPLATE = '{PRODUCT_ID}_{VARIANT_ID}';
372
+ export const ProfileIdTemplateCodes = ['PRODUCT_ID', 'VARIANT_ID', 'COUNTRY', 'LANGUAGE'];
package/src/index.ts CHANGED
@@ -8,4 +8,5 @@ export * from './types/company.types.js';
8
8
 
9
9
  export * from './utils/gmc.js';
10
10
  export * from './utils/profile.js';
11
- export * from './utils/utils.js';
11
+ export * from './utils/utils.js';
12
+ export * from './utils/company.js';
@@ -1,10 +1,14 @@
1
- export type CompanyActionProgress = {
2
- progress: number;
3
- totalCount: number;
4
- name: 'shopify' | 'gmc' | 'issues' | 'shopify-collection';
5
- threadId: string;
1
+ export type ServerSideEvent = {
2
+ shop: string;
3
+ eventID: string;
4
+ type: "progress" | "schedule";
5
+ name: string;
6
+ status?: boolean;
6
7
  };
7
8
 
8
- export type CompanyActivity = CompanyActionProgress & {
9
- shop: string;
10
- };
9
+ export type ServerSideProgressEvent = ServerSideEvent & {
10
+ progress: number;
11
+ totalCount: number;
12
+ };
13
+
14
+ export type ServerSideScheduleEvent = ServerSideEvent;
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  ProductUploadRuleFilters,
3
3
  ProductUploadMappings,
4
+ RuleOperators,
4
5
  } from '../constants/profile.constants.js';
5
- import { RuleOperators } from '../constants/profile.constants.js';
6
6
 
7
- export type ProductUploadRuleOpratorType = {
7
+ export type ProductUploadRuleOperatorType = {
8
8
  label: string;
9
9
  value: string;
10
10
  };
11
11
 
12
12
  export type ProductUploadRuleFilterType = {
13
13
  label: string;
14
- operators: ProductUploadRuleOpratorType[];
14
+ operators: ProductUploadRuleOperatorType[];
15
15
  value: string;
16
16
  disabled?: boolean;
17
17
  };
@@ -26,7 +26,7 @@ export type ProductUploadMapSource = {
26
26
  label: string;
27
27
  attribute: string;
28
28
  type: 'select' | 'multiselect' | 'text' | 'number';
29
- choises?: OptionType[];
29
+ choices?: OptionType[];
30
30
  rules: ProductUploadRuleFilterType['value'][];
31
31
  description?: string;
32
32
  defaultValue?: ValueType;
@@ -39,7 +39,7 @@ export type ProductUploadMapping = {
39
39
  sections: {
40
40
  ruleItems: {
41
41
  attribute: (typeof ProductUploadRuleFilters)[number]['value'];
42
- operator: ProductUploadRuleOpratorType['value'];
42
+ operator: ProductUploadRuleOperatorType['value'];
43
43
  value: string | string[] | number[] | number | boolean;
44
44
  id: string;
45
45
  }[];
@@ -51,6 +51,7 @@ type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
51
51
 
52
52
  export type ProductUploadProfile = {
53
53
  id: string;
54
+ profileIdTemplate: string;
54
55
  name: string;
55
56
  active?: boolean;
56
57
  rules: ProductUploadRules;
@@ -0,0 +1,9 @@
1
+ import { ServerSideEvent, ServerSideProgressEvent, ServerSideScheduleEvent } from '../types/company.types.js';
2
+
3
+ export function isServerSideProgressEvent (event: ServerSideEvent): event is ServerSideProgressEvent {
4
+ return event.type === 'progress';
5
+ }
6
+
7
+ export function isServerSideScheduleEvent (event: ServerSideEvent): event is ServerSideScheduleEvent {
8
+ return event.type === 'schedule';
9
+ }
package/src/utils/gmc.ts CHANGED
@@ -1,69 +1,61 @@
1
- import { GMC_PRODUCT_ID_TEMPLATE } from '../constants/profile.constants.js';
2
-
3
- export function isGmcProductId (productId: string): boolean {
4
- return new RegExp(
5
- GMC_PRODUCT_ID_TEMPLATE.replace('{PRODUCT_ID}', '\\d+').replace(
6
- '{VARIANT_ID}',
7
- '\\d+'
8
- )
9
- ).test(productId);
10
- }
11
-
12
- export function GMCProductIdToShopify (productId: string): number {
13
- const [, , , id] = productId.split(':');
14
- return Number(getProductIdFromGmcId(id));
15
- }
16
-
17
- export function GmcIdParts (gmcProductId: string): {
18
- channel: string;
19
- locale: string;
20
- country: string;
21
- idPart: string;
22
- shopifyId: number;
23
- shopifyVariantId: number;
24
- } {
25
- const [channel, locale, country, idPart] = gmcProductId.split(':');
26
-
27
- if (!channel || !locale || !country || !idPart) {
28
- throw new Error(`${gmcProductId} is not a valid GMC product id`);
29
- }
30
-
31
- return {
32
- channel,
33
- locale,
34
- country,
35
- idPart,
36
- ...getShopifyIdsFromGmcIdPart(idPart),
37
- };
38
- }
39
-
40
- export function makeGmcIdPart (
41
- productId: number | null,
42
- variantId: number | null
43
- ): string {
44
- return GMC_PRODUCT_ID_TEMPLATE.replace(
45
- '{PRODUCT_ID}',
46
- String(productId)
47
- ).replace('{VARIANT_ID}', String(variantId));
48
- }
49
-
50
- export function getShopifyIdsFromGmcIdPart (gmcId: string): {
51
- shopifyId: number;
52
- shopifyVariantId: number;
53
- } {
54
- if (!isGmcProductId(gmcId)) {
55
- throw new Error(`${gmcId} is not a valid GMC product id part`);
56
- }
57
-
58
- const [productId, variantId] = gmcId.split('_');
59
- return { shopifyId: Number(productId), shopifyVariantId: Number(variantId) };
60
- }
61
-
62
- export function getProductIdFromGmcId (gmcId: string): number {
63
- if (!isGmcProductId(gmcId)) {
64
- throw new Error(`${gmcId} is not a valid GMC product id part`);
65
- }
66
-
67
- const [productId] = gmcId.split('_');
68
- return Number(productId);
69
- }
1
+ // export function isGmcProductId (
2
+ // productId: string,
3
+ // profileIdTemplate: string
4
+ // ): boolean {
5
+ // return new RegExp(
6
+ // profileIdTemplate
7
+ // .replace('{PRODUCT_ID}', '\\d+')
8
+ // .replace('{VARIANT_ID}', '\\d+')
9
+ // .replace('{COUNTRY}', '\\w+')
10
+ // .replace('{LANGUAGE}', '\\w+')
11
+ // ).test(productId);
12
+ // }
13
+
14
+ // export function GMCProductIdToShopify (productId: string, profileIdTemplate: string): number {
15
+ // const [, , , id] = productId.split(':');
16
+ // return Number(getProductIdFromGmcId(id, profileIdTemplate));
17
+ // }
18
+
19
+ // export function GmcIdParts (gmcProductId: string, profileIdTemplate: string): {
20
+ // channel: string;
21
+ // locale: string;
22
+ // country: string;
23
+ // idPart: string;
24
+ // shopifyId: number;
25
+ // shopifyVariantId: number;
26
+ // } {
27
+ // const [channel, locale, country, idPart] = gmcProductId.split(':');
28
+
29
+ // if (!channel || !locale || !country || !idPart) {
30
+ // throw new Error(`${gmcProductId} is not a valid GMC product id`);
31
+ // }
32
+
33
+ // return {
34
+ // channel,
35
+ // locale,
36
+ // country,
37
+ // idPart,
38
+ // ...getShopifyIdsFromGmcIdPart(idPart, profileIdTemplate),
39
+ // };
40
+ // }
41
+
42
+ // export function getShopifyIdsFromGmcIdPart (gmcId: string, profileIdTemplate: string): {
43
+ // shopifyId: number;
44
+ // shopifyVariantId: number;
45
+ // } {
46
+ // if (!isGmcProductId(gmcId, profileIdTemplate)) {
47
+ // throw new Error(`${gmcId} is not a valid GMC product id part`);
48
+ // }
49
+
50
+ // const [productId, variantId] = gmcId.split('_');
51
+ // return { shopifyId: Number(productId), shopifyVariantId: Number(variantId) };
52
+ // }
53
+
54
+ // export function getProductIdFromGmcId (gmcId: string, profileIdTemplate: string): number {
55
+ // if (!isGmcProductId(gmcId, profileIdTemplate)) {
56
+ // throw new Error(`${gmcId} is not a valid GMC product id part`);
57
+ // }
58
+
59
+ // const [productId] = gmcId.split('_');
60
+ // return Number(productId);
61
+ // }
@@ -1,9 +0,0 @@
1
- rm -R /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/dist/
2
- rm -R /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/src/
3
- cp -R dist/ /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/
4
- cp -R src/ /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/
5
-
6
- rm -R /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/dist/
7
- rm -R /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/src/
8
- cp -R dist/ /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/
9
- cp -R src/ /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/