@contrail/cli 2.1.3 → 2.1.4
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
|
@@ -15,7 +15,7 @@ $ npm install -g @contrail/cli
|
|
|
15
15
|
$ contrail COMMAND
|
|
16
16
|
running command...
|
|
17
17
|
$ contrail (--version)
|
|
18
|
-
@contrail/cli/2.1.
|
|
18
|
+
@contrail/cli/2.1.4 darwin-arm64 node-v18.13.0
|
|
19
19
|
$ contrail --help [COMMAND]
|
|
20
20
|
USAGE
|
|
21
21
|
$ contrail COMMAND
|
|
@@ -52,13 +52,6 @@ class AppDeployer {
|
|
|
52
52
|
if (appDeclaration === null || appDeclaration === void 0 ? void 0 : appDeclaration.triggers) {
|
|
53
53
|
triggerKeyDefinitions = app_template_parsers_1.TriggerKeyDefinitionParser.buildTriggersArray(appDeclaration);
|
|
54
54
|
}
|
|
55
|
-
// does appDeclaration have dockerImageRef
|
|
56
|
-
const isDocker = Object.hasOwnProperty.call(appDeclaration, 'dockerImageRef');
|
|
57
|
-
let appCodePackageId;
|
|
58
|
-
if (!isDocker) { // this is the expected default behavior
|
|
59
|
-
const appCodePackage = await createNodePackage(appDeclaration.appIdentifier, this.debug, this.dryRun);
|
|
60
|
-
appCodePackageId = appCodePackage.id;
|
|
61
|
-
}
|
|
62
55
|
const newApp = {
|
|
63
56
|
identifier: appDeclaration.appIdentifier,
|
|
64
57
|
name: appDeclaration.appName,
|
|
@@ -72,7 +65,6 @@ class AppDeployer {
|
|
|
72
65
|
configProperties,
|
|
73
66
|
triggerKeyDefinitions,
|
|
74
67
|
dockerImageRef: (_a = appDeclaration.dockerImageRef) !== null && _a !== void 0 ? _a : null,
|
|
75
|
-
appCodePackageId: appCodePackageId !== null && appCodePackageId !== void 0 ? appCodePackageId : null,
|
|
76
68
|
frameworkVersion: 2,
|
|
77
69
|
};
|
|
78
70
|
if (this.dryRun) {
|
|
@@ -81,6 +73,13 @@ class AppDeployer {
|
|
|
81
73
|
}
|
|
82
74
|
const app = await new sdk_1.Entities().create({ entityName: 'app', object: newApp });
|
|
83
75
|
console.log(`%s Created new app: ${app.name}`, chalk_1.default.yellow.bold('APP'));
|
|
76
|
+
const isDocker = Object.hasOwnProperty.call(appDeclaration, 'dockerImageRef');
|
|
77
|
+
if (!isDocker) { // this is the expected default behavior
|
|
78
|
+
const appCodePackage = await createNodePackage(appDeclaration.appIdentifier, this.debug, this.dryRun);
|
|
79
|
+
app.appCodePackageId = appCodePackage.id;
|
|
80
|
+
await new sdk_1.Entities().update({ entityName: 'app', object: app });
|
|
81
|
+
console.log(`%s Updated app with code package: ${app.name}`, chalk_1.default.yellow.bold('APP'));
|
|
82
|
+
}
|
|
84
83
|
return app;
|
|
85
84
|
}
|
|
86
85
|
async updateExistingApp(appDeclaration, existingApp) {
|
|
@@ -159,6 +158,9 @@ async function createNodePackage(appIdentifier, debug, dryRun) {
|
|
|
159
158
|
console.log('Building package...');
|
|
160
159
|
child_process.execSync('npx tsc --outDir tmp/dist');
|
|
161
160
|
console.log('Building package done.');
|
|
161
|
+
console.log('Copying Assets...');
|
|
162
|
+
child_process.execSync('npx copyfiles assets/**/* tmp/dist/');
|
|
163
|
+
console.log('Copying Assets done.');
|
|
162
164
|
// including the app.yml file in the package at the dist level
|
|
163
165
|
fs.cpSync('app.yml', 'tmp/dist/app.yml');
|
|
164
166
|
console.log('Zipping package...');
|
package/oclif.manifest.json
CHANGED