@nanoforge-dev/schematics 2.1.3 → 2.1.4-beta.af6c1e0
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/dist/index.cjs +15 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -15
- package/dist/index.js.map +1 -1
- package/dist/libs/application/application.factory.d.ts +6 -13
- package/dist/libs/application/application.factory.d.ts.map +1 -0
- package/dist/libs/application/application.factory.js +49 -68
- package/dist/libs/application/application.factory.js.map +1 -1
- package/dist/libs/component/component.factory.d.ts +6 -6
- package/dist/libs/component/component.factory.d.ts.map +1 -0
- package/dist/libs/component/component.factory.js +32 -47
- package/dist/libs/component/component.factory.js.map +1 -1
- package/dist/libs/configuration/configuration.factory.d.ts +6 -7
- package/dist/libs/configuration/configuration.factory.d.ts.map +1 -0
- package/dist/libs/configuration/configuration.factory.js +91 -133
- package/dist/libs/configuration/configuration.factory.js.map +1 -1
- package/dist/libs/docker/docker.factory.d.ts +6 -4
- package/dist/libs/docker/docker.factory.d.ts.map +1 -0
- package/dist/libs/docker/docker.factory.js +17 -36
- package/dist/libs/docker/docker.factory.js.map +1 -1
- package/dist/libs/part-base/part-base.factory.d.ts +6 -7
- package/dist/libs/part-base/part-base.factory.d.ts.map +1 -0
- package/dist/libs/part-base/part-base.factory.js +30 -41
- package/dist/libs/part-base/part-base.factory.js.map +1 -1
- package/dist/libs/part-main/part-main.factory.d.ts +6 -9
- package/dist/libs/part-main/part-main.factory.d.ts.map +1 -0
- package/dist/libs/part-main/part-main.factory.js +225 -260
- package/dist/libs/part-main/part-main.factory.js.map +1 -1
- package/dist/libs/system/system.factory.d.ts +6 -6
- package/dist/libs/system/system.factory.d.ts.map +1 -0
- package/dist/libs/system/system.factory.js +32 -50
- package/dist/libs/system/system.factory.js.map +1 -1
- package/package.json +18 -18
|
@@ -1,53 +1,35 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/libs/system/system.factory.ts
|
|
5
1
|
import { join, normalize, strings } from "@angular-devkit/core";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return str.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ").trim().split(/\s+/).filter(Boolean);
|
|
17
|
-
}, "toWords");
|
|
18
|
-
var toKebabCase = /* @__PURE__ */ __name((str) => {
|
|
19
|
-
return toWords(str).map((word) => word.toLowerCase()).join("-");
|
|
20
|
-
}, "toKebabCase");
|
|
21
|
-
var toCamelCase = /* @__PURE__ */ __name((str) => {
|
|
22
|
-
const words = toWords(str);
|
|
23
|
-
return words.map(
|
|
24
|
-
(word, i) => i === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
|
25
|
-
).join("");
|
|
26
|
-
}, "toCamelCase");
|
|
27
|
-
|
|
28
|
-
// src/libs/system/system.factory.ts
|
|
29
|
-
var transform = /* @__PURE__ */ __name((schema) => {
|
|
30
|
-
return {
|
|
31
|
-
part: schema.part,
|
|
32
|
-
functionName: toCamelCase(schema.name),
|
|
33
|
-
fileName: toKebabCase(schema.name)
|
|
34
|
-
};
|
|
35
|
-
}, "transform");
|
|
36
|
-
var generate = /* @__PURE__ */ __name((options, path, language) => {
|
|
37
|
-
const rules = [
|
|
38
|
-
template({
|
|
39
|
-
...strings,
|
|
40
|
-
...options
|
|
41
|
-
}),
|
|
42
|
-
move(normalize(path))
|
|
43
|
-
];
|
|
44
|
-
return apply(url(join("./files", language)), rules);
|
|
45
|
-
}, "generate");
|
|
46
|
-
var main = /* @__PURE__ */ __name((schema) => {
|
|
47
|
-
const options = transform(schema);
|
|
48
|
-
return mergeWith(generate(options, schema.directory, schema.language));
|
|
49
|
-
}, "main");
|
|
50
|
-
export {
|
|
51
|
-
main
|
|
2
|
+
import { apply, mergeWith, move, template, url } from "@angular-devkit/schematics";
|
|
3
|
+
//#region src/utils/formatting.ts
|
|
4
|
+
const toWords = (str) => {
|
|
5
|
+
return str.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ").trim().split(/\s+/).filter(Boolean);
|
|
6
|
+
};
|
|
7
|
+
const toKebabCase = (str) => {
|
|
8
|
+
return toWords(str).map((word) => word.toLowerCase()).join("-");
|
|
9
|
+
};
|
|
10
|
+
const toCamelCase = (str) => {
|
|
11
|
+
return toWords(str).map((word, i) => i === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join("");
|
|
52
12
|
};
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/libs/system/system.factory.ts
|
|
15
|
+
const transform = (schema) => {
|
|
16
|
+
return {
|
|
17
|
+
part: schema.part,
|
|
18
|
+
functionName: toCamelCase(schema.name),
|
|
19
|
+
fileName: toKebabCase(schema.name)
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const generate = (options, path, language) => {
|
|
23
|
+
const rules = [template({
|
|
24
|
+
...strings,
|
|
25
|
+
...options
|
|
26
|
+
}), move(normalize(path))];
|
|
27
|
+
return apply(url(join("./files", language)), rules);
|
|
28
|
+
};
|
|
29
|
+
const main = (schema) => {
|
|
30
|
+
return mergeWith(generate(transform(schema), schema.directory, schema.language));
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { main };
|
|
34
|
+
|
|
53
35
|
//# sourceMappingURL=system.factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"system.factory.js","names":[],"sources":["../../../src/utils/formatting.ts","../../../src/libs/system/system.factory.ts"],"sourcesContent":["const toWords = (str: string): string[] => {\n return str\n .replace(/([a-z])([A-Z])/g, \"$1 $2\")\n .replace(/([A-Z]+)([A-Z][a-z])/g, \"$1 $2\")\n .replace(/[-_]+/g, \" \")\n .trim()\n .split(/\\s+/)\n .filter(Boolean);\n};\n\nexport const toKebabCase = (str: string): string => {\n return toWords(str)\n .map((word) => word.toLowerCase())\n .join(\"-\");\n};\n\nexport const toPascalCase = (str: string): string => {\n return toWords(str)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\"\");\n};\n\nexport const toCamelCase = (str: string): string => {\n const words = toWords(str);\n return words\n .map((word, i) =>\n i === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(),\n )\n .join(\"\");\n};\n","import { type Path, join, normalize, strings } from \"@angular-devkit/core\";\nimport {\n type Rule,\n type Source,\n apply,\n mergeWith,\n move,\n template,\n url,\n} from \"@angular-devkit/schematics\";\n\nimport { toCamelCase, toKebabCase } from \"@utils/formatting\";\n\nimport { type SystemOptions } from \"./system.options\";\nimport { type SystemSchema } from \"./system.schema\";\n\nconst transform = (schema: SystemSchema): SystemOptions => {\n return {\n part: schema.part,\n functionName: toCamelCase(schema.name),\n fileName: toKebabCase(schema.name),\n };\n};\n\nconst generate = (options: SystemOptions, path: string, language: \"ts\" | \"js\"): Source => {\n const rules = [\n template({\n ...strings,\n ...options,\n }),\n move(normalize(path)),\n ];\n\n return apply(url(join(\"./files\" as Path, language)), rules);\n};\n\nexport const main = (schema: SystemSchema): Rule => {\n const options = transform(schema);\n\n return mergeWith(generate(options, schema.directory, schema.language));\n};\n"],"mappings":";;;AAAA,MAAM,WAAW,QAA0B;CACzC,OAAO,IACJ,QAAQ,mBAAmB,OAAO,EAClC,QAAQ,yBAAyB,OAAO,EACxC,QAAQ,UAAU,GAAG,EACrB,KAAK,EACL,MAAM,KAAK,EACX,OAAO,OAAO;AACnB;AAEA,MAAa,eAAe,QAAwB;CAClD,OAAO,QAAQ,GAAG,EACf,KAAK,SAAS,KAAK,YAAY,CAAC,EAChC,KAAK,GAAG;AACb;AAQA,MAAa,eAAe,QAAwB;CAElD,OADc,QAAQ,GACf,EACJ,KAAK,MAAM,MACV,MAAM,IAAI,KAAK,YAAY,IAAI,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,EAAE,YAAY,CAC1F,EACC,KAAK,EAAE;AACZ;;;ACbA,MAAM,aAAa,WAAwC;CACzD,OAAO;EACL,MAAM,OAAO;EACb,cAAc,YAAY,OAAO,IAAI;EACrC,UAAU,YAAY,OAAO,IAAI;CACnC;AACF;AAEA,MAAM,YAAY,SAAwB,MAAc,aAAkC;CACxF,MAAM,QAAQ,CACZ,SAAS;EACP,GAAG;EACH,GAAG;CACL,CAAC,GACD,KAAK,UAAU,IAAI,CAAC,CACtB;CAEA,OAAO,MAAM,IAAI,KAAK,WAAmB,QAAQ,CAAC,GAAG,KAAK;AAC5D;AAEA,MAAa,QAAQ,WAA+B;CAGlD,OAAO,UAAU,SAFD,UAAU,MAEA,GAAS,OAAO,WAAW,OAAO,QAAQ,CAAC;AACvE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@nanoforge-dev/schematics",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.4-beta.af6c1e0",
|
|
5
5
|
"description": "NanoForge Schematics",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"nanoforge",
|
|
@@ -46,29 +46,29 @@
|
|
|
46
46
|
},
|
|
47
47
|
"funding": "https://github.com/NanoForge-dev/schematics?sponsor",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@angular-devkit/core": "^21.2.
|
|
50
|
-
"@angular-devkit/schematics": "^21.2.
|
|
49
|
+
"@angular-devkit/core": "^21.2.13",
|
|
50
|
+
"@angular-devkit/schematics": "^21.2.13",
|
|
51
51
|
"rxjs": "^7.8.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@angular-devkit/schematics-cli": "^21.2.
|
|
55
|
-
"@commitlint/cli": "^
|
|
56
|
-
"@commitlint/config-conventional": "^
|
|
57
|
-
"@favware/cliff-jumper": "^6.
|
|
58
|
-
"@nanoforge-dev/actions": "^1.2
|
|
54
|
+
"@angular-devkit/schematics-cli": "^21.2.13",
|
|
55
|
+
"@commitlint/cli": "^21.0.2",
|
|
56
|
+
"@commitlint/config-conventional": "^21.0.2",
|
|
57
|
+
"@favware/cliff-jumper": "^6.1.0",
|
|
58
|
+
"@nanoforge-dev/actions": "^2.1.2",
|
|
59
59
|
"@nanoforge-dev/utils-eslint-config": "^1.0.2",
|
|
60
60
|
"@nanoforge-dev/utils-prettier-config": "^1.0.2",
|
|
61
61
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
62
|
-
"@types/node": "^25.
|
|
63
|
-
"@vitest/coverage-v8": "^4.1.
|
|
64
|
-
"cpx2": "^
|
|
65
|
-
"eslint": "^10.
|
|
62
|
+
"@types/node": "^25.9.1",
|
|
63
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
64
|
+
"cpx2": "^9.0.0",
|
|
65
|
+
"eslint": "^10.4.1",
|
|
66
66
|
"husky": "^9.1.7",
|
|
67
|
-
"lint-staged": "^
|
|
68
|
-
"prettier": "^3.8.
|
|
69
|
-
"
|
|
70
|
-
"typescript": "^
|
|
71
|
-
"vitest": "^4.1.
|
|
67
|
+
"lint-staged": "^17.0.7",
|
|
68
|
+
"prettier": "^3.8.3",
|
|
69
|
+
"tsdown": "^0.22.1",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"vitest": "^4.1.8"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": "25"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
|
-
"build": "tsc --noEmit &&
|
|
89
|
+
"build": "tsc --noEmit && tsdown",
|
|
90
90
|
"postbuild": "pnpm run copy:collection && pnpm run copy:lib",
|
|
91
91
|
"copy:collection": "cpx src/collection.json dist && cpx 'src/libs/**/schema.json' dist/libs",
|
|
92
92
|
"copy:lib": "cpx 'src/libs/**/files/**/{.,}*' dist/libs",
|