@contrail/cli 3.3.0 → 3.3.1

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
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
17
17
  $ contrail COMMAND
18
18
  running command...
19
19
  $ contrail (--version)
20
- @contrail/cli/3.3.0 darwin-arm64 node-v21.7.1
20
+ @contrail/cli/3.3.1 darwin-arm64 node-v20.9.0
21
21
  $ contrail --help [COMMAND]
22
22
  USAGE
23
23
  $ contrail COMMAND
@@ -107,6 +107,7 @@ class AppDeployer {
107
107
  if (appDeclaration?.accessGrants) {
108
108
  accessGrants = await app_template_parsers_1.AccessGrantsParser.buildAccessGrants(appDeclaration);
109
109
  }
110
+ // eslint-disable-next-line no-prototype-builtins
110
111
  if (appDeclaration.hasOwnProperty('dockerImageRef')) {
111
112
  throw new Error('Docker apps are no longer supported. Please use a node app.');
112
113
  }
@@ -201,7 +202,11 @@ async function createNodePackage(appIdentifier, debug, dryRun) {
201
202
  logger_1.default.info('Installing production dependencies done.');
202
203
  logger_1.default.info('Building package...');
203
204
  try {
204
- child_process_1.default.execSync('npx tsc --outDir tmp/dist');
205
+ // Check for tsconfig.build.json first, fallback to tsconfig.json
206
+ const buildConfigPath = fs_1.default.existsSync('tsconfig.build.json')
207
+ ? 'tsconfig.build.json'
208
+ : 'tsconfig.json';
209
+ child_process_1.default.execSync(`npx tsc --project ${buildConfigPath} --outDir tmp/dist`);
205
210
  }
206
211
  catch (e) {
207
212
  logger_1.default.error(`${chalk_1.default.red.bold('APP')} Failed to build package.`);
@@ -228,7 +233,7 @@ async function createNodePackage(appIdentifier, debug, dryRun) {
228
233
  return {};
229
234
  }
230
235
  logger_1.default.info('Uploading package to S3...');
231
- let apps = await entitiesClient.get({ entityName: 'app' });
236
+ const apps = await entitiesClient.get({ entityName: 'app' });
232
237
  const thisApp = apps.find((x) => x.identifier === appIdentifier);
233
238
  if (!thisApp) {
234
239
  throw new Error('App not found');
@@ -238,8 +243,7 @@ async function createNodePackage(appIdentifier, debug, dryRun) {
238
243
  object: { appId: thisApp.id },
239
244
  });
240
245
  // upload an s3 object using a signed url with an https put request
241
- const readStream = fs_1.default.readFileSync('tmp.zip');
242
- const postBody = Buffer.from(readStream);
246
+ const postBody = fs_1.default.readFileSync('tmp.zip');
243
247
  // await axios.put(uploadUrlObject.signedUrl, postBody.toString());
244
248
  await axios_1.default.request({
245
249
  method: 'PUT',
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.3.0",
2
+ "version": "3.3.1",
3
3
  "commands": {
4
4
  "app:create": {
5
5
  "id": "app:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",