@supersoniks/concorde 4.7.3 → 4.7.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "4.7.3",
3
+ "version": "4.7.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "",
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow: /
@@ -10,15 +10,3 @@
10
10
  </template>
11
11
  </sonic-code>
12
12
 
13
-
14
-
15
- <sonic-code>
16
- <template>
17
- <sonic-captcha formDataProvider="captchaTestDataProvider">
18
- <sonic-submit serviceURL="https://atelier.julien.supersoniks.pro" endPoint="php/some-service.php" onclick>
19
- <sonic-button class="mt-4">Submit with captcha</sonic-button>
20
- </sonic-submit>
21
- </sonic-captcha>
22
- </template>
23
- </sonic-code>
24
-
@@ -22,13 +22,6 @@ async function flushGetMicrotasks() {
22
22
  await Promise.resolve();
23
23
  }
24
24
 
25
- /** @get scoped : scheduleAfterHostReady diffère le fetch (rAF ou updateComplete Lit). */
26
- async function flushScopedGet() {
27
- await flushGetMicrotasks();
28
- await new Promise<void>((resolve) => requestAnimationFrame(() => resolve()));
29
- await flushGetMicrotasks();
30
- }
31
-
32
25
  function mockPayload<T>(result: T) {
33
26
  return {
34
27
  request: new Request("https://api.example.test/items/1"),
@@ -120,7 +113,7 @@ describe("get", () => {
120
113
  wrap.appendChild(el);
121
114
  document.body.appendChild(wrap);
122
115
 
123
- await flushScopedGet();
116
+ await flushGetMicrotasks();
124
117
 
125
118
  expect(API.prototype.getDetailed).toHaveBeenCalledWith("scoped-endpoint");
126
119
  expect(el.payload?.result).toEqual({ id: "loaded" });
@@ -90,8 +90,9 @@ function scheduleAfterHostReady(
90
90
  cancelled = true;
91
91
  };
92
92
  }
93
- const rafId = requestAnimationFrame(() => callback());
94
- return () => cancelAnimationFrame(rafId);
93
+ // HTMLElement classique : config ancêtre déjà lisible ; sinon watchScopedConfiguration.
94
+ callback();
95
+ return () => {};
95
96
  }
96
97
 
97
98
  /**
@@ -133,7 +134,8 @@ function watchScopedConfiguration(
133
134
  attributeFilter: [...SCOPE_WATCH_ATTRIBUTES],
134
135
  });
135
136
  }
136
- node = (node.parentNode || (node as ShadowRoot).host) as SearchableDomElement;
137
+ node = (node.parentNode ||
138
+ (node as ShadowRoot).host) as SearchableDomElement;
137
139
  }
138
140
  cleanups.push(() => observer.disconnect());
139
141
 
@@ -1,34 +0,0 @@
1
- <?php
2
- /* *
3
- * Call get-challenge on auto-hosted latcha service at https://altcha.supersoniks.org
4
- * */
5
-
6
- // Autoriser toutes les origines
7
- header("Access-Control-Allow-Origin: *");
8
-
9
- // Autoriser les méthodes HTTP spécifiques
10
- header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
11
-
12
- // Autoriser certains en-têtes spécifiques
13
- header("Access-Control-Allow-Headers: Content-Type, Authorization");
14
-
15
- // Si la méthode est OPTIONS, terminer la requête ici
16
- if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
17
- http_response_code(200);
18
- exit();
19
- }
20
-
21
- function getChallenge($key){
22
- $maxNumber=20000;
23
- $queryString = $params = [
24
- 'key' => $key,
25
- 'maxNumber' => $maxNumber
26
- ];
27
- // Générer la chaîne de requête
28
- $queryString = http_build_query($params);
29
- $url = "https://altcha.supersoniks.org/get-challenge?key=".$queryString;
30
- $response = file_get_contents($url);
31
- return $response;
32
- }
33
-
34
- echo getChallenge($_GET['key']);
@@ -1,42 +0,0 @@
1
- <?php
2
- /* *
3
- * Call verify-solution on auto-hosted latcha service at https://altcha.supersoniks.org
4
- * */
5
-
6
-
7
- // Autoriser toutes les origines
8
- header("Access-Control-Allow-Origin: *");
9
-
10
- // Autoriser les méthodes HTTP spécifiques
11
- header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
12
-
13
- // Autoriser certains en-têtes spécifiques
14
- header("Access-Control-Allow-Headers: Content-Type, Authorization, x-altcha-spam-filter");
15
-
16
- // Si la méthode est OPTIONS, terminer la requête ici
17
- if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
18
- http_response_code(200);
19
- exit();
20
- }
21
-
22
- function verifySolution($key, $solution){
23
- $queryString = $params = [
24
- 'key' => $key,
25
- 'altcha' => $solution
26
- ];
27
- // Générer la chaîne de requête
28
- $queryString = http_build_query($params);
29
- $url = "https://altcha.supersoniks.org/verify-solution?".$queryString;
30
- $response = file_get_contents($url);
31
- return $response;
32
- }
33
-
34
- /**
35
- * Get json posted data
36
- */
37
-
38
- // Get the posted data
39
-
40
- $data = json_decode(file_get_contents("php://input"));
41
-
42
- echo verifySolution($data->captchakey, $data->captchatoken);