@transcend-io/cli 6.2.1 → 6.3.0

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
@@ -760,6 +760,7 @@ Transcend can scan your codebase to inventory your code packages and dependencie
760
760
  - build.gradle
761
761
  - pubspec.yaml
762
762
  - Gemfile & .gemspec
763
+ - composer.json
763
764
 
764
765
  The command will scan the folder you point at to look for any of these files. Once found, the build file will be parsed in search of dependencies. Those code packages and dependencies will be uploaded to [Transcend](https://app.transcend.io/code-scanning/code-packages). The only information shared with Transcend includes:
765
766
 
@@ -796,19 +797,19 @@ yarn tr-scan-packages --auth=$TRANSCEND_API_KEY
796
797
  Scan a specific directory
797
798
 
798
799
  ```sh
799
- yarn tr-discover-silos --auth=$TRANSCEND_API_KEY --scanPath=./examples/
800
+ yarn tr-scan-packages --auth=$TRANSCEND_API_KEY --scanPath=./examples/
800
801
  ```
801
802
 
802
803
  Ignore certain folders
803
804
 
804
805
  ```sh
805
- yarn tr-discover-silos --auth=$TRANSCEND_API_KEY --ignoreDirs=./test,./build
806
+ yarn tr-scan-packages --auth=$TRANSCEND_API_KEY --ignoreDirs=./test,./build
806
807
  ```
807
808
 
808
809
  Specify the name of the repository
809
810
 
810
811
  ```sh
811
- yarn tr-discover-silos --auth=$TRANSCEND_API_KEY --repositoryName="transcend-io/test"
812
+ yarn tr-scan-packages --auth=$TRANSCEND_API_KEY --repositoryName="transcend-io/test"
812
813
  ```
813
814
 
814
815
  ### tr-discover-silos
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/code-scanning/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAS7C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE;KAClC,CAAC,IAAI,MAAM,GAAG,kBAAkB;CAQlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE;KACjC,CAAC,IAAI,eAAe,GAAG,kBAAkB;CAQ3C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/code-scanning/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAU7C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE;KAClC,CAAC,IAAI,MAAM,GAAG,kBAAkB;CAQlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE;KACjC,CAAC,IAAI,eAAe,GAAG,kBAAkB;CAS3C,CAAC"}
@@ -21,5 +21,6 @@ exports.CODE_SCANNING_CONFIGS = {
21
21
  [privacy_types_1.CodePackageType.RequirementsTxt]: integrations_1.pythonRequirementsTxt,
22
22
  [privacy_types_1.CodePackageType.Gemfile]: integrations_1.gemfile,
23
23
  [privacy_types_1.CodePackageType.Pubspec]: integrations_1.pubspec,
24
+ [privacy_types_1.CodePackageType.ComposerJson]: integrations_1.composerJson,
24
25
  };
25
26
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/code-scanning/constants.ts"],"names":[],"mappings":";;;AACA,iDAOwB;AACxB,+DAA8D;AAE9D;;GAEG;AACU,QAAA,sBAAsB,GAE/B;IACF,SAAS,EAAT,wBAAS;IACT,MAAM,EAAN,qBAAM;IACN,qBAAqB,EAArB,oCAAqB;IACrB,qBAAqB,EAArB,oCAAqB;IACrB,OAAO,EAAP,sBAAO;IACP,OAAO,EAAP,sBAAO;CACR,CAAC;AAEW,QAAA,qBAAqB,GAE9B;IACF,CAAC,+BAAe,CAAC,SAAS,CAAC,EAAE,wBAAS;IACtC,CAAC,+BAAe,CAAC,MAAM,CAAC,EAAE,qBAAM;IAChC,CAAC,+BAAe,CAAC,WAAW,CAAC,EAAE,oCAAqB;IACpD,CAAC,+BAAe,CAAC,eAAe,CAAC,EAAE,oCAAqB;IACxD,CAAC,+BAAe,CAAC,OAAO,CAAC,EAAE,sBAAO;IAClC,CAAC,+BAAe,CAAC,OAAO,CAAC,EAAE,sBAAO;CACnC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/code-scanning/constants.ts"],"names":[],"mappings":";;;AACA,iDAQwB;AACxB,+DAA8D;AAE9D;;GAEG;AACU,QAAA,sBAAsB,GAE/B;IACF,SAAS,EAAT,wBAAS;IACT,MAAM,EAAN,qBAAM;IACN,qBAAqB,EAArB,oCAAqB;IACrB,qBAAqB,EAArB,oCAAqB;IACrB,OAAO,EAAP,sBAAO;IACP,OAAO,EAAP,sBAAO;CACR,CAAC;AAEW,QAAA,qBAAqB,GAE9B;IACF,CAAC,+BAAe,CAAC,SAAS,CAAC,EAAE,wBAAS;IACtC,CAAC,+BAAe,CAAC,MAAM,CAAC,EAAE,qBAAM;IAChC,CAAC,+BAAe,CAAC,WAAW,CAAC,EAAE,oCAAqB;IACpD,CAAC,+BAAe,CAAC,eAAe,CAAC,EAAE,oCAAqB;IACxD,CAAC,+BAAe,CAAC,OAAO,CAAC,EAAE,sBAAO;IAClC,CAAC,+BAAe,CAAC,OAAO,CAAC,EAAE,sBAAO;IAClC,CAAC,+BAAe,CAAC,YAAY,CAAC,EAAE,2BAAY;CAC7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { CodeScanningConfig } from '../types';
2
+ export declare const composerJson: CodeScanningConfig;
3
+ //# sourceMappingURL=composerJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composerJson.d.ts","sourceRoot":"","sources":["../../../src/code-scanning/integrations/composerJson.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAI9C,eAAO,MAAM,YAAY,EAAE,kBAoC1B,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.composerJson = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ exports.composerJson = {
7
+ supportedFiles: ['composer.json'],
8
+ ignoreDirs: ['vendor', 'node_modules', 'cache', 'build', 'dist'],
9
+ scanFunction: (filePath) => {
10
+ const file = (0, fs_1.readFileSync)(filePath, 'utf-8');
11
+ const directory = (0, path_1.dirname)(filePath);
12
+ const asJson = JSON.parse(file);
13
+ const { name, description, require: requireDependencies = {}, 'require-dev': requiredDevDependencies = {}, } = asJson;
14
+ return [
15
+ {
16
+ // name of the package
17
+ name: name || directory.split('/').pop(),
18
+ description,
19
+ softwareDevelopmentKits: [
20
+ ...Object.entries(requireDependencies).map(([name, version]) => ({
21
+ name,
22
+ version: typeof version === 'string' ? version : undefined,
23
+ })),
24
+ ...Object.entries(requiredDevDependencies).map(([name, version]) => ({
25
+ name,
26
+ version: typeof version === 'string' ? version : undefined,
27
+ isDevDependency: true,
28
+ })),
29
+ ],
30
+ },
31
+ ];
32
+ },
33
+ };
34
+ //# sourceMappingURL=composerJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composerJson.js","sourceRoot":"","sources":["../../../src/code-scanning/integrations/composerJson.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAGlC,+BAA+B;AAElB,QAAA,YAAY,GAAuB;IAC9C,cAAc,EAAE,CAAC,eAAe,CAAC;IACjC,UAAU,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;IAChE,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE;QACzB,MAAM,IAAI,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,EACJ,IAAI,EACJ,WAAW,EACX,OAAO,EAAE,mBAAmB,GAAG,EAAE,EACjC,aAAa,EAAE,uBAAuB,GAAG,EAAE,GAC5C,GAAG,MAAM,CAAC;QACX,OAAO;YACL;gBACE,sBAAsB;gBACtB,IAAI,EAAE,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG;gBACzC,WAAW;gBACX,uBAAuB,EAAE;oBACvB,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,GAAG,CACxC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAkB,EAAE,CAAC,CAAC;wBACpC,IAAI;wBACJ,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;qBAC3D,CAAC,CACH;oBACD,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAC5C,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAkB,EAAE,CAAC,CAAC;wBACpC,IAAI;wBACJ,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;wBAC1D,eAAe,EAAE,IAAI;qBACtB,CAAC,CACH;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -4,4 +4,5 @@ export * from './javascriptPackageJson';
4
4
  export * from './pythonRequirementsTxt';
5
5
  export * from './gemfile';
6
6
  export * from './pubspec';
7
+ export * from './composerJson';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code-scanning/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code-scanning/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -20,4 +20,5 @@ __exportStar(require("./javascriptPackageJson"), exports);
20
20
  __exportStar(require("./pythonRequirementsTxt"), exports);
21
21
  __exportStar(require("./gemfile"), exports);
22
22
  __exportStar(require("./pubspec"), exports);
23
+ __exportStar(require("./composerJson"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code-scanning/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,0DAAwC;AACxC,0DAAwC;AACxC,4CAA0B;AAC1B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code-scanning/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,0DAAwC;AACxC,0DAAwC;AACxC,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B"}
package/build/codecs.d.ts CHANGED
@@ -17392,6 +17392,7 @@ export declare const SoftwareDevelopmentKitInput: t.IntersectionC<[t.TypeC<{
17392
17392
  COCOA_PODS: unknown;
17393
17393
  PUBSPEC: unknown;
17394
17394
  GEMFILE: unknown;
17395
+ COMPOSER_JSON: unknown;
17395
17396
  }>;
17396
17397
  }>, t.PartialC<{
17397
17398
  /** Description of the SDK */
@@ -17439,6 +17440,7 @@ export declare const CodePackageInput: t.IntersectionC<[t.TypeC<{
17439
17440
  COCOA_PODS: unknown;
17440
17441
  PUBSPEC: unknown;
17441
17442
  GEMFILE: unknown;
17443
+ COMPOSER_JSON: unknown;
17442
17444
  }>;
17443
17445
  /** Relative path to code package within the repository */
17444
17446
  relativePath: t.StringC;