@h-rig/runtime 0.0.6-alpha.16 → 0.0.6-alpha.18

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/src/index.js CHANGED
@@ -13,7 +13,6 @@ var RIG_ARTIFACTS_DIRNAME = "artifacts";
13
13
  function resolveNearestRigProjectRoot(startDir) {
14
14
  let current = resolve(startDir);
15
15
  let weakMarkerCandidate = null;
16
- let gitCandidate = null;
17
16
  let projectCandidate = null;
18
17
  for (;; ) {
19
18
  const hasDefinition = existsSync(resolve(current, RIG_DEFINITION_DIRNAME));
@@ -25,15 +24,15 @@ function resolveNearestRigProjectRoot(startDir) {
25
24
  if ((hasDefinition || hasState || hasConfig) && weakMarkerCandidate === null) {
26
25
  weakMarkerCandidate = current;
27
26
  }
28
- if (hasGit && gitCandidate === null) {
29
- gitCandidate = current;
30
- }
31
- if (hasControlPlane || hasConfig || hasTaskConfig) {
27
+ if ((hasControlPlane || hasConfig || hasTaskConfig) && projectCandidate === null) {
32
28
  projectCandidate = current;
33
29
  }
30
+ if (hasGit) {
31
+ return projectCandidate ?? current;
32
+ }
34
33
  const parent = resolve(current, "..");
35
34
  if (parent === current) {
36
- return projectCandidate ?? gitCandidate ?? weakMarkerCandidate ?? resolve(startDir);
35
+ return projectCandidate ?? weakMarkerCandidate ?? resolve(startDir);
37
36
  }
38
37
  current = parent;
39
38
  }
@@ -8,7 +8,6 @@ var RIG_ARTIFACTS_DIRNAME = "artifacts";
8
8
  function resolveNearestRigProjectRoot(startDir) {
9
9
  let current = resolve(startDir);
10
10
  let weakMarkerCandidate = null;
11
- let gitCandidate = null;
12
11
  let projectCandidate = null;
13
12
  for (;; ) {
14
13
  const hasDefinition = existsSync(resolve(current, RIG_DEFINITION_DIRNAME));
@@ -20,15 +19,15 @@ function resolveNearestRigProjectRoot(startDir) {
20
19
  if ((hasDefinition || hasState || hasConfig) && weakMarkerCandidate === null) {
21
20
  weakMarkerCandidate = current;
22
21
  }
23
- if (hasGit && gitCandidate === null) {
24
- gitCandidate = current;
25
- }
26
- if (hasControlPlane || hasConfig || hasTaskConfig) {
22
+ if ((hasControlPlane || hasConfig || hasTaskConfig) && projectCandidate === null) {
27
23
  projectCandidate = current;
28
24
  }
25
+ if (hasGit) {
26
+ return projectCandidate ?? current;
27
+ }
29
28
  const parent = resolve(current, "..");
30
29
  if (parent === current) {
31
- return projectCandidate ?? gitCandidate ?? weakMarkerCandidate ?? resolve(startDir);
30
+ return projectCandidate ?? weakMarkerCandidate ?? resolve(startDir);
32
31
  }
33
32
  current = parent;
34
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/runtime",
3
- "version": "0.0.6-alpha.16",
3
+ "version": "0.0.6-alpha.18",
4
4
  "type": "module",
5
5
  "description": "Rig package",
6
6
  "license": "UNLICENSED",
@@ -64,11 +64,11 @@
64
64
  "module": "./dist/src/index.js",
65
65
  "dependencies": {
66
66
  "@libsql/client": "^0.17.2",
67
- "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.16",
68
- "@rig/core": "npm:@h-rig/core@0.0.6-alpha.16",
69
- "@rig/hook-kit": "npm:@h-rig/hook-kit@0.0.6-alpha.16",
70
- "@rig/shared": "npm:@h-rig/shared@0.0.6-alpha.16",
71
- "@rig/validator-kit": "npm:@h-rig/validator-kit@0.0.6-alpha.16",
67
+ "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.18",
68
+ "@rig/core": "npm:@h-rig/core@0.0.6-alpha.18",
69
+ "@rig/hook-kit": "npm:@h-rig/hook-kit@0.0.6-alpha.18",
70
+ "@rig/shared": "npm:@h-rig/shared@0.0.6-alpha.18",
71
+ "@rig/validator-kit": "npm:@h-rig/validator-kit@0.0.6-alpha.18",
72
72
  "effect": "4.0.0-beta.78",
73
73
  "smol-toml": "^1.6.0"
74
74
  }