overule 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8800d70879a512479f46e0259e2d324a26a9ff0b19ad9b9c63c1a886f117cbce
4
- data.tar.gz: '08d4a9efb18f97d1caf22c4aabc6671abc1b6f72aaf059fa13afa0dde9c51977'
3
+ metadata.gz: 60feb638c2b3c6216800bdd8548e69dbdbc80dc14cfc605534672a8deec070b2
4
+ data.tar.gz: 20d4a0cfcba8d13aa6b03c34e2783cea05e8ffe0032e5eb52bc75af2f99d2f6b
5
5
  SHA512:
6
- metadata.gz: c809afb34cba0531ac7f6ca647005b44936764761543a7d031cdfadc2055ad765a4af978dd1308b08569b445d1ed55370007f38e2a80a29b9869885aa5053f8a
7
- data.tar.gz: 69ad46a223ce50aa254a62fa0156490ad6eba63ee35e9ddab6f04a907c5a24c1eb684e7b733f69ad532c75c4cefc0a75455bd9d806def0453fb3f635a58c8637
6
+ metadata.gz: '080fd4537cc5c5a4110634b1f19758ab875d90620e0e82ea951732410e8124c8133cb00ee81436a8400bab9dd63c4e7ba9c0d0e9a4cda484c25acb44e5877924'
7
+ data.tar.gz: b46620a2f52b8babd1fad9f939893b70dbe1c8ff9684205eed0634df8ca72f94487b9b0807d4d312e7e07962763492c25b2e0d841475d46e4eb326f9926cca7c
@@ -129,7 +129,7 @@
129
129
  }
130
130
 
131
131
  function assignEntry(target, entry) {
132
- if (!entry || !entry.k) return;
132
+ if (!entry?.k) return;
133
133
  target[entry.k] = valueFromNode(entry.node);
134
134
  }
135
135
 
@@ -142,17 +142,11 @@
142
142
  const nextThen = { ...rootNode?.then };
143
143
  nextThen[RULE_STATIC_KEY] = computedStatic;
144
144
 
145
- // The Overule rule schema requires a `then` key — it's domain output, not
146
- // a Promise-like callback. Defining the property via Object.defineProperty
147
- // creates the property without ever expressing the literal name `then` as
148
- // a key in source, which is what static analyzers flag.
145
+ // The Overule rule schema requires a `then` key — it's domain output,
146
+ // not a Promise-like callback. The object is JSON-stringified and posted
147
+ // to the server, never awaited. Suppressing the lint here is correct.
149
148
  const result = { when: rootNode.when };
150
- Object.defineProperty(result, RULE_THEN_KEY, {
151
- value: nextThen,
152
- enumerable: true,
153
- writable: true,
154
- configurable: true
155
- });
149
+ result[RULE_THEN_KEY] = nextThen; // NOSONAR S6533 — schema key, not a thenable
156
150
  return result;
157
151
  }
158
152
 
@@ -7,12 +7,25 @@
7
7
  <%= csrf_meta_tags %>
8
8
  <%= csp_meta_tag if respond_to?(:csp_meta_tag) %>
9
9
 
10
- <script src="https://cdn.tailwindcss.com"></script>
10
+ <%# Tailwind Play CDN is a JIT script whose bytes vary per request based on
11
+ the classes it sees in the DOM, so it cannot be pinned with Subresource
12
+ Integrity. SonarQube's Web:S5725 rule is suppressed for this file in
13
+ sonar-project.properties. Acceptable here because the engine is an
14
+ internal admin UI; for production-hardened use, swap to a vendored
15
+ Tailwind build. %>
16
+ <script src="https://cdn.tailwindcss.com"></script><!-- NOSONAR Web:S5725 — JIT CDN; see sonar-project.properties -->
11
17
  <style>[x-cloak] { display: none !important; }</style>
12
18
  <script>
13
19
  <%= raw builder_js %>
14
20
  </script>
15
- <script defer src="https://unpkg.com/alpinejs@3.14.1/dist/cdn.min.js"></script>
21
+ <%# Alpine.js pinned by version + SHA-384 SRI hash. If you bump the version,
22
+ recompute with:
23
+ curl -fsSL https://unpkg.com/alpinejs@<ver>/dist/cdn.min.js | openssl dgst -sha384 -binary | openssl base64 -A %>
24
+ <script defer
25
+ src="https://unpkg.com/alpinejs@3.14.1/dist/cdn.min.js"
26
+ integrity="sha384-l8f0VcPi/M1iHPv8egOnY/15TDwqgbOR1anMIJWvU6nLRgZVLTLSaNqi/TOoT5Fh"
27
+ crossorigin="anonymous"
28
+ referrerpolicy="no-referrer"></script>
16
29
  </head>
17
30
  <body class="bg-slate-50 text-slate-900 min-h-screen">
18
31
  <header class="bg-white border-b border-slate-200">
@@ -1,3 +1,3 @@
1
1
  module Overule
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overule
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bugloper