@dcupl/cli 0.0.3 → 0.0.6
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.d.ts +1 -0
- package/dist/index.js +23 -13
- package/dist/index.js.map +1 -0
- package/files/common/.vscode/settings.json +18 -0
- package/files/demo/bookstore_01/dcupl/bookstore_local.ldp.json +16 -4
- package/files/demo/bookstore_01/dcupl/{api → data}/author.csv +0 -0
- package/files/demo/{bookstore_02/dcupl/api → bookstore_01/dcupl/data}/book.csv +10059 -10059
- package/files/demo/bookstore_01/dcupl/{api → data}/book_language.json +0 -0
- package/files/demo/bookstore_01/dcupl/data/publisher.csv +2265 -0
- package/files/demo/bookstore_01/dcupl/models/author.dcupl.json +16 -0
- package/files/demo/bookstore_01/dcupl/models/book.dcupl.json +31 -0
- package/files/demo/bookstore_01/dcupl/models/book_language.dcupl.json +9 -0
- package/files/demo/bookstore_01/dcupl/models/publisher.dcupl.json +9 -0
- package/files/demo/bookstore_02/dcupl/bookstore_local.ldp.json +53 -5
- package/files/demo/bookstore_02/dcupl/data/address.csv +1001 -0
- package/files/demo/bookstore_02/dcupl/{api → data}/author.csv +0 -0
- package/files/demo/{bookstore_01/dcupl/api → bookstore_02/dcupl/data}/book.csv +10059 -10059
- package/files/demo/bookstore_02/dcupl/{api → data}/book_language.json +0 -1
- package/files/demo/bookstore_02/dcupl/data/country.csv +233 -0
- package/files/demo/bookstore_02/dcupl/data/cust_order.csv +4001 -0
- package/files/demo/bookstore_02/dcupl/data/customer.csv +2001 -0
- package/files/demo/bookstore_02/dcupl/data/publisher.csv +2265 -0
- package/files/demo/bookstore_02/dcupl/model/adv_address.dcupl.json +20 -0
- package/files/demo/bookstore_02/dcupl/model/adv_country.dcupl.json +7 -0
- package/files/demo/bookstore_02/dcupl/model/adv_cust_order.dcupl.json +21 -0
- package/files/demo/bookstore_02/dcupl/model/adv_customer.dcupl.json +35 -0
- package/files/demo/bookstore_02/dcupl/model/author.dcupl.json +19 -0
- package/files/demo/bookstore_02/dcupl/model/book.dcupl.json +73 -0
- package/files/demo/bookstore_02/dcupl/model/book_language.dcupl.json +9 -0
- package/files/demo/bookstore_02/dcupl/model/publisher.dcupl.json +10 -0
- package/files/demo/bookstore_02/package.json +1 -1
- package/package.json +8 -8
- package/files/demo/bookstore_01/dcupl/api/publisher.csv +0 -26
- package/files/demo/bookstore_01/dcupl/bookstore.dcupl.json +0 -56
- package/files/demo/bookstore_01/dcupl/bookstore_github.ldp.json +0 -26
- package/files/demo/bookstore_02/dcupl/api/publisher.csv +0 -26
- package/files/demo/bookstore_02/dcupl/bookstore.dcupl.json +0 -62
- package/files/demo/bookstore_02/dcupl/bookstore_github.ldp.json +0 -26
- package/src/index.ts +0 -89
- package/tsconfig.json +0 -106
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,10 @@ const initFn = () => {
|
|
|
33
33
|
name: 'Demo Bookstore',
|
|
34
34
|
value: 'bookstore',
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Demo Bookstore Advanced',
|
|
38
|
+
value: 'bookstore_adv',
|
|
39
|
+
}
|
|
36
40
|
],
|
|
37
41
|
},
|
|
38
42
|
])
|
|
@@ -40,32 +44,38 @@ const initFn = () => {
|
|
|
40
44
|
const codeBasePath = (0, path_1.resolve)(__dirname, '../');
|
|
41
45
|
const filesBasePath = (0, path_1.join)(codeBasePath, 'files');
|
|
42
46
|
const demoBasePath = (0, path_1.join)(filesBasePath, 'demo', 'demo_01');
|
|
43
|
-
const
|
|
47
|
+
const bookstore01BasePath = (0, path_1.join)(filesBasePath, 'demo', 'bookstore_01');
|
|
48
|
+
const bookstore02BasePath = (0, path_1.join)(filesBasePath, 'demo', 'bookstore_02');
|
|
44
49
|
const empty01BasePath = (0, path_1.join)(filesBasePath, 'empty', 'empty_01');
|
|
45
50
|
const currentBasePath = (0, path_1.join)(process.cwd());
|
|
46
51
|
const projectFolderPath = (0, path_1.join)(currentBasePath, projectName);
|
|
47
52
|
(0, fs_extra_1.mkdirSync)(projectFolderPath, { recursive: true });
|
|
53
|
+
let currentPath = '';
|
|
48
54
|
if (projectType === 'demo') {
|
|
49
|
-
|
|
50
|
-
recursive: true,
|
|
51
|
-
overwrite: true,
|
|
52
|
-
});
|
|
55
|
+
currentPath = demoBasePath;
|
|
53
56
|
}
|
|
54
57
|
else if (projectType === 'bookstore') {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
currentPath = bookstore01BasePath;
|
|
59
|
+
}
|
|
60
|
+
else if (projectType === 'bookstore_adv') {
|
|
61
|
+
currentPath = bookstore02BasePath;
|
|
59
62
|
}
|
|
60
63
|
else if (projectType === 'empty') {
|
|
61
|
-
|
|
62
|
-
recursive: true,
|
|
63
|
-
overwrite: true,
|
|
64
|
-
});
|
|
64
|
+
currentPath = empty01BasePath;
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
67
|
throw new Error('you have to select a project type');
|
|
68
68
|
}
|
|
69
|
+
(0, fs_extra_1.copySync)(currentPath, projectFolderPath, {
|
|
70
|
+
recursive: true,
|
|
71
|
+
overwrite: true,
|
|
72
|
+
});
|
|
73
|
+
console.log('Preparing! - Visual Studio Code Settings');
|
|
74
|
+
const commonFiles = (0, path_1.join)(filesBasePath, 'common');
|
|
75
|
+
(0, fs_extra_1.copySync)(commonFiles, projectFolderPath, {
|
|
76
|
+
recursive: true,
|
|
77
|
+
overwrite: true,
|
|
78
|
+
});
|
|
69
79
|
console.log((0, kleur_1.blue)('All done! - Next Steps:'));
|
|
70
80
|
console.log('cd ' + projectName);
|
|
71
81
|
console.log('npm i');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0B;AAC1B,2CAAwC;AAExC,uCAA+C;AAC/C,+BAAqC;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CAAC;KACzB,OAAO,CACN,MAAM,EACN,gBAAgB,EAChB,GAAG,EAAE,GAAE,CAAC,EACR,CAAC,IAAI,EAAE,EAAE;IACP,MAAM,EAAE,CAAC;AACX,CAAC,CACF;KACA,aAAa,CAAC,CAAC,CAAC;KAChB,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"json.schemas": [
|
|
3
|
+
{
|
|
4
|
+
"fileMatch": [
|
|
5
|
+
"*.dcupl.json",
|
|
6
|
+
],
|
|
7
|
+
"url": "https://raw.githubusercontent.com/dcupl/dcupl-schema/main/bin/dcupl.vscode.schema.json"
|
|
8
|
+
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"fileMatch": [
|
|
12
|
+
"*.ldp.json",
|
|
13
|
+
],
|
|
14
|
+
"url": "https://raw.githubusercontent.com/dcupl/dcupl-schema/main/bin/dcupl.loader.schema.json"
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"url": "http://localhost:8083/
|
|
3
|
+
"url": "http://localhost:8083/models/book.dcupl.json",
|
|
4
|
+
"type":"model"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"url": "http://localhost:8083/models/book_language.dcupl.json",
|
|
8
|
+
"type":"model"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"url": "http://localhost:8083/models/author.dcupl.json",
|
|
12
|
+
"type":"model"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"url": "http://localhost:8083/models/publisher.dcupl.json",
|
|
4
16
|
"type":"model"
|
|
5
17
|
},
|
|
6
18
|
{
|
|
7
|
-
"url": "http://localhost:8083/
|
|
19
|
+
"url": "http://localhost:8083/data/author.csv",
|
|
8
20
|
"type":"data",
|
|
9
21
|
"model": "author"
|
|
10
22
|
},
|
|
11
23
|
{
|
|
12
|
-
"url": "http://localhost:8083/
|
|
24
|
+
"url": "http://localhost:8083/data/book.csv",
|
|
13
25
|
"type":"data",
|
|
14
26
|
"model": "book"
|
|
15
27
|
},
|
|
16
28
|
{
|
|
17
|
-
"url": "http://localhost:8083/
|
|
29
|
+
"url": "http://localhost:8083/data/publisher.csv",
|
|
18
30
|
"type":"data",
|
|
19
31
|
"model": "publisher"
|
|
20
32
|
}
|
|
File without changes
|