| 62 | (args as any).config.name = "azurite-queue"; |
| 63 | |
| 64 | export default class QueueEnvironment implements IQueueEnvironment { |
| 65 | private flags = args.parse(process.argv); |
| 66 | |
| 67 | public queueHost(): string | undefined { |
| 68 | return this.flags.queueHost; |
| 69 | } |
| 70 | |
| 71 | public queuePort(): number | undefined { |
| 72 | return this.flags.queuePort; |
| 73 | } |
| 74 | |
| 75 | public queueKeepAliveTimeout(): number | undefined { |
| 76 | return this.flags.keepAliveTimeout; |
| 77 | } |
| 78 | |
| 79 | public async location(): Promise<string> { |
| 80 | return this.flags.location || process.cwd(); |
| 81 | } |
| 82 | |
| 83 | public silent(): boolean { |
| 84 | if (this.flags.silent !== undefined) { |
| 85 | return true; |
| 86 | } |
| 87 | return false; |
| 88 | } |
| 89 | |
| 90 | public loose(): boolean { |
| 91 | if (this.flags.loose !== undefined) { |
| 92 | return true; |
| 93 | } |
| 94 | // default is false which will block not supported APIs, headers and parameters |
| 95 | return false; |
| 96 | } |
| 97 | |
| 98 | public skipApiVersionCheck(): boolean { |
| 99 | if (this.flags.skipApiVersionCheck !== undefined) { |
| 100 | return true; |
| 101 | } |
| 102 | // default is false which will check API version |
| 103 | return false; |
| 104 | } |
| 105 | |
| 106 | public cert(): string | undefined { |
| 107 | return this.flags.cert; |
| 108 | } |
| 109 | |
| 110 | public key(): string | undefined { |
| 111 | return this.flags.key; |
| 112 | } |
| 113 | |
| 114 | public pwd(): string | undefined { |
| 115 | return this.flags.pwd; |
| 116 | } |
| 117 | |
| 118 | public oauth(): string | undefined { |
| 119 | return this.flags.oauth; |
| 120 | } |
| 121 |
nothing calls this directly
no test coverage detected
searching dependent graphs…