Skip to content

Commit acb1a8d

Browse files
Edward-Roshannzhang4
andauthored
fix cli issue (#2)
* fix cli issue * Update package.json * fix xo check issue Co-authored-by: nzhang4 <nzhang4@stubhub.com>
1 parent 3586f20 commit acb1a8d

File tree

16 files changed

+186
-45
lines changed

16 files changed

+186
-45
lines changed

.npmignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ CODE_OF_CONDUCT.md
99
CONTRIBUTING.md
1010
pull_request_template.md
1111
build
12-
bin/*
13-
src/cli-wrapper.ts
1412
action.ts
1513
action.yml

action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as core from '@actions/core';
22
import avx from './src/avx';
33
import chalk from 'chalk';
44

5-
const fileExtension = core.getInput('file-extension') ?? [];
5+
const fileExtension = core.getInput('file-extension') ?? ['.xml'];
66
const ignoreFiles = core.getInput('ignore-files') ?? [];
77
const ignoreDirectories = core.getInput('ignore-directories') ?? [];
88
const readPath = core.getInput('read-path') ?? './';
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
import args from 'args';
3-
import Args from './types/args';
4-
import avx from './avx';
3+
import Args from '../src/types/args';
4+
import avx from '../src/avx';
55
import chalk from 'chalk';
66

77
export function parseArgumentsIntoOptions(rawArgs: string[]): Args {
88
args
9-
.option('file-extension', '[Required] file extension that you want to read. such as "config" or "xml". split with comma.')
9+
.option('file-extension', '[Required] file extension that you want to read. such as ".config" or ".xml". split with comma.')
1010
.option('ignore-files', 'the files you want to ignore. split with comma.')
1111
.option('ignore-directories', 'the directories you want to ignore. split with comma.')
1212
.option('read-path', 'the path that you assign to read.');

bin/cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
3+
require('ts-node').register();
4+
require('./cli.ts');

bin/cli.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import cli from './cli-wrapper';
2+
3+
cli(process.argv);

cli.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/action/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/action/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cli/LICENSE

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,31 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
6161
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6262

6363

64+
buffer-from
65+
MIT
66+
MIT License
67+
68+
Copyright (c) 2016, 2018 Linus Unnebäck
69+
70+
Permission is hereby granted, free of charge, to any person obtaining a copy
71+
of this software and associated documentation files (the "Software"), to deal
72+
in the Software without restriction, including without limitation the rights
73+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
74+
copies of the Software, and to permit persons to whom the Software is
75+
furnished to do so, subject to the following conditions:
76+
77+
The above copyright notice and this permission notice shall be included in all
78+
copies or substantial portions of the Software.
79+
80+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
81+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
82+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
83+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
84+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
85+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
86+
SOFTWARE.
87+
88+
6489
camelcase
6590
MIT
6691
MIT License
@@ -242,6 +267,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
242267
THE SOFTWARE.
243268

244269

270+
make-error
271+
ISC
272+
Copyright 2014 Julien Fontanet
273+
274+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
275+
276+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
277+
278+
245279
mri
246280
MIT
247281
The MIT License (MIT)
@@ -318,6 +352,63 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
318352
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
319353

320354

355+
source-map
356+
BSD-3-Clause
357+
358+
Copyright (c) 2009-2011, Mozilla Foundation and contributors
359+
All rights reserved.
360+
361+
Redistribution and use in source and binary forms, with or without
362+
modification, are permitted provided that the following conditions are met:
363+
364+
* Redistributions of source code must retain the above copyright notice, this
365+
list of conditions and the following disclaimer.
366+
367+
* Redistributions in binary form must reproduce the above copyright notice,
368+
this list of conditions and the following disclaimer in the documentation
369+
and/or other materials provided with the distribution.
370+
371+
* Neither the names of the Mozilla Foundation nor the names of project
372+
contributors may be used to endorse or promote products derived from this
373+
software without specific prior written permission.
374+
375+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
376+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
377+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
378+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
379+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
380+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
381+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
382+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
383+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
384+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
385+
386+
387+
source-map-support
388+
MIT
389+
The MIT License (MIT)
390+
391+
Copyright (c) 2014 Evan Wallace
392+
393+
Permission is hereby granted, free of charge, to any person obtaining a copy
394+
of this software and associated documentation files (the "Software"), to deal
395+
in the Software without restriction, including without limitation the rights
396+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
397+
copies of the Software, and to permit persons to whom the Software is
398+
furnished to do so, subject to the following conditions:
399+
400+
The above copyright notice and this permission notice shall be included in all
401+
copies or substantial portions of the Software.
402+
403+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
404+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
405+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
406+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
407+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
408+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
409+
SOFTWARE.
410+
411+
321412
supports-color
322413
MIT
323414
MIT License
@@ -329,3 +420,41 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
329420
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
330421

331422
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
423+
424+
425+
ts-node
426+
MIT
427+
The MIT License (MIT)
428+
429+
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
430+
431+
Permission is hereby granted, free of charge, to any person obtaining a copy
432+
of this software and associated documentation files (the "Software"), to deal
433+
in the Software without restriction, including without limitation the rights
434+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
435+
copies of the Software, and to permit persons to whom the Software is
436+
furnished to do so, subject to the following conditions:
437+
438+
The above copyright notice and this permission notice shall be included in
439+
all copies or substantial portions of the Software.
440+
441+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
442+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
443+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
444+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
445+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
446+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
447+
THE SOFTWARE.
448+
449+
450+
yn
451+
MIT
452+
MIT License
453+
454+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
455+
456+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
457+
458+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
459+
460+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

dist/cli/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)