@spooky-sync/cli 0.0.1-canary.53 → 0.0.1-canary.54

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/cli.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";const r=require("child_process"),s=require("./resolve-binary-BiE3UUaE.cjs"),i=s.findBinary(),e=r.spawnSync(i,process.argv.slice(2),{stdio:"inherit"});e.error&&(console.error(`Failed to execute spky: ${e.error.message}`),process.exit(1));process.exit(e.status??1);
2
+ "use strict";const r=require("child_process"),s=require("./resolve-binary-WAbgSP09.cjs"),i=s.findBinary(),e=r.spawnSync(i,process.argv.slice(2),{stdio:"inherit"});e.error&&(console.error(`Failed to execute spky: ${e.error.message}`),process.exit(1));process.exit(e.status??1);
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync as e } from "child_process";
3
- import { f as s } from "./resolve-binary-BMDKUPcG.js";
3
+ import { f as s } from "./resolve-binary-CxfW2wQ_.js";
4
4
  const o = s(), r = e(o, process.argv.slice(2), { stdio: "inherit" });
5
5
  r.error && (console.error(`Failed to execute spky: ${r.error.message}`), process.exit(1));
6
6
  process.exit(r.status ?? 1);
@@ -0,0 +1,55 @@
1
+ import { platform as s, arch as y } from "os";
2
+ import { dirname as f, resolve as i } from "path";
3
+ import { existsSync as e } from "fs";
4
+ import { fileURLToPath as d } from "url";
5
+ import { createRequire as x } from "module";
6
+ const g = d(import.meta.url), m = f(g), u = {
7
+ "darwin-arm64": "@spooky-sync/cli-darwin-arm64",
8
+ "darwin-x64": "@spooky-sync/cli-darwin-x64",
9
+ "linux-arm64": "@spooky-sync/cli-linux-arm64",
10
+ "linux-x64": "@spooky-sync/cli-linux-x64",
11
+ "win32-x64": "@spooky-sync/cli-win32-x64"
12
+ };
13
+ function h() {
14
+ const r = `${s()}-${y()}`, n = u[r];
15
+ if (!n) return;
16
+ const t = s() === "win32" ? "spky.exe" : "spky";
17
+ try {
18
+ const o = x(import.meta.url).resolve(`${n}/package.json`);
19
+ return i(f(o), t);
20
+ } catch {
21
+ return;
22
+ }
23
+ }
24
+ function v() {
25
+ const r = s() === "win32" ? "spky.exe" : "spky", n = h();
26
+ if (n && e(n))
27
+ return n;
28
+ const t = i(m, "../target/release", r);
29
+ if (e(t))
30
+ return t;
31
+ const a = i(m, "../target/debug", r);
32
+ if (e(a))
33
+ return a;
34
+ const o = i(m, "..", r);
35
+ if (e(o))
36
+ return o;
37
+ const c = i(process.cwd(), r);
38
+ if (e(c))
39
+ return c;
40
+ const l = `${s()}-${y()}`, p = u[l], k = p ? `
41
+ Try installing the platform package: npm install ${p}` : `
42
+ Your platform (${l}) is not supported.`;
43
+ throw new Error(
44
+ `Could not find spky binary. Checked paths:
45
+ - Platform package (${p ?? "none"})
46
+ - ${t}
47
+ - ${a}
48
+ - ${o}
49
+ - ${c}
50
+ ` + k
51
+ );
52
+ }
53
+ export {
54
+ v as f
55
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";const t=require("os"),e=require("path"),a=require("fs"),m=require("url"),h=require("module");var o=typeof document<"u"?document.currentScript:null;const k=m.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:o&&o.tagName.toUpperCase()==="SCRIPT"&&o.src||new URL("resolve-binary-WAbgSP09.cjs",document.baseURI).href),p=e.dirname(k),f={"darwin-arm64":"@spooky-sync/cli-darwin-arm64","darwin-x64":"@spooky-sync/cli-darwin-x64","linux-arm64":"@spooky-sync/cli-linux-arm64","linux-x64":"@spooky-sync/cli-linux-x64","win32-x64":"@spooky-sync/cli-win32-x64"};function x(){const r=`${t.platform()}-${t.arch()}`,n=f[r];if(!n)return;const s=t.platform()==="win32"?"spky.exe":"spky";try{const i=h.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:o&&o.tagName.toUpperCase()==="SCRIPT"&&o.src||new URL("resolve-binary-WAbgSP09.cjs",document.baseURI).href).resolve(`${n}/package.json`);return e.resolve(e.dirname(i),s)}catch{return}}function $(){const r=t.platform()==="win32"?"spky.exe":"spky",n=x();if(n&&a.existsSync(n))return n;const s=e.resolve(p,"../target/release",r);if(a.existsSync(s))return s;const c=e.resolve(p,"../target/debug",r);if(a.existsSync(c))return c;const i=e.resolve(p,"..",r);if(a.existsSync(i))return i;const u=e.resolve(process.cwd(),r);if(a.existsSync(u))return u;const y=`${t.platform()}-${t.arch()}`,l=f[y],d=l?`
2
+ Try installing the platform package: npm install ${l}`:`
3
+ Your platform (${y}) is not supported.`;throw new Error(`Could not find spky binary. Checked paths:
4
+ - Platform package (${l??"none"})
5
+ - ${s}
6
+ - ${c}
7
+ - ${i}
8
+ - ${u}
9
+ `+d)}exports.findBinary=$;
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-binary.d.ts","sourceRoot":"","sources":["../src/resolve-binary.ts"],"names":[],"mappings":"AAiCA,wBAAgB,UAAU,IAAI,MAAM,CAyCnC"}
1
+ {"version":3,"file":"resolve-binary.d.ts","sourceRoot":"","sources":["../src/resolve-binary.ts"],"names":[],"mappings":"AAiCA,wBAAgB,UAAU,IAAI,MAAM,CA+CnC"}
package/dist/syncgen.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("child_process"),a=require("util"),i=require("./resolve-binary-BiE3UUaE.cjs"),d=a.promisify(t.execFile);async function f(e){const n=i.findBinary(),r=[];r.push("--input",e.input),r.push("--output",e.output),e.format&&r.push("--format",e.format),e.pretty&&r.push("--pretty"),e.all&&r.push("--all"),e.noHeader&&r.push("--no-header"),e.append&&r.push("--append",e.append),e.modulesDir&&r.push("--modules-dir",e.modulesDir),e.mode&&r.push("--mode",e.mode),e.endpoint&&r.push("--endpoint",e.endpoint),e.secret&&r.push("--secret",e.secret),e.config&&r.push("--config",e.config);try{const{stdout:u,stderr:c}=await d(n,r);return c&&console.error(c),u}catch(u){throw new Error(`Syncgen failed: ${u.message}`,{cause:u})}}exports.runSyncgen=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("child_process"),a=require("util"),i=require("./resolve-binary-WAbgSP09.cjs"),d=a.promisify(t.execFile);async function f(e){const n=i.findBinary(),r=[];r.push("--input",e.input),r.push("--output",e.output),e.format&&r.push("--format",e.format),e.pretty&&r.push("--pretty"),e.all&&r.push("--all"),e.noHeader&&r.push("--no-header"),e.append&&r.push("--append",e.append),e.modulesDir&&r.push("--modules-dir",e.modulesDir),e.mode&&r.push("--mode",e.mode),e.endpoint&&r.push("--endpoint",e.endpoint),e.secret&&r.push("--secret",e.secret),e.config&&r.push("--config",e.config);try{const{stdout:u,stderr:c}=await d(n,r);return c&&console.error(c),u}catch(u){throw new Error(`Syncgen failed: ${u.message}`,{cause:u})}}exports.runSyncgen=f;
package/dist/syncgen.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { execFile as c } from "child_process";
2
2
  import { promisify as d } from "util";
3
- import { f as t } from "./resolve-binary-BMDKUPcG.js";
3
+ import { f as t } from "./resolve-binary-CxfW2wQ_.js";
4
4
  const i = d(c);
5
5
  async function s(e) {
6
6
  const a = t(), r = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spooky-sync/cli",
3
- "version": "0.0.1-canary.53",
3
+ "version": "0.0.1-canary.54",
4
4
  "description": "Generate TypeScript/Dart types from SurrealDB schema files",
5
5
  "type": "module",
6
6
  "main": "./dist/syncgen.cjs",
@@ -58,10 +58,10 @@
58
58
  "vitest": "^1.0.0"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@spooky-sync/cli-darwin-arm64": "0.0.1-canary.53",
62
- "@spooky-sync/cli-darwin-x64": "0.0.1-canary.53",
63
- "@spooky-sync/cli-linux-arm64": "0.0.1-canary.53",
64
- "@spooky-sync/cli-linux-x64": "0.0.1-canary.53",
65
- "@spooky-sync/cli-win32-x64": "0.0.1-canary.53"
61
+ "@spooky-sync/cli-darwin-arm64": "0.0.1-canary.54",
62
+ "@spooky-sync/cli-darwin-x64": "0.0.1-canary.54",
63
+ "@spooky-sync/cli-linux-arm64": "0.0.1-canary.54",
64
+ "@spooky-sync/cli-linux-x64": "0.0.1-canary.54",
65
+ "@spooky-sync/cli-win32-x64": "0.0.1-canary.54"
66
66
  }
67
67
  }
@@ -1,51 +0,0 @@
1
- import { platform as s, arch as l } from "os";
2
- import { dirname as y, resolve as a } from "path";
3
- import { existsSync as e } from "fs";
4
- import { fileURLToPath as k } from "url";
5
- import { createRequire as d } from "module";
6
- const x = k(import.meta.url), m = y(x), f = {
7
- "darwin-arm64": "@spooky-sync/cli-darwin-arm64",
8
- "darwin-x64": "@spooky-sync/cli-darwin-x64",
9
- "linux-arm64": "@spooky-sync/cli-linux-arm64",
10
- "linux-x64": "@spooky-sync/cli-linux-x64",
11
- "win32-x64": "@spooky-sync/cli-win32-x64"
12
- };
13
- function w() {
14
- const n = `${s()}-${l()}`, r = f[n];
15
- if (!r) return;
16
- const o = s() === "win32" ? "spky.exe" : "spky";
17
- try {
18
- const t = d(import.meta.url).resolve(`${r}/package.json`);
19
- return a(y(t), o);
20
- } catch {
21
- return;
22
- }
23
- }
24
- function _() {
25
- const n = s() === "win32" ? "spky.exe" : "spky", r = w();
26
- if (r && e(r))
27
- return r;
28
- const o = a(m, "../target/release", n);
29
- if (e(o))
30
- return o;
31
- const i = a(m, "..", n);
32
- if (e(i))
33
- return i;
34
- const t = a(process.cwd(), n);
35
- if (e(t))
36
- return t;
37
- const p = `${s()}-${l()}`, c = f[p], u = c ? `
38
- Try installing the platform package: npm install ${c}` : `
39
- Your platform (${p}) is not supported.`;
40
- throw new Error(
41
- `Could not find spky binary. Checked paths:
42
- - Platform package (${c ?? "none"})
43
- - ${o}
44
- - ${i}
45
- - ${t}
46
- ` + u
47
- );
48
- }
49
- export {
50
- _ as f
51
- };
@@ -1,8 +0,0 @@
1
- "use strict";const n=require("os"),r=require("path"),c=require("fs"),d=require("url"),m=require("module");var t=typeof document<"u"?document.currentScript:null;const h=d.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("resolve-binary-BiE3UUaE.cjs",document.baseURI).href),p=r.dirname(h),y={"darwin-arm64":"@spooky-sync/cli-darwin-arm64","darwin-x64":"@spooky-sync/cli-darwin-x64","linux-arm64":"@spooky-sync/cli-linux-arm64","linux-x64":"@spooky-sync/cli-linux-x64","win32-x64":"@spooky-sync/cli-win32-x64"};function k(){const o=`${n.platform()}-${n.arch()}`,e=y[o];if(!e)return;const s=n.platform()==="win32"?"spky.exe":"spky";try{const i=m.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("resolve-binary-BiE3UUaE.cjs",document.baseURI).href).resolve(`${e}/package.json`);return r.resolve(r.dirname(i),s)}catch{return}}function x(){const o=n.platform()==="win32"?"spky.exe":"spky",e=k();if(e&&c.existsSync(e))return e;const s=r.resolve(p,"../target/release",o);if(c.existsSync(s))return s;const a=r.resolve(p,"..",o);if(c.existsSync(a))return a;const i=r.resolve(process.cwd(),o);if(c.existsSync(i))return i;const u=`${n.platform()}-${n.arch()}`,l=y[u],f=l?`
2
- Try installing the platform package: npm install ${l}`:`
3
- Your platform (${u}) is not supported.`;throw new Error(`Could not find spky binary. Checked paths:
4
- - Platform package (${l??"none"})
5
- - ${s}
6
- - ${a}
7
- - ${i}
8
- `+f)}exports.findBinary=x;