ecomcoder-cli 1.2.12 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +293 -0
  2. package/dist/__tests__/test-utils.d.ts +123 -0
  3. package/dist/__tests__/test-utils.d.ts.map +1 -0
  4. package/dist/__tests__/test-utils.js +133 -0
  5. package/dist/__tests__/test-utils.js.map +1 -0
  6. package/dist/cli.d.ts +8 -7
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +70 -65
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/docs/index.d.ts +10 -0
  11. package/dist/commands/docs/index.d.ts.map +1 -0
  12. package/dist/commands/docs/index.js +43 -0
  13. package/dist/commands/docs/index.js.map +1 -0
  14. package/dist/commands/metafield/index.d.ts +10 -0
  15. package/dist/commands/metafield/index.d.ts.map +1 -0
  16. package/dist/commands/metafield/index.js +55 -0
  17. package/dist/commands/metafield/index.js.map +1 -0
  18. package/dist/commands/product/__tests__/service.test.d.ts +7 -0
  19. package/dist/commands/product/__tests__/service.test.d.ts.map +1 -0
  20. package/dist/commands/product/__tests__/service.test.js +299 -0
  21. package/dist/commands/product/__tests__/service.test.js.map +1 -0
  22. package/dist/commands/product/__tests__/update-description.test.d.ts +5 -0
  23. package/dist/commands/product/__tests__/update-description.test.d.ts.map +1 -0
  24. package/dist/commands/product/__tests__/update-description.test.js +110 -0
  25. package/dist/commands/product/__tests__/update-description.test.js.map +1 -0
  26. package/dist/commands/product/get.d.ts +2 -0
  27. package/dist/commands/product/get.d.ts.map +1 -0
  28. package/dist/commands/product/get.js +305 -0
  29. package/dist/commands/product/get.js.map +1 -0
  30. package/dist/commands/product/index.d.ts +10 -0
  31. package/dist/commands/product/index.d.ts.map +1 -0
  32. package/dist/commands/product/index.js +73 -0
  33. package/dist/commands/product/index.js.map +1 -0
  34. package/dist/commands/product/queries.d.ts +32 -0
  35. package/dist/commands/product/queries.d.ts.map +1 -0
  36. package/dist/commands/product/queries.js +195 -0
  37. package/dist/commands/product/queries.js.map +1 -0
  38. package/dist/commands/product/service.d.ts +51 -0
  39. package/dist/commands/product/service.d.ts.map +1 -0
  40. package/dist/commands/product/service.js +237 -0
  41. package/dist/commands/product/service.js.map +1 -0
  42. package/dist/commands/product/types.d.ts +165 -0
  43. package/dist/commands/product/types.d.ts.map +1 -0
  44. package/dist/commands/product/types.js +6 -0
  45. package/dist/commands/product/types.js.map +1 -0
  46. package/dist/commands/product/update-description.d.ts +8 -0
  47. package/dist/commands/product/update-description.d.ts.map +1 -0
  48. package/dist/commands/product/update-description.js +86 -0
  49. package/dist/commands/product/update-description.js.map +1 -0
  50. package/dist/commands/product/update-price.d.ts +8 -0
  51. package/dist/commands/product/update-price.d.ts.map +1 -0
  52. package/dist/commands/product/update-price.js +101 -0
  53. package/dist/commands/product/update-price.js.map +1 -0
  54. package/dist/commands/product/update-template.d.ts +8 -0
  55. package/dist/commands/product/update-template.d.ts.map +1 -0
  56. package/dist/commands/product/update-template.js +114 -0
  57. package/dist/commands/product/update-template.js.map +1 -0
  58. package/dist/commands/product/utils.d.ts +69 -0
  59. package/dist/commands/product/utils.d.ts.map +1 -0
  60. package/dist/commands/product/utils.js +180 -0
  61. package/dist/commands/product/utils.js.map +1 -0
  62. package/dist/commands/products/index.d.ts +10 -0
  63. package/dist/commands/products/index.d.ts.map +1 -0
  64. package/dist/commands/products/index.js +62 -0
  65. package/dist/commands/products/index.js.map +1 -0
  66. package/dist/lib/api-client.d.ts.map +1 -1
  67. package/dist/lib/api-client.js +11 -0
  68. package/dist/lib/api-client.js.map +1 -1
  69. package/dist/lib/args-parser.d.ts.map +1 -1
  70. package/dist/lib/args-parser.js +2 -1
  71. package/dist/lib/args-parser.js.map +1 -1
  72. package/dist/lib/command-registry.d.ts +64 -0
  73. package/dist/lib/command-registry.d.ts.map +1 -0
  74. package/dist/lib/command-registry.js +76 -0
  75. package/dist/lib/command-registry.js.map +1 -0
  76. package/package.json +11 -3
  77. package/dist/lib/gemini-client.d.ts +0 -6
  78. package/dist/lib/gemini-client.d.ts.map +0 -1
  79. package/dist/lib/gemini-client.js +0 -27
  80. package/dist/lib/gemini-client.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-description.d.ts","sourceRoot":"","sources":["../../../src/commands/product/update-description.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuCH,wBAAsB,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,iBAkD/D"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Update Product Description Command
3
+ *
4
+ * Following Command Pattern - thin orchestration layer
5
+ * Delegates business logic to ProductService
6
+ */
7
+ import { getCredentials, getSessionId } from '../../lib/api-client.js';
8
+ import { parseArgs, hasHelpFlag } from '../../lib/args-parser.js';
9
+ import { ProductService } from './service.js';
10
+ function showHelp() {
11
+ console.log(`
12
+ Update Product Description
13
+
14
+ USAGE:
15
+ ecomcoder product update-description [OPTIONS]
16
+
17
+ OPTIONS:
18
+ --id <id> Product ID (required)
19
+ --description <text> New description (required)
20
+ --html Treat description as HTML (default: plain text wrapped in <p> tags)
21
+ --session-id Session ID (auto-provided via SESSION_ID env var)
22
+ --help, -h Show this help message
23
+
24
+ EXAMPLES:
25
+ # Update plain text description (auto-wrapped in <p> tags)
26
+ ecomcoder product update-description --id=123456789 --description="Premium cotton t-shirt"
27
+
28
+ # Update HTML description
29
+ ecomcoder product update-description --id=123 --description="<p>Premium <strong>cotton</strong> t-shirt</p>" --html
30
+
31
+ # Clear description
32
+ ecomcoder product update-description --id=123 --description=""
33
+
34
+ NOTES:
35
+ - Shopify stores all descriptions as HTML (descriptionHtml field)
36
+ - Plain text is automatically wrapped in <p> tags
37
+ - Use --html flag to prevent auto-wrapping if you're providing full HTML
38
+ - Empty description will clear the product description
39
+ `);
40
+ process.exit(0);
41
+ }
42
+ export async function run(argv = process.argv.slice(2)) {
43
+ if (hasHelpFlag(argv)) {
44
+ showHelp();
45
+ }
46
+ const args = parseArgs(argv);
47
+ // Validate required arguments
48
+ if (!args.id) {
49
+ console.error(JSON.stringify({
50
+ success: false,
51
+ error: 'Missing required argument: --id'
52
+ }));
53
+ process.exit(1);
54
+ }
55
+ if (args.description === undefined) {
56
+ console.error(JSON.stringify({
57
+ success: false,
58
+ error: 'Missing required argument: --description'
59
+ }));
60
+ process.exit(1);
61
+ }
62
+ try {
63
+ // Get credentials
64
+ const sessionId = getSessionId(args.sessionId);
65
+ const credentials = await getCredentials(sessionId, args.backendUrl, args.jwt);
66
+ // Execute update via service
67
+ const result = await ProductService.updateDescription(credentials, {
68
+ id: args.id,
69
+ description: args.description,
70
+ isHtml: !!args.html
71
+ });
72
+ // Output result
73
+ console.log(JSON.stringify(result));
74
+ if (!result.success) {
75
+ process.exit(1);
76
+ }
77
+ }
78
+ catch (error) {
79
+ console.error(JSON.stringify({
80
+ success: false,
81
+ error: error instanceof Error ? error.message : 'Unknown error'
82
+ }));
83
+ process.exit(1);
84
+ }
85
+ }
86
+ //# sourceMappingURL=update-description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-description.js","sourceRoot":"","sources":["../../../src/commands/product/update-description.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,SAAS,QAAQ;IACf,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bb,CAAC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CA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AAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3B,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC,CAAC,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Update Product Price Command
3
+ *
4
+ * Following Command Pattern - thin orchestration layer
5
+ * Delegates business logic to ProductService
6
+ */
7
+ export declare function run(argv?: string[]): Promise<void>;
8
+ //# sourceMappingURL=update-price.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-price.d.ts","sourceRoot":"","sources":["../../../src/commands/product/update-price.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoDH,wBAAsB,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,iBAoD/D"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Update Product Price Command
3
+ *
4
+ * Following Command Pattern - thin orchestration layer
5
+ * Delegates business logic to ProductService
6
+ */
7
+ import { getCredentials, getSessionId } from '../../lib/api-client.js';
8
+ import { parseArgs, hasHelpFlag } from '../../lib/args-parser.js';
9
+ import { ProductService } from './service.js';
10
+ function showHelp() {
11
+ console.log(`
12
+ Update Product Price
13
+
14
+ USAGE:
15
+ ecomcoder product update-price [OPTIONS]
16
+
17
+ OPTIONS:
18
+ --id <id> Product ID (required)
19
+ --price <amount> New price (required)
20
+ --variant-id <id> Specific variant ID (optional)
21
+ --all-variants Update ALL variants to the same price (optional)
22
+ --compare-at-price <amount> Compare at price / original price (optional)
23
+ --session-id Session ID (auto-provided via SESSION_ID env var)
24
+ --help, -h Show this help message
25
+
26
+ EXAMPLES:
27
+ # Update price of single-variant product
28
+ ecomcoder product update-price --id=123456789 --price=34.99
29
+
30
+ # Update ALL variants at once (efficient for multi-variant products)
31
+ ecomcoder product update-price --id=123 --price=29.99 --all-variants
32
+
33
+ # Add sale pricing to all variants
34
+ ecomcoder product update-price --id=123 --price=24.99 --compare-at-price=39.99 --all-variants
35
+
36
+ # Update specific variant
37
+ ecomcoder product update-price --id=123 --variant-id=456 --price=32.99
38
+
39
+ # Remove compare-at price from all variants
40
+ ecomcoder product update-price --id=123 --price=29.99 --compare-at-price="" --all-variants
41
+
42
+ NOTES:
43
+ - Uses Shopify's productVariantsBulkUpdate API (current standard)
44
+ - If product has multiple variants, use --all-variants or --variant-id
45
+ - --all-variants updates all variants in ONE API call (fast & efficient)
46
+ - Price must be a positive number with max 2 decimal places
47
+ - Compare-at price is optional and used for showing "was $X, now $Y"
48
+ - Empty compare-at price ("") will remove the sale pricing
49
+
50
+ API REFERENCE:
51
+ https://shopify.dev/docs/api/admin-graphql/latest/mutations/productvariantsbulkupdate
52
+ `);
53
+ process.exit(0);
54
+ }
55
+ export async function run(argv = process.argv.slice(2)) {
56
+ if (hasHelpFlag(argv)) {
57
+ showHelp();
58
+ }
59
+ const args = parseArgs(argv);
60
+ // Validate required arguments
61
+ if (!args.id) {
62
+ console.error(JSON.stringify({
63
+ success: false,
64
+ error: 'Missing required argument: --id'
65
+ }));
66
+ process.exit(1);
67
+ }
68
+ if (!args.price) {
69
+ console.error(JSON.stringify({
70
+ success: false,
71
+ error: 'Missing required argument: --price'
72
+ }));
73
+ process.exit(1);
74
+ }
75
+ try {
76
+ // Get credentials
77
+ const sessionId = getSessionId(args.sessionId);
78
+ const credentials = await getCredentials(sessionId, args.backendUrl, args.jwt);
79
+ // Execute update via service
80
+ const result = await ProductService.updatePrice(credentials, {
81
+ id: args.id,
82
+ price: args.price,
83
+ variantId: args.variantId,
84
+ compareAtPrice: args.compareAtPrice,
85
+ allVariants: !!args.allVariants
86
+ });
87
+ // Output result
88
+ console.log(JSON.stringify(result));
89
+ if (!result.success) {
90
+ process.exit(1);
91
+ }
92
+ }
93
+ catch (error) {
94
+ console.error(JSON.stringify({
95
+ success: false,
96
+ error: error instanceof Error ? error.message : 'Unknown error'
97
+ }));
98
+ process.exit(1);
99
+ }
100
+ }
101
+ //# sourceMappingURL=update-price.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-price.js","sourceRoot":"","sources":["../../../src/commands/product/update-price.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,SAAS,QAAQ;IACf,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCb,CAAC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,QAAQ,EAAE,CAAC;IACb,CAAC;IAED,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAE7B,8BAA8B;IAC9B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3B,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,iCAAiC;SACzC,CAAC,CAAC,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3B,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,oCAAoC;SAC5C,CAAC,CAAC,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACH,kBAAkB;QAClB,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAE/E,6BAA6B;QAC7B,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE;YAC3D,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW;SAChC,CAAC,CAAC;QAEH,gBAAgB;QAChB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QAEpC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3B,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC,CAAC,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Update Product Template Command
3
+ *
4
+ * Following Command Pattern - thin orchestration layer
5
+ * Delegates business logic to ProductService
6
+ */
7
+ export declare function run(argv?: string[]): Promise<void>;
8
+ //# sourceMappingURL=update-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-template.d.ts","sourceRoot":"","sources":["../../../src/commands/product/update-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsDH,wBAAsB,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,iBAkE/D"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Update Product Template Command
3
+ *
4
+ * Following Command Pattern - thin orchestration layer
5
+ * Delegates business logic to ProductService
6
+ */
7
+ import { getCredentials, getSessionId } from '../../lib/api-client.js';
8
+ import { parseArgs, hasHelpFlag } from '../../lib/args-parser.js';
9
+ import { ProductService } from './service.js';
10
+ function showHelp() {
11
+ console.log(`
12
+ Update Product Template Assignment
13
+
14
+ USAGE:
15
+ ecomcoder product update-template [OPTIONS]
16
+
17
+ OPTIONS:
18
+ --id <id> Product ID (required)
19
+ --template <name> Template name (required)
20
+ --session-id Session ID (auto-provided via SESSION_ID env var)
21
+ --help, -h Show this help message
22
+
23
+ EXAMPLES:
24
+ # Assign custom template
25
+ ecomcoder product update-template --id=123456789 --template=custom
26
+
27
+ # Same as above (handles "product." prefix automatically)
28
+ ecomcoder product update-template --id=123 --template=product.custom
29
+
30
+ # Reset to default template
31
+ ecomcoder product update-template --id=123 --template=default
32
+
33
+ # Assign premium template
34
+ ecomcoder product update-template --id=123 --template=premium
35
+
36
+ TEMPLATE NAMING:
37
+ - "default" → Uses templates/product.json
38
+ - "custom" → Uses templates/product.custom.json
39
+ - "product.custom" → Same as "custom" (prefix is stripped)
40
+
41
+ NOTES:
42
+ ⚠️ IMPORTANT: Changing template is a BACKEND/CODE operation
43
+ - Template determines which page layout Shopify uses to render the product
44
+ - You must create the template file BEFORE assigning it to a product
45
+ - If template file doesn't exist, product page may not render correctly
46
+
47
+ WORKFLOW FOR NEW TEMPLATE:
48
+ 1. Create template file: templates/product.premium.json
49
+ 2. Design the layout (add sections, customize)
50
+ 3. Assign to product: ecomcoder product update-template --id=123 --template=premium
51
+
52
+ This keeps the original template intact while giving specific products custom designs.
53
+ `);
54
+ process.exit(0);
55
+ }
56
+ export async function run(argv = process.argv.slice(2)) {
57
+ if (hasHelpFlag(argv)) {
58
+ showHelp();
59
+ }
60
+ const args = parseArgs(argv);
61
+ // Validate required arguments
62
+ if (!args.id) {
63
+ console.error(JSON.stringify({
64
+ success: false,
65
+ error: 'Missing required argument: --id'
66
+ }));
67
+ process.exit(1);
68
+ }
69
+ if (!args.template) {
70
+ console.error(JSON.stringify({
71
+ success: false,
72
+ error: 'Missing required argument: --template'
73
+ }));
74
+ process.exit(1);
75
+ }
76
+ try {
77
+ // Get credentials
78
+ const sessionId = getSessionId(args.sessionId);
79
+ const credentials = await getCredentials(sessionId, args.backendUrl, args.jwt);
80
+ // Execute update via service
81
+ const result = await ProductService.updateTemplate(credentials, {
82
+ id: args.id,
83
+ template: args.template
84
+ });
85
+ // Add template file warning to successful response
86
+ let outputResult = result;
87
+ if (result.success && result.data) {
88
+ const templateName = result.data.product.template;
89
+ const templateFile = templateName === 'product'
90
+ ? 'templates/product.json'
91
+ : `templates/${templateName}.json`;
92
+ outputResult = {
93
+ ...result,
94
+ data: {
95
+ ...result.data,
96
+ warning: `⚠️ Make sure the template file exists: ${templateFile}`
97
+ }
98
+ };
99
+ }
100
+ // Output result
101
+ console.log(JSON.stringify(outputResult));
102
+ if (!result.success) {
103
+ process.exit(1);
104
+ }
105
+ }
106
+ catch (error) {
107
+ console.error(JSON.stringify({
108
+ success: false,
109
+ error: error instanceof Error ? error.message : 'Unknown error'
110
+ }));
111
+ process.exit(1);
112
+ }
113
+ }
114
+ //# sourceMappingURL=update-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-template.js","sourceRoot":"","sources":["../../../src/commands/product/update-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,SAAS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GAAG,MAAM,cAAc,CAAC,cAAc,CAAC,WAAW,EAAE;YAC9D,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,mDAAmD;QACnD,IAAI,YAAY,GAAG,MAAM,CAAC;QAC1B,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAClC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YAClD,MAAM,YAAY,GAAG,YAAY,KAAK,SAAS;gBAC7C,CAAC,CAAC,wBAAwB;gBAC1B,CAAC,CAAC,aAAa,YAAY,OAAO,CAAC;YAErC,YAAY,GAAG;gBACb,GAAG,MAAM;gBACT,IAAI,EAAE;oBACJ,GAAG,MAAM,CAAC,IAAI;oBACd,OAAO,EAAE,2CAA2C,YAAY,EAAE;iBACnE;aACK,CAAC;QACX,CAAC;QAED,gBAAgB;QAChB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;QAE1C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3B,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC,CAAC,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Product Utilities
3
+ *
4
+ * Following Single Responsibility Principle - each function has one clear purpose
5
+ */
6
+ import type { ShopifyProduct, FormattedProduct, NormalizedId, ShopifyUserError } from './types.js';
7
+ /**
8
+ * Normalize product ID to Shopify GID format
9
+ *
10
+ * Accepts:
11
+ * - Numeric ID: "123456789"
12
+ * - Full GID: "gid://shopify/Product/123456789"
13
+ *
14
+ * Returns both formats for flexibility
15
+ */
16
+ export declare function normalizeProductId(id: string): NormalizedId;
17
+ /**
18
+ * Normalize variant ID to Shopify GID format
19
+ */
20
+ export declare function normalizeVariantId(id: string): NormalizedId;
21
+ /**
22
+ * Normalize template name
23
+ *
24
+ * Handles:
25
+ * - "default" -> null (uses product.json)
26
+ * - "custom" -> "custom" (uses product.custom.json)
27
+ * - "product.custom" -> "custom" (removes prefix)
28
+ */
29
+ export declare function normalizeTemplateName(template: string): string | null;
30
+ /**
31
+ * Format template for display
32
+ *
33
+ * null -> "product"
34
+ * "custom" -> "product.custom"
35
+ */
36
+ export declare function formatTemplateForDisplay(templateSuffix: string | null): string;
37
+ /**
38
+ * Format product data for CLI output
39
+ *
40
+ * Transforms Shopify GraphQL response to clean, user-friendly format
41
+ */
42
+ export declare function formatProduct(product: ShopifyProduct): FormattedProduct;
43
+ /**
44
+ * Validate price format
45
+ *
46
+ * Returns true if price is valid (positive number with max 2 decimal places)
47
+ */
48
+ export declare function isValidPrice(price: string): boolean;
49
+ /**
50
+ * Format Shopify user errors for display
51
+ */
52
+ export declare function formatUserErrors(errors: ShopifyUserError[]): string;
53
+ /**
54
+ * Check if GraphQL response has errors
55
+ */
56
+ export declare function hasGraphQLErrors(response: any): boolean;
57
+ /**
58
+ * Extract GraphQL error messages
59
+ */
60
+ export declare function extractGraphQLErrors(response: any): string;
61
+ /**
62
+ * Validate product ID format
63
+ */
64
+ export declare function isValidProductId(id: string): boolean;
65
+ /**
66
+ * Validate variant ID format
67
+ */
68
+ export declare function isValidVariantId(id: string): boolean;
69
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/commands/product/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,CAa3D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,CAa3D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUrE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAK9E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,gBAAgB,CAgCvE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQnD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAOnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,GAAG,GAAG,MAAM,CAQ1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAYpD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAYpD"}
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Product Utilities
3
+ *
4
+ * Following Single Responsibility Principle - each function has one clear purpose
5
+ */
6
+ /**
7
+ * Normalize product ID to Shopify GID format
8
+ *
9
+ * Accepts:
10
+ * - Numeric ID: "123456789"
11
+ * - Full GID: "gid://shopify/Product/123456789"
12
+ *
13
+ * Returns both formats for flexibility
14
+ */
15
+ export function normalizeProductId(id) {
16
+ if (id.startsWith('gid://shopify/Product/')) {
17
+ const numeric = id.split('/').pop() || '';
18
+ return {
19
+ gid: id,
20
+ numeric
21
+ };
22
+ }
23
+ return {
24
+ gid: `gid://shopify/Product/${id}`,
25
+ numeric: id
26
+ };
27
+ }
28
+ /**
29
+ * Normalize variant ID to Shopify GID format
30
+ */
31
+ export function normalizeVariantId(id) {
32
+ if (id.startsWith('gid://shopify/ProductVariant/')) {
33
+ const numeric = id.split('/').pop() || '';
34
+ return {
35
+ gid: id,
36
+ numeric
37
+ };
38
+ }
39
+ return {
40
+ gid: `gid://shopify/ProductVariant/${id}`,
41
+ numeric: id
42
+ };
43
+ }
44
+ /**
45
+ * Normalize template name
46
+ *
47
+ * Handles:
48
+ * - "default" -> null (uses product.json)
49
+ * - "custom" -> "custom" (uses product.custom.json)
50
+ * - "product.custom" -> "custom" (removes prefix)
51
+ */
52
+ export function normalizeTemplateName(template) {
53
+ if (template === 'default') {
54
+ return null;
55
+ }
56
+ if (template.startsWith('product.')) {
57
+ return template.replace('product.', '');
58
+ }
59
+ return template;
60
+ }
61
+ /**
62
+ * Format template for display
63
+ *
64
+ * null -> "product"
65
+ * "custom" -> "product.custom"
66
+ */
67
+ export function formatTemplateForDisplay(templateSuffix) {
68
+ if (!templateSuffix) {
69
+ return 'product';
70
+ }
71
+ return `product.${templateSuffix}`;
72
+ }
73
+ /**
74
+ * Format product data for CLI output
75
+ *
76
+ * Transforms Shopify GraphQL response to clean, user-friendly format
77
+ */
78
+ export function formatProduct(product) {
79
+ return {
80
+ id: product.id,
81
+ title: product.title,
82
+ description: product.description,
83
+ handle: product.handle,
84
+ status: product.status,
85
+ productType: product.productType,
86
+ vendor: product.vendor,
87
+ template: formatTemplateForDisplay(product.templateSuffix),
88
+ tags: product.tags,
89
+ priceRange: {
90
+ min: product.priceRangeV2.minVariantPrice,
91
+ max: product.priceRangeV2.maxVariantPrice
92
+ },
93
+ variants: product.variants.edges.map(e => ({
94
+ id: e.node.id,
95
+ title: e.node.title,
96
+ price: e.node.price,
97
+ compareAtPrice: e.node.compareAtPrice,
98
+ sku: e.node.sku,
99
+ inventory: e.node.inventoryQuantity,
100
+ available: e.node.availableForSale
101
+ })),
102
+ images: product.images.edges.map(e => ({
103
+ id: e.node.id,
104
+ url: e.node.url,
105
+ altText: e.node.altText,
106
+ width: e.node.width,
107
+ height: e.node.height
108
+ }))
109
+ };
110
+ }
111
+ /**
112
+ * Validate price format
113
+ *
114
+ * Returns true if price is valid (positive number with max 2 decimal places)
115
+ */
116
+ export function isValidPrice(price) {
117
+ const priceRegex = /^\d+(\.\d{1,2})?$/;
118
+ if (!priceRegex.test(price)) {
119
+ return false;
120
+ }
121
+ const numPrice = parseFloat(price);
122
+ return numPrice > 0;
123
+ }
124
+ /**
125
+ * Format Shopify user errors for display
126
+ */
127
+ export function formatUserErrors(errors) {
128
+ return errors
129
+ .map(err => {
130
+ const field = err.field ? err.field.join('.') : 'unknown';
131
+ return `${field}: ${err.message}`;
132
+ })
133
+ .join('\n');
134
+ }
135
+ /**
136
+ * Check if GraphQL response has errors
137
+ */
138
+ export function hasGraphQLErrors(response) {
139
+ return response.errors && response.errors.length > 0;
140
+ }
141
+ /**
142
+ * Extract GraphQL error messages
143
+ */
144
+ export function extractGraphQLErrors(response) {
145
+ if (!hasGraphQLErrors(response)) {
146
+ return '';
147
+ }
148
+ return response.errors
149
+ .map((e) => e.message)
150
+ .join(', ');
151
+ }
152
+ /**
153
+ * Validate product ID format
154
+ */
155
+ export function isValidProductId(id) {
156
+ // Accept numeric ID or full GID
157
+ if (/^\d+$/.test(id)) {
158
+ return true;
159
+ }
160
+ if (id.startsWith('gid://shopify/Product/')) {
161
+ const numeric = id.split('/').pop();
162
+ return !!numeric && /^\d+$/.test(numeric);
163
+ }
164
+ return false;
165
+ }
166
+ /**
167
+ * Validate variant ID format
168
+ */
169
+ export function isValidVariantId(id) {
170
+ // Accept numeric ID or full GID
171
+ if (/^\d+$/.test(id)) {
172
+ return true;
173
+ }
174
+ if (id.startsWith('gid://shopify/ProductVariant/')) {
175
+ const numeric = id.split('/').pop();
176
+ return !!numeric && /^\d+$/.test(numeric);
177
+ }
178
+ return false;
179
+ }
180
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/commands/product/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,IAAI,EAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QAC1C,OAAO;YACL,GAAG,EAAE,EAAE;YACP,OAAO;SACR,CAAC;IACJ,CAAC;IAED,OAAO;QACL,GAAG,EAAE,yBAAyB,EAAE,EAAE;QAClC,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,IAAI,EAAE,CAAC,UAAU,CAAC,+BAA+B,CAAC,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QAC1C,OAAO;YACL,GAAG,EAAE,EAAE;YACP,OAAO;SACR,CAAC;IACJ,CAAC;IAED,OAAO;QACL,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IACpD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,QAAQ,CAAC,UAAU,CAAC,UAA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Open/Closed Principle - commands register themselves
5
+ */
6
+ /**
7
+ * Register all products commands
8
+ */
9
+ export declare function registerProductsCommands(): void;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/products/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAsD/C"}