mano-coding 0.1.25 → 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;
@@ -41561,7 +41575,7 @@ function createCacheCommand(cliVersion) {
41561
41575
  return cmd;
41562
41576
  }
41563
41577
  function getUserDataDir() {
41564
- 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");
41565
41579
  }
41566
41580
  function parsePositiveInt(value, name) {
41567
41581
  if (value === void 0) return void 0;
@@ -41764,6 +41778,7 @@ async function executeClean(opts, cliVersion) {
41764
41778
  }
41765
41779
  if (cleanRegistry && !dryRun) await updateCache.clear();
41766
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 });
41767
41782
  if (json) {
41768
41783
  emitSuccessJson("cache clean", { dryRun, cleanedLeases: 0, clearedUpdateCache: cleanRegistry, clearedAudit: cleanAudit, message: t("cache.noInstallationsClean") });
41769
41784
  } else {
@@ -41779,6 +41794,7 @@ async function executeClean(opts, cliVersion) {
41779
41794
  }
41780
41795
  if (cleanRegistry && !dryRun) await updateCache.clear();
41781
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 });
41782
41798
  if (json) {
41783
41799
  emitSuccessJson("cache clean", { dryRun, cleanedLeases: 0, clearedUpdateCache: cleanRegistry, clearedAudit: cleanAudit, message: t("cache.noInstallationsClean") });
41784
41800
  } else {
@@ -41822,8 +41838,9 @@ async function executeClean(opts, cliVersion) {
41822
41838
  const cleaned = await cleanExpiredLeases(userDataDir, owner, version);
41823
41839
  totalCleaned += cleaned;
41824
41840
  }
41825
- if (cleanRegistry) await updateCache.clear();
41826
- 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 });
41827
41844
  if (json) {
41828
41845
  emitSuccessJson("cache clean", { dryRun: false, cleanedLeases: totalCleaned, clearedUpdateCache: cleanRegistry, clearedAudit: cleanAudit });
41829
41846
  } else {
@@ -42260,7 +42277,7 @@ import { createRequire as createRequire2 } from "node:module";
42260
42277
  import { readFileSync as readFileSync4 } from "node:fs";
42261
42278
  import { fileURLToPath as fileURLToPath5 } from "node:url";
42262
42279
  function resolveVersion() {
42263
- if (true) return "0.1.25";
42280
+ if (true) return "0.1.26";
42264
42281
  const candidates = [
42265
42282
  new URL("../package.json", import.meta.url),
42266
42283
  new URL("../../package.json", import.meta.url),
@@ -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.25",
3
+ "version": "0.1.26",
4
4
  "description": "Mano Coding CLI and toolchain",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -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 },