@nanoforge-dev/schematics 2.1.2 → 2.1.4-beta.131e794
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/README.md +3 -0
- 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 +10 -13
- package/dist/libs/application/application.factory.d.ts.map +1 -0
- package/dist/libs/application/application.factory.js +52 -68
- package/dist/libs/application/application.factory.js.map +1 -1
- package/dist/libs/application/files/js/README.md +165 -0
- package/dist/libs/application/files/js/__dot__env +6 -0
- package/dist/libs/application/files/js/__dot__gitignore +134 -0
- package/dist/libs/application/files/ts/README.md +165 -0
- package/dist/libs/application/files/ts/__dot__env +6 -0
- package/dist/libs/application/files/ts/__dot__gitignore +134 -0
- package/dist/libs/application/schema.json +5 -0
- 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/component/files/js/__fileName__.component.js +21 -27
- package/dist/libs/component/files/ts/__fileName__.component.ts +21 -27
- 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/files/js/__nanoforgeFolder__/client.save.json +2 -2
- package/dist/libs/part-base/files/js/__nanoforgeFolder__/server.save.json +2 -2
- package/dist/libs/part-base/files/js/__part__/components/example.component.js +21 -27
- package/dist/libs/part-base/files/ts/__nanoforgeFolder__/client.save.json +2 -2
- package/dist/libs/part-base/files/ts/__nanoforgeFolder__/server.save.json +2 -2
- package/dist/libs/part-base/files/ts/__part__/components/example.component.ts +21 -27
- 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 +228 -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
|
@@ -30,32 +30,26 @@ export const EDITOR_COMPONENT_MANIFEST: EditorComponentManifest = {
|
|
|
30
30
|
name: "Example",
|
|
31
31
|
description: "Example component description",
|
|
32
32
|
params: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
example: true,
|
|
55
|
-
default: false,
|
|
56
|
-
// Not required because it has a default value
|
|
57
|
-
optional: true,
|
|
58
|
-
},
|
|
59
|
-
],
|
|
33
|
+
{
|
|
34
|
+
type: "string",
|
|
35
|
+
name: "paramA",
|
|
36
|
+
description: "Param A description",
|
|
37
|
+
example: "Example value",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: "number",
|
|
41
|
+
name: "paramB",
|
|
42
|
+
description: "Param B description",
|
|
43
|
+
example: 3,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "boolean",
|
|
47
|
+
name: "paramC",
|
|
48
|
+
description: "Param C description",
|
|
49
|
+
example: true,
|
|
50
|
+
default: false,
|
|
51
|
+
// Not required because it has a default value
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
60
54
|
],
|
|
61
55
|
};
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { Rule } from
|
|
1
|
+
import { Rule } from "@angular-devkit/schematics";
|
|
2
2
|
|
|
3
|
+
//#region src/libs/part-base/part-base.schema.d.ts
|
|
3
4
|
interface PartBaseSchema {
|
|
4
5
|
/**
|
|
5
6
|
* NanoForge application destination directory
|
|
6
7
|
*/
|
|
7
8
|
directory: string;
|
|
8
|
-
|
|
9
9
|
/**
|
|
10
10
|
* The part of the application to generate
|
|
11
11
|
*/
|
|
12
12
|
part: "client" | "server";
|
|
13
|
-
|
|
14
13
|
/**
|
|
15
14
|
* NanoForge Application language
|
|
16
15
|
*/
|
|
17
16
|
language: "js" | "ts";
|
|
18
|
-
|
|
19
17
|
/**
|
|
20
18
|
* Add init functions to the application
|
|
21
19
|
*/
|
|
22
20
|
initFunctions: boolean;
|
|
23
|
-
|
|
24
21
|
/**
|
|
25
22
|
* Configure a server for the application
|
|
26
23
|
*/
|
|
27
24
|
server: boolean;
|
|
28
25
|
}
|
|
29
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/libs/part-base/part-base.factory.d.ts
|
|
30
28
|
declare const main: (schema: PartBaseSchema) => Rule;
|
|
31
|
-
|
|
29
|
+
//#endregion
|
|
32
30
|
export { main };
|
|
31
|
+
//# sourceMappingURL=part-base.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-base.factory.d.ts","names":["directory","part","language","initFunctions","server"],"sources":["../../../src/libs/part-base/part-base.schema.d.ts","../../../src/libs/part-base/part-base.factory.ts"],"mappings":";;;UAAiB,cAAA;;;AAAjB;EAIEA,SAAAA;EAJ6B;;;EAS7BC,IAAAA;EAeAG;;AAAM;EAVNF,QAAAA;;ACgCF;;ED3BEC,aAAAA;EC2B2B;;;EDtB3BC,MAAAA;AAAAA;;;cCsBW,IAAA,GAAQ,MAAA,EAAQ,cAAA,KAAiB,IAI7C"}
|
|
@@ -1,44 +1,33 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/libs/part-base/part-base.factory.ts
|
|
5
1
|
import { join, normalize, strings } from "@angular-devkit/core";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const splited = path2.split("/");
|
|
31
|
-
return splited.at(-2) !== ".nanoforge" || splited.at(-1) === `${options.part}.save.json`;
|
|
32
|
-
})
|
|
33
|
-
];
|
|
34
|
-
if (!initFunctions) rules.push(filter((path2) => path2.split("/").at(-2) !== "init"));
|
|
35
|
-
return apply(url(join("./files", language)), rules);
|
|
36
|
-
}, "generate");
|
|
37
|
-
var main = /* @__PURE__ */ __name((schema) => {
|
|
38
|
-
const options = transform(schema);
|
|
39
|
-
return mergeWith(generate(options, schema.directory, schema.initFunctions, schema.language));
|
|
40
|
-
}, "main");
|
|
41
|
-
export {
|
|
42
|
-
main
|
|
2
|
+
import { apply, filter, mergeWith, move, template, url } from "@angular-devkit/schematics";
|
|
3
|
+
//#region src/libs/part-base/part-base.factory.ts
|
|
4
|
+
const transform = (schema) => {
|
|
5
|
+
return {
|
|
6
|
+
part: schema.part,
|
|
7
|
+
server: schema.server,
|
|
8
|
+
appClass: schema.part === "client" ? "NanoforgeClient" : "NanoforgeServer",
|
|
9
|
+
nanoforgeFolder: ".nanoforge"
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
const generate = (options, path, initFunctions, language) => {
|
|
13
|
+
const rules = [
|
|
14
|
+
template({
|
|
15
|
+
...strings,
|
|
16
|
+
...options
|
|
17
|
+
}),
|
|
18
|
+
move(normalize(path)),
|
|
19
|
+
filter((path) => {
|
|
20
|
+
const splited = path.split("/");
|
|
21
|
+
return splited.at(-2) !== ".nanoforge" || splited.at(-1) === `${options.part}.save.json`;
|
|
22
|
+
})
|
|
23
|
+
];
|
|
24
|
+
if (!initFunctions) rules.push(filter((path) => path.split("/").at(-2) !== "init"));
|
|
25
|
+
return apply(url(join("./files", language)), rules);
|
|
43
26
|
};
|
|
27
|
+
const main = (schema) => {
|
|
28
|
+
return mergeWith(generate(transform(schema), schema.directory, schema.initFunctions, schema.language));
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { main };
|
|
32
|
+
|
|
44
33
|
//# sourceMappingURL=part-base.factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/libs/part-base/part-base.factory.ts"],"sourcesContent":["import { type Path, join, normalize, strings } from \"@angular-devkit/core\";\nimport {\n type Rule,\n type Source,\n apply,\n filter,\n mergeWith,\n move,\n template,\n url,\n} from \"@angular-devkit/schematics\";\n\nimport { type PartBaseOptions } from \"./part-base.options\";\nimport { type PartBaseSchema } from \"./part-base.schema\";\n\nconst transform = (schema: PartBaseSchema): PartBaseOptions => {\n return {\n part: schema.part,\n server: schema.server,\n appClass: schema.part === \"client\" ? \"NanoforgeClient\" : \"NanoforgeServer\",\n nanoforgeFolder: \".nanoforge\",\n };\n};\n\nconst generate = (\n options: PartBaseOptions,\n path: string,\n initFunctions: boolean,\n language: \"ts\" | \"js\",\n): Source => {\n const rules = [\n template({\n ...strings,\n ...options,\n }),\n move(normalize(path)),\n filter((path) => {\n const splited = path.split(\"/\");\n return splited.at(-2) !== \".nanoforge\" || splited.at(-1) === `${options.part}.save.json`;\n }),\n ];\n if (!initFunctions) rules.push(filter((path) => path.split(\"/\").at(-2) !== \"init\"));\n\n return apply(url(join(\"./files\" as Path, language)), rules);\n};\n\nexport const main = (schema: PartBaseSchema): Rule => {\n const options = transform(schema);\n\n return mergeWith(generate(options, schema.directory, schema.initFunctions, schema.language));\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"part-base.factory.js","names":[],"sources":["../../../src/libs/part-base/part-base.factory.ts"],"sourcesContent":["import { type Path, join, normalize, strings } from \"@angular-devkit/core\";\nimport {\n type Rule,\n type Source,\n apply,\n filter,\n mergeWith,\n move,\n template,\n url,\n} from \"@angular-devkit/schematics\";\n\nimport { type PartBaseOptions } from \"./part-base.options\";\nimport { type PartBaseSchema } from \"./part-base.schema\";\n\nconst transform = (schema: PartBaseSchema): PartBaseOptions => {\n return {\n part: schema.part,\n server: schema.server,\n appClass: schema.part === \"client\" ? \"NanoforgeClient\" : \"NanoforgeServer\",\n nanoforgeFolder: \".nanoforge\",\n };\n};\n\nconst generate = (\n options: PartBaseOptions,\n path: string,\n initFunctions: boolean,\n language: \"ts\" | \"js\",\n): Source => {\n const rules = [\n template({\n ...strings,\n ...options,\n }),\n move(normalize(path)),\n filter((path) => {\n const splited = path.split(\"/\");\n return splited.at(-2) !== \".nanoforge\" || splited.at(-1) === `${options.part}.save.json`;\n }),\n ];\n if (!initFunctions) rules.push(filter((path) => path.split(\"/\").at(-2) !== \"init\"));\n\n return apply(url(join(\"./files\" as Path, language)), rules);\n};\n\nexport const main = (schema: PartBaseSchema): Rule => {\n const options = transform(schema);\n\n return mergeWith(generate(options, schema.directory, schema.initFunctions, schema.language));\n};\n"],"mappings":";;;AAeA,MAAM,aAAa,WAA4C;CAC7D,OAAO;EACL,MAAM,OAAO;EACb,QAAQ,OAAO;EACf,UAAU,OAAO,SAAS,WAAW,oBAAoB;EACzD,iBAAiB;CACnB;AACF;AAEA,MAAM,YACJ,SACA,MACA,eACA,aACW;CACX,MAAM,QAAQ;EACZ,SAAS;GACP,GAAG;GACH,GAAG;EACL,CAAC;EACD,KAAK,UAAU,IAAI,CAAC;EACpB,QAAQ,SAAS;GACf,MAAM,UAAU,KAAK,MAAM,GAAG;GAC9B,OAAO,QAAQ,GAAG,EAAE,MAAM,gBAAgB,QAAQ,GAAG,EAAE,MAAM,GAAG,QAAQ,KAAK;EAC/E,CAAC;CACH;CACA,IAAI,CAAC,eAAe,MAAM,KAAK,QAAQ,SAAS,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;CAElF,OAAO,MAAM,IAAI,KAAK,WAAmB,QAAQ,CAAC,GAAG,KAAK;AAC5D;AAEA,MAAa,QAAQ,WAAiC;CAGpD,OAAO,UAAU,SAFD,UAAU,MAEA,GAAS,OAAO,WAAW,OAAO,eAAe,OAAO,QAAQ,CAAC;AAC7F"}
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import { Rule } from
|
|
1
|
+
import { Rule } from "@angular-devkit/schematics";
|
|
2
2
|
|
|
3
|
+
//#region src/libs/part-main/part-main.schema.d.ts
|
|
3
4
|
interface PartMainSchema {
|
|
4
5
|
/**
|
|
5
6
|
* NanoForge application destination directory
|
|
6
7
|
*/
|
|
7
8
|
directory: string;
|
|
8
|
-
|
|
9
9
|
/**
|
|
10
10
|
* The part of the application to generate
|
|
11
11
|
*/
|
|
12
12
|
part: "client" | "server";
|
|
13
|
-
|
|
14
13
|
/**
|
|
15
14
|
* NanoForge Application language
|
|
16
15
|
*/
|
|
17
16
|
language: "js" | "ts";
|
|
18
|
-
|
|
19
17
|
/**
|
|
20
18
|
* Add init functions to the application
|
|
21
19
|
*/
|
|
22
20
|
initFunctions: boolean;
|
|
23
|
-
|
|
24
21
|
/**
|
|
25
22
|
* Save file path with components and systems in JSON format
|
|
26
23
|
*/
|
|
27
24
|
saveFile?: string;
|
|
28
|
-
|
|
29
25
|
/**
|
|
30
26
|
* Path of the out file
|
|
31
27
|
*/
|
|
32
28
|
outFile?: string;
|
|
33
|
-
|
|
34
29
|
/**
|
|
35
30
|
* Build main editor
|
|
36
31
|
*/
|
|
37
32
|
editor: boolean;
|
|
38
33
|
}
|
|
39
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/libs/part-main/part-main.factory.d.ts
|
|
40
36
|
declare const main: (schema: PartMainSchema) => Rule;
|
|
41
|
-
|
|
37
|
+
//#endregion
|
|
42
38
|
export { main };
|
|
39
|
+
//# sourceMappingURL=part-main.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-main.factory.d.ts","names":["directory","part","language","initFunctions","saveFile","outFile","editor"],"sources":["../../../src/libs/part-main/part-main.schema.d.ts","../../../src/libs/part-main/part-main.factory.ts"],"mappings":";;;UAAiB,cAAA;;;AAAjB;EAIEA,SAAAA;EAJ6B;;;EAS7BC,IAAAA;EAeAG;;;EAVAF,QAAAA;;;;EAKAC,aAAAA;;;;EAKAC,QAAAA;EC2CD;AAAA;;EDtCCC,OAAAA;;;;EAKAC,MAAAA;AAAAA;;;cC6BW,IAAA,GAAQ,MAAA,EAAQ,cAAA,KAAiB,IAI7C"}
|