@salesforce/b2c-cli 0.0.0-nightly.20260119053920

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 (169) hide show
  1. package/README.md +222 -0
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +17 -0
  4. package/bin/run.cmd +3 -0
  5. package/bin/run.js +17 -0
  6. package/dist/commands/_test/index.d.ts +6 -0
  7. package/dist/commands/_test/index.js +39 -0
  8. package/dist/commands/_test/index.js.map +1 -0
  9. package/dist/commands/auth/token.d.ts +16 -0
  10. package/dist/commands/auth/token.js +35 -0
  11. package/dist/commands/auth/token.js.map +1 -0
  12. package/dist/commands/code/activate.d.ts +33 -0
  13. package/dist/commands/code/activate.js +83 -0
  14. package/dist/commands/code/activate.js.map +1 -0
  15. package/dist/commands/code/delete.d.ts +33 -0
  16. package/dist/commands/code/delete.js +67 -0
  17. package/dist/commands/code/delete.js.map +1 -0
  18. package/dist/commands/code/deploy.d.ts +38 -0
  19. package/dist/commands/code/deploy.js +141 -0
  20. package/dist/commands/code/deploy.js.map +1 -0
  21. package/dist/commands/code/list.d.ts +8 -0
  22. package/dist/commands/code/list.js +64 -0
  23. package/dist/commands/code/list.js.map +1 -0
  24. package/dist/commands/code/watch.d.ts +34 -0
  25. package/dist/commands/code/watch.js +70 -0
  26. package/dist/commands/code/watch.js.map +1 -0
  27. package/dist/commands/docs/download.d.ts +35 -0
  28. package/dist/commands/docs/download.js +58 -0
  29. package/dist/commands/docs/download.js.map +1 -0
  30. package/dist/commands/docs/read.d.ts +29 -0
  31. package/dist/commands/docs/read.js +70 -0
  32. package/dist/commands/docs/read.js.map +1 -0
  33. package/dist/commands/docs/schema.d.ts +32 -0
  34. package/dist/commands/docs/schema.js +68 -0
  35. package/dist/commands/docs/schema.js.map +1 -0
  36. package/dist/commands/docs/search.d.ts +33 -0
  37. package/dist/commands/docs/search.js +102 -0
  38. package/dist/commands/docs/search.js.map +1 -0
  39. package/dist/commands/job/export.d.ts +50 -0
  40. package/dist/commands/job/export.js +270 -0
  41. package/dist/commands/job/export.js.map +1 -0
  42. package/dist/commands/job/import.d.ts +38 -0
  43. package/dist/commands/job/import.js +143 -0
  44. package/dist/commands/job/import.js.map +1 -0
  45. package/dist/commands/job/run.d.ts +45 -0
  46. package/dist/commands/job/run.js +205 -0
  47. package/dist/commands/job/run.js.map +1 -0
  48. package/dist/commands/job/search.d.ts +37 -0
  49. package/dist/commands/job/search.js +102 -0
  50. package/dist/commands/job/search.js.map +1 -0
  51. package/dist/commands/job/wait.d.ts +38 -0
  52. package/dist/commands/job/wait.js +85 -0
  53. package/dist/commands/job/wait.js.map +1 -0
  54. package/dist/commands/mrt/env/create.d.ts +41 -0
  55. package/dist/commands/mrt/env/create.js +226 -0
  56. package/dist/commands/mrt/env/create.js.map +1 -0
  57. package/dist/commands/mrt/env/delete.d.ts +34 -0
  58. package/dist/commands/mrt/env/delete.js +94 -0
  59. package/dist/commands/mrt/env/delete.js.map +1 -0
  60. package/dist/commands/mrt/env/var/delete.d.ts +34 -0
  61. package/dist/commands/mrt/env/var/delete.js +53 -0
  62. package/dist/commands/mrt/env/var/delete.js.map +1 -0
  63. package/dist/commands/mrt/env/var/list.d.ts +28 -0
  64. package/dist/commands/mrt/env/var/list.js +71 -0
  65. package/dist/commands/mrt/env/var/list.js.map +1 -0
  66. package/dist/commands/mrt/env/var/set.d.ts +35 -0
  67. package/dist/commands/mrt/env/var/set.js +84 -0
  68. package/dist/commands/mrt/env/var/set.js.map +1 -0
  69. package/dist/commands/mrt/push.d.ts +37 -0
  70. package/dist/commands/mrt/push.js +122 -0
  71. package/dist/commands/mrt/push.js.map +1 -0
  72. package/dist/commands/ods/create.d.ts +42 -0
  73. package/dist/commands/ods/create.js +255 -0
  74. package/dist/commands/ods/create.js.map +1 -0
  75. package/dist/commands/ods/delete.d.ts +15 -0
  76. package/dist/commands/ods/delete.js +86 -0
  77. package/dist/commands/ods/delete.js.map +1 -0
  78. package/dist/commands/ods/get.d.ts +17 -0
  79. package/dist/commands/ods/get.js +99 -0
  80. package/dist/commands/ods/get.js.map +1 -0
  81. package/dist/commands/ods/info.d.ts +27 -0
  82. package/dist/commands/ods/info.js +109 -0
  83. package/dist/commands/ods/info.js.map +1 -0
  84. package/dist/commands/ods/list.d.ts +31 -0
  85. package/dist/commands/ods/list.js +166 -0
  86. package/dist/commands/ods/list.js.map +1 -0
  87. package/dist/commands/ods/restart.d.ts +16 -0
  88. package/dist/commands/ods/restart.js +51 -0
  89. package/dist/commands/ods/restart.js.map +1 -0
  90. package/dist/commands/ods/start.d.ts +16 -0
  91. package/dist/commands/ods/start.js +51 -0
  92. package/dist/commands/ods/start.js.map +1 -0
  93. package/dist/commands/ods/stop.d.ts +16 -0
  94. package/dist/commands/ods/stop.js +51 -0
  95. package/dist/commands/ods/stop.js.map +1 -0
  96. package/dist/commands/scapi/custom/status.d.ts +81 -0
  97. package/dist/commands/scapi/custom/status.js +321 -0
  98. package/dist/commands/scapi/custom/status.js.map +1 -0
  99. package/dist/commands/scapi/schemas/get.d.ts +86 -0
  100. package/dist/commands/scapi/schemas/get.js +317 -0
  101. package/dist/commands/scapi/schemas/get.js.map +1 -0
  102. package/dist/commands/scapi/schemas/list.d.ts +48 -0
  103. package/dist/commands/scapi/schemas/list.js +148 -0
  104. package/dist/commands/scapi/schemas/list.js.map +1 -0
  105. package/dist/commands/sites/list.d.ts +10 -0
  106. package/dist/commands/sites/list.js +56 -0
  107. package/dist/commands/sites/list.js.map +1 -0
  108. package/dist/commands/slas/client/create.d.ts +38 -0
  109. package/dist/commands/slas/client/create.js +168 -0
  110. package/dist/commands/slas/client/create.js.map +1 -0
  111. package/dist/commands/slas/client/delete.d.ts +34 -0
  112. package/dist/commands/slas/client/delete.js +54 -0
  113. package/dist/commands/slas/client/delete.js.map +1 -0
  114. package/dist/commands/slas/client/get.d.ts +29 -0
  115. package/dist/commands/slas/client/get.js +51 -0
  116. package/dist/commands/slas/client/get.js.map +1 -0
  117. package/dist/commands/slas/client/list.d.ts +30 -0
  118. package/dist/commands/slas/client/list.js +64 -0
  119. package/dist/commands/slas/client/list.js.map +1 -0
  120. package/dist/commands/slas/client/open.d.ts +25 -0
  121. package/dist/commands/slas/client/open.js +56 -0
  122. package/dist/commands/slas/client/open.js.map +1 -0
  123. package/dist/commands/slas/client/update.d.ts +60 -0
  124. package/dist/commands/slas/client/update.js +183 -0
  125. package/dist/commands/slas/client/update.js.map +1 -0
  126. package/dist/commands/webdav/get.d.ts +41 -0
  127. package/dist/commands/webdav/get.js +61 -0
  128. package/dist/commands/webdav/get.js.map +1 -0
  129. package/dist/commands/webdav/ls.d.ts +17 -0
  130. package/dist/commands/webdav/ls.js +101 -0
  131. package/dist/commands/webdav/ls.js.map +1 -0
  132. package/dist/commands/webdav/mkdir.d.ts +19 -0
  133. package/dist/commands/webdav/mkdir.js +48 -0
  134. package/dist/commands/webdav/mkdir.js.map +1 -0
  135. package/dist/commands/webdav/put.d.ts +23 -0
  136. package/dist/commands/webdav/put.js +107 -0
  137. package/dist/commands/webdav/put.js.map +1 -0
  138. package/dist/commands/webdav/rm.d.ts +40 -0
  139. package/dist/commands/webdav/rm.js +67 -0
  140. package/dist/commands/webdav/rm.js.map +1 -0
  141. package/dist/commands/webdav/unzip.d.ts +15 -0
  142. package/dist/commands/webdav/unzip.js +48 -0
  143. package/dist/commands/webdav/unzip.js.map +1 -0
  144. package/dist/commands/webdav/zip.d.ts +15 -0
  145. package/dist/commands/webdav/zip.js +47 -0
  146. package/dist/commands/webdav/zip.js.map +1 -0
  147. package/dist/i18n/index.d.ts +29 -0
  148. package/dist/i18n/index.js +43 -0
  149. package/dist/i18n/index.js.map +1 -0
  150. package/dist/i18n/locales/de.d.ts +51 -0
  151. package/dist/i18n/locales/de.js +57 -0
  152. package/dist/i18n/locales/de.js.map +1 -0
  153. package/dist/i18n/locales/en.d.ts +118 -0
  154. package/dist/i18n/locales/en.js +124 -0
  155. package/dist/i18n/locales/en.js.map +1 -0
  156. package/dist/i18n/locales/index.d.ts +177 -0
  157. package/dist/i18n/locales/index.js +26 -0
  158. package/dist/i18n/locales/index.js.map +1 -0
  159. package/dist/index.d.ts +3 -0
  160. package/dist/index.js +13 -0
  161. package/dist/index.js.map +1 -0
  162. package/dist/utils/scapi/schemas.d.ts +40 -0
  163. package/dist/utils/scapi/schemas.js +49 -0
  164. package/dist/utils/scapi/schemas.js.map +1 -0
  165. package/dist/utils/slas/client.d.ts +65 -0
  166. package/dist/utils/slas/client.js +146 -0
  167. package/dist/utils/slas/client.js.map +1 -0
  168. package/oclif.manifest.json +10942 -0
  169. package/package.json +154 -0
@@ -0,0 +1,118 @@
1
+ /**
2
+ * EN - English translations for b2c-cli commands.
3
+ *
4
+ * Note: These serve as documentation of translatable strings.
5
+ * English defaults are also defined inline at point of use via t().
6
+ */
7
+ export declare const en: {
8
+ commands: {
9
+ sites: {
10
+ list: {
11
+ description: string;
12
+ fetching: string;
13
+ fetchFailed: string;
14
+ noSites: string;
15
+ foundSites: string;
16
+ displayName: string;
17
+ status: string;
18
+ error: string;
19
+ };
20
+ };
21
+ docs: {
22
+ search: {
23
+ description: string;
24
+ queryRequired: string;
25
+ noResults: string;
26
+ resultCount: string;
27
+ totalCount: string;
28
+ };
29
+ read: {
30
+ description: string;
31
+ notFound: string;
32
+ };
33
+ download: {
34
+ description: string;
35
+ downloading: string;
36
+ success: string;
37
+ archiveKept: string;
38
+ };
39
+ schema: {
40
+ description: string;
41
+ queryRequired: string;
42
+ notFound: string;
43
+ available: string;
44
+ count: string;
45
+ };
46
+ };
47
+ code: {
48
+ list: {
49
+ description: string;
50
+ fetching: string;
51
+ noVersions: string;
52
+ error: string;
53
+ };
54
+ activate: {
55
+ description: string;
56
+ activating: string;
57
+ activated: string;
58
+ reloading: string;
59
+ reloaded: string;
60
+ failed: string;
61
+ reloadFailed: string;
62
+ versionRequired: string;
63
+ };
64
+ delete: {
65
+ description: string;
66
+ deleting: string;
67
+ deleted: string;
68
+ failed: string;
69
+ confirm: string;
70
+ cancelled: string;
71
+ };
72
+ deploy: {
73
+ description: string;
74
+ deploying: string;
75
+ noCodeVersion: string;
76
+ noActiveVersion: string;
77
+ summary: string;
78
+ reloaded: string;
79
+ failed: string;
80
+ };
81
+ watch: {
82
+ description: string;
83
+ starting: string;
84
+ target: string;
85
+ codeVersion: string;
86
+ watching: string;
87
+ pressCtrlC: string;
88
+ stopping: string;
89
+ uploaded: string;
90
+ deleted: string;
91
+ error: string;
92
+ failed: string;
93
+ };
94
+ };
95
+ sandbox: {
96
+ create: {
97
+ description: string;
98
+ creating: string;
99
+ profile: string;
100
+ ttl: string;
101
+ stub: string;
102
+ wouldCreate: string;
103
+ };
104
+ };
105
+ mrt: {
106
+ envVar: {
107
+ set: {
108
+ description: string;
109
+ setting: string;
110
+ stub: string;
111
+ wouldSet: string;
112
+ project: string;
113
+ environment: string;
114
+ };
115
+ };
116
+ };
117
+ };
118
+ };
@@ -0,0 +1,124 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /**
7
+ * EN - English translations for b2c-cli commands.
8
+ *
9
+ * Note: These serve as documentation of translatable strings.
10
+ * English defaults are also defined inline at point of use via t().
11
+ */
12
+ export const en = {
13
+ commands: {
14
+ sites: {
15
+ list: {
16
+ description: 'List sites on a B2C Commerce instance',
17
+ fetching: 'Fetching sites from {{hostname}}...',
18
+ fetchFailed: 'Failed to fetch sites: {{status}} {{statusText}}\n{{error}}',
19
+ noSites: 'No sites found.',
20
+ foundSites: 'Found {{count}} site(s):',
21
+ displayName: 'Display Name: {{name}}',
22
+ status: 'Status: {{status}}',
23
+ error: 'Failed to fetch sites: {{message}}',
24
+ },
25
+ },
26
+ docs: {
27
+ search: {
28
+ description: 'Search Script API documentation',
29
+ queryRequired: 'Query is required for search. Use --list to see all entries.',
30
+ noResults: 'No documentation found matching: {{query}}',
31
+ resultCount: 'Found {{count}} matches for "{{query}}"',
32
+ totalCount: '{{count}} documentation entries available',
33
+ },
34
+ read: {
35
+ description: 'Read Script API documentation for a class or module',
36
+ notFound: 'No documentation found matching: {{query}}',
37
+ },
38
+ download: {
39
+ description: 'Download Script API documentation from a B2C Commerce instance',
40
+ downloading: 'Downloading documentation from {{hostname}}...',
41
+ success: 'Downloaded {{count}} documentation files to {{path}}',
42
+ archiveKept: 'Archive saved to: {{path}}',
43
+ },
44
+ schema: {
45
+ description: 'Read an XSD schema file',
46
+ queryRequired: 'Schema name is required. Use --list to see all schemas.',
47
+ notFound: 'No schema found matching: {{query}}',
48
+ available: 'Available schemas:',
49
+ count: '{{count}} schemas available',
50
+ },
51
+ },
52
+ code: {
53
+ list: {
54
+ description: 'List code versions on a B2C Commerce instance',
55
+ fetching: 'Fetching code versions from {{hostname}}...',
56
+ noVersions: 'No code versions found.',
57
+ error: 'Failed to list code versions: {{message}}',
58
+ },
59
+ activate: {
60
+ description: 'Activate or reload a code version',
61
+ activating: 'Activating code version {{codeVersion}} on {{hostname}}...',
62
+ activated: 'Code version {{codeVersion}} activated successfully',
63
+ reloading: 'Reloading code version{{version}} on {{hostname}}...',
64
+ reloaded: 'Code version{{version}} reloaded successfully',
65
+ failed: 'Failed to activate code version: {{message}}',
66
+ reloadFailed: 'Failed to reload code version: {{message}}',
67
+ versionRequired: 'Code version is required. Provide as argument or use --code-version flag.',
68
+ },
69
+ delete: {
70
+ description: 'Delete a code version',
71
+ deleting: 'Deleting code version {{codeVersion}} from {{hostname}}...',
72
+ deleted: 'Code version {{codeVersion}} deleted successfully',
73
+ failed: 'Failed to delete code version: {{message}}',
74
+ confirm: 'Are you sure you want to delete code version "{{codeVersion}}" on {{hostname}}? (y/n)',
75
+ cancelled: 'Deletion cancelled',
76
+ },
77
+ deploy: {
78
+ description: 'Deploy cartridges to a B2C Commerce instance',
79
+ deploying: 'Deploying {{path}} to {{hostname}} ({{version}})',
80
+ noCodeVersion: 'No code version specified, discovering active code version...',
81
+ noActiveVersion: 'No active code version found. Specify one with --code-version.',
82
+ summary: 'Deployed {{count}} cartridge(s) to {{codeVersion}}',
83
+ reloaded: 'Code version reloaded',
84
+ failed: 'Deployment failed: {{message}}',
85
+ },
86
+ watch: {
87
+ description: 'Watch cartridges and upload changes to an instance',
88
+ starting: 'Starting watcher for {{path}}',
89
+ target: 'Target: {{hostname}}',
90
+ codeVersion: 'Code Version: {{version}}',
91
+ watching: 'Watching {{count}} cartridge(s)...',
92
+ pressCtrlC: 'Press Ctrl+C to stop',
93
+ stopping: '\nStopping watcher...',
94
+ uploaded: '[UPLOAD] {{count}} file(s)',
95
+ deleted: '[DELETE] {{count}} file(s)',
96
+ error: 'Error: {{message}}',
97
+ failed: 'Watch failed: {{message}}',
98
+ },
99
+ },
100
+ sandbox: {
101
+ create: {
102
+ description: '',
103
+ creating: 'Creating sandbox in realm {{realm}}...',
104
+ profile: 'Profile: {{profile}}',
105
+ ttl: 'TTL: {{ttl}} hours',
106
+ stub: '(stub) Sandbox creation not yet implemented',
107
+ wouldCreate: 'Would create sandbox with OAuth client: {{clientId}}',
108
+ },
109
+ },
110
+ mrt: {
111
+ envVar: {
112
+ set: {
113
+ description: 'Set an environment variable on a Managed Runtime project',
114
+ setting: 'Setting {{key}} on {{project}}/{{environment}}...',
115
+ stub: '(stub) Environment variable setting not yet implemented',
116
+ wouldSet: 'Would set {{key}}={{value}}',
117
+ project: 'Project: {{project}}',
118
+ environment: 'Environment: {{environment}}',
119
+ },
120
+ },
121
+ },
122
+ },
123
+ };
124
+ //# sourceMappingURL=en.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/i18n/locales/en.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,WAAW,EAAE,uCAAu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* Each locale file exports a translation object matching the structure
5
+ * of keys used in t() calls. English is included for documentation
6
+ * but defaults are defined inline at point of use.
7
+ *
8
+ * To add a new language:
9
+ * 1. Create a new file (e.g., fr.ts) with translations
10
+ * 2. Import and add to the locales object below
11
+ */
12
+ /**
13
+ * All locale resources for the 'cli' namespace.
14
+ */
15
+ export declare const locales: {
16
+ de: {
17
+ commands: {
18
+ sites: {
19
+ list: {
20
+ description: string;
21
+ fetching: string;
22
+ fetchFailed: string;
23
+ noSites: string;
24
+ foundSites: string;
25
+ displayName: string;
26
+ status: string;
27
+ error: string;
28
+ };
29
+ };
30
+ code: {
31
+ deploy: {
32
+ description: string;
33
+ deploying: string;
34
+ target: string;
35
+ codeVersion: string;
36
+ complete: string;
37
+ failed: string;
38
+ };
39
+ };
40
+ sandbox: {
41
+ create: {
42
+ description: string;
43
+ creating: string;
44
+ profile: string;
45
+ ttl: string;
46
+ stub: string;
47
+ wouldCreate: string;
48
+ };
49
+ };
50
+ mrt: {
51
+ envVar: {
52
+ set: {
53
+ description: string;
54
+ setting: string;
55
+ stub: string;
56
+ wouldSet: string;
57
+ project: string;
58
+ environment: string;
59
+ };
60
+ };
61
+ };
62
+ };
63
+ };
64
+ en: {
65
+ commands: {
66
+ sites: {
67
+ list: {
68
+ description: string;
69
+ fetching: string;
70
+ fetchFailed: string;
71
+ noSites: string;
72
+ foundSites: string;
73
+ displayName: string;
74
+ status: string;
75
+ error: string;
76
+ };
77
+ };
78
+ docs: {
79
+ search: {
80
+ description: string;
81
+ queryRequired: string;
82
+ noResults: string;
83
+ resultCount: string;
84
+ totalCount: string;
85
+ };
86
+ read: {
87
+ description: string;
88
+ notFound: string;
89
+ };
90
+ download: {
91
+ description: string;
92
+ downloading: string;
93
+ success: string;
94
+ archiveKept: string;
95
+ };
96
+ schema: {
97
+ description: string;
98
+ queryRequired: string;
99
+ notFound: string;
100
+ available: string;
101
+ count: string;
102
+ };
103
+ };
104
+ code: {
105
+ list: {
106
+ description: string;
107
+ fetching: string;
108
+ noVersions: string;
109
+ error: string;
110
+ };
111
+ activate: {
112
+ description: string;
113
+ activating: string;
114
+ activated: string;
115
+ reloading: string;
116
+ reloaded: string;
117
+ failed: string;
118
+ reloadFailed: string;
119
+ versionRequired: string;
120
+ };
121
+ delete: {
122
+ description: string;
123
+ deleting: string;
124
+ deleted: string;
125
+ failed: string;
126
+ confirm: string;
127
+ cancelled: string;
128
+ };
129
+ deploy: {
130
+ description: string;
131
+ deploying: string;
132
+ noCodeVersion: string;
133
+ noActiveVersion: string;
134
+ summary: string;
135
+ reloaded: string;
136
+ failed: string;
137
+ };
138
+ watch: {
139
+ description: string;
140
+ starting: string;
141
+ target: string;
142
+ codeVersion: string;
143
+ watching: string;
144
+ pressCtrlC: string;
145
+ stopping: string;
146
+ uploaded: string;
147
+ deleted: string;
148
+ error: string;
149
+ failed: string;
150
+ };
151
+ };
152
+ sandbox: {
153
+ create: {
154
+ description: string;
155
+ creating: string;
156
+ profile: string;
157
+ ttl: string;
158
+ stub: string;
159
+ wouldCreate: string;
160
+ };
161
+ };
162
+ mrt: {
163
+ envVar: {
164
+ set: {
165
+ description: string;
166
+ setting: string;
167
+ stub: string;
168
+ wouldSet: string;
169
+ project: string;
170
+ environment: string;
171
+ };
172
+ };
173
+ };
174
+ };
175
+ };
176
+ };
177
+ export type SupportedLocale = keyof typeof locales;
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /**
7
+ * Locale resources for b2c-cli commands.
8
+ *
9
+ * Each locale file exports a translation object matching the structure
10
+ * of keys used in t() calls. English is included for documentation
11
+ * but defaults are defined inline at point of use.
12
+ *
13
+ * To add a new language:
14
+ * 1. Create a new file (e.g., fr.ts) with translations
15
+ * 2. Import and add to the locales object below
16
+ */
17
+ import { de } from './de.js';
18
+ import { en } from './en.js';
19
+ /**
20
+ * All locale resources for the 'cli' namespace.
21
+ */
22
+ export const locales = {
23
+ de,
24
+ en,
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/locales/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;;;;;;;;GAUG;AAEH,OAAO,EAAC,EAAE,EAAC,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAC,EAAE,EAAC,MAAM,SAAS,CAAC;AAE3B;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE;IACF,EAAE;CACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { run } from '@oclif/core';
2
+ export { BaseCommand, OAuthCommand, InstanceCommand, MrtCommand, loadConfig, findDwJson, } from '@salesforce/b2c-tooling-sdk/cli';
3
+ export type { LoadConfigOptions } from '@salesforce/b2c-tooling-sdk/cli';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ export { run } from '@oclif/core';
7
+ // Re-export CLI utilities from b2c-tooling for convenience
8
+ export {
9
+ // Command base classes
10
+ BaseCommand, OAuthCommand, InstanceCommand, MrtCommand,
11
+ // Config utilities
12
+ loadConfig, findDwJson, } from '@salesforce/b2c-tooling-sdk/cli';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC,2DAA2D;AAC3D,OAAO;AACL,uBAAuB;AACvB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,UAAU;AACV,mBAAmB;AACnB,UAAU,EACV,UAAU,GACX,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Command } from '@oclif/core';
2
+ import { OAuthCommand } from '@salesforce/b2c-tooling-sdk/cli';
3
+ import { type ScapiSchemasClient } from '@salesforce/b2c-tooling-sdk/clients';
4
+ /**
5
+ * Format API error for display.
6
+ */
7
+ export declare function formatApiError(error: unknown): string;
8
+ /**
9
+ * Base command for SCAPI Schemas operations.
10
+ * Provides common flags and helper methods for interacting with the SCAPI Schemas API.
11
+ */
12
+ export declare abstract class ScapiSchemasCommand<T extends typeof Command> extends OAuthCommand<T> {
13
+ static baseFlags: {
14
+ 'tenant-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
+ 'client-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ 'client-secret': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ scope: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'short-code': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'auth-methods': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ 'log-level': import("@oclif/core/interfaces").OptionFlag<"trace" | "debug" | "info" | "warn" | "error" | "silent" | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
23
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
24
+ lang: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ instance: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
27
+ 'working-directory': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
+ 'extra-query': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
+ 'extra-body': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
30
+ 'extra-headers': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
31
+ };
32
+ /**
33
+ * Get the organization ID from the tenant-id flag.
34
+ */
35
+ protected getOrganizationId(): string;
36
+ /**
37
+ * Get the SCAPI Schemas client, ensuring short code is configured.
38
+ */
39
+ protected getSchemasClient(): ScapiSchemasClient;
40
+ }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import { Command, Flags } from '@oclif/core';
7
+ import { OAuthCommand } from '@salesforce/b2c-tooling-sdk/cli';
8
+ import { createScapiSchemasClient, toOrganizationId } from '@salesforce/b2c-tooling-sdk/clients';
9
+ import { t } from '../../i18n/index.js';
10
+ /**
11
+ * Format API error for display.
12
+ */
13
+ export function formatApiError(error) {
14
+ return typeof error === 'object' ? JSON.stringify(error) : String(error);
15
+ }
16
+ /**
17
+ * Base command for SCAPI Schemas operations.
18
+ * Provides common flags and helper methods for interacting with the SCAPI Schemas API.
19
+ */
20
+ export class ScapiSchemasCommand extends OAuthCommand {
21
+ static baseFlags = {
22
+ ...OAuthCommand.baseFlags,
23
+ 'tenant-id': Flags.string({
24
+ description: t('flags.tenantId.description', 'Organization/tenant ID'),
25
+ env: 'SFCC_TENANT_ID',
26
+ required: true,
27
+ }),
28
+ };
29
+ /**
30
+ * Get the organization ID from the tenant-id flag.
31
+ */
32
+ getOrganizationId() {
33
+ const tenantId = this.flags['tenant-id'];
34
+ return toOrganizationId(tenantId);
35
+ }
36
+ /**
37
+ * Get the SCAPI Schemas client, ensuring short code is configured.
38
+ */
39
+ getSchemasClient() {
40
+ const { shortCode } = this.resolvedConfig.values;
41
+ const tenantId = this.flags['tenant-id'];
42
+ if (!shortCode) {
43
+ this.error(t('error.shortCodeRequired', 'SCAPI short code required. Provide --short-code, set SFCC_SHORTCODE, or configure short-code in dw.json.'));
44
+ }
45
+ const oauthStrategy = this.getOAuthStrategy();
46
+ return createScapiSchemasClient({ shortCode, tenantId }, oauthStrategy);
47
+ }
48
+ }
49
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/utils/scapi/schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAC,wBAAwB,EAAE,gBAAgB,EAA0B,MAAM,qCAAqC,CAAC;AACxH,OAAO,EAAC,CAAC,EAAC,MAAM,qBAAqB,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,OAAgB,mBAA8C,SAAQ,YAAe;IACzF,MAAM,CAAC,SAAS,GAAG;QACjB,GAAG,YAAY,CAAC,SAAS;QACzB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,CAAC,CAAC,4BAA4B,EAAE,wBAAwB,CAAC;YACtE,GAAG,EAAE,gBAAgB;YACrB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEF;;OAEG;IACO,iBAAiB;QACzB,MAAM,QAAQ,GAAI,IAAI,CAAC,KAAgC,CAAC,WAAW,CAAC,CAAC;QACrE,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACO,gBAAgB;QACxB,MAAM,EAAC,SAAS,EAAC,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;QAC/C,MAAM,QAAQ,GAAI,IAAI,CAAC,KAAgC,CAAC,WAAW,CAAC,CAAC;QAErE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CACR,CAAC,CACC,yBAAyB,EACzB,0GAA0G,CAC3G,CACF,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC9C,OAAO,wBAAwB,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAC,EAAE,aAAa,CAAC,CAAC;IACxE,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { Command } from '@oclif/core';
2
+ import { OAuthCommand } from '@salesforce/b2c-tooling-sdk/cli';
3
+ import { type SlasClient, type SlasComponents } from '@salesforce/b2c-tooling-sdk';
4
+ export type Client = SlasComponents['schemas']['Client'];
5
+ export type ClientRequest = SlasComponents['schemas']['ClientRequest'];
6
+ /**
7
+ * JSON output structure for SLAS client commands
8
+ */
9
+ export interface ClientOutput {
10
+ clientId: string;
11
+ name: string;
12
+ secret?: string;
13
+ scopes: string[];
14
+ channels: string[];
15
+ redirectUri: string;
16
+ callbackUri?: string;
17
+ isPrivateClient: boolean;
18
+ }
19
+ /**
20
+ * Normalize a client response from the API.
21
+ * Handles scopes being returned as space-separated string.
22
+ */
23
+ export declare function normalizeClientResponse(client: Client): ClientOutput;
24
+ /**
25
+ * Print client details in a formatted table.
26
+ */
27
+ export declare function printClientDetails(output: ClientOutput, showSecret?: boolean): void;
28
+ /**
29
+ * Format API error for display.
30
+ */
31
+ export declare function formatApiError(error: unknown): string;
32
+ /**
33
+ * Base command for SLAS client operations.
34
+ * Provides common flags and helper methods.
35
+ */
36
+ export declare abstract class SlasClientCommand<T extends typeof Command> extends OAuthCommand<T> {
37
+ static baseFlags: {
38
+ 'tenant-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
39
+ 'client-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
+ 'client-secret': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
41
+ scope: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
42
+ 'short-code': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
43
+ 'auth-methods': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
44
+ 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
45
+ 'log-level': import("@oclif/core/interfaces").OptionFlag<"trace" | "debug" | "info" | "warn" | "error" | "silent" | undefined, import("@oclif/core/interfaces").CustomOptions>;
46
+ debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
47
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
48
+ lang: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
49
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
50
+ instance: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
51
+ 'working-directory': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
52
+ 'extra-query': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
53
+ 'extra-body': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
54
+ 'extra-headers': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
55
+ };
56
+ /**
57
+ * Ensure tenant exists, creating it if necessary.
58
+ * This is required before creating SLAS clients.
59
+ */
60
+ protected ensureTenantExists(slasClient: SlasClient, tenantId: string): Promise<void>;
61
+ /**
62
+ * Get the SLAS client, ensuring short code is configured.
63
+ */
64
+ protected getSlasClient(): SlasClient;
65
+ }