@corva/create-app 0.32.0-rc.0 → 0.33.0-2
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
CHANGED
|
@@ -42,27 +42,28 @@ Arguments:
|
|
|
42
42
|
project-directory project directory to work with (default: "Current working dir")
|
|
43
43
|
|
|
44
44
|
Options:
|
|
45
|
-
--
|
|
46
|
-
--
|
|
45
|
+
--appKey [string] Enter the App Key (default: "app.key-goes-here")
|
|
46
|
+
--appName [string] Enter the App Name
|
|
47
47
|
--appType [string] Choose the App Type (choices: "ui", "scheduler", "stream", "task", default: "ui")
|
|
48
|
-
--
|
|
48
|
+
--bump-version <string> DEPRECATED Use with zip or release command instead (choices: "major", "minor", "patch", "skip")
|
|
49
|
+
--category [string] Enter category (default: "")
|
|
49
50
|
--cronString [string] Provide CRON string for the scheduler (default: "*/5 * * * *")
|
|
50
51
|
--depthMilestone [number] Provide depth milestone for the scheduler (default: 1)
|
|
51
|
-
--appKey [string] Enter the App Key (default: "app.key-goes-here")
|
|
52
|
-
--appName [string] Enter the App Name
|
|
53
52
|
--description [string] Enter description (default: "This is the description of my app. You can do great things with it!")
|
|
53
|
+
--developerIdentifier [string] Enter the Developer Identifier (default: "oandgc")
|
|
54
|
+
--developerName [string] Enter the Developer Name (default: "O&G Company")
|
|
55
|
+
--ignored-files File patters to skip zip
|
|
56
|
+
--release DEPRECATED Use release command instead
|
|
57
|
+
--runtime [string] Choose runtime (choices: "ui", "nodejs12.x", "nodejs14.x", "python3.8")
|
|
58
|
+
--schedulerType [number] Choose the scheduler type (choices: "1", "2", "4", default: 1)
|
|
59
|
+
--segments [string] Choose segments (choices: "drilling", "completion")
|
|
54
60
|
--summary [string] Enter summary (default: "More information about this app goes here")
|
|
55
|
-
--category [string] Enter category (default: "")
|
|
56
61
|
--website [string] Enter website (default: "https://www.oandgexample.com/my-app/")
|
|
57
|
-
--
|
|
58
|
-
--
|
|
62
|
+
-V, --version output the version number
|
|
63
|
+
-h, --help display help for command
|
|
59
64
|
-p, --packageManager [string] Please select the desired package manager (choices: "yarn", "npm", default: "yarn")
|
|
60
65
|
-t, --useTypescript [boolean] Would you like to use TypesScript? (default: false)
|
|
61
|
-
-V, --version output the version number
|
|
62
66
|
-z, --zip [string] DEPRECATED Use zip command instead
|
|
63
|
-
--release DEPRECATED Use release command instead
|
|
64
|
-
--bump-version <string> DEPRECATED Use with zip or release command instead (choices: "major", "minor", "patch", "skip")
|
|
65
|
-
-h, --help display help for command
|
|
66
67
|
```
|
|
67
68
|
|
|
68
69
|
### Examples
|
|
@@ -134,6 +135,7 @@ For apps that written in `python`:
|
|
|
134
135
|
- all `*.py` files
|
|
135
136
|
|
|
136
137
|
If you want to zip some files that are not included pass that as `patterns` arguments.
|
|
138
|
+
To skip some files from zipping please use `--ignored-files` option.
|
|
137
139
|
|
|
138
140
|
### Examples
|
|
139
141
|
|
|
@@ -17,8 +17,8 @@ const uniqueValues = (array) => Array.from(new Set(array));
|
|
|
17
17
|
const FILE_LIST_RESOLVE_STEP = {
|
|
18
18
|
message: 'Resolving files list...',
|
|
19
19
|
fn: async (context) => {
|
|
20
|
-
const { patterns, manifest, dirName } = context;
|
|
21
|
-
const files = await transformPatternsIntoFileNames(dirName, patterns);
|
|
20
|
+
const { patterns, manifest, dirName, options } = context;
|
|
21
|
+
const files = await transformPatternsIntoFileNames(dirName, patterns, options.ignoredFiles);
|
|
22
22
|
|
|
23
23
|
if (manifest.isUi()) {
|
|
24
24
|
return resolveDataToZipUiApp(files, context);
|
|
@@ -36,7 +36,7 @@ const FILE_LIST_RESOLVE_STEP = {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const transformPatternsIntoFileNames = async (dirName, patterns) => {
|
|
39
|
+
const transformPatternsIntoFileNames = async (dirName, patterns, ignoredFiles = []) => {
|
|
40
40
|
const filesFromPatterns = [];
|
|
41
41
|
|
|
42
42
|
for (const pattern of patterns) {
|
|
@@ -52,7 +52,10 @@ const transformPatternsIntoFileNames = async (dirName, patterns) => {
|
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const files = await glob(pattern, {
|
|
55
|
+
const files = await glob(pattern, {
|
|
56
|
+
cwd: dirName,
|
|
57
|
+
ignore: ['**/node_modules', ...ignoredFiles],
|
|
58
|
+
});
|
|
56
59
|
|
|
57
60
|
filesFromPatterns.push(...files);
|
|
58
61
|
}
|
|
@@ -99,7 +102,7 @@ const resolveDataToZipUiApp = async (itemsToZip = [], { options, pkg, dirName })
|
|
|
99
102
|
'.nvmrc',
|
|
100
103
|
'yarn.lock',
|
|
101
104
|
{ path: resolve(dirName, 'packageForSource.json'), name: 'package.json' },
|
|
102
|
-
'src'
|
|
105
|
+
...(await transformPatternsIntoFileNames(dirName, ['src/**/*'], options.ignoredFiles))
|
|
103
106
|
);
|
|
104
107
|
|
|
105
108
|
return {
|
|
@@ -152,10 +155,16 @@ const resolveDataForZipNodeJsApp = async (itemsToZip = [], { options, pkg, dirNa
|
|
|
152
155
|
itemsToZip.push('tsconfig.json', 'tsconfig.build.json');
|
|
153
156
|
|
|
154
157
|
if (shouldPushDefaultSrc) {
|
|
155
|
-
itemsToZip.push(
|
|
158
|
+
itemsToZip.push(
|
|
159
|
+
'index.ts',
|
|
160
|
+
...(await glob('+(src|lib)/**/*.ts', { cwd: dirName, ignore: options.ignoredFiles }))
|
|
161
|
+
);
|
|
156
162
|
}
|
|
157
163
|
} else if (shouldPushDefaultSrc) {
|
|
158
|
-
itemsToZip.push(
|
|
164
|
+
itemsToZip.push(
|
|
165
|
+
'index.js',
|
|
166
|
+
...(await glob('+(src|lib)/**/*.js', { cwd: dirName, ignore: options.ignoredFiles }))
|
|
167
|
+
);
|
|
159
168
|
}
|
|
160
169
|
|
|
161
170
|
return {
|
|
@@ -166,11 +175,11 @@ const resolveDataForZipNodeJsApp = async (itemsToZip = [], { options, pkg, dirNa
|
|
|
166
175
|
};
|
|
167
176
|
};
|
|
168
177
|
|
|
169
|
-
const resolveDataForZipPythonApp = async (itemsToZip = [], { manifest, dirName }) => {
|
|
178
|
+
const resolveDataForZipPythonApp = async (itemsToZip = [], { manifest, dirName, options }) => {
|
|
170
179
|
const zipFileName = `${manifest.manifest.application.name}.zip`;
|
|
171
180
|
|
|
172
181
|
if (!itemsToZip.length) {
|
|
173
|
-
itemsToZip.push(...(await glob('**/*.py', { cwd: dirName })));
|
|
182
|
+
itemsToZip.push(...(await glob('**/*.py', { cwd: dirName, ignore: options.ignoredFiles })));
|
|
174
183
|
}
|
|
175
184
|
|
|
176
185
|
itemsToZip.push('manifest.json', 'requirements.txt');
|
package/lib/index.js
CHANGED
|
@@ -178,6 +178,7 @@ async function initialChecks() {
|
|
|
178
178
|
.argument('<project-directory>', 'Project directory to work with')
|
|
179
179
|
.argument('[patterns...]', 'Additional patterns to zip', [])
|
|
180
180
|
.addOption(bumpVersionOption)
|
|
181
|
+
.addOption(new Option('--ignored-files [ignoredFiles...]', 'Patterns to skip zip', []))
|
|
181
182
|
.action(async (dirName, patterns, options) => {
|
|
182
183
|
options.bumpVersion = await ensureBumpVersion(options.bumpVersion);
|
|
183
184
|
|
|
@@ -190,6 +191,7 @@ async function initialChecks() {
|
|
|
190
191
|
.argument('<project-directory>', 'Project directory to work with')
|
|
191
192
|
.argument('[patterns...]', 'Additional patterns to zip', [])
|
|
192
193
|
.addOption(bumpVersionOption)
|
|
194
|
+
.addOption(new Option('--ignored-files [ignoredFiles...]', 'Patterns to skip zip', []))
|
|
193
195
|
.action(async (dirName, patterns, options) => {
|
|
194
196
|
options.bumpVersion = await ensureBumpVersion(options.bumpVersion);
|
|
195
197
|
|
package/package.json
CHANGED