ossplate 0.1.1 → 0.1.2
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/README.md +2 -0
- package/bin/darwin-arm64/ossplate +0 -0
- package/package.json +1 -1
- package/scaffold/.github/workflows/publish-npm.yml +7 -2
- package/scaffold/.github/workflows/publish.yml +8 -3
- package/scaffold/README.md +1 -1
- package/scaffold/assets/illustrations/armour05platemail.png +0 -0
- package/scaffold/core-rs/Cargo.lock +1 -1
- package/scaffold/core-rs/Cargo.toml +1 -1
- package/scaffold/core-rs/src/main.rs +19 -2
- package/scaffold/wrapper-js/README.md +2 -0
- package/scaffold/wrapper-js/bin/darwin-arm64/ossplate +0 -0
- package/scaffold/wrapper-js/package-lock.json +2 -2
- package/scaffold/wrapper-js/package.json +1 -1
- package/scaffold/wrapper-py/README.md +2 -0
- package/scaffold/wrapper-py/pyproject.toml +1 -1
- package/scaffold/wrapper-py/src/ossplate/bin/darwin-arm64/ossplate +0 -0
- package/scaffold/assets/illustrations/chestplate.svg +0 -46
package/README.md
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -44,8 +44,13 @@ jobs:
|
|
|
44
44
|
env:
|
|
45
45
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
46
46
|
run: |
|
|
47
|
+
logfile=$(mktemp)
|
|
48
|
+
cleanup() {
|
|
49
|
+
rm -f "$logfile"
|
|
50
|
+
}
|
|
51
|
+
trap cleanup EXIT
|
|
47
52
|
set +e
|
|
48
|
-
npm publish --access public --provenance 2>&1 | tee
|
|
53
|
+
npm publish --access public --provenance 2>&1 | tee "$logfile"
|
|
49
54
|
status=${PIPESTATUS[0]}
|
|
50
55
|
set -e
|
|
51
56
|
if [ "$status" -eq 0 ]; then
|
|
@@ -56,7 +61,7 @@ jobs:
|
|
|
56
61
|
echo "::error title=npm::OIDC publish failed and NPM_TOKEN is not configured."
|
|
57
62
|
exit "$status"
|
|
58
63
|
fi
|
|
59
|
-
if grep -qiE "already exists|cannot publish over|previously published"
|
|
64
|
+
if grep -qiE "already exists|cannot publish over|previously published" "$logfile"; then
|
|
60
65
|
echo "::notice title=npm::package version already exists; skipping."
|
|
61
66
|
exit 0
|
|
62
67
|
fi
|
|
@@ -74,23 +74,28 @@ jobs:
|
|
|
74
74
|
env:
|
|
75
75
|
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token || secrets.CARGO_TOKEN }}
|
|
76
76
|
run: |
|
|
77
|
+
logfile=$(mktemp)
|
|
78
|
+
cleanup() {
|
|
79
|
+
rm -f "$logfile"
|
|
80
|
+
}
|
|
81
|
+
trap cleanup EXIT
|
|
77
82
|
if [ -n "${{ steps.auth.outputs.token }}" ]; then
|
|
78
83
|
echo "::notice title=cargo::using crates.io OIDC token from trusted publishing."
|
|
79
84
|
else
|
|
80
85
|
echo "::notice title=cargo::OIDC token unavailable; falling back to CARGO_TOKEN secret."
|
|
81
86
|
fi
|
|
82
87
|
set +e
|
|
83
|
-
cargo publish 2>&1 | tee
|
|
88
|
+
cargo publish 2>&1 | tee "$logfile"
|
|
84
89
|
status=${PIPESTATUS[0]}
|
|
85
90
|
set -e
|
|
86
91
|
if [ "$status" -eq 0 ]; then
|
|
87
92
|
exit 0
|
|
88
93
|
fi
|
|
89
|
-
if grep -q "status 429 Too Many Requests"
|
|
94
|
+
if grep -q "status 429 Too Many Requests" "$logfile"; then
|
|
90
95
|
echo "::warning title=cargo::crates.io rate limit hit. Treating this publish attempt as non-blocking."
|
|
91
96
|
exit 0
|
|
92
97
|
fi
|
|
93
|
-
if grep -qi "already exists on crates.io index"
|
|
98
|
+
if grep -qi "already exists on crates.io index" "$logfile"; then
|
|
94
99
|
echo "::notice title=cargo::crate version already exists; skipping."
|
|
95
100
|
exit 0
|
|
96
101
|
fi
|
package/scaffold/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Build one project, ship it everywhere.
|
|
5
5
|
<!-- ossplate:readme-identity:end -->
|
|
6
6
|
|
|
7
|
-

|
|
8
8
|
|
|
9
9
|
`ossplate` helps you start and maintain a project that ships the same CLI through Rust, npm, and PyPI.
|
|
10
10
|
|
|
Binary file
|
|
@@ -1041,9 +1041,16 @@ fn validate_wrapper_readme(
|
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
fn render_wrapper_readme(_language: &str, config: &ToolConfig) -> String {
|
|
1044
|
+
let image_url = github_raw_url(
|
|
1045
|
+
&config.project.repository,
|
|
1046
|
+
"dev",
|
|
1047
|
+
"assets/illustrations/armour05platemail.png",
|
|
1048
|
+
);
|
|
1044
1049
|
format!(
|
|
1045
1050
|
r#"# {name}
|
|
1046
1051
|
|
|
1052
|
+

|
|
1053
|
+
|
|
1047
1054
|
`{command}` helps you start and maintain a project that ships the same CLI through Rust, npm, and PyPI.
|
|
1048
1055
|
|
|
1049
1056
|
Use it to:
|
|
@@ -1071,6 +1078,7 @@ Learn more:
|
|
|
1071
1078
|
"#,
|
|
1072
1079
|
name = config.project.name,
|
|
1073
1080
|
command = config.packages.command,
|
|
1081
|
+
image_url = image_url,
|
|
1074
1082
|
)
|
|
1075
1083
|
}
|
|
1076
1084
|
|
|
@@ -1081,6 +1089,15 @@ fn render_root_readme_identity(config: &ToolConfig) -> String {
|
|
|
1081
1089
|
)
|
|
1082
1090
|
}
|
|
1083
1091
|
|
|
1092
|
+
fn github_raw_url(repository: &str, branch: &str, path: &str) -> String {
|
|
1093
|
+
let trimmed = repository.trim_end_matches('/');
|
|
1094
|
+
if let Some(rest) = trimmed.strip_prefix("https://github.com/") {
|
|
1095
|
+
format!("https://raw.githubusercontent.com/{rest}/{branch}/{path}")
|
|
1096
|
+
} else {
|
|
1097
|
+
format!("{trimmed}/{path}")
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1084
1101
|
fn validate_workflow_name(
|
|
1085
1102
|
path: &str,
|
|
1086
1103
|
expected_name: &str,
|
|
@@ -1405,7 +1422,7 @@ mod tests {
|
|
|
1405
1422
|
target.join("core-rs/Cargo.toml"),
|
|
1406
1423
|
r#"[package]
|
|
1407
1424
|
name = "bad-core"
|
|
1408
|
-
version = "0.1.
|
|
1425
|
+
version = "0.1.2"
|
|
1409
1426
|
"#,
|
|
1410
1427
|
)
|
|
1411
1428
|
.unwrap();
|
|
@@ -1541,7 +1558,7 @@ command = "ossplate"
|
|
|
1541
1558
|
root.join("core-rs/Cargo.toml"),
|
|
1542
1559
|
r#"[package]
|
|
1543
1560
|
name = "ossplate"
|
|
1544
|
-
version = "0.1.
|
|
1561
|
+
version = "0.1.2"
|
|
1545
1562
|
edition = "2021"
|
|
1546
1563
|
authors = ["Stef <stefdevscore@github.com>"]
|
|
1547
1564
|
description = "A practical baseline for shipping one project across Cargo, npm, and PyPI without starting from scratch every time."
|
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ossplate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "ossplate",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.2",
|
|
10
10
|
"license": "Unlicense",
|
|
11
11
|
"bin": {
|
|
12
12
|
"ossplate": "bin/ossplate.js"
|
|
Binary file
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 420" role="img" aria-labelledby="title desc">
|
|
2
|
-
<title id="title">Ossplate chestplate illustration</title>
|
|
3
|
-
<desc id="desc">A bronze chestplate with shoulder guards on a warm background.</desc>
|
|
4
|
-
<defs>
|
|
5
|
-
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
6
|
-
<stop offset="0%" stop-color="#f7ecdd"/>
|
|
7
|
-
<stop offset="100%" stop-color="#dcb88b"/>
|
|
8
|
-
</linearGradient>
|
|
9
|
-
<linearGradient id="metal" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
10
|
-
<stop offset="0%" stop-color="#ddaf68"/>
|
|
11
|
-
<stop offset="50%" stop-color="#b77735"/>
|
|
12
|
-
<stop offset="100%" stop-color="#7b491c"/>
|
|
13
|
-
</linearGradient>
|
|
14
|
-
<linearGradient id="rim" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
15
|
-
<stop offset="0%" stop-color="#fff0bf"/>
|
|
16
|
-
<stop offset="100%" stop-color="#a05d24"/>
|
|
17
|
-
</linearGradient>
|
|
18
|
-
<linearGradient id="highlight" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
19
|
-
<stop offset="0%" stop-color="#fff8de" stop-opacity="0.95"/>
|
|
20
|
-
<stop offset="100%" stop-color="#fff8de" stop-opacity="0"/>
|
|
21
|
-
</linearGradient>
|
|
22
|
-
<filter id="shadow" x="-20%" y="-20%" width="140%" height="160%">
|
|
23
|
-
<feDropShadow dx="0" dy="16" stdDeviation="12" flood-color="#673d18" flood-opacity="0.28"/>
|
|
24
|
-
</filter>
|
|
25
|
-
</defs>
|
|
26
|
-
|
|
27
|
-
<rect width="720" height="420" fill="url(#bg)"/>
|
|
28
|
-
<circle cx="110" cy="84" r="58" fill="#fff7de" opacity="0.4"/>
|
|
29
|
-
<circle cx="607" cy="314" r="76" fill="#a86e33" opacity="0.12"/>
|
|
30
|
-
|
|
31
|
-
<g filter="url(#shadow)" transform="translate(150 28)">
|
|
32
|
-
<path d="M151 46c12-18 27-29 59-34 16-2 42-3 59-3s43 1 59 3c32 5 47 16 59 34l24 35c7 10 4 24-6 31l-22 16c-8 6-19 7-29 2l-27-13v90c0 60-26 102-58 129-32 26-64 39-91 45-27-6-59-19-91-45-32-27-58-69-58-129v-90l-27 13c-10 5-21 4-29-2l-22-16c-10-7-13-21-6-31z" fill="url(#metal)"/>
|
|
33
|
-
<path d="M151 46c12-18 27-29 59-34 16-2 42-3 59-3s43 1 59 3c32 5 47 16 59 34l24 35c7 10 4 24-6 31l-22 16c-8 6-19 7-29 2l-27-13v90c0 60-26 102-58 129-32 26-64 39-91 45-27-6-59-19-91-45-32-27-58-69-58-129v-90l-27 13c-10 5-21 4-29-2l-22-16c-10-7-13-21-6-31z" fill="none" stroke="#6b4118" stroke-width="10" stroke-linejoin="round"/>
|
|
34
|
-
<path d="M210 52c11-14 26-20 44-22 15-2 29-2 46-2s31 0 46 2c18 2 33 8 44 22l15 20c-41 18-92 27-105 29-13-2-64-11-105-29z" fill="#c78741" opacity="0.88"/>
|
|
35
|
-
<path d="M126 74l32 16c10 5 21 4 30-2l20-13c18 9 43 16 72 20v204c-56-15-121-61-121-158V93c0-8-12-13-33-19z" fill="#845022" opacity="0.34"/>
|
|
36
|
-
<path d="M474 74l-32 16c-10 5-21 4-30-2l-20-13c-18 9-43 16-72 20v204c56-15 121-61 121-158V93c0-8 12-13 33-19z" fill="#f0c27a" opacity="0.2"/>
|
|
37
|
-
<path d="M300 92v214" stroke="#6b4118" stroke-width="8" stroke-linecap="round" opacity="0.82"/>
|
|
38
|
-
<path d="M196 134c29 12 65 18 104 18s75-6 104-18" stroke="#6b4118" stroke-width="7" stroke-linecap="round" opacity="0.72"/>
|
|
39
|
-
<path d="M206 215c24 9 56 14 94 14s70-5 94-14" stroke="#6b4118" stroke-width="6" stroke-linecap="round" opacity="0.62"/>
|
|
40
|
-
<path d="M235 42c19 10 40 16 65 19-13 10-23 24-29 41-25-4-48-12-68-25 7-16 17-27 32-35z" fill="url(#highlight)" opacity="0.72"/>
|
|
41
|
-
<path d="M300 61c25-3 46-9 65-19 15 8 25 19 32 35-20 13-43 21-68 25-6-17-16-31-29-41z" fill="url(#highlight)" opacity="0.5"/>
|
|
42
|
-
<path d="M147 62l-41 58c-5 7-3 17 4 22l18 13c5 4 12 4 18 1l41-19-9-53c-2-11-14-21-31-22z" fill="url(#rim)" opacity="0.95"/>
|
|
43
|
-
<path d="M453 62l41 58c5 7 3 17-4 22l-18 13c-5 4-12 4-18 1l-41-19 9-53c2-11 14-21 31-22z" fill="url(#rim)" opacity="0.95"/>
|
|
44
|
-
<path d="M214 310c26 14 56 23 86 28 30-5 60-14 86-28" stroke="#f3d39a" stroke-width="6" stroke-linecap="round" opacity="0.45"/>
|
|
45
|
-
</g>
|
|
46
|
-
</svg>
|