com.elestrago.unity.package-tools 2.2.1 → 2.2.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/CAHNGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## [2.2.2](https://gitlab.com/elestrago-pkg/package-tool/-/tags/2.2.2)
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Simplified the `Claude Skills` post-import hook to rely on self-deletion for deduplication, removing the `SessionState` guards so a re-import within the same Unity session runs again instead of being silently skipped.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
5
13
|
## [2.2.1](https://gitlab.com/elestrago-pkg/package-tool/-/tags/2.2.1)
|
|
6
14
|
|
|
7
15
|
### Added
|
|
@@ -7,10 +7,12 @@ using UnityEngine;
|
|
|
7
7
|
namespace PackageTool.Samples.ClaudeSkills
|
|
8
8
|
{
|
|
9
9
|
/// <summary>
|
|
10
|
-
/// Runs
|
|
11
|
-
///
|
|
12
|
-
/// prompting before overwriting an existing skill,
|
|
13
|
-
/// the
|
|
10
|
+
/// Runs after the "Claude Skills" sample is imported into a consumer project. Walks every skill
|
|
11
|
+
/// subfolder next to this script, copies it to <c><project>/.claude/skills/<name></c>,
|
|
12
|
+
/// prompting before overwriting an existing skill, then deletes the imported sample folder
|
|
13
|
+
/// (including this script itself). Self-deletion is the only dedup mechanism: once gone the type
|
|
14
|
+
/// can't trigger again until the consumer re-imports the sample, which is exactly when a fresh
|
|
15
|
+
/// run is wanted.
|
|
14
16
|
/// </summary>
|
|
15
17
|
[InitializeOnLoad]
|
|
16
18
|
internal static class ClaudeSkillsPostImport
|
|
@@ -20,8 +22,6 @@ namespace PackageTool.Samples.ClaudeSkills
|
|
|
20
22
|
private const string EDITOR_FOLDER_NAME = "Editor";
|
|
21
23
|
private const string SCRIPT_FILE_NAME = "ClaudeSkillsPostImport.cs";
|
|
22
24
|
private const string DIALOG_TITLE = "Claude Skills";
|
|
23
|
-
private const string SESSION_GUARD_KEY_PREFIX = "PackageTool.ClaudeSkillsPostImport.Processed:";
|
|
24
|
-
private const string SESSION_RUNNING_KEY = "PackageTool.ClaudeSkillsPostImport.Running";
|
|
25
25
|
|
|
26
26
|
static ClaudeSkillsPostImport()
|
|
27
27
|
{
|
|
@@ -30,27 +30,15 @@ namespace PackageTool.Samples.ClaudeSkills
|
|
|
30
30
|
|
|
31
31
|
private static void Run()
|
|
32
32
|
{
|
|
33
|
-
// Re-entrancy guard. Multiple copies of this type (e.g. in side-by-side sample imports
|
|
34
|
-
// each shipping their own assembly) would each schedule a delayCall; without this guard
|
|
35
|
-
// they would race on the same sample folders and double-prompt the user.
|
|
36
|
-
if (SessionState.GetBool(SESSION_RUNNING_KEY, false))
|
|
37
|
-
return;
|
|
38
|
-
SessionState.SetBool(SESSION_RUNNING_KEY, true);
|
|
39
|
-
|
|
40
33
|
try
|
|
41
34
|
{
|
|
42
35
|
foreach (var sampleRootAssetPath in FindSampleRootAssetPaths())
|
|
43
36
|
{
|
|
44
|
-
// Only
|
|
45
|
-
//
|
|
37
|
+
// Only act on imported sample locations; never touch the source folder inside a
|
|
38
|
+
// package author's project.
|
|
46
39
|
if (!sampleRootAssetPath.StartsWith("Assets/Samples/", StringComparison.Ordinal))
|
|
47
40
|
continue;
|
|
48
41
|
|
|
49
|
-
var guardKey = SESSION_GUARD_KEY_PREFIX + sampleRootAssetPath;
|
|
50
|
-
if (SessionState.GetBool(guardKey, false))
|
|
51
|
-
continue;
|
|
52
|
-
SessionState.SetBool(guardKey, true);
|
|
53
|
-
|
|
54
42
|
ProcessSample(sampleRootAssetPath);
|
|
55
43
|
}
|
|
56
44
|
}
|
|
@@ -58,10 +46,6 @@ namespace PackageTool.Samples.ClaudeSkills
|
|
|
58
46
|
{
|
|
59
47
|
Debug.LogErrorFormat("{0} Post-import failed: {1}", LOG_PREFIX, e);
|
|
60
48
|
}
|
|
61
|
-
finally
|
|
62
|
-
{
|
|
63
|
-
SessionState.SetBool(SESSION_RUNNING_KEY, false);
|
|
64
|
-
}
|
|
65
49
|
}
|
|
66
50
|
|
|
67
51
|
private static IEnumerable<string> FindSampleRootAssetPaths()
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.elestrago.unity.package-tools",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"displayName": "Package Tool",
|
|
5
5
|
"description": "Tool for create unity packages",
|
|
6
6
|
"category": "unity",
|
|
7
7
|
"unity": "2021.3",
|
|
8
8
|
"homepage": "https://gitlab.com/elestrago-pkg/package-tool",
|
|
9
|
-
"documentationUrl": "https://gitlab.com/elestrago-pkg/package-tool/-/blob/2.2.
|
|
10
|
-
"changelogUrl": "https://gitlab.com/elestrago-pkg/package-tool/-/blob/2.2.
|
|
11
|
-
"licensesUrl": "https://gitlab.com/elestrago-pkg/package-tool/-/blob/2.2.
|
|
9
|
+
"documentationUrl": "https://gitlab.com/elestrago-pkg/package-tool/-/blob/2.2.2/README.md",
|
|
10
|
+
"changelogUrl": "https://gitlab.com/elestrago-pkg/package-tool/-/blob/2.2.2/CHANGELOG.md",
|
|
11
|
+
"licensesUrl": "https://gitlab.com/elestrago-pkg/package-tool/-/blob/2.2.2/LICENSE",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"unity",
|