@mondaydotcomorg/z2h-cli 0.7.2-fix-arielle-cli-infinite-updates-and-skill-improves-0f06f2d → 0.7.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/dist/esm/index.mjs +1 -15
- package/dist/index.js +1 -15
- package/package.json +1 -1
- package/src/index.ts +1 -16
- package/src/templates/app/CLAUDE.md +1 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -18,22 +18,8 @@ import { trackDuration } from './util/tracker.mjs';
|
|
|
18
18
|
const { version } = createRequire(import.meta.url)('../package.json');
|
|
19
19
|
const UPDATE_SCRIPT = path.join(os.homedir(), 'Development', 'bigbrain-z2h', 'z2h', 'setup', 'update.sh');
|
|
20
20
|
function selfUpdate() {
|
|
21
|
-
// Re-entrancy guard. update.sh runs `z2h-cli migrate` (and may run other
|
|
22
|
-
// z2h-cli commands); without this, each command would fire selfUpdate again
|
|
23
|
-
// and spawn a fresh update.sh — an infinite loop of detached updates. We tag
|
|
24
|
-
// the spawned update.sh with Z2H_UPDATE_RUNNING, so every z2h-cli it invokes
|
|
25
|
-
// inherits the flag and skips its own selfUpdate. The flag lives only on the
|
|
26
|
-
// spawned child's environment — it never touches the user's shell, so there
|
|
27
|
-
// is nothing to unset.
|
|
28
|
-
if (process.env.Z2H_UPDATE_RUNNING) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
21
|
try {
|
|
32
|
-
execa('bash', [UPDATE_SCRIPT], {
|
|
33
|
-
detached: true,
|
|
34
|
-
stdio: 'ignore',
|
|
35
|
-
env: { ...process.env, Z2H_UPDATE_RUNNING: '1' },
|
|
36
|
-
}).unref();
|
|
22
|
+
execa('bash', [UPDATE_SCRIPT], { detached: true, stdio: 'ignore' }).unref();
|
|
37
23
|
}
|
|
38
24
|
catch (err) {
|
|
39
25
|
errorLog(`Z2H auto-update failed to start: ${err.message}`);
|
package/dist/index.js
CHANGED
|
@@ -24,22 +24,8 @@ const path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
24
24
|
const { version } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)))('../package.json');
|
|
25
25
|
const UPDATE_SCRIPT = path__default.default.join(os__default.default.homedir(), 'Development', 'bigbrain-z2h', 'z2h', 'setup', 'update.sh');
|
|
26
26
|
function selfUpdate() {
|
|
27
|
-
// Re-entrancy guard. update.sh runs `z2h-cli migrate` (and may run other
|
|
28
|
-
// z2h-cli commands); without this, each command would fire selfUpdate again
|
|
29
|
-
// and spawn a fresh update.sh — an infinite loop of detached updates. We tag
|
|
30
|
-
// the spawned update.sh with Z2H_UPDATE_RUNNING, so every z2h-cli it invokes
|
|
31
|
-
// inherits the flag and skips its own selfUpdate. The flag lives only on the
|
|
32
|
-
// spawned child's environment — it never touches the user's shell, so there
|
|
33
|
-
// is nothing to unset.
|
|
34
|
-
if (process.env.Z2H_UPDATE_RUNNING) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
27
|
try {
|
|
38
|
-
execa.execa('bash', [UPDATE_SCRIPT], {
|
|
39
|
-
detached: true,
|
|
40
|
-
stdio: 'ignore',
|
|
41
|
-
env: { ...process.env, Z2H_UPDATE_RUNNING: '1' },
|
|
42
|
-
}).unref();
|
|
28
|
+
execa.execa('bash', [UPDATE_SCRIPT], { detached: true, stdio: 'ignore' }).unref();
|
|
43
29
|
}
|
|
44
30
|
catch (err) {
|
|
45
31
|
util_logger.errorLog(`Z2H auto-update failed to start: ${err.message}`);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -20,23 +20,8 @@ const { version } = createRequire(import.meta.url)('../package.json') as { versi
|
|
|
20
20
|
const UPDATE_SCRIPT = path.join(os.homedir(), 'Development', 'bigbrain-z2h', 'z2h', 'setup', 'update.sh');
|
|
21
21
|
|
|
22
22
|
function selfUpdate(): void {
|
|
23
|
-
// Re-entrancy guard. update.sh runs `z2h-cli migrate` (and may run other
|
|
24
|
-
// z2h-cli commands); without this, each command would fire selfUpdate again
|
|
25
|
-
// and spawn a fresh update.sh — an infinite loop of detached updates. We tag
|
|
26
|
-
// the spawned update.sh with Z2H_UPDATE_RUNNING, so every z2h-cli it invokes
|
|
27
|
-
// inherits the flag and skips its own selfUpdate. The flag lives only on the
|
|
28
|
-
// spawned child's environment — it never touches the user's shell, so there
|
|
29
|
-
// is nothing to unset.
|
|
30
|
-
if (process.env.Z2H_UPDATE_RUNNING) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
23
|
try {
|
|
35
|
-
execa('bash', [UPDATE_SCRIPT], {
|
|
36
|
-
detached: true,
|
|
37
|
-
stdio: 'ignore',
|
|
38
|
-
env: { ...process.env, Z2H_UPDATE_RUNNING: '1' },
|
|
39
|
-
}).unref();
|
|
24
|
+
execa('bash', [UPDATE_SCRIPT], { detached: true, stdio: 'ignore' }).unref();
|
|
40
25
|
} catch (err) {
|
|
41
26
|
errorLog(`Z2H auto-update failed to start: ${(err as Error).message}`);
|
|
42
27
|
}
|
|
@@ -27,9 +27,7 @@ The orchestrator routes to `z2h:feature-development`, which handles the typechec
|
|
|
27
27
|
|
|
28
28
|
## 🌟 Data-Fetching Hierarchy
|
|
29
29
|
|
|
30
|
-
When a request needs data, follow `z2h:coding-standards-mf` §0: write a `runQuery` helper for Snowflake data (TS module using `getBigBrainAPI()` for React apps; vanilla `<script>` using `window.location.origin` for html-embed apps), write a client-side fetch for other browser-accessible sources, or tell the user to reach out at `#ask-zero-to-hero` if the data needs an API key or server-side access. Backend changes to `bigbrain-zth` are not in scope
|
|
31
|
-
|
|
32
|
-
**Query storage:** All SQL query strings go in `src/queries.ts`, not inline in components or hooks. Import from there.
|
|
30
|
+
When a request needs data, follow `z2h:coding-standards-mf` §0: write a `runQuery` helper for Snowflake data (TS module using `getBigBrainAPI()` for React apps; vanilla `<script>` using `window.location.origin` for html-embed apps), write a client-side fetch for other browser-accessible sources, or tell the user to reach out at `#ask-zero-to-hero` if the data needs an API key or server-side access. Backend changes to `bigbrain-zth` are not in scope.
|
|
33
31
|
|
|
34
32
|
---
|
|
35
33
|
|