@contrail/cli 3.3.0 → 3.3.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
@@ -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.2 darwin-x64 node-v22.12.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',
@@ -188,6 +188,7 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
188
188
  validationFunction: newPropertyType.validationFunction,
189
189
  numberFormat: newPropertyType.numberFormat,
190
190
  sequenceSeedValue: newPropertyType.sequenceSeedValue,
191
+ copyBehavior: newPropertyType?.copyBehavior,
191
192
  }),
192
193
  headers: {
193
194
  Accept: 'application/json',
@@ -223,6 +224,7 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
223
224
  validationFunction: newPropertyType.validationFunction ?? null,
224
225
  numberFormat: newPropertyType.numberFormat ?? null,
225
226
  sequenceSeedValue: newPropertyType.sequenceSeedValue ?? null,
227
+ copyBehavior: newPropertyType.copyBehavior ?? null,
226
228
  };
227
229
  // logger.debug(
228
230
  // `found type property option set: ${newPropertyType.typePropertyOptionSetSlug}, ${proposedTP.typePropertyOptionSetId}, `,
@@ -360,6 +360,7 @@ export interface ReducedTypeProperty {
360
360
  validationFunction?: string;
361
361
  numberFormat?: any;
362
362
  sequenceSeedValue?: number;
363
+ copyBehavior?: string;
363
364
  }
364
365
  export interface ReducedOptionSet {
365
366
  name: string;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.3.0",
2
+ "version": "3.3.2",
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.2",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@contrail/entity-types": "^1.3.0",
26
- "@contrail/org-config-migration": "^1.1.4",
26
+ "@contrail/org-config-migration": "^1.1.5",
27
27
  "@contrail/sdk": "^1.4.6",
28
28
  "@contrail/types": "^3.0.48",
29
29
  "@contrail/util": "^1.1.10",