blacksmith-organization-system 0.4.2 → 1.1.0

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 (342) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +70 -57
  3. package/dist/bridges/git.d.ts +8 -0
  4. package/dist/bridges/git.js +20 -0
  5. package/dist/bridges/git.js.map +1 -0
  6. package/dist/bridges/github.d.ts +28 -0
  7. package/dist/bridges/github.js +71 -0
  8. package/dist/bridges/github.js.map +1 -0
  9. package/dist/cli.d.ts +2 -0
  10. package/dist/cli.js +53 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/core/context.d.ts +18 -0
  13. package/dist/core/context.js +14 -0
  14. package/dist/core/context.js.map +1 -0
  15. package/dist/core/element.d.ts +49 -0
  16. package/dist/core/element.js +97 -0
  17. package/dist/core/element.js.map +1 -0
  18. package/dist/core/host.d.ts +32 -0
  19. package/dist/core/host.js +5 -0
  20. package/dist/core/host.js.map +1 -0
  21. package/dist/core/paths.d.ts +5 -0
  22. package/dist/core/paths.js +42 -0
  23. package/dist/core/paths.js.map +1 -0
  24. package/dist/core/procedure.d.ts +11 -0
  25. package/dist/core/procedure.js +24 -0
  26. package/dist/core/procedure.js.map +1 -0
  27. package/dist/core/tool.d.ts +33 -0
  28. package/dist/core/tool.js +44 -0
  29. package/dist/core/tool.js.map +1 -0
  30. package/dist/core/version.d.ts +6 -0
  31. package/dist/core/version.js +37 -0
  32. package/dist/core/version.js.map +1 -0
  33. package/dist/hosts/node.d.ts +21 -0
  34. package/dist/hosts/node.js +76 -0
  35. package/dist/hosts/node.js.map +1 -0
  36. package/dist/hosts/watch-tree.d.ts +8 -0
  37. package/dist/hosts/watch-tree.js +86 -0
  38. package/dist/hosts/watch-tree.js.map +1 -0
  39. package/dist/index.d.ts +14 -0
  40. package/dist/index.js +18 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/main.d.ts +51 -0
  43. package/dist/main.js +85 -0
  44. package/dist/main.js.map +1 -0
  45. package/dist/models/_index.d.ts +18 -0
  46. package/dist/models/_index.js +20 -0
  47. package/dist/models/_index.js.map +1 -0
  48. package/dist/models/archive/class.d.ts +5 -0
  49. package/dist/models/archive/class.js +7 -0
  50. package/dist/models/archive/class.js.map +1 -0
  51. package/dist/models/craftbook/class.d.ts +10 -0
  52. package/dist/models/craftbook/class.js +13 -0
  53. package/dist/models/craftbook/class.js.map +1 -0
  54. package/dist/models/devarmory/class.d.ts +11 -0
  55. package/dist/models/devarmory/class.js +8 -0
  56. package/dist/models/devarmory/class.js.map +1 -0
  57. package/dist/models/devlog/class.d.ts +19 -0
  58. package/dist/models/devlog/class.js +61 -0
  59. package/dist/models/devlog/class.js.map +1 -0
  60. package/dist/models/forge/class.d.ts +9 -0
  61. package/dist/models/forge/class.js +24 -0
  62. package/dist/models/forge/class.js.map +1 -0
  63. package/dist/models/loop/class.d.ts +16 -0
  64. package/dist/models/loop/class.js +56 -0
  65. package/dist/models/loop/class.js.map +1 -0
  66. package/dist/models/loop/data.d.ts +12 -0
  67. package/dist/models/loop/data.js +20 -0
  68. package/dist/models/loop/data.js.map +1 -0
  69. package/dist/models/loop/load.d.ts +5 -0
  70. package/dist/models/loop/load.js +14 -0
  71. package/dist/models/loop/load.js.map +1 -0
  72. package/dist/models/project/anatomy.d.ts +2 -0
  73. package/dist/models/project/anatomy.js +15 -0
  74. package/dist/models/project/anatomy.js.map +1 -0
  75. package/dist/models/project/around.d.ts +3 -0
  76. package/dist/models/project/around.js +13 -0
  77. package/dist/models/project/around.js.map +1 -0
  78. package/dist/models/project/class.d.ts +21 -0
  79. package/dist/models/project/class.js +23 -0
  80. package/dist/models/project/class.js.map +1 -0
  81. package/dist/models/project/git.d.ts +8 -0
  82. package/dist/models/project/git.js +26 -0
  83. package/dist/models/project/git.js.map +1 -0
  84. package/dist/models/project/version.d.ts +6 -0
  85. package/dist/models/project/version.js +23 -0
  86. package/dist/models/project/version.js.map +1 -0
  87. package/dist/models/scope/class.d.ts +21 -0
  88. package/dist/models/scope/class.js +49 -0
  89. package/dist/models/scope/class.js.map +1 -0
  90. package/dist/models/settings/data.d.ts +12 -0
  91. package/dist/models/settings/data.js +9 -0
  92. package/dist/models/settings/data.js.map +1 -0
  93. package/dist/models/settings/load.d.ts +9 -0
  94. package/dist/models/settings/load.js +32 -0
  95. package/dist/models/settings/load.js.map +1 -0
  96. package/dist/models/system/class.d.ts +16 -0
  97. package/dist/models/system/class.js +21 -0
  98. package/dist/models/system/class.js.map +1 -0
  99. package/dist/models/system/parts.d.ts +21 -0
  100. package/dist/models/system/parts.js +22 -0
  101. package/dist/models/system/parts.js.map +1 -0
  102. package/dist/models/system/storylines.d.ts +39 -0
  103. package/dist/models/system/storylines.js +42 -0
  104. package/dist/models/system/storylines.js.map +1 -0
  105. package/dist/models/workshop/class.d.ts +20 -0
  106. package/dist/models/workshop/class.js +43 -0
  107. package/dist/models/workshop/class.js.map +1 -0
  108. package/dist/models/workshop/locate.d.ts +16 -0
  109. package/dist/models/workshop/locate.js +54 -0
  110. package/dist/models/workshop/locate.js.map +1 -0
  111. package/dist/procedures/_index.d.ts +7 -0
  112. package/dist/procedures/_index.js +10 -0
  113. package/dist/procedures/_index.js.map +1 -0
  114. package/dist/procedures/automerging/_index.d.ts +4 -0
  115. package/dist/procedures/automerging/_index.js +8 -0
  116. package/dist/procedures/automerging/_index.js.map +1 -0
  117. package/dist/procedures/automerging/context.d.ts +11 -0
  118. package/dist/procedures/automerging/context.js +2 -0
  119. package/dist/procedures/automerging/context.js.map +1 -0
  120. package/dist/procedures/automerging/steps.d.ts +4 -0
  121. package/dist/procedures/automerging/steps.js +34 -0
  122. package/dist/procedures/automerging/steps.js.map +1 -0
  123. package/dist/procedures/bootstrapping/_index.d.ts +4 -0
  124. package/dist/procedures/bootstrapping/_index.js +8 -0
  125. package/dist/procedures/bootstrapping/_index.js.map +1 -0
  126. package/dist/procedures/bootstrapping/context.d.ts +5 -0
  127. package/dist/procedures/bootstrapping/context.js +2 -0
  128. package/dist/procedures/bootstrapping/context.js.map +1 -0
  129. package/dist/procedures/bootstrapping/ensure-tree.d.ts +2 -0
  130. package/dist/procedures/bootstrapping/ensure-tree.js +5 -0
  131. package/dist/procedures/bootstrapping/ensure-tree.js.map +1 -0
  132. package/dist/procedures/bootstrapping/record.d.ts +2 -0
  133. package/dist/procedures/bootstrapping/record.js +12 -0
  134. package/dist/procedures/bootstrapping/record.js.map +1 -0
  135. package/dist/procedures/bumping/_index.d.ts +4 -0
  136. package/dist/procedures/bumping/_index.js +9 -0
  137. package/dist/procedures/bumping/_index.js.map +1 -0
  138. package/dist/procedures/bumping/context.d.ts +18 -0
  139. package/dist/procedures/bumping/context.js +4 -0
  140. package/dist/procedures/bumping/context.js.map +1 -0
  141. package/dist/procedures/bumping/steps.d.ts +4 -0
  142. package/dist/procedures/bumping/steps.js +50 -0
  143. package/dist/procedures/bumping/steps.js.map +1 -0
  144. package/dist/procedures/inspecting/_index.d.ts +4 -0
  145. package/dist/procedures/inspecting/_index.js +11 -0
  146. package/dist/procedures/inspecting/_index.js.map +1 -0
  147. package/dist/procedures/inspecting/judge.d.ts +2 -0
  148. package/dist/procedures/inspecting/judge.js +6 -0
  149. package/dist/procedures/inspecting/judge.js.map +1 -0
  150. package/dist/procedures/inspecting/read-areas.d.ts +2 -0
  151. package/dist/procedures/inspecting/read-areas.js +5 -0
  152. package/dist/procedures/inspecting/read-areas.js.map +1 -0
  153. package/dist/procedures/inspecting/read-forge.d.ts +2 -0
  154. package/dist/procedures/inspecting/read-forge.js +14 -0
  155. package/dist/procedures/inspecting/read-forge.js.map +1 -0
  156. package/dist/procedures/inspecting/report.d.ts +32 -0
  157. package/dist/procedures/inspecting/report.js +11 -0
  158. package/dist/procedures/inspecting/report.js.map +1 -0
  159. package/dist/procedures/inspecting/rules.d.ts +12 -0
  160. package/dist/procedures/inspecting/rules.js +75 -0
  161. package/dist/procedures/inspecting/rules.js.map +1 -0
  162. package/dist/procedures/proposing/_index.d.ts +4 -0
  163. package/dist/procedures/proposing/_index.js +9 -0
  164. package/dist/procedures/proposing/_index.js.map +1 -0
  165. package/dist/procedures/proposing/context.d.ts +16 -0
  166. package/dist/procedures/proposing/context.js +4 -0
  167. package/dist/procedures/proposing/context.js.map +1 -0
  168. package/dist/procedures/proposing/steps.d.ts +4 -0
  169. package/dist/procedures/proposing/steps.js +46 -0
  170. package/dist/procedures/proposing/steps.js.map +1 -0
  171. package/dist/procedures/versioning/_index.d.ts +16 -0
  172. package/dist/procedures/versioning/_index.js +22 -0
  173. package/dist/procedures/versioning/_index.js.map +1 -0
  174. package/dist/procedures/watching/_index.d.ts +5 -0
  175. package/dist/procedures/watching/_index.js +9 -0
  176. package/dist/procedures/watching/_index.js.map +1 -0
  177. package/dist/procedures/watching/classify.d.ts +5 -0
  178. package/dist/procedures/watching/classify.js +30 -0
  179. package/dist/procedures/watching/classify.js.map +1 -0
  180. package/dist/procedures/watching/context.d.ts +21 -0
  181. package/dist/procedures/watching/context.js +2 -0
  182. package/dist/procedures/watching/context.js.map +1 -0
  183. package/dist/procedures/watching/start.d.ts +2 -0
  184. package/dist/procedures/watching/start.js +24 -0
  185. package/dist/procedures/watching/start.js.map +1 -0
  186. package/dist/procedures/watching/wait.d.ts +2 -0
  187. package/dist/procedures/watching/wait.js +12 -0
  188. package/dist/procedures/watching/wait.js.map +1 -0
  189. package/dist/tools/_index.d.ts +3 -0
  190. package/dist/tools/_index.js +17 -0
  191. package/dist/tools/_index.js.map +1 -0
  192. package/dist/tools/devlog.d.ts +1 -0
  193. package/dist/tools/devlog.js +43 -0
  194. package/dist/tools/devlog.js.map +1 -0
  195. package/dist/tools/flow.d.ts +1 -0
  196. package/dist/tools/flow.js +81 -0
  197. package/dist/tools/flow.js.map +1 -0
  198. package/dist/tools/scope.d.ts +1 -0
  199. package/dist/tools/scope.js +51 -0
  200. package/dist/tools/scope.js.map +1 -0
  201. package/dist/tools/version.d.ts +1 -0
  202. package/dist/tools/version.js +23 -0
  203. package/dist/tools/version.js.map +1 -0
  204. package/dist/tools/workshop.d.ts +1 -0
  205. package/dist/tools/workshop.js +56 -0
  206. package/dist/tools/workshop.js.map +1 -0
  207. package/dist/views/devlog.d.ts +15 -0
  208. package/dist/views/devlog.js +31 -0
  209. package/dist/views/devlog.js.map +1 -0
  210. package/dist/views/event.d.ts +2 -0
  211. package/dist/views/event.js +6 -0
  212. package/dist/views/event.js.map +1 -0
  213. package/dist/views/flow.d.ts +12 -0
  214. package/dist/views/flow.js +26 -0
  215. package/dist/views/flow.js.map +1 -0
  216. package/dist/views/help.d.ts +2 -0
  217. package/dist/views/help.js +22 -0
  218. package/dist/views/help.js.map +1 -0
  219. package/dist/views/status.d.ts +5 -0
  220. package/dist/views/status.js +50 -0
  221. package/dist/views/status.js.map +1 -0
  222. package/package.json +59 -22
  223. package/{system/resources/textarts → resources/cli-art}/big-logo-title.txt +0 -0
  224. package/{system/resources/textarts → resources/cli-art}/big-shortcut-logo-title.txt +0 -0
  225. package/{system/resources/textarts → resources/cli-art}/medium-logo-title.txt +0 -0
  226. package/{system/resources/textarts → resources/cli-art}/minimenu-header.ptxml +0 -0
  227. package/{system/resources/textarts → resources/cli-art}/minimenu-header.txt +0 -0
  228. package/{system/resources/textarts → resources/cli-art}/small-logo-title.txt +0 -0
  229. package/{system/resources/textarts → resources/cli-art}/wellcome.txt +0 -0
  230. package/resources/docs-templates/Home.md +7 -0
  231. package/resources/docs-templates/README.md +14 -0
  232. package/resources/docs-templates/_Footer.md +1 -0
  233. package/resources/docs-templates/_Sidebar.md +7 -0
  234. package/config/README.md +0 -0
  235. package/docs/README.md +0 -15
  236. package/docs/devlog.md +0 -20
  237. package/invoke-api.js +0 -0
  238. package/invoke-cli.js +0 -105
  239. package/invoke-desktop.js +0 -0
  240. package/invoke-exec.js +0 -0
  241. package/invoke-webapp.js +0 -0
  242. package/main.js +0 -33
  243. package/shell-procedures/deploy-new-workshop.sh +0 -15
  244. package/shell-procedures/new-project.sh +0 -0
  245. package/shell-procedures/new-sheme.sh +0 -0
  246. package/shell-procedures/new-superproject.sh +0 -6
  247. package/shell-procedures/open-project.sh +0 -0
  248. package/shell-procedures/pack-backup.sh +0 -22
  249. package/shell-procedures/project-to-sarcophag.sh +0 -0
  250. package/shell-procedures/publicate.sh +0 -0
  251. package/shell-procedures/pull-archive.sh +0 -0
  252. package/shell-procedures/purge-workshop.sh +0 -4
  253. package/shell-procedures/push-to-bos-server.sh +0 -0
  254. package/shell-procedures/start-cli-interface.sh +0 -1
  255. package/shell-procedures/sweep-into-throwbox.sh +0 -0
  256. package/shell-procedures/synchronize.sh +0 -7
  257. package/system/bridges/README.md +0 -4
  258. package/system/bridges/main.js +0 -41
  259. package/system/commands/README.md +0 -0
  260. package/system/commands/debug.js +0 -20
  261. package/system/commands/exit.js +0 -19
  262. package/system/core/README.md +0 -0
  263. package/system/core/basic-subject-model.js +0 -200
  264. package/system/core/config-controll.js +0 -51
  265. package/system/core/contain-controll.js +0 -28
  266. package/system/core/event-controll.js +0 -12
  267. package/system/core/extending-mod.js +0 -145
  268. package/system/core/main.js +0 -184
  269. package/system/core/raport-controll.js +0 -10
  270. package/system/core/static-extender.js +0 -19
  271. package/system/factors/README.md +0 -0
  272. package/system/factors/bridge-factory.js +0 -5
  273. package/system/factors/command-factory.js +0 -45
  274. package/system/factors/config-factory.js +0 -6
  275. package/system/factors/controller-factory.js +0 -5
  276. package/system/factors/interface-factory.js +0 -70
  277. package/system/factors/model-factory.js +0 -0
  278. package/system/interfaces/README.md +0 -28
  279. package/system/interfaces/cli/index.js +0 -96
  280. package/system/interfaces/cli/init.js +0 -47
  281. package/system/interfaces/cli/loop.js +0 -7
  282. package/system/interfaces/cli/on-close.js +0 -17
  283. package/system/interfaces/cli/on-line.js +0 -24
  284. package/system/interfaces/cli/on-resume.js +0 -15
  285. package/system/interfaces/cli/setup.js +0 -8
  286. package/system/models/README.md +0 -47
  287. package/system/models/archive/README.md +0 -0
  288. package/system/models/archive/actions/README.md +0 -0
  289. package/system/models/archive/class.js +0 -23
  290. package/system/models/archive/events/README.md +0 -0
  291. package/system/models/archive/index.json +0 -18
  292. package/system/models/archive/listeners/README.md +0 -0
  293. package/system/models/archive/methods/README.md +0 -0
  294. package/system/models/forge/README.md +0 -0
  295. package/system/models/forge/actions/README.md +0 -0
  296. package/system/models/forge/class.js +0 -23
  297. package/system/models/forge/events/README.md +0 -0
  298. package/system/models/forge/index.json +0 -18
  299. package/system/models/forge/listeners/README.md +0 -0
  300. package/system/models/forge/methods/README.md +0 -0
  301. package/system/models/project/README.md +0 -0
  302. package/system/models/project/actions/README.md +0 -0
  303. package/system/models/project/class.js +0 -23
  304. package/system/models/project/events/README.md +0 -0
  305. package/system/models/project/index.json +0 -18
  306. package/system/models/project/listeners/README.md +0 -0
  307. package/system/models/project/methods/README.md +0 -0
  308. package/system/models/sarcophag/README.md +0 -0
  309. package/system/models/sarcophag/actions/README.md +0 -0
  310. package/system/models/sarcophag/class.js +0 -22
  311. package/system/models/sarcophag/events/README.md +0 -0
  312. package/system/models/sarcophag/index.json +0 -18
  313. package/system/models/sarcophag/listeners/README.md +0 -0
  314. package/system/models/sarcophag/methods/README.md +0 -0
  315. package/system/models/sheme/README.md +0 -0
  316. package/system/models/sheme/actions/README.md +0 -0
  317. package/system/models/sheme/class.js +0 -23
  318. package/system/models/sheme/events/README.md +0 -0
  319. package/system/models/sheme/index.json +0 -18
  320. package/system/models/sheme/listeners/README.md +0 -0
  321. package/system/models/sheme/methods/README.md +0 -0
  322. package/system/models/superproject/README.md +0 -0
  323. package/system/models/superproject/actions/README.md +0 -0
  324. package/system/models/superproject/class.js +0 -23
  325. package/system/models/superproject/events/README.md +0 -0
  326. package/system/models/superproject/index.json +0 -18
  327. package/system/models/superproject/listeners/README.md +0 -0
  328. package/system/models/superproject/methods/README.md +0 -0
  329. package/system/models/throwbox/README.md +0 -0
  330. package/system/models/throwbox/actions/README.md +0 -0
  331. package/system/models/throwbox/class.js +0 -23
  332. package/system/models/throwbox/events/README.md +0 -0
  333. package/system/models/throwbox/index.json +0 -18
  334. package/system/models/throwbox/listeners/README.md +0 -0
  335. package/system/models/throwbox/methods/README.md +0 -0
  336. package/system/models/workshop/README.md +0 -0
  337. package/system/models/workshop/actions/README.md +0 -0
  338. package/system/models/workshop/class.js +0 -22
  339. package/system/models/workshop/events/README.md +0 -0
  340. package/system/models/workshop/index.json +0 -18
  341. package/system/models/workshop/listeners/README.md +0 -0
  342. package/system/models/workshop/methods/README.md +0 -0
@@ -1,200 +0,0 @@
1
- /*
2
- blacksmith-organization-system
3
- part of Anubis System
4
- Sett Sarverott 2019
5
- */
6
- module.exports=function(BOS){
7
- return class BlacksmithSubject extends BOS{
8
- //static counter=0;
9
- //initializationOfObject(initOpts){
10
-
11
- //}
12
- //loadConfiguration(){
13
-
14
- //}
15
- //eventListenersSetup(){
16
-
17
- //}
18
- };
19
- }
20
-
21
- /*
22
- const {BOS, SE}=require("./main.js");
23
- const fs=require("fs");
24
- const path=require("path");
25
- class BlacksmithSubject extends BOS{
26
- setup(dirpath, name=path.basename(dirpath)){
27
- SE.SAFE_CREATE_DIR(dirpath);
28
- //this.parrent=parrent;
29
- this.status="forged";
30
- this.name=name;
31
- this.dirpath=dirpath;
32
- //this.extensions=[];
33
- //this.history=[];
34
- this.mainWatchHook=null;
35
- this.content=this.refreshContent();
36
- //GITIGNORE READING NEEDED
37
- //this.files=[];
38
- this.watcher=function(){};
39
- //GITIGNORE READING NEEDED
40
- }
41
- refreshContent(){
42
- var content={};
43
- content.files=fs.readdirSync(
44
- this.dirpath,
45
- {withFileTypes:true}
46
- ).map(function(file){
47
- return {
48
- name:file.name,
49
- type:
50
- (file.isFile())
51
- ?
52
- "flie"
53
- :
54
- (
55
- (file.isDirectory())?"dir":"else"
56
- )
57
- }
58
- });
59
- content.status=fs.statSync(this.dirpath);
60
- return content;
61
- }
62
- mainWatch(command){
63
- switch(command){
64
- case "start":
65
- var tmpThis=this;
66
- this.mainWatchHook=fs.watch(this.dirpath,function(...args){
67
- args.push(tmpThis.refreshContent);
68
- tmpThis.watcher(...args);
69
- });
70
- break;
71
- case "stop":
72
- if(this.mainWatchHook)this.mainWatchHook.close();
73
- break;
74
- }
75
- }
76
-
77
- //GITIGNORE READING NEEDED
78
- /*
79
- readContent(dirpath=this.dirpath){
80
- var filelistTmp=fs.readdirSync(dirpath, {withFileTypes:true});
81
- var output=[];
82
- for(var i in filelistTmp){
83
- var tmpFile={
84
- "name":filelistTmp[i].name,
85
- "path":path.join(dirpath,filelistTmp[i].name)
86
- };
87
- fs.stat(tmpFile.path,function(err, data){
88
- tmpFile.status=data;
89
- });
90
- if(filelistTmp[i].isDirectory()){
91
- tmpFile.type="dir";
92
- tmpFile.content=this.readContent(tmpFile.path);
93
- }else if(filelistTmp[i].isFile()){
94
- tmpFile.type="file";
95
- var tmpThis=this;
96
- tmpFile.listener=fs.watchFile(tmpFile.path, function(...args){
97
- tmpThis.watcher(...args);
98
- });
99
- }else{
100
- tmpFile.type="else";
101
- }
102
- output.push(tmpFile);
103
- }
104
- if(dirpath===this.dirpath)this.files=output;
105
- return output;
106
- //fs.watch(path, action);
107
- }
108
- */
109
- //GITIGNORE READING NEEDED
110
- /*
111
- open(){
112
- this.emitter.emit('open');
113
- }
114
- create(){
115
- this.emitter.emit('create');
116
- }
117
- save(){
118
- this.emitter.emit('save');
119
- }
120
- close(){
121
- this.emitter.emit('close');
122
- }
123
- delete(){
124
- this.emitter.emit('delete');
125
- }
126
- move(){
127
- this.emitter.emit('move');
128
- }
129
- list(){
130
- this.emitter.emit('list');
131
- }
132
- upload(){
133
- this.emitter.emit('upload');
134
- }
135
- change(){
136
- this.emitter.emit('change');
137
- }
138
- /*loadStorybook(data){
139
- var tmp=[];
140
- for(var i in data){
141
- var tmptmp=new Fileitem(data[i].path);
142
- tmptmp.checksum=data[i].checksum;
143
- tmp.push(tmptmp);
144
- }
145
- return tmp;
146
- }
147
- checkAgreement(data){
148
- var tmp1=this.loadStorybook(data);
149
- var tmp2=this.scanFiles();
150
- for(var i in tmp1){
151
- for(var i in tmp1){
152
-
153
- }
154
- }
155
- }
156
- scanFiles(){
157
- var tmp=getFilelist(this.getPath());
158
- var tmpFiles=[]
159
- for(var i in tmp){
160
- var tmptmp=new Fileitem(tmp[i]);
161
- tmptmp.getChecksum();
162
- tmpFiles.push(tmptmp);
163
- }
164
- return tmpFiles;
165
- }*/
166
- //open(){
167
- //if(this.isOpened()){
168
-
169
- // return false;
170
- //}else{
171
-
172
- //}
173
- //if(this.watcher==null){
174
- // var tmpThis=this;
175
- // this.watcher=addChangeListener(this.getPath(), function(eventType, filename){
176
- // tmpThis.onChange(eventType, filename);
177
- // });
178
- //}
179
- //this.onOpen();
180
- //}
181
- /*
182
- getWorkshop(){
183
- if(this.parrent instanceof BOS.Workshop){
184
- return this.parrent;
185
- }else{
186
- return this.parrent.parrent;
187
- }
188
- }
189
- getSuperproject(){
190
- if(this.parrent instanceof BOS.Workshop){
191
- return this;
192
- }else{
193
- return this.parrent;
194
- }
195
- }
196
- */
197
- /*
198
- }
199
- module.exports=BlacksmithSubject;
200
- */
@@ -1,51 +0,0 @@
1
- //module.exports=
2
- // (BOS) => class ConfigControll extends BOS.form.Controller
3
- // {
4
- //
5
- // }
6
-
7
- const os = require('os');
8
- const path = require('path');
9
-
10
- const DEFAULT_CONFIG={
11
- workshopPath:path.join(
12
- os.homedir(),
13
- ".__WORKSHOP"
14
- ),
15
- workshopName:"the-thought-forest",
16
- host:os.hostname(),//setternet
17
- user:os.userInfo().username,
18
- basicShell:os.userInfo().shell,
19
- instanceRole:["cli","server","desktop","webapp","command"][0],
20
- encryptArchive:false,
21
- autobackups:false,
22
- autocommit:false,
23
- monitPushingSuggestions:false,
24
- autoversioning:false,
25
- branchPerHost:false,
26
- publishAuth:{
27
- //gitConfigs:[],
28
- //npmConfigs:[],
29
- //ftpCreds...
30
- },
31
- logger:{
32
-
33
- },
34
- workTree:{
35
-
36
- },
37
- setternet:{
38
-
39
- }
40
- }
41
-
42
- const CONFIG_CONTROLL={
43
- SETUP:{
44
- }
45
- }
46
-
47
- module.exports=CONFIG_CONTROLL;
48
- // (BOS) => class RaportControll extends BOS.form.Controller
49
- // {
50
-
51
- // }
@@ -1,28 +0,0 @@
1
- //module.exports=
2
- // (BOS) => class ContainControll extends BOS.form.Controller
3
- // {
4
- //
5
- // }
6
-
7
- const fs = require('fs');
8
- const path = require('path');
9
- const os = require('os');
10
- const {loadJSON, changeCase, capitalFirst} = require('carnival-toolbox');
11
-
12
- const CONTAIN_CONTROLL={
13
-
14
- IsWorkshopDeployed(){
15
- return fs.existsSync(
16
- path.join(
17
- os.homedir(),
18
- ".__WORKSHOP"
19
- )
20
- );
21
- }
22
- }
23
-
24
- module.exports=CONTAIN_CONTROLL;
25
- // (BOS) => class RaportControll extends BOS.form.Controller
26
- // {
27
-
28
- // }
@@ -1,12 +0,0 @@
1
- //const {BOS}=require("./main.js");
2
- //const events=require("events");
3
-
4
- //class BOSlistener extends events.EventEmitter{};
5
-
6
- //module.exports=function(){return new BOSlistener();}
7
-
8
- //module.exports=
9
- // (BOS) => class EventControll extends BOS.form.Controller
10
- // {
11
- //
12
- // }
@@ -1,145 +0,0 @@
1
-
2
- //const transform=require('carnival-toolbox').caseX.transform;
3
- const fs = require('fs');
4
- const path = require('path');
5
- const {changeCase, capitalFirst, debug} = require('carnival-toolbox');
6
-
7
- const EXTENDER={
8
- Update(updatePack, whoAmI=this){
9
- Object.assign(
10
- whoAmI,
11
- updatePack
12
- );
13
- return whoAmI;
14
- },
15
- HookRef(contextRef, hookName, whoAmI=this){
16
- Object.defineProperty(
17
- whoAmI,
18
- hookName,
19
- {
20
- get(){
21
- return contextRef;
22
- }
23
- }
24
- );
25
- return whoAmI;
26
- },
27
- LoadExt(...pathChain){
28
- pathChain.push(`${pathChain.pop()}.js`);
29
- //console.log(this);
30
- const EXT=require(
31
- this.PathTo(...pathChain)
32
- );
33
- this.Update(
34
- EXT
35
- );
36
- return Object.keys(EXT);
37
- },
38
- LoadController(name){
39
- debug.log("CONTROLER-LOAD:", [name]);
40
- this.CONTROLLERS[name]=this.LoadExt("system", "core", name);
41
- },
42
- LoadInterface(name){
43
- debug.log("INTERFACE-LOAD:", [name]);
44
- //this.loadExt("system", "interfaces", name)
45
- return require(
46
- this.PathTo(
47
- "system",
48
- "interfaces",
49
- `${name}`,
50
- `index.js`
51
- )
52
- )
53
- },
54
- LoadBridge(name){
55
- debug.log("BRIDGE-LOAD:", [name]);
56
- //this.LoadExt("system", "bridge", name)
57
- },
58
- LoadAllControllers(){
59
- const autolistControllers=fs.readdirSync(__dirname).filter(
60
- (filename)=>filename.endsWith("-controll.js")
61
- ).map(
62
- (name)=>path.basename(name, ".js")
63
- );
64
- for(var item of autolistControllers){
65
- this.LoadController(item);
66
- //console.log(item)
67
- }
68
- },
69
- LoadAllFactors(){
70
- const factoryScripts=fs.readdirSync(
71
- this.PathTo("system","factors"),
72
- {withFileTypes:true}
73
- ).filter(
74
- (item)=>item.isFile()
75
- ).filter(
76
- (item)=>item.name.endsWith("-factory.js")
77
- ).map(
78
- (item)=>item.name
79
- );
80
- //this.FACTORS={};
81
- //console.log(factoryScripts);
82
- for(var script of factoryScripts){
83
- debug.log("FACTOR-LOAD:", [script.split("-")[0]]);
84
- this.FACTORS[
85
- capitalFirst(script.split("-")[0])
86
- ]=require(this.PathTo("system","factors",script));
87
- }
88
- },
89
- LoadCommand(name, script){
90
- debug.log("COMMAND-LOAD:", [name,script]);
91
- this.COMMANDS[name]=require(
92
- this.PathTo( "system", "commands", script)
93
- );
94
- },
95
- LoadAllCommands(){
96
- const commandsScripts=fs.readdirSync(
97
- this.PathTo("system", "commands"),
98
- {withFileTypes:true}
99
- ).filter(
100
- (script)=>script.isFile()
101
- ).filter(
102
- (script)=>path.extname(script.name)==".js"
103
- ).map(
104
- (script)=>script.name
105
- );
106
- for(var script of commandsScripts){
107
- this.LoadCommand(
108
- changeCase(
109
- path.basename(script, ".js")
110
- ).from("kebabcase").to("camelcase").GO,
111
- script
112
- );
113
- }
114
- },
115
- LoadAllModels(){
116
- const models=this.ListModelsDir();
117
- for(var model of models){
118
- this.LoadModel(model);
119
- }
120
- },
121
- LoadModel(name){
122
- debug.log("MODEL-LOAD:", [name]);
123
- //console.log(name);
124
- this.MODELS[name]=require(
125
- this.PathTo( "system", "models", name, "class.js")
126
- );
127
- var modelname = changeCase(name).from("camelcase").to("pascalcase").GO;
128
- this.HookRef(this.MODELS[name], modelname);
129
- },
130
- ListModelsDir(){
131
- return fs.readdirSync(
132
- this.PathTo("system", "models"),
133
- {withFileTypes:true}
134
- ).filter(
135
- (model)=>model.isDirectory()
136
- ).map(
137
- (model)=>model.name
138
- );
139
- }
140
- }
141
-
142
- module.exports=function(BOS){
143
- EXTENDER.Update(EXTENDER, BOS);
144
- return BOS;
145
- }
@@ -1,184 +0,0 @@
1
- /*
2
- blacksmith-organization-system
3
- part of Anubis System
4
- Sett Sarverott 2019
5
- */
6
-
7
- //const SE=require("./static-extender.js");
8
-
9
- const {caseX}=require('carnival-toolbox');
10
- const child_process = require('child_process');
11
- const os = require('os');
12
- const fs = require('fs');
13
- const path = require('path');
14
- const EventEmitter = require('events');
15
-
16
- const CONTROLLERS = {}
17
- const MODELS = {}
18
- const ID_REJESTR = {}
19
- const FACTORS = {}
20
- const INTERFACES = {}
21
- const COMMANDS = {}
22
-
23
-
24
-
25
- class BlacksmithOrganizationSystem extends EventEmitter{
26
- constructor(classname, modelDir){
27
- this.type=classname.replace("Blacksmith","");
28
-
29
- //this.readIndex();
30
- //this.openManuals();
31
- //this.eventEmitter=new eventEmitter();
32
-
33
- this.loadMethods(modelDir);
34
- this.loadExtenders(modelDir);
35
- this.loadEvents(modelDir);
36
- this.loadActions(modelDir);
37
- this.loadListeners(modelDir);
38
- }
39
- //readIndex(){
40
-
41
- //}
42
- //openManuals(){
43
-
44
- //}
45
- static GetModelScripts(section, modelDir){
46
- return fs.readdirSync(
47
- path.join(
48
- modelDir,
49
- section
50
- ),
51
- {withFileTypes:true}
52
- ).filter(
53
- (script)=>script.isFile()&&script.name.endsWith(".js")
54
- ).map(
55
- (direntItem)=>direntItem.name
56
- );
57
- }
58
- loadEvents(modelDir){ // direct listeners and emitters of model
59
- const modelScripts=BOS.GetModelScripts(
60
- "events",
61
- modelDir
62
- );
63
-
64
- }
65
- loadActions(modelDir){// acts like deamons or child precesses
66
- const modelScripts=BOS.GetModelScripts(
67
- "actions",
68
- modelDir
69
- );
70
- }
71
- loadListeners(modelDir){// everything what that model listens
72
- const modelScripts=BOS.GetModelScripts(
73
- "listeners",
74
- modelDir
75
- );
76
- }
77
- loadMethods(modelDir){// synchronous, returns data
78
- const modelScripts=BOS.GetModelScripts(
79
- "methods",
80
- modelDir
81
- );
82
- }
83
- loadExtenders(modelDir){// extensionpacks for model
84
- const modelScripts=BOS.GetModelScripts(
85
- "extenders",
86
- modelDir
87
- );
88
- for(var scriptName of modelScripts){
89
- Object.assign(
90
- this,
91
- require(
92
- path.join(
93
- modelDir,
94
- "extenders",
95
- scriptName
96
- )
97
- )
98
- );
99
- }
100
- }
101
- static get Subject(){
102
- return require("./basic-subject-model.js")(BOS);
103
- }
104
- static PathTo(...locationChain){
105
- return path.join(__dirname, "..", "..", ...locationChain);
106
- }
107
- static get BOS(){
108
- return this;
109
- }
110
- get BOS(){
111
- return BOS;
112
- }
113
- static get INITIALIZE(){
114
- return BOS.LOAD();
115
- }
116
- static BOX_EMPTY(boxHook){
117
- return Object.keys(boxHook).length==0;
118
- }
119
- static LOAD(...limiter){
120
- if(this.BOX_EMPTY(CONTROLLERS))this.LoadAllControllers();
121
- if(this.BOX_EMPTY(MODELS))this.LoadAllModels();
122
- if(this.BOX_EMPTY(FACTORS))this.LoadAllFactors();
123
- if(this.BOX_EMPTY(COMMANDS))this.LoadAllCommands();
124
- /*}
125
- for(var i in loadList){
126
- if(
127
- (
128
- limiter.length==0
129
- ||
130
- limiter.includes(i)
131
- )
132
- &&
133
- loadList[i][0])
134
- ){
135
- this[
136
- loadList[i][1]
137
- ]();
138
- }
139
- }*/
140
- return this;
141
- }
142
- //static debugLog(...args){
143
- // if(BOS.DEBUGGING)console.log(...args);
144
- //}
145
- };
146
-
147
- //BOS.DEBUGGING=false;
148
-
149
- BOS=BlacksmithOrganizationSystem;
150
- //BOS.INIT_BASE();
151
- //BOS.TypeList=TYPES_LIST;
152
- //BOS.IdRegistList=ID_REJESTR
153
-
154
- const FORM=require('./extending-mod.js')(BOS);
155
- BOS.Update({
156
- CONTROLLERS,
157
- MODELS,
158
- ID_REJESTR,
159
- FACTORS,
160
- INTERFACES,
161
- COMMANDS
162
- });
163
- //BOS.LOAD();
164
- //BOS.loadInterface()
165
-
166
- //
167
-
168
- module.exports={
169
- BOS,
170
- get INITIALIZE(){
171
- return BOS.INITIALIZE;
172
- }
173
- //CONTROLLERS,
174
- //MODELS,
175
- //ID_REJESTR,
176
- //FACTORS,
177
- //INTERFACES,
178
- //COMMANDS
179
- //ID_REJESTR
180
- //FORM
181
-
182
- //SE
183
- //HOSTNAME
184
- };
@@ -1,10 +0,0 @@
1
-
2
- const RAPORT_CONTROLL={
3
-
4
- }
5
-
6
- module.exports=RAPORT_CONTROLL;
7
- // (BOS) => class RaportControll extends BOS.form.Controller
8
- // {
9
-
10
- // }
@@ -1,19 +0,0 @@
1
- const fs=require("fs");
2
- module.exports={
3
- SAFE_CREATE_DIR(path){
4
- fs.mkdirSync(path,{recursive:true})
5
- },
6
- WRITE_OUTPUT_FILE(filepath, output, readable=false){
7
- fs.writeFileSync(
8
- filepath,
9
- JSON.stringify(
10
- ...((readable)?[output, null, '\t']:[output])
11
- )
12
- );
13
- },
14
- READ_INPUT_FILE(filepath){
15
- return JSON.parse(fs.readFileSync(
16
- filepath
17
- ));
18
- }
19
- }
File without changes
@@ -1,5 +0,0 @@
1
-
2
-
3
- module.exports=class BOS_Bridge{
4
-
5
- };
@@ -1,45 +0,0 @@
1
- const {debug} = require('carnival-toolbox');
2
-
3
- module.exports=class BOS_Command{
4
- constructor(name){
5
- this.name=name;
6
- this.interfaces={};
7
- this.CONTEXT={};
8
- }
9
- USAGE(interfaceName){
10
- return {
11
- interfaceName:interfaceName,
12
- interfaces:this.interfaces,
13
- get DEFINE(){
14
- if(
15
- !this.interfaces.hasOwnProperty(this.interfaceName)
16
- )this.interfaces[this.interfaceName]={get:()=>null,set:(x)=>null};
17
- return {
18
- interfaceName:this.interfaceName,
19
- interfaces:this.interfaces,
20
- set METHOD(funct){
21
- this.GET=()=>funct;
22
- },
23
- set SET(funct){
24
- this.interfaces[this.interfaceName].set=funct;
25
- },
26
- set GET(funct){
27
- this.interfaces[this.interfaceName].get=funct;
28
- }
29
- }
30
- },
31
- get LOAD(){
32
- return this.interfaces[this.interfaceName];
33
- }
34
- }
35
- }
36
- INCLUDE_TO(context, interfaceName){
37
- this.CONTEXT[interfaceName]=context;
38
- debug.log(`---including command ${this.name} as usage by ${interfaceName} in context`)
39
- Object.defineProperty(
40
- context,
41
- this.name,
42
- this.USAGE(interfaceName).LOAD
43
- );
44
- }
45
- }
@@ -1,6 +0,0 @@
1
-
2
- //os.userInfo().username,
3
-
4
- module.exports=class BOS_config{
5
-
6
- }