@dcupl/cli 0.0.21 → 0.0.24
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/functions/files/files-copy.d.ts +5 -0
- package/dist/functions/files/files-copy.js +43 -0
- package/dist/functions/files/files-copy.js.map +1 -0
- package/dist/functions/files/files-list-tags.d.ts +2 -0
- package/dist/functions/files/files-list-tags.js +39 -0
- package/dist/functions/files/files-list-tags.js.map +1 -0
- package/dist/functions/files/files-pull.d.ts +4 -0
- package/dist/functions/files/files-pull.js +50 -0
- package/dist/functions/files/files-pull.js.map +1 -0
- package/dist/functions/files/files-push.d.ts +4 -0
- package/dist/functions/files/files-push.js +89 -0
- package/dist/functions/files/files-push.js.map +1 -0
- package/dist/functions/generate/projects/generate-project.d.ts +1 -0
- package/dist/functions/{init.js → generate/projects/generate-project.js} +12 -15
- package/dist/functions/generate/projects/generate-project.js.map +1 -0
- package/dist/functions/generate/types/generate-types.d.ts +1 -0
- package/dist/functions/generate/types/generate-types.js +39 -0
- package/dist/functions/generate/types/generate-types.js.map +1 -0
- package/dist/functions/generate/types/generate.helper.d.ts +7 -0
- package/dist/functions/generate/types/generate.helper.js +102 -0
- package/dist/functions/generate/types/generate.helper.js.map +1 -0
- package/dist/functions/{config/config.common.d.ts → helper/config.helper.d.ts} +6 -0
- package/dist/functions/{config/config.common.js → helper/config.helper.js} +1 -1
- package/dist/functions/helper/config.helper.js.map +1 -0
- package/dist/functions/serve/app.service.js +2 -2
- package/dist/index.js +42 -10
- package/dist/index.js.map +1 -1
- package/files/common/.vscode/settings.json +2 -1
- package/files/common/dcupl.config.json +7 -1
- package/files/common/readme.md +1 -1
- package/files/demo/bookstore_01/dcupl/dcupl.lc.json +81 -0
- package/files/demo/bookstore_01/dcupl/models/author.dcupl.json +2 -2
- package/files/demo/bookstore_01/dcupl/models/book.dcupl.json +3 -3
- package/files/demo/bookstore_01/dcupl/models/book_language.dcupl.json +1 -1
- package/files/demo/bookstore_01/dcupl/models/publisher.dcupl.json +1 -1
- package/files/demo/bookstore_01/dcupl.config.json +8 -3
- package/files/demo/bookstore_02/dcupl/model/adv_address.dcupl.json +3 -3
- package/files/demo/bookstore_02/dcupl/model/adv_country.dcupl.json +1 -1
- package/files/demo/bookstore_02/dcupl/model/adv_cust_order.dcupl.json +2 -2
- package/files/demo/bookstore_02/dcupl/model/adv_customer.dcupl.json +4 -4
- package/files/demo/bookstore_02/dcupl/model/author.dcupl.json +2 -2
- package/files/demo/bookstore_02/dcupl/model/book.dcupl.json +6 -6
- package/files/demo/bookstore_02/dcupl/model/book_language.dcupl.json +1 -1
- package/files/demo/bookstore_02/dcupl/model/publisher.dcupl.json +1 -1
- package/files/{empty/empty_01 → starters/starter_01}/dcupl/data/a.data.json +0 -0
- package/files/{empty/empty_01/dcupl/example.dcupl.lc.json → starters/starter_01/dcupl/dcupl.lc.json} +3 -12
- package/files/{empty/empty_01 → starters/starter_01}/dcupl/models/a.dcupl.json +2 -2
- package/files/starters/starter_01/dcupl.config.json +10 -0
- package/files/{empty/empty_01 → starters/starter_01}/package.json +0 -0
- package/package.json +11 -1
- package/dist/functions/config/config-pull.d.ts +0 -1
- package/dist/functions/config/config-pull.js +0 -43
- package/dist/functions/config/config-pull.js.map +0 -1
- package/dist/functions/config/config-push.d.ts +0 -1
- package/dist/functions/config/config-push.js +0 -48
- package/dist/functions/config/config-push.js.map +0 -1
- package/dist/functions/config/config.common.js.map +0 -1
- package/dist/functions/init.d.ts +0 -1
- package/dist/functions/init.js.map +0 -1
- package/files/demo/bookstore_01/dcupl/example.dcupl.lc.json +0 -56
- package/files/empty/empty_01/dcupl.config.json +0 -5
package/dist/index.js
CHANGED
|
@@ -3,24 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const yargs_1 = tslib_1.__importDefault(require("yargs"));
|
|
5
5
|
const helpers_1 = require("yargs/helpers");
|
|
6
|
-
const
|
|
7
|
-
const config_push_1 = require("./functions/config/config-push");
|
|
8
|
-
const config_pull_1 = require("./functions/config/config-pull");
|
|
6
|
+
const generate_project_1 = require("./functions/generate/projects/generate-project");
|
|
9
7
|
const main_1 = require("./functions/serve/main");
|
|
10
8
|
const welcome_1 = require("./functions/welcome");
|
|
9
|
+
const files_push_1 = require("./functions/files/files-push");
|
|
10
|
+
const generate_types_1 = require("./functions/generate/types/generate-types");
|
|
11
|
+
const files_pull_1 = require("./functions/files/files-pull");
|
|
12
|
+
const files_copy_1 = require("./functions/files/files-copy");
|
|
13
|
+
const files_list_tags_1 = require("./functions/files/files-list-tags");
|
|
11
14
|
const emoji = require('node-emoji');
|
|
12
15
|
(0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
13
16
|
.command(['welcome', 'hey', 'rocks', emoji.get('rocket')], 'You are awesome!', () => { }, (argv) => {
|
|
14
17
|
(0, welcome_1.welcomeFn)();
|
|
15
18
|
})
|
|
16
19
|
.command('init', 'Init a local project based on one of our starters', () => { }, (argv) => {
|
|
17
|
-
(0,
|
|
18
|
-
})
|
|
19
|
-
.command('config:push', 'Upload a your local loader config to your dcupl console project', () => { }, (argv) => {
|
|
20
|
-
(0, config_push_1.pushConfig)();
|
|
21
|
-
})
|
|
22
|
-
.command('config:pull', 'Update your local loader config with your dcupl console project config', () => { }, (argv) => {
|
|
23
|
-
(0, config_pull_1.pullConfig)();
|
|
20
|
+
(0, generate_project_1.generateProject)();
|
|
24
21
|
})
|
|
25
22
|
.command('serve [path]', 'Starts your local dev server', (args) => {
|
|
26
23
|
return args.option('port', { default: '8083' }).positional('path', {
|
|
@@ -29,6 +26,41 @@ const emoji = require('node-emoji');
|
|
|
29
26
|
});
|
|
30
27
|
}, (argv) => {
|
|
31
28
|
(0, main_1.bootstrap)(argv);
|
|
29
|
+
})
|
|
30
|
+
.command('generate:types', 'Generate Typescript types for your dcupl models', () => { }, (argv) => {
|
|
31
|
+
(0, generate_types_1.generateTypesFn)();
|
|
32
|
+
})
|
|
33
|
+
.command('files:push', 'Upload files to the dcupl cloud', (args) => {
|
|
34
|
+
return args.option('tag', {
|
|
35
|
+
describe: 'The name of your tag. Default is the current Date as ISO-string',
|
|
36
|
+
default: '',
|
|
37
|
+
});
|
|
38
|
+
}, (argv) => {
|
|
39
|
+
(0, files_push_1.pushFiles)(argv);
|
|
40
|
+
})
|
|
41
|
+
.command('files:pull', 'Download files from the dcupl cloud', (args) => {
|
|
42
|
+
return args.option('tag', {
|
|
43
|
+
describe: 'The name of your tag. Default is the current Date as ISO-string',
|
|
44
|
+
default: '',
|
|
45
|
+
});
|
|
46
|
+
}, (argv) => {
|
|
47
|
+
(0, files_pull_1.pullFiles)(argv);
|
|
48
|
+
})
|
|
49
|
+
.command('files:copy', 'Download files from the dcupl cloud', (args) => {
|
|
50
|
+
return args
|
|
51
|
+
.option('from', {
|
|
52
|
+
describe: 'The name of your tag. Default is the current Date as ISO-string',
|
|
53
|
+
default: '',
|
|
54
|
+
})
|
|
55
|
+
.option('to', {
|
|
56
|
+
describe: 'The name of your tag. Default is the current Date as ISO-string',
|
|
57
|
+
default: '',
|
|
58
|
+
});
|
|
59
|
+
}, (argv) => {
|
|
60
|
+
(0, files_copy_1.copyFiles)(argv);
|
|
61
|
+
})
|
|
62
|
+
.command('files:list', 'Lists all the uploaded tags ', () => { }, (argv) => {
|
|
63
|
+
(0, files_list_tags_1.listTags)(argv);
|
|
32
64
|
})
|
|
33
65
|
.demandCommand(1)
|
|
34
66
|
.parse();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,2CAAwC;AAExC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,2CAAwC;AAExC,qFAAiF;AACjF,iDAAmD;AACnD,iDAAgD;AAChD,6DAAyD;AACzD,8EAA4E;AAC5E,6DAAyD;AACzD,6DAAyD;AACzD,uEAA6D;AAE7D,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAEpC,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACzB,OAAO,CACN,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAChD,kBAAkB,EAClB,GAAG,EAAE,GAAE,CAAC,EACR,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,mBAAS,GAAE,CAAC;AACd,CAAC,CACF;KACA,OAAO,CACN,MAAM,EACN,mDAAmD,EACnD,GAAG,EAAE,GAAE,CAAC,EACR,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,kCAAe,GAAE,CAAC;AACpB,CAAC,CACF;KACA,OAAO,CACN,cAAc,EACd,8BAA8B,EAC9B,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE;QACjE,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;AACL,CAAC,EACD,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,gBAAS,EAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CACF;KACA,OAAO,CACN,gBAAgB,EAChB,iDAAiD,EACjD,GAAG,EAAE,GAAE,CAAC,EACR,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,gCAAe,GAAE,CAAC;AACpB,CAAC,CACF;KACA,OAAO,CACN,YAAY,EACZ,iCAAiC,EACjC,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACxB,QAAQ,EAAE,iEAAiE;QAC3E,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC,EACD,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,sBAAS,EAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CACF;KACA,OAAO,CACN,YAAY,EACZ,qCAAqC,EACrC,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACxB,QAAQ,EAAE,iEAAiE;QAC3E,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC,EACD,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,sBAAS,EAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CACF;KACA,OAAO,CACN,YAAY,EACZ,qCAAqC,EACrC,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,IAAI;SACR,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,iEAAiE;QAC3E,OAAO,EAAE,EAAE;KACZ,CAAC;SACD,MAAM,CAAC,IAAI,EAAE;QACZ,QAAQ,EAAE,iEAAiE;QAC3E,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACP,CAAC,EACD,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,sBAAS,EAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CACF;KACA,OAAO,CACN,YAAY,EACZ,8BAA8B,EAC9B,GAAG,EAAE,GAAE,CAAC,EACR,CAAC,IAAI,EAAE,EAAE;IACP,IAAA,0BAAQ,EAAC,IAAI,CAAC,CAAC;AACjB,CAAC,CACF;KAEA,aAAa,CAAC,CAAC,CAAC;KAChB,KAAK,EAAE,CAAC"}
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
{
|
|
11
11
|
"fileMatch": [
|
|
12
12
|
"*.dcupl.lc.json",
|
|
13
|
+
"dcupl.lc.json",
|
|
13
14
|
],
|
|
14
|
-
"url": "https://raw.githubusercontent.com/dcupl/dcupl-schema/main/bin/dcupl.loader.schema.json"
|
|
15
|
+
"url": "https://raw.githubusercontent.com/dcupl/dcupl-schema/main/bin/dcupl.loader.vscode.schema.json"
|
|
15
16
|
|
|
16
17
|
}
|
|
17
18
|
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"projectId": "",
|
|
3
|
-
"loaderPath": "path/to/loader/
|
|
3
|
+
"loaderPath": "path/to/loader/dcupl.lc.json",
|
|
4
|
+
"modelsBasePath": "path/to/models/",
|
|
5
|
+
"baseFolder": "dcupl",
|
|
6
|
+
"filesUpload": {
|
|
7
|
+
"include": ["**/*.json", "**/*.csv"],
|
|
8
|
+
"exclude": []
|
|
9
|
+
}
|
|
4
10
|
}
|
package/files/common/readme.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install
|
|
|
13
13
|
- Go to [https://console.dcupl.com](https://console.dcupl.com) and create your **free** account.
|
|
14
14
|
- Set your `projectId` in the dcupl.config.json
|
|
15
15
|
- Set your `apiKey` in the dcupl.secrets.json
|
|
16
|
-
- Push your local
|
|
16
|
+
- Push your local workspace to the console using the CLI `dcupl files:push --tag my-first-push`
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
### 3) Start your development server
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"applications": [
|
|
3
|
+
{
|
|
4
|
+
"key": "localhost",
|
|
5
|
+
"description": "My localhost preset",
|
|
6
|
+
"variables": [
|
|
7
|
+
{
|
|
8
|
+
"key": "apiUrl",
|
|
9
|
+
"value": "http://localhost:8083"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"key": "draft",
|
|
15
|
+
"description": "My draft preset.",
|
|
16
|
+
"environmentKeys": ["default"],
|
|
17
|
+
"variables": [
|
|
18
|
+
{
|
|
19
|
+
"key": "apiUrl",
|
|
20
|
+
"value": "https://cdn.dcupl.com/files/projects/${projectId}/draft"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"key": "published",
|
|
26
|
+
"description": "My published preset.",
|
|
27
|
+
"environmentKeys": ["default"],
|
|
28
|
+
"variables": [
|
|
29
|
+
{
|
|
30
|
+
"key": "apiUrl",
|
|
31
|
+
"value": "https://cdn.dcupl.com/files/projects/${projectId}/published"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"environments": [
|
|
37
|
+
{
|
|
38
|
+
"key": "default",
|
|
39
|
+
"description": "The default environment containing variables that are used in multiple presets.",
|
|
40
|
+
"variables": [
|
|
41
|
+
{
|
|
42
|
+
"key": "projectId",
|
|
43
|
+
"value": ""
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"resources": [
|
|
49
|
+
{
|
|
50
|
+
"url": "${apiUrl}/models/book.dcupl.json",
|
|
51
|
+
"type": "model"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"url": "${apiUrl}/models/book_language.dcupl.json",
|
|
55
|
+
"type": "model"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"url": "${apiUrl}/models/author.dcupl.json",
|
|
59
|
+
"type": "model"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"url": "${apiUrl}/models/publisher.dcupl.json",
|
|
63
|
+
"type": "model"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"url": "${apiUrl}/data/author.csv",
|
|
67
|
+
"type": "data",
|
|
68
|
+
"model": "author"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"url": "${apiUrl}/data/book.csv",
|
|
72
|
+
"type": "data",
|
|
73
|
+
"model": "book"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"url": "${apiUrl}/data/publisher.csv",
|
|
77
|
+
"type": "data",
|
|
78
|
+
"model": "publisher"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"key": "book",
|
|
3
|
-
"
|
|
3
|
+
"references": [
|
|
4
4
|
{
|
|
5
5
|
"key": "publisher_id",
|
|
6
6
|
"model": "publisher",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"properties": [
|
|
21
21
|
{
|
|
22
22
|
"key": "title",
|
|
23
|
-
"
|
|
23
|
+
"type": "string",
|
|
24
24
|
"filter": true
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"key": "language_code",
|
|
28
|
-
"
|
|
28
|
+
"type": "string"
|
|
29
29
|
}
|
|
30
30
|
]
|
|
31
31
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"projectId": "",
|
|
3
|
+
"loaderPath": "dcupl/dcupl.lc.json",
|
|
4
|
+
"modelsBasePath": "dcupl/models",
|
|
5
|
+
"baseFolder": "dcupl",
|
|
6
|
+
"filesUpload": {
|
|
7
|
+
"include": ["**/*.json", "**/*.csv"],
|
|
8
|
+
"exclude": []
|
|
4
9
|
}
|
|
5
|
-
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"key": "address",
|
|
3
|
-
"
|
|
3
|
+
"references": [
|
|
4
4
|
{
|
|
5
5
|
"key": "country_id",
|
|
6
6
|
"model": "country",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"properties": [
|
|
11
11
|
{
|
|
12
12
|
"key": "street_number",
|
|
13
|
-
"
|
|
13
|
+
"type": "string"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"key": "city",
|
|
17
|
-
"
|
|
17
|
+
"type": "string"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{
|
|
3
3
|
"key": "customer",
|
|
4
|
-
"
|
|
4
|
+
"references": [
|
|
5
5
|
{
|
|
6
6
|
"key": "addresses",
|
|
7
7
|
"model": "address",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"properties": [
|
|
22
22
|
{
|
|
23
23
|
"key": "first_name",
|
|
24
|
-
"
|
|
24
|
+
"type": "string"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"key": "last_name",
|
|
28
|
-
"
|
|
28
|
+
"type": "string"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"key": "email",
|
|
32
|
-
"
|
|
32
|
+
"type": "string"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"key": "author",
|
|
3
|
-
"
|
|
3
|
+
"references": [
|
|
4
4
|
{
|
|
5
5
|
"key": "book_ids",
|
|
6
6
|
"model": "book",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"properties": [
|
|
11
11
|
{
|
|
12
12
|
"key": "author_name",
|
|
13
|
-
"
|
|
13
|
+
"type": "string",
|
|
14
14
|
"filter": {
|
|
15
15
|
"comparisonType": "containsIgnoreCase"
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"key": "book",
|
|
3
|
-
"
|
|
3
|
+
"references": [
|
|
4
4
|
{
|
|
5
5
|
"key": "publisher_id",
|
|
6
6
|
"model": "publisher",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"properties": [
|
|
32
32
|
{
|
|
33
33
|
"key": "title",
|
|
34
|
-
"
|
|
34
|
+
"type": "string",
|
|
35
35
|
"filter": {
|
|
36
36
|
"autocompletion": {
|
|
37
37
|
"maxNrOfSuggestions": 5
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"key": "isbn13",
|
|
44
|
-
"
|
|
44
|
+
"type": "string"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"key": "publication_date",
|
|
48
|
-
"
|
|
48
|
+
"type": "string"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"key": "language",
|
|
52
|
-
"
|
|
52
|
+
"type": "string",
|
|
53
53
|
"derive": {
|
|
54
54
|
"localField": "language_code",
|
|
55
55
|
"remoteProperty": "language_name"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"key": "publisher",
|
|
60
|
-
"
|
|
60
|
+
"type": "string",
|
|
61
61
|
"derive": {
|
|
62
62
|
"localField": "publisher_id",
|
|
63
63
|
"remoteProperty": "publisher_name"
|
|
File without changes
|
package/files/{empty/empty_01/dcupl/example.dcupl.lc.json → starters/starter_01/dcupl/dcupl.lc.json}
RENAMED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"applications": [
|
|
3
3
|
{
|
|
4
|
-
"key": "
|
|
5
|
-
"description": "My
|
|
6
|
-
"environmentKeys": ["default"]
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"environments": [
|
|
10
|
-
{
|
|
11
|
-
"key": "default",
|
|
12
|
-
"description": "My default environment for local development",
|
|
4
|
+
"key": "localhost",
|
|
5
|
+
"description": "My localhost preset",
|
|
13
6
|
"variables": [
|
|
14
7
|
{
|
|
15
8
|
"key": "apiUrl",
|
|
@@ -18,13 +11,11 @@
|
|
|
18
11
|
]
|
|
19
12
|
}
|
|
20
13
|
],
|
|
21
|
-
"headers": [],
|
|
22
14
|
"resources": [
|
|
23
15
|
{
|
|
24
16
|
"url": "${apiUrl}/models/a.dcupl.json",
|
|
25
17
|
"type": "model"
|
|
26
18
|
},
|
|
27
|
-
|
|
28
19
|
{
|
|
29
20
|
"url": "${apiUrl}/data/a.data.json",
|
|
30
21
|
"type": "data",
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcupl/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "The official dcupl CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "npm run clean && tsc",
|
|
11
|
+
"build:watch": "npm run clean && tsc -w",
|
|
11
12
|
"clean": "rm -rf dist",
|
|
12
13
|
"global": "npm i -g && dcupl",
|
|
13
14
|
"start": "npm run build && npm run global",
|
|
@@ -22,23 +23,32 @@
|
|
|
22
23
|
"license": "ISC",
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@nestjs/cli": "^8.2.5",
|
|
26
|
+
"@types/adm-zip": "^0.5.0",
|
|
25
27
|
"@types/compression": "^1.7.2",
|
|
26
28
|
"@types/fs-extra": "^9.0.13",
|
|
29
|
+
"@types/glob": "^7.2.0",
|
|
27
30
|
"@types/inquirer": "^8.2.0",
|
|
31
|
+
"@types/prettier": "^2.6.3",
|
|
28
32
|
"@types/yargs": "^17.0.8",
|
|
29
33
|
"typescript": "^4.5.5"
|
|
30
34
|
},
|
|
31
35
|
"dependencies": {
|
|
36
|
+
"@dcupl/common": "^0.0.55",
|
|
32
37
|
"@nestjs/common": "^8.4.5",
|
|
33
38
|
"@nestjs/core": "^8.4.5",
|
|
34
39
|
"@nestjs/platform-express": "^8.4.5",
|
|
35
40
|
"@nestjs/serve-static": "^2.2.2",
|
|
41
|
+
"adm-zip": "^0.5.9",
|
|
36
42
|
"axios": "^0.27.2",
|
|
37
43
|
"compression": "^1.7.4",
|
|
44
|
+
"form-data": "^4.0.0",
|
|
38
45
|
"fs-extra": "^10.0.0",
|
|
46
|
+
"glob": "^8.0.3",
|
|
39
47
|
"inquirer": "^8.2.0",
|
|
40
48
|
"kleur": "^4.1.4",
|
|
49
|
+
"lodash": "^4.17.21",
|
|
41
50
|
"node-emoji": "^1.11.0",
|
|
51
|
+
"prettier": "^2.7.1",
|
|
42
52
|
"reflect-metadata": "^0.1.13",
|
|
43
53
|
"rxjs": "^7.5.5",
|
|
44
54
|
"serve-index": "^1.9.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const pullConfig: () => void;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pullConfig = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = require("fs-extra");
|
|
6
|
-
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
9
|
-
const config_common_1 = require("./config.common");
|
|
10
|
-
const pullConfig = () => {
|
|
11
|
-
inquirer_1.default.prompt([]).then(() => {
|
|
12
|
-
const currentBasePath = (0, path_1.join)(process.cwd());
|
|
13
|
-
const cliConfig = (0, config_common_1.getConfigFileValue)(currentBasePath);
|
|
14
|
-
const secrets = (0, config_common_1.getSecretFileValue)(currentBasePath);
|
|
15
|
-
if (!cliConfig || !secrets) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const loaderFilePath = (0, path_1.join)(currentBasePath, cliConfig.loaderPath);
|
|
19
|
-
if (!(0, fs_extra_1.existsSync)(loaderFilePath)) {
|
|
20
|
-
console.log(`Error: There is no loader file at ${loaderFilePath} present`);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const apiUrl = cliConfig.consoleApiUrl || 'https://api.dcupl.com';
|
|
24
|
-
const config = {
|
|
25
|
-
method: 'get',
|
|
26
|
-
url: `${apiUrl}/projects/${cliConfig.projectId}/configuration?apikey=${secrets.apiKey}`,
|
|
27
|
-
headers: {
|
|
28
|
-
'Content-Type': 'application/json',
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
(0, axios_1.default)(config)
|
|
32
|
-
.then(function (response) {
|
|
33
|
-
(0, fs_extra_1.writeFileSync)(loaderFilePath, JSON.stringify(response.data, null, 2), { encoding: 'utf-8' });
|
|
34
|
-
console.log(`${loaderFilePath} updated`);
|
|
35
|
-
})
|
|
36
|
-
.catch(function (error) {
|
|
37
|
-
console.log(error);
|
|
38
|
-
console.log(error?.response?.data);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
exports.pullConfig = pullConfig;
|
|
43
|
-
//# sourceMappingURL=config-pull.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-pull.js","sourceRoot":"","sources":["../../../src/functions/config/config-pull.ts"],"names":[],"mappings":";;;;AAAA,uCAAmE;AACnE,gEAAgC;AAChC,+BAA4B;AAE5B,0DAAkD;AAClD,mDAAyE;AAElE,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,kBAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QAC5B,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAE5C,MAAM,SAAS,GAAG,IAAA,kCAAkB,EAAC,eAAe,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,IAAA,kCAAkB,EAAC,eAAe,CAAC,CAAC;QAEpD,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE;YAC1B,OAAO;SACR;QAED,MAAM,cAAc,GAAG,IAAA,WAAI,EAAC,eAAe,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;QAEnE,IAAI,CAAC,IAAA,qBAAU,EAAC,cAAc,CAAC,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,qCAAqC,cAAc,UAAU,CAAC,CAAC;YAC3E,OAAO;SACR;QAED,MAAM,MAAM,GAAG,SAAS,CAAC,aAAa,IAAI,uBAAuB,CAAC;QAClE,MAAM,MAAM,GAAuB;YACjC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,GAAG,MAAM,aAAa,SAAS,CAAC,SAAS,yBAAyB,OAAO,CAAC,MAAM,EAAE;YACvF,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC;QAEF,IAAA,eAAK,EAAC,MAAM,CAAC;aACV,IAAI,CAAC,UAAU,QAAQ;YACtB,IAAA,wBAAa,EAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;YAC7F,OAAO,CAAC,GAAG,CAAC,GAAG,cAAc,UAAU,CAAC,CAAC;QAC3C,CAAC,CAAC;aACD,KAAK,CAAC,UAAU,KAAK;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AArCW,QAAA,UAAU,cAqCrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const pushConfig: () => void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pushConfig = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = require("fs-extra");
|
|
6
|
-
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
9
|
-
const config_common_1 = require("./config.common");
|
|
10
|
-
const pushConfig = () => {
|
|
11
|
-
inquirer_1.default.prompt([]).then(() => {
|
|
12
|
-
const currentBasePath = (0, path_1.join)(process.cwd());
|
|
13
|
-
const cliConfig = (0, config_common_1.getConfigFileValue)(currentBasePath);
|
|
14
|
-
const secrets = (0, config_common_1.getSecretFileValue)(currentBasePath);
|
|
15
|
-
if (!cliConfig || !secrets) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const loaderFilePath = (0, path_1.join)(currentBasePath, cliConfig.loaderPath);
|
|
19
|
-
if (!(0, fs_extra_1.existsSync)(loaderFilePath)) {
|
|
20
|
-
console.log(`Error: There is no loader file at ${loaderFilePath} present`);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const loaderFileAsString = (0, fs_extra_1.readFileSync)(loaderFilePath, { encoding: 'utf-8' });
|
|
24
|
-
const loaderFile = JSON.parse(loaderFileAsString);
|
|
25
|
-
if (!loaderFile) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const apiUrl = cliConfig.consoleApiUrl || 'https://api.dcupl.com';
|
|
29
|
-
const config = {
|
|
30
|
-
method: 'post',
|
|
31
|
-
url: `${apiUrl}/projects/${cliConfig.projectId}/configuration/?apikey=${secrets.apiKey}`,
|
|
32
|
-
headers: {
|
|
33
|
-
'Content-Type': 'application/json',
|
|
34
|
-
},
|
|
35
|
-
data: loaderFile,
|
|
36
|
-
};
|
|
37
|
-
(0, axios_1.default)(config)
|
|
38
|
-
.then(function (response) {
|
|
39
|
-
console.log('config sucessfully uploaded');
|
|
40
|
-
})
|
|
41
|
-
.catch(function (error) {
|
|
42
|
-
console.log(error);
|
|
43
|
-
console.log(error?.response?.data);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
exports.pushConfig = pushConfig;
|
|
48
|
-
//# sourceMappingURL=config-push.js.map
|