mano-coding 0.1.24 → 0.1.26

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/dist/bin.js CHANGED
@@ -24007,9 +24007,10 @@ var init_npm_resolver = __esm({
24007
24007
  init_errors3();
24008
24008
  init_registry_client();
24009
24009
  NpmResolver = class {
24010
- constructor(registryClient, manifestLoader) {
24010
+ constructor(registryClient, manifestLoader, gitResolver) {
24011
24011
  this.registryClient = registryClient;
24012
24012
  this.manifestLoader = manifestLoader;
24013
+ this.gitResolver = gitResolver;
24013
24014
  }
24014
24015
  supports(source) {
24015
24016
  return source.type === "npm";
@@ -24018,6 +24019,19 @@ var init_npm_resolver = __esm({
24018
24019
  const entry = await this.registryClient.getEntry(packageId, { offline: context.offline });
24019
24020
  const release = selectRelease(entry, versionRange);
24020
24021
  const sourceObj = typeof release.source === "object" && release.source !== null ? release.source : void 0;
24022
+ if (sourceObj && sourceObj.type === "git") {
24023
+ if (this.gitResolver) {
24024
+ return this.gitResolver.resolve(packageId, release.version, {
24025
+ ...context,
24026
+ source: {
24027
+ type: "git",
24028
+ url: sourceObj.url,
24029
+ ref: sourceObj.ref ?? sourceObj.commit ?? (release.version ? `v${release.version}` : void 0),
24030
+ subdirectory: sourceObj.subdirectory
24031
+ }
24032
+ });
24033
+ }
24034
+ }
24021
24035
  if (!sourceObj || sourceObj.type !== "npm") {
24022
24036
  throw new ResolveError(
24023
24037
  `Registry Release for ${packageId}@${release.version} \u4E0D\u662F npm \u6E90 (\u5B9E\u9645: ${typeof release.source === "string" ? release.source : sourceObj?.type})`,
@@ -38104,7 +38118,7 @@ var init_service_locator = __esm({
38104
38118
  const local = new LocalResolver();
38105
38119
  const git = new GitResolver();
38106
38120
  this._gitResolver = git;
38107
- const npm = new NpmResolver(this.getRegistryClient(), this.getNpmManifestLoader());
38121
+ const npm = new NpmResolver(this.getRegistryClient(), this.getNpmManifestLoader(), git);
38108
38122
  this._resolver = new CompositeResolver([local, git, npm]);
38109
38123
  }
38110
38124
  return this._resolver;
@@ -38977,7 +38991,8 @@ var init_spinner = __esm({
38977
38991
  this.stop();
38978
38992
  if (this.enabled) {
38979
38993
  const reset = "\x1B[0m";
38980
- const output = `${color}${symbol}${reset} ${redactString(text)}
38994
+ const cleanText = text.replace(/^[✔✖⚠ℹ\s]+/, "");
38995
+ const output = `${color}${symbol}${reset} ${redactString(cleanText)}
38981
38996
  `;
38982
38997
  process.stdout.write(output);
38983
38998
  }
@@ -41560,7 +41575,7 @@ function createCacheCommand(cliVersion) {
41560
41575
  return cmd;
41561
41576
  }
41562
41577
  function getUserDataDir() {
41563
- return process.env["AICODING_USER_DATA"] ?? join19(homedir3(), ".aicoding");
41578
+ return process.env["MANO_USER_DATA"] ?? process.env["AICODING_USER_DATA"] ?? join19(homedir3(), ".mano-coding");
41564
41579
  }
41565
41580
  function parsePositiveInt(value, name) {
41566
41581
  if (value === void 0) return void 0;
@@ -41763,6 +41778,7 @@ async function executeClean(opts, cliVersion) {
41763
41778
  }
41764
41779
  if (cleanRegistry && !dryRun) await updateCache.clear();
41765
41780
  if (cleanAudit && !dryRun) await rm5(join19(userDataDir, "audit"), { recursive: true, force: true });
41781
+ if (!dryRun) await rm5(join19(userDataDir, "cache"), { recursive: true, force: true });
41766
41782
  if (json) {
41767
41783
  emitSuccessJson("cache clean", { dryRun, cleanedLeases: 0, clearedUpdateCache: cleanRegistry, clearedAudit: cleanAudit, message: t("cache.noInstallationsClean") });
41768
41784
  } else {
@@ -41778,6 +41794,7 @@ async function executeClean(opts, cliVersion) {
41778
41794
  }
41779
41795
  if (cleanRegistry && !dryRun) await updateCache.clear();
41780
41796
  if (cleanAudit && !dryRun) await rm5(join19(userDataDir, "audit"), { recursive: true, force: true });
41797
+ if (!dryRun) await rm5(join19(userDataDir, "cache"), { recursive: true, force: true });
41781
41798
  if (json) {
41782
41799
  emitSuccessJson("cache clean", { dryRun, cleanedLeases: 0, clearedUpdateCache: cleanRegistry, clearedAudit: cleanAudit, message: t("cache.noInstallationsClean") });
41783
41800
  } else {
@@ -41821,8 +41838,9 @@ async function executeClean(opts, cliVersion) {
41821
41838
  const cleaned = await cleanExpiredLeases(userDataDir, owner, version);
41822
41839
  totalCleaned += cleaned;
41823
41840
  }
41824
- if (cleanRegistry) await updateCache.clear();
41825
- if (cleanAudit) await rm5(join19(userDataDir, "audit"), { recursive: true, force: true });
41841
+ if (cleanRegistry && !dryRun) await updateCache.clear();
41842
+ if (cleanAudit && !dryRun) await rm5(join19(userDataDir, "audit"), { recursive: true, force: true });
41843
+ if (!dryRun) await rm5(join19(userDataDir, "cache"), { recursive: true, force: true });
41826
41844
  if (json) {
41827
41845
  emitSuccessJson("cache clean", { dryRun: false, cleanedLeases: totalCleaned, clearedUpdateCache: cleanRegistry, clearedAudit: cleanAudit });
41828
41846
  } else {
@@ -42259,7 +42277,7 @@ import { createRequire as createRequire2 } from "node:module";
42259
42277
  import { readFileSync as readFileSync4 } from "node:fs";
42260
42278
  import { fileURLToPath as fileURLToPath5 } from "node:url";
42261
42279
  function resolveVersion() {
42262
- if (true) return "0.1.24";
42280
+ if (true) return "0.1.26";
42263
42281
  const candidates = [
42264
42282
  new URL("../package.json", import.meta.url),
42265
42283
  new URL("../../package.json", import.meta.url),
@@ -35,6 +35,11 @@
35
35
  "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
36
36
  "maxLength": 64
37
37
  },
38
+ "name": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 100
42
+ },
38
43
  "command": {
39
44
  "type": "string",
40
45
  "minLength": 1,
@@ -71,13 +71,17 @@
71
71
  "replacement": { "$ref": "#/$defs/packageName" }
72
72
  }
73
73
  },
74
+ "dateTime": {
75
+ "type": "string",
76
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:[T ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$"
77
+ },
74
78
  "release": {
75
79
  "type": "object",
76
80
  "additionalProperties": true,
77
81
  "required": ["version", "source"],
78
82
  "properties": {
79
83
  "version": { "$ref": "#/$defs/semver" },
80
- "publishedAt": { "type": "string", "format": "date-time" },
84
+ "publishedAt": { "$ref": "#/$defs/dateTime" },
81
85
  "source": {
82
86
  "oneOf": [
83
87
  { "type": "string", "minLength": 1 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mano-coding",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Mano Coding CLI and toolchain",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -35,6 +35,11 @@
35
35
  "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
36
36
  "maxLength": 64
37
37
  },
38
+ "name": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 100
42
+ },
38
43
  "command": {
39
44
  "type": "string",
40
45
  "minLength": 1,
@@ -71,13 +71,17 @@
71
71
  "replacement": { "$ref": "#/$defs/packageName" }
72
72
  }
73
73
  },
74
+ "dateTime": {
75
+ "type": "string",
76
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:[T ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$"
77
+ },
74
78
  "release": {
75
79
  "type": "object",
76
80
  "additionalProperties": true,
77
81
  "required": ["version", "source"],
78
82
  "properties": {
79
83
  "version": { "$ref": "#/$defs/semver" },
80
- "publishedAt": { "type": "string", "format": "date-time" },
84
+ "publishedAt": { "$ref": "#/$defs/dateTime" },
81
85
  "source": {
82
86
  "oneOf": [
83
87
  { "type": "string", "minLength": 1 },