@breadstone-infrastructure/nx-tasks 0.0.229 → 0.0.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/executors/alias-replace/executor.task.d.ts.map +1 -1
- package/executors/alias-replace/executor.task.js +21 -13
- package/executors/alias-replace/executor.task.js.map +1 -1
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.d.ts.map +1 -1
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.js +11 -0
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.js.map +1 -1
- package/executors/prisma-seeds/executor.d.ts +10 -0
- package/executors/prisma-seeds/executor.d.ts.map +1 -0
- package/executors/prisma-seeds/executor.js +68 -0
- package/executors/prisma-seeds/executor.js.map +1 -0
- package/executors/prisma-seeds/executor.options.d.ts +16 -0
- package/executors/prisma-seeds/executor.options.d.ts.map +1 -0
- package/executors/prisma-seeds/executor.options.js +3 -0
- package/executors/prisma-seeds/executor.options.js.map +1 -0
- package/executors/prisma-seeds/executor.task.d.ts +29 -0
- package/executors/prisma-seeds/executor.task.d.ts.map +1 -0
- package/executors/prisma-seeds/executor.task.js +54 -0
- package/executors/prisma-seeds/executor.task.js.map +1 -0
- package/executors/prisma-seeds/schema.json +35 -0
- package/executors/token-linter/executor.d.ts +10 -0
- package/executors/token-linter/executor.d.ts.map +1 -0
- package/executors/token-linter/executor.js +67 -0
- package/executors/token-linter/executor.js.map +1 -0
- package/executors/token-linter/executor.options.d.ts +19 -0
- package/executors/token-linter/executor.options.d.ts.map +1 -0
- package/executors/token-linter/executor.options.js +4 -0
- package/executors/token-linter/executor.options.js.map +1 -0
- package/executors/token-linter/executor.task.d.ts +33 -0
- package/executors/token-linter/executor.task.d.ts.map +1 -0
- package/executors/token-linter/executor.task.js +60 -0
- package/executors/token-linter/executor.task.js.map +1 -0
- package/executors/token-linter/schema.json +63 -0
- package/executors.json +10 -0
- package/package.json +14 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
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I,MAAM,eAAe,EAAE,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,UAAU,CAgC/E,CAAC;IAEF;;;;;;OAMG;IACH,SAAgB,aAAa,CAAC,UAAU,EAAE,sBAAsB,GAAG,KAAK,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,WAAW,GAAG,0BAA0B,CAYtJ;IAoDD;;;;;;OAMG;IACH,SAAgB,aAAa,CAAC,UAAU,EAAE,sBAAsB,GAAG,KAAK,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,WAAW,GAAG,0BAA0B,CAOtJ;IAED;;OAEG;IACH,SAAsB,GAAG,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwG1E;CAUJ"}
|
|
@@ -202,47 +202,55 @@ var AliasReplaceTask;
|
|
|
202
202
|
replacements = parseKeyValue(replacer, options.packageJson);
|
|
203
203
|
}
|
|
204
204
|
replacements.forEach((x) => {
|
|
205
|
+
let foundInAny = false;
|
|
205
206
|
map.forEach((y) => {
|
|
206
207
|
const regex = new RegExp(x.key, 'g');
|
|
207
208
|
if (regex.test(y[1])) {
|
|
209
|
+
foundInAny = true;
|
|
208
210
|
if (x.value !== AliasReplaceTask.replaceNothing) {
|
|
209
211
|
y[1] = y[1].replace(regex, x.value);
|
|
210
212
|
if (!options.dryRun) {
|
|
211
213
|
utilities_1.File.writeAllText(y[0], y[1]);
|
|
212
214
|
}
|
|
213
|
-
(0, utilities_1.logPair)(logger, (0, utilities_1.magenta)(`from: '${x.key}'`), (0, utilities_1.magenta)(`to: '${x.value}'`), {
|
|
214
|
-
prefixSpaceLength: 2
|
|
215
|
-
});
|
|
216
215
|
}
|
|
217
216
|
else {
|
|
218
|
-
logger.log((0, utilities_1.yellow)(` - '${x.key}'
|
|
217
|
+
logger.log((0, utilities_1.yellow)(` - '${x.key}' skipped (resolved to nothing).`));
|
|
219
218
|
}
|
|
220
219
|
}
|
|
221
|
-
else {
|
|
222
|
-
logger.log((0, utilities_1.yellow)(` - '${x.key}' not found.`));
|
|
223
|
-
}
|
|
224
220
|
});
|
|
221
|
+
if (foundInAny && x.value !== AliasReplaceTask.replaceNothing) {
|
|
222
|
+
(0, utilities_1.logPair)(logger, (0, utilities_1.magenta)(`from: '${x.key}'`), (0, utilities_1.magenta)(`to: '${x.value}'`), {
|
|
223
|
+
prefixSpaceLength: 2
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
else if (!foundInAny) {
|
|
227
|
+
logger.log((0, utilities_1.yellow)(` - '${x.key}' not found in any file.`));
|
|
228
|
+
}
|
|
225
229
|
});
|
|
226
230
|
});
|
|
227
231
|
// Append replacer with env part.
|
|
228
232
|
Object.entries(env.parsed ?? {}).forEach(([envKey, envValue]) => {
|
|
229
233
|
// Format the key to @@KEY
|
|
230
234
|
const key = `@@${envKey}`;
|
|
235
|
+
let foundInAny = false;
|
|
231
236
|
map.forEach((y) => {
|
|
232
237
|
const regex = new RegExp(key, 'g');
|
|
233
238
|
if (regex.test(y[1])) {
|
|
239
|
+
foundInAny = true;
|
|
234
240
|
y[1] = y[1].replace(regex, envValue);
|
|
235
241
|
if (!options.dryRun) {
|
|
236
242
|
utilities_1.File.writeAllText(y[0], y[1]);
|
|
237
243
|
}
|
|
238
|
-
(0, utilities_1.logPair)(logger, (0, utilities_1.magenta)(`from: '${key}'`), (0, utilities_1.magenta)(`to: '${envValue}'`), {
|
|
239
|
-
prefixSpaceLength: 2
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
logger.log((0, utilities_1.yellow)(` - '${key}' (from .env) not found.`));
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
|
+
if (foundInAny) {
|
|
247
|
+
(0, utilities_1.logPair)(logger, (0, utilities_1.magenta)(`from: '${key}'`), (0, utilities_1.magenta)(`to: '${envValue}'`), {
|
|
248
|
+
prefixSpaceLength: 2
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
logger.log((0, utilities_1.yellow)(` - '${key}' (from .env) not found in any file.`));
|
|
253
|
+
}
|
|
246
254
|
});
|
|
247
255
|
}
|
|
248
256
|
else {
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAiShC;AAjSD,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,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;aACpF;YACD;gBACI,GAAG,EAAE,QAAQ;gBACb,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,iBAAA,cAAc,CAAC,CAAC,WAAW,EAAE;aACrH;YACD;gBACI,GAAG,EAAE,WAAW;gBA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":["../../../src/executors/markdown-to-typescript-transform/MarkdownRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/executors/markdown-to-typescript-transform/MarkdownRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAU,MAAM,QAAQ,CAAC;AAI/C,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,aAAa,CAAC,CAAC,CAAC;AAClF,MAAM,MAAM,uBAAuB,GAAG;IAClC,QAAQ,EAAE,OAAO,CAAC;CACrB,GAAG;KAAG,GAAG,IAAI,MAAM,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,aAAa,CAAC,CAAC,GAAG;QACrE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAClB;CAAE,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,gBAAgB,CA8DxF;AAYD,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,OAAO,oEAAyB,CAAC;CACjD"}
|
|
@@ -55,6 +55,17 @@ function createMarkedRenderer(options) {
|
|
|
55
55
|
}
|
|
56
56
|
out += '></mosaik-anchor>';
|
|
57
57
|
return out;
|
|
58
|
+
},
|
|
59
|
+
list(token) {
|
|
60
|
+
const type = token.ordered ? 'ordered' : 'unordered';
|
|
61
|
+
let body = '';
|
|
62
|
+
for (const item of token.items) {
|
|
63
|
+
body += this.listitem(item);
|
|
64
|
+
}
|
|
65
|
+
return `<mosaik-listing type="${type}"${token.ordered && token.start !== 1 ? ` start="${token.start}"` : ''}>${body}</mosaik-listing>`;
|
|
66
|
+
},
|
|
67
|
+
listitem(item) {
|
|
68
|
+
return `<mosaik-listing-item>${item.text}</mosaik-listing-item>`;
|
|
58
69
|
}
|
|
59
70
|
};
|
|
60
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../../src/executors/markdown-to-typescript-transform/MarkdownRenderer.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAmBlB,
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../../src/executors/markdown-to-typescript-transform/MarkdownRenderer.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAmBlB,oDA8DC;AAnED;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,OAAiC;IAClE,OAAO,GAAG;QACN,QAAQ,EAAE,IAAI;QACd,GAAG,OAAO;KACb,CAAC;IAEF,OAAO;QACH,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC;gBACZ,KAAK,CAAC,KAAK,qCAAqC,KAAK,CAAC,KAAK,qDAAqD,KAAK,CAAC,KAAK;kBACzH,KAAK,CAAC,IAAI;iBACX,KAAK,CAAC,KAAK,GAAG;QACvB,EAAE,EAAE,GAAG,EAAE,CAAC,mCAAmC;QAC7C,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC;;;sBAGJ,KAAK,CAAC,MAAM;;;sBAGZ,KAAK,CAAC,IAAI;;4BAEJ;QACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC;;kBAEX,KAAK,CAAC,IAAI;gCACI;QACxB,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC;wCACU,KAAK,CAAC,KAAK;kBACjC,KAAK,CAAC,IAAI;iCACK;QACzB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;iCACS,OAAO,CAAC,QAAQ,WAAW,IAAI;iCAC/B,IAAI;2BACV;QACnB,IAAI,EAAE,CAAC,KAAK,EAAU,EAAE;YACpB,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,S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C,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,IAAiB,gBAAgB,CAEhC;AAFD,WAAiB,gBAAgB;IAChB,wBAAO,GAAG,oBAAoB,EAAE,CAAC;AAClD,CAAC,EAFgB,gBAAgB,gCAAhB,gBAAgB,QAEhC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import type { PrismaSeedsExecutorOptions } from './executor.options';
|
|
3
|
+
/**
|
|
4
|
+
* @description Nx executor entry point for prisma-seeds.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export default function runExecutor(options: PrismaSeedsExecutorOptions, context: ExecutorContext): Promise<{
|
|
8
|
+
success: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/prisma-seeds/executor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAIrE;;;GAGG;AACH,wBAA8B,WAAW,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAyBtI"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.default = runExecutor;
|
|
38
|
+
const getProjectRoot_1 = require("../../utils/getProjectRoot");
|
|
39
|
+
const isVerbose_1 = require("../../utils/isVerbose");
|
|
40
|
+
// #endregion
|
|
41
|
+
/**
|
|
42
|
+
* @description Nx executor entry point for prisma-seeds.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
async function runExecutor(options, context) {
|
|
46
|
+
try {
|
|
47
|
+
const task = (await Promise.resolve().then(() => __importStar(require('./executor.task')))).PrismaSeedsTask;
|
|
48
|
+
const verbose = (0, isVerbose_1.isVerbose)(context, options);
|
|
49
|
+
if (verbose) {
|
|
50
|
+
console.log('Prisma Seeds executor started with options:', JSON.stringify(options, undefined, 2));
|
|
51
|
+
}
|
|
52
|
+
await task.run({
|
|
53
|
+
cwd: (0, getProjectRoot_1.getProjectRoot)(context),
|
|
54
|
+
drop: options.drop,
|
|
55
|
+
count: options.count,
|
|
56
|
+
force: options.force,
|
|
57
|
+
dryRun: options.dryRun,
|
|
58
|
+
seed: options.seed,
|
|
59
|
+
environment: options.environment,
|
|
60
|
+
});
|
|
61
|
+
return { success: true };
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error(error);
|
|
65
|
+
return { success: false };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../src/executors/prisma-seeds/executor.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAalB,8BAyBC;AAnCD,+DAA4D;AAC5D,qDAAkD;AAGlD,aAAa;AAEb;;;GAGG;AACY,KAAK,UAAU,WAAW,CAAC,OAAmC,EAAE,OAAwB;IACnG,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,wDAAa,iBAAiB,GAAC,CAAC,CAAC,eAAe,CAAC;QAC/D,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAE5C,IAAI,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;QACtG,CAAC;QAED,MAAM,IAAI,CAAC,GAAG,CAAC;YACX,GAAG,EAAE,IAAA,+BAAc,EAAC,OAAO,CAAC;YAC5B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;SACnC,CAAC,CAAC;QAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAErB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Options for the prisma-seeds executor as declared in project.json.
|
|
3
|
+
* All fields are optional — the primary config comes from `seed.config.mjs`.
|
|
4
|
+
* Any options specified here override the config file values.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface PrismaSeedsExecutorOptions {
|
|
8
|
+
drop?: boolean;
|
|
9
|
+
count?: number;
|
|
10
|
+
force?: boolean;
|
|
11
|
+
dryRun?: boolean;
|
|
12
|
+
seed?: number;
|
|
13
|
+
environment?: string;
|
|
14
|
+
verbose?: boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=executor.options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.options.d.ts","sourceRoot":"","sources":["../../../src/executors/prisma-seeds/executor.options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.options.js","sourceRoot":"","sources":["../../../src/executors/prisma-seeds/executor.options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Task to discover and execute Prisma seed configurations.
|
|
3
|
+
* Discovers `seed.config.mjs` in the project root automatically.
|
|
4
|
+
* Executor options from project.json override the config file values.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace PrismaSeedsTask {
|
|
8
|
+
/**
|
|
9
|
+
* @description All fields are optional — the primary configuration comes from
|
|
10
|
+
* the `seed.config.mjs` config file. Any values provided here override
|
|
11
|
+
* the config file values.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
interface IPrismaSeedsTaskOptions {
|
|
15
|
+
cwd: string;
|
|
16
|
+
drop?: boolean;
|
|
17
|
+
count?: number;
|
|
18
|
+
force?: boolean;
|
|
19
|
+
dryRun?: boolean;
|
|
20
|
+
seed?: number;
|
|
21
|
+
environment?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @description Discovers the config file and executes the Prisma seeder.
|
|
25
|
+
* Executor options override config file values.
|
|
26
|
+
*/
|
|
27
|
+
function run(options: IPrismaSeedsTaskOptions): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=executor.task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/prisma-seeds/executor.task.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,yBAAiB,eAAe,CAAC;IAI7B;;;;;OAKG;IACH,UAAiB,uBAAuB;QACpC,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB;IAMD;;;OAGG;IACH,SAAsB,GAAG,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBzE;CAGJ"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// #region Imports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PrismaSeedsTask = void 0;
|
|
5
|
+
const prisma_seeds_1 = require("@breadstone-infrastructure/prisma-seeds");
|
|
6
|
+
// #endregion
|
|
7
|
+
/**
|
|
8
|
+
* @description Task to discover and execute Prisma seed configurations.
|
|
9
|
+
* Discovers `seed.config.mjs` in the project root automatically.
|
|
10
|
+
* Executor options from project.json override the config file values.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
var PrismaSeedsTask;
|
|
14
|
+
(function (PrismaSeedsTask) {
|
|
15
|
+
// #region Interfaces
|
|
16
|
+
// #endregion
|
|
17
|
+
// #region Functions
|
|
18
|
+
/**
|
|
19
|
+
* @description Discovers the config file and executes the Prisma seeder.
|
|
20
|
+
* Executor options override config file values.
|
|
21
|
+
*/
|
|
22
|
+
async function run(options) {
|
|
23
|
+
const orchestrator = new prisma_seeds_1.SeedOrchestrator();
|
|
24
|
+
const overrides = {};
|
|
25
|
+
if (options.drop !== undefined) {
|
|
26
|
+
overrides['drop'] = options.drop;
|
|
27
|
+
}
|
|
28
|
+
if (options.count !== undefined) {
|
|
29
|
+
overrides['count'] = options.count;
|
|
30
|
+
}
|
|
31
|
+
if (options.force !== undefined) {
|
|
32
|
+
overrides['force'] = options.force;
|
|
33
|
+
}
|
|
34
|
+
if (options.dryRun !== undefined) {
|
|
35
|
+
overrides['dryRun'] = options.dryRun;
|
|
36
|
+
}
|
|
37
|
+
if (options.seed !== undefined) {
|
|
38
|
+
overrides['seed'] = options.seed;
|
|
39
|
+
}
|
|
40
|
+
if (options.environment !== undefined) {
|
|
41
|
+
overrides['environment'] = options.environment;
|
|
42
|
+
}
|
|
43
|
+
const result = await orchestrator.executeWithOverrides(options.cwd, overrides);
|
|
44
|
+
if (!result.success) {
|
|
45
|
+
const errorMessages = result.errors.length > 0
|
|
46
|
+
? result.errors.join('\n')
|
|
47
|
+
: 'Unknown error';
|
|
48
|
+
throw new Error(`Prisma Seeder failed:\n${errorMessages}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
PrismaSeedsTask.run = run;
|
|
52
|
+
// #endregion
|
|
53
|
+
})(PrismaSeedsTask || (exports.PrismaSeedsTask = PrismaSeedsTask = {}));
|
|
54
|
+
//# sourceMappingURL=executor.task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/prisma-seeds/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,0EAA2E;AAE3E,aAAa;AAEb;;;;;GAKG;AACH,IAAiB,eAAe,CAkD/B;AAlDD,WAAiB,eAAe;IAE5B,qBAAqB;IAkBrB,aAAa;IAEb,oBAAoB;IAEpB;;;OAGG;IACI,KAAK,UAAU,GAAG,CAAC,OAAgC;QACtD,MAAM,YAAY,GAAG,IAAI,+BAAgB,EAAE,CAAC;QAC5C,MAAM,SAAS,GAA4B,EAAE,CAAC;QAE9C,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAAC,CAAC;QACrE,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAAC,CAAC;QACxE,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAAC,CAAC;QACxE,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;QAAC,CAAC;QAC3E,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAAC,CAAC;QACrE,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QAAC,CAAC;QAE1F,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE/E,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;gBAC1C,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC1B,CAAC,CAAC,eAAe,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,0BAA0B,aAAa,EAAE,CAAC,CAAC;QAC/D,CAAC;IACL,CAAC;IAnBqB,mBAAG,MAmBxB,CAAA;IAED,aAAa;AACjB,CAAC,EAlDgB,eAAe,+BAAf,eAAe,QAkD/B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"description": "Prisma seeds executor options. All fields are optional \u2014 the primary config comes from `seed.config.mjs` in the project root. Options specified here override the config file values.",
|
|
4
|
+
"properties": {
|
|
5
|
+
"drop": {
|
|
6
|
+
"type": "boolean",
|
|
7
|
+
"description": "Drop existing data before seeding. Overrides config file."
|
|
8
|
+
},
|
|
9
|
+
"count": {
|
|
10
|
+
"type": "number",
|
|
11
|
+
"description": "Number of items to seed per definition. Overrides config file."
|
|
12
|
+
},
|
|
13
|
+
"force": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"description": "Force seeding even if data already exists. Overrides config file."
|
|
16
|
+
},
|
|
17
|
+
"dryRun": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "Run without making changes to the database. Overrides config file."
|
|
20
|
+
},
|
|
21
|
+
"seed": {
|
|
22
|
+
"type": "number",
|
|
23
|
+
"description": "Seed value for deterministic random number generation. Overrides config file."
|
|
24
|
+
},
|
|
25
|
+
"environment": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Target environment name (e.g., 'development', 'staging'). Overrides config file."
|
|
28
|
+
},
|
|
29
|
+
"verbose": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"description": "Enable verbose logging. Overrides config file."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": []
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import type { TokenLinterExecutorOptions } from './executor.options';
|
|
3
|
+
/**
|
|
4
|
+
* @description Nx executor entry point for the token linter.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export default function runExecutor(options: TokenLinterExecutorOptions, context: ExecutorContext): Promise<{
|
|
8
|
+
success: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/token-linter/executor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAIrE;;;GAGG;AACH,wBAA8B,WAAW,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAuBtI"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.default = runExecutor;
|
|
38
|
+
const getProjectRoot_1 = require("../../utils/getProjectRoot");
|
|
39
|
+
const isVerbose_1 = require("../../utils/isVerbose");
|
|
40
|
+
// #endregion
|
|
41
|
+
/**
|
|
42
|
+
* @description Nx executor entry point for the token linter.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
async function runExecutor(options, context) {
|
|
46
|
+
try {
|
|
47
|
+
const task = (await Promise.resolve().then(() => __importStar(require('./executor.task')))).TokenLinterTask;
|
|
48
|
+
const verbose = (0, isVerbose_1.isVerbose)(context, options);
|
|
49
|
+
await task.run({
|
|
50
|
+
cwd: (0, getProjectRoot_1.getProjectRoot)(context),
|
|
51
|
+
tokensDir: options.tokensDir,
|
|
52
|
+
mixinsDir: options.mixinsDir,
|
|
53
|
+
themes: options.themes,
|
|
54
|
+
fix: options.fix,
|
|
55
|
+
verbose,
|
|
56
|
+
reporter: options.reporter,
|
|
57
|
+
rules: options.rules,
|
|
58
|
+
ruleOptions: options.ruleOptions,
|
|
59
|
+
});
|
|
60
|
+
return { success: true };
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
console.error(error);
|
|
64
|
+
return { success: false };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../src/executors/token-linter/executor.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAalB,8BAuBC;AAjCD,+DAA4D;AAC5D,qDAAkD;AAGlD,aAAa;AAEb;;;GAGG;AACY,KAAK,UAAU,WAAW,CAAC,OAAmC,EAAE,OAAwB;IACnG,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,wDAAa,iBAAiB,GAAC,CAAC,CAAC,eAAe,CAAC;QAC/D,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAE5C,MAAM,IAAI,CAAC,GAAG,CAAC;YACX,GAAG,EAAE,IAAA,+BAAc,EAAC,OAAO,CAAC;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,OAAO;YACP,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,WAAW,EAAE,OAAO,CAAC,WAAW;SACnC,CAAC,CAAC;QAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAErB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RuleSeverity } from '@breadstone-infrastructure/token-linter';
|
|
2
|
+
/**
|
|
3
|
+
* @description Options for the token-linter executor as declared in project.json.
|
|
4
|
+
* All fields are optional — the primary config comes from `tokenlinter.config.mjs`.
|
|
5
|
+
* Any options specified here override the config file values.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface TokenLinterExecutorOptions {
|
|
9
|
+
tokensDir?: string;
|
|
10
|
+
themes?: string[];
|
|
11
|
+
mixinsDir?: string;
|
|
12
|
+
fix?: boolean;
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
verbose?: boolean;
|
|
15
|
+
reporter?: 'console' | 'json' | 'summary';
|
|
16
|
+
rules?: Record<string, RuleSeverity | 'off'>;
|
|
17
|
+
ruleOptions?: Record<string, Record<string, unknown>>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=executor.options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.options.d.ts","sourceRoot":"","sources":["../../../src/executors/token-linter/executor.options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAI5E;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.options.js","sourceRoot":"","sources":["../../../src/executors/token-linter/executor.options.ts"],"names":[],"mappings":";AAAA,kBAAkB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type RuleSeverity } from '@breadstone-infrastructure/token-linter';
|
|
2
|
+
/**
|
|
3
|
+
* @description Task to validate and lint Style Dictionary token JSON files across themes.
|
|
4
|
+
* Discovers `tokenlinter.config.mjs` in the project root automatically.
|
|
5
|
+
* Executor options from project.json override the config file values.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace TokenLinterTask {
|
|
9
|
+
/**
|
|
10
|
+
* @description All fields are optional — the primary configuration comes from
|
|
11
|
+
* the `tokenlinter.config.mjs` config file. Any values provided here override
|
|
12
|
+
* the config file values.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
interface ITokenLinterTaskOptions {
|
|
16
|
+
cwd: string;
|
|
17
|
+
tokensDir?: string;
|
|
18
|
+
mixinsDir?: string;
|
|
19
|
+
themes?: string[];
|
|
20
|
+
fix?: boolean;
|
|
21
|
+
interactive?: boolean;
|
|
22
|
+
verbose?: boolean;
|
|
23
|
+
reporter?: 'console' | 'json' | 'summary';
|
|
24
|
+
rules?: Record<string, RuleSeverity | 'off'>;
|
|
25
|
+
ruleOptions?: Record<string, Record<string, unknown>>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @description Discovers the config file and executes the token linter.
|
|
29
|
+
* Executor options override config file values.
|
|
30
|
+
*/
|
|
31
|
+
function run(options: ITokenLinterTaskOptions): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=executor.task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/token-linter/executor.task.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAIrG;;;;;GAKG;AACH,yBAAiB,eAAe,CAAC;IAI7B;;;;;OAKG;IACH,UAAiB,uBAAuB;QACpC,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;QAC1C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC;QAC7C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACzD;IAMD;;;OAGG;IACH,SAAsB,GAAG,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBzE;CAGJ"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// #region Imports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TokenLinterTask = void 0;
|
|
5
|
+
const token_linter_1 = require("@breadstone-infrastructure/token-linter");
|
|
6
|
+
// #endregion
|
|
7
|
+
/**
|
|
8
|
+
* @description Task to validate and lint Style Dictionary token JSON files across themes.
|
|
9
|
+
* Discovers `tokenlinter.config.mjs` in the project root automatically.
|
|
10
|
+
* Executor options from project.json override the config file values.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
var TokenLinterTask;
|
|
14
|
+
(function (TokenLinterTask) {
|
|
15
|
+
// #region Interfaces
|
|
16
|
+
// #endregion
|
|
17
|
+
// #region Functions
|
|
18
|
+
/**
|
|
19
|
+
* @description Discovers the config file and executes the token linter.
|
|
20
|
+
* Executor options override config file values.
|
|
21
|
+
*/
|
|
22
|
+
async function run(options) {
|
|
23
|
+
const orchestrator = new token_linter_1.TokenLinterOrchestrator();
|
|
24
|
+
const overrides = {};
|
|
25
|
+
if (options.tokensDir !== undefined) {
|
|
26
|
+
overrides['tokensDir'] = options.tokensDir;
|
|
27
|
+
}
|
|
28
|
+
if (options.mixinsDir !== undefined) {
|
|
29
|
+
overrides['mixinsDir'] = options.mixinsDir;
|
|
30
|
+
}
|
|
31
|
+
if (options.themes !== undefined) {
|
|
32
|
+
overrides['themes'] = options.themes;
|
|
33
|
+
}
|
|
34
|
+
if (options.fix !== undefined) {
|
|
35
|
+
overrides['fix'] = options.fix;
|
|
36
|
+
}
|
|
37
|
+
if (options.interactive !== undefined) {
|
|
38
|
+
overrides['interactive'] = options.interactive;
|
|
39
|
+
}
|
|
40
|
+
if (options.verbose !== undefined) {
|
|
41
|
+
overrides['verbose'] = options.verbose;
|
|
42
|
+
}
|
|
43
|
+
if (options.reporter !== undefined) {
|
|
44
|
+
overrides['reporter'] = options.reporter;
|
|
45
|
+
}
|
|
46
|
+
if (options.rules !== undefined) {
|
|
47
|
+
overrides['rules'] = options.rules;
|
|
48
|
+
}
|
|
49
|
+
if (options.ruleOptions !== undefined) {
|
|
50
|
+
overrides['ruleOptions'] = options.ruleOptions;
|
|
51
|
+
}
|
|
52
|
+
const result = await orchestrator.executeWithOverrides(options.cwd, overrides);
|
|
53
|
+
if (result.totalErrors > 0) {
|
|
54
|
+
throw new Error(`Token Linter found ${result.totalErrors} error(s).`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
TokenLinterTask.run = run;
|
|
58
|
+
// #endregion
|
|
59
|
+
})(TokenLinterTask || (exports.TokenLinterTask = TokenLinterTask = {}));
|
|
60
|
+
//# sourceMappingURL=executor.task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/token-linter/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,0EAAqG;AAErG,aAAa;AAEb;;;;;GAKG;AACH,IAAiB,eAAe,CAqD/B;AArDD,WAAiB,eAAe;IAE5B,qBAAqB;IAqBrB,aAAa;IAEb,oBAAoB;IAEpB;;;OAGG;IACI,KAAK,UAAU,GAAG,CAAC,OAAgC;QACtD,MAAM,YAAY,GAAG,IAAI,sCAAuB,EAAE,CAAC;QACnD,MAAM,SAAS,GAA4B,EAAE,CAAC;QAE9C,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;QAAC,CAAC;QACpF,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAAC,SAAS,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,SAAS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BAAf,eAAe,QAqD/B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"description": "Token linter executor options. All fields are optional — the primary config comes from `tokenlinter.config.mjs` in the project root. Options specified here override the config file values.",
|
|
4
|
+
"properties": {
|
|
5
|
+
"tokensDir": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "Relative path to the tokens/themes directory. Overrides config file."
|
|
8
|
+
},
|
|
9
|
+
"mixinsDir": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Relative path to the tokens/mixins directory. Overrides config file."
|
|
12
|
+
},
|
|
13
|
+
"themes": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"description": "Theme names to validate. Overrides config file."
|
|
19
|
+
},
|
|
20
|
+
"fix": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Auto-fix fixable rule violations. Overrides config file."
|
|
23
|
+
},
|
|
24
|
+
"interactive": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Enable interactive mode for user-prompted resolution. Overrides config file."
|
|
27
|
+
},
|
|
28
|
+
"verbose": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Enable verbose logging. Overrides config file."
|
|
31
|
+
},
|
|
32
|
+
"reporter": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"console",
|
|
36
|
+
"json",
|
|
37
|
+
"summary"
|
|
38
|
+
],
|
|
39
|
+
"description": "Output reporter format. Overrides config file."
|
|
40
|
+
},
|
|
41
|
+
"rules": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"enum": [
|
|
46
|
+
"error",
|
|
47
|
+
"warning",
|
|
48
|
+
"info",
|
|
49
|
+
"off"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"description": "Rule severity overrides. Merged with config file rules."
|
|
53
|
+
},
|
|
54
|
+
"ruleOptions": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": {
|
|
57
|
+
"type": "object"
|
|
58
|
+
},
|
|
59
|
+
"description": "Per-rule configuration options. Merged with config file ruleOptions."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": []
|
|
63
|
+
}
|
package/executors.json
CHANGED
|
@@ -124,6 +124,16 @@
|
|
|
124
124
|
"description": "vue-proxy-transform task executor",
|
|
125
125
|
"implementation": "./executors/vue-proxy-transform/executor",
|
|
126
126
|
"schema": "./executors/vue-proxy-transform/schema.json"
|
|
127
|
+
},
|
|
128
|
+
"token-linter": {
|
|
129
|
+
"description": "token-linter task executor",
|
|
130
|
+
"implementation": "./executors/token-linter/executor",
|
|
131
|
+
"schema": "./executors/token-linter/schema.json"
|
|
132
|
+
},
|
|
133
|
+
"prisma-seeds": {
|
|
134
|
+
"description": "prisma-seeds task executor",
|
|
135
|
+
"implementation": "./executors/prisma-seeds/executor",
|
|
136
|
+
"schema": "./executors/prisma-seeds/schema.json"
|
|
127
137
|
}
|
|
128
138
|
}
|
|
129
139
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone-infrastructure/nx-tasks",
|
|
3
3
|
"description": "Common nx tasks",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.231",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
|
|
7
7
|
"repository": {
|
|
@@ -14,24 +14,26 @@
|
|
|
14
14
|
"types": "./index.d.ts",
|
|
15
15
|
"executors": "./executors.json",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@breadstone-infrastructure/
|
|
18
|
-
"@breadstone-
|
|
19
|
-
"@breadstone-
|
|
20
|
-
"@breadstone-tools/
|
|
21
|
-
"@breadstone-tools/
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
17
|
+
"@breadstone-infrastructure/prisma-seeds": "^0.0.231",
|
|
18
|
+
"@breadstone-infrastructure/token-linter": "^0.0.231",
|
|
19
|
+
"@breadstone-infrastructure/utilities": "^0.0.231",
|
|
20
|
+
"@breadstone-tools/localizator-app": "^0.0.231",
|
|
21
|
+
"@breadstone-tools/localizator-core": "^0.0.231",
|
|
22
|
+
"@breadstone-tools/openapi-app": "^0.0.231",
|
|
23
|
+
"@breadstone-tools/openapi-core": "^0.0.231",
|
|
24
|
+
"@microsoft/api-extractor": "7.57.7",
|
|
25
|
+
"@nx/devkit": "^22.5.4",
|
|
24
26
|
"autoprefixer": "^10.4.27",
|
|
25
27
|
"diff": "^8.0.3",
|
|
26
28
|
"dotenv": "^17.3.1",
|
|
27
29
|
"enquirer": "^2.4.1",
|
|
28
|
-
"lightningcss": "^1.
|
|
29
|
-
"marked": "^17.0.
|
|
30
|
+
"lightningcss": "^1.32.0",
|
|
31
|
+
"marked": "^17.0.4",
|
|
30
32
|
"ng-packagr": "^21.2.0",
|
|
31
|
-
"postcss": "^8.5.
|
|
33
|
+
"postcss": "^8.5.8",
|
|
32
34
|
"prettier": "^3.8.1",
|
|
33
35
|
"rimraf": "^6.1.3",
|
|
34
|
-
"sass": "^1.
|
|
36
|
+
"sass": "^1.98.0",
|
|
35
37
|
"semver": "^7.7.4",
|
|
36
38
|
"svgson": "^5.3.1",
|
|
37
39
|
"type-fest": "^5.4.4"
|