ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.
Absent Member.
Absent Member.
4895 views

The command line syntax to scan an SPA (Sinple Page Application) based on AngularJS ?

Hello there,

Any help appreciated trying to solve this problem...

I try to find out the correct "sourceanalyser" command line for performing the analysis phase of the angularJS application, but  without success.

sourceanalyzer -b MyProject "scripts/*.json"

or

sourceanalyzer -b MyProject"scripts/**/*.json"

+ sourceanalyzer -bPARC-fortify-angular-2016-02-22_18-06-27-A '**/*.json'

[error]: Novalid input files were specified.  (Use the -scan option to analyse previously-built sources.)

Is there a kind of plugin for npm command line ?

Node/npm
au PATH = NODEJS_0.10.38

Idem with Javascript files …

Regards.

Alain

+ cd parc-client/client-auth

+ sourceanalyzer -b PARC-fortify-angular-2016-02-22_18-30-44-A '**/*.js'

[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/bower_components/moment/src/lib/units/day-of-month.js: Parse error at line 1, column 1.  Encountered: import
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/node_modules/karma/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js: Parse error at line 1, column 16.  Encountered: node
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/bower_components/moment/src/lib/units/millisecond.js: Parse error at line 1, column 1.  Encountered: import
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/bower_components/moment/src/locale/si.js: Parse error at line 5, column 15.  Encountered: from
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js: Parse error at line 48, column 7.  Encountered: i
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/node_modules/karma-angular-filesort/node_modules/ng-dependencies/node_modules/esprima/bin/esvalidate.js: Parse error at line 1, column 16.  Encountered: node
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/node_modules/gulp-protractor/node_modules/protractor/node_modules/optimist/example/short.js: Parse error at line 1, column 16.  Encountered: node
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/node_modules/phantomjs/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js: Parse error at line 1, column 16.  Encountered: node
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/node_modules/wiredep/node_modules/bower-config/node_modules/optimist/example/default_hash.js: Parse error at line 1, column 16.  Encountered: node
[warning]: Unexpected exception while parsing file (javascript) /home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/bower_components/moment/src/locale/el.js: Parse error at line 5, column 15.  Encountered: from

for example home/sofac/appli/bdf/jenkinsSlave/workspace/PARC-fortify-angular/parc-client/client-auth/bower_components/moment/src/lib/units/day-of-month.js

import { makeGetSet } from '../moment/get-set';

import { addFormatToken } from '../format/format';

import { addUnitAlias } from './aliases';

import { addRegexToken, match1to2, match2 } from '../parse/regex';

import { addParseToken } from '../parse/token';

import { DATE } from './constants';

import toInt from '../utils/to-int';

// FORMATTING

addFormatToken('D', ['DD', 2], 'Do', 'date');

// ALIASES

addUnitAlias('date', 'D');

// PARSING

addRegexToken('D',  match1to2);

addRegexToken('DD', match1to2, match2);

addRegexToken('Do', function (isStrict, locale) {

    return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;

});

addParseToken(['D', 'DD'], DATE);

addParseToken('Do', function (input, array) {

    array[DATE] = toInt(input.match(match1to2)[0], 10);

});

// MOMENTS

export var getSetDayOfMonth = makeGetSet('Date', true);

Labels (2)
0 Likes
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.