@tomflow/chatloop-extension 0.4.14 → 0.4.15
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export const capability=Object.freeze({id:'entry_test',page:'
|
|
1
|
+
export const capability=Object.freeze({id:'entry_test',page:'entry_test.html',cli:['entry','test'],kind:'entry-test',waitMs:310000,textResult:true,description:'One TEST_ONLY native @ App new-Chat entry; no Browser Owner'});
|
|
@@ -148,7 +148,7 @@ async function run(){
|
|
|
148
148
|
const params=new URLSearchParams(location.search),id=params.get('requestId');
|
|
149
149
|
if(!own?.id||own.url!==location.href||[...params.keys()].length!==1
|
|
150
150
|
||!/^[a-f0-9]{32}$/.test(id||'')
|
|
151
|
-
||location.href!==chrome.runtime.getURL('
|
|
151
|
+
||location.href!==chrome.runtime.getURL('entry_test.html')+'?requestId='+id)
|
|
152
152
|
throw Error('ENTRY_TEST_ACTION_SOURCE_INVALID');
|
|
153
153
|
const proof=await chrome.runtime.sendNativeMessage(HOST,{op:'acquire',id,action:'entry_test'});
|
|
154
154
|
if(proof?.status!=='OK'||proof.action!=='entry_test'||proof.id!==id
|
package/extension/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@ export async function compileActions(source=join(root,'capabilities'),
|
|
|
41
41
|
const {capability:c}=await import(pathToFileURL(path).href+'?sha256='+hash);
|
|
42
42
|
if(!c||c.id!==file.slice(0,-4)||
|
|
43
43
|
!/^[a-z][a-z0-9_]*$/.test(c.id)||
|
|
44
|
-
!/^[a-z][a-z0-
|
|
44
|
+
!/^[a-z][a-z0-9_-]*\.html$/.test(c.page)||
|
|
45
45
|
!Array.isArray(c.cli)||!c.cli.length||
|
|
46
46
|
c.cli.some(t=>typeof t!=='string'||!/^[a-z][a-z0-9-]*$/.test(t))||
|
|
47
47
|
!Number.isSafeInteger(c.waitMs)||c.waitMs<1||c.waitMs>310000||
|
|
@@ -65,7 +65,7 @@ export async function compileActions(source=join(root,'capabilities'),
|
|
|
65
65
|
!['text','dom'].includes(c.readMode)))
|
|
66
66
|
throw fail('EXTENSION_EYE_READ_MODE_INVALID');
|
|
67
67
|
const reviewedEntry=c.id==='entry_test' && c.kind==='entry-test'
|
|
68
|
-
&&c.page==='
|
|
68
|
+
&&c.page==='entry_test.html' &&c.cli.join(' ')==='entry test'
|
|
69
69
|
&&c.waitMs===310000 &&c.textResult===true;
|
|
70
70
|
if(newAction && c.kind!=='eye-read' && !reviewedEntry)
|
|
71
71
|
throw fail('EXTENSION_PRIVILEGED_ACTION_REVIEW_REQUIRED');
|
|
File without changes
|