@jvittechs/jai1-cli 0.1.95 → 0.1.97

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.
Files changed (135) hide show
  1. package/dist/cli.js +684 -122
  2. package/dist/cli.js.map +1 -1
  3. package/dist/web-chat/README.md +418 -0
  4. package/dist/web-chat/app.js +1527 -0
  5. package/dist/web-chat/index.html +324 -0
  6. package/dist/web-chat/node_modules/.bin/0ecdsa-generate-keypair +15 -0
  7. package/dist/web-chat/node_modules/.bin/0gentesthtml +89 -0
  8. package/dist/web-chat/node_modules/.bin/0serve +97 -0
  9. package/dist/web-chat/node_modules/.bin/acorn +4 -0
  10. package/dist/web-chat/node_modules/.bin/autoprefixer +22 -0
  11. package/dist/web-chat/node_modules/.bin/baseline-browser-mapping +2 -0
  12. package/dist/web-chat/node_modules/.bin/browserslist +156 -0
  13. package/dist/web-chat/node_modules/.bin/esbuild +0 -0
  14. package/dist/web-chat/node_modules/.bin/jiti +34 -0
  15. package/dist/web-chat/node_modules/.bin/js-yaml +126 -0
  16. package/dist/web-chat/node_modules/.bin/jsesc +148 -0
  17. package/dist/web-chat/node_modules/.bin/json5 +152 -0
  18. package/dist/web-chat/node_modules/.bin/katex +112 -0
  19. package/dist/web-chat/node_modules/.bin/loose-envify +16 -0
  20. package/dist/web-chat/node_modules/.bin/lz-string +13 -0
  21. package/dist/web-chat/node_modules/.bin/nanoid +55 -0
  22. package/dist/web-chat/node_modules/.bin/parser +15 -0
  23. package/dist/web-chat/node_modules/.bin/prebuild-install +78 -0
  24. package/dist/web-chat/node_modules/.bin/rc +4 -0
  25. package/dist/web-chat/node_modules/.bin/rollup +1912 -0
  26. package/dist/web-chat/node_modules/.bin/semver +174 -0
  27. package/dist/web-chat/node_modules/.bin/tsc +2 -0
  28. package/dist/web-chat/node_modules/.bin/tsserver +2 -0
  29. package/dist/web-chat/node_modules/.bin/update-browserslist-db +42 -0
  30. package/dist/web-chat/node_modules/.bin/uuid +2 -0
  31. package/dist/web-chat/node_modules/.bin/uvu +35 -0
  32. package/dist/web-chat/node_modules/.bin/vite +61 -0
  33. package/dist/web-chat/node_modules/.package-lock.json +15371 -0
  34. package/dist/web-chat/node_modules/.vite/deps/_metadata.json +67 -0
  35. package/dist/web-chat/node_modules/.vite/deps/chunk-DC5AMYBS.js +39 -0
  36. package/dist/web-chat/node_modules/.vite/deps/chunk-DC5AMYBS.js.map +7 -0
  37. package/dist/web-chat/node_modules/.vite/deps/chunk-NUMECXU6.js +21628 -0
  38. package/dist/web-chat/node_modules/.vite/deps/chunk-NUMECXU6.js.map +7 -0
  39. package/dist/web-chat/node_modules/.vite/deps/chunk-RLJ2RCJQ.js +1906 -0
  40. package/dist/web-chat/node_modules/.vite/deps/chunk-RLJ2RCJQ.js.map +7 -0
  41. package/dist/web-chat/node_modules/.vite/deps/chunk-S725DACQ.js +928 -0
  42. package/dist/web-chat/node_modules/.vite/deps/chunk-S725DACQ.js.map +7 -0
  43. package/dist/web-chat/node_modules/.vite/deps/chunk-XJVUMEYI.js +8578 -0
  44. package/dist/web-chat/node_modules/.vite/deps/chunk-XJVUMEYI.js.map +7 -0
  45. package/dist/web-chat/node_modules/.vite/deps/package.json +3 -0
  46. package/dist/web-chat/node_modules/.vite/deps/react-dom.js +7 -0
  47. package/dist/web-chat/node_modules/.vite/deps/react-dom.js.map +7 -0
  48. package/dist/web-chat/node_modules/.vite/deps/react-dom_client.js +39 -0
  49. package/dist/web-chat/node_modules/.vite/deps/react-dom_client.js.map +7 -0
  50. package/dist/web-chat/node_modules/.vite/deps/react-markdown.js +8931 -0
  51. package/dist/web-chat/node_modules/.vite/deps/react-markdown.js.map +7 -0
  52. package/dist/web-chat/node_modules/.vite/deps/react.js +6 -0
  53. package/dist/web-chat/node_modules/.vite/deps/react.js.map +7 -0
  54. package/dist/web-chat/node_modules/.vite/deps/react_jsx-dev-runtime.js +913 -0
  55. package/dist/web-chat/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
  56. package/dist/web-chat/node_modules/.vite/deps/react_jsx-runtime.js +7 -0
  57. package/dist/web-chat/node_modules/.vite/deps/react_jsx-runtime.js.map +7 -0
  58. package/dist/web-chat/node_modules/.vite/deps/remark-gfm.js +7403 -0
  59. package/dist/web-chat/node_modules/.vite/deps/remark-gfm.js.map +7 -0
  60. package/dist/web-chat/node_modules/@codemirror/autocomplete/.github/workflows/dispatch.yml +16 -0
  61. package/dist/web-chat/node_modules/@codemirror/commands/.github/workflows/dispatch.yml +16 -0
  62. package/dist/web-chat/node_modules/@codemirror/lang-cpp/.github/workflows/dispatch.yml +16 -0
  63. package/dist/web-chat/node_modules/@codemirror/lang-css/.github/workflows/dispatch.yml +16 -0
  64. package/dist/web-chat/node_modules/@codemirror/lang-go/.github/workflows/dispatch.yml +16 -0
  65. package/dist/web-chat/node_modules/@codemirror/lang-html/.github/workflows/dispatch.yml +16 -0
  66. package/dist/web-chat/node_modules/@codemirror/lang-java/.github/workflows/dispatch.yml +16 -0
  67. package/dist/web-chat/node_modules/@codemirror/lang-javascript/.github/workflows/dispatch.yml +16 -0
  68. package/dist/web-chat/node_modules/@codemirror/lang-json/.github/workflows/dispatch.yml +16 -0
  69. package/dist/web-chat/node_modules/@codemirror/lang-less/.github/workflows/dispatch.yml +16 -0
  70. package/dist/web-chat/node_modules/@codemirror/lang-markdown/.github/workflows/dispatch.yml +16 -0
  71. package/dist/web-chat/node_modules/@codemirror/lang-python/.github/workflows/dispatch.yml +16 -0
  72. package/dist/web-chat/node_modules/@codemirror/lang-rust/.github/workflows/dispatch.yml +16 -0
  73. package/dist/web-chat/node_modules/@codemirror/lang-sass/.github/workflows/dispatch.yml +16 -0
  74. package/dist/web-chat/node_modules/@codemirror/lang-sql/.github/workflows/dispatch.yml +16 -0
  75. package/dist/web-chat/node_modules/@codemirror/lang-wast/.github/workflows/dispatch.yml +16 -0
  76. package/dist/web-chat/node_modules/@codemirror/lang-xml/.github/workflows/dispatch.yml +16 -0
  77. package/dist/web-chat/node_modules/@codemirror/lang-yaml/.github/workflows/dispatch.yml +16 -0
  78. package/dist/web-chat/node_modules/@codemirror/language/.github/workflows/dispatch.yml +16 -0
  79. package/dist/web-chat/node_modules/@codemirror/language-data/.github/workflows/dispatch.yml +16 -0
  80. package/dist/web-chat/node_modules/@codemirror/legacy-modes/.github/workflows/dispatch.yml +16 -0
  81. package/dist/web-chat/node_modules/@codemirror/lint/.github/workflows/dispatch.yml +16 -0
  82. package/dist/web-chat/node_modules/@codemirror/search/.github/workflows/dispatch.yml +16 -0
  83. package/dist/web-chat/node_modules/@codemirror/state/.github/workflows/dispatch.yml +16 -0
  84. package/dist/web-chat/node_modules/@codemirror/theme-one-dark/.github/workflows/dispatch.yml +16 -0
  85. package/dist/web-chat/node_modules/@codemirror/view/.github/workflows/dispatch.yml +16 -0
  86. package/dist/web-chat/node_modules/@lezer/html/src/.tern-port +1 -0
  87. package/dist/web-chat/node_modules/@lezer/php/.tern-port +1 -0
  88. package/dist/web-chat/node_modules/@lezer/php/test/.tern-port +1 -0
  89. package/dist/web-chat/node_modules/@lezer/sass/src/.tern-port +1 -0
  90. package/dist/web-chat/node_modules/@lezer/yaml/.tern-port +1 -0
  91. package/dist/web-chat/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml +31 -0
  92. package/dist/web-chat/node_modules/bl/.travis.yml +17 -0
  93. package/dist/web-chat/node_modules/clean-set/.prettierrc +4 -0
  94. package/dist/web-chat/node_modules/clean-set/.travis.yml +7 -0
  95. package/dist/web-chat/node_modules/codemirror/.github/workflows/dispatch.yml +16 -0
  96. package/dist/web-chat/node_modules/entities/src/generated/.eslintrc.json +10 -0
  97. package/dist/web-chat/node_modules/es5-ext/promise/.eslintrc.json +1 -0
  98. package/dist/web-chat/node_modules/es6-iterator/.editorconfig +14 -0
  99. package/dist/web-chat/node_modules/es6-iterator/test/.eslintrc.json +5 -0
  100. package/dist/web-chat/node_modules/es6-symbol/.testignore +1 -0
  101. package/dist/web-chat/node_modules/escape-carriage/.github/workflows/node.js.yml +19 -0
  102. package/dist/web-chat/node_modules/esniff/.prettierignore +2 -0
  103. package/dist/web-chat/node_modules/esniff/.testignore +3 -0
  104. package/dist/web-chat/node_modules/event-emitter/.lint +15 -0
  105. package/dist/web-chat/node_modules/event-emitter/.testignore +1 -0
  106. package/dist/web-chat/node_modules/event-emitter/.travis.yml +16 -0
  107. package/dist/web-chat/node_modules/expand-template/.travis.yml +6 -0
  108. package/dist/web-chat/node_modules/extend/.editorconfig +20 -0
  109. package/dist/web-chat/node_modules/extend/.eslintrc +17 -0
  110. package/dist/web-chat/node_modules/extend/.jscs.json +175 -0
  111. package/dist/web-chat/node_modules/extend/.travis.yml +230 -0
  112. package/dist/web-chat/node_modules/gensync/test/.babelrc +5 -0
  113. package/dist/web-chat/node_modules/github-from-package/.travis.yml +4 -0
  114. package/dist/web-chat/node_modules/intersection-observer/.eslintrc +45 -0
  115. package/dist/web-chat/node_modules/lib0/.github/workflows/node.js.yml +24 -0
  116. package/dist/web-chat/node_modules/lib0/.jsdoc.json +18 -0
  117. package/dist/web-chat/node_modules/lib0/.vscode/launch.json +17 -0
  118. package/dist/web-chat/node_modules/minimist/.eslintrc +29 -0
  119. package/dist/web-chat/node_modules/minimist/.github/FUNDING.yml +12 -0
  120. package/dist/web-chat/node_modules/minimist/.nycrc +14 -0
  121. package/dist/web-chat/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +31 -0
  122. package/dist/web-chat/node_modules/next-tick/.editorconfig +16 -0
  123. package/dist/web-chat/node_modules/next-tick/.github/FUNDING.yml +1 -0
  124. package/dist/web-chat/node_modules/next-tick/.lint +16 -0
  125. package/dist/web-chat/node_modules/node-abi/node_modules/.bin/semver +191 -0
  126. package/dist/web-chat/node_modules/pump/.github/FUNDING.yml +2 -0
  127. package/dist/web-chat/node_modules/pump/.travis.yml +5 -0
  128. package/dist/web-chat/node_modules/simple-concat/.travis.yml +3 -0
  129. package/dist/web-chat/node_modules/simple-get/.github/dependabot.yml +15 -0
  130. package/dist/web-chat/node_modules/simple-get/.github/workflows/ci.yml +23 -0
  131. package/dist/web-chat/node_modules/tar-fs/.travis.yml +6 -0
  132. package/dist/web-chat/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  133. package/dist/web-chat/node_modules/w3c-keyname/.tern-port +1 -0
  134. package/dist/web-chat/style.css +1882 -0
  135. package/package.json +4 -2
@@ -0,0 +1,112 @@
1
+ #!/usr/bin/env node
2
+ // Simple CLI for KaTeX.
3
+ // Reads TeX from stdin, outputs HTML to stdout.
4
+ // To run this from the repository, you must first build KaTeX by running
5
+ // `yarn` and `yarn build`.
6
+
7
+ /* eslint no-console:0 */
8
+
9
+ let katex;
10
+ try {
11
+ katex = require("./");
12
+ } catch (e) {
13
+ console.error(
14
+ "KaTeX could not import, likely because dist/katex.js is missing.");
15
+ console.error("Please run 'yarn' and 'yarn build' before running");
16
+ console.error("cli.js from the KaTeX repository.");
17
+ console.error();
18
+ throw e;
19
+ }
20
+ const {version} = require("./package.json");
21
+ const fs = require("fs");
22
+
23
+ const program = require("commander").version(version);
24
+ for (const prop in katex.SETTINGS_SCHEMA) {
25
+ if (katex.SETTINGS_SCHEMA.hasOwnProperty(prop)) {
26
+ const opt = katex.SETTINGS_SCHEMA[prop];
27
+ if (opt.cli !== false) {
28
+ program.option(opt.cli || "--" + prop, opt.cliDescription ||
29
+ opt.description, opt.cliProcessor, opt.cliDefault);
30
+ }
31
+ }
32
+ }
33
+ program.option("-f, --macro-file <path>",
34
+ "Read macro definitions, one per line, from the given file.")
35
+ .option("-i, --input <path>", "Read LaTeX input from the given file.")
36
+ .option("-o, --output <path>", "Write html output to the given file.");
37
+
38
+ let options;
39
+
40
+ function readMacros() {
41
+ if (options.macroFile) {
42
+ fs.readFile(options.macroFile, "utf-8", function(err, data) {
43
+ if (err) {throw err;}
44
+ splitMacros(data.toString().split('\n'));
45
+ });
46
+ } else {
47
+ splitMacros([]);
48
+ }
49
+ }
50
+
51
+ function splitMacros(macroStrings) {
52
+ // Override macros from macro file (if any)
53
+ // with macros from command line (if any)
54
+ macroStrings = macroStrings.concat(options.macro);
55
+
56
+ const macros = {};
57
+
58
+ for (const m of macroStrings) {
59
+ const i = m.search(":");
60
+ if (i !== -1) {
61
+ macros[m.substring(0, i).trim()] = m.substring(i + 1).trim();
62
+ }
63
+ }
64
+
65
+ options.macros = macros;
66
+ readInput();
67
+ }
68
+
69
+ function readInput() {
70
+ let input = "";
71
+
72
+ if (options.input) {
73
+ fs.readFile(options.input, "utf-8", function(err, data) {
74
+ if (err) {throw err;}
75
+ input = data.toString();
76
+ writeOutput(input);
77
+ });
78
+ } else {
79
+ process.stdin.on("data", function(chunk) {
80
+ input += chunk.toString();
81
+ });
82
+
83
+ process.stdin.on("end", function() {
84
+ writeOutput(input);
85
+ });
86
+ }
87
+ }
88
+
89
+ function writeOutput(input) {
90
+ // --format specifies the KaTeX output
91
+ const outputFile = options.output;
92
+ options.output = options.format;
93
+
94
+ const output = katex.renderToString(input, options) + "\n";
95
+
96
+ if (outputFile) {
97
+ fs.writeFile(outputFile, output, function(err) {
98
+ if (err) {
99
+ return console.log(err);
100
+ }
101
+ });
102
+ } else {
103
+ console.log(output);
104
+ }
105
+ }
106
+
107
+ if (require.main !== module) {
108
+ module.exports = program;
109
+ } else {
110
+ options = program.parse(process.argv).opts();
111
+ readMacros();
112
+ }
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var looseEnvify = require('./');
5
+ var fs = require('fs');
6
+
7
+ if (process.argv[2]) {
8
+ fs.createReadStream(process.argv[2], {encoding: 'utf8'})
9
+ .pipe(looseEnvify(process.argv[2]))
10
+ .pipe(process.stdout);
11
+ } else {
12
+ process.stdin.resume()
13
+ process.stdin
14
+ .pipe(looseEnvify(__filename))
15
+ .pipe(process.stdout);
16
+ }
@@ -0,0 +1,13 @@
1
+ #! /usr/bin/env node
2
+ var lzString = require('../libs/lz-string.js');
3
+ var fs = require('fs');
4
+
5
+ if (process.argv.length < 3) {
6
+ console.error('Usage: lz-string <input_file>');
7
+ process.exit(1);
8
+ }
9
+
10
+ console.log(lzString.compress(fs.readFileSync(process.argv[2], {
11
+ encoding: 'utf8',
12
+ })));
13
+
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+
3
+ let { nanoid, customAlphabet } = require('..')
4
+
5
+ function print(msg) {
6
+ process.stdout.write(msg + '\n')
7
+ }
8
+
9
+ function error(msg) {
10
+ process.stderr.write(msg + '\n')
11
+ process.exit(1)
12
+ }
13
+
14
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
15
+ print(`
16
+ Usage
17
+ $ nanoid [options]
18
+
19
+ Options
20
+ -s, --size Generated ID size
21
+ -a, --alphabet Alphabet to use
22
+ -h, --help Show this help
23
+
24
+ Examples
25
+ $ nanoid --s 15
26
+ S9sBF77U6sDB8Yg
27
+
28
+ $ nanoid --size 10 --alphabet abc
29
+ bcabababca`)
30
+ process.exit()
31
+ }
32
+
33
+ let alphabet, size
34
+ for (let i = 2; i < process.argv.length; i++) {
35
+ let arg = process.argv[i]
36
+ if (arg === '--size' || arg === '-s') {
37
+ size = Number(process.argv[i + 1])
38
+ i += 1
39
+ if (Number.isNaN(size) || size <= 0) {
40
+ error('Size must be positive integer')
41
+ }
42
+ } else if (arg === '--alphabet' || arg === '-a') {
43
+ alphabet = process.argv[i + 1]
44
+ i += 1
45
+ } else {
46
+ error('Unknown argument ' + arg)
47
+ }
48
+ }
49
+
50
+ if (alphabet) {
51
+ let customNanoid = customAlphabet(alphabet, size)
52
+ print(customNanoid())
53
+ } else {
54
+ print(nanoid(size))
55
+ }
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ /* eslint-disable no-var, unicorn/prefer-node-protocol */
3
+
4
+ var parser = require("..");
5
+ var fs = require("fs");
6
+
7
+ var filename = process.argv[2];
8
+ if (!filename) {
9
+ console.error("no filename specified");
10
+ } else {
11
+ var file = fs.readFileSync(filename, "utf8");
12
+ var ast = parser.parse(file);
13
+
14
+ console.log(JSON.stringify(ast, null, " "));
15
+ }
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+
3
+ const path = require('path')
4
+ const fs = require('fs')
5
+ const napi = require('napi-build-utils')
6
+
7
+ const pkg = require(path.resolve('package.json'))
8
+ const rc = require('./rc')(pkg)
9
+ const log = require('./log')(rc, process.env)
10
+ const download = require('./download')
11
+ const asset = require('./asset')
12
+ const util = require('./util')
13
+
14
+ const prebuildClientVersion = require('./package.json').version
15
+ if (rc.version) {
16
+ console.log(prebuildClientVersion)
17
+ process.exit(0)
18
+ }
19
+
20
+ if (rc.path) process.chdir(rc.path)
21
+
22
+ if (rc.runtime === 'electron' && rc.target[0] === '4' && rc.abi === '64') {
23
+ log.error(`Electron version ${rc.target} found - skipping prebuild-install work due to known ABI issue`)
24
+ log.error('More information about this issue can be found at https://github.com/lgeiger/node-abi/issues/54')
25
+ process.exit(1)
26
+ }
27
+
28
+ if (!fs.existsSync('package.json')) {
29
+ log.error('setup', 'No package.json found. Aborting...')
30
+ process.exit(1)
31
+ }
32
+
33
+ if (rc.help) {
34
+ console.error(fs.readFileSync(path.join(__dirname, 'help.txt'), 'utf-8'))
35
+ process.exit(0)
36
+ }
37
+
38
+ log.info('begin', 'Prebuild-install version', prebuildClientVersion)
39
+
40
+ const opts = Object.assign({}, rc, { pkg: pkg, log: log })
41
+
42
+ if (napi.isNapiRuntime(rc.runtime)) napi.logUnsupportedVersion(rc.target, log)
43
+
44
+ const origin = util.packageOrigin(process.env, pkg)
45
+
46
+ if (opts.force) {
47
+ log.warn('install', 'prebuilt binaries enforced with --force!')
48
+ log.warn('install', 'prebuilt binaries may be out of date!')
49
+ } else if (origin && origin.length > 4 && origin.substr(0, 4) === 'git+') {
50
+ log.info('install', 'installing from git repository, skipping download.')
51
+ process.exit(1)
52
+ } else if (opts.buildFromSource) {
53
+ log.info('install', '--build-from-source specified, not attempting download.')
54
+ process.exit(1)
55
+ }
56
+
57
+ const startDownload = function (downloadUrl) {
58
+ download(downloadUrl, opts, function (err) {
59
+ if (err) {
60
+ log.warn('install', err.message)
61
+ return process.exit(1)
62
+ }
63
+ log.info('install', 'Successfully installed prebuilt binary!')
64
+ })
65
+ }
66
+
67
+ if (opts.token) {
68
+ asset(opts, function (err, assetId) {
69
+ if (err) {
70
+ log.warn('install', err.message)
71
+ return process.exit(1)
72
+ }
73
+
74
+ startDownload(util.getAssetUrl(opts, assetId))
75
+ })
76
+ } else {
77
+ startDownload(util.getDownloadUrl(opts))
78
+ }
@@ -0,0 +1,4 @@
1
+ #! /usr/bin/env node
2
+ var rc = require('./index')
3
+
4
+ console.log(JSON.stringify(rc(process.argv[2]), false, 2))