gulp-mraudit 1.0.1 → 1.0.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/.changeset/config.json +11 -0
- package/.github/.markdownlint.yml +9 -0
- package/.github/CODE_OF_CONDUCT.md +73 -0
- package/.github/dependabot.yml +56 -0
- package/.github/labeler.yml +20 -0
- package/.github/workflows/automerge.yml +39 -0
- package/.github/workflows/ci.yml +38 -0
- package/.github/workflows/labeler.yml +14 -0
- package/.github/workflows/links-checker-schedule.yml +43 -0
- package/.github/workflows/lock-threads.yml +34 -0
- package/.github/workflows/markdown-lint.yml +29 -0
- package/.github/workflows/release.yml +40 -0
- package/.github/workflows/repo-init.yml +37 -0
- package/.markdownlintignore +16 -0
- package/CONTRIBUTING.md +102 -0
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/index.js +3 -1
- package/package.json +23 -3
- package/test/test.js +230 -6
- package/.c9/.nakignore +0 -17
- package/.c9/metadata/tab0 +0 -1
- package/.c9/metadata/workspace/.editorconfig +0 -1
- package/.c9/metadata/workspace/.eslintrc.js +0 -1
- package/.c9/metadata/workspace/.npmignore +0 -1
- package/.c9/metadata/workspace/README.md +0 -1
- package/.c9/metadata/workspace/gulpfile.js +0 -1
- package/.c9/metadata/workspace/index.js +0 -1
- package/.c9/metadata/workspace/mraudit.js +0 -1
- package/.c9/metadata/workspace/package.json +0 -1
- package/.c9/metadata/workspace/test/test.js +0 -1
- package/.c9/project.settings +0 -60
- package/.npmignore +0 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
|
|
3
|
+
"changelog": ["@changesets/changelog-github", { "repo": "lirantal/gulp-mraudit" }],
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "master",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
education, socio-economic status, nationality, personal appearance, race,
|
|
10
|
+
religion, or sexual identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
- Using welcoming and inclusive language
|
|
18
|
+
- Being respectful of differing viewpoints and experiences
|
|
19
|
+
- Gracefully accepting constructive criticism
|
|
20
|
+
- Focusing on what is best for the community
|
|
21
|
+
- Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
- Public or private harassment
|
|
29
|
+
- Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at liran.tal@gmail.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/
|
|
72
|
+
|
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: ".github/workflows"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "monthly"
|
|
7
|
+
commit-message:
|
|
8
|
+
# Prefix all commit messages with "chore: "
|
|
9
|
+
prefix: "chore"
|
|
10
|
+
open-pull-requests-limit: 10
|
|
11
|
+
cooldown:
|
|
12
|
+
default-days: 30
|
|
13
|
+
# Use the 'dependencies' default label and add
|
|
14
|
+
# the 'automerge' one for automerge github action support
|
|
15
|
+
labels:
|
|
16
|
+
- "dependencies"
|
|
17
|
+
- "automerge"
|
|
18
|
+
|
|
19
|
+
- package-ecosystem: "npm"
|
|
20
|
+
directory: "/"
|
|
21
|
+
commit-message:
|
|
22
|
+
# Prefix all commit messages with "chore: "
|
|
23
|
+
prefix: "chore"
|
|
24
|
+
schedule:
|
|
25
|
+
interval: "weekly"
|
|
26
|
+
open-pull-requests-limit: 10
|
|
27
|
+
cooldown:
|
|
28
|
+
default-days: 30
|
|
29
|
+
semver-major-days: 30
|
|
30
|
+
semver-minor-days: 30
|
|
31
|
+
semver-patch-days: 30
|
|
32
|
+
# Use the 'dependencies' default label and add
|
|
33
|
+
# the 'automerge' one for automerge github action support
|
|
34
|
+
labels:
|
|
35
|
+
- "dependencies"
|
|
36
|
+
- "automerge"
|
|
37
|
+
groups:
|
|
38
|
+
# Production dependencies without breaking changes
|
|
39
|
+
dependencies:
|
|
40
|
+
dependency-type: "production"
|
|
41
|
+
update-types:
|
|
42
|
+
- "minor"
|
|
43
|
+
- "patch"
|
|
44
|
+
# Production dependencies with breaking changes
|
|
45
|
+
dependencies-major:
|
|
46
|
+
dependency-type: "production"
|
|
47
|
+
update-types:
|
|
48
|
+
- "major"
|
|
49
|
+
# Development dependencies
|
|
50
|
+
dev-dependencies:
|
|
51
|
+
dependency-type: "development"
|
|
52
|
+
# example for ignoring dependencies:
|
|
53
|
+
# ignore:
|
|
54
|
+
# - dependency-name: tap
|
|
55
|
+
# update-types: ["version-update:semver-major"]
|
|
56
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
documentation:
|
|
2
|
+
- changed-files:
|
|
3
|
+
- any-glob-to-any-file:
|
|
4
|
+
- "docs/*"
|
|
5
|
+
- "**/*.md"
|
|
6
|
+
- "guides/*"
|
|
7
|
+
|
|
8
|
+
build:
|
|
9
|
+
- changed-files:
|
|
10
|
+
- any-glob-to-any-file: ".github/workflows/*"
|
|
11
|
+
|
|
12
|
+
typescript:
|
|
13
|
+
- changed-files:
|
|
14
|
+
- any-glob-to-any-file: "**/*[.|-]d.ts"
|
|
15
|
+
|
|
16
|
+
cli:
|
|
17
|
+
- any: ["bin/**/*", "cli/**/*"]
|
|
18
|
+
|
|
19
|
+
test:
|
|
20
|
+
- any: ["test/**/*", "__tests__/**/*"]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: automerge
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- labeled
|
|
7
|
+
- unlabeled
|
|
8
|
+
- synchronize
|
|
9
|
+
- opened
|
|
10
|
+
- edited
|
|
11
|
+
- ready_for_review
|
|
12
|
+
- reopened
|
|
13
|
+
check_run:
|
|
14
|
+
types:
|
|
15
|
+
- completed
|
|
16
|
+
status: {}
|
|
17
|
+
|
|
18
|
+
permissions: {} # deny-all at workflow level; each job declares only what it needs
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
automerge:
|
|
22
|
+
name: Automerge
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
if: github.event_name != 'check_run' || github.event.check_run.name != 'Automerge'
|
|
25
|
+
permissions:
|
|
26
|
+
contents: write
|
|
27
|
+
pull-requests: write
|
|
28
|
+
checks: read
|
|
29
|
+
statuses: read
|
|
30
|
+
steps:
|
|
31
|
+
- name: Merge eligible pull requests
|
|
32
|
+
uses: lirantal/github-action-automerge@8ea9b60ae1fe716a5128fefa26f3df1ba8417742 # 1.0.1
|
|
33
|
+
with:
|
|
34
|
+
label: automerge
|
|
35
|
+
merge-method: squash
|
|
36
|
+
green-observations-required: "4"
|
|
37
|
+
poll-interval-seconds: "60"
|
|
38
|
+
timeout-seconds: "3600"
|
|
39
|
+
ignored-check-names: Automerge
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
permissions: {}
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
node: ["24.x"]
|
|
14
|
+
platform: [ubuntu-latest]
|
|
15
|
+
name: Node v${{matrix.node}} ((${{matrix.platform}}))
|
|
16
|
+
runs-on: ${{matrix.platform}}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
19
|
+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
20
|
+
with:
|
|
21
|
+
node-version: ${{matrix.node}}
|
|
22
|
+
- name: install dependencies
|
|
23
|
+
run: npm install --ignore-scripts --legacy-peer-deps --engine-strict=false --allow-git=true
|
|
24
|
+
- name: lint code
|
|
25
|
+
run: npm run lint
|
|
26
|
+
- name: build project
|
|
27
|
+
run: npm run build
|
|
28
|
+
- name: run tests
|
|
29
|
+
run: npm run test
|
|
30
|
+
- name: coverage
|
|
31
|
+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
|
32
|
+
if: github.actor != 'dependabot[bot]'
|
|
33
|
+
with:
|
|
34
|
+
fail_ci_if_error: false
|
|
35
|
+
verbose: false
|
|
36
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
37
|
+
env:
|
|
38
|
+
CI: true
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: "Pull Request Labeler"
|
|
2
|
+
|
|
3
|
+
on: pull_request
|
|
4
|
+
|
|
5
|
+
permissions: {}
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
label:
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pull-requests: write
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Links Checker (Lychee, On Schedule)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
repository_dispatch:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "00 18 * * *"
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linkChecker:
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
issues: write
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Check out repo
|
|
19
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
|
|
23
|
+
- name: Restore lychee cache
|
|
24
|
+
uses: actions/cache@v4
|
|
25
|
+
with:
|
|
26
|
+
path: .lycheecache
|
|
27
|
+
key: cache-lychee-${{ github.sha }}
|
|
28
|
+
restore-keys: cache-lychee-
|
|
29
|
+
|
|
30
|
+
- name: Link Checker
|
|
31
|
+
id: lychee
|
|
32
|
+
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
|
|
33
|
+
with:
|
|
34
|
+
args: --root-dir "$(pwd)" --cache --max-cache-age 1d . --max-retries 5 --retry-wait-time 60 --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36" --remap '.*npmjs\.org/package/(.*) https://registry.npmjs.com/$1' --remap '.*npmjs\.com/package/(.*) https://registry.npmjs.com/$1' --max-concurrency 1 -vv
|
|
35
|
+
fail: false
|
|
36
|
+
|
|
37
|
+
- name: Create Issue From File
|
|
38
|
+
if: steps.lychee.outputs.exit_code != 0
|
|
39
|
+
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
|
|
40
|
+
with:
|
|
41
|
+
title: Link Checker Report (lycheeverse/lychee-action)
|
|
42
|
+
content-filepath: ./lychee/out.md
|
|
43
|
+
labels: report, automated issue
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stale
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "9 9 * * *"
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
issues: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
stale:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
|
|
18
|
+
with:
|
|
19
|
+
close-issue-message: |
|
|
20
|
+
This issue has not seen any activity since it was marked stale.
|
|
21
|
+
Closing.
|
|
22
|
+
close-pr-message: |
|
|
23
|
+
This pull request has not seen any activity since it was marked stale.
|
|
24
|
+
Closing.
|
|
25
|
+
exempt-issue-labels: good-first-issue,need-help,no-stale,pinned,security
|
|
26
|
+
exempt-pr-labels: "autorelease: pending,good-first-issue,need-help,no-stale,pinned,security"
|
|
27
|
+
stale-issue-label: stale
|
|
28
|
+
stale-issue-message: |
|
|
29
|
+
This issue is stale because it has been open 60 days with no activity.
|
|
30
|
+
Remove stale label or comment or this will be closed in 7 days
|
|
31
|
+
stale-pr-label: stale
|
|
32
|
+
stale-pr-message: |
|
|
33
|
+
This PR is stale because it has been open 60 days with no activity.
|
|
34
|
+
Remove stale label or comment or this will be closed in 7 days.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Markdown Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
markdown_lint:
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
name: Lint Markdown files
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
22
|
+
with:
|
|
23
|
+
node-version: '24.x'
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: npm install --ignore-scripts --legacy-peer-deps --engine-strict=false --allow-git=true
|
|
27
|
+
|
|
28
|
+
- name: Markdown Lint
|
|
29
|
+
run: npm run lint:markdown || true
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
|
|
10
|
+
permissions: {}
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write # to create release (changesets/action)
|
|
16
|
+
issues: write # to post issue comments (changesets/action)
|
|
17
|
+
pull-requests: write # to create pull request (changesets/action)
|
|
18
|
+
id-token: write # to create release (changesets/action)
|
|
19
|
+
packages: write # to publish to npm (changesets/action)
|
|
20
|
+
timeout-minutes: 20
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
24
|
+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
25
|
+
with:
|
|
26
|
+
node-version: 24.x
|
|
27
|
+
- name: install dependencies
|
|
28
|
+
run: npm install --ignore-scripts --legacy-peer-deps --engine-strict=false --allow-git=true
|
|
29
|
+
- name: build project
|
|
30
|
+
run: npm run build
|
|
31
|
+
- name: Create Release Pull Request or Publish to npm
|
|
32
|
+
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
|
|
33
|
+
with:
|
|
34
|
+
publish: npm run release
|
|
35
|
+
version: npm run version
|
|
36
|
+
commit: "chore: new release"
|
|
37
|
+
title: "chore: new release candidate"
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
40
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Repository init
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [master]
|
|
7
|
+
paths:
|
|
8
|
+
- '.github/workflows/repo-init.yml' # only fires when this file itself changes
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '0 9 * * 1' # Every Monday at 09:00 UTC
|
|
11
|
+
|
|
12
|
+
permissions: {} # deny-all at workflow level; each job declares only what it needs
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
create-label:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
issues: write
|
|
19
|
+
steps:
|
|
20
|
+
- name: Create automerge label
|
|
21
|
+
env:
|
|
22
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
+
run: |
|
|
24
|
+
gh label create "automerge" \
|
|
25
|
+
--repo "${{ github.repository }}" \
|
|
26
|
+
--color "0075ca" \
|
|
27
|
+
--description "Merge this PR automatically once checks pass" \
|
|
28
|
+
--force
|
|
29
|
+
- name: Create dependencies label
|
|
30
|
+
env:
|
|
31
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
+
run: |
|
|
33
|
+
gh label create "dependencies" \
|
|
34
|
+
--repo "${{ github.repository }}" \
|
|
35
|
+
--color "0366d6" \
|
|
36
|
+
--description "Pull requests that update a dependency" \
|
|
37
|
+
--force
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for taking the time to contribute! Issues, ideas, and PRs are all welcome.
|
|
4
|
+
The notes below are guidelines to help your contribution land smoothly. If in doubt, open the thing anyway and we'll figure it out together.
|
|
5
|
+
|
|
6
|
+
## Opening an issue
|
|
7
|
+
|
|
8
|
+
A good issue gives us enough to reproduce or understand the ask. Useful things to include:
|
|
9
|
+
|
|
10
|
+
- **For bugs:** what you expected, what actually happened, and the shortest repro you can manage. Versions (runtime, OS, package) and stack traces help.
|
|
11
|
+
- **For features:** the problem you're trying to solve, not just the solution you have in mind. A concrete example of how you'd use it is gold.
|
|
12
|
+
|
|
13
|
+
A quick search of existing issues helps avoid duplicates, but don't agonize over it.
|
|
14
|
+
|
|
15
|
+
## Proposing a PR
|
|
16
|
+
|
|
17
|
+
PRs are expected to meet a few baseline requirements before review:
|
|
18
|
+
|
|
19
|
+
- **Tests are required** for any behavior change, new features need new tests, bug fixes need a regression test that fails without the fix.
|
|
20
|
+
- **Existing tests must pass** locally and in CI. Don't disable or skip tests to make a PR green.
|
|
21
|
+
- **Coverage should not regress.** If your change drops coverage meaningfully, add tests or explain why in the PR description.
|
|
22
|
+
- **Linters and type checks must pass.** Run them locally before pushing; CI will reject otherwise.
|
|
23
|
+
- **One logical change per PR.** Refactors, formatting churn, and unrelated fixes belong in separate PRs, it makes review and revert sane.
|
|
24
|
+
- **Describe what and why.** A PR title and a few lines of context go a long way, reviewers shouldn't have to reverse-engineer your intent from the diff.
|
|
25
|
+
- **Link the issue you're closing.** If your PR resolves an open issue, include a `Related issues` section in the description with `Fixes: #<issue-number>` so GitHub auto-closes it on merge.
|
|
26
|
+
- **Breaking changes need a heads-up** in the PR description, plus a migration note for users.
|
|
27
|
+
|
|
28
|
+
Large or speculative changes: open an issue first to align on direction before investing time.
|
|
29
|
+
|
|
30
|
+
## Changesets
|
|
31
|
+
|
|
32
|
+
This package is released with Changesets. Any PR that changes published package behavior must include a changeset so the release PR can include the right version bump and changelog entry.
|
|
33
|
+
|
|
34
|
+
Add a patch changeset for:
|
|
35
|
+
|
|
36
|
+
- Bug fixes that affect CLI/runtime behavior.
|
|
37
|
+
- New or changed CLI flags, commands, output, or errors.
|
|
38
|
+
- Documentation changes that accompany a user-facing behavior change.
|
|
39
|
+
|
|
40
|
+
A changeset is usually not needed for:
|
|
41
|
+
|
|
42
|
+
- Tests only.
|
|
43
|
+
- Refactors with no behavior change.
|
|
44
|
+
- CI/tooling-only changes.
|
|
45
|
+
- Documentation-only changes that do not describe a new release-worthy behavior.
|
|
46
|
+
|
|
47
|
+
Before opening a PR, check whether the change affects the published npm package. If yes, create a patch changeset unless the maintainer explicitly says not to. When in doubt, add a patch changeset.
|
|
48
|
+
|
|
49
|
+
## Commit guidelines
|
|
50
|
+
|
|
51
|
+
This project follows [Conventional Commits](https://www.conventionalcommits.org/). The format is:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
<type>(<optional scope>): <short summary>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Common types:
|
|
58
|
+
|
|
59
|
+
- `feat:` — a new feature
|
|
60
|
+
- `fix:` — a bug fix
|
|
61
|
+
- `docs:` — documentation only
|
|
62
|
+
- `refactor:` — code change that neither fixes a bug nor adds a feature
|
|
63
|
+
- `test:` — adding or fixing tests
|
|
64
|
+
- `chore:` — tooling, build, dependencies
|
|
65
|
+
- `perf:` — performance improvement
|
|
66
|
+
|
|
67
|
+
Examples:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
feat: support multiple input files
|
|
71
|
+
fix(parser): handle empty input gracefully
|
|
72
|
+
docs: clarify install instructions
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Breaking changes: add `!` after the type (`feat!: ...`) and explain the break in the commit body.
|
|
76
|
+
|
|
77
|
+
This format drives changelog generation and release automation, so it matters more than the average commit-style guide.
|
|
78
|
+
|
|
79
|
+
## Local development
|
|
80
|
+
|
|
81
|
+
1. Fork and clone the repository.
|
|
82
|
+
2. Install dependencies using the project's package manager (see `package.json`, or equivalent).
|
|
83
|
+
3. Run the test suite to confirm a clean baseline before making changes.
|
|
84
|
+
4. Run the linter and type checker (if configured) the same way.
|
|
85
|
+
5. Make your change on a feature branch, commit using the format above, and open a PR.
|
|
86
|
+
|
|
87
|
+
If any of the above doesn't work on a fresh checkout, that's a bug, please open an issue.
|
|
88
|
+
|
|
89
|
+
## For automated agents
|
|
90
|
+
|
|
91
|
+
### Environment setup
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Release readiness
|
|
95
|
+
|
|
96
|
+
Before opening a PR, automated agents must check the [Changesets](#changesets) section above and include a patch changeset for any published package behavior change.
|
|
97
|
+
|
|
98
|
+
### PR and issue labeling
|
|
99
|
+
|
|
100
|
+
If you are an AI coding agent or automated bot opening a PR, please add 🤖🤖🤖 to the end of the PR title. This helps maintainers triage agent-authored contributions and is a baseline expectation for this repo — PRs without the marker that turn out to be automated may be closed without review.
|
|
101
|
+
|
|
102
|
+
The same applies to issues: prefix the title with 🤖🤖🤖 if it was opened by an agent on your behalf.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Liran Tal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
[](https://www.npmjs.org/package/gulp-mraudit)
|
|
2
|
+
[](https://www.npmjs.org/package/gulp-mraudit)
|
|
3
|
+
[](https://www.npmjs.org/package/gulp-mraudit)
|
|
4
|
+
<a href="https://github.com/lirantal/gulp-mraudit/actions/workflows/ci.yml"><img src="https://github.com/lirantal/gulp-mraudit/actions/workflows/ci.yml/badge.svg?branch=master" alt="build"/></a>
|
|
5
|
+
[](https://codecov.io/gh/lirantal/gulp-mraudit)
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
Mr. Audit validates secure code guidelines and security best practices for
|
|
2
9
|
JavaScript projects.
|
|
3
10
|
|
|
@@ -97,6 +104,10 @@ Option | Description |
|
|
|
97
104
|
`setTimeout(`, `setInterval(` | Both of these functions can result in malicious JavaScript injection similar to how `eval(` is dangerous to use.
|
|
98
105
|
|
|
99
106
|
|
|
107
|
+
## Contributing
|
|
108
|
+
|
|
109
|
+
Please consult [CONTRIBUTING](./CONTRIBUTING.md) for guidelines on contributing to this project.
|
|
110
|
+
|
|
100
111
|
# Author
|
|
101
112
|
|
|
102
113
|
Liran Tal <liran.tal@gmail.com>
|
package/index.js
CHANGED
|
@@ -92,7 +92,9 @@ function findMatch(list, file, enc) {
|
|
|
92
92
|
for (var i = 0; i <= list.search.length; i++) {
|
|
93
93
|
var match = findString(file.contents.toString(enc), list.search[i]);
|
|
94
94
|
if (match) {
|
|
95
|
-
list.onFound
|
|
95
|
+
if (list.hasOwnProperty('onFound')) {
|
|
96
|
+
list.onFound(match, file);
|
|
97
|
+
}
|
|
96
98
|
return match;
|
|
97
99
|
}
|
|
98
100
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gulp-mraudit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Mr Audit is a Gulp plugin to audit JavaScript code for security related static code analysis.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "node index.js",
|
|
12
12
|
"lint": "eslint index.js",
|
|
13
|
-
"test": "mocha"
|
|
13
|
+
"test": "mocha && npm run coverage",
|
|
14
|
+
"coverage": "nyc mocha ./test/*.js",
|
|
15
|
+
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
|
16
|
+
"build": "echo \"No build step configured\"",
|
|
17
|
+
"lint:markdown": "markdownlint -c .github/.markdownlint.yml -i 'apm_modules/**' -i '.git' -i '__tests__' -i '.github' -i '.changeset' -i 'CODE_OF_CONDUCT.md' -i 'CHANGELOG.md' -i 'docs/**' -i '.superpowers/**' -i 'node_modules' -i 'dist' '**/**.md'",
|
|
18
|
+
"version": "changeset version",
|
|
19
|
+
"release": "changeset publish"
|
|
14
20
|
},
|
|
15
21
|
"keywords": [
|
|
16
22
|
"gulp",
|
|
@@ -22,6 +28,8 @@
|
|
|
22
28
|
"audit"
|
|
23
29
|
],
|
|
24
30
|
"dependencies": {
|
|
31
|
+
"coveralls": "^2.11.14",
|
|
32
|
+
"gulp": "^3.9.1",
|
|
25
33
|
"gulp-util": "^3.0.7",
|
|
26
34
|
"mocha": "^3.0.2",
|
|
27
35
|
"should": "^11.1.0",
|
|
@@ -36,6 +44,18 @@
|
|
|
36
44
|
"eslint": "^3.6.0",
|
|
37
45
|
"eslint-config-standard": "^6.0.1",
|
|
38
46
|
"eslint-plugin-standard": "^2.0.0",
|
|
39
|
-
"gulp-util": "^3.0.7"
|
|
47
|
+
"gulp-util": "^3.0.7",
|
|
48
|
+
"nyc": "^8.3.1",
|
|
49
|
+
"@changesets/changelog-github": "^0.6.0",
|
|
50
|
+
"@changesets/cli": "^2.31.0",
|
|
51
|
+
"markdownlint-cli": "0.45.0"
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"provenance": true,
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=24.0.0",
|
|
59
|
+
"npm": ">=11.10.0"
|
|
40
60
|
}
|
|
41
61
|
}
|
package/test/test.js
CHANGED
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
var mraudit = require('../index.js');
|
|
4
4
|
var should = require('should');
|
|
5
5
|
var gutil = require('gulp-util');
|
|
6
|
+
var Readable = require('stream').Readable;
|
|
6
7
|
|
|
7
8
|
describe('gulp-mraudit plugin tests', function() {
|
|
8
9
|
|
|
9
|
-
it('
|
|
10
|
+
it('should search for eval( in code that is ok and should return successful', function(done) {
|
|
10
11
|
|
|
11
12
|
// Get the stream object when initializing the gulp plugin with searching
|
|
12
13
|
// for the function mention of eval(
|
|
13
|
-
var
|
|
14
|
+
var searchOptions = {
|
|
15
|
+
errList: {
|
|
16
|
+
search: ['eval(']
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var stream = mraudit(searchOptions);
|
|
14
20
|
var codeOk = 'var a = 1;'
|
|
15
21
|
|
|
16
22
|
// Push some line of code into the plugin to process.
|
|
@@ -26,24 +32,242 @@ describe('gulp-mraudit plugin tests', function() {
|
|
|
26
32
|
done();
|
|
27
33
|
});
|
|
28
34
|
|
|
29
|
-
})
|
|
35
|
+
});
|
|
30
36
|
|
|
31
|
-
it('
|
|
37
|
+
it('should search for eval( in code that is ok and should throw an error', function() {
|
|
32
38
|
|
|
33
39
|
// Get the stream object when initializing the gulp plugin with searching
|
|
34
40
|
// for the function mention of eval(
|
|
35
|
-
var
|
|
41
|
+
var searchOptions = {
|
|
42
|
+
errList: {
|
|
43
|
+
search: ['eval(']
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
var stream = mraudit(searchOptions);
|
|
36
47
|
var codeEvil = 'eval(alert(1));'
|
|
37
48
|
|
|
38
49
|
// Push some line of code into the plugin to process.
|
|
39
50
|
// gutil.File() is a helpful tool for simulating a file streamed to the
|
|
40
51
|
// plugin
|
|
52
|
+
should.throws(function() {
|
|
53
|
+
stream.write(new gutil.File({
|
|
54
|
+
contents: new Buffer(codeEvil)
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should search using plugin defaults for warnList', function(done) {
|
|
61
|
+
|
|
62
|
+
// Get the stream object when initializing the gulp plugin with searching
|
|
63
|
+
// for the function mention of eval(
|
|
64
|
+
var stream = mraudit();
|
|
65
|
+
var codeEvil = 'var user = req.body.username;'
|
|
66
|
+
|
|
67
|
+
// Push some line of code into the plugin to process.
|
|
68
|
+
// gutil.File() is a helpful tool for simulating a file streamed to the
|
|
69
|
+
// plugin
|
|
70
|
+
|
|
71
|
+
stream.write(new gutil.File({
|
|
72
|
+
contents: new Buffer(codeEvil)
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
stream.on('data', function(file) {
|
|
76
|
+
file.contents.toString().should.equal(codeEvil);
|
|
77
|
+
done();
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('should search using plugin defaults for errList', function() {
|
|
83
|
+
|
|
84
|
+
// Get the stream object when initializing the gulp plugin with searching
|
|
85
|
+
// for the function mention of eval(
|
|
86
|
+
var stream = mraudit();
|
|
87
|
+
var codeEvil = 'var user = eval();'
|
|
88
|
+
|
|
89
|
+
// Push some line of code into the plugin to process.
|
|
90
|
+
// gutil.File() is a helpful tool for simulating a file streamed to the
|
|
91
|
+
// plugin
|
|
92
|
+
|
|
41
93
|
should.throws(function() {
|
|
42
94
|
stream.write(new gutil.File({
|
|
43
95
|
contents: new Buffer(codeEvil)
|
|
44
96
|
}));
|
|
45
97
|
})
|
|
46
98
|
|
|
47
|
-
})
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('should search and support multiple text strings to match for errList', function() {
|
|
102
|
+
|
|
103
|
+
var searchOptions = {
|
|
104
|
+
errList: {
|
|
105
|
+
search: ['eval(', 'setTimeout(']
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
var stream = mraudit(searchOptions);
|
|
109
|
+
var codeEvil = 'var a = "a"; setTimeout(function() { console.log(a); }, 1000);';
|
|
110
|
+
|
|
111
|
+
should.throws(function() {
|
|
112
|
+
stream.write(new gutil.File({
|
|
113
|
+
contents: new Buffer(codeEvil)
|
|
114
|
+
}));
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it('should search and support multiple text strings to match for warnList', function(done) {
|
|
120
|
+
|
|
121
|
+
var searchOptions = {
|
|
122
|
+
warnList: {
|
|
123
|
+
search: ['abc', 'setTimeout(']
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
var stream = mraudit(searchOptions);
|
|
127
|
+
var codeEvil = 'var a = "a"; setTimeout(function() { console.log(a); }, 1000);';
|
|
128
|
+
|
|
129
|
+
stream.write(new gutil.File({
|
|
130
|
+
contents: new Buffer(codeEvil)
|
|
131
|
+
}));
|
|
132
|
+
|
|
133
|
+
// Validate we receive the data back
|
|
134
|
+
// It doesn't raise an exception because this is a warnList match
|
|
135
|
+
stream.on('data', function(file) {
|
|
136
|
+
file.contents.toString().should.equal(codeEvil);
|
|
137
|
+
done();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('should search and support multiple text strings to match for warnList', function(done) {
|
|
143
|
+
|
|
144
|
+
var count = 1;
|
|
145
|
+
var searchOptions = {
|
|
146
|
+
warnList: {
|
|
147
|
+
search: ['abc', 'setTimeout('],
|
|
148
|
+
onFound: function() {
|
|
149
|
+
count = count + 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
var stream = mraudit(searchOptions);
|
|
154
|
+
var codeEvil = 'var a = "a"; setTimeout(function() { console.log(a); }, 1000);';
|
|
155
|
+
|
|
156
|
+
stream.write(new gutil.File({
|
|
157
|
+
contents: new Buffer(codeEvil)
|
|
158
|
+
}));
|
|
159
|
+
|
|
160
|
+
// Validate we receive the data back
|
|
161
|
+
// It doesn't raise an exception because this is a warnList match
|
|
162
|
+
stream.on('data', function(file) {
|
|
163
|
+
file.contents.toString().should.equal(codeEvil);
|
|
164
|
+
count.should.equal(2);
|
|
165
|
+
done();
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it('should search and support regex notation in search array', function() {
|
|
171
|
+
|
|
172
|
+
var count = 1;
|
|
173
|
+
var searchOptions = {
|
|
174
|
+
errList: {
|
|
175
|
+
search: ['abc', /setTimeout\(/],
|
|
176
|
+
onFound: function() {
|
|
177
|
+
count = count + 1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
var stream = mraudit(searchOptions);
|
|
182
|
+
var codeEvil = 'var a = "a"; setTimeout(function() { console.log(a); }, 1000);';
|
|
183
|
+
|
|
184
|
+
should.throws(function() {
|
|
185
|
+
stream.write(new gutil.File({
|
|
186
|
+
contents: new Buffer(codeEvil)
|
|
187
|
+
}));
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('should search for a match and not find it', function(done) {
|
|
193
|
+
|
|
194
|
+
// Get the stream object when initializing the gulp plugin with searching
|
|
195
|
+
// for the function mention of eval(
|
|
196
|
+
var stream = mraudit();
|
|
197
|
+
var codeOk = 'var a = 1;'
|
|
198
|
+
|
|
199
|
+
// Push some line of code into the plugin to process.
|
|
200
|
+
// gutil.File() is a helpful tool for simulating a file streamed to the
|
|
201
|
+
// plugin
|
|
202
|
+
stream.write(new gutil.File({
|
|
203
|
+
contents: new Buffer(codeOk)
|
|
204
|
+
}));
|
|
205
|
+
|
|
206
|
+
// Validate we receive the data back
|
|
207
|
+
stream.on('data', function(file) {
|
|
208
|
+
file.contents.toString().should.equal(codeOk);
|
|
209
|
+
done();
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it('should not process anything if no file is provided', function(done) {
|
|
215
|
+
|
|
216
|
+
// Get the stream object when initializing the gulp plugin with searching
|
|
217
|
+
// for the function mention of eval(
|
|
218
|
+
var stream = mraudit();
|
|
219
|
+
var codeOk = 'var a = 1;'
|
|
220
|
+
|
|
221
|
+
// Push some line of code into the plugin to process.
|
|
222
|
+
// gutil.File() is a helpful tool for simulating a file streamed to the
|
|
223
|
+
// plugin
|
|
224
|
+
stream.write(new gutil.File({
|
|
225
|
+
contents: ''
|
|
226
|
+
}));
|
|
227
|
+
|
|
228
|
+
// Validate we receive the data back
|
|
229
|
+
stream.on('data', function(file) {
|
|
230
|
+
should.not.exist(file._contents);
|
|
231
|
+
done();
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
it('should not process a stream because its not supported', function(done) {
|
|
237
|
+
|
|
238
|
+
var fileStream = new Readable();
|
|
239
|
+
fileStream._read = function() {};
|
|
240
|
+
fileStream.push('var a = 1;');
|
|
241
|
+
fileStream.push(null);
|
|
242
|
+
|
|
243
|
+
var stream = mraudit();
|
|
244
|
+
stream.on('error', function (err) {
|
|
245
|
+
err.message.should.eql('Streaming not supported');
|
|
246
|
+
done();
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
stream.write(new gutil.File({
|
|
250
|
+
contents: fileStream
|
|
251
|
+
}));
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
it('should throw an error if an object is not passed to mraudit', function() {
|
|
255
|
+
|
|
256
|
+
// Get the stream object when initializing the gulp plugin with searching
|
|
257
|
+
// for the function mention of eval(
|
|
258
|
+
var stream = mraudit('hello');
|
|
259
|
+
var codeEvil = 'var user = eval();'
|
|
260
|
+
|
|
261
|
+
// Push some line of code into the plugin to process.
|
|
262
|
+
// gutil.File() is a helpful tool for simulating a file streamed to the
|
|
263
|
+
// plugin
|
|
264
|
+
|
|
265
|
+
should.throws(function() {
|
|
266
|
+
stream.write(new gutil.File({
|
|
267
|
+
contents: new Buffer(codeEvil)
|
|
268
|
+
}));
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
});
|
|
48
272
|
|
|
49
273
|
});
|
package/.c9/.nakignore
DELETED
package/.c9/metadata/tab0
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"bash - \"lirantal-gulp-mraudit-3576791\" ","tooltip":"bash - \"lirantal-gulp-mraudit-3576791\" ","undoManager":{"mark":-1,"position":-1,"stack":[]},"terminal":{"id":"lirantal@gulp-mraudit_107","cwd":"","width":1072,"height":300,"scrollTop":9145.19988155365},"timestamp":1469714570292,"hash":"da39a3ee5e6b4b0d3255bfef95601890afd80709"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":".editorconfig","tooltip":"/.editorconfig","undoManager":{"mark":20,"position":20,"stack":[[{"start":{"row":6,"column":0},"end":{"row":11,"column":0},"action":"insert","lines":["","[*.js]","trim_trailing_whitespace = false","insert_final_newline = false","max_line_length = f",""],"id":2,"ignore":true}],[{"start":{"row":2,"column":0},"end":{"row":6,"column":0},"action":"remove","lines":["[*.js]","trim_trailing_whitespace = false","insert_final_newline = false","max_line_length = f",""],"id":3}],[{"start":{"row":2,"column":0},"end":{"row":3,"column":0},"action":"remove","lines":["",""],"id":4}],[{"start":{"row":2,"column":6},"end":{"row":3,"column":0},"action":"insert","lines":["",""],"id":5}],[{"start":{"row":3,"column":0},"end":{"row":8,"column":27},"action":"insert","lines":["[*]","indent_style = space","indent_size = 4","trim_trailing_whitespace = true","end_of_line = lf","insert_final_newline = true"],"id":6}],[{"start":{"row":8,"column":26},"end":{"row":8,"column":27},"action":"remove","lines":["e"],"id":7}],[{"start":{"row":8,"column":25},"end":{"row":8,"column":26},"action":"remove","lines":["u"],"id":8}],[{"start":{"row":8,"column":24},"end":{"row":8,"column":25},"action":"remove","lines":["r"],"id":9}],[{"start":{"row":8,"column":23},"end":{"row":8,"column":24},"action":"remove","lines":["t"],"id":10}],[{"start":{"row":8,"column":23},"end":{"row":8,"column":24},"action":"insert","lines":["f"],"id":11}],[{"start":{"row":8,"column":24},"end":{"row":8,"column":25},"action":"insert","lines":["a"],"id":12}],[{"start":{"row":8,"column":25},"end":{"row":8,"column":26},"action":"insert","lines":["l"],"id":13}],[{"start":{"row":8,"column":26},"end":{"row":8,"column":27},"action":"insert","lines":["s"],"id":14}],[{"start":{"row":8,"column":27},"end":{"row":8,"column":28},"action":"insert","lines":["e"],"id":15}],[{"start":{"row":11,"column":0},"end":{"row":11,"column":19},"action":"remove","lines":["max_line_length = f"],"id":16}],[{"start":{"row":9,"column":0},"end":{"row":11,"column":0},"action":"remove","lines":["trim_trailing_whitespace = false","insert_final_newline = false",""],"id":17}],[{"start":{"row":8,"column":28},"end":{"row":9,"column":0},"action":"remove","lines":["",""],"id":18}],[{"start":{"row":5,"column":14},"end":{"row":5,"column":15},"action":"remove","lines":["4"],"id":19}],[{"start":{"row":5,"column":14},"end":{"row":5,"column":15},"action":"insert","lines":["2"],"id":20}],[{"start":{"row":3,"column":0},"end":{"row":3,"column":3},"action":"remove","lines":["[*]"],"id":21}],[{"start":{"row":2,"column":6},"end":{"row":3,"column":0},"action":"remove","lines":["",""],"id":22}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":8,"column":0},"end":{"row":8,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1474835088459,"hash":"5910f0aae6904a00e7caa6a166b9c3c99179fa06"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":".eslintrc.js","tooltip":"/.eslintrc.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":6,"column":19},"end":{"row":6,"column":19},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1474834478046,"hash":"90da084337402509f4e350c90da76bd5ea59b98d"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":".gitignore","tooltip":"/.gitignore","undoManager":{"mark":22,"position":22,"stack":[[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"insert","lines":["d"],"id":1}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"remove","lines":["d"],"id":2}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"insert","lines":["n"],"id":3}],[{"start":{"row":0,"column":1},"end":{"row":0,"column":2},"action":"insert","lines":["o"],"id":4}],[{"start":{"row":0,"column":2},"end":{"row":0,"column":3},"action":"insert","lines":["d"],"id":5}],[{"start":{"row":0,"column":3},"end":{"row":0,"column":4},"action":"insert","lines":["e"],"id":6}],[{"start":{"row":0,"column":4},"end":{"row":0,"column":5},"action":"insert","lines":["_"],"id":7}],[{"start":{"row":0,"column":5},"end":{"row":0,"column":6},"action":"insert","lines":["m"],"id":8}],[{"start":{"row":0,"column":6},"end":{"row":0,"column":7},"action":"insert","lines":["o"],"id":9}],[{"start":{"row":0,"column":7},"end":{"row":0,"column":8},"action":"insert","lines":["d"],"id":10}],[{"start":{"row":0,"column":8},"end":{"row":0,"column":9},"action":"insert","lines":["u"],"id":11}],[{"start":{"row":0,"column":9},"end":{"row":0,"column":10},"action":"insert","lines":["l"],"id":12}],[{"start":{"row":0,"column":10},"end":{"row":0,"column":11},"action":"insert","lines":["e"],"id":13}],[{"start":{"row":0,"column":11},"end":{"row":0,"column":12},"action":"insert","lines":["s"],"id":14}],[{"start":{"row":0,"column":12},"end":{"row":1,"column":0},"action":"insert","lines":["",""],"id":15}],[{"start":{"row":1,"column":0},"end":{"row":1,"column":1},"action":"insert","lines":["."],"id":16}],[{"start":{"row":1,"column":0},"end":{"row":1,"column":1},"action":"remove","lines":["."],"id":17}],[{"start":{"row":1,"column":0},"end":{"row":1,"column":1},"action":"insert","lines":["*"],"id":18}],[{"start":{"row":1,"column":1},"end":{"row":1,"column":2},"action":"insert","lines":["."],"id":19}],[{"start":{"row":1,"column":2},"end":{"row":1,"column":3},"action":"insert","lines":["l"],"id":20}],[{"start":{"row":1,"column":3},"end":{"row":1,"column":4},"action":"insert","lines":["o"],"id":21}],[{"start":{"row":1,"column":4},"end":{"row":1,"column":5},"action":"insert","lines":["g"],"id":22}],[{"start":{"row":0,"column":12},"end":{"row":0,"column":13},"action":"insert","lines":["/"],"id":23}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":0},"end":{"row":0,"column":0},"isBackwards":true},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1474439746670,"hash":"b4d12c903f7995552877811e767f8e53f16361fc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"README.md","tooltip":"/README.md","undoManager":{"mark":2,"position":2,"stack":[[{"start":{"row":44,"column":0},"end":{"row":45,"column":0},"action":"remove","lines":["# Configuration",""],"id":347}],[{"start":{"row":43,"column":0},"end":{"row":44,"column":0},"action":"remove","lines":["",""],"id":348}],[{"start":{"row":43,"column":0},"end":{"row":44,"column":0},"action":"remove","lines":["",""],"id":349}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":43,"column":0},"end":{"row":43,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1474897153958,"hash":"d0c0bc626fd42a59b57180841f584c621600a026"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"gulpfile.js","tooltip":"/gulpfile.js","undoManager":{"mark":100,"position":100,"stack":[[{"start":{"row":29,"column":13},"end":{"row":29,"column":14},"action":"insert","lines":["d"],"id":415}],[{"start":{"row":29,"column":14},"end":{"row":29,"column":15},"action":"insert","lines":["i"],"id":416}],[{"start":{"row":29,"column":15},"end":{"row":29,"column":16},"action":"insert","lines":["t"],"id":417}],[{"start":{"row":11,"column":6},"end":{"row":11,"column":81},"action":"remove","lines":["var error = 'Warning: Your file contains \"' + string + '\", it should not.';"],"id":418}],[{"start":{"row":11,"column":6},"end":{"row":11,"column":93},"action":"insert","lines":["var error = 'Warning: Your file ' + file + 'contains \"' + string + '\", it should not.';"],"id":419}],[{"start":{"row":23,"column":6},"end":{"row":23,"column":79},"action":"remove","lines":["var error = 'Error: Your file contains \"' + string + '\", it should not.';"],"id":420}],[{"start":{"row":23,"column":6},"end":{"row":23,"column":93},"action":"insert","lines":["var error = 'Warning: Your file ' + file + 'contains \"' + string + '\", it should not.';"],"id":421}],[{"start":{"row":11,"column":46},"end":{"row":11,"column":47},"action":"insert","lines":["."],"id":422}],[{"start":{"row":11,"column":47},"end":{"row":11,"column":48},"action":"insert","lines":["t"],"id":423}],[{"start":{"row":11,"column":48},"end":{"row":11,"column":49},"action":"insert","lines":["o"],"id":424}],[{"start":{"row":11,"column":49},"end":{"row":11,"column":50},"action":"insert","lines":["S"],"id":425}],[{"start":{"row":11,"column":50},"end":{"row":11,"column":51},"action":"insert","lines":["t"],"id":426}],[{"start":{"row":11,"column":51},"end":{"row":11,"column":52},"action":"insert","lines":["r"],"id":427}],[{"start":{"row":11,"column":52},"end":{"row":11,"column":53},"action":"insert","lines":["i"],"id":428}],[{"start":{"row":11,"column":53},"end":{"row":11,"column":54},"action":"insert","lines":["n"],"id":429}],[{"start":{"row":11,"column":54},"end":{"row":11,"column":55},"action":"insert","lines":["g"],"id":430}],[{"start":{"row":11,"column":55},"end":{"row":11,"column":57},"action":"insert","lines":["()"],"id":431}],[{"start":{"row":10,"column":39},"end":{"row":11,"column":0},"action":"insert","lines":["",""],"id":432},{"start":{"row":11,"column":0},"end":{"row":11,"column":6},"action":"insert","lines":[" "]}],[{"start":{"row":11,"column":6},"end":{"row":11,"column":7},"action":"insert","lines":["c"],"id":433}],[{"start":{"row":11,"column":7},"end":{"row":11,"column":8},"action":"insert","lines":["o"],"id":434}],[{"start":{"row":11,"column":8},"end":{"row":11,"column":9},"action":"insert","lines":["n"],"id":435}],[{"start":{"row":11,"column":9},"end":{"row":11,"column":10},"action":"insert","lines":["s"],"id":436}],[{"start":{"row":11,"column":10},"end":{"row":11,"column":11},"action":"insert","lines":["o"],"id":437}],[{"start":{"row":11,"column":11},"end":{"row":11,"column":12},"action":"insert","lines":["l"],"id":438}],[{"start":{"row":11,"column":12},"end":{"row":11,"column":13},"action":"insert","lines":["e"],"id":439}],[{"start":{"row":11,"column":13},"end":{"row":11,"column":14},"action":"insert","lines":["."],"id":440}],[{"start":{"row":11,"column":14},"end":{"row":11,"column":15},"action":"insert","lines":["l"],"id":441}],[{"start":{"row":11,"column":15},"end":{"row":11,"column":16},"action":"insert","lines":["o"],"id":442}],[{"start":{"row":11,"column":16},"end":{"row":11,"column":17},"action":"insert","lines":["g"],"id":443}],[{"start":{"row":11,"column":17},"end":{"row":11,"column":19},"action":"insert","lines":["()"],"id":444}],[{"start":{"row":11,"column":18},"end":{"row":11,"column":19},"action":"insert","lines":["J"],"id":445}],[{"start":{"row":11,"column":19},"end":{"row":11,"column":20},"action":"insert","lines":["S"],"id":446}],[{"start":{"row":11,"column":20},"end":{"row":11,"column":21},"action":"insert","lines":["O"],"id":447}],[{"start":{"row":11,"column":21},"end":{"row":11,"column":22},"action":"insert","lines":["N"],"id":448}],[{"start":{"row":11,"column":22},"end":{"row":11,"column":23},"action":"insert","lines":["."],"id":449}],[{"start":{"row":11,"column":23},"end":{"row":11,"column":24},"action":"insert","lines":["s"],"id":450}],[{"start":{"row":11,"column":24},"end":{"row":11,"column":25},"action":"insert","lines":["t"],"id":451}],[{"start":{"row":11,"column":25},"end":{"row":11,"column":26},"action":"insert","lines":["r"],"id":452}],[{"start":{"row":11,"column":23},"end":{"row":11,"column":26},"action":"remove","lines":["str"],"id":453},{"start":{"row":11,"column":23},"end":{"row":11,"column":34},"action":"insert","lines":["stringify()"]}],[{"start":{"row":11,"column":33},"end":{"row":11,"column":34},"action":"insert","lines":["f"],"id":454}],[{"start":{"row":11,"column":34},"end":{"row":11,"column":35},"action":"insert","lines":["i"],"id":455}],[{"start":{"row":11,"column":35},"end":{"row":11,"column":36},"action":"insert","lines":["l"],"id":456}],[{"start":{"row":11,"column":36},"end":{"row":11,"column":37},"action":"insert","lines":["e"],"id":457}],[{"start":{"row":11,"column":39},"end":{"row":11,"column":40},"action":"insert","lines":[";"],"id":458}],[{"start":{"row":31,"column":12},"end":{"row":31,"column":20},"action":"remove","lines":["gulpfile"],"id":459},{"start":{"row":31,"column":12},"end":{"row":31,"column":13},"action":"insert","lines":["*"]}],[{"start":{"row":11,"column":6},"end":{"row":11,"column":40},"action":"remove","lines":["console.log(JSON.stringify(file));"],"id":460},{"start":{"row":11,"column":6},"end":{"row":11,"column":7},"action":"insert","lines":["/"]}],[{"start":{"row":11,"column":7},"end":{"row":11,"column":8},"action":"insert","lines":["/"],"id":461}],[{"start":{"row":11,"column":7},"end":{"row":11,"column":8},"action":"remove","lines":["/"],"id":462}],[{"start":{"row":11,"column":6},"end":{"row":11,"column":7},"action":"remove","lines":["/"],"id":463}],[{"start":{"row":11,"column":0},"end":{"row":11,"column":6},"action":"remove","lines":[" "],"id":464}],[{"start":{"row":10,"column":39},"end":{"row":11,"column":0},"action":"remove","lines":["",""],"id":465}],[{"start":{"row":11,"column":47},"end":{"row":11,"column":55},"action":"remove","lines":["toString"],"id":466},{"start":{"row":11,"column":47},"end":{"row":11,"column":48},"action":"insert","lines":["h"]}],[{"start":{"row":11,"column":48},"end":{"row":11,"column":49},"action":"insert","lines":["i"],"id":467}],[{"start":{"row":11,"column":49},"end":{"row":11,"column":50},"action":"insert","lines":["s"],"id":468}],[{"start":{"row":11,"column":50},"end":{"row":11,"column":51},"action":"insert","lines":["t"],"id":469}],[{"start":{"row":11,"column":51},"end":{"row":11,"column":52},"action":"insert","lines":["o"],"id":470}],[{"start":{"row":11,"column":52},"end":{"row":11,"column":53},"action":"insert","lines":["r"],"id":471}],[{"start":{"row":11,"column":53},"end":{"row":11,"column":54},"action":"insert","lines":["y"],"id":472}],[{"start":{"row":11,"column":55},"end":{"row":11,"column":56},"action":"remove","lines":[")"],"id":473}],[{"start":{"row":11,"column":54},"end":{"row":11,"column":55},"action":"remove","lines":["("],"id":474}],[{"start":{"row":30,"column":12},"end":{"row":30,"column":13},"action":"remove","lines":["*"],"id":475}],[{"start":{"row":30,"column":12},"end":{"row":30,"column":13},"action":"insert","lines":["i"],"id":476}],[{"start":{"row":30,"column":13},"end":{"row":30,"column":14},"action":"insert","lines":["n"],"id":477}],[{"start":{"row":30,"column":14},"end":{"row":30,"column":15},"action":"insert","lines":["d"],"id":478}],[{"start":{"row":30,"column":15},"end":{"row":30,"column":16},"action":"insert","lines":["e"],"id":479}],[{"start":{"row":30,"column":16},"end":{"row":30,"column":17},"action":"insert","lines":["x"],"id":480}],[{"start":{"row":30,"column":12},"end":{"row":30,"column":17},"action":"remove","lines":["index"],"id":481},{"start":{"row":30,"column":12},"end":{"row":30,"column":13},"action":"insert","lines":["*"]}],[{"start":{"row":30,"column":14},"end":{"row":30,"column":16},"action":"remove","lines":["js"],"id":482}],[{"start":{"row":30,"column":13},"end":{"row":30,"column":14},"action":"remove","lines":["."],"id":483}],[{"start":{"row":30,"column":12},"end":{"row":30,"column":13},"action":"remove","lines":["*"],"id":484}],[{"start":{"row":30,"column":12},"end":{"row":30,"column":13},"action":"insert","lines":["p"],"id":485}],[{"start":{"row":30,"column":13},"end":{"row":30,"column":14},"action":"insert","lines":["a"],"id":486}],[{"start":{"row":30,"column":14},"end":{"row":30,"column":15},"action":"insert","lines":["c"],"id":487}],[{"start":{"row":30,"column":15},"end":{"row":30,"column":16},"action":"insert","lines":["k"],"id":488}],[{"start":{"row":30,"column":16},"end":{"row":30,"column":17},"action":"insert","lines":["a"],"id":489}],[{"start":{"row":30,"column":17},"end":{"row":30,"column":18},"action":"insert","lines":["g"],"id":490}],[{"start":{"row":30,"column":18},"end":{"row":30,"column":19},"action":"insert","lines":["e"],"id":491}],[{"start":{"row":30,"column":19},"end":{"row":30,"column":20},"action":"insert","lines":["."],"id":492}],[{"start":{"row":30,"column":20},"end":{"row":30,"column":21},"action":"insert","lines":["j"],"id":493}],[{"start":{"row":30,"column":20},"end":{"row":30,"column":21},"action":"remove","lines":["j"],"id":494}],[{"start":{"row":30,"column":20},"end":{"row":30,"column":21},"action":"insert","lines":["j"],"id":495}],[{"start":{"row":30,"column":21},"end":{"row":30,"column":22},"action":"insert","lines":["s"],"id":496}],[{"start":{"row":30,"column":22},"end":{"row":30,"column":23},"action":"insert","lines":["o"],"id":497}],[{"start":{"row":30,"column":23},"end":{"row":30,"column":24},"action":"insert","lines":["n"],"id":498}],[{"start":{"row":23,"column":19},"end":{"row":23,"column":26},"action":"remove","lines":["Warning"],"id":499},{"start":{"row":23,"column":19},"end":{"row":23,"column":20},"action":"insert","lines":["E"]}],[{"start":{"row":23,"column":20},"end":{"row":23,"column":21},"action":"insert","lines":["r"],"id":500}],[{"start":{"row":23,"column":21},"end":{"row":23,"column":22},"action":"insert","lines":["r"],"id":501}],[{"start":{"row":23,"column":22},"end":{"row":23,"column":23},"action":"insert","lines":["o"],"id":502}],[{"start":{"row":23,"column":23},"end":{"row":23,"column":24},"action":"insert","lines":["r"],"id":503}],[{"start":{"row":23,"column":44},"end":{"row":23,"column":45},"action":"insert","lines":["."],"id":504}],[{"start":{"row":23,"column":45},"end":{"row":23,"column":46},"action":"insert","lines":["h"],"id":505}],[{"start":{"row":23,"column":46},"end":{"row":23,"column":47},"action":"insert","lines":["i"],"id":506}],[{"start":{"row":23,"column":47},"end":{"row":23,"column":48},"action":"insert","lines":["s"],"id":507}],[{"start":{"row":23,"column":48},"end":{"row":23,"column":49},"action":"insert","lines":["t"],"id":508}],[{"start":{"row":23,"column":49},"end":{"row":23,"column":50},"action":"insert","lines":["o"],"id":509}],[{"start":{"row":23,"column":50},"end":{"row":23,"column":51},"action":"insert","lines":["r"],"id":510}],[{"start":{"row":23,"column":51},"end":{"row":23,"column":52},"action":"insert","lines":["y"],"id":511}],[{"start":{"row":23,"column":52},"end":{"row":23,"column":53},"action":"insert","lines":[" "],"id":512}],[{"start":{"row":23,"column":52},"end":{"row":23,"column":53},"action":"remove","lines":[" "],"id":513}],[{"start":{"row":23,"column":56},"end":{"row":23,"column":57},"action":"insert","lines":[" "],"id":514}],[{"start":{"row":11,"column":58},"end":{"row":11,"column":59},"action":"insert","lines":[" "],"id":515}]]},"ace":{"folds":[],"scrolltop":120,"scrollleft":0,"selection":{"start":{"row":11,"column":37},"end":{"row":11,"column":59},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1476117294942,"hash":"60493da6e090c29f1177a20b09cf0f331c6b3da2"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"index.js","tooltip":"/index.js","undoManager":{"mark":100,"position":100,"stack":[[{"start":{"row":11,"column":49},"end":{"row":11,"column":50},"action":"remove","lines":["\""],"id":241}],[{"start":{"row":11,"column":49},"end":{"row":11,"column":50},"action":"insert","lines":["'"],"id":242}],[{"start":{"row":11,"column":38},"end":{"row":11,"column":39},"action":"remove","lines":["\""],"id":243}],[{"start":{"row":11,"column":38},"end":{"row":11,"column":39},"action":"insert","lines":["'"],"id":244}],[{"start":{"row":23,"column":6},"end":{"row":23,"column":79},"action":"remove","lines":["var error = 'Error: Your file contains \"' + string + '\", it should not.';"],"id":245},{"start":{"row":23,"column":6},"end":{"row":23,"column":93},"action":"insert","lines":["var error = 'Warning: Your file ' + file + 'contains \"' + string + '\", it should not.';"]}],[{"start":{"row":11,"column":37},"end":{"row":11,"column":50},"action":"remove","lines":[" ' + file + '"],"id":246},{"start":{"row":11,"column":37},"end":{"row":11,"column":59},"action":"insert","lines":[" ' + file.history + ' "]}],[{"start":{"row":23,"column":37},"end":{"row":23,"column":50},"action":"remove","lines":[" ' + file + '"],"id":247},{"start":{"row":23,"column":37},"end":{"row":23,"column":59},"action":"insert","lines":[" ' + file.history + ' "]}],[{"start":{"row":82,"column":36},"end":{"row":82,"column":38},"action":"remove","lines":["cb"],"id":249}],[{"start":{"row":82,"column":35},"end":{"row":82,"column":36},"action":"remove","lines":[" "],"id":250}],[{"start":{"row":82,"column":34},"end":{"row":82,"column":35},"action":"remove","lines":[","],"id":251}],[{"start":{"row":11,"column":102},"end":{"row":12,"column":0},"action":"insert","lines":["",""],"id":252},{"start":{"row":12,"column":0},"end":{"row":12,"column":6},"action":"insert","lines":[" "]}],[{"start":{"row":12,"column":6},"end":{"row":13,"column":0},"action":"insert","lines":["/*eslint no-console: \"error\"*/",""],"id":253}],[{"start":{"row":12,"column":36},"end":{"row":13,"column":0},"action":"remove","lines":["",""],"id":254}],[{"start":{"row":24,"column":102},"end":{"row":25,"column":0},"action":"insert","lines":["",""],"id":255},{"start":{"row":25,"column":0},"end":{"row":25,"column":6},"action":"insert","lines":[" "]}],[{"start":{"row":25,"column":6},"end":{"row":26,"column":0},"action":"insert","lines":["/*eslint no-console: \"error\"*/",""],"id":256}],[{"start":{"row":25,"column":36},"end":{"row":26,"column":0},"action":"remove","lines":["",""],"id":257}],[{"start":{"row":25,"column":6},"end":{"row":25,"column":36},"action":"remove","lines":["/*eslint no-console: \"error\"*/"],"id":258}],[{"start":{"row":12,"column":6},"end":{"row":12,"column":36},"action":"remove","lines":["/*eslint no-console: \"error\"*/"],"id":259}],[{"start":{"row":12,"column":6},"end":{"row":12,"column":54},"action":"insert","lines":["// eslint-disable-next-line no-use-before-define"],"id":260}],[{"start":{"row":12,"column":37},"end":{"row":12,"column":54},"action":"remove","lines":["use-before-define"],"id":261},{"start":{"row":12,"column":37},"end":{"row":12,"column":38},"action":"insert","lines":["c"]}],[{"start":{"row":12,"column":38},"end":{"row":12,"column":39},"action":"insert","lines":["o"],"id":262}],[{"start":{"row":12,"column":39},"end":{"row":12,"column":40},"action":"insert","lines":["n"],"id":263}],[{"start":{"row":12,"column":40},"end":{"row":12,"column":41},"action":"insert","lines":["s"],"id":264}],[{"start":{"row":12,"column":41},"end":{"row":12,"column":42},"action":"insert","lines":["o"],"id":265}],[{"start":{"row":12,"column":42},"end":{"row":12,"column":43},"action":"insert","lines":["l"],"id":266}],[{"start":{"row":12,"column":43},"end":{"row":12,"column":44},"action":"insert","lines":["e"],"id":267}],[{"start":{"row":25,"column":6},"end":{"row":25,"column":44},"action":"insert","lines":["// eslint-disable-next-line no-console"],"id":268}],[{"start":{"row":74,"column":57},"end":{"row":75,"column":0},"action":"insert","lines":["",""],"id":269},{"start":{"row":75,"column":0},"end":{"row":75,"column":6},"action":"insert","lines":[" "]}],[{"start":{"row":75,"column":6},"end":{"row":75,"column":7},"action":"insert","lines":["c"],"id":270}],[{"start":{"row":75,"column":7},"end":{"row":75,"column":8},"action":"insert","lines":["o"],"id":271}],[{"start":{"row":75,"column":8},"end":{"row":75,"column":9},"action":"insert","lines":["n"],"id":272}],[{"start":{"row":75,"column":9},"end":{"row":75,"column":10},"action":"insert","lines":["s"],"id":273}],[{"start":{"row":75,"column":10},"end":{"row":75,"column":11},"action":"insert","lines":["o"],"id":274}],[{"start":{"row":75,"column":11},"end":{"row":75,"column":12},"action":"insert","lines":["l"],"id":275}],[{"start":{"row":75,"column":12},"end":{"row":75,"column":13},"action":"insert","lines":["e"],"id":276}],[{"start":{"row":75,"column":13},"end":{"row":75,"column":14},"action":"insert","lines":["."],"id":277}],[{"start":{"row":75,"column":14},"end":{"row":75,"column":15},"action":"insert","lines":["l"],"id":278}],[{"start":{"row":75,"column":15},"end":{"row":75,"column":16},"action":"insert","lines":["o"],"id":279}],[{"start":{"row":75,"column":16},"end":{"row":75,"column":17},"action":"insert","lines":["g"],"id":280}],[{"start":{"row":75,"column":17},"end":{"row":75,"column":19},"action":"insert","lines":["()"],"id":281}],[{"start":{"row":75,"column":18},"end":{"row":75,"column":19},"action":"insert","lines":["m"],"id":282}],[{"start":{"row":75,"column":19},"end":{"row":75,"column":20},"action":"insert","lines":["a"],"id":283}],[{"start":{"row":75,"column":20},"end":{"row":75,"column":21},"action":"insert","lines":["t"],"id":284}],[{"start":{"row":75,"column":21},"end":{"row":75,"column":22},"action":"insert","lines":["c"],"id":285}],[{"start":{"row":75,"column":22},"end":{"row":75,"column":23},"action":"insert","lines":["h"],"id":286}],[{"start":{"row":75,"column":24},"end":{"row":75,"column":25},"action":"insert","lines":[";"],"id":287}],[{"start":{"row":75,"column":25},"end":{"row":76,"column":0},"action":"insert","lines":["",""],"id":288},{"start":{"row":76,"column":0},"end":{"row":76,"column":6},"action":"insert","lines":[" "]}],[{"start":{"row":76,"column":6},"end":{"row":76,"column":7},"action":"insert","lines":["c"],"id":289}],[{"start":{"row":76,"column":7},"end":{"row":76,"column":8},"action":"insert","lines":["o"],"id":290}],[{"start":{"row":76,"column":8},"end":{"row":76,"column":9},"action":"insert","lines":["n"],"id":291}],[{"start":{"row":76,"column":9},"end":{"row":76,"column":10},"action":"insert","lines":["s"],"id":292}],[{"start":{"row":76,"column":10},"end":{"row":76,"column":11},"action":"insert","lines":["o"],"id":293}],[{"start":{"row":76,"column":11},"end":{"row":76,"column":12},"action":"insert","lines":["l"],"id":294}],[{"start":{"row":76,"column":12},"end":{"row":76,"column":13},"action":"insert","lines":["e"],"id":295}],[{"start":{"row":76,"column":13},"end":{"row":76,"column":14},"action":"insert","lines":["."],"id":296}],[{"start":{"row":76,"column":14},"end":{"row":76,"column":15},"action":"insert","lines":["l"],"id":297}],[{"start":{"row":76,"column":15},"end":{"row":76,"column":16},"action":"insert","lines":["o"],"id":298}],[{"start":{"row":76,"column":16},"end":{"row":76,"column":17},"action":"insert","lines":["g"],"id":299}],[{"start":{"row":76,"column":17},"end":{"row":76,"column":19},"action":"insert","lines":["()"],"id":300}],[{"start":{"row":76,"column":18},"end":{"row":76,"column":19},"action":"insert","lines":["1"],"id":301}],[{"start":{"row":76,"column":20},"end":{"row":76,"column":21},"action":"insert","lines":[";"],"id":302}],[{"start":{"row":97,"column":3},"end":{"row":98,"column":0},"action":"insert","lines":["",""],"id":303},{"start":{"row":98,"column":0},"end":{"row":98,"column":2},"action":"insert","lines":[" "]}],[{"start":{"row":98,"column":2},"end":{"row":99,"column":0},"action":"insert","lines":["",""],"id":304},{"start":{"row":99,"column":0},"end":{"row":99,"column":2},"action":"insert","lines":[" "]}],[{"start":{"row":99,"column":2},"end":{"row":99,"column":3},"action":"insert","lines":["r"],"id":305}],[{"start":{"row":99,"column":3},"end":{"row":99,"column":4},"action":"insert","lines":["e"],"id":306}],[{"start":{"row":99,"column":4},"end":{"row":99,"column":5},"action":"insert","lines":["t"],"id":307}],[{"start":{"row":99,"column":5},"end":{"row":99,"column":6},"action":"insert","lines":["u"],"id":308}],[{"start":{"row":99,"column":6},"end":{"row":99,"column":7},"action":"insert","lines":["r"],"id":309}],[{"start":{"row":99,"column":7},"end":{"row":99,"column":8},"action":"insert","lines":["n"],"id":310}],[{"start":{"row":99,"column":8},"end":{"row":99,"column":9},"action":"insert","lines":[" "],"id":311}],[{"start":{"row":99,"column":9},"end":{"row":99,"column":10},"action":"insert","lines":["f"],"id":312}],[{"start":{"row":99,"column":10},"end":{"row":99,"column":11},"action":"insert","lines":["a"],"id":313}],[{"start":{"row":99,"column":11},"end":{"row":99,"column":12},"action":"insert","lines":["l"],"id":314}],[{"start":{"row":99,"column":12},"end":{"row":99,"column":13},"action":"insert","lines":["s"],"id":315}],[{"start":{"row":99,"column":13},"end":{"row":99,"column":14},"action":"insert","lines":["e"],"id":316}],[{"start":{"row":99,"column":14},"end":{"row":99,"column":15},"action":"insert","lines":[";"],"id":317}],[{"start":{"row":75,"column":6},"end":{"row":76,"column":21},"action":"remove","lines":["console.log(match);"," console.log(1);"],"id":318}],[{"start":{"row":75,"column":6},"end":{"row":75,"column":7},"action":"insert","lines":["i"],"id":319}],[{"start":{"row":75,"column":7},"end":{"row":75,"column":8},"action":"insert","lines":["f"],"id":320}],[{"start":{"row":75,"column":8},"end":{"row":75,"column":9},"action":"insert","lines":[" "],"id":321}],[{"start":{"row":75,"column":9},"end":{"row":75,"column":10},"action":"insert","lines":["m"],"id":322}],[{"start":{"row":75,"column":10},"end":{"row":75,"column":11},"action":"insert","lines":["a"],"id":323}],[{"start":{"row":75,"column":11},"end":{"row":75,"column":12},"action":"insert","lines":["t"],"id":324}],[{"start":{"row":75,"column":12},"end":{"row":75,"column":13},"action":"insert","lines":["c"],"id":325}],[{"start":{"row":75,"column":13},"end":{"row":75,"column":14},"action":"insert","lines":["h"],"id":326}],[{"start":{"row":75,"column":13},"end":{"row":75,"column":14},"action":"remove","lines":["h"],"id":327}],[{"start":{"row":75,"column":12},"end":{"row":75,"column":13},"action":"remove","lines":["c"],"id":328}],[{"start":{"row":75,"column":11},"end":{"row":75,"column":12},"action":"remove","lines":["t"],"id":329}],[{"start":{"row":75,"column":10},"end":{"row":75,"column":11},"action":"remove","lines":["a"],"id":330}],[{"start":{"row":75,"column":9},"end":{"row":75,"column":10},"action":"remove","lines":["m"],"id":331}],[{"start":{"row":75,"column":9},"end":{"row":75,"column":11},"action":"insert","lines":["()"],"id":332}],[{"start":{"row":75,"column":10},"end":{"row":75,"column":11},"action":"insert","lines":["m"],"id":333}],[{"start":{"row":75,"column":11},"end":{"row":75,"column":12},"action":"insert","lines":["a"],"id":334}],[{"start":{"row":75,"column":12},"end":{"row":75,"column":13},"action":"insert","lines":["t"],"id":335}],[{"start":{"row":75,"column":13},"end":{"row":75,"column":14},"action":"insert","lines":["c"],"id":336}],[{"start":{"row":75,"column":14},"end":{"row":75,"column":15},"action":"insert","lines":["h"],"id":337}],[{"start":{"row":76,"column":6},"end":{"row":76,"column":8},"action":"insert","lines":[" "],"id":338}],[{"start":{"row":75,"column":16},"end":{"row":75,"column":17},"action":"insert","lines":[" "],"id":339}],[{"start":{"row":75,"column":17},"end":{"row":75,"column":18},"action":"insert","lines":["{"],"id":340}],[{"start":{"row":76,"column":35},"end":{"row":77,"column":0},"action":"insert","lines":["",""],"id":341},{"start":{"row":77,"column":0},"end":{"row":77,"column":8},"action":"insert","lines":[" "]}],[{"start":{"row":77,"column":8},"end":{"row":77,"column":9},"action":"insert","lines":["}"],"id":342},{"start":{"row":77,"column":0},"end":{"row":77,"column":8},"action":"remove","lines":[" "]},{"start":{"row":77,"column":0},"end":{"row":77,"column":6},"action":"insert","lines":[" "]}]]},"ace":{"folds":[],"scrolltop":1017.8000316619873,"scrollleft":0,"selection":{"start":{"row":75,"column":18},"end":{"row":75,"column":18},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":62,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1476118172937,"hash":"9c7a3a329ae7e734f7db991d3fe03e82f12893de"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"mraudit.js","tooltip":"/mraudit.js","undoManager":{"mark":1,"position":1,"stack":[[{"start":{"row":12,"column":0},"end":{"row":13,"column":0},"action":"insert","lines":["",""],"id":2}],[{"start":{"row":12,"column":0},"end":{"row":13,"column":0},"action":"remove","lines":["",""],"id":3}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":10,"column":0},"end":{"row":11,"column":25},"isBackwards":true},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1474384663926,"hash":"3e3581f0082b5905f74dafce1a0f6be5ff43a15b"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"package.json","tooltip":"/package.json","undoManager":{"mark":30,"position":30,"stack":[[{"start":{"row":10,"column":29},"end":{"row":11,"column":0},"action":"insert","lines":["",""],"id":4},{"start":{"row":11,"column":0},"end":{"row":11,"column":4},"action":"insert","lines":[" "]}],[{"start":{"row":11,"column":4},"end":{"row":11,"column":6},"action":"insert","lines":["\"\""],"id":5}],[{"start":{"row":11,"column":5},"end":{"row":11,"column":6},"action":"insert","lines":["l"],"id":6}],[{"start":{"row":11,"column":6},"end":{"row":11,"column":7},"action":"insert","lines":["i"],"id":7}],[{"start":{"row":11,"column":7},"end":{"row":11,"column":8},"action":"insert","lines":["n"],"id":8}],[{"start":{"row":11,"column":8},"end":{"row":11,"column":9},"action":"insert","lines":["t"],"id":9}],[{"start":{"row":11,"column":10},"end":{"row":11,"column":11},"action":"insert","lines":[":"],"id":10}],[{"start":{"row":11,"column":11},"end":{"row":11,"column":12},"action":"insert","lines":[" "],"id":11}],[{"start":{"row":11,"column":12},"end":{"row":11,"column":14},"action":"insert","lines":["\"\""],"id":12}],[{"start":{"row":11,"column":14},"end":{"row":11,"column":15},"action":"insert","lines":[","],"id":13}],[{"start":{"row":11,"column":13},"end":{"row":11,"column":14},"action":"insert","lines":["e"],"id":14}],[{"start":{"row":11,"column":14},"end":{"row":11,"column":15},"action":"insert","lines":["s"],"id":15}],[{"start":{"row":11,"column":15},"end":{"row":11,"column":16},"action":"insert","lines":["l"],"id":16}],[{"start":{"row":11,"column":16},"end":{"row":11,"column":17},"action":"insert","lines":["i"],"id":17}],[{"start":{"row":11,"column":17},"end":{"row":11,"column":18},"action":"insert","lines":["n"],"id":18}],[{"start":{"row":11,"column":18},"end":{"row":11,"column":19},"action":"insert","lines":["t"],"id":19}],[{"start":{"row":11,"column":19},"end":{"row":11,"column":20},"action":"insert","lines":[" "],"id":20}],[{"start":{"row":11,"column":20},"end":{"row":11,"column":21},"action":"insert","lines":["i"],"id":21}],[{"start":{"row":11,"column":21},"end":{"row":11,"column":22},"action":"insert","lines":["n"],"id":22}],[{"start":{"row":11,"column":22},"end":{"row":11,"column":23},"action":"insert","lines":["d"],"id":23}],[{"start":{"row":11,"column":23},"end":{"row":11,"column":24},"action":"insert","lines":["e"],"id":24}],[{"start":{"row":11,"column":24},"end":{"row":11,"column":25},"action":"insert","lines":["x"],"id":25}],[{"start":{"row":11,"column":25},"end":{"row":11,"column":26},"action":"insert","lines":["."],"id":26}],[{"start":{"row":11,"column":26},"end":{"row":11,"column":27},"action":"insert","lines":["j"],"id":27}],[{"start":{"row":11,"column":27},"end":{"row":11,"column":28},"action":"insert","lines":["s"],"id":28}],[{"start":{"row":2,"column":14},"end":{"row":2,"column":15},"action":"remove","lines":["0"],"id":29}],[{"start":{"row":2,"column":14},"end":{"row":2,"column":15},"action":"insert","lines":["1"],"id":30}],[{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"remove","lines":["1"],"id":31}],[{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"insert","lines":["0"],"id":32}],[{"start":{"row":2,"column":18},"end":{"row":2,"column":19},"action":"remove","lines":["0"],"id":33}],[{"start":{"row":2,"column":18},"end":{"row":2,"column":19},"action":"insert","lines":["1"],"id":34}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":2,"column":19},"end":{"row":2,"column":19},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1476118287499,"hash":"6390a5d3576ac000fafd5b8b9c5b4c849876074d"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"filter":false,"title":"test.js","tooltip":"/test/test.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":60,"scrollleft":0,"selection":{"start":{"row":14,"column":7},"end":{"row":14,"column":7},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":2,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1474449193035,"hash":"594c754e89c4d14e24bc0bccb836307193b85c90"}
|
package/.c9/project.settings
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"ace": {
|
|
3
|
-
"@guessTabSize": "true",
|
|
4
|
-
"@newLineMode": "unix",
|
|
5
|
-
"@tabSize": "4",
|
|
6
|
-
"@useSoftTabs": "true"
|
|
7
|
-
},
|
|
8
|
-
"build": {
|
|
9
|
-
"@builder": "auto",
|
|
10
|
-
"@path": "/.c9/builders",
|
|
11
|
-
"@saveall": "true"
|
|
12
|
-
},
|
|
13
|
-
"find.nak": {
|
|
14
|
-
"@searchLimit": 100
|
|
15
|
-
},
|
|
16
|
-
"general": {
|
|
17
|
-
"@stripws": false
|
|
18
|
-
},
|
|
19
|
-
"language": {
|
|
20
|
-
"@eslintrc": true,
|
|
21
|
-
"@semi": true,
|
|
22
|
-
"@undeclaredVars": true,
|
|
23
|
-
"@unusedFunctionArgs": false,
|
|
24
|
-
"@warnLevel": "info",
|
|
25
|
-
"tern_defs": {
|
|
26
|
-
"json()": {
|
|
27
|
-
"browser": {
|
|
28
|
-
"enabled": true
|
|
29
|
-
},
|
|
30
|
-
"ecma5": {
|
|
31
|
-
"enabled": true
|
|
32
|
-
},
|
|
33
|
-
"jQuery": {
|
|
34
|
-
"enabled": true
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"php": {
|
|
40
|
-
"@completion": true,
|
|
41
|
-
"@path": ".:./vendor"
|
|
42
|
-
},
|
|
43
|
-
"python": {
|
|
44
|
-
"@completion": true,
|
|
45
|
-
"@path": "/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python3.4/dist-packages:/usr/local/lib/python3.5/dist-packages",
|
|
46
|
-
"@version": "python2"
|
|
47
|
-
},
|
|
48
|
-
"run": {
|
|
49
|
-
"@path": "/.c9/runners",
|
|
50
|
-
"configs": {
|
|
51
|
-
"@inited": "true",
|
|
52
|
-
"json()": {}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"share": {
|
|
56
|
-
"@app": false,
|
|
57
|
-
"@preview": false,
|
|
58
|
-
"@useOwnerSettings": false
|
|
59
|
-
}
|
|
60
|
-
}
|
package/.npmignore
DELETED