@breadstone-infrastructure/nx-tasks 0.0.12-beta.13 → 0.0.12-beta.5

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 (185) hide show
  1. package/Index.d.ts +24 -21
  2. package/Index.d.ts.map +1 -1
  3. package/Index.js +39 -43
  4. package/Index.js.map +1 -1
  5. package/executors/alias-replace/executor.d.ts +3 -3
  6. package/executors/alias-replace/executor.d.ts.map +1 -1
  7. package/executors/alias-replace/executor.js +2 -25
  8. package/executors/alias-replace/executor.js.map +1 -1
  9. package/executors/clean/executor.d.ts +3 -3
  10. package/executors/clean/executor.d.ts.map +1 -1
  11. package/executors/clean/executor.js +2 -25
  12. package/executors/clean/executor.js.map +1 -1
  13. package/executors/copy/executor.d.ts +3 -3
  14. package/executors/copy/executor.d.ts.map +1 -1
  15. package/executors/copy/executor.js +2 -25
  16. package/executors/copy/executor.js.map +1 -1
  17. package/executors/docs/executor.d.ts +1 -1
  18. package/executors/docs/executor.d.ts.map +1 -1
  19. package/executors/docs/executor.js +2 -25
  20. package/executors/docs/executor.js.map +1 -1
  21. package/executors/doppler-config-sync/executor.d.ts +1 -1
  22. package/executors/doppler-config-sync/executor.d.ts.map +1 -1
  23. package/executors/doppler-config-sync/executor.js +2 -25
  24. package/executors/doppler-config-sync/executor.js.map +1 -1
  25. package/executors/icon-collection-builder/executor.d.ts +1 -1
  26. package/executors/icon-collection-builder/executor.d.ts.map +1 -1
  27. package/executors/icon-collection-builder/executor.js +2 -25
  28. package/executors/icon-collection-builder/executor.js.map +1 -1
  29. package/executors/icon-collection-downloader/executor.d.ts +2 -2
  30. package/executors/icon-collection-downloader/executor.d.ts.map +1 -1
  31. package/executors/icon-collection-downloader/executor.js +2 -25
  32. package/executors/icon-collection-downloader/executor.js.map +1 -1
  33. package/executors/lit-docs/executor.d.ts +3 -3
  34. package/executors/lit-docs/executor.d.ts.map +1 -1
  35. package/executors/lit-docs/executor.js +3 -28
  36. package/executors/lit-docs/executor.js.map +1 -1
  37. package/executors/lit-style-transform/executor.d.ts +2 -2
  38. package/executors/lit-style-transform/executor.d.ts.map +1 -1
  39. package/executors/lit-style-transform/executor.js +7 -30
  40. package/executors/lit-style-transform/executor.js.map +1 -1
  41. package/executors/localizator/executor.d.ts +1 -1
  42. package/executors/localizator/executor.d.ts.map +1 -1
  43. package/executors/localizator/executor.js +5 -26
  44. package/executors/localizator/executor.js.map +1 -1
  45. package/executors/markdown-to-typescript-transform/executor.d.ts +1 -1
  46. package/executors/markdown-to-typescript-transform/executor.d.ts.map +1 -1
  47. package/executors/markdown-to-typescript-transform/executor.js +2 -25
  48. package/executors/markdown-to-typescript-transform/executor.js.map +1 -1
  49. package/executors/ng-packagr-build/executor.d.ts +3 -3
  50. package/executors/ng-packagr-build/executor.d.ts.map +1 -1
  51. package/executors/ng-packagr-build/executor.js +2 -25
  52. package/executors/ng-packagr-build/executor.js.map +1 -1
  53. package/executors/ng-proxy-transform/executor.d.ts +3 -3
  54. package/executors/ng-proxy-transform/executor.d.ts.map +1 -1
  55. package/executors/ng-proxy-transform/executor.js +2 -25
  56. package/executors/ng-proxy-transform/executor.js.map +1 -1
  57. package/executors/openapi-generator/executor.d.ts +1 -1
  58. package/executors/openapi-generator/executor.d.ts.map +1 -1
  59. package/executors/openapi-generator/executor.js +2 -25
  60. package/executors/openapi-generator/executor.js.map +1 -1
  61. package/executors/react-proxy-transform/executor.d.ts +3 -3
  62. package/executors/react-proxy-transform/executor.d.ts.map +1 -1
  63. package/executors/react-proxy-transform/executor.js +2 -25
  64. package/executors/react-proxy-transform/executor.js.map +1 -1
  65. package/executors/release-package/executor.d.ts +3 -3
  66. package/executors/release-package/executor.d.ts.map +1 -1
  67. package/executors/release-package/executor.js +2 -25
  68. package/executors/release-package/executor.js.map +1 -1
  69. package/executors/release-package-json/executor.d.ts +3 -3
  70. package/executors/release-package-json/executor.d.ts.map +1 -1
  71. package/executors/release-package-json/executor.js +2 -25
  72. package/executors/release-package-json/executor.js.map +1 -1
  73. package/executors/styles-bundle/executor.d.ts +3 -3
  74. package/executors/styles-bundle/executor.d.ts.map +1 -1
  75. package/executors/styles-bundle/executor.js +2 -25
  76. package/executors/styles-bundle/executor.js.map +1 -1
  77. package/executors/unrelease-package/executor.d.ts +3 -3
  78. package/executors/unrelease-package/executor.d.ts.map +1 -1
  79. package/executors/unrelease-package/executor.js +2 -25
  80. package/executors/unrelease-package/executor.js.map +1 -1
  81. package/executors/vercel-edge-config-sync/executor.d.ts +1 -1
  82. package/executors/vercel-edge-config-sync/executor.d.ts.map +1 -1
  83. package/executors/vercel-edge-config-sync/executor.js +2 -25
  84. package/executors/vercel-edge-config-sync/executor.js.map +1 -1
  85. package/executors/vue-proxy-transform/executor.d.ts +3 -3
  86. package/executors/vue-proxy-transform/executor.d.ts.map +1 -1
  87. package/executors/vue-proxy-transform/executor.js +2 -25
  88. package/executors/vue-proxy-transform/executor.js.map +1 -1
  89. package/package.json +5 -24
  90. package/executors/alias-replace/executor.task.d.ts +0 -74
  91. package/executors/alias-replace/executor.task.d.ts.map +0 -1
  92. package/executors/alias-replace/executor.task.js +0 -256
  93. package/executors/alias-replace/executor.task.js.map +0 -1
  94. package/executors/clean/executor.task.d.ts +0 -17
  95. package/executors/clean/executor.task.d.ts.map +0 -1
  96. package/executors/clean/executor.task.js +0 -41
  97. package/executors/clean/executor.task.js.map +0 -1
  98. package/executors/copy/executor.task.d.ts +0 -36
  99. package/executors/copy/executor.task.d.ts.map +0 -1
  100. package/executors/copy/executor.task.js +0 -53
  101. package/executors/copy/executor.task.js.map +0 -1
  102. package/executors/docs/executor.task.d.ts +0 -23
  103. package/executors/docs/executor.task.d.ts.map +0 -1
  104. package/executors/docs/executor.task.js +0 -74
  105. package/executors/docs/executor.task.js.map +0 -1
  106. package/executors/doppler-config-sync/executor.task.d.ts +0 -23
  107. package/executors/doppler-config-sync/executor.task.d.ts.map +0 -1
  108. package/executors/doppler-config-sync/executor.task.js +0 -163
  109. package/executors/doppler-config-sync/executor.task.js.map +0 -1
  110. package/executors/icon-collection-builder/executor.task.d.ts +0 -14
  111. package/executors/icon-collection-builder/executor.task.d.ts.map +0 -1
  112. package/executors/icon-collection-builder/executor.task.js +0 -69
  113. package/executors/icon-collection-builder/executor.task.js.map +0 -1
  114. package/executors/icon-collection-downloader/executor.task.d.ts +0 -10
  115. package/executors/icon-collection-downloader/executor.task.d.ts.map +0 -1
  116. package/executors/icon-collection-downloader/executor.task.js +0 -122
  117. package/executors/icon-collection-downloader/executor.task.js.map +0 -1
  118. package/executors/lit-docs/JSDocChecker.d.ts +0 -104
  119. package/executors/lit-docs/JSDocChecker.d.ts.map +0 -1
  120. package/executors/lit-docs/JSDocChecker.js +0 -240
  121. package/executors/lit-docs/JSDocChecker.js.map +0 -1
  122. package/executors/lit-docs/executor.task.d.ts +0 -12
  123. package/executors/lit-docs/executor.task.d.ts.map +0 -1
  124. package/executors/lit-docs/executor.task.js +0 -233
  125. package/executors/lit-docs/executor.task.js.map +0 -1
  126. package/executors/lit-style-transform/executor.task.d.ts +0 -37
  127. package/executors/lit-style-transform/executor.task.d.ts.map +0 -1
  128. package/executors/lit-style-transform/executor.task.js +0 -351
  129. package/executors/lit-style-transform/executor.task.js.map +0 -1
  130. package/executors/localizator/executor.task.d.ts +0 -8
  131. package/executors/localizator/executor.task.d.ts.map +0 -1
  132. package/executors/localizator/executor.task.js +0 -153
  133. package/executors/localizator/executor.task.js.map +0 -1
  134. package/executors/markdown-to-typescript-transform/MarkdownRenderer.d.ts +0 -20
  135. package/executors/markdown-to-typescript-transform/MarkdownRenderer.d.ts.map +0 -1
  136. package/executors/markdown-to-typescript-transform/MarkdownRenderer.js +0 -74
  137. package/executors/markdown-to-typescript-transform/MarkdownRenderer.js.map +0 -1
  138. package/executors/markdown-to-typescript-transform/executor.task.d.ts +0 -25
  139. package/executors/markdown-to-typescript-transform/executor.task.d.ts.map +0 -1
  140. package/executors/markdown-to-typescript-transform/executor.task.js +0 -97
  141. package/executors/markdown-to-typescript-transform/executor.task.js.map +0 -1
  142. package/executors/ng-packagr-build/executor.task.d.ts +0 -11
  143. package/executors/ng-packagr-build/executor.task.d.ts.map +0 -1
  144. package/executors/ng-packagr-build/executor.task.js +0 -43
  145. package/executors/ng-packagr-build/executor.task.js.map +0 -1
  146. package/executors/ng-proxy-transform/executor.task.d.ts +0 -49
  147. package/executors/ng-proxy-transform/executor.task.d.ts.map +0 -1
  148. package/executors/ng-proxy-transform/executor.task.js +0 -386
  149. package/executors/ng-proxy-transform/executor.task.js.map +0 -1
  150. package/executors/openapi-generator/executor.task.d.ts +0 -20
  151. package/executors/openapi-generator/executor.task.d.ts.map +0 -1
  152. package/executors/openapi-generator/executor.task.js +0 -29
  153. package/executors/openapi-generator/executor.task.js.map +0 -1
  154. package/executors/react-proxy-transform/executor.task.d.ts +0 -44
  155. package/executors/react-proxy-transform/executor.task.d.ts.map +0 -1
  156. package/executors/react-proxy-transform/executor.task.js +0 -217
  157. package/executors/react-proxy-transform/executor.task.js.map +0 -1
  158. package/executors/release-package/executor.task.d.ts +0 -17
  159. package/executors/release-package/executor.task.d.ts.map +0 -1
  160. package/executors/release-package/executor.task.js +0 -177
  161. package/executors/release-package/executor.task.js.map +0 -1
  162. package/executors/release-package-json/executor.task.d.ts +0 -29
  163. package/executors/release-package-json/executor.task.d.ts.map +0 -1
  164. package/executors/release-package-json/executor.task.js +0 -167
  165. package/executors/release-package-json/executor.task.js.map +0 -1
  166. package/executors/styles-bundle/executor.task.d.ts +0 -20
  167. package/executors/styles-bundle/executor.task.d.ts.map +0 -1
  168. package/executors/styles-bundle/executor.task.js +0 -78
  169. package/executors/styles-bundle/executor.task.js.map +0 -1
  170. package/executors/unrelease-package/executor.task.d.ts +0 -13
  171. package/executors/unrelease-package/executor.task.d.ts.map +0 -1
  172. package/executors/unrelease-package/executor.task.js +0 -101
  173. package/executors/unrelease-package/executor.task.js.map +0 -1
  174. package/executors/vercel-edge-config-sync/executor.task.d.ts +0 -7
  175. package/executors/vercel-edge-config-sync/executor.task.d.ts.map +0 -1
  176. package/executors/vercel-edge-config-sync/executor.task.js +0 -46
  177. package/executors/vercel-edge-config-sync/executor.task.js.map +0 -1
  178. package/executors/vue-proxy-transform/executor.task.d.ts +0 -43
  179. package/executors/vue-proxy-transform/executor.task.d.ts.map +0 -1
  180. package/executors/vue-proxy-transform/executor.task.js +0 -201
  181. package/executors/vue-proxy-transform/executor.task.js.map +0 -1
  182. package/utils/TaskBase.d.ts +0 -13
  183. package/utils/TaskBase.d.ts.map +0 -1
  184. package/utils/TaskBase.js +0 -27
  185. package/utils/TaskBase.js.map +0 -1
@@ -1,256 +0,0 @@
1
- "use strict";
2
- // #region Imports
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.AliasReplaceTask = void 0;
28
- const utilities_1 = require("@breadstone-infrastructure/utilities");
29
- const dotenv = __importStar(require("dotenv"));
30
- // #endregion
31
- /**
32
- * Task to replace all aliases in transpiled javascript.
33
- * This task is used to replace all aliases in the transpiled javascript files.
34
- * It uses also .env file to replace environment variables.
35
- *
36
- * @public
37
- */
38
- var AliasReplaceTask;
39
- (function (AliasReplaceTask) {
40
- /**
41
- * @public
42
- */
43
- AliasReplaceTask.replaceNothing = 'nothing';
44
- /**
45
- * @public
46
- */
47
- AliasReplaceTask.DEFAULT_OPTIONS = {
48
- glob: '{G,g}lobals.{js,mjs,cjs}',
49
- replacer: (packageJson) => [
50
- {
51
- key: '@@NAME',
52
- value: utilities_1.StringExtensions.replace((packageJson.name ?? '').split('/')[1], '-', '.')
53
- },
54
- {
55
- key: '@@MODE',
56
- value: (process.env.configuration ? process.env.configuration.toLowerCase().trim() : AliasReplaceTask.replaceNothing).toLowerCase()
57
- },
58
- {
59
- key: '@@VERSION',
60
- value: packageJson.version ?? ''
61
- },
62
- {
63
- key: '@@DESCRIPTION',
64
- value: packageJson.description ?? ''
65
- },
66
- {
67
- key: '@@AUTHOR',
68
- value: formatAuthor(packageJson.author ?? '')
69
- },
70
- {
71
- key: '@@LICENSE',
72
- value: packageJson.license ?? ''
73
- },
74
- {
75
- key: '@@BUILDDATE',
76
- value: Date.now().toString()
77
- }
78
- ]
79
- };
80
- /**
81
- * Parses and resolves key-value pairs for replacement.
82
- * @param replacerKV The key-value pair or array of key-value pairs.
83
- * @param packageJson The package.json object.
84
- * @returns Array of key-value pairs as expected by the replacer.
85
- * @public
86
- */
87
- function parseKeyValue(replacerKV, packageJson) {
88
- const replacements = [];
89
- const kvReplacers = Array.isArray(replacerKV) ? replacerKV : [replacerKV];
90
- kvReplacers.forEach((kv) => {
91
- replacements.push({
92
- key: kv.key,
93
- value: resolveValue(kv.value, packageJson)
94
- });
95
- });
96
- return replacements;
97
- }
98
- AliasReplaceTask.parseKeyValue = parseKeyValue;
99
- /**
100
- * Resolves dynamic expressions in the value string.
101
- * @param value The value string to resolve.
102
- * @param packageJson The package.json object.
103
- * @returns Resolved string.
104
- */
105
- function resolveValue(value, packageJson) {
106
- const envRegex = /\${env:([A-Z_]+)(:(\${.*}|[^}]+))?}/g;
107
- const packageJsonRegex = /\${packageJson\.([a-zA-Z0-9_.|]+)}/g;
108
- const dateRegex = /\${date:now}/g;
109
- // Resolve environment variables
110
- value = value.replace(envRegex, (_, envVar, __, fallback) => {
111
- const envValue = process.env[envVar];
112
- if (envValue) {
113
- return envValue;
114
- }
115
- else if (fallback.startsWith('${')) {
116
- return resolveValue(fallback, packageJson); // Recursively parse fallback
117
- }
118
- return fallback || AliasReplaceTask.replaceNothing;
119
- });
120
- // Resolve packageJson fields
121
- value = value.replace(packageJsonRegex, (_, path) => {
122
- const keys = path.split('|');
123
- let result = packageJson;
124
- for (const key of keys) {
125
- if (key.startsWith('split:')) {
126
- const [, delimiter, index] = key.split(':');
127
- result = result.split(delimiter)[parseInt(index, 10)];
128
- }
129
- else if (key.startsWith('replace:')) {
130
- const [, search, replace] = key.split(':');
131
- result = result.replace(new RegExp(search, 'g'), replace);
132
- }
133
- else {
134
- result = result[key];
135
- }
136
- if (result === undefined) {
137
- return '';
138
- }
139
- }
140
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
141
- return result ?? '';
142
- });
143
- // Resolve date
144
- value = value.replace(dateRegex, () => new Date().toISOString());
145
- return value;
146
- }
147
- /**
148
- * Parses function-based replacers.
149
- * @param replacerFn The function replacer or array of function replacers.
150
- * @param packageJson The package.json object.
151
- * @returns Array of key-value pairs as expected by the replacer.
152
- * @public
153
- */
154
- function parseFunction(replacerFn, packageJson) {
155
- let replacements = [];
156
- const replacerFns = Array.isArray(replacerFn) ? replacerFn : [replacerFn];
157
- replacerFns.forEach((fn) => {
158
- replacements = replacements.concat(fn(packageJson));
159
- });
160
- return replacements;
161
- }
162
- AliasReplaceTask.parseFunction = parseFunction;
163
- /**
164
- * @public
165
- */
166
- async function run(options) {
167
- const logger = new utilities_1.ConsoleLogger();
168
- (0, utilities_1.logSeparator)(logger, 'Alias replace');
169
- return new Promise((resolve) => {
170
- const env = dotenv.config();
171
- const mode = options.useMode ? process.env.configuration ? process.env.configuration.toLowerCase().trim() : 'production' : '';
172
- const path = utilities_1.Path.combine(options.cwd, options.tsConfigJson.compilerOptions?.outDir ?? '', mode, options.glob);
173
- if (options.verbose) {
174
- logger.log((0, utilities_1.gray)(` - cwd: ${options.cwd}`));
175
- logger.log((0, utilities_1.gray)(` - glob: ${options.glob}`));
176
- logger.log((0, utilities_1.gray)(` - tsConfigJson.compilerOptions.outDir: ${options.tsConfigJson.compilerOptions?.outDir}`));
177
- logger.log((0, utilities_1.gray)(` - mode: ${mode}`));
178
- logger.log((0, utilities_1.gray)(` - path: ${path}`));
179
- }
180
- const map = utilities_1.File.glob(path).map((x) => [x, utilities_1.File.readAllText(x)]);
181
- if (options.verbose) {
182
- logger.log(JSON.stringify(options, null, 4));
183
- logger.log();
184
- }
185
- if (map.length) {
186
- utilities_1.ArrayExtensions.arrayify(options.replacer).forEach((replacer) => {
187
- let replacements = [];
188
- if (typeof replacer === 'function') {
189
- replacements = parseFunction(replacer, options.packageJson);
190
- }
191
- else if (typeof replacer === 'object') {
192
- replacements = parseKeyValue(replacer, options.packageJson);
193
- }
194
- replacements.forEach((x) => {
195
- map.forEach((y) => {
196
- const regex = new RegExp(x.key, 'g');
197
- if (regex.test(y[1])) {
198
- if (x.value !== AliasReplaceTask.replaceNothing) {
199
- y[1] = y[1].replace(regex, x.value);
200
- if (!options.dryRun) {
201
- utilities_1.File.writeAllText(y[0], y[1]);
202
- }
203
- (0, utilities_1.logPair)(logger, (0, utilities_1.magenta)(`from: '${x.key}'`), (0, utilities_1.magenta)(`to: '${x.value}'`), {
204
- prefixSpaceLength: 2
205
- });
206
- }
207
- else {
208
- logger.log((0, utilities_1.yellow)(` - '${x.key}' did nothing.`));
209
- }
210
- }
211
- else {
212
- logger.log((0, utilities_1.yellow)(` - '${x.key}' not found.`));
213
- }
214
- });
215
- });
216
- });
217
- // Append replacer with env part.
218
- Object.entries(env.parsed ?? {}).forEach(([envKey, envValue]) => {
219
- // Format the key to @@KEY
220
- const key = `@@${envKey}`;
221
- map.forEach((y) => {
222
- const regex = new RegExp(key, 'g');
223
- if (regex.test(y[1])) {
224
- y[1] = y[1].replace(regex, envValue);
225
- if (!options.dryRun) {
226
- utilities_1.File.writeAllText(y[0], y[1]);
227
- }
228
- (0, utilities_1.logPair)(logger, (0, utilities_1.magenta)(`from: '${key}'`), (0, utilities_1.magenta)(`to: '${envValue}'`), {
229
- prefixSpaceLength: 2
230
- });
231
- }
232
- else {
233
- logger.log((0, utilities_1.yellow)(` - '${key}' (from .env) not found.`));
234
- }
235
- });
236
- });
237
- }
238
- else {
239
- logger.log((0, utilities_1.yellow)(' No files found to replace.'));
240
- if (options.useMode) {
241
- logger.log((0, utilities_1.yellow)(' The reason could be that the \'useMode\' is set to \'true\'.'));
242
- }
243
- }
244
- (0, utilities_1.logSeparator)(logger);
245
- resolve();
246
- });
247
- }
248
- AliasReplaceTask.run = run;
249
- function formatAuthor(author) {
250
- if (typeof author === 'string') {
251
- return author;
252
- }
253
- return `${author.name} <${author.email}>`;
254
- }
255
- })(AliasReplaceTask || (exports.AliasReplaceTask = AliasReplaceTask = {}));
256
- //# sourceMappingURL=executor.task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/alias-replace/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;AAElB,oEAAkK;AAClK,+CAAiC;AAGjC,aAAa;AAEb;;;;;;GAMG;AACH,IAAiB,gBAAgB,CAqRhC;AArRD,WAAiB,gBAAgB;IAE7B;;OAEG;IACU,+BAAc,GAAW,SAAS,CAAC;IA2ChD;;OAEG;IACU,gCAAe,GAAwD;QAChF,IAAI,EAAE,0BAA0B;QAChC,QAAQ,EAAE,CAAC,WAAwB,EAA8B,EAAE,CAAC;YAChE;gBACI,GAAG,EAAE,QAAQ;gBACb,KAAK,EAAE,4BAAgB,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,IAAI,IAAI,EA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1
- /**
2
- * @description Task to cleanup a project.
3
- * @public
4
- */
5
- export declare namespace CleanTask {
6
- interface ICleanTaskOptions {
7
- cwd: string;
8
- maxRetries: number;
9
- folders: Array<string>;
10
- dryRun?: boolean;
11
- }
12
- /**
13
- * @public
14
- */
15
- function run(options: ICleanTaskOptions): Promise<void>;
16
- }
17
- //# sourceMappingURL=executor.task.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/clean/executor.task.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,yBAAiB,SAAS,CAAC;IAEvB,UAAiB,iBAAiB;QAC9B,GAAG,EAAE,MAAM,CAAC;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACvB,MAAM,CAAC,EAAE,OAAO,CAAC;KACpB;IAED;;OAEG;IACH,SAAsB,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBnE;CAEJ"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- // #region Imports
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.CleanTask = void 0;
5
- const utilities_1 = require("@breadstone-infrastructure/utilities");
6
- const rimraf_1 = require("rimraf");
7
- // #endregion
8
- /**
9
- * @description Task to cleanup a project.
10
- * @public
11
- */
12
- var CleanTask;
13
- (function (CleanTask) {
14
- /**
15
- * @public
16
- */
17
- async function run(options) {
18
- const logger = new utilities_1.ConsoleLogger();
19
- (0, utilities_1.logSeparator)(logger, 'Clean');
20
- for (const x of options.folders) {
21
- if (!options.dryRun) {
22
- // eslint-disable-next-line no-await-in-loop
23
- await (0, rimraf_1.rimraf)(utilities_1.Path.combine(options.cwd, x), { maxRetries: options.maxRetries })
24
- .then((result) => {
25
- if (result) {
26
- logger.log(`${(0, utilities_1.bold)((0, utilities_1.blue)(' [REMOVED]'))} ${x}`);
27
- }
28
- else {
29
- logger.error((0, utilities_1.red)(`Failed to delete ${utilities_1.Path.combine(options.cwd, x)}`));
30
- }
31
- })
32
- .catch(() => {
33
- logger.error((0, utilities_1.red)(`Failed to delete ${utilities_1.Path.combine(options.cwd, x)}`));
34
- });
35
- }
36
- }
37
- (0, utilities_1.logSeparator)(logger);
38
- }
39
- CleanTask.run = run;
40
- })(CleanTask || (exports.CleanTask = CleanTask = {}));
41
- //# sourceMappingURL=executor.task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/clean/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,oEAA0G;AAC1G,mCAAgC;AAEhC,aAAa;AAEb;;;GAGG;AACH,IAAiB,SAAS,CAqCzB;AArCD,WAAiB,SAAS;IAStB;;OAEG;IACI,KAAK,UAAU,GAAG,CAAC,OAA0B;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAa,EAAE,CAAC;QAEnC,IAAA,wBAAY,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE9B,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;gBAClB,4CAA4C;gBAC5C,MAAM,IAAA,eAAM,EAAC,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;qBACzE,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBACb,IAAI,MAAM,EAAE,CAAC;wBACT,MAAM,CAAC,GAAG,CAAC,GAAG,IAAA,gBAAI,EAAC,IAAA,gBAAI,EAAC,eAAe,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACtD,CAAC;yBAAM,CAAC;wBACJ,MAAM,CAAC,KAAK,CAAC,IAAA,eAAG,EAAC,oBAAoB,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBAC1E,CAAC;gBACL,CAAC,CAAC;qBACD,KAAK,CAAC,GAAG,EAAE;oBACR,MAAM,CAAC,KAAK,CAAC,IAAA,eAAG,EAAC,oBAAoB,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC1E,CAAC,CAAC,CAAC;YACX,CAAC;QACL,CAAC;QAED,IAAA,wBAAY,EAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAvBqB,aAAG,MAuBxB,CAAA;AAEL,CAAC,EArCgB,SAAS,yBAAT,SAAS,QAqCzB"}
@@ -1,36 +0,0 @@
1
- /**
2
- * A task to make a simple copy of a file or directory.
3
- *
4
- * @public
5
- */
6
- export declare namespace CopyTask {
7
- interface ICopyTaskOptions {
8
- /**
9
- * The current working directory.
10
- */
11
- cwd: string;
12
- /**
13
- * A flag to indicate if the copy should be clean.
14
- */
15
- cleanCopy: boolean;
16
- /**
17
- * The source path to copy from.
18
- * It is also possible to provide an array of paths or a glob pattern.
19
- */
20
- from: string | Array<string>;
21
- /**
22
- * The destination path.
23
- */
24
- to: string;
25
- /**
26
- * A flag to indicate if the copy should be dry.
27
- */
28
- dryRun?: boolean;
29
- /**
30
- * A flag to indicate if the copy should be verbose.
31
- */
32
- verbose?: boolean;
33
- }
34
- function run(options: ICopyTaskOptions): Promise<void>;
35
- }
36
- //# sourceMappingURL=executor.task.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/copy/executor.task.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,yBAAiB,QAAQ,CAAC;IACtB,UAAiB,gBAAgB;QAE7B;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QAEnB;;;WAGG;QACH,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAE7B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QAEjB;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB;IAED,SAAsB,GAAG,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDlE;CACJ"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- // #region Imports
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.CopyTask = void 0;
5
- const utilities_1 = require("@breadstone-infrastructure/utilities");
6
- // #endregion
7
- /**
8
- * A task to make a simple copy of a file or directory.
9
- *
10
- * @public
11
- */
12
- var CopyTask;
13
- (function (CopyTask) {
14
- async function run(options) {
15
- const logger = new utilities_1.ConsoleLogger();
16
- (0, utilities_1.logSeparator)(logger, 'Copy');
17
- return new Promise((resolve, _reject) => {
18
- const to = utilities_1.Path.combine(options.cwd, options.to);
19
- const from = utilities_1.ArrayExtensions.arrayify(options.from).map((path) => utilities_1.Path.combine(options.cwd, path));
20
- const fromFiles = utilities_1.File.glob(from);
21
- if (options.cleanCopy) {
22
- if (utilities_1.Directory.exists(to)) {
23
- logger.log(` > Deleting ${options.to}`);
24
- if (!options.dryRun) {
25
- utilities_1.Directory.delete(to);
26
- }
27
- }
28
- if (utilities_1.File.exists(to)) {
29
- logger.log(` > Deleting ${options.to}`);
30
- if (!options.dryRun) {
31
- utilities_1.File.delete(to);
32
- }
33
- }
34
- }
35
- fromFiles.forEach((path) => {
36
- const toFile = utilities_1.Path.combine(to, utilities_1.Path.getFileName(path));
37
- if (options.verbose) {
38
- logger.log((0, utilities_1.gray)(` Copying ${path}${utilities_1.StringExtensions.newLine} to ${toFile}`));
39
- }
40
- if (!options.dryRun) {
41
- utilities_1.File.copy(path, toFile);
42
- }
43
- });
44
- (0, utilities_1.logSummary)(logger, {
45
- success: [`${fromFiles.length} files copied`, true]
46
- });
47
- (0, utilities_1.logSeparator)(logger);
48
- resolve();
49
- });
50
- }
51
- CopyTask.run = run;
52
- })(CopyTask || (exports.CopyTask = CopyTask = {}));
53
- //# sourceMappingURL=executor.task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/copy/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,oEAA+J;AAE/J,aAAa;AAEb;;;;GAIG;AACH,IAAiB,QAAQ,CAoFxB;AApFD,WAAiB,QAAQ;IAmCd,KAAK,UAAU,GAAG,CAAC,OAAyB;QAC/C,MAAM,MAAM,GAAG,IAAI,yBAAa,EAAE,CAAC;QAEnC,IAAA,wBAAY,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE7B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YACpC,MAAM,EAAE,GAAG,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;YACjD,MAAM,IAAI,GAAG,2BAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;YACnG,MAAM,SAAS,GAAG,gBAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAElC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;gBACpB,IAAI,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;oBACvB,MAAM,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;oBAEzC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;wBAClB,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBACzB,CAAC;gBACL,CAAC;gBAED,IAAI,gBAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;oBAClB,MAAM,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;oBAEzC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;wBAClB,gBAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBACpB,CAAC;gBACL,CAAC;YACL,CAAC;YAED,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACvB,MAAM,MAAM,GAAG,gBAAI,CAAC,OAAO,CAAC,EAAE,EAAE,gBAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;gBAExD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;oBAClB,MAAM,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,aAAa,IAAI,GAAG,4BAAgB,CAAC,OAAO,UAAU,MAAM,EAAE,CAAC,CAAC,CAAC;gBACrF,CAAC;gBAED,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;oBAClB,gBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBAC5B,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IAAA,sBAAU,EAAC,MAAM,EAAE;gBACf,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,eAAe,EAAE,IAAI,CAAC;aACtD,CAAC,CAAC;YAEH,IAAA,wBAAY,EAAC,MAAM,CAAC,CAAC;YAErB,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC;IAhDqB,YAAG,MAgDxB,CAAA;AACL,CAAC,EApFgB,QAAQ,wBAAR,QAAQ,QAoFxB"}
@@ -1,23 +0,0 @@
1
- import type { PackageJson, TsConfigJson } from 'type-fest';
2
- /**
3
- * @description Task to generate entry markdown documentation file.
4
- * @public
5
- */
6
- export declare namespace DocsTask {
7
- interface IDocsTaskOptions {
8
- cwd: string;
9
- indexFile: string;
10
- templatePath: string;
11
- tsConfigJson: TsConfigJson;
12
- packageJson: PackageJson;
13
- verbose?: boolean;
14
- extractor?: {
15
- configPath: string;
16
- };
17
- documenter?: {
18
- outputFolder: string;
19
- };
20
- }
21
- function run(options: IDocsTaskOptions): Promise<void>;
22
- }
23
- //# sourceMappingURL=executor.task.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/docs/executor.task.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI3D;;;GAGG;AACH,yBAAiB,QAAQ,CAAC;IAEtB,UAAiB,gBAAgB;QAC7B,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,YAAY,CAAC;QAC3B,WAAW,EAAE,WAAW,CAAC;QACzB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE;YACR,UAAU,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,UAAU,CAAC,EAAE;YACT,YAAY,EAAE,MAAM,CAAC;SACxB,CAAC;KACL;IAED,SAAsB,GAAG,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqElE;CAEJ"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- // #region Imports
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DocsTask = void 0;
5
- const utilities_1 = require("@breadstone-infrastructure/utilities");
6
- const api_extractor_1 = require("@microsoft/api-extractor");
7
- // #endregion
8
- /**
9
- * @description Task to generate entry markdown documentation file.
10
- * @public
11
- */
12
- var DocsTask;
13
- (function (DocsTask) {
14
- async function run(options) {
15
- const logger = new utilities_1.ConsoleLogger();
16
- (0, utilities_1.logSeparator)(logger, 'Docs');
17
- logger.log((0, utilities_1.magenta)(' > Generating documentation...'));
18
- const newImpl = false;
19
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
20
- if (newImpl) {
21
- return new Promise((resolve, reject) => {
22
- const apiExtractorJsonPath = utilities_1.Path.combine(options.cwd, options.extractor?.configPath ?? '');
23
- logger.log((0, utilities_1.gray)(` config: ${apiExtractorJsonPath}`));
24
- const extractorConfig = api_extractor_1.ExtractorConfig.loadFileAndPrepare(apiExtractorJsonPath);
25
- const extractorResult = api_extractor_1.Extractor.invoke(extractorConfig, {
26
- localBuild: true, // Equivalent to the "--local" command-line parameter
27
- showVerboseMessages: false // Equivalent to the "--verbose" command-line parameter
28
- });
29
- if (extractorResult.succeeded) {
30
- console.log('API Extractor completed successfully');
31
- process.exitCode = 0;
32
- }
33
- else {
34
- console.error(`API Extractor completed with ${extractorResult.errorCount} errors` +
35
- ` and ${extractorResult.warningCount} warnings`);
36
- process.exitCode = 1;
37
- reject();
38
- }
39
- resolve();
40
- });
41
- }
42
- return new Promise((resolve, reject) => {
43
- const docName = utilities_1.StringExtensions.replace((options.packageJson.name ?? '').split('/')[1], '-', '.');
44
- const tplPath = utilities_1.Path.combine(options.cwd, options.templatePath);
45
- const docPath = utilities_1.Path.combine(options.cwd, utilities_1.StringExtensions.format(options.indexFile, docName));
46
- const templateContent = utilities_1.File.readAllText(tplPath);
47
- const imports = options.tsConfigJson.compilerOptions?.rootDirs ?? ''
48
- ? options.tsConfigJson.compilerOptions?.rootDirs ?? ''
49
- : [options.tsConfigJson.compilerOptions?.rootDir ?? ''].map((x) => x.replace('./src', options.packageJson.name ?? ''));
50
- const data = {
51
- name: options.packageJson.name ?? '',
52
- description: options.packageJson.description,
53
- imports: imports
54
- };
55
- try {
56
- logger.log(`Generating documentation for ${docName}...`);
57
- logger.log(`Writing to ${docPath}...`);
58
- const fileContent = utilities_1.Template.create(data, { unescapeContent: true })
59
- .apply(templateContent)
60
- .toString();
61
- utilities_1.File.writeAllText(docPath, fileContent);
62
- resolve();
63
- }
64
- catch (error) {
65
- reject(error);
66
- }
67
- finally {
68
- (0, utilities_1.logSeparator)(logger);
69
- }
70
- });
71
- }
72
- DocsTask.run = run;
73
- })(DocsTask || (exports.DocsTask = DocsTask = {}));
74
- //# sourceMappingURL=executor.task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/docs/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,oEAA0I;AAC1I,4DAAsE;AAGtE,aAAa;AAEb;;;GAGG;AACH,IAAiB,QAAQ,CAwFxB;AAxFD,WAAiB,QAAQ;IAiBd,KAAK,UAAU,GAAG,CAAC,OAAyB;QAC/C,MAAM,MAAM,GAAG,IAAI,yBAAa,EAAE,CAAC;QAEnC,IAAA,wBAAY,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE7B,MAAM,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,mCAAmC,CAAC,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG,KAAK,CAAC;QAEtB,uEAAuE;QACvE,IAAI,OAAO,EAAE,CAAC;YACV,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACzC,MAAM,oBAAoB,GAAG,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;gBAE5F,MAAM,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,eAAe,oBAAoB,EAAE,CAAC,CAAC,CAAC;gBAExD,MAAM,eAAe,GAAG,+BAAe,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;gBACjF,MAAM,eAAe,GAAG,yBAAS,CAAC,MAAM,CAAC,eAAe,EAAE;oBACtD,UAAU,EAAE,IAAI,EAAE,qDAAqD;oBACvE,mBAAmB,EAAE,KAAK,CAAC,uDAAuD;iBACrF,CAAC,CAAC;gBAEH,IAAI,eAAe,CAAC,SAAS,EAAE,CAA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,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;YAC3H,MAAM,IAAI,GAAG;gBACT,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE;gBACpC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,WAAW;gBAC5C,OAAO,EAAE,OAAO;aACnB,CAAC;YAEF,IAAI,CAAC;gBACD,MAAM,CAAC,GAAG,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC;gBACzD,MAAM,CAAC,GAAG,CAAC,cAAc,OAAO,KAAK,CAAC,CAAC;gBAEvC,MAAM,WAAW,GAAG,oBAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;qBAC/D,KAAK,CAAC,eAAe,CAAC;qBACtB,QAAQ,EAAE,CAAC;gBAChB,gBAAI,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;gBAExC,OAAO,EAAE,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;oBAAS,CAAC;gBACP,IAAA,wBAAY,EAAC,MAAM,CAAC,CAAC;YACzB,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IArEqB,YAAG,MAqExB,CAAA;AAEL,CAAC,EAxFgB,QAAQ,wBAAR,QAAQ,QAwFxB"}
@@ -1,23 +0,0 @@
1
- export declare namespace DopplerConfigSyncTask {
2
- interface IDopplerConfigSyncTaskOptions {
3
- cwd: string;
4
- project: string;
5
- config: string;
6
- envFile: string;
7
- apiKey?: string;
8
- }
9
- interface IDopplerSecretsResponse {
10
- success: boolean;
11
- secrets: Record<string, {
12
- raw: string;
13
- computed: string;
14
- note: string;
15
- rawVisibility: 'unmasked' | 'masked';
16
- computedVisibility: 'unmasked' | 'masked';
17
- rawValueType: object;
18
- computedValueType: object;
19
- }>;
20
- }
21
- function run(options: IDopplerConfigSyncTaskOptions): Promise<void>;
22
- }
23
- //# sourceMappingURL=executor.task.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/doppler-config-sync/executor.task.ts"],"names":[],"mappings":"AAQA,yBAAiB,qBAAqB,CAAC;IAInC,UAAiB,6BAA6B;QAC1C,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,uBAAuB;QACpC,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;YACpB,GAAG,EAAE,MAAM,CAAC;YACZ,QAAQ,EAAE,MAAM,CAAC;YACjB,IAAI,EAAE,MAAM,CAAC;YACb,aAAa,EAAE,UAAU,GAAG,QAAQ,CAAC;YACrC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC;YAC1C,YAAY,EAAE,MAAM,CAAC;YACrB,iBAAiB,EAAE,MAAM,CAAC;SAC7B,CAAC,CAAC;KACN;IAwHD,SAAsB,GAAG,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC/E;CAGJ"}