@hellpig/anarchy-shared 1.4.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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ - 1.0.0 Initial
2
+ - 1.1.0 Added more shared utils
3
+ - 1.2.0 More Object utils
4
+ - 1.3.0 Vite plugin: emit json
5
+ - 1.4.0 Json validation utils
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sergei Panfilov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,12 @@
1
+ # Third-Party Notices (Pointer)
2
+
3
+ This distribution of **@hellpig/anarchy-shared** may include **third-party components**.
4
+
5
+ Full attributions and license texts are provided **offline** at:
6
+
7
+ - `./legal/NOTICE`: canonical third-party notices
8
+ - `./legal/THIRD_PARTY_LICENSES`: bundled license texts
9
+
10
+ Nothing in this pointer modifies third-party licenses. If there is any conflict between this note and a third-party license, the third-party license controls.
11
+
12
+ Questions: TBD until market release
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # Anarchy engine shared package
2
+
3
+ Shared utilities and types for the Anarchy engine.
4
+
5
+ ## License
6
+
7
+ MIT License
8
+
9
+ Copyright (c) 2025 Sergei Panfilov
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ ## Legal
30
+
31
+ See local files `LICENSE`, `CHANGELOG`, `NOTICE` (pointer), and files in `./legal`:
32
+ `DISCLAIMER`, `EULA`, `PRIVACY`, `SECURITY`, `NOTICE` (full), `THIRD_PARTY_LICENSES`.
33
+
34
+ Contacts — Privacy: {{PRIVACY_EMAIL}}, Security: {{SECURITY_EMAIL}}.
@@ -0,0 +1,47 @@
1
+ # Disclaimer of Warranty and Liability — @hellpig/anarchy-shared
2
+
3
+ **Scope.** “Project” means the software, source code, binaries, documentation, and other materials in this repository or distribution package.
4
+
5
+ **No Legal Advice.** This document is **not** legal or regulatory advice. Applicability of laws depends on **your** specific product, market, and distribution model.
6
+
7
+ **No Warranty.** The Project is provided **“AS IS,” without warranty of any kind**, express or implied, including but not limited to **merchantability, fitness for a particular purpose, and non-infringement**, **to the maximum extent permitted by applicable law**.
8
+
9
+ **Limitation of Liability.** To the fullest extent permitted by law, Sergei Panfilov and contributors shall **not** be liable for any damages (including direct, indirect, incidental, special, exemplary, or consequential) arising from the use of, inability to use, or performance of the Project, even if advised of the possibility of such damages.
10
+
11
+ **Statutory consumer rights are not affected.** Nothing in this disclaimer excludes or limits liability where such exclusion or limitation is unlawful (including for **death or personal injury**, **fraud**, or **wilful misconduct**).
12
+
13
+ ## Regulatory Compliance Notice
14
+
15
+ This repository is a **project** and **is not, by itself, a product placed on any market**. Publishing this repository does **not** make Sergei Panfilov a “manufacturer” under product-safety or cybersecurity regimes.
16
+
17
+ If **you** place a product on the market using the Project, **you** are responsible for compliance (e.g., product safety/cybersecurity such as the EU **CRA**, privacy/data protection such as **GDPR/UK-GDPR, CPRA, LGPD, PIPEDA, Australia Privacy Act, PIPL**, consumer protection, export/sanctions).
18
+
19
+ Where Sergei Panfilov distributes **commercial binaries**, obligations (including security support and vulnerability handling) are addressed in the accompanying documents: see `SECURITY` and `SUPPORT`.
20
+
21
+ ## Export Controls and Sanctions
22
+
23
+ The Project may be subject to **export control, re-export, and sanctions** laws and regulations (including those of the **EU**, **US**, **UK**, and other jurisdictions). You are responsible for complying with all applicable restrictions and for **not** using, exporting, re-exporting, or transferring the Project **(i)** to any **sanctioned or restricted** person, entity, or destination, or **(ii)** for any prohibited end use under applicable law.
24
+
25
+ ## Not for Safety-Critical Use
26
+
27
+ **High-Risk Use Prohibition.** The Project **must not** be used in safety-critical contexts (including medical, aviation, nuclear, military, or critical infrastructure) where failure could lead to death, personal injury, or severe environmental or property damage. Any such use is **strictly prohibited**.
28
+
29
+ ## Third-Party Components (License Precedence)
30
+
31
+ The Project may include or interface with **third-party open-source components**. Such components are licensed under their **own** terms. **If there is a conflict between this disclaimer/EULA and an OSS license for a specific component, the OSS license controls for that component.** See `NOTICE` / `THIRD_PARTY_LICENSES`.
32
+
33
+ ## Accessibility (EAA and similar)
34
+
35
+ Where required by applicable law (e.g., the **EU Accessibility Act**), we aim to address **accessibility feedback** for distributed binaries **within reasonable and proportionate limits**. Contact: **TBD until market release**. This section **does not** create service levels or guarantees.
36
+
37
+ ## Security and Support
38
+
39
+ This project is maintained **without any commitment** to provide support, maintenance, updates, or security fixes.
40
+
41
+ For distributed binaries (if any), see `SECURITY` for the **coordinated vulnerability disclosure** process.
42
+
43
+ ## Modifications
44
+
45
+ We may update this disclaimer by committing changes to this repository or shipping updates with the product. Continued use after changes are posted constitutes acceptance of the revised terms.
46
+
47
+ **Governing Law.** Subject to mandatory consumer protection laws, this disclaimer is governed by the laws of **The Netherlands** with venue in **Amsterdam**.
package/legal/EULA.md ADDED
@@ -0,0 +1,18 @@
1
+ # End User License Terms — @hellpig/anarchy-shared
2
+
3
+ **Effective date:** TBD until market release
4
+ This repository is provided under **MIT** (see `LICENSE`).
5
+
6
+ 1. **License & Ownership.** The code is licensed, not sold. Copyrights remain with the authors.
7
+ 2. **Not a Market Placement by Maintainers.** This repository is **not** a product “placed on the market.” If **you** incorporate it into a **product**, **you** are responsible for compliance with product-safety, cybersecurity (e.g., EU CRA), privacy/data-protection, consumer, and export/sanctions laws.
8
+ 3. **No Support Obligation.** The maintainers provide the project **without support commitments or SLAs**. See `SECURITY` for reporting.
9
+ 4. **Third-Party Components (License Precedence).** Dependencies retain their own licenses and notices. **If this text ever conflicts with a third-party license for a specific component, that third-party license governs for that component.** See `NOTICE` / `THIRD_PARTY_LICENSES`.
10
+ 5. **No Warranty / Liability.** Provided **“AS IS”**, **to the extent permitted by law**, without warranties; **statutory consumer rights (if any) are not affected**.
11
+
12
+ **Accessibility.** Where required by law, we aim to address **accessibility feedback** for officially published artifacts **within reasonable and proportionate limits**. Contact: **TBD until market release**. This section does **not** create service levels or guarantees.
13
+
14
+ ## Governing Language
15
+
16
+ This agreement is drafted in English. Translations may be provided for convenience. In consumer markets where local-language versions are required by law for clarity and fairness, the local-language version controls to the extent required by applicable law; otherwise, the English version controls.
17
+
18
+ For license terms, see `LICENSE`.
@@ -0,0 +1,34 @@
1
+ # Third-Party Notices
2
+
3
+ ## Application: @hellpig/anarchy-shared
4
+
5
+ This product includes third-party components. Their **licenses and attributions** are listed below.
6
+ For the **full license texts**, see `THIRD_PARTY_LICENSES.md`.
7
+
8
+ Components listed: 2
9
+
10
+ ## 1) Mandatory Attributions (verbatim)
11
+
12
+ The following notices are reproduced as provided by the respective licensors (e.g., **Apache-2.0 NOTICE**, **CC-BY credits**, **font attributions**):
13
+
14
+ ## Application:@hellpig/anarchy-shared
15
+
16
+ **License(s):** UNKNOWN
17
+
18
+ ---
19
+
20
+ ## bowser@2.12.1
21
+
22
+ **License(s):** MIT
23
+
24
+ **Repository:** git+https://github.com/lancedikson/bowser.git
25
+
26
+ **URL:** https://github.com/lancedikson/bowser
27
+
28
+ **Attribution:** Copyright 2015, Dustin Diaz (the "Original Author")
29
+
30
+ ---
31
+
32
+ ## 2) General OSS Acknowledgment
33
+
34
+ This product incorporates open-source software. **If any term of this file or the EULA conflicts with an OSS license for a specific component, the OSS license controls for that component.**
@@ -0,0 +1,52 @@
1
+ # Privacy Notice — @hellpig/anarchy-shared
2
+
3
+ **Effective date:** TBD until market release
4
+
5
+ **Controller:** Sergei Panfilov — Contact: TBD until market release
6
+
7
+ **Scope / Identification.** This notice applies to the **open-source project** **@hellpig/anarchy-shared** (hosted on or mirrored to **public code hosting platform(s)**). We do **not** operate a consumer service through this repository.
8
+
9
+ **CPRA (California):** we **do not sell or share** personal information for cross-context behavioral advertising and we do **not** process **sensitive personal information** in this repository context.
10
+
11
+ ## 1. Repository Interactions
12
+
13
+ If you open issues, pull requests, or discussions, the content you submit (including your profile/handle and attachments) becomes **public** on the code-hosting platform(s) where the repository is published and is processed under the applicable platform’s privacy policy. We may process this **public** information to operate, maintain, and improve the project.
14
+ Copies of public content may also appear in mirrors, forks, caches, archival copies, package registries, or on physical media distributed by others; we do not control those third-party copies, and requests regarding them should be directed to the respective distributor or platform.
15
+
16
+ **Legal basis:** our **legitimate interests** in running the project.
17
+
18
+ **Retention:** issue/PR/discussion history is retained as part of the **public project record**. Edits/deletions are handled via the platform’s features; historical records (e.g., git history) may persist.
19
+
20
+ ## 2. Communications
21
+
22
+ If you email **TBD until market release**, we process your **email address**, **message content**, and any information you provide to respond.
23
+
24
+ **Legal basis:** our **legitimate interests** in responding to inquiries (or your **consent**, where applicable).
25
+
26
+ **Retention:** **24 months** from the date of our **last interaction in the support thread** (or ticket closure), then deletion or **irreversible anonymization**, unless longer retention is required by law or to establish, exercise, or defend **legal claims**.
27
+
28
+ ## 3. Processors & Transfers
29
+
30
+ We may use service providers (e.g., email or CI hosting) as **processors**, bound by data-processing terms and our instructions. Where personal data is transferred outside your jurisdiction, we rely on recognized transfer mechanisms (e.g., **Standard Contractual Clauses**) where required by law.
31
+
32
+ ## 4. Your Rights
33
+
34
+ Where applicable, you may request **access**, **rectification**, **erasure**, **restriction**, **objection**, **portability**, and **withdrawal of consent** (for processing based on consent) at **TBD until market release**. You may also contact your local supervisory authority (e.g., the Dutch **Autoriteit Persoonsgegevens**, Brazil’s **ANPD**, Canada’s **OPC**, Australia’s **OAIC**). We may request reasonable information to **verify your identity** before acting on a request and will respond **within timelines required by applicable law**.
35
+
36
+ ## 5. Security
37
+
38
+ We apply appropriate technical and organizational measures proportionate to the limited personal data we handle in connection with the repository (e.g., encrypted transport, access controls, limited retention). We do **not** use automated decision-making that produces legal or similarly significant effects.
39
+
40
+ ## 6. Children
41
+
42
+ This project is intended for developers and is **not** directed to children.
43
+
44
+ ## 7. Changes
45
+
46
+ We may update this notice by committing changes to the repository (the commit history indicates the effective date of each version). Material updates may also be summarized in the repository’s release notes or documentation.
47
+
48
+ ## Governing Language
49
+
50
+ This **notice** is drafted in English. Translations may be provided for convenience. In markets where local-language versions are required by law for clarity and fairness, the local-language version controls to the extent required by applicable law; otherwise, the English version controls.
51
+
52
+ **Contact:** TBD until market release
@@ -0,0 +1,49 @@
1
+ # Security Policy — @hellpig/anarchy-shared
2
+
3
+ **Effective date:** TBD until market release
4
+
5
+ **Security Contact:** TBD until market release (email preferred for sensitive reports)
6
+
7
+ ## Scope
8
+
9
+ This policy applies to the open-source project **@hellpig/anarchy-shared** (the “Project”). It is provided for community coordination only and **does not create service levels (SLAs), warranties, or contractual obligations**.
10
+ It covers the Project’s **source code** and our **officially published release artifacts** (e.g., package registries, release archives, documentation sites, **container images**, or **CDN bundles**) that **we** publish. It does **not** cover third-party repackaging, unofficial builds, downstream products, hosting-platform infrastructure, or **commercial editions**.
11
+
12
+ **Technical identifiers (optional):** `@hellpig/anarchy-shared`.
13
+
14
+ ## Reporting (CVD)
15
+
16
+ - **Report:** email **TBD until market release** with steps to reproduce, affected commit/tag, and impact (if known). If possible, include a short patch or mitigation suggestion.
17
+ - **Public disclosure:** please **do not file public issues with exploit details**; coordinate timing with us to allow a fix or mitigation to be available where reasonably possible.
18
+
19
+ ## Handling & Disclosure
20
+
21
+ This is a volunteer-maintained Project. We’ll make a **good-faith effort** to review and prioritize reports; **no timelines are promised**. We may publish an advisory if the issue materially impacts users. There is **no bug bounty** unless explicitly announced.
22
+
23
+ ### Research Guidelines (please follow)
24
+
25
+ - Avoid accessing, modifying, or exfiltrating data you do not own; minimize impact and stop testing if you encounter personal data.
26
+ - Do not perform tests that degrade availability for others (e.g., volumetric DoS).
27
+ - Test only assets we publish through our **official channels** and that are reasonably within this Project’s scope.
28
+ - Vulnerabilities in **third-party platform infrastructure** (e.g., registry/hosting/CDN systems) are **out of scope** unless they result **directly** from our published code or configuration.
29
+ - Comply with applicable law and third-party terms.
30
+
31
+ ## Version Support
32
+
33
+ We generally address issues on **main** and the **latest stable** release. Older releases may not receive fixes; please upgrade.
34
+
35
+ ## Advisories
36
+
37
+ If warranted, we will publish a security note or advisory in the repository or adjacent Project materials (e.g., `SECURITY`, `CHANGELOG`, release notes, or the advisories section). There is **no SLA**.
38
+ Copies of public content may also appear in mirrors, forks, caches, or package registries controlled by others; **we do not control those third-party copies**.
39
+
40
+ ## In / Out of Scope
41
+
42
+ - **In scope:** issues that materially impact the confidentiality, integrity, or availability of the Project’s code or its documented build/update mechanisms, as **we** publish them.
43
+ - **Out of scope:** social engineering, physical attacks, denial-of-service on third-party platforms, vulnerabilities in hosting/store/kernel infrastructure not packaged with the Project, issues in **unofficial forks**, repackaged distributions, or downstream products.
44
+
45
+ ## Safe Harbor
46
+
47
+ We welcome good-faith research that avoids privacy violations and service disruption. If you comply with this policy and act in good faith, we **do not intend** to pursue legal action **solely** for your security research on this Project. This policy does not authorize unlawful activity or override third-party terms, and it does not protect actions that cause harm or data loss.
48
+
49
+ **Governing Law:** subject to mandatory law, matters under this policy are handled under **The Netherlands/Amsterdam**.
@@ -0,0 +1,56 @@
1
+ # Third-Party Licenses
2
+
3
+ ## Application: @hellpig/anarchy-shared
4
+
5
+ Production dependencies (including transition dependencies): 1
6
+
7
+ ---
8
+
9
+ ## bowser@2.12.1
10
+
11
+ **License:** MIT
12
+
13
+ **Repository:** git+https://github.com/lancedikson/bowser.git
14
+
15
+ **URL:** https://github.com/lancedikson/bowser
16
+
17
+ **Publisher:** Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)
18
+
19
+ Copyright 2015, Dustin Diaz (the "Original Author")
20
+ All rights reserved.
21
+
22
+ MIT License
23
+
24
+ Permission is hereby granted, free of charge, to any person
25
+ obtaining a copy of this software and associated documentation
26
+ files (the "Software"), to deal in the Software without
27
+ restriction, including without limitation the rights to use,
28
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
29
+ copies of the Software, and to permit persons to whom the
30
+ Software is furnished to do so, subject to the following
31
+ conditions:
32
+
33
+ The above copyright notice and this permission notice shall be
34
+ included in all copies or substantial portions of the Software.
35
+
36
+ Distributions of all or part of the Software intended to be used
37
+ by the recipients as they would use the unmodified Software,
38
+ containing modifications that substantially alter, remove, or
39
+ disable functionality of the Software, outside of the documented
40
+ configuration mechanisms provided by the Software, shall be
41
+ modified such that the Original Author's bug reporting email
42
+ addresses and urls are either replaced with the contact information
43
+ of the parties responsible for the changes, or removed entirely.
44
+
45
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
46
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
47
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
48
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
49
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
50
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
51
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
52
+ OTHER DEALINGS IN THE SOFTWARE.
53
+
54
+ Except where noted, this license applies to any and all software
55
+ programs and associated documentation files created by the
56
+ Original Author, when distributed with the Software.
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@hellpig/anarchy-shared",
3
+ "author": "S. Panfilov",
4
+ "private": false,
5
+ "version": "1.4.4",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git@github.com:se-panfilov/anarchy-engine.git",
10
+ "directory": "packages/anarchy-shared"
11
+ },
12
+ "homepage": "https://github.com/se-panfilov/anarchy-engine/tree/main/packages/anarchy-shared#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/se-panfilov/anarchy-engine/issues"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "sideEffects": false,
20
+ "license": "MIT",
21
+ "description": "Anarchy-shared – a library with shared utilities and scripts for Anarchy Engine.",
22
+ "keywords": [
23
+ "anarchy",
24
+ "anarchy-engine",
25
+ "anarchy-shared"
26
+ ],
27
+ "files": [
28
+ "./legal/**",
29
+ "CHANGELOG.md",
30
+ "NOTICE.md",
31
+ "LICENSE",
32
+ "README.md",
33
+ "dist/"
34
+ ],
35
+ "scripts": {
36
+ "generate:legal": "npm run generate:legal:3rd-party-licenses && npm run generate:legal:notice && npm run generate:legal:files && npm run generate:legal:sbom",
37
+ "generate:legal:3rd-party-licenses": "npm run -w @hellpig/anarchy-legal generate:licenses -- --workspace packages/anarchy-shared --out ../../packages/anarchy-shared/legal/THIRD_PARTY_LICENSES.md",
38
+ "generate:legal:files": "npm run -w @hellpig/anarchy-legal generate:files -- --workspace packages/anarchy-shared --out ../../packages/anarchy-shared",
39
+ "generate:legal:notice": "npm run -w @hellpig/anarchy-legal generate:notice -- --audit --strict --workspace packages/anarchy-shared --source ../../packages/anarchy-shared/legal/THIRD_PARTY_LICENSES.md --out ../../packages/anarchy-shared/legal/NOTICE.md",
40
+ "generate:legal:sbom": "npm sbom --sbom-format=cyclonedx --package-lock-only --omit=dev > ./compliance/sbom/sbom.cdx.json",
41
+ "lint": "eslint ./src",
42
+ "lint:fix": "npm run lint -- --fix",
43
+ "pr:guard:ci": "npm run ts:check && npm run lint && npm run unit:coverage",
44
+ "prettier": "prettier --write .",
45
+ "prettier:check": "prettier --check .",
46
+ "ts:check": "tsc --noEmit",
47
+ "ts:check:watch": "tsc --watch --noEmit",
48
+ "unit": "vitest run",
49
+ "unit:coverage": "vitest run --coverage",
50
+ "unit:coverage:ui": "vitest --ui",
51
+ "unit:watch": "vitest"
52
+ },
53
+ "dependencies": {
54
+ "bowser": "2.12.1"
55
+ },
56
+ "devDependencies": {
57
+ "fast-glob": "3.3.3",
58
+ "fs-extra": "11.3.2",
59
+ "png-to-ico": "3.0.1",
60
+ "sharp": "0.34.4",
61
+ "svgo": "4.0.0",
62
+ "ts-json-schema-generator": "2.4.0"
63
+ }
64
+ }